file_name
stringlengths
5
52
name
stringlengths
4
95
original_source_type
stringlengths
0
23k
source_type
stringlengths
9
23k
source_definition
stringlengths
9
57.9k
source
dict
source_range
dict
file_context
stringlengths
0
721k
dependencies
dict
opens_and_abbrevs
listlengths
2
94
vconfig
dict
interleaved
bool
1 class
verbose_type
stringlengths
1
7.42k
effect
stringclasses
118 values
effect_flags
listlengths
0
2
mutual_with
listlengths
0
11
ideal_premises
listlengths
0
236
proof_features
listlengths
0
1
is_simple_lemma
bool
2 classes
is_div
bool
2 classes
is_proof
bool
2 classes
is_simply_typed
bool
2 classes
is_type
bool
2 classes
partial_definition
stringlengths
5
3.99k
completed_definiton
stringlengths
1
1.63M
isa_cross_project_example
bool
1 class
LowStar.Lib.AssocList.fst
LowStar.Lib.AssocList.remove_all_
val remove_all_ (#t_k: eqtype) (#t_v: Type0) (hd: LL1.t (t_k & t_v)) (l: G.erased (list (t_k & t_v))) (k: t_k): ST (LL1.t (t_k & t_v) & G.erased (list (t_k & t_v))) (requires fun h0 -> LL1.well_formed h0 hd l /\ LL1.invariant h0 hd l) (ensures fun h0 (hd', l') h1 -> LL1.well_formed h1 hd' l'...
val remove_all_ (#t_k: eqtype) (#t_v: Type0) (hd: LL1.t (t_k & t_v)) (l: G.erased (list (t_k & t_v))) (k: t_k): ST (LL1.t (t_k & t_v) & G.erased (list (t_k & t_v))) (requires fun h0 -> LL1.well_formed h0 hd l /\ LL1.invariant h0 hd l) (ensures fun h0 (hd', l') h1 -> LL1.well_formed h1 hd' l'...
let rec remove_all_ #t_k #t_v hd l k = let h0 = ST.get () in if B.is_null hd then begin M.lemma_equal_intro (v_ l) (M.upd (v_ l) k None); hd, l end else begin let cell = !*hd in let { LL1.data; LL1.next } = cell in let k', v = data in if k = k' then begin B.free hd; let h1 = ST...
{ "file_name": "krmllib/LowStar.Lib.AssocList.fst", "git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
{ "end_col": 5, "end_line": 181, "start_col": 0, "start_line": 152 }
module LowStar.Lib.AssocList /// A Low*, stateful associative list that exposes a map-like interface. module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module M = FStar.Map module LL2 = LowStar.Lib.LinkedL...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList2.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasi...
[ { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, ...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 1, "initial_ifuel": 1, "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_el...
false
hd: LowStar.Lib.LinkedList.t (t_k * t_v) -> l: FStar.Ghost.erased (Prims.list (t_k * t_v)) -> k: t_k -> FStar.HyperStack.ST.ST (LowStar.Lib.LinkedList.t (t_k * t_v) * FStar.Ghost.erased (Prims.list (t_k * t_v)))
FStar.HyperStack.ST.ST
[]
[]
[ "Prims.eqtype", "LowStar.Lib.LinkedList.t", "FStar.Pervasives.Native.tuple2", "FStar.Ghost.erased", "Prims.list", "FStar.Pervasives.Native.Mktuple2", "Prims.unit", "FStar.Map.lemma_equal_intro", "FStar.Pervasives.Native.option", "LowStar.Lib.AssocList.v_", "FStar.Ghost.reveal", "FStar.Map.upd"...
[ "recursion" ]
false
true
false
false
false
let rec remove_all_ #t_k #t_v hd l k =
let h0 = ST.get () in if B.is_null hd then (M.lemma_equal_intro (v_ l) (M.upd (v_ l) k None); hd, l) else let cell = !*hd in let { LL1.data = data ; LL1.next = next } = cell in let k', v = data in if k = k' then (B.free hd; let h1 = ST.get () in LL1.frame next (List.Tot.tail l) (B.loc_ad...
false
Vale.Curve25519.FastMul_helpers.fst
Vale.Curve25519.FastMul_helpers.lemma_intel_prod_sum_bound
val lemma_intel_prod_sum_bound (w x y z: nat64) : Lemma (w * x + y + z < pow2_128)
val lemma_intel_prod_sum_bound (w x y z: nat64) : Lemma (w * x + y + z < pow2_128)
let lemma_intel_prod_sum_bound (w x y z:nat64) : Lemma (w * x + y + z < pow2_128) = lemma_mul_bound64 w x
{ "file_name": "vale/code/crypto/ecc/curve25519/Vale.Curve25519.FastMul_helpers.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 25, "end_line": 31, "start_col": 0, "start_line": 29 }
module Vale.Curve25519.FastMul_helpers open Vale.Def.Words_s open Vale.Def.Types_s open FStar.Mul open FStar.Tactics open FStar.Tactics.CanonCommSemiring open Vale.Curve25519.Fast_defs open Vale.Curve25519.Fast_lemmas_internal open FStar.Math.Lemmas #reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflectio...
{ "checked_file": "/", "dependencies": [ "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Curve25519.Fast_lemmas_internal.fsti.checked", "Vale.Curve25519.Fast_defs.fst.checked", "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiri...
[ { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_lemmas_internal", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_defs", "short_module": null }, { ...
{ "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_el...
false
w: Vale.Def.Types_s.nat64 -> x: Vale.Def.Types_s.nat64 -> y: Vale.Def.Types_s.nat64 -> z: Vale.Def.Types_s.nat64 -> FStar.Pervasives.Lemma (ensures w * x + y + z < Vale.Def.Words_s.pow2_128)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Def.Types_s.nat64", "Vale.Curve25519.FastMul_helpers.lemma_mul_bound64", "Prims.unit", "Prims.l_True", "Prims.squash", "Prims.b2t", "Prims.op_LessThan", "Prims.op_Addition", "FStar.Mul.op_Star", "Vale.Def.Words_s.pow2_128", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
true
false
true
false
false
let lemma_intel_prod_sum_bound (w x y z: nat64) : Lemma (w * x + y + z < pow2_128) =
lemma_mul_bound64 w x
false
Vale.Curve25519.FastMul_helpers.fst
Vale.Curve25519.FastMul_helpers.lemma_mul_bound64
val lemma_mul_bound64 (x y: nat64) : Lemma (x * y < pow2_128 - 1 /\ x * y <= pow2_128 - 2 * pow2_64 + 1)
val lemma_mul_bound64 (x y: nat64) : Lemma (x * y < pow2_128 - 1 /\ x * y <= pow2_128 - 2 * pow2_64 + 1)
let lemma_mul_bound64 (x y:nat64) : Lemma (x * y < pow2_128 - 1 /\ x * y <= pow2_128 - 2*pow2_64 + 1) = assert_norm (pow2 64 == pow2_64); assert_norm (pow2 128 == pow2_128); lemma_mul_pow2_bound 64 x y
{ "file_name": "vale/code/crypto/ecc/curve25519/Vale.Curve25519.FastMul_helpers.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 31, "end_line": 26, "start_col": 0, "start_line": 22 }
module Vale.Curve25519.FastMul_helpers open Vale.Def.Words_s open Vale.Def.Types_s open FStar.Mul open FStar.Tactics open FStar.Tactics.CanonCommSemiring open Vale.Curve25519.Fast_defs open Vale.Curve25519.Fast_lemmas_internal open FStar.Math.Lemmas #reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflectio...
{ "checked_file": "/", "dependencies": [ "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Curve25519.Fast_lemmas_internal.fsti.checked", "Vale.Curve25519.Fast_defs.fst.checked", "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiri...
[ { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_lemmas_internal", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_defs", "short_module": null }, { ...
{ "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_el...
false
x: Vale.Def.Types_s.nat64 -> y: Vale.Def.Types_s.nat64 -> FStar.Pervasives.Lemma (ensures x * y < Vale.Def.Words_s.pow2_128 - 1 /\ x * y <= Vale.Def.Words_s.pow2_128 - 2 * Vale.Def.Words_s.pow2_64 + 1)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Def.Types_s.nat64", "Vale.Curve25519.FastMul_helpers.lemma_mul_pow2_bound", "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.int", "Prims.pow2", "Vale.Def.Words_s.pow2_128", "Vale.Def.Words_s.pow2_64", "Prims.l_True", "Prims.squash", "Prims.l_and", "Prims.b2t", "Prim...
[]
true
false
true
false
false
let lemma_mul_bound64 (x y: nat64) : Lemma (x * y < pow2_128 - 1 /\ x * y <= pow2_128 - 2 * pow2_64 + 1) =
assert_norm (pow2 64 == pow2_64); assert_norm (pow2 128 == pow2_128); lemma_mul_pow2_bound 64 x y
false
Vale.Curve25519.FastMul_helpers.fst
Vale.Curve25519.FastMul_helpers.lemma_mul_pow2_bound
val lemma_mul_pow2_bound (b: nat{b > 1}) (x y: natN (pow2 b)) : Lemma (x * y < pow2 (2 * b) - 1 /\ x * y <= pow2 (2 * b) - 2 * pow2 (b) + 1)
val lemma_mul_pow2_bound (b: nat{b > 1}) (x y: natN (pow2 b)) : Lemma (x * y < pow2 (2 * b) - 1 /\ x * y <= pow2 (2 * b) - 2 * pow2 (b) + 1)
let lemma_mul_pow2_bound (b:nat{b > 1}) (x y:natN (pow2 b)) : Lemma (x * y < pow2 (2*b) - 1 /\ x * y <= pow2 (2*b) - 2*pow2(b) + 1) = lemma_mul_bounds_le x (pow2 b - 1) y (pow2 b -1); pow2_plus b b; assert ( (pow2 b - 1) * (pow2 b -1) = pow2 (2*b) - 2*pow2(b) + 1)
{ "file_name": "vale/code/crypto/ecc/curve25519/Vale.Curve25519.FastMul_helpers.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 69, "end_line": 19, "start_col": 0, "start_line": 14 }
module Vale.Curve25519.FastMul_helpers open Vale.Def.Words_s open Vale.Def.Types_s open FStar.Mul open FStar.Tactics open FStar.Tactics.CanonCommSemiring open Vale.Curve25519.Fast_defs open Vale.Curve25519.Fast_lemmas_internal open FStar.Math.Lemmas #reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflectio...
{ "checked_file": "/", "dependencies": [ "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Curve25519.Fast_lemmas_internal.fsti.checked", "Vale.Curve25519.Fast_defs.fst.checked", "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiri...
[ { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_lemmas_internal", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_defs", "short_module": null }, { ...
{ "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_el...
false
b: Prims.nat{b > 1} -> x: Vale.Def.Words_s.natN (Prims.pow2 b) -> y: Vale.Def.Words_s.natN (Prims.pow2 b) -> FStar.Pervasives.Lemma (ensures x * y < Prims.pow2 (2 * b) - 1 /\ x * y <= Prims.pow2 (2 * b) - 2 * Prims.pow2 b + 1)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.nat", "Prims.b2t", "Prims.op_GreaterThan", "Vale.Def.Words_s.natN", "Prims.pow2", "Prims._assert", "Prims.op_Equality", "Prims.int", "FStar.Mul.op_Star", "Prims.op_Subtraction", "Prims.op_Addition", "Prims.unit", "FStar.Math.Lemmas.pow2_plus", "Vale.Curve25519.Fast_lemmas_internal.l...
[]
true
false
true
false
false
let lemma_mul_pow2_bound (b: nat{b > 1}) (x y: natN (pow2 b)) : Lemma (x * y < pow2 (2 * b) - 1 /\ x * y <= pow2 (2 * b) - 2 * pow2 (b) + 1) =
lemma_mul_bounds_le x (pow2 b - 1) y (pow2 b - 1); pow2_plus b b; assert ((pow2 b - 1) * (pow2 b - 1) = pow2 (2 * b) - 2 * pow2 (b) + 1)
false
Vale.Curve25519.FastMul_helpers.fst
Vale.Curve25519.FastMul_helpers.lemma_prod_bounds
val lemma_prod_bounds (dst_hi dst_lo x y: nat64) : Lemma (requires pow2_64 * dst_hi + dst_lo == x * y) (ensures dst_hi < pow2_64 - 1 /\ (dst_hi < pow2_64 - 2 \/ dst_lo <= 1))
val lemma_prod_bounds (dst_hi dst_lo x y: nat64) : Lemma (requires pow2_64 * dst_hi + dst_lo == x * y) (ensures dst_hi < pow2_64 - 1 /\ (dst_hi < pow2_64 - 2 \/ dst_lo <= 1))
let lemma_prod_bounds (dst_hi dst_lo x y:nat64) : Lemma (requires pow2_64 * dst_hi + dst_lo == x * y) (ensures dst_hi < pow2_64 - 1 /\ (dst_hi < pow2_64 - 2 \/ dst_lo <= 1)) = let result = x * y in lemma_div_mod result pow2_64; //assert (result = pow2_64 * (result / pow2_64)...
{ "file_name": "vale/code/crypto/ecc/curve25519/Vale.Curve25519.FastMul_helpers.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 25, "end_line": 46, "start_col": 0, "start_line": 33 }
module Vale.Curve25519.FastMul_helpers open Vale.Def.Words_s open Vale.Def.Types_s open FStar.Mul open FStar.Tactics open FStar.Tactics.CanonCommSemiring open Vale.Curve25519.Fast_defs open Vale.Curve25519.Fast_lemmas_internal open FStar.Math.Lemmas #reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflectio...
{ "checked_file": "/", "dependencies": [ "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Curve25519.Fast_lemmas_internal.fsti.checked", "Vale.Curve25519.Fast_defs.fst.checked", "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiri...
[ { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_lemmas_internal", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_defs", "short_module": null }, { ...
{ "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_el...
false
dst_hi: Vale.Def.Types_s.nat64 -> dst_lo: Vale.Def.Types_s.nat64 -> x: Vale.Def.Types_s.nat64 -> y: Vale.Def.Types_s.nat64 -> FStar.Pervasives.Lemma (requires Vale.Def.Words_s.pow2_64 * dst_hi + dst_lo == x * y) (ensures dst_hi < Vale.Def.Words_s.pow2_64 - 1 /\ (dst_hi < Vale.De...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Def.Types_s.nat64", "Vale.Curve25519.FastMul_helpers.lemma_mul_bound64", "Prims.unit", "FStar.Math.Lemmas.lemma_div_mod", "Vale.Def.Words_s.pow2_64", "Prims.int", "FStar.Mul.op_Star", "Prims.eq2", "Prims.op_Addition", "Prims.squash", "Prims.l_and", "Prims.b2t", "Prims.op_LessThan", "...
[]
true
false
true
false
false
let lemma_prod_bounds (dst_hi dst_lo x y: nat64) : Lemma (requires pow2_64 * dst_hi + dst_lo == x * y) (ensures dst_hi < pow2_64 - 1 /\ (dst_hi < pow2_64 - 2 \/ dst_lo <= 1)) =
let result = x * y in lemma_div_mod result pow2_64; lemma_mul_bound64 x y
false
Vale.Curve25519.FastMul_helpers.fst
Vale.Curve25519.FastMul_helpers.lemma_offset_sum
val lemma_offset_sum (a_agg: nat) (a0 a1 a2 a3 a4: nat64) (b_agg: nat) (b0 b1 b2 b3 b4: nat64) : Lemma (requires a_agg = pow2_five a0 a1 a2 a3 a4 /\ b_agg = pow2_five b0 b1 b2 b3 b4) (ensures a_agg + pow2_64 * b_agg = pow2_six a0 (a1 + b0) (a2 + b1) (a3 + b2) (a4 + b3) b4)
val lemma_offset_sum (a_agg: nat) (a0 a1 a2 a3 a4: nat64) (b_agg: nat) (b0 b1 b2 b3 b4: nat64) : Lemma (requires a_agg = pow2_five a0 a1 a2 a3 a4 /\ b_agg = pow2_five b0 b1 b2 b3 b4) (ensures a_agg + pow2_64 * b_agg = pow2_six a0 (a1 + b0) (a2 + b1) (a3 + b2) (a4 + b3) b4)
let lemma_offset_sum (a_agg:nat) (a0 a1 a2 a3 a4:nat64) (b_agg:nat) (b0 b1 b2 b3 b4:nat64) : Lemma (requires a_agg = pow2_five a0 a1 a2 a3 a4 /\ b_agg = pow2_five b0 b1 b2 b3 b4) (ensures a_agg + pow2_64 * b_agg = pow2_six a0 (a1 + b0) (a2 + b1) (a3 + b2) (a4 + b3)...
{ "file_name": "vale/code/crypto/ecc/curve25519/Vale.Curve25519.FastMul_helpers.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 43, "end_line": 65, "start_col": 0, "start_line": 54 }
module Vale.Curve25519.FastMul_helpers open Vale.Def.Words_s open Vale.Def.Types_s open FStar.Mul open FStar.Tactics open FStar.Tactics.CanonCommSemiring open Vale.Curve25519.Fast_defs open Vale.Curve25519.Fast_lemmas_internal open FStar.Math.Lemmas #reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflectio...
{ "checked_file": "/", "dependencies": [ "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Curve25519.Fast_lemmas_internal.fsti.checked", "Vale.Curve25519.Fast_defs.fst.checked", "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiri...
[ { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_lemmas_internal", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_defs", "short_module": null }, { ...
{ "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_el...
false
a_agg: Prims.nat -> a0: Vale.Def.Types_s.nat64 -> a1: Vale.Def.Types_s.nat64 -> a2: Vale.Def.Types_s.nat64 -> a3: Vale.Def.Types_s.nat64 -> a4: Vale.Def.Types_s.nat64 -> b_agg: Prims.nat -> b0: Vale.Def.Types_s.nat64 -> b1: Vale.Def.Types_s.nat64 -> b2: Vale.Def.Types_s.nat64 ->...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.nat", "Vale.Def.Types_s.nat64", "FStar.Tactics.Effect.assert_by_tactic", "Prims.eq2", "Prims.int", "Vale.Curve25519.FastMul_helpers.int_canon", "Prims.unit", "Vale.Curve25519.Fast_defs.pow2_six", "Prims.op_Addition", "FStar.Mul.op_Star", "Vale.Def.Words_s.pow2_64", "Prims.l_and", "Pri...
[]
true
false
true
false
false
let lemma_offset_sum (a_agg: nat) (a0 a1 a2 a3 a4: nat64) (b_agg: nat) (b0 b1 b2 b3 b4: nat64) : Lemma (requires a_agg = pow2_five a0 a1 a2 a3 a4 /\ b_agg = pow2_five b0 b1 b2 b3 b4) (ensures a_agg + pow2_64 * b_agg = pow2_six a0 (a1 + b0) (a2 + b1) (a3 + b2) (a4 + b3) b4) =
let lhs = a_agg + pow2_64 * b_agg in let rhs = pow2_six a0 (a1 + b0) (a2 + b1) (a3 + b2) (a4 + b3) b4 in assert_by_tactic (lhs == rhs) int_canon
false
Lib.ByteSequence.fst
Lib.ByteSequence.mask_select
val mask_select: #t:inttype{~(S128? t)} -> mask:int_t t SEC -> a:int_t t SEC -> b:int_t t SEC -> int_t t SEC
val mask_select: #t:inttype{~(S128? t)} -> mask:int_t t SEC -> a:int_t t SEC -> b:int_t t SEC -> int_t t SEC
let mask_select #t mask a b = b ^. (mask &. (a ^. b))
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 25, "end_line": 79, "start_col": 0, "start_line": 78 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
mask: Lib.IntTypes.int_t t Lib.IntTypes.SEC -> a: Lib.IntTypes.int_t t Lib.IntTypes.SEC -> b: Lib.IntTypes.int_t t Lib.IntTypes.SEC -> Lib.IntTypes.int_t t Lib.IntTypes.SEC
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_not", "Prims.b2t", "Lib.IntTypes.uu___is_S128", "Lib.IntTypes.int_t", "Lib.IntTypes.SEC", "Lib.IntTypes.op_Hat_Dot", "Lib.IntTypes.op_Amp_Dot" ]
[]
false
false
false
false
false
let mask_select #t mask a b =
b ^. (mask &. (a ^. b))
false
Steel.Reference.fsti
Steel.Reference.vptr_not_null
val vptr_not_null (#opened: _) (#a: Type) (r: ref a) : SteelGhost unit opened (vptr r) (fun _ -> vptr r) (fun _ -> True) (fun h0 _ h1 -> sel r h0 == sel r h1 /\ is_null r == false)
val vptr_not_null (#opened: _) (#a: Type) (r: ref a) : SteelGhost unit opened (vptr r) (fun _ -> vptr r) (fun _ -> True) (fun h0 _ h1 -> sel r h0 == sel r h1 /\ is_null r == false)
let vptr_not_null (#opened: _) (#a: Type) (r: ref a) : SteelGhost unit opened (vptr r) (fun _ -> vptr r) (fun _ -> True) (fun h0 _ h1 -> sel r h0 == sel r h1 /\ is_null r == false ) = vptrp_not_null r full_perm
{ "file_name": "lib/steel/Steel.Reference.fsti", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 28, "end_line": 361, "start_col": 0, "start_line": 350 }
(* Copyright 2020 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...
{ "checked_file": "/", "dependencies": [ "Steel.Memory.fsti.checked", "Steel.FractionalPermission.fst.checked", "Steel.Effect.Atomic.fsti.checked", "Steel.Effect.fsti.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Tactics.fst.checked", "FStar.Pervasives.fsti.check...
[ { "abbrev": true, "full_module": "Steel.Memory", "short_module": "Mem" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "Steel.Effect", "short_module": null }, { "abbrev": false, "full_module": "Ste...
{ "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_el...
false
r: Steel.Reference.ref a -> Steel.Effect.Atomic.SteelGhost Prims.unit
Steel.Effect.Atomic.SteelGhost
[]
[]
[ "Steel.Memory.inames", "Steel.Reference.ref", "Steel.Reference.vptrp_not_null", "Steel.FractionalPermission.full_perm", "Prims.unit", "Steel.Reference.vptr", "Steel.Effect.Common.vprop", "Steel.Effect.Common.rmem", "Prims.l_True", "Prims.l_and", "Prims.eq2", "Steel.Effect.Common.normal", "St...
[]
false
true
false
false
false
let vptr_not_null (#opened: _) (#a: Type) (r: ref a) : SteelGhost unit opened (vptr r) (fun _ -> vptr r) (fun _ -> True) (fun h0 _ h1 -> sel r h0 == sel r h1 /\ is_null r == false) =
vptrp_not_null r full_perm
false
Vale.Curve25519.FastMul_helpers.fst
Vale.Curve25519.FastMul_helpers.lemma_sum_a2b
val lemma_sum_a2b (a0 a1 a2:nat64) (a0a1b:nat) (a0a1b_0 a0a1b_1 a0a1b_2 a0a1b_3 a0a1b_4 a0a1b_5:nat64) (a2b:nat) (a2b_0 a2b_1 a2b_2 a2b_3 a2b_4:nat64) (b:nat) (b0 b1 b2 b3:nat64) (s1 s2 s3 s4 s5:nat64) : Lemma (requires a0a1b = pow2_six a0a1b_0 a0a1b_1 a0a1b_2 a0a1b_3 a0a1b_4 a0a1b_5 ...
val lemma_sum_a2b (a0 a1 a2:nat64) (a0a1b:nat) (a0a1b_0 a0a1b_1 a0a1b_2 a0a1b_3 a0a1b_4 a0a1b_5:nat64) (a2b:nat) (a2b_0 a2b_1 a2b_2 a2b_3 a2b_4:nat64) (b:nat) (b0 b1 b2 b3:nat64) (s1 s2 s3 s4 s5:nat64) : Lemma (requires a0a1b = pow2_six a0a1b_0 a0a1b_1 a0a1b_2 a0a1b_3 a0a1b_4 a0a1b_5 ...
let lemma_sum_a2b (a0 a1 a2:nat64) (a0a1b:nat) (a0a1b_0 a0a1b_1 a0a1b_2 a0a1b_3 a0a1b_4 a0a1b_5:nat64) (a2b:nat) (a2b_0 a2b_1 a2b_2 a2b_3 a2b_4:nat64) (b:nat) (b0 b1 b2 b3:nat64) (s1 s2 s3 s4 s5:nat64) : Lemma (requires a0a1b = pow2_six a0a1b_0 a0a1b_1 a0a1b_2 a0a1b_3 a0a1b_4 a0a1b_5 ...
{ "file_name": "vale/code/crypto/ecc/curve25519/Vale.Curve25519.FastMul_helpers.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 4, "end_line": 215, "start_col": 0, "start_line": 176 }
module Vale.Curve25519.FastMul_helpers open Vale.Def.Words_s open Vale.Def.Types_s open FStar.Mul open FStar.Tactics open FStar.Tactics.CanonCommSemiring open Vale.Curve25519.Fast_defs open Vale.Curve25519.Fast_lemmas_internal open FStar.Math.Lemmas #reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflectio...
{ "checked_file": "/", "dependencies": [ "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Curve25519.Fast_lemmas_internal.fsti.checked", "Vale.Curve25519.Fast_defs.fst.checked", "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiri...
[ { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_lemmas_internal", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_defs", "short_module": null }, { ...
{ "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_el...
false
a0: Vale.Def.Types_s.nat64 -> a1: Vale.Def.Types_s.nat64 -> a2: Vale.Def.Types_s.nat64 -> a0a1b: Prims.nat -> a0a1b_0: Vale.Def.Types_s.nat64 -> a0a1b_1: Vale.Def.Types_s.nat64 -> a0a1b_2: Vale.Def.Types_s.nat64 -> a0a1b_3: Vale.Def.Types_s.nat64 -> a0a1b_4: Vale.Def.Types_s.nat64 -...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Def.Types_s.nat64", "Prims.nat", "Prims.unit", "Vale.Curve25519.FastMul_helpers.lemma_partial_sum_a2b", "FStar.Tactics.Effect.assert_by_tactic", "Prims.eq2", "Prims.int", "Prims.op_Addition", "FStar.Mul.op_Star", "Vale.Def.Words_s.pow2_128", "Vale.Curve25519.Fast_defs.pow2_seven", "Vale....
[]
true
false
true
false
false
let lemma_sum_a2b (a0 a1 a2: nat64) (a0a1b: nat) (a0a1b_0 a0a1b_1 a0a1b_2 a0a1b_3 a0a1b_4 a0a1b_5: nat64) (a2b: nat) (a2b_0 a2b_1 a2b_2 a2b_3 a2b_4: nat64) (b: nat) (b0 b1 b2 b3 s1 s2 s3 s4 s5: nat64) : Lemma (requires a0a1b = pow2_six a0a1b_0 a0a1b_1 a0a1b_2 ...
assert_by_tactic ((pow2_three a0 a1 a2) * b == mul_nats (pow2_two a0 a1) b + pow2_128 * (mul_nats a2 b)) int_canon; assert (mul_nats (pow2_two a0 a1) b + pow2_128 * (mul_nats a2 b) == a0a1b + pow2_128 * a2b); assert_by_tactic (a0a1b + pow2_128 * a2b == pow2_seven a0a1b_0 a0a1b_1 (a0a1b_2 + a2b_0) ...
false
Vale.Curve25519.FastMul_helpers.fst
Vale.Curve25519.FastMul_helpers.lemma_sum_a1b
val lemma_sum_a1b (a0 a1:nat64) (a0b:nat) (a0b_0 a0b_1 a0b_2 a0b_3 a0b_4:nat64) (a1b:nat) (a1b_0 a1b_1 a1b_2 a1b_3 a1b_4:nat64) (b:nat) (b0 b1 b2 b3:nat64) (s1 s2 s3 s4 s5 c:nat64) : Lemma (requires a0b = pow2_five a0b_0 a0b_1 a0b_2 a0b_3 a0b_4 /\ a1b = pow2_five a1b_...
val lemma_sum_a1b (a0 a1:nat64) (a0b:nat) (a0b_0 a0b_1 a0b_2 a0b_3 a0b_4:nat64) (a1b:nat) (a1b_0 a1b_1 a1b_2 a1b_3 a1b_4:nat64) (b:nat) (b0 b1 b2 b3:nat64) (s1 s2 s3 s4 s5 c:nat64) : Lemma (requires a0b = pow2_five a0b_0 a0b_1 a0b_2 a0b_3 a0b_4 /\ a1b = pow2_five a1b_...
let lemma_sum_a1b (a0 a1:nat64) (a0b:nat) (a0b_0 a0b_1 a0b_2 a0b_3 a0b_4:nat64) (a1b:nat) (a1b_0 a1b_1 a1b_2 a1b_3 a1b_4:nat64) (b:nat) (b0 b1 b2 b3:nat64) (s1 s2 s3 s4 s5 c:nat64) : Lemma (requires a0b = pow2_five a0b_0 a0b_1 a0b_2 a0b_3 a0b_4 /\ a1b = pow2_five a1b_...
{ "file_name": "vale/code/crypto/ecc/curve25519/Vale.Curve25519.FastMul_helpers.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 4, "end_line": 173, "start_col": 0, "start_line": 133 }
module Vale.Curve25519.FastMul_helpers open Vale.Def.Words_s open Vale.Def.Types_s open FStar.Mul open FStar.Tactics open FStar.Tactics.CanonCommSemiring open Vale.Curve25519.Fast_defs open Vale.Curve25519.Fast_lemmas_internal open FStar.Math.Lemmas #reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflectio...
{ "checked_file": "/", "dependencies": [ "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Curve25519.Fast_lemmas_internal.fsti.checked", "Vale.Curve25519.Fast_defs.fst.checked", "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiri...
[ { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_lemmas_internal", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_defs", "short_module": null }, { ...
{ "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_el...
false
a0: Vale.Def.Types_s.nat64 -> a1: Vale.Def.Types_s.nat64 -> a0b: Prims.nat -> a0b_0: Vale.Def.Types_s.nat64 -> a0b_1: Vale.Def.Types_s.nat64 -> a0b_2: Vale.Def.Types_s.nat64 -> a0b_3: Vale.Def.Types_s.nat64 -> a0b_4: Vale.Def.Types_s.nat64 -> a1b: Prims.nat -> a1b_0: Vale.Def.Ty...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Def.Types_s.nat64", "Prims.nat", "Prims.unit", "Vale.Curve25519.FastMul_helpers.lemma_partial_sum", "Prims._assert", "Prims.eq2", "Vale.Curve25519.Fast_defs.pow2_two", "Vale.Curve25519.Fast_defs.pow2_six", "Prims.op_Addition", "Vale.Curve25519.FastMul_helpers.lemma_offset_sum", "Vale.Curve...
[]
true
false
true
false
false
let lemma_sum_a1b (a0 a1: nat64) (a0b: nat) (a0b_0 a0b_1 a0b_2 a0b_3 a0b_4: nat64) (a1b: nat) (a1b_0 a1b_1 a1b_2 a1b_3 a1b_4: nat64) (b: nat) (b0 b1 b2 b3 s1 s2 s3 s4 s5 c: nat64) : Lemma (requires a0b = pow2_five a0b_0 a0b_1 a0b_2 a0b_3 a0b_4 /\ a1b =...
assert_by_tactic ((pow2_two a0 a1) * b == pow2_two (mul_nats a0 b) (mul_nats a1 b)) int_canon; assert (pow2_two (mul_nats a0 b) (mul_nats a1 b) == pow2_two a0b a1b); lemma_offset_sum a0b a0b_0 a0b_1 a0b_2 a0b_3 a0b_4 a1b a1b_0 a1b_1 a1b_2 a1b_3 a1b_4; assert (pow2_two a0b a1b == pow2_six a0b_0 (a0b_1 + a1b_0) (a0b_...
false
Lib.ByteSequence.fst
Lib.ByteSequence.mask_select_lemma
val mask_select_lemma: #t:inttype{~(S128? t)} -> mask:int_t t SEC -> a:int_t t SEC -> b:int_t t SEC -> Lemma (requires v mask = 0 \/ v mask = v (ones t SEC)) (ensures mask_select mask a b == (if v mask = 0 then b else a))
val mask_select_lemma: #t:inttype{~(S128? t)} -> mask:int_t t SEC -> a:int_t t SEC -> b:int_t t SEC -> Lemma (requires v mask = 0 \/ v mask = v (ones t SEC)) (ensures mask_select mask a b == (if v mask = 0 then b else a))
let mask_select_lemma #t mask a b = let t1 = mask &. (a ^. b) in let t2 = b ^. t1 in logand_lemma mask (a ^.b); if v mask = 0 then begin assert (v t1 == 0); logxor_lemma b t1; assert (v t2 = v b); () end else begin assert (v t1 == v (a ^. b)); logxor_lemma b a; assert (v t2 = v a);...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 10, "end_line": 94, "start_col": 0, "start_line": 81 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
mask: Lib.IntTypes.int_t t Lib.IntTypes.SEC -> a: Lib.IntTypes.int_t t Lib.IntTypes.SEC -> b: Lib.IntTypes.int_t t Lib.IntTypes.SEC -> FStar.Pervasives.Lemma (requires Lib.IntTypes.v mask = 0 \/ Lib.IntTypes.v mask = Lib.IntTypes.v (Lib.IntTypes.ones t Lib.IntTypes.SEC)) (ensu...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_not", "Prims.b2t", "Lib.IntTypes.uu___is_S128", "Lib.IntTypes.int_t", "Lib.IntTypes.SEC", "Prims.op_Equality", "Prims.int", "Lib.IntTypes.v", "Prims.unit", "Prims._assert", "Lib.IntTypes.range_t", "Lib.IntTypes.logxor_lemma", "Prims.eq2", "Prims.bool", ...
[]
false
false
true
false
false
let mask_select_lemma #t mask a b =
let t1 = mask &. (a ^. b) in let t2 = b ^. t1 in logand_lemma mask (a ^. b); if v mask = 0 then (assert (v t1 == 0); logxor_lemma b t1; assert (v t2 = v b); ()) else (assert (v t1 == v (a ^. b)); logxor_lemma b a; assert (v t2 = v a); ())
false
Steel.Reference.fsti
Steel.Reference.read
val read (#a: Type0) (r: ref a) : Steel a (vptr r) (fun _ -> vptr r) (requires fun _ -> True) (ensures fun h0 x h1 -> sel r h0 == sel r h1 /\ x == sel r h1)
val read (#a: Type0) (r: ref a) : Steel a (vptr r) (fun _ -> vptr r) (requires fun _ -> True) (ensures fun h0 x h1 -> sel r h0 == sel r h1 /\ x == sel r h1)
let read (#a:Type0) (r:ref a) : Steel a (vptr r) (fun _ -> vptr r) (requires fun _ -> True) (ensures fun h0 x h1 -> sel r h0 == sel r h1 /\ x == sel r h1) = readp r full_perm
{ "file_name": "lib/steel/Steel.Reference.fsti", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 19, "end_line": 298, "start_col": 0, "start_line": 294 }
(* Copyright 2020 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...
{ "checked_file": "/", "dependencies": [ "Steel.Memory.fsti.checked", "Steel.FractionalPermission.fst.checked", "Steel.Effect.Atomic.fsti.checked", "Steel.Effect.fsti.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Tactics.fst.checked", "FStar.Pervasives.fsti.check...
[ { "abbrev": true, "full_module": "Steel.Memory", "short_module": "Mem" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "Steel.Effect", "short_module": null }, { "abbrev": false, "full_module": "Ste...
{ "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_el...
false
r: Steel.Reference.ref a -> Steel.Effect.Steel a
Steel.Effect.Steel
[]
[]
[ "Steel.Reference.ref", "Steel.Reference.readp", "Steel.FractionalPermission.full_perm", "Steel.Reference.vptr", "Steel.Effect.Common.vprop", "Steel.Effect.Common.rmem", "Prims.l_True", "Prims.l_and", "Prims.eq2", "Steel.Effect.Common.normal", "Steel.Effect.Common.t_of", "Steel.Reference.sel" ]
[]
false
true
false
false
false
let read (#a: Type0) (r: ref a) : Steel a (vptr r) (fun _ -> vptr r) (requires fun _ -> True) (ensures fun h0 x h1 -> sel r h0 == sel r h1 /\ x == sel r h1) =
readp r full_perm
false
Lib.ByteSequence.fst
Lib.ByteSequence.seq_mask_select
val seq_mask_select: #t:inttype{~(S128? t)} -> #len:size_nat -> a:lseq (int_t t SEC) len -> b:lseq (int_t t SEC) len -> mask:int_t t SEC -> Pure (lseq (int_t t SEC) len) (requires v mask = 0 \/ v mask = v (ones t SEC)) (ensures fun res -> res == (if v mask = 0 then b else a))
val seq_mask_select: #t:inttype{~(S128? t)} -> #len:size_nat -> a:lseq (int_t t SEC) len -> b:lseq (int_t t SEC) len -> mask:int_t t SEC -> Pure (lseq (int_t t SEC) len) (requires v mask = 0 \/ v mask = v (ones t SEC)) (ensures fun res -> res == (if v mask = 0 then b else a))
let seq_mask_select #t #len a b mask = let res = map2 (mask_select mask) a b in let lemma_aux (i:nat{i < len}) : Lemma (v res.[i] == (if v mask = 0 then v b.[i] else v a.[i])) = mask_select_lemma mask a.[i] b.[i] in Classical.forall_intro lemma_aux; if v mask = 0 then eq_intro res b else eq_intro res a; ...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 104, "start_col": 0, "start_line": 96 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
a: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len -> b: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len -> mask: Lib.IntTypes.int_t t Lib.IntTypes.SEC -> Prims.Pure (Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len)
Prims.Pure
[]
[]
[ "Lib.IntTypes.inttype", "Prims.l_not", "Prims.b2t", "Lib.IntTypes.uu___is_S128", "Lib.IntTypes.size_nat", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.SEC", "Prims.unit", "Prims.op_Equality", "Prims.int", "Lib.IntTypes.v", "Lib.Sequence.eq_intro", "Prims.bool", "FStar.Classic...
[]
false
false
false
false
false
let seq_mask_select #t #len a b mask =
let res = map2 (mask_select mask) a b in let lemma_aux (i: nat{i < len}) : Lemma (v res.[ i ] == (if v mask = 0 then v b.[ i ] else v a.[ i ])) = mask_select_lemma mask a.[ i ] b.[ i ] in Classical.forall_intro lemma_aux; if v mask = 0 then eq_intro res b else eq_intro res a; res
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_not_equal_slice
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:nat{i <= j /\ i <= k /\ j <= k /\ k <= Seq.length b1 /\ k <= Seq.length b2 } -> Lemma (requires ~(Seq.equal (Seq.slice b1 i j) (Seq.slice b2 i j))) (ensures ~(Seq.equal (Seq.slice b1 i k) (Seq.slice b2 i k)))
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:nat{i <= j /\ i <= k /\ j <= k /\ k <= Seq.length b1 /\ k <= Seq.length b2 } -> Lemma (requires ~(Seq.equal (Seq.slice b1 i j) (Seq.slice b2 i j))) (ensures ~(Seq.equal (Seq.slice b1 i k) (Seq.slice b2 i k)))
let lemma_not_equal_slice #a b1 b2 i j k = assert (forall (n:nat{n < k - i}). Seq.index (Seq.slice b1 i k) n == Seq.index b1 (n + i))
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 92, "end_line": 20, "start_col": 0, "start_line": 19 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
b1: FStar.Seq.Base.seq a -> b2: FStar.Seq.Base.seq a -> i: Prims.nat -> j: Prims.nat -> k: Prims.nat { i <= j /\ i <= k /\ j <= k /\ k <= FStar.Seq.Base.length b1 /\ k <= FStar.Seq.Base.length b2 } -> FStar.Pervasives.Lemma (requires ~(FStar.Seq.Base.equal (FStar.Seq...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "FStar.Seq.Base.seq", "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "FStar.Seq.Base.length", "Prims._assert", "Prims.l_Forall", "Prims.op_LessThan", "Prims.op_Subtraction", "Prims.eq2", "FStar.Seq.Base.index", "FStar.Seq.Base.slice", "Prims.op_Addition", "Prims.uni...
[]
false
false
true
false
false
let lemma_not_equal_slice #a b1 b2 i j k =
assert (forall (n: nat{n < k - i}). Seq.index (Seq.slice b1 i k) n == Seq.index b1 (n + i))
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_not_equal_last
val lemma_not_equal_last: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat{i < j /\ j <= Seq.length b1 /\ j <= Seq.length b2} -> Lemma (requires ~(Seq.index b1 (j - 1) == Seq.index b2 (j - 1))) (ensures ~(Seq.equal (Seq.slice b1 i j) (Seq.slice b2 i j)))
val lemma_not_equal_last: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat{i < j /\ j <= Seq.length b1 /\ j <= Seq.length b2} -> Lemma (requires ~(Seq.index b1 (j - 1) == Seq.index b2 (j - 1))) (ensures ~(Seq.equal (Seq.slice b1 i j) (Seq.slice b2 i j)))
let lemma_not_equal_last #a b1 b2 i j = Seq.lemma_index_slice b1 i j (j - i - 1); Seq.lemma_index_slice b2 i j (j - i - 1)
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 42, "end_line": 29, "start_col": 0, "start_line": 27 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
b1: FStar.Seq.Base.seq a -> b2: FStar.Seq.Base.seq a -> i: Prims.nat -> j: Prims.nat{i < j /\ j <= FStar.Seq.Base.length b1 /\ j <= FStar.Seq.Base.length b2} -> FStar.Pervasives.Lemma (requires ~(FStar.Seq.Base.index b1 (j - 1) == FStar.Seq.Base.index b2 (j - 1))) (ensures ~(FStar.Seq.Bas...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "FStar.Seq.Base.seq", "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThan", "Prims.op_LessThanOrEqual", "FStar.Seq.Base.length", "FStar.Seq.Base.lemma_index_slice", "Prims.op_Subtraction", "Prims.unit" ]
[]
true
false
true
false
false
let lemma_not_equal_last #a b1 b2 i j =
Seq.lemma_index_slice b1 i j (j - i - 1); Seq.lemma_index_slice b2 i j (j - i - 1)
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_from_intseq_be
val nat_from_intseq_be: #t:inttype{unsigned t} -> #l:secrecy_level -> b:seq (uint_t t l) -> n:nat{n < pow2 (length b * bits t)}
val nat_from_intseq_be: #t:inttype{unsigned t} -> #l:secrecy_level -> b:seq (uint_t t l) -> n:nat{n < pow2 (length b * bits t)}
let nat_from_intseq_be = nat_from_intseq_be_
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 44, "end_line": 122, "start_col": 0, "start_line": 122 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) -> n: Prims.nat{n < Prims.pow2 (Lib.Sequence.length b * Lib.IntTypes.bits t)}
Prims.Tot
[ "total" ]
[]
[ "Lib.ByteSequence.nat_from_intseq_be_" ]
[]
false
false
false
false
false
let nat_from_intseq_be =
nat_from_intseq_be_
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_from_intseq_le
val nat_from_intseq_le: #t:inttype{unsigned t} -> #l:secrecy_level -> b:seq (uint_t t l) -> n:nat{n < pow2 (length b * bits t)}
val nat_from_intseq_le: #t:inttype{unsigned t} -> #l:secrecy_level -> b:seq (uint_t t l) -> n:nat{n < pow2 (length b * bits t)}
let nat_from_intseq_le = nat_from_intseq_le_
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 44, "end_line": 141, "start_col": 0, "start_line": 141 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) -> n: Prims.nat{n < Prims.pow2 (Lib.Sequence.length b * Lib.IntTypes.bits t)}
Prims.Tot
[ "total" ]
[]
[ "Lib.ByteSequence.nat_from_intseq_le_" ]
[]
false
false
false
false
false
let nat_from_intseq_le =
nat_from_intseq_le_
false
Vale.Curve25519.FastMul_helpers.fst
Vale.Curve25519.FastMul_helpers.lemma_sum_a3b
val lemma_sum_a3b (a0 a1 a2 a3:nat64) (a0a1a2b:nat) (a0a1a2b_0 a0a1a2b_1 a0a1a2b_2 a0a1a2b_3 a0a1a2b_4 a0a1a2b_5 a0a1a2b_6:nat64) (a3b:nat) (a3b_0 a3b_1 a3b_2 a3b_3 a3b_4:nat64) (b:nat) (b0 b1 b2 b3:nat64) (s1 s2 s3 s4 s5:nat64) : Lemma (requires a0a1a2b = pow2_seven a0a1a2b_0 a0a1a2b_...
val lemma_sum_a3b (a0 a1 a2 a3:nat64) (a0a1a2b:nat) (a0a1a2b_0 a0a1a2b_1 a0a1a2b_2 a0a1a2b_3 a0a1a2b_4 a0a1a2b_5 a0a1a2b_6:nat64) (a3b:nat) (a3b_0 a3b_1 a3b_2 a3b_3 a3b_4:nat64) (b:nat) (b0 b1 b2 b3:nat64) (s1 s2 s3 s4 s5:nat64) : Lemma (requires a0a1a2b = pow2_seven a0a1a2b_0 a0a1a2b_...
let lemma_sum_a3b (a0 a1 a2 a3:nat64) (a0a1a2b:nat) (a0a1a2b_0 a0a1a2b_1 a0a1a2b_2 a0a1a2b_3 a0a1a2b_4 a0a1a2b_5 a0a1a2b_6:nat64) (a3b:nat) (a3b_0 a3b_1 a3b_2 a3b_3 a3b_4:nat64) (b:nat) (b0 b1 b2 b3:nat64) (s1 s2 s3 s4 s5:nat64) : Lemma (requires a0a1a2b = pow2_seven a0a1a2b_0 a0a1a2b_...
{ "file_name": "vale/code/crypto/ecc/curve25519/Vale.Curve25519.FastMul_helpers.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 4, "end_line": 257, "start_col": 0, "start_line": 218 }
module Vale.Curve25519.FastMul_helpers open Vale.Def.Words_s open Vale.Def.Types_s open FStar.Mul open FStar.Tactics open FStar.Tactics.CanonCommSemiring open Vale.Curve25519.Fast_defs open Vale.Curve25519.Fast_lemmas_internal open FStar.Math.Lemmas #reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflectio...
{ "checked_file": "/", "dependencies": [ "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Curve25519.Fast_lemmas_internal.fsti.checked", "Vale.Curve25519.Fast_defs.fst.checked", "prims.fst.checked", "FStar.Tactics.Effect.fsti.checked", "FStar.Tactics.CanonCommSemiri...
[ { "abbrev": false, "full_module": "FStar.Math.Lemmas", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_lemmas_internal", "short_module": null }, { "abbrev": false, "full_module": "Vale.Curve25519.Fast_defs", "short_module": null }, { ...
{ "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_el...
false
a0: Vale.Def.Types_s.nat64 -> a1: Vale.Def.Types_s.nat64 -> a2: Vale.Def.Types_s.nat64 -> a3: Vale.Def.Types_s.nat64 -> a0a1a2b: Prims.nat -> a0a1a2b_0: Vale.Def.Types_s.nat64 -> a0a1a2b_1: Vale.Def.Types_s.nat64 -> a0a1a2b_2: Vale.Def.Types_s.nat64 -> a0a1a2b_3: Vale.Def.Types_s.na...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Vale.Def.Types_s.nat64", "Prims.nat", "Prims.unit", "Vale.Curve25519.FastMul_helpers.lemma_partial_sum_a3b", "FStar.Tactics.Effect.assert_by_tactic", "Prims.eq2", "Prims.int", "Prims.op_Addition", "FStar.Mul.op_Star", "Vale.Curve25519.Fast_defs.pow2_192", "Vale.Curve25519.Fast_defs.pow2_eight",...
[]
true
false
true
false
false
let lemma_sum_a3b (a0 a1 a2 a3: nat64) (a0a1a2b: nat) (a0a1a2b_0 a0a1a2b_1 a0a1a2b_2 a0a1a2b_3 a0a1a2b_4 a0a1a2b_5 a0a1a2b_6: nat64) (a3b: nat) (a3b_0 a3b_1 a3b_2 a3b_3 a3b_4: nat64) (b: nat) (b0 b1 b2 b3 s1 s2 s3 s4 s5: nat64) : Lemma (requires a0a1a2b = pow2...
assert_by_tactic ((pow2_four a0 a1 a2 a3) * b == mul_nats (pow2_three a0 a1 a2) b + pow2_192 * (mul_nats a3 b)) int_canon; assert (mul_nats (pow2_three a0 a1 a2) b + pow2_192 * (mul_nats a3 b) == a0a1a2b + pow2_192 * a3b); assert_by_tactic (a0a1a2b + pow2_192 * a3b == pow2_eight a0a1a2b_0 a0a1a2b_1 ...
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_to_intseq_be
val nat_to_intseq_be: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} -> b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_be b}
val nat_to_intseq_be: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} -> b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_be b}
let nat_to_intseq_be = nat_to_intseq_be_
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 40, "end_line": 163, "start_col": 0, "start_line": 163 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 1, "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_el...
false
len: Prims.nat -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) {Lib.Sequence.length b == len /\ n == Lib.ByteSequence.nat_from_intseq_be b}
Prims.Tot
[ "total" ]
[]
[ "Lib.ByteSequence.nat_to_intseq_be_" ]
[]
false
false
false
false
false
let nat_to_intseq_be =
nat_to_intseq_be_
false
Steel.Reference.fsti
Steel.Reference.ghost_read
val ghost_read (#a: Type0) (#opened: inames) (r: ghost_ref a) : SteelGhost (Ghost.erased a) opened (ghost_vptr r) (fun _ -> ghost_vptr r) (requires fun _ -> True) (ensures fun h0 x h1 -> h0 (ghost_vptr r) == h1 (ghost_vptr r) /\ Ghost.reveal x == h1 (ghost_vptr r) )
val ghost_read (#a: Type0) (#opened: inames) (r: ghost_ref a) : SteelGhost (Ghost.erased a) opened (ghost_vptr r) (fun _ -> ghost_vptr r) (requires fun _ -> True) (ensures fun h0 x h1 -> h0 (ghost_vptr r) == h1 (ghost_vptr r) /\ Ghost.reveal x == h1 (ghost_vptr r) )
let ghost_read (#a:Type0) (#opened:inames) (r:ghost_ref a) : SteelGhost (Ghost.erased a) opened (ghost_vptr r) (fun _ -> ghost_vptr r) (requires fun _ -> True) (ensures fun h0 x h1 -> h0 (ghost_vptr r) == h1 (ghost_vptr r) /\ Ghost.reveal x == h1 (ghost_vptr r)) = ghost_readp r full_perm
{ "file_name": "lib/steel/Steel.Reference.fsti", "git_rev": "f984200f79bdc452374ae994a5ca837496476c41", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
{ "end_col": 25, "end_line": 522, "start_col": 0, "start_line": 517 }
(* Copyright 2020 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...
{ "checked_file": "/", "dependencies": [ "Steel.Memory.fsti.checked", "Steel.FractionalPermission.fst.checked", "Steel.Effect.Atomic.fsti.checked", "Steel.Effect.fsti.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Tactics.fst.checked", "FStar.Pervasives.fsti.check...
[ { "abbrev": true, "full_module": "Steel.Memory", "short_module": "Mem" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "Steel.Effect", "short_module": null }, { "abbrev": false, "full_module": "Ste...
{ "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_el...
false
r: Steel.Reference.ghost_ref a -> Steel.Effect.Atomic.SteelGhost (FStar.Ghost.erased a)
Steel.Effect.Atomic.SteelGhost
[]
[]
[ "Steel.Memory.inames", "Steel.Reference.ghost_ref", "Steel.Reference.ghost_readp", "Steel.FractionalPermission.full_perm", "FStar.Ghost.erased", "Steel.Reference.ghost_vptr", "Steel.Effect.Common.vprop", "Steel.Effect.Common.rmem", "Prims.l_True", "Prims.l_and", "Prims.eq2", "Steel.Effect.Comm...
[]
false
true
false
false
false
let ghost_read (#a: Type0) (#opened: inames) (r: ghost_ref a) : SteelGhost (Ghost.erased a) opened (ghost_vptr r) (fun _ -> ghost_vptr r) (requires fun _ -> True) (ensures fun h0 x h1 -> h0 (ghost_vptr r) == h1 (ghost_vptr r) /\ Ghost.reveal x == h1 (ghost_vptr r) ) =
ghost_readp r full_perm
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_to_intseq_le
val nat_to_intseq_le: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} -> b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_le b}
val nat_to_intseq_le: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} -> b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_le b}
let nat_to_intseq_le = nat_to_intseq_le_
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 40, "end_line": 183, "start_col": 0, "start_line": 183 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 1, "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_el...
false
len: Prims.nat -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) {Lib.Sequence.length b == len /\ n == Lib.ByteSequence.nat_from_intseq_le b}
Prims.Tot
[ "total" ]
[]
[ "Lib.ByteSequence.nat_to_intseq_le_" ]
[]
false
false
false
false
false
let nat_to_intseq_le =
nat_to_intseq_le_
false
Lib.ByteSequence.fst
Lib.ByteSequence.lbytes_eq
val lbytes_eq: #len:size_nat -> b1:lbytes len -> b2:lbytes len -> b:bool{b <==> b1 == b2}
val lbytes_eq: #len:size_nat -> b1:lbytes len -> b2:lbytes len -> b:bool{b <==> b1 == b2}
let lbytes_eq #len b1 b2 = let res = seq_eq_mask b1 b2 len in RawIntTypes.u8_to_UInt8 res = 255uy
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 37, "end_line": 74, "start_col": 0, "start_line": 72 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
b1: Lib.ByteSequence.lbytes len -> b2: Lib.ByteSequence.lbytes len -> b: Prims.bool{b <==> b1 == b2}
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.size_nat", "Lib.ByteSequence.lbytes", "Prims.op_Equality", "FStar.UInt8.t", "Lib.RawIntTypes.u8_to_UInt8", "FStar.UInt8.__uint_to_t", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Prims.l_and", "Prims.l_imp", "Prims.eq2", "Lib.Sequence.lseq", "Prims.l_or", "...
[]
false
false
false
false
false
let lbytes_eq #len b1 b2 =
let res = seq_eq_mask b1 b2 len in RawIntTypes.u8_to_UInt8 res = 255uy
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_from_intseq_le_
val nat_from_intseq_le_: #t:inttype{unsigned t} -> #l:secrecy_level -> b:seq (uint_t t l) -> Tot (n:nat{n < pow2 (length b * bits t)}) (decreases (length b))
val nat_from_intseq_le_: #t:inttype{unsigned t} -> #l:secrecy_level -> b:seq (uint_t t l) -> Tot (n:nat{n < pow2 (length b * bits t)}) (decreases (length b))
let rec nat_from_intseq_le_ #t #l b = let len = length b in if len = 0 then 0 else let shift = pow2 (bits t) in let tt = Seq.slice b 1 len in let n' = nat_from_intseq_le_ #t #l tt in let l = v (Seq.index b 0) in Math.Lemmas.pow2_plus (bits t) ( len * bits t - bits t); let n = l + shift * n...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 139, "start_col": 0, "start_line": 129 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) -> Prims.Tot (n: Prims.nat{n < Prims.pow2 (Lib.Sequence.length b * Lib.IntTypes.bits t)})
Prims.Tot
[ "total", "" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.Sequence.seq", "Lib.IntTypes.uint_t", "Prims.op_Equality", "Prims.int", "Prims.bool", "Prims.op_Addition", "FStar.Mul.op_Star", "Prims.unit", "FStar.Math.Lemmas.pow2_plus", "Lib.IntTypes.bits",...
[ "recursion" ]
false
false
false
false
false
let rec nat_from_intseq_le_ #t #l b =
let len = length b in if len = 0 then 0 else let shift = pow2 (bits t) in let tt = Seq.slice b 1 len in let n' = nat_from_intseq_le_ #t #l tt in let l = v (Seq.index b 0) in Math.Lemmas.pow2_plus (bits t) (len * bits t - bits t); let n = l + shift * n' in n
false
Lib.ByteSequence.fst
Lib.ByteSequence.uint_to_bytes_le
val uint_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> uint_t t l -> lbytes_l l (numbytes t)
val uint_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> uint_t t l -> lbytes_l l (numbytes t)
let uint_to_bytes_le #t #l n = nat_to_bytes_le (numbytes t) (v n)
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 36, "end_line": 282, "start_col": 0, "start_line": 281 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
n: Lib.IntTypes.uint_t t l -> Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t)
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.uint_t", "Lib.ByteSequence.nat_to_bytes_le", "Lib.IntTypes.numbytes", "Lib.IntTypes.v", "Lib.ByteSequence.lbytes_l" ]
[]
false
false
false
false
false
let uint_to_bytes_le #t #l n =
nat_to_bytes_le (numbytes t) (v n)
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_to_bytes_le_inner
val uints_to_bytes_le_inner: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lseq (int_t t l) len -> i:nat{i < len} -> unit -> unit & (lseq (uint_t U8 l) (numbytes t))
val uints_to_bytes_le_inner: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lseq (int_t t l) len -> i:nat{i < len} -> unit -> unit & (lseq (uint_t U8 l) (numbytes t))
let uints_to_bytes_le_inner #t #l #len b i () = let open Lib.Sequence in (), uint_to_bytes_le #t #l b.[i]
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 34, "end_line": 307, "start_col": 0, "start_line": 305 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.Sequence.lseq (Lib.IntTypes.int_t t l) len -> i: Prims.nat{i < len} -> _: Prims.unit -> Prims.unit * Lib.Sequence.lseq (Lib.IntTypes.uint_t Lib.IntTypes.U8 l) (Lib.IntTypes.numbytes t)
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Prims.nat", "Prims.unit", "FStar.Pervasives.Nati...
[]
false
false
false
false
false
let uints_to_bytes_le_inner #t #l #len b i () =
let open Lib.Sequence in (), uint_to_bytes_le #t #l b.[ i ]
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_to_bytes_be_inner
val uints_to_bytes_be_inner: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lseq (int_t t l) len -> i:nat{i < len} -> unit -> unit & (lseq (uint_t U8 l) (numbytes t))
val uints_to_bytes_be_inner: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lseq (int_t t l) len -> i:nat{i < len} -> unit -> unit & (lseq (uint_t U8 l) (numbytes t))
let uints_to_bytes_be_inner #t #l #len b i () = let open Lib.Sequence in (), uint_to_bytes_be #t #l b.[i]
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 34, "end_line": 331, "start_col": 0, "start_line": 329 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.Sequence.lseq (Lib.IntTypes.int_t t l) len -> i: Prims.nat{i < len} -> _: Prims.unit -> Prims.unit * Lib.Sequence.lseq (Lib.IntTypes.uint_t Lib.IntTypes.U8 l) (Lib.IntTypes.numbytes t)
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Prims.nat", "Prims.unit", "FStar.Pervasives.Nati...
[]
false
false
false
false
false
let uints_to_bytes_be_inner #t #l #len b i () =
let open Lib.Sequence in (), uint_to_bytes_be #t #l b.[ i ]
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_to_intseq_be_
val nat_to_intseq_be_: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} -> Tot (b:seq (int_t t l){length b == len /\ n == nat_from_intseq_be b}) (decreases len)
val nat_to_intseq_be_: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} -> Tot (b:seq (int_t t l){length b == len /\ n == nat_from_intseq_be b}) (decreases len)
let rec nat_to_intseq_be_ #t #l len n = if len = 0 then Seq.empty else let len' = len - 1 in let tt = uint #t #l (n % modulus t) in let n' = n / modulus t in assert (modulus t = pow2 (bits t)); FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t); let b' = nat_to_intseq_be_ len' n' i...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 161, "start_col": 0, "start_line": 150 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 1, "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_el...
false
len: Prims.nat -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> Prims.Tot (b: Lib.Sequence.seq (Lib.IntTypes.int_t t l) {Lib.Sequence.length b == len /\ n == Lib.ByteSequence.nat_from_intseq_be b})
Prims.Tot
[ "total", "" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Prims.nat", "Prims.op_LessThan", "Prims.pow2", "FStar.Mul.op_Star", "Lib.IntTypes.bits", "Prims.op_Equality", "Prims.int", "FStar.Seq.Base.empty", "Lib.IntTypes.int_t", "Prims.bool", "Prims.unit"...
[ "recursion" ]
false
false
false
false
false
let rec nat_to_intseq_be_ #t #l len n =
if len = 0 then Seq.empty else let len' = len - 1 in let tt = uint #t #l (n % modulus t) in let n' = n / modulus t in assert (modulus t = pow2 (bits t)); FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t); let b' = nat_to_intseq_be_ len' n' in let b = Seq.append b' (create 1 tt) in Seq.append_...
false
Lib.ByteSequence.fst
Lib.ByteSequence.uint_from_bytes_le
val uint_from_bytes_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> b:lbytes_l l (numbytes t) -> uint_t t l
val uint_from_bytes_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> b:lbytes_l l (numbytes t) -> uint_t t l
let uint_from_bytes_le #t #l b = let n = nat_from_intseq_le #U8 b in uint #t #l n
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 14, "end_line": 295, "start_col": 0, "start_line": 293 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t) -> Lib.IntTypes.uint_t t l
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.ByteSequence.lbytes_l", "Lib.IntTypes.numbytes", "Lib.IntTypes.uint", "Prims.nat", "Prims.op_LessThan", "Prims.pow2", "Prims.op_Multiply...
[]
false
false
false
false
false
let uint_from_bytes_le #t #l b =
let n = nat_from_intseq_le #U8 b in uint #t #l n
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_from_intseq_be_
val nat_from_intseq_be_: #t:inttype{unsigned t} -> #l:secrecy_level -> b:seq (uint_t t l) -> Tot (n:nat{n < pow2 (length b * bits t)}) (decreases (length b))
val nat_from_intseq_be_: #t:inttype{unsigned t} -> #l:secrecy_level -> b:seq (uint_t t l) -> Tot (n:nat{n < pow2 (length b * bits t)}) (decreases (length b))
let rec nat_from_intseq_be_ #t #l b = let len = length b in if len = 0 then 0 else let l = v (Seq.index b (len - 1)) in let pre = Seq.slice b 0 (len - 1) in let shift = pow2 (bits t) in let n' = nat_from_intseq_be_ pre in Math.Lemmas.pow2_plus (bits t) (len * bits t - bits t); l + shift * ...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 18, "end_line": 120, "start_col": 0, "start_line": 111 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) -> Prims.Tot (n: Prims.nat{n < Prims.pow2 (Lib.Sequence.length b * Lib.IntTypes.bits t)})
Prims.Tot
[ "total", "" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.Sequence.seq", "Lib.IntTypes.uint_t", "Prims.op_Equality", "Prims.int", "Prims.bool", "Prims.op_Addition", "FStar.Mul.op_Star", "Prims.unit", "FStar.Math.Lemmas.pow2_plus", "Lib.IntTypes.bits",...
[ "recursion" ]
false
false
false
false
false
let rec nat_from_intseq_be_ #t #l b =
let len = length b in if len = 0 then 0 else let l = v (Seq.index b (len - 1)) in let pre = Seq.slice b 0 (len - 1) in let shift = pow2 (bits t) in let n' = nat_from_intseq_be_ pre in Math.Lemmas.pow2_plus (bits t) (len * bits t - bits t); l + shift * n'
false
Lib.ByteSequence.fst
Lib.ByteSequence.index_uint_to_bytes_be
val index_uint_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l -> Lemma (forall (i:nat{i < numbytes t}). index (uint_to_bytes_be #t #l u) (numbytes t - i - 1) == uint #U8 #l (v u / pow2 (8 * i) % pow2 8))
val index_uint_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l -> Lemma (forall (i:nat{i < numbytes t}). index (uint_to_bytes_be #t #l u) (numbytes t - i - 1) == uint #U8 #l (v u / pow2 (8 * i) % pow2 8))
let index_uint_to_bytes_be #t #l u = Classical.forall_intro (index_nat_to_intseq_be #U8 #l (numbytes t) (v u))
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 75, "end_line": 291, "start_col": 0, "start_line": 290 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
u390: Lib.IntTypes.uint_t t l -> FStar.Pervasives.Lemma (ensures forall (i: Prims.nat{i < Lib.IntTypes.numbytes t}). Lib.Sequence.index (Lib.ByteSequence.uint_to_bytes_be u390) (Lib.IntTypes.numbytes t - i - 1) == Lib.IntTypes.uint (Lib.IntTypes.v u390 / Prims.pow2 (8 * i) % Prims....
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.uint_t", "FStar.Classical.forall_intro", "Prims.nat", "Prims.op_LessThan", "Lib.IntTypes.numbytes", "Prims.eq2", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "FStar.Seq.Base.index", "Lib.B...
[]
false
false
true
false
false
let index_uint_to_bytes_be #t #l u =
Classical.forall_intro (index_nat_to_intseq_be #U8 #l (numbytes t) (v u))
false
Lib.ByteSequence.fst
Lib.ByteSequence.uint_to_bytes_be
val uint_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l -> lbytes_l l (numbytes t)
val uint_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l -> lbytes_l l (numbytes t)
let uint_to_bytes_be #t #l n = nat_to_bytes_be (numbytes t) (v n)
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 36, "end_line": 288, "start_col": 0, "start_line": 287 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
u378: Lib.IntTypes.uint_t t l -> Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t)
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.uint_t", "Lib.ByteSequence.nat_to_bytes_be", "Lib.IntTypes.numbytes", "Lib.IntTypes.v", "Lib.ByteSequence.lbytes_l" ]
[]
false
false
false
false
false
let uint_to_bytes_be #t #l n =
nat_to_bytes_be (numbytes t) (v n)
false
Lib.ByteSequence.fst
Lib.ByteSequence.uint_from_bytes_be
val uint_from_bytes_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> lbytes_l l (numbytes t) -> uint_t t l
val uint_from_bytes_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> lbytes_l l (numbytes t) -> uint_t t l
let uint_from_bytes_be #t #l b = let n = nat_from_intseq_be #U8 b in uint #t #l n
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 14, "end_line": 299, "start_col": 0, "start_line": 297 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t) -> Lib.IntTypes.uint_t t l
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.ByteSequence.lbytes_l", "Lib.IntTypes.numbytes", "Lib.IntTypes.uint", "Prims.nat", "Prims.op_LessThan", "Prims.pow2", "Prims.op_Multiply...
[]
false
false
false
false
false
let uint_from_bytes_be #t #l b =
let n = nat_from_intseq_be #U8 b in uint #t #l n
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_to_intseq_le_
val nat_to_intseq_le_: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} -> Tot (b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_le b}) (decreases len)
val nat_to_intseq_le_: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} -> Tot (b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_le b}) (decreases len)
let rec nat_to_intseq_le_ #t #l len n = if len = 0 then Seq.empty else let len' = len - 1 in let tt = uint #t #l (n % modulus t) in let n' = n / modulus t in assert (modulus t = pow2 (bits t)); FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t); let b' = nat_to_intseq_le_ len' n' i...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 181, "start_col": 0, "start_line": 170 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 1, "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_el...
false
len: Prims.nat -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> Prims.Tot (b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) {Lib.Sequence.length b == len /\ n == Lib.ByteSequence.nat_from_intseq_le b})
Prims.Tot
[ "total", "" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Prims.nat", "Prims.op_LessThan", "Prims.pow2", "FStar.Mul.op_Star", "Lib.IntTypes.bits", "Prims.op_Equality", "Prims.int", "FStar.Seq.Base.empty", "Lib.IntTypes.uint_t", "Prims.bool", "Prims.unit...
[ "recursion" ]
false
false
false
false
false
let rec nat_to_intseq_le_ #t #l len n =
if len = 0 then Seq.empty else let len' = len - 1 in let tt = uint #t #l (n % modulus t) in let n' = n / modulus t in assert (modulus t = pow2 (bits t)); FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t); let b' = nat_to_intseq_le_ len' n' in let b = Seq.append (create 1 tt) b' in Seq.append_...
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_to_bytes_be
val uints_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lseq (uint_t t l) len -> lbytes_l l (len * numbytes t)
val uints_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lseq (uint_t t l) len -> lbytes_l l (len * numbytes t)
let uints_to_bytes_be #t #l #len ul = let a_spec (i:nat{i <= len}) = unit in let _, o = generate_blocks (numbytes t) len len a_spec (uints_to_bytes_be_inner #t #l #len ul) () in o
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 3, "end_line": 337, "start_col": 0, "start_line": 333 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
ul: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len -> Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t)
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.Sequence.lseq", "Lib.IntTypes.uint_t", "Lib.Sequence.seq", "Lib.IntTypes.U8", "Prims.eq...
[]
false
false
false
false
false
let uints_to_bytes_be #t #l #len ul =
let a_spec (i: nat{i <= len}) = unit in let _, o = generate_blocks (numbytes t) len len a_spec (uints_to_bytes_be_inner #t #l #len ul) () in o
false
Lib.ByteSequence.fst
Lib.ByteSequence.seq_eq_mask
val seq_eq_mask: #t:inttype{~(S128? t)} -> #len1:size_nat -> #len2:size_nat -> b1:lseq (int_t t SEC) len1 -> b2:lseq (int_t t SEC) len2 -> len:size_nat{len <= len1 /\ len <= len2} -> res:int_t t SEC{ (sub b1 0 len == sub b2 0 len ==> v res == v (ones t SEC)) /\ (sub b1 0 len =!= sub b2 0 len ==> v ...
val seq_eq_mask: #t:inttype{~(S128? t)} -> #len1:size_nat -> #len2:size_nat -> b1:lseq (int_t t SEC) len1 -> b2:lseq (int_t t SEC) len2 -> len:size_nat{len <= len1 /\ len <= len2} -> res:int_t t SEC{ (sub b1 0 len == sub b2 0 len ==> v res == v (ones t SEC)) /\ (sub b1 0 len =!= sub b2 0 len ==> v ...
let seq_eq_mask #t #len1 #len2 b1 b2 len = repeati_inductive len (fun (i:nat{i <= len}) res -> (sub b1 0 i == sub b2 0 i ==> v res == v (ones t SEC)) /\ (sub b1 0 i =!= sub b2 0 i ==> v res == v (zeros t SEC))) (seq_eq_mask_inner b1 b2 len) (ones t SEC)
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 70, "start_col": 0, "start_line": 64 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
b1: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len1 -> b2: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len2 -> len: Lib.IntTypes.size_nat{len <= len1 /\ len <= len2} -> res: Lib.IntTypes.int_t t Lib.IntTypes.SEC { (Lib.Sequence.sub b1 0 len == Lib.Sequence.sub b2 0 ...
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_not", "Prims.b2t", "Lib.IntTypes.uu___is_S128", "Lib.IntTypes.size_nat", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.SEC", "Prims.l_and", "Prims.op_LessThanOrEqual", "Lib.LoopCombinators.repeati_inductive", "Prims.nat", "Prims.l_imp", "Prims.eq...
[]
false
false
false
false
false
let seq_eq_mask #t #len1 #len2 b1 b2 len =
repeati_inductive len (fun (i: nat{i <= len}) res -> (sub b1 0 i == sub b2 0 i ==> v res == v (ones t SEC)) /\ (sub b1 0 i =!= sub b2 0 i ==> v res == v (zeros t SEC))) (seq_eq_mask_inner b1 b2 len) (ones t SEC)
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_to_bytes_le
val uints_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lseq (uint_t t l) len -> lbytes_l l (len * numbytes t)
val uints_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lseq (uint_t t l) len -> lbytes_l l (len * numbytes t)
let uints_to_bytes_le #t #l #len ul = let a_spec (i:nat{i <= len}) = unit in let _, o = generate_blocks (numbytes t) len len a_spec (uints_to_bytes_le_inner #t #l #len ul) () in o
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 3, "end_line": 313, "start_col": 0, "start_line": 309 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
ul: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len -> Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t)
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.Sequence.lseq", "Lib.IntTypes.uint_t", "Lib.Sequence.seq", "Lib.IntTypes.U8", "Prims.eq...
[]
false
false
false
false
false
let uints_to_bytes_le #t #l #len ul =
let a_spec (i: nat{i <= len}) = unit in let _, o = generate_blocks (numbytes t) len len a_spec (uints_to_bytes_le_inner #t #l #len ul) () in o
false
Lib.ByteSequence.fst
Lib.ByteSequence.index_uint_to_bytes_le
val index_uint_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l -> Lemma (forall (i:nat{i < numbytes t}). index (uint_to_bytes_le #t #l u) i == uint #U8 #l (v u / pow2 (8 * i) % pow2 8))
val index_uint_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l -> Lemma (forall (i:nat{i < numbytes t}). index (uint_to_bytes_le #t #l u) i == uint #U8 #l (v u / pow2 (8 * i) % pow2 8))
let index_uint_to_bytes_le #t #l u = Classical.forall_intro (index_nat_to_intseq_le #U8 #l (numbytes t) (v u))
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 75, "end_line": 285, "start_col": 0, "start_line": 284 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
u369: Lib.IntTypes.uint_t t l -> FStar.Pervasives.Lemma (ensures forall (i: Prims.nat{i < Lib.IntTypes.numbytes t}). Lib.Sequence.index (Lib.ByteSequence.uint_to_bytes_le u369) i == Lib.IntTypes.uint (Lib.IntTypes.v u369 / Prims.pow2 (8 * i) % Prims.pow2 8))
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.uint_t", "FStar.Classical.forall_intro", "Prims.nat", "Prims.op_LessThan", "Lib.IntTypes.numbytes", "Prims.eq2", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "FStar.Seq.Base.index", "Lib.B...
[]
false
false
true
false
false
let index_uint_to_bytes_le #t #l u =
Classical.forall_intro (index_nat_to_intseq_le #U8 #l (numbytes t) (v u))
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_le
val uints_from_bytes_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lbytes_l l (len * numbytes t) -> lseq (uint_t t l) len
val uints_from_bytes_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lbytes_l l (len * numbytes t) -> lseq (uint_t t l) len
let uints_from_bytes_le #t #l #len b = Lib.Sequence.createi #(int_t t l) len (fun i -> uint_from_bytes_le (sub b (i * numbytes t) (numbytes t)))
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 71, "end_line": 344, "start_col": 0, "start_line": 342 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Lib.S...
[]
false
false
false
false
false
let uints_from_bytes_le #t #l #len b =
Lib.Sequence.createi #(int_t t l) len (fun i -> uint_from_bytes_le (sub b (i * numbytes t) (numbytes t)))
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_from_intseq_le_slice_lemma
val nat_from_intseq_le_slice_lemma: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat -> b:lseq (uint_t t l) len -> i:nat{i <= len} -> Lemma (nat_from_intseq_le b == nat_from_intseq_le (slice b 0 i) + pow2 (i * bits t) * nat_from_intseq_le (slice b i len))
val nat_from_intseq_le_slice_lemma: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat -> b:lseq (uint_t t l) len -> i:nat{i <= len} -> Lemma (nat_from_intseq_le b == nat_from_intseq_le (slice b 0 i) + pow2 (i * bits t) * nat_from_intseq_le (slice b i len))
let nat_from_intseq_le_slice_lemma #t #l #len b i = nat_from_intseq_le_slice_lemma_ b i
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 37, "end_line": 391, "start_col": 0, "start_line": 390 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len -> i: Prims.nat{i <= len} -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_from_intseq_le b == Lib.ByteSequence.nat_from_intseq_le (Lib.Sequence.slice b 0 i) + Prims.pow2 (i * Lib.IntTypes.bits t) * Lib.ByteSequence.nat_from_intseq_...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Lib.Sequence.lseq", "Lib.IntTypes.uint_t", "Prims.nat", "Prims.op_LessThanOrEqual", "Lib.ByteSequence.nat_from_intseq_le_slice_lemma_", "Prims.unit" ]
[]
true
false
true
false
false
let nat_from_intseq_le_slice_lemma #t #l #len b i =
nat_from_intseq_le_slice_lemma_ b i
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_be
val uints_from_bytes_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lbytes_l l (len * numbytes t) -> lseq (uint_t t l) len
val uints_from_bytes_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> lbytes_l l (len * numbytes t) -> lseq (uint_t t l) len
let uints_from_bytes_be #t #l #len b = Lib.Sequence.createi #(int_t t l) len (fun i -> uint_from_bytes_be (sub b (i * numbytes t) (numbytes t)))
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 71, "end_line": 350, "start_col": 0, "start_line": 348 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Lib.S...
[]
false
false
false
false
false
let uints_from_bytes_be #t #l #len b =
Lib.Sequence.createi #(int_t t l) len (fun i -> uint_from_bytes_be (sub b (i * numbytes t) (numbytes t)))
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_from_intseq_slice_lemma_aux
val nat_from_intseq_slice_lemma_aux: len:pos -> a:nat -> b:nat -> c:nat -> i:pos{i <= len} -> Lemma (pow2 ((i - 1) * c) * (a + pow2 c * b) == pow2 ((i - 1) * c) * a + pow2 (i * c) * b)
val nat_from_intseq_slice_lemma_aux: len:pos -> a:nat -> b:nat -> c:nat -> i:pos{i <= len} -> Lemma (pow2 ((i - 1) * c) * (a + pow2 c * b) == pow2 ((i - 1) * c) * a + pow2 (i * c) * b)
let nat_from_intseq_slice_lemma_aux len a b c i = FStar.Math.Lemmas.distributivity_add_right (pow2 ((i - 1) * c)) a (pow2 c * b); FStar.Math.Lemmas.paren_mul_right (pow2 ((i - 1) * c)) (pow2 c) b; FStar.Math.Lemmas.pow2_plus ((i - 1) * c) c
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 45, "end_line": 367, "start_col": 0, "start_line": 364 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
len: Prims.pos -> a: Prims.nat -> b: Prims.nat -> c: Prims.nat -> i: Prims.pos{i <= len} -> FStar.Pervasives.Lemma (ensures Prims.pow2 ((i - 1) * c) * (a + Prims.pow2 c * b) == Prims.pow2 ((i - 1) * c) * a + Prims.pow2 (i * c) * b)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.pos", "Prims.nat", "Prims.b2t", "Prims.op_LessThanOrEqual", "FStar.Math.Lemmas.pow2_plus", "FStar.Mul.op_Star", "Prims.op_Subtraction", "Prims.unit", "FStar.Math.Lemmas.paren_mul_right", "Prims.pow2", "FStar.Math.Lemmas.distributivity_add_right" ]
[]
true
false
true
false
false
let nat_from_intseq_slice_lemma_aux len a b c i =
FStar.Math.Lemmas.distributivity_add_right (pow2 ((i - 1) * c)) a (pow2 c * b); FStar.Math.Lemmas.paren_mul_right (pow2 ((i - 1) * c)) (pow2 c) b; FStar.Math.Lemmas.pow2_plus ((i - 1) * c) c
false
Lib.ByteSequence.fst
Lib.ByteSequence.uint_at_index_le
val uint_at_index_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> idx:nat{idx < len} -> u:uint_t t l{u == (uints_from_bytes_le #t #l #len b).[idx]}
val uint_at_index_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> idx:nat{idx < len} -> u:uint_t t l{u == (uints_from_bytes_le #t #l #len b).[idx]}
let uint_at_index_le #t #l #len b i = uint_from_bytes_le (sub b (i * numbytes t) (numbytes t))
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 58, "end_line": 355, "start_col": 0, "start_line": 354 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> idx: Prims.nat{idx < len} -> u590: Lib.IntTypes.uint_t t l {u590 == (Lib.ByteSequence.uints_from_bytes_le b).[ idx ]}
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[]
false
false
false
false
false
let uint_at_index_le #t #l #len b i =
uint_from_bytes_le (sub b (i * numbytes t) (numbytes t))
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_from_intseq_be_slice_lemma
val nat_from_intseq_be_slice_lemma: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat -> b:lseq (uint_t t l) len -> i:nat{i <= len} -> Lemma (nat_from_intseq_be b == nat_from_intseq_be (slice b i len) + pow2 ((len - i) * bits t) * nat_from_intseq_be (slice b 0 i))
val nat_from_intseq_be_slice_lemma: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat -> b:lseq (uint_t t l) len -> i:nat{i <= len} -> Lemma (nat_from_intseq_be b == nat_from_intseq_be (slice b i len) + pow2 ((len - i) * bits t) * nat_from_intseq_be (slice b 0 i))
let nat_from_intseq_be_slice_lemma #t #l #len b i = nat_from_intseq_be_slice_lemma_ #t #l #len b i
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 48, "end_line": 417, "start_col": 0, "start_line": 416 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len -> i: Prims.nat{i <= len} -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_from_intseq_be b == Lib.ByteSequence.nat_from_intseq_be (Lib.Sequence.slice b i len) + Prims.pow2 ((len - i) * Lib.IntTypes.bits t) * Lib.ByteSequence.nat_fr...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Lib.Sequence.lseq", "Lib.IntTypes.uint_t", "Prims.nat", "Prims.op_LessThanOrEqual", "Lib.ByteSequence.nat_from_intseq_be_slice_lemma_", "Prims.unit" ]
[]
true
false
true
false
false
let nat_from_intseq_be_slice_lemma #t #l #len b i =
nat_from_intseq_be_slice_lemma_ #t #l #len b i
false
Lib.ByteSequence.fst
Lib.ByteSequence.index_uints_to_bytes_le
val index_uints_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> ul:lseq (uint_t t l) len -> i:nat{i < len * numbytes t} -> Lemma (index (uints_to_bytes_le #t #l #len ul) i == (uint_to_bytes_le ul.[i / numbytes t]).[i % numbytes t])
val index_uints_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> ul:lseq (uint_t t l) len -> i:nat{i < len * numbytes t} -> Lemma (index (uints_to_bytes_le #t #l #len ul) i == (uint_to_bytes_le ul.[i / numbytes t]).[i % numbytes t])
let index_uints_to_bytes_le #t #l #len ul i = index_generate_blocks (numbytes t) len len (uints_to_bytes_le_inner #t #l #len ul) i
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 86, "end_line": 323, "start_col": 0, "start_line": 322 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
ul: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len -> i: Prims.nat{i < len * Lib.IntTypes.numbytes t} -> FStar.Pervasives.Lemma (ensures Lib.Sequence.index (Lib.ByteSequence.uints_to_bytes_le ul) i == (Lib.ByteSequence.uint_to_bytes_le ul.[ i / Lib.IntTypes.numbytes t ]).[ i % Lib.In...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.Sequence.lseq", "Lib.IntTypes.uint_t", "Prims.nat", "Lib.Sequence.index_generate_blocks",...
[]
true
false
true
false
false
let index_uints_to_bytes_le #t #l #len ul i =
index_generate_blocks (numbytes t) len len (uints_to_bytes_le_inner #t #l #len ul) i
false
Lib.ByteSequence.fst
Lib.ByteSequence.index_uints_to_bytes_be
val index_uints_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> ul:lseq (uint_t t l) len -> i:nat{i < len * numbytes t} -> Lemma (index (uints_to_bytes_be #t #l #len ul) i == (uint_to_bytes_be ul.[i / numbytes t]).[i % numbytes t])
val index_uints_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> ul:lseq (uint_t t l) len -> i:nat{i < len * numbytes t} -> Lemma (index (uints_to_bytes_be #t #l #len ul) i == (uint_to_bytes_be ul.[i / numbytes t]).[i % numbytes t])
let index_uints_to_bytes_be #t #l #len ul i = index_generate_blocks (numbytes t) len len (uints_to_bytes_be_inner #t #l #len ul) i
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 86, "end_line": 340, "start_col": 0, "start_line": 339 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
ul: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len -> i: Prims.nat{i < len * Lib.IntTypes.numbytes t} -> FStar.Pervasives.Lemma (ensures Lib.Sequence.index (Lib.ByteSequence.uints_to_bytes_be ul) i == (Lib.ByteSequence.uint_to_bytes_be ul.[ i / Lib.IntTypes.numbytes t ]).[ i % Lib.In...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.Sequence.lseq", "Lib.IntTypes.uint_t", "Prims.nat", "Lib.Sequence.index_generate_blocks",...
[]
true
false
true
false
false
let index_uints_to_bytes_be #t #l #len ul i =
index_generate_blocks (numbytes t) len len (uints_to_bytes_be_inner #t #l #len ul) i
false
Lib.ByteSequence.fst
Lib.ByteSequence.uint_at_index_be
val uint_at_index_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> idx:nat{idx < len} -> u:uint_t t l{u == (uints_from_bytes_be #t #l #len b).[idx]}
val uint_at_index_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> idx:nat{idx < len} -> u:uint_t t l{u == (uints_from_bytes_be #t #l #len b).[idx]}
let uint_at_index_be #t #l #len b i = uint_from_bytes_be (sub b (i * numbytes t) (numbytes t))
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 58, "end_line": 358, "start_col": 0, "start_line": 357 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> idx: Prims.nat{idx < len} -> u605: Lib.IntTypes.uint_t t l {u605 == (Lib.ByteSequence.uints_from_bytes_be b).[ idx ]}
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[]
false
false
false
false
false
let uint_at_index_be #t #l #len b i =
uint_from_bytes_be (sub b (i * numbytes t) (numbytes t))
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_le_nat_lemma
val uints_from_bytes_le_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> Lemma (nat_from_intseq_le (uints_from_bytes_le #t #l #len b) == nat_from_bytes_le b)
val uints_from_bytes_le_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> Lemma (nat_from_intseq_le (uints_from_bytes_le #t #l #len b) == nat_from_bytes_le b)
let uints_from_bytes_le_nat_lemma #t #l #len b = uints_from_bytes_le_nat_lemma_ #t #l #len b
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 45, "end_line": 480, "start_col": 0, "start_line": 479 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_from_intseq_le (Lib.ByteSequence.uints_from_bytes_le b) == Lib.ByteSequence.nat_from_bytes_le b)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Lib.B...
[]
true
false
true
false
false
let uints_from_bytes_le_nat_lemma #t #l #len b =
uints_from_bytes_le_nat_lemma_ #t #l #len b
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_le_slice_lemma_lp
val uints_from_bytes_le_slice_lemma_lp: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} -> Lemma (index (slice (uints_from_bytes_le #t #l #len b) i j) k == ui...
val uints_from_bytes_le_slice_lemma_lp: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} -> Lemma (index (slice (uints_from_bytes_le #t #l #len b) i j) k == ui...
let uints_from_bytes_le_slice_lemma_lp #t #l #len b i j k = let r = slice (uints_from_bytes_le #t #l #len b) i j in index_uints_from_bytes_le #t #l #len b (i + k); assert (r.[k] == uint_from_bytes_le (sub b ((i + k) * numbytes t) (numbytes t)))
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 82, "end_line": 427, "start_col": 0, "start_line": 424 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> i: Prims.nat -> j: Prims.nat{i <= j /\ j <= len} -> k: Prims.nat{k < j - i} -> FStar.Pervasives.Lemma (ensures Lib.Sequence.index (Lib.Sequence.slice (Lib.ByteSequence.uints_from_bytes_le b) i j) k == Lib.ByteSequence.u...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_pos", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[]
true
false
true
false
false
let uints_from_bytes_le_slice_lemma_lp #t #l #len b i j k =
let r = slice (uints_from_bytes_le #t #l #len b) i j in index_uints_from_bytes_le #t #l #len b (i + k); assert (r.[ k ] == uint_from_bytes_le (sub b ((i + k) * numbytes t) (numbytes t)))
false
Lib.ByteSequence.fst
Lib.ByteSequence.index_nat_to_intseq_be
val index_nat_to_intseq_be: #t:inttype{unsigned t} -> #l:secrecy_level -> len:size_nat -> n:nat{n < pow2 (bits t * len)} -> i:nat{i < len} -> Lemma (Seq.index (nat_to_intseq_be #t #l len n) (len - i - 1) == uint #t #l (n / pow2 (bits t * i) % pow2 (bits t)))
val index_nat_to_intseq_be: #t:inttype{unsigned t} -> #l:secrecy_level -> len:size_nat -> n:nat{n < pow2 (bits t * len)} -> i:nat{i < len} -> Lemma (Seq.index (nat_to_intseq_be #t #l len n) (len - i - 1) == uint #t #l (n / pow2 (bits t * i) % pow2 (bits t)))
let rec index_nat_to_intseq_be #t #l len n i = if i = 0 then if len = 0 then () else head_nat_to_intseq_be #t #l len n else begin let len' = len - 1 in let i' = i - 1 in let n' = n / pow2 (bits t) in FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t); calc (==) { Seq.inde...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 7, "end_line": 278, "start_col": 0, "start_line": 255 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
len: Lib.IntTypes.size_nat -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> i: Prims.nat{i < len} -> FStar.Pervasives.Lemma (ensures FStar.Seq.Base.index (Lib.ByteSequence.nat_to_intseq_be len n) (len - i - 1) == Lib.IntTypes.uint (n / Prims.pow2 (Lib.IntTypes.bits t * i) % ...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.nat", "Prims.op_LessThan", "Prims.pow2", "FStar.Mul.op_Star", "Lib.IntTypes.bits", "Prims.op_Equality", "Prims.int", "Prims.bool", "Lib.ByteSequence.head_nat_to_intse...
[ "recursion" ]
false
false
true
false
false
let rec index_nat_to_intseq_be #t #l len n i =
if i = 0 then if len = 0 then () else head_nat_to_intseq_be #t #l len n else let len' = len - 1 in let i' = i - 1 in let n' = n / pow2 (bits t) in FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t); calc ( == ) { Seq.index (nat_to_intseq_be #t #l len' n') (len' - i' - 1); ( == ) { index_nat_...
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_le_slice_lemma_rp
val uints_from_bytes_le_slice_lemma_rp: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} -> Lemma (index (uints_from_bytes_le #t #l #(j-i) (slice b (i * numbytes t) (j ...
val uints_from_bytes_le_slice_lemma_rp: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} -> Lemma (index (uints_from_bytes_le #t #l #(j-i) (slice b (i * numbytes t) (j ...
let uints_from_bytes_le_slice_lemma_rp #t #l #len b i j k = let b1 = slice b (i * numbytes t) (j * numbytes t) in let r = uints_from_bytes_le #t #l #(j-i) b1 in index_uints_from_bytes_le #t #l #(j-i) b1 k; assert (r.[k] == uint_from_bytes_le (sub b1 (k * numbytes t) (numbytes t))); assert (r.[k] == uint_from_...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 82, "end_line": 439, "start_col": 0, "start_line": 434 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> i: Prims.nat -> j: Prims.nat{i <= j /\ j <= len} -> k: Prims.nat{k < j - i} -> FStar.Pervasives.Lemma (ensures Lib.Sequence.index (Lib.ByteSequence.uints_from_bytes_le (Lib.Sequence.slice b (i * Lib.IntTypes.n...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_pos", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[]
true
false
true
false
false
let uints_from_bytes_le_slice_lemma_rp #t #l #len b i j k =
let b1 = slice b (i * numbytes t) (j * numbytes t) in let r = uints_from_bytes_le #t #l #(j - i) b1 in index_uints_from_bytes_le #t #l #(j - i) b1 k; assert (r.[ k ] == uint_from_bytes_le (sub b1 (k * numbytes t) (numbytes t))); assert (r.[ k ] == uint_from_bytes_le (sub b ((i + k) * numbytes t) (numbytes t)))
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_nat_from_to_intseq_be_preserves_value
val lemma_nat_from_to_intseq_be_preserves_value: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> b:seq (uint_t t l){length b == len} -> Lemma (nat_to_intseq_be len (nat_from_intseq_be b) == b)
val lemma_nat_from_to_intseq_be_preserves_value: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> b:seq (uint_t t l){length b == len} -> Lemma (nat_to_intseq_be len (nat_from_intseq_be b) == b)
let lemma_nat_from_to_intseq_be_preserves_value #t #l len b = nat_from_intseq_be_inj (nat_to_intseq_be len (nat_from_intseq_be b)) b
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 72, "end_line": 750, "start_col": 0, "start_line": 749 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
len: Prims.nat -> b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) {Lib.Sequence.length b == len} -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_to_intseq_be len (Lib.ByteSequence.nat_from_intseq_be b) == b)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Prims.nat", "Lib.Sequence.seq", "Lib.IntTypes.uint_t", "Prims.eq2", "Lib.Sequence.length", "Lib.ByteSequence.nat_from_intseq_be_inj", "Lib.ByteSequence.nat_to_intseq_be", "Lib.ByteSequence.nat_from_int...
[]
true
false
true
false
false
let lemma_nat_from_to_intseq_be_preserves_value #t #l len b =
nat_from_intseq_be_inj (nat_to_intseq_be len (nat_from_intseq_be b)) b
false
Lib.ByteSequence.fst
Lib.ByteSequence.seq_eq_mask_inner
val seq_eq_mask_inner: #t:inttype{~(S128? t)} -> #len1:size_nat -> #len2:size_nat -> b1:lseq (int_t t SEC) len1 -> b2:lseq (int_t t SEC) len2 -> len:size_nat{len <= len1 /\ len <= len2} -> i:size_nat{i < len} -> res:int_t t SEC{ (sub b1 0 i == sub b2 0 i ==> v res == v (ones t SEC)) /\ (sub b1 0 ...
val seq_eq_mask_inner: #t:inttype{~(S128? t)} -> #len1:size_nat -> #len2:size_nat -> b1:lseq (int_t t SEC) len1 -> b2:lseq (int_t t SEC) len2 -> len:size_nat{len <= len1 /\ len <= len2} -> i:size_nat{i < len} -> res:int_t t SEC{ (sub b1 0 i == sub b2 0 i ==> v res == v (ones t SEC)) /\ (sub b1 0 ...
let seq_eq_mask_inner #t #len1 #len2 b1 b2 len i res = logand_zeros (ones t SEC); logand_ones (ones t SEC); logand_zeros (zeros t SEC); logand_ones (zeros t SEC); let z0 = res in let res = eq_mask b1.[i] b2.[i] &. z0 in logand_spec (eq_mask b1.[i] b2.[i]) z0; if v res = ones_v t then begin let...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 62, "start_col": 0, "start_line": 42 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_el...
false
b1: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len1 -> b2: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len2 -> len: Lib.IntTypes.size_nat{len <= len1 /\ len <= len2} -> i: Lib.IntTypes.size_nat{i < len} -> res: Lib.IntTypes.int_t t Lib.IntTypes.SEC { (Lib....
Prims.Tot
[ "total" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_not", "Prims.b2t", "Lib.IntTypes.uu___is_S128", "Lib.IntTypes.size_nat", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.SEC", "Prims.l_and", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "Prims.l_imp", "Prims.eq2", "Prims.l_or", "FStar.Seq.Ba...
[]
false
false
false
false
false
let seq_eq_mask_inner #t #len1 #len2 b1 b2 len i res =
logand_zeros (ones t SEC); logand_ones (ones t SEC); logand_zeros (zeros t SEC); logand_ones (zeros t SEC); let z0 = res in let res = eq_mask b1.[ i ] b2.[ i ] &. z0 in logand_spec (eq_mask b1.[ i ] b2.[ i ]) z0; if v res = ones_v t then let s1 = sub b1 0 (i + 1) in let s2 = sub b2 0 (i + 1) in Seq.lemma_split s1...
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_uint_to_from_bytes_le_preserves_value
val lemma_uint_to_from_bytes_le_preserves_value : #t : inttype{unsigned t /\ ~(U1? t)} -> #l : secrecy_level -> i : uint_t t l -> Lemma(uint_from_bytes_le #t #l (uint_to_bytes_le #t #l i) == i)
val lemma_uint_to_from_bytes_le_preserves_value : #t : inttype{unsigned t /\ ~(U1? t)} -> #l : secrecy_level -> i : uint_t t l -> Lemma(uint_from_bytes_le #t #l (uint_to_bytes_le #t #l i) == i)
let lemma_uint_to_from_bytes_le_preserves_value #t #l i = lemma_reveal_uint_to_bytes_le #t #l (uint_to_bytes_le #t #l i); assert(nat_from_bytes_le (uint_to_bytes_le #t #l i) == uint_v (uint_from_bytes_le #t #l (uint_to_bytes_le #t #l i))); lemma_uint_to_bytes_le_preserves_value #t #l i; assert(nat_fr...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 66, "end_line": 767, "start_col": 0, "start_line": 762 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
i: Lib.IntTypes.uint_t t l -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.uint_from_bytes_le (Lib.ByteSequence.uint_to_bytes_le i) == i)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.uint_t", "Prims._assert", "Prims.eq2", "Prims.int", "Prims.l_or", "Lib.IntTypes.range", "Prims.op_GreaterThanOrEqual", "Prims...
[]
true
false
true
false
false
let lemma_uint_to_from_bytes_le_preserves_value #t #l i =
lemma_reveal_uint_to_bytes_le #t #l (uint_to_bytes_le #t #l i); assert (nat_from_bytes_le (uint_to_bytes_le #t #l i) == uint_v (uint_from_bytes_le #t #l (uint_to_bytes_le #t #l i))); lemma_uint_to_bytes_le_preserves_value #t #l i; assert (nat_from_bytes_le (uint_to_bytes_le #t #l i) == uint_v i)
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.to_felem
val to_felem (f:G.field) (p:poly) : G.felem f
val to_felem (f:G.field) (p:poly) : G.felem f
let to_felem f p = let G.GF t irred = f in let n = I.bits t in let p = reverse p (n - 1) in Lib.IntTypes.Compatibility.nat_to_uint (U.from_vec #n (to_seq p n))
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 69, "end_line": 22, "start_col": 0, "start_line": 18 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
f: Spec.GaloisField.field -> p: Vale.Math.Poly2_s.poly -> Spec.GaloisField.felem f
Prims.Tot
[ "total" ]
[]
[ "Spec.GaloisField.field", "Vale.Math.Poly2_s.poly", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Lib.IntTypes.Compatibility.nat_to_uint", "Spec.GaloisField.__proj__GF__item__t...
[]
false
false
false
false
false
let to_felem f p =
let G.GF t irred = f in let n = I.bits t in let p = reverse p (n - 1) in Lib.IntTypes.Compatibility.nat_to_uint (U.from_vec #n (to_seq p n))
false
Lib.ByteSequence.fst
Lib.ByteSequence.index_uints_to_bytes_le_aux
val index_uints_to_bytes_le_aux: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> len:nat{len * numbytes t < pow2 32} -> n:nat{n < pow2 (bits t * len)} -> i:nat{i < len * numbytes t} -> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in Seq.index (uints_to_bytes_le #t ...
val index_uints_to_bytes_le_aux: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> len:nat{len * numbytes t < pow2 32} -> n:nat{n < pow2 (bits t * len)} -> i:nat{i < len * numbytes t} -> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in Seq.index (uints_to_bytes_le #t ...
let index_uints_to_bytes_le_aux #t #l len n i = let open Lib.Sequence in let s: lseq (int_t t l) len = nat_to_intseq_le #t #l len n in index_generate_blocks (numbytes t) len len (uints_to_bytes_le_inner #t #l #len s) i
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 44, "end_line": 567, "start_col": 0, "start_line": 563 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> i: Prims.nat{i < len * Lib.IntTypes.numbytes t} -> FStar.Pervasives.Lemma (ensures (let s = Lib.ByteSequence.nat_to_intseq_le len n in FStar.Seq.Base.index (Lib.B...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Prims.nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.IntTypes.bits", "Lib.Sequence.index_genera...
[]
true
false
true
false
false
let index_uints_to_bytes_le_aux #t #l len n i =
let open Lib.Sequence in let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in index_generate_blocks (numbytes t) len len (uints_to_bytes_le_inner #t #l #len s) i
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_be_slice_lemma_lp
val uints_from_bytes_be_slice_lemma_lp: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} -> Lemma (index (slice (uints_from_bytes_le #t #l #len b) i j) k == ...
val uints_from_bytes_be_slice_lemma_lp: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} -> Lemma (index (slice (uints_from_bytes_le #t #l #len b) i j) k == ...
let uints_from_bytes_be_slice_lemma_lp #t #l #len b i j k = let r = slice (uints_from_bytes_le #t #l #len b) i j in index_uints_from_bytes_be #t #l #len b (i + k); assert (r.[k] == uint_from_bytes_le (sub b ((i + k) * numbytes t) (numbytes t)))
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 82, "end_line": 491, "start_col": 0, "start_line": 488 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> i: Prims.nat -> j: Prims.nat{i <= j /\ j <= len} -> k: Prims.nat{k < j - i} -> FStar.Pervasives.Lemma (ensures Lib.Sequence.index (Lib.Sequence.slice (Lib.ByteSequence.uints_from_bytes_le b) i j) k == Lib.ByteSequence.u...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_pos", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[]
true
false
true
false
false
let uints_from_bytes_be_slice_lemma_lp #t #l #len b i j k =
let r = slice (uints_from_bytes_le #t #l #len b) i j in index_uints_from_bytes_be #t #l #len b (i + k); assert (r.[ k ] == uint_from_bytes_le (sub b ((i + k) * numbytes t) (numbytes t)))
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_uint_to_from_bytes_be_preserves_value
val lemma_uint_to_from_bytes_be_preserves_value : #t : inttype{unsigned t /\ ~(U1? t)} -> #l : secrecy_level -> i : uint_t t l -> Lemma(uint_from_bytes_be #t #l (uint_to_bytes_be #t #l i) == i)
val lemma_uint_to_from_bytes_be_preserves_value : #t : inttype{unsigned t /\ ~(U1? t)} -> #l : secrecy_level -> i : uint_t t l -> Lemma(uint_from_bytes_be #t #l (uint_to_bytes_be #t #l i) == i)
let lemma_uint_to_from_bytes_be_preserves_value #t #l i = lemma_reveal_uint_to_bytes_be #t #l (uint_to_bytes_be #t #l i); lemma_uint_to_bytes_be_preserves_value #t #l i
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 48, "end_line": 771, "start_col": 0, "start_line": 769 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
i: Lib.IntTypes.uint_t t l -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.uint_from_bytes_be (Lib.ByteSequence.uint_to_bytes_be i) == i)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.uint_t", "Lib.ByteSequence.lemma_uint_to_bytes_be_preserves_value", "Prims.unit", "Lib.ByteSequence.lemma_reveal_uint_to_bytes_be", ...
[]
true
false
true
false
false
let lemma_uint_to_from_bytes_be_preserves_value #t #l i =
lemma_reveal_uint_to_bytes_be #t #l (uint_to_bytes_be #t #l i); lemma_uint_to_bytes_be_preserves_value #t #l i
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_nat_from_to_intseq_le_preserves_value
val lemma_nat_from_to_intseq_le_preserves_value: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> b:seq (uint_t t l){length b == len} -> Lemma (nat_to_intseq_le len (nat_from_intseq_le b) == b)
val lemma_nat_from_to_intseq_le_preserves_value: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> b:seq (uint_t t l){length b == len} -> Lemma (nat_to_intseq_le len (nat_from_intseq_le b) == b)
let lemma_nat_from_to_intseq_le_preserves_value #t #l len b = nat_from_intseq_le_inj (nat_to_intseq_le len (nat_from_intseq_le b)) b
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 72, "end_line": 747, "start_col": 0, "start_line": 746 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
len: Prims.nat -> b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) {Lib.Sequence.length b == len} -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_to_intseq_le len (Lib.ByteSequence.nat_from_intseq_le b) == b)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Prims.nat", "Lib.Sequence.seq", "Lib.IntTypes.uint_t", "Prims.eq2", "Lib.Sequence.length", "Lib.ByteSequence.nat_from_intseq_le_inj", "Lib.ByteSequence.nat_to_intseq_le", "Lib.ByteSequence.nat_from_int...
[]
true
false
true
false
false
let lemma_nat_from_to_intseq_le_preserves_value #t #l len b =
nat_from_intseq_le_inj (nat_to_intseq_le len (nat_from_intseq_le b)) b
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.to_poly
val to_poly (#f:G.field) (e:G.felem f) : poly
val to_poly (#f:G.field) (e:G.felem f) : poly
let to_poly #f e = let G.GF t irred = f in let n = I.bits t in reverse (of_seq (U.to_vec #n (I.v e))) (n - 1)
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 48, "end_line": 16, "start_col": 0, "start_line": 13 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
e: Spec.GaloisField.felem f -> Vale.Math.Poly2_s.poly
Prims.Tot
[ "total" ]
[]
[ "Spec.GaloisField.field", "Spec.GaloisField.felem", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Vale.Math.Poly2_s.reverse", "Vale.Math.Poly2_s.of_seq", "FStar.UInt.to_vec",...
[]
false
false
false
false
false
let to_poly #f e =
let G.GF t irred = f in let n = I.bits t in reverse (of_seq (U.to_vec #n (I.v e))) (n - 1)
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_be_nat_lemma
val uints_from_bytes_be_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> Lemma (nat_from_intseq_be (uints_from_bytes_be #t #l #len b) == nat_from_bytes_be b)
val uints_from_bytes_be_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> Lemma (nat_from_intseq_be (uints_from_bytes_be #t #l #len b) == nat_from_bytes_be b)
let uints_from_bytes_be_nat_lemma #t #l #len b = uints_from_bytes_be_nat_lemma_ #t #l #len b
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 45, "end_line": 550, "start_col": 0, "start_line": 549 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_from_intseq_be (Lib.ByteSequence.uints_from_bytes_be b) == Lib.ByteSequence.nat_from_bytes_be b)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Lib.B...
[]
true
false
true
false
false
let uints_from_bytes_be_nat_lemma #t #l #len b =
uints_from_bytes_be_nat_lemma_ #t #l #len b
false
Lib.ByteSequence.fst
Lib.ByteSequence.index_uints_to_bytes_be_aux
val index_uints_to_bytes_be_aux: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> len:nat{len * numbytes t < pow2 32} -> n:nat{n < pow2 (bits t * len)} -> i:nat{i < len * numbytes t} -> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in Seq.index (uints_to_bytes_be #t ...
val index_uints_to_bytes_be_aux: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> len:nat{len * numbytes t < pow2 32} -> n:nat{n < pow2 (bits t * len)} -> i:nat{i < len * numbytes t} -> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in Seq.index (uints_to_bytes_be #t ...
let index_uints_to_bytes_be_aux #t #l len n i = let open Lib.Sequence in let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in index_generate_blocks (numbytes t) len len (uints_to_bytes_be_inner #t #l #len s) i
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 44, "end_line": 583, "start_col": 0, "start_line": 579 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> i: Prims.nat{i < len * Lib.IntTypes.numbytes t} -> FStar.Pervasives.Lemma (ensures (let s = Lib.ByteSequence.nat_to_intseq_be len n in FStar.Seq.Base.index (Lib.B...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Prims.nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.IntTypes.bits", "Lib.Sequence.index_genera...
[]
true
false
true
false
false
let index_uints_to_bytes_be_aux #t #l len n i =
let open Lib.Sequence in let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in index_generate_blocks (numbytes t) len len (uints_to_bytes_be_inner #t #l #len s) i
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_le_nat_lemma_
val uints_from_bytes_le_nat_lemma_: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> Lemma (nat_from_intseq_le_ (uints_from_bytes_le #t #l #len b) == nat_from_intseq_le_ b)
val uints_from_bytes_le_nat_lemma_: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> Lemma (nat_from_intseq_le_ (uints_from_bytes_le #t #l #len b) == nat_from_intseq_le_ b)
let rec uints_from_bytes_le_nat_lemma_ #t #l #len b = if len = 0 then () else begin let b1 = slice b (numbytes t) (len * numbytes t) in nat_from_intseq_le_slice_lemma_ #U8 #l #(len * numbytes t) b (numbytes t); assert (nat_from_intseq_le_ b == nat_from_intseq_le_ (slice b 0 (numbytes t)) + pow2 (bits t)...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 477, "start_col": 0, "start_line": 468 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_from_intseq_le_ (Lib.ByteSequence.uints_from_bytes_le b) == Lib.ByteSequence.nat_from_intseq_le_ b)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[ "recursion" ]
false
false
true
false
false
let rec uints_from_bytes_le_nat_lemma_ #t #l #len b =
if len = 0 then () else let b1 = slice b (numbytes t) (len * numbytes t) in nat_from_intseq_le_slice_lemma_ #U8 #l #(len * numbytes t) b (numbytes t); assert (nat_from_intseq_le_ b == nat_from_intseq_le_ (slice b 0 (numbytes t)) + pow2 (bits t) * nat_from_intseq_le_ b1); uints_from_bytes_le_nat_lemma_ #t ...
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_nat_from_to_bytes_le_preserves_value
val lemma_nat_from_to_bytes_le_preserves_value: #l:secrecy_level -> b:bytes_l l -> len:size_nat{len == Lib.Sequence.length b} -> Lemma (nat_to_bytes_le #l len (nat_from_bytes_le b) == b)
val lemma_nat_from_to_bytes_le_preserves_value: #l:secrecy_level -> b:bytes_l l -> len:size_nat{len == Lib.Sequence.length b} -> Lemma (nat_to_bytes_le #l len (nat_from_bytes_le b) == b)
let lemma_nat_from_to_bytes_le_preserves_value #l b len = lemma_nat_from_to_intseq_le_preserves_value len b
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 51, "end_line": 753, "start_col": 0, "start_line": 752 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.ByteSequence.bytes_l l -> len: Lib.IntTypes.size_nat{len == Lib.Sequence.length b} -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_to_bytes_le len (Lib.ByteSequence.nat_from_bytes_le b) == b)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.secrecy_level", "Lib.ByteSequence.bytes_l", "Lib.IntTypes.size_nat", "Prims.eq2", "Prims.nat", "Lib.Sequence.length", "Lib.IntTypes.uint_t", "Lib.IntTypes.U8", "Lib.ByteSequence.lemma_nat_from_to_intseq_le_preserves_value", "Prims.unit" ]
[]
true
false
true
false
false
let lemma_nat_from_to_bytes_le_preserves_value #l b len =
lemma_nat_from_to_intseq_le_preserves_value len b
false
Spec.SHA3.Incremental.fst
Spec.SHA3.Incremental.sha3_is_incremental1
val sha3_is_incremental1 (a: keccak_alg) (input: bytes) (out_length: output_length a): Lemma (hash_incremental a input out_length `S.equal` ( let s = Lib.Sequence.create 25 (u64 0) in let rateInBytes = rate a / 8 in let delimitedSuffix = suffix a in let bs, l = UpdateMulti.split_at_last rateInBytes ...
val sha3_is_incremental1 (a: keccak_alg) (input: bytes) (out_length: output_length a): Lemma (hash_incremental a input out_length `S.equal` ( let s = Lib.Sequence.create 25 (u64 0) in let rateInBytes = rate a / 8 in let delimitedSuffix = suffix a in let bs, l = UpdateMulti.split_at_last rateInBytes ...
let sha3_is_incremental1 a input out_length = calc (==) { hash_incremental a input out_length; (==) { } (let s = init a in let bs, l = split_blocks a input in let s = update_multi a s () bs in let s = update_last a s () l in finish a s out_length); (==) { } ...
{ "file_name": "specs/lemmas/Spec.SHA3.Incremental.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 3, "end_line": 171, "start_col": 0, "start_line": 56 }
module Spec.SHA3.Incremental module S = FStar.Seq open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Hash.Incremental.Definitions open Spec.Hash.Lemmas friend Spec.Agile.Hash open FStar.Mul module Loops = Lib.LoopCombinators module UpdateMulti = Lib.UpdateMulti open Lib.IntTypes #set-options "--fuel 0 --if...
{ "checked_file": "/", "dependencies": [ "Spec.SHA3.fst.checked", "Spec.Hash.Lemmas.fsti.checked", "Spec.Hash.Incremental.Definitions.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fst.checked", "Spec.Agile.Hash.fst.checked", "prims.fst.checked", "Lib.UpdateMulti...
[ { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": true, "full_module": "Lib.UpdateMulti", "short_module": "UpdateMulti" }, { "abbrev": true, "full_module": "Lib.LoopCombinators", "short_module": "Loops" }, { "abbrev": false, ...
{ "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_el...
false
a: Spec.Hash.Definitions.keccak_alg -> input: Spec.Hash.Definitions.bytes -> out_length: Spec.Hash.Definitions.output_length a -> FStar.Pervasives.Lemma (ensures FStar.Seq.Base.equal (Spec.Hash.Incremental.Definitions.hash_incremental a input out_length) (let s = Lib.Sequence.create 25 ...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.Hash.Definitions.keccak_alg", "Spec.Hash.Definitions.bytes", "Spec.Hash.Definitions.output_length", "FStar.Calc.calc_finish", "FStar.Seq.Base.seq", "Lib.IntTypes.uint8", "FStar.Seq.Base.equal", "Lib.UpdateMulti.uint8", "Prims.op_Equality", "Prims.int", "FStar.Seq.Base.length", "Spec.Agil...
[]
false
false
true
false
false
let sha3_is_incremental1 a input out_length =
calc ( == ) { hash_incremental a input out_length; ( == ) { () } (let s = init a in let bs, l = split_blocks a input in let s = update_multi a s () bs in let s = update_last a s () l in finish a s out_length); ( == ) { () } (let s = Lib.Sequence.create 25 (u64 0) in let rateInBytes = rate ...
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_nat_from_to_bytes_be_preserves_value
val lemma_nat_from_to_bytes_be_preserves_value: #l:secrecy_level -> b:bytes_l l -> len:size_nat{len == Lib.Sequence.length b} -> Lemma (nat_to_bytes_be #l len (nat_from_bytes_be b) == b)
val lemma_nat_from_to_bytes_be_preserves_value: #l:secrecy_level -> b:bytes_l l -> len:size_nat{len == Lib.Sequence.length b} -> Lemma (nat_to_bytes_be #l len (nat_from_bytes_be b) == b)
let lemma_nat_from_to_bytes_be_preserves_value #l b len = lemma_nat_from_to_intseq_be_preserves_value len b
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 51, "end_line": 756, "start_col": 0, "start_line": 755 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.ByteSequence.bytes_l l -> len: Lib.IntTypes.size_nat{len == Lib.Sequence.length b} -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_to_bytes_be len (Lib.ByteSequence.nat_from_bytes_be b) == b)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.secrecy_level", "Lib.ByteSequence.bytes_l", "Lib.IntTypes.size_nat", "Prims.eq2", "Prims.nat", "Lib.Sequence.length", "Lib.IntTypes.uint_t", "Lib.IntTypes.U8", "Lib.ByteSequence.lemma_nat_from_to_intseq_be_preserves_value", "Prims.unit" ]
[]
true
false
true
false
false
let lemma_nat_from_to_bytes_be_preserves_value #l b len =
lemma_nat_from_to_intseq_be_preserves_value len b
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_le_slice_lemma
val uints_from_bytes_le_slice_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> Lemma (slice (uints_from_bytes_le #t #l #len b) i j == uints_from_bytes_le #t #l #(j-i) (slice b (i * n...
val uints_from_bytes_le_slice_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> Lemma (slice (uints_from_bytes_le #t #l #len b) i j == uints_from_bytes_le #t #l #(j-i) (slice b (i * n...
let uints_from_bytes_le_slice_lemma #t #l #len b i j = FStar.Classical.forall_intro (uints_from_bytes_le_slice_lemma_lp #t #l #len b i j); FStar.Classical.forall_intro (uints_from_bytes_le_slice_lemma_rp #t #l #len b i j); eq_intro (slice (uints_from_bytes_le #t #l #len b) i j) (uints_from_bytes_le #t #l #(j-i) (...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 136, "end_line": 444, "start_col": 0, "start_line": 441 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> i: Prims.nat -> j: Prims.nat{i <= j /\ j <= len} -> FStar.Pervasives.Lemma (ensures Lib.Sequence.slice (Lib.ByteSequence.uints_from_bytes_le b) i j == Lib.ByteSequence.uints_from_bytes_le (Lib.Sequence.slice b (...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_pos", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[]
false
false
true
false
false
let uints_from_bytes_le_slice_lemma #t #l #len b i j =
FStar.Classical.forall_intro (uints_from_bytes_le_slice_lemma_lp #t #l #len b i j); FStar.Classical.forall_intro (uints_from_bytes_le_slice_lemma_rp #t #l #len b i j); eq_intro (slice (uints_from_bytes_le #t #l #len b) i j) (uints_from_bytes_le #t #l #(j - i) (slice b (i * numbytes t) (j * numbytes t)))
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.lemma_to_poly_degree
val lemma_to_poly_degree (#f:G.field) (e:G.felem f) : Lemma (requires True) (ensures degree (to_poly e) < I.bits f.G.t) [SMTPat (to_poly e)]
val lemma_to_poly_degree (#f:G.field) (e:G.felem f) : Lemma (requires True) (ensures degree (to_poly e) < I.bits f.G.t) [SMTPat (to_poly e)]
let lemma_to_poly_degree #f e = reveal_defs ()
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 16, "end_line": 25, "start_col": 0, "start_line": 24 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
e: Spec.GaloisField.felem f -> FStar.Pervasives.Lemma (ensures Vale.Math.Poly2_s.degree (Vale.Math.Poly2.Galois.to_poly e) < Lib.IntTypes.bits (GF?.t f)) [SMTPat (Vale.Math.Poly2.Galois.to_poly e)]
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.GaloisField.field", "Spec.GaloisField.felem", "Vale.Math.Poly2_s.reveal_defs", "Prims.unit" ]
[]
true
false
true
false
false
let lemma_to_poly_degree #f e =
reveal_defs ()
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.lemma_irred_degree
val lemma_irred_degree (f:G.field) : Lemma (requires True) (ensures degree (irred_poly f) == I.bits f.G.t) [SMTPat (irred_poly f)]
val lemma_irred_degree (f:G.field) : Lemma (requires True) (ensures degree (irred_poly f) == I.bits f.G.t) [SMTPat (irred_poly f)]
let lemma_irred_degree f = let G.GF t irred = f in let n = I.bits t in PL.lemma_index_all (); PL.lemma_monomial_define n; PL.lemma_add_define_all (); PL.lemma_degree_is (irred_poly f) n; ()
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 4, "end_line": 34, "start_col": 0, "start_line": 27 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
f: Spec.GaloisField.field -> FStar.Pervasives.Lemma (ensures Vale.Math.Poly2_s.degree (Vale.Math.Poly2.Galois.irred_poly f) == Lib.IntTypes.bits (GF?.t f)) [SMTPat (Vale.Math.Poly2.Galois.irred_poly f)]
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.GaloisField.field", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Prims.unit", "Vale.Math.Poly2.Lemmas.lemma_degree_is", "Vale.Math.Poly2.Galois.irred_poly", "Vale.Math...
[]
false
false
true
false
false
let lemma_irred_degree f =
let G.GF t irred = f in let n = I.bits t in PL.lemma_index_all (); PL.lemma_monomial_define n; PL.lemma_add_define_all (); PL.lemma_degree_is (irred_poly f) n; ()
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.lemma_poly_felem
val lemma_poly_felem (f:G.field) (p:poly) : Lemma (requires degree p < I.bits (G.GF?.t f)) (ensures to_poly (to_felem f p) == p) [SMTPat (to_poly (to_felem f p))]
val lemma_poly_felem (f:G.field) (p:poly) : Lemma (requires degree p < I.bits (G.GF?.t f)) (ensures to_poly (to_felem f p) == p) [SMTPat (to_poly (to_felem f p))]
let lemma_poly_felem f p = let G.GF t irred = f in let n = I.bits t in let r = reverse p (n - 1) in let s = to_seq r n in let u = U.from_vec #n s in let e = Lib.IntTypes.Compatibility.nat_to_uint u in let u' = I.v #t #I.SEC e in let s' = U.to_vec #n u' in let r' = of_seq s' in let p' = reverse r' (n...
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 4, "end_line": 51, "start_col": 0, "start_line": 36 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
f: Spec.GaloisField.field -> p: Vale.Math.Poly2_s.poly -> FStar.Pervasives.Lemma (requires Vale.Math.Poly2_s.degree p < Lib.IntTypes.bits (GF?.t f)) (ensures Vale.Math.Poly2.Galois.to_poly (Vale.Math.Poly2.Galois.to_felem f p) == p) [SMTPat (Vale.Math.Poly2.Galois.to_poly (Vale.Math.Poly2.Galois.to_felem ...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.GaloisField.field", "Vale.Math.Poly2_s.poly", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Prims.unit", "Vale.Math.Poly2.lemma_equal", "Vale.Math.Poly2.Lemmas.lemma_re...
[]
false
false
true
false
false
let lemma_poly_felem f p =
let G.GF t irred = f in let n = I.bits t in let r = reverse p (n - 1) in let s = to_seq r n in let u = U.from_vec #n s in let e = Lib.IntTypes.Compatibility.nat_to_uint u in let u' = I.v #t #I.SEC e in let s' = U.to_vec #n u' in let r' = of_seq s' in let p' = reverse r' (n - 1) in PL.lemma_index_all (); PL.lemma_revers...
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_be_nat_lemma_
val uints_from_bytes_be_nat_lemma_: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> Lemma (nat_from_intseq_be_ (uints_from_bytes_be #t #l #len b) == nat_from_intseq_be_ b)
val uints_from_bytes_be_nat_lemma_: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> Lemma (nat_from_intseq_be_ (uints_from_bytes_be #t #l #len b) == nat_from_intseq_be_ b)
let rec uints_from_bytes_be_nat_lemma_ #t #l #len b = if len = 0 then () else begin uints_from_bytes_be_nat_lemma_aux #t #l #len b; nat_from_intseq_be_slice_lemma_ b (numbytes t); uints_from_bytes_be_nat_lemma_ #t #l #(len - 1) (slice b (numbytes t) (len * numbytes t)) end
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 547, "start_col": 0, "start_line": 541 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_from_intseq_be_ (Lib.ByteSequence.uints_from_bytes_be b) == Lib.ByteSequence.nat_from_intseq_be_ b)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[ "recursion" ]
false
false
true
false
false
let rec uints_from_bytes_be_nat_lemma_ #t #l #len b =
if len = 0 then () else (uints_from_bytes_be_nat_lemma_aux #t #l #len b; nat_from_intseq_be_slice_lemma_ b (numbytes t); uints_from_bytes_be_nat_lemma_ #t #l #(len - 1) (slice b (numbytes t) (len * numbytes t)))
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_from_intseq_le_slice_lemma_
val nat_from_intseq_le_slice_lemma_: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat -> b:lseq (int_t t l) len -> i:nat{i <= len} -> Lemma (nat_from_intseq_le_ b == nat_from_intseq_le_ (slice b 0 i) + pow2 (i * bits t) * nat_from_intseq_le_ (slice b i len))
val nat_from_intseq_le_slice_lemma_: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat -> b:lseq (int_t t l) len -> i:nat{i <= len} -> Lemma (nat_from_intseq_le_ b == nat_from_intseq_le_ (slice b 0 i) + pow2 (i * bits t) * nat_from_intseq_le_ (slice b i len))
let rec nat_from_intseq_le_slice_lemma_ #t #l #len b i = if len = 0 then () else begin if i = 0 then () else begin let b1 = slice b 0 i in nat_from_intseq_le_slice_lemma_ #t #l #i b1 (i - 1); assert (nat_from_intseq_le_ b1 == nat_from_intseq_le_ (slice b 0 (i - 1)) + pow2 ((i - 1) * bits t...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 386, "start_col": 0, "start_line": 374 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.Sequence.lseq (Lib.IntTypes.int_t t l) len -> i: Prims.nat{i <= len} -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_from_intseq_le_ b == Lib.ByteSequence.nat_from_intseq_le_ (Lib.Sequence.slice b 0 i) + Prims.pow2 (i * Lib.IntTypes.bits t) * Lib.ByteSequence.nat_from_intseq...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Prims.nat", "Prims.op_LessThanOrEqual", "Prims.op_Equality", "Prims.int", "Prims.bool", "Lib.ByteSequence.nat_from_intseq_slice_lem...
[ "recursion" ]
false
false
true
false
false
let rec nat_from_intseq_le_slice_lemma_ #t #l #len b i =
if len = 0 then () else if i = 0 then () else let b1 = slice b 0 i in nat_from_intseq_le_slice_lemma_ #t #l #i b1 (i - 1); assert (nat_from_intseq_le_ b1 == nat_from_intseq_le_ (slice b 0 (i - 1)) + pow2 ((i - 1) * bits t) * v b.[ i - 1 ]); nat_from_intseq_le_slice_lemma_ #t #l #len b (i -...
false
Lib.ByteSequence.fst
Lib.ByteSequence.index_nat_to_intseq_le
val index_nat_to_intseq_le: #t:inttype{unsigned t} -> #l:secrecy_level -> len:size_nat -> n:nat{n < pow2 (bits t * len)} -> i:nat{i < len} -> Lemma (Seq.index (nat_to_intseq_le #t #l len n) i == uint #t #l (n / pow2 (bits t * i) % pow2 (bits t)))
val index_nat_to_intseq_le: #t:inttype{unsigned t} -> #l:secrecy_level -> len:size_nat -> n:nat{n < pow2 (bits t * len)} -> i:nat{i < len} -> Lemma (Seq.index (nat_to_intseq_le #t #l len n) i == uint #t #l (n / pow2 (bits t * i) % pow2 (bits t)))
let rec index_nat_to_intseq_le #t #l len n i = if i = 0 then if len = 0 then () else head_nat_to_intseq_le #t #l len n else begin FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t); calc (==) { Seq.index (nat_to_intseq_le #t #l (len - 1) (n / modulus t)) (i - 1); == { index_nat...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 7, "end_line": 252, "start_col": 0, "start_line": 232 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
len: Lib.IntTypes.size_nat -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> i: Prims.nat{i < len} -> FStar.Pervasives.Lemma (ensures FStar.Seq.Base.index (Lib.ByteSequence.nat_to_intseq_le len n) i == Lib.IntTypes.uint (n / Prims.pow2 (Lib.IntTypes.bits t * i) % Prims.pow2 (...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.nat", "Prims.op_LessThan", "Prims.pow2", "FStar.Mul.op_Star", "Lib.IntTypes.bits", "Prims.op_Equality", "Prims.int", "Prims.bool", "Lib.ByteSequence.head_nat_to_intse...
[ "recursion" ]
false
false
true
false
false
let rec index_nat_to_intseq_le #t #l len n i =
if i = 0 then if len = 0 then () else head_nat_to_intseq_le #t #l len n else (FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t); calc ( == ) { Seq.index (nat_to_intseq_le #t #l (len - 1) (n / modulus t)) (i - 1); ( == ) { index_nat_to_intseq_le #t #l (len - 1) (n / modulus t) (i - 1) } ...
false
Lib.ByteSequence.fst
Lib.ByteSequence.modulo_pow2_prop
val modulo_pow2_prop: r:pos -> a:nat -> b:nat -> c:nat{c < b} -> Lemma ((a % pow2 (r * b) / pow2 (r * c)) % pow2 r == (a / pow2 (r * c)) % pow2 r)
val modulo_pow2_prop: r:pos -> a:nat -> b:nat -> c:nat{c < b} -> Lemma ((a % pow2 (r * b) / pow2 (r * c)) % pow2 r == (a / pow2 (r * c)) % pow2 r)
let modulo_pow2_prop r a b c = calc (==) { ((a % pow2 (r * b)) / pow2 (r * c)) % pow2 r; == { Math.Lemmas.pow2_modulo_division_lemma_1 a (r * c) (r * b) } ((a / pow2 (r * c) % pow2 (r * b - r * c))) % pow2 r; == { Math.Lemmas.lemma_mul_sub_distr r b c } ((a / pow2 (r * c) % pow2 (r * (b - c)))) % ...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 3, "end_line": 599, "start_col": 0, "start_line": 588 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
r: Prims.pos -> a: Prims.nat -> b: Prims.nat -> c: Prims.nat{c < b} -> FStar.Pervasives.Lemma (ensures a % Prims.pow2 (r * b) / Prims.pow2 (r * c) % Prims.pow2 r == a / Prims.pow2 (r * c) % Prims.pow2 r)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Prims.pos", "Prims.nat", "Prims.b2t", "Prims.op_LessThan", "FStar.Calc.calc_finish", "Prims.int", "Prims.eq2", "Prims.op_Modulus", "Prims.op_Division", "Prims.pow2", "FStar.Mul.op_Star", "Prims.Cons", "FStar.Preorder.relation", "Prims.Nil", "Prims.unit", "FStar.Calc.calc_step", "Pri...
[]
false
false
true
false
false
let modulo_pow2_prop r a b c =
calc ( == ) { ((a % pow2 (r * b)) / pow2 (r * c)) % pow2 r; ( == ) { Math.Lemmas.pow2_modulo_division_lemma_1 a (r * c) (r * b) } ((a / pow2 (r * c) % pow2 (r * b - r * c))) % pow2 r; ( == ) { Math.Lemmas.lemma_mul_sub_distr r b c } ((a / pow2 (r * c) % pow2 (r * (b - c)))) % pow2 r; ( == ) { Math.Lemmas.po...
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_be_slice_lemma_rp
val uints_from_bytes_be_slice_lemma_rp: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} -> Lemma (index (uints_from_bytes_be #t #l #(j-i) (slic...
val uints_from_bytes_be_slice_lemma_rp: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} -> Lemma (index (uints_from_bytes_be #t #l #(j-i) (slic...
let uints_from_bytes_be_slice_lemma_rp #t #l #len b i j k = let b1 = slice b (i * numbytes t) (j * numbytes t) in let r = uints_from_bytes_be #t #l #(j-i) b1 in index_uints_from_bytes_be #t #l #(j-i) b1 k; assert (r.[k] == uint_from_bytes_be (sub b1 (k * numbytes t) (numbytes t))); assert (r.[k] == uint_from_...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 82, "end_line": 509, "start_col": 0, "start_line": 504 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> i: Prims.nat -> j: Prims.nat{i <= j /\ j <= len} -> k: Prims.nat{k < j - i} -> FStar.Pervasives.Lemma (ensures Lib.Sequence.index (Lib.ByteSequence.uints_from_bytes_be (Lib.Sequence.slice b (i * Lib.IntTypes.n...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_pos", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[]
true
false
true
false
false
let uints_from_bytes_be_slice_lemma_rp #t #l #len b i j k =
let b1 = slice b (i * numbytes t) (j * numbytes t) in let r = uints_from_bytes_be #t #l #(j - i) b1 in index_uints_from_bytes_be #t #l #(j - i) b1 k; assert (r.[ k ] == uint_from_bytes_be (sub b1 (k * numbytes t) (numbytes t))); assert (r.[ k ] == uint_from_bytes_be (sub b ((i + k) * numbytes t) (numbytes t)))
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_be_slice_lemma
val uints_from_bytes_be_slice_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> Lemma (slice (uints_from_bytes_be #t #l #len b) i j == uints_from_bytes_be #t #l #(j-i) (slice b (i * n...
val uints_from_bytes_be_slice_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> Lemma (slice (uints_from_bytes_be #t #l #len b) i j == uints_from_bytes_be #t #l #(j-i) (slice b (i * n...
let uints_from_bytes_be_slice_lemma #t #l #len b i j = FStar.Classical.forall_intro (uints_from_bytes_be_slice_lemma_lp #t #l #len b i j); FStar.Classical.forall_intro (uints_from_bytes_be_slice_lemma_rp #t #l #len b i j); eq_intro (slice (uints_from_bytes_be #t #l #len b) i j) (uints_from_bytes_be #t #l #(j-i) (...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 136, "end_line": 518, "start_col": 0, "start_line": 515 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> i: Prims.nat -> j: Prims.nat{i <= j /\ j <= len} -> FStar.Pervasives.Lemma (ensures Lib.Sequence.slice (Lib.ByteSequence.uints_from_bytes_be b) i j == Lib.ByteSequence.uints_from_bytes_be (Lib.Sequence.slice b (...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_pos", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[]
false
false
true
false
false
let uints_from_bytes_be_slice_lemma #t #l #len b i j =
FStar.Classical.forall_intro (uints_from_bytes_be_slice_lemma_lp #t #l #len b i j); FStar.Classical.forall_intro (uints_from_bytes_be_slice_lemma_rp #t #l #len b i j); eq_intro (slice (uints_from_bytes_be #t #l #len b) i j) (uints_from_bytes_be #t #l #(j - i) (slice b (i * numbytes t) (j * numbytes t)))
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.lemma_felem_poly
val lemma_felem_poly (#f:G.field) (e:G.felem f) : Lemma (requires True) (ensures to_felem f (to_poly e) == e) [SMTPat (to_felem f (to_poly e))]
val lemma_felem_poly (#f:G.field) (e:G.felem f) : Lemma (requires True) (ensures to_felem f (to_poly e) == e) [SMTPat (to_felem f (to_poly e))]
let lemma_felem_poly #f e = let G.GF t irred = f in let n = I.bits t in let u = I.v #t #I.SEC e in let s = U.to_vec #n u in let r = of_seq s in let p = reverse r (n - 1) in let r' = reverse p (n - 1) in let s' = to_seq r' n in let u' = U.from_vec #n s' in let e' = Lib.IntTypes.Compatibility.nat_to_u...
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 4, "end_line": 69, "start_col": 0, "start_line": 53 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
e: Spec.GaloisField.felem f -> FStar.Pervasives.Lemma (ensures Vale.Math.Poly2.Galois.to_felem f (Vale.Math.Poly2.Galois.to_poly e) == e) [SMTPat (Vale.Math.Poly2.Galois.to_felem f (Vale.Math.Poly2.Galois.to_poly e))]
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.GaloisField.field", "Spec.GaloisField.felem", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Prims.unit", "Lib.IntTypes.Compatibility.uintv_extensionality", "Spec.Galois...
[]
false
false
true
false
false
let lemma_felem_poly #f e =
let G.GF t irred = f in let n = I.bits t in let u = I.v #t #I.SEC e in let s = U.to_vec #n u in let r = of_seq s in let p = reverse r (n - 1) in let r' = reverse p (n - 1) in let s' = to_seq r' n in let u' = U.from_vec #n s' in let e' = Lib.IntTypes.Compatibility.nat_to_uint #t #I.SEC u' in PL.lemma_index_all (); PL.le...
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.sum_of_bools
val sum_of_bools : j: Prims.int -> k: Prims.int -> f: (_: Prims.int -> Prims.bool) -> Prims.Tot Prims.bool
let sum_of_bools = D.sum_of_bools
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 40, "end_line": 166, "start_col": 7, "start_line": 166 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "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_el...
false
j: Prims.int -> k: Prims.int -> f: (_: Prims.int -> Prims.bool) -> Prims.Tot Prims.bool
Prims.Tot
[ "total", "" ]
[]
[ "Vale.Math.Poly2.Defs_s.sum_of_bools" ]
[]
false
false
false
true
false
let sum_of_bools =
D.sum_of_bools
false
Lib.ByteSequence.fst
Lib.ByteSequence.index_nat_to_intseq_to_bytes_le
val index_nat_to_intseq_to_bytes_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> len:nat{len * numbytes t < pow2 32} -> n:nat{n < pow2 (bits t * len)} -> i:nat{i < len * numbytes t} -> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in Seq.index (nat_to_bytes_le #...
val index_nat_to_intseq_to_bytes_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> len:nat{len * numbytes t < pow2 32} -> n:nat{n < pow2 (bits t * len)} -> i:nat{i < len * numbytes t} -> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in Seq.index (nat_to_bytes_le #...
let index_nat_to_intseq_to_bytes_le #t #l len n i = let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in let m = numbytes t in index_nat_to_intseq_le #U8 #l (len * m) n i; assert (Seq.index (nat_to_bytes_le #l (len * m) n) i == uint (n / pow2 (8 * i) % pow2 8)); index_nat_to_intseq_le #U8 #l...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 23, "end_line": 647, "start_col": 0, "start_line": 637 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> i: Prims.nat{i < len * Lib.IntTypes.numbytes t} -> FStar.Pervasives.Lemma (ensures (let s = Lib.ByteSequence.nat_to_intseq_le len n in FStar.Seq.Base.index (Lib.B...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Prims.nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.IntTypes.bits", "Lib.ByteSequence.some_ari...
[]
true
false
true
false
false
let index_nat_to_intseq_to_bytes_le #t #l len n i =
let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in let m = numbytes t in index_nat_to_intseq_le #U8 #l (len * m) n i; assert (Seq.index (nat_to_bytes_le #l (len * m) n) i == uint (n / pow2 (8 * i) % pow2 8)); index_nat_to_intseq_le #U8 #l m (v s.[ i / m ]) (i % m); assert (Seq.index (nat_to_bytes_le #l m (v s...
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.mul_element
val mul_element (a b: poly) (k: int) : bool
val mul_element (a b: poly) (k: int) : bool
let mul_element (a b:poly) (k:int) : bool = sum_of_bools 0 (k + 1) (mul_element_fun a b k)
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 48, "end_line": 170, "start_col": 0, "start_line": 169 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "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_el...
false
a: Vale.Math.Poly2_s.poly -> b: Vale.Math.Poly2_s.poly -> k: Prims.int -> Prims.bool
Prims.Tot
[ "total" ]
[]
[ "Vale.Math.Poly2_s.poly", "Prims.int", "Vale.Math.Poly2.Galois.sum_of_bools", "Prims.op_Addition", "Vale.Math.Poly2.Galois.mul_element_fun", "Prims.bool" ]
[]
false
false
false
true
false
let mul_element (a b: poly) (k: int) : bool =
sum_of_bools 0 (k + 1) (mul_element_fun a b k)
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.mul_element_fun
val mul_element_fun (a b: poly) (k i: int) : bool
val mul_element_fun (a b: poly) (k i: int) : bool
let mul_element_fun (a b:poly) (k i:int) : bool = a.[i] && b.[k - i]
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 68, "end_line": 167, "start_col": 0, "start_line": 167 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "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_el...
false
a: Vale.Math.Poly2_s.poly -> b: Vale.Math.Poly2_s.poly -> k: Prims.int -> i: Prims.int -> Prims.bool
Prims.Tot
[ "total" ]
[]
[ "Vale.Math.Poly2_s.poly", "Prims.int", "Prims.op_AmpAmp", "Vale.Math.Poly2_s.op_String_Access", "Prims.op_Subtraction", "Prims.bool" ]
[]
false
false
false
true
false
let mul_element_fun (a b: poly) (k i: int) : bool =
a.[ i ] && b.[ k - i ]
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_to_bytes_le_nat_lemma
val uints_to_bytes_le_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> len:nat{len * numbytes t < pow2 32} -> n:nat{n < pow2 (bits t * len)} -> Lemma (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n) == nat_to_bytes_le (len * numbytes t) n)
val uints_to_bytes_le_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> len:nat{len * numbytes t < pow2 32} -> n:nat{n < pow2 (bits t * len)} -> Lemma (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n) == nat_to_bytes_le (len * numbytes t) n)
let uints_to_bytes_le_nat_lemma #t #l len n = Classical.forall_intro (uints_to_bytes_le_nat_lemma_ #t #l len n); eq_intro (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n)) (nat_to_bytes_le (len * numbytes t) n)
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 49, "end_line": 670, "start_col": 0, "start_line": 667 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.uints_to_bytes_le (Lib.ByteSequence.nat_to_intseq_le len n) == Lib.ByteSequence.nat_to_bytes_le (len * Lib.IntTypes.num...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Prims.nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.IntTypes.bits", "Lib.Sequence.eq_intro", ...
[]
false
false
true
false
false
let uints_to_bytes_le_nat_lemma #t #l len n =
Classical.forall_intro (uints_to_bytes_le_nat_lemma_ #t #l len n); eq_intro (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n)) (nat_to_bytes_le (len * numbytes t) n)
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.pmul
val pmul (a b: poly) : poly
val pmul (a b: poly) : poly
let pmul (a b:poly) : poly = pmul_rec a b (poly_length b)
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 30, "end_line": 192, "start_col": 0, "start_line": 191 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "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_el...
false
a: Vale.Math.Poly2_s.poly -> b: Vale.Math.Poly2_s.poly -> Vale.Math.Poly2_s.poly
Prims.Tot
[ "total" ]
[]
[ "Vale.Math.Poly2_s.poly", "Vale.Math.Poly2.Galois.pmul_rec", "Vale.Math.Poly2.Galois.poly_length" ]
[]
false
false
false
true
false
let pmul (a b: poly) : poly =
pmul_rec a b (poly_length b)
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.mod_bit1
val mod_bit1 (a m: poly) : poly
val mod_bit1 (a m: poly) : poly
let mod_bit1 (a m:poly) : poly = if a.[degree m] then a +. m else a
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 36, "end_line": 202, "start_col": 0, "start_line": 201 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "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_el...
false
a: Vale.Math.Poly2_s.poly -> m: Vale.Math.Poly2_s.poly -> Vale.Math.Poly2_s.poly
Prims.Tot
[ "total" ]
[]
[ "Vale.Math.Poly2_s.poly", "Vale.Math.Poly2_s.op_String_Access", "Vale.Math.Poly2_s.degree", "Vale.Math.Poly2.op_Plus_Dot", "Prims.bool" ]
[]
false
false
false
true
false
let mod_bit1 (a m: poly) : poly =
if a.[ degree m ] then a +. m else a
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_from_intseq_le_inj
val nat_from_intseq_le_inj: #t:inttype{unsigned t} -> #l:secrecy_level -> b1:seq (uint_t t l) -> b2:seq (uint_t t l) -> Lemma (requires length b1 == length b2 /\ nat_from_intseq_le b1 == nat_from_intseq_le b2) (ensures Seq.equal b1 b2) (decreases (length b1))
val nat_from_intseq_le_inj: #t:inttype{unsigned t} -> #l:secrecy_level -> b1:seq (uint_t t l) -> b2:seq (uint_t t l) -> Lemma (requires length b1 == length b2 /\ nat_from_intseq_le b1 == nat_from_intseq_le b2) (ensures Seq.equal b1 b2) (decreases (length b1))
let rec nat_from_intseq_le_inj #t #l b1 b2 = if length b1 = 0 then () else begin nat_from_intseq_le_inj (Seq.slice b1 1 (length b1)) (Seq.slice b2 1 (length b2)); Seq.lemma_split b1 1; Seq.lemma_split b2 1 end
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 728, "start_col": 0, "start_line": 722 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b1: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) -> b2: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) -> FStar.Pervasives.Lemma (requires Lib.Sequence.length b1 == Lib.Sequence.length b2 /\ Lib.ByteSequence.nat_from_intseq_le b1 == Lib.ByteSequence.nat_from_intseq_le b2) (ensures FStar.Seq.Base...
FStar.Pervasives.Lemma
[ "lemma", "" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.Sequence.seq", "Lib.IntTypes.uint_t", "Prims.op_Equality", "Prims.int", "Lib.Sequence.length", "Prims.bool", "FStar.Seq.Properties.lemma_split", "Prims.unit", "Lib.ByteSequence.nat_from_intseq_le...
[ "recursion" ]
false
false
true
false
false
let rec nat_from_intseq_le_inj #t #l b1 b2 =
if length b1 = 0 then () else (nat_from_intseq_le_inj (Seq.slice b1 1 (length b1)) (Seq.slice b2 1 (length b2)); Seq.lemma_split b1 1; Seq.lemma_split b2 1)
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.fmul_t
val fmul_t : f: Spec.GaloisField.field -> Type0
let fmul_t (f:G.field) = G.felem f & G.felem f & G.felem f
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 58, "end_line": 221, "start_col": 0, "start_line": 221 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "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_el...
false
f: Spec.GaloisField.field -> Type0
Prims.Tot
[ "total" ]
[]
[ "Spec.GaloisField.field", "FStar.Pervasives.Native.tuple3", "Spec.GaloisField.felem" ]
[]
false
false
false
true
true
let fmul_t (f: G.field) =
G.felem f & G.felem f & G.felem f
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.mod_shift1
val mod_shift1 (a irred: poly) (k: nat) : poly
val mod_shift1 (a irred: poly) (k: nat) : poly
let mod_shift1 (a irred:poly) (k:nat) : poly = let s = shift a 1 %. monomial k in s +. (if a.[k - 1] then irred else zero)
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 42, "end_line": 219, "start_col": 0, "start_line": 217 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "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_el...
false
a: Vale.Math.Poly2_s.poly -> irred: Vale.Math.Poly2_s.poly -> k: Prims.nat -> Vale.Math.Poly2_s.poly
Prims.Tot
[ "total" ]
[]
[ "Vale.Math.Poly2_s.poly", "Prims.nat", "Vale.Math.Poly2.op_Plus_Dot", "Vale.Math.Poly2_s.op_String_Access", "Prims.op_Subtraction", "Prims.bool", "Vale.Math.Poly2_s.zero", "Vale.Math.Poly2.op_Percent_Dot", "Vale.Math.Poly2_s.shift", "Vale.Math.Poly2_s.monomial" ]
[]
false
false
false
true
false
let mod_shift1 (a irred: poly) (k: nat) : poly =
let s = shift a 1 %. monomial k in s +. (if a.[ k - 1 ] then irred else zero)
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.smul
val smul (a b m: poly) (n: nat) : poly
val smul (a b m: poly) (n: nat) : poly
let smul (a b m:poly) (n:nat) : poly = let (p, _, _) = smul_rec a b m n in p
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 3, "end_line": 215, "start_col": 0, "start_line": 213 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "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_el...
false
a: Vale.Math.Poly2_s.poly -> b: Vale.Math.Poly2_s.poly -> m: Vale.Math.Poly2_s.poly -> n: Prims.nat -> Vale.Math.Poly2_s.poly
Prims.Tot
[ "total" ]
[]
[ "Vale.Math.Poly2_s.poly", "Prims.nat", "FStar.Pervasives.Native.tuple3", "Vale.Math.Poly2.Galois.smul_rec" ]
[]
false
false
false
true
false
let smul (a b m: poly) (n: nat) : poly =
let p, _, _ = smul_rec a b m n in p
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_to_bytes_be_nat_lemma
val uints_to_bytes_be_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> len:nat{len * numbytes t < pow2 32} -> n:nat{n < pow2 (bits t * len)} -> Lemma (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n) == nat_to_bytes_be (len * numbytes t) n)
val uints_to_bytes_be_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> len:nat{len * numbytes t < pow2 32} -> n:nat{n < pow2 (bits t * len)} -> Lemma (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n) == nat_to_bytes_be (len * numbytes t) n)
let uints_to_bytes_be_nat_lemma #t #l len n = Classical.forall_intro (uints_to_bytes_be_nat_lemma_ #t #l len n); eq_intro (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n)) (nat_to_bytes_be (len * numbytes t) n)
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 49, "end_line": 718, "start_col": 0, "start_line": 715 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "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_el...
false
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.uints_to_bytes_be (Lib.ByteSequence.nat_to_intseq_be len n) == Lib.ByteSequence.nat_to_bytes_be (len * Lib.IntTypes.num...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Prims.nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.IntTypes.bits", "Lib.Sequence.eq_intro", ...
[]
false
false
true
false
false
let uints_to_bytes_be_nat_lemma #t #l len n =
Classical.forall_intro (uints_to_bytes_be_nat_lemma_ #t #l len n); eq_intro (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n)) (nat_to_bytes_be (len * numbytes t) n)
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.lemma_zero
val lemma_zero (f:G.field) : Lemma (requires True) (ensures to_poly #f G.zero == zero) [SMTPat (to_poly #f G.zero)]
val lemma_zero (f:G.field) : Lemma (requires True) (ensures to_poly #f G.zero == zero) [SMTPat (to_poly #f G.zero)]
let lemma_zero f = let G.GF t irred = f in let n = I.bits t in let a = zero in let b = to_poly #f G.zero in let eq_i (i:int) : Lemma (a.[i] == b.[i]) = PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_zero_define (); (if 0 <= i && i < n then U.zero_to_vec_lemma #n (n - 1 - i)); ...
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 35, "end_line": 83, "start_col": 0, "start_line": 71 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
f: Spec.GaloisField.field -> FStar.Pervasives.Lemma (ensures Vale.Math.Poly2.Galois.to_poly Spec.GaloisField.zero == Vale.Math.Poly2_s.zero) [SMTPat (Vale.Math.Poly2.Galois.to_poly Spec.GaloisField.zero)]
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.GaloisField.field", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Vale.Math.Poly2.Lemmas.lemma_pointwise_equal", "Prims.int", "Prims.unit", "Prims.l_True", "Prims.squ...
[]
false
false
true
false
false
let lemma_zero f =
let G.GF t irred = f in let n = I.bits t in let a = zero in let b = to_poly #f G.zero in let eq_i (i: int) : Lemma (a.[ i ] == b.[ i ]) = PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_zero_define (); (if 0 <= i && i < n then U.zero_to_vec_lemma #n (n - 1 - i)); () in PL.lemma_pointwise_equal...
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_uint_from_to_bytes_be_preserves_value
val lemma_uint_from_to_bytes_be_preserves_value : #t : inttype{unsigned t /\ ~(U1? t)} -> #l : secrecy_level -> s : lbytes_l l (numbytes t) -> Lemma(uint_to_bytes_be #t #l (uint_from_bytes_be #t #l s) `equal` s)
val lemma_uint_from_to_bytes_be_preserves_value : #t : inttype{unsigned t /\ ~(U1? t)} -> #l : secrecy_level -> s : lbytes_l l (numbytes t) -> Lemma(uint_to_bytes_be #t #l (uint_from_bytes_be #t #l s) `equal` s)
let lemma_uint_from_to_bytes_be_preserves_value #t #l s = let i = uint_from_bytes_be #t #l s in let s' = uint_to_bytes_be #t #l i in lemma_nat_from_to_bytes_be_preserves_value #l s' (length s'); assert(nat_to_bytes_be #l (length s') (nat_from_bytes_be s') == s'); lemma_uint_to_bytes_be_preserves_value #t #l i...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 60, "end_line": 797, "start_col": 0, "start_line": 786 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
s: Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t) -> FStar.Pervasives.Lemma (ensures Lib.Sequence.equal (Lib.ByteSequence.uint_to_bytes_be (Lib.ByteSequence.uint_from_bytes_be s)) s)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.ByteSequence.lbytes_l", "Lib.IntTypes.numbytes", "Lib.ByteSequence.lemma_nat_from_to_bytes_be_preserves_value", "Lib.Sequence.length", "Lib....
[]
true
false
true
false
false
let lemma_uint_from_to_bytes_be_preserves_value #t #l s =
let i = uint_from_bytes_be #t #l s in let s' = uint_to_bytes_be #t #l i in lemma_nat_from_to_bytes_be_preserves_value #l s' (length s'); assert (nat_to_bytes_be #l (length s') (nat_from_bytes_be s') == s'); lemma_uint_to_bytes_be_preserves_value #t #l i; assert (nat_from_bytes_be (uint_to_bytes_be #t #l i) == uint_v i)...
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_uints_to_from_bytes_le_preserves_value
val lemma_uints_to_from_bytes_le_preserves_value : #t : inttype{unsigned t /\ ~(U1? t)} -> #l : secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> s : lseq (uint_t t l) len -> Lemma(uints_from_bytes_le #t #l (uints_to_bytes_le #t #l s) == s)
val lemma_uints_to_from_bytes_le_preserves_value : #t : inttype{unsigned t /\ ~(U1? t)} -> #l : secrecy_level -> #len:size_nat{len * numbytes t < pow2 32} -> s : lseq (uint_t t l) len -> Lemma(uints_from_bytes_le #t #l (uints_to_bytes_le #t #l s) == s)
let lemma_uints_to_from_bytes_le_preserves_value #t #l #len s = let lemma_uints_to_from_bytes_le_preserves_value_i (i : size_nat {i < len}) : Lemma(index (uints_from_bytes_le #t #l (uints_to_bytes_le #t #l s)) i == index s i) = let b8 = uints_to_bytes_le #t #l s in index_uints_from_bytes_le #t #...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 68, "end_line": 860, "start_col": 0, "start_line": 848 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
s: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.uints_from_bytes_le (Lib.ByteSequence.uints_to_bytes_le s) == s)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_nat", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.Sequence.lseq", "Lib.IntTypes....
[]
false
false
true
false
false
let lemma_uints_to_from_bytes_le_preserves_value #t #l #len s =
let lemma_uints_to_from_bytes_le_preserves_value_i (i: size_nat{i < len}) : Lemma (index (uints_from_bytes_le #t #l (uints_to_bytes_le #t #l s)) i == index s i) = let b8 = uints_to_bytes_le #t #l s in index_uints_from_bytes_le #t #l #len b8 i; assert (index (uints_from_bytes_le b8) i == uint_from_bytes_...
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.lemma_and
val lemma_and (f:G.field) (e1 e2:G.felem f) : Lemma (requires True) (ensures to_poly (I.logand e1 e2) == (to_poly e1 &. to_poly e2)) [SMTPat (to_poly (I.logand e1 e2))]
val lemma_and (f:G.field) (e1 e2:G.felem f) : Lemma (requires True) (ensures to_poly (I.logand e1 e2) == (to_poly e1 &. to_poly e2)) [SMTPat (to_poly (I.logand e1 e2))]
let lemma_and f e1 e2 = let G.GF t irred = f in GI.define_logand t e1 e2; PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_and_define_all (); lemma_equal (to_poly (I.logand e1 e2)) (to_poly e1 &. to_poly e2)
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 67, "end_line": 119, "start_col": 0, "start_line": 113 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
f: Spec.GaloisField.field -> e1: Spec.GaloisField.felem f -> e2: Spec.GaloisField.felem f -> FStar.Pervasives.Lemma (ensures Vale.Math.Poly2.Galois.to_poly (Lib.IntTypes.logand e1 e2) == (Vale.Math.Poly2.Galois.to_poly e1 &. Vale.Math.Poly2.Galois.to_poly e2)) [SMTPat (Vale.Math.Poly2.Galo...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.GaloisField.field", "Spec.GaloisField.felem", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Vale.Math.Poly2.lemma_equal", "Vale.Math.Poly2.Galois.to_poly", "Lib.IntType...
[]
false
false
true
false
false
let lemma_and f e1 e2 =
let G.GF t irred = f in GI.define_logand t e1 e2; PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_and_define_all (); lemma_equal (to_poly (I.logand e1 e2)) (to_poly e1 &. to_poly e2)
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.poly_length
val poly_length (p: poly) : nat
val poly_length (p: poly) : nat
let poly_length (p:poly) : nat = (if degree p < 0 then PL.lemma_degree_negative p); 1 + degree p
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 14, "end_line": 164, "start_col": 0, "start_line": 162 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "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_el...
false
p: Vale.Math.Poly2_s.poly -> Prims.nat
Prims.Tot
[ "total" ]
[]
[ "Vale.Math.Poly2_s.poly", "Prims.op_Addition", "Vale.Math.Poly2_s.degree", "Prims.unit", "Prims.op_LessThan", "Vale.Math.Poly2.Lemmas.lemma_degree_negative", "Prims.bool", "Prims.nat" ]
[]
false
false
false
true
false
let poly_length (p: poly) : nat =
(if degree p < 0 then PL.lemma_degree_negative p); 1 + degree p
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.lemma_add
val lemma_add (f:G.field) (e1 e2:G.felem f) : Lemma (requires True) (ensures to_poly (G.fadd e1 e2) == to_poly e1 +. to_poly e2) [SMTPat (to_poly (G.fadd e1 e2))]
val lemma_add (f:G.field) (e1 e2:G.felem f) : Lemma (requires True) (ensures to_poly (G.fadd e1 e2) == to_poly e1 +. to_poly e2) [SMTPat (to_poly (G.fadd e1 e2))]
let lemma_add f e1 e2 = let G.GF t irred = f in GI.define_logxor t e1 e2; PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_add_define_all (); lemma_equal (to_poly (G.fadd e1 e2)) (to_poly e1 +. to_poly e2)
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 65, "end_line": 111, "start_col": 0, "start_line": 105 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
f: Spec.GaloisField.field -> e1: Spec.GaloisField.felem f -> e2: Spec.GaloisField.felem f -> FStar.Pervasives.Lemma (ensures Vale.Math.Poly2.Galois.to_poly (Spec.GaloisField.fadd e1 e2) == Vale.Math.Poly2.Galois.to_poly e1 +. Vale.Math.Poly2.Galois.to_poly e2) [SMTPat (Vale.Math.Poly2.Galo...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.GaloisField.field", "Spec.GaloisField.felem", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Vale.Math.Poly2.lemma_equal", "Vale.Math.Poly2.Galois.to_poly", "Spec.Galois...
[]
false
false
true
false
false
let lemma_add f e1 e2 =
let G.GF t irred = f in GI.define_logxor t e1 e2; PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_add_define_all (); lemma_equal (to_poly (G.fadd e1 e2)) (to_poly e1 +. to_poly e2)
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.lemma_or
val lemma_or (f:G.field) (e1 e2:G.felem f) : Lemma (requires True) (ensures to_poly (I.logor e1 e2) == (to_poly e1 |. to_poly e2)) [SMTPat (to_poly (I.logor e1 e2))]
val lemma_or (f:G.field) (e1 e2:G.felem f) : Lemma (requires True) (ensures to_poly (I.logor e1 e2) == (to_poly e1 |. to_poly e2)) [SMTPat (to_poly (I.logor e1 e2))]
let lemma_or f e1 e2 = let G.GF t irred = f in GI.define_logor t e1 e2; PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_or_define_all (); lemma_equal (to_poly (I.logor e1 e2)) (to_poly e1 |. to_poly e2)
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 66, "end_line": 127, "start_col": 0, "start_line": 121 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
f: Spec.GaloisField.field -> e1: Spec.GaloisField.felem f -> e2: Spec.GaloisField.felem f -> FStar.Pervasives.Lemma (ensures Vale.Math.Poly2.Galois.to_poly (Lib.IntTypes.logor e1 e2) == (Vale.Math.Poly2.Galois.to_poly e1 |. Vale.Math.Poly2.Galois.to_poly e2)) [SMTPat (Vale.Math.Poly2.Galoi...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.GaloisField.field", "Spec.GaloisField.felem", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Vale.Math.Poly2.lemma_equal", "Vale.Math.Poly2.Galois.to_poly", "Lib.IntType...
[]
false
false
true
false
false
let lemma_or f e1 e2 =
let G.GF t irred = f in GI.define_logor t e1 e2; PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_or_define_all (); lemma_equal (to_poly (I.logor e1 e2)) (to_poly e1 |. to_poly e2)
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.lemma_one
val lemma_one (f:G.field) : Lemma (requires True) (ensures to_poly #f G.one == one) [SMTPat (to_poly #f G.one)]
val lemma_one (f:G.field) : Lemma (requires True) (ensures to_poly #f G.one == one) [SMTPat (to_poly #f G.one)]
let lemma_one f = let G.GF t irred = f in let n = I.bits t in let a = one in let b = to_poly #f G.one in let eq_i (i:int) : Lemma (a.[i] == b.[i]) = PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_one_define (); (if 0 <= i && i < n then U.one_to_vec_lemma #n (n - 1 - i)); (...
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 35, "end_line": 103, "start_col": 0, "start_line": 91 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
f: Spec.GaloisField.field -> FStar.Pervasives.Lemma (ensures Vale.Math.Poly2.Galois.to_poly Spec.GaloisField.one == Vale.Math.Poly2_s.one) [SMTPat (Vale.Math.Poly2.Galois.to_poly Spec.GaloisField.one)]
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.GaloisField.field", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Vale.Math.Poly2.Lemmas.lemma_pointwise_equal", "Prims.int", "Prims.unit", "Prims.l_True", "Prims.squ...
[]
false
false
true
false
false
let lemma_one f =
let G.GF t irred = f in let n = I.bits t in let a = one in let b = to_poly #f G.one in let eq_i (i: int) : Lemma (a.[ i ] == b.[ i ]) = PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_one_define (); (if 0 <= i && i < n then U.one_to_vec_lemma #n (n - 1 - i)); () in PL.lemma_pointwise_equal a b...
false
Lib.ByteSequence.fst
Lib.ByteSequence.uints_from_bytes_le_nat_lemma_aux
val uints_from_bytes_le_nat_lemma_aux: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> Lemma (nat_from_intseq_le_ (uints_from_bytes_le #t #l #len b) == nat_from_intseq_le_ (slice b 0 (numbytes t)) + pow2 (bits...
val uints_from_bytes_le_nat_lemma_aux: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32} -> b:lbytes_l l (len * numbytes t) -> Lemma (nat_from_intseq_le_ (uints_from_bytes_le #t #l #len b) == nat_from_intseq_le_ (slice b 0 (numbytes t)) + pow2 (bits...
let uints_from_bytes_le_nat_lemma_aux #t #l #len b = let r = uints_from_bytes_le #t #l #len b in assert (nat_from_intseq_le_ r == v r.[0] + pow2 (bits t) * nat_from_intseq_le_ (slice r 1 len)); assert (nat_from_intseq_le_ (slice b 0 (numbytes t)) == v r.[0]); uints_from_bytes_le_slice_lemma #t #l #len b 1 len; ...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 104, "end_line": 460, "start_col": 0, "start_line": 455 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> FStar.Pervasives.Lemma (ensures Lib.ByteSequence.nat_from_intseq_le_ (Lib.ByteSequence.uints_from_bytes_le b) == Lib.ByteSequence.nat_from_intseq_le_ (Lib.Sequence.slice b 0 (Lib.IntTypes.numbytes t)) + Prims.pow2 (Lib.IntTypes.bi...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.IntTypes.size_pos", "Prims.op_LessThan", "FStar.Mul.op_Star", "Lib.IntTypes.numbytes", "Prims.pow2", "Lib.ByteSequence.lbytes_l", "Prims...
[]
true
false
true
false
false
let uints_from_bytes_le_nat_lemma_aux #t #l #len b =
let r = uints_from_bytes_le #t #l #len b in assert (nat_from_intseq_le_ r == v r.[ 0 ] + pow2 (bits t) * nat_from_intseq_le_ (slice r 1 len)); assert (nat_from_intseq_le_ (slice b 0 (numbytes t)) == v r.[ 0 ]); uints_from_bytes_le_slice_lemma #t #l #len b 1 len; assert (slice r 1 len == uints_from_bytes_le #t #l #(...
false
Lib.ByteSequence.fst
Lib.ByteSequence.nat_from_intseq_be_inj
val nat_from_intseq_be_inj: #t:inttype{unsigned t} -> #l:secrecy_level -> b1:seq (uint_t t l) -> b2:seq (uint_t t l) -> Lemma (requires length b1 == length b2 /\ nat_from_intseq_be b1 == nat_from_intseq_be b2) (ensures Seq.equal b1 b2) (decreases (length b1))
val nat_from_intseq_be_inj: #t:inttype{unsigned t} -> #l:secrecy_level -> b1:seq (uint_t t l) -> b2:seq (uint_t t l) -> Lemma (requires length b1 == length b2 /\ nat_from_intseq_be b1 == nat_from_intseq_be b2) (ensures Seq.equal b1 b2) (decreases (length b1))
let rec nat_from_intseq_be_inj #t #l b1 b2 = if length b1 = 0 then () else begin nat_from_intseq_be_inj (Seq.slice b1 0 (length b1 - 1)) (Seq.slice b2 0 (length b2 - 1)); Seq.lemma_split b1 (length b1 - 1); Seq.lemma_split b2 (length b2 - 1) end
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 5, "end_line": 736, "start_col": 0, "start_line": 730 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
b1: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) -> b2: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) -> FStar.Pervasives.Lemma (requires Lib.Sequence.length b1 == Lib.Sequence.length b2 /\ Lib.ByteSequence.nat_from_intseq_be b1 == Lib.ByteSequence.nat_from_intseq_be b2) (ensures FStar.Seq.Base...
FStar.Pervasives.Lemma
[ "lemma", "" ]
[]
[ "Lib.IntTypes.inttype", "Prims.b2t", "Lib.IntTypes.unsigned", "Lib.IntTypes.secrecy_level", "Lib.Sequence.seq", "Lib.IntTypes.uint_t", "Prims.op_Equality", "Prims.int", "Lib.Sequence.length", "Prims.bool", "FStar.Seq.Properties.lemma_split", "Prims.op_Subtraction", "Prims.unit", "Lib.ByteS...
[ "recursion" ]
false
false
true
false
false
let rec nat_from_intseq_be_inj #t #l b1 b2 =
if length b1 = 0 then () else (nat_from_intseq_be_inj (Seq.slice b1 0 (length b1 - 1)) (Seq.slice b2 0 (length b2 - 1)); Seq.lemma_split b1 (length b1 - 1); Seq.lemma_split b2 (length b2 - 1))
false
Lib.ByteSequence.fst
Lib.ByteSequence.lemma_uint_from_to_bytes_le_preserves_value
val lemma_uint_from_to_bytes_le_preserves_value : #t : inttype{unsigned t /\ ~(U1? t)} -> #l : secrecy_level -> s : lbytes_l l (numbytes t) -> Lemma(uint_to_bytes_le #t #l (uint_from_bytes_le #t #l s) `equal` s)
val lemma_uint_from_to_bytes_le_preserves_value : #t : inttype{unsigned t /\ ~(U1? t)} -> #l : secrecy_level -> s : lbytes_l l (numbytes t) -> Lemma(uint_to_bytes_le #t #l (uint_from_bytes_le #t #l s) `equal` s)
let lemma_uint_from_to_bytes_le_preserves_value #t #l s = let i = uint_from_bytes_le #t #l s in let s' = uint_to_bytes_le #t #l i in lemma_nat_from_to_bytes_le_preserves_value #l s' (length s'); assert(nat_to_bytes_le #l (length s') (nat_from_bytes_le s') == s'); lemma_uint_to_bytes_le_preserves_value #t #l i...
{ "file_name": "lib/Lib.ByteSequence.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 60, "end_line": 784, "start_col": 0, "start_line": 773 }
module Lib.ByteSequence open FStar.Mul open Lib.IntTypes open Lib.Sequence open Lib.RawIntTypes open Lib.LoopCombinators #reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0" /// BEGIN constant-time sequence equality val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat -> k:n...
{ "checked_file": "/", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.RawIntTypes.fsti.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", ...
[ { "abbrev": false, "full_module": "Lib.LoopCombinators", "short_module": null }, { "abbrev": false, "full_module": "Lib.RawIntTypes", "short_module": null }, { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_mod...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 1, "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_el...
false
s: Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t) -> FStar.Pervasives.Lemma (ensures Lib.Sequence.equal (Lib.ByteSequence.uint_to_bytes_le (Lib.ByteSequence.uint_from_bytes_le s)) s)
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.l_not", "Lib.IntTypes.uu___is_U1", "Lib.IntTypes.secrecy_level", "Lib.ByteSequence.lbytes_l", "Lib.IntTypes.numbytes", "Lib.ByteSequence.lemma_nat_from_to_bytes_le_preserves_value", "Lib.Sequence.length", "Lib....
[]
true
false
true
false
false
let lemma_uint_from_to_bytes_le_preserves_value #t #l s =
let i = uint_from_bytes_le #t #l s in let s' = uint_to_bytes_le #t #l i in lemma_nat_from_to_bytes_le_preserves_value #l s' (length s'); assert (nat_to_bytes_le #l (length s') (nat_from_bytes_le s') == s'); lemma_uint_to_bytes_le_preserves_value #t #l i; assert (nat_from_bytes_le (uint_to_bytes_le #t #l i) == uint_v i)...
false
Vale.Math.Poly2.Galois.fst
Vale.Math.Poly2.Galois.lemma_shift_left
val lemma_shift_left (f:G.field) (e:G.felem f) (n:I.shiftval f.G.t) : Lemma (requires True) (ensures to_poly (I.shift_left e n) == shift (to_poly e) (I.uint_v n) %. monomial (I.bits f.G.t)) [SMTPat (to_poly (I.shift_left e n))]
val lemma_shift_left (f:G.field) (e:G.felem f) (n:I.shiftval f.G.t) : Lemma (requires True) (ensures to_poly (I.shift_left e n) == shift (to_poly e) (I.uint_v n) %. monomial (I.bits f.G.t)) [SMTPat (to_poly (I.shift_left e n))]
let lemma_shift_left f e n = let G.GF t irred = f in let nf = I.bits t in PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_shift_define_all (); PL.lemma_mod_monomial (shift (to_poly e) (I.uint_v n)) nf; assert (I.uint_v (I.shift_left e n) == U.shift_left #nf (I.uint_v e) (I.uint_v n)); le...
{ "file_name": "vale/code/lib/math/Vale.Math.Poly2.Galois.fst", "git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872", "git_url": "https://github.com/project-everest/hacl-star.git", "project_name": "hacl-star" }
{ "end_col": 102, "end_line": 137, "start_col": 0, "start_line": 129 }
module Vale.Math.Poly2.Galois open FStar.Mul module U = FStar.UInt module PL = Vale.Math.Poly2.Lemmas module D = Vale.Math.Poly2.Defs_s //module PD = Vale.Math.Poly2.Defs module GI = Vale.Math.Poly2.Galois.IntTypes // recursive definitions of from_vec/to_vec are prone to matching loops, so use no fuel from here on #r...
{ "checked_file": "/", "dependencies": [ "Vale.Math.Poly2_s.fsti.checked", "Vale.Math.Poly2.Lemmas.fsti.checked", "Vale.Math.Poly2.Galois.IntTypes.fsti.checked", "Vale.Math.Poly2.Defs_s.fst.checked", "prims.fst.checked", "Lib.LoopCombinators.fsti.checked", "Lib.IntTypes.Compatibility.fst...
[ { "abbrev": true, "full_module": "Vale.Math.Poly2.Galois.IntTypes", "short_module": "GI" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Defs_s", "short_module": "D" }, { "abbrev": true, "full_module": "Vale.Math.Poly2.Lemmas", "short_module": "PL" }, { "abbr...
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "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_el...
false
f: Spec.GaloisField.field -> e: Spec.GaloisField.felem f -> n: Lib.IntTypes.shiftval (GF?.t f) -> FStar.Pervasives.Lemma (ensures Vale.Math.Poly2.Galois.to_poly (Lib.IntTypes.shift_left e n) == Vale.Math.Poly2_s.shift (Vale.Math.Poly2.Galois.to_poly e) (Lib.IntTypes.uint_v n) %. Vale.Mat...
FStar.Pervasives.Lemma
[ "lemma" ]
[]
[ "Spec.GaloisField.field", "Spec.GaloisField.felem", "Lib.IntTypes.shiftval", "Spec.GaloisField.__proj__GF__item__t", "Lib.IntTypes.inttype", "Prims.l_and", "Prims.b2t", "Lib.IntTypes.unsigned", "Prims.op_disEquality", "Lib.IntTypes.U1", "Lib.IntTypes.uint_t", "Lib.IntTypes.SEC", "Vale.Math.P...
[]
false
false
true
false
false
let lemma_shift_left f e n =
let G.GF t irred = f in let nf = I.bits t in PL.lemma_index_all (); PL.lemma_reverse_define_all (); PL.lemma_shift_define_all (); PL.lemma_mod_monomial (shift (to_poly e) (I.uint_v n)) nf; assert (I.uint_v (I.shift_left e n) == U.shift_left #nf (I.uint_v e) (I.uint_v n)); lemma_equal (to_poly (I.shift_left e n)) (shift...
false