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
[ { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Definitions", "short_module": "SD" }, { "abbrev": true, "full_module": "Hacl.Bignum.Montgomery", "short_module": "BM" }, { "abbrev": true, "full_module": "Hacl.Bignum.Exponentiation", "short_module": "BE" }, { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.ModInv", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "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 bn_mod_inv_prime_precomp_st (t:limb_t) (len:BN.meta_len t) = n:lbignum t len -> mu:limb t -> r2:lbignum t len -> a:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> live h n /\ live h r2 /\ live h a /\ live h res /\ disjoint res n /\ disjoint res a /\ disjoint n a /\ disjoint res r2 /\ disjoint a r2 /\ disjoint n r2 /\ S.bn_mod_inv_prime_pre (as_seq h n) (as_seq h a) /\ bn_v h r2 == pow2 (2 * bits t * v len) % bn_v h n /\ (1 + bn_v h n * v mu) % pow2 (bits t) == 0) (ensures fun h0 r h1 -> modifies (loc res) h0 h1 /\ bn_v h1 res * bn_v h0 a % bn_v h0 n = 1)
let bn_mod_inv_prime_precomp_st (t: limb_t) (len: BN.meta_len t) =
false
null
false
n: lbignum t len -> mu: limb t -> r2: lbignum t len -> a: lbignum t len -> res: lbignum t len -> Stack unit (requires fun h -> live h n /\ live h r2 /\ live h a /\ live h res /\ disjoint res n /\ disjoint res a /\ disjoint n a /\ disjoint res r2 /\ disjoint a r2 /\ disjoint n r2 /\ S.bn_mod_inv_prime_pre (as_seq h n) (as_seq h a) /\ bn_v h r2 == pow2 ((2 * bits t) * v len) % bn_v h n /\ (1 + bn_v h n * v mu) % pow2 (bits t) == 0) (ensures fun h0 r h1 -> modifies (loc res) h0 h1 /\ bn_v h1 res * bn_v h0 a % bn_v h0 n = 1)
{ "checked_file": "Hacl.Bignum.ModInv.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Ignore.fsti.checked", "Lib.NatMod.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.ModInv.fst.checked", "Hacl.Spec.Bignum.Definitions.fst.checked", "Hacl.Bignum.Montgomery.fsti.checked", "Hacl.Bignum.Exponentiation.fsti.checked", "Hacl.Bignum.Definitions.fst.checked", "Hacl.Bignum.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Bignum.ModInv.fst" }
[ "total" ]
[ "Hacl.Bignum.Definitions.limb_t", "Hacl.Bignum.meta_len", "Hacl.Bignum.Definitions.lbignum", "Hacl.Bignum.Definitions.limb", "Prims.unit", "FStar.Monotonic.HyperStack.mem", "Prims.l_and", "Lib.Buffer.live", "Lib.Buffer.MUT", "Lib.Buffer.disjoint", "Hacl.Spec.Bignum.ModInv.bn_mod_inv_prime_pre", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.as_seq", "Prims.eq2", "Prims.int", "Hacl.Bignum.Definitions.bn_v", "Prims.op_Modulus", "Prims.pow2", "FStar.Mul.op_Star", "Lib.IntTypes.bits", "Prims.op_Addition", "Lib.IntTypes.SEC", "Lib.Buffer.modifies", "Lib.Buffer.loc", "Prims.b2t", "Prims.op_Equality" ]
[]
module Hacl.Bignum.ModInv open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Bignum.Definitions module ST = FStar.HyperStack.ST module S = Hacl.Spec.Bignum.ModInv module BN = Hacl.Bignum module BE = Hacl.Bignum.Exponentiation module BM = Hacl.Bignum.Montgomery module SD = Hacl.Spec.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let bn_check_mod_inv_prime_st (t:limb_t) (len:BN.meta_len t) = n:lbignum t len -> a:lbignum t len -> Stack (limb t) (requires fun h -> live h n /\ live h a /\ disjoint n a) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.bn_check_mod_inv_prime (as_seq h0 n) (as_seq h0 a)) inline_for_extraction noextract val bn_check_mod_inv_prime: #t:limb_t -> len:BN.meta_len t -> bn_check_mod_inv_prime_st t len let bn_check_mod_inv_prime #t len n a = let m0 = BM.bn_check_modulus n in let m1 = BN.bn_is_zero_mask len a in let m2 = BN.bn_lt_mask len a n in m0 &. (lognot m1) &. m2 inline_for_extraction noextract val bn_mod_inv_prime_n2: #t:limb_t -> len:BN.meta_len t -> n:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> 1 < bn_v h n /\ live h n /\ live h res /\ disjoint res n) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ as_seq h1 res == S.bn_mod_inv_prime_n2 (as_seq h0 n)) let bn_mod_inv_prime_n2 #t len n res = let c = BN.bn_sub1 len n (uint #t #SEC 2) res in LowStar.Ignore.ignore c; () inline_for_extraction noextract
false
false
Hacl.Bignum.ModInv.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val bn_mod_inv_prime_precomp_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0
[]
Hacl.Bignum.ModInv.bn_mod_inv_prime_precomp_st
{ "file_name": "code/bignum/Hacl.Bignum.ModInv.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0
{ "end_col": 44, "end_line": 76, "start_col": 4, "start_line": 61 }
FStar.HyperStack.ST.Stack
val bn_mod_inv_prime_n2: #t:limb_t -> len:BN.meta_len t -> n:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> 1 < bn_v h n /\ live h n /\ live h res /\ disjoint res n) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ as_seq h1 res == S.bn_mod_inv_prime_n2 (as_seq h0 n))
[ { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Definitions", "short_module": "SD" }, { "abbrev": true, "full_module": "Hacl.Bignum.Montgomery", "short_module": "BM" }, { "abbrev": true, "full_module": "Hacl.Bignum.Exponentiation", "short_module": "BE" }, { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.ModInv", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "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 bn_mod_inv_prime_n2 #t len n res = let c = BN.bn_sub1 len n (uint #t #SEC 2) res in LowStar.Ignore.ignore c; ()
val bn_mod_inv_prime_n2: #t:limb_t -> len:BN.meta_len t -> n:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> 1 < bn_v h n /\ live h n /\ live h res /\ disjoint res n) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ as_seq h1 res == S.bn_mod_inv_prime_n2 (as_seq h0 n)) let bn_mod_inv_prime_n2 #t len n res =
true
null
false
let c = BN.bn_sub1 len n (uint #t #SEC 2) res in LowStar.Ignore.ignore c; ()
{ "checked_file": "Hacl.Bignum.ModInv.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Ignore.fsti.checked", "Lib.NatMod.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.ModInv.fst.checked", "Hacl.Spec.Bignum.Definitions.fst.checked", "Hacl.Bignum.Montgomery.fsti.checked", "Hacl.Bignum.Exponentiation.fsti.checked", "Hacl.Bignum.Definitions.fst.checked", "Hacl.Bignum.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Bignum.ModInv.fst" }
[]
[ "Hacl.Bignum.Definitions.limb_t", "Hacl.Bignum.meta_len", "Hacl.Bignum.Definitions.lbignum", "Prims.unit", "LowStar.Ignore.ignore", "Hacl.Spec.Bignum.Base.carry", "Hacl.Bignum.bn_sub1", "Lib.IntTypes.uint", "Lib.IntTypes.SEC" ]
[]
module Hacl.Bignum.ModInv open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Bignum.Definitions module ST = FStar.HyperStack.ST module S = Hacl.Spec.Bignum.ModInv module BN = Hacl.Bignum module BE = Hacl.Bignum.Exponentiation module BM = Hacl.Bignum.Montgomery module SD = Hacl.Spec.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let bn_check_mod_inv_prime_st (t:limb_t) (len:BN.meta_len t) = n:lbignum t len -> a:lbignum t len -> Stack (limb t) (requires fun h -> live h n /\ live h a /\ disjoint n a) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.bn_check_mod_inv_prime (as_seq h0 n) (as_seq h0 a)) inline_for_extraction noextract val bn_check_mod_inv_prime: #t:limb_t -> len:BN.meta_len t -> bn_check_mod_inv_prime_st t len let bn_check_mod_inv_prime #t len n a = let m0 = BM.bn_check_modulus n in let m1 = BN.bn_is_zero_mask len a in let m2 = BN.bn_lt_mask len a n in m0 &. (lognot m1) &. m2 inline_for_extraction noextract val bn_mod_inv_prime_n2: #t:limb_t -> len:BN.meta_len t -> n:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> 1 < bn_v h n /\ live h n /\ live h res /\ disjoint res n) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ as_seq h1 res == S.bn_mod_inv_prime_n2 (as_seq h0 n))
false
false
Hacl.Bignum.ModInv.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val bn_mod_inv_prime_n2: #t:limb_t -> len:BN.meta_len t -> n:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> 1 < bn_v h n /\ live h n /\ live h res /\ disjoint res n) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ as_seq h1 res == S.bn_mod_inv_prime_n2 (as_seq h0 n))
[]
Hacl.Bignum.ModInv.bn_mod_inv_prime_n2
{ "file_name": "code/bignum/Hacl.Bignum.ModInv.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Hacl.Bignum.meta_len t -> n: Hacl.Bignum.Definitions.lbignum t len -> res: Hacl.Bignum.Definitions.lbignum t len -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 4, "end_line": 56, "start_col": 38, "start_line": 53 }
Prims.Tot
val mk_bn_mod_inv_prime: #t:limb_t -> len:BN.meta_len t -> bn_mod_exp:BE.bn_mod_exp_st t len -> bn_mod_inv_prime_st t len
[ { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Definitions", "short_module": "SD" }, { "abbrev": true, "full_module": "Hacl.Bignum.Montgomery", "short_module": "BM" }, { "abbrev": true, "full_module": "Hacl.Bignum.Exponentiation", "short_module": "BE" }, { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.ModInv", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "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 mk_bn_mod_inv_prime #t len bn_mod_exp nBits n a res = let h0 = ST.get () in push_frame (); let n2 = create len (uint #t #SEC 0) in bn_mod_inv_prime_n2 #t len n n2; SD.bn_eval_bound (as_seq h0 n) (v len); bn_mod_exp nBits n a (size (bits t) *! len) n2 res; let h1 = ST.get () in assert (bn_v h1 res == Lib.NatMod.pow_mod #(bn_v h0 n) (bn_v h0 a) (bn_v h1 n2)); S.mod_inv_prime_lemma (bn_v h0 n) (bn_v h0 a); pop_frame ()
val mk_bn_mod_inv_prime: #t:limb_t -> len:BN.meta_len t -> bn_mod_exp:BE.bn_mod_exp_st t len -> bn_mod_inv_prime_st t len let mk_bn_mod_inv_prime #t len bn_mod_exp nBits n a res =
false
null
false
let h0 = ST.get () in push_frame (); let n2 = create len (uint #t #SEC 0) in bn_mod_inv_prime_n2 #t len n n2; SD.bn_eval_bound (as_seq h0 n) (v len); bn_mod_exp nBits n a (size (bits t) *! len) n2 res; let h1 = ST.get () in assert (bn_v h1 res == Lib.NatMod.pow_mod #(bn_v h0 n) (bn_v h0 a) (bn_v h1 n2)); S.mod_inv_prime_lemma (bn_v h0 n) (bn_v h0 a); pop_frame ()
{ "checked_file": "Hacl.Bignum.ModInv.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Ignore.fsti.checked", "Lib.NatMod.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.ModInv.fst.checked", "Hacl.Spec.Bignum.Definitions.fst.checked", "Hacl.Bignum.Montgomery.fsti.checked", "Hacl.Bignum.Exponentiation.fsti.checked", "Hacl.Bignum.Definitions.fst.checked", "Hacl.Bignum.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Bignum.ModInv.fst" }
[ "total" ]
[ "Hacl.Bignum.Definitions.limb_t", "Hacl.Bignum.meta_len", "Hacl.Bignum.Exponentiation.bn_mod_exp_st", "Lib.IntTypes.size_t", "Hacl.Bignum.Definitions.lbignum", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Hacl.Spec.Bignum.ModInv.mod_inv_prime_lemma", "Hacl.Bignum.Definitions.bn_v", "Prims._assert", "Prims.eq2", "Prims.nat", "Lib.NatMod.pow_mod", "FStar.Monotonic.HyperStack.mem", "FStar.HyperStack.ST.get", "Lib.IntTypes.op_Star_Bang", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.IntTypes.size", "Lib.IntTypes.bits", "Hacl.Spec.Bignum.Definitions.bn_eval_bound", "Lib.IntTypes.v", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Hacl.Bignum.Definitions.limb", "Hacl.Bignum.ModInv.bn_mod_inv_prime_n2", "Lib.Buffer.lbuffer_t", "Lib.Buffer.create", "Lib.IntTypes.uint", "Lib.IntTypes.SEC", "Lib.Buffer.lbuffer", "FStar.HyperStack.ST.push_frame" ]
[]
module Hacl.Bignum.ModInv open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Bignum.Definitions module ST = FStar.HyperStack.ST module S = Hacl.Spec.Bignum.ModInv module BN = Hacl.Bignum module BE = Hacl.Bignum.Exponentiation module BM = Hacl.Bignum.Montgomery module SD = Hacl.Spec.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let bn_check_mod_inv_prime_st (t:limb_t) (len:BN.meta_len t) = n:lbignum t len -> a:lbignum t len -> Stack (limb t) (requires fun h -> live h n /\ live h a /\ disjoint n a) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.bn_check_mod_inv_prime (as_seq h0 n) (as_seq h0 a)) inline_for_extraction noextract val bn_check_mod_inv_prime: #t:limb_t -> len:BN.meta_len t -> bn_check_mod_inv_prime_st t len let bn_check_mod_inv_prime #t len n a = let m0 = BM.bn_check_modulus n in let m1 = BN.bn_is_zero_mask len a in let m2 = BN.bn_lt_mask len a n in m0 &. (lognot m1) &. m2 inline_for_extraction noextract val bn_mod_inv_prime_n2: #t:limb_t -> len:BN.meta_len t -> n:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> 1 < bn_v h n /\ live h n /\ live h res /\ disjoint res n) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ as_seq h1 res == S.bn_mod_inv_prime_n2 (as_seq h0 n)) let bn_mod_inv_prime_n2 #t len n res = let c = BN.bn_sub1 len n (uint #t #SEC 2) res in LowStar.Ignore.ignore c; () inline_for_extraction noextract let bn_mod_inv_prime_precomp_st (t:limb_t) (len:BN.meta_len t) = n:lbignum t len -> mu:limb t -> r2:lbignum t len -> a:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> live h n /\ live h r2 /\ live h a /\ live h res /\ disjoint res n /\ disjoint res a /\ disjoint n a /\ disjoint res r2 /\ disjoint a r2 /\ disjoint n r2 /\ S.bn_mod_inv_prime_pre (as_seq h n) (as_seq h a) /\ bn_v h r2 == pow2 (2 * bits t * v len) % bn_v h n /\ (1 + bn_v h n * v mu) % pow2 (bits t) == 0) (ensures fun h0 r h1 -> modifies (loc res) h0 h1 /\ bn_v h1 res * bn_v h0 a % bn_v h0 n = 1) inline_for_extraction noextract val mk_bn_mod_inv_prime_precomp: #t:limb_t -> len:BN.meta_len t -> bn_mod_exp_precomp:BE.bn_mod_exp_precomp_st t len -> bn_mod_inv_prime_precomp_st t len let mk_bn_mod_inv_prime_precomp #t len bn_mod_exp_precomp n mu r2 a res = let h0 = ST.get () in push_frame (); let n2 = create len (uint #t #SEC 0) in bn_mod_inv_prime_n2 #t len n n2; SD.bn_eval_bound (as_seq h0 n) (v len); bn_mod_exp_precomp n mu r2 a (size (bits t) *! len) n2 res; let h1 = ST.get () in assert (bn_v h1 res == Lib.NatMod.pow_mod #(bn_v h0 n) (bn_v h0 a) (bn_v h1 n2)); S.mod_inv_prime_lemma (bn_v h0 n) (bn_v h0 a); pop_frame () inline_for_extraction noextract let bn_mod_inv_prime_st (t:limb_t) (len:BN.meta_len t) = nBits:size_t -> n:lbignum t len -> a:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> live h n /\ live h a /\ live h res /\ disjoint res n /\ disjoint res a /\ disjoint n a /\ v nBits / bits t < v len /\ pow2 (v nBits) < bn_v h n /\ S.bn_mod_inv_prime_pre (as_seq h n) (as_seq h a)) (ensures fun h0 r h1 -> modifies (loc res) h0 h1 /\ bn_v h1 res * bn_v h0 a % bn_v h0 n = 1) inline_for_extraction noextract val mk_bn_mod_inv_prime: #t:limb_t -> len:BN.meta_len t -> bn_mod_exp:BE.bn_mod_exp_st t len -> bn_mod_inv_prime_st t len
false
false
Hacl.Bignum.ModInv.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val mk_bn_mod_inv_prime: #t:limb_t -> len:BN.meta_len t -> bn_mod_exp:BE.bn_mod_exp_st t len -> bn_mod_inv_prime_st t len
[]
Hacl.Bignum.ModInv.mk_bn_mod_inv_prime
{ "file_name": "code/bignum/Hacl.Bignum.ModInv.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Hacl.Bignum.meta_len t -> bn_mod_exp: Hacl.Bignum.Exponentiation.bn_mod_exp_st t len -> Hacl.Bignum.ModInv.bn_mod_inv_prime_st t len
{ "end_col": 14, "end_line": 135, "start_col": 57, "start_line": 124 }
Prims.Tot
val mk_bn_mod_inv_prime_precomp: #t:limb_t -> len:BN.meta_len t -> bn_mod_exp_precomp:BE.bn_mod_exp_precomp_st t len -> bn_mod_inv_prime_precomp_st t len
[ { "abbrev": true, "full_module": "Hacl.Spec.Bignum.Definitions", "short_module": "SD" }, { "abbrev": true, "full_module": "Hacl.Bignum.Montgomery", "short_module": "BM" }, { "abbrev": true, "full_module": "Hacl.Bignum.Exponentiation", "short_module": "BE" }, { "abbrev": true, "full_module": "Hacl.Bignum", "short_module": "BN" }, { "abbrev": true, "full_module": "Hacl.Spec.Bignum.ModInv", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Bignum.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Bignum", "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 mk_bn_mod_inv_prime_precomp #t len bn_mod_exp_precomp n mu r2 a res = let h0 = ST.get () in push_frame (); let n2 = create len (uint #t #SEC 0) in bn_mod_inv_prime_n2 #t len n n2; SD.bn_eval_bound (as_seq h0 n) (v len); bn_mod_exp_precomp n mu r2 a (size (bits t) *! len) n2 res; let h1 = ST.get () in assert (bn_v h1 res == Lib.NatMod.pow_mod #(bn_v h0 n) (bn_v h0 a) (bn_v h1 n2)); S.mod_inv_prime_lemma (bn_v h0 n) (bn_v h0 a); pop_frame ()
val mk_bn_mod_inv_prime_precomp: #t:limb_t -> len:BN.meta_len t -> bn_mod_exp_precomp:BE.bn_mod_exp_precomp_st t len -> bn_mod_inv_prime_precomp_st t len let mk_bn_mod_inv_prime_precomp #t len bn_mod_exp_precomp n mu r2 a res =
false
null
false
let h0 = ST.get () in push_frame (); let n2 = create len (uint #t #SEC 0) in bn_mod_inv_prime_n2 #t len n n2; SD.bn_eval_bound (as_seq h0 n) (v len); bn_mod_exp_precomp n mu r2 a (size (bits t) *! len) n2 res; let h1 = ST.get () in assert (bn_v h1 res == Lib.NatMod.pow_mod #(bn_v h0 n) (bn_v h0 a) (bn_v h1 n2)); S.mod_inv_prime_lemma (bn_v h0 n) (bn_v h0 a); pop_frame ()
{ "checked_file": "Hacl.Bignum.ModInv.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Ignore.fsti.checked", "Lib.NatMod.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Spec.Bignum.ModInv.fst.checked", "Hacl.Spec.Bignum.Definitions.fst.checked", "Hacl.Bignum.Montgomery.fsti.checked", "Hacl.Bignum.Exponentiation.fsti.checked", "Hacl.Bignum.Definitions.fst.checked", "Hacl.Bignum.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Bignum.ModInv.fst" }
[ "total" ]
[ "Hacl.Bignum.Definitions.limb_t", "Hacl.Bignum.meta_len", "Hacl.Bignum.Exponentiation.bn_mod_exp_precomp_st", "Hacl.Bignum.Definitions.lbignum", "Hacl.Bignum.Definitions.limb", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Hacl.Spec.Bignum.ModInv.mod_inv_prime_lemma", "Hacl.Bignum.Definitions.bn_v", "Prims._assert", "Prims.eq2", "Prims.nat", "Lib.NatMod.pow_mod", "FStar.Monotonic.HyperStack.mem", "FStar.HyperStack.ST.get", "Lib.IntTypes.op_Star_Bang", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.IntTypes.size", "Lib.IntTypes.bits", "Hacl.Spec.Bignum.Definitions.bn_eval_bound", "Lib.IntTypes.v", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Hacl.Bignum.ModInv.bn_mod_inv_prime_n2", "Lib.Buffer.lbuffer_t", "Lib.Buffer.create", "Lib.IntTypes.uint", "Lib.IntTypes.SEC", "Lib.Buffer.lbuffer", "FStar.HyperStack.ST.push_frame" ]
[]
module Hacl.Bignum.ModInv open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Bignum.Definitions module ST = FStar.HyperStack.ST module S = Hacl.Spec.Bignum.ModInv module BN = Hacl.Bignum module BE = Hacl.Bignum.Exponentiation module BM = Hacl.Bignum.Montgomery module SD = Hacl.Spec.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let bn_check_mod_inv_prime_st (t:limb_t) (len:BN.meta_len t) = n:lbignum t len -> a:lbignum t len -> Stack (limb t) (requires fun h -> live h n /\ live h a /\ disjoint n a) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.bn_check_mod_inv_prime (as_seq h0 n) (as_seq h0 a)) inline_for_extraction noextract val bn_check_mod_inv_prime: #t:limb_t -> len:BN.meta_len t -> bn_check_mod_inv_prime_st t len let bn_check_mod_inv_prime #t len n a = let m0 = BM.bn_check_modulus n in let m1 = BN.bn_is_zero_mask len a in let m2 = BN.bn_lt_mask len a n in m0 &. (lognot m1) &. m2 inline_for_extraction noextract val bn_mod_inv_prime_n2: #t:limb_t -> len:BN.meta_len t -> n:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> 1 < bn_v h n /\ live h n /\ live h res /\ disjoint res n) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ as_seq h1 res == S.bn_mod_inv_prime_n2 (as_seq h0 n)) let bn_mod_inv_prime_n2 #t len n res = let c = BN.bn_sub1 len n (uint #t #SEC 2) res in LowStar.Ignore.ignore c; () inline_for_extraction noextract let bn_mod_inv_prime_precomp_st (t:limb_t) (len:BN.meta_len t) = n:lbignum t len -> mu:limb t -> r2:lbignum t len -> a:lbignum t len -> res:lbignum t len -> Stack unit (requires fun h -> live h n /\ live h r2 /\ live h a /\ live h res /\ disjoint res n /\ disjoint res a /\ disjoint n a /\ disjoint res r2 /\ disjoint a r2 /\ disjoint n r2 /\ S.bn_mod_inv_prime_pre (as_seq h n) (as_seq h a) /\ bn_v h r2 == pow2 (2 * bits t * v len) % bn_v h n /\ (1 + bn_v h n * v mu) % pow2 (bits t) == 0) (ensures fun h0 r h1 -> modifies (loc res) h0 h1 /\ bn_v h1 res * bn_v h0 a % bn_v h0 n = 1) inline_for_extraction noextract val mk_bn_mod_inv_prime_precomp: #t:limb_t -> len:BN.meta_len t -> bn_mod_exp_precomp:BE.bn_mod_exp_precomp_st t len -> bn_mod_inv_prime_precomp_st t len
false
false
Hacl.Bignum.ModInv.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val mk_bn_mod_inv_prime_precomp: #t:limb_t -> len:BN.meta_len t -> bn_mod_exp_precomp:BE.bn_mod_exp_precomp_st t len -> bn_mod_inv_prime_precomp_st t len
[]
Hacl.Bignum.ModInv.mk_bn_mod_inv_prime_precomp
{ "file_name": "code/bignum/Hacl.Bignum.ModInv.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Hacl.Bignum.meta_len t -> bn_mod_exp_precomp: Hacl.Bignum.Exponentiation.bn_mod_exp_precomp_st t len -> Hacl.Bignum.ModInv.bn_mod_inv_prime_precomp_st t len
{ "end_col": 14, "end_line": 97, "start_col": 73, "start_line": 86 }
Prims.Tot
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 aff_point = lbuffer uint64 10ul
let aff_point =
false
null
false
lbuffer uint64 10ul
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "total" ]
[ "Lib.Buffer.lbuffer", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5))
false
true
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val aff_point : Type0
[]
Hacl.Impl.K256.Point.aff_point
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 35, "end_line": 38, "start_col": 16, "start_line": 38 }
Prims.Tot
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 point = lbuffer uint64 15ul
let point =
false
null
false
lbuffer uint64 15ul
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "total" ]
[ "Lib.Buffer.lbuffer", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract let aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p) inline_for_extraction noextract let aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let aff_gety (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul /// Projective coordinates // (_X, _Y, _Z)
false
true
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point : Type0
[]
Hacl.Impl.K256.Point.point
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 31, "end_line": 66, "start_col": 12, "start_line": 66 }
Prims.Tot
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p)
let aff_point_inv (h: mem) (p: aff_point) =
false
null
false
aff_point_inv_seq (as_seq h p)
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "total" ]
[ "FStar.Monotonic.HyperStack.mem", "Hacl.Impl.K256.Point.aff_point", "Hacl.Impl.K256.Point.aff_point_inv_seq", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Prims.logical" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract
false
true
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val aff_point_inv : h: FStar.Monotonic.HyperStack.mem -> p: Hacl.Impl.K256.Point.aff_point -> Prims.logical
[]
Hacl.Impl.K256.Point.aff_point_inv
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
h: FStar.Monotonic.HyperStack.mem -> p: Hacl.Impl.K256.Point.aff_point -> Prims.logical
{ "end_col": 32, "end_line": 42, "start_col": 2, "start_line": 42 }
Prims.GTot
val aff_point_eval (h: mem) (p: aff_point{aff_point_inv h p}) : GTot S.aff_point
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p)
val aff_point_eval (h: mem) (p: aff_point{aff_point_inv h p}) : GTot S.aff_point let aff_point_eval (h: mem) (p: aff_point{aff_point_inv h p}) : GTot S.aff_point =
false
null
false
aff_point_eval_seq (as_seq h p)
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "sometrivial" ]
[ "FStar.Monotonic.HyperStack.mem", "Hacl.Impl.K256.Point.aff_point", "Hacl.Impl.K256.Point.aff_point_inv", "Hacl.Impl.K256.Point.aff_point_eval_seq", "Lib.Buffer.as_seq", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Spec.K256.PointOps.aff_point" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val aff_point_eval (h: mem) (p: aff_point{aff_point_inv h p}) : GTot S.aff_point
[]
Hacl.Impl.K256.Point.aff_point_eval
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
h: FStar.Monotonic.HyperStack.mem -> p: Hacl.Impl.K256.Point.aff_point{Hacl.Impl.K256.Point.aff_point_inv h p} -> Prims.GTot Spec.K256.PointOps.aff_point
{ "end_col": 33, "end_line": 46, "start_col": 2, "start_line": 46 }
Prims.Tot
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 aff_point_seq = LSeq.lseq uint64 10
let aff_point_seq =
false
null
false
LSeq.lseq uint64 10
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "total" ]
[ "Lib.Sequence.lseq", "Lib.IntTypes.uint64" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates
false
true
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val aff_point_seq : Type0
[]
Hacl.Impl.K256.Point.aff_point_seq
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 39, "end_line": 27, "start_col": 20, "start_line": 27 }
Prims.Tot
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5))
let aff_point_inv_seq (p: aff_point_seq) =
false
null
false
inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5))
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "total" ]
[ "Hacl.Impl.K256.Point.aff_point_seq", "Prims.l_and", "Hacl.K256.Field.inv_fully_reduced5", "Hacl.Impl.K256.Point.as_felem5_lseq", "Lib.Sequence.sub", "Lib.IntTypes.uint64", "Prims.logical" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10
false
true
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val aff_point_inv_seq : p: Hacl.Impl.K256.Point.aff_point_seq -> Prims.logical
[]
Hacl.Impl.K256.Point.aff_point_inv_seq
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
p: Hacl.Impl.K256.Point.aff_point_seq -> Prims.logical
{ "end_col": 54, "end_line": 31, "start_col": 2, "start_line": 30 }
Prims.Tot
val aff_point_eval_seq (p: aff_point_seq{aff_point_inv_seq p}) : S.aff_point
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5))
val aff_point_eval_seq (p: aff_point_seq{aff_point_inv_seq p}) : S.aff_point let aff_point_eval_seq (p: aff_point_seq{aff_point_inv_seq p}) : S.aff_point =
false
null
false
as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5))
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "total" ]
[ "Hacl.Impl.K256.Point.aff_point_seq", "Hacl.Impl.K256.Point.aff_point_inv_seq", "FStar.Pervasives.Native.Mktuple2", "Spec.K256.PointOps.felem", "Hacl.Spec.K256.Field52.Definitions.as_nat5", "Hacl.Impl.K256.Point.as_felem5_lseq", "Lib.Sequence.sub", "Lib.IntTypes.uint64", "Spec.K256.PointOps.aff_point" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5))
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val aff_point_eval_seq (p: aff_point_seq{aff_point_inv_seq p}) : S.aff_point
[]
Hacl.Impl.K256.Point.aff_point_eval_seq
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
p: Hacl.Impl.K256.Point.aff_point_seq{Hacl.Impl.K256.Point.aff_point_inv_seq p} -> Spec.K256.PointOps.aff_point
{ "end_col": 43, "end_line": 35, "start_col": 2, "start_line": 34 }
Prims.GTot
val point_eval (h: mem) (p: point) : GTot S.proj_point
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 point_eval (h:mem) (p:point) : GTot S.proj_point = feval h (gsub p 0ul 5ul), feval h (gsub p 5ul 5ul), feval h (gsub p 10ul 5ul)
val point_eval (h: mem) (p: point) : GTot S.proj_point let point_eval (h: mem) (p: point) : GTot S.proj_point =
false
null
false
feval h (gsub p 0ul 5ul), feval h (gsub p 5ul 5ul), feval h (gsub p 10ul 5ul)
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "sometrivial" ]
[ "FStar.Monotonic.HyperStack.mem", "Hacl.Impl.K256.Point.point", "FStar.Pervasives.Native.Mktuple3", "Spec.K256.PointOps.felem", "Hacl.K256.Field.feval", "Lib.Buffer.gsub", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Spec.K256.PointOps.proj_point" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract let aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p) inline_for_extraction noextract let aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let aff_gety (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul /// Projective coordinates // (_X, _Y, _Z) inline_for_extraction noextract let point = lbuffer uint64 15ul inline_for_extraction noextract let getx (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let gety (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul inline_for_extraction noextract let getz (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 10ul 5ul /\ h0 == h1) = sub p 10ul 5ul inline_for_extraction noextract let point_inv_lseq (p:LSeq.lseq uint64 15) = inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 5 5)) /\ inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 10 5)) inline_for_extraction noextract let point_inv (h:mem) (p:point) = inv_lazy_reduced2 h (gsub p 0ul 5ul) /\ inv_lazy_reduced2 h (gsub p 5ul 5ul) /\ inv_lazy_reduced2 h (gsub p 10ul 5ul) inline_for_extraction noextract let point_eval_lseq (p:LSeq.lseq uint64 15) : GTot S.proj_point = feval5 (as_felem5_lseq (LSeq.sub p 0 5)), feval5 (as_felem5_lseq (LSeq.sub p 5 5)), feval5 (as_felem5_lseq (LSeq.sub p 10 5)) inline_for_extraction noextract
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_eval (h: mem) (p: point) : GTot S.proj_point
[]
Hacl.Impl.K256.Point.point_eval
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
h: FStar.Monotonic.HyperStack.mem -> p: Hacl.Impl.K256.Point.point -> Prims.GTot Spec.K256.PointOps.proj_point
{ "end_col": 27, "end_line": 110, "start_col": 2, "start_line": 108 }
Prims.Tot
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 point_inv (h:mem) (p:point) = inv_lazy_reduced2 h (gsub p 0ul 5ul) /\ inv_lazy_reduced2 h (gsub p 5ul 5ul) /\ inv_lazy_reduced2 h (gsub p 10ul 5ul)
let point_inv (h: mem) (p: point) =
false
null
false
inv_lazy_reduced2 h (gsub p 0ul 5ul) /\ inv_lazy_reduced2 h (gsub p 5ul 5ul) /\ inv_lazy_reduced2 h (gsub p 10ul 5ul)
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "total" ]
[ "FStar.Monotonic.HyperStack.mem", "Hacl.Impl.K256.Point.point", "Prims.l_and", "Hacl.K256.Field.inv_lazy_reduced2", "Lib.Buffer.gsub", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Prims.logical" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract let aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p) inline_for_extraction noextract let aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let aff_gety (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul /// Projective coordinates // (_X, _Y, _Z) inline_for_extraction noextract let point = lbuffer uint64 15ul inline_for_extraction noextract let getx (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let gety (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul inline_for_extraction noextract let getz (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 10ul 5ul /\ h0 == h1) = sub p 10ul 5ul inline_for_extraction noextract let point_inv_lseq (p:LSeq.lseq uint64 15) = inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 5 5)) /\ inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 10 5)) inline_for_extraction noextract
false
true
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_inv : h: FStar.Monotonic.HyperStack.mem -> p: Hacl.Impl.K256.Point.point -> Prims.logical
[]
Hacl.Impl.K256.Point.point_inv
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
h: FStar.Monotonic.HyperStack.mem -> p: Hacl.Impl.K256.Point.point -> Prims.logical
{ "end_col": 39, "end_line": 97, "start_col": 2, "start_line": 95 }
Prims.Tot
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 point_inv_lseq (p:LSeq.lseq uint64 15) = inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 5 5)) /\ inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 10 5))
let point_inv_lseq (p: LSeq.lseq uint64 15) =
false
null
false
inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 5 5)) /\ inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 10 5))
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "total" ]
[ "Lib.Sequence.lseq", "Lib.IntTypes.uint64", "Prims.l_and", "Hacl.K256.Field.inv_lazy_reduced2_5", "Hacl.Impl.K256.Point.as_felem5_lseq", "Lib.Sequence.sub", "Prims.logical" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract let aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p) inline_for_extraction noextract let aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let aff_gety (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul /// Projective coordinates // (_X, _Y, _Z) inline_for_extraction noextract let point = lbuffer uint64 15ul inline_for_extraction noextract let getx (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let gety (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul inline_for_extraction noextract let getz (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 10ul 5ul /\ h0 == h1) = sub p 10ul 5ul inline_for_extraction noextract
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_inv_lseq : p: Lib.Sequence.lseq Lib.IntTypes.uint64 15 -> Prims.logical
[]
Hacl.Impl.K256.Point.point_inv_lseq
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
p: Lib.Sequence.lseq Lib.IntTypes.uint64 15 -> Prims.logical
{ "end_col": 56, "end_line": 91, "start_col": 2, "start_line": 89 }
FStar.HyperStack.ST.Stack
val aff_gety (p: aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1)
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 aff_gety (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul
val aff_gety (p: aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) let aff_gety (p: aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) =
true
null
false
sub p 5ul 5ul
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[]
[ "Hacl.Impl.K256.Point.aff_point", "Lib.Buffer.sub", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Lib.Buffer.lbuffer_t", "Hacl.K256.Field.felem", "FStar.Monotonic.HyperStack.mem", "Lib.Buffer.live", "Prims.l_and", "Prims.eq2", "Hacl.K256.Field.nlimb", "Lib.Buffer.gsub" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract let aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p) inline_for_extraction noextract let aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let aff_gety (p:aff_point) : Stack felem (requires fun h -> live h p)
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val aff_gety (p: aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1)
[]
Hacl.Impl.K256.Point.aff_gety
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
p: Hacl.Impl.K256.Point.aff_point -> FStar.HyperStack.ST.Stack Hacl.K256.Field.felem
{ "end_col": 17, "end_line": 59, "start_col": 4, "start_line": 59 }
FStar.HyperStack.ST.Stack
val aff_getx (p: aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1)
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul
val aff_getx (p: aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) let aff_getx (p: aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) =
true
null
false
sub p 0ul 5ul
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[]
[ "Hacl.Impl.K256.Point.aff_point", "Lib.Buffer.sub", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Lib.Buffer.lbuffer_t", "Hacl.K256.Field.felem", "FStar.Monotonic.HyperStack.mem", "Lib.Buffer.live", "Prims.l_and", "Prims.eq2", "Hacl.K256.Field.nlimb", "Lib.Buffer.gsub" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract let aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p) inline_for_extraction noextract let aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p)
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val aff_getx (p: aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1)
[]
Hacl.Impl.K256.Point.aff_getx
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
p: Hacl.Impl.K256.Point.aff_point -> FStar.HyperStack.ST.Stack Hacl.K256.Field.felem
{ "end_col": 17, "end_line": 53, "start_col": 4, "start_line": 53 }
Prims.Tot
val as_felem5_lseq (s: LSeq.lseq uint64 5) : felem5
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4])
val as_felem5_lseq (s: LSeq.lseq uint64 5) : felem5 let as_felem5_lseq (s: LSeq.lseq uint64 5) : felem5 =
false
null
false
let open Lib.Sequence in (s.[ 0 ], s.[ 1 ], s.[ 2 ], s.[ 3 ], s.[ 4 ])
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "total" ]
[ "Lib.Sequence.lseq", "Lib.IntTypes.uint64", "FStar.Pervasives.Native.Mktuple5", "Lib.Sequence.op_String_Access", "Hacl.Spec.K256.Field52.Definitions.felem5" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val as_felem5_lseq (s: LSeq.lseq uint64 5) : felem5
[]
Hacl.Impl.K256.Point.as_felem5_lseq
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
s: Lib.Sequence.lseq Lib.IntTypes.uint64 5 -> Hacl.Spec.K256.Field52.Definitions.felem5
{ "end_col": 33, "end_line": 21, "start_col": 2, "start_line": 20 }
FStar.HyperStack.ST.Stack
val gety (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1)
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 gety (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul
val gety (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) let gety (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) =
true
null
false
sub p 5ul 5ul
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[]
[ "Hacl.Impl.K256.Point.point", "Lib.Buffer.sub", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Lib.Buffer.lbuffer_t", "Hacl.K256.Field.felem", "FStar.Monotonic.HyperStack.mem", "Lib.Buffer.live", "Prims.l_and", "Prims.eq2", "Hacl.K256.Field.nlimb", "Lib.Buffer.gsub" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract let aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p) inline_for_extraction noextract let aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let aff_gety (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul /// Projective coordinates // (_X, _Y, _Z) inline_for_extraction noextract let point = lbuffer uint64 15ul inline_for_extraction noextract let getx (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let gety (p:point) : Stack felem (requires fun h -> live h p)
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val gety (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1)
[]
Hacl.Impl.K256.Point.gety
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
p: Hacl.Impl.K256.Point.point -> FStar.HyperStack.ST.Stack Hacl.K256.Field.felem
{ "end_col": 17, "end_line": 78, "start_col": 4, "start_line": 78 }
FStar.HyperStack.ST.Stack
val getx (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1)
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 getx (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul
val getx (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) let getx (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) =
true
null
false
sub p 0ul 5ul
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[]
[ "Hacl.Impl.K256.Point.point", "Lib.Buffer.sub", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Lib.Buffer.lbuffer_t", "Hacl.K256.Field.felem", "FStar.Monotonic.HyperStack.mem", "Lib.Buffer.live", "Prims.l_and", "Prims.eq2", "Hacl.K256.Field.nlimb", "Lib.Buffer.gsub" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract let aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p) inline_for_extraction noextract let aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let aff_gety (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul /// Projective coordinates // (_X, _Y, _Z) inline_for_extraction noextract let point = lbuffer uint64 15ul inline_for_extraction noextract let getx (p:point) : Stack felem (requires fun h -> live h p)
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val getx (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1)
[]
Hacl.Impl.K256.Point.getx
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
p: Hacl.Impl.K256.Point.point -> FStar.HyperStack.ST.Stack Hacl.K256.Field.felem
{ "end_col": 17, "end_line": 72, "start_col": 4, "start_line": 72 }
FStar.HyperStack.ST.Stack
val getz (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 10ul 5ul /\ h0 == h1)
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 getz (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 10ul 5ul /\ h0 == h1) = sub p 10ul 5ul
val getz (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 10ul 5ul /\ h0 == h1) let getz (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 10ul 5ul /\ h0 == h1) =
true
null
false
sub p 10ul 5ul
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[]
[ "Hacl.Impl.K256.Point.point", "Lib.Buffer.sub", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Lib.Buffer.lbuffer_t", "Hacl.K256.Field.felem", "FStar.Monotonic.HyperStack.mem", "Lib.Buffer.live", "Prims.l_and", "Prims.eq2", "Hacl.K256.Field.nlimb", "Lib.Buffer.gsub" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract let aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p) inline_for_extraction noextract let aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let aff_gety (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul /// Projective coordinates // (_X, _Y, _Z) inline_for_extraction noextract let point = lbuffer uint64 15ul inline_for_extraction noextract let getx (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let gety (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul inline_for_extraction noextract let getz (p:point) : Stack felem (requires fun h -> live h p)
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val getz (p: point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 10ul 5ul /\ h0 == h1)
[]
Hacl.Impl.K256.Point.getz
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
p: Hacl.Impl.K256.Point.point -> FStar.HyperStack.ST.Stack Hacl.K256.Field.felem
{ "end_col": 18, "end_line": 84, "start_col": 4, "start_line": 84 }
Prims.GTot
val point_eval_lseq (p: LSeq.lseq uint64 15) : GTot S.proj_point
[ { "abbrev": false, "full_module": "Hacl.K256.Field", "short_module": null }, { "abbrev": true, "full_module": "Spec.K256", "short_module": "S" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.K256", "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 point_eval_lseq (p:LSeq.lseq uint64 15) : GTot S.proj_point = feval5 (as_felem5_lseq (LSeq.sub p 0 5)), feval5 (as_felem5_lseq (LSeq.sub p 5 5)), feval5 (as_felem5_lseq (LSeq.sub p 10 5))
val point_eval_lseq (p: LSeq.lseq uint64 15) : GTot S.proj_point let point_eval_lseq (p: LSeq.lseq uint64 15) : GTot S.proj_point =
false
null
false
feval5 (as_felem5_lseq (LSeq.sub p 0 5)), feval5 (as_felem5_lseq (LSeq.sub p 5 5)), feval5 (as_felem5_lseq (LSeq.sub p 10 5))
{ "checked_file": "Hacl.Impl.K256.Point.fsti.checked", "dependencies": [ "Spec.K256.fst.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.K256.Field.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.K256.Point.fsti" }
[ "sometrivial" ]
[ "Lib.Sequence.lseq", "Lib.IntTypes.uint64", "FStar.Pervasives.Native.Mktuple3", "Spec.K256.PointOps.felem", "Hacl.Spec.K256.Field52.Definitions.feval5", "Hacl.Impl.K256.Point.as_felem5_lseq", "Lib.Sequence.sub", "Spec.K256.PointOps.proj_point" ]
[]
module Hacl.Impl.K256.Point open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module S = Spec.K256 open Hacl.K256.Field #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let as_felem5_lseq (s:LSeq.lseq uint64 5) : felem5 = let open Lib.Sequence in (s.[0],s.[1],s.[2],s.[3],s.[4]) /// Affine coordinates inline_for_extraction noextract let aff_point_seq = LSeq.lseq uint64 10 let aff_point_inv_seq (p:aff_point_seq) = inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_fully_reduced5 (as_felem5_lseq (LSeq.sub p 5 5)) let aff_point_eval_seq (p:aff_point_seq{aff_point_inv_seq p}) : S.aff_point = as_nat5 (as_felem5_lseq (LSeq.sub p 0 5)), as_nat5 (as_felem5_lseq (LSeq.sub p 5 5)) inline_for_extraction noextract let aff_point = lbuffer uint64 10ul noextract let aff_point_inv (h:mem) (p:aff_point) = aff_point_inv_seq (as_seq h p) noextract let aff_point_eval (h:mem) (p:aff_point{aff_point_inv h p}) : GTot S.aff_point = aff_point_eval_seq (as_seq h p) inline_for_extraction noextract let aff_getx (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let aff_gety (p:aff_point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul /// Projective coordinates // (_X, _Y, _Z) inline_for_extraction noextract let point = lbuffer uint64 15ul inline_for_extraction noextract let getx (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 0ul 5ul /\ h0 == h1) = sub p 0ul 5ul inline_for_extraction noextract let gety (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 5ul 5ul /\ h0 == h1) = sub p 5ul 5ul inline_for_extraction noextract let getz (p:point) : Stack felem (requires fun h -> live h p) (ensures fun h0 f h1 -> f == gsub p 10ul 5ul /\ h0 == h1) = sub p 10ul 5ul inline_for_extraction noextract let point_inv_lseq (p:LSeq.lseq uint64 15) = inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 0 5)) /\ inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 5 5)) /\ inv_lazy_reduced2_5 (as_felem5_lseq (LSeq.sub p 10 5)) inline_for_extraction noextract let point_inv (h:mem) (p:point) = inv_lazy_reduced2 h (gsub p 0ul 5ul) /\ inv_lazy_reduced2 h (gsub p 5ul 5ul) /\ inv_lazy_reduced2 h (gsub p 10ul 5ul) inline_for_extraction noextract
false
false
Hacl.Impl.K256.Point.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_eval_lseq (p: LSeq.lseq uint64 15) : GTot S.proj_point
[]
Hacl.Impl.K256.Point.point_eval_lseq
{ "file_name": "code/k256/Hacl.Impl.K256.Point.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
p: Lib.Sequence.lseq Lib.IntTypes.uint64 15 -> Prims.GTot Spec.K256.PointOps.proj_point
{ "end_col": 43, "end_line": 104, "start_col": 2, "start_line": 102 }
Prims.Tot
val crypto_kem_dec: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_dec_st a gen_a
[ { "abbrev": true, "full_module": "Spec.Frodo.Params", "short_module": "FP" }, { "abbrev": true, "full_module": "Spec.Frodo.KEM", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Frodo.Random", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.KEM", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.Params", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Matrix", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "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 crypto_kem_dec a gen_a ss ct sk = Hacl.Impl.Frodo.KEM.Decaps.crypto_kem_dec a gen_a ss ct sk
val crypto_kem_dec: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_dec_st a gen_a let crypto_kem_dec a gen_a ss ct sk =
false
null
false
Hacl.Impl.Frodo.KEM.Decaps.crypto_kem_dec a gen_a ss ct sk
{ "checked_file": "Hacl.Frodo.KEM.fst.checked", "dependencies": [ "Spec.Frodo.Params.fst.checked", "Spec.Frodo.KEM.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Matrix.fst.checked", "Hacl.Impl.Frodo.Params.fst.checked", "Hacl.Impl.Frodo.KEM.KeyGen.fst.checked", "Hacl.Impl.Frodo.KEM.Encaps.fst.checked", "Hacl.Impl.Frodo.KEM.Decaps.fst.checked", "Hacl.Impl.Frodo.KEM.fst.checked", "Hacl.Frodo.Random.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Frodo.KEM.fst" }
[ "total" ]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Prims.b2t", "Hacl.Impl.Frodo.Params.is_supported", "Hacl.Impl.Matrix.lbytes", "Hacl.Impl.Frodo.Params.crypto_bytes", "Hacl.Impl.Frodo.Params.crypto_ciphertextbytes", "Hacl.Impl.Frodo.Params.crypto_secretkeybytes", "Hacl.Impl.Frodo.KEM.Decaps.crypto_kem_dec", "Lib.IntTypes.uint32" ]
[]
module Hacl.Frodo.KEM open FStar.HyperStack open FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.Matrix open Hacl.Impl.Frodo.Params open Hacl.Impl.Frodo.KEM open Hacl.Frodo.Random module S = Spec.Frodo.KEM module FP = Spec.Frodo.Params #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let crypto_kem_keypair_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = pk:lbytes (crypto_publickeybytes a) -> sk:lbytes (crypto_secretkeybytes a) -> Stack uint32 (requires fun h -> live h pk /\ live h sk /\ disjoint pk sk /\ disjoint state pk /\ disjoint state sk) (ensures fun h0 r h1 -> modifies (loc state |+| (loc pk |+| loc sk)) h0 h1 /\ (as_seq h1 pk, as_seq h1 sk) == S.crypto_kem_keypair a gen_a (as_seq h0 state)) inline_for_extraction noextract val crypto_kem_keypair: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_keypair_st a gen_a let crypto_kem_keypair a gen_a pk sk = Hacl.Impl.Frodo.KEM.KeyGen.crypto_kem_keypair a gen_a pk sk inline_for_extraction noextract let crypto_kem_enc_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = ct:lbytes (crypto_ciphertextbytes a) -> ss:lbytes (crypto_bytes a) -> pk:lbytes (crypto_publickeybytes a) -> Stack uint32 (requires fun h -> live h ct /\ live h ss /\ live h pk /\ disjoint ct ss /\ disjoint ct pk /\ disjoint ss pk /\ disjoint state ct /\ disjoint state ss /\ disjoint state pk) (ensures fun h0 _ h1 -> modifies (loc state |+| (loc ct |+| loc ss)) h0 h1 /\ (as_seq h1 ct, as_seq h1 ss) == S.crypto_kem_enc a gen_a (as_seq h0 state) (as_seq h0 pk)) inline_for_extraction noextract val crypto_kem_enc: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_enc_st a gen_a let crypto_kem_enc a gen_a ct ss pk = Hacl.Impl.Frodo.KEM.Encaps.crypto_kem_enc a gen_a ct ss pk inline_for_extraction noextract let crypto_kem_dec_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = ss:lbytes (crypto_bytes a) -> ct:lbytes (crypto_ciphertextbytes a) -> sk:lbytes (crypto_secretkeybytes a) -> Stack uint32 (requires fun h -> live h ss /\ live h ct /\ live h sk /\ disjoint ss ct /\ disjoint ss sk /\ disjoint ct sk) (ensures fun h0 r h1 -> modifies (loc ss) h0 h1 /\ as_seq h1 ss == S.crypto_kem_dec a gen_a (as_seq h0 ct) (as_seq h0 sk)) inline_for_extraction noextract val crypto_kem_dec: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_dec_st a gen_a
false
false
Hacl.Frodo.KEM.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val crypto_kem_dec: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_dec_st a gen_a
[]
Hacl.Frodo.KEM.crypto_kem_dec
{ "file_name": "code/frodo/Hacl.Frodo.KEM.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a{Hacl.Impl.Frodo.Params.is_supported gen_a} -> Hacl.Frodo.KEM.crypto_kem_dec_st a gen_a
{ "end_col": 60, "end_line": 73, "start_col": 2, "start_line": 73 }
Prims.Tot
val crypto_kem_keypair: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_keypair_st a gen_a
[ { "abbrev": true, "full_module": "Spec.Frodo.Params", "short_module": "FP" }, { "abbrev": true, "full_module": "Spec.Frodo.KEM", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Frodo.Random", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.KEM", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.Params", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Matrix", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "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 crypto_kem_keypair a gen_a pk sk = Hacl.Impl.Frodo.KEM.KeyGen.crypto_kem_keypair a gen_a pk sk
val crypto_kem_keypair: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_keypair_st a gen_a let crypto_kem_keypair a gen_a pk sk =
false
null
false
Hacl.Impl.Frodo.KEM.KeyGen.crypto_kem_keypair a gen_a pk sk
{ "checked_file": "Hacl.Frodo.KEM.fst.checked", "dependencies": [ "Spec.Frodo.Params.fst.checked", "Spec.Frodo.KEM.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Matrix.fst.checked", "Hacl.Impl.Frodo.Params.fst.checked", "Hacl.Impl.Frodo.KEM.KeyGen.fst.checked", "Hacl.Impl.Frodo.KEM.Encaps.fst.checked", "Hacl.Impl.Frodo.KEM.Decaps.fst.checked", "Hacl.Impl.Frodo.KEM.fst.checked", "Hacl.Frodo.Random.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Frodo.KEM.fst" }
[ "total" ]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Prims.b2t", "Hacl.Impl.Frodo.Params.is_supported", "Hacl.Impl.Matrix.lbytes", "Hacl.Impl.Frodo.Params.crypto_publickeybytes", "Hacl.Impl.Frodo.Params.crypto_secretkeybytes", "Hacl.Impl.Frodo.KEM.KeyGen.crypto_kem_keypair", "Lib.IntTypes.uint32" ]
[]
module Hacl.Frodo.KEM open FStar.HyperStack open FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.Matrix open Hacl.Impl.Frodo.Params open Hacl.Impl.Frodo.KEM open Hacl.Frodo.Random module S = Spec.Frodo.KEM module FP = Spec.Frodo.Params #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let crypto_kem_keypair_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = pk:lbytes (crypto_publickeybytes a) -> sk:lbytes (crypto_secretkeybytes a) -> Stack uint32 (requires fun h -> live h pk /\ live h sk /\ disjoint pk sk /\ disjoint state pk /\ disjoint state sk) (ensures fun h0 r h1 -> modifies (loc state |+| (loc pk |+| loc sk)) h0 h1 /\ (as_seq h1 pk, as_seq h1 sk) == S.crypto_kem_keypair a gen_a (as_seq h0 state)) inline_for_extraction noextract val crypto_kem_keypair: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_keypair_st a gen_a
false
false
Hacl.Frodo.KEM.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val crypto_kem_keypair: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_keypair_st a gen_a
[]
Hacl.Frodo.KEM.crypto_kem_keypair
{ "file_name": "code/frodo/Hacl.Frodo.KEM.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a{Hacl.Impl.Frodo.Params.is_supported gen_a} -> Hacl.Frodo.KEM.crypto_kem_keypair_st a gen_a
{ "end_col": 61, "end_line": 34, "start_col": 2, "start_line": 34 }
Prims.Tot
val crypto_kem_enc: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_enc_st a gen_a
[ { "abbrev": true, "full_module": "Spec.Frodo.Params", "short_module": "FP" }, { "abbrev": true, "full_module": "Spec.Frodo.KEM", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Frodo.Random", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.KEM", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.Params", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Matrix", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "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 crypto_kem_enc a gen_a ct ss pk = Hacl.Impl.Frodo.KEM.Encaps.crypto_kem_enc a gen_a ct ss pk
val crypto_kem_enc: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_enc_st a gen_a let crypto_kem_enc a gen_a ct ss pk =
false
null
false
Hacl.Impl.Frodo.KEM.Encaps.crypto_kem_enc a gen_a ct ss pk
{ "checked_file": "Hacl.Frodo.KEM.fst.checked", "dependencies": [ "Spec.Frodo.Params.fst.checked", "Spec.Frodo.KEM.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Matrix.fst.checked", "Hacl.Impl.Frodo.Params.fst.checked", "Hacl.Impl.Frodo.KEM.KeyGen.fst.checked", "Hacl.Impl.Frodo.KEM.Encaps.fst.checked", "Hacl.Impl.Frodo.KEM.Decaps.fst.checked", "Hacl.Impl.Frodo.KEM.fst.checked", "Hacl.Frodo.Random.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Frodo.KEM.fst" }
[ "total" ]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Prims.b2t", "Hacl.Impl.Frodo.Params.is_supported", "Hacl.Impl.Matrix.lbytes", "Hacl.Impl.Frodo.Params.crypto_ciphertextbytes", "Hacl.Impl.Frodo.Params.crypto_bytes", "Hacl.Impl.Frodo.Params.crypto_publickeybytes", "Hacl.Impl.Frodo.KEM.Encaps.crypto_kem_enc", "Lib.IntTypes.uint32" ]
[]
module Hacl.Frodo.KEM open FStar.HyperStack open FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.Matrix open Hacl.Impl.Frodo.Params open Hacl.Impl.Frodo.KEM open Hacl.Frodo.Random module S = Spec.Frodo.KEM module FP = Spec.Frodo.Params #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let crypto_kem_keypair_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = pk:lbytes (crypto_publickeybytes a) -> sk:lbytes (crypto_secretkeybytes a) -> Stack uint32 (requires fun h -> live h pk /\ live h sk /\ disjoint pk sk /\ disjoint state pk /\ disjoint state sk) (ensures fun h0 r h1 -> modifies (loc state |+| (loc pk |+| loc sk)) h0 h1 /\ (as_seq h1 pk, as_seq h1 sk) == S.crypto_kem_keypair a gen_a (as_seq h0 state)) inline_for_extraction noextract val crypto_kem_keypair: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_keypair_st a gen_a let crypto_kem_keypair a gen_a pk sk = Hacl.Impl.Frodo.KEM.KeyGen.crypto_kem_keypair a gen_a pk sk inline_for_extraction noextract let crypto_kem_enc_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = ct:lbytes (crypto_ciphertextbytes a) -> ss:lbytes (crypto_bytes a) -> pk:lbytes (crypto_publickeybytes a) -> Stack uint32 (requires fun h -> live h ct /\ live h ss /\ live h pk /\ disjoint ct ss /\ disjoint ct pk /\ disjoint ss pk /\ disjoint state ct /\ disjoint state ss /\ disjoint state pk) (ensures fun h0 _ h1 -> modifies (loc state |+| (loc ct |+| loc ss)) h0 h1 /\ (as_seq h1 ct, as_seq h1 ss) == S.crypto_kem_enc a gen_a (as_seq h0 state) (as_seq h0 pk)) inline_for_extraction noextract val crypto_kem_enc: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_enc_st a gen_a
false
false
Hacl.Frodo.KEM.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val crypto_kem_enc: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_enc_st a gen_a
[]
Hacl.Frodo.KEM.crypto_kem_enc
{ "file_name": "code/frodo/Hacl.Frodo.KEM.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a{Hacl.Impl.Frodo.Params.is_supported gen_a} -> Hacl.Frodo.KEM.crypto_kem_enc_st a gen_a
{ "end_col": 60, "end_line": 54, "start_col": 2, "start_line": 54 }
Prims.Tot
[ { "abbrev": true, "full_module": "Spec.Frodo.Params", "short_module": "FP" }, { "abbrev": true, "full_module": "Spec.Frodo.KEM", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Frodo.Random", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.KEM", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.Params", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Matrix", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "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 crypto_kem_keypair_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = pk:lbytes (crypto_publickeybytes a) -> sk:lbytes (crypto_secretkeybytes a) -> Stack uint32 (requires fun h -> live h pk /\ live h sk /\ disjoint pk sk /\ disjoint state pk /\ disjoint state sk) (ensures fun h0 r h1 -> modifies (loc state |+| (loc pk |+| loc sk)) h0 h1 /\ (as_seq h1 pk, as_seq h1 sk) == S.crypto_kem_keypair a gen_a (as_seq h0 state))
let crypto_kem_keypair_st (a: FP.frodo_alg) (gen_a: FP.frodo_gen_a{is_supported gen_a}) =
false
null
false
pk: lbytes (crypto_publickeybytes a) -> sk: lbytes (crypto_secretkeybytes a) -> Stack uint32 (requires fun h -> live h pk /\ live h sk /\ disjoint pk sk /\ disjoint state pk /\ disjoint state sk) (ensures fun h0 r h1 -> modifies (loc state |+| (loc pk |+| loc sk)) h0 h1 /\ (as_seq h1 pk, as_seq h1 sk) == S.crypto_kem_keypair a gen_a (as_seq h0 state))
{ "checked_file": "Hacl.Frodo.KEM.fst.checked", "dependencies": [ "Spec.Frodo.Params.fst.checked", "Spec.Frodo.KEM.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Matrix.fst.checked", "Hacl.Impl.Frodo.Params.fst.checked", "Hacl.Impl.Frodo.KEM.KeyGen.fst.checked", "Hacl.Impl.Frodo.KEM.Encaps.fst.checked", "Hacl.Impl.Frodo.KEM.Decaps.fst.checked", "Hacl.Impl.Frodo.KEM.fst.checked", "Hacl.Frodo.Random.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Frodo.KEM.fst" }
[ "total" ]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Prims.b2t", "Hacl.Impl.Frodo.Params.is_supported", "Hacl.Impl.Matrix.lbytes", "Hacl.Impl.Frodo.Params.crypto_publickeybytes", "Hacl.Impl.Frodo.Params.crypto_secretkeybytes", "Lib.IntTypes.uint32", "FStar.Monotonic.HyperStack.mem", "Prims.l_and", "Lib.Buffer.live", "Lib.Buffer.MUT", "Lib.IntTypes.uint8", "Lib.Buffer.disjoint", "Hacl.Frodo.Random.state", "Lib.Buffer.modifies", "Lib.Buffer.op_Bar_Plus_Bar", "Lib.Buffer.loc", "Prims.eq2", "FStar.Pervasives.Native.tuple2", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.crypto_publickeybytes", "Spec.Frodo.Params.crypto_secretkeybytes", "FStar.Pervasives.Native.Mktuple2", "Lib.Sequence.lseq", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.as_seq", "Spec.Frodo.KEM.crypto_kem_keypair", "FStar.UInt32.__uint_to_t" ]
[]
module Hacl.Frodo.KEM open FStar.HyperStack open FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.Matrix open Hacl.Impl.Frodo.Params open Hacl.Impl.Frodo.KEM open Hacl.Frodo.Random module S = Spec.Frodo.KEM module FP = Spec.Frodo.Params #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract
false
false
Hacl.Frodo.KEM.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val crypto_kem_keypair_st : a: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a{Hacl.Impl.Frodo.Params.is_supported gen_a} -> Type0
[]
Hacl.Frodo.KEM.crypto_kem_keypair_st
{ "file_name": "code/frodo/Hacl.Frodo.KEM.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a{Hacl.Impl.Frodo.Params.is_supported gen_a} -> Type0
{ "end_col": 85, "end_line": 28, "start_col": 4, "start_line": 21 }
Prims.Tot
[ { "abbrev": true, "full_module": "Spec.Frodo.Params", "short_module": "FP" }, { "abbrev": true, "full_module": "Spec.Frodo.KEM", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Frodo.Random", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.KEM", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.Params", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Matrix", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "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 crypto_kem_enc_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = ct:lbytes (crypto_ciphertextbytes a) -> ss:lbytes (crypto_bytes a) -> pk:lbytes (crypto_publickeybytes a) -> Stack uint32 (requires fun h -> live h ct /\ live h ss /\ live h pk /\ disjoint ct ss /\ disjoint ct pk /\ disjoint ss pk /\ disjoint state ct /\ disjoint state ss /\ disjoint state pk) (ensures fun h0 _ h1 -> modifies (loc state |+| (loc ct |+| loc ss)) h0 h1 /\ (as_seq h1 ct, as_seq h1 ss) == S.crypto_kem_enc a gen_a (as_seq h0 state) (as_seq h0 pk))
let crypto_kem_enc_st (a: FP.frodo_alg) (gen_a: FP.frodo_gen_a{is_supported gen_a}) =
false
null
false
ct: lbytes (crypto_ciphertextbytes a) -> ss: lbytes (crypto_bytes a) -> pk: lbytes (crypto_publickeybytes a) -> Stack uint32 (requires fun h -> live h ct /\ live h ss /\ live h pk /\ disjoint ct ss /\ disjoint ct pk /\ disjoint ss pk /\ disjoint state ct /\ disjoint state ss /\ disjoint state pk) (ensures fun h0 _ h1 -> modifies (loc state |+| (loc ct |+| loc ss)) h0 h1 /\ (as_seq h1 ct, as_seq h1 ss) == S.crypto_kem_enc a gen_a (as_seq h0 state) (as_seq h0 pk))
{ "checked_file": "Hacl.Frodo.KEM.fst.checked", "dependencies": [ "Spec.Frodo.Params.fst.checked", "Spec.Frodo.KEM.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Matrix.fst.checked", "Hacl.Impl.Frodo.Params.fst.checked", "Hacl.Impl.Frodo.KEM.KeyGen.fst.checked", "Hacl.Impl.Frodo.KEM.Encaps.fst.checked", "Hacl.Impl.Frodo.KEM.Decaps.fst.checked", "Hacl.Impl.Frodo.KEM.fst.checked", "Hacl.Frodo.Random.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Frodo.KEM.fst" }
[ "total" ]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Prims.b2t", "Hacl.Impl.Frodo.Params.is_supported", "Hacl.Impl.Matrix.lbytes", "Hacl.Impl.Frodo.Params.crypto_ciphertextbytes", "Hacl.Impl.Frodo.Params.crypto_bytes", "Hacl.Impl.Frodo.Params.crypto_publickeybytes", "Lib.IntTypes.uint32", "FStar.Monotonic.HyperStack.mem", "Prims.l_and", "Lib.Buffer.live", "Lib.Buffer.MUT", "Lib.IntTypes.uint8", "Lib.Buffer.disjoint", "Hacl.Frodo.Random.state", "Lib.Buffer.modifies", "Lib.Buffer.op_Bar_Plus_Bar", "Lib.Buffer.loc", "Prims.eq2", "FStar.Pervasives.Native.tuple2", "Lib.ByteSequence.lbytes", "Spec.Frodo.Params.crypto_ciphertextbytes", "Spec.Frodo.Params.crypto_bytes", "FStar.Pervasives.Native.Mktuple2", "Lib.Sequence.lseq", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.as_seq", "Spec.Frodo.KEM.crypto_kem_enc", "FStar.UInt32.__uint_to_t" ]
[]
module Hacl.Frodo.KEM open FStar.HyperStack open FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.Matrix open Hacl.Impl.Frodo.Params open Hacl.Impl.Frodo.KEM open Hacl.Frodo.Random module S = Spec.Frodo.KEM module FP = Spec.Frodo.Params #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let crypto_kem_keypair_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = pk:lbytes (crypto_publickeybytes a) -> sk:lbytes (crypto_secretkeybytes a) -> Stack uint32 (requires fun h -> live h pk /\ live h sk /\ disjoint pk sk /\ disjoint state pk /\ disjoint state sk) (ensures fun h0 r h1 -> modifies (loc state |+| (loc pk |+| loc sk)) h0 h1 /\ (as_seq h1 pk, as_seq h1 sk) == S.crypto_kem_keypair a gen_a (as_seq h0 state)) inline_for_extraction noextract val crypto_kem_keypair: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_keypair_st a gen_a let crypto_kem_keypair a gen_a pk sk = Hacl.Impl.Frodo.KEM.KeyGen.crypto_kem_keypair a gen_a pk sk inline_for_extraction noextract
false
false
Hacl.Frodo.KEM.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val crypto_kem_enc_st : a: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a{Hacl.Impl.Frodo.Params.is_supported gen_a} -> Type0
[]
Hacl.Frodo.KEM.crypto_kem_enc_st
{ "file_name": "code/frodo/Hacl.Frodo.KEM.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a{Hacl.Impl.Frodo.Params.is_supported gen_a} -> Type0
{ "end_col": 96, "end_line": 48, "start_col": 4, "start_line": 39 }
Prims.Tot
[ { "abbrev": true, "full_module": "Spec.Frodo.Params", "short_module": "FP" }, { "abbrev": true, "full_module": "Spec.Frodo.KEM", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Frodo.Random", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.KEM", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Frodo.Params", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.Matrix", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Frodo", "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 crypto_kem_dec_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = ss:lbytes (crypto_bytes a) -> ct:lbytes (crypto_ciphertextbytes a) -> sk:lbytes (crypto_secretkeybytes a) -> Stack uint32 (requires fun h -> live h ss /\ live h ct /\ live h sk /\ disjoint ss ct /\ disjoint ss sk /\ disjoint ct sk) (ensures fun h0 r h1 -> modifies (loc ss) h0 h1 /\ as_seq h1 ss == S.crypto_kem_dec a gen_a (as_seq h0 ct) (as_seq h0 sk))
let crypto_kem_dec_st (a: FP.frodo_alg) (gen_a: FP.frodo_gen_a{is_supported gen_a}) =
false
null
false
ss: lbytes (crypto_bytes a) -> ct: lbytes (crypto_ciphertextbytes a) -> sk: lbytes (crypto_secretkeybytes a) -> Stack uint32 (requires fun h -> live h ss /\ live h ct /\ live h sk /\ disjoint ss ct /\ disjoint ss sk /\ disjoint ct sk) (ensures fun h0 r h1 -> modifies (loc ss) h0 h1 /\ as_seq h1 ss == S.crypto_kem_dec a gen_a (as_seq h0 ct) (as_seq h0 sk))
{ "checked_file": "Hacl.Frodo.KEM.fst.checked", "dependencies": [ "Spec.Frodo.Params.fst.checked", "Spec.Frodo.KEM.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.Matrix.fst.checked", "Hacl.Impl.Frodo.Params.fst.checked", "Hacl.Impl.Frodo.KEM.KeyGen.fst.checked", "Hacl.Impl.Frodo.KEM.Encaps.fst.checked", "Hacl.Impl.Frodo.KEM.Decaps.fst.checked", "Hacl.Impl.Frodo.KEM.fst.checked", "Hacl.Frodo.Random.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Frodo.KEM.fst" }
[ "total" ]
[ "Spec.Frodo.Params.frodo_alg", "Spec.Frodo.Params.frodo_gen_a", "Prims.b2t", "Hacl.Impl.Frodo.Params.is_supported", "Hacl.Impl.Matrix.lbytes", "Hacl.Impl.Frodo.Params.crypto_bytes", "Hacl.Impl.Frodo.Params.crypto_ciphertextbytes", "Hacl.Impl.Frodo.Params.crypto_secretkeybytes", "Lib.IntTypes.uint32", "FStar.Monotonic.HyperStack.mem", "Prims.l_and", "Lib.Buffer.live", "Lib.Buffer.MUT", "Lib.IntTypes.uint8", "Lib.Buffer.disjoint", "Lib.Buffer.modifies", "Lib.Buffer.loc", "Prims.eq2", "Lib.Sequence.seq", "Prims.l_or", "Prims.nat", "FStar.Seq.Base.length", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.IntTypes.uint_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Spec.Frodo.Params.crypto_bytes", "Lib.Buffer.as_seq", "Spec.Frodo.KEM.crypto_kem_dec" ]
[]
module Hacl.Frodo.KEM open FStar.HyperStack open FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.Matrix open Hacl.Impl.Frodo.Params open Hacl.Impl.Frodo.KEM open Hacl.Frodo.Random module S = Spec.Frodo.KEM module FP = Spec.Frodo.Params #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let crypto_kem_keypair_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = pk:lbytes (crypto_publickeybytes a) -> sk:lbytes (crypto_secretkeybytes a) -> Stack uint32 (requires fun h -> live h pk /\ live h sk /\ disjoint pk sk /\ disjoint state pk /\ disjoint state sk) (ensures fun h0 r h1 -> modifies (loc state |+| (loc pk |+| loc sk)) h0 h1 /\ (as_seq h1 pk, as_seq h1 sk) == S.crypto_kem_keypair a gen_a (as_seq h0 state)) inline_for_extraction noextract val crypto_kem_keypair: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_keypair_st a gen_a let crypto_kem_keypair a gen_a pk sk = Hacl.Impl.Frodo.KEM.KeyGen.crypto_kem_keypair a gen_a pk sk inline_for_extraction noextract let crypto_kem_enc_st (a:FP.frodo_alg) (gen_a:FP.frodo_gen_a{is_supported gen_a}) = ct:lbytes (crypto_ciphertextbytes a) -> ss:lbytes (crypto_bytes a) -> pk:lbytes (crypto_publickeybytes a) -> Stack uint32 (requires fun h -> live h ct /\ live h ss /\ live h pk /\ disjoint ct ss /\ disjoint ct pk /\ disjoint ss pk /\ disjoint state ct /\ disjoint state ss /\ disjoint state pk) (ensures fun h0 _ h1 -> modifies (loc state |+| (loc ct |+| loc ss)) h0 h1 /\ (as_seq h1 ct, as_seq h1 ss) == S.crypto_kem_enc a gen_a (as_seq h0 state) (as_seq h0 pk)) inline_for_extraction noextract val crypto_kem_enc: a:FP.frodo_alg -> gen_a:FP.frodo_gen_a{is_supported gen_a} -> crypto_kem_enc_st a gen_a let crypto_kem_enc a gen_a ct ss pk = Hacl.Impl.Frodo.KEM.Encaps.crypto_kem_enc a gen_a ct ss pk inline_for_extraction noextract
false
false
Hacl.Frodo.KEM.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val crypto_kem_dec_st : a: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a{Hacl.Impl.Frodo.Params.is_supported gen_a} -> Type0
[]
Hacl.Frodo.KEM.crypto_kem_dec_st
{ "file_name": "code/frodo/Hacl.Frodo.KEM.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Frodo.Params.frodo_alg -> gen_a: Spec.Frodo.Params.frodo_gen_a{Hacl.Impl.Frodo.Params.is_supported gen_a} -> Type0
{ "end_col": 77, "end_line": 67, "start_col": 4, "start_line": 59 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 pow2_16 = 0x10000
let pow2_16 =
false
null
false
0x10000
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pow2_16 : Prims.int
[]
Vale.Def.Words_s.pow2_16
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.int
{ "end_col": 28, "end_line": 26, "start_col": 21, "start_line": 26 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 nat1 = natN pow2_1
let nat1 =
false
null
false
natN pow2_1
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.natN", "Vale.Def.Words_s.pow2_1" ]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000 unfold let pow2_32 = 0x100000000 unfold let pow2_64 = 0x10000000000000000 unfold let pow2_128 = 0x100000000000000000000000000000000
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val nat1 : Type0
[]
Vale.Def.Words_s.nat1
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 22, "end_line": 32, "start_col": 11, "start_line": 32 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 pow2_64 = 0x10000000000000000
let pow2_64 =
false
null
false
0x10000000000000000
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pow2_64 : Prims.int
[]
Vale.Def.Words_s.pow2_64
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.int
{ "end_col": 40, "end_line": 28, "start_col": 21, "start_line": 28 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 pow2_4 = 0x10
let pow2_4 =
false
null
false
0x10
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pow2_4 : Prims.int
[]
Vale.Def.Words_s.pow2_4
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.int
{ "end_col": 24, "end_line": 24, "start_col": 20, "start_line": 24 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 nat16 = natN pow2_16
let nat16 =
false
null
false
natN pow2_16
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.natN", "Vale.Def.Words_s.pow2_16" ]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000 unfold let pow2_32 = 0x100000000 unfold let pow2_64 = 0x10000000000000000 unfold let pow2_128 = 0x100000000000000000000000000000000 let natN (n:nat) = x:nat{x < n} let nat1 = natN pow2_1 let nat2 = natN pow2_2 let nat4 = natN pow2_4
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val nat16 : Type0
[]
Vale.Def.Words_s.nat16
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 24, "end_line": 36, "start_col": 12, "start_line": 36 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 pow2_1 = 0x2
let pow2_1 =
false
null
false
0x2
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n)
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pow2_1 : Prims.int
[]
Vale.Def.Words_s.pow2_1
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.int
{ "end_col": 23, "end_line": 22, "start_col": 20, "start_line": 22 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 pow2_128 = 0x100000000000000000000000000000000
let pow2_128 =
false
null
false
0x100000000000000000000000000000000
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000 unfold let pow2_32 = 0x100000000
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pow2_128 : Prims.int
[]
Vale.Def.Words_s.pow2_128
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.int
{ "end_col": 57, "end_line": 29, "start_col": 22, "start_line": 29 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 nat8 = natN pow2_8
let nat8 =
false
null
false
natN pow2_8
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.natN", "Vale.Def.Words_s.pow2_8" ]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000 unfold let pow2_32 = 0x100000000 unfold let pow2_64 = 0x10000000000000000 unfold let pow2_128 = 0x100000000000000000000000000000000 let natN (n:nat) = x:nat{x < n} let nat1 = natN pow2_1 let nat2 = natN pow2_2
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val nat8 : Type0
[]
Vale.Def.Words_s.nat8
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 22, "end_line": 35, "start_col": 11, "start_line": 35 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 pow2_norm (n:nat) = normalize_term (pow2 n)
let pow2_norm (n: nat) =
false
null
false
normalize_term (pow2 n)
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[ "Prims.nat", "FStar.Pervasives.normalize_term", "Prims.pos", "Prims.pow2" ]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a }
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pow2_norm : n: Prims.nat -> Prims.pos
[]
Vale.Def.Words_s.pow2_norm
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
n: Prims.nat -> Prims.pos
{ "end_col": 54, "end_line": 20, "start_col": 31, "start_line": 20 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 pow2_2 = 0x4
let pow2_2 =
false
null
false
0x4
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n)
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pow2_2 : Prims.int
[]
Vale.Def.Words_s.pow2_2
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.int
{ "end_col": 23, "end_line": 23, "start_col": 20, "start_line": 23 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 nat4 = natN pow2_4
let nat4 =
false
null
false
natN pow2_4
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.natN", "Vale.Def.Words_s.pow2_4" ]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000 unfold let pow2_32 = 0x100000000 unfold let pow2_64 = 0x10000000000000000 unfold let pow2_128 = 0x100000000000000000000000000000000 let natN (n:nat) = x:nat{x < n} let nat1 = natN pow2_1
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val nat4 : Type0
[]
Vale.Def.Words_s.nat4
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 22, "end_line": 34, "start_col": 11, "start_line": 34 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 pow2_32 = 0x100000000
let pow2_32 =
false
null
false
0x100000000
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pow2_32 : Prims.int
[]
Vale.Def.Words_s.pow2_32
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.int
{ "end_col": 32, "end_line": 27, "start_col": 21, "start_line": 27 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 nat32 = natN pow2_32
let nat32 =
false
null
false
natN pow2_32
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.natN", "Vale.Def.Words_s.pow2_32" ]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000 unfold let pow2_32 = 0x100000000 unfold let pow2_64 = 0x10000000000000000 unfold let pow2_128 = 0x100000000000000000000000000000000 let natN (n:nat) = x:nat{x < n} let nat1 = natN pow2_1 let nat2 = natN pow2_2 let nat4 = natN pow2_4 let nat8 = natN pow2_8
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val nat32 : Type0
[]
Vale.Def.Words_s.nat32
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 24, "end_line": 37, "start_col": 12, "start_line": 37 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 nat2 = natN pow2_2
let nat2 =
false
null
false
natN pow2_2
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.natN", "Vale.Def.Words_s.pow2_2" ]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000 unfold let pow2_32 = 0x100000000 unfold let pow2_64 = 0x10000000000000000 unfold let pow2_128 = 0x100000000000000000000000000000000 let natN (n:nat) = x:nat{x < n}
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val nat2 : Type0
[]
Vale.Def.Words_s.nat2
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 22, "end_line": 33, "start_col": 11, "start_line": 33 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 nat128 = natN pow2_128
let nat128 =
false
null
false
natN pow2_128
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.natN", "Vale.Def.Words_s.pow2_128" ]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000 unfold let pow2_32 = 0x100000000 unfold let pow2_64 = 0x10000000000000000 unfold let pow2_128 = 0x100000000000000000000000000000000 let natN (n:nat) = x:nat{x < n} let nat1 = natN pow2_1 let nat2 = natN pow2_2 let nat4 = natN pow2_4 let nat8 = natN pow2_8 let nat16 = natN pow2_16 let nat32 = natN pow2_32
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val nat128 : Type0
[]
Vale.Def.Words_s.nat128
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 26, "end_line": 39, "start_col": 13, "start_line": 39 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 pow2_8 = 0x100
let pow2_8 =
false
null
false
0x100
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pow2_8 : Prims.int
[]
Vale.Def.Words_s.pow2_8
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.int
{ "end_col": 25, "end_line": 25, "start_col": 20, "start_line": 25 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 natN (n:nat) = x:nat{x < n}
let natN (n: nat) =
false
null
false
x: nat{x < n}
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[ "Prims.nat", "Prims.b2t", "Prims.op_LessThan" ]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000 unfold let pow2_32 = 0x100000000 unfold let pow2_64 = 0x10000000000000000 unfold let pow2_128 = 0x100000000000000000000000000000000
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val natN : n: Prims.nat -> Type0
[]
Vale.Def.Words_s.natN
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
n: Prims.nat -> Type0
{ "end_col": 31, "end_line": 31, "start_col": 19, "start_line": 31 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def", "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 nat64 = natN pow2_64
let nat64 =
false
null
false
natN pow2_64
{ "checked_file": "Vale.Def.Words_s.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Def.Words_s.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.natN", "Vale.Def.Words_s.pow2_64" ]
[]
module Vale.Def.Words_s open FStar.Mul (* Various representations of words with 2^n bits. For example, a byte might be represented as a record of 8 bools, a sequence of 8 bools, or a natural number 0 <= n < 256. Sequences might be little endian or big endian. A 32-bit word could be four bytes, 32 bools, or a natural number 0 <= n < 0x100000000. This library defines various representations and conversions between them. *) // Records with up to eight fields, listed in order from least significant to most significant. // (More than eight fields can be built hierarchically, as in four (four nat8)) type two (a:Type) : Type = { lo:a; hi:a; } type four (a:Type) : Type = { lo0:a; lo1:a; hi2:a; hi3:a; } type eight (a:Type) : Type = { lo_0:a; lo_1:a; lo_2:a; lo_3:a; hi_4:a; hi_5:a; hi_6:a; hi_7:a } unfold let pow2_norm (n:nat) = normalize_term (pow2 n) unfold let pow2_1 = 0x2 unfold let pow2_2 = 0x4 unfold let pow2_4 = 0x10 unfold let pow2_8 = 0x100 unfold let pow2_16 = 0x10000 unfold let pow2_32 = 0x100000000 unfold let pow2_64 = 0x10000000000000000 unfold let pow2_128 = 0x100000000000000000000000000000000 let natN (n:nat) = x:nat{x < n} let nat1 = natN pow2_1 let nat2 = natN pow2_2 let nat4 = natN pow2_4 let nat8 = natN pow2_8 let nat16 = natN pow2_16
false
true
Vale.Def.Words_s.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val nat64 : Type0
[]
Vale.Def.Words_s.nat64
{ "file_name": "vale/specs/defs/Vale.Def.Words_s.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 24, "end_line": 38, "start_col": 12, "start_line": 38 }
FStar.HyperStack.ST.Stack
val point_add_4 (x3 y3 z3 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t1; loc t2 ] /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h y3 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ (let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let z3_s = S.fmul S.b_coeff t2_s in let x3_s = S.fsub y3_s z3_s in let z3_s = S.fadd x3_s x3_s in let x3_s = S.fadd x3_s z3_s in let z3_s = S.fsub t1_s x3_s in let x3_s = S.fadd t1_s x3_s in let y3_s = S.fmul S.b_coeff y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s))
[ { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Point", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "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 point_add_4 x3 y3 z3 t1 t2 = fmul_by_b_coeff z3 t2; fsub x3 y3 z3; fdouble z3 x3; fadd x3 x3 z3; fsub z3 t1 x3; fadd x3 t1 x3; fmul_by_b_coeff y3 y3
val point_add_4 (x3 y3 z3 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t1; loc t2 ] /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h y3 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ (let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let z3_s = S.fmul S.b_coeff t2_s in let x3_s = S.fsub y3_s z3_s in let z3_s = S.fadd x3_s x3_s in let x3_s = S.fadd x3_s z3_s in let z3_s = S.fsub t1_s x3_s in let x3_s = S.fadd t1_s x3_s in let y3_s = S.fmul S.b_coeff y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s)) let point_add_4 x3 y3 z3 t1 t2 =
true
null
false
fmul_by_b_coeff z3 t2; fsub x3 y3 z3; fdouble z3 x3; fadd x3 x3 z3; fsub z3 t1 x3; fadd x3 t1 x3; fmul_by_b_coeff y3 y3
{ "checked_file": "Hacl.Impl.P256.PointAdd.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "LowStar.Monotonic.Buffer.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.PointAdd.fst" }
[]
[ "Hacl.Impl.P256.Bignum.felem", "Hacl.Impl.P256.Field.fmul_by_b_coeff", "Prims.unit", "Hacl.Impl.P256.Field.fadd", "Hacl.Impl.P256.Field.fsub", "Hacl.Impl.P256.Field.fdouble" ]
[]
module Hacl.Impl.P256.PointAdd open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module S = Spec.P256 #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s)) let point_add_1 t0 t1 t2 t3 t4 p q = let x1, y1, z1 = getx p, gety p, getz p in let x2, y2, z2 = getx q, gety q, getz q in fmul t0 x1 x2; fmul t1 y1 y2; fmul t2 z1 z2; fadd t3 x1 y1; fadd t4 x2 y2; fmul t3 t3 t4; fadd t4 t0 t1 inline_for_extraction noextract val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s)) let point_add_2 t1 t2 t3 t4 t5 p q = let y1, z1 = gety p, getz p in let y2, z2 = gety q, getz q in fsub t3 t3 t4; fadd t4 y1 z1; fadd t5 y2 z2; fmul t4 t4 t5; fadd t5 t1 t2; fsub t4 t4 t5 inline_for_extraction noextract val point_add_3 (x3 y3 t0 t2:felem) (p q:point) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h t0 /\ live h t2 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc t0; loc t2 ] /\ eq_or_disjoint p q /\ disjoint p x3 /\ disjoint p y3 /\ disjoint p t0 /\ disjoint p t2 /\ disjoint q x3 /\ disjoint q y3 /\ disjoint q t0 /\ disjoint q t2 /\ point_inv h p /\ point_inv h q /\ as_nat h t0 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = fmont_as_nat h0 t0 in let t2_s = fmont_as_nat h0 t2 in let x3_s = S.fadd x1 z1 in let y3_s = S.fadd x2 z2 in let x3_s = S.fmul x3_s y3_s in let y3_s = S.fadd t0_s t2_s in let y3_s = S.fsub x3_s y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_3 x3 y3 t0 t2 p q = let x1, z1 = getx p, getz p in let x2, z2 = getx q, getz q in fadd x3 x1 z1; fadd y3 x2 z2; fmul x3 x3 y3; fadd y3 t0 t2; fsub y3 x3 y3 inline_for_extraction noextract val point_add_4 (x3 y3 z3 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t1; loc t2 ] /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h y3 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ (let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let z3_s = S.fmul S.b_coeff t2_s in let x3_s = S.fsub y3_s z3_s in let z3_s = S.fadd x3_s x3_s in let x3_s = S.fadd x3_s z3_s in let z3_s = S.fsub t1_s x3_s in let x3_s = S.fadd t1_s x3_s in let y3_s = S.fmul S.b_coeff y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s))
false
false
Hacl.Impl.P256.PointAdd.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_add_4 (x3 y3 z3 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t1; loc t2 ] /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h y3 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ (let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let z3_s = S.fmul S.b_coeff t2_s in let x3_s = S.fsub y3_s z3_s in let z3_s = S.fadd x3_s x3_s in let x3_s = S.fadd x3_s z3_s in let z3_s = S.fsub t1_s x3_s in let x3_s = S.fadd t1_s x3_s in let y3_s = S.fmul S.b_coeff y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s))
[]
Hacl.Impl.P256.PointAdd.point_add_4
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.PointAdd.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
x3: Hacl.Impl.P256.Bignum.felem -> y3: Hacl.Impl.P256.Bignum.felem -> z3: Hacl.Impl.P256.Bignum.felem -> t1: Hacl.Impl.P256.Bignum.felem -> t2: Hacl.Impl.P256.Bignum.felem -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 23, "end_line": 163, "start_col": 2, "start_line": 157 }
FStar.HyperStack.ST.Stack
val point_add_3 (x3 y3 t0 t2:felem) (p q:point) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h t0 /\ live h t2 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc t0; loc t2 ] /\ eq_or_disjoint p q /\ disjoint p x3 /\ disjoint p y3 /\ disjoint p t0 /\ disjoint p t2 /\ disjoint q x3 /\ disjoint q y3 /\ disjoint q t0 /\ disjoint q t2 /\ point_inv h p /\ point_inv h q /\ as_nat h t0 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = fmont_as_nat h0 t0 in let t2_s = fmont_as_nat h0 t2 in let x3_s = S.fadd x1 z1 in let y3_s = S.fadd x2 z2 in let x3_s = S.fmul x3_s y3_s in let y3_s = S.fadd t0_s t2_s in let y3_s = S.fsub x3_s y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s))
[ { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Point", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "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 point_add_3 x3 y3 t0 t2 p q = let x1, z1 = getx p, getz p in let x2, z2 = getx q, getz q in fadd x3 x1 z1; fadd y3 x2 z2; fmul x3 x3 y3; fadd y3 t0 t2; fsub y3 x3 y3
val point_add_3 (x3 y3 t0 t2:felem) (p q:point) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h t0 /\ live h t2 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc t0; loc t2 ] /\ eq_or_disjoint p q /\ disjoint p x3 /\ disjoint p y3 /\ disjoint p t0 /\ disjoint p t2 /\ disjoint q x3 /\ disjoint q y3 /\ disjoint q t0 /\ disjoint q t2 /\ point_inv h p /\ point_inv h q /\ as_nat h t0 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = fmont_as_nat h0 t0 in let t2_s = fmont_as_nat h0 t2 in let x3_s = S.fadd x1 z1 in let y3_s = S.fadd x2 z2 in let x3_s = S.fmul x3_s y3_s in let y3_s = S.fadd t0_s t2_s in let y3_s = S.fsub x3_s y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_3 x3 y3 t0 t2 p q =
true
null
false
let x1, z1 = getx p, getz p in let x2, z2 = getx q, getz q in fadd x3 x1 z1; fadd y3 x2 z2; fmul x3 x3 y3; fadd y3 t0 t2; fsub y3 x3 y3
{ "checked_file": "Hacl.Impl.P256.PointAdd.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "LowStar.Monotonic.Buffer.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.PointAdd.fst" }
[]
[ "Hacl.Impl.P256.Bignum.felem", "Hacl.Impl.P256.Point.point", "Hacl.Impl.P256.Field.fsub", "Prims.unit", "Hacl.Impl.P256.Field.fadd", "Hacl.Impl.P256.Field.fmul", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.Mktuple2", "Hacl.Impl.P256.Point.getz", "Hacl.Impl.P256.Point.getx" ]
[]
module Hacl.Impl.P256.PointAdd open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module S = Spec.P256 #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s)) let point_add_1 t0 t1 t2 t3 t4 p q = let x1, y1, z1 = getx p, gety p, getz p in let x2, y2, z2 = getx q, gety q, getz q in fmul t0 x1 x2; fmul t1 y1 y2; fmul t2 z1 z2; fadd t3 x1 y1; fadd t4 x2 y2; fmul t3 t3 t4; fadd t4 t0 t1 inline_for_extraction noextract val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s)) let point_add_2 t1 t2 t3 t4 t5 p q = let y1, z1 = gety p, getz p in let y2, z2 = gety q, getz q in fsub t3 t3 t4; fadd t4 y1 z1; fadd t5 y2 z2; fmul t4 t4 t5; fadd t5 t1 t2; fsub t4 t4 t5 inline_for_extraction noextract val point_add_3 (x3 y3 t0 t2:felem) (p q:point) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h t0 /\ live h t2 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc t0; loc t2 ] /\ eq_or_disjoint p q /\ disjoint p x3 /\ disjoint p y3 /\ disjoint p t0 /\ disjoint p t2 /\ disjoint q x3 /\ disjoint q y3 /\ disjoint q t0 /\ disjoint q t2 /\ point_inv h p /\ point_inv h q /\ as_nat h t0 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = fmont_as_nat h0 t0 in let t2_s = fmont_as_nat h0 t2 in let x3_s = S.fadd x1 z1 in let y3_s = S.fadd x2 z2 in let x3_s = S.fmul x3_s y3_s in let y3_s = S.fadd t0_s t2_s in let y3_s = S.fsub x3_s y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s))
false
false
Hacl.Impl.P256.PointAdd.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_add_3 (x3 y3 t0 t2:felem) (p q:point) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h t0 /\ live h t2 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc t0; loc t2 ] /\ eq_or_disjoint p q /\ disjoint p x3 /\ disjoint p y3 /\ disjoint p t0 /\ disjoint p t2 /\ disjoint q x3 /\ disjoint q y3 /\ disjoint q t0 /\ disjoint q t2 /\ point_inv h p /\ point_inv h q /\ as_nat h t0 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = fmont_as_nat h0 t0 in let t2_s = fmont_as_nat h0 t2 in let x3_s = S.fadd x1 z1 in let y3_s = S.fadd x2 z2 in let x3_s = S.fmul x3_s y3_s in let y3_s = S.fadd t0_s t2_s in let y3_s = S.fsub x3_s y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s))
[]
Hacl.Impl.P256.PointAdd.point_add_3
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.PointAdd.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
x3: Hacl.Impl.P256.Bignum.felem -> y3: Hacl.Impl.P256.Bignum.felem -> t0: Hacl.Impl.P256.Bignum.felem -> t2: Hacl.Impl.P256.Bignum.felem -> p: Hacl.Impl.P256.Point.point -> q: Hacl.Impl.P256.Point.point -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 15, "end_line": 133, "start_col": 33, "start_line": 126 }
FStar.HyperStack.ST.Stack
val point_add_7 (x3 y3 z3 t0 t1 t2 t3 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ as_nat h x3 < S.prime /\ as_nat h z3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3 |+| loc t1) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ as_nat h1 t1 < S.prime /\ (let x3_s = fmont_as_nat h0 x3 in let z3_s = fmont_as_nat h0 z3 in let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let y3_s = S.fmul x3_s z3_s in let y3_s = S.fadd y3_s t2_s in let x3_s = S.fmul t3_s x3_s in let x3_s = S.fsub x3_s t1_s in let z3_s = S.fmul t4_s z3_s in let t1_s = S.fmul t3_s t0_s in let z3_s = S.fadd z3_s t1_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s /\ fmont_as_nat h1 t1 == t1_s))
[ { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Point", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "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 point_add_7 x3 y3 z3 t0 t1 t2 t3 t4 = fmul y3 x3 z3; fadd y3 y3 t2; fmul x3 t3 x3; fsub x3 x3 t1; fmul z3 t4 z3; fmul t1 t3 t0; fadd z3 z3 t1
val point_add_7 (x3 y3 z3 t0 t1 t2 t3 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ as_nat h x3 < S.prime /\ as_nat h z3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3 |+| loc t1) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ as_nat h1 t1 < S.prime /\ (let x3_s = fmont_as_nat h0 x3 in let z3_s = fmont_as_nat h0 z3 in let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let y3_s = S.fmul x3_s z3_s in let y3_s = S.fadd y3_s t2_s in let x3_s = S.fmul t3_s x3_s in let x3_s = S.fsub x3_s t1_s in let z3_s = S.fmul t4_s z3_s in let t1_s = S.fmul t3_s t0_s in let z3_s = S.fadd z3_s t1_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s /\ fmont_as_nat h1 t1 == t1_s)) let point_add_7 x3 y3 z3 t0 t1 t2 t3 t4 =
true
null
false
fmul y3 x3 z3; fadd y3 y3 t2; fmul x3 t3 x3; fsub x3 x3 t1; fmul z3 t4 z3; fmul t1 t3 t0; fadd z3 z3 t1
{ "checked_file": "Hacl.Impl.P256.PointAdd.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "LowStar.Monotonic.Buffer.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.PointAdd.fst" }
[]
[ "Hacl.Impl.P256.Bignum.felem", "Hacl.Impl.P256.Field.fadd", "Prims.unit", "Hacl.Impl.P256.Field.fmul", "Hacl.Impl.P256.Field.fsub" ]
[]
module Hacl.Impl.P256.PointAdd open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module S = Spec.P256 #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s)) let point_add_1 t0 t1 t2 t3 t4 p q = let x1, y1, z1 = getx p, gety p, getz p in let x2, y2, z2 = getx q, gety q, getz q in fmul t0 x1 x2; fmul t1 y1 y2; fmul t2 z1 z2; fadd t3 x1 y1; fadd t4 x2 y2; fmul t3 t3 t4; fadd t4 t0 t1 inline_for_extraction noextract val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s)) let point_add_2 t1 t2 t3 t4 t5 p q = let y1, z1 = gety p, getz p in let y2, z2 = gety q, getz q in fsub t3 t3 t4; fadd t4 y1 z1; fadd t5 y2 z2; fmul t4 t4 t5; fadd t5 t1 t2; fsub t4 t4 t5 inline_for_extraction noextract val point_add_3 (x3 y3 t0 t2:felem) (p q:point) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h t0 /\ live h t2 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc t0; loc t2 ] /\ eq_or_disjoint p q /\ disjoint p x3 /\ disjoint p y3 /\ disjoint p t0 /\ disjoint p t2 /\ disjoint q x3 /\ disjoint q y3 /\ disjoint q t0 /\ disjoint q t2 /\ point_inv h p /\ point_inv h q /\ as_nat h t0 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = fmont_as_nat h0 t0 in let t2_s = fmont_as_nat h0 t2 in let x3_s = S.fadd x1 z1 in let y3_s = S.fadd x2 z2 in let x3_s = S.fmul x3_s y3_s in let y3_s = S.fadd t0_s t2_s in let y3_s = S.fsub x3_s y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_3 x3 y3 t0 t2 p q = let x1, z1 = getx p, getz p in let x2, z2 = getx q, getz q in fadd x3 x1 z1; fadd y3 x2 z2; fmul x3 x3 y3; fadd y3 t0 t2; fsub y3 x3 y3 inline_for_extraction noextract val point_add_4 (x3 y3 z3 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t1; loc t2 ] /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h y3 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ (let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let z3_s = S.fmul S.b_coeff t2_s in let x3_s = S.fsub y3_s z3_s in let z3_s = S.fadd x3_s x3_s in let x3_s = S.fadd x3_s z3_s in let z3_s = S.fsub t1_s x3_s in let x3_s = S.fadd t1_s x3_s in let y3_s = S.fmul S.b_coeff y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s)) let point_add_4 x3 y3 z3 t1 t2 = fmul_by_b_coeff z3 t2; fsub x3 y3 z3; fdouble z3 x3; fadd x3 x3 z3; fsub z3 t1 x3; fadd x3 t1 x3; fmul_by_b_coeff y3 y3 inline_for_extraction noextract val point_add_5 (x3 y3 z3 t0 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let t1_s = S.fadd t2_s t2_s in let t2_s = S.fadd t1_s t2_s in let y3_s = S.fsub y3_s t2_s in let y3_s = S.fsub y3_s t0_s in let t1_s = S.fadd y3_s y3_s in fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_5 x3 y3 z3 t0 t1 t2 = fdouble t1 t2; fadd t2 t1 t2; fsub y3 y3 t2; fsub y3 y3 t0; fdouble t1 y3 inline_for_extraction noextract val point_add_6 (x3 y3 z3 t0 t1 t2 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t4 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t0 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t4_s = fmont_as_nat h0 t4 in let y3_s = fmont_as_nat h0 y3 in let y3_s = S.fadd t1_s y3_s in let t1_s = S.fadd t0_s t0_s in let t0_s = S.fadd t1_s t0_s in let t0_s = S.fsub t0_s t2_s in let t1_s = S.fmul t4_s y3_s in let t2_s = S.fmul t0_s y3_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_6 x3 y3 z3 t0 t1 t2 t4 = fadd y3 t1 y3; fdouble t1 t0; fadd t0 t1 t0; fsub t0 t0 t2; fmul t1 t4 y3; fmul t2 t0 y3 inline_for_extraction noextract val point_add_7 (x3 y3 z3 t0 t1 t2 t3 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ as_nat h x3 < S.prime /\ as_nat h z3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3 |+| loc t1) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ as_nat h1 t1 < S.prime /\ (let x3_s = fmont_as_nat h0 x3 in let z3_s = fmont_as_nat h0 z3 in let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let y3_s = S.fmul x3_s z3_s in let y3_s = S.fadd y3_s t2_s in let x3_s = S.fmul t3_s x3_s in let x3_s = S.fsub x3_s t1_s in let z3_s = S.fmul t4_s z3_s in let t1_s = S.fmul t3_s t0_s in let z3_s = S.fadd z3_s t1_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s /\ fmont_as_nat h1 t1 == t1_s))
false
false
Hacl.Impl.P256.PointAdd.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_add_7 (x3 y3 z3 t0 t1 t2 t3 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ as_nat h x3 < S.prime /\ as_nat h z3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3 |+| loc t1) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ as_nat h1 t1 < S.prime /\ (let x3_s = fmont_as_nat h0 x3 in let z3_s = fmont_as_nat h0 z3 in let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let y3_s = S.fmul x3_s z3_s in let y3_s = S.fadd y3_s t2_s in let x3_s = S.fmul t3_s x3_s in let x3_s = S.fsub x3_s t1_s in let z3_s = S.fmul t4_s z3_s in let t1_s = S.fmul t3_s t0_s in let z3_s = S.fadd z3_s t1_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s /\ fmont_as_nat h1 t1 == t1_s))
[]
Hacl.Impl.P256.PointAdd.point_add_7
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.PointAdd.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
x3: Hacl.Impl.P256.Bignum.felem -> y3: Hacl.Impl.P256.Bignum.felem -> z3: Hacl.Impl.P256.Bignum.felem -> t0: Hacl.Impl.P256.Bignum.felem -> t1: Hacl.Impl.P256.Bignum.felem -> t2: Hacl.Impl.P256.Bignum.felem -> t3: Hacl.Impl.P256.Bignum.felem -> t4: Hacl.Impl.P256.Bignum.felem -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 15, "end_line": 268, "start_col": 2, "start_line": 262 }
FStar.HyperStack.ST.Stack
val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s))
[ { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Point", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "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 point_add_2 t1 t2 t3 t4 t5 p q = let y1, z1 = gety p, getz p in let y2, z2 = gety q, getz q in fsub t3 t3 t4; fadd t4 y1 z1; fadd t5 y2 z2; fmul t4 t4 t5; fadd t5 t1 t2; fsub t4 t4 t5
val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s)) let point_add_2 t1 t2 t3 t4 t5 p q =
true
null
false
let y1, z1 = gety p, getz p in let y2, z2 = gety q, getz q in fsub t3 t3 t4; fadd t4 y1 z1; fadd t5 y2 z2; fmul t4 t4 t5; fadd t5 t1 t2; fsub t4 t4 t5
{ "checked_file": "Hacl.Impl.P256.PointAdd.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "LowStar.Monotonic.Buffer.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.PointAdd.fst" }
[]
[ "Hacl.Impl.P256.Bignum.felem", "Hacl.Impl.P256.Point.point", "Hacl.Impl.P256.Field.fsub", "Prims.unit", "Hacl.Impl.P256.Field.fadd", "Hacl.Impl.P256.Field.fmul", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.Mktuple2", "Hacl.Impl.P256.Point.getz", "Hacl.Impl.P256.Point.gety" ]
[]
module Hacl.Impl.P256.PointAdd open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module S = Spec.P256 #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s)) let point_add_1 t0 t1 t2 t3 t4 p q = let x1, y1, z1 = getx p, gety p, getz p in let x2, y2, z2 = getx q, gety q, getz q in fmul t0 x1 x2; fmul t1 y1 y2; fmul t2 z1 z2; fadd t3 x1 y1; fadd t4 x2 y2; fmul t3 t3 t4; fadd t4 t0 t1 inline_for_extraction noextract val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s))
false
false
Hacl.Impl.P256.PointAdd.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s))
[]
Hacl.Impl.P256.PointAdd.point_add_2
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.PointAdd.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
t1: Hacl.Impl.P256.Bignum.felem -> t2: Hacl.Impl.P256.Bignum.felem -> t3: Hacl.Impl.P256.Bignum.felem -> t4: Hacl.Impl.P256.Bignum.felem -> t5: Hacl.Impl.P256.Bignum.felem -> p: Hacl.Impl.P256.Point.point -> q: Hacl.Impl.P256.Point.point -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 15, "end_line": 99, "start_col": 36, "start_line": 91 }
FStar.HyperStack.ST.Stack
val point_add_6 (x3 y3 z3 t0 t1 t2 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t4 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t0 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t4_s = fmont_as_nat h0 t4 in let y3_s = fmont_as_nat h0 y3 in let y3_s = S.fadd t1_s y3_s in let t1_s = S.fadd t0_s t0_s in let t0_s = S.fadd t1_s t0_s in let t0_s = S.fsub t0_s t2_s in let t1_s = S.fmul t4_s y3_s in let t2_s = S.fmul t0_s y3_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s))
[ { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Point", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "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 point_add_6 x3 y3 z3 t0 t1 t2 t4 = fadd y3 t1 y3; fdouble t1 t0; fadd t0 t1 t0; fsub t0 t0 t2; fmul t1 t4 y3; fmul t2 t0 y3
val point_add_6 (x3 y3 z3 t0 t1 t2 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t4 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t0 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t4_s = fmont_as_nat h0 t4 in let y3_s = fmont_as_nat h0 y3 in let y3_s = S.fadd t1_s y3_s in let t1_s = S.fadd t0_s t0_s in let t0_s = S.fadd t1_s t0_s in let t0_s = S.fsub t0_s t2_s in let t1_s = S.fmul t4_s y3_s in let t2_s = S.fmul t0_s y3_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_6 x3 y3 z3 t0 t1 t2 t4 =
true
null
false
fadd y3 t1 y3; fdouble t1 t0; fadd t0 t1 t0; fsub t0 t0 t2; fmul t1 t4 y3; fmul t2 t0 y3
{ "checked_file": "Hacl.Impl.P256.PointAdd.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "LowStar.Monotonic.Buffer.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.PointAdd.fst" }
[]
[ "Hacl.Impl.P256.Bignum.felem", "Hacl.Impl.P256.Field.fmul", "Prims.unit", "Hacl.Impl.P256.Field.fsub", "Hacl.Impl.P256.Field.fadd", "Hacl.Impl.P256.Field.fdouble" ]
[]
module Hacl.Impl.P256.PointAdd open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module S = Spec.P256 #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s)) let point_add_1 t0 t1 t2 t3 t4 p q = let x1, y1, z1 = getx p, gety p, getz p in let x2, y2, z2 = getx q, gety q, getz q in fmul t0 x1 x2; fmul t1 y1 y2; fmul t2 z1 z2; fadd t3 x1 y1; fadd t4 x2 y2; fmul t3 t3 t4; fadd t4 t0 t1 inline_for_extraction noextract val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s)) let point_add_2 t1 t2 t3 t4 t5 p q = let y1, z1 = gety p, getz p in let y2, z2 = gety q, getz q in fsub t3 t3 t4; fadd t4 y1 z1; fadd t5 y2 z2; fmul t4 t4 t5; fadd t5 t1 t2; fsub t4 t4 t5 inline_for_extraction noextract val point_add_3 (x3 y3 t0 t2:felem) (p q:point) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h t0 /\ live h t2 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc t0; loc t2 ] /\ eq_or_disjoint p q /\ disjoint p x3 /\ disjoint p y3 /\ disjoint p t0 /\ disjoint p t2 /\ disjoint q x3 /\ disjoint q y3 /\ disjoint q t0 /\ disjoint q t2 /\ point_inv h p /\ point_inv h q /\ as_nat h t0 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = fmont_as_nat h0 t0 in let t2_s = fmont_as_nat h0 t2 in let x3_s = S.fadd x1 z1 in let y3_s = S.fadd x2 z2 in let x3_s = S.fmul x3_s y3_s in let y3_s = S.fadd t0_s t2_s in let y3_s = S.fsub x3_s y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_3 x3 y3 t0 t2 p q = let x1, z1 = getx p, getz p in let x2, z2 = getx q, getz q in fadd x3 x1 z1; fadd y3 x2 z2; fmul x3 x3 y3; fadd y3 t0 t2; fsub y3 x3 y3 inline_for_extraction noextract val point_add_4 (x3 y3 z3 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t1; loc t2 ] /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h y3 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ (let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let z3_s = S.fmul S.b_coeff t2_s in let x3_s = S.fsub y3_s z3_s in let z3_s = S.fadd x3_s x3_s in let x3_s = S.fadd x3_s z3_s in let z3_s = S.fsub t1_s x3_s in let x3_s = S.fadd t1_s x3_s in let y3_s = S.fmul S.b_coeff y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s)) let point_add_4 x3 y3 z3 t1 t2 = fmul_by_b_coeff z3 t2; fsub x3 y3 z3; fdouble z3 x3; fadd x3 x3 z3; fsub z3 t1 x3; fadd x3 t1 x3; fmul_by_b_coeff y3 y3 inline_for_extraction noextract val point_add_5 (x3 y3 z3 t0 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let t1_s = S.fadd t2_s t2_s in let t2_s = S.fadd t1_s t2_s in let y3_s = S.fsub y3_s t2_s in let y3_s = S.fsub y3_s t0_s in let t1_s = S.fadd y3_s y3_s in fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_5 x3 y3 z3 t0 t1 t2 = fdouble t1 t2; fadd t2 t1 t2; fsub y3 y3 t2; fsub y3 y3 t0; fdouble t1 y3 inline_for_extraction noextract val point_add_6 (x3 y3 z3 t0 t1 t2 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t4 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t0 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t4_s = fmont_as_nat h0 t4 in let y3_s = fmont_as_nat h0 y3 in let y3_s = S.fadd t1_s y3_s in let t1_s = S.fadd t0_s t0_s in let t0_s = S.fadd t1_s t0_s in let t0_s = S.fsub t0_s t2_s in let t1_s = S.fmul t4_s y3_s in let t2_s = S.fmul t0_s y3_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s))
false
false
Hacl.Impl.P256.PointAdd.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_add_6 (x3 y3 z3 t0 t1 t2 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t4 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t0 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t4_s = fmont_as_nat h0 t4 in let y3_s = fmont_as_nat h0 y3 in let y3_s = S.fadd t1_s y3_s in let t1_s = S.fadd t0_s t0_s in let t0_s = S.fadd t1_s t0_s in let t0_s = S.fsub t0_s t2_s in let t1_s = S.fmul t4_s y3_s in let t2_s = S.fmul t0_s y3_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s))
[]
Hacl.Impl.P256.PointAdd.point_add_6
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.PointAdd.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
x3: Hacl.Impl.P256.Bignum.felem -> y3: Hacl.Impl.P256.Bignum.felem -> z3: Hacl.Impl.P256.Bignum.felem -> t0: Hacl.Impl.P256.Bignum.felem -> t1: Hacl.Impl.P256.Bignum.felem -> t2: Hacl.Impl.P256.Bignum.felem -> t4: Hacl.Impl.P256.Bignum.felem -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 15, "end_line": 228, "start_col": 2, "start_line": 223 }
FStar.HyperStack.ST.Stack
val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s))
[ { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Point", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "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 point_add_1 t0 t1 t2 t3 t4 p q = let x1, y1, z1 = getx p, gety p, getz p in let x2, y2, z2 = getx q, gety q, getz q in fmul t0 x1 x2; fmul t1 y1 y2; fmul t2 z1 z2; fadd t3 x1 y1; fadd t4 x2 y2; fmul t3 t3 t4; fadd t4 t0 t1
val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s)) let point_add_1 t0 t1 t2 t3 t4 p q =
true
null
false
let x1, y1, z1 = getx p, gety p, getz p in let x2, y2, z2 = getx q, gety q, getz q in fmul t0 x1 x2; fmul t1 y1 y2; fmul t2 z1 z2; fadd t3 x1 y1; fadd t4 x2 y2; fmul t3 t3 t4; fadd t4 t0 t1
{ "checked_file": "Hacl.Impl.P256.PointAdd.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "LowStar.Monotonic.Buffer.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.PointAdd.fst" }
[]
[ "Hacl.Impl.P256.Bignum.felem", "Hacl.Impl.P256.Point.point", "Hacl.Impl.P256.Field.fadd", "Prims.unit", "Hacl.Impl.P256.Field.fmul", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.Mktuple3", "Hacl.Impl.P256.Point.getz", "Hacl.Impl.P256.Point.gety", "Hacl.Impl.P256.Point.getx" ]
[]
module Hacl.Impl.P256.PointAdd open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module S = Spec.P256 #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s))
false
false
Hacl.Impl.P256.PointAdd.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s))
[]
Hacl.Impl.P256.PointAdd.point_add_1
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.PointAdd.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
t0: Hacl.Impl.P256.Bignum.felem -> t1: Hacl.Impl.P256.Bignum.felem -> t2: Hacl.Impl.P256.Bignum.felem -> t3: Hacl.Impl.P256.Bignum.felem -> t4: Hacl.Impl.P256.Bignum.felem -> p: Hacl.Impl.P256.Point.point -> q: Hacl.Impl.P256.Point.point -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 15, "end_line": 57, "start_col": 36, "start_line": 48 }
FStar.HyperStack.ST.Stack
val point_add_5 (x3 y3 z3 t0 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let t1_s = S.fadd t2_s t2_s in let t2_s = S.fadd t1_s t2_s in let y3_s = S.fsub y3_s t2_s in let y3_s = S.fsub y3_s t0_s in let t1_s = S.fadd y3_s y3_s in fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s))
[ { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Point", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "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 point_add_5 x3 y3 z3 t0 t1 t2 = fdouble t1 t2; fadd t2 t1 t2; fsub y3 y3 t2; fsub y3 y3 t0; fdouble t1 y3
val point_add_5 (x3 y3 z3 t0 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let t1_s = S.fadd t2_s t2_s in let t2_s = S.fadd t1_s t2_s in let y3_s = S.fsub y3_s t2_s in let y3_s = S.fsub y3_s t0_s in let t1_s = S.fadd y3_s y3_s in fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_5 x3 y3 z3 t0 t1 t2 =
true
null
false
fdouble t1 t2; fadd t2 t1 t2; fsub y3 y3 t2; fsub y3 y3 t0; fdouble t1 y3
{ "checked_file": "Hacl.Impl.P256.PointAdd.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "LowStar.Monotonic.Buffer.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.PointAdd.fst" }
[]
[ "Hacl.Impl.P256.Bignum.felem", "Hacl.Impl.P256.Field.fdouble", "Prims.unit", "Hacl.Impl.P256.Field.fsub", "Hacl.Impl.P256.Field.fadd" ]
[]
module Hacl.Impl.P256.PointAdd open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module S = Spec.P256 #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s)) let point_add_1 t0 t1 t2 t3 t4 p q = let x1, y1, z1 = getx p, gety p, getz p in let x2, y2, z2 = getx q, gety q, getz q in fmul t0 x1 x2; fmul t1 y1 y2; fmul t2 z1 z2; fadd t3 x1 y1; fadd t4 x2 y2; fmul t3 t3 t4; fadd t4 t0 t1 inline_for_extraction noextract val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s)) let point_add_2 t1 t2 t3 t4 t5 p q = let y1, z1 = gety p, getz p in let y2, z2 = gety q, getz q in fsub t3 t3 t4; fadd t4 y1 z1; fadd t5 y2 z2; fmul t4 t4 t5; fadd t5 t1 t2; fsub t4 t4 t5 inline_for_extraction noextract val point_add_3 (x3 y3 t0 t2:felem) (p q:point) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h t0 /\ live h t2 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc t0; loc t2 ] /\ eq_or_disjoint p q /\ disjoint p x3 /\ disjoint p y3 /\ disjoint p t0 /\ disjoint p t2 /\ disjoint q x3 /\ disjoint q y3 /\ disjoint q t0 /\ disjoint q t2 /\ point_inv h p /\ point_inv h q /\ as_nat h t0 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = fmont_as_nat h0 t0 in let t2_s = fmont_as_nat h0 t2 in let x3_s = S.fadd x1 z1 in let y3_s = S.fadd x2 z2 in let x3_s = S.fmul x3_s y3_s in let y3_s = S.fadd t0_s t2_s in let y3_s = S.fsub x3_s y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_3 x3 y3 t0 t2 p q = let x1, z1 = getx p, getz p in let x2, z2 = getx q, getz q in fadd x3 x1 z1; fadd y3 x2 z2; fmul x3 x3 y3; fadd y3 t0 t2; fsub y3 x3 y3 inline_for_extraction noextract val point_add_4 (x3 y3 z3 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t1; loc t2 ] /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h y3 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ (let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let z3_s = S.fmul S.b_coeff t2_s in let x3_s = S.fsub y3_s z3_s in let z3_s = S.fadd x3_s x3_s in let x3_s = S.fadd x3_s z3_s in let z3_s = S.fsub t1_s x3_s in let x3_s = S.fadd t1_s x3_s in let y3_s = S.fmul S.b_coeff y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s)) let point_add_4 x3 y3 z3 t1 t2 = fmul_by_b_coeff z3 t2; fsub x3 y3 z3; fdouble z3 x3; fadd x3 x3 z3; fsub z3 t1 x3; fadd x3 t1 x3; fmul_by_b_coeff y3 y3 inline_for_extraction noextract val point_add_5 (x3 y3 z3 t0 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let t1_s = S.fadd t2_s t2_s in let t2_s = S.fadd t1_s t2_s in let y3_s = S.fsub y3_s t2_s in let y3_s = S.fsub y3_s t0_s in let t1_s = S.fadd y3_s y3_s in fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s))
false
false
Hacl.Impl.P256.PointAdd.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_add_5 (x3 y3 z3 t0 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let t1_s = S.fadd t2_s t2_s in let t2_s = S.fadd t1_s t2_s in let y3_s = S.fsub y3_s t2_s in let y3_s = S.fsub y3_s t0_s in let t1_s = S.fadd y3_s y3_s in fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s))
[]
Hacl.Impl.P256.PointAdd.point_add_5
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.PointAdd.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
x3: Hacl.Impl.P256.Bignum.felem -> y3: Hacl.Impl.P256.Bignum.felem -> z3: Hacl.Impl.P256.Bignum.felem -> t0: Hacl.Impl.P256.Bignum.felem -> t1: Hacl.Impl.P256.Bignum.felem -> t2: Hacl.Impl.P256.Bignum.felem -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 15, "end_line": 192, "start_col": 2, "start_line": 188 }
FStar.HyperStack.ST.Stack
val point_add_noalloc: tmp:lbuffer uint64 24ul -> res:point -> p:point -> q:point -> Stack unit (requires fun h -> live h p /\ live h q /\ live h res /\ live h tmp /\ eq_or_disjoint p q /\ disjoint q res /\ disjoint p res /\ disjoint tmp p /\ disjoint tmp q /\ disjoint tmp res /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc res |+| loc tmp) h0 h1 /\ point_inv h1 res /\ from_mont_point (as_point_nat h1 res) == S.point_add (from_mont_point (as_point_nat h0 p)) (from_mont_point (as_point_nat h0 q)))
[ { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Point", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "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 point_add_noalloc tmp res p q = let x3, y3, z3 = getx res, gety res, getz res in let t0 = sub tmp 0ul 4ul in let t1 = sub tmp 4ul 4ul in let t2 = sub tmp 8ul 4ul in let t3 = sub tmp 12ul 4ul in let t4 = sub tmp 16ul 4ul in let t5 = sub tmp 20ul 4ul in point_add_1 t0 t1 t2 t3 t4 p q; point_add_2 t1 t2 t3 t4 t5 p q; point_add_3 x3 y3 t0 t2 p q; point_add_4 x3 y3 z3 t1 t2; point_add_5 x3 y3 z3 t0 t1 t2; point_add_6 x3 y3 z3 t0 t1 t2 t4; point_add_7 x3 y3 z3 t0 t1 t2 t3 t4
val point_add_noalloc: tmp:lbuffer uint64 24ul -> res:point -> p:point -> q:point -> Stack unit (requires fun h -> live h p /\ live h q /\ live h res /\ live h tmp /\ eq_or_disjoint p q /\ disjoint q res /\ disjoint p res /\ disjoint tmp p /\ disjoint tmp q /\ disjoint tmp res /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc res |+| loc tmp) h0 h1 /\ point_inv h1 res /\ from_mont_point (as_point_nat h1 res) == S.point_add (from_mont_point (as_point_nat h0 p)) (from_mont_point (as_point_nat h0 q))) let point_add_noalloc tmp res p q =
true
null
false
let x3, y3, z3 = getx res, gety res, getz res in let t0 = sub tmp 0ul 4ul in let t1 = sub tmp 4ul 4ul in let t2 = sub tmp 8ul 4ul in let t3 = sub tmp 12ul 4ul in let t4 = sub tmp 16ul 4ul in let t5 = sub tmp 20ul 4ul in point_add_1 t0 t1 t2 t3 t4 p q; point_add_2 t1 t2 t3 t4 t5 p q; point_add_3 x3 y3 t0 t2 p q; point_add_4 x3 y3 z3 t1 t2; point_add_5 x3 y3 z3 t0 t1 t2; point_add_6 x3 y3 z3 t0 t1 t2 t4; point_add_7 x3 y3 z3 t0 t1 t2 t3 t4
{ "checked_file": "Hacl.Impl.P256.PointAdd.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "LowStar.Monotonic.Buffer.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.PointAdd.fst" }
[]
[ "Lib.Buffer.lbuffer", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Hacl.Impl.P256.Point.point", "Hacl.Impl.P256.Bignum.felem", "Hacl.Impl.P256.PointAdd.point_add_7", "Prims.unit", "Hacl.Impl.P256.PointAdd.point_add_6", "Hacl.Impl.P256.PointAdd.point_add_5", "Hacl.Impl.P256.PointAdd.point_add_4", "Hacl.Impl.P256.PointAdd.point_add_3", "Hacl.Impl.P256.PointAdd.point_add_2", "Hacl.Impl.P256.PointAdd.point_add_1", "Lib.Buffer.lbuffer_t", "Lib.Buffer.MUT", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.SEC", "FStar.UInt32.uint_to_t", "FStar.UInt32.t", "Lib.Buffer.sub", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.Mktuple3", "Hacl.Impl.P256.Point.getz", "Hacl.Impl.P256.Point.gety", "Hacl.Impl.P256.Point.getx" ]
[]
module Hacl.Impl.P256.PointAdd open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module S = Spec.P256 #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s)) let point_add_1 t0 t1 t2 t3 t4 p q = let x1, y1, z1 = getx p, gety p, getz p in let x2, y2, z2 = getx q, gety q, getz q in fmul t0 x1 x2; fmul t1 y1 y2; fmul t2 z1 z2; fadd t3 x1 y1; fadd t4 x2 y2; fmul t3 t3 t4; fadd t4 t0 t1 inline_for_extraction noextract val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s)) let point_add_2 t1 t2 t3 t4 t5 p q = let y1, z1 = gety p, getz p in let y2, z2 = gety q, getz q in fsub t3 t3 t4; fadd t4 y1 z1; fadd t5 y2 z2; fmul t4 t4 t5; fadd t5 t1 t2; fsub t4 t4 t5 inline_for_extraction noextract val point_add_3 (x3 y3 t0 t2:felem) (p q:point) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h t0 /\ live h t2 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc t0; loc t2 ] /\ eq_or_disjoint p q /\ disjoint p x3 /\ disjoint p y3 /\ disjoint p t0 /\ disjoint p t2 /\ disjoint q x3 /\ disjoint q y3 /\ disjoint q t0 /\ disjoint q t2 /\ point_inv h p /\ point_inv h q /\ as_nat h t0 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = fmont_as_nat h0 t0 in let t2_s = fmont_as_nat h0 t2 in let x3_s = S.fadd x1 z1 in let y3_s = S.fadd x2 z2 in let x3_s = S.fmul x3_s y3_s in let y3_s = S.fadd t0_s t2_s in let y3_s = S.fsub x3_s y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_3 x3 y3 t0 t2 p q = let x1, z1 = getx p, getz p in let x2, z2 = getx q, getz q in fadd x3 x1 z1; fadd y3 x2 z2; fmul x3 x3 y3; fadd y3 t0 t2; fsub y3 x3 y3 inline_for_extraction noextract val point_add_4 (x3 y3 z3 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t1; loc t2 ] /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h y3 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ (let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let z3_s = S.fmul S.b_coeff t2_s in let x3_s = S.fsub y3_s z3_s in let z3_s = S.fadd x3_s x3_s in let x3_s = S.fadd x3_s z3_s in let z3_s = S.fsub t1_s x3_s in let x3_s = S.fadd t1_s x3_s in let y3_s = S.fmul S.b_coeff y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s)) let point_add_4 x3 y3 z3 t1 t2 = fmul_by_b_coeff z3 t2; fsub x3 y3 z3; fdouble z3 x3; fadd x3 x3 z3; fsub z3 t1 x3; fadd x3 t1 x3; fmul_by_b_coeff y3 y3 inline_for_extraction noextract val point_add_5 (x3 y3 z3 t0 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let t1_s = S.fadd t2_s t2_s in let t2_s = S.fadd t1_s t2_s in let y3_s = S.fsub y3_s t2_s in let y3_s = S.fsub y3_s t0_s in let t1_s = S.fadd y3_s y3_s in fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_5 x3 y3 z3 t0 t1 t2 = fdouble t1 t2; fadd t2 t1 t2; fsub y3 y3 t2; fsub y3 y3 t0; fdouble t1 y3 inline_for_extraction noextract val point_add_6 (x3 y3 z3 t0 t1 t2 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t4 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t0 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t4_s = fmont_as_nat h0 t4 in let y3_s = fmont_as_nat h0 y3 in let y3_s = S.fadd t1_s y3_s in let t1_s = S.fadd t0_s t0_s in let t0_s = S.fadd t1_s t0_s in let t0_s = S.fsub t0_s t2_s in let t1_s = S.fmul t4_s y3_s in let t2_s = S.fmul t0_s y3_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_6 x3 y3 z3 t0 t1 t2 t4 = fadd y3 t1 y3; fdouble t1 t0; fadd t0 t1 t0; fsub t0 t0 t2; fmul t1 t4 y3; fmul t2 t0 y3 inline_for_extraction noextract val point_add_7 (x3 y3 z3 t0 t1 t2 t3 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ as_nat h x3 < S.prime /\ as_nat h z3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3 |+| loc t1) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ as_nat h1 t1 < S.prime /\ (let x3_s = fmont_as_nat h0 x3 in let z3_s = fmont_as_nat h0 z3 in let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let y3_s = S.fmul x3_s z3_s in let y3_s = S.fadd y3_s t2_s in let x3_s = S.fmul t3_s x3_s in let x3_s = S.fsub x3_s t1_s in let z3_s = S.fmul t4_s z3_s in let t1_s = S.fmul t3_s t0_s in let z3_s = S.fadd z3_s t1_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s /\ fmont_as_nat h1 t1 == t1_s)) let point_add_7 x3 y3 z3 t0 t1 t2 t3 t4 = fmul y3 x3 z3; fadd y3 y3 t2; fmul x3 t3 x3; fsub x3 x3 t1; fmul z3 t4 z3; fmul t1 t3 t0; fadd z3 z3 t1 inline_for_extraction noextract val point_add_noalloc: tmp:lbuffer uint64 24ul -> res:point -> p:point -> q:point -> Stack unit (requires fun h -> live h p /\ live h q /\ live h res /\ live h tmp /\ eq_or_disjoint p q /\ disjoint q res /\ disjoint p res /\ disjoint tmp p /\ disjoint tmp q /\ disjoint tmp res /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc res |+| loc tmp) h0 h1 /\ point_inv h1 res /\ from_mont_point (as_point_nat h1 res) == S.point_add (from_mont_point (as_point_nat h0 p)) (from_mont_point (as_point_nat h0 q)))
false
false
Hacl.Impl.P256.PointAdd.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_add_noalloc: tmp:lbuffer uint64 24ul -> res:point -> p:point -> q:point -> Stack unit (requires fun h -> live h p /\ live h q /\ live h res /\ live h tmp /\ eq_or_disjoint p q /\ disjoint q res /\ disjoint p res /\ disjoint tmp p /\ disjoint tmp q /\ disjoint tmp res /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc res |+| loc tmp) h0 h1 /\ point_inv h1 res /\ from_mont_point (as_point_nat h1 res) == S.point_add (from_mont_point (as_point_nat h0 p)) (from_mont_point (as_point_nat h0 q)))
[]
Hacl.Impl.P256.PointAdd.point_add_noalloc
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.PointAdd.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
tmp: Lib.Buffer.lbuffer Lib.IntTypes.uint64 24ul -> res: Hacl.Impl.P256.Point.point -> p: Hacl.Impl.P256.Point.point -> q: Hacl.Impl.P256.Point.point -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 37, "end_line": 297, "start_col": 35, "start_line": 283 }
FStar.HyperStack.ST.Stack
val point_add: res:point -> p:point -> q:point -> Stack unit (requires fun h -> live h p /\ live h q /\ live h res /\ eq_or_disjoint p q /\ eq_or_disjoint q res /\ eq_or_disjoint p res /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ point_inv h1 res /\ from_mont_point (as_point_nat h1 res) == S.point_add (from_mont_point (as_point_nat h0 p)) (from_mont_point (as_point_nat h0 q)))
[ { "abbrev": false, "full_module": "Hacl.Impl.P256.Field", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Bignum", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "Spec.P256", "short_module": "S" }, { "abbrev": false, "full_module": "Hacl.Impl.P256.Point", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.All", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.P256", "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 point_add res p q = push_frame (); let tmp = create 36ul (u64 0) in let t0 = sub tmp 0ul 24ul in let t1 = sub tmp 24ul 12ul in point_add_noalloc t0 t1 p q; copy res t1; pop_frame ()
val point_add: res:point -> p:point -> q:point -> Stack unit (requires fun h -> live h p /\ live h q /\ live h res /\ eq_or_disjoint p q /\ eq_or_disjoint q res /\ eq_or_disjoint p res /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ point_inv h1 res /\ from_mont_point (as_point_nat h1 res) == S.point_add (from_mont_point (as_point_nat h0 p)) (from_mont_point (as_point_nat h0 q))) let point_add res p q =
true
null
false
push_frame (); let tmp = create 36ul (u64 0) in let t0 = sub tmp 0ul 24ul in let t1 = sub tmp 24ul 12ul in point_add_noalloc t0 t1 p q; copy res t1; pop_frame ()
{ "checked_file": "Hacl.Impl.P256.PointAdd.fst.checked", "dependencies": [ "Spec.P256.fst.checked", "prims.fst.checked", "LowStar.Monotonic.Buffer.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.P256.Field.fsti.checked", "Hacl.Impl.P256.Bignum.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.All.fst.checked", "FStar.HyperStack.fst.checked" ], "interface_file": true, "source_file": "Hacl.Impl.P256.PointAdd.fst" }
[]
[ "Hacl.Impl.P256.Point.point", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Lib.Buffer.copy", "Lib.Buffer.MUT", "Lib.IntTypes.uint64", "FStar.UInt32.__uint_to_t", "Hacl.Impl.P256.PointAdd.point_add_noalloc", "Lib.Buffer.lbuffer_t", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.SEC", "FStar.UInt32.uint_to_t", "FStar.UInt32.t", "Lib.Buffer.sub", "Lib.Buffer.create", "Lib.IntTypes.u64", "Lib.Buffer.lbuffer", "FStar.HyperStack.ST.push_frame" ]
[]
module Hacl.Impl.P256.PointAdd open FStar.Mul open FStar.HyperStack.All open FStar.HyperStack module ST = FStar.HyperStack.ST open Lib.IntTypes open Lib.Buffer open Hacl.Impl.P256.Bignum open Hacl.Impl.P256.Field module S = Spec.P256 #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract val point_add_1 (t0 t1 t2 t3 t4:felem) (p q:point) : Stack unit (requires fun h -> live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ eq_or_disjoint p q /\ disjoint p t0 /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint q t0 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc t0 |+| loc t1 |+| loc t2 |+| loc t3 |+| loc t4) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = S.fmul x1 x2 in let t1_s = S.fmul y1 y2 in let t2_s = S.fmul z1 z2 in let t3_s = S.fadd x1 y1 in let t4_s = S.fadd x2 y2 in let t3_s = S.fmul t3_s t4_s in let t4_s = S.fadd t0_s t1_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s)) let point_add_1 t0 t1 t2 t3 t4 p q = let x1, y1, z1 = getx p, gety p, getz p in let x2, y2, z2 = getx q, gety q, getz q in fmul t0 x1 x2; fmul t1 y1 y2; fmul t2 z1 z2; fadd t3 x1 y1; fadd t4 x2 y2; fmul t3 t3 t4; fadd t4 t0 t1 inline_for_extraction noextract val point_add_2 (t1 t2 t3 t4 t5:felem) (p q:point) : Stack unit (requires fun h -> live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ live h t5 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc t1; loc t2; loc t3; loc t4; loc t5 ] /\ eq_or_disjoint p q /\ disjoint p t1 /\ disjoint p t2 /\ disjoint p t3 /\ disjoint p t4 /\ disjoint p t5 /\ disjoint q t1 /\ disjoint q t2 /\ disjoint q t3 /\ disjoint q t4 /\ disjoint q t5 /\ point_inv h p /\ point_inv h q /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc t3 |+| loc t4 |+| loc t5) h0 h1 /\ as_nat h1 t3 < S.prime /\ as_nat h1 t4 < S.prime /\ as_nat h1 t5 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let t3_s = S.fsub t3_s t4_s in let t4_s = S.fadd y1 z1 in let t5_s = S.fadd y2 z2 in let t4_s = S.fmul t4_s t5_s in let t5_s = S.fadd t1_s t2_s in let t4_s = S.fsub t4_s t5_s in fmont_as_nat h1 t3 == t3_s /\ fmont_as_nat h1 t4 == t4_s /\ fmont_as_nat h1 t5 == t5_s)) let point_add_2 t1 t2 t3 t4 t5 p q = let y1, z1 = gety p, getz p in let y2, z2 = gety q, getz q in fsub t3 t3 t4; fadd t4 y1 z1; fadd t5 y2 z2; fmul t4 t4 t5; fadd t5 t1 t2; fsub t4 t4 t5 inline_for_extraction noextract val point_add_3 (x3 y3 t0 t2:felem) (p q:point) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h t0 /\ live h t2 /\ live h p /\ live h q /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc t0; loc t2 ] /\ eq_or_disjoint p q /\ disjoint p x3 /\ disjoint p y3 /\ disjoint p t0 /\ disjoint p t2 /\ disjoint q x3 /\ disjoint q y3 /\ disjoint q t0 /\ disjoint q t2 /\ point_inv h p /\ point_inv h q /\ as_nat h t0 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ (let x1, y1, z1 = from_mont_point (as_point_nat h0 p) in let x2, y2, z2 = from_mont_point (as_point_nat h0 q) in let t0_s = fmont_as_nat h0 t0 in let t2_s = fmont_as_nat h0 t2 in let x3_s = S.fadd x1 z1 in let y3_s = S.fadd x2 z2 in let x3_s = S.fmul x3_s y3_s in let y3_s = S.fadd t0_s t2_s in let y3_s = S.fsub x3_s y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_3 x3 y3 t0 t2 p q = let x1, z1 = getx p, getz p in let x2, z2 = getx q, getz q in fadd x3 x1 z1; fadd y3 x2 z2; fmul x3 x3 y3; fadd y3 t0 t2; fsub y3 x3 y3 inline_for_extraction noextract val point_add_4 (x3 y3 z3 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t1; loc t2 ] /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h y3 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ (let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let z3_s = S.fmul S.b_coeff t2_s in let x3_s = S.fsub y3_s z3_s in let z3_s = S.fadd x3_s x3_s in let x3_s = S.fadd x3_s z3_s in let z3_s = S.fsub t1_s x3_s in let x3_s = S.fadd t1_s x3_s in let y3_s = S.fmul S.b_coeff y3_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s)) let point_add_4 x3 y3 z3 t1 t2 = fmul_by_b_coeff z3 t2; fsub x3 y3 z3; fdouble z3 x3; fadd x3 x3 z3; fsub z3 t1 x3; fadd x3 t1 x3; fmul_by_b_coeff y3 y3 inline_for_extraction noextract val point_add_5 (x3 y3 z3 t0 t1 t2:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let y3_s = fmont_as_nat h0 y3 in let t1_s = S.fadd t2_s t2_s in let t2_s = S.fadd t1_s t2_s in let y3_s = S.fsub y3_s t2_s in let y3_s = S.fsub y3_s t0_s in let t1_s = S.fadd y3_s y3_s in fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_5 x3 y3 z3 t0 t1 t2 = fdouble t1 t2; fadd t2 t1 t2; fsub y3 y3 t2; fsub y3 y3 t0; fdouble t1 y3 inline_for_extraction noextract val point_add_6 (x3 y3 z3 t0 t1 t2 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t4 ] /\ as_nat h y3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc y3 |+| loc t0 |+| loc t1 |+| loc t2) h0 h1 /\ as_nat h1 t0 < S.prime /\ as_nat h1 t1 < S.prime /\ as_nat h1 t2 < S.prime /\ as_nat h1 y3 < S.prime /\ (let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t4_s = fmont_as_nat h0 t4 in let y3_s = fmont_as_nat h0 y3 in let y3_s = S.fadd t1_s y3_s in let t1_s = S.fadd t0_s t0_s in let t0_s = S.fadd t1_s t0_s in let t0_s = S.fsub t0_s t2_s in let t1_s = S.fmul t4_s y3_s in let t2_s = S.fmul t0_s y3_s in fmont_as_nat h1 t0 == t0_s /\ fmont_as_nat h1 t1 == t1_s /\ fmont_as_nat h1 t2 == t2_s /\ fmont_as_nat h1 y3 == y3_s)) let point_add_6 x3 y3 z3 t0 t1 t2 t4 = fadd y3 t1 y3; fdouble t1 t0; fadd t0 t1 t0; fsub t0 t0 t2; fmul t1 t4 y3; fmul t2 t0 y3 inline_for_extraction noextract val point_add_7 (x3 y3 z3 t0 t1 t2 t3 t4:felem) : Stack unit (requires fun h -> live h x3 /\ live h y3 /\ live h z3 /\ live h t0 /\ live h t1 /\ live h t2 /\ live h t3 /\ live h t4 /\ LowStar.Monotonic.Buffer.all_disjoint [ loc x3; loc y3; loc z3; loc t0; loc t1; loc t2; loc t3; loc t4 ] /\ as_nat h x3 < S.prime /\ as_nat h z3 < S.prime /\ as_nat h t0 < S.prime /\ as_nat h t1 < S.prime /\ as_nat h t2 < S.prime /\ as_nat h t3 < S.prime /\ as_nat h t4 < S.prime) (ensures fun h0 _ h1 -> modifies (loc x3 |+| loc y3 |+| loc z3 |+| loc t1) h0 h1 /\ as_nat h1 x3 < S.prime /\ as_nat h1 y3 < S.prime /\ as_nat h1 z3 < S.prime /\ as_nat h1 t1 < S.prime /\ (let x3_s = fmont_as_nat h0 x3 in let z3_s = fmont_as_nat h0 z3 in let t0_s = fmont_as_nat h0 t0 in let t1_s = fmont_as_nat h0 t1 in let t2_s = fmont_as_nat h0 t2 in let t3_s = fmont_as_nat h0 t3 in let t4_s = fmont_as_nat h0 t4 in let y3_s = S.fmul x3_s z3_s in let y3_s = S.fadd y3_s t2_s in let x3_s = S.fmul t3_s x3_s in let x3_s = S.fsub x3_s t1_s in let z3_s = S.fmul t4_s z3_s in let t1_s = S.fmul t3_s t0_s in let z3_s = S.fadd z3_s t1_s in fmont_as_nat h1 x3 == x3_s /\ fmont_as_nat h1 y3 == y3_s /\ fmont_as_nat h1 z3 == z3_s /\ fmont_as_nat h1 t1 == t1_s)) let point_add_7 x3 y3 z3 t0 t1 t2 t3 t4 = fmul y3 x3 z3; fadd y3 y3 t2; fmul x3 t3 x3; fsub x3 x3 t1; fmul z3 t4 z3; fmul t1 t3 t0; fadd z3 z3 t1 inline_for_extraction noextract val point_add_noalloc: tmp:lbuffer uint64 24ul -> res:point -> p:point -> q:point -> Stack unit (requires fun h -> live h p /\ live h q /\ live h res /\ live h tmp /\ eq_or_disjoint p q /\ disjoint q res /\ disjoint p res /\ disjoint tmp p /\ disjoint tmp q /\ disjoint tmp res /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc res |+| loc tmp) h0 h1 /\ point_inv h1 res /\ from_mont_point (as_point_nat h1 res) == S.point_add (from_mont_point (as_point_nat h0 p)) (from_mont_point (as_point_nat h0 q))) let point_add_noalloc tmp res p q = let x3, y3, z3 = getx res, gety res, getz res in let t0 = sub tmp 0ul 4ul in let t1 = sub tmp 4ul 4ul in let t2 = sub tmp 8ul 4ul in let t3 = sub tmp 12ul 4ul in let t4 = sub tmp 16ul 4ul in let t5 = sub tmp 20ul 4ul in point_add_1 t0 t1 t2 t3 t4 p q; point_add_2 t1 t2 t3 t4 t5 p q; point_add_3 x3 y3 t0 t2 p q; point_add_4 x3 y3 z3 t1 t2; point_add_5 x3 y3 z3 t0 t1 t2; point_add_6 x3 y3 z3 t0 t1 t2 t4; point_add_7 x3 y3 z3 t0 t1 t2 t3 t4 [@CInline]
false
false
Hacl.Impl.P256.PointAdd.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val point_add: res:point -> p:point -> q:point -> Stack unit (requires fun h -> live h p /\ live h q /\ live h res /\ eq_or_disjoint p q /\ eq_or_disjoint q res /\ eq_or_disjoint p res /\ point_inv h p /\ point_inv h q) (ensures fun h0 _ h1 -> modifies (loc res) h0 h1 /\ point_inv h1 res /\ from_mont_point (as_point_nat h1 res) == S.point_add (from_mont_point (as_point_nat h0 p)) (from_mont_point (as_point_nat h0 q)))
[]
Hacl.Impl.P256.PointAdd.point_add
{ "file_name": "code/ecdsap256/Hacl.Impl.P256.PointAdd.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
res: Hacl.Impl.P256.Point.point -> p: Hacl.Impl.P256.Point.point -> q: Hacl.Impl.P256.Point.point -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 14, "end_line": 308, "start_col": 2, "start_line": 302 }
Prims.Tot
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 msg_len_t (a:Hash.fixed_len_alg) = msgLen:size_t{v msgLen `less_than_max_input_length` a}
let msg_len_t (a: Hash.fixed_len_alg) =
false
null
false
msgLen: size_t{(v msgLen) `less_than_max_input_length` a}
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[ "total" ]
[ "Spec.Hash.Definitions.fixed_len_alg", "Lib.IntTypes.size_t", "Prims.b2t", "Hacl.Impl.RSAPSS.Padding.less_than_max_input_length", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length inline_for_extraction noextract let salt_len_t (a:Hash.fixed_len_alg) = saltLen:size_t{8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a} inline_for_extraction noextract
false
true
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val msg_len_t : a: Spec.Hash.Definitions.fixed_len_alg -> Type0
[]
Hacl.Impl.RSAPSS.Padding.msg_len_t
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Hash.Definitions.fixed_len_alg -> Type0
{ "end_col": 56, "end_line": 31, "start_col": 2, "start_line": 31 }
Prims.Tot
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length
let less_than_max_input_length =
false
null
false
Spec.Hash.Definitions.less_than_max_input_length
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[ "total" ]
[ "Spec.Hash.Definitions.less_than_max_input_length" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
false
true
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val less_than_max_input_length : l: Prims.int -> a: Spec.Hash.Definitions.hash_alg -> Prims.bool
[]
Hacl.Impl.RSAPSS.Padding.less_than_max_input_length
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
l: Prims.int -> a: Spec.Hash.Definitions.hash_alg -> Prims.bool
{ "end_col": 81, "end_line": 23, "start_col": 33, "start_line": 23 }
Prims.Tot
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 salt_len_t (a:Hash.fixed_len_alg) = saltLen:size_t{8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a}
let salt_len_t (a: Hash.fixed_len_alg) =
false
null
false
saltLen: size_t { 8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a }
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[ "total" ]
[ "Spec.Hash.Definitions.fixed_len_alg", "Lib.IntTypes.size_t", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_Addition", "Spec.Hash.Definitions.hash_length", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.IntTypes.max_size_t", "Hacl.Impl.RSAPSS.Padding.less_than_max_input_length" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length inline_for_extraction noextract
false
true
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val salt_len_t : a: Spec.Hash.Definitions.fixed_len_alg -> Type0
[]
Hacl.Impl.RSAPSS.Padding.salt_len_t
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Hash.Definitions.fixed_len_alg -> Type0
{ "end_col": 137, "end_line": 27, "start_col": 2, "start_line": 27 }
Prims.Tot
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 em_len_t (a:Hash.fixed_len_alg) (saltLen:salt_len_t a) = emBits:size_t{0 < v emBits /\ Hash.hash_length a + v saltLen + 2 <= S.blocks (v emBits) 8}
let em_len_t (a: Hash.fixed_len_alg) (saltLen: salt_len_t a) =
false
null
false
emBits: size_t{0 < v emBits /\ Hash.hash_length a + v saltLen + 2 <= S.blocks (v emBits) 8}
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[ "total" ]
[ "Spec.Hash.Definitions.fixed_len_alg", "Hacl.Impl.RSAPSS.Padding.salt_len_t", "Lib.IntTypes.size_t", "Prims.l_and", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Prims.op_LessThanOrEqual", "Prims.op_Addition", "Spec.Hash.Definitions.hash_length", "Spec.RSAPSS.blocks" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length inline_for_extraction noextract let salt_len_t (a:Hash.fixed_len_alg) = saltLen:size_t{8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a} inline_for_extraction noextract let msg_len_t (a:Hash.fixed_len_alg) = msgLen:size_t{v msgLen `less_than_max_input_length` a} inline_for_extraction noextract
false
false
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val em_len_t : a: Spec.Hash.Definitions.fixed_len_alg -> saltLen: Hacl.Impl.RSAPSS.Padding.salt_len_t a -> Type0
[]
Hacl.Impl.RSAPSS.Padding.em_len_t
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Hash.Definitions.fixed_len_alg -> saltLen: Hacl.Impl.RSAPSS.Padding.salt_len_t a -> Type0
{ "end_col": 92, "end_line": 35, "start_col": 2, "start_line": 35 }
FStar.HyperStack.ST.Stack
val xor_bytes: len:size_t{v len > 0} -> b1:lbuffer uint8 len -> b2:lbuffer uint8 len -> Stack unit (requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2) (ensures fun h0 _ h1 -> modifies (loc b1) h0 h1 /\ as_seq h1 b1 == S.xor_bytes (as_seq h0 b1) (as_seq h0 b2))
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 xor_bytes len b1 b2 = map2T len b1 (fun x y -> x ^. y) b1 b2
val xor_bytes: len:size_t{v len > 0} -> b1:lbuffer uint8 len -> b2:lbuffer uint8 len -> Stack unit (requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2) (ensures fun h0 _ h1 -> modifies (loc b1) h0 h1 /\ as_seq h1 b1 == S.xor_bytes (as_seq h0 b1) (as_seq h0 b2)) let xor_bytes len b1 b2 =
true
null
false
map2T len b1 (fun x y -> x ^. y) b1 b2
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[]
[ "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_GreaterThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Lib.Buffer.map2T", "Lib.Buffer.MUT", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Lib.IntTypes.op_Hat_Dot", "Prims.unit" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length inline_for_extraction noextract let salt_len_t (a:Hash.fixed_len_alg) = saltLen:size_t{8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a} inline_for_extraction noextract let msg_len_t (a:Hash.fixed_len_alg) = msgLen:size_t{v msgLen `less_than_max_input_length` a} inline_for_extraction noextract let em_len_t (a:Hash.fixed_len_alg) (saltLen:salt_len_t a) = emBits:size_t{0 < v emBits /\ Hash.hash_length a + v saltLen + 2 <= S.blocks (v emBits) 8} inline_for_extraction noextract val xor_bytes: len:size_t{v len > 0} -> b1:lbuffer uint8 len -> b2:lbuffer uint8 len -> Stack unit (requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2) (ensures fun h0 _ h1 -> modifies (loc b1) h0 h1 /\ as_seq h1 b1 == S.xor_bytes (as_seq h0 b1) (as_seq h0 b2))
false
false
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val xor_bytes: len:size_t{v len > 0} -> b1:lbuffer uint8 len -> b2:lbuffer uint8 len -> Stack unit (requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2) (ensures fun h0 _ h1 -> modifies (loc b1) h0 h1 /\ as_seq h1 b1 == S.xor_bytes (as_seq h0 b1) (as_seq h0 b2))
[]
Hacl.Impl.RSAPSS.Padding.xor_bytes
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Lib.IntTypes.size_t{Lib.IntTypes.v len > 0} -> b1: Lib.Buffer.lbuffer Lib.IntTypes.uint8 len -> b2: Lib.Buffer.lbuffer Lib.IntTypes.uint8 len -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 40, "end_line": 49, "start_col": 2, "start_line": 49 }
FStar.HyperStack.ST.Stack
val db_zero: len:size_t{v len > 0} -> db:lbuffer uint8 len -> emBits:size_t -> Stack unit (requires fun h -> live h db) (ensures fun h0 _ h1 -> modifies (loc db) h0 h1 /\ as_seq h1 db == S.db_zero #(v len) (as_seq h0 db) (v emBits))
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 db_zero len db emBits = let msBits = emBits %. 8ul in if msBits >. 0ul then db.(0ul) <- db.(0ul) &. (u8 0xff >>. (8ul -. msBits))
val db_zero: len:size_t{v len > 0} -> db:lbuffer uint8 len -> emBits:size_t -> Stack unit (requires fun h -> live h db) (ensures fun h0 _ h1 -> modifies (loc db) h0 h1 /\ as_seq h1 db == S.db_zero #(v len) (as_seq h0 db) (v emBits)) let db_zero len db emBits =
true
null
false
let msBits = emBits %. 8ul in if msBits >. 0ul then db.(0ul) <- db.(0ul) &. (u8 0xff >>. (8ul -. msBits))
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[]
[ "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_GreaterThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Lib.IntTypes.op_Greater_Dot", "FStar.UInt32.__uint_to_t", "Lib.Buffer.op_Array_Assignment", "Prims.unit", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Lib.IntTypes.op_Amp_Dot", "Lib.IntTypes.op_Greater_Greater_Dot", "Lib.IntTypes.u8", "Lib.IntTypes.op_Subtraction_Dot", "Lib.Buffer.op_Array_Access", "Lib.Buffer.MUT", "Prims.bool", "Lib.IntTypes.op_Percent_Dot" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length inline_for_extraction noextract let salt_len_t (a:Hash.fixed_len_alg) = saltLen:size_t{8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a} inline_for_extraction noextract let msg_len_t (a:Hash.fixed_len_alg) = msgLen:size_t{v msgLen `less_than_max_input_length` a} inline_for_extraction noextract let em_len_t (a:Hash.fixed_len_alg) (saltLen:salt_len_t a) = emBits:size_t{0 < v emBits /\ Hash.hash_length a + v saltLen + 2 <= S.blocks (v emBits) 8} inline_for_extraction noextract val xor_bytes: len:size_t{v len > 0} -> b1:lbuffer uint8 len -> b2:lbuffer uint8 len -> Stack unit (requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2) (ensures fun h0 _ h1 -> modifies (loc b1) h0 h1 /\ as_seq h1 b1 == S.xor_bytes (as_seq h0 b1) (as_seq h0 b2)) let xor_bytes len b1 b2 = map2T len b1 (fun x y -> x ^. y) b1 b2 inline_for_extraction noextract val db_zero: len:size_t{v len > 0} -> db:lbuffer uint8 len -> emBits:size_t -> Stack unit (requires fun h -> live h db) (ensures fun h0 _ h1 -> modifies (loc db) h0 h1 /\ as_seq h1 db == S.db_zero #(v len) (as_seq h0 db) (v emBits))
false
false
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val db_zero: len:size_t{v len > 0} -> db:lbuffer uint8 len -> emBits:size_t -> Stack unit (requires fun h -> live h db) (ensures fun h0 _ h1 -> modifies (loc db) h0 h1 /\ as_seq h1 db == S.db_zero #(v len) (as_seq h0 db) (v emBits))
[]
Hacl.Impl.RSAPSS.Padding.db_zero
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
len: Lib.IntTypes.size_t{Lib.IntTypes.v len > 0} -> db: Lib.Buffer.lbuffer Lib.IntTypes.uint8 len -> emBits: Lib.IntTypes.size_t -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 57, "end_line": 65, "start_col": 27, "start_line": 62 }
FStar.HyperStack.ST.Stack
val get_m1Hash: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h m1Hash /\ disjoint msg salt /\ disjoint m1Hash msg /\ disjoint m1Hash salt) (ensures fun h0 _ h1 -> modifies (loc m1Hash) h0 h1 /\ (let mHash = Hash.hash a (as_seq h0 msg) in let m1Len = 8 + Hash.hash_length a + v saltLen in let m1 = LSeq.create m1Len (u8 0) in let m1 = LSeq.update_sub m1 8 (Hash.hash_length a) mHash in let m1 = LSeq.update_sub m1 (8 + Hash.hash_length a) (v saltLen) (as_seq h0 salt) in as_seq h1 m1Hash == Hash.hash a m1))
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 get_m1Hash a saltLen salt msgLen msg hLen m1Hash = push_frame (); //m1 = [8 * 0x00; mHash; salt] let m1Len = 8ul +! hLen +! saltLen in let m1 = create m1Len (u8 0) in let h0 = ST.get () in update_sub_f h0 m1 8ul hLen (fun h -> Hash.hash a (as_seq h0 msg)) (fun _ -> hash a (sub m1 8ul hLen) msgLen msg); update_sub m1 (8ul +! hLen) saltLen salt; hash a m1Hash m1Len m1; pop_frame()
val get_m1Hash: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h m1Hash /\ disjoint msg salt /\ disjoint m1Hash msg /\ disjoint m1Hash salt) (ensures fun h0 _ h1 -> modifies (loc m1Hash) h0 h1 /\ (let mHash = Hash.hash a (as_seq h0 msg) in let m1Len = 8 + Hash.hash_length a + v saltLen in let m1 = LSeq.create m1Len (u8 0) in let m1 = LSeq.update_sub m1 8 (Hash.hash_length a) mHash in let m1 = LSeq.update_sub m1 (8 + Hash.hash_length a) (v saltLen) (as_seq h0 salt) in as_seq h1 m1Hash == Hash.hash a m1)) let get_m1Hash a saltLen salt msgLen msg hLen m1Hash =
true
null
false
push_frame (); let m1Len = 8ul +! hLen +! saltLen in let m1 = create m1Len (u8 0) in let h0 = ST.get () in update_sub_f h0 m1 8ul hLen (fun h -> Hash.hash a (as_seq h0 msg)) (fun _ -> hash a (sub m1 8ul hLen) msgLen msg); update_sub m1 (8ul +! hLen) saltLen salt; hash a m1Hash m1Len m1; pop_frame ()
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[]
[ "Spec.Hash.Definitions.hash_alg", "Prims.b2t", "Spec.RSAPSS.hash_is_supported", "Hacl.Impl.RSAPSS.Padding.salt_len_t", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Hacl.Impl.RSAPSS.Padding.msg_len_t", "Lib.IntTypes.size_t", "Prims.eq2", "Prims.int", "Prims.l_or", "Lib.IntTypes.range", "Lib.IntTypes.U32", "Prims.l_and", "Prims.op_GreaterThanOrEqual", "Prims.op_LessThanOrEqual", "Lib.IntTypes.max_size_t", "Prims.op_GreaterThan", "Lib.IntTypes.v", "Lib.IntTypes.PUB", "Spec.Hash.Definitions.hash_length", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Hacl.Impl.RSAPSS.MGF.hash", "Lib.Buffer.update_sub", "Lib.Buffer.MUT", "Lib.IntTypes.uint_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Lib.IntTypes.op_Plus_Bang", "FStar.UInt32.__uint_to_t", "Lib.Buffer.update_sub_f", "FStar.Monotonic.HyperStack.mem", "Spec.Agile.Hash.hash", "Lib.Buffer.as_seq", "Lib.Sequence.lseq", "Lib.Buffer.lbuffer_t", "Lib.IntTypes.int_t", "Hacl.Impl.RSAPSS.MGF.hash_len", "Lib.Buffer.sub", "FStar.HyperStack.ST.get", "Lib.Buffer.create", "Lib.IntTypes.u8", "FStar.HyperStack.ST.push_frame" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length inline_for_extraction noextract let salt_len_t (a:Hash.fixed_len_alg) = saltLen:size_t{8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a} inline_for_extraction noextract let msg_len_t (a:Hash.fixed_len_alg) = msgLen:size_t{v msgLen `less_than_max_input_length` a} inline_for_extraction noextract let em_len_t (a:Hash.fixed_len_alg) (saltLen:salt_len_t a) = emBits:size_t{0 < v emBits /\ Hash.hash_length a + v saltLen + 2 <= S.blocks (v emBits) 8} inline_for_extraction noextract val xor_bytes: len:size_t{v len > 0} -> b1:lbuffer uint8 len -> b2:lbuffer uint8 len -> Stack unit (requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2) (ensures fun h0 _ h1 -> modifies (loc b1) h0 h1 /\ as_seq h1 b1 == S.xor_bytes (as_seq h0 b1) (as_seq h0 b2)) let xor_bytes len b1 b2 = map2T len b1 (fun x y -> x ^. y) b1 b2 inline_for_extraction noextract val db_zero: len:size_t{v len > 0} -> db:lbuffer uint8 len -> emBits:size_t -> Stack unit (requires fun h -> live h db) (ensures fun h0 _ h1 -> modifies (loc db) h0 h1 /\ as_seq h1 db == S.db_zero #(v len) (as_seq h0 db) (v emBits)) let db_zero len db emBits = let msBits = emBits %. 8ul in if msBits >. 0ul then db.(0ul) <- db.(0ul) &. (u8 0xff >>. (8ul -. msBits)) inline_for_extraction noextract val get_m1Hash: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h m1Hash /\ disjoint msg salt /\ disjoint m1Hash msg /\ disjoint m1Hash salt) (ensures fun h0 _ h1 -> modifies (loc m1Hash) h0 h1 /\ (let mHash = Hash.hash a (as_seq h0 msg) in let m1Len = 8 + Hash.hash_length a + v saltLen in let m1 = LSeq.create m1Len (u8 0) in let m1 = LSeq.update_sub m1 8 (Hash.hash_length a) mHash in let m1 = LSeq.update_sub m1 (8 + Hash.hash_length a) (v saltLen) (as_seq h0 salt) in as_seq h1 m1Hash == Hash.hash a m1))
false
false
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val get_m1Hash: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h m1Hash /\ disjoint msg salt /\ disjoint m1Hash msg /\ disjoint m1Hash salt) (ensures fun h0 _ h1 -> modifies (loc m1Hash) h0 h1 /\ (let mHash = Hash.hash a (as_seq h0 msg) in let m1Len = 8 + Hash.hash_length a + v saltLen in let m1 = LSeq.create m1Len (u8 0) in let m1 = LSeq.update_sub m1 8 (Hash.hash_length a) mHash in let m1 = LSeq.update_sub m1 (8 + Hash.hash_length a) (v saltLen) (as_seq h0 salt) in as_seq h1 m1Hash == Hash.hash a m1))
[]
Hacl.Impl.RSAPSS.Padding.get_m1Hash
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} -> saltLen: Hacl.Impl.RSAPSS.Padding.salt_len_t a -> salt: Lib.Buffer.lbuffer Lib.IntTypes.uint8 saltLen -> msgLen: Hacl.Impl.RSAPSS.Padding.msg_len_t a -> msg: Lib.Buffer.lbuffer Lib.IntTypes.uint8 msgLen -> hLen: Lib.IntTypes.size_t{Lib.IntTypes.v hLen == Spec.Hash.Definitions.hash_length a} -> m1Hash: Lib.Buffer.lbuffer Lib.IntTypes.uint8 hLen -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 13, "end_line": 100, "start_col": 2, "start_line": 90 }
FStar.HyperStack.ST.Stack
val pss_verify: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:size_t{0 < v emBits} -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack bool (requires fun h -> live h msg /\ live h em /\ disjoint em msg) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.pss_verify a (v saltLen) (v msgLen) (as_seq h0 msg) (v emBits) (as_seq h0 em))
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 pss_verify a saltLen msgLen msg emBits em = let emLen = BD.blocks emBits 8ul in let msBits = emBits %. 8ul in let em_0 = if msBits >. 0ul then em.(0ul) &. (u8 0xff <<. msBits) else u8 0 in let em_last = em.(emLen -! 1ul) in if (emLen <. saltLen +! hash_len a +! 2ul) then false else begin if not (FStar.UInt8.(Lib.RawIntTypes.u8_to_UInt8 em_last =^ 0xbcuy) && FStar.UInt8.(Lib.RawIntTypes.u8_to_UInt8 em_0 =^ 0uy)) then false else pss_verify_ a saltLen msgLen msg emBits em end
val pss_verify: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:size_t{0 < v emBits} -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack bool (requires fun h -> live h msg /\ live h em /\ disjoint em msg) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.pss_verify a (v saltLen) (v msgLen) (as_seq h0 msg) (v emBits) (as_seq h0 em)) let pss_verify a saltLen msgLen msg emBits em =
true
null
false
let emLen = BD.blocks emBits 8ul in let msBits = emBits %. 8ul in let em_0 = if msBits >. 0ul then em.(0ul) &. (u8 0xff <<. msBits) else u8 0 in let em_last = em.(emLen -! 1ul) in if (emLen <. saltLen +! hash_len a +! 2ul) then false else if not (FStar.UInt8.(Lib.RawIntTypes.u8_to_UInt8 em_last =^ 0xbcuy) && FStar.UInt8.(Lib.RawIntTypes.u8_to_UInt8 em_0 =^ 0uy)) then false else pss_verify_ a saltLen msgLen msg emBits em
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[]
[ "Spec.Hash.Definitions.hash_alg", "Prims.b2t", "Spec.RSAPSS.hash_is_supported", "Hacl.Impl.RSAPSS.Padding.salt_len_t", "Hacl.Impl.RSAPSS.Padding.msg_len_t", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Lib.IntTypes.size_t", "Prims.op_LessThan", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Hacl.Bignum.Definitions.blocks", "FStar.UInt32.__uint_to_t", "Lib.IntTypes.op_Less_Dot", "Lib.IntTypes.op_Plus_Bang", "Hacl.Impl.RSAPSS.MGF.hash_len", "Prims.bool", "Prims.op_Negation", "Prims.op_AmpAmp", "FStar.UInt8.op_Equals_Hat", "Lib.RawIntTypes.u8_to_UInt8", "FStar.UInt8.__uint_to_t", "Hacl.Impl.RSAPSS.Padding.pss_verify_", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Lib.Buffer.op_Array_Access", "Lib.Buffer.MUT", "Lib.IntTypes.op_Subtraction_Bang", "Lib.IntTypes.op_Greater_Dot", "Lib.IntTypes.op_Amp_Dot", "Lib.IntTypes.op_Less_Less_Dot", "Lib.IntTypes.u8", "Lib.IntTypes.op_Percent_Dot", "Prims.eq2", "Prims.int", "Prims.l_or", "Lib.IntTypes.range", "Prims.l_and", "Prims.op_GreaterThan", "Prims.op_LessThanOrEqual", "Prims.op_Subtraction", "Prims.pow2", "Prims.op_Multiply", "FStar.UInt32.uint_to_t", "FStar.UInt32.t", "Hacl.Spec.Bignum.Definitions.blocks" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length inline_for_extraction noextract let salt_len_t (a:Hash.fixed_len_alg) = saltLen:size_t{8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a} inline_for_extraction noextract let msg_len_t (a:Hash.fixed_len_alg) = msgLen:size_t{v msgLen `less_than_max_input_length` a} inline_for_extraction noextract let em_len_t (a:Hash.fixed_len_alg) (saltLen:salt_len_t a) = emBits:size_t{0 < v emBits /\ Hash.hash_length a + v saltLen + 2 <= S.blocks (v emBits) 8} inline_for_extraction noextract val xor_bytes: len:size_t{v len > 0} -> b1:lbuffer uint8 len -> b2:lbuffer uint8 len -> Stack unit (requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2) (ensures fun h0 _ h1 -> modifies (loc b1) h0 h1 /\ as_seq h1 b1 == S.xor_bytes (as_seq h0 b1) (as_seq h0 b2)) let xor_bytes len b1 b2 = map2T len b1 (fun x y -> x ^. y) b1 b2 inline_for_extraction noextract val db_zero: len:size_t{v len > 0} -> db:lbuffer uint8 len -> emBits:size_t -> Stack unit (requires fun h -> live h db) (ensures fun h0 _ h1 -> modifies (loc db) h0 h1 /\ as_seq h1 db == S.db_zero #(v len) (as_seq h0 db) (v emBits)) let db_zero len db emBits = let msBits = emBits %. 8ul in if msBits >. 0ul then db.(0ul) <- db.(0ul) &. (u8 0xff >>. (8ul -. msBits)) inline_for_extraction noextract val get_m1Hash: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h m1Hash /\ disjoint msg salt /\ disjoint m1Hash msg /\ disjoint m1Hash salt) (ensures fun h0 _ h1 -> modifies (loc m1Hash) h0 h1 /\ (let mHash = Hash.hash a (as_seq h0 msg) in let m1Len = 8 + Hash.hash_length a + v saltLen in let m1 = LSeq.create m1Len (u8 0) in let m1 = LSeq.update_sub m1 8 (Hash.hash_length a) mHash in let m1 = LSeq.update_sub m1 (8 + Hash.hash_length a) (v saltLen) (as_seq h0 salt) in as_seq h1 m1Hash == Hash.hash a m1)) let get_m1Hash a saltLen salt msgLen msg hLen m1Hash = push_frame (); //m1 = [8 * 0x00; mHash; salt] let m1Len = 8ul +! hLen +! saltLen in let m1 = create m1Len (u8 0) in let h0 = ST.get () in update_sub_f h0 m1 8ul hLen (fun h -> Hash.hash a (as_seq h0 msg)) (fun _ -> hash a (sub m1 8ul hLen) msgLen msg); update_sub m1 (8ul +! hLen) saltLen salt; hash a m1Hash m1Len m1; pop_frame() inline_for_extraction noextract val get_maskedDB: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> emBits:em_len_t a saltLen -> dbLen:size_t{v dbLen == S.blocks (v emBits) 8 - Hash.hash_length a - 1} -> db_mask:lbuffer uint8 dbLen -> Stack unit (requires fun h -> live h salt /\ live h m1Hash /\ live h db_mask /\ disjoint m1Hash salt /\ disjoint m1Hash db_mask /\ disjoint db_mask salt /\ as_seq h db_mask == LSeq.create (v dbLen) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc db_mask) h0 h1 /\ (let emLen = S.blocks (v emBits) 8 in let dbLen = emLen - Hash.hash_length a - 1 in let db = LSeq.create dbLen (u8 0) in let last_before_salt = dbLen - v saltLen - 1 in let db = LSeq.upd db last_before_salt (u8 1) in let db = LSeq.update_sub db (last_before_salt + 1) (v saltLen) (as_seq h0 salt) in let dbMask = S.mgf_hash a (v hLen) (as_seq h0 m1Hash) dbLen in let maskedDB = S.xor_bytes db dbMask in let maskedDB = S.db_zero maskedDB (v emBits) in as_seq h1 db_mask == maskedDB)) let get_maskedDB a saltLen salt hLen m1Hash emBits dbLen db = push_frame (); //db = [0x00;..; 0x00; 0x01; salt] let last_before_salt = dbLen -! saltLen -! 1ul in db.(last_before_salt) <- u8 1; update_sub db (last_before_salt +! 1ul) saltLen salt; let dbMask = create dbLen (u8 0) in assert_norm (Hash.hash_length a + 4 <= max_size_t /\ (Hash.hash_length a + 4) `less_than_max_input_length` a); mgf_hash a hLen m1Hash dbLen dbMask; xor_bytes dbLen db dbMask; db_zero dbLen db emBits; pop_frame() val pss_encode: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h em /\ disjoint msg salt /\ disjoint em msg /\ disjoint em salt /\ as_seq h em == LSeq.create (S.blocks (v emBits) 8) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc em) h0 h1 /\ as_seq h1 em == S.pss_encode a (v saltLen) (as_seq h0 salt) (v msgLen) (as_seq h0 msg) (v emBits)) [@CInline] let pss_encode a saltLen salt msgLen msg emBits em = push_frame (); let hLen = hash_len a in let m1Hash = create hLen (u8 0) in get_m1Hash a saltLen salt msgLen msg hLen m1Hash; let emLen = BD.blocks emBits 8ul in let dbLen = emLen -! hLen -! 1ul in let db = create dbLen (u8 0) in get_maskedDB a saltLen salt hLen m1Hash emBits dbLen db; update_sub em 0ul dbLen db; update_sub em dbLen hLen m1Hash; em.(emLen -! 1ul) <- u8 0xbc; pop_frame() inline_for_extraction noextract val pss_verify_: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack bool (requires fun h -> live h msg /\ live h em /\ disjoint em msg) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.pss_verify_ a (v saltLen) (v msgLen) (as_seq h0 msg) (v emBits) (as_seq h0 em)) let pss_verify_ a saltLen msgLen msg emBits em = push_frame (); let emLen = BD.blocks emBits 8ul in let hLen = hash_len a in let m1Hash0 = create hLen (u8 0) in let dbLen = emLen -! hLen -! 1ul in let maskedDB = sub em 0ul dbLen in let m1Hash = sub em dbLen hLen in let dbMask = create dbLen (u8 0) in mgf_hash a hLen m1Hash dbLen dbMask; xor_bytes dbLen dbMask maskedDB; db_zero dbLen dbMask emBits; let padLen = emLen -! saltLen -! hLen -! 1ul in let pad2 = create padLen (u8 0) in pad2.(padLen -! 1ul) <- u8 0x01; let pad = sub dbMask 0ul padLen in let salt = sub dbMask padLen saltLen in let res = if not (Lib.ByteBuffer.lbytes_eq #padLen pad pad2) then false else begin get_m1Hash a saltLen salt msgLen msg hLen m1Hash0; Lib.ByteBuffer.lbytes_eq #hLen m1Hash0 m1Hash end in pop_frame (); res #set-options "--z3rlimit 300" val pss_verify: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:size_t{0 < v emBits} -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack bool (requires fun h -> live h msg /\ live h em /\ disjoint em msg) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.pss_verify a (v saltLen) (v msgLen) (as_seq h0 msg) (v emBits) (as_seq h0 em))
false
false
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 300, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pss_verify: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:size_t{0 < v emBits} -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack bool (requires fun h -> live h msg /\ live h em /\ disjoint em msg) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.pss_verify a (v saltLen) (v msgLen) (as_seq h0 msg) (v emBits) (as_seq h0 em))
[]
Hacl.Impl.RSAPSS.Padding.pss_verify
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} -> saltLen: Hacl.Impl.RSAPSS.Padding.salt_len_t a -> msgLen: Hacl.Impl.RSAPSS.Padding.msg_len_t a -> msg: Lib.Buffer.lbuffer Lib.IntTypes.uint8 msgLen -> emBits: Lib.IntTypes.size_t{0 < Lib.IntTypes.v emBits} -> em: Lib.Buffer.lbuffer Lib.IntTypes.uint8 (Hacl.Bignum.Definitions.blocks emBits 8ul) -> FStar.HyperStack.ST.Stack Prims.bool
{ "end_col": 55, "end_line": 250, "start_col": 47, "start_line": 239 }
FStar.HyperStack.ST.Stack
val get_maskedDB: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> emBits:em_len_t a saltLen -> dbLen:size_t{v dbLen == S.blocks (v emBits) 8 - Hash.hash_length a - 1} -> db_mask:lbuffer uint8 dbLen -> Stack unit (requires fun h -> live h salt /\ live h m1Hash /\ live h db_mask /\ disjoint m1Hash salt /\ disjoint m1Hash db_mask /\ disjoint db_mask salt /\ as_seq h db_mask == LSeq.create (v dbLen) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc db_mask) h0 h1 /\ (let emLen = S.blocks (v emBits) 8 in let dbLen = emLen - Hash.hash_length a - 1 in let db = LSeq.create dbLen (u8 0) in let last_before_salt = dbLen - v saltLen - 1 in let db = LSeq.upd db last_before_salt (u8 1) in let db = LSeq.update_sub db (last_before_salt + 1) (v saltLen) (as_seq h0 salt) in let dbMask = S.mgf_hash a (v hLen) (as_seq h0 m1Hash) dbLen in let maskedDB = S.xor_bytes db dbMask in let maskedDB = S.db_zero maskedDB (v emBits) in as_seq h1 db_mask == maskedDB))
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 get_maskedDB a saltLen salt hLen m1Hash emBits dbLen db = push_frame (); //db = [0x00;..; 0x00; 0x01; salt] let last_before_salt = dbLen -! saltLen -! 1ul in db.(last_before_salt) <- u8 1; update_sub db (last_before_salt +! 1ul) saltLen salt; let dbMask = create dbLen (u8 0) in assert_norm (Hash.hash_length a + 4 <= max_size_t /\ (Hash.hash_length a + 4) `less_than_max_input_length` a); mgf_hash a hLen m1Hash dbLen dbMask; xor_bytes dbLen db dbMask; db_zero dbLen db emBits; pop_frame()
val get_maskedDB: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> emBits:em_len_t a saltLen -> dbLen:size_t{v dbLen == S.blocks (v emBits) 8 - Hash.hash_length a - 1} -> db_mask:lbuffer uint8 dbLen -> Stack unit (requires fun h -> live h salt /\ live h m1Hash /\ live h db_mask /\ disjoint m1Hash salt /\ disjoint m1Hash db_mask /\ disjoint db_mask salt /\ as_seq h db_mask == LSeq.create (v dbLen) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc db_mask) h0 h1 /\ (let emLen = S.blocks (v emBits) 8 in let dbLen = emLen - Hash.hash_length a - 1 in let db = LSeq.create dbLen (u8 0) in let last_before_salt = dbLen - v saltLen - 1 in let db = LSeq.upd db last_before_salt (u8 1) in let db = LSeq.update_sub db (last_before_salt + 1) (v saltLen) (as_seq h0 salt) in let dbMask = S.mgf_hash a (v hLen) (as_seq h0 m1Hash) dbLen in let maskedDB = S.xor_bytes db dbMask in let maskedDB = S.db_zero maskedDB (v emBits) in as_seq h1 db_mask == maskedDB)) let get_maskedDB a saltLen salt hLen m1Hash emBits dbLen db =
true
null
false
push_frame (); let last_before_salt = dbLen -! saltLen -! 1ul in db.(last_before_salt) <- u8 1; update_sub db (last_before_salt +! 1ul) saltLen salt; let dbMask = create dbLen (u8 0) in assert_norm (Hash.hash_length a + 4 <= max_size_t /\ (Hash.hash_length a + 4) `less_than_max_input_length` a); mgf_hash a hLen m1Hash dbLen dbMask; xor_bytes dbLen db dbMask; db_zero dbLen db emBits; pop_frame ()
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[]
[ "Spec.Hash.Definitions.hash_alg", "Prims.b2t", "Spec.RSAPSS.hash_is_supported", "Hacl.Impl.RSAPSS.Padding.salt_len_t", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Lib.IntTypes.size_t", "Prims.eq2", "Prims.int", "Prims.l_or", "Lib.IntTypes.range", "Lib.IntTypes.U32", "Prims.l_and", "Prims.op_GreaterThanOrEqual", "Prims.op_LessThanOrEqual", "Lib.IntTypes.max_size_t", "Prims.op_GreaterThan", "Lib.IntTypes.v", "Lib.IntTypes.PUB", "Spec.Hash.Definitions.hash_length", "Hacl.Impl.RSAPSS.Padding.em_len_t", "Prims.op_Subtraction", "Spec.RSAPSS.blocks", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Hacl.Impl.RSAPSS.Padding.db_zero", "Hacl.Impl.RSAPSS.Padding.xor_bytes", "Hacl.Impl.RSAPSS.MGF.mgf_hash", "FStar.Pervasives.assert_norm", "Prims.op_Addition", "Hacl.Impl.RSAPSS.Padding.less_than_max_input_length", "Lib.Buffer.lbuffer_t", "Lib.Buffer.MUT", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Lib.Buffer.create", "Lib.IntTypes.u8", "Lib.Buffer.update_sub", "Lib.IntTypes.op_Plus_Bang", "FStar.UInt32.__uint_to_t", "Lib.Buffer.op_Array_Assignment", "Lib.IntTypes.op_Subtraction_Bang", "FStar.HyperStack.ST.push_frame" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length inline_for_extraction noextract let salt_len_t (a:Hash.fixed_len_alg) = saltLen:size_t{8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a} inline_for_extraction noextract let msg_len_t (a:Hash.fixed_len_alg) = msgLen:size_t{v msgLen `less_than_max_input_length` a} inline_for_extraction noextract let em_len_t (a:Hash.fixed_len_alg) (saltLen:salt_len_t a) = emBits:size_t{0 < v emBits /\ Hash.hash_length a + v saltLen + 2 <= S.blocks (v emBits) 8} inline_for_extraction noextract val xor_bytes: len:size_t{v len > 0} -> b1:lbuffer uint8 len -> b2:lbuffer uint8 len -> Stack unit (requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2) (ensures fun h0 _ h1 -> modifies (loc b1) h0 h1 /\ as_seq h1 b1 == S.xor_bytes (as_seq h0 b1) (as_seq h0 b2)) let xor_bytes len b1 b2 = map2T len b1 (fun x y -> x ^. y) b1 b2 inline_for_extraction noextract val db_zero: len:size_t{v len > 0} -> db:lbuffer uint8 len -> emBits:size_t -> Stack unit (requires fun h -> live h db) (ensures fun h0 _ h1 -> modifies (loc db) h0 h1 /\ as_seq h1 db == S.db_zero #(v len) (as_seq h0 db) (v emBits)) let db_zero len db emBits = let msBits = emBits %. 8ul in if msBits >. 0ul then db.(0ul) <- db.(0ul) &. (u8 0xff >>. (8ul -. msBits)) inline_for_extraction noextract val get_m1Hash: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h m1Hash /\ disjoint msg salt /\ disjoint m1Hash msg /\ disjoint m1Hash salt) (ensures fun h0 _ h1 -> modifies (loc m1Hash) h0 h1 /\ (let mHash = Hash.hash a (as_seq h0 msg) in let m1Len = 8 + Hash.hash_length a + v saltLen in let m1 = LSeq.create m1Len (u8 0) in let m1 = LSeq.update_sub m1 8 (Hash.hash_length a) mHash in let m1 = LSeq.update_sub m1 (8 + Hash.hash_length a) (v saltLen) (as_seq h0 salt) in as_seq h1 m1Hash == Hash.hash a m1)) let get_m1Hash a saltLen salt msgLen msg hLen m1Hash = push_frame (); //m1 = [8 * 0x00; mHash; salt] let m1Len = 8ul +! hLen +! saltLen in let m1 = create m1Len (u8 0) in let h0 = ST.get () in update_sub_f h0 m1 8ul hLen (fun h -> Hash.hash a (as_seq h0 msg)) (fun _ -> hash a (sub m1 8ul hLen) msgLen msg); update_sub m1 (8ul +! hLen) saltLen salt; hash a m1Hash m1Len m1; pop_frame() inline_for_extraction noextract val get_maskedDB: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> emBits:em_len_t a saltLen -> dbLen:size_t{v dbLen == S.blocks (v emBits) 8 - Hash.hash_length a - 1} -> db_mask:lbuffer uint8 dbLen -> Stack unit (requires fun h -> live h salt /\ live h m1Hash /\ live h db_mask /\ disjoint m1Hash salt /\ disjoint m1Hash db_mask /\ disjoint db_mask salt /\ as_seq h db_mask == LSeq.create (v dbLen) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc db_mask) h0 h1 /\ (let emLen = S.blocks (v emBits) 8 in let dbLen = emLen - Hash.hash_length a - 1 in let db = LSeq.create dbLen (u8 0) in let last_before_salt = dbLen - v saltLen - 1 in let db = LSeq.upd db last_before_salt (u8 1) in let db = LSeq.update_sub db (last_before_salt + 1) (v saltLen) (as_seq h0 salt) in let dbMask = S.mgf_hash a (v hLen) (as_seq h0 m1Hash) dbLen in let maskedDB = S.xor_bytes db dbMask in let maskedDB = S.db_zero maskedDB (v emBits) in as_seq h1 db_mask == maskedDB))
false
false
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val get_maskedDB: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> emBits:em_len_t a saltLen -> dbLen:size_t{v dbLen == S.blocks (v emBits) 8 - Hash.hash_length a - 1} -> db_mask:lbuffer uint8 dbLen -> Stack unit (requires fun h -> live h salt /\ live h m1Hash /\ live h db_mask /\ disjoint m1Hash salt /\ disjoint m1Hash db_mask /\ disjoint db_mask salt /\ as_seq h db_mask == LSeq.create (v dbLen) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc db_mask) h0 h1 /\ (let emLen = S.blocks (v emBits) 8 in let dbLen = emLen - Hash.hash_length a - 1 in let db = LSeq.create dbLen (u8 0) in let last_before_salt = dbLen - v saltLen - 1 in let db = LSeq.upd db last_before_salt (u8 1) in let db = LSeq.update_sub db (last_before_salt + 1) (v saltLen) (as_seq h0 salt) in let dbMask = S.mgf_hash a (v hLen) (as_seq h0 m1Hash) dbLen in let maskedDB = S.xor_bytes db dbMask in let maskedDB = S.db_zero maskedDB (v emBits) in as_seq h1 db_mask == maskedDB))
[]
Hacl.Impl.RSAPSS.Padding.get_maskedDB
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} -> saltLen: Hacl.Impl.RSAPSS.Padding.salt_len_t a -> salt: Lib.Buffer.lbuffer Lib.IntTypes.uint8 saltLen -> hLen: Lib.IntTypes.size_t{Lib.IntTypes.v hLen == Spec.Hash.Definitions.hash_length a} -> m1Hash: Lib.Buffer.lbuffer Lib.IntTypes.uint8 hLen -> emBits: Hacl.Impl.RSAPSS.Padding.em_len_t a saltLen -> dbLen: Lib.IntTypes.size_t { Lib.IntTypes.v dbLen == Spec.RSAPSS.blocks (Lib.IntTypes.v emBits) 8 - Spec.Hash.Definitions.hash_length a - 1 } -> db_mask: Lib.Buffer.lbuffer Lib.IntTypes.uint8 dbLen -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 13, "end_line": 143, "start_col": 2, "start_line": 132 }
FStar.HyperStack.ST.Stack
val pss_encode: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h em /\ disjoint msg salt /\ disjoint em msg /\ disjoint em salt /\ as_seq h em == LSeq.create (S.blocks (v emBits) 8) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc em) h0 h1 /\ as_seq h1 em == S.pss_encode a (v saltLen) (as_seq h0 salt) (v msgLen) (as_seq h0 msg) (v emBits))
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 pss_encode a saltLen salt msgLen msg emBits em = push_frame (); let hLen = hash_len a in let m1Hash = create hLen (u8 0) in get_m1Hash a saltLen salt msgLen msg hLen m1Hash; let emLen = BD.blocks emBits 8ul in let dbLen = emLen -! hLen -! 1ul in let db = create dbLen (u8 0) in get_maskedDB a saltLen salt hLen m1Hash emBits dbLen db; update_sub em 0ul dbLen db; update_sub em dbLen hLen m1Hash; em.(emLen -! 1ul) <- u8 0xbc; pop_frame()
val pss_encode: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h em /\ disjoint msg salt /\ disjoint em msg /\ disjoint em salt /\ as_seq h em == LSeq.create (S.blocks (v emBits) 8) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc em) h0 h1 /\ as_seq h1 em == S.pss_encode a (v saltLen) (as_seq h0 salt) (v msgLen) (as_seq h0 msg) (v emBits)) let pss_encode a saltLen salt msgLen msg emBits em =
true
null
false
push_frame (); let hLen = hash_len a in let m1Hash = create hLen (u8 0) in get_m1Hash a saltLen salt msgLen msg hLen m1Hash; let emLen = BD.blocks emBits 8ul in let dbLen = emLen -! hLen -! 1ul in let db = create dbLen (u8 0) in get_maskedDB a saltLen salt hLen m1Hash emBits dbLen db; update_sub em 0ul dbLen db; update_sub em dbLen hLen m1Hash; em.(emLen -! 1ul) <- u8 0xbc; pop_frame ()
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[]
[ "Spec.Hash.Definitions.hash_alg", "Prims.b2t", "Spec.RSAPSS.hash_is_supported", "Hacl.Impl.RSAPSS.Padding.salt_len_t", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Hacl.Impl.RSAPSS.Padding.msg_len_t", "Hacl.Impl.RSAPSS.Padding.em_len_t", "Hacl.Bignum.Definitions.blocks", "FStar.UInt32.__uint_to_t", "FStar.HyperStack.ST.pop_frame", "Prims.unit", "Lib.Buffer.op_Array_Assignment", "Lib.IntTypes.op_Subtraction_Bang", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.IntTypes.u8", "Lib.Buffer.update_sub", "Lib.Buffer.MUT", "Hacl.Impl.RSAPSS.Padding.get_maskedDB", "Lib.Buffer.lbuffer_t", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Lib.Buffer.create", "Prims.eq2", "Prims.int", "Prims.l_or", "Lib.IntTypes.range", "Prims.l_and", "Prims.op_GreaterThan", "Prims.op_LessThanOrEqual", "Prims.op_Subtraction", "Prims.pow2", "Lib.IntTypes.v", "Prims.op_Multiply", "FStar.UInt32.uint_to_t", "FStar.UInt32.t", "Hacl.Spec.Bignum.Definitions.blocks", "Hacl.Impl.RSAPSS.Padding.get_m1Hash", "Prims.op_GreaterThanOrEqual", "Spec.Hash.Definitions.hash_length", "Hacl.Impl.RSAPSS.MGF.hash_len", "FStar.HyperStack.ST.push_frame" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length inline_for_extraction noextract let salt_len_t (a:Hash.fixed_len_alg) = saltLen:size_t{8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a} inline_for_extraction noextract let msg_len_t (a:Hash.fixed_len_alg) = msgLen:size_t{v msgLen `less_than_max_input_length` a} inline_for_extraction noextract let em_len_t (a:Hash.fixed_len_alg) (saltLen:salt_len_t a) = emBits:size_t{0 < v emBits /\ Hash.hash_length a + v saltLen + 2 <= S.blocks (v emBits) 8} inline_for_extraction noextract val xor_bytes: len:size_t{v len > 0} -> b1:lbuffer uint8 len -> b2:lbuffer uint8 len -> Stack unit (requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2) (ensures fun h0 _ h1 -> modifies (loc b1) h0 h1 /\ as_seq h1 b1 == S.xor_bytes (as_seq h0 b1) (as_seq h0 b2)) let xor_bytes len b1 b2 = map2T len b1 (fun x y -> x ^. y) b1 b2 inline_for_extraction noextract val db_zero: len:size_t{v len > 0} -> db:lbuffer uint8 len -> emBits:size_t -> Stack unit (requires fun h -> live h db) (ensures fun h0 _ h1 -> modifies (loc db) h0 h1 /\ as_seq h1 db == S.db_zero #(v len) (as_seq h0 db) (v emBits)) let db_zero len db emBits = let msBits = emBits %. 8ul in if msBits >. 0ul then db.(0ul) <- db.(0ul) &. (u8 0xff >>. (8ul -. msBits)) inline_for_extraction noextract val get_m1Hash: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h m1Hash /\ disjoint msg salt /\ disjoint m1Hash msg /\ disjoint m1Hash salt) (ensures fun h0 _ h1 -> modifies (loc m1Hash) h0 h1 /\ (let mHash = Hash.hash a (as_seq h0 msg) in let m1Len = 8 + Hash.hash_length a + v saltLen in let m1 = LSeq.create m1Len (u8 0) in let m1 = LSeq.update_sub m1 8 (Hash.hash_length a) mHash in let m1 = LSeq.update_sub m1 (8 + Hash.hash_length a) (v saltLen) (as_seq h0 salt) in as_seq h1 m1Hash == Hash.hash a m1)) let get_m1Hash a saltLen salt msgLen msg hLen m1Hash = push_frame (); //m1 = [8 * 0x00; mHash; salt] let m1Len = 8ul +! hLen +! saltLen in let m1 = create m1Len (u8 0) in let h0 = ST.get () in update_sub_f h0 m1 8ul hLen (fun h -> Hash.hash a (as_seq h0 msg)) (fun _ -> hash a (sub m1 8ul hLen) msgLen msg); update_sub m1 (8ul +! hLen) saltLen salt; hash a m1Hash m1Len m1; pop_frame() inline_for_extraction noextract val get_maskedDB: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> emBits:em_len_t a saltLen -> dbLen:size_t{v dbLen == S.blocks (v emBits) 8 - Hash.hash_length a - 1} -> db_mask:lbuffer uint8 dbLen -> Stack unit (requires fun h -> live h salt /\ live h m1Hash /\ live h db_mask /\ disjoint m1Hash salt /\ disjoint m1Hash db_mask /\ disjoint db_mask salt /\ as_seq h db_mask == LSeq.create (v dbLen) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc db_mask) h0 h1 /\ (let emLen = S.blocks (v emBits) 8 in let dbLen = emLen - Hash.hash_length a - 1 in let db = LSeq.create dbLen (u8 0) in let last_before_salt = dbLen - v saltLen - 1 in let db = LSeq.upd db last_before_salt (u8 1) in let db = LSeq.update_sub db (last_before_salt + 1) (v saltLen) (as_seq h0 salt) in let dbMask = S.mgf_hash a (v hLen) (as_seq h0 m1Hash) dbLen in let maskedDB = S.xor_bytes db dbMask in let maskedDB = S.db_zero maskedDB (v emBits) in as_seq h1 db_mask == maskedDB)) let get_maskedDB a saltLen salt hLen m1Hash emBits dbLen db = push_frame (); //db = [0x00;..; 0x00; 0x01; salt] let last_before_salt = dbLen -! saltLen -! 1ul in db.(last_before_salt) <- u8 1; update_sub db (last_before_salt +! 1ul) saltLen salt; let dbMask = create dbLen (u8 0) in assert_norm (Hash.hash_length a + 4 <= max_size_t /\ (Hash.hash_length a + 4) `less_than_max_input_length` a); mgf_hash a hLen m1Hash dbLen dbMask; xor_bytes dbLen db dbMask; db_zero dbLen db emBits; pop_frame() val pss_encode: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h em /\ disjoint msg salt /\ disjoint em msg /\ disjoint em salt /\ as_seq h em == LSeq.create (S.blocks (v emBits) 8) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc em) h0 h1 /\ as_seq h1 em == S.pss_encode a (v saltLen) (as_seq h0 salt) (v msgLen) (as_seq h0 msg) (v emBits)) [@CInline]
false
false
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pss_encode: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h em /\ disjoint msg salt /\ disjoint em msg /\ disjoint em salt /\ as_seq h em == LSeq.create (S.blocks (v emBits) 8) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc em) h0 h1 /\ as_seq h1 em == S.pss_encode a (v saltLen) (as_seq h0 salt) (v msgLen) (as_seq h0 msg) (v emBits))
[]
Hacl.Impl.RSAPSS.Padding.pss_encode
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} -> saltLen: Hacl.Impl.RSAPSS.Padding.salt_len_t a -> salt: Lib.Buffer.lbuffer Lib.IntTypes.uint8 saltLen -> msgLen: Hacl.Impl.RSAPSS.Padding.msg_len_t a -> msg: Lib.Buffer.lbuffer Lib.IntTypes.uint8 msgLen -> emBits: Hacl.Impl.RSAPSS.Padding.em_len_t a saltLen -> em: Lib.Buffer.lbuffer Lib.IntTypes.uint8 (Hacl.Bignum.Definitions.blocks emBits 8ul) -> FStar.HyperStack.ST.Stack Prims.unit
{ "end_col": 13, "end_line": 177, "start_col": 2, "start_line": 164 }
FStar.HyperStack.ST.Stack
val pss_verify_: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack bool (requires fun h -> live h msg /\ live h em /\ disjoint em msg) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.pss_verify_ a (v saltLen) (v msgLen) (as_seq h0 msg) (v emBits) (as_seq h0 em))
[ { "abbrev": true, "full_module": "Hacl.Bignum.Definitions", "short_module": "BD" }, { "abbrev": true, "full_module": "Spec.RSAPSS", "short_module": "S" }, { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Hash" }, { "abbrev": true, "full_module": "Lib.Sequence", "short_module": "LSeq" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS.MGF", "short_module": null }, { "abbrev": false, "full_module": "Lib.Buffer", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Impl.RSAPSS", "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 pss_verify_ a saltLen msgLen msg emBits em = push_frame (); let emLen = BD.blocks emBits 8ul in let hLen = hash_len a in let m1Hash0 = create hLen (u8 0) in let dbLen = emLen -! hLen -! 1ul in let maskedDB = sub em 0ul dbLen in let m1Hash = sub em dbLen hLen in let dbMask = create dbLen (u8 0) in mgf_hash a hLen m1Hash dbLen dbMask; xor_bytes dbLen dbMask maskedDB; db_zero dbLen dbMask emBits; let padLen = emLen -! saltLen -! hLen -! 1ul in let pad2 = create padLen (u8 0) in pad2.(padLen -! 1ul) <- u8 0x01; let pad = sub dbMask 0ul padLen in let salt = sub dbMask padLen saltLen in let res = if not (Lib.ByteBuffer.lbytes_eq #padLen pad pad2) then false else begin get_m1Hash a saltLen salt msgLen msg hLen m1Hash0; Lib.ByteBuffer.lbytes_eq #hLen m1Hash0 m1Hash end in pop_frame (); res
val pss_verify_: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack bool (requires fun h -> live h msg /\ live h em /\ disjoint em msg) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.pss_verify_ a (v saltLen) (v msgLen) (as_seq h0 msg) (v emBits) (as_seq h0 em)) let pss_verify_ a saltLen msgLen msg emBits em =
true
null
false
push_frame (); let emLen = BD.blocks emBits 8ul in let hLen = hash_len a in let m1Hash0 = create hLen (u8 0) in let dbLen = emLen -! hLen -! 1ul in let maskedDB = sub em 0ul dbLen in let m1Hash = sub em dbLen hLen in let dbMask = create dbLen (u8 0) in mgf_hash a hLen m1Hash dbLen dbMask; xor_bytes dbLen dbMask maskedDB; db_zero dbLen dbMask emBits; let padLen = emLen -! saltLen -! hLen -! 1ul in let pad2 = create padLen (u8 0) in pad2.(padLen -! 1ul) <- u8 0x01; let pad = sub dbMask 0ul padLen in let salt = sub dbMask padLen saltLen in let res = if not (Lib.ByteBuffer.lbytes_eq #padLen pad pad2) then false else (get_m1Hash a saltLen salt msgLen msg hLen m1Hash0; Lib.ByteBuffer.lbytes_eq #hLen m1Hash0 m1Hash) in pop_frame (); res
{ "checked_file": "Hacl.Impl.RSAPSS.Padding.fst.checked", "dependencies": [ "Spec.RSAPSS.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.IntTypes.fsti.checked", "Lib.ByteBuffer.fsti.checked", "Lib.Buffer.fsti.checked", "Hacl.Impl.RSAPSS.MGF.fst.checked", "Hacl.Bignum.Definitions.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked" ], "interface_file": false, "source_file": "Hacl.Impl.RSAPSS.Padding.fst" }
[]
[ "Spec.Hash.Definitions.hash_alg", "Prims.b2t", "Spec.RSAPSS.hash_is_supported", "Hacl.Impl.RSAPSS.Padding.salt_len_t", "Hacl.Impl.RSAPSS.Padding.msg_len_t", "Lib.Buffer.lbuffer", "Lib.IntTypes.uint8", "Hacl.Impl.RSAPSS.Padding.em_len_t", "Hacl.Bignum.Definitions.blocks", "FStar.UInt32.__uint_to_t", "Prims.bool", "Prims.unit", "FStar.HyperStack.ST.pop_frame", "Lib.ByteBuffer.lbytes_eq", "Hacl.Impl.RSAPSS.Padding.get_m1Hash", "Prims.op_Negation", "Lib.Buffer.lbuffer_t", "Lib.Buffer.MUT", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Lib.Buffer.sub", "Lib.Buffer.op_Array_Assignment", "Lib.IntTypes.op_Subtraction_Bang", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.IntTypes.u8", "Lib.Buffer.create", "Hacl.Impl.RSAPSS.Padding.db_zero", "Hacl.Impl.RSAPSS.Padding.xor_bytes", "Hacl.Impl.RSAPSS.MGF.mgf_hash", "Prims.eq2", "Prims.int", "Prims.l_or", "Lib.IntTypes.range", "Prims.l_and", "Prims.op_GreaterThanOrEqual", "Prims.op_LessThanOrEqual", "Prims.op_Subtraction", "Prims.pow2", "Prims.op_GreaterThan", "Lib.IntTypes.v", "Spec.Hash.Definitions.hash_length", "Hacl.Impl.RSAPSS.MGF.hash_len", "Prims.op_Multiply", "FStar.UInt32.uint_to_t", "FStar.UInt32.t", "Hacl.Spec.Bignum.Definitions.blocks", "FStar.HyperStack.ST.push_frame" ]
[]
module Hacl.Impl.RSAPSS.Padding open FStar.HyperStack open FStar.HyperStack.ST open FStar.Mul open Lib.IntTypes open Lib.Buffer open Hacl.Impl.RSAPSS.MGF module ST = FStar.HyperStack.ST module LSeq = Lib.Sequence module Hash = Spec.Agile.Hash module S = Spec.RSAPSS module BD = Hacl.Bignum.Definitions #reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" inline_for_extraction noextract let less_than_max_input_length = Spec.Hash.Definitions.less_than_max_input_length inline_for_extraction noextract let salt_len_t (a:Hash.fixed_len_alg) = saltLen:size_t{8 + Hash.hash_length a + v saltLen <= max_size_t /\ (8 + Hash.hash_length a + v saltLen) `less_than_max_input_length` a} inline_for_extraction noextract let msg_len_t (a:Hash.fixed_len_alg) = msgLen:size_t{v msgLen `less_than_max_input_length` a} inline_for_extraction noextract let em_len_t (a:Hash.fixed_len_alg) (saltLen:salt_len_t a) = emBits:size_t{0 < v emBits /\ Hash.hash_length a + v saltLen + 2 <= S.blocks (v emBits) 8} inline_for_extraction noextract val xor_bytes: len:size_t{v len > 0} -> b1:lbuffer uint8 len -> b2:lbuffer uint8 len -> Stack unit (requires fun h -> live h b1 /\ live h b2 /\ disjoint b1 b2) (ensures fun h0 _ h1 -> modifies (loc b1) h0 h1 /\ as_seq h1 b1 == S.xor_bytes (as_seq h0 b1) (as_seq h0 b2)) let xor_bytes len b1 b2 = map2T len b1 (fun x y -> x ^. y) b1 b2 inline_for_extraction noextract val db_zero: len:size_t{v len > 0} -> db:lbuffer uint8 len -> emBits:size_t -> Stack unit (requires fun h -> live h db) (ensures fun h0 _ h1 -> modifies (loc db) h0 h1 /\ as_seq h1 db == S.db_zero #(v len) (as_seq h0 db) (v emBits)) let db_zero len db emBits = let msBits = emBits %. 8ul in if msBits >. 0ul then db.(0ul) <- db.(0ul) &. (u8 0xff >>. (8ul -. msBits)) inline_for_extraction noextract val get_m1Hash: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h m1Hash /\ disjoint msg salt /\ disjoint m1Hash msg /\ disjoint m1Hash salt) (ensures fun h0 _ h1 -> modifies (loc m1Hash) h0 h1 /\ (let mHash = Hash.hash a (as_seq h0 msg) in let m1Len = 8 + Hash.hash_length a + v saltLen in let m1 = LSeq.create m1Len (u8 0) in let m1 = LSeq.update_sub m1 8 (Hash.hash_length a) mHash in let m1 = LSeq.update_sub m1 (8 + Hash.hash_length a) (v saltLen) (as_seq h0 salt) in as_seq h1 m1Hash == Hash.hash a m1)) let get_m1Hash a saltLen salt msgLen msg hLen m1Hash = push_frame (); //m1 = [8 * 0x00; mHash; salt] let m1Len = 8ul +! hLen +! saltLen in let m1 = create m1Len (u8 0) in let h0 = ST.get () in update_sub_f h0 m1 8ul hLen (fun h -> Hash.hash a (as_seq h0 msg)) (fun _ -> hash a (sub m1 8ul hLen) msgLen msg); update_sub m1 (8ul +! hLen) saltLen salt; hash a m1Hash m1Len m1; pop_frame() inline_for_extraction noextract val get_maskedDB: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> hLen:size_t{v hLen == Hash.hash_length a} -> m1Hash:lbuffer uint8 hLen -> emBits:em_len_t a saltLen -> dbLen:size_t{v dbLen == S.blocks (v emBits) 8 - Hash.hash_length a - 1} -> db_mask:lbuffer uint8 dbLen -> Stack unit (requires fun h -> live h salt /\ live h m1Hash /\ live h db_mask /\ disjoint m1Hash salt /\ disjoint m1Hash db_mask /\ disjoint db_mask salt /\ as_seq h db_mask == LSeq.create (v dbLen) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc db_mask) h0 h1 /\ (let emLen = S.blocks (v emBits) 8 in let dbLen = emLen - Hash.hash_length a - 1 in let db = LSeq.create dbLen (u8 0) in let last_before_salt = dbLen - v saltLen - 1 in let db = LSeq.upd db last_before_salt (u8 1) in let db = LSeq.update_sub db (last_before_salt + 1) (v saltLen) (as_seq h0 salt) in let dbMask = S.mgf_hash a (v hLen) (as_seq h0 m1Hash) dbLen in let maskedDB = S.xor_bytes db dbMask in let maskedDB = S.db_zero maskedDB (v emBits) in as_seq h1 db_mask == maskedDB)) let get_maskedDB a saltLen salt hLen m1Hash emBits dbLen db = push_frame (); //db = [0x00;..; 0x00; 0x01; salt] let last_before_salt = dbLen -! saltLen -! 1ul in db.(last_before_salt) <- u8 1; update_sub db (last_before_salt +! 1ul) saltLen salt; let dbMask = create dbLen (u8 0) in assert_norm (Hash.hash_length a + 4 <= max_size_t /\ (Hash.hash_length a + 4) `less_than_max_input_length` a); mgf_hash a hLen m1Hash dbLen dbMask; xor_bytes dbLen db dbMask; db_zero dbLen db emBits; pop_frame() val pss_encode: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> salt:lbuffer uint8 saltLen -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack unit (requires fun h -> live h salt /\ live h msg /\ live h em /\ disjoint msg salt /\ disjoint em msg /\ disjoint em salt /\ as_seq h em == LSeq.create (S.blocks (v emBits) 8) (u8 0)) (ensures fun h0 _ h1 -> modifies (loc em) h0 h1 /\ as_seq h1 em == S.pss_encode a (v saltLen) (as_seq h0 salt) (v msgLen) (as_seq h0 msg) (v emBits)) [@CInline] let pss_encode a saltLen salt msgLen msg emBits em = push_frame (); let hLen = hash_len a in let m1Hash = create hLen (u8 0) in get_m1Hash a saltLen salt msgLen msg hLen m1Hash; let emLen = BD.blocks emBits 8ul in let dbLen = emLen -! hLen -! 1ul in let db = create dbLen (u8 0) in get_maskedDB a saltLen salt hLen m1Hash emBits dbLen db; update_sub em 0ul dbLen db; update_sub em dbLen hLen m1Hash; em.(emLen -! 1ul) <- u8 0xbc; pop_frame() inline_for_extraction noextract val pss_verify_: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack bool (requires fun h -> live h msg /\ live h em /\ disjoint em msg) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.pss_verify_ a (v saltLen) (v msgLen) (as_seq h0 msg) (v emBits) (as_seq h0 em))
false
false
Hacl.Impl.RSAPSS.Padding.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pss_verify_: a:Hash.hash_alg{S.hash_is_supported a} -> saltLen:salt_len_t a -> msgLen:msg_len_t a -> msg:lbuffer uint8 msgLen -> emBits:em_len_t a saltLen -> em:lbuffer uint8 (BD.blocks emBits 8ul) -> Stack bool (requires fun h -> live h msg /\ live h em /\ disjoint em msg) (ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.pss_verify_ a (v saltLen) (v msgLen) (as_seq h0 msg) (v emBits) (as_seq h0 em))
[]
Hacl.Impl.RSAPSS.Padding.pss_verify_
{ "file_name": "code/rsapss/Hacl.Impl.RSAPSS.Padding.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} -> saltLen: Hacl.Impl.RSAPSS.Padding.salt_len_t a -> msgLen: Hacl.Impl.RSAPSS.Padding.msg_len_t a -> msg: Lib.Buffer.lbuffer Lib.IntTypes.uint8 msgLen -> emBits: Hacl.Impl.RSAPSS.Padding.em_len_t a saltLen -> em: Lib.Buffer.lbuffer Lib.IntTypes.uint8 (Hacl.Bignum.Definitions.blocks emBits 8ul) -> FStar.HyperStack.ST.Stack Prims.bool
{ "end_col": 5, "end_line": 221, "start_col": 2, "start_line": 194 }
Prims.Tot
val pts_to (#n:US.t) (bv:bv_t n) (p:perm) (s:repr) : vprop
[ { "abbrev": true, "full_module": "Steel.ST.Array", "short_module": "A" }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.SizeT", "short_module": "US" }, { "abbrev": false, "full_module": "Steel.FractionalPermission", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect.Ghost", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "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 pts_to bv p s = A.pts_to bv p s
val pts_to (#n:US.t) (bv:bv_t n) (p:perm) (s:repr) : vprop let pts_to bv p s =
false
null
false
A.pts_to bv p s
{ "checked_file": "Steel.ST.BitVector.fst.checked", "dependencies": [ "Steel.ST.Util.fsti.checked", "Steel.ST.Effect.Ghost.fsti.checked", "Steel.ST.Effect.fsti.checked", "Steel.ST.Array.fsti.checked", "prims.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Ghost.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.BitVector.fst" }
[ "total" ]
[ "FStar.SizeT.t", "Steel.ST.BitVector.bv_t", "Steel.FractionalPermission.perm", "Steel.ST.BitVector.repr", "Steel.ST.Array.pts_to", "Prims.bool", "Steel.Effect.Common.vprop" ]
[]
(* Copyright 2021 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. Authors: Aseem Rastogi *) module Steel.ST.BitVector open Steel.ST.Effect.Ghost open Steel.ST.Effect open Steel.ST.Util module US = FStar.SizeT module G = FStar.Ghost module A = Steel.ST.Array /// Implementation of bv_t using an array of bool type bv_t n = a:A.array bool{A.length a == US.v n /\ A.is_full_array a}
false
false
Steel.ST.BitVector.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "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 pts_to (#n:US.t) (bv:bv_t n) (p:perm) (s:repr) : vprop
[]
Steel.ST.BitVector.pts_to
{ "file_name": "lib/steel/Steel.ST.BitVector.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
bv: Steel.ST.BitVector.bv_t n -> p: Steel.FractionalPermission.perm -> s: Steel.ST.BitVector.repr -> Steel.Effect.Common.vprop
{ "end_col": 35, "end_line": 33, "start_col": 20, "start_line": 33 }
Steel.ST.Effect.Ghost.STGhost
val pts_to_length (#opened:_) (#n:US.t) (#p:perm) (bv:bv_t n) (s:repr) : STGhost unit opened (pts_to bv p s) (fun _ -> pts_to bv p s) (requires True) (ensures fun _ -> Seq.length s == US.v n)
[ { "abbrev": true, "full_module": "Steel.ST.Array", "short_module": "A" }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.SizeT", "short_module": "US" }, { "abbrev": false, "full_module": "Steel.FractionalPermission", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect.Ghost", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "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 pts_to_length bv s = A.pts_to_length bv s
val pts_to_length (#opened:_) (#n:US.t) (#p:perm) (bv:bv_t n) (s:repr) : STGhost unit opened (pts_to bv p s) (fun _ -> pts_to bv p s) (requires True) (ensures fun _ -> Seq.length s == US.v n) let pts_to_length bv s =
true
null
false
A.pts_to_length bv s
{ "checked_file": "Steel.ST.BitVector.fst.checked", "dependencies": [ "Steel.ST.Util.fsti.checked", "Steel.ST.Effect.Ghost.fsti.checked", "Steel.ST.Effect.fsti.checked", "Steel.ST.Array.fsti.checked", "prims.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Ghost.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.BitVector.fst" }
[]
[ "Steel.Memory.inames", "FStar.SizeT.t", "Steel.FractionalPermission.perm", "Steel.ST.BitVector.bv_t", "Steel.ST.BitVector.repr", "Steel.ST.Array.pts_to_length", "Prims.bool", "Prims.unit" ]
[]
(* Copyright 2021 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. Authors: Aseem Rastogi *) module Steel.ST.BitVector open Steel.ST.Effect.Ghost open Steel.ST.Effect open Steel.ST.Util module US = FStar.SizeT module G = FStar.Ghost module A = Steel.ST.Array /// Implementation of bv_t using an array of bool type bv_t n = a:A.array bool{A.length a == US.v n /\ A.is_full_array a} let pts_to bv p s = A.pts_to bv p s
false
false
Steel.ST.BitVector.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "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 pts_to_length (#opened:_) (#n:US.t) (#p:perm) (bv:bv_t n) (s:repr) : STGhost unit opened (pts_to bv p s) (fun _ -> pts_to bv p s) (requires True) (ensures fun _ -> Seq.length s == US.v n)
[]
Steel.ST.BitVector.pts_to_length
{ "file_name": "lib/steel/Steel.ST.BitVector.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
bv: Steel.ST.BitVector.bv_t n -> s: Steel.ST.BitVector.repr -> Steel.ST.Effect.Ghost.STGhost Prims.unit
{ "end_col": 45, "end_line": 35, "start_col": 25, "start_line": 35 }
Steel.ST.Effect.STT
val alloc (n:US.t{US.v n > 0}) : STT (bv_t n) emp (fun r -> pts_to r full_perm (Seq.create (US.v n) false))
[ { "abbrev": true, "full_module": "Steel.ST.Array", "short_module": "A" }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.SizeT", "short_module": "US" }, { "abbrev": false, "full_module": "Steel.FractionalPermission", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect.Ghost", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "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 alloc n = A.alloc false n
val alloc (n:US.t{US.v n > 0}) : STT (bv_t n) emp (fun r -> pts_to r full_perm (Seq.create (US.v n) false)) let alloc n =
true
null
false
A.alloc false n
{ "checked_file": "Steel.ST.BitVector.fst.checked", "dependencies": [ "Steel.ST.Util.fsti.checked", "Steel.ST.Effect.Ghost.fsti.checked", "Steel.ST.Effect.fsti.checked", "Steel.ST.Array.fsti.checked", "prims.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Ghost.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.BitVector.fst" }
[]
[ "FStar.SizeT.t", "Prims.b2t", "Prims.op_GreaterThan", "FStar.SizeT.v", "Steel.ST.Array.alloc", "Prims.bool", "Steel.ST.Array.array", "Steel.ST.BitVector.bv_t" ]
[]
(* Copyright 2021 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. Authors: Aseem Rastogi *) module Steel.ST.BitVector open Steel.ST.Effect.Ghost open Steel.ST.Effect open Steel.ST.Util module US = FStar.SizeT module G = FStar.Ghost module A = Steel.ST.Array /// Implementation of bv_t using an array of bool type bv_t n = a:A.array bool{A.length a == US.v n /\ A.is_full_array a} let pts_to bv p s = A.pts_to bv p s let pts_to_length bv s = A.pts_to_length bv s
false
false
Steel.ST.BitVector.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "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 alloc (n:US.t{US.v n > 0}) : STT (bv_t n) emp (fun r -> pts_to r full_perm (Seq.create (US.v n) false))
[]
Steel.ST.BitVector.alloc
{ "file_name": "lib/steel/Steel.ST.BitVector.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
n: FStar.SizeT.t{FStar.SizeT.v n > 0} -> Steel.ST.Effect.STT (Steel.ST.BitVector.bv_t n)
{ "end_col": 29, "end_line": 37, "start_col": 14, "start_line": 37 }
Steel.ST.Effect.ST
val bv_is_set (#n:US.t) (#p:perm) (#s:G.erased repr) (bv:bv_t n) (i:US.t{US.v i < Seq.length s}) : ST bool (pts_to bv p s) (fun _ -> pts_to bv p s) (requires True) (ensures fun b -> b == Seq.index s (US.v i))
[ { "abbrev": true, "full_module": "Steel.ST.Array", "short_module": "A" }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.SizeT", "short_module": "US" }, { "abbrev": false, "full_module": "Steel.FractionalPermission", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect.Ghost", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "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 bv_is_set bv i = A.read bv i
val bv_is_set (#n:US.t) (#p:perm) (#s:G.erased repr) (bv:bv_t n) (i:US.t{US.v i < Seq.length s}) : ST bool (pts_to bv p s) (fun _ -> pts_to bv p s) (requires True) (ensures fun b -> b == Seq.index s (US.v i)) let bv_is_set bv i =
true
null
false
A.read bv i
{ "checked_file": "Steel.ST.BitVector.fst.checked", "dependencies": [ "Steel.ST.Util.fsti.checked", "Steel.ST.Effect.Ghost.fsti.checked", "Steel.ST.Effect.fsti.checked", "Steel.ST.Array.fsti.checked", "prims.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Ghost.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.BitVector.fst" }
[]
[ "FStar.SizeT.t", "Steel.FractionalPermission.perm", "FStar.Ghost.erased", "Steel.ST.BitVector.repr", "Steel.ST.BitVector.bv_t", "Prims.b2t", "Prims.op_LessThan", "FStar.SizeT.v", "FStar.Seq.Base.length", "Prims.bool", "FStar.Ghost.reveal", "Steel.ST.Array.read" ]
[]
(* Copyright 2021 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. Authors: Aseem Rastogi *) module Steel.ST.BitVector open Steel.ST.Effect.Ghost open Steel.ST.Effect open Steel.ST.Util module US = FStar.SizeT module G = FStar.Ghost module A = Steel.ST.Array /// Implementation of bv_t using an array of bool type bv_t n = a:A.array bool{A.length a == US.v n /\ A.is_full_array a} let pts_to bv p s = A.pts_to bv p s let pts_to_length bv s = A.pts_to_length bv s let alloc n = A.alloc false n
false
false
Steel.ST.BitVector.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "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 bv_is_set (#n:US.t) (#p:perm) (#s:G.erased repr) (bv:bv_t n) (i:US.t{US.v i < Seq.length s}) : ST bool (pts_to bv p s) (fun _ -> pts_to bv p s) (requires True) (ensures fun b -> b == Seq.index s (US.v i))
[]
Steel.ST.BitVector.bv_is_set
{ "file_name": "lib/steel/Steel.ST.BitVector.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
bv: Steel.ST.BitVector.bv_t n -> i: FStar.SizeT.t{FStar.SizeT.v i < FStar.Seq.Base.length (FStar.Ghost.reveal s)} -> Steel.ST.Effect.ST Prims.bool
{ "end_col": 32, "end_line": 39, "start_col": 21, "start_line": 39 }
Steel.ST.Effect.STT
val bv_set (#n:US.t) (#s:G.erased repr) (bv:bv_t n) (i:US.t{US.v i < Seq.length s}) : STT unit (pts_to bv full_perm s) (fun _ -> pts_to bv full_perm (Seq.upd s (US.v i) true))
[ { "abbrev": true, "full_module": "Steel.ST.Array", "short_module": "A" }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.SizeT", "short_module": "US" }, { "abbrev": false, "full_module": "Steel.FractionalPermission", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect.Ghost", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "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 bv_set #_ #s bv i = A.write #_ bv #s i true
val bv_set (#n:US.t) (#s:G.erased repr) (bv:bv_t n) (i:US.t{US.v i < Seq.length s}) : STT unit (pts_to bv full_perm s) (fun _ -> pts_to bv full_perm (Seq.upd s (US.v i) true)) let bv_set #_ #s bv i =
true
null
false
A.write #_ bv #s i true
{ "checked_file": "Steel.ST.BitVector.fst.checked", "dependencies": [ "Steel.ST.Util.fsti.checked", "Steel.ST.Effect.Ghost.fsti.checked", "Steel.ST.Effect.fsti.checked", "Steel.ST.Array.fsti.checked", "prims.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Ghost.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.BitVector.fst" }
[]
[ "FStar.SizeT.t", "FStar.Ghost.erased", "Steel.ST.BitVector.repr", "Steel.ST.BitVector.bv_t", "Prims.b2t", "Prims.op_LessThan", "FStar.SizeT.v", "FStar.Seq.Base.length", "Prims.bool", "FStar.Ghost.reveal", "Steel.ST.Array.write", "Prims.unit" ]
[]
(* Copyright 2021 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. Authors: Aseem Rastogi *) module Steel.ST.BitVector open Steel.ST.Effect.Ghost open Steel.ST.Effect open Steel.ST.Util module US = FStar.SizeT module G = FStar.Ghost module A = Steel.ST.Array /// Implementation of bv_t using an array of bool type bv_t n = a:A.array bool{A.length a == US.v n /\ A.is_full_array a} let pts_to bv p s = A.pts_to bv p s let pts_to_length bv s = A.pts_to_length bv s let alloc n = A.alloc false n let bv_is_set bv i = A.read bv i
false
false
Steel.ST.BitVector.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "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 bv_set (#n:US.t) (#s:G.erased repr) (bv:bv_t n) (i:US.t{US.v i < Seq.length s}) : STT unit (pts_to bv full_perm s) (fun _ -> pts_to bv full_perm (Seq.upd s (US.v i) true))
[]
Steel.ST.BitVector.bv_set
{ "file_name": "lib/steel/Steel.ST.BitVector.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
bv: Steel.ST.BitVector.bv_t n -> i: FStar.SizeT.t{FStar.SizeT.v i < FStar.Seq.Base.length (FStar.Ghost.reveal s)} -> Steel.ST.Effect.STT Prims.unit
{ "end_col": 47, "end_line": 41, "start_col": 24, "start_line": 41 }
Steel.ST.Effect.STT
val bv_unset (#n:US.t) (#s:G.erased repr) (bv:bv_t n) (i:US.t{US.v i < Seq.length s}) : STT unit (pts_to bv full_perm s) (fun _ -> pts_to bv full_perm (Seq.upd s (US.v i) false))
[ { "abbrev": true, "full_module": "Steel.ST.Array", "short_module": "A" }, { "abbrev": false, "full_module": "Steel.ST.Util", "short_module": null }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.SizeT", "short_module": "US" }, { "abbrev": false, "full_module": "Steel.FractionalPermission", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect.Ghost", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST", "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 bv_unset #_ #s bv i = A.write #_ bv #s i false
val bv_unset (#n:US.t) (#s:G.erased repr) (bv:bv_t n) (i:US.t{US.v i < Seq.length s}) : STT unit (pts_to bv full_perm s) (fun _ -> pts_to bv full_perm (Seq.upd s (US.v i) false)) let bv_unset #_ #s bv i =
true
null
false
A.write #_ bv #s i false
{ "checked_file": "Steel.ST.BitVector.fst.checked", "dependencies": [ "Steel.ST.Util.fsti.checked", "Steel.ST.Effect.Ghost.fsti.checked", "Steel.ST.Effect.fsti.checked", "Steel.ST.Array.fsti.checked", "prims.fst.checked", "FStar.SizeT.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Ghost.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.BitVector.fst" }
[]
[ "FStar.SizeT.t", "FStar.Ghost.erased", "Steel.ST.BitVector.repr", "Steel.ST.BitVector.bv_t", "Prims.b2t", "Prims.op_LessThan", "FStar.SizeT.v", "FStar.Seq.Base.length", "Prims.bool", "FStar.Ghost.reveal", "Steel.ST.Array.write", "Prims.unit" ]
[]
(* Copyright 2021 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. Authors: Aseem Rastogi *) module Steel.ST.BitVector open Steel.ST.Effect.Ghost open Steel.ST.Effect open Steel.ST.Util module US = FStar.SizeT module G = FStar.Ghost module A = Steel.ST.Array /// Implementation of bv_t using an array of bool type bv_t n = a:A.array bool{A.length a == US.v n /\ A.is_full_array a} let pts_to bv p s = A.pts_to bv p s let pts_to_length bv s = A.pts_to_length bv s let alloc n = A.alloc false n let bv_is_set bv i = A.read bv i let bv_set #_ #s bv i = A.write #_ bv #s i true
false
false
Steel.ST.BitVector.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "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 bv_unset (#n:US.t) (#s:G.erased repr) (bv:bv_t n) (i:US.t{US.v i < Seq.length s}) : STT unit (pts_to bv full_perm s) (fun _ -> pts_to bv full_perm (Seq.upd s (US.v i) false))
[]
Steel.ST.BitVector.bv_unset
{ "file_name": "lib/steel/Steel.ST.BitVector.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
bv: Steel.ST.BitVector.bv_t n -> i: FStar.SizeT.t{FStar.SizeT.v i < FStar.Seq.Base.length (FStar.Ghost.reveal s)} -> Steel.ST.Effect.STT Prims.unit
{ "end_col": 50, "end_line": 43, "start_col": 26, "start_line": 43 }
Prims.Tot
val adx_pre:VSig.vale_pre dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win
val adx_pre:VSig.vale_pre dom let adx_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_adx_bmi2_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val adx_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.adx_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 53, "end_line": 132, "start_col": 2, "start_line": 130 }
Prims.Tot
val aesni_pre:VSig.vale_pre dom
[ { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win
val aesni_pre:VSig.vale_pre dom let aesni_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_aesni_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val aesni_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.aesni_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 50, "end_line": 29, "start_col": 2, "start_line": 27 }
Prims.Tot
val aesni_post:VSig.vale_post dom
[ { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f
val aesni_post:VSig.vale_post dom let aesni_post:VSig.vale_post dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) (va_s1: V.va_state) (f: V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Decls.va_fuel", "Vale.Lib.X64.Cpuidstdcall.va_ens_Check_aesni_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val aesni_post:VSig.vale_post dom
[]
Vale.Stdcalls.X64.Cpuid.aesni_post
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_post Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 58, "end_line": 37, "start_col": 2, "start_line": 33 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 code_movbe = VC.va_code_Check_movbe_stdcall IA.win
let code_movbe =
false
null
false
VC.va_code_Check_movbe_stdcall IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.Lib.X64.Cpuidstdcall.va_code_Check_movbe_stdcall", "Vale.Interop.Assumptions.win" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma'
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val code_movbe : Vale.X64.Decls.va_code
[]
Vale.Stdcalls.X64.Cpuid.code_movbe
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.X64.Decls.va_code
{ "end_col": 54, "end_line": 306, "start_col": 17, "start_line": 306 }
Prims.Tot
val avx2_post:VSig.vale_post dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f
val avx2_post:VSig.vale_post dom let avx2_post:VSig.vale_post dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) (va_s1: V.va_state) (f: V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Decls.va_fuel", "Vale.Lib.X64.Cpuidstdcall.va_ens_Check_avx2_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val avx2_post:VSig.vale_post dom
[]
Vale.Stdcalls.X64.Cpuid.avx2_post
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_post Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 57, "end_line": 236, "start_col": 2, "start_line": 232 }
Prims.Tot
[ { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 code_aesni = VC.va_code_Check_aesni_stdcall IA.win
let code_aesni =
false
null
false
VC.va_code_Check_aesni_stdcall IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.Lib.X64.Cpuidstdcall.va_code_Check_aesni_stdcall", "Vale.Interop.Assumptions.win" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma'
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val code_aesni : Vale.X64.Decls.va_code
[]
Vale.Stdcalls.X64.Cpuid.code_aesni
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.X64.Decls.va_code
{ "end_col": 54, "end_line": 59, "start_col": 17, "start_line": 59 }
Prims.Tot
val rdrand_pre:VSig.vale_pre dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 rdrand_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_rdrand_stdcall c va_s0 IA.win
val rdrand_pre:VSig.vale_pre dom let rdrand_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_rdrand_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_rdrand_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract let sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sse_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sse_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sse_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sse_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sse_lemma = as_t #(VSig.vale_sig_stdcall sse_pre sse_post) sse_lemma' noextract let code_sse = VC.va_code_Check_sse_stdcall IA.win (* Here's the type expected for the check_sse wrapper *) [@__reduce__] noextract let lowstar_sse_t = IX64.as_lowstar_sig_t_weak_stdcall code_sse dom [] _ _ (W.mk_prediction code_sse dom [] (sse_lemma code_sse IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val rdrand_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.rdrand_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 51, "end_line": 372, "start_col": 2, "start_line": 370 }
Prims.Tot
val sha_post:VSig.vale_post dom
[ { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f
val sha_post:VSig.vale_post dom let sha_post:VSig.vale_post dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) (va_s1: V.va_state) (f: V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Decls.va_fuel", "Vale.Lib.X64.Cpuidstdcall.va_ens_Check_sha_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val sha_post:VSig.vale_post dom
[]
Vale.Stdcalls.X64.Cpuid.sha_post
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_post Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 56, "end_line": 86, "start_col": 2, "start_line": 82 }
Prims.Tot
val avx_post:VSig.vale_post dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f
val avx_post:VSig.vale_post dom let avx_post:VSig.vale_post dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) (va_s1: V.va_state) (f: V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Decls.va_fuel", "Vale.Lib.X64.Cpuidstdcall.va_ens_Check_avx_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val avx_post:VSig.vale_post dom
[]
Vale.Stdcalls.X64.Cpuid.avx_post
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_post Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 56, "end_line": 188, "start_col": 2, "start_line": 184 }
Prims.Tot
val osxsave_pre:VSig.vale_pre dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 osxsave_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_osxsave_stdcall c va_s0 IA.win
val osxsave_pre:VSig.vale_pre dom let osxsave_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_osxsave_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_osxsave_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract let sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sse_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sse_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sse_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sse_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sse_lemma = as_t #(VSig.vale_sig_stdcall sse_pre sse_post) sse_lemma' noextract let code_sse = VC.va_code_Check_sse_stdcall IA.win (* Here's the type expected for the check_sse wrapper *) [@__reduce__] noextract let lowstar_sse_t = IX64.as_lowstar_sig_t_weak_stdcall code_sse dom [] _ _ (W.mk_prediction code_sse dom [] (sse_lemma code_sse IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let rdrand_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_rdrand_stdcall c va_s0 IA.win [@__reduce__] noextract let rdrand_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_rdrand_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let rdrand_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires rdrand_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ rdrand_post code va_s0 va_s1 f)) = VC.va_lemma_Check_rdrand_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let rdrand_lemma = as_t #(VSig.vale_sig_stdcall rdrand_pre rdrand_post) rdrand_lemma' noextract let code_rdrand = VC.va_code_Check_rdrand_stdcall IA.win (* Here's the type expected for the check_rdrand wrapper *) [@__reduce__] noextract let lowstar_rdrand_t = IX64.as_lowstar_sig_t_weak_stdcall code_rdrand dom [] _ _ (W.mk_prediction code_rdrand dom [] (rdrand_lemma code_rdrand IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx512_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx512_stdcall c va_s0 IA.win [@__reduce__] noextract let avx512_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx512_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx512_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx512_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx512_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx512_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx512_lemma = as_t #(VSig.vale_sig_stdcall avx512_pre avx512_post) avx512_lemma' noextract let code_avx512 = VC.va_code_Check_avx512_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx512_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx512 dom [] _ _ (W.mk_prediction code_avx512 dom [] (avx512_lemma code_avx512 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val osxsave_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.osxsave_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 52, "end_line": 468, "start_col": 2, "start_line": 466 }
Prims.Tot
val avx_xcr0_pre:VSig.vale_pre dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 avx_xcr0_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_xcr0_stdcall c va_s0 IA.win
val avx_xcr0_pre:VSig.vale_pre dom let avx_xcr0_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_avx_xcr0_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_avx_xcr0_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract let sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sse_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sse_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sse_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sse_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sse_lemma = as_t #(VSig.vale_sig_stdcall sse_pre sse_post) sse_lemma' noextract let code_sse = VC.va_code_Check_sse_stdcall IA.win (* Here's the type expected for the check_sse wrapper *) [@__reduce__] noextract let lowstar_sse_t = IX64.as_lowstar_sig_t_weak_stdcall code_sse dom [] _ _ (W.mk_prediction code_sse dom [] (sse_lemma code_sse IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let rdrand_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_rdrand_stdcall c va_s0 IA.win [@__reduce__] noextract let rdrand_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_rdrand_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let rdrand_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires rdrand_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ rdrand_post code va_s0 va_s1 f)) = VC.va_lemma_Check_rdrand_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let rdrand_lemma = as_t #(VSig.vale_sig_stdcall rdrand_pre rdrand_post) rdrand_lemma' noextract let code_rdrand = VC.va_code_Check_rdrand_stdcall IA.win (* Here's the type expected for the check_rdrand wrapper *) [@__reduce__] noextract let lowstar_rdrand_t = IX64.as_lowstar_sig_t_weak_stdcall code_rdrand dom [] _ _ (W.mk_prediction code_rdrand dom [] (rdrand_lemma code_rdrand IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx512_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx512_stdcall c va_s0 IA.win [@__reduce__] noextract let avx512_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx512_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx512_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx512_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx512_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx512_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx512_lemma = as_t #(VSig.vale_sig_stdcall avx512_pre avx512_post) avx512_lemma' noextract let code_avx512 = VC.va_code_Check_avx512_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx512_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx512 dom [] _ _ (W.mk_prediction code_avx512 dom [] (avx512_lemma code_avx512 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let osxsave_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_osxsave_stdcall c va_s0 IA.win [@__reduce__] noextract let osxsave_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_osxsave_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let osxsave_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires osxsave_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ osxsave_post code va_s0 va_s1 f)) = VC.va_lemma_Check_osxsave_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let osxsave_lemma = as_t #(VSig.vale_sig_stdcall osxsave_pre osxsave_post) osxsave_lemma' noextract let code_osxsave = VC.va_code_Check_osxsave_stdcall IA.win (* Here's the type expected for the check_osxsave wrapper *) [@__reduce__] noextract let lowstar_osxsave_t = IX64.as_lowstar_sig_t_weak_stdcall code_osxsave dom [] _ _ (W.mk_prediction code_osxsave dom [] (osxsave_lemma code_osxsave IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val avx_xcr0_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.avx_xcr0_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 53, "end_line": 516, "start_col": 2, "start_line": 514 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 code_avx2 = VC.va_code_Check_avx2_stdcall IA.win
let code_avx2 =
false
null
false
VC.va_code_Check_avx2_stdcall IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.Lib.X64.Cpuidstdcall.va_code_Check_avx2_stdcall", "Vale.Interop.Assumptions.win" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma'
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val code_avx2 : Vale.X64.Decls.va_code
[]
Vale.Stdcalls.X64.Cpuid.code_avx2
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.X64.Decls.va_code
{ "end_col": 52, "end_line": 258, "start_col": 16, "start_line": 258 }
Prims.Tot
val avx_pre:VSig.vale_pre dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win
val avx_pre:VSig.vale_pre dom let avx_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_avx_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val avx_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.avx_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 48, "end_line": 180, "start_col": 2, "start_line": 178 }
Prims.Tot
val sse_pre:VSig.vale_pre dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win
val sse_pre:VSig.vale_pre dom let sse_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_sse_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val sse_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.sse_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 48, "end_line": 324, "start_col": 2, "start_line": 322 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 code_avx = VC.va_code_Check_avx_stdcall IA.win
let code_avx =
false
null
false
VC.va_code_Check_avx_stdcall IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.Lib.X64.Cpuidstdcall.va_code_Check_avx_stdcall", "Vale.Interop.Assumptions.win" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma'
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val code_avx : Vale.X64.Decls.va_code
[]
Vale.Stdcalls.X64.Cpuid.code_avx
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.X64.Decls.va_code
{ "end_col": 50, "end_line": 210, "start_col": 15, "start_line": 210 }
Prims.Tot
val avx_xcr0_post:VSig.vale_post dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 avx_xcr0_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_xcr0_stdcall c va_s0 IA.win va_s1 f
val avx_xcr0_post:VSig.vale_post dom let avx_xcr0_post:VSig.vale_post dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) (va_s1: V.va_state) (f: V.va_fuel) -> VC.va_ens_Check_avx_xcr0_stdcall c va_s0 IA.win va_s1 f
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Decls.va_fuel", "Vale.Lib.X64.Cpuidstdcall.va_ens_Check_avx_xcr0_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract let sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sse_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sse_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sse_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sse_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sse_lemma = as_t #(VSig.vale_sig_stdcall sse_pre sse_post) sse_lemma' noextract let code_sse = VC.va_code_Check_sse_stdcall IA.win (* Here's the type expected for the check_sse wrapper *) [@__reduce__] noextract let lowstar_sse_t = IX64.as_lowstar_sig_t_weak_stdcall code_sse dom [] _ _ (W.mk_prediction code_sse dom [] (sse_lemma code_sse IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let rdrand_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_rdrand_stdcall c va_s0 IA.win [@__reduce__] noextract let rdrand_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_rdrand_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let rdrand_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires rdrand_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ rdrand_post code va_s0 va_s1 f)) = VC.va_lemma_Check_rdrand_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let rdrand_lemma = as_t #(VSig.vale_sig_stdcall rdrand_pre rdrand_post) rdrand_lemma' noextract let code_rdrand = VC.va_code_Check_rdrand_stdcall IA.win (* Here's the type expected for the check_rdrand wrapper *) [@__reduce__] noextract let lowstar_rdrand_t = IX64.as_lowstar_sig_t_weak_stdcall code_rdrand dom [] _ _ (W.mk_prediction code_rdrand dom [] (rdrand_lemma code_rdrand IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx512_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx512_stdcall c va_s0 IA.win [@__reduce__] noextract let avx512_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx512_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx512_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx512_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx512_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx512_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx512_lemma = as_t #(VSig.vale_sig_stdcall avx512_pre avx512_post) avx512_lemma' noextract let code_avx512 = VC.va_code_Check_avx512_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx512_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx512 dom [] _ _ (W.mk_prediction code_avx512 dom [] (avx512_lemma code_avx512 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let osxsave_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_osxsave_stdcall c va_s0 IA.win [@__reduce__] noextract let osxsave_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_osxsave_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let osxsave_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires osxsave_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ osxsave_post code va_s0 va_s1 f)) = VC.va_lemma_Check_osxsave_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let osxsave_lemma = as_t #(VSig.vale_sig_stdcall osxsave_pre osxsave_post) osxsave_lemma' noextract let code_osxsave = VC.va_code_Check_osxsave_stdcall IA.win (* Here's the type expected for the check_osxsave wrapper *) [@__reduce__] noextract let lowstar_osxsave_t = IX64.as_lowstar_sig_t_weak_stdcall code_osxsave dom [] _ _ (W.mk_prediction code_osxsave dom [] (osxsave_lemma code_osxsave IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_xcr0_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_xcr0_stdcall c va_s0 IA.win [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val avx_xcr0_post:VSig.vale_post dom
[]
Vale.Stdcalls.X64.Cpuid.avx_xcr0_post
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_post Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 61, "end_line": 524, "start_col": 2, "start_line": 520 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win
let code_adx =
false
null
false
VC.va_code_Check_adx_bmi2_stdcall IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.Lib.X64.Cpuidstdcall.va_code_Check_adx_bmi2_stdcall", "Vale.Interop.Assumptions.win" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma'
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val code_adx : Vale.X64.Decls.va_code
[]
Vale.Stdcalls.X64.Cpuid.code_adx
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.X64.Decls.va_code
{ "end_col": 55, "end_line": 162, "start_col": 15, "start_line": 162 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 code_sse = VC.va_code_Check_sse_stdcall IA.win
let code_sse =
false
null
false
VC.va_code_Check_sse_stdcall IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.Lib.X64.Cpuidstdcall.va_code_Check_sse_stdcall", "Vale.Interop.Assumptions.win" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract let sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sse_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sse_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sse_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sse_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sse_lemma = as_t #(VSig.vale_sig_stdcall sse_pre sse_post) sse_lemma'
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val code_sse : Vale.X64.Decls.va_code
[]
Vale.Stdcalls.X64.Cpuid.code_sse
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.X64.Decls.va_code
{ "end_col": 50, "end_line": 354, "start_col": 15, "start_line": 354 }
Prims.Tot
val adx_post:VSig.vale_post dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f
val adx_post:VSig.vale_post dom let adx_post:VSig.vale_post dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) (va_s1: V.va_state) (f: V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Decls.va_fuel", "Vale.Lib.X64.Cpuidstdcall.va_ens_Check_adx_bmi2_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val adx_post:VSig.vale_post dom
[]
Vale.Stdcalls.X64.Cpuid.adx_post
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_post Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 61, "end_line": 140, "start_col": 2, "start_line": 136 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 code_rdrand = VC.va_code_Check_rdrand_stdcall IA.win
let code_rdrand =
false
null
false
VC.va_code_Check_rdrand_stdcall IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.Lib.X64.Cpuidstdcall.va_code_Check_rdrand_stdcall", "Vale.Interop.Assumptions.win" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract let sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sse_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sse_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sse_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sse_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sse_lemma = as_t #(VSig.vale_sig_stdcall sse_pre sse_post) sse_lemma' noextract let code_sse = VC.va_code_Check_sse_stdcall IA.win (* Here's the type expected for the check_sse wrapper *) [@__reduce__] noextract let lowstar_sse_t = IX64.as_lowstar_sig_t_weak_stdcall code_sse dom [] _ _ (W.mk_prediction code_sse dom [] (sse_lemma code_sse IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let rdrand_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_rdrand_stdcall c va_s0 IA.win [@__reduce__] noextract let rdrand_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_rdrand_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let rdrand_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires rdrand_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ rdrand_post code va_s0 va_s1 f)) = VC.va_lemma_Check_rdrand_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let rdrand_lemma = as_t #(VSig.vale_sig_stdcall rdrand_pre rdrand_post) rdrand_lemma'
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val code_rdrand : Vale.X64.Decls.va_code
[]
Vale.Stdcalls.X64.Cpuid.code_rdrand
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.X64.Decls.va_code
{ "end_col": 56, "end_line": 402, "start_col": 18, "start_line": 402 }
Prims.Tot
val avx512_xcr0_post:VSig.vale_post dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 avx512_xcr0_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx512_xcr0_stdcall c va_s0 IA.win va_s1 f
val avx512_xcr0_post:VSig.vale_post dom let avx512_xcr0_post:VSig.vale_post dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) (va_s1: V.va_state) (f: V.va_fuel) -> VC.va_ens_Check_avx512_xcr0_stdcall c va_s0 IA.win va_s1 f
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Decls.va_fuel", "Vale.Lib.X64.Cpuidstdcall.va_ens_Check_avx512_xcr0_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract let sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sse_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sse_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sse_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sse_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sse_lemma = as_t #(VSig.vale_sig_stdcall sse_pre sse_post) sse_lemma' noextract let code_sse = VC.va_code_Check_sse_stdcall IA.win (* Here's the type expected for the check_sse wrapper *) [@__reduce__] noextract let lowstar_sse_t = IX64.as_lowstar_sig_t_weak_stdcall code_sse dom [] _ _ (W.mk_prediction code_sse dom [] (sse_lemma code_sse IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let rdrand_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_rdrand_stdcall c va_s0 IA.win [@__reduce__] noextract let rdrand_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_rdrand_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let rdrand_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires rdrand_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ rdrand_post code va_s0 va_s1 f)) = VC.va_lemma_Check_rdrand_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let rdrand_lemma = as_t #(VSig.vale_sig_stdcall rdrand_pre rdrand_post) rdrand_lemma' noextract let code_rdrand = VC.va_code_Check_rdrand_stdcall IA.win (* Here's the type expected for the check_rdrand wrapper *) [@__reduce__] noextract let lowstar_rdrand_t = IX64.as_lowstar_sig_t_weak_stdcall code_rdrand dom [] _ _ (W.mk_prediction code_rdrand dom [] (rdrand_lemma code_rdrand IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx512_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx512_stdcall c va_s0 IA.win [@__reduce__] noextract let avx512_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx512_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx512_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx512_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx512_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx512_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx512_lemma = as_t #(VSig.vale_sig_stdcall avx512_pre avx512_post) avx512_lemma' noextract let code_avx512 = VC.va_code_Check_avx512_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx512_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx512 dom [] _ _ (W.mk_prediction code_avx512 dom [] (avx512_lemma code_avx512 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let osxsave_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_osxsave_stdcall c va_s0 IA.win [@__reduce__] noextract let osxsave_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_osxsave_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let osxsave_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires osxsave_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ osxsave_post code va_s0 va_s1 f)) = VC.va_lemma_Check_osxsave_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let osxsave_lemma = as_t #(VSig.vale_sig_stdcall osxsave_pre osxsave_post) osxsave_lemma' noextract let code_osxsave = VC.va_code_Check_osxsave_stdcall IA.win (* Here's the type expected for the check_osxsave wrapper *) [@__reduce__] noextract let lowstar_osxsave_t = IX64.as_lowstar_sig_t_weak_stdcall code_osxsave dom [] _ _ (W.mk_prediction code_osxsave dom [] (osxsave_lemma code_osxsave IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_xcr0_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_xcr0_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_xcr0_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_xcr0_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_xcr0_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_xcr0_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_xcr0_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_xcr0_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_xcr0_lemma = as_t #(VSig.vale_sig_stdcall avx_xcr0_pre avx_xcr0_post) avx_xcr0_lemma' noextract let code_avx_xcr0 = VC.va_code_Check_avx_xcr0_stdcall IA.win (* Here's the type expected for the check_avx_xcr0 wrapper *) [@__reduce__] noextract let lowstar_avx_xcr0_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx_xcr0 dom [] _ _ (W.mk_prediction code_avx_xcr0 dom [] (avx_xcr0_lemma code_avx_xcr0 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx512_xcr0_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx512_xcr0_stdcall c va_s0 IA.win [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val avx512_xcr0_post:VSig.vale_post dom
[]
Vale.Stdcalls.X64.Cpuid.avx512_xcr0_post
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_post Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 64, "end_line": 572, "start_col": 2, "start_line": 568 }
Prims.Tot
val avx2_pre:VSig.vale_pre dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win
val avx2_pre:VSig.vale_pre dom let avx2_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_avx2_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val avx2_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.avx2_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 49, "end_line": 228, "start_col": 2, "start_line": 226 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 code_avx512_xcr0 = VC.va_code_Check_avx512_xcr0_stdcall IA.win
let code_avx512_xcr0 =
false
null
false
VC.va_code_Check_avx512_xcr0_stdcall IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.Lib.X64.Cpuidstdcall.va_code_Check_avx512_xcr0_stdcall", "Vale.Interop.Assumptions.win" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract let sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sse_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sse_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sse_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sse_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sse_lemma = as_t #(VSig.vale_sig_stdcall sse_pre sse_post) sse_lemma' noextract let code_sse = VC.va_code_Check_sse_stdcall IA.win (* Here's the type expected for the check_sse wrapper *) [@__reduce__] noextract let lowstar_sse_t = IX64.as_lowstar_sig_t_weak_stdcall code_sse dom [] _ _ (W.mk_prediction code_sse dom [] (sse_lemma code_sse IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let rdrand_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_rdrand_stdcall c va_s0 IA.win [@__reduce__] noextract let rdrand_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_rdrand_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let rdrand_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires rdrand_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ rdrand_post code va_s0 va_s1 f)) = VC.va_lemma_Check_rdrand_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let rdrand_lemma = as_t #(VSig.vale_sig_stdcall rdrand_pre rdrand_post) rdrand_lemma' noextract let code_rdrand = VC.va_code_Check_rdrand_stdcall IA.win (* Here's the type expected for the check_rdrand wrapper *) [@__reduce__] noextract let lowstar_rdrand_t = IX64.as_lowstar_sig_t_weak_stdcall code_rdrand dom [] _ _ (W.mk_prediction code_rdrand dom [] (rdrand_lemma code_rdrand IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx512_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx512_stdcall c va_s0 IA.win [@__reduce__] noextract let avx512_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx512_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx512_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx512_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx512_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx512_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx512_lemma = as_t #(VSig.vale_sig_stdcall avx512_pre avx512_post) avx512_lemma' noextract let code_avx512 = VC.va_code_Check_avx512_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx512_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx512 dom [] _ _ (W.mk_prediction code_avx512 dom [] (avx512_lemma code_avx512 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let osxsave_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_osxsave_stdcall c va_s0 IA.win [@__reduce__] noextract let osxsave_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_osxsave_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let osxsave_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires osxsave_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ osxsave_post code va_s0 va_s1 f)) = VC.va_lemma_Check_osxsave_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let osxsave_lemma = as_t #(VSig.vale_sig_stdcall osxsave_pre osxsave_post) osxsave_lemma' noextract let code_osxsave = VC.va_code_Check_osxsave_stdcall IA.win (* Here's the type expected for the check_osxsave wrapper *) [@__reduce__] noextract let lowstar_osxsave_t = IX64.as_lowstar_sig_t_weak_stdcall code_osxsave dom [] _ _ (W.mk_prediction code_osxsave dom [] (osxsave_lemma code_osxsave IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_xcr0_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_xcr0_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_xcr0_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_xcr0_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_xcr0_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_xcr0_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_xcr0_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_xcr0_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_xcr0_lemma = as_t #(VSig.vale_sig_stdcall avx_xcr0_pre avx_xcr0_post) avx_xcr0_lemma' noextract let code_avx_xcr0 = VC.va_code_Check_avx_xcr0_stdcall IA.win (* Here's the type expected for the check_avx_xcr0 wrapper *) [@__reduce__] noextract let lowstar_avx_xcr0_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx_xcr0 dom [] _ _ (W.mk_prediction code_avx_xcr0 dom [] (avx_xcr0_lemma code_avx_xcr0 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx512_xcr0_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx512_xcr0_stdcall c va_s0 IA.win [@__reduce__] noextract let avx512_xcr0_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx512_xcr0_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx512_xcr0_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx512_xcr0_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx512_xcr0_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx512_xcr0_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx512_xcr0_lemma = as_t #(VSig.vale_sig_stdcall avx512_xcr0_pre avx512_xcr0_post) avx512_xcr0_lemma'
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val code_avx512_xcr0 : Vale.X64.Decls.va_code
[]
Vale.Stdcalls.X64.Cpuid.code_avx512_xcr0
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.X64.Decls.va_code
{ "end_col": 66, "end_line": 594, "start_col": 23, "start_line": 594 }
Prims.Tot
val avx512_pre:VSig.vale_pre dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 avx512_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx512_stdcall c va_s0 IA.win
val avx512_pre:VSig.vale_pre dom let avx512_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_avx512_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_avx512_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract let sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sse_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sse_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sse_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sse_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sse_lemma = as_t #(VSig.vale_sig_stdcall sse_pre sse_post) sse_lemma' noextract let code_sse = VC.va_code_Check_sse_stdcall IA.win (* Here's the type expected for the check_sse wrapper *) [@__reduce__] noextract let lowstar_sse_t = IX64.as_lowstar_sig_t_weak_stdcall code_sse dom [] _ _ (W.mk_prediction code_sse dom [] (sse_lemma code_sse IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let rdrand_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_rdrand_stdcall c va_s0 IA.win [@__reduce__] noextract let rdrand_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_rdrand_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let rdrand_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires rdrand_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ rdrand_post code va_s0 va_s1 f)) = VC.va_lemma_Check_rdrand_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let rdrand_lemma = as_t #(VSig.vale_sig_stdcall rdrand_pre rdrand_post) rdrand_lemma' noextract let code_rdrand = VC.va_code_Check_rdrand_stdcall IA.win (* Here's the type expected for the check_rdrand wrapper *) [@__reduce__] noextract let lowstar_rdrand_t = IX64.as_lowstar_sig_t_weak_stdcall code_rdrand dom [] _ _ (W.mk_prediction code_rdrand dom [] (rdrand_lemma code_rdrand IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val avx512_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.avx512_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 51, "end_line": 420, "start_col": 2, "start_line": 418 }
Prims.Tot
val osxsave_post:VSig.vale_post dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 osxsave_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_osxsave_stdcall c va_s0 IA.win va_s1 f
val osxsave_post:VSig.vale_post dom let osxsave_post:VSig.vale_post dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) (va_s1: V.va_state) (f: V.va_fuel) -> VC.va_ens_Check_osxsave_stdcall c va_s0 IA.win va_s1 f
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Decls.va_fuel", "Vale.Lib.X64.Cpuidstdcall.va_ens_Check_osxsave_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract let sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sse_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sse_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sse_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sse_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sse_lemma = as_t #(VSig.vale_sig_stdcall sse_pre sse_post) sse_lemma' noextract let code_sse = VC.va_code_Check_sse_stdcall IA.win (* Here's the type expected for the check_sse wrapper *) [@__reduce__] noextract let lowstar_sse_t = IX64.as_lowstar_sig_t_weak_stdcall code_sse dom [] _ _ (W.mk_prediction code_sse dom [] (sse_lemma code_sse IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let rdrand_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_rdrand_stdcall c va_s0 IA.win [@__reduce__] noextract let rdrand_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_rdrand_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let rdrand_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires rdrand_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ rdrand_post code va_s0 va_s1 f)) = VC.va_lemma_Check_rdrand_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let rdrand_lemma = as_t #(VSig.vale_sig_stdcall rdrand_pre rdrand_post) rdrand_lemma' noextract let code_rdrand = VC.va_code_Check_rdrand_stdcall IA.win (* Here's the type expected for the check_rdrand wrapper *) [@__reduce__] noextract let lowstar_rdrand_t = IX64.as_lowstar_sig_t_weak_stdcall code_rdrand dom [] _ _ (W.mk_prediction code_rdrand dom [] (rdrand_lemma code_rdrand IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx512_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx512_stdcall c va_s0 IA.win [@__reduce__] noextract let avx512_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx512_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx512_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx512_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx512_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx512_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx512_lemma = as_t #(VSig.vale_sig_stdcall avx512_pre avx512_post) avx512_lemma' noextract let code_avx512 = VC.va_code_Check_avx512_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx512_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx512 dom [] _ _ (W.mk_prediction code_avx512 dom [] (avx512_lemma code_avx512 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let osxsave_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_osxsave_stdcall c va_s0 IA.win [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val osxsave_post:VSig.vale_post dom
[]
Vale.Stdcalls.X64.Cpuid.osxsave_post
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_post Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 60, "end_line": 476, "start_col": 2, "start_line": 472 }
Prims.Tot
val sha_pre:VSig.vale_pre dom
[ { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win
val sha_pre:VSig.vale_pre dom let sha_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_sha_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val sha_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.sha_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 48, "end_line": 78, "start_col": 2, "start_line": 76 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 code_sha = VC.va_code_Check_sha_stdcall IA.win
let code_sha =
false
null
false
VC.va_code_Check_sha_stdcall IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.Lib.X64.Cpuidstdcall.va_code_Check_sha_stdcall", "Vale.Interop.Assumptions.win" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma'
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val code_sha : Vale.X64.Decls.va_code
[]
Vale.Stdcalls.X64.Cpuid.code_sha
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.X64.Decls.va_code
{ "end_col": 50, "end_line": 113, "start_col": 15, "start_line": 113 }
Prims.Tot
val movbe_pre:VSig.vale_pre dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win
val movbe_pre:VSig.vale_pre dom let movbe_pre:VSig.vale_pre dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.Lib.X64.Cpuidstdcall.va_req_Check_movbe_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val movbe_pre:VSig.vale_pre dom
[]
Vale.Stdcalls.X64.Cpuid.movbe_pre
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 50, "end_line": 276, "start_col": 2, "start_line": 274 }
Prims.Tot
val sse_post:VSig.vale_post dom
[ { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": true, "full_module": "Vale.Lib.X64.Cpuidstdcall", "short_module": "VC" }, { "abbrev": false, "full_module": "Vale.X64.MemoryAdapters", "short_module": null }, { "abbrev": true, "full_module": "Vale.AsLowStar.Wrapper", "short_module": "W" }, { "abbrev": true, "full_module": "Vale.Interop.Assumptions", "short_module": "IA" }, { "abbrev": true, "full_module": "Vale.X64.Decls", "short_module": "V" }, { "abbrev": true, "full_module": "Vale.AsLowStar.LowStarSig", "short_module": "LSig" }, { "abbrev": true, "full_module": "Vale.AsLowStar.ValeSig", "short_module": "VSig" }, { "abbrev": true, "full_module": "Vale.Interop.X64", "short_module": "IX64" }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Stdcalls.X64", "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 sse_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f
val sse_post:VSig.vale_post dom let sse_post:VSig.vale_post dom =
false
null
false
fun (c: V.va_code) (va_s0: V.va_state) (va_s1: V.va_state) (f: V.va_fuel) -> VC.va_ens_Check_sse_stdcall c va_s0 IA.win va_s1 f
{ "checked_file": "Vale.Stdcalls.X64.Cpuid.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.MemoryAdapters.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.Decls.fsti.checked", "Vale.Lib.X64.Cpuidstdcall.fsti.checked", "Vale.Interop.X64.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Interop.Assumptions.fst.checked", "Vale.AsLowStar.Wrapper.fsti.checked", "Vale.AsLowStar.ValeSig.fst.checked", "Vale.AsLowStar.LowStarSig.fst.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Stdcalls.X64.Cpuid.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Decls.va_fuel", "Vale.Lib.X64.Cpuidstdcall.va_ens_Check_sse_stdcall", "Vale.Interop.Assumptions.win", "Prims.prop" ]
[]
module Vale.Stdcalls.X64.Cpuid open FStar.Mul open Vale.Interop.Base module IX64 = Vale.Interop.X64 module VSig = Vale.AsLowStar.ValeSig module LSig = Vale.AsLowStar.LowStarSig module V = Vale.X64.Decls module IA = Vale.Interop.Assumptions module W = Vale.AsLowStar.Wrapper open Vale.X64.MemoryAdapters module VC = Vale.Lib.X64.Cpuidstdcall (* A little utility to trigger normalization in types *) noextract let as_t (#a:Type) (x:normal a) : a = x noextract let as_normal_t (#a:Type) (x:a) : normal a = x [@__reduce__] noextract let dom: IX64.arity_ok_stdcall td = [] (* Need to rearrange the order of arguments *) [@__reduce__] noextract let aesni_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_aesni_stdcall c va_s0 IA.win [@__reduce__] noextract let aesni_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_aesni_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let aesni_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires aesni_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ aesni_post code va_s0 va_s1 f)) = VC.va_lemma_Check_aesni_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let aesni_lemma = as_t #(VSig.vale_sig_stdcall aesni_pre aesni_post) aesni_lemma' noextract let code_aesni = VC.va_code_Check_aesni_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_aesni_t = IX64.as_lowstar_sig_t_weak_stdcall code_aesni dom [] _ _ (W.mk_prediction code_aesni dom [] (aesni_lemma code_aesni IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sha_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sha_stdcall c va_s0 IA.win [@__reduce__] noextract let sha_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_sha_stdcall c va_s0 IA.win va_s1 f open Vale.X64.Machine_s open Vale.X64.State #set-options "--z3rlimit 20" (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let sha_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires sha_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ sha_post code va_s0 va_s1 f)) = VC.va_lemma_Check_sha_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let sha_lemma = as_t #(VSig.vale_sig_stdcall sha_pre sha_post) sha_lemma' noextract let code_sha = VC.va_code_Check_sha_stdcall IA.win (* Here's the type expected for the check_aesni wrapper *) [@__reduce__] noextract let lowstar_sha_t = IX64.as_lowstar_sig_t_weak_stdcall code_sha dom [] _ _ (W.mk_prediction code_sha dom [] (sha_lemma code_sha IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let adx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_adx_bmi2_stdcall c va_s0 IA.win [@__reduce__] noextract let adx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_adx_bmi2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let adx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires adx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ adx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_adx_bmi2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let adx_lemma = as_t #(VSig.vale_sig_stdcall adx_pre adx_post) adx_lemma' noextract let code_adx = VC.va_code_Check_adx_bmi2_stdcall IA.win (* Here's the type expected for the check_adx wrapper *) [@__reduce__] noextract let lowstar_adx_t = IX64.as_lowstar_sig_t_weak_stdcall code_adx dom [] _ _ (W.mk_prediction code_adx dom [] (adx_lemma code_adx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx_stdcall c va_s0 IA.win [@__reduce__] noextract let avx_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx_lemma = as_t #(VSig.vale_sig_stdcall avx_pre avx_post) avx_lemma' noextract let code_avx = VC.va_code_Check_avx_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx dom [] _ _ (W.mk_prediction code_avx dom [] (avx_lemma code_avx IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let avx2_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_avx2_stdcall c va_s0 IA.win [@__reduce__] noextract let avx2_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_avx2_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let avx2_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires avx2_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ avx2_post code va_s0 va_s1 f)) = VC.va_lemma_Check_avx2_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let avx2_lemma = as_t #(VSig.vale_sig_stdcall avx2_pre avx2_post) avx2_lemma' noextract let code_avx2 = VC.va_code_Check_avx2_stdcall IA.win (* Here's the type expected for the check_avx wrapper *) [@__reduce__] noextract let lowstar_avx2_t = IX64.as_lowstar_sig_t_weak_stdcall code_avx2 dom [] _ _ (W.mk_prediction code_avx2 dom [] (avx2_lemma code_avx2 IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let movbe_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_movbe_stdcall c va_s0 IA.win [@__reduce__] noextract let movbe_post : VSig.vale_post dom = fun (c:V.va_code) (va_s0:V.va_state) (va_s1:V.va_state) (f:V.va_fuel) -> VC.va_ens_Check_movbe_stdcall c va_s0 IA.win va_s1 f (* The vale lemma doesn't quite suffice to prove the modifies clause expected of the interop layer *) [@__reduce__] noextract let movbe_lemma' (code:V.va_code) (_win:bool) (va_s0:V.va_state) : Ghost (V.va_state & V.va_fuel) (requires movbe_pre code va_s0) (ensures (fun (va_s1, f) -> V.eval_code code va_s0 f va_s1 /\ VSig.vale_calling_conventions_stdcall va_s0 va_s1 /\ movbe_post code va_s0 va_s1 f)) = VC.va_lemma_Check_movbe_stdcall code va_s0 IA.win (* Prove that vm_lemma' has the required type *) noextract let movbe_lemma = as_t #(VSig.vale_sig_stdcall movbe_pre movbe_post) movbe_lemma' noextract let code_movbe = VC.va_code_Check_movbe_stdcall IA.win (* Here's the type expected for the check_movbe wrapper *) [@__reduce__] noextract let lowstar_movbe_t = IX64.as_lowstar_sig_t_weak_stdcall code_movbe dom [] _ _ (W.mk_prediction code_movbe dom [] (movbe_lemma code_movbe IA.win)) (* Need to rearrange the order of arguments *) [@__reduce__] noextract let sse_pre : VSig.vale_pre dom = fun (c:V.va_code) (va_s0:V.va_state) -> VC.va_req_Check_sse_stdcall c va_s0 IA.win [@__reduce__] noextract
false
true
Vale.Stdcalls.X64.Cpuid.fsti
{ "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": 20, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val sse_post:VSig.vale_post dom
[]
Vale.Stdcalls.X64.Cpuid.sse_post
{ "file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.Cpuid.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Vale.AsLowStar.ValeSig.vale_post Vale.Stdcalls.X64.Cpuid.dom
{ "end_col": 56, "end_line": 332, "start_col": 2, "start_line": 328 }