effect stringclasses 48
values | original_source_type stringlengths 0 23k | opens_and_abbrevs listlengths 2 92 | isa_cross_project_example bool 1
class | source_definition stringlengths 9 57.9k | partial_definition stringlengths 7 23.3k | is_div bool 2
classes | is_type null | is_proof bool 2
classes | completed_definiton stringlengths 1 250k | dependencies dict | effect_flags listlengths 0 2 | ideal_premises listlengths 0 236 | mutual_with listlengths 0 11 | file_context stringlengths 0 407k | interleaved bool 1
class | is_simply_typed bool 2
classes | file_name stringlengths 5 48 | vconfig dict | is_simple_lemma null | source_type stringlengths 10 23k | proof_features listlengths 0 1 | name stringlengths 8 95 | source dict | verbose_type stringlengths 1 7.42k | source_range dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Prims.Pure | val seq_mask_select: #t:inttype{~(S128? t)} -> #len:size_nat
-> a:lseq (int_t t SEC) len
-> b:lseq (int_t t SEC) len
-> mask:int_t t SEC
-> Pure (lseq (int_t t SEC) len)
(requires v mask = 0 \/ v mask = v (ones t SEC))
(ensures fun res -> res == (if v mask = 0 then b else a)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let seq_mask_select #t #len a b mask =
let res = map2 (mask_select mask) a b in
let lemma_aux (i:nat{i < len}) : Lemma (v res.[i] == (if v mask = 0 then v b.[i] else v a.[i])) =
mask_select_lemma mask a.[i] b.[i] in
Classical.forall_intro lemma_aux;
if v mask = 0 then eq_intro res b else eq_intro res a;
... | val seq_mask_select: #t:inttype{~(S128? t)} -> #len:size_nat
-> a:lseq (int_t t SEC) len
-> b:lseq (int_t t SEC) len
-> mask:int_t t SEC
-> Pure (lseq (int_t t SEC) len)
(requires v mask = 0 \/ v mask = v (ones t SEC))
(ensures fun res -> res == (if v mask = 0 then b else a))
let seq_mask_select #t #le... | false | null | false | let res = map2 (mask_select mask) a b in
let lemma_aux (i: nat{i < len})
: Lemma (v res.[ i ] == (if v mask = 0 then v b.[ i ] else v a.[ i ])) =
mask_select_lemma mask a.[ i ] b.[ i ]
in
Classical.forall_intro lemma_aux;
if v mask = 0 then eq_intro res b else eq_intro res a;
res | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [] | [
"Lib.IntTypes.inttype",
"Prims.l_not",
"Prims.b2t",
"Lib.IntTypes.uu___is_S128",
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Prims.unit",
"Prims.op_Equality",
"Prims.int",
"Lib.IntTypes.v",
"Lib.Sequence.eq_intro",
"Prims.bool",
"FStar.Classic... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val seq_mask_select: #t:inttype{~(S128? t)} -> #len:size_nat
-> a:lseq (int_t t SEC) len
-> b:lseq (int_t t SEC) len
-> mask:int_t t SEC
-> Pure (lseq (int_t t SEC) len)
(requires v mask = 0 \/ v mask = v (ones t SEC))
(ensures fun res -> res == (if v mask = 0 then b else a)) | [] | Lib.ByteSequence.seq_mask_select | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
a: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len ->
b: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len ->
mask: Lib.IntTypes.int_t t Lib.IntTypes.SEC
-> Prims.Pure (Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len) | {
"end_col": 5,
"end_line": 104,
"start_col": 38,
"start_line": 96
} |
Prims.Tot | val uint_at_index_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t)
-> idx:nat{idx < len}
-> u:uint_t t l{u == (uints_from_bytes_le #t #l #len b).[idx]} | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uint_at_index_le #t #l #len b i =
uint_from_bytes_le (sub b (i * numbytes t) (numbytes t)) | val uint_at_index_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t)
-> idx:nat{idx < len}
-> u:uint_t t l{u == (uints_from_bytes_le #t #l #len b).[idx]}
let uint_at_index_le #t #l #len b i = | false | null | false | uint_from_bytes_le (sub b (i * numbytes t) (numbytes t)) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uint_at_index_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t)
-> idx:nat{idx < len}
-> u:uint_t t l{u == (uints_from_bytes_le #t #l #len b).[idx]} | [] | Lib.ByteSequence.uint_at_index_le | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> idx: Prims.nat{idx < len}
-> u186: Lib.IntTypes.uint_t t l {u186 == (Lib.ByteSequence.uints_from_bytes_le b).[ idx ]} | {
"end_col": 58,
"end_line": 355,
"start_col": 2,
"start_line": 355
} |
FStar.Pervasives.Lemma | val lemma_nat_from_to_intseq_le_preserves_value: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> b:seq (uint_t t l){length b == len} ->
Lemma (nat_to_intseq_le len (nat_from_intseq_le b) == b) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let lemma_nat_from_to_intseq_le_preserves_value #t #l len b =
nat_from_intseq_le_inj (nat_to_intseq_le len (nat_from_intseq_le b)) b | val lemma_nat_from_to_intseq_le_preserves_value: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> b:seq (uint_t t l){length b == len} ->
Lemma (nat_to_intseq_le len (nat_from_intseq_le b) == b)
let lemma_nat_from_to_intseq_le_preserves_value #t #l len b = | false | null | true | nat_from_intseq_le_inj (nat_to_intseq_le len (nat_from_intseq_le b)) b | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Lib.Sequence.seq",
"Lib.IntTypes.uint_t",
"Prims.eq2",
"Lib.Sequence.length",
"Lib.ByteSequence.nat_from_intseq_le_inj",
"Lib.ByteSequence.nat_to_intseq_le",
"Lib.ByteSequence.nat_from_int... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_nat_from_to_intseq_le_preserves_value: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> b:seq (uint_t t l){length b == len} ->
Lemma (nat_to_intseq_le len (nat_from_intseq_le b) == b) | [] | Lib.ByteSequence.lemma_nat_from_to_intseq_le_preserves_value | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | len: Prims.nat -> b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) {Lib.Sequence.length b == len}
-> FStar.Pervasives.Lemma
(ensures Lib.ByteSequence.nat_to_intseq_le len (Lib.ByteSequence.nat_from_intseq_le b) == b) | {
"end_col": 72,
"end_line": 747,
"start_col": 2,
"start_line": 747
} |
Prims.Tot | val uint_at_index_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t)
-> idx:nat{idx < len}
-> u:uint_t t l{u == (uints_from_bytes_be #t #l #len b).[idx]} | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uint_at_index_be #t #l #len b i =
uint_from_bytes_be (sub b (i * numbytes t) (numbytes t)) | val uint_at_index_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t)
-> idx:nat{idx < len}
-> u:uint_t t l{u == (uints_from_bytes_be #t #l #len b).[idx]}
let uint_at_index_be #t #l #len b i = | false | null | false | uint_from_bytes_be (sub b (i * numbytes t) (numbytes t)) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uint_at_index_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t)
-> idx:nat{idx < len}
-> u:uint_t t l{u == (uints_from_bytes_be #t #l #len b).[idx]} | [] | Lib.ByteSequence.uint_at_index_be | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) -> idx: Prims.nat{idx < len}
-> u191: Lib.IntTypes.uint_t t l {u191 == (Lib.ByteSequence.uints_from_bytes_be b).[ idx ]} | {
"end_col": 58,
"end_line": 358,
"start_col": 2,
"start_line": 358
} |
FStar.Pervasives.Lemma | val index_uints_to_bytes_be_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in
Seq.index (uints_to_bytes_be #t ... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let index_uints_to_bytes_be_aux #t #l len n i =
let open Lib.Sequence in
let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in
index_generate_blocks (numbytes t) len len
(uints_to_bytes_be_inner #t #l #len s) i | val index_uints_to_bytes_be_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in
Seq.index (uints_to_bytes_be #t ... | false | null | true | let open Lib.Sequence in
let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in
index_generate_blocks (numbytes t) len len (uints_to_bytes_be_inner #t #l #len s) i | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.IntTypes.bits",
"Lib.Sequence.index_genera... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_uints_to_bytes_be_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in
Seq.index (uints_to_bytes_be #t ... | [] | Lib.ByteSequence.index_uints_to_bytes_be_aux | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} ->
n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} ->
i: Prims.nat{i < len * Lib.IntTypes.numbytes t}
-> FStar.Pervasives.Lemma
(ensures
(let s = Lib.ByteSequence.nat_to_intseq_be len n in
FStar.Seq.Base.index (Lib.B... | {
"end_col": 44,
"end_line": 583,
"start_col": 2,
"start_line": 580
} |
Prims.Tot | val mask_select: #t:inttype{~(S128? t)} -> mask:int_t t SEC -> a:int_t t SEC -> b:int_t t SEC -> int_t t SEC | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let mask_select #t mask a b =
b ^. (mask &. (a ^. b)) | val mask_select: #t:inttype{~(S128? t)} -> mask:int_t t SEC -> a:int_t t SEC -> b:int_t t SEC -> int_t t SEC
let mask_select #t mask a b = | false | null | false | b ^. (mask &. (a ^. b)) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.IntTypes.inttype",
"Prims.l_not",
"Prims.b2t",
"Lib.IntTypes.uu___is_S128",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Hat_Dot",
"Lib.IntTypes.op_Amp_Dot"
] | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mask_select: #t:inttype{~(S128? t)} -> mask:int_t t SEC -> a:int_t t SEC -> b:int_t t SEC -> int_t t SEC | [] | Lib.ByteSequence.mask_select | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
mask: Lib.IntTypes.int_t t Lib.IntTypes.SEC ->
a: Lib.IntTypes.int_t t Lib.IntTypes.SEC ->
b: Lib.IntTypes.int_t t Lib.IntTypes.SEC
-> Lib.IntTypes.int_t t Lib.IntTypes.SEC | {
"end_col": 25,
"end_line": 79,
"start_col": 2,
"start_line": 79
} |
FStar.Pervasives.Lemma | val index_uints_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> ul:lseq (uint_t t l) len -> i:nat{i < len * numbytes t}
-> Lemma (index (uints_to_bytes_le #t #l #len ul) i == (uint_to_bytes_le ul.[i / numbytes t]).[i % numbytes t]) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let index_uints_to_bytes_le #t #l #len ul i =
index_generate_blocks (numbytes t) len len (uints_to_bytes_le_inner #t #l #len ul) i | val index_uints_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> ul:lseq (uint_t t l) len -> i:nat{i < len * numbytes t}
-> Lemma (index (uints_to_bytes_le #t #l #len ul) i == (uint_to_bytes_le ul.[i / numbytes t]).[i % numbytes t])
let index_uints_to_bytes_le ... | false | null | true | index_generate_blocks (numbytes t) len len (uints_to_bytes_le_inner #t #l #len ul) i | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint_t",
"Prims.nat",
"Lib.Sequence.index_generate_blocks",... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_uints_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> ul:lseq (uint_t t l) len -> i:nat{i < len * numbytes t}
-> Lemma (index (uints_to_bytes_le #t #l #len ul) i == (uint_to_bytes_le ul.[i / numbytes t]).[i % numbytes t]) | [] | Lib.ByteSequence.index_uints_to_bytes_le | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
ul: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len ->
i: Prims.nat{i < len * Lib.IntTypes.numbytes t}
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.index (Lib.ByteSequence.uints_to_bytes_le ul) i ==
(Lib.ByteSequence.uint_to_bytes_le ul.[ i / Lib.IntTypes.numbytes t ]).[ i %
Lib.In... | {
"end_col": 86,
"end_line": 323,
"start_col": 2,
"start_line": 323
} |
Prims.Tot | val nat_to_intseq_be_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> len:nat
-> n:nat{n < pow2 (bits t * len)}
-> Tot (b:seq (int_t t l){length b == len /\ n == nat_from_intseq_be b}) (decreases len) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec nat_to_intseq_be_ #t #l len n =
if len = 0 then Seq.empty
else
let len' = len - 1 in
let tt = uint #t #l (n % modulus t) in
let n' = n / modulus t in
assert (modulus t = pow2 (bits t));
FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t);
let b' = nat_to_intseq_be_ len' n' i... | val nat_to_intseq_be_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> len:nat
-> n:nat{n < pow2 (bits t * len)}
-> Tot (b:seq (int_t t l){length b == len /\ n == nat_from_intseq_be b}) (decreases len)
let rec nat_to_intseq_be_ #t #l len n = | false | null | false | if len = 0
then Seq.empty
else
let len' = len - 1 in
let tt = uint #t #l (n % modulus t) in
let n' = n / modulus t in
assert (modulus t = pow2 (bits t));
FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t);
let b' = nat_to_intseq_be_ len' n' in
let b = Seq.append b' (create 1 tt) in
Seq.append_... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total",
""
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.empty",
"Lib.IntTypes.int_t",
"Prims.bool",
"Prims.unit"... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_to_intseq_be_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> len:nat
-> n:nat{n < pow2 (bits t * len)}
-> Tot (b:seq (int_t t l){length b == len /\ n == nat_from_intseq_be b}) (decreases len) | [
"recursion"
] | Lib.ByteSequence.nat_to_intseq_be_ | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | len: Prims.nat -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)}
-> Prims.Tot
(b:
Lib.Sequence.seq (Lib.IntTypes.int_t t l)
{Lib.Sequence.length b == len /\ n == Lib.ByteSequence.nat_from_intseq_be b}) | {
"end_col": 5,
"end_line": 161,
"start_col": 2,
"start_line": 151
} |
FStar.Pervasives.Lemma | val modulo_pow2_prop: r:pos -> a:nat -> b:nat -> c:nat{c < b} -> Lemma
((a % pow2 (r * b) / pow2 (r * c)) % pow2 r == (a / pow2 (r * c)) % pow2 r) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let modulo_pow2_prop r a b c =
calc (==) {
((a % pow2 (r * b)) / pow2 (r * c)) % pow2 r;
== { Math.Lemmas.pow2_modulo_division_lemma_1 a (r * c) (r * b) }
((a / pow2 (r * c) % pow2 (r * b - r * c))) % pow2 r;
== { Math.Lemmas.lemma_mul_sub_distr r b c }
((a / pow2 (r * c) % pow2 (r * (b - c)))) % ... | val modulo_pow2_prop: r:pos -> a:nat -> b:nat -> c:nat{c < b} -> Lemma
((a % pow2 (r * b) / pow2 (r * c)) % pow2 r == (a / pow2 (r * c)) % pow2 r)
let modulo_pow2_prop r a b c = | false | null | true | calc ( == ) {
((a % pow2 (r * b)) / pow2 (r * c)) % pow2 r;
( == ) { Math.Lemmas.pow2_modulo_division_lemma_1 a (r * c) (r * b) }
((a / pow2 (r * c) % pow2 (r * b - r * c))) % pow2 r;
( == ) { Math.Lemmas.lemma_mul_sub_distr r b c }
((a / pow2 (r * c) % pow2 (r * (b - c)))) % pow2 r;
( == ) { Math.Lemmas.po... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Prims.pos",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Modulus",
"Prims.op_Division",
"Prims.pow2",
"FStar.Mul.op_Star",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"Prims.unit",
"FStar.Calc.calc_step",
"Pri... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val modulo_pow2_prop: r:pos -> a:nat -> b:nat -> c:nat{c < b} -> Lemma
((a % pow2 (r * b) / pow2 (r * c)) % pow2 r == (a / pow2 (r * c)) % pow2 r) | [] | Lib.ByteSequence.modulo_pow2_prop | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | r: Prims.pos -> a: Prims.nat -> b: Prims.nat -> c: Prims.nat{c < b}
-> FStar.Pervasives.Lemma
(ensures
a % Prims.pow2 (r * b) / Prims.pow2 (r * c) % Prims.pow2 r ==
a / Prims.pow2 (r * c) % Prims.pow2 r) | {
"end_col": 3,
"end_line": 599,
"start_col": 2,
"start_line": 589
} |
FStar.Pervasives.Lemma | val uints_from_bytes_le_slice_lemma_lp:
#t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} ->
Lemma (index (slice (uints_from_bytes_le #t #l #len b) i j) k ==
ui... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_le_slice_lemma_lp #t #l #len b i j k =
let r = slice (uints_from_bytes_le #t #l #len b) i j in
index_uints_from_bytes_le #t #l #len b (i + k);
assert (r.[k] == uint_from_bytes_le (sub b ((i + k) * numbytes t) (numbytes t))) | val uints_from_bytes_le_slice_lemma_lp:
#t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} ->
Lemma (index (slice (uints_from_bytes_le #t #l #len b) i j) k ==
ui... | false | null | true | let r = slice (uints_from_bytes_le #t #l #len b) i j in
index_uints_from_bytes_le #t #l #len b (i + k);
assert (r.[ k ] == uint_from_bytes_le (sub b ((i + k) * numbytes t) (numbytes t))) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_pos",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_le_slice_lemma_lp:
#t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} ->
Lemma (index (slice (uints_from_bytes_le #t #l #len b) i j) k ==
ui... | [] | Lib.ByteSequence.uints_from_bytes_le_slice_lemma_lp | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) ->
i: Prims.nat ->
j: Prims.nat{i <= j /\ j <= len} ->
k: Prims.nat{k < j - i}
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.index (Lib.Sequence.slice (Lib.ByteSequence.uints_from_bytes_le b) i j) k ==
Lib.ByteSequence.u... | {
"end_col": 82,
"end_line": 427,
"start_col": 59,
"start_line": 424
} |
FStar.Pervasives.Lemma | val lemma_uint_from_to_bytes_le_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
s : lbytes_l l (numbytes t) ->
Lemma(uint_to_bytes_le #t #l (uint_from_bytes_le #t #l s) `equal` s) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let lemma_uint_from_to_bytes_le_preserves_value #t #l s =
let i = uint_from_bytes_le #t #l s in
let s' = uint_to_bytes_le #t #l i in
lemma_nat_from_to_bytes_le_preserves_value #l s' (length s');
assert(nat_to_bytes_le #l (length s') (nat_from_bytes_le s') == s');
lemma_uint_to_bytes_le_preserves_value #t #l i... | val lemma_uint_from_to_bytes_le_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
s : lbytes_l l (numbytes t) ->
Lemma(uint_to_bytes_le #t #l (uint_from_bytes_le #t #l s) `equal` s)
let lemma_uint_from_to_bytes_le_preserves_value #t #l s = | false | null | true | let i = uint_from_bytes_le #t #l s in
let s' = uint_to_bytes_le #t #l i in
lemma_nat_from_to_bytes_le_preserves_value #l s' (length s');
assert (nat_to_bytes_le #l (length s') (nat_from_bytes_le s') == s');
lemma_uint_to_bytes_le_preserves_value #t #l i;
assert (nat_from_bytes_le (uint_to_bytes_le #t #l i) == uint_v i)... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.ByteSequence.lbytes_l",
"Lib.IntTypes.numbytes",
"Lib.ByteSequence.lemma_nat_from_to_bytes_le_preserves_value",
"Lib.Sequence.length",
"Lib.... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_uint_from_to_bytes_le_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
s : lbytes_l l (numbytes t) ->
Lemma(uint_to_bytes_le #t #l (uint_from_bytes_le #t #l s) `equal` s) | [] | Lib.ByteSequence.lemma_uint_from_to_bytes_le_preserves_value | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | s: Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t)
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.equal (Lib.ByteSequence.uint_to_bytes_le (Lib.ByteSequence.uint_from_bytes_le s))
s) | {
"end_col": 60,
"end_line": 784,
"start_col": 57,
"start_line": 773
} |
FStar.Pervasives.Lemma | val uints_from_bytes_be_slice_lemma_lp:
#t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} ->
Lemma (index (slice (uints_from_bytes_le #t #l #len b) i j) k ==
... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_be_slice_lemma_lp #t #l #len b i j k =
let r = slice (uints_from_bytes_le #t #l #len b) i j in
index_uints_from_bytes_be #t #l #len b (i + k);
assert (r.[k] == uint_from_bytes_le (sub b ((i + k) * numbytes t) (numbytes t))) | val uints_from_bytes_be_slice_lemma_lp:
#t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} ->
Lemma (index (slice (uints_from_bytes_le #t #l #len b) i j) k ==
... | false | null | true | let r = slice (uints_from_bytes_le #t #l #len b) i j in
index_uints_from_bytes_be #t #l #len b (i + k);
assert (r.[ k ] == uint_from_bytes_le (sub b ((i + k) * numbytes t) (numbytes t))) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_pos",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_be_slice_lemma_lp:
#t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} ->
Lemma (index (slice (uints_from_bytes_le #t #l #len b) i j) k ==
... | [] | Lib.ByteSequence.uints_from_bytes_be_slice_lemma_lp | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) ->
i: Prims.nat ->
j: Prims.nat{i <= j /\ j <= len} ->
k: Prims.nat{k < j - i}
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.index (Lib.Sequence.slice (Lib.ByteSequence.uints_from_bytes_le b) i j) k ==
Lib.ByteSequence.u... | {
"end_col": 82,
"end_line": 491,
"start_col": 59,
"start_line": 488
} |
FStar.Pervasives.Lemma | val lemma_uint_from_to_bytes_be_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
s : lbytes_l l (numbytes t) ->
Lemma(uint_to_bytes_be #t #l (uint_from_bytes_be #t #l s) `equal` s) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let lemma_uint_from_to_bytes_be_preserves_value #t #l s =
let i = uint_from_bytes_be #t #l s in
let s' = uint_to_bytes_be #t #l i in
lemma_nat_from_to_bytes_be_preserves_value #l s' (length s');
assert(nat_to_bytes_be #l (length s') (nat_from_bytes_be s') == s');
lemma_uint_to_bytes_be_preserves_value #t #l i... | val lemma_uint_from_to_bytes_be_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
s : lbytes_l l (numbytes t) ->
Lemma(uint_to_bytes_be #t #l (uint_from_bytes_be #t #l s) `equal` s)
let lemma_uint_from_to_bytes_be_preserves_value #t #l s = | false | null | true | let i = uint_from_bytes_be #t #l s in
let s' = uint_to_bytes_be #t #l i in
lemma_nat_from_to_bytes_be_preserves_value #l s' (length s');
assert (nat_to_bytes_be #l (length s') (nat_from_bytes_be s') == s');
lemma_uint_to_bytes_be_preserves_value #t #l i;
assert (nat_from_bytes_be (uint_to_bytes_be #t #l i) == uint_v i)... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.ByteSequence.lbytes_l",
"Lib.IntTypes.numbytes",
"Lib.ByteSequence.lemma_nat_from_to_bytes_be_preserves_value",
"Lib.Sequence.length",
"Lib.... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_uint_from_to_bytes_be_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
s : lbytes_l l (numbytes t) ->
Lemma(uint_to_bytes_be #t #l (uint_from_bytes_be #t #l s) `equal` s) | [] | Lib.ByteSequence.lemma_uint_from_to_bytes_be_preserves_value | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | s: Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t)
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.equal (Lib.ByteSequence.uint_to_bytes_be (Lib.ByteSequence.uint_from_bytes_be s))
s) | {
"end_col": 60,
"end_line": 797,
"start_col": 57,
"start_line": 786
} |
FStar.Pervasives.Lemma | val uints_to_bytes_le_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> Lemma
(uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n) ==
nat_to_bytes_le (len * numbytes t) n) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_to_bytes_le_nat_lemma #t #l len n =
Classical.forall_intro (uints_to_bytes_le_nat_lemma_ #t #l len n);
eq_intro (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n))
(nat_to_bytes_le (len * numbytes t) n) | val uints_to_bytes_le_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> Lemma
(uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n) ==
nat_to_bytes_le (len * numbytes t) n)
let uints_to_bytes_le_nat_lemma #... | false | null | true | Classical.forall_intro (uints_to_bytes_le_nat_lemma_ #t #l len n);
eq_intro (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n))
(nat_to_bytes_le (len * numbytes t) n) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.IntTypes.bits",
"Lib.Sequence.eq_intro",
... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_to_bytes_le_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> Lemma
(uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n) ==
nat_to_bytes_le (len * numbytes t) n) | [] | Lib.ByteSequence.uints_to_bytes_le_nat_lemma | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} ->
n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)}
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.uints_to_bytes_le (Lib.ByteSequence.nat_to_intseq_le len n) ==
Lib.ByteSequence.nat_to_bytes_le (len * Lib.IntTypes.num... | {
"end_col": 49,
"end_line": 670,
"start_col": 2,
"start_line": 668
} |
FStar.Pervasives.Lemma | val index_nat_to_intseq_to_bytes_le:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in
Seq.index (nat_to_bytes_le #... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let index_nat_to_intseq_to_bytes_le #t #l len n i =
let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in
let m = numbytes t in
index_nat_to_intseq_le #U8 #l (len * m) n i;
assert (Seq.index (nat_to_bytes_le #l (len * m) n) i ==
uint (n / pow2 (8 * i) % pow2 8));
index_nat_to_intseq_le #U8 #l... | val index_nat_to_intseq_to_bytes_le:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in
Seq.index (nat_to_bytes_le #... | false | null | true | let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in
let m = numbytes t in
index_nat_to_intseq_le #U8 #l (len * m) n i;
assert (Seq.index (nat_to_bytes_le #l (len * m) n) i == uint (n / pow2 (8 * i) % pow2 8));
index_nat_to_intseq_le #U8 #l m (v s.[ i / m ]) (i % m);
assert (Seq.index (nat_to_bytes_le #l m (v s... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.IntTypes.bits",
"Lib.ByteSequence.some_ari... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_nat_to_intseq_to_bytes_le:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in
Seq.index (nat_to_bytes_le #... | [] | Lib.ByteSequence.index_nat_to_intseq_to_bytes_le | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} ->
n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} ->
i: Prims.nat{i < len * Lib.IntTypes.numbytes t}
-> FStar.Pervasives.Lemma
(ensures
(let s = Lib.ByteSequence.nat_to_intseq_le len n in
FStar.Seq.Base.index (Lib.B... | {
"end_col": 23,
"end_line": 647,
"start_col": 51,
"start_line": 637
} |
FStar.Pervasives.Lemma | val nat_from_intseq_be_inj:
#t:inttype{unsigned t} -> #l:secrecy_level -> b1:seq (uint_t t l) -> b2:seq (uint_t t l) ->
Lemma
(requires length b1 == length b2 /\ nat_from_intseq_be b1 == nat_from_intseq_be b2)
(ensures Seq.equal b1 b2)
(decreases (length b1)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec nat_from_intseq_be_inj #t #l b1 b2 =
if length b1 = 0 then ()
else begin
nat_from_intseq_be_inj (Seq.slice b1 0 (length b1 - 1)) (Seq.slice b2 0 (length b2 - 1));
Seq.lemma_split b1 (length b1 - 1);
Seq.lemma_split b2 (length b2 - 1)
end | val nat_from_intseq_be_inj:
#t:inttype{unsigned t} -> #l:secrecy_level -> b1:seq (uint_t t l) -> b2:seq (uint_t t l) ->
Lemma
(requires length b1 == length b2 /\ nat_from_intseq_be b1 == nat_from_intseq_be b2)
(ensures Seq.equal b1 b2)
(decreases (length b1))
let rec nat_from_intseq_be_inj #t #l b1 b2 = | false | null | true | if length b1 = 0
then ()
else
(nat_from_intseq_be_inj (Seq.slice b1 0 (length b1 - 1)) (Seq.slice b2 0 (length b2 - 1));
Seq.lemma_split b1 (length b1 - 1);
Seq.lemma_split b2 (length b2 - 1)) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma",
""
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.Sequence.seq",
"Lib.IntTypes.uint_t",
"Prims.op_Equality",
"Prims.int",
"Lib.Sequence.length",
"Prims.bool",
"FStar.Seq.Properties.lemma_split",
"Prims.op_Subtraction",
"Prims.unit",
"Lib.ByteS... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_from_intseq_be_inj:
#t:inttype{unsigned t} -> #l:secrecy_level -> b1:seq (uint_t t l) -> b2:seq (uint_t t l) ->
Lemma
(requires length b1 == length b2 /\ nat_from_intseq_be b1 == nat_from_intseq_be b2)
(ensures Seq.equal b1 b2)
(decreases (length b1)) | [
"recursion"
] | Lib.ByteSequence.nat_from_intseq_be_inj | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b1: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) -> b2: Lib.Sequence.seq (Lib.IntTypes.uint_t t l)
-> FStar.Pervasives.Lemma
(requires
Lib.Sequence.length b1 == Lib.Sequence.length b2 /\
Lib.ByteSequence.nat_from_intseq_be b1 == Lib.ByteSequence.nat_from_intseq_be b2)
(ensures FStar.Seq.Base... | {
"end_col": 5,
"end_line": 736,
"start_col": 2,
"start_line": 731
} |
FStar.Pervasives.Lemma | val nat_from_intseq_le_inj:
#t:inttype{unsigned t} -> #l:secrecy_level -> b1:seq (uint_t t l) -> b2:seq (uint_t t l) ->
Lemma
(requires length b1 == length b2 /\ nat_from_intseq_le b1 == nat_from_intseq_le b2)
(ensures Seq.equal b1 b2)
(decreases (length b1)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec nat_from_intseq_le_inj #t #l b1 b2 =
if length b1 = 0 then ()
else begin
nat_from_intseq_le_inj (Seq.slice b1 1 (length b1)) (Seq.slice b2 1 (length b2));
Seq.lemma_split b1 1;
Seq.lemma_split b2 1
end | val nat_from_intseq_le_inj:
#t:inttype{unsigned t} -> #l:secrecy_level -> b1:seq (uint_t t l) -> b2:seq (uint_t t l) ->
Lemma
(requires length b1 == length b2 /\ nat_from_intseq_le b1 == nat_from_intseq_le b2)
(ensures Seq.equal b1 b2)
(decreases (length b1))
let rec nat_from_intseq_le_inj #t #l b1 b2 = | false | null | true | if length b1 = 0
then ()
else
(nat_from_intseq_le_inj (Seq.slice b1 1 (length b1)) (Seq.slice b2 1 (length b2));
Seq.lemma_split b1 1;
Seq.lemma_split b2 1) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma",
""
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.Sequence.seq",
"Lib.IntTypes.uint_t",
"Prims.op_Equality",
"Prims.int",
"Lib.Sequence.length",
"Prims.bool",
"FStar.Seq.Properties.lemma_split",
"Prims.unit",
"Lib.ByteSequence.nat_from_intseq_le... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_from_intseq_le_inj:
#t:inttype{unsigned t} -> #l:secrecy_level -> b1:seq (uint_t t l) -> b2:seq (uint_t t l) ->
Lemma
(requires length b1 == length b2 /\ nat_from_intseq_le b1 == nat_from_intseq_le b2)
(ensures Seq.equal b1 b2)
(decreases (length b1)) | [
"recursion"
] | Lib.ByteSequence.nat_from_intseq_le_inj | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b1: Lib.Sequence.seq (Lib.IntTypes.uint_t t l) -> b2: Lib.Sequence.seq (Lib.IntTypes.uint_t t l)
-> FStar.Pervasives.Lemma
(requires
Lib.Sequence.length b1 == Lib.Sequence.length b2 /\
Lib.ByteSequence.nat_from_intseq_le b1 == Lib.ByteSequence.nat_from_intseq_le b2)
(ensures FStar.Seq.Base... | {
"end_col": 5,
"end_line": 728,
"start_col": 2,
"start_line": 723
} |
Prims.Tot | val seq_eq_mask: #t:inttype{~(S128? t)} -> #len1:size_nat -> #len2:size_nat
-> b1:lseq (int_t t SEC) len1
-> b2:lseq (int_t t SEC) len2
-> len:size_nat{len <= len1 /\ len <= len2}
-> res:int_t t SEC{
(sub b1 0 len == sub b2 0 len ==> v res == v (ones t SEC)) /\
(sub b1 0 len =!= sub b2 0 len ==> v ... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let seq_eq_mask #t #len1 #len2 b1 b2 len =
repeati_inductive len
(fun (i:nat{i <= len}) res ->
(sub b1 0 i == sub b2 0 i ==> v res == v (ones t SEC)) /\
(sub b1 0 i =!= sub b2 0 i ==> v res == v (zeros t SEC)))
(seq_eq_mask_inner b1 b2 len)
(ones t SEC) | val seq_eq_mask: #t:inttype{~(S128? t)} -> #len1:size_nat -> #len2:size_nat
-> b1:lseq (int_t t SEC) len1
-> b2:lseq (int_t t SEC) len2
-> len:size_nat{len <= len1 /\ len <= len2}
-> res:int_t t SEC{
(sub b1 0 len == sub b2 0 len ==> v res == v (ones t SEC)) /\
(sub b1 0 len =!= sub b2 0 len ==> v ... | false | null | false | repeati_inductive len
(fun (i: nat{i <= len}) res ->
(sub b1 0 i == sub b2 0 i ==> v res == v (ones t SEC)) /\
(sub b1 0 i =!= sub b2 0 i ==> v res == v (zeros t SEC)))
(seq_eq_mask_inner b1 b2 len)
(ones t SEC) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.IntTypes.inttype",
"Prims.l_not",
"Prims.b2t",
"Lib.IntTypes.uu___is_S128",
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Prims.l_and",
"Prims.op_LessThanOrEqual",
"Lib.LoopCombinators.repeati_inductive",
"Prims.nat",
"Prims.l_imp",
"Prims.eq... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val seq_eq_mask: #t:inttype{~(S128? t)} -> #len1:size_nat -> #len2:size_nat
-> b1:lseq (int_t t SEC) len1
-> b2:lseq (int_t t SEC) len2
-> len:size_nat{len <= len1 /\ len <= len2}
-> res:int_t t SEC{
(sub b1 0 len == sub b2 0 len ==> v res == v (ones t SEC)) /\
(sub b1 0 len =!= sub b2 0 len ==> v ... | [] | Lib.ByteSequence.seq_eq_mask | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
b1: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len1 ->
b2: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len2 ->
len: Lib.IntTypes.size_nat{len <= len1 /\ len <= len2}
-> res:
Lib.IntTypes.int_t t Lib.IntTypes.SEC
{ (Lib.Sequence.sub b1 0 len == Lib.Sequence.sub b2 0 ... | {
"end_col": 16,
"end_line": 70,
"start_col": 2,
"start_line": 65
} |
FStar.Pervasives.Lemma | val nat_from_intseq_le_public_to_secret:
#t:inttype{unsigned t} -> len:size_pos{len * bits t < pow2 32} -> b:lseq (uint_t t PUB) len ->
Lemma (nat_from_intseq_le b == nat_from_intseq_le (map secret b)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec nat_from_intseq_le_public_to_secret #t len b =
if len = 1 then begin
nat_from_intseq_le_lemma0 b;
nat_from_intseq_le_lemma0 (map secret b) end
else begin
let b_secret = map secret b in
let b1 = slice b 1 len in
let b1_secret = slice b_secret 1 len in
nat_from_intseq_le_public_to_secr... | val nat_from_intseq_le_public_to_secret:
#t:inttype{unsigned t} -> len:size_pos{len * bits t < pow2 32} -> b:lseq (uint_t t PUB) len ->
Lemma (nat_from_intseq_le b == nat_from_intseq_le (map secret b))
let rec nat_from_intseq_le_public_to_secret #t len b = | false | null | true | if len = 1
then
(nat_from_intseq_le_lemma0 b;
nat_from_intseq_le_lemma0 (map secret b))
else
let b_secret = map secret b in
let b1 = slice b 1 len in
let b1_secret = slice b_secret 1 len in
nat_from_intseq_le_public_to_secret #t (len - 1) b1;
nat_from_intseq_le_slice_lemma b 1;
nat_from_intseq_le_lemm... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.size_pos",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Prims.pow2",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.PUB",
"Prims.op_Equality",
"Prims.int",
"Lib.ByteSequence.nat_from_i... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_from_intseq_le_public_to_secret:
#t:inttype{unsigned t} -> len:size_pos{len * bits t < pow2 32} -> b:lseq (uint_t t PUB) len ->
Lemma (nat_from_intseq_le b == nat_from_intseq_le (map secret b)) | [
"recursion"
] | Lib.ByteSequence.nat_from_intseq_le_public_to_secret | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Lib.IntTypes.size_pos{len * Lib.IntTypes.bits t < Prims.pow2 32} ->
b: Lib.Sequence.lseq (Lib.IntTypes.uint_t t Lib.IntTypes.PUB) len
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_le b ==
Lib.ByteSequence.nat_from_intseq_le (Lib.Sequence.map Lib.IntTypes.secret b)) | {
"end_col": 10,
"end_line": 836,
"start_col": 2,
"start_line": 821
} |
FStar.Pervasives.Lemma | val nat_from_intseq_be_public_to_secret:
#t:inttype{unsigned t} -> len:size_pos{len * bits t < pow2 32} -> b:lseq (uint_t t PUB) len ->
Lemma (nat_from_intseq_be b == nat_from_intseq_be (map secret b)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec nat_from_intseq_be_public_to_secret #t len b =
if len = 1 then begin
nat_from_intseq_be_lemma0 b;
nat_from_intseq_be_lemma0 (map secret b) end
else begin
let b_secret = map secret b in
let b1 = slice b 1 len in
let b1_secret = slice b_secret 1 len in
nat_from_intseq_be_public_to_secr... | val nat_from_intseq_be_public_to_secret:
#t:inttype{unsigned t} -> len:size_pos{len * bits t < pow2 32} -> b:lseq (uint_t t PUB) len ->
Lemma (nat_from_intseq_be b == nat_from_intseq_be (map secret b))
let rec nat_from_intseq_be_public_to_secret #t len b = | false | null | true | if len = 1
then
(nat_from_intseq_be_lemma0 b;
nat_from_intseq_be_lemma0 (map secret b))
else
let b_secret = map secret b in
let b1 = slice b 1 len in
let b1_secret = slice b_secret 1 len in
nat_from_intseq_be_public_to_secret #t (len - 1) b1;
nat_from_intseq_be_slice_lemma b 1;
nat_from_intseq_be_lemm... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.size_pos",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Prims.pow2",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.PUB",
"Prims.op_Equality",
"Prims.int",
"Lib.ByteSequence.nat_from_i... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_from_intseq_be_public_to_secret:
#t:inttype{unsigned t} -> len:size_pos{len * bits t < pow2 32} -> b:lseq (uint_t t PUB) len ->
Lemma (nat_from_intseq_be b == nat_from_intseq_be (map secret b)) | [
"recursion"
] | Lib.ByteSequence.nat_from_intseq_be_public_to_secret | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Lib.IntTypes.size_pos{len * Lib.IntTypes.bits t < Prims.pow2 32} ->
b: Lib.Sequence.lseq (Lib.IntTypes.uint_t t Lib.IntTypes.PUB) len
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_be b ==
Lib.ByteSequence.nat_from_intseq_be (Lib.Sequence.map Lib.IntTypes.secret b)) | {
"end_col": 10,
"end_line": 817,
"start_col": 2,
"start_line": 800
} |
FStar.Pervasives.Lemma | val index_nat_to_intseq_be:
#t:inttype{unsigned t}
-> #l:secrecy_level
-> len:size_nat
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len}
-> Lemma (Seq.index (nat_to_intseq_be #t #l len n) (len - i - 1) ==
uint #t #l (n / pow2 (bits t * i) % pow2 (bits t))) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec index_nat_to_intseq_be #t #l len n i =
if i = 0 then
if len = 0 then () else head_nat_to_intseq_be #t #l len n
else
begin
let len' = len - 1 in
let i' = i - 1 in
let n' = n / pow2 (bits t) in
FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t);
calc (==) {
Seq.inde... | val index_nat_to_intseq_be:
#t:inttype{unsigned t}
-> #l:secrecy_level
-> len:size_nat
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len}
-> Lemma (Seq.index (nat_to_intseq_be #t #l len n) (len - i - 1) ==
uint #t #l (n / pow2 (bits t * i) % pow2 (bits t)))
let rec index_nat_to_intseq_be #t #l... | false | null | true | if i = 0
then if len = 0 then () else head_nat_to_intseq_be #t #l len n
else
let len' = len - 1 in
let i' = i - 1 in
let n' = n / pow2 (bits t) in
FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t);
calc ( == ) {
Seq.index (nat_to_intseq_be #t #l len' n') (len' - i' - 1);
( == ) { index_nat_... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"Lib.ByteSequence.head_nat_to_intse... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_nat_to_intseq_be:
#t:inttype{unsigned t}
-> #l:secrecy_level
-> len:size_nat
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len}
-> Lemma (Seq.index (nat_to_intseq_be #t #l len n) (len - i - 1) ==
uint #t #l (n / pow2 (bits t * i) % pow2 (bits t))) | [
"recursion"
] | Lib.ByteSequence.index_nat_to_intseq_be | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Lib.IntTypes.size_nat ->
n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} ->
i: Prims.nat{i < len}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.index (Lib.ByteSequence.nat_to_intseq_be len n) (len - i - 1) ==
Lib.IntTypes.uint (n / Prims.pow2 (Lib.IntTypes.bits t * i) % ... | {
"end_col": 7,
"end_line": 278,
"start_col": 2,
"start_line": 256
} |
FStar.Pervasives.Lemma | val lemma_not_equal_last: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat ->
j:nat{i < j /\ j <= Seq.length b1 /\ j <= Seq.length b2} ->
Lemma
(requires ~(Seq.index b1 (j - 1) == Seq.index b2 (j - 1)))
(ensures ~(Seq.equal (Seq.slice b1 i j) (Seq.slice b2 i j))) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let lemma_not_equal_last #a b1 b2 i j =
Seq.lemma_index_slice b1 i j (j - i - 1);
Seq.lemma_index_slice b2 i j (j - i - 1) | val lemma_not_equal_last: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat ->
j:nat{i < j /\ j <= Seq.length b1 /\ j <= Seq.length b2} ->
Lemma
(requires ~(Seq.index b1 (j - 1) == Seq.index b2 (j - 1)))
(ensures ~(Seq.equal (Seq.slice b1 i j) (Seq.slice b2 i j)))
let lemma_not_equal_last #a b1 b2 i j = | false | null | true | Seq.lemma_index_slice b1 i j (j - i - 1);
Seq.lemma_index_slice b2 i j (j - i - 1) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"FStar.Seq.Base.seq",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_LessThanOrEqual",
"FStar.Seq.Base.length",
"FStar.Seq.Base.lemma_index_slice",
"Prims.op_Subtraction",
"Prims.unit"
] | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_not_equal_last: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat ->
j:nat{i < j /\ j <= Seq.length b1 /\ j <= Seq.length b2} ->
Lemma
(requires ~(Seq.index b1 (j - 1) == Seq.index b2 (j - 1)))
(ensures ~(Seq.equal (Seq.slice b1 i j) (Seq.slice b2 i j))) | [] | Lib.ByteSequence.lemma_not_equal_last | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
b1: FStar.Seq.Base.seq a ->
b2: FStar.Seq.Base.seq a ->
i: Prims.nat ->
j: Prims.nat{i < j /\ j <= FStar.Seq.Base.length b1 /\ j <= FStar.Seq.Base.length b2}
-> FStar.Pervasives.Lemma
(requires ~(FStar.Seq.Base.index b1 (j - 1) == FStar.Seq.Base.index b2 (j - 1)))
(ensures ~(FStar.Seq.Bas... | {
"end_col": 42,
"end_line": 29,
"start_col": 2,
"start_line": 28
} |
Prims.Tot | val nat_to_intseq_le: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} ->
b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_le b} | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let nat_to_intseq_le = nat_to_intseq_le_ | val nat_to_intseq_le: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} ->
b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_le b}
let nat_to_intseq_le = | false | null | false | nat_to_intseq_le_ | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.ByteSequence.nat_to_intseq_le_"
] | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_to_intseq_le: #t:inttype{unsigned t} -> #l:secrecy_level -> len:nat -> n:nat{n < pow2 (bits t * len)} ->
b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_le b} | [] | Lib.ByteSequence.nat_to_intseq_le | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | len: Prims.nat -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)}
-> b:
Lib.Sequence.seq (Lib.IntTypes.uint_t t l)
{Lib.Sequence.length b == len /\ n == Lib.ByteSequence.nat_from_intseq_le b} | {
"end_col": 40,
"end_line": 183,
"start_col": 23,
"start_line": 183
} |
Prims.Tot | val nat_from_intseq_le_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> b:seq (uint_t t l)
-> Tot (n:nat{n < pow2 (length b * bits t)}) (decreases (length b)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec nat_from_intseq_le_ #t #l b =
let len = length b in
if len = 0 then 0
else
let shift = pow2 (bits t) in
let tt = Seq.slice b 1 len in
let n' = nat_from_intseq_le_ #t #l tt in
let l = v (Seq.index b 0) in
Math.Lemmas.pow2_plus (bits t) ( len * bits t - bits t);
let n = l + shift * n... | val nat_from_intseq_le_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> b:seq (uint_t t l)
-> Tot (n:nat{n < pow2 (length b * bits t)}) (decreases (length b))
let rec nat_from_intseq_le_ #t #l b = | false | null | false | let len = length b in
if len = 0
then 0
else
let shift = pow2 (bits t) in
let tt = Seq.slice b 1 len in
let n' = nat_from_intseq_le_ #t #l tt in
let l = v (Seq.index b 0) in
Math.Lemmas.pow2_plus (bits t) (len * bits t - bits t);
let n = l + shift * n' in
n | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total",
""
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.Sequence.seq",
"Lib.IntTypes.uint_t",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.unit",
"FStar.Math.Lemmas.pow2_plus",
"Lib.IntTypes.bits",... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_from_intseq_le_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> b:seq (uint_t t l)
-> Tot (n:nat{n < pow2 (length b * bits t)}) (decreases (length b)) | [
"recursion"
] | Lib.ByteSequence.nat_from_intseq_le_ | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l)
-> Prims.Tot (n: Prims.nat{n < Prims.pow2 (Lib.Sequence.length b * Lib.IntTypes.bits t)}) | {
"end_col": 5,
"end_line": 139,
"start_col": 37,
"start_line": 129
} |
Prims.Tot | val uint_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l -> lbytes_l l (numbytes t) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uint_to_bytes_be #t #l n =
nat_to_bytes_be (numbytes t) (v n) | val uint_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l -> lbytes_l l (numbytes t)
let uint_to_bytes_be #t #l n = | false | null | false | nat_to_bytes_be (numbytes t) (v n) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.uint_t",
"Lib.ByteSequence.nat_to_bytes_be",
"Lib.IntTypes.numbytes",
"Lib.IntTypes.v",
"Lib.ByteSequence.lbytes_l"
] | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uint_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l -> lbytes_l l (numbytes t) | [] | Lib.ByteSequence.uint_to_bytes_be | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | u121: Lib.IntTypes.uint_t t l -> Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t) | {
"end_col": 36,
"end_line": 288,
"start_col": 2,
"start_line": 288
} |
Prims.Tot | val uints_to_bytes_be_inner: #t:inttype{unsigned t} -> #l:secrecy_level
-> #len:size_nat{len * numbytes t < pow2 32}
-> lseq (int_t t l) len
-> i:nat{i < len} -> unit -> unit & (lseq (uint_t U8 l) (numbytes t)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_to_bytes_be_inner #t #l #len b i () =
let open Lib.Sequence in
(), uint_to_bytes_be #t #l b.[i] | val uints_to_bytes_be_inner: #t:inttype{unsigned t} -> #l:secrecy_level
-> #len:size_nat{len * numbytes t < pow2 32}
-> lseq (int_t t l) len
-> i:nat{i < len} -> unit -> unit & (lseq (uint_t U8 l) (numbytes t))
let uints_to_bytes_be_inner #t #l #len b i () = | false | null | false | let open Lib.Sequence in (), uint_to_bytes_be #t #l b.[ i ] | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Prims.nat",
"Prims.unit",
"FStar.Pervasives.Nati... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_to_bytes_be_inner: #t:inttype{unsigned t} -> #l:secrecy_level
-> #len:size_nat{len * numbytes t < pow2 32}
-> lseq (int_t t l) len
-> i:nat{i < len} -> unit -> unit & (lseq (uint_t U8 l) (numbytes t)) | [] | Lib.ByteSequence.uints_to_bytes_be_inner | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.Sequence.lseq (Lib.IntTypes.int_t t l) len -> i: Prims.nat{i < len} -> _: Prims.unit
-> Prims.unit *
Lib.Sequence.lseq (Lib.IntTypes.uint_t Lib.IntTypes.U8 l) (Lib.IntTypes.numbytes t) | {
"end_col": 34,
"end_line": 331,
"start_col": 2,
"start_line": 330
} |
Prims.Tot | val nat_from_intseq_be_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> b:seq (uint_t t l)
-> Tot (n:nat{n < pow2 (length b * bits t)}) (decreases (length b)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec nat_from_intseq_be_ #t #l b =
let len = length b in
if len = 0 then 0
else
let l = v (Seq.index b (len - 1)) in
let pre = Seq.slice b 0 (len - 1) in
let shift = pow2 (bits t) in
let n' = nat_from_intseq_be_ pre in
Math.Lemmas.pow2_plus (bits t) (len * bits t - bits t);
l + shift * ... | val nat_from_intseq_be_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> b:seq (uint_t t l)
-> Tot (n:nat{n < pow2 (length b * bits t)}) (decreases (length b))
let rec nat_from_intseq_be_ #t #l b = | false | null | false | let len = length b in
if len = 0
then 0
else
let l = v (Seq.index b (len - 1)) in
let pre = Seq.slice b 0 (len - 1) in
let shift = pow2 (bits t) in
let n' = nat_from_intseq_be_ pre in
Math.Lemmas.pow2_plus (bits t) (len * bits t - bits t);
l + shift * n' | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total",
""
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.Sequence.seq",
"Lib.IntTypes.uint_t",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.unit",
"FStar.Math.Lemmas.pow2_plus",
"Lib.IntTypes.bits",... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_from_intseq_be_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> b:seq (uint_t t l)
-> Tot (n:nat{n < pow2 (length b * bits t)}) (decreases (length b)) | [
"recursion"
] | Lib.ByteSequence.nat_from_intseq_be_ | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.Sequence.seq (Lib.IntTypes.uint_t t l)
-> Prims.Tot (n: Prims.nat{n < Prims.pow2 (Lib.Sequence.length b * Lib.IntTypes.bits t)}) | {
"end_col": 18,
"end_line": 120,
"start_col": 37,
"start_line": 111
} |
Prims.Tot | val uint_from_bytes_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> b:lbytes_l l (numbytes t) -> uint_t t l | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uint_from_bytes_le #t #l b =
let n = nat_from_intseq_le #U8 b in
uint #t #l n | val uint_from_bytes_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> b:lbytes_l l (numbytes t) -> uint_t t l
let uint_from_bytes_le #t #l b = | false | null | false | let n = nat_from_intseq_le #U8 b in
uint #t #l n | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.ByteSequence.lbytes_l",
"Lib.IntTypes.numbytes",
"Lib.IntTypes.uint",
"Prims.nat",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.op_Multiply... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uint_from_bytes_le: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> b:lbytes_l l (numbytes t) -> uint_t t l | [] | Lib.ByteSequence.uint_from_bytes_le | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t) -> Lib.IntTypes.uint_t t l | {
"end_col": 14,
"end_line": 295,
"start_col": 32,
"start_line": 293
} |
FStar.Pervasives.Lemma | val nat_from_intseq_be_slice_lemma: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat
-> b:lseq (uint_t t l) len -> i:nat{i <= len} ->
Lemma (nat_from_intseq_be b == nat_from_intseq_be (slice b i len) + pow2 ((len - i) * bits t) * nat_from_intseq_be (slice b 0 i)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let nat_from_intseq_be_slice_lemma #t #l #len b i =
nat_from_intseq_be_slice_lemma_ #t #l #len b i | val nat_from_intseq_be_slice_lemma: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat
-> b:lseq (uint_t t l) len -> i:nat{i <= len} ->
Lemma (nat_from_intseq_be b == nat_from_intseq_be (slice b i len) + pow2 ((len - i) * bits t) * nat_from_intseq_be (slice b 0 i))
let nat_from_intseq_be_slice_lemma #t #l ... | false | null | true | nat_from_intseq_be_slice_lemma_ #t #l #len b i | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint_t",
"Prims.nat",
"Prims.op_LessThanOrEqual",
"Lib.ByteSequence.nat_from_intseq_be_slice_lemma_",
"Prims.unit"
] | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_from_intseq_be_slice_lemma: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat
-> b:lseq (uint_t t l) len -> i:nat{i <= len} ->
Lemma (nat_from_intseq_be b == nat_from_intseq_be (slice b i len) + pow2 ((len - i) * bits t) * nat_from_intseq_be (slice b 0 i)) | [] | Lib.ByteSequence.nat_from_intseq_be_slice_lemma | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len -> i: Prims.nat{i <= len}
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_be b ==
Lib.ByteSequence.nat_from_intseq_be (Lib.Sequence.slice b i len) +
Prims.pow2 ((len - i) * Lib.IntTypes.bits t) *
Lib.ByteSequence.nat_fr... | {
"end_col": 48,
"end_line": 417,
"start_col": 2,
"start_line": 417
} |
Prims.Tot | val uint_from_bytes_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> lbytes_l l (numbytes t) -> uint_t t l | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uint_from_bytes_be #t #l b =
let n = nat_from_intseq_be #U8 b in
uint #t #l n | val uint_from_bytes_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> lbytes_l l (numbytes t) -> uint_t t l
let uint_from_bytes_be #t #l b = | false | null | false | let n = nat_from_intseq_be #U8 b in
uint #t #l n | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.ByteSequence.lbytes_l",
"Lib.IntTypes.numbytes",
"Lib.IntTypes.uint",
"Prims.nat",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.op_Multiply... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uint_from_bytes_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> lbytes_l l (numbytes t) -> uint_t t l | [] | Lib.ByteSequence.uint_from_bytes_be | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (Lib.IntTypes.numbytes t) -> Lib.IntTypes.uint_t t l | {
"end_col": 14,
"end_line": 299,
"start_col": 32,
"start_line": 297
} |
FStar.Pervasives.Lemma | val index_nat_to_intseq_to_bytes_be:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in
Seq.index (nat_to_bytes_be #... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let index_nat_to_intseq_to_bytes_be #t #l len n i =
let s:lseq (uint_t t l) len = nat_to_intseq_be #t #l len n in
let m = numbytes t in
calc (==) {
Seq.index (nat_to_bytes_be #l m (v s.[len - 1 - i / m])) (m - (i % m) - 1);
== { index_nat_to_intseq_be #U8 #l m (v s.[len - 1 - i / m]) (i % m) }
uint (v... | val index_nat_to_intseq_to_bytes_be:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in
Seq.index (nat_to_bytes_be #... | false | null | true | let s:lseq (uint_t t l) len = nat_to_intseq_be #t #l len n in
let m = numbytes t in
calc ( == ) {
Seq.index (nat_to_bytes_be #l m (v s.[ len - 1 - i / m ])) (m - (i % m) - 1);
( == ) { index_nat_to_intseq_be #U8 #l m (v s.[ len - 1 - i / m ]) (i % m) }
uint (v s.[ len - 1 - i / m ] / pow2 (8 * (i % m)) % pow2 8);... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.IntTypes.bits",
"FStar.Calc.calc_finish",
... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_nat_to_intseq_to_bytes_be:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_be #t #l len n in
Seq.index (nat_to_bytes_be #... | [] | Lib.ByteSequence.index_nat_to_intseq_to_bytes_be | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} ->
n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} ->
i: Prims.nat{i < len * Lib.IntTypes.numbytes t}
-> FStar.Pervasives.Lemma
(ensures
(let s = Lib.ByteSequence.nat_to_intseq_be len n in
FStar.Seq.Base.index (Lib.B... | {
"end_col": 3,
"end_line": 695,
"start_col": 51,
"start_line": 682
} |
Prims.Tot | val seq_eq_mask_inner: #t:inttype{~(S128? t)} -> #len1:size_nat -> #len2:size_nat
-> b1:lseq (int_t t SEC) len1
-> b2:lseq (int_t t SEC) len2
-> len:size_nat{len <= len1 /\ len <= len2}
-> i:size_nat{i < len}
-> res:int_t t SEC{
(sub b1 0 i == sub b2 0 i ==> v res == v (ones t SEC)) /\
(sub b1 0 ... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let seq_eq_mask_inner #t #len1 #len2 b1 b2 len i res =
logand_zeros (ones t SEC);
logand_ones (ones t SEC);
logand_zeros (zeros t SEC);
logand_ones (zeros t SEC);
let z0 = res in
let res = eq_mask b1.[i] b2.[i] &. z0 in
logand_spec (eq_mask b1.[i] b2.[i]) z0;
if v res = ones_v t then
begin
let... | val seq_eq_mask_inner: #t:inttype{~(S128? t)} -> #len1:size_nat -> #len2:size_nat
-> b1:lseq (int_t t SEC) len1
-> b2:lseq (int_t t SEC) len2
-> len:size_nat{len <= len1 /\ len <= len2}
-> i:size_nat{i < len}
-> res:int_t t SEC{
(sub b1 0 i == sub b2 0 i ==> v res == v (ones t SEC)) /\
(sub b1 0 ... | false | null | false | logand_zeros (ones t SEC);
logand_ones (ones t SEC);
logand_zeros (zeros t SEC);
logand_ones (zeros t SEC);
let z0 = res in
let res = eq_mask b1.[ i ] b2.[ i ] &. z0 in
logand_spec (eq_mask b1.[ i ] b2.[ i ]) z0;
if v res = ones_v t
then
let s1 = sub b1 0 (i + 1) in
let s2 = sub b2 0 (i + 1) in
Seq.lemma_split s1... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.IntTypes.inttype",
"Prims.l_not",
"Prims.b2t",
"Lib.IntTypes.uu___is_S128",
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Prims.l_and",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan",
"Prims.l_imp",
"Prims.eq2",
"Prims.l_or",
"FStar.Seq.Ba... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val seq_eq_mask_inner: #t:inttype{~(S128? t)} -> #len1:size_nat -> #len2:size_nat
-> b1:lseq (int_t t SEC) len1
-> b2:lseq (int_t t SEC) len2
-> len:size_nat{len <= len1 /\ len <= len2}
-> i:size_nat{i < len}
-> res:int_t t SEC{
(sub b1 0 i == sub b2 0 i ==> v res == v (ones t SEC)) /\
(sub b1 0 ... | [] | Lib.ByteSequence.seq_eq_mask_inner | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
b1: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len1 ->
b2: Lib.Sequence.lseq (Lib.IntTypes.int_t t Lib.IntTypes.SEC) len2 ->
len: Lib.IntTypes.size_nat{len <= len1 /\ len <= len2} ->
i: Lib.IntTypes.size_nat{i < len} ->
res:
Lib.IntTypes.int_t t Lib.IntTypes.SEC
{ (Lib.... | {
"end_col": 5,
"end_line": 62,
"start_col": 2,
"start_line": 43
} |
Prims.Tot | val uints_from_bytes_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> lbytes_l l (len * numbytes t) -> lseq (uint_t t l) len | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_be #t #l #len b =
Lib.Sequence.createi #(int_t t l) len
(fun i -> uint_from_bytes_be (sub b (i * numbytes t) (numbytes t))) | val uints_from_bytes_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> lbytes_l l (len * numbytes t) -> lseq (uint_t t l) len
let uints_from_bytes_be #t #l #len b = | false | null | false | Lib.Sequence.createi #(int_t t l)
len
(fun i -> uint_from_bytes_be (sub b (i * numbytes t) (numbytes t))) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Lib.S... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_be: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> lbytes_l l (len * numbytes t) -> lseq (uint_t t l) len | [] | Lib.ByteSequence.uints_from_bytes_be | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t)
-> Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len | {
"end_col": 71,
"end_line": 350,
"start_col": 2,
"start_line": 349
} |
FStar.Pervasives.Lemma | val index_uint_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l
-> Lemma
(forall (i:nat{i < numbytes t}). index (uint_to_bytes_le #t #l u) i ==
uint #U8 #l (v u / pow2 (8 * i) % pow2 8)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let index_uint_to_bytes_le #t #l u =
Classical.forall_intro (index_nat_to_intseq_le #U8 #l (numbytes t) (v u)) | val index_uint_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l
-> Lemma
(forall (i:nat{i < numbytes t}). index (uint_to_bytes_le #t #l u) i ==
uint #U8 #l (v u / pow2 (8 * i) % pow2 8))
let index_uint_to_bytes_le #t #l u = | false | null | true | Classical.forall_intro (index_nat_to_intseq_le #U8 #l (numbytes t) (v u)) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.uint_t",
"FStar.Classical.forall_intro",
"Prims.nat",
"Prims.op_LessThan",
"Lib.IntTypes.numbytes",
"Prims.eq2",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U8",
"FStar.Seq.Base.index",
"Lib.B... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_uint_to_bytes_le: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l
-> Lemma
(forall (i:nat{i < numbytes t}). index (uint_to_bytes_le #t #l u) i ==
uint #U8 #l (v u / pow2 (8 * i) % pow2 8)) | [] | Lib.ByteSequence.index_uint_to_bytes_le | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | u118: Lib.IntTypes.uint_t t l
-> FStar.Pervasives.Lemma
(ensures
forall (i: Prims.nat{i < Lib.IntTypes.numbytes t}).
Lib.Sequence.index (Lib.ByteSequence.uint_to_bytes_le u118) i ==
Lib.IntTypes.uint (Lib.IntTypes.v u118 / Prims.pow2 (8 * i) % Prims.pow2 8)) | {
"end_col": 75,
"end_line": 285,
"start_col": 2,
"start_line": 285
} |
FStar.Pervasives.Lemma | val nat_from_intseq_be_slice_lemma_:
#t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat
-> b:lseq (int_t t l) len
-> i:nat{i <= len} ->
Lemma (ensures (nat_from_intseq_be_ b == nat_from_intseq_be_ (slice b i len) + pow2 ((len - i) * bits t) * nat_from_intseq_be_ (slice b 0 i)))
(decreases (len - i)... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec nat_from_intseq_be_slice_lemma_ #t #l #len b i =
if len = 0 then ()
else begin
if i = len then ()
else begin
let b1 = slice b i len in
nat_from_intseq_be_slice_lemma_ #t #l #(len - i) b1 1;
assert (nat_from_intseq_be_ b1 == nat_from_intseq_be_ (slice b (i + 1) len) + pow2 ((len - i... | val nat_from_intseq_be_slice_lemma_:
#t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat
-> b:lseq (int_t t l) len
-> i:nat{i <= len} ->
Lemma (ensures (nat_from_intseq_be_ b == nat_from_intseq_be_ (slice b i len) + pow2 ((len - i) * bits t) * nat_from_intseq_be_ (slice b 0 i)))
(decreases (len - i)... | false | null | true | if len = 0
then ()
else
if i = len
then ()
else
let b1 = slice b i len in
nat_from_intseq_be_slice_lemma_ #t #l #(len - i) b1 1;
assert (nat_from_intseq_be_ b1 ==
nat_from_intseq_be_ (slice b (i + 1) len) + pow2 ((len - i - 1) * bits t) * v b.[ i ]);
nat_from_intseq_be_slice_lemma_ #t #l #... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma",
""
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Prims.nat",
"Prims.op_LessThanOrEqual",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"Prims.l_or",
"Lib.IntTypes.max_size_t",
... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_from_intseq_be_slice_lemma_:
#t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat
-> b:lseq (int_t t l) len
-> i:nat{i <= len} ->
Lemma (ensures (nat_from_intseq_be_ b == nat_from_intseq_be_ (slice b i len) + pow2 ((len - i) * bits t) * nat_from_intseq_be_ (slice b 0 i)))
(decreases (len - i)... | [
"recursion"
] | Lib.ByteSequence.nat_from_intseq_be_slice_lemma_ | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.Sequence.lseq (Lib.IntTypes.int_t t l) len -> i: Prims.nat{i <= len}
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_be_ b ==
Lib.ByteSequence.nat_from_intseq_be_ (Lib.Sequence.slice b i len) +
Prims.pow2 ((len - i) * Lib.IntTypes.bits t) *
Lib.ByteSequ... | {
"end_col": 5,
"end_line": 411,
"start_col": 2,
"start_line": 400
} |
FStar.Pervasives.Lemma | val some_arithmetic: t:inttype{~(U1? t)} -> n:nat -> i:nat -> Lemma
(let m = numbytes t in
n / pow2 (bits t * (i / m)) % pow2 (bits t) / pow2 (8 * (i % m)) % pow2 8 ==
n / pow2 (8 * i) % pow2 8) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let some_arithmetic t n i =
let m = numbytes t in
calc (==) {
n / pow2 (bits t * (i / m)) % pow2 (bits t) / pow2 (8 * (i % m)) % pow2 8;
== { assert (bits t == 8 * m) }
n / pow2 ((8 * m) * (i / m)) % pow2 (8 * m) / pow2 (8 * (i % m)) % pow2 8;
== { FStar.Math.Lemmas.paren_mul_right 8 m (i / m);
... | val some_arithmetic: t:inttype{~(U1? t)} -> n:nat -> i:nat -> Lemma
(let m = numbytes t in
n / pow2 (bits t * (i / m)) % pow2 (bits t) / pow2 (8 * (i % m)) % pow2 8 ==
n / pow2 (8 * i) % pow2 8)
let some_arithmetic t n i = | false | null | true | let m = numbytes t in
calc ( == ) {
n / pow2 (bits t * (i / m)) % pow2 (bits t) / pow2 (8 * (i % m)) % pow2 8;
( == ) { assert (bits t == 8 * m) }
n / pow2 ((8 * m) * (i / m)) % pow2 (8 * m) / pow2 (8 * (i % m)) % pow2 8;
( == ) { (FStar.Math.Lemmas.paren_mul_right 8 m (i / m);
FStar.Math.Lemmas.euclidean_d... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_not",
"Prims.b2t",
"Lib.IntTypes.uu___is_U1",
"Prims.nat",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Modulus",
"Prims.op_Division",
"Prims.pow2",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Prims.Cons",
"FStar.Preorder.relation",
"Pri... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val some_arithmetic: t:inttype{~(U1? t)} -> n:nat -> i:nat -> Lemma
(let m = numbytes t in
n / pow2 (bits t * (i / m)) % pow2 (bits t) / pow2 (8 * (i % m)) % pow2 8 ==
n / pow2 (8 * i) % pow2 8) | [] | Lib.ByteSequence.some_arithmetic | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | t: Lib.IntTypes.inttype{~(U1? t)} -> n: Prims.nat -> i: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
(let m = Lib.IntTypes.numbytes t in
n / Prims.pow2 (Lib.IntTypes.bits t * (i / m)) % Prims.pow2 (Lib.IntTypes.bits t) /
Prims.pow2 (8 * (i % m)) %
Prims.pow2 8 ==
n / Prims.po... | {
"end_col": 3,
"end_line": 625,
"start_col": 27,
"start_line": 607
} |
FStar.Pervasives.Lemma | val index_uint_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l
-> Lemma
(forall (i:nat{i < numbytes t}). index (uint_to_bytes_be #t #l u) (numbytes t - i - 1) ==
uint #U8 #l (v u / pow2 (8 * i) % pow2 8)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let index_uint_to_bytes_be #t #l u =
Classical.forall_intro (index_nat_to_intseq_be #U8 #l (numbytes t) (v u)) | val index_uint_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l
-> Lemma
(forall (i:nat{i < numbytes t}). index (uint_to_bytes_be #t #l u) (numbytes t - i - 1) ==
uint #U8 #l (v u / pow2 (8 * i) % pow2 8))
let index_uint_to_bytes_be #t #l u = | false | null | true | Classical.forall_intro (index_nat_to_intseq_be #U8 #l (numbytes t) (v u)) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.uint_t",
"FStar.Classical.forall_intro",
"Prims.nat",
"Prims.op_LessThan",
"Lib.IntTypes.numbytes",
"Prims.eq2",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U8",
"FStar.Seq.Base.index",
"Lib.B... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_uint_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> u:uint_t t l
-> Lemma
(forall (i:nat{i < numbytes t}). index (uint_to_bytes_be #t #l u) (numbytes t - i - 1) ==
uint #U8 #l (v u / pow2 (8 * i) % pow2 8)) | [] | Lib.ByteSequence.index_uint_to_bytes_be | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | u124: Lib.IntTypes.uint_t t l
-> FStar.Pervasives.Lemma
(ensures
forall (i: Prims.nat{i < Lib.IntTypes.numbytes t}).
Lib.Sequence.index (Lib.ByteSequence.uint_to_bytes_be u124)
(Lib.IntTypes.numbytes t - i - 1) ==
Lib.IntTypes.uint (Lib.IntTypes.v u124 / Prims.pow2 (8 * i) % Prims.... | {
"end_col": 75,
"end_line": 291,
"start_col": 2,
"start_line": 291
} |
Prims.Tot | val nat_to_intseq_le_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> len:nat
-> n:nat{n < pow2 (bits t * len)}
-> Tot (b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_le b}) (decreases len) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec nat_to_intseq_le_ #t #l len n =
if len = 0 then Seq.empty
else
let len' = len - 1 in
let tt = uint #t #l (n % modulus t) in
let n' = n / modulus t in
assert (modulus t = pow2 (bits t));
FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t);
let b' = nat_to_intseq_le_ len' n' i... | val nat_to_intseq_le_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> len:nat
-> n:nat{n < pow2 (bits t * len)}
-> Tot (b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_le b}) (decreases len)
let rec nat_to_intseq_le_ #t #l len n = | false | null | false | if len = 0
then Seq.empty
else
let len' = len - 1 in
let tt = uint #t #l (n % modulus t) in
let n' = n / modulus t in
assert (modulus t = pow2 (bits t));
FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t);
let b' = nat_to_intseq_le_ len' n' in
let b = Seq.append (create 1 tt) b' in
Seq.append_... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"total",
""
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Prims.op_Equality",
"Prims.int",
"FStar.Seq.Base.empty",
"Lib.IntTypes.uint_t",
"Prims.bool",
"Prims.unit... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_to_intseq_le_:
#t:inttype{unsigned t} -> #l:secrecy_level
-> len:nat
-> n:nat{n < pow2 (bits t * len)}
-> Tot (b:seq (uint_t t l){length b == len /\ n == nat_from_intseq_le b}) (decreases len) | [
"recursion"
] | Lib.ByteSequence.nat_to_intseq_le_ | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | len: Prims.nat -> n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)}
-> Prims.Tot
(b:
Lib.Sequence.seq (Lib.IntTypes.uint_t t l)
{Lib.Sequence.length b == len /\ n == Lib.ByteSequence.nat_from_intseq_le b}) | {
"end_col": 5,
"end_line": 181,
"start_col": 2,
"start_line": 171
} |
FStar.Pervasives.Lemma | val uints_from_bytes_le_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_le (uints_from_bytes_le #t #l #len b) == nat_from_bytes_le b) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_le_nat_lemma #t #l #len b =
uints_from_bytes_le_nat_lemma_ #t #l #len b | val uints_from_bytes_le_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_le (uints_from_bytes_le #t #l #len b) == nat_from_bytes_le b)
let uints_from_bytes_le_nat_lemma #t #l #len b = | false | null | true | uints_from_bytes_le_nat_lemma_ #t #l #len b | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Lib.B... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_le_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_le (uints_from_bytes_le #t #l #len b) == nat_from_bytes_le b) | [] | Lib.ByteSequence.uints_from_bytes_le_nat_lemma | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t)
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_le (Lib.ByteSequence.uints_from_bytes_le b) ==
Lib.ByteSequence.nat_from_bytes_le b) | {
"end_col": 45,
"end_line": 480,
"start_col": 2,
"start_line": 480
} |
FStar.Pervasives.Lemma | val lemma_nat_from_to_bytes_be_preserves_value: #l:secrecy_level -> b:bytes_l l -> len:size_nat{len == Lib.Sequence.length b} ->
Lemma (nat_to_bytes_be #l len (nat_from_bytes_be b) == b) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let lemma_nat_from_to_bytes_be_preserves_value #l b len =
lemma_nat_from_to_intseq_be_preserves_value len b | val lemma_nat_from_to_bytes_be_preserves_value: #l:secrecy_level -> b:bytes_l l -> len:size_nat{len == Lib.Sequence.length b} ->
Lemma (nat_to_bytes_be #l len (nat_from_bytes_be b) == b)
let lemma_nat_from_to_bytes_be_preserves_value #l b len = | false | null | true | lemma_nat_from_to_intseq_be_preserves_value len b | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.secrecy_level",
"Lib.ByteSequence.bytes_l",
"Lib.IntTypes.size_nat",
"Prims.eq2",
"Prims.nat",
"Lib.Sequence.length",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.ByteSequence.lemma_nat_from_to_intseq_be_preserves_value",
"Prims.unit"
] | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_nat_from_to_bytes_be_preserves_value: #l:secrecy_level -> b:bytes_l l -> len:size_nat{len == Lib.Sequence.length b} ->
Lemma (nat_to_bytes_be #l len (nat_from_bytes_be b) == b) | [] | Lib.ByteSequence.lemma_nat_from_to_bytes_be_preserves_value | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.bytes_l l -> len: Lib.IntTypes.size_nat{len == Lib.Sequence.length b}
-> FStar.Pervasives.Lemma
(ensures Lib.ByteSequence.nat_to_bytes_be len (Lib.ByteSequence.nat_from_bytes_be b) == b) | {
"end_col": 51,
"end_line": 756,
"start_col": 2,
"start_line": 756
} |
FStar.Pervasives.Lemma | val lemma_uint_to_from_bytes_be_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
i : uint_t t l ->
Lemma(uint_from_bytes_be #t #l (uint_to_bytes_be #t #l i) == i) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let lemma_uint_to_from_bytes_be_preserves_value #t #l i =
lemma_reveal_uint_to_bytes_be #t #l (uint_to_bytes_be #t #l i);
lemma_uint_to_bytes_be_preserves_value #t #l i | val lemma_uint_to_from_bytes_be_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
i : uint_t t l ->
Lemma(uint_from_bytes_be #t #l (uint_to_bytes_be #t #l i) == i)
let lemma_uint_to_from_bytes_be_preserves_value #t #l i = | false | null | true | lemma_reveal_uint_to_bytes_be #t #l (uint_to_bytes_be #t #l i);
lemma_uint_to_bytes_be_preserves_value #t #l i | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.uint_t",
"Lib.ByteSequence.lemma_uint_to_bytes_be_preserves_value",
"Prims.unit",
"Lib.ByteSequence.lemma_reveal_uint_to_bytes_be",
... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_uint_to_from_bytes_be_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
i : uint_t t l ->
Lemma(uint_from_bytes_be #t #l (uint_to_bytes_be #t #l i) == i) | [] | Lib.ByteSequence.lemma_uint_to_from_bytes_be_preserves_value | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | i: Lib.IntTypes.uint_t t l
-> FStar.Pervasives.Lemma
(ensures Lib.ByteSequence.uint_from_bytes_be (Lib.ByteSequence.uint_to_bytes_be i) == i) | {
"end_col": 48,
"end_line": 771,
"start_col": 2,
"start_line": 770
} |
FStar.Pervasives.Lemma | val index_uints_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> ul:lseq (uint_t t l) len -> i:nat{i < len * numbytes t}
-> Lemma (index (uints_to_bytes_be #t #l #len ul) i == (uint_to_bytes_be ul.[i / numbytes t]).[i % numbytes t]) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let index_uints_to_bytes_be #t #l #len ul i =
index_generate_blocks (numbytes t) len len (uints_to_bytes_be_inner #t #l #len ul) i | val index_uints_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> ul:lseq (uint_t t l) len -> i:nat{i < len * numbytes t}
-> Lemma (index (uints_to_bytes_be #t #l #len ul) i == (uint_to_bytes_be ul.[i / numbytes t]).[i % numbytes t])
let index_uints_to_bytes_be ... | false | null | true | index_generate_blocks (numbytes t) len len (uints_to_bytes_be_inner #t #l #len ul) i | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint_t",
"Prims.nat",
"Lib.Sequence.index_generate_blocks",... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_uints_to_bytes_be: #t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> ul:lseq (uint_t t l) len -> i:nat{i < len * numbytes t}
-> Lemma (index (uints_to_bytes_be #t #l #len ul) i == (uint_to_bytes_be ul.[i / numbytes t]).[i % numbytes t]) | [] | Lib.ByteSequence.index_uints_to_bytes_be | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
ul: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len ->
i: Prims.nat{i < len * Lib.IntTypes.numbytes t}
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.index (Lib.ByteSequence.uints_to_bytes_be ul) i ==
(Lib.ByteSequence.uint_to_bytes_be ul.[ i / Lib.IntTypes.numbytes t ]).[ i %
Lib.In... | {
"end_col": 86,
"end_line": 340,
"start_col": 2,
"start_line": 340
} |
FStar.Pervasives.Lemma | val lemma_nat_from_to_bytes_le_preserves_value: #l:secrecy_level -> b:bytes_l l -> len:size_nat{len == Lib.Sequence.length b} ->
Lemma (nat_to_bytes_le #l len (nat_from_bytes_le b) == b) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let lemma_nat_from_to_bytes_le_preserves_value #l b len =
lemma_nat_from_to_intseq_le_preserves_value len b | val lemma_nat_from_to_bytes_le_preserves_value: #l:secrecy_level -> b:bytes_l l -> len:size_nat{len == Lib.Sequence.length b} ->
Lemma (nat_to_bytes_le #l len (nat_from_bytes_le b) == b)
let lemma_nat_from_to_bytes_le_preserves_value #l b len = | false | null | true | lemma_nat_from_to_intseq_le_preserves_value len b | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.secrecy_level",
"Lib.ByteSequence.bytes_l",
"Lib.IntTypes.size_nat",
"Prims.eq2",
"Prims.nat",
"Lib.Sequence.length",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.ByteSequence.lemma_nat_from_to_intseq_le_preserves_value",
"Prims.unit"
] | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_nat_from_to_bytes_le_preserves_value: #l:secrecy_level -> b:bytes_l l -> len:size_nat{len == Lib.Sequence.length b} ->
Lemma (nat_to_bytes_le #l len (nat_from_bytes_le b) == b) | [] | Lib.ByteSequence.lemma_nat_from_to_bytes_le_preserves_value | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.bytes_l l -> len: Lib.IntTypes.size_nat{len == Lib.Sequence.length b}
-> FStar.Pervasives.Lemma
(ensures Lib.ByteSequence.nat_to_bytes_le len (Lib.ByteSequence.nat_from_bytes_le b) == b) | {
"end_col": 51,
"end_line": 753,
"start_col": 2,
"start_line": 753
} |
FStar.Pervasives.Lemma | val uints_from_bytes_be_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_be (uints_from_bytes_be #t #l #len b) == nat_from_bytes_be b) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_be_nat_lemma #t #l #len b =
uints_from_bytes_be_nat_lemma_ #t #l #len b | val uints_from_bytes_be_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_be (uints_from_bytes_be #t #l #len b) == nat_from_bytes_be b)
let uints_from_bytes_be_nat_lemma #t #l #len b = | false | null | true | uints_from_bytes_be_nat_lemma_ #t #l #len b | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Lib.B... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_be_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_be (uints_from_bytes_be #t #l #len b) == nat_from_bytes_be b) | [] | Lib.ByteSequence.uints_from_bytes_be_nat_lemma | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t)
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_be (Lib.ByteSequence.uints_from_bytes_be b) ==
Lib.ByteSequence.nat_from_bytes_be b) | {
"end_col": 45,
"end_line": 550,
"start_col": 2,
"start_line": 550
} |
FStar.Pervasives.Lemma | val uints_from_bytes_be_nat_lemma_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_be_ (uints_from_bytes_be #t #l #len b) ==
nat_from_intseq_be (uints_from_bytes_be #t #l #(len-1) (sl... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_be_nat_lemma_aux #t #l #len b =
let r = uints_from_bytes_be #t #l #len b in
uints_from_bytes_be_slice_lemma #t #l #len b 1 len;
nat_from_intseq_be_slice_lemma r 1;
assert (nat_from_intseq_be_ r == nat_from_intseq_be (slice r 1 len) + pow2 ((len - 1) * bits t) * uint_v r.[0]) | val uints_from_bytes_be_nat_lemma_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_be_ (uints_from_bytes_be #t #l #len b) ==
nat_from_intseq_be (uints_from_bytes_be #t #l #(len-1) (sl... | false | null | true | let r = uints_from_bytes_be #t #l #len b in
uints_from_bytes_be_slice_lemma #t #l #len b 1 len;
nat_from_intseq_be_slice_lemma r 1;
assert (nat_from_intseq_be_ r ==
nat_from_intseq_be (slice r 1 len) + pow2 ((len - 1) * bits t) * uint_v r.[ 0 ]) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_pos",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_be_nat_lemma_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_be_ (uints_from_bytes_be #t #l #len b) ==
nat_from_intseq_be (uints_from_bytes_be #t #l #(len-1) (sl... | [] | Lib.ByteSequence.uints_from_bytes_be_nat_lemma_aux | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t)
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_be_ (Lib.ByteSequence.uints_from_bytes_be b) ==
Lib.ByteSequence.nat_from_intseq_be (Lib.ByteSequence.uints_from_bytes_be (Lib.Sequence.slice b
(Lib.IntTyp... | {
"end_col": 113,
"end_line": 532,
"start_col": 52,
"start_line": 528
} |
FStar.Pervasives.Lemma | val uints_from_bytes_le_nat_lemma_:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_le_ (uints_from_bytes_le #t #l #len b) == nat_from_intseq_le_ b) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec uints_from_bytes_le_nat_lemma_ #t #l #len b =
if len = 0 then ()
else begin
let b1 = slice b (numbytes t) (len * numbytes t) in
nat_from_intseq_le_slice_lemma_ #U8 #l #(len * numbytes t) b (numbytes t);
assert (nat_from_intseq_le_ b == nat_from_intseq_le_ (slice b 0 (numbytes t)) + pow2 (bits t)... | val uints_from_bytes_le_nat_lemma_:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_le_ (uints_from_bytes_le #t #l #len b) == nat_from_intseq_le_ b)
let rec uints_from_bytes_le_nat_lemma_ #t #l #... | false | null | true | if len = 0
then ()
else
let b1 = slice b (numbytes t) (len * numbytes t) in
nat_from_intseq_le_slice_lemma_ #U8 #l #(len * numbytes t) b (numbytes t);
assert (nat_from_intseq_le_ b ==
nat_from_intseq_le_ (slice b 0 (numbytes t)) + pow2 (bits t) * nat_from_intseq_le_ b1);
uints_from_bytes_le_nat_lemma_ #t ... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_le_nat_lemma_:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_le_ (uints_from_bytes_le #t #l #len b) == nat_from_intseq_le_ b) | [
"recursion"
] | Lib.ByteSequence.uints_from_bytes_le_nat_lemma_ | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t)
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_le_ (Lib.ByteSequence.uints_from_bytes_le b) ==
Lib.ByteSequence.nat_from_intseq_le_ b) | {
"end_col": 5,
"end_line": 477,
"start_col": 2,
"start_line": 469
} |
FStar.Pervasives.Lemma | val index_uints_to_bytes_le_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in
Seq.index (uints_to_bytes_le #t ... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let index_uints_to_bytes_le_aux #t #l len n i =
let open Lib.Sequence in
let s: lseq (int_t t l) len = nat_to_intseq_le #t #l len n in
index_generate_blocks (numbytes t) len len
(uints_to_bytes_le_inner #t #l #len s) i | val index_uints_to_bytes_le_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in
Seq.index (uints_to_bytes_le #t ... | false | null | true | let open Lib.Sequence in
let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in
index_generate_blocks (numbytes t) len len (uints_to_bytes_le_inner #t #l #len s) i | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.IntTypes.bits",
"Lib.Sequence.index_genera... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_uints_to_bytes_le_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma (let s:lseq (int_t t l) len = nat_to_intseq_le #t #l len n in
Seq.index (uints_to_bytes_le #t ... | [] | Lib.ByteSequence.index_uints_to_bytes_le_aux | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} ->
n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} ->
i: Prims.nat{i < len * Lib.IntTypes.numbytes t}
-> FStar.Pervasives.Lemma
(ensures
(let s = Lib.ByteSequence.nat_to_intseq_le len n in
FStar.Seq.Base.index (Lib.B... | {
"end_col": 44,
"end_line": 567,
"start_col": 2,
"start_line": 564
} |
FStar.Pervasives.Lemma | val uints_from_bytes_be_nat_lemma_:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_be_ (uints_from_bytes_be #t #l #len b) == nat_from_intseq_be_ b) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec uints_from_bytes_be_nat_lemma_ #t #l #len b =
if len = 0 then ()
else begin
uints_from_bytes_be_nat_lemma_aux #t #l #len b;
nat_from_intseq_be_slice_lemma_ b (numbytes t);
uints_from_bytes_be_nat_lemma_ #t #l #(len - 1) (slice b (numbytes t) (len * numbytes t))
end | val uints_from_bytes_be_nat_lemma_:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_be_ (uints_from_bytes_be #t #l #len b) == nat_from_intseq_be_ b)
let rec uints_from_bytes_be_nat_lemma_ #t #l #... | false | null | true | if len = 0
then ()
else
(uints_from_bytes_be_nat_lemma_aux #t #l #len b;
nat_from_intseq_be_slice_lemma_ b (numbytes t);
uints_from_bytes_be_nat_lemma_ #t #l #(len - 1) (slice b (numbytes t) (len * numbytes t))) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_be_nat_lemma_:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_nat{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_be_ (uints_from_bytes_be #t #l #len b) == nat_from_intseq_be_ b) | [
"recursion"
] | Lib.ByteSequence.uints_from_bytes_be_nat_lemma_ | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t)
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_be_ (Lib.ByteSequence.uints_from_bytes_be b) ==
Lib.ByteSequence.nat_from_intseq_be_ b) | {
"end_col": 5,
"end_line": 547,
"start_col": 2,
"start_line": 542
} |
FStar.Pervasives.Lemma | val lemma_uints_to_from_bytes_le_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
#len:size_nat{len * numbytes t < pow2 32} ->
s : lseq (uint_t t l) len ->
Lemma(uints_from_bytes_le #t #l (uints_to_bytes_le #t #l s) == s) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let lemma_uints_to_from_bytes_le_preserves_value #t #l #len s =
let lemma_uints_to_from_bytes_le_preserves_value_i (i : size_nat {i < len}) :
Lemma(index (uints_from_bytes_le #t #l (uints_to_bytes_le #t #l s)) i == index s i) =
let b8 = uints_to_bytes_le #t #l s in
index_uints_from_bytes_le #t #... | val lemma_uints_to_from_bytes_le_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
#len:size_nat{len * numbytes t < pow2 32} ->
s : lseq (uint_t t l) len ->
Lemma(uints_from_bytes_le #t #l (uints_to_bytes_le #t #l s) == s)
let lemma_uints_to_from_bytes_le_preserves_value #t #l #l... | false | null | true | let lemma_uints_to_from_bytes_le_preserves_value_i (i: size_nat{i < len})
: Lemma (index (uints_from_bytes_le #t #l (uints_to_bytes_le #t #l s)) i == index s i) =
let b8 = uints_to_bytes_le #t #l s in
index_uints_from_bytes_le #t #l #len b8 i;
assert (index (uints_from_bytes_le b8) i ==
uint_from_bytes_... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.Sequence.lseq",
"Lib.IntTypes.... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_uints_to_from_bytes_le_preserves_value :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
#len:size_nat{len * numbytes t < pow2 32} ->
s : lseq (uint_t t l) len ->
Lemma(uints_from_bytes_le #t #l (uints_to_bytes_le #t #l s) == s) | [] | Lib.ByteSequence.lemma_uints_to_from_bytes_le_preserves_value | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | s: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len
-> FStar.Pervasives.Lemma
(ensures Lib.ByteSequence.uints_from_bytes_le (Lib.ByteSequence.uints_to_bytes_le s) == s) | {
"end_col": 68,
"end_line": 860,
"start_col": 63,
"start_line": 848
} |
FStar.Pervasives.Lemma | val uints_to_bytes_be_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> Lemma
(uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n) ==
nat_to_bytes_be (len * numbytes t) n) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_to_bytes_be_nat_lemma #t #l len n =
Classical.forall_intro (uints_to_bytes_be_nat_lemma_ #t #l len n);
eq_intro (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n))
(nat_to_bytes_be (len * numbytes t) n) | val uints_to_bytes_be_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> Lemma
(uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n) ==
nat_to_bytes_be (len * numbytes t) n)
let uints_to_bytes_be_nat_lemma #... | false | null | true | Classical.forall_intro (uints_to_bytes_be_nat_lemma_ #t #l len n);
eq_intro (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n))
(nat_to_bytes_be (len * numbytes t) n) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.IntTypes.bits",
"Lib.Sequence.eq_intro",
... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_to_bytes_be_nat_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> Lemma
(uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n) ==
nat_to_bytes_be (len * numbytes t) n) | [] | Lib.ByteSequence.uints_to_bytes_be_nat_lemma | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} ->
n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)}
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.uints_to_bytes_be (Lib.ByteSequence.nat_to_intseq_be len n) ==
Lib.ByteSequence.nat_to_bytes_be (len * Lib.IntTypes.num... | {
"end_col": 49,
"end_line": 718,
"start_col": 2,
"start_line": 716
} |
FStar.Pervasives.Lemma | val uints_from_bytes_le_slice_lemma_rp:
#t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} ->
Lemma (index (uints_from_bytes_le #t #l #(j-i) (slice b (i * numbytes t) (j ... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_le_slice_lemma_rp #t #l #len b i j k =
let b1 = slice b (i * numbytes t) (j * numbytes t) in
let r = uints_from_bytes_le #t #l #(j-i) b1 in
index_uints_from_bytes_le #t #l #(j-i) b1 k;
assert (r.[k] == uint_from_bytes_le (sub b1 (k * numbytes t) (numbytes t)));
assert (r.[k] == uint_from_... | val uints_from_bytes_le_slice_lemma_rp:
#t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} ->
Lemma (index (uints_from_bytes_le #t #l #(j-i) (slice b (i * numbytes t) (j ... | false | null | true | let b1 = slice b (i * numbytes t) (j * numbytes t) in
let r = uints_from_bytes_le #t #l #(j - i) b1 in
index_uints_from_bytes_le #t #l #(j - i) b1 k;
assert (r.[ k ] == uint_from_bytes_le (sub b1 (k * numbytes t) (numbytes t)));
assert (r.[ k ] == uint_from_bytes_le (sub b ((i + k) * numbytes t) (numbytes t))) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_pos",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_le_slice_lemma_rp:
#t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} -> k:nat{k < j - i} ->
Lemma (index (uints_from_bytes_le #t #l #(j-i) (slice b (i * numbytes t) (j ... | [] | Lib.ByteSequence.uints_from_bytes_le_slice_lemma_rp | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) ->
i: Prims.nat ->
j: Prims.nat{i <= j /\ j <= len} ->
k: Prims.nat{k < j - i}
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.index (Lib.ByteSequence.uints_from_bytes_le (Lib.Sequence.slice b
(i * Lib.IntTypes.n... | {
"end_col": 82,
"end_line": 439,
"start_col": 59,
"start_line": 434
} |
FStar.Pervasives.Lemma | val uints_from_bytes_le_slice_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} ->
Lemma (slice (uints_from_bytes_le #t #l #len b) i j == uints_from_bytes_le #t #l #(j-i) (slice b (i * n... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_le_slice_lemma #t #l #len b i j =
FStar.Classical.forall_intro (uints_from_bytes_le_slice_lemma_lp #t #l #len b i j);
FStar.Classical.forall_intro (uints_from_bytes_le_slice_lemma_rp #t #l #len b i j);
eq_intro (slice (uints_from_bytes_le #t #l #len b) i j) (uints_from_bytes_le #t #l #(j-i) (... | val uints_from_bytes_le_slice_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} ->
Lemma (slice (uints_from_bytes_le #t #l #len b) i j == uints_from_bytes_le #t #l #(j-i) (slice b (i * n... | false | null | true | FStar.Classical.forall_intro (uints_from_bytes_le_slice_lemma_lp #t #l #len b i j);
FStar.Classical.forall_intro (uints_from_bytes_le_slice_lemma_rp #t #l #len b i j);
eq_intro (slice (uints_from_bytes_le #t #l #len b) i j)
(uints_from_bytes_le #t #l #(j - i) (slice b (i * numbytes t) (j * numbytes t))) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_pos",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_le_slice_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} ->
Lemma (slice (uints_from_bytes_le #t #l #len b) i j == uints_from_bytes_le #t #l #(j-i) (slice b (i * n... | [] | Lib.ByteSequence.uints_from_bytes_le_slice_lemma | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) ->
i: Prims.nat ->
j: Prims.nat{i <= j /\ j <= len}
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.slice (Lib.ByteSequence.uints_from_bytes_le b) i j ==
Lib.ByteSequence.uints_from_bytes_le (Lib.Sequence.slice b
(... | {
"end_col": 136,
"end_line": 444,
"start_col": 2,
"start_line": 442
} |
FStar.Pervasives.Lemma | val uints_from_bytes_be_slice_lemma_rp:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t)
-> i:nat
-> j:nat{i <= j /\ j <= len}
-> k:nat{k < j - i} ->
Lemma (index (uints_from_bytes_be #t #l #(j-i) (slic... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_be_slice_lemma_rp #t #l #len b i j k =
let b1 = slice b (i * numbytes t) (j * numbytes t) in
let r = uints_from_bytes_be #t #l #(j-i) b1 in
index_uints_from_bytes_be #t #l #(j-i) b1 k;
assert (r.[k] == uint_from_bytes_be (sub b1 (k * numbytes t) (numbytes t)));
assert (r.[k] == uint_from_... | val uints_from_bytes_be_slice_lemma_rp:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t)
-> i:nat
-> j:nat{i <= j /\ j <= len}
-> k:nat{k < j - i} ->
Lemma (index (uints_from_bytes_be #t #l #(j-i) (slic... | false | null | true | let b1 = slice b (i * numbytes t) (j * numbytes t) in
let r = uints_from_bytes_be #t #l #(j - i) b1 in
index_uints_from_bytes_be #t #l #(j - i) b1 k;
assert (r.[ k ] == uint_from_bytes_be (sub b1 (k * numbytes t) (numbytes t)));
assert (r.[ k ] == uint_from_bytes_be (sub b ((i + k) * numbytes t) (numbytes t))) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_pos",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_be_slice_lemma_rp:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t)
-> i:nat
-> j:nat{i <= j /\ j <= len}
-> k:nat{k < j - i} ->
Lemma (index (uints_from_bytes_be #t #l #(j-i) (slic... | [] | Lib.ByteSequence.uints_from_bytes_be_slice_lemma_rp | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) ->
i: Prims.nat ->
j: Prims.nat{i <= j /\ j <= len} ->
k: Prims.nat{k < j - i}
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.index (Lib.ByteSequence.uints_from_bytes_be (Lib.Sequence.slice b
(i * Lib.IntTypes.n... | {
"end_col": 82,
"end_line": 509,
"start_col": 59,
"start_line": 504
} |
FStar.Pervasives.Lemma | val index_nat_to_intseq_le:
#t:inttype{unsigned t}
-> #l:secrecy_level
-> len:size_nat
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len}
-> Lemma (Seq.index (nat_to_intseq_le #t #l len n) i ==
uint #t #l (n / pow2 (bits t * i) % pow2 (bits t))) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec index_nat_to_intseq_le #t #l len n i =
if i = 0 then
if len = 0 then () else head_nat_to_intseq_le #t #l len n
else
begin
FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t);
calc (==) {
Seq.index (nat_to_intseq_le #t #l (len - 1) (n / modulus t)) (i - 1);
== { index_nat... | val index_nat_to_intseq_le:
#t:inttype{unsigned t}
-> #l:secrecy_level
-> len:size_nat
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len}
-> Lemma (Seq.index (nat_to_intseq_le #t #l len n) i ==
uint #t #l (n / pow2 (bits t * i) % pow2 (bits t)))
let rec index_nat_to_intseq_le #t #l len n i = | false | null | true | if i = 0
then if len = 0 then () else head_nat_to_intseq_le #t #l len n
else
(FStar.Math.Lemmas.lemma_div_lt_nat n (bits t * len) (bits t);
calc ( == ) {
Seq.index (nat_to_intseq_le #t #l (len - 1) (n / modulus t)) (i - 1);
( == ) { index_nat_to_intseq_le #t #l (len - 1) (n / modulus t) (i - 1) }
... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.nat",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"Lib.ByteSequence.head_nat_to_intse... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_nat_to_intseq_le:
#t:inttype{unsigned t}
-> #l:secrecy_level
-> len:size_nat
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len}
-> Lemma (Seq.index (nat_to_intseq_le #t #l len n) i ==
uint #t #l (n / pow2 (bits t * i) % pow2 (bits t))) | [
"recursion"
] | Lib.ByteSequence.index_nat_to_intseq_le | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Lib.IntTypes.size_nat ->
n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} ->
i: Prims.nat{i < len}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.index (Lib.ByteSequence.nat_to_intseq_le len n) i ==
Lib.IntTypes.uint (n / Prims.pow2 (Lib.IntTypes.bits t * i) % Prims.pow2 (... | {
"end_col": 7,
"end_line": 252,
"start_col": 2,
"start_line": 233
} |
FStar.Pervasives.Lemma | val uints_to_bytes_le_nat_lemma_: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma
(Seq.index (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n)) i ==
Seq.index (nat_to_bytes... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_to_bytes_le_nat_lemma_ #t #l len n i =
let s:lseq (uint_t t l) len = nat_to_intseq_le #t #l len n in
calc (==) {
Seq.index (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n)) i;
== { index_uints_to_bytes_le_aux #t #l len n i }
Seq.index (nat_to_bytes_le #l (numbytes t) (v s.[i / numb... | val uints_to_bytes_le_nat_lemma_: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma
(Seq.index (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n)) i ==
Seq.index (nat_to_bytes... | false | null | true | let s:lseq (uint_t t l) len = nat_to_intseq_le #t #l len n in
calc ( == ) {
Seq.index (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n)) i;
( == ) { index_uints_to_bytes_le_aux #t #l len n i }
Seq.index (nat_to_bytes_le #l (numbytes t) (v s.[ i / numbytes t ])) (i % numbytes t);
( == ) { index_nat_to... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.IntTypes.bits",
"FStar.Calc.calc_finish",
... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_to_bytes_le_nat_lemma_: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma
(Seq.index (uints_to_bytes_le #t #l #len (nat_to_intseq_le #t #l len n)) i ==
Seq.index (nat_to_bytes... | [] | Lib.ByteSequence.uints_to_bytes_le_nat_lemma_ | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} ->
n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} ->
i: Prims.nat{i < len * Lib.IntTypes.numbytes t}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.index (Lib.ByteSequence.uints_to_bytes_le (Lib.ByteSequence.nat_to_intse... | {
"end_col": 3,
"end_line": 665,
"start_col": 48,
"start_line": 657
} |
FStar.Pervasives.Lemma | val uints_from_bytes_be_slice_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} ->
Lemma (slice (uints_from_bytes_be #t #l #len b) i j == uints_from_bytes_be #t #l #(j-i) (slice b (i * n... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_be_slice_lemma #t #l #len b i j =
FStar.Classical.forall_intro (uints_from_bytes_be_slice_lemma_lp #t #l #len b i j);
FStar.Classical.forall_intro (uints_from_bytes_be_slice_lemma_rp #t #l #len b i j);
eq_intro (slice (uints_from_bytes_be #t #l #len b) i j) (uints_from_bytes_be #t #l #(j-i) (... | val uints_from_bytes_be_slice_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} ->
Lemma (slice (uints_from_bytes_be #t #l #len b) i j == uints_from_bytes_be #t #l #(j-i) (slice b (i * n... | false | null | true | FStar.Classical.forall_intro (uints_from_bytes_be_slice_lemma_lp #t #l #len b i j);
FStar.Classical.forall_intro (uints_from_bytes_be_slice_lemma_rp #t #l #len b i j);
eq_intro (slice (uints_from_bytes_be #t #l #len b) i j)
(uints_from_bytes_be #t #l #(j - i) (slice b (i * numbytes t) (j * numbytes t))) | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_pos",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_be_slice_lemma: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level -> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) -> i:nat -> j:nat{i <= j /\ j <= len} ->
Lemma (slice (uints_from_bytes_be #t #l #len b) i j == uints_from_bytes_be #t #l #(j-i) (slice b (i * n... | [] | Lib.ByteSequence.uints_from_bytes_be_slice_lemma | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t) ->
i: Prims.nat ->
j: Prims.nat{i <= j /\ j <= len}
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.slice (Lib.ByteSequence.uints_from_bytes_be b) i j ==
Lib.ByteSequence.uints_from_bytes_be (Lib.Sequence.slice b
(... | {
"end_col": 136,
"end_line": 518,
"start_col": 2,
"start_line": 516
} |
FStar.Pervasives.Lemma | val uints_from_bytes_le_nat_lemma_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_le_ (uints_from_bytes_le #t #l #len b) ==
nat_from_intseq_le_ (slice b 0 (numbytes t)) + pow2 (bits... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_from_bytes_le_nat_lemma_aux #t #l #len b =
let r = uints_from_bytes_le #t #l #len b in
assert (nat_from_intseq_le_ r == v r.[0] + pow2 (bits t) * nat_from_intseq_le_ (slice r 1 len));
assert (nat_from_intseq_le_ (slice b 0 (numbytes t)) == v r.[0]);
uints_from_bytes_le_slice_lemma #t #l #len b 1 len;
... | val uints_from_bytes_le_nat_lemma_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_le_ (uints_from_bytes_le #t #l #len b) ==
nat_from_intseq_le_ (slice b 0 (numbytes t)) + pow2 (bits... | false | null | true | let r = uints_from_bytes_le #t #l #len b in
assert (nat_from_intseq_le_ r == v r.[ 0 ] + pow2 (bits t) * nat_from_intseq_le_ (slice r 1 len));
assert (nat_from_intseq_le_ (slice b 0 (numbytes t)) == v r.[ 0 ]);
uints_from_bytes_le_slice_lemma #t #l #len b 1 len;
assert (slice r 1 len ==
uints_from_bytes_le #t #l #(... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_pos",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.ByteSequence.lbytes_l",
"Prims... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_from_bytes_le_nat_lemma_aux:
#t:inttype{unsigned t /\ ~(U1? t)}
-> #l:secrecy_level
-> #len:size_pos{len * numbytes t < pow2 32}
-> b:lbytes_l l (len * numbytes t) ->
Lemma (nat_from_intseq_le_ (uints_from_bytes_le #t #l #len b) ==
nat_from_intseq_le_ (slice b 0 (numbytes t)) + pow2 (bits... | [] | Lib.ByteSequence.uints_from_bytes_le_nat_lemma_aux | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.ByteSequence.lbytes_l l (len * Lib.IntTypes.numbytes t)
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_le_ (Lib.ByteSequence.uints_from_bytes_le b) ==
Lib.ByteSequence.nat_from_intseq_le_ (Lib.Sequence.slice b 0 (Lib.IntTypes.numbytes t)) +
Prims.pow2 (Lib.IntTypes.bi... | {
"end_col": 104,
"end_line": 460,
"start_col": 52,
"start_line": 455
} |
FStar.Pervasives.Lemma | val nat_from_intseq_le_slice_lemma_:
#t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat
-> b:lseq (int_t t l) len
-> i:nat{i <= len} ->
Lemma (nat_from_intseq_le_ b == nat_from_intseq_le_ (slice b 0 i) + pow2 (i * bits t) * nat_from_intseq_le_ (slice b i len)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let rec nat_from_intseq_le_slice_lemma_ #t #l #len b i =
if len = 0 then ()
else begin
if i = 0 then ()
else begin
let b1 = slice b 0 i in
nat_from_intseq_le_slice_lemma_ #t #l #i b1 (i - 1);
assert (nat_from_intseq_le_ b1 == nat_from_intseq_le_ (slice b 0 (i - 1)) + pow2 ((i - 1) * bits t... | val nat_from_intseq_le_slice_lemma_:
#t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat
-> b:lseq (int_t t l) len
-> i:nat{i <= len} ->
Lemma (nat_from_intseq_le_ b == nat_from_intseq_le_ (slice b 0 i) + pow2 (i * bits t) * nat_from_intseq_le_ (slice b i len))
let rec nat_from_intseq_le_slice_lemma_ ... | false | null | true | if len = 0
then ()
else
if i = 0
then ()
else
let b1 = slice b 0 i in
nat_from_intseq_le_slice_lemma_ #t #l #i b1 (i - 1);
assert (nat_from_intseq_le_ b1 ==
nat_from_intseq_le_ (slice b 0 (i - 1)) + pow2 ((i - 1) * bits t) * v b.[ i - 1 ]);
nat_from_intseq_le_slice_lemma_ #t #l #len b (i -... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Prims.nat",
"Prims.op_LessThanOrEqual",
"Prims.op_Equality",
"Prims.int",
"Prims.bool",
"Lib.ByteSequence.nat_from_intseq_slice_lem... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val nat_from_intseq_le_slice_lemma_:
#t:inttype{unsigned t} -> #l:secrecy_level -> #len:size_nat
-> b:lseq (int_t t l) len
-> i:nat{i <= len} ->
Lemma (nat_from_intseq_le_ b == nat_from_intseq_le_ (slice b 0 i) + pow2 (i * bits t) * nat_from_intseq_le_ (slice b i len)) | [
"recursion"
] | Lib.ByteSequence.nat_from_intseq_le_slice_lemma_ | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | b: Lib.Sequence.lseq (Lib.IntTypes.int_t t l) len -> i: Prims.nat{i <= len}
-> FStar.Pervasives.Lemma
(ensures
Lib.ByteSequence.nat_from_intseq_le_ b ==
Lib.ByteSequence.nat_from_intseq_le_ (Lib.Sequence.slice b 0 i) +
Prims.pow2 (i * Lib.IntTypes.bits t) *
Lib.ByteSequence.nat_from_intseq... | {
"end_col": 5,
"end_line": 386,
"start_col": 2,
"start_line": 375
} |
FStar.Pervasives.Lemma | val lemma_uints_to_bytes_le_sub :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
#len:size_nat{len * numbytes t < pow2 32} ->
s : lseq (uint_t t l) len ->
i : size_nat {i < len} ->
Lemma(sub (uints_to_bytes_le #t #l s) (i * numbytes t) (numbytes t) == uint_to_bytes_le (index s i)) | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let lemma_uints_to_bytes_le_sub #t #l #len s i =
let lemma_uints_to_bytes_le_i_j (j : size_nat {j < numbytes t}):
Lemma(index (uints_to_bytes_le #t #l s) (i * numbytes t + j) == index (uint_to_bytes_le (index s i)) j) =
index_uints_to_bytes_le #t #l #len s (i*numbytes t + j);
assert (index (uint... | val lemma_uints_to_bytes_le_sub :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
#len:size_nat{len * numbytes t < pow2 32} ->
s : lseq (uint_t t l) len ->
i : size_nat {i < len} ->
Lemma(sub (uints_to_bytes_le #t #l s) (i * numbytes t) (numbytes t) == uint_to_bytes_le (index s i))
let lemma_u... | false | null | true | let lemma_uints_to_bytes_le_i_j (j: size_nat{j < numbytes t})
: Lemma
(index (uints_to_bytes_le #t #l s) (i * numbytes t + j) ==
index (uint_to_bytes_le (index s i)) j) =
index_uints_to_bytes_le #t #l #len s (i * numbytes t + j);
assert (index (uints_to_bytes_le #t #l s) (i * numbytes t + j) ==
... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.Sequence.lseq",
"Lib.IntTypes.... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_uints_to_bytes_le_sub :
#t : inttype{unsigned t /\ ~(U1? t)} ->
#l : secrecy_level ->
#len:size_nat{len * numbytes t < pow2 32} ->
s : lseq (uint_t t l) len ->
i : size_nat {i < len} ->
Lemma(sub (uints_to_bytes_le #t #l s) (i * numbytes t) (numbytes t) == uint_to_bytes_le (index s i)) | [] | Lib.ByteSequence.lemma_uints_to_bytes_le_sub | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | s: Lib.Sequence.lseq (Lib.IntTypes.uint_t t l) len -> i: Lib.IntTypes.size_nat{i < len}
-> FStar.Pervasives.Lemma
(ensures
Lib.Sequence.sub (Lib.ByteSequence.uints_to_bytes_le s)
(i * Lib.IntTypes.numbytes t)
(Lib.IntTypes.numbytes t) ==
Lib.ByteSequence.uint_to_bytes_le (Lib.Sequence.... | {
"end_col": 105,
"end_line": 846,
"start_col": 48,
"start_line": 838
} |
FStar.Pervasives.Lemma | val uints_to_bytes_be_nat_lemma_: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma
(Seq.index (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n)) i ==
Seq.index (nat_to_bytes... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Sequence",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let uints_to_bytes_be_nat_lemma_ #t #l len n i =
let s:lseq (uint_t t l) len = nat_to_intseq_be #t #l len n in
calc (==) {
Seq.index (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n)) i;
== { index_uints_to_bytes_be_aux #t #l len n i }
Seq.index (nat_to_bytes_be #l (numbytes t) (v s.[i / numb... | val uints_to_bytes_be_nat_lemma_: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma
(Seq.index (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n)) i ==
Seq.index (nat_to_bytes... | false | null | true | let s:lseq (uint_t t l) len = nat_to_intseq_be #t #l len n in
calc ( == ) {
Seq.index (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n)) i;
( == ) { index_uints_to_bytes_be_aux #t #l len n i }
Seq.index (nat_to_bytes_be #l (numbytes t) (v s.[ i / numbytes t ])) (i % numbytes t);
( == ) { index_nat_to... | {
"checked_file": "Lib.ByteSequence.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasive... | [
"lemma"
] | [
"Lib.IntTypes.inttype",
"Prims.l_and",
"Prims.b2t",
"Lib.IntTypes.unsigned",
"Prims.l_not",
"Lib.IntTypes.uu___is_U1",
"Lib.IntTypes.secrecy_level",
"Prims.nat",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Lib.IntTypes.numbytes",
"Prims.pow2",
"Lib.IntTypes.bits",
"FStar.Calc.calc_finish",
... | [] | module Lib.ByteSequence
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#reset-options "--z3rlimit 100 --max_fuel 0 --max_ifuel 0"
/// BEGIN constant-time sequence equality
val lemma_not_equal_slice: #a:Type -> b1:Seq.seq a -> b2:Seq.seq a -> i:nat -> j:nat ->
k:n... | false | false | Lib.ByteSequence.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uints_to_bytes_be_nat_lemma_: #t:inttype{unsigned t /\ ~(U1? t)} -> #l:secrecy_level
-> len:nat{len * numbytes t < pow2 32}
-> n:nat{n < pow2 (bits t * len)}
-> i:nat{i < len * numbytes t}
-> Lemma
(Seq.index (uints_to_bytes_be #t #l #len (nat_to_intseq_be #t #l len n)) i ==
Seq.index (nat_to_bytes... | [] | Lib.ByteSequence.uints_to_bytes_be_nat_lemma_ | {
"file_name": "lib/Lib.ByteSequence.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Prims.nat{len * Lib.IntTypes.numbytes t < Prims.pow2 32} ->
n: Prims.nat{n < Prims.pow2 (Lib.IntTypes.bits t * len)} ->
i: Prims.nat{i < len * Lib.IntTypes.numbytes t}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.index (Lib.ByteSequence.uints_to_bytes_be (Lib.ByteSequence.nat_to_intse... | {
"end_col": 3,
"end_line": 713,
"start_col": 48,
"start_line": 705
} |
Prims.GTot | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let store_pre
(#a:Type) (#rrel #rel:MB.srel a) (b:MB.mbuffer a rrel rel)
(i:nat) (j:nat{i + j <= MB.length b}) (predicate:Seq.seq a -> Type0)
= fun (h:HS.mem) ->
let sb = MB.as_seq h b in
let len = MB.length b in
MB.live h b /\
(forall (s:Seq.seq a). //monotonicity precondition that once the co... | let store_pre
(#a: Type)
(#rrel #rel: MB.srel a)
(b: MB.mbuffer a rrel rel)
(i: nat)
(j: nat{i + j <= MB.length b})
(predicate: (Seq.seq a -> Type0))
= | false | null | false | fun (h: HS.mem) ->
let sb = MB.as_seq h b in
let len = MB.length b in
MB.live h b /\
(forall (s: Seq.seq a).
(Seq.length s == len /\ Seq.equal (Seq.slice s 0 i) (Seq.slice sb 0 i) /\
Seq.equal (Seq.slice s (i + j) len) (Seq.slice sb (i + j) len) /\
predicate (Seq.slice s i (i + j))) ==>
... | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [
"sometrivial"
] | [
"LowStar.Monotonic.Buffer.srel",
"LowStar.Monotonic.Buffer.mbuffer",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"LowStar.Monotonic.Buffer.length",
"FStar.Seq.Base.seq",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"LowStar.Monotonic.Buffer.live",
"Prims.l_Fo... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val store_pre : b: LowStar.Monotonic.Buffer.mbuffer a rrel rel ->
i: Prims.nat ->
j: Prims.nat{i + j <= LowStar.Monotonic.Buffer.length b} ->
predicate: (_: FStar.Seq.Base.seq a -> Type0) ->
h: FStar.Monotonic.HyperStack.mem
-> Prims.GTot Prims.logical | [] | LowStar.Endianness.store_pre | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} |
b: LowStar.Monotonic.Buffer.mbuffer a rrel rel ->
i: Prims.nat ->
j: Prims.nat{i + j <= LowStar.Monotonic.Buffer.length b} ->
predicate: (_: FStar.Seq.Base.seq a -> Type0) ->
h: FStar.Monotonic.HyperStack.mem
-> Prims.GTot Prims.logical | {
"end_col": 20,
"end_line": 84,
"start_col": 4,
"start_line": 69
} | |
Prims.GTot | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let store_post
(#a:Type) (#rrel #rel:MB.srel a) (b:MB.mbuffer a rrel rel)
(i:nat) (j:nat{i + j <= MB.length b}) (predicate:Seq.seq a -> Type0)
= fun (h0:HS.mem) (_:unit) (h1:HS.mem) ->
MB.live h1 b /\
MB.(modifies (loc_buffer b) h0 h1) /\
(let s1 = MB.as_seq h0 b in
let s2 = MB.as_seq h1 b i... | let store_post
(#a: Type)
(#rrel #rel: MB.srel a)
(b: MB.mbuffer a rrel rel)
(i: nat)
(j: nat{i + j <= MB.length b})
(predicate: (Seq.seq a -> Type0))
= | false | null | false | fun (h0: HS.mem) (_: unit) (h1: HS.mem) ->
MB.live h1 b /\ MB.(modifies (loc_buffer b) h0 h1) /\
(let s1 = MB.as_seq h0 b in
let s2 = MB.as_seq h1 b in
let len = MB.length b in
Seq.equal (Seq.slice s2 0 i) (Seq.slice s1 0 i) /\
Seq.equal (Seq.slice s2 (i + j) len) (Seq.slice s1 (i + j) len) /\
p... | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [
"sometrivial"
] | [
"LowStar.Monotonic.Buffer.srel",
"LowStar.Monotonic.Buffer.mbuffer",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"LowStar.Monotonic.Buffer.length",
"FStar.Seq.Base.seq",
"FStar.Monotonic.HyperStack.mem",
"Prims.unit",
"Prims.l_and",
"LowStar.Monotonic.Buffer.live... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val store_post : b: LowStar.Monotonic.Buffer.mbuffer a rrel rel ->
i: Prims.nat ->
j: Prims.nat{i + j <= LowStar.Monotonic.Buffer.length b} ->
predicate: (_: FStar.Seq.Base.seq a -> Type0) ->
h0: FStar.Monotonic.HyperStack.mem ->
_: Prims.unit ->
h1: FStar.Monotonic.HyperStack.mem
-> Prims.GTo... | [] | LowStar.Endianness.store_post | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} |
b: LowStar.Monotonic.Buffer.mbuffer a rrel rel ->
i: Prims.nat ->
j: Prims.nat{i + j <= LowStar.Monotonic.Buffer.length b} ->
predicate: (_: FStar.Seq.Base.seq a -> Type0) ->
h0: FStar.Monotonic.HyperStack.mem ->
_: Prims.unit ->
h1: FStar.Monotonic.HyperStack.mem
-> Prims.GTot Prims.logi... | {
"end_col": 41,
"end_line": 102,
"start_col": 5,
"start_line": 92
} | |
FStar.HyperStack.ST.Stack | val load64_be (b: B.buffer UInt8.t {B.length b == 8})
: Stack UInt64.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt64.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let load64_be
(b:B.buffer UInt8.t{B.length b == 8}):
Stack UInt64.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt64.v z))
=
load64_be_i b 0ul | val load64_be (b: B.buffer UInt8.t {B.length b == 8})
: Stack UInt64.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt64.v z))
let load64_be (b: B.buffer UInt8.t {B.length b == 8})
: Stack UInt64.t
(requires (fun h -> B.live ... | true | null | false | load64_be_i b 0ul | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"LowStar.Endianness.load64_be_i",
"FStar.UInt32.__uint_to_t",
"LowStar.Endianness.u64",
"FStar.UInt64.t",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monoton... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val load64_be (b: B.buffer UInt8.t {B.length b == 8})
: Stack UInt64.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt64.v z)) | [] | LowStar.Endianness.load64_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 8}
-> FStar.HyperStack.ST.Stack FStar.UInt64.t | {
"end_col": 19,
"end_line": 367,
"start_col": 2,
"start_line": 367
} |
FStar.HyperStack.ST.Stack | val store64_be (b: B.buffer UInt8.t {B.length b == 8}) (z: UInt64.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt64.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let store64_be
(b:B.buffer UInt8.t{B.length b == 8})
(z:UInt64.t):
Stack unit
(requires (fun h -> B.live h b))
(ensures (fun h0 _ h1 -> B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt64.v z))
=
store64_be_i b 0ul z | val store64_be (b: B.buffer UInt8.t {B.length b == 8}) (z: UInt64.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt64.v z))
let store64_be (b: B.buffer UInt8.t {B.l... | true | null | false | store64_be_i b 0ul z | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt64.t",
"LowStar.Endianness.store64_be_i",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monotonic.Buffer.l... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val store64_be (b: B.buffer UInt8.t {B.length b == 8}) (z: UInt64.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt64.v z)) | [] | LowStar.Endianness.store64_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 8} -> z: FStar.UInt64.t
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 22,
"end_line": 377,
"start_col": 2,
"start_line": 377
} |
FStar.HyperStack.ST.Stack | val load32_le (b: B.buffer UInt8.t {B.length b == 4})
: Stack UInt32.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt32.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let load32_le
(b:B.buffer UInt8.t{B.length b == 4}):
Stack UInt32.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt32.v z))
=
load32_le_i b 0ul | val load32_le (b: B.buffer UInt8.t {B.length b == 4})
: Stack UInt32.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt32.v z))
let load32_le (b: B.buffer UInt8.t {B.length b == 4})
: Stack UInt32.t
(requires (fun h -> B.live ... | true | null | false | load32_le_i b 0ul | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"LowStar.Endianness.load32_le_i",
"FStar.UInt32.__uint_to_t",
"LowStar.Endianness.u32",
"FStar.UInt32.t",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monoton... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val load32_le (b: B.buffer UInt8.t {B.length b == 4})
: Stack UInt32.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt32.v z)) | [] | LowStar.Endianness.load32_le | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 4}
-> FStar.HyperStack.ST.Stack FStar.UInt32.t | {
"end_col": 19,
"end_line": 317,
"start_col": 2,
"start_line": 317
} |
FStar.HyperStack.ST.Stack | val store32_be (b: B.buffer UInt8.t {B.length b == 4}) (z: UInt32.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt32.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let store32_be
(b:B.buffer UInt8.t{B.length b == 4})
(z:UInt32.t):
Stack unit
(requires (fun h -> B.live h b))
(ensures (fun h0 _ h1 -> B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt32.v z))
=
store32_be_i b 0ul z | val store32_be (b: B.buffer UInt8.t {B.length b == 4}) (z: UInt32.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt32.v z))
let store32_be (b: B.buffer UInt8.t {B.l... | true | null | false | store32_be_i b 0ul z | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt32.t",
"LowStar.Endianness.store32_be_i",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monotonic.Buffer.l... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val store32_be (b: B.buffer UInt8.t {B.length b == 4}) (z: UInt32.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt32.v z)) | [] | LowStar.Endianness.store32_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 4} -> z: FStar.UInt32.t
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 22,
"end_line": 328,
"start_col": 2,
"start_line": 328
} |
FStar.HyperStack.ST.Stack | val store16_le (b: B.buffer UInt8.t {B.length b == 2}) (z: UInt16.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt16.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let store16_le
(b:B.buffer UInt8.t{B.length b == 2})
(z:UInt16.t):
Stack unit
(requires (fun h -> B.live h b))
(ensures (fun h0 _ h1 -> B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt16.v z))
=
store16_le_i b 0ul z | val store16_le (b: B.buffer UInt8.t {B.length b == 2}) (z: UInt16.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt16.v z))
let store16_le (b: B.buffer UInt8.t {B.l... | true | null | false | store16_le_i b 0ul z | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt16.t",
"LowStar.Endianness.store16_le_i",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monotonic.Buffer.l... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val store16_le (b: B.buffer UInt8.t {B.length b == 2}) (z: UInt16.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt16.v z)) | [] | LowStar.Endianness.store16_le | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 2} -> z: FStar.UInt16.t
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 22,
"end_line": 268,
"start_col": 2,
"start_line": 268
} |
FStar.HyperStack.ST.Stack | val load64_le (b: B.buffer UInt8.t {B.length b == 8})
: Stack UInt64.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt64.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let load64_le
(b:B.buffer UInt8.t{B.length b == 8}):
Stack UInt64.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt64.v z))
=
load64_le_i b 0ul | val load64_le (b: B.buffer UInt8.t {B.length b == 8})
: Stack UInt64.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt64.v z))
let load64_le (b: B.buffer UInt8.t {B.length b == 8})
: Stack UInt64.t
(requires (fun h -> B.live ... | true | null | false | load64_le_i b 0ul | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"LowStar.Endianness.load64_le_i",
"FStar.UInt32.__uint_to_t",
"LowStar.Endianness.u64",
"FStar.UInt64.t",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monoton... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val load64_le (b: B.buffer UInt8.t {B.length b == 8})
: Stack UInt64.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt64.v z)) | [] | LowStar.Endianness.load64_le | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 8}
-> FStar.HyperStack.ST.Stack FStar.UInt64.t | {
"end_col": 19,
"end_line": 357,
"start_col": 2,
"start_line": 357
} |
FStar.HyperStack.ST.Stack | val load16_be (b: B.buffer UInt8.t {B.length b == 2})
: Stack UInt16.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt16.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let load16_be
(b:B.buffer UInt8.t{B.length b == 2}):
Stack UInt16.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt16.v z))
=
load16_be_i b 0ul | val load16_be (b: B.buffer UInt8.t {B.length b == 2})
: Stack UInt16.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt16.v z))
let load16_be (b: B.buffer UInt8.t {B.length b == 2})
: Stack UInt16.t
(requires (fun h -> B.live ... | true | null | false | load16_be_i b 0ul | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"LowStar.Endianness.load16_be_i",
"FStar.UInt32.__uint_to_t",
"LowStar.Endianness.u16",
"FStar.UInt16.t",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monoton... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val load16_be (b: B.buffer UInt8.t {B.length b == 2})
: Stack UInt16.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt16.v z)) | [] | LowStar.Endianness.load16_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 2}
-> FStar.HyperStack.ST.Stack FStar.UInt16.t | {
"end_col": 19,
"end_line": 297,
"start_col": 2,
"start_line": 297
} |
FStar.HyperStack.ST.Stack | val store32_le (b: B.buffer UInt8.t {B.length b == 4}) (z: UInt32.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt32.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let store32_le
(b:B.buffer UInt8.t{B.length b == 4})
(z:UInt32.t):
Stack unit
(requires (fun h -> B.live h b))
(ensures (fun h0 _ h1 -> B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt32.v z))
=
store32_le_i b 0ul z | val store32_le (b: B.buffer UInt8.t {B.length b == 4}) (z: UInt32.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt32.v z))
let store32_le (b: B.buffer UInt8.t {B.l... | true | null | false | store32_le_i b 0ul z | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt32.t",
"LowStar.Endianness.store32_le_i",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monotonic.Buffer.l... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val store32_le (b: B.buffer UInt8.t {B.length b == 4}) (z: UInt32.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt32.v z)) | [] | LowStar.Endianness.store32_le | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 4} -> z: FStar.UInt32.t
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 22,
"end_line": 308,
"start_col": 2,
"start_line": 308
} |
FStar.HyperStack.ST.Stack | val store16_be (b: B.buffer UInt8.t {B.length b == 2}) (z: UInt16.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt16.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let store16_be
(b:B.buffer UInt8.t{B.length b == 2})
(z:UInt16.t):
Stack unit
(requires (fun h -> B.live h b))
(ensures (fun h0 _ h1 -> B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt16.v z))
=
store16_be_i b 0ul z | val store16_be (b: B.buffer UInt8.t {B.length b == 2}) (z: UInt16.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt16.v z))
let store16_be (b: B.buffer UInt8.t {B.l... | true | null | false | store16_be_i b 0ul z | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt16.t",
"LowStar.Endianness.store16_be_i",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monotonic.Buffer.l... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val store16_be (b: B.buffer UInt8.t {B.length b == 2}) (z: UInt16.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt16.v z)) | [] | LowStar.Endianness.store16_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 2} -> z: FStar.UInt16.t
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 22,
"end_line": 288,
"start_col": 2,
"start_line": 288
} |
FStar.HyperStack.ST.Stack | val load32_be (b: B.buffer UInt8.t {B.length b == 4})
: Stack UInt32.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt32.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let load32_be
(b:B.buffer UInt8.t{B.length b == 4}):
Stack UInt32.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt32.v z))
=
load32_be_i b 0ul | val load32_be (b: B.buffer UInt8.t {B.length b == 4})
: Stack UInt32.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt32.v z))
let load32_be (b: B.buffer UInt8.t {B.length b == 4})
: Stack UInt32.t
(requires (fun h -> B.live ... | true | null | false | load32_be_i b 0ul | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"LowStar.Endianness.load32_be_i",
"FStar.UInt32.__uint_to_t",
"LowStar.Endianness.u32",
"FStar.UInt32.t",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monoton... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val load32_be (b: B.buffer UInt8.t {B.length b == 4})
: Stack UInt32.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt32.v z)) | [] | LowStar.Endianness.load32_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 4}
-> FStar.HyperStack.ST.Stack FStar.UInt32.t | {
"end_col": 19,
"end_line": 337,
"start_col": 2,
"start_line": 337
} |
FStar.HyperStack.ST.Stack | val load16_le (b: B.buffer UInt8.t {B.length b == 2})
: Stack UInt16.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt16.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let load16_le
(b:B.buffer UInt8.t{B.length b == 2}):
Stack UInt16.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt16.v z))
=
load16_le_i b 0ul | val load16_le (b: B.buffer UInt8.t {B.length b == 2})
: Stack UInt16.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt16.v z))
let load16_le (b: B.buffer UInt8.t {B.length b == 2})
: Stack UInt16.t
(requires (fun h -> B.live ... | true | null | false | load16_le_i b 0ul | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"LowStar.Endianness.load16_le_i",
"FStar.UInt32.__uint_to_t",
"LowStar.Endianness.u16",
"FStar.UInt16.t",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monoton... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val load16_le (b: B.buffer UInt8.t {B.length b == 2})
: Stack UInt16.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt16.v z)) | [] | LowStar.Endianness.load16_le | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 2}
-> FStar.HyperStack.ST.Stack FStar.UInt16.t | {
"end_col": 19,
"end_line": 277,
"start_col": 2,
"start_line": 277
} |
FStar.HyperStack.ST.Stack | val store64_le (b: B.buffer UInt8.t {B.length b == 8}) (z: UInt64.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt64.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let store64_le
(b:B.buffer UInt8.t{B.length b == 8})
(z:UInt64.t):
Stack unit
(requires (fun h -> B.live h b))
(ensures (fun h0 _ h1 -> B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt64.v z))
=
store64_le_i b 0ul z | val store64_le (b: B.buffer UInt8.t {B.length b == 8}) (z: UInt64.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt64.v z))
let store64_le (b: B.buffer UInt8.t {B.l... | true | null | false | store64_le_i b 0ul z | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt64.t",
"LowStar.Endianness.store64_le_i",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monotonic.Buffer.l... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val store64_le (b: B.buffer UInt8.t {B.length b == 8}) (z: UInt64.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt64.v z)) | [] | LowStar.Endianness.store64_le | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 8} -> z: FStar.UInt64.t
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 22,
"end_line": 348,
"start_col": 2,
"start_line": 348
} |
FStar.HyperStack.ST.Stack | val store128_le (b: B.buffer UInt8.t {B.length b == 16}) (z: UInt128.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt128.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let store128_le
(b:B.buffer UInt8.t{B.length b == 16})
(z:UInt128.t):
Stack unit
(requires (fun h -> B.live h b))
(ensures (fun h0 _ h1 -> B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt128.v z))
=
store128_le_i b 0ul z | val store128_le (b: B.buffer UInt8.t {B.length b == 16}) (z: UInt128.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt128.v z))
let store128_le (b: B.buffer UInt8.t... | true | null | false | store128_le_i b 0ul z | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt128.t",
"LowStar.Endianness.store128_le_i",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Monotonic.Buffer... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val store128_le (b: B.buffer UInt8.t {B.length b == 16}) (z: UInt128.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt128.v z)) | [] | LowStar.Endianness.store128_le | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} |
b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 16} ->
z: FStar.UInt128.t
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 23,
"end_line": 397,
"start_col": 2,
"start_line": 397
} |
FStar.HyperStack.ST.Stack | val store128_be (b: B.buffer UInt8.t {B.length b = 16}) (z: UInt128.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt128.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let store128_be
(b:B.buffer UInt8.t{B.length b = 16})
(z:UInt128.t):
Stack unit
(requires (fun h -> B.live h b))
(ensures (fun h0 _ h1 -> B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt128.v z))
=
store128_be_i b 0ul z | val store128_be (b: B.buffer UInt8.t {B.length b = 16}) (z: UInt128.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt128.v z))
let store128_be (b: B.buffer UInt8.t ... | true | null | false | store128_be_i b 0ul z | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt128.t",
"LowStar.Endianness.store128_be_i",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"L... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val store128_be (b: B.buffer UInt8.t {B.length b = 16}) (z: UInt128.t)
: Stack unit
(requires (fun h -> B.live h b))
(ensures
(fun h0 _ h1 ->
B.(modifies (loc_buffer b) h0 h1) /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt128.v z)) | [] | LowStar.Endianness.store128_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} |
b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b = 16} ->
z: FStar.UInt128.t
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 23,
"end_line": 417,
"start_col": 2,
"start_line": 417
} |
FStar.HyperStack.ST.Stack | val index_64_be (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u64
(requires fun h -> MB.live h b /\ MB.length b % 8 = 0 /\ U32.v i < MB.length b / 8)
(ensures
fun h0 r h1 ->
h0 == h1 /\
r = Seq.index (seq_uint64_of_be (MB.length b / 8) (MB.as_seq h0 b)... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let index_64_be
(#rrel #rel:MB.srel u8) (b:MB.mbuffer u8 rrel rel)
(i:u32)
: Stack u64
(requires fun h ->
MB.live h b /\ MB.length b % 8 = 0 /\
U32.v i < MB.length b / 8)
(ensures fun h0 r h1 ->
h0 == h1 /\
r = Seq.index (seq_uint64_of_be (MB.length b / 8) (MB.as_seq h0... | val index_64_be (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u64
(requires fun h -> MB.live h b /\ MB.length b % 8 = 0 /\ U32.v i < MB.length b / 8)
(ensures
fun h0 r h1 ->
h0 == h1 /\
r = Seq.index (seq_uint64_of_be (MB.length b / 8) (MB.as_seq h0 b)... | true | null | false | load64_be_i b FStar.UInt32.(8ul *^ i) | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Monotonic.Buffer.srel",
"LowStar.Endianness.u8",
"LowStar.Monotonic.Buffer.mbuffer",
"LowStar.Endianness.u32",
"LowStar.Endianness.load64_be_i",
"FStar.UInt32.op_Star_Hat",
"FStar.UInt32.__uint_to_t",
"LowStar.Endianness.u64",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"LowStar.Mo... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_64_be (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u64
(requires fun h -> MB.live h b /\ MB.length b % 8 = 0 /\ U32.v i < MB.length b / 8)
(ensures
fun h0 r h1 ->
h0 == h1 /\
r = Seq.index (seq_uint64_of_be (MB.length b / 8) (MB.as_seq h0 b)... | [] | LowStar.Endianness.index_64_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Monotonic.Buffer.mbuffer LowStar.Endianness.u8 rrel rel -> i: LowStar.Endianness.u32
-> FStar.HyperStack.ST.Stack LowStar.Endianness.u64 | {
"end_col": 41,
"end_line": 465,
"start_col": 4,
"start_line": 465
} |
FStar.HyperStack.ST.Stack | val load128_le (b: B.buffer UInt8.t {B.length b == 16})
: Stack UInt128.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt128.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let load128_le
(b:B.buffer UInt8.t{B.length b == 16}):
Stack UInt128.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\
le_to_n (B.as_seq h1 b) == UInt128.v z))
=
load128_le_i b 0ul | val load128_le (b: B.buffer UInt8.t {B.length b == 16})
: Stack UInt128.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt128.v z))
let load128_le (b: B.buffer UInt8.t {B.length b == 16})
: Stack UInt128.t
(requires (fun h -> ... | true | null | false | load128_le_i b 0ul | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"LowStar.Endianness.load128_le_i",
"FStar.UInt32.__uint_to_t",
"LowStar.Endianness.u128",
"FStar.UInt128.t",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Mono... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val load128_le (b: B.buffer UInt8.t {B.length b == 16})
: Stack UInt128.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ le_to_n (B.as_seq h1 b) == UInt128.v z)) | [] | LowStar.Endianness.load128_le | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 16}
-> FStar.HyperStack.ST.Stack FStar.UInt128.t | {
"end_col": 20,
"end_line": 387,
"start_col": 2,
"start_line": 387
} |
FStar.HyperStack.ST.Stack | val load128_be (b: B.buffer UInt8.t {B.length b == 16})
: Stack UInt128.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt128.v z)) | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let load128_be
(b:B.buffer UInt8.t{B.length b == 16}):
Stack UInt128.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\
be_to_n (B.as_seq h1 b) == UInt128.v z))
=
load128_be_i b 0ul | val load128_be (b: B.buffer UInt8.t {B.length b == 16})
: Stack UInt128.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt128.v z))
let load128_be (b: B.buffer UInt8.t {B.length b == 16})
: Stack UInt128.t
(requires (fun h -> ... | true | null | false | load128_be_i b 0ul | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt8.t",
"Prims.eq2",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"LowStar.Endianness.load128_be_i",
"FStar.UInt32.__uint_to_t",
"LowStar.Endianness.u128",
"FStar.UInt128.t",
"FStar.Monotonic.HyperStack.mem",
"LowStar.Mono... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val load128_be (b: B.buffer UInt8.t {B.length b == 16})
: Stack UInt128.t
(requires (fun h -> B.live h b))
(ensures (fun h0 z h1 -> h0 == h1 /\ B.live h1 b /\ be_to_n (B.as_seq h1 b) == UInt128.v z)) | [] | LowStar.Endianness.load128_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Buffer.buffer FStar.UInt8.t {LowStar.Monotonic.Buffer.length b == 16}
-> FStar.HyperStack.ST.Stack FStar.UInt128.t | {
"end_col": 20,
"end_line": 407,
"start_col": 2,
"start_line": 407
} |
FStar.HyperStack.ST.Stack | val index_64_le (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u64
(requires fun h -> MB.live h b /\ MB.length b % 8 = 0 /\ U32.v i < MB.length b / 8)
(ensures
fun h0 r h1 ->
h0 == h1 /\
r = Seq.index (seq_uint64_of_le (MB.length b / 8) (MB.as_seq h0 b)... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let index_64_le
(#rrel #rel:MB.srel u8) (b:MB.mbuffer u8 rrel rel)
(i:u32)
: Stack u64
(requires fun h ->
MB.live h b /\ MB.length b % 8 = 0 /\
U32.v i < MB.length b / 8)
(ensures fun h0 r h1 ->
h0 == h1 /\
r = Seq.index (seq_uint64_of_le (MB.length b / 8) (MB.as_seq h0... | val index_64_le (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u64
(requires fun h -> MB.live h b /\ MB.length b % 8 = 0 /\ U32.v i < MB.length b / 8)
(ensures
fun h0 r h1 ->
h0 == h1 /\
r = Seq.index (seq_uint64_of_le (MB.length b / 8) (MB.as_seq h0 b)... | true | null | false | load64_le_i b FStar.UInt32.(8ul *^ i) | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Monotonic.Buffer.srel",
"LowStar.Endianness.u8",
"LowStar.Monotonic.Buffer.mbuffer",
"LowStar.Endianness.u32",
"LowStar.Endianness.load64_le_i",
"FStar.UInt32.op_Star_Hat",
"FStar.UInt32.__uint_to_t",
"LowStar.Endianness.u64",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"LowStar.Mo... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_64_le (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u64
(requires fun h -> MB.live h b /\ MB.length b % 8 = 0 /\ U32.v i < MB.length b / 8)
(ensures
fun h0 r h1 ->
h0 == h1 /\
r = Seq.index (seq_uint64_of_le (MB.length b / 8) (MB.as_seq h0 b)... | [] | LowStar.Endianness.index_64_le | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Monotonic.Buffer.mbuffer LowStar.Endianness.u8 rrel rel -> i: LowStar.Endianness.u32
-> FStar.HyperStack.ST.Stack LowStar.Endianness.u64 | {
"end_col": 41,
"end_line": 478,
"start_col": 4,
"start_line": 478
} |
FStar.HyperStack.ST.Stack | val index_32_le (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u32
(requires fun h -> MB.live h b /\ MB.length b % 4 = 0 /\ U32.v i < MB.length b / 4)
(ensures
fun h0 r h1 ->
h0 == h1 /\ r = Seq.index (seq_uint32_of_le (MB.length b / 4) (MB.as_seq h0 b)) (U32.v i... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let index_32_le
(#rrel #rel:MB.srel u8) (b:MB.mbuffer u8 rrel rel)
(i:u32)
: Stack u32
(requires fun h ->
MB.live h b /\ MB.length b % 4 = 0 /\
U32.v i < MB.length b / 4)
(ensures fun h0 r h1 ->
h0 == h1 /\
r = Seq.index (seq_uint32_of_le (MB.length b / 4) (MB.as_seq h0... | val index_32_le (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u32
(requires fun h -> MB.live h b /\ MB.length b % 4 = 0 /\ U32.v i < MB.length b / 4)
(ensures
fun h0 r h1 ->
h0 == h1 /\ r = Seq.index (seq_uint32_of_le (MB.length b / 4) (MB.as_seq h0 b)) (U32.v i... | true | null | false | load32_le_i b FStar.UInt32.(4ul *^ i) | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Monotonic.Buffer.srel",
"LowStar.Endianness.u8",
"LowStar.Monotonic.Buffer.mbuffer",
"LowStar.Endianness.u32",
"LowStar.Endianness.load32_le_i",
"FStar.UInt32.op_Star_Hat",
"FStar.UInt32.__uint_to_t",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"LowStar.Monotonic.Buffer.live",
"Pri... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_32_le (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u32
(requires fun h -> MB.live h b /\ MB.length b % 4 = 0 /\ U32.v i < MB.length b / 4)
(ensures
fun h0 r h1 ->
h0 == h1 /\ r = Seq.index (seq_uint32_of_le (MB.length b / 4) (MB.as_seq h0 b)) (U32.v i... | [] | LowStar.Endianness.index_32_le | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Monotonic.Buffer.mbuffer LowStar.Endianness.u8 rrel rel -> i: LowStar.Endianness.u32
-> FStar.HyperStack.ST.Stack LowStar.Endianness.u32 | {
"end_col": 41,
"end_line": 452,
"start_col": 4,
"start_line": 452
} |
FStar.HyperStack.ST.Stack | val index_32_be (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u32
(requires fun h -> MB.live h b /\ MB.length b % 4 = 0 /\ U32.v i < MB.length b / 4)
(ensures
fun h0 r h1 ->
h0 == h1 /\ r = Seq.index (seq_uint32_of_be (MB.length b / 4) (MB.as_seq h0 b)) (U32.v i... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": ... | false | let index_32_be
(#rrel #rel:MB.srel u8) (b:MB.mbuffer u8 rrel rel)
(i:u32)
: Stack u32
(requires fun h ->
MB.live h b /\ MB.length b % 4 = 0 /\
U32.v i < MB.length b / 4)
(ensures fun h0 r h1 ->
h0 == h1 /\
r = Seq.index (seq_uint32_of_be (MB.length b / 4) (MB.as_seq h0... | val index_32_be (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u32
(requires fun h -> MB.live h b /\ MB.length b % 4 = 0 /\ U32.v i < MB.length b / 4)
(ensures
fun h0 r h1 ->
h0 == h1 /\ r = Seq.index (seq_uint32_of_be (MB.length b / 4) (MB.as_seq h0 b)) (U32.v i... | true | null | false | load32_be_i b FStar.UInt32.(4ul *^ i) | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Monotonic.Buffer.srel",
"LowStar.Endianness.u8",
"LowStar.Monotonic.Buffer.mbuffer",
"LowStar.Endianness.u32",
"LowStar.Endianness.load32_be_i",
"FStar.UInt32.op_Star_Hat",
"FStar.UInt32.__uint_to_t",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"LowStar.Monotonic.Buffer.live",
"Pri... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val index_32_be (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i: u32)
: Stack u32
(requires fun h -> MB.live h b /\ MB.length b % 4 = 0 /\ U32.v i < MB.length b / 4)
(ensures
fun h0 r h1 ->
h0 == h1 /\ r = Seq.index (seq_uint32_of_be (MB.length b / 4) (MB.as_seq h0 b)) (U32.v i... | [] | LowStar.Endianness.index_32_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | b: LowStar.Monotonic.Buffer.mbuffer LowStar.Endianness.u8 rrel rel -> i: LowStar.Endianness.u32
-> FStar.HyperStack.ST.Stack LowStar.Endianness.u32 | {
"end_col": 41,
"end_line": 439,
"start_col": 4,
"start_line": 439
} |
FStar.HyperStack.ST.Stack | val upd_32_be (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i v: u32)
: Stack unit
(requires
fun h ->
MB.length b % 4 = 0 /\ U32.v i < MB.length b / 4 /\
store_pre b (let open U32 in v (4ul *^ i)) 4 (fun s -> be_to_n s == U32.v v) h)
(ensures
fun h0 _ h1 ->
... | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FS... | false | let upd_32_be
(#rrel #rel:MB.srel u8) (b:MB.mbuffer u8 rrel rel)
(i:u32) (v:u32)
: Stack unit
(requires fun h ->
MB.length b % 4 = 0 /\
U32.v i < MB.length b / 4 /\
store_pre b (U32.(v (4ul *^ i))) 4 (fun s -> be_to_n s == U32.v v) h)
(ensures fun h0 _ h1 ->
MB.(modifies (loc... | val upd_32_be (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i v: u32)
: Stack unit
(requires
fun h ->
MB.length b % 4 = 0 /\ U32.v i < MB.length b / 4 /\
store_pre b (let open U32 in v (4ul *^ i)) 4 (fun s -> be_to_n s == U32.v v) h)
(ensures
fun h0 _ h1 ->
... | true | null | false | let h0 = get () in
store32_be_i b U32.(4ul *^ i) v;
let h1 = get () in
assert (be_to_n (Seq.slice (MB.as_seq h1 b)
(let open U32 in v (4ul *^ i))
(let open U32 in v (4ul *^ i) + 4)) ==
U32.v v);
assert (Seq.equal (Seq.slice (MB.as_seq h0 b) 0 (let open U32 in v (4ul *^ i)))
(Seq.slice (MB.... | {
"checked_file": "LowStar.Endianness.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FS... | [] | [
"LowStar.Monotonic.Buffer.srel",
"LowStar.Endianness.u8",
"LowStar.Monotonic.Buffer.mbuffer",
"LowStar.Endianness.u32",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"FStar.Seq.Base.equal",
"FStar.UInt32.t",
"FStar.Endianness.seq_uint32_of_be",
"Prims.op_Division",
"LowStar.Monotonic.Buffer.le... | [] | module LowStar.Endianness
/// Stateful operations between machine integers and buffers of uint8s. Most of
/// these operations are implemented natively using the target's system endianness
/// headers, relying on macros or static inline declarations.
///
/// .. note::
///
/// This module supersedes ``C.Endianness``... | false | false | LowStar.Endianness.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val upd_32_be (#rrel #rel: MB.srel u8) (b: MB.mbuffer u8 rrel rel) (i v: u32)
: Stack unit
(requires
fun h ->
MB.length b % 4 = 0 /\ U32.v i < MB.length b / 4 /\
store_pre b (let open U32 in v (4ul *^ i)) 4 (fun s -> be_to_n s == U32.v v) h)
(ensures
fun h0 _ h1 ->
... | [] | LowStar.Endianness.upd_32_be | {
"file_name": "ulib/LowStar.Endianness.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} |
b: LowStar.Monotonic.Buffer.mbuffer LowStar.Endianness.u8 rrel rel ->
i: LowStar.Endianness.u32 ->
v: LowStar.Endianness.u32
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 8,
"end_line": 551,
"start_col": 3,
"start_line": 504
} |
Prims.Tot | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let bytes32 = B32.bytes | let bytes32 = | false | null | false | B32.bytes | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"total"
] | [
"FStar.Bytes.bytes"
] | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32 | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val bytes32 : t: Type0{Prims.hasEq t} | [] | LowParse.SLow.Base.bytes32 | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | t: Type0{Prims.hasEq t} | {
"end_col": 23,
"end_line": 7,
"start_col": 14,
"start_line": 7
} | |
Prims.GTot | val serializer32_correct'
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: GTot Type0 | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let serializer32_correct'
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: GTot Type0
= B32.reveal res `bytes_equal` s input | val serializer32_correct'
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: GTot Type0
let serializer32_correct'
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)... | false | null | false | (B32.reveal res) `bytes_equal` (s input) | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"sometrivial"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.bytes32",
"LowParse.Bytes.bytes_equal",
"FStar.Bytes.reveal"
] | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val serializer32_correct'
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: GTot Type0 | [] | LowParse.SLow.Base.serializer32_correct' | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | s: LowParse.Spec.Base.serializer p -> input: t -> res: LowParse.SLow.Base.bytes32
-> Prims.GTot Type0 | {
"end_col": 38,
"end_line": 118,
"start_col": 2,
"start_line": 118
} |
Prims.GTot | val serializer32_correct
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: GTot Type0 | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let serializer32_correct
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: GTot Type0
= B32.reveal res == s input | val serializer32_correct
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: GTot Type0
let serializer32_correct
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
... | false | null | false | B32.reveal res == s input | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"sometrivial"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.bytes32",
"Prims.eq2",
"FStar.Seq.Base.seq",
"FStar.Bytes.byte",
"FStar.Bytes.reveal"
] | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val serializer32_correct
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: GTot Type0 | [] | LowParse.SLow.Base.serializer32_correct | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | s: LowParse.Spec.Base.serializer p -> input: t -> res: LowParse.SLow.Base.bytes32
-> Prims.GTot Type0 | {
"end_col": 27,
"end_line": 108,
"start_col": 2,
"start_line": 108
} |
Prims.Tot | val make_parser32
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(p32:
(input: bytes32
-> Pure (option (t * U32.t))
(requires True)
(ensures (fun res -> parser32_correct p input res))))
: Tot (parser32 p) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let make_parser32
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(p32: (input: bytes32) -> Pure (option (t * U32.t)) (requires True) (ensures (fun res -> parser32_correct p input res)))
: Tot (parser32 p)
= (fun (input: bytes32) -> (p32 input <: (res: option (t * U32.t) { parser32_correct p input res } ))) | val make_parser32
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(p32:
(input: bytes32
-> Pure (option (t * U32.t))
(requires True)
(ensures (fun res -> parser32_correct p input res))))
: Tot (parser32 p)
let make_parser32
(#k: ... | false | null | false | (fun (input: bytes32) -> (p32 input <: (res: option (t * U32.t) {parser32_correct p input res}))) | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"total"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.SLow.Base.bytes32",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"FStar.UInt32.t",
"Prims.l_True",
"LowParse.SLow.Base.parser32_correct",
"LowParse.SLow.Base.parser32"
] | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val make_parser32
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(p32:
(input: bytes32
-> Pure (option (t * U32.t))
(requires True)
(ensures (fun res -> parser32_correct p input res))))
: Tot (parser32 p) | [] | LowParse.SLow.Base.make_parser32 | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} |
p: LowParse.Spec.Base.parser k t ->
p32:
(input: LowParse.SLow.Base.bytes32
-> Prims.Pure (FStar.Pervasives.Native.option (t * FStar.UInt32.t)))
-> LowParse.SLow.Base.parser32 p | {
"end_col": 102,
"end_line": 64,
"start_col": 2,
"start_line": 64
} |
Prims.GTot | val size32_constant_precond
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(len32: U32.t)
: GTot Type0 | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let size32_constant_precond
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(len32: U32.t)
: GTot Type0
= k.parser_kind_high == Some k.parser_kind_low /\
U32.v len32 == k.parser_kind_low | val size32_constant_precond
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(len32: U32.t)
: GTot Type0
let size32_constant_precond
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(len32: U32.t)
: GTot Type0 = | false | null | false | k.parser_kind_high == Some k.parser_kind_low /\ U32.v len32 == k.parser_kind_low | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"sometrivial"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"FStar.UInt32.t",
"Prims.l_and",
"Prims.eq2",
"FStar.Pervasives.Native.option",
"Prims.nat",
"LowParse.Spec.Base.__proj__Mkparser_kind'__item__parser_kind_high",
"FStar.Pervasives.Native.Some",
"LowPa... | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val size32_constant_precond
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(len32: U32.t)
: GTot Type0 | [] | LowParse.SLow.Base.size32_constant_precond | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | s: LowParse.Spec.Base.serializer p -> len32: FStar.UInt32.t -> Prims.GTot Type0 | {
"end_col": 34,
"end_line": 352,
"start_col": 2,
"start_line": 351
} |
Prims.GTot | val parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0 | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res with
| None -> gp == None
| Some (hres, consumed) ->
Some? gp /\ (
let (Some (hres' , consumed')) = gp in
hres == h... | val parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0 = | false | null | false | let gp = parse p (B32.reveal input) in
match res with
| None -> gp == None
| Some (hres, consumed) ->
Some? gp /\
(let Some (hres', consumed') = gp in
hres == hres' /\ U32.v consumed == (consumed' <: nat)) | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"sometrivial"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.SLow.Base.bytes32",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"FStar.UInt32.t",
"Prims.eq2",
"LowParse.Spec.Base.consumed_length",
"FStar.Bytes.reveal",
"FStar.Pervasives.Native.None",
"Prims.l_and... | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t)) | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0 | [] | LowParse.SLow.Base.parser32_correct | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} |
p: LowParse.Spec.Base.parser k t ->
input: LowParse.SLow.Base.bytes32 ->
res: FStar.Pervasives.Native.option (t * FStar.UInt32.t)
-> Prims.GTot Type0 | {
"end_col": 5,
"end_line": 24,
"start_col": 1,
"start_line": 16
} |
Prims.GTot | val validator_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option U32.t)
: GTot Type0 | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let validator_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option U32.t)
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res with
| None -> gp == None
| Some (consumed) ->
Some? gp /\ (
let (Some (_ , consumed')) = gp in
U32.v consumed == (consu... | val validator_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option U32.t)
: GTot Type0
let validator_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option U32.t)
: GTot Type0 = | false | null | false | let gp = parse p (B32.reveal input) in
match res with
| None -> gp == None
| Some consumed ->
Some? gp /\
(let Some (_, consumed') = gp in
U32.v consumed == (consumed' <: nat)) | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"sometrivial"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.SLow.Base.bytes32",
"FStar.Pervasives.Native.option",
"FStar.UInt32.t",
"Prims.eq2",
"FStar.Pervasives.Native.tuple2",
"LowParse.Spec.Base.consumed_length",
"FStar.Bytes.reveal",
"FStar.Pervasives.Native.None",
"Prims.l_and... | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val validator_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option U32.t)
: GTot Type0 | [] | LowParse.SLow.Base.validator_correct | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} |
p: LowParse.Spec.Base.parser k t ->
input: LowParse.SLow.Base.bytes32 ->
res: FStar.Pervasives.Native.option FStar.UInt32.t
-> Prims.GTot Type0 | {
"end_col": 5,
"end_line": 91,
"start_col": 1,
"start_line": 84
} |
Prims.GTot | val size32_postcond
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(x: t)
(y: U32.t)
: GTot Type0 | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let size32_postcond
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(x: t)
(y: U32.t)
: GTot Type0
= let sz = Seq.length (serialize s x) in
if sz > U32.v u32_max
then y == u32_max
else U32.v y == sz | val size32_postcond
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(x: t)
(y: U32.t)
: GTot Type0
let size32_postcond
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(x: t)
(y: U32.t)
: GTot Type0 = | false | null | false | let sz = Seq.length (serialize s x) in
if sz > U32.v u32_max then y == u32_max else U32.v y == sz | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"sometrivial"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"FStar.UInt32.t",
"Prims.op_GreaterThan",
"FStar.UInt32.v",
"LowParse.SLow.Base.u32_max",
"Prims.eq2",
"Prims.bool",
"Prims.int",
"Prims.l_or",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar... | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val size32_postcond
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(x: t)
(y: U32.t)
: GTot Type0 | [] | LowParse.SLow.Base.size32_postcond | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | s: LowParse.Spec.Base.serializer p -> x: t -> y: FStar.UInt32.t -> Prims.GTot Type0 | {
"end_col": 20,
"end_line": 329,
"start_col": 1,
"start_line": 326
} |
FStar.Pervasives.Lemma | val serializer32_correct_length
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: Lemma (requires (serializer32_correct s input res))
(ensures
(let len = FStar.Bytes.length res in
k.parser_kind_low <= len /\
... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let serializer32_correct_length
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: Lemma
(requires (serializer32_correct s input res))
(ensures (
let len = FStar.Bytes.length res in
k.parser_kind_low <= len /\ (
match k.parser_kind_high with
| Som... | val serializer32_correct_length
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: Lemma (requires (serializer32_correct s input res))
(ensures
(let len = FStar.Bytes.length res in
k.parser_kind_low <= len /\
... | false | null | true | serialize_length s input | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"lemma"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.bytes32",
"LowParse.Spec.Base.serialize_length",
"Prims.unit",
"LowParse.SLow.Base.serializer32_correct",
"Prims.squash",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
... | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val serializer32_correct_length
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(input: t)
(res: bytes32)
: Lemma (requires (serializer32_correct s input res))
(ensures
(let len = FStar.Bytes.length res in
k.parser_kind_low <= len /\
... | [] | LowParse.SLow.Base.serializer32_correct_length | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | s: LowParse.Spec.Base.serializer p -> input: t -> res: LowParse.SLow.Base.bytes32
-> FStar.Pervasives.Lemma (requires LowParse.SLow.Base.serializer32_correct s input res)
(ensures
(let len = FStar.Bytes.length res in
Mkparser_kind'?.parser_kind_low k <= len /\
(match Mkparser_kind'?.... | {
"end_col": 26,
"end_line": 147,
"start_col": 2,
"start_line": 147
} |
FStar.Pervasives.Lemma | val parse32_total (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32)
: Lemma
(requires
(k.parser_kind_high == Some k.parser_kind_low /\
k.parser_kind_metadata == Some ParserKindMetadataTotal /\
k.parser_kind_low <= B32.length input)) (ensures (Some? (p... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let parse32_total
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(p32: parser32 p)
(input: bytes32)
: Lemma
(requires (
k.parser_kind_high == Some k.parser_kind_low /\
k.parser_kind_metadata == Some ParserKindMetadataTotal /\
k.parser_kind_low <= B32.length input
))
(ensures (
Some? (p32 ... | val parse32_total (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32)
: Lemma
(requires
(k.parser_kind_high == Some k.parser_kind_low /\
k.parser_kind_metadata == Some ParserKindMetadataTotal /\
k.parser_kind_low <= B32.length input)) (ensures (Some? (p... | false | null | true | parser_kind_prop_equiv k p | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"lemma"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.SLow.Base.parser32",
"LowParse.SLow.Base.bytes32",
"LowParse.Spec.Base.parser_kind_prop_equiv",
"Prims.unit",
"Prims.l_and",
"Prims.eq2",
"FStar.Pervasives.Native.option",
"Prims.nat",
"LowParse.Spec.Base.__proj__Mkparser_k... | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val parse32_total (#k: parser_kind) (#t: Type) (#p: parser k t) (p32: parser32 p) (input: bytes32)
: Lemma
(requires
(k.parser_kind_high == Some k.parser_kind_low /\
k.parser_kind_metadata == Some ParserKindMetadataTotal /\
k.parser_kind_low <= B32.length input)) (ensures (Some? (p... | [] | LowParse.SLow.Base.parse32_total | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | p32: LowParse.SLow.Base.parser32 p -> input: LowParse.SLow.Base.bytes32
-> FStar.Pervasives.Lemma
(requires
Mkparser_kind'?.parser_kind_high k ==
FStar.Pervasives.Native.Some (Mkparser_kind'?.parser_kind_low k) /\
Mkparser_kind'?.parser_kind_metadata k ==
FStar.Pervasives.Native.... | {
"end_col": 28,
"end_line": 298,
"start_col": 2,
"start_line": 298
} |
FStar.Pervasives.Lemma | val parse32_size
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(p32: parser32 p)
(input: bytes32)
(data: t)
(consumed: U32.t)
: Lemma (requires (p32 input == Some (data, consumed)))
(ensures
(k.parser_kind_low <= U32.v consumed /\
(Some? k.parser_kin... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let parse32_size
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(p32: parser32 p)
(input: bytes32)
(data: t)
(consumed: U32.t)
: Lemma
(requires (p32 input == Some (data, consumed)))
(ensures (
k.parser_kind_low <= U32.v consumed /\ (
Some? k.parser_kind_high ==> (
let (Some hi) = k.parser_... | val parse32_size
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(p32: parser32 p)
(input: bytes32)
(data: t)
(consumed: U32.t)
: Lemma (requires (p32 input == Some (data, consumed)))
(ensures
(k.parser_kind_low <= U32.v consumed /\
(Some? k.parser_kin... | false | null | true | parser_kind_prop_equiv k p | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"lemma"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.SLow.Base.parser32",
"LowParse.SLow.Base.bytes32",
"FStar.UInt32.t",
"LowParse.Spec.Base.parser_kind_prop_equiv",
"Prims.unit",
"Prims.eq2",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasi... | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val parse32_size
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(p32: parser32 p)
(input: bytes32)
(data: t)
(consumed: U32.t)
: Lemma (requires (p32 input == Some (data, consumed)))
(ensures
(k.parser_kind_low <= U32.v consumed /\
(Some? k.parser_kin... | [] | LowParse.SLow.Base.parse32_size | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} |
p32: LowParse.SLow.Base.parser32 p ->
input: LowParse.SLow.Base.bytes32 ->
data: t ->
consumed: FStar.UInt32.t
-> FStar.Pervasives.Lemma (requires p32 input == FStar.Pervasives.Native.Some (data, consumed))
(ensures
Mkparser_kind'?.parser_kind_low k <= FStar.UInt32.v consumed /\
... | {
"end_col": 28,
"end_line": 281,
"start_col": 2,
"start_line": 281
} |
Prims.Tot | val bytes_of_seq (x: Seq.seq byte {Seq.length x < 4294967296})
: Tot (y: bytes32{(B32.reveal y) `Seq.equal` x}) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let bytes_of_seq
(x: Seq.seq byte { Seq.length x < 4294967296 })
: Tot (y: bytes32 { B32.reveal y `Seq.equal` x })
= bytes_of_seq' x B32.empty_bytes | val bytes_of_seq (x: Seq.seq byte {Seq.length x < 4294967296})
: Tot (y: bytes32{(B32.reveal y) `Seq.equal` x})
let bytes_of_seq (x: Seq.seq byte {Seq.length x < 4294967296})
: Tot (y: bytes32{(B32.reveal y) `Seq.equal` x}) = | false | null | false | bytes_of_seq' x B32.empty_bytes | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"total"
] | [
"FStar.Seq.Base.seq",
"LowParse.Bytes.byte",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Seq.Base.length",
"LowParse.SLow.Base.bytes_of_seq'",
"FStar.Bytes.empty_bytes",
"LowParse.SLow.Base.bytes32",
"FStar.Seq.Base.equal",
"FStar.Bytes.byte",
"FStar.Bytes.reveal"
] | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val bytes_of_seq (x: Seq.seq byte {Seq.length x < 4294967296})
: Tot (y: bytes32{(B32.reveal y) `Seq.equal` x}) | [] | LowParse.SLow.Base.bytes_of_seq | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | x: FStar.Seq.Base.seq LowParse.Bytes.byte {FStar.Seq.Base.length x < 4294967296}
-> y: LowParse.SLow.Base.bytes32{FStar.Seq.Base.equal (FStar.Bytes.reveal y) x} | {
"end_col": 33,
"end_line": 400,
"start_col": 2,
"start_line": 400
} |
Prims.Tot | val seq_of_bytes (x: bytes32) : Tot (y: Seq.seq byte {y `Seq.equal` (B32.reveal x)}) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let seq_of_bytes
(x: bytes32)
: Tot (y: Seq.seq byte { y `Seq.equal` B32.reveal x })
= seq_of_bytes' x Seq.empty | val seq_of_bytes (x: bytes32) : Tot (y: Seq.seq byte {y `Seq.equal` (B32.reveal x)})
let seq_of_bytes (x: bytes32) : Tot (y: Seq.seq byte {y `Seq.equal` (B32.reveal x)}) = | false | null | false | seq_of_bytes' x Seq.empty | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"total"
] | [
"LowParse.SLow.Base.bytes32",
"LowParse.SLow.Base.seq_of_bytes'",
"FStar.Seq.Base.empty",
"LowParse.Bytes.byte",
"FStar.Seq.Base.seq",
"FStar.Seq.Base.equal",
"FStar.Bytes.reveal"
] | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val seq_of_bytes (x: bytes32) : Tot (y: Seq.seq byte {y `Seq.equal` (B32.reveal x)}) | [] | LowParse.SLow.Base.seq_of_bytes | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | x: LowParse.SLow.Base.bytes32
-> y: FStar.Seq.Base.seq LowParse.Bytes.byte {FStar.Seq.Base.equal y (FStar.Bytes.reveal x)} | {
"end_col": 27,
"end_line": 451,
"start_col": 2,
"start_line": 451
} |
FStar.Pervasives.Lemma | val serializer32_injective
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(s32: serializer32 s)
(input1 input2: t)
: Lemma (requires (s32 input1 == s32 input2)) (ensures (input1 == input2)) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let serializer32_injective
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(s32: serializer32 s)
(input1 input2: t)
: Lemma
(requires (s32 input1 == s32 input2))
(ensures (input1 == input2))
= assert (parse p (serialize s input1) == parse p (serialize s input2)) | val serializer32_injective
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(s32: serializer32 s)
(input1 input2: t)
: Lemma (requires (s32 input1 == s32 input2)) (ensures (input1 == input2))
let serializer32_injective
(#k: parser_kind)
(#t: Type)
... | false | null | true | assert (parse p (serialize s input1) == parse p (serialize s input2)) | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"lemma"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"LowParse.SLow.Base.serializer32",
"Prims._assert",
"Prims.eq2",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"LowParse.Spec.Base.consumed_length",
"LowParse.Spec.Base.serialize",... | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val serializer32_injective
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(s32: serializer32 s)
(input1 input2: t)
: Lemma (requires (s32 input1 == s32 input2)) (ensures (input1 == input2)) | [] | LowParse.SLow.Base.serializer32_injective | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} |
s: LowParse.Spec.Base.serializer p ->
s32: LowParse.SLow.Base.serializer32 s ->
input1: t ->
input2: t
-> FStar.Pervasives.Lemma (requires s32 input1 == s32 input2) (ensures input1 == input2) | {
"end_col": 71,
"end_line": 263,
"start_col": 2,
"start_line": 263
} |
Prims.Tot | val size32_constant
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(len32: U32.t)
(u: unit{size32_constant_precond s len32})
: Tot (size32 s) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let size32_constant
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(len32: U32.t)
(u: unit { size32_constant_precond s len32 } )
: Tot (size32 s)
= fun x ->
[@inline_let]
let (z: U32.t { size32_postcond s x z } ) = len32 in
z | val size32_constant
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(len32: U32.t)
(u: unit{size32_constant_precond s len32})
: Tot (size32 s)
let size32_constant
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(len32:... | false | null | false | fun x ->
[@@ inline_let ]let z:z: U32.t{size32_postcond s x z} = len32 in
z | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"total"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Spec.Base.serializer",
"FStar.UInt32.t",
"Prims.unit",
"LowParse.SLow.Base.size32_constant_precond",
"LowParse.SLow.Base.size32_postcond",
"LowParse.SLow.Base.size32"
] | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val size32_constant
(#k: parser_kind)
(#t: Type)
(#p: parser k t)
(s: serializer p)
(len32: U32.t)
(u: unit{size32_constant_precond s len32})
: Tot (size32 s) | [] | LowParse.SLow.Base.size32_constant | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} |
s: LowParse.Spec.Base.serializer p ->
len32: FStar.UInt32.t ->
u147: u148: Prims.unit{LowParse.SLow.Base.size32_constant_precond s len32}
-> LowParse.SLow.Base.size32 s | {
"end_col": 3,
"end_line": 366,
"start_col": 2,
"start_line": 363
} |
Prims.Tot | val u32_max:(y: U32.t{forall (x: U32.t). {:pattern (U32.v x)} U32.v x <= U32.v y}) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let u32_max : (y: U32.t { forall (x: U32.t) . {:pattern (U32.v x)} U32.v x <= U32.v y } ) =
4294967295ul | val u32_max:(y: U32.t{forall (x: U32.t). {:pattern (U32.v x)} U32.v x <= U32.v y})
let u32_max:(y: U32.t{forall (x: U32.t). {:pattern (U32.v x)} U32.v x <= U32.v y}) = | false | null | false | 4294967295ul | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"total"
] | [
"FStar.UInt32.__uint_to_t"
] | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val u32_max:(y: U32.t{forall (x: U32.t). {:pattern (U32.v x)} U32.v x <= U32.v y}) | [] | LowParse.SLow.Base.u32_max | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | y:
FStar.UInt32.t
{forall (x: FStar.UInt32.t). {:pattern FStar.UInt32.v x} FStar.UInt32.v x <= FStar.UInt32.v y} | {
"end_col": 14,
"end_line": 302,
"start_col": 2,
"start_line": 302
} |
Prims.Tot | val coerce_parser32
(t2: Type)
(#k: parser_kind)
(#t1: Type)
(#p: parser k t1)
(p32: parser32 p)
(u: unit{t2 == t1})
: Tot (parser32 (coerce_parser t2 p)) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "LowParse.Bytes32",
"short_module": "B32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Base",
"short_module": null
},
{
"abbrev": false,
"full_mod... | false | let coerce_parser32
(t2: Type)
(#k: parser_kind)
(#t1: Type)
(#p: parser k t1)
(p32: parser32 p)
(u: unit { t2 == t1 } )
: Tot (parser32 (coerce_parser t2 p))
= p32 | val coerce_parser32
(t2: Type)
(#k: parser_kind)
(#t1: Type)
(#p: parser k t1)
(p32: parser32 p)
(u: unit{t2 == t1})
: Tot (parser32 (coerce_parser t2 p))
let coerce_parser32
(t2: Type)
(#k: parser_kind)
(#t1: Type)
(#p: parser k t1)
(p32: parser32 p... | false | null | false | p32 | {
"checked_file": "LowParse.SLow.Base.fst.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Base.fsti.checked",
"LowParse.Bytes32.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
... | [
"total"
] | [
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.SLow.Base.parser32",
"Prims.unit",
"Prims.eq2",
"LowParse.Spec.Base.coerce_parser"
] | [] | module LowParse.SLow.Base
include LowParse.Spec.Base
module B32 = LowParse.Bytes32
module U32 = FStar.UInt32
let bytes32 = B32.bytes
let parser32_correct
(#k: parser_kind)
(#t: Type)
(p: parser k t)
(input: bytes32)
(res: option (t * U32.t))
: GTot Type0
= let gp = parse p (B32.reveal input) in
match res... | false | false | LowParse.SLow.Base.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val coerce_parser32
(t2: Type)
(#k: parser_kind)
(#t1: Type)
(#p: parser k t1)
(p32: parser32 p)
(u: unit{t2 == t1})
: Tot (parser32 (coerce_parser t2 p)) | [] | LowParse.SLow.Base.coerce_parser32 | {
"file_name": "src/lowparse/LowParse.SLow.Base.fst",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | t2: Type -> p32: LowParse.SLow.Base.parser32 p -> u33: u34: Prims.unit{t2 == t1}
-> LowParse.SLow.Base.parser32 (LowParse.Spec.Base.coerce_parser t2 p) | {
"end_col": 5,
"end_line": 75,
"start_col": 2,
"start_line": 75
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.