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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.synth_bitfield' | val synth_bitfield'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: t)
: Tot (bitfields cl lo hi l) (decreases l) | val synth_bitfield'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: t)
: Tot (bitfields cl lo hi l) (decreases l) | let rec synth_bitfield' (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat) (hi: nat { lo <= hi /\ hi <= tot }) (l: list nat { valid_bitfield_widths lo hi l }) (x: t) : Tot (bitfields cl lo hi l) (decreases l) =
match l with
| [] -> ()
| [_] -> cl.get_bitfield x lo hi
| sz :: q -> (((cl.get_bitfield x lo (lo + ... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 111,
"end_line": 43,
"start_col": 0,
"start_line": 39
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo hi l} ->
x: t
-> Prims.Tot (LowParse.Spec.BitFields.bitfields cl lo hi l) | Prims.Tot | [
"total",
""
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.BitFields.__proj__Mkuint_t__item__get_bitfield",
"FStar.Pervasives.Native.Mktuple2",
"LowParse.BitFields.bitfiel... | [
"recursion"
] | false | false | false | false | false | let rec synth_bitfield'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: t)
: Tot (bitfields cl lo hi l) (decreases l) =
| match l with
| [] -> ()
| [_] -> cl.get_bitfield x lo hi
| sz :: q ->
(((cl.get_bitfield x lo (lo + sz) <: t) <: bitfield cl sz), synth_bitfield' cl (lo + sz) hi q x) | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.valid_bitfield_bounds | val valid_bitfield_bounds (lo: nat) (hi: nat{lo <= hi}) (l: list nat) : Tot bool (decreases l) | val valid_bitfield_bounds (lo: nat) (hi: nat{lo <= hi}) (l: list nat) : Tot bool (decreases l) | let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l: list nat) : Tot bool (decreases l) =
match l with
| [] -> true
| mi :: q -> lo <= mi && mi <= hi && valid_bitfield_bounds mi hi q | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 68,
"end_line": 14,
"start_col": 0,
"start_line": 11
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion. | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"fu... | {
"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 | lo: Prims.nat -> hi: Prims.nat{lo <= hi} -> l: Prims.list Prims.nat -> Prims.Tot Prims.bool | Prims.Tot | [
"total",
""
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"Prims.op_AmpAmp",
"LowParse.Spec.BitFields.valid_bitfield_bounds",
"Prims.bool"
] | [
"recursion"
] | false | false | false | false | false | let rec valid_bitfield_bounds (lo: nat) (hi: nat{lo <= hi}) (l: list nat) : Tot bool (decreases l) =
| match l with
| [] -> true
| mi :: q -> lo <= mi && mi <= hi && valid_bitfield_bounds mi hi q | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.bounds_of_widths | val bounds_of_widths (lo: nat) (hi: nat{lo <= hi}) (l: list nat)
: Pure (list nat)
(requires (valid_bitfield_widths lo hi l))
(ensures (fun res -> valid_bitfield_bounds lo hi res))
(decreases l) | val bounds_of_widths (lo: nat) (hi: nat{lo <= hi}) (l: list nat)
: Pure (list nat)
(requires (valid_bitfield_widths lo hi l))
(ensures (fun res -> valid_bitfield_bounds lo hi res))
(decreases l) | let rec bounds_of_widths (lo: nat) (hi: nat { lo <= hi }) (l: list nat) : Pure (list nat)
(requires (valid_bitfield_widths lo hi l))
(ensures (fun res -> valid_bitfield_bounds lo hi res))
(decreases l)
= match l with
| [] -> []
| [_] -> []
| sz :: q -> (lo + sz) :: bounds_of_widths (lo + sz) hi q | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 59,
"end_line": 28,
"start_col": 0,
"start_line": 21
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"fu... | {
"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 | lo: Prims.nat -> hi: Prims.nat{lo <= hi} -> l: Prims.list Prims.nat
-> Prims.Pure (Prims.list Prims.nat) | Prims.Pure | [
""
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"Prims.Nil",
"Prims.Cons",
"Prims.op_Addition",
"LowParse.Spec.BitFields.bounds_of_widths",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.valid_bitfield_bounds"
] | [
"recursion"
] | false | false | false | false | false | let rec bounds_of_widths (lo: nat) (hi: nat{lo <= hi}) (l: list nat)
: Pure (list nat)
(requires (valid_bitfield_widths lo hi l))
(ensures (fun res -> valid_bitfield_bounds lo hi res))
(decreases l) =
| match l with
| [] -> []
| [_] -> []
| sz :: q -> (lo + sz) :: bounds_of_widths (lo + sz) hi q | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.parse_bitfield | val parse_bitfield
(#t: Type)
(#k: parser_kind)
(p: parser k t)
(#tot: pos)
(cl: uint_t tot t)
(l: list nat {valid_bitfield_widths 0 tot l})
: Tot (parser k (bitfields cl 0 tot l)) | val parse_bitfield
(#t: Type)
(#k: parser_kind)
(p: parser k t)
(#tot: pos)
(cl: uint_t tot t)
(l: list nat {valid_bitfield_widths 0 tot l})
: Tot (parser k (bitfields cl 0 tot l)) | let parse_bitfield (#t: Type) (#k: parser_kind) (p: parser k t) (#tot: pos) (cl: uint_t tot t) (l: list nat { valid_bitfield_widths 0 tot l }) : Tot (parser k (bitfields cl 0 tot l)) =
p `parse_synth` synth_bitfield cl 0 tot l | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 43,
"end_line": 93,
"start_col": 0,
"start_line": 92
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
p: LowParse.Spec.Base.parser k t ->
cl: LowParse.BitFields.uint_t tot t ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 tot l}
-> LowParse.Spec.Base.parser k (LowParse.Spec.BitFields.bitfields cl 0 tot l) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.list",
"Prims.nat",
"Prims.b2t",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.Combinators.parse_synth",
"LowParse.Spec.BitFields.bitfields",
"LowParse.Spec.BitFields... | [] | false | false | false | false | false | let parse_bitfield
(#t: Type)
(#k: parser_kind)
(p: parser k t)
(#tot: pos)
(cl: uint_t tot t)
(l: list nat {valid_bitfield_widths 0 tot l})
: Tot (parser k (bitfields cl 0 tot l)) =
| p `parse_synth` (synth_bitfield cl 0 tot l) | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.synth_bitfield_injective | val synth_bitfield_injective
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths 0 tot l})
: Lemma ((lo == 0 /\ hi == tot) ==> synth_injective (synth_bitfield cl lo hi l))
[SMTPat (synth_injective (synth_b... | val synth_bitfield_injective
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths 0 tot l})
: Lemma ((lo == 0 /\ hi == tot) ==> synth_injective (synth_bitfield cl lo hi l))
[SMTPat (synth_injective (synth_b... | let synth_bitfield_injective (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat) (hi: nat { lo <= hi /\ hi <= tot }) (l: list nat { valid_bitfield_widths 0 tot l })
: Lemma ((lo == 0 /\ hi == tot) ==> synth_injective (synth_bitfield cl lo hi l))
[SMTPat (synth_injective (synth_bitfield #tot #t cl lo hi l))]
=
s... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 60,
"end_line": 68,
"start_col": 0,
"start_line": 60
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 tot l}
-> FStar.Pervasives.Lemma
(ensures
lo == 0 /\ hi == tot ==>
LowParse.Spec.Combinators.synth_injective (... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.Combinators.synth_injective_intro'",
"LowParse.Spec.BitFields.bitfields",
"LowParse.Spec.BitFields.synth_bi... | [] | false | false | true | false | false | let synth_bitfield_injective
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths 0 tot l})
: Lemma ((lo == 0 /\ hi == tot) ==> synth_injective (synth_bitfield cl lo hi l))
[SMTPat (synth_injective (synth_b... | synth_injective_intro' (synth_bitfield cl 0 tot l)
(fun x y ->
synth_bitfield_injective' cl 0 tot l x y;
BF.get_bitfield_full (cl.v x);
BF.get_bitfield_full (cl.v y);
assert (cl.uint_to_t (cl.v x) == cl.uint_to_t (cl.v y))) | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_lemma0_hi | val load_tup64_lemma0_hi: hi:uint64 ->
Lemma
((v hi % pow2 14) * pow2 64 + (v hi / pow2 14) % pow2 26 * pow78 + v hi / pow2 40 * pow104 ==
v hi * pow2 64) | val load_tup64_lemma0_hi: hi:uint64 ->
Lemma
((v hi % pow2 14) * pow2 64 + (v hi / pow2 14) % pow2 26 * pow78 + v hi / pow2 40 * pow104 ==
v hi * pow2 64) | let load_tup64_lemma0_hi hi =
calc (==) {
(v hi % pow2 14) * pow2 64 + (v hi / pow2 14) % pow2 26 * pow78 + v hi / pow2 40 * pow104;
(==) {
assert_norm (pow78 = pow2 14 * pow2 64);
assert_norm (pow104 = pow2 40 * pow2 64)}
(v hi % pow2 14) * pow2 64 + (v hi / pow2 14) % pow2 26 * pow2 14 * pow... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 60,
"start_col": 0,
"start_line": 43
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"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",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | hi: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(ensures
(Lib.IntTypes.v hi % Prims.pow2 14) * Prims.pow2 64 +
(Lib.IntTypes.v hi / Prims.pow2 14 % Prims.pow2 26) * Hacl.Spec.Poly1305.Field32xN.pow78 +
(Lib.IntTypes.v hi / Prims.pow2 40) * Hacl.Spec.Poly1305.Field32xN.pow104 ==
Lib.IntTy... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.op_Modulus",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.pow2",
"Prims.op_Division",
"Hacl.Spec.Poly1305.Field32xN.pow78",
"Hacl.Spec.Poly1305.Fi... | [] | false | false | true | false | false | let load_tup64_lemma0_hi hi =
| calc ( == ) {
(v hi % pow2 14) * pow2 64 + ((v hi / pow2 14) % pow2 26) * pow78 + (v hi / pow2 40) * pow104;
( == ) { (assert_norm (pow78 = pow2 14 * pow2 64);
assert_norm (pow104 = pow2 40 * pow2 64)) }
(v hi % pow2 14) * pow2 64 + (((v hi / pow2 14) % pow2 26) * pow2 14) * pow2 64 +
((v hi / pow2 40) * po... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_four_sqr64_wide | val lemma_four_sqr64_wide (a0 a1 a2 a3:uint64) : Lemma
(requires
felem_fits1 a0 64 /\ felem_fits1 a1 64 /\
felem_fits1 a2 64 /\ felem_fits1 a3 64)
(ensures
(let d = mul64_wide (a0 *. u64 2) a3 +. mul64_wide (a1 *. u64 2) a2 in
v d = v a0 * v a3 + v a1 * v a2 + v a2 * v a1 + v a3 * v a0 /\
v d <= ... | val lemma_four_sqr64_wide (a0 a1 a2 a3:uint64) : Lemma
(requires
felem_fits1 a0 64 /\ felem_fits1 a1 64 /\
felem_fits1 a2 64 /\ felem_fits1 a3 64)
(ensures
(let d = mul64_wide (a0 *. u64 2) a3 +. mul64_wide (a1 *. u64 2) a2 in
v d = v a0 * v a3 + v a1 * v a2 + v a2 * v a1 + v a3 * v a0 /\
v d <= ... | let lemma_four_sqr64_wide a0 a1 a2 a3 =
let r0 = a0 *. u64 2 in
let r1 = a1 *. u64 2 in
lemma_mul_by2 64 max52 a0;
lemma_mul_by2 64 max52 a1;
assert (v r0 = v a0 * 2 /\ v r1 = v a1 * 2);
lemma_bound_mul64_wide 128 64 max52 max52 r0 a3;
lemma_bound_mul64_wide 128 64 max52 max52 r1 a2;
assert (v a0 * 2 *... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 629,
"start_col": 0,
"start_line": 610
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"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 |
a0: Lib.IntTypes.uint64 ->
a1: Lib.IntTypes.uint64 ->
a2: Lib.IntTypes.uint64 ->
a3: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Hacl.Spec.K256.Field52.Definitions.felem_fits1 a0 64 /\
Hacl.Spec.K256.Field52.Definitions.felem_fits1 a1 64 /\
Hacl.Spec.K256.Fie... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"Prims.unit",
"FStar.Calc.calc_step",
"FStar.Calc.calc_init... | [] | false | false | true | false | false | let lemma_four_sqr64_wide a0 a1 a2 a3 =
| let r0 = a0 *. u64 2 in
let r1 = a1 *. u64 2 in
lemma_mul_by2 64 max52 a0;
lemma_mul_by2 64 max52 a1;
assert (v r0 = v a0 * 2 /\ v r1 = v a1 * 2);
lemma_bound_mul64_wide 128 64 max52 max52 r0 a3;
lemma_bound_mul64_wide 128 64 max52 max52 r1 a2;
assert ((v a0 * 2) * v a3 + (v a1 * 2) * v a2 <= 16384 * (max52 * max52));
... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5_lemma0 | val lset_bit5_lemma0:
f:lseq uint64 5
-> i:size_nat{i <= 128 /\ i / 26 = 0} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(for... | val lset_bit5_lemma0:
f:lseq uint64 5
-> i:size_nat{i <= 128 /\ i / 26 = 0} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(for... | let lset_bit5_lemma0 f i =
let b = u64 1 <<. size (i % 26) in
let out = f.[0] <- f.[0] |. b in
assert (v f.[i / 26] < pow2 (i % 26));
lset_bit5_lemma_aux f.[0] i;
assert (v out.[0] == v f.[0] + pow2 (i % 26));
lemma_sum_lt_pow2_26 i (v f.[0]) (pow2 (i % 26));
let (f0, f1, f2, f3, f4) = (f.[0], f.[1], f.[... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 80,
"end_line": 584,
"start_col": 0,
"start_line": 565
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"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",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Lib.Sequence.lseq Lib.IntTypes.uint64 5 -> i: Lib.IntTypes.size_nat{i <= 128 /\ i / 26 = 0}
-> FStar.Pervasives.Lemma
(requires
(forall (i: Prims.nat).
i < 5 ==> Lib.IntTypes.v f.[ i ] <= Hacl.Spec.Poly1305.Field32xN.max26) /\
Hacl.Spec.Poly1305.Field32xN.as_nat5 (f.[ 0 ], f.[ 1 ]... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.Sequence.lseq",
"Lib.IntTypes.uint64",
"Lib.IntTypes.size_nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Division",
"Prims._assert",
"Prims.eq2",
"Hacl.Spec.Poly1305.Field32xN.as_nat5",
"FStar.Pervasives.Native.Mktuple5",
"Pri... | [] | false | false | true | false | false | let lset_bit5_lemma0 f i =
| let b = u64 1 <<. size (i % 26) in
let out = f.[ 0 ] <- f.[ 0 ] |. b in
assert (v f.[ i / 26 ] < pow2 (i % 26));
lset_bit5_lemma_aux f.[ 0 ] i;
assert (v out.[ 0 ] == v f.[ 0 ] + pow2 (i % 26));
lemma_sum_lt_pow2_26 i (v f.[ 0 ]) (pow2 (i % 26));
let f0, f1, f2, f3, f4 = (f.[ 0 ], f.[ 1 ], f.[ 2 ], f.[ 3 ], f.[ 4 ]) in... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_4_compact_lemma_f2 | val load_tup64_4_compact_lemma_f2: lo:uint64 -> hi:uint64 -> Lemma
(let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
v ((t3 >>. 4ul) &. u64 0x3ffffff) == v lo / pow2 52 + (v hi % pow2 14) * pow2 12) | val load_tup64_4_compact_lemma_f2: lo:uint64 -> hi:uint64 -> Lemma
(let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
v ((t3 >>. 4ul) &. u64 0x3ffffff) == v lo / pow2 52 + (v hi % pow2 14) * pow2 12) | let load_tup64_4_compact_lemma_f2 lo hi =
let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
let f2 = (t3 >>. 4ul) &. u64 0x3ffffff in
Math.Lemmas.lemma_div_lt (v lo) 64 48;
logor_disjoint (lo >>. 48ul) (hi <<. 16ul) 16;
assert (v t3 == v lo / pow2 48 + (v hi * pow2 16) % pow2 64);
calc (==) {
(v lo / pow2 48... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 62,
"end_line": 293,
"start_col": 0,
"start_line": 255
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"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",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | lo: Lib.IntTypes.uint64 -> hi: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(ensures
(let t3 = lo >>. 48ul |. hi <<. 16ul in
Lib.IntTypes.v (t3 >>. 4ul &. Lib.IntTypes.u64 0x3ffffff) ==
Lib.IntTypes.v lo / Prims.pow2 52 + (Lib.IntTypes.v hi % Prims.pow2 14) * Prims.pow2 12)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.op_Addition",
"Prims.op_Division",
"Prims.pow2",
"FStar.Mul.op_Star",
"Prims.op_Modulus",
"Prims.unit",
"FStar.Calc.calc_finish",
"Prims.Cons",
"FStar.Preo... | [] | false | false | true | false | false | let load_tup64_4_compact_lemma_f2 lo hi =
| let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
let f2 = (t3 >>. 4ul) &. u64 0x3ffffff in
Math.Lemmas.lemma_div_lt (v lo) 64 48;
logor_disjoint (lo >>. 48ul) (hi <<. 16ul) 16;
assert (v t3 == v lo / pow2 48 + (v hi * pow2 16) % pow2 64);
calc ( == ) {
(v lo / pow2 48 + (v hi * pow2 16) % pow2 64) / pow2 4;
( == ) { Math... | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.synth_bitfield_injective' | val synth_bitfield_injective'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x y: t)
: Lemma (requires (synth_bitfield cl lo hi l x == synth_bitfield cl lo hi l y))
(ensures (BF.get_b... | val synth_bitfield_injective'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x y: t)
: Lemma (requires (synth_bitfield cl lo hi l x == synth_bitfield cl lo hi l y))
(ensures (BF.get_b... | let rec synth_bitfield_injective' (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat) (hi: nat { lo <= hi /\ hi <= tot }) (l: list nat { valid_bitfield_widths lo hi l }) (x y: t) : Lemma
(requires (synth_bitfield cl lo hi l x == synth_bitfield cl lo hi l y))
(ensures (BF.get_bitfield (cl.v x) lo hi == BF.get_bitfie... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 69,
"end_line": 58,
"start_col": 0,
"start_line": 47
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo hi l} ->
x: t ->
y: t
-> FStar.Pervasives.Lemma
(requires
LowParse.Spec.BitFields.synth_bitfield cl lo hi l x... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.BitFields.get_bitfield_empty",
"LowParse.BitFields.__proj__Mkuint_t__item__v",
"Prims.unit",
"LowParse.BitFiel... | [
"recursion"
] | false | false | true | false | false | let rec synth_bitfield_injective'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x y: t)
: Lemma (requires (synth_bitfield cl lo hi l x == synth_bitfield cl lo hi l y))
(ensures (BF.g... | match l with
| [] ->
BF.get_bitfield_empty (cl.v x) lo;
BF.get_bitfield_empty (cl.v y) lo
| [_] -> ()
| sz :: q ->
synth_bitfield_injective' cl (lo + sz) hi q x y;
BF.get_bitfield_partition_2_gen lo (lo + sz) hi (cl.v x) (cl.v y) | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.bitfields_destr_cons_nil | val bitfields_destr_cons_nil
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(sz: nat{lo + sz <= tot})
: Tot (bitfields_destr_t cl lo (lo + sz) [sz]) | val bitfields_destr_cons_nil
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(sz: nat{lo + sz <= tot})
: Tot (bitfields_destr_t cl lo (lo + sz) [sz]) | let bitfields_destr_cons_nil
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(sz: nat { lo + sz <= tot })
: Tot (bitfields_destr_t cl lo (lo + sz) [sz])
= fun f_t f x ->
f (cl.get_bitfield x lo (lo + sz)) | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 38,
"end_line": 224,
"start_col": 0,
"start_line": 216
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 | cl: LowParse.BitFields.uint_t tot t -> lo: Prims.nat -> sz: Prims.nat{lo + sz <= tot}
-> LowParse.Spec.BitFields.bitfields_destr_t cl lo (lo + sz) [sz] | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"LowParse.Spec.BitFields.bitfields",
"Prims.Cons",
"Prims.Nil",
"LowParse.BitFields.__proj__Mkuint_t__item__get_bitfield",
"LowParse.Spec.BitFields.synth_bitfield",
"LowParse.Sp... | [] | false | false | false | false | false | let bitfields_destr_cons_nil
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(sz: nat{lo + sz <= tot})
: Tot (bitfields_destr_t cl lo (lo + sz) [sz]) =
| fun f_t f x -> f (cl.get_bitfield x lo (lo + sz)) | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.mk_bitfields_destr | val mk_bitfields_destr
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
: Tot (bitfields_destr_t cl lo hi l) | val mk_bitfields_destr
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
: Tot (bitfields_destr_t cl lo hi l) | let mk_bitfields_destr
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat { lo <= hi /\ hi <= tot })
(l: list nat { valid_bitfield_widths lo hi l })
: Tot (bitfields_destr_t cl lo hi l)
= norm [delta_only [`%mk_bitfields_destr'; `%bitfields_destr_nil; `%bitfields_destr_cons_nil; `%bitfields_destr_... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 172,
"end_line": 262,
"start_col": 0,
"start_line": 254
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo hi l}
-> LowParse.Spec.BitFields.bitfields_destr_t cl lo hi l | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"FStar.Pervasives.norm",
"Prims.Cons",
"FStar.Pervasives.norm_step",
"FStar.Pervasives.delta_only",
"Prims.string",
... | [] | false | false | false | false | false | let mk_bitfields_destr
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
: Tot (bitfields_destr_t cl lo hi l) =
| norm [
delta_only [
`%mk_bitfields_destr';
`%bitfields_destr_nil;
`%bitfields_destr_cons_nil;
`%bitfields_destr_cons
];
iota;
zeta;
primops
]
(mk_bitfields_destr' cl lo hi l) | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.synth_bitfield_recip_inverse' | val synth_bitfield_recip_inverse'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: bitfields cl lo hi l)
: Lemma (ensures (synth_bitfield cl lo hi l (synth_bitfield_recip cl lo hi l x) == ... | val synth_bitfield_recip_inverse'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: bitfields cl lo hi l)
: Lemma (ensures (synth_bitfield cl lo hi l (synth_bitfield_recip cl lo hi l x) == ... | let rec synth_bitfield_recip_inverse'
(#tot: pos) (#t: Type) (cl: uint_t tot t)
(lo: nat) (hi: nat { lo <= hi /\ hi <= tot }) (l: list nat { valid_bitfield_widths lo hi l }) (x: bitfields cl lo hi l)
: Lemma
(ensures (synth_bitfield cl lo hi l (synth_bitfield_recip cl lo hi l x) == x))
(decreases l)
= match l w... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 79,
"end_line": 131,
"start_col": 0,
"start_line": 107
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo hi l} ->
x: LowParse.Spec.BitFields.bitfields cl lo hi l
-> FStar.Pervasives.Lemma
(ensures
LowParse.Spec.BitFiel... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.bitfields",
"Prims._assert",
"Prims.eq2",
"LowParse.Spec.BitFields.synth_bitfield",
"LowParse... | [
"recursion"
] | false | false | true | false | false | let rec synth_bitfield_recip_inverse'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: bitfields cl lo hi l)
: Lemma (ensures (synth_bitfield cl lo hi l (synth_bitfield_recip cl lo hi l x)... | match l with
| [] -> assert (synth_bitfield cl lo hi l (synth_bitfield_recip cl lo hi l x) == x)
| [sz] ->
let x = x <: bitfield cl sz in
BF.get_bitfield_set_bitfield_same 0 lo hi (cl.v x);
assert (synth_bitfield cl lo hi l (synth_bitfield_recip cl lo hi l x) ==
cl.get_bitfield (cl.set_bitfield (cl.uint_to_... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_two_sqr64_wide52 | val lemma_add_two_sqr64_wide52 (md:nat) (d:uint128) (a0 a1:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 4097 /\
felem_fits1 a0 64 /\ felem_fits1 a1 64)
(ensures
(let d1 = d +. mul64_wide (a0 *. u64 2) a1 in
v d1 == v d + v a0 * v a1 + v a1 * v a0 /\
v d1 <= 8193 * (max52 * max52))) | val lemma_add_two_sqr64_wide52 (md:nat) (d:uint128) (a0 a1:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 4097 /\
felem_fits1 a0 64 /\ felem_fits1 a1 64)
(ensures
(let d1 = d +. mul64_wide (a0 *. u64 2) a1 in
v d1 == v d + v a0 * v a1 + v a1 * v a0 /\
v d1 <= 8193 * (max52 * max52))) | let lemma_add_two_sqr64_wide52 md d a0 a1 =
lemma_mul_by2 64 max52 a0;
lemma_bound_mul64_wide 128 64 max52 max52 (a0 *. u64 2) a1;
assert (v d + v a0 * 2 * v a1 <= md * max52 + 8192 * (max52 * max52));
calc (<) {
md * max52 + 8192 * (max52 * max52);
(<) { assert_norm (4097 < max52); Math.Lemmas.lemma_m... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 58,
"end_line": 749,
"start_col": 0,
"start_line": 736
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"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 | md: Prims.nat -> d: Lib.IntTypes.uint128 -> a0: Lib.IntTypes.uint64 -> a1: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <= md * Hacl.Spec.K256.Field52.Definitions.max52 /\ md <= 4097 /\
Hacl.Spec.K256.Field52.Definitions.felem_fits1 a0 64 /\
Hacl.Spec.K256.Fie... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Pr... | [] | false | false | true | false | false | let lemma_add_two_sqr64_wide52 md d a0 a1 =
| lemma_mul_by2 64 max52 a0;
lemma_bound_mul64_wide 128 64 max52 max52 (a0 *. u64 2) a1;
assert (v d + (v a0 * 2) * v a1 <= md * max52 + 8192 * (max52 * max52));
calc ( < ) {
md * max52 + 8192 * (max52 * max52);
( < ) { (assert_norm (4097 < max52);
Math.Lemmas.lemma_mult_lt_right max52 md max52) }
max52 * max52... | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.serialize_bitfield | val serialize_bitfield
(#t: Type)
(#k: parser_kind)
(#p: parser k t)
(s: serializer p)
(#tot: pos)
(cl: uint_t tot t)
(l: list nat {valid_bitfield_widths 0 tot l})
: Tot (serializer (parse_bitfield p cl l)) | val serialize_bitfield
(#t: Type)
(#k: parser_kind)
(#p: parser k t)
(s: serializer p)
(#tot: pos)
(cl: uint_t tot t)
(l: list nat {valid_bitfield_widths 0 tot l})
: Tot (serializer (parse_bitfield p cl l)) | let serialize_bitfield
(#t: Type) (#k: parser_kind) (#p: parser k t) (s: serializer p)
(#tot: pos) (cl: uint_t tot t) (l: list nat { valid_bitfield_widths 0 tot l })
: Tot (serializer (parse_bitfield p cl l))
= serialize_synth
p
(synth_bitfield cl 0 tot l)
s
(synth_bitfield_recip cl 0 tot l)
() | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 6,
"end_line": 152,
"start_col": 0,
"start_line": 143
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
s: LowParse.Spec.Base.serializer p ->
cl: LowParse.BitFields.uint_t tot t ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 tot l}
-> LowParse.Spec.Base.serializer (LowParse.Spec.BitFields.parse_bitfield p cl l) | Prims.Tot | [
"total"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.list",
"Prims.nat",
"Prims.b2t",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.Combinators.serialize_synth",
"LowParse.Spec.BitFields... | [] | false | false | false | false | false | let serialize_bitfield
(#t: Type)
(#k: parser_kind)
(#p: parser k t)
(s: serializer p)
(#tot: pos)
(cl: uint_t tot t)
(l: list nat {valid_bitfield_widths 0 tot l})
: Tot (serializer (parse_bitfield p cl l)) =
| serialize_synth p (synth_bitfield cl 0 tot l) s (synth_bitfield_recip cl 0 tot l) () | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_four_sqr64_wide | val lemma_add_four_sqr64_wide (md:nat) (d:uint128) (a1 a2 a3 a4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 12802 /\
felem_fits1 a1 64 /\ felem_fits1 a2 64 /\
felem_fits1 a3 64 /\ felem_fits_last1 a4 64)
(ensures
(let d1 = d +. mul64_wide a1 (a4 *. u64 2) +. mul64_wide (a2 *. u64 2) a3 in
... | val lemma_add_four_sqr64_wide (md:nat) (d:uint128) (a1 a2 a3 a4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 12802 /\
felem_fits1 a1 64 /\ felem_fits1 a2 64 /\
felem_fits1 a3 64 /\ felem_fits_last1 a4 64)
(ensures
(let d1 = d +. mul64_wide a1 (a4 *. u64 2) +. mul64_wide (a2 *. u64 2) a3 in
... | let lemma_add_four_sqr64_wide md d a1 a2 a3 a4 =
let r4 = a4 *. u64 2 in
let r2 = a2 *. u64 2 in
assert_norm (max48 < max52);
lemma_mul_by2 64 max48 a4;
lemma_mul_by2 64 max52 a2;
assert (v r2 = v a2 * 2 /\ v r4 = v a4 * 2);
let d1 = d +. mul64_wide a1 r4 +. mul64_wide r2 a3 in
lemma_bound_mul64_wide 6... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 724,
"start_col": 0,
"start_line": 691
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"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 |
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a1: Lib.IntTypes.uint64 ->
a2: Lib.IntTypes.uint64 ->
a3: Lib.IntTypes.uint64 ->
a4: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <= md * Hacl.Spec.K256.Field52.Definitions.max52 /\ md <= 12802 /\
Ha... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
... | [] | false | false | true | false | false | let lemma_add_four_sqr64_wide md d a1 a2 a3 a4 =
| let r4 = a4 *. u64 2 in
let r2 = a2 *. u64 2 in
assert_norm (max48 < max52);
lemma_mul_by2 64 max48 a4;
lemma_mul_by2 64 max52 a2;
assert (v r2 = v a2 * 2 /\ v r4 = v a4 * 2);
let d1 = d +. mul64_wide a1 r4 +. mul64_wide r2 a3 in
lemma_bound_mul64_wide 64 128 max52 max48 a1 (a4 *. u64 2);
lemma_bound_mul64_wide 128 64 ... | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.bitfields_destr_nil | val bitfields_destr_nil (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat{lo <= tot})
: Tot (bitfields_destr_t cl lo lo []) | val bitfields_destr_nil (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat{lo <= tot})
: Tot (bitfields_destr_t cl lo lo []) | let bitfields_destr_nil
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat { lo <= tot } )
: Tot (bitfields_destr_t cl lo lo [])
= fun f_t f x ->
f () | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 8,
"end_line": 235,
"start_col": 0,
"start_line": 228
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 | cl: LowParse.BitFields.uint_t tot t -> lo: Prims.nat{lo <= tot}
-> LowParse.Spec.BitFields.bitfields_destr_t cl lo lo [] | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.BitFields.bitfields",
"Prims.Nil",
"LowParse.Spec.BitFields.synth_bitfield",
"LowParse.Spec.BitFields.bitfields_destr_t"
] | [] | false | false | false | false | false | let bitfields_destr_nil (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat{lo <= tot})
: Tot (bitfields_destr_t cl lo lo []) =
| fun f_t f x -> f () | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.synth_bitfield_recip' | val synth_bitfield_recip'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: bitfields cl lo hi l)
: Tot t (decreases l) | val synth_bitfield_recip'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: bitfields cl lo hi l)
: Tot t (decreases l) | let rec synth_bitfield_recip' (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat) (hi: nat { lo <= hi /\ hi <= tot }) (l: list nat { valid_bitfield_widths lo hi l }) (x: bitfields cl lo hi l) : Tot t (decreases l) =
match l with
| [] -> cl.uint_to_t 0
| [_] -> cl.set_bitfield (cl.uint_to_t 0) lo hi x
| sz :: q ... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 80,
"end_line": 101,
"start_col": 0,
"start_line": 95
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo hi l} ->
x: LowParse.Spec.BitFields.bitfields cl lo hi l
-> Prims.Tot t | Prims.Tot | [
"total",
""
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.bitfields",
"LowParse.BitFields.__proj__Mkuint_t__item__uint_to_t",
"LowParse.BitFields.__proj__M... | [
"recursion"
] | false | false | false | false | false | let rec synth_bitfield_recip'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: bitfields cl lo hi l)
: Tot t (decreases l) =
| match l with
| [] -> cl.uint_to_t 0
| [_] -> cl.set_bitfield (cl.uint_to_t 0) lo hi x
| sz :: q ->
let hd, tl = x <: (bitfield cl sz & bitfields cl (lo + sz) hi q) in
cl.set_bitfield (synth_bitfield_recip' cl (lo + sz) hi q tl) lo (lo + sz) hd | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.valid_bitfield_widths_inj | val valid_bitfield_widths_inj (lo: nat) (hi1: nat{lo <= hi1}) (hi2: nat{lo <= hi2}) (l: list nat)
: Lemma (requires (valid_bitfield_widths lo hi1 l /\ valid_bitfield_widths lo hi2 l))
(ensures (hi1 == hi2))
(decreases l) | val valid_bitfield_widths_inj (lo: nat) (hi1: nat{lo <= hi1}) (hi2: nat{lo <= hi2}) (l: list nat)
: Lemma (requires (valid_bitfield_widths lo hi1 l /\ valid_bitfield_widths lo hi2 l))
(ensures (hi1 == hi2))
(decreases l) | let rec valid_bitfield_widths_inj
(lo: nat)
(hi1: nat { lo <= hi1 })
(hi2: nat { lo <= hi2 })
(l: list nat)
: Lemma
(requires (valid_bitfield_widths lo hi1 l /\ valid_bitfield_widths lo hi2 l))
(ensures (hi1 == hi2))
(decreases l)
= match l with
| [] -> ()
| sz :: q -> valid_bitfield_widths_inj (lo + ... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 60,
"end_line": 277,
"start_col": 0,
"start_line": 266
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 | lo: Prims.nat -> hi1: Prims.nat{lo <= hi1} -> hi2: Prims.nat{lo <= hi2} -> l: Prims.list Prims.nat
-> FStar.Pervasives.Lemma
(requires
LowParse.Spec.BitFields.valid_bitfield_widths lo hi1 l /\
LowParse.Spec.BitFields.valid_bitfield_widths lo hi2 l) (ensures hi1 == hi2) (decreases l) | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths_inj",
"Prims.op_Addition",
"Prims.unit",
"Prims.l_and",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"Prims.squash",
"Prims.eq2",
"Prims.l_or",
"Prims.Nil",
"FStar.Pervasi... | [
"recursion"
] | false | false | true | false | false | let rec valid_bitfield_widths_inj
(lo: nat)
(hi1: nat{lo <= hi1})
(hi2: nat{lo <= hi2})
(l: list nat)
: Lemma (requires (valid_bitfield_widths lo hi1 l /\ valid_bitfield_widths lo hi2 l))
(ensures (hi1 == hi2))
(decreases l) =
| match l with
| [] -> ()
| sz :: q -> valid_bitfield_widths_inj (lo + sz) hi1 hi2 q | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.valid_bitfield_widths_prefix | val valid_bitfield_widths_prefix
(lo: nat)
(hi: nat{lo <= hi})
(prefix: list nat)
(suffix: list nat {valid_bitfield_widths lo hi (prefix `L.append` suffix)})
: Tot (mi: nat{lo <= mi /\ mi <= hi /\ valid_bitfield_widths lo mi prefix}) (decreases prefix) | val valid_bitfield_widths_prefix
(lo: nat)
(hi: nat{lo <= hi})
(prefix: list nat)
(suffix: list nat {valid_bitfield_widths lo hi (prefix `L.append` suffix)})
: Tot (mi: nat{lo <= mi /\ mi <= hi /\ valid_bitfield_widths lo mi prefix}) (decreases prefix) | let rec valid_bitfield_widths_prefix
(lo: nat)
(hi: nat { lo <= hi })
(prefix: list nat)
(suffix: list nat { valid_bitfield_widths lo hi (prefix `L.append` suffix) })
: Tot (mi: nat { lo <= mi /\ mi <= hi /\ valid_bitfield_widths lo mi prefix })
(decreases prefix)
= match prefix with
| [] -> lo
| sz :: q ... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 65,
"end_line": 288,
"start_col": 0,
"start_line": 279
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
lo: Prims.nat ->
hi: Prims.nat{lo <= hi} ->
prefix: Prims.list Prims.nat ->
suffix:
Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo hi (prefix @ suffix)}
-> Prims.Tot
(mi:
Prims.nat{lo <= mi /\ mi <= hi /\ LowParse.Spec.BitFields.valid_bitfield_widths lo mi pref... | Prims.Tot | [
"total",
""
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"FStar.List.Tot.Base.append",
"LowParse.Spec.BitFields.valid_bitfield_widths_prefix",
"Prims.op_Addition",
"Prims.l_and"
] | [
"recursion"
] | false | false | false | false | false | let rec valid_bitfield_widths_prefix
(lo: nat)
(hi: nat{lo <= hi})
(prefix: list nat)
(suffix: list nat {valid_bitfield_widths lo hi (prefix `L.append` suffix)})
: Tot (mi: nat{lo <= mi /\ mi <= hi /\ valid_bitfield_widths lo mi prefix}) (decreases prefix) =
| match prefix with
| [] -> lo
| sz :: q -> valid_bitfield_widths_prefix (lo + sz) hi q suffix | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_three_sqr64_wide | val lemma_add_three_sqr64_wide (md:nat) (d:uint128) (a2 a3 a4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 8705 /\
felem_fits1 a2 64 /\ felem_fits1 a3 64 /\
felem_fits_last1 a4 64)
(ensures
(let d1 = d +. mul64_wide a2 (a4 *. u64 2) +. mul64_wide a3 a3 in
v d1 == v d + v a2 * v a4 + v a3 ... | val lemma_add_three_sqr64_wide (md:nat) (d:uint128) (a2 a3 a4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 8705 /\
felem_fits1 a2 64 /\ felem_fits1 a3 64 /\
felem_fits_last1 a4 64)
(ensures
(let d1 = d +. mul64_wide a2 (a4 *. u64 2) +. mul64_wide a3 a3 in
v d1 == v d + v a2 * v a4 + v a3 ... | let lemma_add_three_sqr64_wide md d a2 a3 a4 =
assert_norm (max48 < max52);
lemma_mul_by2 64 max48 a4;
lemma_bound_mul64_wide 64 128 max52 max48 a2 (a4 *. u64 2);
lemma_bound_mul64_wide 64 64 max52 max52 a3 a3;
assert (v d + v a2 * (v a4 * 2) + v a3 * v a3 <=
md * max52 + 8192 * (max52 * max48) + 4096 * ... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 788,
"start_col": 0,
"start_line": 762
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"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 |
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a2: Lib.IntTypes.uint64 ->
a3: Lib.IntTypes.uint64 ->
a4: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <= md * Hacl.Spec.K256.Field52.Definitions.max52 /\ md <= 8705 /\
Hacl.Spec.K256.Field52.Definitions... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
... | [] | false | false | true | false | false | let lemma_add_three_sqr64_wide md d a2 a3 a4 =
| assert_norm (max48 < max52);
lemma_mul_by2 64 max48 a4;
lemma_bound_mul64_wide 64 128 max52 max48 a2 (a4 *. u64 2);
lemma_bound_mul64_wide 64 64 max52 max52 a3 a3;
assert (v d + v a2 * (v a4 * 2) + v a3 * v a3 <=
md * max52 + 8192 * (max52 * max48) + 4096 * (max52 * max52));
calc ( < ) {
md * max52 + 8192 * (max5... | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.synth_bitfield_recip_inverse | val synth_bitfield_recip_inverse
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths 0 tot l})
: Lemma
((lo == 0 /\ hi == tot) ==>
synth_inverse (synth_bitfield cl lo hi l) (synth_bitfield_recip cl... | val synth_bitfield_recip_inverse
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths 0 tot l})
: Lemma
((lo == 0 /\ hi == tot) ==>
synth_inverse (synth_bitfield cl lo hi l) (synth_bitfield_recip cl... | let synth_bitfield_recip_inverse (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat) (hi: nat { lo <= hi /\ hi <= tot }) (l: list nat { valid_bitfield_widths 0 tot l })
: Lemma ((lo == 0 /\ hi == tot) ==> synth_inverse (synth_bitfield cl lo hi l) (synth_bitfield_recip cl lo hi l))
[SMTPat (synth_inverse (synth_bi... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 141,
"start_col": 0,
"start_line": 135
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 tot l}
-> FStar.Pervasives.Lemma
(ensures
lo == 0 /\ hi == tot ==>
LowParse.Spec.Combinators.synth_inverse (Lo... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.Combinators.synth_inverse_intro'",
"LowParse.Spec.BitFields.bitfields",
"LowParse.Spec.BitFields.synth_bitf... | [] | false | false | true | false | false | let synth_bitfield_recip_inverse
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths 0 tot l})
: Lemma
((lo == 0 /\ hi == tot) ==>
synth_inverse (synth_bitfield cl lo hi l) (synth_bitfield_recip cl... | synth_inverse_intro' (synth_bitfield cl 0 tot l)
(synth_bitfield_recip cl 0 tot l)
(fun x -> synth_bitfield_recip_inverse' cl 0 tot l x) | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5_lemma3 | val lset_bit5_lemma3:
f:lseq uint64 5
-> i:size_nat{i <= 128 /\ i / 26 = 3} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(for... | val lset_bit5_lemma3:
f:lseq uint64 5
-> i:size_nat{i <= 128 /\ i / 26 = 3} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(for... | let lset_bit5_lemma3 f i =
let b = u64 1 <<. size (i % 26) in
let out = f.[3] <- f.[3] |. b in
let (f0, f1, f2, f3, f4) = (f.[0], f.[1], f.[2], f.[3], f.[4]) in
let (o0, o1, o2, o3, o4) = (out.[0], out.[1], out.[2], out.[3], out.[4]) in
assert (v f3 * pow78 < pow2 i);
FStar.Math.Lemmas.lemma_div_lt_nat (v f... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 80,
"end_line": 710,
"start_col": 0,
"start_line": 685
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"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",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Lib.Sequence.lseq Lib.IntTypes.uint64 5 -> i: Lib.IntTypes.size_nat{i <= 128 /\ i / 26 = 3}
-> FStar.Pervasives.Lemma
(requires
(forall (i: Prims.nat).
i < 5 ==> Lib.IntTypes.v f.[ i ] <= Hacl.Spec.Poly1305.Field32xN.max26) /\
Hacl.Spec.Poly1305.Field32xN.as_nat5 (f.[ 0 ], f.[ 1 ]... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.Sequence.lseq",
"Lib.IntTypes.uint64",
"Lib.IntTypes.size_nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Division",
"Prims._assert",
"Prims.eq2",
"Hacl.Spec.Poly1305.Field32xN.as_nat5",
"FStar.Pervasives.Native.Mktuple5",
"Pri... | [] | false | false | true | false | false | let lset_bit5_lemma3 f i =
| let b = u64 1 <<. size (i % 26) in
let out = f.[ 3 ] <- f.[ 3 ] |. b in
let f0, f1, f2, f3, f4 = (f.[ 0 ], f.[ 1 ], f.[ 2 ], f.[ 3 ], f.[ 4 ]) in
let o0, o1, o2, o3, o4 = (out.[ 0 ], out.[ 1 ], out.[ 2 ], out.[ 3 ], out.[ 4 ]) in
assert (v f3 * pow78 < pow2 i);
FStar.Math.Lemmas.lemma_div_lt_nat (v f3 * pow78) i 78;
as... | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.valid_bitfield_widths_append | val valid_bitfield_widths_append
(lo: nat)
(mi: nat{lo <= mi})
(hi: nat{mi <= hi})
(prefix: list nat {valid_bitfield_widths lo mi prefix})
(suffix: list nat {valid_bitfield_widths mi hi suffix})
: Lemma (ensures (valid_bitfield_widths lo hi (prefix `L.append` suffix))) (decreases prefi... | val valid_bitfield_widths_append
(lo: nat)
(mi: nat{lo <= mi})
(hi: nat{mi <= hi})
(prefix: list nat {valid_bitfield_widths lo mi prefix})
(suffix: list nat {valid_bitfield_widths mi hi suffix})
: Lemma (ensures (valid_bitfield_widths lo hi (prefix `L.append` suffix))) (decreases prefi... | let rec valid_bitfield_widths_append
(lo: nat)
(mi: nat { lo <= mi })
(hi: nat { mi <= hi })
(prefix: list nat { valid_bitfield_widths lo mi prefix })
(suffix: list nat { valid_bitfield_widths mi hi suffix })
: Lemma
(ensures (valid_bitfield_widths lo hi (prefix `L.append` suffix)))
(decreases prefix)
= m... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 68,
"end_line": 301,
"start_col": 0,
"start_line": 290
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "Lo... | {
"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 |
lo: Prims.nat ->
mi: Prims.nat{lo <= mi} ->
hi: Prims.nat{mi <= hi} ->
prefix: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo mi prefix} ->
suffix: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths mi hi suffix}
-> FStar.Pervasives.Lemma
(ensures Lo... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.valid_bitfield_widths_append",
"Prims.op_Addition",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"FStar.List.Tot.Base.append",
"Prims.Nil",
"FStar.Pe... | [
"recursion"
] | false | false | true | false | false | let rec valid_bitfield_widths_append
(lo: nat)
(mi: nat{lo <= mi})
(hi: nat{mi <= hi})
(prefix: list nat {valid_bitfield_widths lo mi prefix})
(suffix: list nat {valid_bitfield_widths mi hi suffix})
: Lemma (ensures (valid_bitfield_widths lo hi (prefix `L.append` suffix))) (decreases p... | match prefix with
| [] -> ()
| sz :: q -> valid_bitfield_widths_append (lo + sz) mi hi q suffix | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.mk_bitfields_destr' | val mk_bitfields_destr'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
: Tot (bitfields_destr_t cl lo hi l) (decreases l) | val mk_bitfields_destr'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
: Tot (bitfields_destr_t cl lo hi l) (decreases l) | let rec mk_bitfields_destr'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat { lo <= hi /\ hi <= tot })
(l: list nat { valid_bitfield_widths lo hi l })
: Tot (bitfields_destr_t cl lo hi l)
(decreases l)
= match l with
| [] -> bitfields_destr_nil cl lo
| [sz] -> bitfields_destr_cons_nil cl ... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 89,
"end_line": 250,
"start_col": 0,
"start_line": 238
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo hi l}
-> Prims.Tot (LowParse.Spec.BitFields.bitfields_destr_t cl lo hi l) | Prims.Tot | [
"total",
""
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.bitfields_destr_nil",
"LowParse.Spec.BitFields.bitfields_destr_cons_nil",
"LowParse.Spec.BitField... | [
"recursion"
] | false | false | false | false | false | let rec mk_bitfields_destr'
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
: Tot (bitfields_destr_t cl lo hi l) (decreases l) =
| match l with
| [] -> bitfields_destr_nil cl lo
| [sz] -> bitfields_destr_cons_nil cl lo sz
| sz :: q -> bitfields_destr_cons cl lo sz hi q (mk_bitfields_destr' cl (lo + sz) hi q) | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_three_sqr64_wide52 | val lemma_add_three_sqr64_wide52 (md:nat) (d:uint128) (a0 a1 a2:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 8194 /\
felem_fits1 a0 64 /\ felem_fits1 a1 64 /\
felem_fits1 a2 64)
(ensures
(let d1 = d +. mul64_wide (a0 *. u64 2) a2 +. mul64_wide a1 a1 in
v d1 == v d + v a0 * v a2 + v a1 * v... | val lemma_add_three_sqr64_wide52 (md:nat) (d:uint128) (a0 a1 a2:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 8194 /\
felem_fits1 a0 64 /\ felem_fits1 a1 64 /\
felem_fits1 a2 64)
(ensures
(let d1 = d +. mul64_wide (a0 *. u64 2) a2 +. mul64_wide a1 a1 in
v d1 == v d + v a0 * v a2 + v a1 * v... | let lemma_add_three_sqr64_wide52 md d a0 a1 a2 =
lemma_mul_by2 64 max52 a0;
lemma_bound_mul64_wide 128 64 max52 max52 (a0 *. u64 2) a2;
lemma_bound_mul64_wide 64 64 max52 max52 a1 a1;
assert (v d + v a0 * v a2 + v a1 * v a1 + v a2 * v a0 <=
md * max52 + 12288 * (max52 * max52));
calc (<) {
md * max52... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 823,
"start_col": 0,
"start_line": 801
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"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 |
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a0: Lib.IntTypes.uint64 ->
a1: Lib.IntTypes.uint64 ->
a2: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <= md * Hacl.Spec.K256.Field52.Definitions.max52 /\ md <= 8194 /\
Hacl.Spec.K256.Field52.Definitions... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
... | [] | false | false | true | false | false | let lemma_add_three_sqr64_wide52 md d a0 a1 a2 =
| lemma_mul_by2 64 max52 a0;
lemma_bound_mul64_wide 128 64 max52 max52 (a0 *. u64 2) a2;
lemma_bound_mul64_wide 64 64 max52 max52 a1 a1;
assert (v d + v a0 * v a2 + v a1 * v a1 + v a2 * v a0 <= md * max52 + 12288 * (max52 * max52));
calc ( < ) {
md * max52 + 12288 * (max52 * max52);
( < ) { (assert_norm (8194 < max52... | false |
Spec.K256.Test.fst | Spec.K256.Test.test1_msg | val test1_msg:lbytes 6 | val test1_msg:lbytes 6 | let test1_msg : lbytes 6 =
let l = List.Tot.map u8_from_UInt8 [
0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x30uy; 0x30uy
] in
assert_norm (List.Tot.length l == 6);
of_list l | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 35,
"start_col": 0,
"start_line": 30
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | Lib.Sequence.lseq (Lib.IntTypes.int_t Lib.IntTypes.U8 Lib.IntTypes.SEC) 6 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.of_list",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"FStar.List.Tot.Base.map",
"FStar.UInt8.t",
"Lib.RawIntTypes.u8_from_UInt8",
"Prims.Cons"... | [] | false | false | false | false | false | let test1_msg:lbytes 6 =
| let l = List.Tot.map u8_from_UInt8 [0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x30uy; 0x30uy] in
assert_norm (List.Tot.length l == 6);
of_list l | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.synth_bitfield_ext | val synth_bitfield_ext
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x y: t)
: Lemma (requires (BF.get_bitfield (cl.v x) lo hi == BF.get_bitfield (cl.v y) lo hi))
(ensures (synth_bit... | val synth_bitfield_ext
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x y: t)
: Lemma (requires (BF.get_bitfield (cl.v x) lo hi == BF.get_bitfield (cl.v y) lo hi))
(ensures (synth_bit... | let rec synth_bitfield_ext (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat) (hi: nat { lo <= hi /\ hi <= tot }) (l: list nat { valid_bitfield_widths lo hi l }) (x y: t) : Lemma
(requires (BF.get_bitfield (cl.v x) lo hi == BF.get_bitfield (cl.v y) lo hi))
(ensures (synth_bitfield cl lo hi l x == synth_bitfield cl... | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 71,
"end_line": 88,
"start_col": 0,
"start_line": 72
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"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 |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo hi l} ->
x: t ->
y: t
-> FStar.Pervasives.Lemma
(requires
LowParse.BitFields.get_bitfield (Mkuint_t?.v cl x) ... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"Prims._assert",
"Prims.eq2",
"LowParse.Spec.BitFields.bitfields",
"LowParse.Spec.BitFields.synth_bitfield",
"Prims.un... | [
"recursion"
] | false | false | true | false | false | let rec synth_bitfield_ext
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x y: t)
: Lemma (requires (BF.get_bitfield (cl.v x) lo hi == BF.get_bitfield (cl.v y) lo hi))
(ensures (synth... | match l with
| [] -> assert (synth_bitfield cl lo hi l x == synth_bitfield cl lo hi l y)
| [_] ->
assert (cl.uint_to_t (cl.v (cl.get_bitfield x lo hi)) ==
cl.uint_to_t (cl.v (cl.get_bitfield y lo hi)));
assert (synth_bitfield cl lo hi l x == synth_bitfield cl lo hi l y)
| sz :: q ->
BF.get_bitfield_get_bitf... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5_lemma4 | val lset_bit5_lemma4:
f:lseq uint64 5
-> i:size_nat{i <= 128 /\ i / 26 = 4} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(for... | val lset_bit5_lemma4:
f:lseq uint64 5
-> i:size_nat{i <= 128 /\ i / 26 = 4} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(for... | let lset_bit5_lemma4 f i =
let b = u64 1 <<. size (i % 26) in
let out = f.[4] <- f.[4] |. b in
let (f0, f1, f2, f3, f4) = (f.[0], f.[1], f.[2], f.[3], f.[4]) in
let (o0, o1, o2, o3, o4) = (out.[0], out.[1], out.[2], out.[3], out.[4]) in
assert (v f4 * pow104 < pow2 i);
FStar.Math.Lemmas.lemma_div_lt_nat (v ... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 80,
"end_line": 752,
"start_col": 0,
"start_line": 727
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"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",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Lib.Sequence.lseq Lib.IntTypes.uint64 5 -> i: Lib.IntTypes.size_nat{i <= 128 /\ i / 26 = 4}
-> FStar.Pervasives.Lemma
(requires
(forall (i: Prims.nat).
i < 5 ==> Lib.IntTypes.v f.[ i ] <= Hacl.Spec.Poly1305.Field32xN.max26) /\
Hacl.Spec.Poly1305.Field32xN.as_nat5 (f.[ 0 ], f.[ 1 ]... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.Sequence.lseq",
"Lib.IntTypes.uint64",
"Lib.IntTypes.size_nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Division",
"Prims._assert",
"Prims.eq2",
"Hacl.Spec.Poly1305.Field32xN.as_nat5",
"FStar.Pervasives.Native.Mktuple5",
"Pri... | [] | false | false | true | false | false | let lset_bit5_lemma4 f i =
| let b = u64 1 <<. size (i % 26) in
let out = f.[ 4 ] <- f.[ 4 ] |. b in
let f0, f1, f2, f3, f4 = (f.[ 0 ], f.[ 1 ], f.[ 2 ], f.[ 3 ], f.[ 4 ]) in
let o0, o1, o2, o3, o4 = (out.[ 0 ], out.[ 1 ], out.[ 2 ], out.[ 3 ], out.[ 4 ]) in
assert (v f4 * pow104 < pow2 i);
FStar.Math.Lemmas.lemma_div_lt_nat (v f4 * pow104) i 104;... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_five_sqr64_wide | val lemma_add_five_sqr64_wide (md:nat) (d:uint128) (a0 a1 a2 a3 a4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 16385 /\
felem_fits1 a0 64 /\ felem_fits1 a1 64 /\
felem_fits1 a2 64 /\ felem_fits1 a3 64 /\
felem_fits_last1 a4 64)
(ensures
(let d1 = d +. mul64_wide a0 (a4 *. u64 2) +. mul64... | val lemma_add_five_sqr64_wide (md:nat) (d:uint128) (a0 a1 a2 a3 a4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 16385 /\
felem_fits1 a0 64 /\ felem_fits1 a1 64 /\
felem_fits1 a2 64 /\ felem_fits1 a3 64 /\
felem_fits_last1 a4 64)
(ensures
(let d1 = d +. mul64_wide a0 (a4 *. u64 2) +. mul64... | let lemma_add_five_sqr64_wide md d a0 a1 a2 a3 a4 =
let r4 = a4 *. u64 2 in
let r1 = a1 *. u64 2 in
assert_norm (max48 < max52);
lemma_mul_by2 64 max48 a4;
lemma_mul_by2 64 max52 a1;
assert (v r4 = v a4 * 2 /\ v r1 = v a1 * 2);
lemma_bound_mul64_wide 64 128 max52 max48 a0 r4;
lemma_bound_mul64_wide 128... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 678,
"start_col": 0,
"start_line": 643
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"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 |
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a0: Lib.IntTypes.uint64 ->
a1: Lib.IntTypes.uint64 ->
a2: Lib.IntTypes.uint64 ->
a3: Lib.IntTypes.uint64 ->
a4: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <= md * Hacl.Spec.K256.Field52.Definitions.max... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
... | [] | false | false | true | false | false | let lemma_add_five_sqr64_wide md d a0 a1 a2 a3 a4 =
| let r4 = a4 *. u64 2 in
let r1 = a1 *. u64 2 in
assert_norm (max48 < max52);
lemma_mul_by2 64 max48 a4;
lemma_mul_by2 64 max52 a1;
assert (v r4 = v a4 * 2 /\ v r1 = v a1 * 2);
lemma_bound_mul64_wide 64 128 max52 max48 a0 r4;
lemma_bound_mul64_wide 128 64 max52 max52 r1 a3;
lemma_bound_mul64_wide 64 64 max52 max52 a2 a2... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5_lemma2 | val lset_bit5_lemma2:
f:lseq uint64 5
-> i:size_nat{i <= 128 /\ i / 26 = 2} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(for... | val lset_bit5_lemma2:
f:lseq uint64 5
-> i:size_nat{i <= 128 /\ i / 26 = 2} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(for... | let lset_bit5_lemma2 f i =
let b = u64 1 <<. size (i % 26) in
let out = f.[2] <- f.[2] |. b in
let (f0, f1, f2, f3, f4) = (f.[0], f.[1], f.[2], f.[3], f.[4]) in
let (o0, o1, o2, o3, o4) = (out.[0], out.[1], out.[2], out.[3], out.[4]) in
assert (v f2 * pow52 < pow2 i);
FStar.Math.Lemmas.lemma_div_lt_nat (v f... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 80,
"end_line": 668,
"start_col": 0,
"start_line": 643
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"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",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Lib.Sequence.lseq Lib.IntTypes.uint64 5 -> i: Lib.IntTypes.size_nat{i <= 128 /\ i / 26 = 2}
-> FStar.Pervasives.Lemma
(requires
(forall (i: Prims.nat).
i < 5 ==> Lib.IntTypes.v f.[ i ] <= Hacl.Spec.Poly1305.Field32xN.max26) /\
Hacl.Spec.Poly1305.Field32xN.as_nat5 (f.[ 0 ], f.[ 1 ]... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.Sequence.lseq",
"Lib.IntTypes.uint64",
"Lib.IntTypes.size_nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Division",
"Prims._assert",
"Prims.eq2",
"Hacl.Spec.Poly1305.Field32xN.as_nat5",
"FStar.Pervasives.Native.Mktuple5",
"Pri... | [] | false | false | true | false | false | let lset_bit5_lemma2 f i =
| let b = u64 1 <<. size (i % 26) in
let out = f.[ 2 ] <- f.[ 2 ] |. b in
let f0, f1, f2, f3, f4 = (f.[ 0 ], f.[ 1 ], f.[ 2 ], f.[ 3 ], f.[ 4 ]) in
let o0, o1, o2, o3, o4 = (out.[ 0 ], out.[ 1 ], out.[ 2 ], out.[ 3 ], out.[ 4 ]) in
assert (v f2 * pow52 < pow2 i);
FStar.Math.Lemmas.lemma_div_lt_nat (v f2 * pow52) i 52;
as... | false |
Spec.K256.Test.fst | Spec.K256.Test.test2_sk | val test2_sk:lbytes 32 | val test2_sk:lbytes 32 | let test2_sk : lbytes 32 =
let l = List.Tot.map u8_from_UInt8 [
0xebuy; 0xb2uy; 0xc0uy; 0x82uy; 0xfduy; 0x77uy; 0x27uy; 0x89uy;
0x0auy; 0x28uy; 0xacuy; 0x82uy; 0xf6uy; 0xbduy; 0xf9uy; 0x7buy;
0xaduy; 0x8duy; 0xe9uy; 0xf5uy; 0xd7uy; 0xc9uy; 0x02uy; 0x86uy;
0x92uy; 0xdeuy; 0x1auy; 0x25uy; 0x5cuy; 0xaduy... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 63,
"start_col": 0,
"start_line": 55
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | Lib.Sequence.lseq (Lib.IntTypes.int_t Lib.IntTypes.U8 Lib.IntTypes.SEC) 32 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.of_list",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"FStar.List.Tot.Base.map",
"FStar.UInt8.t",
"Lib.RawIntTypes.u8_from_UInt8",
"Prims.Cons"... | [] | false | false | false | false | false | let test2_sk:lbytes 32 =
| let l =
List.Tot.map u8_from_UInt8
[
0xebuy; 0xb2uy; 0xc0uy; 0x82uy; 0xfduy; 0x77uy; 0x27uy; 0x89uy; 0x0auy; 0x28uy; 0xacuy; 0x82uy;
0xf6uy; 0xbduy; 0xf9uy; 0x7buy; 0xaduy; 0x8duy; 0xe9uy; 0xf5uy; 0xd7uy; 0xc9uy; 0x02uy; 0x86uy;
0x92uy; 0xdeuy; 0x1auy; 0x25uy; 0x5cuy; 0xaduy; 0x3euy; 0x0fuy
... | false |
Spec.K256.Test.fst | Spec.K256.Test.test | val test: Prims.unit -> FStar.All.ML bool | val test: Prims.unit -> FStar.All.ML bool | let test () : FStar.All.ML bool =
let t0 : bool = test_secret_to_public test2_sk test2_pk in
let t1 : bool = test_verify test1_pk test1_msg test1_sgnt in
let t2 : bool = test_sign_and_verify test2_sk test2_pk test2_nonce test2_msgHash test2_sgnt in
let t3 : bool = test_public_key_compressed test2_pk in
let t... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 71,
"end_line": 207,
"start_col": 0,
"start_line": 198
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 2,
"max_fuel": 0,
"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 | _: Prims.unit -> FStar.All.ML Prims.bool | FStar.All.ML | [
"ml"
] | [] | [
"Prims.unit",
"Prims.op_AmpAmp",
"Prims.bool",
"FStar.IO.print_string",
"Spec.K256.Test.test_public_key_uncompressed",
"Spec.K256.Test.test2_pk",
"Spec.K256.Test.test_public_key_compressed",
"Spec.K256.Test.test_sign_and_verify",
"Spec.K256.Test.test2_sk",
"Spec.K256.Test.test2_nonce",
"Spec.K25... | [] | false | true | false | false | false | let test () : FStar.All.ML bool =
| let t0:bool = test_secret_to_public test2_sk test2_pk in
let t1:bool = test_verify test1_pk test1_msg test1_sgnt in
let t2:bool = test_sign_and_verify test2_sk test2_pk test2_nonce test2_msgHash test2_sgnt in
let t3:bool = test_public_key_compressed test2_pk in
let t4:bool = test_public_key_uncompressed test2_pk in
if ... | false |
Spec.K256.Test.fst | Spec.K256.Test.test_secret_to_public | val test_secret_to_public (sk: lbytes 32) (pk_expected: lbytes 64) : FStar.All.ML bool | val test_secret_to_public (sk: lbytes 32) (pk_expected: lbytes 64) : FStar.All.ML bool | let test_secret_to_public (sk:lbytes 32) (pk_expected:lbytes 64) : FStar.All.ML bool =
let pk = secret_to_public sk in
let is_pk_valid =
match pk with
| Some pk -> for_all2 (fun a b -> uint_to_nat #U8 a = uint_to_nat #U8 b) pk_expected pk
| None -> false in
if is_pk_valid then IO.print_string "Test ... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 13,
"end_line": 128,
"start_col": 0,
"start_line": 118
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | sk: Lib.ByteSequence.lbytes 32 -> pk_expected: Lib.ByteSequence.lbytes 64 -> FStar.All.ML Prims.bool | FStar.All.ML | [
"ml"
] | [] | [
"Lib.ByteSequence.lbytes",
"Prims.bool",
"Prims.unit",
"FStar.IO.print_string",
"Lib.Sequence.for_all2",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.op_Equality",
"Prims.nat",
"Prims.l_or",
"Prims.b2t",
"Prims.int",
"Prims.op_GreaterThanOrEqual",
"Lib.IntTypes.ra... | [] | false | true | false | false | false | let test_secret_to_public (sk: lbytes 32) (pk_expected: lbytes 64) : FStar.All.ML bool =
| let pk = secret_to_public sk in
let is_pk_valid =
match pk with
| Some pk -> for_all2 (fun a b -> uint_to_nat #U8 a = uint_to_nat #U8 b) pk_expected pk
| None -> false
in
if is_pk_valid
then IO.print_string "Test K256 secret_to_public: Success!\n"
else IO.print_string "Test K256 secret_to_public: Failure :(\n";
i... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.set_bit5_lemma_k | val set_bit5_lemma_k:
#w:lanes
-> f:lseq (uint64xN w) 5
-> i:size_nat{i <= 128}
-> k:nat{k < w} ->
Lemma
(requires
lfelem_fits f (1, 1, 1, 1, 1) /\
lfelem_less f (pow2 i))
(ensures (
let out = set_bit5 f i in
tup64_fits5 (as_tup64_i (as_tup5 out) k) (1, 1, 1, 1, 1) /\
(lfeval out).[k... | val set_bit5_lemma_k:
#w:lanes
-> f:lseq (uint64xN w) 5
-> i:size_nat{i <= 128}
-> k:nat{k < w} ->
Lemma
(requires
lfelem_fits f (1, 1, 1, 1, 1) /\
lfelem_less f (pow2 i))
(ensures (
let out = set_bit5 f i in
tup64_fits5 (as_tup64_i (as_tup5 out) k) (1, 1, 1, 1, 1) /\
(lfeval out).[k... | let set_bit5_lemma_k #w f i k =
let lf = create 5 (u64 0) in
let lf = lf.[0] <- (vec_v f.[0]).[k] in
let lf = lf.[1] <- (vec_v f.[1]).[k] in
let lf = lf.[2] <- (vec_v f.[2]).[k] in
let lf = lf.[3] <- (vec_v f.[3]).[k] in
let lf = lf.[4] <- (vec_v f.[4]).[k] in
lset_bit5 lf i | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 827,
"start_col": 0,
"start_line": 820
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"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",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
f: Lib.Sequence.lseq (Hacl.Spec.Poly1305.Field32xN.uint64xN w) 5 ->
i: Lib.IntTypes.size_nat{i <= 128} ->
k: Prims.nat{k < w}
-> FStar.Pervasives.Lemma
(requires
Hacl.Spec.Poly1305.Field32xN.lfelem_fits f (1, 1, 1, 1, 1) /\
Hacl.Spec.Poly1305.Field32xN.lfelem_less f (Prims.pow2 i))
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Poly1305.Field32xN.lanes",
"Lib.Sequence.lseq",
"Hacl.Spec.Poly1305.Field32xN.uint64xN",
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.nat",
"Prims.op_LessThan",
"Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.In... | [] | true | false | true | false | false | let set_bit5_lemma_k #w f i k =
| let lf = create 5 (u64 0) in
let lf = lf.[ 0 ] <- (vec_v f.[ 0 ]).[ k ] in
let lf = lf.[ 1 ] <- (vec_v f.[ 1 ]).[ k ] in
let lf = lf.[ 2 ] <- (vec_v f.[ 2 ]).[ k ] in
let lf = lf.[ 3 ] <- (vec_v f.[ 3 ]).[ k ] in
let lf = lf.[ 4 ] <- (vec_v f.[ 4 ]).[ k ] in
lset_bit5 lf i | false |
Vale.Def.TypesNative_s.fst | Vale.Def.TypesNative_s.natN | val natN : n: Prims.nat -> Type0 | let natN = Vale.Def.Words_s.natN | {
"file_name": "vale/specs/defs/Vale.Def.TypesNative_s.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 4,
"start_col": 7,
"start_line": 4
} | module Vale.Def.TypesNative_s
open FStar.Mul | {
"checked_file": "/",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"prims.fst.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.Def.TypesNative_s.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasiv... | {
"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.nat -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Vale.Def.Words_s.natN"
] | [] | false | false | false | true | true | let natN =
| Vale.Def.Words_s.natN | false | |
Spec.K256.Test.fst | Spec.K256.Test.test_sign_and_verify | val test_sign_and_verify:
sk:lbytes 32
-> pk:lbytes 64
-> nonce:lbytes 32
-> msgHash:lbytes 32
-> sgnt:lbytes 64 ->
FStar.All.ML bool | val test_sign_and_verify:
sk:lbytes 32
-> pk:lbytes 64
-> nonce:lbytes 32
-> msgHash:lbytes 32
-> sgnt:lbytes 64 ->
FStar.All.ML bool | let test_sign_and_verify sk pk nonce msgHash sgnt =
let signature = ecdsa_sign_hashed_msg msgHash sk nonce in
let is_sgnt_valid =
match signature with
| Some x -> for_all2 (fun a b -> uint_to_nat #U8 a = uint_to_nat #U8 b) sgnt x
| None -> false in
let verify_sgnt = ecdsa_verify_hashed_msg msgHash p... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 98,
"end_line": 164,
"start_col": 0,
"start_line": 152
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 |
sk: Lib.ByteSequence.lbytes 32 ->
pk: Lib.ByteSequence.lbytes 64 ->
nonce: Lib.ByteSequence.lbytes 32 ->
msgHash: Lib.ByteSequence.lbytes 32 ->
sgnt: Lib.ByteSequence.lbytes 64
-> FStar.All.ML Prims.bool | FStar.All.ML | [
"ml"
] | [] | [
"Lib.ByteSequence.lbytes",
"Prims.op_AmpAmp",
"Prims.bool",
"Prims.unit",
"FStar.IO.print_string",
"Spec.K256.ecdsa_verify_hashed_msg",
"Lib.Sequence.for_all2",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.op_Equality",
"Prims.nat",
"Prims.l_or",
"Prims.b2t",
"Pri... | [] | false | true | false | false | false | let test_sign_and_verify sk pk nonce msgHash sgnt =
| let signature = ecdsa_sign_hashed_msg msgHash sk nonce in
let is_sgnt_valid =
match signature with
| Some x -> for_all2 (fun a b -> uint_to_nat #U8 a = uint_to_nat #U8 b) sgnt x
| None -> false
in
let verify_sgnt = ecdsa_verify_hashed_msg msgHash pk sgnt in
if verify_sgnt && is_sgnt_valid
then
(IO.print_string ... | false |
Spec.K256.Test.fst | Spec.K256.Test.test_verify | val test_verify:
pk:lbytes 64
-> msg:bytes{length msg <= max_size_t}
-> sgnt:lbytes 64 ->
FStar.All.ML bool | val test_verify:
pk:lbytes 64
-> msg:bytes{length msg <= max_size_t}
-> sgnt:lbytes 64 ->
FStar.All.ML bool | let test_verify pk msg sgnt =
let verify : bool = ecdsa_verify_sha256 (length msg) msg pk sgnt in
if verify
then begin IO.print_string "Test K256 ecdsa verification: Success!\n"; true end
else begin IO.print_string "Test K256 ecdsa verification: Failure :(\n"; false end | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 84,
"end_line": 141,
"start_col": 0,
"start_line": 137
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 |
pk: Lib.ByteSequence.lbytes 64 ->
msg: Lib.ByteSequence.bytes{Lib.Sequence.length msg <= Lib.IntTypes.max_size_t} ->
sgnt: Lib.ByteSequence.lbytes 64
-> FStar.All.ML Prims.bool | FStar.All.ML | [
"ml"
] | [] | [
"Lib.ByteSequence.lbytes",
"Lib.ByteSequence.bytes",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Lib.Sequence.length",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Lib.IntTypes.max_size_t",
"Prims.bool",
"Prims.unit",
"FStar.IO.print_string",
"Spec.K256.ecdsa_verify_sha256"
] | [] | false | true | false | false | false | let test_verify pk msg sgnt =
| let verify:bool = ecdsa_verify_sha256 (length msg) msg pk sgnt in
if verify
then
(IO.print_string "Test K256 ecdsa verification: Success!\n";
true)
else
(IO.print_string "Test K256 ecdsa verification: Failure :(\n";
false) | false |
Spec.K256.Test.fst | Spec.K256.Test.test1_sgnt | val test1_sgnt:lbytes 64 | val test1_sgnt:lbytes 64 | let test1_sgnt : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0x81uy; 0x3euy; 0xf7uy; 0x9cuy; 0xceuy; 0xfauy; 0x9auy; 0x56uy;
0xf7uy; 0xbauy; 0x80uy; 0x5fuy; 0x0euy; 0x47uy; 0x85uy; 0x84uy;
0xfeuy; 0x5fuy; 0x0duy; 0xd5uy; 0xf5uy; 0x67uy; 0xbcuy; 0x09uy;
0xb5uy; 0x12uy; 0x3cuy; 0xcbuy; 0xc9uy; 0x83... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 50,
"start_col": 0,
"start_line": 38
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | Lib.Sequence.lseq (Lib.IntTypes.int_t Lib.IntTypes.U8 Lib.IntTypes.SEC) 64 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.of_list",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"FStar.List.Tot.Base.map",
"FStar.UInt8.t",
"Lib.RawIntTypes.u8_from_UInt8",
"Prims.Cons"... | [] | false | false | false | false | false | let test1_sgnt:lbytes 64 =
| let l =
List.Tot.map u8_from_UInt8
[
0x81uy; 0x3euy; 0xf7uy; 0x9cuy; 0xceuy; 0xfauy; 0x9auy; 0x56uy; 0xf7uy; 0xbauy; 0x80uy; 0x5fuy;
0x0euy; 0x47uy; 0x85uy; 0x84uy; 0xfeuy; 0x5fuy; 0x0duy; 0xd5uy; 0xf5uy; 0x67uy; 0xbcuy; 0x09uy;
0xb5uy; 0x12uy; 0x3cuy; 0xcbuy; 0xc9uy; 0x83uy; 0x23uy; 0x65uy; 0x6... | false |
Spec.K256.Test.fst | Spec.K256.Test.test2_msgHash | val test2_msgHash:lbytes 32 | val test2_msgHash:lbytes 32 | let test2_msgHash : lbytes 32 =
let l = List.Tot.map u8_from_UInt8 [
0x4buy; 0x68uy; 0x8duy; 0xf4uy; 0x0buy; 0xceuy; 0xdbuy; 0xe6uy;
0x41uy; 0xdduy; 0xb1uy; 0x6fuy; 0xf0uy; 0xa1uy; 0x84uy; 0x2duy;
0x9cuy; 0x67uy; 0xeauy; 0x1cuy; 0x3buy; 0xf6uy; 0x3fuy; 0x3euy;
0x04uy; 0x71uy; 0xbauy; 0xa6uy; 0x64uy; 0... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 100,
"start_col": 0,
"start_line": 92
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | Lib.Sequence.lseq (Lib.IntTypes.int_t Lib.IntTypes.U8 Lib.IntTypes.SEC) 32 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.of_list",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"FStar.List.Tot.Base.map",
"FStar.UInt8.t",
"Lib.RawIntTypes.u8_from_UInt8",
"Prims.Cons"... | [] | false | false | false | false | false | let test2_msgHash:lbytes 32 =
| let l =
List.Tot.map u8_from_UInt8
[
0x4buy; 0x68uy; 0x8duy; 0xf4uy; 0x0buy; 0xceuy; 0xdbuy; 0xe6uy; 0x41uy; 0xdduy; 0xb1uy; 0x6fuy;
0xf0uy; 0xa1uy; 0x84uy; 0x2duy; 0x9cuy; 0x67uy; 0xeauy; 0x1cuy; 0x3buy; 0xf6uy; 0x3fuy; 0x3euy;
0x04uy; 0x71uy; 0xbauy; 0xa6uy; 0x64uy; 0x53uy; 0x1duy; 0x1auy
... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.store_tup64_lemma | val store_tup64_lemma: f:tup64_5 ->
Pure (uint64 & uint64)
(requires tup64_fits5 f (1, 1, 1, 1, 1))
(ensures (fun (lo, hi) -> v hi * pow2 64 + v lo == as_nat5 f % pow2 128)) | val store_tup64_lemma: f:tup64_5 ->
Pure (uint64 & uint64)
(requires tup64_fits5 f (1, 1, 1, 1, 1))
(ensures (fun (lo, hi) -> v hi * pow2 64 + v lo == as_nat5 f % pow2 128)) | let store_tup64_lemma f =
let (f0, f1, f2, f3, f4) = f in
let lo = f0 |. (f1 <<. 26ul) |. (f2 <<. 52ul) in
let hi = (f2 >>. 12ul) |. (f3 <<. 14ul) |. (f4 <<. 40ul) in
lemma_store_felem_lo f lo;
lemma_store_felem_hi f hi;
assert (v lo == v f0 + v f1 * pow2 26 + (v f2 * pow2 52) % pow2 64);
assert (v hi ==... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 8,
"end_line": 503,
"start_col": 0,
"start_line": 464
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"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",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Hacl.Spec.Poly1305.Field32xN.tup64_5 -> Prims.Pure (Lib.IntTypes.uint64 * Lib.IntTypes.uint64) | Prims.Pure | [] | [] | [
"Hacl.Spec.Poly1305.Field32xN.tup64_5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple2",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Modulus",
... | [] | false | false | false | false | false | let store_tup64_lemma f =
| let f0, f1, f2, f3, f4 = f in
let lo = f0 |. (f1 <<. 26ul) |. (f2 <<. 52ul) in
let hi = (f2 >>. 12ul) |. (f3 <<. 14ul) |. (f4 <<. 40ul) in
lemma_store_felem_lo f lo;
lemma_store_felem_hi f hi;
assert (v lo == v f0 + v f1 * pow2 26 + (v f2 * pow2 52) % pow2 64);
assert (v hi == v f2 / pow2 12 + v f3 * pow2 14 + (v f4 * ... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5_lemma1 | val lset_bit5_lemma1:
f:lseq uint64 5
-> i:size_nat{i <= 128 /\ i / 26 = 1} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(for... | val lset_bit5_lemma1:
f:lseq uint64 5
-> i:size_nat{i <= 128 /\ i / 26 = 1} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(for... | let lset_bit5_lemma1 f i =
let b = u64 1 <<. size (i % 26) in
let out = f.[1] <- f.[1] |. b in
let (f0, f1, f2, f3, f4) = (f.[0], f.[1], f.[2], f.[3], f.[4]) in
let (o0, o1, o2, o3, o4) = (out.[0], out.[1], out.[2], out.[3], out.[4]) in
assert (v f1 * pow2 26 < pow2 i);
FStar.Math.Lemmas.lemma_div_lt_nat (v... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 80,
"end_line": 626,
"start_col": 0,
"start_line": 601
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"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",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Lib.Sequence.lseq Lib.IntTypes.uint64 5 -> i: Lib.IntTypes.size_nat{i <= 128 /\ i / 26 = 1}
-> FStar.Pervasives.Lemma
(requires
(forall (i: Prims.nat).
i < 5 ==> Lib.IntTypes.v f.[ i ] <= Hacl.Spec.Poly1305.Field32xN.max26) /\
Hacl.Spec.Poly1305.Field32xN.as_nat5 (f.[ 0 ], f.[ 1 ]... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.Sequence.lseq",
"Lib.IntTypes.uint64",
"Lib.IntTypes.size_nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Division",
"Prims._assert",
"Prims.eq2",
"Hacl.Spec.Poly1305.Field32xN.as_nat5",
"FStar.Pervasives.Native.Mktuple5",
"Pri... | [] | false | false | true | false | false | let lset_bit5_lemma1 f i =
| let b = u64 1 <<. size (i % 26) in
let out = f.[ 1 ] <- f.[ 1 ] |. b in
let f0, f1, f2, f3, f4 = (f.[ 0 ], f.[ 1 ], f.[ 2 ], f.[ 3 ], f.[ 4 ]) in
let o0, o1, o2, o3, o4 = (out.[ 0 ], out.[ 1 ], out.[ 2 ], out.[ 3 ], out.[ 4 ]) in
assert (v f1 * pow2 26 < pow2 i);
FStar.Math.Lemmas.lemma_div_lt_nat (v f1 * pow2 26) i 26... | false |
Vale.Def.TypesNative_s.fst | Vale.Def.TypesNative_s.pow2_norm | val pow2_norm : n: Prims.nat -> Prims.pos | let pow2_norm = Vale.Def.Words_s.pow2_norm | {
"file_name": "vale/specs/defs/Vale.Def.TypesNative_s.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 49,
"end_line": 5,
"start_col": 7,
"start_line": 5
} | module Vale.Def.TypesNative_s
open FStar.Mul | {
"checked_file": "/",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"prims.fst.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": false,
"source_file": "Vale.Def.TypesNative_s.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasiv... | {
"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.nat -> Prims.pos | Prims.Tot | [
"total"
] | [] | [
"Vale.Def.Words_s.pow2_norm"
] | [] | false | false | false | true | false | let pow2_norm =
| Vale.Def.Words_s.pow2_norm | false | |
Spec.K256.Test.fst | Spec.K256.Test.test1_pk | val test1_pk:lbytes 64 | val test1_pk:lbytes 64 | let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy; 0x7buy;
0xf2uy; 0x11uy; 0x89uy; 0xd0uy; 0x76uy; 0x60uy; 0x82uy; 0xfcuy;
0x9duy; 0x84uy; 0x32uy; 0x26uy; 0x88uy; 0x7fuy; 0xc9uy; 0x76uy;
0x03uy; 0x71uy; 0x10uy; 0x0buy; 0x7euy; 0xe2uy... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 27,
"start_col": 0,
"start_line": 15
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1 | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | Lib.Sequence.lseq (Lib.IntTypes.int_t Lib.IntTypes.U8 Lib.IntTypes.SEC) 64 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.of_list",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"FStar.List.Tot.Base.map",
"FStar.UInt8.t",
"Lib.RawIntTypes.u8_from_UInt8",
"Prims.Cons"... | [] | false | false | false | false | false | let test1_pk:lbytes 64 =
| let l =
List.Tot.map u8_from_UInt8
[
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy; 0x7buy; 0xf2uy; 0x11uy; 0x89uy; 0xd0uy;
0x76uy; 0x60uy; 0x82uy; 0xfcuy; 0x9duy; 0x84uy; 0x32uy; 0x26uy; 0x88uy; 0x7fuy; 0xc9uy; 0x76uy;
0x03uy; 0x71uy; 0x10uy; 0x0buy; 0x7euy; 0xe2uy; 0x0auy; 0x6fuy; 0xf... | false |
Spec.K256.Test.fst | Spec.K256.Test.test_public_key_uncompressed | val test_public_key_uncompressed (pk_raw: lbytes 64) : FStar.All.ML bool | val test_public_key_uncompressed (pk_raw: lbytes 64) : FStar.All.ML bool | let test_public_key_uncompressed (pk_raw:lbytes 64) : FStar.All.ML bool =
let pk_u = pk_uncompressed_from_raw pk_raw in
let pk_raw_u = pk_uncompressed_to_raw pk_u in
match pk_raw_u with
| Some pk_raw_u ->
let is_pk_u_valid =
for_all2 (fun a b -> uint_to_nat #U8 a = uint_to_nat #U8 b) pk_raw_u pk_raw ... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 85,
"end_line": 194,
"start_col": 0,
"start_line": 182
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | pk_raw: Lib.ByteSequence.lbytes 64 -> FStar.All.ML Prims.bool | FStar.All.ML | [
"ml"
] | [] | [
"Lib.ByteSequence.lbytes",
"Prims.bool",
"Prims.unit",
"Prims.op_Negation",
"FStar.IO.print_string",
"Lib.Sequence.for_all2",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.op_Equality",
"Prims.nat",
"Prims.l_or",
"Prims.b2t",
"Prims.int",
"Prims.op_GreaterThanOrEqu... | [] | false | true | false | false | false | let test_public_key_uncompressed (pk_raw: lbytes 64) : FStar.All.ML bool =
| let pk_u = pk_uncompressed_from_raw pk_raw in
let pk_raw_u = pk_uncompressed_to_raw pk_u in
match pk_raw_u with
| Some pk_raw_u ->
let is_pk_u_valid = for_all2 (fun a b -> uint_to_nat #U8 a = uint_to_nat #U8 b) pk_raw_u pk_raw in
if not is_pk_u_valid
then IO.print_string "Test K256 pk_uncompressed (Some): Failure... | false |
Spec.K256.Test.fst | Spec.K256.Test.test2_pk | val test2_pk:lbytes 64 | val test2_pk:lbytes 64 | let test2_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0x77uy; 0x9duy; 0xd1uy; 0x97uy; 0xa5uy; 0xdfuy; 0x97uy; 0x7euy;
0xd2uy; 0xcfuy; 0x6cuy; 0xb3uy; 0x1duy; 0x82uy; 0xd4uy; 0x33uy;
0x28uy; 0xb7uy; 0x90uy; 0xdcuy; 0x6buy; 0x3buy; 0x7duy; 0x44uy;
0x37uy; 0xa4uy; 0x27uy; 0xbduy; 0x58uy; 0x47uy... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 78,
"start_col": 0,
"start_line": 66
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | Lib.Sequence.lseq (Lib.IntTypes.int_t Lib.IntTypes.U8 Lib.IntTypes.SEC) 64 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.of_list",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"FStar.List.Tot.Base.map",
"FStar.UInt8.t",
"Lib.RawIntTypes.u8_from_UInt8",
"Prims.Cons"... | [] | false | false | false | false | false | let test2_pk:lbytes 64 =
| let l =
List.Tot.map u8_from_UInt8
[
0x77uy; 0x9duy; 0xd1uy; 0x97uy; 0xa5uy; 0xdfuy; 0x97uy; 0x7euy; 0xd2uy; 0xcfuy; 0x6cuy; 0xb3uy;
0x1duy; 0x82uy; 0xd4uy; 0x33uy; 0x28uy; 0xb7uy; 0x90uy; 0xdcuy; 0x6buy; 0x3buy; 0x7duy; 0x44uy;
0x37uy; 0xa4uy; 0x27uy; 0xbduy; 0x58uy; 0x47uy; 0xdfuy; 0xcduy; 0xe... | false |
Spec.K256.Test.fst | Spec.K256.Test.test_public_key_compressed | val test_public_key_compressed (pk_raw: lbytes 64) : FStar.All.ML bool | val test_public_key_compressed (pk_raw: lbytes 64) : FStar.All.ML bool | let test_public_key_compressed (pk_raw:lbytes 64) : FStar.All.ML bool =
let pk_c = pk_compressed_from_raw pk_raw in
let pk_raw_c = pk_compressed_to_raw pk_c in
match pk_raw_c with
| Some pk_raw_c ->
let is_pk_c_valid =
for_all2 (fun a b -> uint_to_nat #U8 a = uint_to_nat #U8 b) pk_raw_c pk_raw in
... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 83,
"end_line": 179,
"start_col": 0,
"start_line": 167
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | pk_raw: Lib.ByteSequence.lbytes 64 -> FStar.All.ML Prims.bool | FStar.All.ML | [
"ml"
] | [] | [
"Lib.ByteSequence.lbytes",
"Prims.bool",
"Prims.unit",
"Prims.op_Negation",
"FStar.IO.print_string",
"Lib.Sequence.for_all2",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.op_Equality",
"Prims.nat",
"Prims.l_or",
"Prims.b2t",
"Prims.int",
"Prims.op_GreaterThanOrEqu... | [] | false | true | false | false | false | let test_public_key_compressed (pk_raw: lbytes 64) : FStar.All.ML bool =
| let pk_c = pk_compressed_from_raw pk_raw in
let pk_raw_c = pk_compressed_to_raw pk_c in
match pk_raw_c with
| Some pk_raw_c ->
let is_pk_c_valid = for_all2 (fun a b -> uint_to_nat #U8 a = uint_to_nat #U8 b) pk_raw_c pk_raw in
if not is_pk_c_valid
then IO.print_string "Test K256 pk_compressed (Some): Failure :(\n"... | false |
Spec.K256.Test.fst | Spec.K256.Test.test2_nonce | val test2_nonce:lbytes 32 | val test2_nonce:lbytes 32 | let test2_nonce : lbytes 32 =
let l = List.Tot.map u8_from_UInt8 [
0x49uy; 0xa0uy; 0xd7uy; 0xb7uy; 0x86uy; 0xecuy; 0x9cuy; 0xdeuy;
0x0duy; 0x07uy; 0x21uy; 0xd7uy; 0x28uy; 0x04uy; 0xbeuy; 0xfduy;
0x06uy; 0x57uy; 0x1cuy; 0x97uy; 0x4buy; 0x19uy; 0x1euy; 0xfbuy;
0x42uy; 0xecuy; 0xf3uy; 0x22uy; 0xbauy; 0x9... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 89,
"start_col": 0,
"start_line": 81
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | Lib.Sequence.lseq (Lib.IntTypes.int_t Lib.IntTypes.U8 Lib.IntTypes.SEC) 32 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.of_list",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"FStar.List.Tot.Base.map",
"FStar.UInt8.t",
"Lib.RawIntTypes.u8_from_UInt8",
"Prims.Cons"... | [] | false | false | false | false | false | let test2_nonce:lbytes 32 =
| let l =
List.Tot.map u8_from_UInt8
[
0x49uy; 0xa0uy; 0xd7uy; 0xb7uy; 0x86uy; 0xecuy; 0x9cuy; 0xdeuy; 0x0duy; 0x07uy; 0x21uy; 0xd7uy;
0x28uy; 0x04uy; 0xbeuy; 0xfduy; 0x06uy; 0x57uy; 0x1cuy; 0x97uy; 0x4buy; 0x19uy; 0x1euy; 0xfbuy;
0x42uy; 0xecuy; 0xf3uy; 0x22uy; 0xbauy; 0x9duy; 0xdduy; 0x9auy
... | false |
Spec.K256.Test.fst | Spec.K256.Test.test2_sgnt | val test2_sgnt:lbytes 64 | val test2_sgnt:lbytes 64 | let test2_sgnt : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0x24uy; 0x10uy; 0x97uy; 0xefuy; 0xbfuy; 0x8buy; 0x63uy; 0xbfuy;
0x14uy; 0x5cuy; 0x89uy; 0x61uy; 0xdbuy; 0xdfuy; 0x10uy; 0xc3uy;
0x10uy; 0xefuy; 0xbbuy; 0x3buy; 0x26uy; 0x76uy; 0xbbuy; 0xc0uy;
0xf8uy; 0xb0uy; 0x85uy; 0x05uy; 0xc9uy; 0xe2... | {
"file_name": "specs/tests/Spec.K256.Test.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 115,
"start_col": 0,
"start_line": 103
} | module Spec.K256.Test
open FStar.Mul
open Lib.IntTypes
open Lib.RawIntTypes
open Lib.Sequence
open Lib.ByteSequence
open Spec.K256
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
/// Test 1
let test1_pk : lbytes 64 =
let l = List.Tot.map u8_from_UInt8 [
0xb8uy; 0x38uy; 0xffuy; 0x44uy; 0xe5uy; 0xbcuy; 0x17uy... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mu... | [
{
"abbrev": false,
"full_module": "Spec.K256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Li... | {
"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 | Lib.Sequence.lseq (Lib.IntTypes.int_t Lib.IntTypes.U8 Lib.IntTypes.SEC) 64 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.of_list",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"FStar.List.Tot.Base.length",
"Prims.list",
"FStar.List.Tot.Base.map",
"FStar.UInt8.t",
"Lib.RawIntTypes.u8_from_UInt8",
"Prims.Cons"... | [] | false | false | false | false | false | let test2_sgnt:lbytes 64 =
| let l =
List.Tot.map u8_from_UInt8
[
0x24uy; 0x10uy; 0x97uy; 0xefuy; 0xbfuy; 0x8buy; 0x63uy; 0xbfuy; 0x14uy; 0x5cuy; 0x89uy; 0x61uy;
0xdbuy; 0xdfuy; 0x10uy; 0xc3uy; 0x10uy; 0xefuy; 0xbbuy; 0x3buy; 0x26uy; 0x76uy; 0xbbuy; 0xc0uy;
0xf8uy; 0xb0uy; 0x85uy; 0x05uy; 0xc9uy; 0xe2uy; 0xf7uy; 0x95uy; 0x0... | false |
Spec.GaloisField.fst | Spec.GaloisField.fadd | val fadd (#f: field) (a b: felem f) : felem f | val fadd (#f: field) (a b: felem f) : felem f | let fadd (#f:field) (a:felem f) (b:felem f) : felem f = a ^. b | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 62,
"end_line": 33,
"start_col": 0,
"start_line": 33
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Spec.GaloisField.felem f -> b: Spec.GaloisField.felem f -> Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Lib.IntTypes.op_Hat_Dot",
"Spec.GaloisField.__proj__GF__item__t",
"Lib.IntTypes.SEC"
] | [] | false | false | false | false | false | let fadd (#f: field) (a b: felem f) : felem f =
| a ^. b | false |
Spec.GaloisField.fst | Spec.GaloisField.op_Star_At | val op_Star_At : e1: Spec.GaloisField.felem f -> e2: Spec.GaloisField.felem f -> Spec.GaloisField.felem f | let op_Star_At #f e1 e2 = fmul #f e1 e2 | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 51,
"start_col": 0,
"start_line": 51
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e1: Spec.GaloisField.felem f -> e2: Spec.GaloisField.felem f -> Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Spec.GaloisField.fmul"
] | [] | false | false | false | false | false | let ( *@ ) #f e1 e2 =
| fmul #f e1 e2 | false | |
Spec.GaloisField.fst | Spec.GaloisField.op_Plus_At | val op_Plus_At : e1: Spec.GaloisField.felem f -> e2: Spec.GaloisField.felem f -> Spec.GaloisField.felem f | let op_Plus_At #f e1 e2 = fadd #f e1 e2 | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 34,
"start_col": 0,
"start_line": 34
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e1: Spec.GaloisField.felem f -> e2: Spec.GaloisField.felem f -> Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Spec.GaloisField.fadd"
] | [] | false | false | false | false | false | let ( +@ ) #f e1 e2 =
| fadd #f e1 e2 | false | |
Spec.GaloisField.fst | Spec.GaloisField.op_Star_Star_At | val op_Star_Star_At : e1: Spec.GaloisField.felem f -> e2: n: Prims.nat{n >= 1} -> Spec.GaloisField.felem f | let op_Star_Star_At #f e1 e2 = fexp #f e1 e2 | {
"file_name": "specs/Spec.GaloisField.fst",
"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": 91
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e1: Spec.GaloisField.felem f -> e2: n: Prims.nat{n >= 1} -> Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Spec.GaloisField.fexp"
] | [] | false | false | false | false | false | let ( **@ ) #f e1 e2 =
| fexp #f e1 e2 | false | |
Spec.GaloisField.fst | Spec.GaloisField.gf | val gf : t: Lib.IntTypes.inttype{Lib.IntTypes.unsigned t /\ t <> Lib.IntTypes.U1} ->
irred: Lib.IntTypes.uint_t t Lib.IntTypes.SEC
-> Spec.GaloisField.field | let gf t irred = GF t irred | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 15,
"start_col": 0,
"start_line": 15
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
t: Lib.IntTypes.inttype{Lib.IntTypes.unsigned t /\ t <> Lib.IntTypes.U1} ->
irred: Lib.IntTypes.uint_t t Lib.IntTypes.SEC
-> Spec.GaloisField.field | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.op_disEquality",
"Lib.IntTypes.U1",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.SEC",
"Spec.GaloisField.GF",
"Spec.GaloisField.field"
] | [] | false | false | false | false | false | let gf t irred =
| GF t irred | false | |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.poly128 | val poly128 : Type0 | let poly128 = p:poly{degree p < 128} | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 28,
"start_col": 0,
"start_line": 28
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"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 | Type0 | Prims.Tot | [
"total"
] | [] | [
"Vale.Math.Poly2_s.poly",
"Prims.b2t",
"Prims.op_LessThan",
"Vale.Math.Poly2_s.degree"
] | [] | false | false | false | true | true | let poly128 =
| p: poly{degree p < 128} | false | |
Spec.GaloisField.fst | Spec.GaloisField.to_felem | val to_felem (#f: field) (n: nat{n <= maxint f.t}) : felem f | val to_felem (#f: field) (n: nat{n <= maxint f.t}) : felem f | let to_felem (#f:field) (n:nat{n <= maxint f.t}) : felem f = uint #f.t #SEC n | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 77,
"end_line": 17,
"start_col": 0,
"start_line": 17
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | n: Prims.nat{n <= Lib.IntTypes.maxint (GF?.t f)} -> Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Lib.IntTypes.maxint",
"Spec.GaloisField.__proj__GF__item__t",
"Lib.IntTypes.uint",
"Lib.IntTypes.SEC",
"Spec.GaloisField.felem"
] | [] | false | false | false | false | false | let to_felem (#f: field) (n: nat{n <= maxint f.t}) : felem f =
| uint #f.t #SEC n | false |
Spec.GaloisField.fst | Spec.GaloisField.from_felem | val from_felem (#f: field) (e: felem f) : n: nat{n <= maxint f.t} | val from_felem (#f: field) (e: felem f) : n: nat{n <= maxint f.t} | let from_felem (#f:field) (e:felem f) : n:nat{n <= maxint f.t} = uint_v #f.t #SEC e | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 83,
"end_line": 18,
"start_col": 0,
"start_line": 18
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e: Spec.GaloisField.felem f -> n: Prims.nat{n <= Lib.IntTypes.maxint (GF?.t f)} | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Lib.IntTypes.uint_v",
"Spec.GaloisField.__proj__GF__item__t",
"Lib.IntTypes.SEC",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Lib.IntTypes.maxint"
] | [] | false | false | false | false | false | let from_felem (#f: field) (e: felem f) : n: nat{n <= maxint f.t} =
| uint_v #f.t #SEC e | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.ghash_incremental | val ghash_incremental : _: Vale.Def.Types_s.quad32 ->
_: Vale.Def.Types_s.quad32 ->
_: FStar.Seq.Base.seq Vale.Def.Types_s.quad32
-> Prims.Tot Vale.Def.Types_s.quad32 | let ghash_incremental = opaque_make ghash_incremental_def | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 76,
"end_line": 87,
"start_col": 19,
"start_line": 87
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"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 |
_: Vale.Def.Types_s.quad32 ->
_: Vale.Def.Types_s.quad32 ->
_: FStar.Seq.Base.seq Vale.Def.Types_s.quad32
-> Prims.Tot Vale.Def.Types_s.quad32 | Prims.Tot | [
"total"
] | [] | [
"Vale.Def.Opaque_s.opaque_make",
"Vale.Def.Types_s.quad32",
"FStar.Seq.Base.seq",
"Vale.AES.GHash_BE.ghash_incremental_def"
] | [] | false | false | false | true | false | let ghash_incremental =
| opaque_make ghash_incremental_def | false | |
Spec.GaloisField.fst | Spec.GaloisField.zero | val zero (#f: field) : felem f | val zero (#f: field) : felem f | let zero (#f:field) : felem f = to_felem 0 | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 42,
"end_line": 20,
"start_col": 0,
"start_line": 20
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.to_felem",
"Spec.GaloisField.felem"
] | [] | false | false | false | false | false | let zero (#f: field) : felem f =
| to_felem 0 | false |
Spec.GaloisField.fst | Spec.GaloisField.one | val one (#f: field) : felem f | val one (#f: field) : felem f | let one (#f:field) : felem f = to_felem 1 | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 41,
"end_line": 21,
"start_col": 0,
"start_line": 21
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.to_felem",
"Spec.GaloisField.felem"
] | [] | false | false | false | false | false | let one (#f: field) : felem f =
| to_felem 1 | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.ghash_incremental0 | val ghash_incremental0 (h y_prev: quad32) (x: seq quad32) : quad32 | val ghash_incremental0 (h y_prev: quad32) (x: seq quad32) : quad32 | let ghash_incremental0 (h:quad32) (y_prev:quad32) (x:seq quad32) : quad32 =
if length x > 0 then ghash_incremental h y_prev x else y_prev | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 63,
"end_line": 117,
"start_col": 0,
"start_line": 116
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"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 |
h: Vale.Def.Types_s.quad32 ->
y_prev: Vale.Def.Types_s.quad32 ->
x: FStar.Seq.Base.seq Vale.Def.Types_s.quad32
-> Vale.Def.Types_s.quad32 | Prims.Tot | [
"total"
] | [] | [
"Vale.Def.Types_s.quad32",
"FStar.Seq.Base.seq",
"Prims.op_GreaterThan",
"FStar.Seq.Base.length",
"Vale.AES.GHash_BE.ghash_incremental",
"Prims.bool"
] | [] | false | false | false | true | false | let ghash_incremental0 (h y_prev: quad32) (x: seq quad32) : quad32 =
| if length x > 0 then ghash_incremental h y_prev x else y_prev | false |
LowStar.Lib.AssocList.fsti | LowStar.Lib.AssocList.map | val map : k: Prims.eqtype -> v: Type -> Type | let map (k: eqtype) v =
M.t k (option v) | {
"file_name": "krmllib/LowStar.Lib.AssocList.fsti",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 18,
"end_line": 28,
"start_col": 0,
"start_line": 27
} | module LowStar.Lib.AssocList
/// A Low*, stateful associative list that exposes a map-like interface.
module B = LowStar.Buffer
module HS = FStar.HyperStack
module G = FStar.Ghost
module L = FStar.List.Tot
module U32 = FStar.UInt32
module ST = FStar.HyperStack.ST
module M = FStar.Map
module LL2 = LowStar.Lib.LinkedL... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Lib.LinkedList2.fst.checked",
"LowStar.Lib.LinkedList.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Map.fsti.chec... | [
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": true,
"full_module": "LowStar.Lib.LinkedList",
"short_module": "LL1"
},
{
"abbrev": true,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 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 | k: Prims.eqtype -> v: Type -> Type | Prims.Tot | [
"total"
] | [] | [
"Prims.eqtype",
"FStar.Map.t",
"FStar.Pervasives.Native.option"
] | [] | false | false | false | true | true | let map (k: eqtype) v =
| M.t k (option v) | false | |
Spec.GaloisField.fst | Spec.GaloisField.reverse | val reverse (#t: inttype{unsigned t}) (a: uint_t t SEC) : uint_t t SEC | val reverse (#t: inttype{unsigned t}) (a: uint_t t SEC) : uint_t t SEC | let reverse (#t:inttype{unsigned t}) (a:uint_t t SEC) : uint_t t SEC =
repeati (bits t) (fun i u ->
u |. (((a >>. size i) &. uint #t #SEC 1) <<. (size (bits t - 1 - i)))) (uint #t #SEC 0) | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 91,
"end_line": 28,
"start_col": 0,
"start_line": 26
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Lib.IntTypes.uint_t t Lib.IntTypes.SEC -> Lib.IntTypes.uint_t t Lib.IntTypes.SEC | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.SEC",
"Lib.LoopCombinators.repeati",
"Lib.IntTypes.int_t",
"Lib.IntTypes.bits",
"Prims.nat",
"Prims.op_LessThan",
"Lib.IntTypes.op_Bar_Dot",
"Lib.IntTypes.op_Less_Less_Dot",
"Lib.IntTypes.op_Am... | [] | false | false | false | false | false | let reverse (#t: inttype{unsigned t}) (a: uint_t t SEC) : uint_t t SEC =
| repeati (bits t)
(fun i u -> u |. (((a >>. size i) &. uint #t #SEC 1) <<. (size (bits t - 1 - i))))
(uint #t #SEC 0) | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.ghash_poly | val ghash_poly (h init: poly) (data: (int -> poly128)) (j k: int) : Tot poly (decreases (k - j)) | val ghash_poly (h init: poly) (data: (int -> poly128)) (j k: int) : Tot poly (decreases (k - j)) | let rec ghash_poly (h:poly) (init:poly) (data:int -> poly128) (j:int) (k:int) : Tot poly (decreases (k - j)) =
if k <= j then init else
gf128_mul_rev (ghash_poly h init data j (k - 1) +. data (k - 1)) h | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 68,
"end_line": 35,
"start_col": 0,
"start_line": 33
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"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 |
h: Vale.Math.Poly2_s.poly ->
init: Vale.Math.Poly2_s.poly ->
data: (_: Prims.int -> Vale.AES.GHash_BE.poly128) ->
j: Prims.int ->
k: Prims.int
-> Prims.Tot Vale.Math.Poly2_s.poly | Prims.Tot | [
"total",
""
] | [] | [
"Vale.Math.Poly2_s.poly",
"Prims.int",
"Vale.AES.GHash_BE.poly128",
"Prims.op_LessThanOrEqual",
"Prims.bool",
"Vale.AES.GF128.gf128_mul_rev",
"Vale.Math.Poly2.op_Plus_Dot",
"Vale.AES.GHash_BE.ghash_poly",
"Prims.op_Subtraction"
] | [
"recursion"
] | false | false | false | true | false | let rec ghash_poly (h init: poly) (data: (int -> poly128)) (j k: int) : Tot poly (decreases (k - j)) =
| if k <= j then init else gf128_mul_rev (ghash_poly h init data j (k - 1) +. data (k - 1)) h | false |
Spec.GaloisField.fst | Spec.GaloisField.get_ith_bit | val get_ith_bit: #f:field -> x:felem f -> i:nat{i < bits f.t} ->
Tot (r:felem f{v r == v x / pow2 (bits f.t - 1 - i) % 2}) | val get_ith_bit: #f:field -> x:felem f -> i:nat{i < bits f.t} ->
Tot (r:felem f{v r == v x / pow2 (bits f.t - 1 - i) % 2}) | let get_ith_bit #f x i =
logand_mask (x >>. size (bits f.t - 1 - i)) one 1;
(x >>. size (bits f.t - 1 - i)) &. one | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 40,
"end_line": 57,
"start_col": 0,
"start_line": 55
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Spec.GaloisField.felem f -> i: Prims.nat{i < Lib.IntTypes.bits (GF?.t f)}
-> r:
Spec.GaloisField.felem f
{Lib.IntTypes.v r == Lib.IntTypes.v x / Prims.pow2 (Lib.IntTypes.bits (GF?.t f) - 1 - i) % 2} | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.bits",
"Spec.GaloisField.__proj__GF__item__t",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Greater_Greater_Dot",
"Lib.IntTypes.size",
"Prims.op_Subtraction",
"... | [] | false | false | false | false | false | let get_ith_bit #f x i =
| logand_mask (x >>. size (bits f.t - 1 - i)) one 1;
(x >>. size (bits f.t - 1 - i)) &. one | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.fun_seq_quad32_BE_poly128 | val fun_seq_quad32_BE_poly128 (s: seq quad32) : (int -> poly128) | val fun_seq_quad32_BE_poly128 (s: seq quad32) : (int -> poly128) | let fun_seq_quad32_BE_poly128 (s:seq quad32) : (int -> poly128) =
fun (i:int) -> if 0 <= i && i < length s then of_quad32 (index s i) else zero | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 79,
"end_line": 31,
"start_col": 0,
"start_line": 30
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"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 | s: FStar.Seq.Base.seq Vale.Def.Types_s.quad32 -> _: Prims.int -> Vale.AES.GHash_BE.poly128 | Prims.Tot | [
"total"
] | [] | [
"FStar.Seq.Base.seq",
"Vale.Def.Types_s.quad32",
"Prims.int",
"Prims.op_AmpAmp",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan",
"FStar.Seq.Base.length",
"Vale.Math.Poly2.Bits_s.of_quad32",
"FStar.Seq.Base.index",
"Prims.bool",
"Vale.Math.Poly2_s.zero",
"Vale.AES.GHash_BE.poly128"
] | [] | false | false | false | true | false | let fun_seq_quad32_BE_poly128 (s: seq quad32) : (int -> poly128) =
| fun (i: int) -> if 0 <= i && i < length s then of_quad32 (index s i) else zero | false |
Spec.GaloisField.fst | Spec.GaloisField.store_felem_le | val store_felem_le (#f: field) (e: felem f) : lbytes (numbytes f.t) | val store_felem_le (#f: field) (e: felem f) : lbytes (numbytes f.t) | let store_felem_le (#f:field) (e:felem f) : lbytes (numbytes f.t) = store_felem_be #f (reverse #f.t e) | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 102,
"end_line": 31,
"start_col": 0,
"start_line": 31
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e: Spec.GaloisField.felem f -> Lib.ByteSequence.lbytes (Lib.IntTypes.numbytes (GF?.t f)) | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Spec.GaloisField.store_felem_be",
"Spec.GaloisField.reverse",
"Spec.GaloisField.__proj__GF__item__t",
"Lib.ByteSequence.lbytes",
"Lib.IntTypes.numbytes"
] | [] | false | false | false | false | false | let store_felem_le (#f: field) (e: felem f) : lbytes (numbytes f.t) =
| store_felem_be #f (reverse #f.t e) | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.ghash_unroll | val ghash_unroll (h prev: poly) (data: (int -> poly128)) (k: int) (m n: nat) : poly | val ghash_unroll (h prev: poly) (data: (int -> poly128)) (k: int) (m n: nat) : poly | let rec ghash_unroll (h:poly) (prev:poly) (data:int -> poly128) (k:int) (m n:nat) : poly =
let d = data (k + m) in
let p = gf128_power h (n + 1) in
if m = 0 then (prev +. d) *. p else
ghash_unroll h prev data k (m - 1) (n + 1) +. d *. p | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 54,
"end_line": 61,
"start_col": 0,
"start_line": 57
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"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 |
h: Vale.Math.Poly2_s.poly ->
prev: Vale.Math.Poly2_s.poly ->
data: (_: Prims.int -> Vale.AES.GHash_BE.poly128) ->
k: Prims.int ->
m: Prims.nat ->
n: Prims.nat
-> Vale.Math.Poly2_s.poly | Prims.Tot | [
"total"
] | [] | [
"Vale.Math.Poly2_s.poly",
"Prims.int",
"Vale.AES.GHash_BE.poly128",
"Prims.nat",
"Prims.op_Equality",
"Vale.Math.Poly2.op_Star_Dot",
"Vale.Math.Poly2.op_Plus_Dot",
"Prims.bool",
"Vale.AES.GHash_BE.ghash_unroll",
"Prims.op_Subtraction",
"Prims.op_Addition",
"Vale.AES.GHash_BE.gf128_power"
] | [
"recursion"
] | false | false | false | true | false | let rec ghash_unroll (h prev: poly) (data: (int -> poly128)) (k: int) (m n: nat) : poly =
| let d = data (k + m) in
let p = gf128_power h (n + 1) in
if m = 0 then (prev +. d) *. p else ghash_unroll h prev data k (m - 1) (n + 1) +. d *. p | false |
Spec.GaloisField.fst | Spec.GaloisField.finv | val finv (#f: field) (a: felem f) : felem f | val finv (#f: field) (a: felem f) : felem f | let finv (#f:field) (a:felem f) : felem f =
fexp #f a (maxint f.t - 1) | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 28,
"end_line": 94,
"start_col": 0,
"start_line": 93
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Spec.GaloisField.felem f -> Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Spec.GaloisField.fexp",
"Prims.op_Subtraction",
"Lib.IntTypes.maxint",
"Spec.GaloisField.__proj__GF__item__t"
] | [] | false | false | false | false | false | let finv (#f: field) (a: felem f) : felem f =
| fexp #f a (maxint f.t - 1) | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.ghash_incremental_reveal | val ghash_incremental_reveal : _: Prims.unit
-> FStar.Pervasives.Lemma
(ensures Vale.AES.GHash_BE.ghash_incremental == Vale.AES.GHash_BE.ghash_incremental_def) | let ghash_incremental_reveal = opaque_revealer (`%ghash_incremental) ghash_incremental ghash_incremental_def | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 120,
"end_line": 88,
"start_col": 12,
"start_line": 88
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"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.AES.GHash_BE.ghash_incremental == Vale.AES.GHash_BE.ghash_incremental_def) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.Def.Opaque_s.opaque_revealer",
"Vale.Def.Types_s.quad32",
"FStar.Seq.Base.seq",
"Vale.AES.GHash_BE.ghash_incremental",
"Vale.AES.GHash_BE.ghash_incremental_def"
] | [] | true | false | true | false | false | let ghash_incremental_reveal =
| opaque_revealer (`%ghash_incremental) ghash_incremental ghash_incremental_def | false | |
Spec.GaloisField.fst | Spec.GaloisField.fmul | val fmul (#f: field) (a b: felem f) : felem f | val fmul (#f: field) (a b: felem f) : felem f | let fmul (#f:field) (a:felem f) (b:felem f) : felem f =
let one = one #f in
let zero = zero #f in
let (p,a,b) =
repeati (bits f.t - 1) (fun i (p,a,b) ->
let b0 = eq_mask #f.t (b &. one) one in
let p = p ^. (b0 &. a) in
let carry_mask = eq_mask #f.t (a >>. size (bits f.t - 1)) one in
let a =... | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 50,
"start_col": 0,
"start_line": 36
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Spec.GaloisField.felem f -> b: Spec.GaloisField.felem f -> Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Lib.IntTypes.int_t",
"Spec.GaloisField.__proj__GF__item__t",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Hat_Dot",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.eq_mask",
"FStar.Pervasives.Native.tuple3",
"Lib.LoopCombinators.repeati",
"Prims.op_Subtracti... | [] | false | false | false | false | false | let fmul (#f: field) (a b: felem f) : felem f =
| let one = one #f in
let zero = zero #f in
let p, a, b =
repeati (bits f.t - 1)
(fun i (p, a, b) ->
let b0 = eq_mask #f.t (b &. one) one in
let p = p ^. (b0 &. a) in
let carry_mask = eq_mask #f.t (a >>. size (bits f.t - 1)) one in
let a = a <<. size 1 in
let a = a ^. (carry_... | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.ghash_unroll_back | val ghash_unroll_back (h prev: poly) (data: (int -> poly128)) (k: int) (n m: nat) : poly | val ghash_unroll_back (h prev: poly) (data: (int -> poly128)) (k: int) (n m: nat) : poly | let rec ghash_unroll_back (h:poly) (prev:poly) (data:int -> poly128) (k:int) (n m:nat) : poly =
let d = data (k + (n - 1 - m)) in
let p = gf128_power h (m + 1) in
let v = if m = n - 1 then prev +. d else d in
if m = 0 then v *. p else
ghash_unroll_back h prev data k n (m - 1) +. v *. p | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 53,
"end_line": 69,
"start_col": 0,
"start_line": 64
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"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 |
h: Vale.Math.Poly2_s.poly ->
prev: Vale.Math.Poly2_s.poly ->
data: (_: Prims.int -> Vale.AES.GHash_BE.poly128) ->
k: Prims.int ->
n: Prims.nat ->
m: Prims.nat
-> Vale.Math.Poly2_s.poly | Prims.Tot | [
"total"
] | [] | [
"Vale.Math.Poly2_s.poly",
"Prims.int",
"Vale.AES.GHash_BE.poly128",
"Prims.nat",
"Prims.op_Equality",
"Vale.Math.Poly2.op_Star_Dot",
"Prims.bool",
"Vale.Math.Poly2.op_Plus_Dot",
"Vale.AES.GHash_BE.ghash_unroll_back",
"Prims.op_Subtraction",
"Vale.AES.GHash_BE.gf128_power",
"Prims.op_Addition"
... | [
"recursion"
] | false | false | false | true | false | let rec ghash_unroll_back (h prev: poly) (data: (int -> poly128)) (k: int) (n m: nat) : poly =
| let d = data (k + (n - 1 - m)) in
let p = gf128_power h (m + 1) in
let v = if m = n - 1 then prev +. d else d in
if m = 0 then v *. p else ghash_unroll_back h prev data k n (m - 1) +. v *. p | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.hkeys_reqs_priv | val hkeys_reqs_priv (hkeys: seq quad32) (h_BE: quad32) : Vale.Def.Prop_s.prop0 | val hkeys_reqs_priv (hkeys: seq quad32) (h_BE: quad32) : Vale.Def.Prop_s.prop0 | let hkeys_reqs_priv (hkeys:seq quad32) (h_BE:quad32) : Vale.Def.Prop_s.prop0
=
let h = of_quad32 h_BE in
length hkeys >= 3 /\
index hkeys 2 == h_BE /\
of_quad32 (index hkeys 0) == gf128_power h 1 /\
of_quad32 (index hkeys 1) == gf128_power h 2 | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 46,
"end_line": 51,
"start_col": 0,
"start_line": 45
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"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 | hkeys: FStar.Seq.Base.seq Vale.Def.Types_s.quad32 -> h_BE: Vale.Def.Types_s.quad32
-> Vale.Def.Prop_s.prop0 | Prims.Tot | [
"total"
] | [] | [
"FStar.Seq.Base.seq",
"Vale.Def.Types_s.quad32",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.Seq.Base.length",
"Prims.eq2",
"FStar.Seq.Base.index",
"Vale.Math.Poly2_s.poly",
"Vale.Math.Poly2.Bits_s.of_quad32",
"Vale.AES.GHash_BE.gf128_power",
"Vale.Def.Prop_s.prop0"
] | [] | false | false | false | true | false | let hkeys_reqs_priv (hkeys: seq quad32) (h_BE: quad32) : Vale.Def.Prop_s.prop0 =
| let h = of_quad32 h_BE in
length hkeys >= 3 /\ index hkeys 2 == h_BE /\ of_quad32 (index hkeys 0) == gf128_power h 1 /\
of_quad32 (index hkeys 1) == gf128_power h 2 | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.ghash_incremental_def | val ghash_incremental_def (h_BE y_prev: quad32) (x: seq quad32) : Tot quad32 (decreases %[length x]) | val ghash_incremental_def (h_BE y_prev: quad32) (x: seq quad32) : Tot quad32 (decreases %[length x]) | let rec ghash_incremental_def (h_BE:quad32) (y_prev:quad32) (x:seq quad32) : Tot quad32 (decreases %[length x]) =
if length x = 0 then y_prev else
let y_i_minus_1 = ghash_incremental_def h_BE y_prev (all_but_last x) in
let x_i = last x in
let xor_BE = quad32_xor y_i_minus_1 x_i in
gf128_mul_BE xor_BE h_BE | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 26,
"end_line": 86,
"start_col": 0,
"start_line": 81
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"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 |
h_BE: Vale.Def.Types_s.quad32 ->
y_prev: Vale.Def.Types_s.quad32 ->
x: FStar.Seq.Base.seq Vale.Def.Types_s.quad32
-> Prims.Tot Vale.Def.Types_s.quad32 | Prims.Tot | [
"total",
""
] | [] | [
"Vale.Def.Types_s.quad32",
"FStar.Seq.Base.seq",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.length",
"Prims.bool",
"Vale.AES.GHash_BE_s.gf128_mul_BE",
"Vale.Def.Types_s.quad32_xor",
"FStar.Seq.Properties.last",
"Vale.AES.GHash_BE.ghash_incremental_def",
"Vale.Lib.Seqs_s.all_but_last"
] | [
"recursion"
] | false | false | false | true | false | let rec ghash_incremental_def (h_BE y_prev: quad32) (x: seq quad32)
: Tot quad32 (decreases %[length x]) =
| if length x = 0
then y_prev
else
let y_i_minus_1 = ghash_incremental_def h_BE y_prev (all_but_last x) in
let x_i = last x in
let xor_BE = quad32_xor y_i_minus_1 x_i in
gf128_mul_BE xor_BE h_BE | false |
Spec.GaloisField.fst | Spec.GaloisField.fmul_be | val fmul_be (#f: field) (x y: felem f) : felem f | val fmul_be (#f: field) (x y: felem f) : felem f | let fmul_be (#f:field) (x:felem f) (y:felem f) : felem f =
let (res, y) = repeati (bits f.t) (fmul_be_f x) (zero, y) in
res | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 81,
"start_col": 0,
"start_line": 79
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Spec.GaloisField.felem f -> y: Spec.GaloisField.felem f -> Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"FStar.Pervasives.Native.tuple2",
"Lib.LoopCombinators.repeati",
"Lib.IntTypes.bits",
"Spec.GaloisField.__proj__GF__item__t",
"Spec.GaloisField.fmul_be_f",
"FStar.Pervasives.Native.Mktuple2",
"Spec.GaloisField.zero"
] | [] | false | false | false | false | false | let fmul_be (#f: field) (x y: felem f) : felem f =
| let res, y = repeati (bits f.t) (fmul_be_f x) (zero, y) in
res | false |
Spec.GaloisField.fst | Spec.GaloisField.load_felem_le | val load_felem_le (#f: field) (b: lbytes (numbytes f.t)) : felem f | val load_felem_le (#f: field) (b: lbytes (numbytes f.t)) : felem f | let load_felem_le (#f:field) (b:lbytes (numbytes f.t)) : felem f = reverse #f.t (load_felem_be #f b) | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 100,
"end_line": 30,
"start_col": 0,
"start_line": 30
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: Lib.ByteSequence.lbytes (Lib.IntTypes.numbytes (GF?.t f)) -> Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Lib.ByteSequence.lbytes",
"Lib.IntTypes.numbytes",
"Spec.GaloisField.__proj__GF__item__t",
"Spec.GaloisField.reverse",
"Spec.GaloisField.load_felem_be",
"Spec.GaloisField.felem"
] | [] | false | false | false | false | false | let load_felem_le (#f: field) (b: lbytes (numbytes f.t)) : felem f =
| reverse #f.t (load_felem_be #f b) | false |
Spec.GaloisField.fst | Spec.GaloisField.fmul_be_f | val fmul_be_f: #f:field -> x:felem f -> i:nat{i < bits f.t} -> res_y:tuple2 (felem f) (felem f) -> felem f & felem f | val fmul_be_f: #f:field -> x:felem f -> i:nat{i < bits f.t} -> res_y:tuple2 (felem f) (felem f) -> felem f & felem f | let fmul_be_f #f x i (res, y) =
let res = mask_add x y res i in
let y = mask_shift_right_mod y in
(res, y) | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 76,
"start_col": 0,
"start_line": 73
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
x: Spec.GaloisField.felem f ->
i: Prims.nat{i < Lib.IntTypes.bits (GF?.t f)} ->
res_y: (Spec.GaloisField.felem f * Spec.GaloisField.felem f)
-> Spec.GaloisField.felem f * Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.bits",
"Spec.GaloisField.__proj__GF__item__t",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.Mktuple2",
"Prims.eq2",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Prims.... | [] | false | false | false | false | false | let fmul_be_f #f x i (res, y) =
| let res = mask_add x y res i in
let y = mask_shift_right_mod y in
(res, y) | false |
Spec.GaloisField.fst | Spec.GaloisField.fexp | val fexp: #f:field -> a:felem f -> n:nat{n >= 1} -> Tot (felem f) (decreases n) | val fexp: #f:field -> a:felem f -> n:nat{n >= 1} -> Tot (felem f) (decreases n) | let rec fexp #f a x =
if x = 1 then a else
if x = 2 then fmul #f a a else
let r = fexp #f a (x / 2) in
let r' = fmul #f r r in
if (x % 2) = 0 then r'
else fmul #f a r' | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 19,
"end_line": 90,
"start_col": 0,
"start_line": 84
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Spec.GaloisField.felem f -> n: Prims.nat{n >= 1} -> Prims.Tot (Spec.GaloisField.felem f) | Prims.Tot | [
"total",
""
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Prims.nat",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"Spec.GaloisField.fmul",
"Prims.op_Modulus",
"Spec.GaloisField.fexp",
"Prims.op_Division"
] | [
"recursion"
] | false | false | false | false | false | let rec fexp #f a x =
| if x = 1
then a
else
if x = 2
then fmul #f a a
else
let r = fexp #f a (x / 2) in
let r' = fmul #f r r in
if (x % 2) = 0 then r' else fmul #f a r' | false |
Spec.GaloisField.fst | Spec.GaloisField.mask_shift_right_mod | val mask_shift_right_mod: #f:field -> y:felem f ->
Tot (r:felem f{r == (if v (get_ith_bit y (bits f.t - 1)) = 1 then (y >>. 1ul) `fadd` f.irred else (y >>. 1ul))}) | val mask_shift_right_mod: #f:field -> y:felem f ->
Tot (r:felem f{r == (if v (get_ith_bit y (bits f.t - 1)) = 1 then (y >>. 1ul) `fadd` f.irred else (y >>. 1ul))}) | let mask_shift_right_mod #f y =
logxor_lemma (y >>. 1ul) zero;
(y >>. 1ul) `fadd` (f.irred &. eq_mask #f.t (get_ith_bit y (bits f.t - 1)) one) | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 81,
"end_line": 69,
"start_col": 0,
"start_line": 67
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | y: Spec.GaloisField.felem f
-> r:
Spec.GaloisField.felem f
{ r ==
(match
Lib.IntTypes.v (Spec.GaloisField.get_ith_bit y (Lib.IntTypes.bits (GF?.t f) - 1)) = 1
with
| true -> Spec.GaloisField.fadd (y >>. 1ul) (GF?.irred f)
| _ -> y >>. 1ul) } | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Spec.GaloisField.fadd",
"Lib.IntTypes.op_Greater_Greater_Dot",
"Spec.GaloisField.__proj__GF__item__t",
"Lib.IntTypes.SEC",
"FStar.UInt32.__uint_to_t",
"Lib.IntTypes.op_Amp_Dot",
"Spec.GaloisField.__proj__GF__item__irred",
"Lib.IntTypes.eq_mask",... | [] | false | false | false | false | false | let mask_shift_right_mod #f y =
| logxor_lemma (y >>. 1ul) zero;
(y >>. 1ul) `fadd` (f.irred &. eq_mask #f.t (get_ith_bit y (bits f.t - 1)) one) | false |
Spec.GaloisField.fst | Spec.GaloisField.store_felem_be | val store_felem_be (#f: field) (e: felem f) : lbytes (numbytes f.t) | val store_felem_be (#f: field) (e: felem f) : lbytes (numbytes f.t) | let store_felem_be (#f:field) (e:felem f): lbytes (numbytes f.t) = uint_to_bytes_be #f.t #SEC e | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 95,
"end_line": 24,
"start_col": 0,
"start_line": 24
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e: Spec.GaloisField.felem f -> Lib.ByteSequence.lbytes (Lib.IntTypes.numbytes (GF?.t f)) | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Lib.ByteSequence.uint_to_bytes_be",
"Spec.GaloisField.__proj__GF__item__t",
"Lib.IntTypes.SEC",
"Lib.ByteSequence.lbytes",
"Lib.IntTypes.numbytes"
] | [] | false | false | false | false | false | let store_felem_be (#f: field) (e: felem f) : lbytes (numbytes f.t) =
| uint_to_bytes_be #f.t #SEC e | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.lemma_add_mul_zero_high | val lemma_add_mul_zero_high (a0 a1 b0 b1: poly)
: Lemma (requires a0 == zero \/ b0 == zero) (ensures add (mul a0 b0) (mul a1 b1) == mul a1 b1) | val lemma_add_mul_zero_high (a0 a1 b0 b1: poly)
: Lemma (requires a0 == zero \/ b0 == zero) (ensures add (mul a0 b0) (mul a1 b1) == mul a1 b1) | let lemma_add_mul_zero_high (a0 a1 b0 b1:poly) : Lemma
(requires a0 == zero \/ b0 == zero)
(ensures add (mul a0 b0) (mul a1 b1) == mul a1 b1)
=
lemma_mul_commute a0 b0;
lemma_mul_zero a0;
lemma_mul_zero b0;
lemma_add_commute (mul a0 b0) (mul a1 b1);
lemma_add_zero (mul a1 b1) | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 28,
"end_line": 192,
"start_col": 0,
"start_line": 184
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a0: Vale.Math.Poly2_s.poly ->
a1: Vale.Math.Poly2_s.poly ->
b0: Vale.Math.Poly2_s.poly ->
b1: Vale.Math.Poly2_s.poly
-> FStar.Pervasives.Lemma (requires a0 == Vale.Math.Poly2_s.zero \/ b0 == Vale.Math.Poly2_s.zero)
(ensures
Vale.Math.Poly2_s.add (Vale.Math.Poly2_s.mul a0 b0) (Vale.Math.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.Math.Poly2_s.poly",
"Vale.Math.Poly2.lemma_add_zero",
"Vale.Math.Poly2_s.mul",
"Prims.unit",
"Vale.Math.Poly2.lemma_add_commute",
"Vale.Math.Poly2.lemma_mul_zero",
"Vale.Math.Poly2.lemma_mul_commute",
"Prims.l_or",
"Prims.eq2",
"Vale.Math.Poly2_s.zero",
"Prims.squash",
"Vale.Math.Poly2_s... | [] | true | false | true | false | false | let lemma_add_mul_zero_high (a0 a1 b0 b1: poly)
: Lemma (requires a0 == zero \/ b0 == zero) (ensures add (mul a0 b0) (mul a1 b1) == mul a1 b1) =
| lemma_mul_commute a0 b0;
lemma_mul_zero a0;
lemma_mul_zero b0;
lemma_add_commute (mul a0 b0) (mul a1 b1);
lemma_add_zero (mul a1 b1) | false |
Spec.GaloisField.fst | Spec.GaloisField.mask_add | val mask_add: #f:field -> x:felem f -> y:felem f -> res:felem f -> i:nat{i < bits f.t} ->
Tot (r:felem f{r == (if v (get_ith_bit x i) = 1 then res `fadd` y else res)}) | val mask_add: #f:field -> x:felem f -> y:felem f -> res:felem f -> i:nat{i < bits f.t} ->
Tot (r:felem f{r == (if v (get_ith_bit x i) = 1 then res `fadd` y else res)}) | let mask_add #f x y res i =
logxor_lemma res zero;
res `fadd` (y &. eq_mask #f.t (get_ith_bit x i) one) | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 54,
"end_line": 63,
"start_col": 0,
"start_line": 61
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
x: Spec.GaloisField.felem f ->
y: Spec.GaloisField.felem f ->
res: Spec.GaloisField.felem f ->
i: Prims.nat{i < Lib.IntTypes.bits (GF?.t f)}
-> r:
Spec.GaloisField.felem f
{ r ==
(match Lib.IntTypes.v (Spec.GaloisField.get_ith_bit x i) = 1 with
| true -> Spec.GaloisField.f... | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Spec.GaloisField.felem",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.bits",
"Spec.GaloisField.__proj__GF__item__t",
"Spec.GaloisField.fadd",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.SEC",
"Lib.IntTypes.eq_mask",
"Spec.GaloisField.get_ith_bit",
"Spe... | [] | false | false | false | false | false | let mask_add #f x y res i =
| logxor_lemma res zero;
res `fadd` (y &. eq_mask #f.t (get_ith_bit x i) one) | false |
Vale.AES.GHash_BE.fsti | Vale.AES.GHash_BE.lemma_add_mul_zero_low | val lemma_add_mul_zero_low (a0 a1 b0 b1: poly)
: Lemma (requires a1 == zero \/ b1 == zero) (ensures add (mul a0 b0) (mul a1 b1) == mul a0 b0) | val lemma_add_mul_zero_low (a0 a1 b0 b1: poly)
: Lemma (requires a1 == zero \/ b1 == zero) (ensures add (mul a0 b0) (mul a1 b1) == mul a0 b0) | let lemma_add_mul_zero_low (a0 a1 b0 b1:poly) : Lemma
(requires a1 == zero \/ b1 == zero)
(ensures add (mul a0 b0) (mul a1 b1) == mul a0 b0)
=
lemma_mul_commute a1 b1;
lemma_mul_zero a1;
lemma_mul_zero b1;
lemma_add_zero (mul a0 b0) | {
"file_name": "vale/code/crypto/aes/Vale.AES.GHash_BE.fsti",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 28,
"end_line": 182,
"start_col": 0,
"start_line": 175
} | module Vale.AES.GHash_BE
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.AES.GHash_BE_s
open Vale.AES.GF128_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCM_helpers_BE
open Vale.Lib.Seqs_s
open Vale.Lib.Seqs
open FStar.Seq
open Vale.Math.Poly2_s
open Vale.Math.Poly2
open Va... | {
"checked_file": "/",
"dependencies": [
"Vale.Math.Poly2_s.fsti.checked",
"Vale.Math.Poly2.Words.fsti.checked",
"Vale.Math.Poly2.Lemmas.fsti.checked",
"Vale.Math.Poly2.Bits_s.fsti.checked",
"Vale.Math.Poly2.Bits.fsti.checked",
"Vale.Math.Poly2.fsti.checked",
"Vale.Lib.Seqs_s.fst.checked... | [
{
"abbrev": false,
"full_module": "Vale.Def.Words.Seq_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Lemmas",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Math.Poly2.Words",
"short_module": null
},
{
"abbrev": fal... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a0: Vale.Math.Poly2_s.poly ->
a1: Vale.Math.Poly2_s.poly ->
b0: Vale.Math.Poly2_s.poly ->
b1: Vale.Math.Poly2_s.poly
-> FStar.Pervasives.Lemma (requires a1 == Vale.Math.Poly2_s.zero \/ b1 == Vale.Math.Poly2_s.zero)
(ensures
Vale.Math.Poly2_s.add (Vale.Math.Poly2_s.mul a0 b0) (Vale.Math.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.Math.Poly2_s.poly",
"Vale.Math.Poly2.lemma_add_zero",
"Vale.Math.Poly2_s.mul",
"Prims.unit",
"Vale.Math.Poly2.lemma_mul_zero",
"Vale.Math.Poly2.lemma_mul_commute",
"Prims.l_or",
"Prims.eq2",
"Vale.Math.Poly2_s.zero",
"Prims.squash",
"Vale.Math.Poly2_s.add",
"Prims.Nil",
"FStar.Pervasiv... | [] | true | false | true | false | false | let lemma_add_mul_zero_low (a0 a1 b0 b1: poly)
: Lemma (requires a1 == zero \/ b1 == zero) (ensures add (mul a0 b0) (mul a1 b1) == mul a0 b0) =
| lemma_mul_commute a1 b1;
lemma_mul_zero a1;
lemma_mul_zero b1;
lemma_add_zero (mul a0 b0) | false |
Spec.GaloisField.fst | Spec.GaloisField.load_felem_be | val load_felem_be (#f: field) (b: lbytes (numbytes f.t)) : felem f | val load_felem_be (#f: field) (b: lbytes (numbytes f.t)) : felem f | let load_felem_be (#f:field) (b:lbytes (numbytes f.t)) : felem f = uint_from_bytes_be #f.t #SEC b | {
"file_name": "specs/Spec.GaloisField.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 97,
"end_line": 23,
"start_col": 0,
"start_line": 23
} | module Spec.GaloisField
open Lib.IntTypes
open Lib.Sequence
open Lib.LoopCombinators
open Lib.ByteSequence
(* We represent GF(2^n) by uint_t along with some irreducible polynomial also of type uint_t *)
(* Consequently this module is specialized for GF(8/16/32/64/128) but can be generalized to other sizes if needed ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.chec... | [
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: Lib.ByteSequence.lbytes (Lib.IntTypes.numbytes (GF?.t f)) -> Spec.GaloisField.felem f | Prims.Tot | [
"total"
] | [] | [
"Spec.GaloisField.field",
"Lib.ByteSequence.lbytes",
"Lib.IntTypes.numbytes",
"Spec.GaloisField.__proj__GF__item__t",
"Lib.ByteSequence.uint_from_bytes_be",
"Lib.IntTypes.SEC",
"Spec.GaloisField.felem"
] | [] | false | false | false | false | false | let load_felem_be (#f: field) (b: lbytes (numbytes f.t)) : felem f =
| uint_from_bytes_be #f.t #SEC b | false |
Hacl.Hash.MD.fst | Hacl.Hash.MD.mk_update_last | val mk_update_last: a:legacy_alg -> update_multi_st (|a, ()|) -> pad_st a -> update_last_st (|a, ()|) | val mk_update_last: a:legacy_alg -> update_multi_st (|a, ()|) -> pad_st a -> update_last_st (|a, ()|) | let mk_update_last a update_multi =
assert_norm(block_length a > 0);
fun pad s prev_len input input_len ->
ST.push_frame ();
let h0 = ST.get () in
(* Get a series of complete blocks. *)
let blocks_n = U32.(input_len /^ block_len a) in
Math.Lemmas.nat_times_nat_is_nat (UInt32.v blocks_n) (block_length a);... | {
"file_name": "code/hash/Hacl.Hash.MD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 17,
"end_line": 220,
"start_col": 0,
"start_line": 139
} | module Hacl.Hash.MD
(** The Merkle-Damgård construction. *)
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module Int = Lib.IntTypes
module Lemmas = FStar.Math.Lemmas
module B = LowStar.Buffer
module S = FStar.Seq
module HS = FStar.HyperStack
module ST = FStar.... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.MD.fst.checked",
"Spec.Hash.Lemmas.fsti.checked",
"Spec.Hash.Incremental.fsti.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fst.checked",
"Spec.Agile.Hash.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.chec... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "AH"
},
{
"abbrev": true,
"full_module": "Spec.Hash.Incremental",
"short_module": "HI"
},
{
"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: Hacl.Hash.MD.legacy_alg ->
update_multi: Hacl.Hash.Definitions.update_multi_st (| a, () |) ->
_: Hacl.Hash.Definitions.pad_st a
-> Hacl.Hash.Definitions.update_last_st (| a, () |) | Prims.Tot | [
"total"
] | [] | [
"Hacl.Hash.MD.legacy_alg",
"Hacl.Hash.Definitions.update_multi_st",
"Prims.Mkdtuple2",
"Spec.Hash.Definitions.hash_alg",
"Hacl.Hash.Definitions.m_spec",
"Hacl.Hash.Definitions.pad_st",
"Hacl.Hash.Definitions.state",
"Hacl.Hash.Definitions.prev_len_t",
"Hacl.Hash.Definitions.get_alg",
"LowStar.Buff... | [] | false | false | false | false | false | let mk_update_last a update_multi =
| assert_norm (block_length a > 0);
fun pad s prev_len input input_len ->
ST.push_frame ();
let h0 = ST.get () in
let blocks_n = let open U32 in input_len /^ block_len a in
Math.Lemmas.nat_times_nat_is_nat (UInt32.v blocks_n) (block_length a);
Math.Lemmas.euclidean_division_definition (U32.v input_len) (block_l... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_two_sqr64_wide | val lemma_add_two_sqr64_wide (md:nat) (d:uint128) (a3 a4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 64193 /\
felem_fits1 a3 64 /\ felem_fits_last1 a4 64)
(ensures
(let d1 = d +. mul64_wide a3 (a4 *. u64 2) in
v d1 == v d + v a3 * v a4 + v a4 * v a3 /\
v d1 <= 513 * (max52 * max52))) | val lemma_add_two_sqr64_wide (md:nat) (d:uint128) (a3 a4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 64193 /\
felem_fits1 a3 64 /\ felem_fits_last1 a4 64)
(ensures
(let d1 = d +. mul64_wide a3 (a4 *. u64 2) in
v d1 == v d + v a3 * v a4 + v a4 * v a3 /\
v d1 <= 513 * (max52 * max52))) | let lemma_add_two_sqr64_wide md d a3 a4 =
assert_norm (max48 < max52);
lemma_mul_by2 64 max48 a4;
lemma_bound_mul64_wide 64 128 max52 max48 a3 (a4 *. u64 2);
assert (v d + v a3 * (v a4 * 2) <= md * max52 + 8192 * (max52 * max48));
calc (<) {
md * max52 + 8192 * (max52 * max48);
(<=) { lemma_16_max52_... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 60,
"end_line": 851,
"start_col": 0,
"start_line": 835
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"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 | md: Prims.nat -> d: Lib.IntTypes.uint128 -> a3: Lib.IntTypes.uint64 -> a4: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <= md * Hacl.Spec.K256.Field52.Definitions.max52 /\ md <= 64193 /\
Hacl.Spec.K256.Field52.Definitions.felem_fits1 a3 64 /\
Hacl.Spec.K256.Fi... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Pr... | [] | false | false | true | false | false | let lemma_add_two_sqr64_wide md d a3 a4 =
| assert_norm (max48 < max52);
lemma_mul_by2 64 max48 a4;
lemma_bound_mul64_wide 64 128 max52 max48 a3 (a4 *. u64 2);
assert (v d + v a3 * (v a4 * 2) <= md * max52 + 8192 * (max52 * max48));
calc ( < ) {
md * max52 + 8192 * (max52 * max48);
( <= ) { lemma_16_max52_max48 512 }
md * max52 + 512 * (max52 * max52);
(... | false |
FStar.Tactics.Typeclasses.fsti | FStar.Tactics.Typeclasses.solve | val solve (#a: Type) (#[tcresolve ()] ev: a) : Tot a | val solve (#a: Type) (#[tcresolve ()] ev: a) : Tot a | let solve (#a:Type) (#[tcresolve ()] ev : a) : Tot a = ev | {
"file_name": "ulib/FStar.Tactics.Typeclasses.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 64,
"end_line": 42,
"start_col": 7,
"start_line": 42
} | (*
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.Effect.fsti.checked",
"FStar.Stubs.Reflection.Types.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Tactics.Typeclasses.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Stubs.Reflection.Types (* for `decls` *)",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Stubs.Reflection.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Tactics.Effect",
"short_module": ... | {
"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 | a | Prims.Tot | [
"total"
] | [] | [] | [] | false | false | false | true | false | let solve (#a: Type) (#[tcresolve ()] ev: a) : Tot a =
| ev | false |
Hacl.Chacha20Poly1305_256.fst | Hacl.Chacha20Poly1305_256.encrypt | val encrypt:aead_encrypt_st M256 | val encrypt:aead_encrypt_st M256 | let encrypt : aead_encrypt_st M256 =
chacha20poly1305_aead_encrypt_higher #M256 True poly1305_do_256 Hacl.Chacha20.Vec256.chacha20_encrypt_256 | {
"file_name": "code/chacha20poly1305/Hacl.Chacha20Poly1305_256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 107,
"end_line": 32,
"start_col": 0,
"start_line": 31
} | module Hacl.Chacha20Poly1305_256
open Hacl.Meta.Chacha20Poly1305
open Hacl.Impl.Chacha20Poly1305
open Hacl.Impl.Poly1305.Fields
open Hacl.Poly1305_256
#set-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
[@CInline]
private
let poly1305_padded_256 = Hacl.Impl.Chacha20Poly1305.PolyCore.poly1305_padded #M256
[@CInl... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Hacl.Poly1305_256.fsti.checked",
"Hacl.Meta.Chacha20Poly1305.fst.checked",
"Hacl.Impl.Poly1305.Fields.fst.checked",
"Hacl.Impl.Chacha20Poly1305.PolyCore.fst.checked",
"Hacl.Impl.Chacha20Poly1305.fst.checked",
"Hacl.Chacha20.V... | [
{
"abbrev": false,
"full_module": "Hacl.Poly1305_256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Poly1305.Fields",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Chacha20Poly1305",
"short_module": null
},
{
"abbrev"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Hacl.Impl.Chacha20Poly1305.aead_encrypt_st Hacl.Impl.Poly1305.Fields.M256 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Meta.Chacha20Poly1305.chacha20poly1305_aead_encrypt_higher",
"Hacl.Impl.Poly1305.Fields.M256",
"Prims.l_True",
"Hacl.Chacha20Poly1305_256.poly1305_do_256",
"Hacl.Chacha20.Vec256.chacha20_encrypt_256"
] | [] | false | false | false | true | false | let encrypt:aead_encrypt_st M256 =
| chacha20poly1305_aead_encrypt_higher #M256
True
poly1305_do_256
Hacl.Chacha20.Vec256.chacha20_encrypt_256 | false |
Hacl.Chacha20Poly1305_256.fst | Hacl.Chacha20Poly1305_256.decrypt | val decrypt:aead_decrypt_st M256 | val decrypt:aead_decrypt_st M256 | let decrypt : aead_decrypt_st M256 =
chacha20poly1305_aead_decrypt_higher #M256 True Hacl.Chacha20.Vec256.chacha20_encrypt_256 poly1305_do_256 | {
"file_name": "code/chacha20poly1305/Hacl.Chacha20Poly1305_256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 107,
"end_line": 53,
"start_col": 0,
"start_line": 52
} | module Hacl.Chacha20Poly1305_256
open Hacl.Meta.Chacha20Poly1305
open Hacl.Impl.Chacha20Poly1305
open Hacl.Impl.Poly1305.Fields
open Hacl.Poly1305_256
#set-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
[@CInline]
private
let poly1305_padded_256 = Hacl.Impl.Chacha20Poly1305.PolyCore.poly1305_padded #M256
[@CInl... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Hacl.Poly1305_256.fsti.checked",
"Hacl.Meta.Chacha20Poly1305.fst.checked",
"Hacl.Impl.Poly1305.Fields.fst.checked",
"Hacl.Impl.Chacha20Poly1305.PolyCore.fst.checked",
"Hacl.Impl.Chacha20Poly1305.fst.checked",
"Hacl.Chacha20.V... | [
{
"abbrev": false,
"full_module": "Hacl.Poly1305_256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Poly1305.Fields",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Chacha20Poly1305",
"short_module": null
},
{
"abbrev"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Hacl.Impl.Chacha20Poly1305.aead_decrypt_st Hacl.Impl.Poly1305.Fields.M256 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Meta.Chacha20Poly1305.chacha20poly1305_aead_decrypt_higher",
"Hacl.Impl.Poly1305.Fields.M256",
"Prims.l_True",
"Hacl.Chacha20.Vec256.chacha20_encrypt_256",
"Hacl.Chacha20Poly1305_256.poly1305_do_256"
] | [] | false | false | false | true | false | let decrypt:aead_decrypt_st M256 =
| chacha20poly1305_aead_decrypt_higher #M256
True
Hacl.Chacha20.Vec256.chacha20_encrypt_256
poly1305_do_256 | false |
Hacl.Chacha20Poly1305_256.fst | Hacl.Chacha20Poly1305_256.poly1305_do_256 | val poly1305_do_256 : Hacl.Meta.Chacha20Poly1305.chacha20poly1305_poly1305_do_higher_t Prims.l_True | let poly1305_do_256 = chacha20poly1305_poly1305_do_higher #M256 True poly1305_finish poly1305_init poly1305_padded_256 | {
"file_name": "code/chacha20poly1305/Hacl.Chacha20Poly1305_256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 118,
"end_line": 16,
"start_col": 0,
"start_line": 16
} | module Hacl.Chacha20Poly1305_256
open Hacl.Meta.Chacha20Poly1305
open Hacl.Impl.Chacha20Poly1305
open Hacl.Impl.Poly1305.Fields
open Hacl.Poly1305_256
#set-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
[@CInline]
private
let poly1305_padded_256 = Hacl.Impl.Chacha20Poly1305.PolyCore.poly1305_padded #M256
[@CInl... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Hacl.Poly1305_256.fsti.checked",
"Hacl.Meta.Chacha20Poly1305.fst.checked",
"Hacl.Impl.Poly1305.Fields.fst.checked",
"Hacl.Impl.Chacha20Poly1305.PolyCore.fst.checked",
"Hacl.Impl.Chacha20Poly1305.fst.checked",
"Hacl.Chacha20.V... | [
{
"abbrev": false,
"full_module": "Hacl.Poly1305_256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Poly1305.Fields",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Chacha20Poly1305",
"short_module": null
},
{
"abbrev"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Hacl.Meta.Chacha20Poly1305.chacha20poly1305_poly1305_do_higher_t Prims.l_True | Prims.Tot | [
"total"
] | [] | [
"Hacl.Meta.Chacha20Poly1305.chacha20poly1305_poly1305_do_higher",
"Hacl.Impl.Poly1305.Fields.M256",
"Prims.l_True",
"Hacl.Poly1305_256.poly1305_finish",
"Hacl.Poly1305_256.poly1305_init",
"Hacl.Chacha20Poly1305_256.poly1305_padded_256"
] | [] | false | false | false | true | false | let poly1305_do_256 =
| chacha20poly1305_poly1305_do_higher #M256 True poly1305_finish poly1305_init poly1305_padded_256 | false | |
Hacl.Chacha20Poly1305_256.fst | Hacl.Chacha20Poly1305_256.poly1305_padded_256 | val poly1305_padded_256 : Hacl.Impl.Chacha20Poly1305.PolyCore.poly1305_padded_st Hacl.Impl.Poly1305.Fields.M256 | let poly1305_padded_256 = Hacl.Impl.Chacha20Poly1305.PolyCore.poly1305_padded #M256 | {
"file_name": "code/chacha20poly1305/Hacl.Chacha20Poly1305_256.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 83,
"end_line": 12,
"start_col": 0,
"start_line": 12
} | module Hacl.Chacha20Poly1305_256
open Hacl.Meta.Chacha20Poly1305
open Hacl.Impl.Chacha20Poly1305
open Hacl.Impl.Poly1305.Fields
open Hacl.Poly1305_256
#set-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
[@CInline] | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Hacl.Poly1305_256.fsti.checked",
"Hacl.Meta.Chacha20Poly1305.fst.checked",
"Hacl.Impl.Poly1305.Fields.fst.checked",
"Hacl.Impl.Chacha20Poly1305.PolyCore.fst.checked",
"Hacl.Impl.Chacha20Poly1305.fst.checked",
"Hacl.Chacha20.V... | [
{
"abbrev": false,
"full_module": "Hacl.Poly1305_256",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Poly1305.Fields",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Impl.Chacha20Poly1305",
"short_module": null
},
{
"abbrev"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Hacl.Impl.Chacha20Poly1305.PolyCore.poly1305_padded_st Hacl.Impl.Poly1305.Fields.M256 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Impl.Chacha20Poly1305.PolyCore.poly1305_padded",
"Hacl.Impl.Poly1305.Fields.M256"
] | [] | false | false | false | true | false | let poly1305_padded_256 =
| Hacl.Impl.Chacha20Poly1305.PolyCore.poly1305_padded #M256 | false | |
Hacl.Bignum25519.fst | Hacl.Bignum25519.fsum | val fsum:
out:felem
-> a:felem
-> b:felem ->
Stack unit
(requires fun h -> live h a /\ live h b /\ live h out /\
eq_or_disjoint a b /\ eq_or_disjoint a out /\ eq_or_disjoint b out /\
F51.felem_fits h a (1, 2, 1, 1, 1) /\
F51.felem_fits h b (1, 2, 1, 1, 1)
)
(ensures fun h0 _ h1 ... | val fsum:
out:felem
-> a:felem
-> b:felem ->
Stack unit
(requires fun h -> live h a /\ live h b /\ live h out /\
eq_or_disjoint a b /\ eq_or_disjoint a out /\ eq_or_disjoint b out /\
F51.felem_fits h a (1, 2, 1, 1, 1) /\
F51.felem_fits h b (1, 2, 1, 1, 1)
)
(ensures fun h0 _ h1 ... | let fsum out a b =
BN.fadd out a b | {
"file_name": "code/ed25519/Hacl.Bignum25519.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 17,
"end_line": 64,
"start_col": 0,
"start_line": 63
} | module Hacl.Bignum25519
module ST = FStar.HyperStack.ST
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module S51 = Hacl.Spec.Curve25519.Field51.Definition
module SL51 = Hacl.Spec.Curve25519.Field51.Lemmas
modu... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "SC"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Field51",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Field51.Lemmas",
"short_module": "SL51"
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | out: Hacl.Bignum25519.felem -> a: Hacl.Bignum25519.felem -> b: Hacl.Bignum25519.felem
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum25519.felem",
"Hacl.Impl.Curve25519.Field51.fadd",
"Prims.unit"
] | [] | false | true | false | false | false | let fsum out a b =
| BN.fadd out a b | false |
Hacl.Bignum25519.fst | Hacl.Bignum25519.fdifference | val fdifference:
out:felem
-> a:felem
-> b:felem ->
Stack unit
(requires fun h -> live h a /\ live h b /\ live h out /\
eq_or_disjoint a b /\ eq_or_disjoint a out /\ eq_or_disjoint b out /\
F51.felem_fits h a (1, 2, 1, 1, 1) /\
F51.felem_fits h b (1, 2, 1, 1, 1)
)
(ensures fun h... | val fdifference:
out:felem
-> a:felem
-> b:felem ->
Stack unit
(requires fun h -> live h a /\ live h b /\ live h out /\
eq_or_disjoint a b /\ eq_or_disjoint a out /\ eq_or_disjoint b out /\
F51.felem_fits h a (1, 2, 1, 1, 1) /\
F51.felem_fits h b (1, 2, 1, 1, 1)
)
(ensures fun h... | let fdifference out a b =
BN.fsub out a b | {
"file_name": "code/ed25519/Hacl.Bignum25519.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 17,
"end_line": 69,
"start_col": 0,
"start_line": 68
} | module Hacl.Bignum25519
module ST = FStar.HyperStack.ST
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module S51 = Hacl.Spec.Curve25519.Field51.Definition
module SL51 = Hacl.Spec.Curve25519.Field51.Lemmas
modu... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "SC"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Field51",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Field51.Lemmas",
"short_module": "SL51"
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | out: Hacl.Bignum25519.felem -> a: Hacl.Bignum25519.felem -> b: Hacl.Bignum25519.felem
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum25519.felem",
"Hacl.Impl.Curve25519.Field51.fsub",
"Prims.unit"
] | [] | false | true | false | false | false | let fdifference out a b =
| BN.fsub out a b | false |
Hacl.Bignum25519.fst | Hacl.Bignum25519.mask_51 | val mask_51 : u8: Lib.IntTypes.uint64{Lib.IntTypes.v u8 == 0x7ffffffffffff} | let mask_51 = u64 0x7ffffffffffff | {
"file_name": "code/ed25519/Hacl.Bignum25519.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 24,
"start_col": 0,
"start_line": 24
} | module Hacl.Bignum25519
module ST = FStar.HyperStack.ST
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module S51 = Hacl.Spec.Curve25519.Field51.Definition
module SL51 = Hacl.Spec.Curve25519.Field51.Lemmas
modu... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "SC"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Field51",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Field51.Lemmas",
"short_module": "SL51"
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | u8: Lib.IntTypes.uint64{Lib.IntTypes.v u8 == 0x7ffffffffffff} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.u64"
] | [] | false | false | false | false | false | let mask_51 =
| u64 0x7ffffffffffff | false | |
Hacl.Bignum25519.fst | Hacl.Bignum25519.carry51 | val carry51:
#m:S51.scale64{m < 8192}
-> l:uint64
-> cin:uint64 ->
Pure (uint64 & uint64)
(requires
S51.felem_fits1 l m /\
S51.felem_fits1 cin 1)
(ensures fun (l0, l1) ->
v l + v cin == v l1 * pow2 51 + v l0 /\
S51.felem_fits1 l0 1 /\ uint_v l1 < m + 1) | val carry51:
#m:S51.scale64{m < 8192}
-> l:uint64
-> cin:uint64 ->
Pure (uint64 & uint64)
(requires
S51.felem_fits1 l m /\
S51.felem_fits1 cin 1)
(ensures fun (l0, l1) ->
v l + v cin == v l1 * pow2 51 + v l0 /\
S51.felem_fits1 l0 1 /\ uint_v l1 < m + 1) | let carry51 l cin =
let l' = l +! cin in
mod_mask_lemma l' 51ul;
assert (v (mod_mask #U64 #SEC 51ul) == v mask_51);
FStar.Math.Lemmas.pow2_modulo_modulo_lemma_1 (v l') 51 64;
FStar.Math.Lemmas.euclidean_division_definition (v l') (pow2 51);
FStar.Math.Lemmas.pow2_minus 64 51;
(l' &. mask_51, l' >>. 51ul) | {
"file_name": "code/ed25519/Hacl.Bignum25519.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 92,
"start_col": 0,
"start_line": 85
} | module Hacl.Bignum25519
module ST = FStar.HyperStack.ST
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module S51 = Hacl.Spec.Curve25519.Field51.Definition
module SL51 = Hacl.Spec.Curve25519.Field51.Lemmas
modu... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "SC"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Field51",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Field51.Lemmas",
"short_module": "SL51"
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Lib.IntTypes.uint64 -> cin: Lib.IntTypes.uint64
-> Prims.Pure (Lib.IntTypes.uint64 * Lib.IntTypes.uint64) | Prims.Pure | [] | [] | [
"Hacl.Spec.Curve25519.Field51.Definition.scale64",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple2",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Hacl.Bignum25519.mask_51",
"Lib.IntTypes.op_Greater_Greater_Dot",
"FStar.UInt32.__ui... | [] | false | false | false | false | false | let carry51 l cin =
| let l' = l +! cin in
mod_mask_lemma l' 51ul;
assert (v (mod_mask #U64 #SEC 51ul) == v mask_51);
FStar.Math.Lemmas.pow2_modulo_modulo_lemma_1 (v l') 51 64;
FStar.Math.Lemmas.euclidean_division_definition (v l') (pow2 51);
FStar.Math.Lemmas.pow2_minus 64 51;
(l' &. mask_51, l' >>. 51ul) | false |
Hacl.Bignum25519.fst | Hacl.Bignum25519.make_u64_5 | val make_u64_5:
b:lbuffer uint64 5ul
-> s0:uint64 -> s1:uint64 -> s2:uint64 -> s3:uint64 -> s4:uint64 ->
Stack unit
(requires fun h -> live h b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
F51.as_felem h1 b == (s0, s1, s2, s3, s4) /\
F51.as_nat h1 b == S51.as_nat5 (s0, s1, s2, s3, s4)... | val make_u64_5:
b:lbuffer uint64 5ul
-> s0:uint64 -> s1:uint64 -> s2:uint64 -> s3:uint64 -> s4:uint64 ->
Stack unit
(requires fun h -> live h b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
F51.as_felem h1 b == (s0, s1, s2, s3, s4) /\
F51.as_nat h1 b == S51.as_nat5 (s0, s1, s2, s3, s4)... | let make_u64_5 b s0 s1 s2 s3 s4 =
b.(0ul) <- s0;
b.(1ul) <- s1;
b.(2ul) <- s2;
b.(3ul) <- s3;
b.(4ul) <- s4 | {
"file_name": "code/ed25519/Hacl.Bignum25519.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 31,
"start_col": 0,
"start_line": 26
} | module Hacl.Bignum25519
module ST = FStar.HyperStack.ST
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module S51 = Hacl.Spec.Curve25519.Field51.Definition
module SL51 = Hacl.Spec.Curve25519.Field51.Lemmas
modu... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "SC"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Field51",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Field51.Lemmas",
"short_module": "SL51"
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b: Lib.Buffer.lbuffer Lib.IntTypes.uint64 5ul ->
s0: Lib.IntTypes.uint64 ->
s1: Lib.IntTypes.uint64 ->
s2: Lib.IntTypes.uint64 ->
s3: Lib.IntTypes.uint64 ->
s4: Lib.IntTypes.uint64
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint64",
"FStar.UInt32.__uint_to_t",
"Lib.Buffer.op_Array_Assignment",
"Prims.unit"
] | [] | false | true | false | false | false | let make_u64_5 b s0 s1 s2 s3 s4 =
| b.(0ul) <- s0;
b.(1ul) <- s1;
b.(2ul) <- s2;
b.(3ul) <- s3;
b.(4ul) <- s4 | false |
Hacl.Bignum25519.fst | Hacl.Bignum25519.fsquare | val fsquare:
out:felem
-> a:felem ->
Stack unit
(requires fun h -> live h out /\ live h a /\ eq_or_disjoint a out /\
F51.felem_fits h a (9, 10, 9, 9, 9)
)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F51.mul_inv_t h1 out /\
F51.fevalh h1 out == F51.fevalh h0 a `SC.fmul` F51... | val fsquare:
out:felem
-> a:felem ->
Stack unit
(requires fun h -> live h out /\ live h a /\ eq_or_disjoint a out /\
F51.felem_fits h a (9, 10, 9, 9, 9)
)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F51.mul_inv_t h1 out /\
F51.fevalh h1 out == F51.fevalh h0 a `SC.fmul` F51... | let fsquare out a =
push_frame();
let tmp = create 5ul (u128 0) in
BN.fsqr out a tmp;
pop_frame() | {
"file_name": "code/ed25519/Hacl.Bignum25519.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 13,
"end_line": 216,
"start_col": 0,
"start_line": 212
} | module Hacl.Bignum25519
module ST = FStar.HyperStack.ST
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module S51 = Hacl.Spec.Curve25519.Field51.Definition
module SL51 = Hacl.Spec.Curve25519.Field51.Lemmas
modu... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "SC"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Field51",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Field51.Lemmas",
"short_module": "SL51"
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | out: Hacl.Bignum25519.felem -> a: Hacl.Bignum25519.felem -> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum25519.felem",
"FStar.HyperStack.ST.pop_frame",
"Prims.unit",
"Hacl.Impl.Curve25519.Field51.fsqr",
"Lib.Buffer.lbuffer_t",
"Lib.Buffer.MUT",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.UInt32.uint_to_t",
"FStar.UInt32.t",
"Lib.Buffer.create",
"Hacl.Impl.C... | [] | false | true | false | false | false | let fsquare out a =
| push_frame ();
let tmp = create 5ul (u128 0) in
BN.fsqr out a tmp;
pop_frame () | false |
Hacl.Bignum25519.fst | Hacl.Bignum25519.make_one | val make_one:
b:lbuffer uint64 5ul ->
Stack unit
(requires fun h -> live h b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
F51.mul_inv_t h1 b /\
F51.fevalh h1 b == SC.one
) | val make_one:
b:lbuffer uint64 5ul ->
Stack unit
(requires fun h -> live h b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
F51.mul_inv_t h1 b /\
F51.fevalh h1 b == SC.one
) | let make_one b =
b.(0ul) <- u64 1;
b.(1ul) <- u64 0;
b.(2ul) <- u64 0;
b.(3ul) <- u64 0;
b.(4ul) <- u64 0;
assert_norm (S51.as_nat5 (u64 1, u64 0, u64 0, u64 0, u64 0) % Spec.Curve25519.prime == 1) | {
"file_name": "code/ed25519/Hacl.Bignum25519.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 92,
"end_line": 59,
"start_col": 0,
"start_line": 53
} | module Hacl.Bignum25519
module ST = FStar.HyperStack.ST
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module S51 = Hacl.Spec.Curve25519.Field51.Definition
module SL51 = Hacl.Spec.Curve25519.Field51.Lemmas
modu... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "SC"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Field51",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Field51.Lemmas",
"short_module": "SL51"
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: Lib.Buffer.lbuffer Lib.IntTypes.uint64 5ul -> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint64",
"FStar.UInt32.__uint_to_t",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"Prims.op_Modulus",
"Hacl.Spec.Curve25519.Field51.Definition.as_nat5",
"FStar.Pervasives.Native.Mktuple5",
"Lib.IntTypes.u64",
"Spec.Curve25519.prime",
"Prims.unit... | [] | false | true | false | false | false | let make_one b =
| b.(0ul) <- u64 1;
b.(1ul) <- u64 0;
b.(2ul) <- u64 0;
b.(3ul) <- u64 0;
b.(4ul) <- u64 0;
assert_norm (S51.as_nat5 (u64 1, u64 0, u64 0, u64 0, u64 0) % Spec.Curve25519.prime == 1) | false |
Hacl.Bignum25519.fst | Hacl.Bignum25519.make_zero | val make_zero:
b:lbuffer uint64 5ul ->
Stack unit
(requires fun h -> live h b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
F51.mul_inv_t h1 b /\
F51.fevalh h1 b == SC.zero
) | val make_zero:
b:lbuffer uint64 5ul ->
Stack unit
(requires fun h -> live h b)
(ensures fun h0 _ h1 -> modifies (loc b) h0 h1 /\
F51.mul_inv_t h1 b /\
F51.fevalh h1 b == SC.zero
) | let make_zero b =
b.(0ul) <- u64 0;
b.(1ul) <- u64 0;
b.(2ul) <- u64 0;
b.(3ul) <- u64 0;
b.(4ul) <- u64 0;
assert_norm (S51.as_nat5 (u64 0, u64 0, u64 0, u64 0, u64 0) % Spec.Curve25519.prime == 0) | {
"file_name": "code/ed25519/Hacl.Bignum25519.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 92,
"end_line": 51,
"start_col": 0,
"start_line": 45
} | module Hacl.Bignum25519
module ST = FStar.HyperStack.ST
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module S51 = Hacl.Spec.Curve25519.Field51.Definition
module SL51 = Hacl.Spec.Curve25519.Field51.Lemmas
modu... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "SC"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Field51",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Field51.Lemmas",
"short_module": "SL51"
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: Lib.Buffer.lbuffer Lib.IntTypes.uint64 5ul -> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint64",
"FStar.UInt32.__uint_to_t",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"Prims.op_Modulus",
"Hacl.Spec.Curve25519.Field51.Definition.as_nat5",
"FStar.Pervasives.Native.Mktuple5",
"Lib.IntTypes.u64",
"Spec.Curve25519.prime",
"Prims.unit... | [] | false | true | false | false | false | let make_zero b =
| b.(0ul) <- u64 0;
b.(1ul) <- u64 0;
b.(2ul) <- u64 0;
b.(3ul) <- u64 0;
b.(4ul) <- u64 0;
assert_norm (S51.as_nat5 (u64 0, u64 0, u64 0, u64 0, u64 0) % Spec.Curve25519.prime == 0) | false |
Hacl.Bignum25519.fst | Hacl.Bignum25519.fsquare_times | val fsquare_times:
out:felem
-> a:felem
-> n:size_t{v n > 0} ->
Stack unit
(requires fun h -> live h out /\ live h a /\ disjoint out a /\
F51.felem_fits h a (1, 2, 1, 1, 1)
)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F51.felem_fits h1 out (1, 2, 1, 1, 1) /\
F51.fevalh ... | val fsquare_times:
out:felem
-> a:felem
-> n:size_t{v n > 0} ->
Stack unit
(requires fun h -> live h out /\ live h a /\ disjoint out a /\
F51.felem_fits h a (1, 2, 1, 1, 1)
)
(ensures fun h0 _ h1 -> modifies (loc out) h0 h1 /\
F51.felem_fits h1 out (1, 2, 1, 1, 1) /\
F51.fevalh ... | let fsquare_times output input count =
push_frame();
let tmp = create 5ul (u128 0) in
Hacl.Curve25519_51.fsquare_times output input tmp count;
pop_frame() | {
"file_name": "code/ed25519/Hacl.Bignum25519.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 13,
"end_line": 224,
"start_col": 0,
"start_line": 220
} | module Hacl.Bignum25519
module ST = FStar.HyperStack.ST
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
module LSeq = Lib.Sequence
module BSeq = Lib.ByteSequence
module S51 = Hacl.Spec.Curve25519.Field51.Definition
module SL51 = Hacl.Spec.Curve25519.Field51.Lemmas
modu... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "SC"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Field51",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Field51.Lemmas",
"short_module": "SL51"
},
{
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
out: Hacl.Bignum25519.felem ->
a: Hacl.Bignum25519.felem ->
n: Lib.IntTypes.size_t{Lib.IntTypes.v n > 0}
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum25519.felem",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_GreaterThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.HyperStack.ST.pop_frame",
"Prims.unit",
"Hacl.Curve25519_51.fsquare_times",
"Lib.Buffer.lbuffer_t",
"Lib.Buffer.MUT",
"Lib.IntTypes.int_t",
... | [] | false | true | false | false | false | let fsquare_times output input count =
| push_frame ();
let tmp = create 5ul (u128 0) in
Hacl.Curve25519_51.fsquare_times output input tmp count;
pop_frame () | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.