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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Vale.Math.Bits.fst | Vale.Math.Bits.lemma_i2b_mul | val lemma_i2b_mul (#n:pos) (a b:uint_t n) : Lemma
(b_i2b #n (mul_mod #n a b) == b_mul #n (b_i2b a) b) | val lemma_i2b_mul (#n:pos) (a b:uint_t n) : Lemma
(b_i2b #n (mul_mod #n a b) == b_mul #n (b_i2b a) b) | let lemma_i2b_mul #n a b =
int2bv_mul #n #a #b #(bvmul #n (int2bv #n a) b) ();
assert_norm (b_i2b #n (mul_mod #n a b) == b_mul #n (b_i2b a) b) | {
"file_name": "vale/code/lib/math/Vale.Math.Bits.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 65,
"end_line": 44,
"start_col": 0,
"start_line": 42
} | module Vale.Math.Bits
open FStar.Mul
let lemma_pow2_le m n = FStar.Math.Lemmas.pow2_le_compat n m
let lemma_i2b_eq #n a b =
assert_norm (b_i2b a == b_i2b b ==> int2bv a == int2bv b);
int2bv_lemma_2 #n a b
let lemma_i2b_uext #n m a =
Vale.Lib.Bv_s.int2bv_uext #n #m a (uext #n #m a);
assert_norm (b_i2b (uext #... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Bv_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Math.Bits.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.BV",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math",
... | {
"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: FStar.UInt.uint_t n -> b: FStar.UInt.uint_t n
-> FStar.Pervasives.Lemma
(ensures
Vale.Math.Bits.b_i2b (FStar.UInt.mul_mod a b) ==
Vale.Math.Bits.b_mul (Vale.Math.Bits.b_i2b a) b) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"FStar.UInt.uint_t",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"FStar.BV.bv_t",
"Vale.Math.Bits.b_i2b",
"FStar.UInt.mul_mod",
"Vale.Math.Bits.b_mul",
"Prims.unit",
"FStar.BV.int2bv_mul",
"FStar.BV.bvmul",
"FStar.BV.int2bv"
] | [] | true | false | true | false | false | let lemma_i2b_mul #n a b =
| int2bv_mul #n #a #b #(bvmul #n (int2bv #n a) b) ();
assert_norm (b_i2b #n (mul_mod #n a b) == b_mul #n (b_i2b a) b) | false |
Vale.Math.Bits.fst | Vale.Math.Bits.lemma_i2b_div | val lemma_i2b_div (#n:pos) (a:uint_t n) (b:uint_t n{b <> 0}) : Lemma
(b_i2b #n (udiv #n a b) == b_div #n (b_i2b a) b) | val lemma_i2b_div (#n:pos) (a:uint_t n) (b:uint_t n{b <> 0}) : Lemma
(b_i2b #n (udiv #n a b) == b_div #n (b_i2b a) b) | let lemma_i2b_div #n a b =
int2bv_div #n #a #b #(bvdiv #n (int2bv #n a) b) ();
assert_norm (b_i2b #n (udiv #n a b) == b_div #n (b_i2b a) b) | {
"file_name": "vale/code/lib/math/Vale.Math.Bits.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 62,
"end_line": 48,
"start_col": 0,
"start_line": 46
} | module Vale.Math.Bits
open FStar.Mul
let lemma_pow2_le m n = FStar.Math.Lemmas.pow2_le_compat n m
let lemma_i2b_eq #n a b =
assert_norm (b_i2b a == b_i2b b ==> int2bv a == int2bv b);
int2bv_lemma_2 #n a b
let lemma_i2b_uext #n m a =
Vale.Lib.Bv_s.int2bv_uext #n #m a (uext #n #m a);
assert_norm (b_i2b (uext #... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Bv_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Math.Bits.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.BV",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math",
... | {
"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: FStar.UInt.uint_t n -> b: FStar.UInt.uint_t n {b <> 0}
-> FStar.Pervasives.Lemma
(ensures
Vale.Math.Bits.b_i2b (FStar.UInt.udiv a b) == Vale.Math.Bits.b_div (Vale.Math.Bits.b_i2b a) b) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"FStar.UInt.uint_t",
"Prims.b2t",
"Prims.op_disEquality",
"Prims.int",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"FStar.BV.bv_t",
"Vale.Math.Bits.b_i2b",
"FStar.UInt.udiv",
"Vale.Math.Bits.b_div",
"Prims.unit",
"FStar.BV.int2bv_div",
"FStar.BV.bvdiv",
"FStar.BV.int2bv"
] | [] | true | false | true | false | false | let lemma_i2b_div #n a b =
| int2bv_div #n #a #b #(bvdiv #n (int2bv #n a) b) ();
assert_norm (b_i2b #n (udiv #n a b) == b_div #n (b_i2b a) b) | false |
Vale.Math.Bits.fst | Vale.Math.Bits.add_hide | val add_hide (#n:pos) (a b:uint_t n) : Pure (uint_t n)
(requires True)
(ensures fun x -> a + b < pow2 n ==> x == a + b) | val add_hide (#n:pos) (a b:uint_t n) : Pure (uint_t n)
(requires True)
(ensures fun x -> a + b < pow2 n ==> x == a + b) | let add_hide #n a b =
if a + b < pow2 n then FStar.Math.Lemmas.modulo_lemma (a + b) (pow2 n);
add_mod a b | {
"file_name": "vale/code/lib/math/Vale.Math.Bits.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 13,
"end_line": 58,
"start_col": 0,
"start_line": 56
} | module Vale.Math.Bits
open FStar.Mul
let lemma_pow2_le m n = FStar.Math.Lemmas.pow2_le_compat n m
let lemma_i2b_eq #n a b =
assert_norm (b_i2b a == b_i2b b ==> int2bv a == int2bv b);
int2bv_lemma_2 #n a b
let lemma_i2b_uext #n m a =
Vale.Lib.Bv_s.int2bv_uext #n #m a (uext #n #m a);
assert_norm (b_i2b (uext #... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Bv_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Math.Bits.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.BV",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math",
... | {
"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: FStar.UInt.uint_t n -> b: FStar.UInt.uint_t n -> Prims.Pure (FStar.UInt.uint_t n) | Prims.Pure | [] | [] | [
"Prims.pos",
"FStar.UInt.uint_t",
"FStar.UInt.add_mod",
"Prims.unit",
"Prims.op_LessThan",
"Prims.op_Addition",
"Prims.pow2",
"FStar.Math.Lemmas.modulo_lemma",
"Prims.bool"
] | [] | false | false | false | false | false | let add_hide #n a b =
| if a + b < pow2 n then FStar.Math.Lemmas.modulo_lemma (a + b) (pow2 n);
add_mod a b | false |
Vale.Math.Bits.fst | Vale.Math.Bits.lemma_i2b_equal | val lemma_i2b_equal (#n:pos) (x y:uint_t n) : Lemma
(requires lemmas_i2b_all ==> b_i2b x == b_i2b y)
(ensures x == y) | val lemma_i2b_equal (#n:pos) (x y:uint_t n) : Lemma
(requires lemmas_i2b_all ==> b_i2b x == b_i2b y)
(ensures x == y) | let lemma_i2b_equal #n x y =
lemma_i2b_all ();
lemma_i2b_eq x y | {
"file_name": "vale/code/lib/math/Vale.Math.Bits.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 18,
"end_line": 89,
"start_col": 0,
"start_line": 87
} | module Vale.Math.Bits
open FStar.Mul
let lemma_pow2_le m n = FStar.Math.Lemmas.pow2_le_compat n m
let lemma_i2b_eq #n a b =
assert_norm (b_i2b a == b_i2b b ==> int2bv a == int2bv b);
int2bv_lemma_2 #n a b
let lemma_i2b_uext #n m a =
Vale.Lib.Bv_s.int2bv_uext #n #m a (uext #n #m a);
assert_norm (b_i2b (uext #... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Bv_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Math.Bits.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.BV",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math",
... | {
"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: FStar.UInt.uint_t n -> y: FStar.UInt.uint_t n
-> FStar.Pervasives.Lemma
(requires Vale.Math.Bits.lemmas_i2b_all ==> Vale.Math.Bits.b_i2b x == Vale.Math.Bits.b_i2b y)
(ensures x == y) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"FStar.UInt.uint_t",
"Vale.Math.Bits.lemma_i2b_eq",
"Prims.unit",
"Vale.Math.Bits.lemma_i2b_all"
] | [] | true | false | true | false | false | let lemma_i2b_equal #n x y =
| lemma_i2b_all ();
lemma_i2b_eq x y | false |
Vale.Math.Bits.fst | Vale.Math.Bits.lemma_i2b_with_all | val lemma_i2b_with_all (n:pos) (p:Type0) : Lemma
(requires lemmas_i2b_all ==> p)
(ensures p) | val lemma_i2b_with_all (n:pos) (p:Type0) : Lemma
(requires lemmas_i2b_all ==> p)
(ensures p) | let lemma_i2b_with_all n p =
lemma_i2b_all () | {
"file_name": "vale/code/lib/math/Vale.Math.Bits.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 18,
"end_line": 85,
"start_col": 0,
"start_line": 84
} | module Vale.Math.Bits
open FStar.Mul
let lemma_pow2_le m n = FStar.Math.Lemmas.pow2_le_compat n m
let lemma_i2b_eq #n a b =
assert_norm (b_i2b a == b_i2b b ==> int2bv a == int2bv b);
int2bv_lemma_2 #n a b
let lemma_i2b_uext #n m a =
Vale.Lib.Bv_s.int2bv_uext #n #m a (uext #n #m a);
assert_norm (b_i2b (uext #... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Bv_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Math.Bits.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.BV",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math",
... | {
"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 | n: Prims.pos -> p: Type0
-> FStar.Pervasives.Lemma (requires Vale.Math.Bits.lemmas_i2b_all ==> p) (ensures p) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Vale.Math.Bits.lemma_i2b_all",
"Prims.unit"
] | [] | true | false | true | false | false | let lemma_i2b_with_all n p =
| lemma_i2b_all () | false |
Vale.Math.Bits.fst | Vale.Math.Bits.lemma_to_is_bv8 | val lemma_to_is_bv8 (a:uint_t 32) : Lemma
(requires a < 0x100)
(ensures is_bv8 (b_i2b a)) | val lemma_to_is_bv8 (a:uint_t 32) : Lemma
(requires a < 0x100)
(ensures is_bv8 (b_i2b a)) | let lemma_to_is_bv8 a =
int2bv_lemma_ult_1 a 0x100;
lemma_to_is_bv8_bv (int2bv a);
assert_norm (b_i2b a == int2bv a) | {
"file_name": "vale/code/lib/math/Vale.Math.Bits.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 35,
"end_line": 115,
"start_col": 0,
"start_line": 112
} | module Vale.Math.Bits
open FStar.Mul
let lemma_pow2_le m n = FStar.Math.Lemmas.pow2_le_compat n m
let lemma_i2b_eq #n a b =
assert_norm (b_i2b a == b_i2b b ==> int2bv a == int2bv b);
int2bv_lemma_2 #n a b
let lemma_i2b_uext #n m a =
Vale.Lib.Bv_s.int2bv_uext #n #m a (uext #n #m a);
assert_norm (b_i2b (uext #... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Bv_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Math.Bits.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.BV",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math",
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"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: FStar.UInt.uint_t 32
-> FStar.Pervasives.Lemma (requires a < 0x100)
(ensures Vale.Math.Bits.is_bv8 (Vale.Math.Bits.b_i2b a)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.UInt.uint_t",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"FStar.BV.bv_t",
"Vale.Math.Bits.b_i2b",
"FStar.BV.int2bv",
"Prims.unit",
"Vale.Math.Bits.lemma_to_is_bv8_bv",
"FStar.BV.int2bv_lemma_ult_1"
] | [] | true | false | true | false | false | let lemma_to_is_bv8 a =
| int2bv_lemma_ult_1 a 0x100;
lemma_to_is_bv8_bv (int2bv a);
assert_norm (b_i2b a == int2bv a) | false |
Vale.Math.Bits.fst | Vale.Math.Bits.lemma_to_is_bv8_bv | val lemma_to_is_bv8_bv (a: bv_t 32) : Lemma (requires bvult a (int2bv 0x100)) (ensures is_bv8 a) | val lemma_to_is_bv8_bv (a: bv_t 32) : Lemma (requires bvult a (int2bv 0x100)) (ensures is_bv8 a) | let lemma_to_is_bv8_bv (a:bv_t 32) : Lemma
(requires bvult a (int2bv 0x100))
(ensures is_bv8 a)
=
lemma_bveq a (bvand a (int2bv 0xff));
assert_norm (is_bv8 a) | {
"file_name": "vale/code/lib/math/Vale.Math.Bits.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 24,
"end_line": 110,
"start_col": 0,
"start_line": 105
} | module Vale.Math.Bits
open FStar.Mul
let lemma_pow2_le m n = FStar.Math.Lemmas.pow2_le_compat n m
let lemma_i2b_eq #n a b =
assert_norm (b_i2b a == b_i2b b ==> int2bv a == int2bv b);
int2bv_lemma_2 #n a b
let lemma_i2b_uext #n m a =
Vale.Lib.Bv_s.int2bv_uext #n #m a (uext #n #m a);
assert_norm (b_i2b (uext #... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Bv_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Math.Bits.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.BV",
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"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: FStar.BV.bv_t 32
-> FStar.Pervasives.Lemma (requires FStar.BV.bvult a (FStar.BV.int2bv 0x100))
(ensures Vale.Math.Bits.is_bv8 a) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.BV.bv_t",
"FStar.Pervasives.assert_norm",
"Vale.Math.Bits.is_bv8",
"Prims.unit",
"Vale.Math.Bits.lemma_bveq",
"FStar.BV.bvand",
"FStar.BV.int2bv",
"Prims.b2t",
"FStar.BV.bvult",
"Prims.squash",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let lemma_to_is_bv8_bv (a: bv_t 32) : Lemma (requires bvult a (int2bv 0x100)) (ensures is_bv8 a) =
| lemma_bveq a (bvand a (int2bv 0xff));
assert_norm (is_bv8 a) | false |
Pulse.Readback.fst | Pulse.Readback.readback_comp | val readback_comp (t:R.term)
: option (c:comp{ elab_comp c == t}) | val readback_comp (t:R.term)
: option (c:comp{ elab_comp c == t}) | let readback_comp (t:R.term)
: option (c:comp { elab_comp c == t }) =
let ropt = try_readback_st_comp t readback_ty in
match ropt with
| Some c ->
// debug_log (fun _ -> T.print (Printf.sprintf "readback_comp: %s as\n%s\n" (T.term_to_string t) (P.comp_to_string c)));
ropt
| _ ->
let? t' = readbac... | {
"file_name": "lib/steel/pulse/Pulse.Readback.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 49,
"end_line": 268,
"start_col": 0,
"start_line": 258
} | (*
Copyright 2023 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": [
"Pulse.Syntax.Printer.fsti.checked",
"Pulse.Syntax.Base.fsti.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"prims.fst.checked",
"FStar.Tactics.fst.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Pervasiv... | [
{
"abbrev": true,
"full_module": "Pulse.Syntax.Printer",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "FStar.Tactics",
"short_module": "T"
},
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_mod... | {
"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 | t: FStar.Stubs.Reflection.Types.term
-> FStar.Pervasives.Native.option (c:
Pulse.Syntax.Base.comp{Pulse.Elaborate.Pure.elab_comp c == t}) | Prims.Tot | [
"total"
] | [] | [
"FStar.Stubs.Reflection.Types.term",
"Pulse.Syntax.Base.comp",
"Prims.eq2",
"Pulse.Elaborate.Pure.elab_comp",
"FStar.Pervasives.Native.option",
"Pulse.Readback.op_let_Question",
"Pulse.Syntax.Base.term",
"Pulse.Elaborate.Pure.elab_term",
"Pulse.Readback.readback_ty",
"FStar.Pervasives.Native.Some"... | [] | false | false | false | false | false | let readback_comp (t: R.term) : option (c: comp{elab_comp c == t}) =
| let ropt = try_readback_st_comp t readback_ty in
match ropt with
| Some c -> ropt
| _ ->
let? t' = readback_ty t in
Some (C_Tot t' <: c: comp{elab_comp c == t}) | false |
Vale.Math.Bits.fst | Vale.Math.Bits.lemma_i2b_all | val lemma_i2b_all (_:unit) : Lemma lemmas_i2b_all | val lemma_i2b_all (_:unit) : Lemma lemmas_i2b_all | let lemma_i2b_all () =
FStar.Classical.forall_intro_3 (fun n a b -> lemma_i2b_uext #n a b);
FStar.Classical.forall_intro_3 (fun n a b -> lemma_i2b_and #n a b);
FStar.Classical.forall_intro_3 (fun n a b -> lemma_i2b_or #n a b);
FStar.Classical.forall_intro_3 (fun n a b -> lemma_i2b_xor #n a b);
FStar.Classical... | {
"file_name": "vale/code/lib/math/Vale.Math.Bits.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 4,
"end_line": 82,
"start_col": 0,
"start_line": 70
} | module Vale.Math.Bits
open FStar.Mul
let lemma_pow2_le m n = FStar.Math.Lemmas.pow2_le_compat n m
let lemma_i2b_eq #n a b =
assert_norm (b_i2b a == b_i2b b ==> int2bv a == int2bv b);
int2bv_lemma_2 #n a b
let lemma_i2b_uext #n m a =
Vale.Lib.Bv_s.int2bv_uext #n #m a (uext #n #m a);
assert_norm (b_i2b (uext #... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Bv_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Math.Bits.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.BV",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math",
... | {
"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 | _: Prims.unit -> FStar.Pervasives.Lemma (ensures Vale.Math.Bits.lemmas_i2b_all) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.unit",
"FStar.Classical.forall_intro_3",
"Prims.pos",
"FStar.UInt.uint_t",
"Prims.b2t",
"Prims.op_disEquality",
"Prims.int",
"Prims.eq2",
"FStar.BV.bv_t",
"Vale.Math.Bits.b_i2b",
"FStar.UInt.mod",
"Vale.Math.Bits.b_mod",
"Vale.Math.Bits.lemma_i2b_mod",
"FStar.UInt.udiv",
"Vale.Mat... | [] | false | false | true | false | false | let lemma_i2b_all () =
| FStar.Classical.forall_intro_3 (fun n a b -> lemma_i2b_uext #n a b);
FStar.Classical.forall_intro_3 (fun n a b -> lemma_i2b_and #n a b);
FStar.Classical.forall_intro_3 (fun n a b -> lemma_i2b_or #n a b);
FStar.Classical.forall_intro_3 (fun n a b -> lemma_i2b_xor #n a b);
FStar.Classical.forall_intro_3 (fun n a b -> lem... | false |
Vale.Math.Bits.fst | Vale.Math.Bits.lemma_bveq | val lemma_bveq (#n:pos) (a b:bv_t n) : Lemma
(requires bveq #n a b)
(ensures a == b) | val lemma_bveq (#n:pos) (a b:bv_t n) : Lemma
(requires bveq #n a b)
(ensures a == b) | let lemma_bveq #n a b =
let ia = bv2int a in
let ib = bv2int b in
int2bv_logxor #n #ia #ib #(bvxor a b) ();
int2bv_logxor #n #ia #ia #(bvxor a a) ();
assert (int2bv #n (logxor #n ia ib) == int2bv #n (logxor #n ia ia));
assert (bv2int (int2bv #n (logxor #n ia ib)) == logxor #n ia ib);
assert (bv2int (int2b... | {
"file_name": "vale/code/lib/math/Vale.Math.Bits.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 4,
"end_line": 103,
"start_col": 0,
"start_line": 92
} | module Vale.Math.Bits
open FStar.Mul
let lemma_pow2_le m n = FStar.Math.Lemmas.pow2_le_compat n m
let lemma_i2b_eq #n a b =
assert_norm (b_i2b a == b_i2b b ==> int2bv a == int2bv b);
int2bv_lemma_2 #n a b
let lemma_i2b_uext #n m a =
Vale.Lib.Bv_s.int2bv_uext #n #m a (uext #n #m a);
assert_norm (b_i2b (uext #... | {
"checked_file": "/",
"dependencies": [
"Vale.Lib.Bv_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Math.Bits.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.BV",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math",
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"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: FStar.BV.bv_t n -> b: FStar.BV.bv_t n
-> FStar.Pervasives.Lemma (requires Vale.Math.Bits.bveq a b) (ensures a == b) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"FStar.BV.bv_t",
"Prims.unit",
"FStar.UInt.logxor_neq_nonzero",
"FStar.UInt.logxor_self",
"Prims._assert",
"Prims.eq2",
"FStar.UInt.uint_t",
"FStar.UInt.logxor",
"FStar.BV.bv2int",
"FStar.BV.int2bv",
"FStar.BV.int2bv_logxor",
"FStar.BV.bvxor"
] | [] | true | false | true | false | false | let lemma_bveq #n a b =
| let ia = bv2int a in
let ib = bv2int b in
int2bv_logxor #n #ia #ib #(bvxor a b) ();
int2bv_logxor #n #ia #ia #(bvxor a a) ();
assert (int2bv #n (logxor #n ia ib) == int2bv #n (logxor #n ia ia));
assert (bv2int (int2bv #n (logxor #n ia ib)) == logxor #n ia ib);
assert (bv2int (int2bv #n (logxor #n ia ia)) == logxor #n i... | false |
Pulse.Readback.fst | Pulse.Readback.readback_observability | val readback_observability (t: R.term) : option (obs: observability{elab_observability obs == t}) | val readback_observability (t: R.term) : option (obs: observability{elab_observability obs == t}) | let readback_observability (t:R.term)
: option (obs:observability { elab_observability obs == t })
= let open R in
match inspect_ln t with
| R.Tv_FVar fv ->
let fv_lid = inspect_fv fv in
if fv_lid = observable_lid
then Some Observable
else if fv_lid = unobservable_lid
then Some Unobservable
... | {
"file_name": "lib/steel/pulse/Pulse.Readback.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 13,
"end_line": 44,
"start_col": 0,
"start_line": 31
} | (*
Copyright 2023 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": [
"Pulse.Syntax.Printer.fsti.checked",
"Pulse.Syntax.Base.fsti.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"prims.fst.checked",
"FStar.Tactics.fst.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Pervasiv... | [
{
"abbrev": true,
"full_module": "Pulse.Syntax.Printer",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "FStar.Tactics",
"short_module": "T"
},
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_mod... | {
"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 | t: FStar.Stubs.Reflection.Types.term
-> FStar.Pervasives.Native.option (obs:
Pulse.Syntax.Base.observability{Pulse.Elaborate.Pure.elab_observability obs == t}) | Prims.Tot | [
"total"
] | [] | [
"FStar.Stubs.Reflection.Types.term",
"FStar.Stubs.Reflection.V2.Builtins.inspect_ln",
"FStar.Stubs.Reflection.Types.fv",
"Prims.op_Equality",
"Prims.list",
"Prims.string",
"Pulse.Reflection.Util.observable_lid",
"FStar.Pervasives.Native.Some",
"Pulse.Syntax.Base.observability",
"Prims.eq2",
"Pul... | [] | false | false | false | false | false | let readback_observability (t: R.term) : option (obs: observability{elab_observability obs == t}) =
| let open R in
match inspect_ln t with
| R.Tv_FVar fv ->
let fv_lid = inspect_fv fv in
if fv_lid = observable_lid
then Some Observable
else
if fv_lid = unobservable_lid
then Some Unobservable
else if fv_lid = neutral_lid then Some Neutral else None
| _ -> None | false |
Hacl.Impl.Curve25519.Lemmas.fst | Hacl.Impl.Curve25519.Lemmas.lemma_nat_from_uints64_le_4 | val lemma_nat_from_uints64_le_4: b:lseq uint64 4 -> Lemma
(nat_from_intseq_le b == v b.[0] + v b.[1] * pow2 64 +
v b.[2] * pow2 64 * pow2 64 + v b.[3] * pow2 64 * pow2 64 * pow2 64) | val lemma_nat_from_uints64_le_4: b:lseq uint64 4 -> Lemma
(nat_from_intseq_le b == v b.[0] + v b.[1] * pow2 64 +
v b.[2] * pow2 64 * pow2 64 + v b.[3] * pow2 64 * pow2 64 * pow2 64) | let lemma_nat_from_uints64_le_4 b =
let res = nat_from_intseq_le b in
nat_from_intseq_le_slice_lemma b 1;
nat_from_intseq_le_lemma0 (Seq.slice b 0 1);
assert (res == v b.[0] + pow2 64 * (nat_from_intseq_le (Seq.slice b 1 4)));
nat_from_intseq_le_slice_lemma #U64 #SEC #3 (Seq.slice b 1 4) 1;
nat_from_intseq... | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 89,
"end_line": 29,
"start_col": 0,
"start_line": 14
} | module Hacl.Impl.Curve25519.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val lemma_nat_from_uints64_le_4: b:lseq uint64 4 -> Lemma
(nat_from_intseq_le b == v b.[0] + v b.[1] * pow2 64 +
v b.[2] * pow2 64 * pow2 64 + v b.[3] * po... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Hac... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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.uint64 4
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_le b ==
Lib.IntTypes.v b.[ 0 ] + Lib.IntTypes.v b.[ 1 ] * Prims.pow2 64 +
(Lib.IntTypes.v b.[ 2 ] * Prims.pow2 64) * Prims.pow2 64 +
((Lib.IntTypes.v b.[ 3 ] * Prims.pow2 64) * Pr... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.Sequence.lseq",
"Lib.IntTypes.uint64",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.Sequence.op_String_Access",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.unit",
"Lib.ByteSequence.nat_from_intseq_le_lemma... | [] | true | false | true | false | false | let lemma_nat_from_uints64_le_4 b =
| let res = nat_from_intseq_le b in
nat_from_intseq_le_slice_lemma b 1;
nat_from_intseq_le_lemma0 (Seq.slice b 0 1);
assert (res == v b.[ 0 ] + pow2 64 * (nat_from_intseq_le (Seq.slice b 1 4)));
nat_from_intseq_le_slice_lemma #U64 #SEC #3 (Seq.slice b 1 4) 1;
nat_from_intseq_le_lemma0 (Seq.slice b 1 2);
assert (nat_from_... | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.serialize32_flbytes | val serialize32_flbytes (sz: nat{sz < 4294967296}) : Tot (serializer32 (serialize_flbytes sz)) | val serialize32_flbytes (sz: nat{sz < 4294967296}) : Tot (serializer32 (serialize_flbytes sz)) | let serialize32_flbytes
(sz: nat { sz < 4294967296 } )
: Tot (serializer32 (serialize_flbytes sz))
= fun (input: B32.lbytes sz) ->
B32.hide_reveal input;
(input <: (res: bytes32 { serializer32_correct (serialize_flbytes sz) input res } )) | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 88,
"end_line": 43,
"start_col": 0,
"start_line": 38
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 | sz: Prims.nat{sz < 4294967296}
-> LowParse.SLow.Base.serializer32 (LowParse.Spec.Bytes.serialize_flbytes sz) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Bytes.lbytes",
"LowParse.SLow.Base.bytes32",
"LowParse.SLow.Base.serializer32_correct",
"LowParse.Spec.Base.total_constant_size_parser_kind",
"LowParse.Spec.Bytes.parse_flbytes",
"LowParse.Spec.Bytes.serialize_flbytes",
"Prims.unit",
"FStar.B... | [] | false | false | false | false | false | let serialize32_flbytes (sz: nat{sz < 4294967296}) : Tot (serializer32 (serialize_flbytes sz)) =
| fun (input: B32.lbytes sz) ->
B32.hide_reveal input;
(input <: (res: bytes32{serializer32_correct (serialize_flbytes sz) input res})) | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.serialize32_all_bytes | val serialize32_all_bytes:serializer32 serialize_all_bytes | val serialize32_all_bytes:serializer32 serialize_all_bytes | let serialize32_all_bytes
: serializer32 serialize_all_bytes
= fun (input: B32.bytes) ->
(input <: (res: bytes32 { serializer32_correct serialize_all_bytes input res } )) | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 83,
"end_line": 56,
"start_col": 0,
"start_line": 53
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 | LowParse.SLow.Base.serializer32 LowParse.Spec.Bytes.serialize_all_bytes | Prims.Tot | [
"total"
] | [] | [
"FStar.Bytes.bytes",
"LowParse.SLow.Base.bytes32",
"LowParse.SLow.Base.serializer32_correct",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"LowParse.Spec.Bytes.parse_all_bytes",
"LowParse.Spec.Bytes.serialize_all_bytes"
] | [] | false | false | false | true | false | let serialize32_all_bytes:serializer32 serialize_all_bytes =
| fun (input: B32.bytes) ->
(input <: (res: bytes32{serializer32_correct serialize_all_bytes input res})) | false |
Pulse.Typing.Printer.fst | Pulse.Typing.Printer.print_st_typing | val print_st_typing (#g #t #c: _) (d: st_typing g t c) : T.Tac string | val print_st_typing (#g #t #c: _) (d: st_typing g t c) : T.Tac string | let rec print_st_typing #g #t #c (d:st_typing g t c)
: T.Tac string
= match d with
| T_Abs g x q b u body c tt body_typing ->
Printf.sprintf "(T_Abs ... %s)" (print_st_typing body_typing)
| T_STApp _ _ _ _ _ _ _ _ ->
"T_STApp"
| T_Return _ _ _ _ _ _ _ _ _ _ _ ->
"T_Return"
... | {
"file_name": "lib/steel/pulse/Pulse.Typing.Printer.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 18,
"end_line": 65,
"start_col": 0,
"start_line": 24
} | (*
Copyright 2023 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": [
"Pulse.Typing.fst.checked",
"Pulse.Syntax.Printer.fsti.checked",
"prims.fst.checked",
"FStar.Tactics.fst.checked",
"FStar.Printf.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Pulse.Typing.Printer.fst"
... | [
{
"abbrev": false,
"full_module": "Pulse.Typing",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Syntax.Printer",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Tactics",
"short_module": "T"
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"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 | d: Pulse.Typing.st_typing g t c -> FStar.Tactics.Effect.Tac Prims.string | FStar.Tactics.Effect.Tac | [] | [] | [
"Pulse.Typing.Env.env",
"Pulse.Syntax.Base.st_term",
"Pulse.Syntax.Base.comp",
"Pulse.Typing.st_typing",
"Pulse.Syntax.Base.var",
"Prims.b2t",
"FStar.Pervasives.Native.uu___is_None",
"Pulse.Syntax.Base.typ",
"Pulse.Typing.Env.lookup",
"FStar.Pervasives.Native.option",
"Pulse.Syntax.Base.qualifie... | [
"recursion"
] | false | true | false | false | false | let rec print_st_typing #g #t #c (d: st_typing g t c) : T.Tac string =
| match d with
| T_Abs g x q b u body c tt body_typing ->
Printf.sprintf "(T_Abs ... %s)" (print_st_typing body_typing)
| T_STApp _ _ _ _ _ _ _ _ -> "T_STApp"
| T_Return _ _ _ _ _ _ _ _ _ _ _ -> "T_Return"
| T_Lift _ _ _ _ d _ -> Printf.sprintf "(T_Lift %s)" (print_st_typing d)
| T_Bind g e1 e2 c1 c2 b x c d1 _ d2 _ ->... | false |
Vale.AES.PPC64LE.GF128_Init.fsti | Vale.AES.PPC64LE.GF128_Init.va_ens_Keyhash_init | val va_ens_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_sM: va_state)
(va_fM: va_fuel)
: prop | val va_ens_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_sM: va_state)
(va_fM: va_fuel)
: prop | let va_ens_Keyhash_init (va_b0:va_code) (va_s0:va_state) (alg:algorithm) (key:(seq nat32))
(roundkeys_b:buffer128) (hkeys_b:buffer128) (va_sM:va_state) (va_fM:va_fuel) : prop =
(va_req_Keyhash_init va_b0 va_s0 alg key roundkeys_b hkeys_b /\ va_ensure_total va_b0 va_s0 va_sM
va_fM /\ va_get_ok va_sM /\ Vale.PPC6... | {
"file_name": "obj/Vale.AES.PPC64LE.GF128_Init.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 63,
"end_line": 57,
"start_col": 0,
"start_line": 47
} | module Vale.AES.PPC64LE.GF128_Init
open Vale.Def.Words_s
open Vale.Def.Words.Four_s
open Vale.Def.Types_s
open FStar.Seq
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Vale.Math.Poly2.Bits_s
open Vale.Math.Poly2.Bits
open Vale.Math.Poly2.Lemmas
open Vale.AES.GF128_s
open V... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.State.fsti.checked",
"Vale.PPC64LE.QuickCodes.fsti.checked",
"Vale.PPC64LE.QuickCode.fst.checked",
"Vale.PPC64LE.Memory.fsti.checked",
"Vale.PPC64LE.Machine_s.fst.checked",
"Vale.PPC64LE.InsVector.fsti.checked",
"Vale.PPC64LE.InsMem.... | [
{
"abbrev": false,
"full_module": "Vale.AES.OptPublic_BE",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.PPC64LE.GF128_Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.PPC64LE.PolyOps",
"short_module": null
},
{
"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 |
va_b0: Vale.PPC64LE.Decls.va_code ->
va_s0: Vale.PPC64LE.Decls.va_state ->
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.PPC64LE.Memory.nat32 ->
roundkeys_b: Vale.PPC64LE.Memory.buffer128 ->
hkeys_b: Vale.PPC64LE.Memory.buffer128 ->
va_sM: Vale.PPC64LE.Decls.va_state ... | Prims.Tot | [
"total"
] | [] | [
"Vale.PPC64LE.Decls.va_code",
"Vale.PPC64LE.Decls.va_state",
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.PPC64LE.Memory.nat32",
"Vale.PPC64LE.Memory.buffer128",
"Vale.PPC64LE.Decls.va_fuel",
"Prims.l_and",
"Vale.AES.PPC64LE.GF128_Init.va_req_Keyhash_init",
"Vale.PPC64LE.Decls.va... | [] | false | false | false | true | true | let va_ens_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_sM: va_state)
(va_fM: va_fuel)
: prop =
| (va_req_Keyhash_init va_b0 va_s0 alg key roundkeys_b hkeys_b /\
va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
Vale.PPC64LE.Decls.modifies_buffer128 hkeys_b (va_get_mem va_s0) (va_get_mem va_sM) /\
Vale.AES.OptPublic_BE.hkeys_reqs_pub (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s1... | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.parse32_flbytes_gen | val parse32_flbytes_gen (sz: nat{sz < 4294967296}) (x: B32.lbytes sz)
: Tot (y: B32.lbytes sz {y == parse_flbytes_gen sz (B32.reveal x)}) | val parse32_flbytes_gen (sz: nat{sz < 4294967296}) (x: B32.lbytes sz)
: Tot (y: B32.lbytes sz {y == parse_flbytes_gen sz (B32.reveal x)}) | let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == parse_flbytes_gen sz (B32.reveal x) } )
= B32.hide_reveal x;
x | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 16,
"start_col": 0,
"start_line": 11
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32 | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 | sz: Prims.nat{sz < 4294967296} -> x: FStar.Bytes.lbytes sz
-> y: FStar.Bytes.lbytes sz {y == LowParse.Spec.Bytes.parse_flbytes_gen sz (FStar.Bytes.reveal x)} | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Bytes.lbytes",
"Prims.unit",
"FStar.Bytes.hide_reveal",
"Prims.eq2",
"LowParse.Spec.Bytes.parse_flbytes_gen",
"FStar.Bytes.reveal"
] | [] | false | false | false | false | false | let parse32_flbytes_gen (sz: nat{sz < 4294967296}) (x: B32.lbytes sz)
: Tot (y: B32.lbytes sz {y == parse_flbytes_gen sz (B32.reveal x)}) =
| B32.hide_reveal x;
x | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.parse32_bounded_vlbytes | val parse32_bounded_vlbytes
(min: nat)
(min32: U32.t{U32.v min32 == min})
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(max32: U32.t{U32.v max32 == max})
: Tot (parser32 (parse_bounded_vlbytes min max)) | val parse32_bounded_vlbytes
(min: nat)
(min32: U32.t{U32.v min32 == min})
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(max32: U32.t{U32.v max32 == max})
: Tot (parser32 (parse_bounded_vlbytes min max)) | let parse32_bounded_vlbytes
(min: nat)
(min32: U32.t { U32.v min32 == min } )
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
(max32: U32.t { U32.v max32 == max } )
: Tot (parser32 (parse_bounded_vlbytes min max))
= parse32_bounded_vlbytes' min min32 max max32 (log256' max) | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 60,
"end_line": 80,
"start_col": 0,
"start_line": 74
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 |
min: Prims.nat ->
min32: FStar.UInt32.t{FStar.UInt32.v min32 == min} ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
max32: FStar.UInt32.t{FStar.UInt32.v max32 == max}
-> LowParse.SLow.Base.parser32 (LowParse.Spec.Bytes.parse_bounded_vlbytes min max) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.UInt32.t",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"FStar.UInt.size",
"FStar.UInt32.n",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt32.v",
"Prims.l_and",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.SLow.Bytes.parse32_b... | [] | false | false | false | false | false | let parse32_bounded_vlbytes
(min: nat)
(min32: U32.t{U32.v min32 == min})
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(max32: U32.t{U32.v max32 == max})
: Tot (parser32 (parse_bounded_vlbytes min max)) =
| parse32_bounded_vlbytes' min min32 max max32 (log256' max) | false |
Vale.AES.PPC64LE.GF128_Init.fsti | Vale.AES.PPC64LE.GF128_Init.va_req_Keyhash_init | val va_req_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
: prop | val va_req_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
: prop | let va_req_Keyhash_init (va_b0:va_code) (va_s0:va_state) (alg:algorithm) (key:(seq nat32))
(roundkeys_b:buffer128) (hkeys_b:buffer128) : prop =
(va_require_total va_b0 (va_code_Keyhash_init alg) va_s0 /\ va_get_ok va_s0 /\
Vale.PPC64LE.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (alg ... | {
"file_name": "obj/Vale.AES.PPC64LE.GF128_Init.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 68,
"end_line": 46,
"start_col": 0,
"start_line": 36
} | module Vale.AES.PPC64LE.GF128_Init
open Vale.Def.Words_s
open Vale.Def.Words.Four_s
open Vale.Def.Types_s
open FStar.Seq
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Vale.Math.Poly2.Bits_s
open Vale.Math.Poly2.Bits
open Vale.Math.Poly2.Lemmas
open Vale.AES.GF128_s
open V... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.State.fsti.checked",
"Vale.PPC64LE.QuickCodes.fsti.checked",
"Vale.PPC64LE.QuickCode.fst.checked",
"Vale.PPC64LE.Memory.fsti.checked",
"Vale.PPC64LE.Machine_s.fst.checked",
"Vale.PPC64LE.InsVector.fsti.checked",
"Vale.PPC64LE.InsMem.... | [
{
"abbrev": false,
"full_module": "Vale.AES.OptPublic_BE",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.PPC64LE.GF128_Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.PPC64LE.PolyOps",
"short_module": null
},
{
"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 |
va_b0: Vale.PPC64LE.Decls.va_code ->
va_s0: Vale.PPC64LE.Decls.va_state ->
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.PPC64LE.Memory.nat32 ->
roundkeys_b: Vale.PPC64LE.Memory.buffer128 ->
hkeys_b: Vale.PPC64LE.Memory.buffer128
-> Prims.prop | Prims.Tot | [
"total"
] | [] | [
"Vale.PPC64LE.Decls.va_code",
"Vale.PPC64LE.Decls.va_state",
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.PPC64LE.Memory.nat32",
"Vale.PPC64LE.Memory.buffer128",
"Prims.l_and",
"Vale.PPC64LE.Decls.va_require_total",
"Vale.AES.PPC64LE.GF128_Init.va_code_Keyhash_init",
"Prims.b2t",... | [] | false | false | false | true | true | let va_req_Keyhash_init
(va_b0: va_code)
(va_s0: va_state)
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
: prop =
| (va_require_total va_b0 (va_code_Keyhash_init alg) va_s0 /\ va_get_ok va_s0 /\
Vale.PPC64LE.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
(alg = AES_128 \/ alg = AES_256) /\ Vale.PPC64LE.Decls.buffers_disjoint128 roundkeys_b hkeys_b /\
Vale.AES.AES_BE_s.is_aes_key_word alg key /\
Vale.A... | false |
Vale.AES.PPC64LE.GF128_Init.fsti | Vale.AES.PPC64LE.GF128_Init.va_quick_Keyhash_init | val va_quick_Keyhash_init (alg: algorithm) (key: (seq nat32)) (roundkeys_b hkeys_b: buffer128)
: (va_quickCode unit (va_code_Keyhash_init alg)) | val va_quick_Keyhash_init (alg: algorithm) (key: (seq nat32)) (roundkeys_b hkeys_b: buffer128)
: (va_quickCode unit (va_code_Keyhash_init alg)) | let va_quick_Keyhash_init (alg:algorithm) (key:(seq nat32)) (roundkeys_b:buffer128)
(hkeys_b:buffer128) : (va_quickCode unit (va_code_Keyhash_init alg)) =
(va_QProc (va_code_Keyhash_init alg) ([va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3;
va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 10; va_Mo... | {
"file_name": "obj/Vale.AES.PPC64LE.GF128_Init.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 29,
"end_line": 116,
"start_col": 0,
"start_line": 111
} | module Vale.AES.PPC64LE.GF128_Init
open Vale.Def.Words_s
open Vale.Def.Words.Four_s
open Vale.Def.Types_s
open FStar.Seq
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Vale.Math.Poly2.Bits_s
open Vale.Math.Poly2.Bits
open Vale.Math.Poly2.Lemmas
open Vale.AES.GF128_s
open V... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.State.fsti.checked",
"Vale.PPC64LE.QuickCodes.fsti.checked",
"Vale.PPC64LE.QuickCode.fst.checked",
"Vale.PPC64LE.Memory.fsti.checked",
"Vale.PPC64LE.Machine_s.fst.checked",
"Vale.PPC64LE.InsVector.fsti.checked",
"Vale.PPC64LE.InsMem.... | [
{
"abbrev": false,
"full_module": "Vale.AES.OptPublic_BE",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.PPC64LE.GF128_Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.PPC64LE.PolyOps",
"short_module": null
},
{
"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 |
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.PPC64LE.Memory.nat32 ->
roundkeys_b: Vale.PPC64LE.Memory.buffer128 ->
hkeys_b: Vale.PPC64LE.Memory.buffer128
-> Vale.PPC64LE.QuickCode.va_quickCode Prims.unit
(Vale.AES.PPC64LE.GF128_Init.va_code_Keyhash_init alg) | Prims.Tot | [
"total"
] | [] | [
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.PPC64LE.Memory.nat32",
"Vale.PPC64LE.Memory.buffer128",
"Vale.PPC64LE.QuickCode.va_QProc",
"Prims.unit",
"Vale.AES.PPC64LE.GF128_Init.va_code_Keyhash_init",
"Prims.Cons",
"Vale.PPC64LE.QuickCode.mod_t",
"Vale.PPC64LE.QuickCode.va_Mod_v... | [] | false | false | false | false | false | let va_quick_Keyhash_init (alg: algorithm) (key: (seq nat32)) (roundkeys_b hkeys_b: buffer128)
: (va_quickCode unit (va_code_Keyhash_init alg)) =
| (va_QProc (va_code_Keyhash_init alg)
([
va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1;
va_Mod_vec 0; va_Mod_reg 10; va_Mod_mem_layout; va_Mod_mem_heaplet 1; va_Mod_mem
])
(va_wp_Keyhash_init alg key roundkeys_b hkeys_b)
(va_wpProof_Keyhash_init alg ... | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.parse32_bounded_vlbytes' | val parse32_bounded_vlbytes'
(min: nat)
(min32: U32.t{U32.v min32 == min})
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(max32: U32.t{U32.v max32 == max})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (parser32 (parse_bounded_vlbytes' min max l)) | val parse32_bounded_vlbytes'
(min: nat)
(min32: U32.t{U32.v min32 == min})
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(max32: U32.t{U32.v max32 == max})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (parser32 (parse_bounded_vlbytes' min max l)) | let parse32_bounded_vlbytes'
(min: nat)
(min32: U32.t { U32.v min32 == min } )
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
(max32: U32.t { U32.v max32 == max } )
(l: nat { l >= log256' max /\ l <= 4 } )
: Tot (parser32 (parse_bounded_vlbytes' min max l))
= parse32_synth
_
(synth_bounded_v... | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 6,
"end_line": 71,
"start_col": 0,
"start_line": 59
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 |
min: Prims.nat ->
min32: FStar.UInt32.t{FStar.UInt32.v min32 == min} ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
max32: FStar.UInt32.t{FStar.UInt32.v max32 == max} ->
l: Prims.nat{l >= LowParse.Spec.BoundedInt.log256' max /\ l <= 4}
-> LowParse.SLow.Base.parser32 (LowParse.Spe... | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.UInt32.t",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"FStar.UInt.size",
"FStar.UInt32.n",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt32.v",
"Prims.l_and",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.BoundedInt.log2... | [] | false | false | false | false | false | let parse32_bounded_vlbytes'
(min: nat)
(min32: U32.t{U32.v min32 == min})
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(max32: U32.t{U32.v max32 == max})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (parser32 (parse_bounded_vlbytes' min max l)) =
| parse32_synth _
(synth_bounded_vlbytes min max)
(fun (x: parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes) ->
(x <: parse_bounded_vlbytes_t min max))
(parse32_bounded_vldata_strong' min min32 max max32 l serialize_all_bytes parse32_all_bytes)
() | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.parse32_flbytes | val parse32_flbytes (sz: nat) (sz': U32.t{U32.v sz' == sz})
: Tot
(lt_pow2_32 sz;
parser32 (parse_flbytes sz)) | val parse32_flbytes (sz: nat) (sz': U32.t{U32.v sz' == sz})
: Tot
(lt_pow2_32 sz;
parser32 (parse_flbytes sz)) | let parse32_flbytes
(sz: nat)
(sz' : U32.t { U32.v sz' == sz } )
: Tot (
lt_pow2_32 sz;
parser32 (parse_flbytes sz)
)
= lt_pow2_32 sz;
make_total_constant_size_parser32
sz
sz'
#(B32.lbytes sz)
(parse_flbytes_gen sz)
()
(parse32_flbytes_gen sz) | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 28,
"end_line": 35,
"start_col": 0,
"start_line": 21
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 | sz: Prims.nat -> sz': FStar.UInt32.t{FStar.UInt32.v sz' == sz}
-> (LowParse.Spec.Bytes.lt_pow2_32 sz;
LowParse.SLow.Base.parser32 (LowParse.Spec.Bytes.parse_flbytes sz)) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.UInt32.t",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"FStar.UInt.size",
"FStar.UInt32.n",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt32.v",
"LowParse.SLow.Combinators.make_total_constant_size_parser32",
"FStar.Bytes.lbytes",
"LowParse.Spec.Bytes.parse_flbytes_ge... | [] | false | false | false | false | false | let parse32_flbytes (sz: nat) (sz': U32.t{U32.v sz' == sz})
: Tot
(lt_pow2_32 sz;
parser32 (parse_flbytes sz)) =
| lt_pow2_32 sz;
make_total_constant_size_parser32 sz
sz'
#(B32.lbytes sz)
(parse_flbytes_gen sz)
()
(parse32_flbytes_gen sz) | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.parse32_all_bytes | val parse32_all_bytes:parser32 parse_all_bytes | val parse32_all_bytes:parser32 parse_all_bytes | let parse32_all_bytes
: parser32 parse_all_bytes
= fun (input: B32.bytes) ->
let res = Some (input, B32.len input) in
(res <: (res: option (bytes32 * U32.t) { parser32_correct parse_all_bytes input res } )) | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 92,
"end_line": 50,
"start_col": 0,
"start_line": 46
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 | LowParse.SLow.Base.parser32 LowParse.Spec.Bytes.parse_all_bytes | Prims.Tot | [
"total"
] | [] | [
"FStar.Bytes.bytes",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"LowParse.SLow.Base.bytes32",
"FStar.UInt32.t",
"LowParse.SLow.Base.parser32_correct",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"LowParse.Spec.Bytes.parse_all_bytes",
"FStar.Pervasives.Native.Some",
"FStar.... | [] | false | false | false | true | false | let parse32_all_bytes:parser32 parse_all_bytes =
| fun (input: B32.bytes) ->
let res = Some (input, B32.len input) in
(res <: (res: option (bytes32 * U32.t) {parser32_correct parse_all_bytes input res})) | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.size32_bounded_vlgenbytes | val size32_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(#sk: serializer pk)
(sk32:
size32 sk
{ kk.parser_kind_subkind == Some ParserStrong /\ Some? kk.parser_kind... | val size32_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(#sk: serializer pk)
(sk32:
size32 sk
{ kk.parser_kind_subkind == Some ParserStrong /\ Some? kk.parser_kind... | let size32_bounded_vlgenbytes
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(#sk: serializer pk)
(sk32: size32 sk {kk.parser_kind_subkind == Some ParserStrong /\ Some? kk.parser_kind_high /\ Some?.v kk.parser_kind_high + max <... | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 6,
"end_line": 224,
"start_col": 0,
"start_line": 209
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
sk32:
LowParse.SLow.Base.size32 sk
{ Mkparser_kind'?.parser_kind_subkind kk ==
FStar.Pervasives.Native.Some LowParse.Spec.Base.ParserStrong /\
Some? (Mkparser_kind'?.parser_kind_high kk) /\
... | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.BoundedInt.bounded_int32",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.size32",
"Prims.eq2",
... | [] | false | false | false | false | false | let size32_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(#sk: serializer pk)
(sk32:
size32 sk
{ kk.parser_kind_subkind == Some ParserStrong /\ Some? kk.parser_kind... | size32_synth (parse_bounded_vlgen min max pk serialize_all_bytes)
(fun x -> (x <: parse_bounded_vlbytes_t min max))
(serialize_bounded_vlgen min max sk serialize_all_bytes)
(size32_bounded_vlgen min max sk32 size32_all_bytes)
(fun x -> x)
(fun x -> x)
() | false |
Vale.AES.PPC64LE.GF128_Init.fsti | Vale.AES.PPC64LE.GF128_Init.va_wp_Keyhash_init | val va_wp_Keyhash_init
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_s0: va_state)
(va_k: (va_state -> unit -> Type0))
: Type0 | val va_wp_Keyhash_init
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_s0: va_state)
(va_k: (va_state -> unit -> Type0))
: Type0 | let va_wp_Keyhash_init (alg:algorithm) (key:(seq nat32)) (roundkeys_b:buffer128)
(hkeys_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
(va_get_ok va_s0 /\ Vale.PPC64LE.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem
va_s0) /\ (alg = AES_128 \/ alg = AES_256) /\ Vale.PPC6... | {
"file_name": "obj/Vale.AES.PPC64LE.GF128_Init.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 101,
"start_col": 0,
"start_line": 81
} | module Vale.AES.PPC64LE.GF128_Init
open Vale.Def.Words_s
open Vale.Def.Words.Four_s
open Vale.Def.Types_s
open FStar.Seq
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Vale.Math.Poly2.Bits_s
open Vale.Math.Poly2.Bits
open Vale.Math.Poly2.Lemmas
open Vale.AES.GF128_s
open V... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.State.fsti.checked",
"Vale.PPC64LE.QuickCodes.fsti.checked",
"Vale.PPC64LE.QuickCode.fst.checked",
"Vale.PPC64LE.Memory.fsti.checked",
"Vale.PPC64LE.Machine_s.fst.checked",
"Vale.PPC64LE.InsVector.fsti.checked",
"Vale.PPC64LE.InsMem.... | [
{
"abbrev": false,
"full_module": "Vale.AES.OptPublic_BE",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.PPC64LE.GF128_Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.PPC64LE.PolyOps",
"short_module": null
},
{
"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 |
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.PPC64LE.Memory.nat32 ->
roundkeys_b: Vale.PPC64LE.Memory.buffer128 ->
hkeys_b: Vale.PPC64LE.Memory.buffer128 ->
va_s0: Vale.PPC64LE.Decls.va_state ->
va_k: (_: Vale.PPC64LE.Decls.va_state -> _: Prims.unit -> Type0)
-> Type0 | Prims.Tot | [
"total"
] | [] | [
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.PPC64LE.Memory.nat32",
"Vale.PPC64LE.Memory.buffer128",
"Vale.PPC64LE.Decls.va_state",
"Prims.unit",
"Prims.l_and",
"Prims.b2t",
"Vale.PPC64LE.Decls.va_get_ok",
"Vale.PPC64LE.Memory.is_initial_heap",
"Vale.PPC64LE.Decls.va_get_mem_la... | [] | false | false | false | true | true | let va_wp_Keyhash_init
(alg: algorithm)
(key: (seq nat32))
(roundkeys_b hkeys_b: buffer128)
(va_s0: va_state)
(va_k: (va_state -> unit -> Type0))
: Type0 =
| (va_get_ok va_s0 /\ Vale.PPC64LE.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
(alg = AES_128 \/ alg = AES_256) /\ Vale.PPC64LE.Decls.buffers_disjoint128 roundkeys_b hkeys_b /\
Vale.AES.AES_BE_s.is_aes_key_word alg key /\
Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.buffer... | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.serialize32_bounded_vlbytes_aux | val serialize32_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer32 (serialize_bounded_vlbytes_aux min max l)) | val serialize32_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer32 (serialize_bounded_vlbytes_aux min max l)) | let serialize32_bounded_vlbytes_aux
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967292 } ) // max MUST BE less than 2^32 - 4
(l: nat { l >= log256' max /\ l <= 4 } )
: Tot (serializer32 (serialize_bounded_vlbytes_aux min max l))
=
serialize32_bounded_vldata_strong'
min
max
l
#_
... | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 25,
"end_line": 97,
"start_col": 0,
"start_line": 83
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967292} ->
l: Prims.nat{l >= LowParse.Spec.BoundedInt.log256' max /\ l <= 4}
-> LowParse.SLow.Base.serializer32 (LowParse.Spec.Bytes.serialize_bounded_vlbytes_aux min max l) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"Prims.op_GreaterThanOrEqual",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.SLow.VLData.serialize32_bounded_vldata_strong'",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"FStar.Bytes... | [] | false | false | false | false | false | let serialize32_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer32 (serialize_bounded_vlbytes_aux min max l)) =
| serialize32_bounded_vldata_strong' min
max
l
#_
#_
#parse_all_bytes
#serialize_all_bytes
serialize32_all_bytes | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.size32_bounded_vlbytes | val size32_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967292})
: Tot (size32 (serialize_bounded_vlbytes min max)) | val size32_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967292})
: Tot (size32 (serialize_bounded_vlbytes min max)) | let size32_bounded_vlbytes
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967292 } ) // max MUST BE less than 2^32 - 4
: Tot (size32 (serialize_bounded_vlbytes min max))
= size32_bounded_vlbytes' min max (log256' max) | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 47,
"end_line": 171,
"start_col": 0,
"start_line": 167
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 | min: Prims.nat -> max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967292}
-> LowParse.SLow.Base.size32 (LowParse.Spec.Bytes.serialize_bounded_vlbytes min max) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.SLow.Bytes.size32_bounded_vlbytes'",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.SLow.Base.size32",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_kind",
"LowParse.Spe... | [] | false | false | false | false | false | let size32_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967292})
: Tot (size32 (serialize_bounded_vlbytes min max)) =
| size32_bounded_vlbytes' min max (log256' max) | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.serialize32_bounded_vlgenbytes | val serialize32_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(#sk: serializer pk)
(sk32:
serializer32 sk
{ kk.parser_kind_subkind == Some ParserStrong /\ Some? kk.... | val serialize32_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(#sk: serializer pk)
(sk32:
serializer32 sk
{ kk.parser_kind_subkind == Some ParserStrong /\ Some? kk.... | let serialize32_bounded_vlgenbytes
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967296 })
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(#sk: serializer pk)
(sk32: serializer32 sk {kk.parser_kind_subkind == Some ParserStrong /\ Some? kk.parser_kind_high /\ Some?.v kk.parser_kind_h... | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 6,
"end_line": 206,
"start_col": 0,
"start_line": 191
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967296} ->
sk32:
LowParse.SLow.Base.serializer32 sk
{ Mkparser_kind'?.parser_kind_subkind kk ==
FStar.Pervasives.Native.Some LowParse.Spec.Base.ParserStrong /\
Some? (Mkparser_kind'?.parser_kind_high kk) /... | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.BoundedInt.bounded_int32",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.serializer32",
"Prims.... | [] | false | false | false | false | false | let serialize32_bounded_vlgenbytes
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967296})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(#sk: serializer pk)
(sk32:
serializer32 sk
{ kk.parser_kind_subkind == Some ParserStrong /\ Some? kk.... | serialize32_synth (parse_bounded_vlgen min max pk serialize_all_bytes)
(fun x -> (x <: parse_bounded_vlbytes_t min max))
(serialize_bounded_vlgen min max sk serialize_all_bytes)
(serialize32_bounded_vlgen min max sk32 serialize32_all_bytes)
(fun x -> x)
(fun x -> x)
() | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.serialize32_bounded_vlbytes | val serialize32_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967292})
: Tot (serializer32 (serialize_bounded_vlbytes min max)) | val serialize32_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967292})
: Tot (serializer32 (serialize_bounded_vlbytes min max)) | let serialize32_bounded_vlbytes
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967292 } ) // max MUST BE less than 2^32 - 4
: Tot (serializer32 (serialize_bounded_vlbytes min max))
= serialize32_bounded_vlbytes' min max (log256' max) | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 52,
"end_line": 121,
"start_col": 0,
"start_line": 117
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 | min: Prims.nat -> max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967292}
-> LowParse.SLow.Base.serializer32 (LowParse.Spec.Bytes.serialize_bounded_vlbytes min max) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"LowParse.SLow.Bytes.serialize32_bounded_vlbytes'",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.SLow.Base.serializer32",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_kind",
"L... | [] | false | false | false | false | false | let serialize32_bounded_vlbytes (min: nat) (max: nat{min <= max /\ max > 0 /\ max < 4294967292})
: Tot (serializer32 (serialize_bounded_vlbytes min max)) =
| serialize32_bounded_vlbytes' min max (log256' max) | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.size32_all_bytes | val size32_all_bytes:size32 serialize_all_bytes | val size32_all_bytes:size32 serialize_all_bytes | let size32_all_bytes
: size32 serialize_all_bytes
= fun (input: B32.bytes) ->
let res = B32.len input in
(res <: (res: U32.t { size32_postcond serialize_all_bytes input res } )) | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 74,
"end_line": 128,
"start_col": 0,
"start_line": 124
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 | LowParse.SLow.Base.size32 LowParse.Spec.Bytes.serialize_all_bytes | Prims.Tot | [
"total"
] | [] | [
"FStar.Bytes.bytes",
"FStar.UInt32.t",
"LowParse.SLow.Base.size32_postcond",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"LowParse.Spec.Bytes.parse_all_bytes",
"LowParse.Spec.Bytes.serialize_all_bytes",
"FStar.Bytes.len"
] | [] | false | false | false | true | false | let size32_all_bytes:size32 serialize_all_bytes =
| fun (input: B32.bytes) ->
let res = B32.len input in
(res <: (res: U32.t{size32_postcond serialize_all_bytes input res})) | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.size32_bounded_vlbytes' | val size32_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (size32 (serialize_bounded_vlbytes' min max l)) | val size32_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (size32 (serialize_bounded_vlbytes' min max l)) | let size32_bounded_vlbytes'
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967292 } ) // max MUST BE less than 2^32 - 4
(l: nat { l >= log256' max /\ l <= 4 } )
: Tot (size32 (serialize_bounded_vlbytes' min max l))
=
size32_synth
(parse_bounded_vlbytes_aux min max l)
(synth_bounded_vlbytes m... | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 6,
"end_line": 164,
"start_col": 0,
"start_line": 149
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967292} ->
l: Prims.nat{l >= LowParse.Spec.BoundedInt.log256' max /\ l <= 4}
-> LowParse.SLow.Base.size32 (LowParse.Spec.Bytes.serialize_bounded_vlbytes' min max l) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"Prims.op_GreaterThanOrEqual",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.SLow.Combinators.size32_synth",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_kind",
"LowParse.Spec.B... | [] | false | false | false | false | false | let size32_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (size32 (serialize_bounded_vlbytes' min max l)) =
| size32_synth (parse_bounded_vlbytes_aux min max l)
(synth_bounded_vlbytes min max)
(serialize_bounded_vlbytes_aux min max l)
(size32_bounded_vlbytes_aux min max l)
(fun (x: parse_bounded_vlbytes_t min max) ->
(x <: parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes))
(fun x... | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.parse32_bounded_vlgenbytes | val parse32_bounded_vlgenbytes
(min: nat)
(min32: U32.t{U32.v min32 == min})
(max: nat{min <= max /\ max > 0})
(max32: U32.t{U32.v max32 == max})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(pk32: parser32 pk)
: Tot (parser32 (parse_bounded_vlgenbytes min ma... | val parse32_bounded_vlgenbytes
(min: nat)
(min32: U32.t{U32.v min32 == min})
(max: nat{min <= max /\ max > 0})
(max32: U32.t{U32.v max32 == max})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(pk32: parser32 pk)
: Tot (parser32 (parse_bounded_vlgenbytes min ma... | let parse32_bounded_vlgenbytes
(min: nat)
(min32: U32.t { U32.v min32 == min })
(max: nat{ min <= max /\ max > 0 })
(max32: U32.t { U32.v max32 == max })
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(pk32: parser32 pk)
: Tot (parser32 (parse_bounded_vlgenbytes min max pk))
= parse32_synth
... | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 6,
"end_line": 188,
"start_col": 0,
"start_line": 174
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 |
min: Prims.nat ->
min32: FStar.UInt32.t{FStar.UInt32.v min32 == min} ->
max: Prims.nat{min <= max /\ max > 0} ->
max32: FStar.UInt32.t{FStar.UInt32.v max32 == max} ->
pk32: LowParse.SLow.Base.parser32 pk
-> LowParse.SLow.Base.parser32 (LowParse.Spec.Bytes.parse_bounded_vlgenbytes min max pk) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.UInt32.t",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"FStar.UInt.size",
"FStar.UInt32.n",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt32.v",
"Prims.l_and",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Ba... | [] | false | false | false | false | false | let parse32_bounded_vlgenbytes
(min: nat)
(min32: U32.t{U32.v min32 == min})
(max: nat{min <= max /\ max > 0})
(max32: U32.t{U32.v max32 == max})
(#kk: parser_kind)
(#pk: parser kk (bounded_int32 min max))
(pk32: parser32 pk)
: Tot (parser32 (parse_bounded_vlgenbytes min ma... | parse32_synth (parse_bounded_vlgen min max pk serialize_all_bytes)
(fun x -> (x <: parse_bounded_vlbytes_t min max))
(fun x -> (x <: parse_bounded_vlbytes_t min max))
(parse32_bounded_vlgen min min32 max max32 pk32 serialize_all_bytes parse32_all_bytes)
() | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.serialize32_bounded_vlbytes' | val serialize32_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer32 (serialize_bounded_vlbytes' min max l)) | val serialize32_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer32 (serialize_bounded_vlbytes' min max l)) | let serialize32_bounded_vlbytes'
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967292 } ) // max MUST BE less than 2^32 - 4
(l: nat { l >= log256' max /\ l <= 4 } )
: Tot (serializer32 (serialize_bounded_vlbytes' min max l))
= serialize32_synth
(parse_bounded_vlbytes_aux min max l)
(synth_boun... | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 6,
"end_line": 114,
"start_col": 0,
"start_line": 100
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967292} ->
l: Prims.nat{l >= LowParse.Spec.BoundedInt.log256' max /\ l <= 4}
-> LowParse.SLow.Base.serializer32 (LowParse.Spec.Bytes.serialize_bounded_vlbytes' min max l) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"Prims.op_GreaterThanOrEqual",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.SLow.Combinators.serialize32_synth",
"LowParse.Spec.VLData.parse_bounded_vldata_strong_kind",
"LowParse.S... | [] | false | false | false | false | false | let serialize32_bounded_vlbytes'
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (serializer32 (serialize_bounded_vlbytes' min max l)) =
| serialize32_synth (parse_bounded_vlbytes_aux min max l)
(synth_bounded_vlbytes min max)
(serialize_bounded_vlbytes_aux min max l)
(serialize32_bounded_vlbytes_aux min max l)
(fun (x: parse_bounded_vlbytes_t min max) ->
(x <: parse_bounded_vldata_strong_t min max #_ #_ #parse_all_bytes serialize_all_bytes)... | false |
LowParse.SLow.Bytes.fst | LowParse.SLow.Bytes.size32_bounded_vlbytes_aux | val size32_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (size32 (serialize_bounded_vlbytes_aux min max l)) | val size32_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (size32 (serialize_bounded_vlbytes_aux min max l)) | let size32_bounded_vlbytes_aux
(min: nat)
(max: nat { min <= max /\ max > 0 /\ max < 4294967292 } ) // max MUST BE less than 2^32 - 4
(l: nat { l >= log256' max /\ l <= 4 } )
: Tot (size32 (serialize_bounded_vlbytes_aux min max l))
=
size32_bounded_vldata_strong'
min
max
l
#_
#_
#parse_... | {
"file_name": "src/lowparse/LowParse.SLow.Bytes.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 21,
"end_line": 146,
"start_col": 0,
"start_line": 131
} | module LowParse.SLow.Bytes
include LowParse.Spec.Bytes
include LowParse.SLow.VLData
include LowParse.SLow.VLGen
module B32 = FStar.Bytes
module Seq = FStar.Seq
module U32 = FStar.UInt32
inline_for_extraction
let parse32_flbytes_gen
(sz: nat { sz < 4294967296 } )
(x: B32.lbytes sz)
: Tot (y: B32.lbytes sz { y == p... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Bytes.fst.checked",
"LowParse.SLow.VLGen.fst.checked",
"LowParse.SLow.VLData.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module": "FStar.Bytes",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowPars... | {
"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 |
min: Prims.nat ->
max: Prims.nat{min <= max /\ max > 0 /\ max < 4294967292} ->
l: Prims.nat{l >= LowParse.Spec.BoundedInt.log256' max /\ l <= 4}
-> LowParse.SLow.Base.size32 (LowParse.Spec.Bytes.serialize_bounded_vlbytes_aux min max l) | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_GreaterThan",
"Prims.op_LessThan",
"Prims.op_GreaterThanOrEqual",
"LowParse.Spec.BoundedInt.log256'",
"LowParse.SLow.VLData.size32_bounded_vldata_strong'",
"LowParse.Spec.Bytes.parse_all_bytes_kind",
"FStar.Bytes.byte... | [] | false | false | false | false | false | let size32_bounded_vlbytes_aux
(min: nat)
(max: nat{min <= max /\ max > 0 /\ max < 4294967292})
(l: nat{l >= log256' max /\ l <= 4})
: Tot (size32 (serialize_bounded_vlbytes_aux min max l)) =
| size32_bounded_vldata_strong' min
max
l
#_
#_
#parse_all_bytes
#serialize_all_bytes
size32_all_bytes
(U32.uint_to_t l) | false |
Hacl.Impl.Frodo.Encode.fst | Hacl.Impl.Frodo.Encode.dc | val dc:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b < v logq}
-> c:uint16
-> r:uint16{r == S.dc (v logq) (v b) c} | val dc:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b < v logq}
-> c:uint16
-> r:uint16{r == S.dc (v logq) (v b) c} | let dc logq b c =
let res1 = (c +. (u16 1 <<. (logq -. b -. size 1))) >>. (logq -. b) in
res1 &. ((u16 1 <<. b) -. u16 1) | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Encode.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 42,
"start_col": 0,
"start_line": 40
} | module Hacl.Impl.Frodo.Encode
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
module S = Spec.Frodo.Encode
... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Encode.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Encode",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_m... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq <= 16} ->
b: Lib.IntTypes.size_t{0 < Lib.IntTypes.v b /\ Lib.IntTypes.v b < Lib.IntTypes.v logq} ->
c: Lib.IntTypes.uint16
-> r: Lib.IntTypes.uint16{r == Spec.Frodo.Encode.dc (Lib.IntTypes.v logq) (Lib.IntTypes.v b) c} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"Lib.IntTypes.uint16",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.U16",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Subtraction_Dot",
"Lib.In... | [] | false | false | false | false | false | let dc logq b c =
| let res1 = (c +. (u16 1 <<. (logq -. b -. size 1))) >>. (logq -. b) in
res1 &. ((u16 1 <<. b) -. u16 1) | false |
Hacl.Impl.Frodo.Encode.fst | Hacl.Impl.Frodo.Encode.ec | val ec:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= v logq}
-> k:uint16{v k < pow2 (v b)}
-> r:uint16{r == S.ec (v logq) (v b) k} | val ec:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= v logq}
-> k:uint16{v k < pow2 (v b)}
-> r:uint16{r == S.ec (v logq) (v b) k} | let ec logq b a =
a <<. (logq -. b) | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Encode.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 19,
"end_line": 30,
"start_col": 0,
"start_line": 29
} | module Hacl.Impl.Frodo.Encode
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
module S = Spec.Frodo.Encode
... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Encode.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Encode",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_m... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq <= 16} ->
b: Lib.IntTypes.size_t{0 < Lib.IntTypes.v b /\ Lib.IntTypes.v b <= Lib.IntTypes.v logq} ->
k: Lib.IntTypes.uint16{Lib.IntTypes.v k < Prims.pow2 (Lib.IntTypes.v b)}
-> r: Lib.IntTypes.uint16{r == Spec.Frodo.Encode.ec (Lib.I... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"Lib.IntTypes.uint16",
"Lib.IntTypes.U16",
"Lib.IntTypes.SEC",
"Prims.pow2",
"Lib.IntTypes.op_Less_Less_Dot",
"Lib.IntTypes.op_Subtr... | [] | false | false | false | false | false | let ec logq b a =
| a <<. (logq -. b) | false |
Hacl.Impl.Frodo.Encode.fst | Hacl.Impl.Frodo.Encode.ec1 | val ec1:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b <= v logq}
-> x:uint64
-> k:size_t{v k < 8}
-> res:uint16{res == S.ec1 (v logq) (v b) x (v k)} | val ec1:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b <= v logq}
-> x:uint64
-> k:size_t{v k < 8}
-> res:uint16{res == S.ec1 (v logq) (v b) x (v k)} | let ec1 logq b x k =
Spec.Frodo.Lemmas.modulo_pow2_u64 (x >>. (b *! k)) (v b);
let rk = (x >>. (b *! k)) &. ((u64 1 <<. b) -. u64 1) in
ec logq b (to_u16 rk) | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Encode.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 23,
"end_line": 56,
"start_col": 0,
"start_line": 53
} | module Hacl.Impl.Frodo.Encode
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
module S = Spec.Frodo.Encode
... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Encode.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Encode",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_m... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq <= 16} ->
b:
Lib.IntTypes.size_t
{0 < Lib.IntTypes.v b /\ Lib.IntTypes.v b <= 8 /\ Lib.IntTypes.v b <= Lib.IntTypes.v logq} ->
x: Lib.IntTypes.uint64 ->
k: Lib.IntTypes.size_t{Lib.IntTypes.v k < 8}
-> res:
Lib.... | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"Lib.IntTypes.uint64",
"Hacl.Impl.Frodo.Encode.ec",
"Lib.IntTypes.to_u16",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.int... | [] | false | false | false | false | false | let ec1 logq b x k =
| Spec.Frodo.Lemmas.modulo_pow2_u64 (x >>. (b *! k)) (v b);
let rk = (x >>. (b *! k)) &. ((u64 1 <<. b) -. u64 1) in
ec logq b (to_u16 rk) | false |
Enum.fst | Enum.bounded | val bounded : b: Enum.bound -> Type0 | let bounded (b:bound) = n:nat{bounded_by b n} | {
"file_name": "examples/typeclasses/Enum.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 45,
"end_line": 30,
"start_col": 0,
"start_line": 30
} | (*
Copyright 2008-2018 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 agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Enum.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Typeclasses",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
... | {
"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 | b: Enum.bound -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Enum.bound",
"Prims.nat",
"Enum.bounded_by"
] | [] | false | false | false | true | true | let bounded (b: bound) =
| n: nat{bounded_by b n} | false | |
Hacl.Spec.Poly1305.Field32xN.Lemmas.fst | Hacl.Spec.Poly1305.Field32xN.Lemmas.fmul_r4_normalize5_lemma | val fmul_r4_normalize5_lemma:
acc:felem5 4
-> r:felem5 4
-> r_5:felem5 4
-> r4:felem5 4 ->
Lemma
(requires
felem_fits5 acc (3, 3, 3, 3, 3) /\
felem_fits5 r (1, 1, 1, 1, 1) /\
felem_fits5 r4 (2, 2, 2, 2, 2) /\
r_5 == precomp_r5 r /\
feval5 r4 == Vec.compute_r4 (feval5 r).[0])
(ensures... | val fmul_r4_normalize5_lemma:
acc:felem5 4
-> r:felem5 4
-> r_5:felem5 4
-> r4:felem5 4 ->
Lemma
(requires
felem_fits5 acc (3, 3, 3, 3, 3) /\
felem_fits5 r (1, 1, 1, 1, 1) /\
felem_fits5 r4 (2, 2, 2, 2, 2) /\
r_5 == precomp_r5 r /\
feval5 r4 == Vec.compute_r4 (feval5 r).[0])
(ensures... | let fmul_r4_normalize5_lemma acc fr fr_5 fr4 =
let fr2 = fmul_r5 #4 fr fr fr_5 in
let fr3 = fmul_r5 #4 fr2 fr fr_5 in
let out = fmul_r4_normalize50 acc fr fr2 fr3 fr4 in
let v2 = fmul_r4_normalize51 out in
let res = carry_full_felem5 v2 in
carry_full_felem5_lemma v2 | {
"file_name": "code/poly1305/Hacl.Spec.Poly1305.Field32xN.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 28,
"end_line": 620,
"start_col": 0,
"start_line": 614
} | module Hacl.Spec.Poly1305.Field32xN.Lemmas
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open Hacl.Spec.Poly1305.Field32xN
open Hacl.Poly1305.Field32xN.Lemmas0
open Hacl.Poly1305.Field32xN.Lemmas1
open Hacl.Poly1305.Field32xN.Lemmas2
module Vec = Hacl.Spec.Poly1305.Vec
#set-options "--z3rlim... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"Hacl.Poly1305.Field32xN.Lemmas2.fst.checked",
"Hacl... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": "Vec"
},
{
"abbrev": false,
"full_module": "Hacl.Poly1305.Field32xN.Lemmas2",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Poly1305.Field32xN.Lemmas1",
"short_module": null
},
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"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 |
acc: Hacl.Spec.Poly1305.Field32xN.felem5 4 ->
r: Hacl.Spec.Poly1305.Field32xN.felem5 4 ->
r_5: Hacl.Spec.Poly1305.Field32xN.felem5 4 ->
r4: Hacl.Spec.Poly1305.Field32xN.felem5 4
-> FStar.Pervasives.Lemma
(requires
Hacl.Spec.Poly1305.Field32xN.felem_fits5 acc (3, 3, 3, 3, 3) /\
H... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Poly1305.Field32xN.felem5",
"Hacl.Poly1305.Field32xN.Lemmas1.carry_full_felem5_lemma",
"Hacl.Spec.Poly1305.Field32xN.carry_full_felem5",
"Hacl.Spec.Poly1305.Field32xN.Lemmas.fmul_r4_normalize51",
"Hacl.Spec.Poly1305.Field32xN.Lemmas.fmul_r4_normalize50",
"Hacl.Spec.Poly1305.Field32xN.fmul_r5",
... | [] | true | false | true | false | false | let fmul_r4_normalize5_lemma acc fr fr_5 fr4 =
| let fr2 = fmul_r5 #4 fr fr fr_5 in
let fr3 = fmul_r5 #4 fr2 fr fr_5 in
let out = fmul_r4_normalize50 acc fr fr2 fr3 fr4 in
let v2 = fmul_r4_normalize51 out in
let res = carry_full_felem5 v2 in
carry_full_felem5_lemma v2 | false |
Hacl.K256.PrecompTable.fst | Hacl.K256.PrecompTable.precomp_basepoint_table_lemma_w5 | val precomp_basepoint_table_lemma_w5: unit ->
Lemma (forall (i:nat{i < 32}). precomp_table_acc_inv g_aff 32 precomp_basepoint_table_lseq_w5 i) | val precomp_basepoint_table_lemma_w5: unit ->
Lemma (forall (i:nat{i < 32}). precomp_table_acc_inv g_aff 32 precomp_basepoint_table_lseq_w5 i) | let precomp_basepoint_table_lemma_w5 () =
normalize_term_spec (SPT.precomp_base_table_list mk_k256_precomp_base_table S.g 31);
SPT.precomp_base_table_lemma mk_k256_precomp_base_table S.g 32 precomp_basepoint_table_lseq_w5 | {
"file_name": "code/k256/Hacl.K256.PrecompTable.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 96,
"end_line": 291,
"start_col": 0,
"start_line": 289
} | module Hacl.K256.PrecompTable
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module LE = Lib.Exponentiation
module SE = Spec.Exponentiation
module SPT = Hacl.Spec.PrecompBaseTable
module SPT256 = Hacl.Spec.Pr... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.Lemmas.fsti.checked",
"Spec.K256.fst.checked",
"Spec.Exponentiation.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hac... | [
{
"abbrev": true,
"full_module": "Spec.K256.Lemmas",
"short_module": "SL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.PrecompTable",
"short_module": "SPTK"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.PrecompBaseTable256",
"short_module": "SPT256"
},
{
"... | {
"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 | _: Prims.unit
-> FStar.Pervasives.Lemma
(ensures
forall (i: Prims.nat{i < 32}).
Hacl.K256.PrecompTable.precomp_table_acc_inv Hacl.K256.PrecompTable.g_aff
32
Hacl.K256.PrecompTable.precomp_basepoint_table_lseq_w5
i) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.unit",
"Hacl.Spec.PrecompBaseTable.precomp_base_table_lemma",
"Spec.K256.PointOps.proj_point",
"Lib.IntTypes.U64",
"FStar.UInt32.uint_to_t",
"Hacl.K256.PrecompTable.mk_k256_precomp_base_table",
"Spec.K256.PointOps.g",
"Hacl.K256.PrecompTable.precomp_basepoint_table_lseq_w5",
"FStar.Pervasives... | [] | true | false | true | false | false | let precomp_basepoint_table_lemma_w5 () =
| normalize_term_spec (SPT.precomp_base_table_list mk_k256_precomp_base_table S.g 31);
SPT.precomp_base_table_lemma mk_k256_precomp_base_table S.g 32 precomp_basepoint_table_lseq_w5 | false |
Enum.fst | Enum.bounded_by | val bounded_by : b: Enum.bound -> n: Prims.int -> Prims.logical | let bounded_by (b:bound) n =
match b with
| Some b -> b2t (n <= b)
| None -> True | {
"file_name": "examples/typeclasses/Enum.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 16,
"end_line": 26,
"start_col": 0,
"start_line": 23
} | (*
Copyright 2008-2018 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 agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Enum.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Typeclasses",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
... | {
"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 | b: Enum.bound -> n: Prims.int -> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Enum.bound",
"Prims.int",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.l_True",
"Prims.logical"
] | [] | false | false | false | true | true | let bounded_by (b: bound) n =
| match b with
| Some b -> b2t (n <= b)
| None -> True | false | |
Hacl.Impl.Frodo.Encode.fst | Hacl.Impl.Frodo.Encode.frodo_key_encode2 | val frodo_key_encode2:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b <= v logq}
-> n:size_t{v n == 8}
-> a:lbytes (n *! n *! b /. size 8)
-> i:size_t{v i < v n}
-> x:uint64
-> res:matrix_t n n
-> Stack unit
(requires fun h ->
live h a /\ live h res /\ disjoin... | val frodo_key_encode2:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b <= v logq}
-> n:size_t{v n == 8}
-> a:lbytes (n *! n *! b /. size 8)
-> i:size_t{v i < v n}
-> x:uint64
-> res:matrix_t n n
-> Stack unit
(requires fun h ->
live h a /\ live h res /\ disjoin... | let frodo_key_encode2 logq b n a i x res =
[@ inline_let]
let spec h0 = S.frodo_key_encode0 (v logq) (v b) (v n) (as_seq h0 a) x (v i) in
let h0 = ST.get () in
loop1 h0 (size 8) res spec
(fun k ->
Loops.unfold_repeati 8 (spec h0) (as_seq h0 res) (v k);
mset res i k (ec1 logq b x k)
) | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Encode.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 108,
"start_col": 0,
"start_line": 100
} | module Hacl.Impl.Frodo.Encode
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
module S = Spec.Frodo.Encode
... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Encode.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Encode",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_m... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq <= 16} ->
b:
Lib.IntTypes.size_t
{0 < Lib.IntTypes.v b /\ Lib.IntTypes.v b <= 8 /\ Lib.IntTypes.v b <= Lib.IntTypes.v logq} ->
n: Lib.IntTypes.size_t{Lib.IntTypes.v n == 8} ->
a: Hacl.Impl.Matrix.lbytes (n *! n *! b ... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"Prims.eq2",
"Prims.int",
"Hacl.Impl.Matrix.lbytes",
"Lib.IntTypes.op_Slash_Dot",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.size",
... | [] | false | true | false | false | false | let frodo_key_encode2 logq b n a i x res =
| [@@ inline_let ]let spec h0 = S.frodo_key_encode0 (v logq) (v b) (v n) (as_seq h0 a) x (v i) in
let h0 = ST.get () in
loop1 h0
(size 8)
res
spec
(fun k ->
Loops.unfold_repeati 8 (spec h0) (as_seq h0 res) (v k);
mset res i k (ec1 logq b x k)) | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.pbn_mont_ctx_u32 | val pbn_mont_ctx_u32 : Type0 | let pbn_mont_ctx_u32 = B.pointer bn_mont_ctx_u32 | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 48,
"end_line": 57,
"start_col": 0,
"start_line": 57
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | Type0 | Prims.Tot | [
"total"
] | [] | [
"LowStar.Buffer.pointer",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx_u32"
] | [] | false | false | false | true | true | let pbn_mont_ctx_u32 =
| B.pointer bn_mont_ctx_u32 | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_mont_ctx | val bn_mont_ctx : t: Hacl.Bignum.Definitions.limb_t -> Type0 | let bn_mont_ctx (t:limb_t) = bn_mont_ctx' t (lb t) (ll t) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 57,
"end_line": 48,
"start_col": 0,
"start_line": 48
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx'",
"Hacl.Bignum.MontArithmetic.lb",
"Hacl.Bignum.MontArithmetic.ll"
] | [] | false | false | false | true | true | let bn_mont_ctx (t: limb_t) =
| bn_mont_ctx' t (lb t) (ll t) | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_mont_ctx_u64 | val bn_mont_ctx_u64 : Type0 | let bn_mont_ctx_u64 = bn_mont_ctx' U64 (lb U64) (ll U64) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 51,
"start_col": 0,
"start_line": 51
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.MontArithmetic.bn_mont_ctx'",
"Lib.IntTypes.U64",
"Hacl.Bignum.MontArithmetic.lb",
"Hacl.Bignum.MontArithmetic.ll"
] | [] | false | false | false | true | true | let bn_mont_ctx_u64 =
| bn_mont_ctx' U64 (lb U64) (ll U64) | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_mont_ctx_u32 | val bn_mont_ctx_u32 : Type0 | let bn_mont_ctx_u32 = bn_mont_ctx' U32 (lb U32) (ll U32) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 50,
"start_col": 0,
"start_line": 50
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.MontArithmetic.bn_mont_ctx'",
"Lib.IntTypes.U32",
"Hacl.Bignum.MontArithmetic.lb",
"Hacl.Bignum.MontArithmetic.ll"
] | [] | false | false | false | true | true | let bn_mont_ctx_u32 =
| bn_mont_ctx' U32 (lb U32) (ll U32) | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.pbn_mont_ctx_u64 | val pbn_mont_ctx_u64 : Type0 | let pbn_mont_ctx_u64 = B.pointer bn_mont_ctx_u64 | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 48,
"end_line": 59,
"start_col": 0,
"start_line": 59
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | Type0 | Prims.Tot | [
"total"
] | [] | [
"LowStar.Buffer.pointer",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx_u64"
] | [] | false | false | false | true | true | let pbn_mont_ctx_u64 =
| B.pointer bn_mont_ctx_u64 | false | |
Enum.fst | Enum.enum_opt | [@@ FStar.Tactics.Typeclasses.tcinstance]
val enum_opt (i: enum 'a) : enum (option 'a) | [@@ FStar.Tactics.Typeclasses.tcinstance]
val enum_opt (i: enum 'a) : enum (option 'a) | instance enum_opt (i:enum 'a): enum (option 'a) =
{ max = succ i.max;
toInt = (function | None -> 0 | Some x -> 1 + i.toInt x);
fromInt = (function | 0 -> None | x -> Some (i.fromInt (x-1)));
inv1 = (function | None -> () | Some x -> i.inv1 x);
inv2 = (function | 0 -> () | x -> i.inv2 (x-1));
} | {
"file_name": "examples/typeclasses/Enum.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 54,
"start_col": 0,
"start_line": 48
} | (*
Copyright 2008-2018 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 agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Enum.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Typeclasses",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
... | {
"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 | i: Enum.enum 'a -> Enum.enum (FStar.Pervasives.Native.option 'a) | Prims.Tot | [
"total"
] | [] | [
"Enum.enum",
"Enum.Mkenum",
"FStar.Pervasives.Native.option",
"Enum.succ",
"Enum.__proj__Mkenum__item__max",
"Prims.op_Addition",
"Enum.__proj__Mkenum__item__toInt",
"Enum.bounded",
"FStar.Pervasives.Native.None",
"Prims.int",
"FStar.Pervasives.Native.Some",
"Enum.__proj__Mkenum__item__fromInt... | [] | false | false | false | true | false | [@@ FStar.Tactics.Typeclasses.tcinstance]
let enum_opt (i: enum 'a) : enum (option 'a) =
| {
max = succ i.max;
toInt
=
(function
| None -> 0
| Some x -> 1 + i.toInt x);
fromInt
=
(function
| 0 -> None
| x -> Some (i.fromInt (x - 1)));
inv1
=
(function
| None -> ()
| Some x -> i.inv1 x);
inv2
=
(function
| 0 -> ()
| x -> i.inv2 (x - 1))
} | false |
Enum.fst | Enum.succ | val succ: bound -> bound | val succ: bound -> bound | let succ : bound -> bound = function | None -> None | Some b -> Some (b+1) | {
"file_name": "examples/typeclasses/Enum.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 74,
"end_line": 28,
"start_col": 0,
"start_line": 28
} | (*
Copyright 2008-2018 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 agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Enum.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Typeclasses",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
... | {
"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 | _: Enum.bound -> Enum.bound | Prims.Tot | [
"total"
] | [] | [
"Enum.bound",
"FStar.Pervasives.Native.None",
"Prims.nat",
"FStar.Pervasives.Native.Some",
"Prims.op_Addition"
] | [] | false | false | false | true | false | let succ: bound -> bound =
| function
| None -> None
| Some b -> Some (b + 1) | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.pbn_mont_ctx | val pbn_mont_ctx : t: Hacl.Bignum.Definitions.limb_t -> Type0 | let pbn_mont_ctx (t:limb_t) = B.pointer (bn_mont_ctx t) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 55,
"end_line": 54,
"start_col": 0,
"start_line": 54
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"LowStar.Buffer.pointer",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx"
] | [] | false | false | false | true | true | let pbn_mont_ctx (t: limb_t) =
| B.pointer (bn_mont_ctx t) | false | |
Enum.fst | Enum.enum_nat | [@@ FStar.Tactics.Typeclasses.tcinstance]
val enum_nat:enum nat | [@@ FStar.Tactics.Typeclasses.tcinstance]
val enum_nat:enum nat | instance enum_nat : enum nat =
{ max = None;
toInt = id;
fromInt = id;
inv1 = easy;
inv2 = easy;
} | {
"file_name": "examples/typeclasses/Enum.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 46,
"start_col": 0,
"start_line": 40
} | (*
Copyright 2008-2018 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 agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Tactics.Typeclasses.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Enum.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Tactics.V2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Typeclasses",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
... | {
"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 | Enum.enum Prims.nat | Prims.Tot | [
"total"
] | [] | [
"Enum.Mkenum",
"Prims.nat",
"FStar.Pervasives.Native.None",
"FStar.Pervasives.id",
"Enum.bounded",
"FStar.Tactics.V2.Logic.easy",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.Nil",
"FStar.Pervasives.pattern",
"FStar.Tactics.V2.Logic.lemma_from_squash"
] | [] | false | false | false | true | false | [@@ FStar.Tactics.Typeclasses.tcinstance]
let enum_nat:enum nat =
| { max = None; toInt = id; fromInt = id; inv1 = easy; inv2 = easy } | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.as_pctx | val as_pctx (#t: limb_t) (h: mem) (k: pbn_mont_ctx t) : GTot (S.bn_mont_ctx t) | val as_pctx (#t: limb_t) (h: mem) (k: pbn_mont_ctx t) : GTot (S.bn_mont_ctx t) | let as_pctx (#t:limb_t) (h:mem) (k:pbn_mont_ctx t) : GTot (S.bn_mont_ctx t) =
as_ctx h (B.deref h k) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 24,
"end_line": 105,
"start_col": 0,
"start_line": 104
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.pbn_mont_ctx t
-> Prims.GTot (Hacl.Spec.Bignum.MontArithmetic.bn_mont_ctx t) | Prims.GTot | [
"sometrivial"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Hacl.Bignum.MontArithmetic.as_ctx",
"LowStar.Monotonic.Buffer.deref",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx",
"LowStar.Buffer.trivial_preorder",
"Hacl.Spec.Bignum.MontArithmetic.bn_mont_ct... | [] | false | false | false | false | false | let as_pctx (#t: limb_t) (h: mem) (k: pbn_mont_ctx t) : GTot (S.bn_mont_ctx t) =
| as_ctx h (B.deref h k) | false |
Hacl.Impl.Frodo.Encode.fst | Hacl.Impl.Frodo.Encode.frodo_key_encode | val frodo_key_encode:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b <= v logq}
-> n:size_t{v n == 8}
-> a:lbytes (n *! n *! b /. size 8)
-> res:matrix_t n n
-> Stack unit
(requires fun h ->
live h a /\ live h res /\ disjoint a res /\
as_seq h res == Spec.Ma... | val frodo_key_encode:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b <= v logq}
-> n:size_t{v n == 8}
-> a:lbytes (n *! n *! b /. size 8)
-> res:matrix_t n n
-> Stack unit
(requires fun h ->
live h a /\ live h res /\ disjoint a res /\
as_seq h res == Spec.Ma... | let frodo_key_encode logq b n a res =
let h0 = ST.get () in
[@ inline_let]
let spec h0 = S.frodo_key_encode2 (v logq) (v b) (v n) (as_seq h0 a) in
loop1 h0 n res spec
(fun i ->
Loops.unfold_repeati (v n) (spec h0) (as_seq h0 res) (v i);
let x = frodo_key_encode1 logq b n a i in
frodo_key_encode2 l... | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Encode.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 134,
"start_col": 0,
"start_line": 125
} | module Hacl.Impl.Frodo.Encode
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
module S = Spec.Frodo.Encode
... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Encode.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Encode",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_m... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq <= 16} ->
b:
Lib.IntTypes.size_t
{0 < Lib.IntTypes.v b /\ Lib.IntTypes.v b <= 8 /\ Lib.IntTypes.v b <= Lib.IntTypes.v logq} ->
n: Lib.IntTypes.size_t{Lib.IntTypes.v n == 8} ->
a: Hacl.Impl.Matrix.lbytes (n *! n *! b ... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"Prims.eq2",
"Prims.int",
"Hacl.Impl.Matrix.lbytes",
"Lib.IntTypes.op_Slash_Dot",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.size",
... | [] | false | true | false | false | false | let frodo_key_encode logq b n a res =
| let h0 = ST.get () in
[@@ inline_let ]let spec h0 = S.frodo_key_encode2 (v logq) (v b) (v n) (as_seq h0 a) in
loop1 h0
n
res
spec
(fun i ->
Loops.unfold_repeati (v n) (spec h0) (as_seq h0 res) (v i);
let x = frodo_key_encode1 logq b n a i in
frodo_key_encode2 logq b n a i x res) | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.freeable | val freeable : h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.pbn_mont_ctx t -> Prims.logical | let freeable (#t:limb_t) (h:mem) (k:pbn_mont_ctx t) =
B.freeable k /\ freeable_s h (B.deref h k) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 44,
"end_line": 91,
"start_col": 0,
"start_line": 90
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.pbn_mont_ctx t -> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Prims.l_and",
"LowStar.Monotonic.Buffer.freeable",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx",
"LowStar.Buffer.trivial_preorder",
"Hacl.Bignum.MontArithmetic.freeable_s",
"LowStar.Monotonic.... | [] | false | false | false | false | true | let freeable (#t: limb_t) (h: mem) (k: pbn_mont_ctx t) =
| B.freeable k /\ freeable_s h (B.deref h k) | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.pbn_mont_ctx_inv | val pbn_mont_ctx_inv : h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.pbn_mont_ctx t -> Prims.logical | let pbn_mont_ctx_inv (#t:limb_t) (h:mem) (k:pbn_mont_ctx t) =
B.live h k /\
B.(loc_disjoint (loc_addr_of_buffer k) (footprint_s h (B.deref h k))) /\
bn_mont_ctx_inv h (B.deref h k) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 111,
"start_col": 0,
"start_line": 108
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.pbn_mont_ctx t -> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Prims.l_and",
"LowStar.Monotonic.Buffer.live",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx",
"LowStar.Buffer.trivial_preorder",
"LowStar.Monotonic.Buffer.loc_disjoint",
"LowStar.Monotonic.Buff... | [] | false | false | false | false | true | let pbn_mont_ctx_inv (#t: limb_t) (h: mem) (k: pbn_mont_ctx t) =
| B.live h k /\ B.(loc_disjoint (loc_addr_of_buffer k) (footprint_s h (B.deref h k))) /\
bn_mont_ctx_inv h (B.deref h k) | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.footprint | val footprint : h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.pbn_mont_ctx t
-> Prims.GTot LowStar.Monotonic.Buffer.loc | let footprint (#t:limb_t) (h:mem) (k:pbn_mont_ctx t) =
B.(loc_union (loc_addr_of_buffer k) (footprint_s h (B.deref h k))) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 68,
"end_line": 101,
"start_col": 0,
"start_line": 100
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.pbn_mont_ctx t
-> Prims.GTot LowStar.Monotonic.Buffer.loc | Prims.GTot | [
"sometrivial"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"LowStar.Monotonic.Buffer.loc_union",
"LowStar.Monotonic.Buffer.loc_addr_of_buffer",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx",
"LowStar.Buffer.trivial_preorder",
"Hacl.Bignum.MontArithmetic.f... | [] | false | false | false | false | false | let footprint (#t: limb_t) (h: mem) (k: pbn_mont_ctx t) =
| let open B in loc_union (loc_addr_of_buffer k) (footprint_s h (B.deref h k)) | false | |
Hacl.Impl.Frodo.Encode.fst | Hacl.Impl.Frodo.Encode.frodo_key_encode1 | val frodo_key_encode1:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b <= v logq}
-> n:size_t{v n == 8}
-> a:lbytes (n *! n *! b /. size 8)
-> i:size_t{v i < v n}
-> Stack uint64
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.fro... | val frodo_key_encode1:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b <= v logq}
-> n:size_t{v n == 8}
-> a:lbytes (n *! n *! b /. size 8)
-> i:size_t{v i < v n}
-> Stack uint64
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.fro... | let frodo_key_encode1 logq b n a i =
let h0 = ST.get() in
push_frame();
let v8 = create (size 8) (u8 0) in
let chunk = sub a (i *! b) b in
let h1 = ST.get() in
assert (as_seq h1 chunk == LSeq.sub (as_seq h0 a) (v (i *! b)) (v b));
update_sub v8 (size 0) b chunk;
let x = uint_from_bytes_le #U64 v8 in
p... | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Encode.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 81,
"start_col": 0,
"start_line": 71
} | module Hacl.Impl.Frodo.Encode
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
module S = Spec.Frodo.Encode
... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Encode.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Encode",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_m... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq <= 16} ->
b:
Lib.IntTypes.size_t
{0 < Lib.IntTypes.v b /\ Lib.IntTypes.v b <= 8 /\ Lib.IntTypes.v b <= Lib.IntTypes.v logq} ->
n: Lib.IntTypes.size_t{Lib.IntTypes.v n == 8} ->
a: Hacl.Impl.Matrix.lbytes (n *! n *! b ... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"Prims.eq2",
"Prims.int",
"Hacl.Impl.Matrix.lbytes",
"Lib.IntTypes.op_Slash_Dot",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.size",
... | [] | false | true | false | false | false | let frodo_key_encode1 logq b n a i =
| let h0 = ST.get () in
push_frame ();
let v8 = create (size 8) (u8 0) in
let chunk = sub a (i *! b) b in
let h1 = ST.get () in
assert (as_seq h1 chunk == LSeq.sub (as_seq h0 a) (v (i *! b)) (v b));
update_sub v8 (size 0) b chunk;
let x = uint_from_bytes_le #U64 v8 in
pop_frame ();
x | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_field_free_st | val bn_field_free_st : t: Hacl.Bignum.Definitions.limb_t -> Type0 | let bn_field_free_st (t:limb_t) = k:pbn_mont_ctx t ->
ST unit
(requires fun h ->
freeable h k /\
pbn_mont_ctx_inv h k)
(ensures fun h0 _ h1 ->
B.(modifies (footprint h0 k) h0 h1)) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 40,
"end_line": 173,
"start_col": 0,
"start_line": 167
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Hacl.Bignum.MontArithmetic.freeable",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx_inv",
"LowStar.Monotonic.Buffer.modifies",
"Hacl.Bignum.MontArithmetic.footprint... | [] | false | false | false | true | true | let bn_field_free_st (t: limb_t) =
| k: pbn_mont_ctx t
-> ST unit
(requires fun h -> freeable h k /\ pbn_mont_ctx_inv h k)
(ensures fun h0 _ h1 -> let open B in modifies (footprint h0 k) h0 h1) | false | |
Hacl.K256.PrecompTable.fst | Hacl.K256.PrecompTable.precomp_basepoint_table_w4 | val precomp_basepoint_table_w4:
x:glbuffer uint64 240ul{witnessed x precomp_basepoint_table_lseq_w4 /\ recallable x} | val precomp_basepoint_table_w4:
x:glbuffer uint64 240ul{witnessed x precomp_basepoint_table_lseq_w4 /\ recallable x} | let precomp_basepoint_table_w4:
x:glbuffer uint64 240ul{witnessed x precomp_basepoint_table_lseq_w4 /\ recallable x} =
createL_global precomp_basepoint_table_list_w4 | {
"file_name": "code/k256/Hacl.K256.PrecompTable.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 48,
"end_line": 213,
"start_col": 0,
"start_line": 211
} | module Hacl.K256.PrecompTable
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module LE = Lib.Exponentiation
module SE = Spec.Exponentiation
module SPT = Hacl.Spec.PrecompBaseTable
module SPT256 = Hacl.Spec.Pr... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.Lemmas.fsti.checked",
"Spec.K256.fst.checked",
"Spec.Exponentiation.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hac... | [
{
"abbrev": true,
"full_module": "Spec.K256.Lemmas",
"short_module": "SL"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.PrecompTable",
"short_module": "SPTK"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.PrecompBaseTable256",
"short_module": "SPT256"
},
{
"... | {
"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 | x:
Lib.Buffer.glbuffer Lib.IntTypes.uint64 240ul
{ Lib.Buffer.witnessed x Hacl.K256.PrecompTable.precomp_basepoint_table_lseq_w4 /\
Lib.Buffer.recallable x } | Prims.Tot | [
"total"
] | [] | [
"Lib.Buffer.createL_global",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Hacl.K256.PrecompTable.precomp_basepoint_table_list_w4",
"Lib.Buffer.glbuffer",
"Lib.IntTypes.size",
"FStar.Pervasives.normalize_term",
"Lib.IntTypes.size_nat",
"FStar.List.Tot.Base.length",
"Lib.IntTypes... | [] | false | false | false | false | false | let precomp_basepoint_table_w4:x:
glbuffer uint64 240ul {witnessed x precomp_basepoint_table_lseq_w4 /\ recallable x} =
| createL_global precomp_basepoint_table_list_w4 | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.ll | val ll : t: Hacl.Bignum.Definitions.limb_t -> Type0 | let ll (t:limb_t) =
match t with
| U32 -> uint32
| U64 -> uint64 | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 17,
"end_line": 36,
"start_col": 0,
"start_line": 33
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.uint32",
"Lib.IntTypes.uint64"
] | [] | false | false | false | true | true | let ll (t: limb_t) =
| match t with
| U32 -> uint32
| U64 -> uint64 | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_mont_ctx_inv | val bn_mont_ctx_inv : h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.bn_mont_ctx t -> Prims.logical | let bn_mont_ctx_inv (#t:limb_t) (h:mem) (k:bn_mont_ctx t) =
let n : buffer (limb t) = k.n in
let r2 : buffer (limb t) = k.r2 in
live h n /\ live h r2 /\ disjoint n r2 /\
S.bn_mont_ctx_inv (as_ctx h k) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 74,
"start_col": 0,
"start_line": 70
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.bn_mont_ctx t -> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx",
"Prims.l_and",
"Lib.Buffer.live",
"Lib.Buffer.MUT",
"Hacl.Bignum.Definitions.limb",
"Lib.Buffer.disjoint",
"Hacl.Spec.Bignum.MontArithmetic.bn_mont_ctx_inv",
"Hacl.Bignum.MontArithmetic.as... | [] | false | false | false | false | true | let bn_mont_ctx_inv (#t: limb_t) (h: mem) (k: bn_mont_ctx t) =
| let n:buffer (limb t) = k.n in
let r2:buffer (limb t) = k.r2 in
live h n /\ live h r2 /\ disjoint n r2 /\ S.bn_mont_ctx_inv (as_ctx h k) | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.lb | val lb : t: Hacl.Bignum.Definitions.limb_t -> Type0 | let lb (t:limb_t) =
match t with
| U32 -> buffer uint32
| U64 -> buffer uint64 | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 24,
"end_line": 30,
"start_col": 0,
"start_line": 27
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.Buffer.buffer",
"Lib.IntTypes.uint32",
"Lib.IntTypes.uint64"
] | [] | false | false | false | true | true | let lb (t: limb_t) =
| match t with
| U32 -> buffer uint32
| U64 -> buffer uint64 | false | |
Hacl.Impl.Frodo.Encode.fst | Hacl.Impl.Frodo.Encode.frodo_key_decode | val frodo_key_decode:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b < v logq}
-> n:size_t{v n == 8}
-> a:matrix_t n n
-> res:lbytes (n *! n *! b /. size 8)
-> Stack unit
(requires fun h ->
live h a /\ live h res /\ disjoint a res /\
as_seq h res == LSeq.cre... | val frodo_key_decode:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b < v logq}
-> n:size_t{v n == 8}
-> a:matrix_t n n
-> res:lbytes (n *! n *! b /. size 8)
-> Stack unit
(requires fun h ->
live h a /\ live h res /\ disjoint a res /\
as_seq h res == LSeq.cre... | let frodo_key_decode logq b n a res =
[@ inline_let]
let spec h0 = S.frodo_key_decode2 (v logq) (v b) (v n) (as_seq h0 a) in
let h0 = ST.get() in
loop1 h0 n res spec
(fun i ->
Loops.unfold_repeati (v n) (spec h0) (as_seq h0 res) (v i);
let templong = frodo_key_decode2 logq b n a i in
frodo_key_dec... | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Encode.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 217,
"start_col": 0,
"start_line": 208
} | module Hacl.Impl.Frodo.Encode
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
module S = Spec.Frodo.Encode
... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Encode.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Encode",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_m... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq <= 16} ->
b:
Lib.IntTypes.size_t
{0 < Lib.IntTypes.v b /\ Lib.IntTypes.v b <= 8 /\ Lib.IntTypes.v b < Lib.IntTypes.v logq} ->
n: Lib.IntTypes.size_t{Lib.IntTypes.v n == 8} ->
a: Hacl.Impl.Matrix.matrix_t n n ->
r... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"Prims.eq2",
"Prims.int",
"Hacl.Impl.Matrix.matrix_t",
"Hacl.Impl.Matrix.lbytes",
"Lib.IntTypes.op_Slash_Dot",
"Lib.IntTypes.op_Star... | [] | false | true | false | false | false | let frodo_key_decode logq b n a res =
| [@@ inline_let ]let spec h0 = S.frodo_key_decode2 (v logq) (v b) (v n) (as_seq h0 a) in
let h0 = ST.get () in
loop1 h0
n
res
spec
(fun i ->
Loops.unfold_repeati (v n) (spec h0) (as_seq h0 res) (v i);
let templong = frodo_key_decode2 logq b n a i in
frodo_key_decode1 logq b n i templong res) | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.from_mont | val from_mont: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> aM:nat -> nat | val from_mont: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> aM:nat -> nat | let from_mont pbits rLen n mu aM =
mont_reduction pbits rLen n mu aM | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 35,
"end_line": 225,
"start_col": 0,
"start_line": 224
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> rLen: Prims.nat -> n: Prims.pos -> mu: Prims.nat -> aM: Prims.nat -> Prims.nat | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.nat",
"Hacl.Spec.Montgomery.Lemmas.mont_reduction"
] | [] | false | false | false | true | false | let from_mont pbits rLen n mu aM =
| mont_reduction pbits rLen n mu aM | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_sqr | val mont_sqr: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> a:nat -> nat | val mont_sqr: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> a:nat -> nat | let mont_sqr pbits rLen n mu a =
mont_mul pbits rLen n mu a a | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 234,
"start_col": 0,
"start_line": 233
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> rLen: Prims.nat -> n: Prims.pos -> mu: Prims.nat -> a: Prims.nat -> Prims.nat | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.nat",
"Hacl.Spec.Montgomery.Lemmas.mont_mul"
] | [] | false | false | false | true | false | let mont_sqr pbits rLen n mu a =
| mont_mul pbits rLen n mu a a | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_v_n | val bn_v_n : h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.pbn_mont_ctx t
-> Prims.GTot Prims.nat | let bn_v_n (#t:limb_t) (h:mem) (k:pbn_mont_ctx t) =
let k1 = B.deref h k in
let n : lbignum t k1.len = k1.n in
bn_v h n | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 81,
"start_col": 0,
"start_line": 78
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.pbn_mont_ctx t
-> Prims.GTot Prims.nat | Prims.GTot | [
"sometrivial"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Hacl.Bignum.Definitions.bn_v",
"Hacl.Bignum.MontArithmetic.__proj__Mkbn_mont_ctx'__item__len",
"Hacl.Bignum.MontArithmetic.lb",
"Hacl.Bignum.MontArithmetic.ll",
"Hacl.Bignum.Definitions.lbig... | [] | false | false | false | false | false | let bn_v_n (#t: limb_t) (h: mem) (k: pbn_mont_ctx t) =
| let k1 = B.deref h k in
let n:lbignum t k1.len = k1.n in
bn_v h n | false | |
Hacl.Impl.P256.Verify.fst | Hacl.Impl.P256.Verify.lbytes | val lbytes : len: Lib.IntTypes.size_t -> Type0 | let lbytes len = lbuffer uint8 len | {
"file_name": "code/ecdsap256/Hacl.Impl.P256.Verify.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 26,
"start_col": 0,
"start_line": 26
} | module Hacl.Impl.P256.Verify
open FStar.Mul
open FStar.HyperStack.All
open FStar.HyperStack
module ST = FStar.HyperStack.ST
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.P256.Bignum
open Hacl.Impl.P256.Point
open Hacl.Impl.P256.Scalar
open Hacl.Impl.P256.PointMul
module BSeq = Lib.ByteSequence
module S = Spec.P... | {
"checked_file": "/",
"dependencies": [
"Spec.P256.Lemmas.fsti.checked",
"Spec.P256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.P256.Montgomery.fsti.checked",
"Hacl.Impl.P256.Scalar.fsti.check... | [
{
"abbrev": true,
"full_module": "Hacl.Impl.P256.Qinv",
"short_module": "QI"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.P256.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Spec.P256.Lemmas",
"short_module": "SL"
},
{
"abbrev": true,
... | {
"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_t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8"
] | [] | false | false | false | true | true | let lbytes len =
| lbuffer uint8 len | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.as_ctx | val as_ctx (#t: limb_t) (h: mem) (k: bn_mont_ctx t) : GTot (S.bn_mont_ctx t) | val as_ctx (#t: limb_t) (h: mem) (k: bn_mont_ctx t) : GTot (S.bn_mont_ctx t) | let as_ctx (#t:limb_t) (h:mem) (k:bn_mont_ctx t) : GTot (S.bn_mont_ctx t) = {
S.len = v k.len;
S.n = as_seq h (k.n <: lbignum t k.len);
S.mu = k.mu;
S.r2 = as_seq h (k.r2 <: lbignum t k.len);
} | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 67,
"start_col": 0,
"start_line": 62
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.bn_mont_ctx t
-> Prims.GTot (Hacl.Spec.Bignum.MontArithmetic.bn_mont_ctx t) | Prims.GTot | [
"sometrivial"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx",
"Hacl.Spec.Bignum.MontArithmetic.Mkbn_mont_ctx",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.MontArithmetic.__proj__Mkbn_mont_ctx'__item__len",
"Hacl.Bignum.MontAr... | [] | false | false | false | false | false | let as_ctx (#t: limb_t) (h: mem) (k: bn_mont_ctx t) : GTot (S.bn_mont_ctx t) =
| {
S.len = v k.len;
S.n = as_seq h (k.n <: lbignum t k.len);
S.mu = k.mu;
S.r2 = as_seq h (k.r2 <: lbignum t k.len)
} | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.footprint_s | val footprint_s : h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.bn_mont_ctx t
-> Prims.GTot LowStar.Monotonic.Buffer.loc | let footprint_s (#t:limb_t) (h:mem) (k:bn_mont_ctx t) =
let n : buffer (limb t) = k.n in
let r2 : buffer (limb t) = k.r2 in
B.(loc_union (loc_addr_of_buffer n) (loc_addr_of_buffer r2)) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 62,
"end_line": 97,
"start_col": 0,
"start_line": 94
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.bn_mont_ctx t
-> Prims.GTot LowStar.Monotonic.Buffer.loc | Prims.GTot | [
"sometrivial"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx",
"LowStar.Monotonic.Buffer.loc_union",
"LowStar.Monotonic.Buffer.loc_addr_of_buffer",
"Hacl.Bignum.Definitions.limb",
"LowStar.Buffer.trivial_preorder",
"Lib.Buffer.buffer_t",
"Lib.Buffer.MUT... | [] | false | false | false | false | false | let footprint_s (#t: limb_t) (h: mem) (k: bn_mont_ctx t) =
| let n:buffer (limb t) = k.n in
let r2:buffer (limb t) = k.r2 in
let open B in loc_union (loc_addr_of_buffer n) (loc_addr_of_buffer r2) | false | |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.eea_pow2_odd_k_lemma_d | val eea_pow2_odd_k_lemma_d: a:pos -> n:pos -> k1:pos -> Lemma
(requires n * k1 % pow2 (a - 1) == 1 /\ n % 2 = 1)
(ensures (let d = n * k1 / pow2 (a - 1) in
d % 2 == (if n * k1 % pow2 a < pow2 (a - 1) then 0 else 1))) | val eea_pow2_odd_k_lemma_d: a:pos -> n:pos -> k1:pos -> Lemma
(requires n * k1 % pow2 (a - 1) == 1 /\ n % 2 = 1)
(ensures (let d = n * k1 / pow2 (a - 1) in
d % 2 == (if n * k1 % pow2 a < pow2 (a - 1) then 0 else 1))) | let eea_pow2_odd_k_lemma_d a n k1 =
let d = n * k1 / pow2 (a - 1) in
Math.Lemmas.pow2_modulo_division_lemma_1 (n * k1) (a - 1) a;
assert (d % 2 == n * k1 % pow2 a / pow2 (a - 1));
if d % 2 = 0 then begin
Math.Lemmas.small_division_lemma_2 (n * k1 % pow2 a) (pow2 (a - 1));
assert (n * k1 % pow2 a < pow2 ... | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 28,
"start_col": 0,
"start_line": 21
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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: Prims.pos -> n: Prims.pos -> k1: Prims.pos
-> FStar.Pervasives.Lemma (requires n * k1 % Prims.pow2 (a - 1) == 1 /\ n % 2 = 1)
(ensures
(let d = n * k1 / Prims.pow2 (a - 1) in
d % 2 ==
(match n * k1 % Prims.pow2 a < Prims.pow2 (a - 1) with
| true -> 0
| _ ->... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Modulus",
"Prims.unit",
"Prims._assert",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Subtraction",
"FStar.Math.Lemmas.small_division_lemma_2",
"Prims.bool",
"Prims.eq2",
"Prims.op_Division",
"FS... | [] | false | false | true | false | false | let eea_pow2_odd_k_lemma_d a n k1 =
| let d = n * k1 / pow2 (a - 1) in
Math.Lemmas.pow2_modulo_division_lemma_1 (n * k1) (a - 1) a;
assert (d % 2 == n * k1 % pow2 a / pow2 (a - 1));
if d % 2 = 0
then
(Math.Lemmas.small_division_lemma_2 (n * k1 % pow2 a) (pow2 (a - 1));
assert (n * k1 % pow2 a < pow2 (a - 1));
()) | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_reduction | val mont_reduction: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> c:nat -> nat | val mont_reduction: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> c:nat -> nat | let mont_reduction pbits rLen n mu c =
let res = mont_reduction_loop_div_r pbits rLen n mu c in
if res < n then res else res - n | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 215,
"start_col": 0,
"start_line": 213
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> rLen: Prims.nat -> n: Prims.pos -> mu: Prims.nat -> c: Prims.nat -> Prims.nat | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.op_LessThan",
"Prims.bool",
"Prims.op_Subtraction",
"Hacl.Spec.Montgomery.Lemmas.mont_reduction_loop_div_r"
] | [] | false | false | false | true | false | let mont_reduction pbits rLen n mu c =
| let res = mont_reduction_loop_div_r pbits rLen n mu c in
if res < n then res else res - n | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.to_mont | val to_mont: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> a:nat -> nat | val to_mont: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> a:nat -> nat | let to_mont pbits rLen n mu a =
let r2 = pow2 (2 * pbits * rLen) % n in
let c = a * r2 in
mont_reduction pbits rLen n mu c | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 221,
"start_col": 0,
"start_line": 218
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> rLen: Prims.nat -> n: Prims.pos -> mu: Prims.nat -> a: Prims.nat -> Prims.nat | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.nat",
"Hacl.Spec.Montgomery.Lemmas.mont_reduction",
"Prims.int",
"FStar.Mul.op_Star",
"Prims.op_Modulus",
"Prims.pow2"
] | [] | false | false | false | true | false | let to_mont pbits rLen n mu a =
| let r2 = pow2 ((2 * pbits) * rLen) % n in
let c = a * r2 in
mont_reduction pbits rLen n mu c | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_to_field_st | val bn_to_field_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | let bn_to_field_st (t:limb_t) (len:BN.meta_len t) =
k:pbn_mont_ctx t
-> a:lbignum t len
-> aM:lbignum t len ->
Stack unit
(requires fun h ->
(B.deref h k).len == len /\
pbn_mont_ctx_inv h k /\
live h a /\ live h aM /\ disjoint a aM /\
B.(loc_disjoint (footprint h k) (loc_buffer (a <: buffer... | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 63,
"end_line": 195,
"start_col": 0,
"start_line": 181
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Hacl.Bignum.Definitions.lbignum",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.eq2",
"Hacl.Bignum.MontArithmetic.__proj__Mkbn_mont_ctx'__item__len",
"Hacl.Bignum.MontArith... | [] | false | false | false | false | true | let bn_to_field_st (t: limb_t) (len: BN.meta_len t) =
| k: pbn_mont_ctx t -> a: lbignum t len -> aM: lbignum t len
-> Stack unit
(requires
fun h ->
(B.deref h k).len == len /\ pbn_mont_ctx_inv h k /\ live h a /\ live h aM /\ disjoint a aM /\
B.(loc_disjoint (footprint h k) (loc_buffer (a <: buffer (limb t)))) /\
B.(loc_disjoint ... | false | |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.eea_pow2_odd_k_lemma_bound | val eea_pow2_odd_k_lemma_bound: a:pos -> n:pos -> k1:pos -> Lemma
(requires n * k1 % pow2 (a - 1) == 1 /\ n % 2 = 1 /\ k1 < pow2 (a - 1))
(ensures (let k = if n * k1 % pow2 a < pow2 (a - 1) then k1 else k1 + pow2 (a - 1) in
k < pow2 a)) | val eea_pow2_odd_k_lemma_bound: a:pos -> n:pos -> k1:pos -> Lemma
(requires n * k1 % pow2 (a - 1) == 1 /\ n % 2 = 1 /\ k1 < pow2 (a - 1))
(ensures (let k = if n * k1 % pow2 a < pow2 (a - 1) then k1 else k1 + pow2 (a - 1) in
k < pow2 a)) | let eea_pow2_odd_k_lemma_bound a n k1 =
if n * k1 % pow2 a < pow2 (a - 1) then
Math.Lemmas.pow2_lt_compat a (a - 1)
else
Math.Lemmas.pow2_double_sum (a - 1) | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 107,
"start_col": 0,
"start_line": 103
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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: Prims.pos -> n: Prims.pos -> k1: Prims.pos
-> FStar.Pervasives.Lemma
(requires n * k1 % Prims.pow2 (a - 1) == 1 /\ n % 2 = 1 /\ k1 < Prims.pow2 (a - 1))
(ensures
(let k =
(match n * k1 % Prims.pow2 a < Prims.pow2 (a - 1) with
| true -> k1
| _ -> k1 + Prim... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.op_LessThan",
"Prims.op_Modulus",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Subtraction",
"FStar.Math.Lemmas.pow2_lt_compat",
"Prims.bool",
"FStar.Math.Lemmas.pow2_double_sum",
"Prims.unit"
] | [] | false | false | true | false | false | let eea_pow2_odd_k_lemma_bound a n k1 =
| if n * k1 % pow2 a < pow2 (a - 1)
then Math.Lemmas.pow2_lt_compat a (a - 1)
else Math.Lemmas.pow2_double_sum (a - 1) | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.freeable_s | val freeable_s : h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.bn_mont_ctx t -> Prims.logical | let freeable_s (#t:limb_t) (h:mem) (k:bn_mont_ctx t) =
let n : buffer (limb t) = k.n in
let r2 : buffer (limb t) = k.r2 in
B.freeable n /\ B.freeable r2 | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 31,
"end_line": 87,
"start_col": 0,
"start_line": 84
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | h: FStar.Monotonic.HyperStack.mem -> k: Hacl.Bignum.MontArithmetic.bn_mont_ctx t -> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Bignum.MontArithmetic.bn_mont_ctx",
"Prims.l_and",
"LowStar.Monotonic.Buffer.freeable",
"Hacl.Bignum.Definitions.limb",
"LowStar.Buffer.trivial_preorder",
"Lib.Buffer.buffer_t",
"Lib.Buffer.MUT",
"Hacl.Bignum.MontArithmetic.... | [] | false | false | false | false | true | let freeable_s (#t: limb_t) (h: mem) (k: bn_mont_ctx t) =
| let n:buffer (limb t) = k.n in
let r2:buffer (limb t) = k.r2 in
B.freeable n /\ B.freeable r2 | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_field_sqr_st | val bn_field_sqr_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | let bn_field_sqr_st (t:limb_t) (len:BN.meta_len t) =
k:pbn_mont_ctx t
-> aM:lbignum t len
-> cM:lbignum t len ->
Stack unit
(requires fun h ->
(B.deref h k).len == len /\
pbn_mont_ctx_inv h k /\
bn_v h aM < bn_v_n h k /\
live h aM /\ live h cM /\ eq_or_disjoint aM cM /\
B.(loc_disjoint ... | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 65,
"end_line": 321,
"start_col": 0,
"start_line": 306
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Hacl.Bignum.Definitions.lbignum",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.eq2",
"Hacl.Bignum.MontArithmetic.__proj__Mkbn_mont_ctx'__item__len",
"Hacl.Bignum.MontArith... | [] | false | false | false | false | true | let bn_field_sqr_st (t: limb_t) (len: BN.meta_len t) =
| k: pbn_mont_ctx t -> aM: lbignum t len -> cM: lbignum t len
-> Stack unit
(requires
fun h ->
(B.deref h k).len == len /\ pbn_mont_ctx_inv h k /\ bn_v h aM < bn_v_n h k /\ live h aM /\
live h cM /\ eq_or_disjoint aM cM /\
B.(loc_disjoint (footprint h k) (loc_buffer (aM <: bu... | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_field_add_st | val bn_field_add_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | let bn_field_add_st (t:limb_t) (len:BN.meta_len t) =
k:pbn_mont_ctx t
-> aM:lbignum t len
-> bM:lbignum t len
-> cM:lbignum t len ->
Stack unit
(requires fun h ->
(B.deref h k).len == len /\
pbn_mont_ctx_inv h k /\
bn_v h aM < bn_v_n h k /\
bn_v h bM < bn_v_n h k /\
live h aM /\ live ... | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 80,
"end_line": 244,
"start_col": 0,
"start_line": 225
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Hacl.Bignum.Definitions.lbignum",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.eq2",
"Hacl.Bignum.MontArithmetic.__proj__Mkbn_mont_ctx'__item__len",
"Hacl.Bignum.MontArith... | [] | false | false | false | false | true | let bn_field_add_st (t: limb_t) (len: BN.meta_len t) =
| k: pbn_mont_ctx t -> aM: lbignum t len -> bM: lbignum t len -> cM: lbignum t len
-> Stack unit
(requires
fun h ->
(B.deref h k).len == len /\ pbn_mont_ctx_inv h k /\ bn_v h aM < bn_v_n h k /\
bn_v h bM < bn_v_n h k /\ live h aM /\ live h bM /\ live h cM /\ eq_or_disjoint aM bM /\
... | false | |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_preconditions_n0 | val mont_preconditions_n0: pbits:pos -> n:pos{n > 1} -> mu:nat -> Lemma
(requires (1 + (n % pow2 pbits) * mu) % pow2 pbits == 0)
(ensures (1 + n * mu) % pow2 pbits == 0) | val mont_preconditions_n0: pbits:pos -> n:pos{n > 1} -> mu:nat -> Lemma
(requires (1 + (n % pow2 pbits) * mu) % pow2 pbits == 0)
(ensures (1 + n * mu) % pow2 pbits == 0) | let mont_preconditions_n0 pbits n mu =
calc (==) {
(1 + n * mu) % pow2 pbits;
(==) { Math.Lemmas.lemma_mod_plus_distr_r 1 (n * mu) (pow2 pbits) }
(1 + n * mu % pow2 pbits) % pow2 pbits;
(==) { Math.Lemmas.lemma_mod_mul_distr_l n mu (pow2 pbits) }
(1 + n % pow2 pbits * mu % pow2 pbits) % pow2 pbits... | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 41,
"end_line": 181,
"start_col": 0,
"start_line": 169
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> n: Prims.pos{n > 1} -> mu: Prims.nat
-> FStar.Pervasives.Lemma (requires (1 + (n % Prims.pow2 pbits) * mu) % Prims.pow2 pbits == 0)
(ensures (1 + n * mu) % Prims.pow2 pbits == 0) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.nat",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Modulus",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.unit",
"FStar.Calc.calc_finish",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"FStar.C... | [] | false | false | true | false | false | let mont_preconditions_n0 pbits n mu =
| calc ( == ) {
(1 + n * mu) % pow2 pbits;
( == ) { Math.Lemmas.lemma_mod_plus_distr_r 1 (n * mu) (pow2 pbits) }
(1 + n * mu % pow2 pbits) % pow2 pbits;
( == ) { Math.Lemmas.lemma_mod_mul_distr_l n mu (pow2 pbits) }
(1 + (n % pow2 pbits) * mu % pow2 pbits) % pow2 pbits;
( == ) { Math.Lemmas.lemma_mod_plus_dis... | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_one | val mont_one: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> nat | val mont_one: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> nat | let mont_one pbits rLen n mu =
let r2 = pow2 (2 * pbits * rLen) % n in
mont_reduction pbits rLen n mu r2 | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 35,
"end_line": 239,
"start_col": 0,
"start_line": 237
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> rLen: Prims.nat -> n: Prims.pos -> mu: Prims.nat -> Prims.nat | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.nat",
"Hacl.Spec.Montgomery.Lemmas.mont_reduction",
"Prims.int",
"Prims.op_Modulus",
"Prims.pow2",
"FStar.Mul.op_Star"
] | [] | false | false | false | true | false | let mont_one pbits rLen n mu =
| let r2 = pow2 ((2 * pbits) * rLen) % n in
mont_reduction pbits rLen n mu r2 | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_field_init_st | val bn_field_init_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | let bn_field_init_st (t:limb_t) (len:BN.meta_len t) =
r:HS.rid
-> n:lbignum t len ->
ST (pbn_mont_ctx t)
(requires fun h ->
S.bn_mont_ctx_pre (as_seq h n) /\
live h n /\ ST.is_eternal_region r)
(ensures fun h0 res h1 ->
B.(modifies loc_none h0 h1) /\
B.(fresh_loc (footprint h1 res) h0 h1) ... | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 52,
"end_line": 155,
"start_col": 0,
"start_line": 140
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"FStar.Monotonic.HyperHeap.rid",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Hacl.Spec.Bignum.MontArithmetic.bn_mont_ctx_pre",
"Lib.IntTypes.v",
"Lib.IntTyp... | [] | false | false | false | false | true | let bn_field_init_st (t: limb_t) (len: BN.meta_len t) =
| r: HS.rid -> n: lbignum t len
-> ST (pbn_mont_ctx t)
(requires fun h -> S.bn_mont_ctx_pre (as_seq h n) /\ live h n /\ ST.is_eternal_region r)
(ensures
fun h0 res h1 ->
B.(modifies loc_none h0 h1) /\ B.(fresh_loc (footprint h1 res) h0 h1) /\
B.(loc_includes (loc_region_only true... | false | |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_preconditions_d | val mont_preconditions_d: pbits:pos -> rLen:pos -> n:pos{1 < n} -> Lemma
(requires n % 2 = 1)
(ensures (let d, k = eea_pow2_odd (pbits * rLen) n in pow2 (pbits * rLen) * d % n == 1)) | val mont_preconditions_d: pbits:pos -> rLen:pos -> n:pos{1 < n} -> Lemma
(requires n % 2 = 1)
(ensures (let d, k = eea_pow2_odd (pbits * rLen) n in pow2 (pbits * rLen) * d % n == 1)) | let mont_preconditions_d pbits rLen n =
let d, k = eea_pow2_odd (pbits * rLen) n in
calc (==) {
pow2 (pbits * rLen) * d % n;
(==) { }
(1 + k * n) % n;
(==) { Math.Lemmas.modulo_addition_lemma 1 n k }
1 % n;
(==) { Math.Lemmas.small_mod 1 n }
1;
};
assert (pow2 (pbits * rLen) * d % n ... | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 43,
"end_line": 162,
"start_col": 0,
"start_line": 151
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> rLen: Prims.pos -> n: Prims.pos{1 < n}
-> FStar.Pervasives.Lemma (requires n % 2 = 1)
(ensures
(let _ = Hacl.Spec.Montgomery.Lemmas.eea_pow2_odd (pbits * rLen) n in
(let FStar.Pervasives.Native.Mktuple2 #_ #_ d _ = _ in
Prims.pow2 (pbits * rLen) * d % n == 1)
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.int",
"Prims._assert",
"Prims.eq2",
"Prims.op_Modulus",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.unit",
"FStar.Calc.calc_finish",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"FStar.Calc.calc_step",
"Prims.op_Addition",
... | [] | false | false | true | false | false | let mont_preconditions_d pbits rLen n =
| let d, k = eea_pow2_odd (pbits * rLen) n in
calc ( == ) {
pow2 (pbits * rLen) * d % n;
( == ) { () }
(1 + k * n) % n;
( == ) { Math.Lemmas.modulo_addition_lemma 1 n k }
1 % n;
( == ) { Math.Lemmas.small_mod 1 n }
1;
};
assert (pow2 (pbits * rLen) * d % n == 1) | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_preconditions | val mont_preconditions: pbits:pos -> rLen:pos -> n:pos{1 < n} -> mu:nat -> Lemma
(requires
n % 2 = 1 /\ (1 + (n % pow2 pbits) * mu) % pow2 pbits == 0)
(ensures
(let r = pow2 (pbits * rLen) in
let d, _ = eea_pow2_odd (pbits * rLen) n in
r * d % n == 1 /\ (1 + n * mu) % pow2 pbits == 0)) | val mont_preconditions: pbits:pos -> rLen:pos -> n:pos{1 < n} -> mu:nat -> Lemma
(requires
n % 2 = 1 /\ (1 + (n % pow2 pbits) * mu) % pow2 pbits == 0)
(ensures
(let r = pow2 (pbits * rLen) in
let d, _ = eea_pow2_odd (pbits * rLen) n in
r * d % n == 1 /\ (1 + n * mu) % pow2 pbits == 0)) | let mont_preconditions pbits rLen n mu =
mont_preconditions_d pbits rLen n;
mont_preconditions_n0 pbits n mu | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 194,
"start_col": 0,
"start_line": 192
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> rLen: Prims.pos -> n: Prims.pos{1 < n} -> mu: Prims.nat
-> FStar.Pervasives.Lemma
(requires n % 2 = 1 /\ (1 + (n % Prims.pow2 pbits) * mu) % Prims.pow2 pbits == 0)
(ensures
(let r = Prims.pow2 (pbits * rLen) in
let _ = Hacl.Spec.Montgomery.Lemmas.eea_pow2_odd (pbits *... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.nat",
"Hacl.Spec.Montgomery.Lemmas.mont_preconditions_n0",
"Prims.unit",
"Hacl.Spec.Montgomery.Lemmas.mont_preconditions_d"
] | [] | true | false | true | false | false | let mont_preconditions pbits rLen n mu =
| mont_preconditions_d pbits rLen n;
mont_preconditions_n0 pbits n mu | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_reduction_f | val mont_reduction_f: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> i:nat{i < rLen} -> c:nat -> nat | val mont_reduction_f: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> i:nat{i < rLen} -> c:nat -> nat | let mont_reduction_f pbits rLen n mu i c =
let c_i = c / pow2 (pbits * i) % pow2 pbits in
let q_i = mu * c_i % pow2 pbits in
let res = c + n * q_i * pow2 (pbits * i) in
res | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 204,
"start_col": 0,
"start_line": 200
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 |
pbits: Prims.pos ->
rLen: Prims.nat ->
n: Prims.pos ->
mu: Prims.nat ->
i: Prims.nat{i < rLen} ->
c: Prims.nat
-> Prims.nat | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.int",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Modulus",
"Prims.op_Division"
] | [] | false | false | false | false | false | let mont_reduction_f pbits rLen n mu i c =
| let c_i = c / pow2 (pbits * i) % pow2 pbits in
let q_i = mu * c_i % pow2 pbits in
let res = c + (n * q_i) * pow2 (pbits * i) in
res | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_field_get_len_st | val bn_field_get_len_st : t: Hacl.Bignum.Definitions.limb_t -> Type0 | let bn_field_get_len_st (t:limb_t) = k:pbn_mont_ctx t ->
Stack (BN.meta_len t)
(requires fun h -> pbn_mont_ctx_inv h k)
(ensures fun h0 r h1 -> h0 == h1 /\
r == (B.deref h0 k).len /\
v r == S.bn_field_get_len (as_pctx h0 k)) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 45,
"end_line": 120,
"start_col": 0,
"start_line": 115
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Hacl.Bignum.meta_len",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx_inv",
"Prims.l_and",
"Prims.eq2",
"Hacl.Bignum.MontArithmetic.__proj__Mkbn_mont_ctx'__item__len",
"Hacl.Bignum.MontArithmeti... | [] | false | false | false | true | true | let bn_field_get_len_st (t: limb_t) =
| k: pbn_mont_ctx t
-> Stack (BN.meta_len t)
(requires fun h -> pbn_mont_ctx_inv h k)
(ensures
fun h0 r h1 ->
h0 == h1 /\ r == (B.deref h0 k).len /\ v r == S.bn_field_get_len (as_pctx h0 k)) | false | |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_reduction_loop_div_r | val mont_reduction_loop_div_r: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> c:nat -> nat | val mont_reduction_loop_div_r: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> c:nat -> nat | let mont_reduction_loop_div_r pbits rLen n mu c =
let res = repeati rLen (mont_reduction_f pbits rLen n mu) c in
let res = res / pow2 (pbits * rLen) in
res | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 210,
"start_col": 0,
"start_line": 207
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> rLen: Prims.nat -> n: Prims.pos -> mu: Prims.nat -> c: Prims.nat -> Prims.nat | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.int",
"Prims.op_Division",
"Prims.pow2",
"FStar.Mul.op_Star",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Lib.LoopCombinators.repeati",
"Hacl.Spec.Montgomery.Lemmas.mont_reduction_f"
] | [] | false | false | false | true | false | let mont_reduction_loop_div_r pbits rLen n mu c =
| let res = repeati rLen (mont_reduction_f pbits rLen n mu) c in
let res = res / pow2 (pbits * rLen) in
res | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_mul | val mont_mul: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> a:nat -> b:nat -> nat | val mont_mul: pbits:pos -> rLen:nat -> n:pos -> mu:nat -> a:nat -> b:nat -> nat | let mont_mul pbits rLen n mu a b =
let c = a * b in
mont_reduction pbits rLen n mu c | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 230,
"start_col": 0,
"start_line": 228
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> rLen: Prims.nat -> n: Prims.pos -> mu: Prims.nat -> a: Prims.nat -> b: Prims.nat
-> Prims.nat | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.nat",
"Hacl.Spec.Montgomery.Lemmas.mont_reduction",
"Prims.int",
"FStar.Mul.op_Star"
] | [] | false | false | false | true | false | let mont_mul pbits rLen n mu a b =
| let c = a * b in
mont_reduction pbits rLen n mu c | false |
Hacl.Impl.Frodo.Encode.fst | Hacl.Impl.Frodo.Encode.frodo_key_decode1 | val frodo_key_decode1:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b < v logq}
-> n:size_t{v n == 8}
-> i:size_t{v i < v n}
-> templong:uint64
-> res:lbytes (n *! n *! b /. size 8)
-> Stack unit
(requires fun h -> live h res)
(ensures fun h0 _ h1 -> modifies1 res... | val frodo_key_decode1:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b < v logq}
-> n:size_t{v n == 8}
-> i:size_t{v i < v n}
-> templong:uint64
-> res:lbytes (n *! n *! b /. size 8)
-> Stack unit
(requires fun h -> live h res)
(ensures fun h0 _ h1 -> modifies1 res... | let frodo_key_decode1 logq b n i templong res =
push_frame();
let v8 = create (size 8) (u8 0) in
uint_to_bytes_le v8 templong;
let tmp = sub v8 (size 0) b in
update_sub res (i *! b) b tmp;
pop_frame() | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Encode.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 13,
"end_line": 156,
"start_col": 0,
"start_line": 150
} | module Hacl.Impl.Frodo.Encode
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
module S = Spec.Frodo.Encode
... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Encode.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Encode",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_m... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq <= 16} ->
b:
Lib.IntTypes.size_t
{0 < Lib.IntTypes.v b /\ Lib.IntTypes.v b <= 8 /\ Lib.IntTypes.v b < Lib.IntTypes.v logq} ->
n: Lib.IntTypes.size_t{Lib.IntTypes.v n == 8} ->
i: Lib.IntTypes.size_t{Lib.IntTypes.v i <... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.uint64",
"Hacl.Impl.Matrix.lbytes",
"Lib.IntTypes.op_Slash_Dot",
"Lib.IntTypes.op_Star_Bang"... | [] | false | true | false | false | false | let frodo_key_decode1 logq b n i templong res =
| push_frame ();
let v8 = create (size 8) (u8 0) in
uint_to_bytes_le v8 templong;
let tmp = sub v8 (size 0) b in
update_sub res (i *! b) b tmp;
pop_frame () | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_from_field_st | val bn_from_field_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | let bn_from_field_st (t:limb_t) (len:BN.meta_len t) =
k:pbn_mont_ctx t
-> aM:lbignum t len
-> a:lbignum t len ->
Stack unit
(requires fun h ->
(B.deref h k).len == len /\
pbn_mont_ctx_inv h k /\ bn_v h aM < bn_v_n h k /\
live h a /\ live h aM /\ disjoint a aM /\
B.(loc_disjoint (footprint h... | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 65,
"end_line": 217,
"start_col": 0,
"start_line": 203
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Hacl.Bignum.Definitions.lbignum",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.eq2",
"Hacl.Bignum.MontArithmetic.__proj__Mkbn_mont_ctx'__item__len",
"Hacl.Bignum.MontArith... | [] | false | false | false | false | true | let bn_from_field_st (t: limb_t) (len: BN.meta_len t) =
| k: pbn_mont_ctx t -> aM: lbignum t len -> a: lbignum t len
-> Stack unit
(requires
fun h ->
(B.deref h k).len == len /\ pbn_mont_ctx_inv h k /\ bn_v h aM < bn_v_n h k /\ live h a /\
live h aM /\ disjoint a aM /\
B.(loc_disjoint (footprint h k) (loc_buffer (a <: buffer (limb... | false | |
Hacl.Impl.Frodo.Encode.fst | Hacl.Impl.Frodo.Encode.frodo_key_decode2 | val frodo_key_decode2:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b < v logq}
-> n:size_t{v n == 8}
-> a:matrix_t n n
-> i:size_t{v i < v n}
-> Stack uint64
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == Loops.repeat_gen 8 S.dec... | val frodo_key_decode2:
logq:size_t{0 < v logq /\ v logq <= 16}
-> b:size_t{0 < v b /\ v b <= 8 /\ v b < v logq}
-> n:size_t{v n == 8}
-> a:matrix_t n n
-> i:size_t{v i < v n}
-> Stack uint64
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == Loops.repeat_gen 8 S.dec... | let frodo_key_decode2 logq b n a i =
push_frame();
let templong = create (size 1) (u64 0) in
[@ inline_let]
let refl h i : GTot uint64 = bget h templong 0 in
[@ inline_let]
let footprint i = loc templong in
[@ inline_let]
let spec h0 = S.frodo_key_decode0 (v logq) (v b) (v n) (as_matrix h0 a) (v i) in
... | {
"file_name": "code/frodo/Hacl.Impl.Frodo.Encode.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 191,
"start_col": 0,
"start_line": 172
} | module Hacl.Impl.Frodo.Encode
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.Matrix
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
module LSeq = Lib.Sequence
module S = Spec.Frodo.Encode
... | {
"checked_file": "/",
"dependencies": [
"Spec.Matrix.fst.checked",
"Spec.Frodo.Lemmas.fst.checked",
"Spec.Frodo.Encode.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"... | [
{
"abbrev": true,
"full_module": "Spec.Frodo.Encode",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_m... | {
"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 |
logq: Lib.IntTypes.size_t{0 < Lib.IntTypes.v logq /\ Lib.IntTypes.v logq <= 16} ->
b:
Lib.IntTypes.size_t
{0 < Lib.IntTypes.v b /\ Lib.IntTypes.v b <= 8 /\ Lib.IntTypes.v b < Lib.IntTypes.v logq} ->
n: Lib.IntTypes.size_t{Lib.IntTypes.v n == 8} ->
a: Hacl.Impl.Matrix.matrix_t n n ->
i... | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"Prims.eq2",
"Prims.int",
"Hacl.Impl.Matrix.matrix_t",
"Lib.IntTypes.uint64",
"Prims.unit",
"FStar.HyperStack.ST.pop_frame",
"Lib.... | [] | false | true | false | false | false | let frodo_key_decode2 logq b n a i =
| push_frame ();
let templong = create (size 1) (u64 0) in
[@@ inline_let ]let refl h i : GTot uint64 = bget h templong 0 in
[@@ inline_let ]let footprint i = loc templong in
[@@ inline_let ]let spec h0 = S.frodo_key_decode0 (v logq) (v b) (v n) (as_matrix h0 a) (v i) in
let h0 = ST.get () in
assert (bget h0 templong 0 =... | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_field_sub_st | val bn_field_sub_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | let bn_field_sub_st (t:limb_t) (len:BN.meta_len t) =
k:pbn_mont_ctx t
-> aM:lbignum t len
-> bM:lbignum t len
-> cM:lbignum t len ->
Stack unit
(requires fun h ->
(B.deref h k).len == len /\
pbn_mont_ctx_inv h k /\
bn_v h aM < bn_v_n h k /\
bn_v h bM < bn_v_n h k /\
live h aM /\ live ... | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 80,
"end_line": 271,
"start_col": 0,
"start_line": 252
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Hacl.Bignum.Definitions.lbignum",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.eq2",
"Hacl.Bignum.MontArithmetic.__proj__Mkbn_mont_ctx'__item__len",
"Hacl.Bignum.MontArith... | [] | false | false | false | false | true | let bn_field_sub_st (t: limb_t) (len: BN.meta_len t) =
| k: pbn_mont_ctx t -> aM: lbignum t len -> bM: lbignum t len -> cM: lbignum t len
-> Stack unit
(requires
fun h ->
(B.deref h k).len == len /\ pbn_mont_ctx_inv h k /\ bn_v h aM < bn_v_n h k /\
bn_v h bM < bn_v_n h k /\ live h aM /\ live h bM /\ live h cM /\ eq_or_disjoint aM bM /\
... | false | |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.eea_pow2_odd_k | val eea_pow2_odd_k: a:pos -> n:pos ->
Pure pos
(requires n % 2 = 1)
(ensures fun k ->
n * k % pow2 a == 1 /\ k < pow2 a) | val eea_pow2_odd_k: a:pos -> n:pos ->
Pure pos
(requires n % 2 = 1)
(ensures fun k ->
n * k % pow2 a == 1 /\ k < pow2 a) | let rec eea_pow2_odd_k a n =
if a = 1 then 1
else begin
let k1 = eea_pow2_odd_k (a - 1) n in
assert (n * k1 % pow2 (a - 1) == 1);
let k = if n * k1 % pow2 a < pow2 (a - 1) then k1 else k1 + pow2 (a - 1) in
eea_pow2_odd_k_lemma a n k1;
eea_pow2_odd_k_lemma_bound a n k1;
assert (n * k % pow2 a... | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 9,
"end_line": 125,
"start_col": 0,
"start_line": 116
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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: Prims.pos -> n: Prims.pos -> Prims.Pure Prims.pos | Prims.Pure | [] | [] | [
"Prims.pos",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.op_Modulus",
"FStar.Mul.op_Star",
"Prims.pow2",
"Hacl.Spec.Montgomery.Lemmas.eea_pow2_odd_k_lemma_bound",
"Hacl.Spec.Montgomery.Lemmas.eea_pow2_odd_k_lemma",
"Prims.b2t",
"Prims.... | [
"recursion"
] | false | false | false | false | false | let rec eea_pow2_odd_k a n =
| if a = 1
then 1
else
let k1 = eea_pow2_odd_k (a - 1) n in
assert (n * k1 % pow2 (a - 1) == 1);
let k = if n * k1 % pow2 a < pow2 (a - 1) then k1 else k1 + pow2 (a - 1) in
eea_pow2_odd_k_lemma a n k1;
eea_pow2_odd_k_lemma_bound a n k1;
assert (n * k % pow2 a == 1);
k | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_reduction_lemma_step_modr | val mont_reduction_lemma_step_modr:
pbits:pos -> rLen:nat -> n:pos -> mu:nat -> i:pos{i <= rLen} -> res0:nat -> Lemma
(requires res0 % pow2 (pbits * (i - 1)) == 0 /\ (1 + n * mu) % pow2 pbits == 0)
(ensures mont_reduction_f pbits rLen n mu (i - 1) res0 % pow2 (pbits * i) == 0) | val mont_reduction_lemma_step_modr:
pbits:pos -> rLen:nat -> n:pos -> mu:nat -> i:pos{i <= rLen} -> res0:nat -> Lemma
(requires res0 % pow2 (pbits * (i - 1)) == 0 /\ (1 + n * mu) % pow2 pbits == 0)
(ensures mont_reduction_f pbits rLen n mu (i - 1) res0 % pow2 (pbits * i) == 0) | let mont_reduction_lemma_step_modr pbits rLen n mu i res0 =
let b1 = pow2 (pbits * (i - 1)) in
let res = mont_reduction_f pbits rLen n mu (i - 1) res0 in
let c_i = res0 / b1 % pow2 pbits in
let q_i = mu * c_i % pow2 pbits in
Math.Lemmas.lemma_div_exact res0 b1;
mont_reduction_lemma_step_modr_aux pbits n q_... | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 52,
"end_line": 351,
"start_col": 0,
"start_line": 343
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 |
pbits: Prims.pos ->
rLen: Prims.nat ->
n: Prims.pos ->
mu: Prims.nat ->
i: Prims.pos{i <= rLen} ->
res0: Prims.nat
-> FStar.Pervasives.Lemma
(requires res0 % Prims.pow2 (pbits * (i - 1)) == 0 /\ (1 + n * mu) % Prims.pow2 pbits == 0)
(ensures
Hacl.Spec.Montgomery.Lemmas.mon... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Hacl.Spec.Montgomery.Lemmas.mont_reduction_lemma_step_mod_pbits",
"Prims.unit",
"Hacl.Spec.Montgomery.Lemmas.mont_reduction_lemma_step_modr_aux",
"FStar.Math.Lemmas.lemma_div_exact",
"Prims.int",
"Prims.op_Modulus",
"FStar.Mul.o... | [] | true | false | true | false | false | let mont_reduction_lemma_step_modr pbits rLen n mu i res0 =
| let b1 = pow2 (pbits * (i - 1)) in
let res = mont_reduction_f pbits rLen n mu (i - 1) res0 in
let c_i = res0 / b1 % pow2 pbits in
let q_i = mu * c_i % pow2 pbits in
Math.Lemmas.lemma_div_exact res0 b1;
mont_reduction_lemma_step_modr_aux pbits n q_i i res0;
mont_reduction_lemma_step_mod_pbits pbits n mu c_i | false |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_field_check_modulus_st | val bn_field_check_modulus_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | let bn_field_check_modulus_st (t:limb_t) (len:BN.meta_len t) = n:lbignum t len ->
Stack bool
(requires fun h -> live h n)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_field_check_modulus (as_seq h0 n)) | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 48,
"end_line": 132,
"start_col": 0,
"start_line": 128
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Bignum.Definitions.lbignum",
"Prims.bool",
"FStar.Monotonic.HyperStack.mem",
"Lib.Buffer.live",
"Lib.Buffer.MUT",
"Hacl.Bignum.Definitions.limb",
"Prims.l_and",
"Lib.Buffer.modifies0",
"Prims.eq2",
"Hacl.Spec.Bignum.MontArithmetic... | [] | false | false | false | false | true | let bn_field_check_modulus_st (t: limb_t) (len: BN.meta_len t) =
| n: lbignum t len
-> Stack bool
(requires fun h -> live h n)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\ r == S.bn_field_check_modulus (as_seq h0 n)) | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_field_mul_st | val bn_field_mul_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | let bn_field_mul_st (t:limb_t) (len:BN.meta_len t) =
k:pbn_mont_ctx t
-> aM:lbignum t len
-> bM:lbignum t len
-> cM:lbignum t len ->
Stack unit
(requires fun h ->
(B.deref h k).len == len /\
pbn_mont_ctx_inv h k /\
bn_v h aM < bn_v_n h k /\
bn_v h bM < bn_v_n h k /\
live h aM /\ live ... | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 80,
"end_line": 298,
"start_col": 0,
"start_line": 279
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Hacl.Bignum.Definitions.lbignum",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.eq2",
"Hacl.Bignum.MontArithmetic.__proj__Mkbn_mont_ctx'__item__len",
"Hacl.Bignum.MontArith... | [] | false | false | false | false | true | let bn_field_mul_st (t: limb_t) (len: BN.meta_len t) =
| k: pbn_mont_ctx t -> aM: lbignum t len -> bM: lbignum t len -> cM: lbignum t len
-> Stack unit
(requires
fun h ->
(B.deref h k).len == len /\ pbn_mont_ctx_inv h k /\ bn_v h aM < bn_v_n h k /\
bn_v h bM < bn_v_n h k /\ live h aM /\ live h bM /\ live h cM /\ eq_or_disjoint aM bM /\
... | false | |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_reduction_lemma_step_bound | val mont_reduction_lemma_step_bound:
pbits:pos -> rLen:nat -> n:pos -> mu:nat -> i:pos{i <= rLen} -> c:nat -> res0:nat -> Lemma
(requires res0 <= c + (pow2 (pbits * (i - 1)) - 1) * n)
(ensures mont_reduction_f pbits rLen n mu (i - 1) res0 <= c + (pow2 (pbits * i) - 1) * n) | val mont_reduction_lemma_step_bound:
pbits:pos -> rLen:nat -> n:pos -> mu:nat -> i:pos{i <= rLen} -> c:nat -> res0:nat -> Lemma
(requires res0 <= c + (pow2 (pbits * (i - 1)) - 1) * n)
(ensures mont_reduction_f pbits rLen n mu (i - 1) res0 <= c + (pow2 (pbits * i) - 1) * n) | let mont_reduction_lemma_step_bound pbits rLen n mu i c res0 =
let res = mont_reduction_f pbits rLen n mu (i - 1) res0 in
let c_i = res0 / pow2 (pbits * (i - 1)) % pow2 pbits in
let q_i = mu * c_i % pow2 pbits in
assert (res == res0 + n * q_i * pow2 (pbits * (i - 1)));
mont_reduction_lemma_step_bound_aux pbit... | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 48,
"end_line": 287,
"start_col": 0,
"start_line": 281
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 |
pbits: Prims.pos ->
rLen: Prims.nat ->
n: Prims.pos ->
mu: Prims.nat ->
i: Prims.pos{i <= rLen} ->
c: Prims.nat ->
res0: Prims.nat
-> FStar.Pervasives.Lemma (requires res0 <= c + (Prims.pow2 (pbits * (i - 1)) - 1) * n)
(ensures
Hacl.Spec.Montgomery.Lemmas.mont_reduction_f pb... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims._assert",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.op_Subtraction",
"Prims.pow2",
"Prims.unit",
"Hacl.Spec.Montgomery.Lemmas.mont_reduction_lemma_step_bound_aux",
"Prims.eq2",
"Prims.int",
"Prims.op_Modulus",... | [] | true | false | true | false | false | let mont_reduction_lemma_step_bound pbits rLen n mu i c res0 =
| let res = mont_reduction_f pbits rLen n mu (i - 1) res0 in
let c_i = res0 / pow2 (pbits * (i - 1)) % pow2 pbits in
let q_i = mu * c_i % pow2 pbits in
assert (res == res0 + (n * q_i) * pow2 (pbits * (i - 1)));
mont_reduction_lemma_step_bound_aux pbits n q_i i c res0;
assert (res <= c + (pow2 (pbits * i) - 1) * n) | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_pre | val mont_pre : pbits: Prims.pos -> rLen: Prims.pos -> n: Prims.pos -> mu: Prims.nat -> Prims.logical | let mont_pre (pbits:pos) (rLen:pos) (n:pos) (mu:nat) =
(1 + n * mu) % pow2 pbits == 0 /\
1 < n /\ n < pow2 (pbits * rLen) /\ n % 2 = 1 | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 47,
"end_line": 456,
"start_col": 0,
"start_line": 454
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 | pbits: Prims.pos -> rLen: Prims.pos -> n: Prims.pos -> mu: Prims.nat -> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.l_and",
"Prims.eq2",
"Prims.int",
"Prims.op_Modulus",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_Equality",
"Prims.logical"
] | [] | false | false | false | true | true | let mont_pre (pbits rLen n: pos) (mu: nat) =
| (1 + n * mu) % pow2 pbits == 0 /\ 1 < n /\ n < pow2 (pbits * rLen) /\ n % 2 = 1 | false | |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.mont_reduction_lemma_step_modn | val mont_reduction_lemma_step_modn:
pbits:pos -> rLen:nat -> n:pos -> mu:nat -> i:pos{i <= rLen} -> c:nat -> res0:nat -> Lemma
(requires res0 % n == c % n)
(ensures mont_reduction_f pbits rLen n mu (i - 1) res0 % n == c % n) | val mont_reduction_lemma_step_modn:
pbits:pos -> rLen:nat -> n:pos -> mu:nat -> i:pos{i <= rLen} -> c:nat -> res0:nat -> Lemma
(requires res0 % n == c % n)
(ensures mont_reduction_f pbits rLen n mu (i - 1) res0 % n == c % n) | let mont_reduction_lemma_step_modn pbits rLen n mu i c res0 =
let res = mont_reduction_f pbits rLen n mu (i - 1) res0 in
let c_i = res0 / pow2 (pbits * (i - 1)) % pow2 pbits in
let q_i = mu * c_i % pow2 pbits in
assert (res == res0 + n * q_i * pow2 (pbits * (i - 1)));
Math.Lemmas.paren_mul_right n q_i (pow2 (... | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 73,
"end_line": 365,
"start_col": 0,
"start_line": 359
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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 |
pbits: Prims.pos ->
rLen: Prims.nat ->
n: Prims.pos ->
mu: Prims.nat ->
i: Prims.pos{i <= rLen} ->
c: Prims.nat ->
res0: Prims.nat
-> FStar.Pervasives.Lemma (requires res0 % n == c % n)
(ensures
Hacl.Spec.Montgomery.Lemmas.mont_reduction_f pbits rLen n mu (i - 1) res0 % n ==... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Math.Lemmas.modulo_addition_lemma",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Subtraction",
"Prims.unit",
"FStar.Math.Lemmas.paren_mul_right",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Addition",
"Pri... | [] | true | false | true | false | false | let mont_reduction_lemma_step_modn pbits rLen n mu i c res0 =
| let res = mont_reduction_f pbits rLen n mu (i - 1) res0 in
let c_i = res0 / pow2 (pbits * (i - 1)) % pow2 pbits in
let q_i = mu * c_i % pow2 pbits in
assert (res == res0 + (n * q_i) * pow2 (pbits * (i - 1)));
Math.Lemmas.paren_mul_right n q_i (pow2 (pbits * (i - 1)));
Math.Lemmas.modulo_addition_lemma res0 n (q_i * pow... | false |
Hacl.Spec.Montgomery.Lemmas.fst | Hacl.Spec.Montgomery.Lemmas.eea_pow2_odd | val eea_pow2_odd: a:pos -> n:pos ->
Pure (tuple2 int int)
(requires n % 2 = 1)
(ensures fun (d, k) ->
pow2 a * d == 1 + k * n /\ - d < n) | val eea_pow2_odd: a:pos -> n:pos ->
Pure (tuple2 int int)
(requires n % 2 = 1)
(ensures fun (d, k) ->
pow2 a * d == 1 + k * n /\ - d < n) | let eea_pow2_odd a n =
let k = eea_pow2_odd_k a n in
assert (n * k % pow2 a == 1);
assert (n * k == n * k / pow2 a * pow2 a + 1);
let d = n * k / pow2 a in
Math.Lemmas.lemma_mult_lt_left n k (pow2 a);
assert (n * k < n * pow2 a);
Math.Lemmas.cancel_mul_div n (pow2 a);
assert (d < n);
assert (n * k == ... | {
"file_name": "code/bignum/Hacl.Spec.Montgomery.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 12,
"end_line": 144,
"start_col": 0,
"start_line": 134
} | module Hacl.Spec.Montgomery.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.LoopCombinators
(**
https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf
https://eprint.iacr.org/2011/239.pdf
https://eprint.iacr.org/2017/1057.pdf *)
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val eea_pow2_odd_k_lemma_d: a:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"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: Prims.pos -> n: Prims.pos -> Prims.Pure (Prims.int * Prims.int) | Prims.Pure | [] | [] | [
"Prims.pos",
"FStar.Pervasives.Native.Mktuple2",
"Prims.int",
"Prims.op_Minus",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"FStar.Mul.op_Star",
"Prims.op_Addition",
"Prims.pow2",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Math.Lemmas.cancel_mul_div",
"FStar.Math.Lemmas.lemma_mult_lt_left",
... | [] | false | false | false | false | false | let eea_pow2_odd a n =
| let k = eea_pow2_odd_k a n in
assert (n * k % pow2 a == 1);
assert (n * k == (n * k / pow2 a) * pow2 a + 1);
let d = n * k / pow2 a in
Math.Lemmas.lemma_mult_lt_left n k (pow2 a);
assert (n * k < n * pow2 a);
Math.Lemmas.cancel_mul_div n (pow2 a);
assert (d < n);
assert (n * k == d * pow2 a + 1);
(- d, - k) | false |
Vale.Transformers.Transform.fsti | Vale.Transformers.Transform.equiv_states | val equiv_states : s1: Vale.X64.Decls.va_state -> s2: Vale.X64.Decls.va_state -> Prims.logical | let equiv_states (s1 s2:va_state) = equiv_states s1 s2 | {
"file_name": "vale/code/lib/transformers/Vale.Transformers.Transform.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 61,
"end_line": 29,
"start_col": 7,
"start_line": 29
} | (**
This module exposes user-friendly transformers and lemmas for them.
Each transformation takes 1 or more [va_code] object(s) and
produces a [va_code] object, along with additional data. The lemma
guarantees that the produced [va_code] object is semantically
identical to the (first, if more than one)... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.Transformers.Common.fsti.checked",
"Vale.Def.PossiblyMonad.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "Vale... | [
{
"abbrev": false,
"full_module": "Vale.Transformers.Common",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.PossiblyMonad",
"short_module": null
},
{
"abbrev": false,... | {
"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 | s1: Vale.X64.Decls.va_state -> s2: Vale.X64.Decls.va_state -> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.Decls.va_state",
"Vale.Transformers.Common.equiv_states",
"Prims.logical"
] | [] | false | false | false | true | true | let equiv_states (s1 s2: va_state) =
| equiv_states s1 s2 | false | |
Hacl.Bignum.MontArithmetic.fsti | Hacl.Bignum.MontArithmetic.bn_field_inv_st | val bn_field_inv_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | let bn_field_inv_st (t:limb_t) (len:BN.meta_len t) =
k:pbn_mont_ctx t
-> aM:lbignum t len
-> aInvM:lbignum t len ->
Stack unit
(requires fun h ->
(B.deref h k).len == len /\
pbn_mont_ctx_inv h k /\
Euclid.is_prime (bn_v_n h k) /\
0 < bn_v h aM /\ bn_v h aM < bn_v_n h k /\
live h aM /\ l... | {
"file_name": "code/bignum/Hacl.Bignum.MontArithmetic.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 68,
"end_line": 419,
"start_col": 0,
"start_line": 403
} | module Hacl.Bignum.MontArithmetic
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module B = LowStar.Buffer
module HS = FStar.HyperStack
module ST = FStar.HyperStack.ST
module Euclid = FStar.Math.Euclid
module S = Hacl.Spec.Bignum.MontAri... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.MontArithmetic.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Exponentiation.fsti.checked",
"Hacl.... | [
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
... | {
"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 | t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Bignum.MontArithmetic.pbn_mont_ctx",
"Hacl.Bignum.Definitions.lbignum",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.eq2",
"Hacl.Bignum.MontArithmetic.__proj__Mkbn_mont_ctx'__item__len",
"Hacl.Bignum.MontArith... | [] | false | false | false | false | true | let bn_field_inv_st (t: limb_t) (len: BN.meta_len t) =
| k: pbn_mont_ctx t -> aM: lbignum t len -> aInvM: lbignum t len
-> Stack unit
(requires
fun h ->
(B.deref h k).len == len /\ pbn_mont_ctx_inv h k /\ Euclid.is_prime (bn_v_n h k) /\
0 < bn_v h aM /\ bn_v h aM < bn_v_n h k /\ live h aM /\ live h aInvM /\ disjoint aM aInvM /\
B... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.