effect
stringclasses
48 values
original_source_type
stringlengths
0
23k
opens_and_abbrevs
listlengths
2
92
isa_cross_project_example
bool
1 class
source_definition
stringlengths
9
57.9k
partial_definition
stringlengths
7
23.3k
is_div
bool
2 classes
is_type
null
is_proof
bool
2 classes
completed_definiton
stringlengths
1
250k
dependencies
dict
effect_flags
sequencelengths
0
2
ideal_premises
sequencelengths
0
236
mutual_with
sequencelengths
0
11
file_context
stringlengths
0
407k
interleaved
bool
1 class
is_simply_typed
bool
2 classes
file_name
stringlengths
5
48
vconfig
dict
is_simple_lemma
null
source_type
stringlengths
10
23k
proof_features
sequencelengths
0
1
name
stringlengths
8
95
source
dict
verbose_type
stringlengths
1
7.42k
source_range
dict
FStar.Pervasives.Lemma
val update_multi_associative: a: alg -> Prims.unit -> acc: _ -> prevlen1: nat -> prevlen2: nat -> input1: S.seq uint8 -> input2: S.seq uint8 -> Lemma (requires (S.length input1 % U32.v (D.block_len a) = 0 /\ S.length input2 % U32.v (D.block_len a) = 0) ) (ensures (let input = S.append input1 input2 in S.length input % U32.v (D.block_len a) = 0 /\ update_multi_s a () (update_multi_s a () acc prevlen1 input1) prevlen2 input2 == update_multi_s a () acc prevlen1 input))
[ { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Agile" }, { "abbrev": true, "full_module": "Hacl.Hash.Definitions", "short_module": "D" }, { "abbrev": false, "full_module": "Hacl.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "Hacl.Streaming.Functor", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let update_multi_associative (a : alg) () acc (prevlen1 prevlen2 : nat) (input1 input2 : S.seq uint8) : Lemma (requires ( S.length input1 % U32.v (D.block_len a) = 0 /\ S.length input2 % U32.v (D.block_len a) = 0)) (ensures ( let input = S.append input1 input2 in S.length input % U32.v (D.block_len a) = 0 /\ update_multi_s a () (update_multi_s a () acc prevlen1 input1) prevlen2 input2 == update_multi_s a () acc prevlen1 input)) = Spec.Hash.Lemmas.update_multi_associative a acc input1 input2
val update_multi_associative: a: alg -> Prims.unit -> acc: _ -> prevlen1: nat -> prevlen2: nat -> input1: S.seq uint8 -> input2: S.seq uint8 -> Lemma (requires (S.length input1 % U32.v (D.block_len a) = 0 /\ S.length input2 % U32.v (D.block_len a) = 0) ) (ensures (let input = S.append input1 input2 in S.length input % U32.v (D.block_len a) = 0 /\ update_multi_s a () (update_multi_s a () acc prevlen1 input1) prevlen2 input2 == update_multi_s a () acc prevlen1 input)) let update_multi_associative (a: alg) () acc (prevlen1: nat) (prevlen2: nat) (input1: S.seq uint8) (input2: S.seq uint8) : Lemma (requires (S.length input1 % U32.v (D.block_len a) = 0 /\ S.length input2 % U32.v (D.block_len a) = 0) ) (ensures (let input = S.append input1 input2 in S.length input % U32.v (D.block_len a) = 0 /\ update_multi_s a () (update_multi_s a () acc prevlen1 input1) prevlen2 input2 == update_multi_s a () acc prevlen1 input)) =
false
null
true
Spec.Hash.Lemmas.update_multi_associative a acc input1 input2
{ "checked_file": "Hacl.Streaming.MD.fst.checked", "dependencies": [ "Spec.Hash.Lemmas.fsti.checked", "Spec.Hash.Incremental.fsti.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "Hacl.Streaming.Functor.fsti.checked", "Hacl.Hash.SHA2.fsti.checked", "Hacl.Hash.SHA1.fsti.checked", "Hacl.Hash.MD5.fsti.checked", "Hacl.Hash.Definitions.fst.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Int.Cast.Full.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.MD.fst" }
[ "lemma" ]
[ "Hacl.Streaming.MD.alg", "Prims.unit", "Spec.Hash.Definitions.words_state", "Prims.nat", "FStar.Seq.Base.seq", "Hacl.Streaming.Interface.uint8", "Spec.Hash.Lemmas.update_multi_associative", "Prims.l_and", "Prims.b2t", "Prims.op_Equality", "Prims.int", "Prims.op_Modulus", "FStar.Seq.Base.length", "FStar.UInt32.v", "Hacl.Hash.Definitions.block_len", "Prims.squash", "Prims.eq2", "Hacl.Streaming.MD.update_multi_s", "FStar.Seq.Base.append", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.MD open FStar.HyperStack.ST /// This file is poorly named. It contains a generic type class instantiation /// for the streaming functor for any algorithm that fits within the agile hash /// infrastructure. #set-options "--max_fuel 0 --max_ifuel 0 --z3rlimit 100" module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 module F = Hacl.Streaming.Functor module ST = FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 open Spec.Hash.Definitions open Hacl.Streaming.Interface open Hacl.Hash.Definitions module D = Hacl.Hash.Definitions module Agile = Spec.Agile.Hash let _: squash (inversion hash_alg) = allow_inversion hash_alg inline_for_extraction noextract let alg = md_alg inline_for_extraction noextract let init_elem (a : alg) : word a = match a with | MD5 | SHA1 | SHA2_256 | SHA2_224 -> Lib.IntTypes.u32 0 | SHA2_384 | SHA2_512 -> Lib.IntTypes.u64 0 inline_for_extraction noextract let state_t (a : alg) = stateful_buffer (word a) (D.impl_state_len (|a, ()|)) (init_elem a) unit inline_for_extraction noextract let update_multi_s (a : alg) () acc (prevlen : nat) input = Agile.(update_multi a acc () input) noextract let update_multi_zero (a : alg) () acc (prevlen : nat) : Lemma(update_multi_s a () acc prevlen S.empty == acc) = Spec.Hash.Lemmas.update_multi_zero a acc #push-options "--ifuel 1" // TODO: this is the third copy of this lemma!! why?! noextract let update_multi_associative (a : alg) () acc (prevlen1 prevlen2 : nat) (input1 input2 : S.seq uint8) : Lemma (requires ( S.length input1 % U32.v (D.block_len a) = 0 /\ S.length input2 % U32.v (D.block_len a) = 0)) (ensures ( let input = S.append input1 input2 in S.length input % U32.v (D.block_len a) = 0 /\ update_multi_s a () (update_multi_s a () acc prevlen1 input1) prevlen2 input2 ==
false
false
Hacl.Streaming.MD.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val update_multi_associative: a: alg -> Prims.unit -> acc: _ -> prevlen1: nat -> prevlen2: nat -> input1: S.seq uint8 -> input2: S.seq uint8 -> Lemma (requires (S.length input1 % U32.v (D.block_len a) = 0 /\ S.length input2 % U32.v (D.block_len a) = 0) ) (ensures (let input = S.append input1 input2 in S.length input % U32.v (D.block_len a) = 0 /\ update_multi_s a () (update_multi_s a () acc prevlen1 input1) prevlen2 input2 == update_multi_s a () acc prevlen1 input))
[]
Hacl.Streaming.MD.update_multi_associative
{ "file_name": "code/streaming/Hacl.Streaming.MD.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Hacl.Streaming.MD.alg -> _: Prims.unit -> acc: Spec.Hash.Definitions.words_state a -> prevlen1: Prims.nat -> prevlen2: Prims.nat -> input1: FStar.Seq.Base.seq Hacl.Streaming.Interface.uint8 -> input2: FStar.Seq.Base.seq Hacl.Streaming.Interface.uint8 -> FStar.Pervasives.Lemma (requires FStar.Seq.Base.length input1 % FStar.UInt32.v (Hacl.Hash.Definitions.block_len a) = 0 /\ FStar.Seq.Base.length input2 % FStar.UInt32.v (Hacl.Hash.Definitions.block_len a) = 0) (ensures (let input = FStar.Seq.Base.append input1 input2 in FStar.Seq.Base.length input % FStar.UInt32.v (Hacl.Hash.Definitions.block_len a) = 0 /\ Hacl.Streaming.MD.update_multi_s a () (Hacl.Streaming.MD.update_multi_s a () acc prevlen1 input1) prevlen2 input2 == Hacl.Streaming.MD.update_multi_s a () acc prevlen1 input))
{ "end_col": 63, "end_line": 75, "start_col": 2, "start_line": 75 }
Prims.Tot
val md_prevlen (a: alg) (len: D.(len: U64.t{U64.v len % U32.v (block_len a) = 0})) : D.prev_len_t a
[ { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Agile" }, { "abbrev": true, "full_module": "Hacl.Hash.Definitions", "short_module": "D" }, { "abbrev": false, "full_module": "Hacl.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "Hacl.Streaming.Functor", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let md_prevlen (a: alg) (len: D.(len: U64.t { U64.v len % U32.v (block_len a) = 0 })): D.prev_len_t a = if a = SHA2_384 || a = SHA2_512 then FStar.Int.Cast.Full.uint64_to_uint128 len else len
val md_prevlen (a: alg) (len: D.(len: U64.t{U64.v len % U32.v (block_len a) = 0})) : D.prev_len_t a let md_prevlen (a: alg) (len: D.(len: U64.t{U64.v len % U32.v (block_len a) = 0})) : D.prev_len_t a =
false
null
false
if a = SHA2_384 || a = SHA2_512 then FStar.Int.Cast.Full.uint64_to_uint128 len else len
{ "checked_file": "Hacl.Streaming.MD.fst.checked", "dependencies": [ "Spec.Hash.Lemmas.fsti.checked", "Spec.Hash.Incremental.fsti.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "Hacl.Streaming.Functor.fsti.checked", "Hacl.Hash.SHA2.fsti.checked", "Hacl.Hash.SHA1.fsti.checked", "Hacl.Hash.MD5.fsti.checked", "Hacl.Hash.Definitions.fst.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Int.Cast.Full.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.MD.fst" }
[ "total" ]
[ "Hacl.Streaming.MD.alg", "FStar.UInt64.t", "Prims.b2t", "Prims.op_Equality", "Prims.int", "Prims.op_Modulus", "FStar.UInt64.v", "FStar.UInt32.v", "Hacl.Hash.Definitions.block_len", "Prims.op_BarBar", "Spec.Hash.Definitions.hash_alg", "Spec.Hash.Definitions.SHA2_384", "Spec.Hash.Definitions.SHA2_512", "FStar.Int.Cast.Full.uint64_to_uint128", "Prims.bool", "Hacl.Hash.Definitions.prev_len_t" ]
[]
module Hacl.Streaming.MD open FStar.HyperStack.ST /// This file is poorly named. It contains a generic type class instantiation /// for the streaming functor for any algorithm that fits within the agile hash /// infrastructure. #set-options "--max_fuel 0 --max_ifuel 0 --z3rlimit 100" module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 module F = Hacl.Streaming.Functor module ST = FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 open Spec.Hash.Definitions open Hacl.Streaming.Interface open Hacl.Hash.Definitions module D = Hacl.Hash.Definitions module Agile = Spec.Agile.Hash let _: squash (inversion hash_alg) = allow_inversion hash_alg inline_for_extraction noextract let alg = md_alg inline_for_extraction noextract let init_elem (a : alg) : word a = match a with | MD5 | SHA1 | SHA2_256 | SHA2_224 -> Lib.IntTypes.u32 0 | SHA2_384 | SHA2_512 -> Lib.IntTypes.u64 0 inline_for_extraction noextract let state_t (a : alg) = stateful_buffer (word a) (D.impl_state_len (|a, ()|)) (init_elem a) unit inline_for_extraction noextract let update_multi_s (a : alg) () acc (prevlen : nat) input = Agile.(update_multi a acc () input) noextract let update_multi_zero (a : alg) () acc (prevlen : nat) : Lemma(update_multi_s a () acc prevlen S.empty == acc) = Spec.Hash.Lemmas.update_multi_zero a acc #push-options "--ifuel 1" // TODO: this is the third copy of this lemma!! why?! noextract let update_multi_associative (a : alg) () acc (prevlen1 prevlen2 : nat) (input1 input2 : S.seq uint8) : Lemma (requires ( S.length input1 % U32.v (D.block_len a) = 0 /\ S.length input2 % U32.v (D.block_len a) = 0)) (ensures ( let input = S.append input1 input2 in S.length input % U32.v (D.block_len a) = 0 /\ update_multi_s a () (update_multi_s a () acc prevlen1 input1) prevlen2 input2 == update_multi_s a () acc prevlen1 input)) = Spec.Hash.Lemmas.update_multi_associative a acc input1 input2 #pop-options inline_for_extraction noextract
false
false
Hacl.Streaming.MD.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val md_prevlen (a: alg) (len: D.(len: U64.t{U64.v len % U32.v (block_len a) = 0})) : D.prev_len_t a
[]
Hacl.Streaming.MD.md_prevlen
{ "file_name": "code/streaming/Hacl.Streaming.MD.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Hacl.Streaming.MD.alg -> len: FStar.UInt64.t{FStar.UInt64.v len % FStar.UInt32.v (Hacl.Hash.Definitions.block_len a) = 0} -> Hacl.Hash.Definitions.prev_len_t a
{ "end_col": 89, "end_line": 80, "start_col": 2, "start_line": 80 }
Prims.Tot
[ { "abbrev": true, "full_module": "Spec.Agile.Hash", "short_module": "Agile" }, { "abbrev": true, "full_module": "Hacl.Hash.Definitions", "short_module": "D" }, { "abbrev": false, "full_module": "Hacl.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "Hacl.Streaming.Functor", "short_module": "F" }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let hacl_md (a:alg)// : block unit = = Block Erased (state_t a) (* state *) (stateful_unused unit) (* key *) unit (fun () -> max_input_len64 a) (* max_input_len *) (fun () () -> Spec.Hash.Definitions.hash_length a) (* output_len *) (fun () -> Hacl.Hash.Definitions.block_len a) (* block_len *) (fun () -> Hacl.Hash.Definitions.block_len a) (* blocks_state_len *) (fun () -> 0ul) (* init_input_len *) (fun () _k -> S.empty) (* init_input_s *) (* init_s *) (fun () _ -> Spec.Agile.Hash.init a) (* update_multi_s *) (fun () acc prevlen blocks -> update_multi_s a () acc prevlen blocks) (* update_last_s *) (fun () acc prevlen input -> Spec.Hash.Incremental.(update_last a acc prevlen input)) (* finish_s *) (fun () _ acc () -> Spec.Agile.Hash.(finish a acc ())) (* spec_s *) (fun () _ s () -> Spec.Agile.Hash.(hash a s)) (* update_multi_zero *) (fun i h prevlen -> update_multi_zero a i h prevlen) (* update_multi_associative *) (fun i acc prevlen1 prevlen2 input1 input2 -> update_multi_associative a i acc prevlen1 prevlen2 input1 input2) (* spec_is_incremental *) (fun _ key input () -> let input1 = S.append S.empty input in assert (S.equal input1 input); Spec.Hash.Incremental.hash_is_hash_incremental' a input ()) (* index_of_state *) (fun _ _ -> ()) (* init *) (fun _ _ _ s -> match a with | MD5 -> Hacl.Hash.MD5.legacy_init s | SHA1 -> Hacl.Hash.SHA1.legacy_init s | SHA2_224 -> Hacl.Hash.SHA2.init_224 s | SHA2_256 -> Hacl.Hash.SHA2.init_256 s | SHA2_384 -> Hacl.Hash.SHA2.init_384 s | SHA2_512 -> Hacl.Hash.SHA2.init_512 s ) (* update_multi *) (fun _ s prevlen blocks len -> [@inline_let] let update_multi : update_multi_st (|a,()|) = match a with | MD5 -> Hacl.Hash.MD5.legacy_update_multi | SHA1 -> Hacl.Hash.SHA1.legacy_update_multi | SHA2_224 -> Hacl.Hash.SHA2.update_multi_224 | SHA2_256 -> Hacl.Hash.SHA2.update_multi_256 | SHA2_384 -> Hacl.Hash.SHA2.update_multi_384 | SHA2_512 -> Hacl.Hash.SHA2.update_multi_512 in update_multi s () blocks (len `U32.div` Hacl.Hash.Definitions.(block_len a))) (* update_last *) (fun _ s prevlen last last_len -> [@inline_let] let update_last : update_last_st (|a,()|) = match a with | MD5 -> Hacl.Hash.MD5.legacy_update_last | SHA1 -> Hacl.Hash.SHA1.legacy_update_last | SHA2_224 -> Hacl.Hash.SHA2.update_last_224 | SHA2_256 -> Hacl.Hash.SHA2.update_last_256 | SHA2_384 -> Hacl.Hash.SHA2.update_last_384 | SHA2_512 -> Hacl.Hash.SHA2.update_last_512 in update_last s (md_prevlen a prevlen) last last_len) (* finish *) (fun _ _ s dst _ -> [@inline_let] let finish : finish_st (|a,()|) = match a with | MD5 -> Hacl.Hash.MD5.legacy_finish | SHA1 -> Hacl.Hash.SHA1.legacy_finish | SHA2_224 -> Hacl.Hash.SHA2.finish_224 | SHA2_256 -> Hacl.Hash.SHA2.finish_256 | SHA2_384 -> Hacl.Hash.SHA2.finish_384 | SHA2_512 -> Hacl.Hash.SHA2.finish_512 in finish s dst)
let hacl_md (a: alg) =
false
null
false
Block Erased (state_t a) (stateful_unused unit) unit (fun () -> max_input_len64 a) (fun () () -> Spec.Hash.Definitions.hash_length a) (fun () -> Hacl.Hash.Definitions.block_len a) (fun () -> Hacl.Hash.Definitions.block_len a) (fun () -> 0ul) (fun () _k -> S.empty) (fun () _ -> Spec.Agile.Hash.init a) (fun () acc prevlen blocks -> update_multi_s a () acc prevlen blocks) (fun () acc prevlen input -> let open Spec.Hash.Incremental in update_last a acc prevlen input) (fun () _ acc () -> let open Spec.Agile.Hash in finish a acc ()) (fun () _ s () -> let open Spec.Agile.Hash in hash a s) (fun i h prevlen -> update_multi_zero a i h prevlen) (fun i acc prevlen1 prevlen2 input1 input2 -> update_multi_associative a i acc prevlen1 prevlen2 input1 input2) (fun _ key input () -> let input1 = S.append S.empty input in assert (S.equal input1 input); Spec.Hash.Incremental.hash_is_hash_incremental' a input ()) (fun _ _ -> ()) (fun _ _ _ s -> match a with | MD5 -> Hacl.Hash.MD5.legacy_init s | SHA1 -> Hacl.Hash.SHA1.legacy_init s | SHA2_224 -> Hacl.Hash.SHA2.init_224 s | SHA2_256 -> Hacl.Hash.SHA2.init_256 s | SHA2_384 -> Hacl.Hash.SHA2.init_384 s | SHA2_512 -> Hacl.Hash.SHA2.init_512 s) (fun _ s prevlen blocks len -> [@@ inline_let ]let update_multi:update_multi_st (| a, () |) = match a with | MD5 -> Hacl.Hash.MD5.legacy_update_multi | SHA1 -> Hacl.Hash.SHA1.legacy_update_multi | SHA2_224 -> Hacl.Hash.SHA2.update_multi_224 | SHA2_256 -> Hacl.Hash.SHA2.update_multi_256 | SHA2_384 -> Hacl.Hash.SHA2.update_multi_384 | SHA2_512 -> Hacl.Hash.SHA2.update_multi_512 in update_multi s () blocks (len `U32.div` Hacl.Hash.Definitions.(block_len a))) (fun _ s prevlen last last_len -> [@@ inline_let ]let update_last:update_last_st (| a, () |) = match a with | MD5 -> Hacl.Hash.MD5.legacy_update_last | SHA1 -> Hacl.Hash.SHA1.legacy_update_last | SHA2_224 -> Hacl.Hash.SHA2.update_last_224 | SHA2_256 -> Hacl.Hash.SHA2.update_last_256 | SHA2_384 -> Hacl.Hash.SHA2.update_last_384 | SHA2_512 -> Hacl.Hash.SHA2.update_last_512 in update_last s (md_prevlen a prevlen) last last_len) (fun _ _ s dst _ -> [@@ inline_let ]let finish:finish_st (| a, () |) = match a with | MD5 -> Hacl.Hash.MD5.legacy_finish | SHA1 -> Hacl.Hash.SHA1.legacy_finish | SHA2_224 -> Hacl.Hash.SHA2.finish_224 | SHA2_256 -> Hacl.Hash.SHA2.finish_256 | SHA2_384 -> Hacl.Hash.SHA2.finish_384 | SHA2_512 -> Hacl.Hash.SHA2.finish_512 in finish s dst)
{ "checked_file": "Hacl.Streaming.MD.fst.checked", "dependencies": [ "Spec.Hash.Lemmas.fsti.checked", "Spec.Hash.Incremental.fsti.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "Hacl.Streaming.Functor.fsti.checked", "Hacl.Hash.SHA2.fsti.checked", "Hacl.Hash.SHA1.fsti.checked", "Hacl.Hash.MD5.fsti.checked", "Hacl.Hash.Definitions.fst.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Int.Cast.Full.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.MD.fst" }
[ "total" ]
[ "Hacl.Streaming.MD.alg", "Hacl.Streaming.Interface.Block", "Prims.unit", "Hacl.Streaming.Interface.Erased", "Hacl.Streaming.MD.state_t", "Hacl.Streaming.Interface.stateful_unused", "Hacl.Hash.Definitions.max_input_len64", "FStar.UInt64.t", "Prims.b2t", "FStar.Integers.op_Greater", "FStar.Integers.Signed", "FStar.Integers.Winfinite", "FStar.UInt64.v", "Spec.Hash.Definitions.hash_length", "Lib.IntTypes.size_nat", "Hacl.Hash.Definitions.block_len", "FStar.UInt32.t", "FStar.UInt32.v", "Prims.l_and", "FStar.Integers.op_Greater_Equals", "Prims.op_Equality", "Prims.int", "FStar.Integers.op_Percent", "FStar.UInt32.__uint_to_t", "FStar.Integers.op_Less_Equals", "Hacl.Streaming.Interface.__proj__Stateful__item__t", "FStar.Seq.Base.empty", "Hacl.Streaming.Interface.uint8", "FStar.Seq.Base.seq", "Prims.l_or", "Prims.op_GreaterThanOrEqual", "FStar.UInt.size", "FStar.UInt32.n", "FStar.Seq.Base.length", "Spec.Agile.Hash.init", "FStar.Integers.nat", "FStar.Integers.op_Plus", "Hacl.Streaming.MD.update_multi_s", "Spec.Hash.Incremental.Definitions.update_last", "Spec.Agile.Hash.finish", "Prims.nat", "Spec.Agile.Hash.hash", "Prims.eq2", "Hacl.Streaming.MD.update_multi_zero", "Hacl.Streaming.MD.update_multi_associative", "Spec.Hash.Incremental.hash_is_hash_incremental'", "Prims._assert", "FStar.Seq.Base.equal", "FStar.Seq.Base.append", "FStar.Ghost.erased", "Hacl.Streaming.Interface.__proj__Stateful__item__s", "FStar.Ghost.reveal", "LowStar.Buffer.buffer", "LowStar.Monotonic.Buffer.length", "LowStar.Buffer.trivial_preorder", "Hacl.Hash.Core.MD5.legacy_init", "Hacl.Hash.Core.SHA1.legacy_init", "Hacl.Hash.SHA2.init_224", "Hacl.Hash.SHA2.init_256", "Hacl.Hash.SHA2.init_384", "Hacl.Hash.SHA2.init_512", "FStar.UInt32.div", "Hacl.Hash.Definitions.update_multi_st", "Prims.Mkdtuple2", "Spec.Hash.Definitions.hash_alg", "Hacl.Hash.Definitions.m_spec", "Hacl.Hash.MD5.legacy_update_multi", "Hacl.Hash.SHA1.legacy_update_multi", "Hacl.Hash.SHA2.update_multi_224", "Hacl.Hash.SHA2.update_multi_256", "Hacl.Hash.SHA2.update_multi_384", "Hacl.Hash.SHA2.update_multi_512", "LowStar.Monotonic.Buffer.len", "Hacl.Streaming.MD.md_prevlen", "Hacl.Hash.Definitions.update_last_st", "Hacl.Hash.MD5.legacy_update_last", "Hacl.Hash.SHA1.legacy_update_last", "Hacl.Hash.SHA2.update_last_224", "Hacl.Hash.SHA2.update_last_256", "Hacl.Hash.SHA2.update_last_384", "Hacl.Hash.SHA2.update_last_512", "Hacl.Streaming.Interface.optional_key", "Hacl.Hash.Definitions.finish_st", "Hacl.Hash.Core.MD5.legacy_finish", "Hacl.Hash.Core.SHA1.legacy_finish", "Hacl.Hash.SHA2.finish_224", "Hacl.Hash.SHA2.finish_256", "Hacl.Hash.SHA2.finish_384", "Hacl.Hash.SHA2.finish_512", "Hacl.Streaming.Interface.block" ]
[]
module Hacl.Streaming.MD open FStar.HyperStack.ST /// This file is poorly named. It contains a generic type class instantiation /// for the streaming functor for any algorithm that fits within the agile hash /// infrastructure. #set-options "--max_fuel 0 --max_ifuel 0 --z3rlimit 100" module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 module F = Hacl.Streaming.Functor module ST = FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 open Spec.Hash.Definitions open Hacl.Streaming.Interface open Hacl.Hash.Definitions module D = Hacl.Hash.Definitions module Agile = Spec.Agile.Hash let _: squash (inversion hash_alg) = allow_inversion hash_alg inline_for_extraction noextract let alg = md_alg inline_for_extraction noextract let init_elem (a : alg) : word a = match a with | MD5 | SHA1 | SHA2_256 | SHA2_224 -> Lib.IntTypes.u32 0 | SHA2_384 | SHA2_512 -> Lib.IntTypes.u64 0 inline_for_extraction noextract let state_t (a : alg) = stateful_buffer (word a) (D.impl_state_len (|a, ()|)) (init_elem a) unit inline_for_extraction noextract let update_multi_s (a : alg) () acc (prevlen : nat) input = Agile.(update_multi a acc () input) noextract let update_multi_zero (a : alg) () acc (prevlen : nat) : Lemma(update_multi_s a () acc prevlen S.empty == acc) = Spec.Hash.Lemmas.update_multi_zero a acc #push-options "--ifuel 1" // TODO: this is the third copy of this lemma!! why?! noextract let update_multi_associative (a : alg) () acc (prevlen1 prevlen2 : nat) (input1 input2 : S.seq uint8) : Lemma (requires ( S.length input1 % U32.v (D.block_len a) = 0 /\ S.length input2 % U32.v (D.block_len a) = 0)) (ensures ( let input = S.append input1 input2 in S.length input % U32.v (D.block_len a) = 0 /\ update_multi_s a () (update_multi_s a () acc prevlen1 input1) prevlen2 input2 == update_multi_s a () acc prevlen1 input)) = Spec.Hash.Lemmas.update_multi_associative a acc input1 input2 #pop-options inline_for_extraction noextract let md_prevlen (a: alg) (len: D.(len: U64.t { U64.v len % U32.v (block_len a) = 0 })): D.prev_len_t a = if a = SHA2_384 || a = SHA2_512 then FStar.Int.Cast.Full.uint64_to_uint128 len else len /// This proof usually succeeds fast but we increase the rlimit for safety #push-options "--z3rlimit 500 --ifuel 1" inline_for_extraction noextract let hacl_md (a:alg)// : block unit =
false
true
Hacl.Streaming.MD.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 500, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val hacl_md : a: Hacl.Streaming.MD.alg -> Hacl.Streaming.Interface.block Prims.unit
[]
Hacl.Streaming.MD.hacl_md
{ "file_name": "code/streaming/Hacl.Streaming.MD.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Hacl.Streaming.MD.alg -> Hacl.Streaming.Interface.block Prims.unit
{ "end_col": 19, "end_line": 183, "start_col": 2, "start_line": 87 }
Prims.Tot
val kind_t_exact : parser_kind false WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist
val kind_t_exact : parser_kind false WeakKindStrongPrefix let kind_t_exact:parser_kind false WeakKindStrongPrefix =
false
null
false
kind_nlist
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "EverParse3d.Kinds.kind_nlist", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind_t_exact : parser_kind false WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind_t_exact
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind false EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 14, "end_line": 98, "start_col": 4, "start_line": 98 }
Prims.Tot
val parser_kind (nz:bool) (wk: weak_kind) : Type0
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k }
val parser_kind (nz:bool) (wk: weak_kind) : Type0 let parser_kind (nz: bool) (wk: weak_kind) =
false
null
false
k: LP.parser_kind{parser_kind_prop nz wk k}
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "Prims.bool", "EverParse3d.Kinds.weak_kind", "LowParse.Spec.Base.parser_kind", "EverParse3d.Kinds.parser_kind_prop" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract
false
true
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val parser_kind (nz:bool) (wk: weak_kind) : Type0
[]
EverParse3d.Kinds.parser_kind
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
nz: Prims.bool -> wk: EverParse3d.Kinds.weak_kind -> Type0
{ "end_col": 47, "end_line": 39, "start_col": 2, "start_line": 39 }
Prims.Tot
val parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end
val parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop =
false
null
false
(nz ==> (k.LP.parser_kind_low > 0)) /\ (match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True)
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "Prims.bool", "EverParse3d.Kinds.weak_kind", "LowParse.Spec.Base.parser_kind", "Prims.l_and", "Prims.l_imp", "Prims.b2t", "Prims.op_GreaterThan", "LowParse.Spec.Base.__proj__Mkparser_kind'__item__parser_kind_low", "Prims.eq2", "FStar.Pervasives.Native.option", "LowParse.Spec.Base.parser_subkind", "LowParse.Spec.Base.__proj__Mkparser_kind'__item__parser_kind_subkind", "FStar.Pervasives.Native.Some", "LowParse.Spec.Base.ParserStrong", "LowParse.Spec.Base.ParserConsumesAll", "Prims.l_True", "Prims.logical", "Prims.prop" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind)
false
true
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop
[]
EverParse3d.Kinds.parser_kind_prop
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
nz: Prims.bool -> wk: EverParse3d.Kinds.weak_kind -> k: LowParse.Spec.Base.parser_kind -> Prims.prop
{ "end_col": 5, "end_line": 34, "start_col": 2, "start_line": 29 }
Prims.Tot
val kind_t_at_most : parser_kind false WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist
val kind_t_at_most : parser_kind false WeakKindStrongPrefix let kind_t_at_most:parser_kind false WeakKindStrongPrefix =
false
null
false
kind_nlist
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "EverParse3d.Kinds.kind_nlist", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind_t_at_most : parser_kind false WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind_t_at_most
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind false EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 14, "end_line": 94, "start_col": 4, "start_line": 94 }
Prims.Tot
val kind____UINT16BE : parser_kind true WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind____UINT16BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u16_kind
val kind____UINT16BE : parser_kind true WeakKindStrongPrefix let kind____UINT16BE:parser_kind true WeakKindStrongPrefix =
false
null
false
LowParse.Spec.BoundedInt.parse_u16_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Int.parse_u16_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist let parse_string_kind : parser_kind true WeakKindStrongPrefix = { LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None; } let kind_all_zeros : parser_kind false WeakKindConsumesAll = LowParse.Spec.List.parse_list_kind inline_for_extraction noextract let kind____UINT8 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u8_kind inline_for_extraction noextract let kind____UINT8BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u8_kind inline_for_extraction noextract let kind____UINT16BE
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind____UINT16BE : parser_kind true WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind____UINT16BE
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind true EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 43, "end_line": 126, "start_col": 4, "start_line": 126 }
Prims.Tot
val ret_kind : parser_kind false WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind
val ret_kind : parser_kind false WeakKindStrongPrefix let ret_kind:parser_kind false WeakKindStrongPrefix =
false
null
false
LPC.parse_ret_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Combinators.parse_ret_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val ret_kind : parser_kind false WeakKindStrongPrefix
[]
EverParse3d.Kinds.ret_kind
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind false EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 22, "end_line": 53, "start_col": 4, "start_line": 53 }
Prims.Tot
val kind_nlist : parser_kind false WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None }
val kind_nlist : parser_kind false WeakKindStrongPrefix let kind_nlist:parser_kind false WeakKindStrongPrefix =
false
null
false
let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None }
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Base.Mkparser_kind'", "FStar.Pervasives.Native.None", "Prims.nat", "FStar.Pervasives.Native.Some", "LowParse.Spec.Base.parser_subkind", "LowParse.Spec.Base.ParserStrong", "LowParse.Spec.Base.parser_kind_metadata_some", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind_nlist : parser_kind false WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind_nlist
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind false EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 33, "end_line": 85, "start_col": 6, "start_line": 82 }
Prims.Tot
val kind____UINT8 : parser_kind true WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind____UINT8 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u8_kind
val kind____UINT8 : parser_kind true WeakKindStrongPrefix let kind____UINT8:parser_kind true WeakKindStrongPrefix =
false
null
false
LowParse.Spec.Int.parse_u8_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Int.parse_u8_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist let parse_string_kind : parser_kind true WeakKindStrongPrefix = { LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None; } let kind_all_zeros : parser_kind false WeakKindConsumesAll = LowParse.Spec.List.parse_list_kind inline_for_extraction noextract let kind____UINT8
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind____UINT8 : parser_kind true WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind____UINT8
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind true EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 35, "end_line": 116, "start_col": 4, "start_line": 116 }
Prims.Tot
val filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k
val filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk let filter_kind (#nz #wk: _) (k: parser_kind nz wk) : parser_kind nz wk =
false
null
false
LPC.parse_filter_kind k
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "Prims.bool", "EverParse3d.Kinds.weak_kind", "EverParse3d.Kinds.parser_kind", "LowParse.Spec.Combinators.parse_filter_kind" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk)
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk
[]
EverParse3d.Kinds.filter_kind
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
k: EverParse3d.Kinds.parser_kind nz wk -> EverParse3d.Kinds.parser_kind nz wk
{ "end_col": 27, "end_line": 67, "start_col": 4, "start_line": 67 }
Prims.Tot
val kind____UINT32BE : parser_kind true WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind____UINT32BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u32_kind
val kind____UINT32BE : parser_kind true WeakKindStrongPrefix let kind____UINT32BE:parser_kind true WeakKindStrongPrefix =
false
null
false
LowParse.Spec.BoundedInt.parse_u32_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Int.parse_u32_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist let parse_string_kind : parser_kind true WeakKindStrongPrefix = { LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None; } let kind_all_zeros : parser_kind false WeakKindConsumesAll = LowParse.Spec.List.parse_list_kind inline_for_extraction noextract let kind____UINT8 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u8_kind inline_for_extraction noextract let kind____UINT8BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u8_kind inline_for_extraction noextract let kind____UINT16BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u16_kind inline_for_extraction noextract let kind____UINT32BE
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind____UINT32BE : parser_kind true WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind____UINT32BE
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind true EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 43, "end_line": 131, "start_col": 4, "start_line": 131 }
Prims.Tot
val kind_all_bytes : parser_kind false WeakKindConsumesAll
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind
val kind_all_bytes : parser_kind false WeakKindConsumesAll let kind_all_bytes:parser_kind false WeakKindConsumesAll =
false
null
false
LowParse.Spec.Bytes.parse_all_bytes_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Bytes.parse_all_bytes_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindConsumesAll" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind_all_bytes : parser_kind false WeakKindConsumesAll
[]
EverParse3d.Kinds.kind_all_bytes
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind false EverParse3d.Kinds.WeakKindConsumesAll
{ "end_col": 44, "end_line": 90, "start_col": 4, "start_line": 90 }
Prims.Tot
val impos_kind : parser_kind true WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail))
val impos_kind : parser_kind true WeakKindStrongPrefix let impos_kind:parser_kind true WeakKindStrongPrefix =
false
null
false
let open LPC in strong_parser_kind 1 1 (Some ParserKindMetadataFail)
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Base.strong_parser_kind", "FStar.Pervasives.Native.Some", "LowParse.Spec.Base.parser_kind_metadata_some", "LowParse.Spec.Base.ParserKindMetadataFail", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val impos_kind : parser_kind true WeakKindStrongPrefix
[]
EverParse3d.Kinds.impos_kind
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind true EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 61, "end_line": 73, "start_col": 9, "start_line": 73 }
Prims.Tot
val kind____UINT64BE : parser_kind true WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind____UINT64BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u64_kind
val kind____UINT64BE : parser_kind true WeakKindStrongPrefix let kind____UINT64BE:parser_kind true WeakKindStrongPrefix =
false
null
false
LowParse.Spec.Int.parse_u64_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Int.parse_u64_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist let parse_string_kind : parser_kind true WeakKindStrongPrefix = { LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None; } let kind_all_zeros : parser_kind false WeakKindConsumesAll = LowParse.Spec.List.parse_list_kind inline_for_extraction noextract let kind____UINT8 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u8_kind inline_for_extraction noextract let kind____UINT8BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u8_kind inline_for_extraction noextract let kind____UINT16BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u16_kind inline_for_extraction noextract let kind____UINT32BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u32_kind inline_for_extraction noextract let kind____UINT64BE
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind____UINT64BE : parser_kind true WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind____UINT64BE
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind true EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 36, "end_line": 136, "start_col": 4, "start_line": 136 }
Prims.Tot
val kind____UINT8BE : parser_kind true WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind____UINT8BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u8_kind
val kind____UINT8BE : parser_kind true WeakKindStrongPrefix let kind____UINT8BE:parser_kind true WeakKindStrongPrefix =
false
null
false
LowParse.Spec.BoundedInt.parse_u8_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Int.parse_u8_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist let parse_string_kind : parser_kind true WeakKindStrongPrefix = { LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None; } let kind_all_zeros : parser_kind false WeakKindConsumesAll = LowParse.Spec.List.parse_list_kind inline_for_extraction noextract let kind____UINT8 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u8_kind inline_for_extraction noextract let kind____UINT8BE
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind____UINT8BE : parser_kind true WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind____UINT8BE
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind true EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 42, "end_line": 121, "start_col": 4, "start_line": 121 }
Prims.Tot
val kind____UINT32 : parser_kind true WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind____UINT32 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u32_kind
val kind____UINT32 : parser_kind true WeakKindStrongPrefix let kind____UINT32:parser_kind true WeakKindStrongPrefix =
false
null
false
LowParse.Spec.BoundedInt.parse_u32_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Int.parse_u32_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist let parse_string_kind : parser_kind true WeakKindStrongPrefix = { LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None; } let kind_all_zeros : parser_kind false WeakKindConsumesAll = LowParse.Spec.List.parse_list_kind inline_for_extraction noextract let kind____UINT8 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u8_kind inline_for_extraction noextract let kind____UINT8BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u8_kind inline_for_extraction noextract let kind____UINT16BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u16_kind inline_for_extraction noextract let kind____UINT32BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u32_kind inline_for_extraction noextract let kind____UINT64BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u64_kind inline_for_extraction noextract let kind____UINT16 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u16_kind inline_for_extraction noextract let kind____UINT32
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind____UINT32 : parser_kind true WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind____UINT32
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind true EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 43, "end_line": 146, "start_col": 4, "start_line": 146 }
Prims.Tot
val parse_string_kind : parser_kind true WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let parse_string_kind : parser_kind true WeakKindStrongPrefix = { LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None; }
val parse_string_kind : parser_kind true WeakKindStrongPrefix let parse_string_kind:parser_kind true WeakKindStrongPrefix =
false
null
false
{ LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None }
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Base.Mkparser_kind'", "FStar.Pervasives.Native.None", "Prims.nat", "FStar.Pervasives.Native.Some", "LowParse.Spec.Base.parser_subkind", "LowParse.Spec.Base.ParserStrong", "LowParse.Spec.Base.parser_kind_metadata_some", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist let parse_string_kind : parser_kind true WeakKindStrongPrefix
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val parse_string_kind : parser_kind true WeakKindStrongPrefix
[]
EverParse3d.Kinds.parse_string_kind
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind true EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 36, "end_line": 106, "start_col": 5, "start_line": 103 }
Prims.Tot
val kind____UINT16 : parser_kind true WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind____UINT16 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u16_kind
val kind____UINT16 : parser_kind true WeakKindStrongPrefix let kind____UINT16:parser_kind true WeakKindStrongPrefix =
false
null
false
LowParse.Spec.BoundedInt.parse_u16_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Int.parse_u16_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist let parse_string_kind : parser_kind true WeakKindStrongPrefix = { LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None; } let kind_all_zeros : parser_kind false WeakKindConsumesAll = LowParse.Spec.List.parse_list_kind inline_for_extraction noextract let kind____UINT8 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u8_kind inline_for_extraction noextract let kind____UINT8BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u8_kind inline_for_extraction noextract let kind____UINT16BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u16_kind inline_for_extraction noextract let kind____UINT32BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u32_kind inline_for_extraction noextract let kind____UINT64BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u64_kind inline_for_extraction noextract let kind____UINT16
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind____UINT16 : parser_kind true WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind____UINT16
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind true EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 43, "end_line": 141, "start_col": 4, "start_line": 141 }
Prims.Tot
val and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2
val and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 let and_then_kind (#nz1: _) (k1: parser_kind nz1 WeakKindStrongPrefix) (#nz2 #wk2: _) (k2: parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 =
false
null
false
LPC.and_then_kind k1 k2
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "Prims.bool", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix", "EverParse3d.Kinds.weak_kind", "LowParse.Spec.Combinators.and_then_kind", "Prims.op_BarBar" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2)
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2
[]
EverParse3d.Kinds.and_then_kind
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
k1: EverParse3d.Kinds.parser_kind nz1 EverParse3d.Kinds.WeakKindStrongPrefix -> k2: EverParse3d.Kinds.parser_kind nz2 wk2 -> EverParse3d.Kinds.parser_kind (nz1 || nz2) wk2
{ "end_col": 29, "end_line": 61, "start_col": 6, "start_line": 61 }
Prims.Tot
val glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2)
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2
val glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) let glb (#nz1: bool) (#wk1: weak_kind) (k1: parser_kind nz1 wk1) (#nz2: bool) (#wk2: weak_kind) (k2: parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) =
false
null
false
LP.glb k1 k2
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "Prims.bool", "EverParse3d.Kinds.weak_kind", "EverParse3d.Kinds.parser_kind", "LowParse.Spec.Base.glb", "Prims.op_AmpAmp", "EverParse3d.Kinds.weak_kind_glb" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2)
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2)
[]
EverParse3d.Kinds.glb
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
k1: EverParse3d.Kinds.parser_kind nz1 wk1 -> k2: EverParse3d.Kinds.parser_kind nz2 wk2 -> EverParse3d.Kinds.parser_kind (nz1 && nz2) (EverParse3d.Kinds.weak_kind_glb wk1 wk2)
{ "end_col": 18, "end_line": 46, "start_col": 6, "start_line": 46 }
Prims.Tot
val kind____UINT64 : parser_kind true WeakKindStrongPrefix
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind____UINT64 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u64_kind
val kind____UINT64 : parser_kind true WeakKindStrongPrefix let kind____UINT64:parser_kind true WeakKindStrongPrefix =
false
null
false
LowParse.Spec.Int.parse_u64_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.Int.parse_u64_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindStrongPrefix" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist let parse_string_kind : parser_kind true WeakKindStrongPrefix = { LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None; } let kind_all_zeros : parser_kind false WeakKindConsumesAll = LowParse.Spec.List.parse_list_kind inline_for_extraction noextract let kind____UINT8 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u8_kind inline_for_extraction noextract let kind____UINT8BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u8_kind inline_for_extraction noextract let kind____UINT16BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u16_kind inline_for_extraction noextract let kind____UINT32BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u32_kind inline_for_extraction noextract let kind____UINT64BE : parser_kind true WeakKindStrongPrefix = LowParse.Spec.Int.parse_u64_kind inline_for_extraction noextract let kind____UINT16 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u16_kind inline_for_extraction noextract let kind____UINT32 : parser_kind true WeakKindStrongPrefix = LowParse.Spec.BoundedInt.parse_u32_kind inline_for_extraction noextract let kind____UINT64
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind____UINT64 : parser_kind true WeakKindStrongPrefix
[]
EverParse3d.Kinds.kind____UINT64
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind true EverParse3d.Kinds.WeakKindStrongPrefix
{ "end_col": 36, "end_line": 151, "start_col": 4, "start_line": 151 }
Prims.Tot
val kind_all_zeros : parser_kind false WeakKindConsumesAll
[ { "abbrev": true, "full_module": "LowParse.Spec.Combinators", "short_module": "LPC" }, { "abbrev": true, "full_module": "LowParse.Spec.Base", "short_module": "LP" }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "EverParse3d", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let kind_all_zeros : parser_kind false WeakKindConsumesAll = LowParse.Spec.List.parse_list_kind
val kind_all_zeros : parser_kind false WeakKindConsumesAll let kind_all_zeros:parser_kind false WeakKindConsumesAll =
false
null
false
LowParse.Spec.List.parse_list_kind
{ "checked_file": "EverParse3d.Kinds.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.List.fsti.checked", "LowParse.Spec.Int.fsti.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Bytes.fst.checked", "LowParse.Spec.BoundedInt.fsti.checked", "LowParse.Spec.Base.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "EverParse3d.Kinds.fst" }
[ "total" ]
[ "LowParse.Spec.List.parse_list_kind", "EverParse3d.Kinds.parser_kind", "EverParse3d.Kinds.WeakKindConsumesAll" ]
[]
(* Copyright 2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module EverParse3d.Kinds module LP = LowParse.Spec.Base module LPC = LowParse.Spec.Combinators //////////////////////////////////////////////////////////////////////////////// // Parsers //////////////////////////////////////////////////////////////////////////////// let parser_kind_prop (nz: bool) (wk: weak_kind) (k: LP.parser_kind) : Tot prop = (nz ==> (k.LP.parser_kind_low > 0)) /\ begin match wk with | WeakKindStrongPrefix -> k.LP.parser_kind_subkind == Some LP.ParserStrong | WeakKindConsumesAll -> k.LP.parser_kind_subkind == Some LP.ParserConsumesAll | _ -> True end inline_for_extraction noextract let parser_kind (nz:bool) (wk: weak_kind) = k:LP.parser_kind { parser_kind_prop nz wk k } inline_for_extraction noextract let glb (#nz1:bool) (#wk1: weak_kind) (k1:parser_kind nz1 wk1) (#nz2:bool) (#wk2: weak_kind) (k2:parser_kind nz2 wk2) : parser_kind (nz1 && nz2) (weak_kind_glb wk1 wk2) = LP.glb k1 k2 /// Parser: return inline_for_extraction noextract let ret_kind : parser_kind false WeakKindStrongPrefix = LPC.parse_ret_kind /// Parser: bind inline_for_extraction noextract let and_then_kind (#nz1:_) (k1:parser_kind nz1 WeakKindStrongPrefix) (#nz2:_) (#wk2: _) (k2:parser_kind nz2 wk2) : parser_kind (nz1 || nz2) wk2 = LPC.and_then_kind k1 k2 inline_for_extraction noextract let filter_kind (#nz:_) (#wk: _) (k:parser_kind nz wk) : parser_kind nz wk = LPC.parse_filter_kind k inline_for_extraction noextract let impos_kind : parser_kind true WeakKindStrongPrefix = LPC.(strong_parser_kind 1 1 (Some ParserKindMetadataFail)) /// Lists/arrays inline_for_extraction noextract let kind_nlist : parser_kind false WeakKindStrongPrefix = let open LP in { parser_kind_low = 0; parser_kind_high = None; parser_kind_subkind = Some ParserStrong; parser_kind_metadata = None } let kind_all_bytes : parser_kind false WeakKindConsumesAll = LowParse.Spec.Bytes.parse_all_bytes_kind let kind_t_at_most : parser_kind false WeakKindStrongPrefix = kind_nlist let kind_t_exact : parser_kind false WeakKindStrongPrefix = kind_nlist let parse_string_kind : parser_kind true WeakKindStrongPrefix = { LP.parser_kind_low = 1; LP.parser_kind_high = None; LP.parser_kind_subkind = Some LP.ParserStrong; LP.parser_kind_metadata = None; } let kind_all_zeros
false
false
EverParse3d.Kinds.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 2, "max_fuel": 0, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [ "smt.qi.eager_threshold=10" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val kind_all_zeros : parser_kind false WeakKindConsumesAll
[]
EverParse3d.Kinds.kind_all_zeros
{ "file_name": "src/3d/prelude/EverParse3d.Kinds.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
EverParse3d.Kinds.parser_kind false EverParse3d.Kinds.WeakKindConsumesAll
{ "end_col": 38, "end_line": 111, "start_col": 4, "start_line": 111 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let bytes = S.seq uint8
let bytes =
false
null
false
S.seq uint8
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "total" ]
[ "FStar.Seq.Base.seq", "Hacl.Streaming.Spec.uint8" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32
false
true
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val bytes : Type0
[]
Hacl.Streaming.Spec.bytes
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 23, "end_line": 54, "start_col": 12, "start_line": 54 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let uint32 = Lib.IntTypes.uint32
let uint32 =
false
null
false
Lib.IntTypes.uint32
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "total" ]
[ "Lib.IntTypes.uint32" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8
false
true
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val uint32 : Type0
[]
Hacl.Streaming.Spec.uint32
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 32, "end_line": 51, "start_col": 13, "start_line": 51 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let uint8 = Lib.IntTypes.uint8
let uint8 =
false
null
false
Lib.IntTypes.uint8
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "total" ]
[ "Lib.IntTypes.uint8" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul
false
true
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val uint8 : Type0
[]
Hacl.Streaming.Spec.uint8
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 30, "end_line": 48, "start_col": 12, "start_line": 48 }
FStar.Pervasives.Lemma
val split_at_last_init (#index: _) (c: block index) (i: index) (b: bytes) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures (let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_init #index (c: block index) (i: index) (b: bytes) : Lemma (requires ( let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures ( let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b)) = let l = U32.v (c.blocks_state_len i) in FStar.Math.Lemmas.multiple_modulo_lemma 0 l; split_at_last_spec c i b S.empty b
val split_at_last_init (#index: _) (c: block index) (i: index) (b: bytes) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures (let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b)) let split_at_last_init #index (c: block index) (i: index) (b: bytes) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures (let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b)) =
false
null
true
let l = U32.v (c.blocks_state_len i) in FStar.Math.Lemmas.multiple_modulo_lemma 0 l; split_at_last_spec c i b S.empty b
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Hacl.Streaming.Interface.block", "Hacl.Streaming.Spec.bytes", "Hacl.Streaming.Spec.split_at_last_spec", "FStar.Seq.Base.empty", "Hacl.Streaming.Spec.uint8", "Prims.unit", "FStar.Math.Lemmas.multiple_modulo_lemma", "FStar.UInt.uint_t", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "Prims.b2t", "Prims.op_LessThanOrEqual", "FStar.Seq.Base.length", "Prims.squash", "Prims.l_and", "FStar.Seq.Base.equal", "FStar.Pervasives.Native.tuple2", "Hacl.Streaming.Spec.split_at_last", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest #pop-options /// The following lemmas characterize [split_at_last] with conditions which are easy to /// reason about, and is very useful for the various lemmas in this file which /// prove properties about how to update the internal buffer so that its content /// is actually the correct remainder of the data seen so far. /// This first auxiliary lemma only manipulates the lengths of the sequences. #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest #pop-options /// This second lemma is the one we will use #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_spec #index (c: block index) (i: index) (b blocks rest: bytes): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` Seq.append blocks rest))) (ensures ( (blocks, rest) == split_at_last c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec l b blocks rest #pop-options /// For the initialization of the streaming state. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_init #index (c: block index) (i: index) (b: bytes) : Lemma (requires ( let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures ( let blocks, rest = split_at_last c i b in
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false" ], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_init (#index: _) (c: block index) (i: index) (b: bytes) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures (let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b))
[]
Hacl.Streaming.Spec.split_at_last_init
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Hacl.Streaming.Spec.bytes -> FStar.Pervasives.Lemma (requires (let l = FStar.UInt32.v (Block?.blocks_state_len c i) in FStar.Seq.Base.length b <= l)) (ensures (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks rest = _ in FStar.Seq.Base.equal blocks FStar.Seq.Base.empty /\ FStar.Seq.Base.equal rest b) <: Type0))
{ "end_col": 36, "end_line": 188, "start_col": 1, "start_line": 185 }
FStar.Pervasives.Lemma
val split_at_last_num_blocks_spec (#index: _) (c: block index) (i: index) (b n rest: nat) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest
val split_at_last_num_blocks_spec (#index: _) (c: block index) (i: index) (b n rest: nat) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b: nat) (n: nat) (rest: nat) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) =
false
null
true
let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Hacl.Streaming.Interface.block", "Prims.nat", "Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec", "FStar.UInt.uint_t", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "Prims.unit", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.l_imp", "Prims.op_Equality", "Prims.int", "Prims.op_Addition", "FStar.Mul.op_Star", "Prims.squash", "Hacl.Streaming.Spec.split_at_last_num_blocks", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest #pop-options /// The following lemmas characterize [split_at_last] with conditions which are easy to /// reason about, and is very useful for the various lemmas in this file which /// prove properties about how to update the internal buffer so that its content /// is actually the correct remainder of the data seen so far. /// This first auxiliary lemma only manipulates the lengths of the sequences. #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false" ], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_num_blocks_spec (#index: _) (c: block index) (i: index) (b n rest: nat) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b))
[]
Hacl.Streaming.Spec.split_at_last_num_blocks_spec
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Prims.nat -> n: Prims.nat -> rest: Prims.nat -> FStar.Pervasives.Lemma (requires (let l = FStar.UInt32.v (Block?.blocks_state_len c i) in rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest)) (ensures n = Hacl.Streaming.Spec.split_at_last_num_blocks c i b)
{ "end_col": 66, "end_line": 154, "start_col": 50, "start_line": 152 }
FStar.Pervasives.Lemma
val split_at_last_spec (#index: _) (c: block index) (i: index) (b blocks rest: bytes) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` (Seq.append blocks rest)))) (ensures ((blocks, rest) == split_at_last c i b))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_spec #index (c: block index) (i: index) (b blocks rest: bytes): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` Seq.append blocks rest))) (ensures ( (blocks, rest) == split_at_last c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec l b blocks rest
val split_at_last_spec (#index: _) (c: block index) (i: index) (b blocks rest: bytes) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` (Seq.append blocks rest)))) (ensures ((blocks, rest) == split_at_last c i b)) let split_at_last_spec #index (c: block index) (i: index) (b: bytes) (blocks: bytes) (rest: bytes) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` (Seq.append blocks rest)))) (ensures ((blocks, rest) == split_at_last c i b)) =
false
null
true
let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec l b blocks rest
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Hacl.Streaming.Interface.block", "Hacl.Streaming.Spec.bytes", "Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec", "FStar.UInt.uint_t", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "Prims.unit", "Prims.l_and", "Prims.b2t", "Prims.op_Equality", "Prims.int", "Prims.op_Modulus", "FStar.Seq.Base.length", "Hacl.Streaming.Spec.uint8", "Prims.op_LessThanOrEqual", "Prims.l_imp", "FStar.Seq.Base.equal", "FStar.Seq.Base.append", "Prims.squash", "Prims.eq2", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.Mktuple2", "Hacl.Streaming.Spec.split_at_last", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest #pop-options /// The following lemmas characterize [split_at_last] with conditions which are easy to /// reason about, and is very useful for the various lemmas in this file which /// prove properties about how to update the internal buffer so that its content /// is actually the correct remainder of the data seen so far. /// This first auxiliary lemma only manipulates the lengths of the sequences. #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest #pop-options /// This second lemma is the one we will use #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_spec #index (c: block index) (i: index) (b blocks rest: bytes): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` Seq.append blocks rest)))
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false" ], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_spec (#index: _) (c: block index) (i: index) (b blocks rest: bytes) : Lemma (requires (let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` (Seq.append blocks rest)))) (ensures ((blocks, rest) == split_at_last c i b))
[]
Hacl.Streaming.Spec.split_at_last_spec
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Hacl.Streaming.Spec.bytes -> blocks: Hacl.Streaming.Spec.bytes -> rest: Hacl.Streaming.Spec.bytes -> FStar.Pervasives.Lemma (requires (let l = FStar.UInt32.v (Block?.blocks_state_len c i) in FStar.Seq.Base.length blocks % l = 0 /\ FStar.Seq.Base.length rest <= l /\ (FStar.Seq.Base.length rest = 0 ==> FStar.Seq.Base.length b = 0) /\ FStar.Seq.Base.equal b (FStar.Seq.Base.append blocks rest))) (ensures FStar.Pervasives.Native.Mktuple2 blocks rest == Hacl.Streaming.Spec.split_at_last c i b)
{ "end_col": 64, "end_line": 172, "start_col": 46, "start_line": 170 }
FStar.Pervasives.Lemma
val split_at_last_small_exact_empty_internal (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest'))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_small_exact_empty_internal #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in (* The proof is trivial because [b] is empty *) assert(b `Seq.equal` Seq.empty); assert(S.append b d `Seq.equal` d); assert(S.append rest d `Seq.equal` d)
val split_at_last_small_exact_empty_internal (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) let split_at_last_small_exact_empty_internal #index (c: block index) (i: index) (b: bytes) (d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) =
false
null
true
let blocks, rest = split_at_last c i b in assert (b `Seq.equal` Seq.empty); assert ((S.append b d) `Seq.equal` d); assert ((S.append rest d) `Seq.equal` d)
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Hacl.Streaming.Interface.block", "Hacl.Streaming.Spec.bytes", "Prims._assert", "FStar.Seq.Base.equal", "Hacl.Streaming.Spec.uint8", "FStar.Seq.Base.append", "Prims.unit", "FStar.Seq.Base.empty", "FStar.Pervasives.Native.tuple2", "Hacl.Streaming.Spec.split_at_last", "Prims.l_and", "Prims.b2t", "Prims.op_Equality", "Prims.int", "Prims.op_Addition", "FStar.Seq.Base.length", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "Prims.squash", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest #pop-options /// The following lemmas characterize [split_at_last] with conditions which are easy to /// reason about, and is very useful for the various lemmas in this file which /// prove properties about how to update the internal buffer so that its content /// is actually the correct remainder of the data seen so far. /// This first auxiliary lemma only manipulates the lengths of the sequences. #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest #pop-options /// This second lemma is the one we will use #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_spec #index (c: block index) (i: index) (b blocks rest: bytes): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` Seq.append blocks rest))) (ensures ( (blocks, rest) == split_at_last c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec l b blocks rest #pop-options /// For the initialization of the streaming state. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_init #index (c: block index) (i: index) (b: bytes) : Lemma (requires ( let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures ( let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b)) = let l = U32.v (c.blocks_state_len i) in FStar.Math.Lemmas.multiple_modulo_lemma 0 l; split_at_last_spec c i b S.empty b #pop-options /// "Small" case: not enough data to obtain strictly more than a complete block, /// so it suffices to append the new input to the internal buffer. Note that we /// don't process the resulting buffer because we have to make sure there is always /// some data remaining in it (after the first call to update) so that [update_last] /// is called on non-empty data at the very end. /// /// There are many subcases that we prove in intermediate lemmas, until we can /// get the final [split_at_last_small] theorem. /// [b]: internal buffer /// [d]: data to append /// "Small" case: subcase 1: not enough data to obtain a complete block append the /// new input to the internal buffer. let split_at_last_small_strict #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in split_at_last_spec c i (S.append b d) blocks (S.append rest d) /// "Small" case: subcase 2: exactly enough data to obtain a complete block, and the /// internal buffer is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_internal #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false" ], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_small_exact_empty_internal (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest'))
[]
Hacl.Streaming.Spec.split_at_last_small_exact_empty_internal
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Hacl.Streaming.Spec.bytes -> d: Hacl.Streaming.Spec.bytes -> FStar.Pervasives.Lemma (requires (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ _ rest = _ in FStar.Seq.Base.length rest + FStar.Seq.Base.length d = FStar.UInt32.v (Block?.blocks_state_len c i) /\ FStar.Seq.Base.length rest = 0) <: Type0)) (ensures (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks rest = _ in let _ = Hacl.Streaming.Spec.split_at_last c i (FStar.Seq.Base.append b d) in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks' rest' = _ in FStar.Seq.Base.equal blocks blocks' /\ FStar.Seq.Base.equal (FStar.Seq.Base.append rest d) rest') <: Type0) <: Type0))
{ "end_col": 39, "end_line": 238, "start_col": 1, "start_line": 233 }
FStar.Pervasives.Lemma
val split_at_last_small_exact_empty_data (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length d = 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest'))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_small_exact_empty_data #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length d = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in assert(S.append rest d `S.equal` rest); assert(S.append b d `S.equal` b)
val split_at_last_small_exact_empty_data (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length d = 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) let split_at_last_small_exact_empty_data #index (c: block index) (i: index) (b: bytes) (d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length d = 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) =
false
null
true
let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in assert ((S.append rest d) `S.equal` rest); assert ((S.append b d) `S.equal` b)
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Hacl.Streaming.Interface.block", "Hacl.Streaming.Spec.bytes", "Prims._assert", "FStar.Seq.Base.equal", "Hacl.Streaming.Spec.uint8", "FStar.Seq.Base.append", "Prims.unit", "FStar.Pervasives.Native.tuple2", "Hacl.Streaming.Spec.split_at_last", "Prims.l_and", "Prims.b2t", "Prims.op_Equality", "Prims.int", "Prims.op_Addition", "FStar.Seq.Base.length", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "Prims.squash", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest #pop-options /// The following lemmas characterize [split_at_last] with conditions which are easy to /// reason about, and is very useful for the various lemmas in this file which /// prove properties about how to update the internal buffer so that its content /// is actually the correct remainder of the data seen so far. /// This first auxiliary lemma only manipulates the lengths of the sequences. #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest #pop-options /// This second lemma is the one we will use #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_spec #index (c: block index) (i: index) (b blocks rest: bytes): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` Seq.append blocks rest))) (ensures ( (blocks, rest) == split_at_last c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec l b blocks rest #pop-options /// For the initialization of the streaming state. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_init #index (c: block index) (i: index) (b: bytes) : Lemma (requires ( let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures ( let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b)) = let l = U32.v (c.blocks_state_len i) in FStar.Math.Lemmas.multiple_modulo_lemma 0 l; split_at_last_spec c i b S.empty b #pop-options /// "Small" case: not enough data to obtain strictly more than a complete block, /// so it suffices to append the new input to the internal buffer. Note that we /// don't process the resulting buffer because we have to make sure there is always /// some data remaining in it (after the first call to update) so that [update_last] /// is called on non-empty data at the very end. /// /// There are many subcases that we prove in intermediate lemmas, until we can /// get the final [split_at_last_small] theorem. /// [b]: internal buffer /// [d]: data to append /// "Small" case: subcase 1: not enough data to obtain a complete block append the /// new input to the internal buffer. let split_at_last_small_strict #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in split_at_last_spec c i (S.append b d) blocks (S.append rest d) /// "Small" case: subcase 2: exactly enough data to obtain a complete block, and the /// internal buffer is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_internal #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in (* The proof is trivial because [b] is empty *) assert(b `Seq.equal` Seq.empty); assert(S.append b d `Seq.equal` d); assert(S.append rest d `Seq.equal` d) #pop-options /// "Small" case 3: exactly enough data to obtain a complete block, and the data to /// add is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_data #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length d = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false" ], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_small_exact_empty_data (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length d = 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest'))
[]
Hacl.Streaming.Spec.split_at_last_small_exact_empty_data
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Hacl.Streaming.Spec.bytes -> d: Hacl.Streaming.Spec.bytes -> FStar.Pervasives.Lemma (requires (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ _ rest = _ in FStar.Seq.Base.length rest + FStar.Seq.Base.length d = FStar.UInt32.v (Block?.blocks_state_len c i) /\ FStar.Seq.Base.length d = 0) <: Type0)) (ensures (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks rest = _ in let _ = Hacl.Streaming.Spec.split_at_last c i (FStar.Seq.Base.append b d) in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks' rest' = _ in FStar.Seq.Base.equal blocks blocks' /\ FStar.Seq.Base.equal (FStar.Seq.Base.append rest d) rest') <: Type0) <: Type0))
{ "end_col": 34, "end_line": 260, "start_col": 1, "start_line": 256 }
FStar.Pervasives.Lemma
val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0)
val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c =
false
null
true
let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert (a = b * (a / b)); assert (b = c * (b / c)); assert (a = (c * (b / c)) * (a / (c * (b / c)))); assert (a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert (a % c = 0)
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Prims.nat", "Prims.pos", "Prims._assert", "Prims.b2t", "Prims.op_Equality", "Prims.int", "Prims.op_Modulus", "Prims.unit", "FStar.Math.Lemmas.cancel_mul_mod", "FStar.Mul.op_Star", "Prims.op_Division", "FStar.Math.Lemmas.div_exact_r" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0))
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0))
[]
Hacl.Streaming.Spec.mod_trans_lem
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Prims.nat -> b: Prims.pos -> c: Prims.pos -> FStar.Pervasives.Lemma (requires a % b = 0 /\ b % c = 0) (ensures a % c = 0)
{ "end_col": 19, "end_line": 72, "start_col": 2, "start_line": 62 }
FStar.Pervasives.Lemma
val split_at_last_small_exact (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest > 0 /\ S.length d > 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest'))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_small_exact #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest > 0 /\ S.length d > 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in let n = S.length blocks / l in assert(S.length blocks % l = 0); (* comes from the spec of [split_at_last] *) assert(S.length (S.append rest d) = l); assert((S.append b d) `Seq.equal` Seq.append blocks (Seq.append rest d)); split_at_last_spec c i (S.append b d) blocks (S.append rest d)
val split_at_last_small_exact (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest > 0 /\ S.length d > 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) let split_at_last_small_exact #index (c: block index) (i: index) (b: bytes) (d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest > 0 /\ S.length d > 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) =
false
null
true
let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in let n = S.length blocks / l in assert (S.length blocks % l = 0); assert (S.length (S.append rest d) = l); assert ((S.append b d) `Seq.equal` (Seq.append blocks (Seq.append rest d))); split_at_last_spec c i (S.append b d) blocks (S.append rest d)
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Hacl.Streaming.Interface.block", "Hacl.Streaming.Spec.bytes", "Hacl.Streaming.Spec.split_at_last_spec", "FStar.Seq.Base.append", "Hacl.Streaming.Spec.uint8", "Prims.unit", "Prims._assert", "FStar.Seq.Base.equal", "Prims.b2t", "Prims.op_Equality", "Prims.int", "Prims.l_or", "FStar.UInt.size", "FStar.UInt32.n", "Prims.op_GreaterThanOrEqual", "FStar.Seq.Base.length", "Prims.op_Modulus", "Prims.op_Division", "FStar.UInt.uint_t", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "FStar.Pervasives.Native.tuple2", "Hacl.Streaming.Spec.split_at_last", "Prims.l_and", "Prims.op_Addition", "Prims.op_GreaterThan", "Prims.squash", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest #pop-options /// The following lemmas characterize [split_at_last] with conditions which are easy to /// reason about, and is very useful for the various lemmas in this file which /// prove properties about how to update the internal buffer so that its content /// is actually the correct remainder of the data seen so far. /// This first auxiliary lemma only manipulates the lengths of the sequences. #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest #pop-options /// This second lemma is the one we will use #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_spec #index (c: block index) (i: index) (b blocks rest: bytes): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` Seq.append blocks rest))) (ensures ( (blocks, rest) == split_at_last c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec l b blocks rest #pop-options /// For the initialization of the streaming state. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_init #index (c: block index) (i: index) (b: bytes) : Lemma (requires ( let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures ( let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b)) = let l = U32.v (c.blocks_state_len i) in FStar.Math.Lemmas.multiple_modulo_lemma 0 l; split_at_last_spec c i b S.empty b #pop-options /// "Small" case: not enough data to obtain strictly more than a complete block, /// so it suffices to append the new input to the internal buffer. Note that we /// don't process the resulting buffer because we have to make sure there is always /// some data remaining in it (after the first call to update) so that [update_last] /// is called on non-empty data at the very end. /// /// There are many subcases that we prove in intermediate lemmas, until we can /// get the final [split_at_last_small] theorem. /// [b]: internal buffer /// [d]: data to append /// "Small" case: subcase 1: not enough data to obtain a complete block append the /// new input to the internal buffer. let split_at_last_small_strict #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in split_at_last_spec c i (S.append b d) blocks (S.append rest d) /// "Small" case: subcase 2: exactly enough data to obtain a complete block, and the /// internal buffer is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_internal #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in (* The proof is trivial because [b] is empty *) assert(b `Seq.equal` Seq.empty); assert(S.append b d `Seq.equal` d); assert(S.append rest d `Seq.equal` d) #pop-options /// "Small" case 3: exactly enough data to obtain a complete block, and the data to /// add is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_data #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length d = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in assert(S.append rest d `S.equal` rest); assert(S.append b d `S.equal` b) #pop-options /// "Small" case 4: exactly enough data to obtain a complete block, the internal /// buffer is not empty and the data to add is not empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest > 0 /\ S.length d > 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false" ], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_small_exact (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest > 0 /\ S.length d > 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest'))
[]
Hacl.Streaming.Spec.split_at_last_small_exact
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Hacl.Streaming.Spec.bytes -> d: Hacl.Streaming.Spec.bytes -> FStar.Pervasives.Lemma (requires (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ _ rest = _ in FStar.Seq.Base.length rest + FStar.Seq.Base.length d = FStar.UInt32.v (Block?.blocks_state_len c i) /\ FStar.Seq.Base.length rest > 0 /\ FStar.Seq.Base.length d > 0) <: Type0)) (ensures (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks rest = _ in let _ = Hacl.Streaming.Spec.split_at_last c i (FStar.Seq.Base.append b d) in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks' rest' = _ in FStar.Seq.Base.equal blocks blocks' /\ FStar.Seq.Base.equal (FStar.Seq.Base.append rest d) rest') <: Type0) <: Type0))
{ "end_col": 64, "end_line": 285, "start_col": 1, "start_line": 276 }
FStar.Pervasives.Lemma
val split_at_last_small (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d <= U32.v (c.blocks_state_len i))) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest'))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_small #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d <= U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in if S.length rest + S.length d < l then split_at_last_small_strict c i b d else if S.length rest = 0 then split_at_last_small_exact_empty_internal c i b d else if S.length d = 0 then split_at_last_small_exact_empty_data c i b d else split_at_last_small_exact c i b d
val split_at_last_small (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d <= U32.v (c.blocks_state_len i))) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) let split_at_last_small #index (c: block index) (i: index) (b: bytes) (d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d <= U32.v (c.blocks_state_len i))) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) =
false
null
true
let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in if S.length rest + S.length d < l then split_at_last_small_strict c i b d else if S.length rest = 0 then split_at_last_small_exact_empty_internal c i b d else if S.length d = 0 then split_at_last_small_exact_empty_data c i b d else split_at_last_small_exact c i b d
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Hacl.Streaming.Interface.block", "Hacl.Streaming.Spec.bytes", "Prims.op_LessThan", "Prims.op_Addition", "FStar.Seq.Base.length", "Hacl.Streaming.Spec.uint8", "Hacl.Streaming.Spec.split_at_last_small_strict", "Prims.bool", "Prims.op_Equality", "Prims.int", "Hacl.Streaming.Spec.split_at_last_small_exact_empty_internal", "Hacl.Streaming.Spec.split_at_last_small_exact_empty_data", "Hacl.Streaming.Spec.split_at_last_small_exact", "Prims.unit", "FStar.UInt.uint_t", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "FStar.Pervasives.Native.tuple2", "Hacl.Streaming.Spec.split_at_last", "FStar.Seq.Base.append", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.squash", "Prims.l_and", "FStar.Seq.Base.equal", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest #pop-options /// The following lemmas characterize [split_at_last] with conditions which are easy to /// reason about, and is very useful for the various lemmas in this file which /// prove properties about how to update the internal buffer so that its content /// is actually the correct remainder of the data seen so far. /// This first auxiliary lemma only manipulates the lengths of the sequences. #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest #pop-options /// This second lemma is the one we will use #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_spec #index (c: block index) (i: index) (b blocks rest: bytes): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` Seq.append blocks rest))) (ensures ( (blocks, rest) == split_at_last c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec l b blocks rest #pop-options /// For the initialization of the streaming state. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_init #index (c: block index) (i: index) (b: bytes) : Lemma (requires ( let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures ( let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b)) = let l = U32.v (c.blocks_state_len i) in FStar.Math.Lemmas.multiple_modulo_lemma 0 l; split_at_last_spec c i b S.empty b #pop-options /// "Small" case: not enough data to obtain strictly more than a complete block, /// so it suffices to append the new input to the internal buffer. Note that we /// don't process the resulting buffer because we have to make sure there is always /// some data remaining in it (after the first call to update) so that [update_last] /// is called on non-empty data at the very end. /// /// There are many subcases that we prove in intermediate lemmas, until we can /// get the final [split_at_last_small] theorem. /// [b]: internal buffer /// [d]: data to append /// "Small" case: subcase 1: not enough data to obtain a complete block append the /// new input to the internal buffer. let split_at_last_small_strict #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in split_at_last_spec c i (S.append b d) blocks (S.append rest d) /// "Small" case: subcase 2: exactly enough data to obtain a complete block, and the /// internal buffer is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_internal #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in (* The proof is trivial because [b] is empty *) assert(b `Seq.equal` Seq.empty); assert(S.append b d `Seq.equal` d); assert(S.append rest d `Seq.equal` d) #pop-options /// "Small" case 3: exactly enough data to obtain a complete block, and the data to /// add is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_data #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length d = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in assert(S.append rest d `S.equal` rest); assert(S.append b d `S.equal` b) #pop-options /// "Small" case 4: exactly enough data to obtain a complete block, the internal /// buffer is not empty and the data to add is not empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest > 0 /\ S.length d > 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in let n = S.length blocks / l in assert(S.length blocks % l = 0); (* comes from the spec of [split_at_last] *) assert(S.length (S.append rest d) = l); assert((S.append b d) `Seq.equal` Seq.append blocks (Seq.append rest d)); split_at_last_spec c i (S.append b d) blocks (S.append rest d) #pop-options /// "Small" case: final theorem: not enough data to obtain strictly more than a /// complete block, so it suffices to append the new input to the internal buffer. let split_at_last_small #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d <= U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_small (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d <= U32.v (c.blocks_state_len i))) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest'))
[]
Hacl.Streaming.Spec.split_at_last_small
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Hacl.Streaming.Spec.bytes -> d: Hacl.Streaming.Spec.bytes -> FStar.Pervasives.Lemma (requires (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ _ rest = _ in FStar.Seq.Base.length rest + FStar.Seq.Base.length d <= FStar.UInt32.v (Block?.blocks_state_len c i)) <: Type0)) (ensures (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks rest = _ in let _ = Hacl.Streaming.Spec.split_at_last c i (FStar.Seq.Base.append b d) in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks' rest' = _ in FStar.Seq.Base.equal blocks blocks' /\ FStar.Seq.Base.equal (FStar.Seq.Base.append rest d) rest') <: Type0) <: Type0))
{ "end_col": 40, "end_line": 310, "start_col": 1, "start_line": 299 }
FStar.Pervasives.Lemma
val split_at_last_small_strict (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest'))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_small_strict #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in split_at_last_spec c i (S.append b d) blocks (S.append rest d)
val split_at_last_small_strict (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) let split_at_last_small_strict #index (c: block index) (i: index) (b: bytes) (d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) =
false
null
true
let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in split_at_last_spec c i (S.append b d) blocks (S.append rest d)
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Hacl.Streaming.Interface.block", "Hacl.Streaming.Spec.bytes", "Hacl.Streaming.Spec.split_at_last_spec", "FStar.Seq.Base.append", "Hacl.Streaming.Spec.uint8", "FStar.UInt.uint_t", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "Prims.unit", "FStar.Pervasives.Native.tuple2", "Hacl.Streaming.Spec.split_at_last", "Prims.b2t", "Prims.op_LessThan", "Prims.op_Addition", "FStar.Seq.Base.length", "Prims.squash", "Prims.l_and", "FStar.Seq.Base.equal", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest #pop-options /// The following lemmas characterize [split_at_last] with conditions which are easy to /// reason about, and is very useful for the various lemmas in this file which /// prove properties about how to update the internal buffer so that its content /// is actually the correct remainder of the data seen so far. /// This first auxiliary lemma only manipulates the lengths of the sequences. #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest #pop-options /// This second lemma is the one we will use #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_spec #index (c: block index) (i: index) (b blocks rest: bytes): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` Seq.append blocks rest))) (ensures ( (blocks, rest) == split_at_last c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec l b blocks rest #pop-options /// For the initialization of the streaming state. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_init #index (c: block index) (i: index) (b: bytes) : Lemma (requires ( let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures ( let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b)) = let l = U32.v (c.blocks_state_len i) in FStar.Math.Lemmas.multiple_modulo_lemma 0 l; split_at_last_spec c i b S.empty b #pop-options /// "Small" case: not enough data to obtain strictly more than a complete block, /// so it suffices to append the new input to the internal buffer. Note that we /// don't process the resulting buffer because we have to make sure there is always /// some data remaining in it (after the first call to update) so that [update_last] /// is called on non-empty data at the very end. /// /// There are many subcases that we prove in intermediate lemmas, until we can /// get the final [split_at_last_small] theorem. /// [b]: internal buffer /// [d]: data to append /// "Small" case: subcase 1: not enough data to obtain a complete block append the /// new input to the internal buffer. let split_at_last_small_strict #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_small_strict (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest'))
[]
Hacl.Streaming.Spec.split_at_last_small_strict
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Hacl.Streaming.Spec.bytes -> d: Hacl.Streaming.Spec.bytes -> FStar.Pervasives.Lemma (requires (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ _ rest = _ in FStar.Seq.Base.length rest + FStar.Seq.Base.length d < FStar.UInt32.v (Block?.blocks_state_len c i)) <: Type0)) (ensures (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks rest = _ in let _ = Hacl.Streaming.Spec.split_at_last c i (FStar.Seq.Base.append b d) in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks' rest' = _ in FStar.Seq.Base.equal blocks blocks' /\ FStar.Seq.Base.equal (FStar.Seq.Base.append rest d) rest') <: Type0) <: Type0))
{ "end_col": 64, "end_line": 217, "start_col": 1, "start_line": 213 }
Prims.Pure
val split_at_last (#index: _) (c: block index) (i: index) (b: bytes) : Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest
val split_at_last (#index: _) (c: block index) (i: index) (b: bytes) : Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks)) let split_at_last #index (c: block index) (i: index) (b: bytes) : Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks)) =
false
null
false
let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in (let l = U32.v (c.blocks_state_len i) in let blocks = S.length blocks in mod_trans_lem blocks l (U32.v (c.block_len i))); blocks, rest
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[]
[ "Hacl.Streaming.Interface.block", "Hacl.Streaming.Spec.bytes", "FStar.Seq.Base.seq", "Lib.UpdateMulti.uint8", "FStar.Pervasives.Native.Mktuple2", "Prims.unit", "Hacl.Streaming.Spec.mod_trans_lem", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__block_len", "Prims.nat", "FStar.Seq.Base.length", "FStar.UInt.uint_t", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "FStar.Pervasives.Native.tuple2", "Lib.UpdateMulti.split_at_last_lazy", "Prims.l_True", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Hacl.Streaming.Spec.uint8", "Prims.op_Equality", "Prims.int", "Prims.op_Modulus", "Prims.l_or", "Prims.op_GreaterThanOrEqual", "FStar.UInt.size", "FStar.UInt32.n", "Prims.l_iff", "Prims.eq2", "FStar.Mul.op_Star", "Prims.op_Subtraction", "Prims.op_Division", "Prims.op_GreaterThan", "Prims.op_LessThan", "Prims.op_disEquality", "FStar.Seq.Base.equal", "FStar.Seq.Base.append" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false" ], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last (#index: _) (c: block index) (i: index) (b: bytes) : Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks))
[]
Hacl.Streaming.Spec.split_at_last
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Hacl.Streaming.Spec.bytes -> Prims.Pure (Hacl.Streaming.Spec.bytes * Hacl.Streaming.Spec.bytes)
{ "end_col": 14, "end_line": 135, "start_col": 1, "start_line": 127 }
Prims.Pure
val split_at_last_num_blocks (#index: _) (c: block index) (i: index) (b: nat) : Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n
val split_at_last_num_blocks (#index: _) (c: block index) (i: index) (b: nat) : Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat) : Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) =
false
null
false
let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in (let l = U32.v (c.blocks_state_len i) in let blocks = n * l in Math.Lemmas.nat_times_nat_is_nat n l; mod_trans_lem blocks l (U32.v (c.block_len i))); n
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[]
[ "Hacl.Streaming.Interface.block", "Prims.nat", "Prims.unit", "Hacl.Streaming.Spec.mod_trans_lem", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__block_len", "FStar.Math.Lemmas.nat_times_nat_is_nat", "Prims.int", "FStar.Mul.op_Star", "FStar.UInt.uint_t", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "FStar.Pervasives.Native.fst", "Lib.UpdateMulti.split_at_last_lazy_nb_rem", "Prims.l_True", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_Equality", "Prims.op_Modulus", "Prims.l_or", "Prims.l_iff", "Prims.eq2", "Prims.op_Subtraction", "Prims.op_Division", "Prims.op_GreaterThan", "Prims.op_LessThan", "Prims.op_disEquality" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false" ], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_num_blocks (#index: _) (c: block index) (i: index) (b: nat) : Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks))
[]
Hacl.Streaming.Spec.split_at_last_num_blocks
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Prims.nat -> Prims.Pure Prims.nat
{ "end_col": 3, "end_line": 103, "start_col": 1, "start_line": 94 }
FStar.Pervasives.Lemma
val split_at_last_finish (#index: _) (c: block index) (i: index) (b: bytes) : Lemma (requires (True)) (ensures (let blocks, rest = split_at_last c i b in let bl = U32.v (c.block_len i) in let blocks', rest' = Lib.UpdateMulti.split_at_last_lazy bl rest in let blocks'', rest'' = Lib.UpdateMulti.split_at_last_lazy bl b in S.equal blocks'' (S.append blocks blocks') /\ S.equal rest' rest''))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_finish #index (c: block index) (i: index) (b: bytes) : Lemma (requires (True)) (ensures ( let blocks, rest = split_at_last c i b in // Pay attention here: we use c.block_len and not c.blocks_state_len let bl = U32.v (c.block_len i) in let blocks', rest' = Lib.UpdateMulti.split_at_last_lazy bl rest in let blocks'', rest'' = Lib.UpdateMulti.split_at_last_lazy bl b in S.equal blocks'' (S.append blocks blocks') /\ S.equal rest' rest'')) = let blocks, rest = split_at_last c i b in // Pay attention here: we use c.block_len and not c.blocks_state_len let bl = U32.v (c.block_len i) in let nbl = U32.v (c.blocks_state_len i) in let blocks', rest' = Lib.UpdateMulti.split_at_last_lazy bl rest in // let blocks'', rest'' = Lib.UpdateMulti.split_at_last_lazy bl b in let processed' = S.append blocks blocks' in // Condition 1: S.length processed' % bl = 0 mod_trans_lem (S.length blocks) nbl bl; assert(S.length blocks % bl = 0); assert(S.length blocks' % bl = 0); Math.Lemmas.modulo_distributivity (S.length blocks) (S.length blocks') bl; assert(S.length processed' = S.length blocks + S.length blocks'); Math.Lemmas.modulo_lemma 0 bl; assert(0 % bl = 0); assert(S.length processed' % bl = 0); // Conditions 2 and 3 assert(S.length rest' <= bl); assert(S.length rest' = 0 ==> S.length processed' = 0); // Characterization lemma Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec bl b processed' rest'
val split_at_last_finish (#index: _) (c: block index) (i: index) (b: bytes) : Lemma (requires (True)) (ensures (let blocks, rest = split_at_last c i b in let bl = U32.v (c.block_len i) in let blocks', rest' = Lib.UpdateMulti.split_at_last_lazy bl rest in let blocks'', rest'' = Lib.UpdateMulti.split_at_last_lazy bl b in S.equal blocks'' (S.append blocks blocks') /\ S.equal rest' rest'')) let split_at_last_finish #index (c: block index) (i: index) (b: bytes) : Lemma (requires (True)) (ensures (let blocks, rest = split_at_last c i b in let bl = U32.v (c.block_len i) in let blocks', rest' = Lib.UpdateMulti.split_at_last_lazy bl rest in let blocks'', rest'' = Lib.UpdateMulti.split_at_last_lazy bl b in S.equal blocks'' (S.append blocks blocks') /\ S.equal rest' rest'')) =
false
null
true
let blocks, rest = split_at_last c i b in let bl = U32.v (c.block_len i) in let nbl = U32.v (c.blocks_state_len i) in let blocks', rest' = Lib.UpdateMulti.split_at_last_lazy bl rest in let processed' = S.append blocks blocks' in mod_trans_lem (S.length blocks) nbl bl; assert (S.length blocks % bl = 0); assert (S.length blocks' % bl = 0); Math.Lemmas.modulo_distributivity (S.length blocks) (S.length blocks') bl; assert (S.length processed' = S.length blocks + S.length blocks'); Math.Lemmas.modulo_lemma 0 bl; assert (0 % bl = 0); assert (S.length processed' % bl = 0); assert (S.length rest' <= bl); assert (S.length rest' = 0 ==> S.length processed' = 0); Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec bl b processed' rest'
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Hacl.Streaming.Interface.block", "Hacl.Streaming.Spec.bytes", "FStar.Seq.Base.seq", "Lib.UpdateMulti.uint8", "Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec", "Prims.unit", "Prims._assert", "Prims.l_imp", "Prims.b2t", "Prims.op_Equality", "Prims.int", "FStar.Seq.Base.length", "Hacl.Streaming.Spec.uint8", "Prims.op_LessThanOrEqual", "Prims.op_Modulus", "FStar.Math.Lemmas.modulo_lemma", "Prims.op_Addition", "FStar.Math.Lemmas.modulo_distributivity", "Hacl.Streaming.Spec.mod_trans_lem", "FStar.Seq.Base.append", "FStar.Pervasives.Native.tuple2", "Lib.UpdateMulti.split_at_last_lazy", "FStar.UInt.uint_t", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "Hacl.Streaming.Interface.__proj__Block__item__block_len", "Hacl.Streaming.Spec.split_at_last", "Prims.l_True", "Prims.squash", "Prims.l_and", "FStar.Seq.Base.equal", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest #pop-options /// The following lemmas characterize [split_at_last] with conditions which are easy to /// reason about, and is very useful for the various lemmas in this file which /// prove properties about how to update the internal buffer so that its content /// is actually the correct remainder of the data seen so far. /// This first auxiliary lemma only manipulates the lengths of the sequences. #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest #pop-options /// This second lemma is the one we will use #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_spec #index (c: block index) (i: index) (b blocks rest: bytes): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` Seq.append blocks rest))) (ensures ( (blocks, rest) == split_at_last c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec l b blocks rest #pop-options /// For the initialization of the streaming state. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_init #index (c: block index) (i: index) (b: bytes) : Lemma (requires ( let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures ( let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b)) = let l = U32.v (c.blocks_state_len i) in FStar.Math.Lemmas.multiple_modulo_lemma 0 l; split_at_last_spec c i b S.empty b #pop-options /// "Small" case: not enough data to obtain strictly more than a complete block, /// so it suffices to append the new input to the internal buffer. Note that we /// don't process the resulting buffer because we have to make sure there is always /// some data remaining in it (after the first call to update) so that [update_last] /// is called on non-empty data at the very end. /// /// There are many subcases that we prove in intermediate lemmas, until we can /// get the final [split_at_last_small] theorem. /// [b]: internal buffer /// [d]: data to append /// "Small" case: subcase 1: not enough data to obtain a complete block append the /// new input to the internal buffer. let split_at_last_small_strict #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in split_at_last_spec c i (S.append b d) blocks (S.append rest d) /// "Small" case: subcase 2: exactly enough data to obtain a complete block, and the /// internal buffer is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_internal #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in (* The proof is trivial because [b] is empty *) assert(b `Seq.equal` Seq.empty); assert(S.append b d `Seq.equal` d); assert(S.append rest d `Seq.equal` d) #pop-options /// "Small" case 3: exactly enough data to obtain a complete block, and the data to /// add is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_data #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length d = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in assert(S.append rest d `S.equal` rest); assert(S.append b d `S.equal` b) #pop-options /// "Small" case 4: exactly enough data to obtain a complete block, the internal /// buffer is not empty and the data to add is not empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest > 0 /\ S.length d > 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in let n = S.length blocks / l in assert(S.length blocks % l = 0); (* comes from the spec of [split_at_last] *) assert(S.length (S.append rest d) = l); assert((S.append b d) `Seq.equal` Seq.append blocks (Seq.append rest d)); split_at_last_spec c i (S.append b d) blocks (S.append rest d) #pop-options /// "Small" case: final theorem: not enough data to obtain strictly more than a /// complete block, so it suffices to append the new input to the internal buffer. let split_at_last_small #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d <= U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in if S.length rest + S.length d < l then split_at_last_small_strict c i b d else if S.length rest = 0 then split_at_last_small_exact_empty_internal c i b d else if S.length d = 0 then split_at_last_small_exact_empty_data c i b d else split_at_last_small_exact c i b d /// For the initialization of the streaming state. /// Second case: the data seen so far is empty or a multiple of the block size /// meaning that the internal buffer is either empty or full, and the data to /// append is not empty. This is a fast path: we can process the internal /// buffer if it is non-empty, then process blocks without touching at the buffer /// and finally copy the remaining data to the buffer. Of course, there must be /// data remaining in the buffer in the end, which is why the data to append /// musn't be empty. #push-options "--z3rlimit 100 --z3cliopt smt.arith.nl=false" let split_at_last_blocks #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let blocks, rest = split_at_last c i b in (S.length rest = 0 \/ S.length rest = U32.v (c.blocks_state_len i)) /\ S.length d > 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i d in let blocks'', rest'' = split_at_last c i (S.append b d) in S.equal blocks'' (S.append b blocks') /\ S.equal rest' rest'')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i d in let blocks'', rest'' = split_at_last c i (S.append b d) in let b' = S.append blocks rest in let d' = S.append blocks' rest' in let l = U32.v (c.blocks_state_len i) in (* We prove the non-trivial requirements of [split_at_last_spec] *) assert(S.length b % l = 0); Math.Lemmas.modulo_distributivity (S.length b) (S.length blocks') l; calc (==) { S.length (S.append b blocks') % l; (==) {} (S.length b + S.length blocks') % l; (==) { Math.Lemmas.modulo_distributivity (S.length b) (S.length blocks') l } ((S.length b % l) + (S.length blocks' % l)) % l; (==) {} 0 % l; (==) { Math.Lemmas.modulo_lemma 0 l } 0; }; (* End of proof *) split_at_last_spec c i (S.append b d) (S.append b blocks') rest' #pop-options /// Update last: /// We need to pay attention to the fact that update_last may only be able to take /// a block as input (and not more). This means that if the internal buffer is longer /// than a block (because we use a vectorized implementation) we need to: /// - process as many blocks as possible with update_multi /// - call update_last on the remaining block /// Also note that until now we used split_at_last to slice by using a length /// equal to a multiple of blocks. /// However, Hacl.Streaming.Interface.spec_is_incremental uses split_at_last /// with a slice length of exactly one block. #push-options "--z3rlimit 100 --z3cliopt smt.arith.nl=false" let split_at_last_finish #index (c: block index) (i: index) (b: bytes) : Lemma (requires (True)) (ensures ( let blocks, rest = split_at_last c i b in // Pay attention here: we use c.block_len and not c.blocks_state_len let bl = U32.v (c.block_len i) in let blocks', rest' = Lib.UpdateMulti.split_at_last_lazy bl rest in let blocks'', rest'' = Lib.UpdateMulti.split_at_last_lazy bl b in S.equal blocks'' (S.append blocks blocks') /\
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false" ], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_finish (#index: _) (c: block index) (i: index) (b: bytes) : Lemma (requires (True)) (ensures (let blocks, rest = split_at_last c i b in let bl = U32.v (c.block_len i) in let blocks', rest' = Lib.UpdateMulti.split_at_last_lazy bl rest in let blocks'', rest'' = Lib.UpdateMulti.split_at_last_lazy bl b in S.equal blocks'' (S.append blocks blocks') /\ S.equal rest' rest''))
[]
Hacl.Streaming.Spec.split_at_last_finish
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Hacl.Streaming.Spec.bytes -> FStar.Pervasives.Lemma (ensures (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks rest = _ in let bl = FStar.UInt32.v (Block?.block_len c i) in let _ = Lib.UpdateMulti.split_at_last_lazy bl rest in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks' rest' = _ in let _ = Lib.UpdateMulti.split_at_last_lazy bl b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks'' rest'' = _ in FStar.Seq.Base.equal blocks'' (FStar.Seq.Base.append blocks blocks') /\ FStar.Seq.Base.equal rest' rest'') <: Type0) <: Type0) <: Type0))
{ "end_col": 70, "end_line": 408, "start_col": 1, "start_line": 383 }
FStar.Pervasives.Lemma
val split_at_last_blocks (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let blocks, rest = split_at_last c i b in (S.length rest = 0 \/ S.length rest = U32.v (c.blocks_state_len i)) /\ S.length d > 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i d in let blocks'', rest'' = split_at_last c i (S.append b d) in S.equal blocks'' (S.append b blocks') /\ S.equal rest' rest''))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming.Interface", "short_module": null }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "S" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "Hacl.Streaming", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let split_at_last_blocks #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let blocks, rest = split_at_last c i b in (S.length rest = 0 \/ S.length rest = U32.v (c.blocks_state_len i)) /\ S.length d > 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i d in let blocks'', rest'' = split_at_last c i (S.append b d) in S.equal blocks'' (S.append b blocks') /\ S.equal rest' rest'')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i d in let blocks'', rest'' = split_at_last c i (S.append b d) in let b' = S.append blocks rest in let d' = S.append blocks' rest' in let l = U32.v (c.blocks_state_len i) in (* We prove the non-trivial requirements of [split_at_last_spec] *) assert(S.length b % l = 0); Math.Lemmas.modulo_distributivity (S.length b) (S.length blocks') l; calc (==) { S.length (S.append b blocks') % l; (==) {} (S.length b + S.length blocks') % l; (==) { Math.Lemmas.modulo_distributivity (S.length b) (S.length blocks') l } ((S.length b % l) + (S.length blocks' % l)) % l; (==) {} 0 % l; (==) { Math.Lemmas.modulo_lemma 0 l } 0; }; (* End of proof *) split_at_last_spec c i (S.append b d) (S.append b blocks') rest'
val split_at_last_blocks (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let blocks, rest = split_at_last c i b in (S.length rest = 0 \/ S.length rest = U32.v (c.blocks_state_len i)) /\ S.length d > 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i d in let blocks'', rest'' = split_at_last c i (S.append b d) in S.equal blocks'' (S.append b blocks') /\ S.equal rest' rest'')) let split_at_last_blocks #index (c: block index) (i: index) (b: bytes) (d: bytes) : Lemma (requires (let blocks, rest = split_at_last c i b in (S.length rest = 0 \/ S.length rest = U32.v (c.blocks_state_len i)) /\ S.length d > 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i d in let blocks'', rest'' = split_at_last c i (S.append b d) in S.equal blocks'' (S.append b blocks') /\ S.equal rest' rest'')) =
false
null
true
let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i d in let blocks'', rest'' = split_at_last c i (S.append b d) in let b' = S.append blocks rest in let d' = S.append blocks' rest' in let l = U32.v (c.blocks_state_len i) in assert (S.length b % l = 0); Math.Lemmas.modulo_distributivity (S.length b) (S.length blocks') l; calc ( == ) { S.length (S.append b blocks') % l; ( == ) { () } (S.length b + S.length blocks') % l; ( == ) { Math.Lemmas.modulo_distributivity (S.length b) (S.length blocks') l } ((S.length b % l) + (S.length blocks' % l)) % l; ( == ) { () } 0 % l; ( == ) { Math.Lemmas.modulo_lemma 0 l } 0; }; split_at_last_spec c i (S.append b d) (S.append b blocks') rest'
{ "checked_file": "Hacl.Streaming.Spec.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "Lib.UpdateMulti.Lemmas.fsti.checked", "Lib.UpdateMulti.fst.checked", "Lib.IntTypes.fsti.checked", "Hacl.Streaming.Interface.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked", "FStar.Calc.fsti.checked" ], "interface_file": false, "source_file": "Hacl.Streaming.Spec.fst" }
[ "lemma" ]
[ "Hacl.Streaming.Interface.block", "Hacl.Streaming.Spec.bytes", "Hacl.Streaming.Spec.split_at_last_spec", "FStar.Seq.Base.append", "Hacl.Streaming.Spec.uint8", "Prims.unit", "FStar.Calc.calc_finish", "Prims.int", "Prims.eq2", "Prims.op_Modulus", "FStar.Seq.Base.length", "Prims.Cons", "FStar.Preorder.relation", "Prims.Nil", "FStar.Calc.calc_step", "Prims.op_Addition", "FStar.Calc.calc_init", "FStar.Calc.calc_pack", "Prims.squash", "FStar.Math.Lemmas.modulo_distributivity", "FStar.Math.Lemmas.modulo_lemma", "Prims._assert", "Prims.b2t", "Prims.op_Equality", "FStar.UInt.uint_t", "FStar.UInt32.v", "Hacl.Streaming.Interface.__proj__Block__item__blocks_state_len", "FStar.Seq.Base.seq", "FStar.Pervasives.Native.tuple2", "Hacl.Streaming.Spec.split_at_last", "Prims.l_and", "Prims.l_or", "FStar.UInt.size", "FStar.UInt32.n", "Prims.op_GreaterThanOrEqual", "Prims.op_GreaterThan", "FStar.Seq.Base.equal", "FStar.Pervasives.pattern" ]
[]
module Hacl.Streaming.Spec /// This module contains all of the logical reasoning, calc statement included, /// for the streaming functor. /// /// The functor uses a ghost variable (named ``seen``) to reason about the /// **past**, i.e. whatever bytes have been fed into the streaming functor. In /// other words, we capture the history of calls that have been performed on the /// functor state, i.e. the sequence of bytes that have been accumulated via /// previous calls to ``Functor.update``, into the ghost ``seen`` /// variable. /// /// To make things useful, we need to relate the present to the past, i.e. we /// need to relate the values of ``block_state`` and ``buf`` (in a given heap) /// to the ghost value ``seen``. /// /// The central invariant of the streaming functor is that, if you split /// ``seen`` at the last block boundary, then: /// /// - ``block_state`` contains the accumulated result of calling ``update`` on /// all of the blocks, and /// - ``buf`` contains the rest of ``seen`` that is smaller or equal to a complete /// block and is processed lazily to make sure there is some data left when we /// call ``last_update`` /// /// The function that performs this splitting is called ``split_at_last``, and /// we need to prove various properties about it, since the streaming functor /// distinguishes three sub-situations to make the proof tractable and we need /// helper lemmas for all three situations. #set-options "--max_fuel 0 --max_ifuel 0 \ --using_facts_from '*,-LowStar.Monotonic.Buffer.unused_in_not_unused_in_disjoint_2' --z3rlimit 50" module ST = FStar.HyperStack.ST module HS = FStar.HyperStack module B = LowStar.Buffer module G = FStar.Ghost module S = FStar.Seq module U32 = FStar.UInt32 module U64 = FStar.UInt64 open Hacl.Streaming.Interface open FStar.HyperStack.ST open LowStar.BufferOps open FStar.Mul inline_for_extraction noextract let uint8 = Lib.IntTypes.uint8 inline_for_extraction noextract let uint32 = Lib.IntTypes.uint32 noextract let bytes = S.seq uint8 // TODO: move to F* val mod_trans_lem (a : nat) (b c : pos) : Lemma (requires (a % b = 0 /\ b % c = 0)) (ensures (a % c = 0)) let mod_trans_lem a b c = let open FStar.Math.Lemmas in div_exact_r a b; div_exact_r b c; assert(a = b * (a / b)); assert(b = c * (b / c)); assert(a = (c * (b / c)) * (a / (c * (b / c)))); assert(a = c * (((b / c)) * (a / (c * (b / c))))); cancel_mul_mod (((b / c)) * (a / (c * (b / c)))) c; assert(a % c = 0) /// Returns the number of blocks to process #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks #index (c: block index) (i: index) (b: nat): Pure nat (requires True) (ensures (fun n -> let l = U32.v (c.blocks_state_len i) in let blocks = n * l in let rest = b - blocks in rest <= l /\ (rest % l = b % l) /\ (rest = b % l \/ rest = l) /\ (rest = 0 <==> b == 0) /\ (rest = l <==> (blocks = (b / l - 1) * l)) /\ ((rest > 0 /\ rest < l) <==> b % l <> 0) /\ (rest = (b % l) <==> (blocks = (b / l) * l)) /\ blocks % l = 0 /\ blocks % U32.v (c.block_len i) = 0 /\ (blocks / l) * l = blocks)) = let n = fst (Lib.UpdateMulti.split_at_last_lazy_nb_rem (U32.v (c.blocks_state_len i)) b) in // Proving that: blocks % U32.v (c.block_len i) = 0 begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = n * l in (**) Math.Lemmas.nat_times_nat_is_nat n l; (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; n #pop-options #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last #index (c: block index) (i: index) (b: bytes): Pure (bytes & bytes) (requires True) (ensures (fun (blocks, rest) -> let l = U32.v (c.blocks_state_len i) in S.length rest <= l /\ (S.length rest % l = S.length b % l) /\ (S.length rest = S.length b % l \/ S.length rest = l) /\ (S.length rest = 0 <==> S.length b == 0) /\ (S.length rest = l <==> (S.length blocks = (S.length b / l - 1) * l)) /\ ((S.length rest > 0 /\ S.length rest < l) <==> S.length b % l <> 0) /\ (S.length rest = (S.length b % l) <==> (S.length blocks = (S.length b / l) * l)) /\ S.equal (S.append blocks rest) b /\ S.length blocks % l = 0 /\ S.length blocks % U32.v (c.block_len i) = 0 /\ (S.length blocks / l) * l = S.length blocks )) = let l = U32.v (c.blocks_state_len i) in let blocks, rest = Lib.UpdateMulti.split_at_last_lazy l b in begin (**) let l = U32.v (c.blocks_state_len i) in (**) let blocks = S.length blocks in (**) mod_trans_lem blocks l (U32.v (c.block_len i)) end; blocks, rest #pop-options /// The following lemmas characterize [split_at_last] with conditions which are easy to /// reason about, and is very useful for the various lemmas in this file which /// prove properties about how to update the internal buffer so that its content /// is actually the correct remainder of the data seen so far. /// This first auxiliary lemma only manipulates the lengths of the sequences. #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_num_blocks_spec #index (c: block index) (i: index) (b n rest: nat): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (rest <= l /\ (rest = 0 ==> b = 0) /\ b = n * l + rest))) (ensures (n = split_at_last_num_blocks c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_nb_rem_spec l b n rest #pop-options /// This second lemma is the one we will use #push-options "--z3cliopt smt.arith.nl=false" noextract let split_at_last_spec #index (c: block index) (i: index) (b blocks rest: bytes): Lemma (requires ( let l = U32.v (c.blocks_state_len i) in (S.length blocks % l = 0 /\ S.length rest <= l /\ (S.length rest = 0 ==> S.length b = 0) /\ b `Seq.equal` Seq.append blocks rest))) (ensures ( (blocks, rest) == split_at_last c i b)) = let l = U32.v (c.blocks_state_len i) in Lib.UpdateMulti.Lemmas.split_at_last_lazy_spec l b blocks rest #pop-options /// For the initialization of the streaming state. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_init #index (c: block index) (i: index) (b: bytes) : Lemma (requires ( let l = U32.v (c.blocks_state_len i) in S.length b <= l)) (ensures ( let blocks, rest = split_at_last c i b in S.equal blocks S.empty /\ S.equal rest b)) = let l = U32.v (c.blocks_state_len i) in FStar.Math.Lemmas.multiple_modulo_lemma 0 l; split_at_last_spec c i b S.empty b #pop-options /// "Small" case: not enough data to obtain strictly more than a complete block, /// so it suffices to append the new input to the internal buffer. Note that we /// don't process the resulting buffer because we have to make sure there is always /// some data remaining in it (after the first call to update) so that [update_last] /// is called on non-empty data at the very end. /// /// There are many subcases that we prove in intermediate lemmas, until we can /// get the final [split_at_last_small] theorem. /// [b]: internal buffer /// [d]: data to append /// "Small" case: subcase 1: not enough data to obtain a complete block append the /// new input to the internal buffer. let split_at_last_small_strict #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d < U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in split_at_last_spec c i (S.append b d) blocks (S.append rest d) /// "Small" case: subcase 2: exactly enough data to obtain a complete block, and the /// internal buffer is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_internal #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in (* The proof is trivial because [b] is empty *) assert(b `Seq.equal` Seq.empty); assert(S.append b d `Seq.equal` d); assert(S.append rest d `Seq.equal` d) #pop-options /// "Small" case 3: exactly enough data to obtain a complete block, and the data to /// add is empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact_empty_data #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length d = 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in assert(S.append rest d `S.equal` rest); assert(S.append b d `S.equal` b) #pop-options /// "Small" case 4: exactly enough data to obtain a complete block, the internal /// buffer is not empty and the data to add is not empty. #push-options "--z3cliopt smt.arith.nl=false" let split_at_last_small_exact #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d = U32.v (c.blocks_state_len i) /\ S.length rest > 0 /\ S.length d > 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in let n = S.length blocks / l in assert(S.length blocks % l = 0); (* comes from the spec of [split_at_last] *) assert(S.length (S.append rest d) = l); assert((S.append b d) `Seq.equal` Seq.append blocks (Seq.append rest d)); split_at_last_spec c i (S.append b d) blocks (S.append rest d) #pop-options /// "Small" case: final theorem: not enough data to obtain strictly more than a /// complete block, so it suffices to append the new input to the internal buffer. let split_at_last_small #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let _, rest = split_at_last c i b in S.length rest + S.length d <= U32.v (c.blocks_state_len i))) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in S.equal blocks blocks' /\ S.equal (S.append rest d) rest')) = let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i (S.append b d) in let l = U32.v (c.blocks_state_len i) in if S.length rest + S.length d < l then split_at_last_small_strict c i b d else if S.length rest = 0 then split_at_last_small_exact_empty_internal c i b d else if S.length d = 0 then split_at_last_small_exact_empty_data c i b d else split_at_last_small_exact c i b d /// For the initialization of the streaming state. /// Second case: the data seen so far is empty or a multiple of the block size /// meaning that the internal buffer is either empty or full, and the data to /// append is not empty. This is a fast path: we can process the internal /// buffer if it is non-empty, then process blocks without touching at the buffer /// and finally copy the remaining data to the buffer. Of course, there must be /// data remaining in the buffer in the end, which is why the data to append /// musn't be empty. #push-options "--z3rlimit 100 --z3cliopt smt.arith.nl=false" let split_at_last_blocks #index (c: block index) (i: index) (b: bytes) (d: bytes): Lemma (requires ( let blocks, rest = split_at_last c i b in (S.length rest = 0 \/ S.length rest = U32.v (c.blocks_state_len i)) /\ S.length d > 0)) (ensures ( let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i d in let blocks'', rest'' = split_at_last c i (S.append b d) in S.equal blocks'' (S.append b blocks') /\
false
false
Hacl.Streaming.Spec.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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false" ], "z3refresh": false, "z3rlimit": 100, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val split_at_last_blocks (#index: _) (c: block index) (i: index) (b d: bytes) : Lemma (requires (let blocks, rest = split_at_last c i b in (S.length rest = 0 \/ S.length rest = U32.v (c.blocks_state_len i)) /\ S.length d > 0)) (ensures (let blocks, rest = split_at_last c i b in let blocks', rest' = split_at_last c i d in let blocks'', rest'' = split_at_last c i (S.append b d) in S.equal blocks'' (S.append b blocks') /\ S.equal rest' rest''))
[]
Hacl.Streaming.Spec.split_at_last_blocks
{ "file_name": "code/streaming/Hacl.Streaming.Spec.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
c: Hacl.Streaming.Interface.block index -> i: index -> b: Hacl.Streaming.Spec.bytes -> d: Hacl.Streaming.Spec.bytes -> FStar.Pervasives.Lemma (requires (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ _ rest = _ in (FStar.Seq.Base.length rest = 0 \/ FStar.Seq.Base.length rest = FStar.UInt32.v (Block?.blocks_state_len c i)) /\ FStar.Seq.Base.length d > 0) <: Type0)) (ensures (let _ = Hacl.Streaming.Spec.split_at_last c i b in (let FStar.Pervasives.Native.Mktuple2 #_ #_ _ _ = _ in let _ = Hacl.Streaming.Spec.split_at_last c i d in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks' rest' = _ in let _ = Hacl.Streaming.Spec.split_at_last c i (FStar.Seq.Base.append b d) in (let FStar.Pervasives.Native.Mktuple2 #_ #_ blocks'' rest'' = _ in FStar.Seq.Base.equal blocks'' (FStar.Seq.Base.append b blocks') /\ FStar.Seq.Base.equal rest' rest'') <: Type0) <: Type0) <: Type0))
{ "end_col": 66, "end_line": 358, "start_col": 1, "start_line": 334 }
Prims.Tot
val validate_option (#k: parser_kind) (#t: Type) (#p: parser k t) (v: validator p) : Tot (validator (parse_option p))
[ { "abbrev": true, "full_module": "FStar.Int.Cast", "short_module": "Cast" }, { "abbrev": true, "full_module": "FStar.UInt64", "short_module": "U64" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "HST" }, { "abbrev": false, "full_module": "LowParse.Low.Base", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Option", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Low", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Low", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let validate_option (#k: parser_kind) (#t: Type) (#p: parser k t) (v: validator p) : Tot (validator (parse_option p)) = fun #rrel #rel input pos -> let h = HST.get () in [@inline_let] let _ = valid_facts (parse_option p) h input (uint64_to_uint32 pos) in [@inline_let] let _ = valid_facts p h input (uint64_to_uint32 pos) in let r = v input pos in if is_error r then pos else r
val validate_option (#k: parser_kind) (#t: Type) (#p: parser k t) (v: validator p) : Tot (validator (parse_option p)) let validate_option (#k: parser_kind) (#t: Type) (#p: parser k t) (v: validator p) : Tot (validator (parse_option p)) =
false
null
false
fun #rrel #rel input pos -> let h = HST.get () in [@@ inline_let ]let _ = valid_facts (parse_option p) h input (uint64_to_uint32 pos) in [@@ inline_let ]let _ = valid_facts p h input (uint64_to_uint32 pos) in let r = v input pos in if is_error r then pos else r
{ "checked_file": "LowParse.Low.Option.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.Option.fst.checked", "LowParse.Low.Base.fst.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Int.Cast.fst.checked", "FStar.HyperStack.ST.fsti.checked" ], "interface_file": false, "source_file": "LowParse.Low.Option.fst" }
[ "total" ]
[ "LowParse.Spec.Base.parser_kind", "LowParse.Spec.Base.parser", "LowParse.Low.Base.validator", "LowParse.Slice.srel", "LowParse.Bytes.byte", "LowParse.Slice.slice", "FStar.UInt64.t", "LowParse.Low.ErrorCode.is_error", "Prims.bool", "Prims.unit", "LowParse.Low.Base.Spec.valid_facts", "LowParse.Low.ErrorCode.uint64_to_uint32", "LowParse.Spec.Option.parse_option_kind", "FStar.Pervasives.Native.option", "LowParse.Spec.Option.parse_option", "FStar.Monotonic.HyperStack.mem", "FStar.HyperStack.ST.get" ]
[]
module LowParse.Low.Option include LowParse.Spec.Option include LowParse.Low.Base module HST = FStar.HyperStack.ST module U32 = FStar.UInt32 module U64 = FStar.UInt64 module Cast = FStar.Int.Cast inline_for_extraction
false
false
LowParse.Low.Option.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val validate_option (#k: parser_kind) (#t: Type) (#p: parser k t) (v: validator p) : Tot (validator (parse_option p))
[]
LowParse.Low.Option.validate_option
{ "file_name": "src/lowparse/LowParse.Low.Option.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
v: LowParse.Low.Base.validator p -> LowParse.Low.Base.validator (LowParse.Spec.Option.parse_option p)
{ "end_col": 8, "end_line": 19, "start_col": 2, "start_line": 12 }
Prims.Tot
val lift_ghost_atomic (a:Type) (opened:inames) (#framed:eqtype_as_type bool) (#[@@@ framing_implicit] pre:pre_t) (#[@@@ framing_implicit] post:post_t a) (#[@@@ framing_implicit] req:pure_pre) (#[@@@ framing_implicit] ens:pure_post a) (f:STAG.repr a framed opened Unobservable pre post req ens) : STAG.repr a framed opened Unobservable pre post req ens
[ { "abbrev": true, "full_module": "Steel.Effect.Atomic", "short_module": "SEA" }, { "abbrev": true, "full_module": "FStar.Tactics", "short_module": "T" }, { "abbrev": false, "full_module": "Steel.Memory", "short_module": null }, { "abbrev": true, "full_module": "Steel.ST.Effect.Atomic", "short_module": "STA" }, { "abbrev": true, "full_module": "Steel.ST.Effect.AtomicAndGhost", "short_module": "STAG" }, { "abbrev": false, "full_module": "Steel.Effect.Common", "short_module": null }, { "abbrev": true, "full_module": "FStar.Tactics", "short_module": "T" }, { "abbrev": false, "full_module": "Steel.Memory", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lift_ghost_atomic (a:Type) (opened:inames) (#framed:eqtype_as_type bool) (#[@@@ framing_implicit] pre:pre_t) (#[@@@ framing_implicit] post:post_t a) (#[@@@ framing_implicit] req:Type0) (#[@@@ framing_implicit] ens:a -> Type0) (f:STAG.repr a framed opened Unobservable pre post req ens) : STAG.repr a framed opened Unobservable pre post req ens = f
val lift_ghost_atomic (a:Type) (opened:inames) (#framed:eqtype_as_type bool) (#[@@@ framing_implicit] pre:pre_t) (#[@@@ framing_implicit] post:post_t a) (#[@@@ framing_implicit] req:pure_pre) (#[@@@ framing_implicit] ens:pure_post a) (f:STAG.repr a framed opened Unobservable pre post req ens) : STAG.repr a framed opened Unobservable pre post req ens let lift_ghost_atomic (a: Type) (opened: inames) (#framed: eqtype_as_type bool) (#[@@@ framing_implicit]pre: pre_t) (#[@@@ framing_implicit]post: post_t a) (#[@@@ framing_implicit]req: Type0) (#[@@@ framing_implicit]ens: (a -> Type0)) (f: STAG.repr a framed opened Unobservable pre post req ens) : STAG.repr a framed opened Unobservable pre post req ens =
false
null
false
f
{ "checked_file": "Steel.ST.Effect.Ghost.fst.checked", "dependencies": [ "Steel.ST.Effect.AtomicAndGhost.fst.checked", "Steel.Memory.fsti.checked", "Steel.Effect.Atomic.fst.checked", "prims.fst.checked", "FStar.Tactics.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.NMSTTotal.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.Effect.Ghost.fst" }
[ "total" ]
[ "Steel.Memory.inames", "FStar.Pervasives.eqtype_as_type", "Prims.bool", "Steel.Effect.Common.pre_t", "Steel.Effect.Common.post_t", "Steel.ST.Effect.AtomicAndGhost.repr", "Steel.Effect.Common.Unobservable" ]
[]
(* Copyright 2020 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module Steel.ST.Effect.Ghost friend Steel.ST.Effect.AtomicAndGhost friend Steel.Effect.Atomic open Steel.Memory module T = FStar.Tactics module SEA = Steel.Effect.Atomic /// Any Steel ghost computation can always be lifted to an atomic computation if needed. /// Note that because SteelGhost is marked as erasable, the F* typechecker will throw an error /// if this lift is applied to a ghost computation with an informative return value let lift_ghost_atomic (a:Type) (opened:inames) (#framed:eqtype_as_type bool) (#[@@@ framing_implicit] pre:pre_t) (#[@@@ framing_implicit] post:post_t a) (#[@@@ framing_implicit] req:Type0) (#[@@@ framing_implicit] ens:a -> Type0) (f:STAG.repr a framed opened Unobservable pre post req ens)
false
false
Steel.ST.Effect.Ghost.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lift_ghost_atomic (a:Type) (opened:inames) (#framed:eqtype_as_type bool) (#[@@@ framing_implicit] pre:pre_t) (#[@@@ framing_implicit] post:post_t a) (#[@@@ framing_implicit] req:pure_pre) (#[@@@ framing_implicit] ens:pure_post a) (f:STAG.repr a framed opened Unobservable pre post req ens) : STAG.repr a framed opened Unobservable pre post req ens
[]
Steel.ST.Effect.Ghost.lift_ghost_atomic
{ "file_name": "lib/steel/Steel.ST.Effect.Ghost.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
a: Type -> opened: Steel.Memory.inames -> f: Steel.ST.Effect.AtomicAndGhost.repr a framed opened Steel.Effect.Common.Unobservable pre post req ens -> Steel.ST.Effect.AtomicAndGhost.repr a framed opened Steel.Effect.Common.Unobservable pre post req ens
{ "end_col": 5, "end_line": 38, "start_col": 4, "start_line": 38 }
Steel.ST.Effect.Ghost.STGhostF
val admit_ (#a:Type) (#opened:inames) (#p:pre_t) (#q:post_t a) (_:unit) : STGhostF a opened p q True (fun _ -> False)
[ { "abbrev": true, "full_module": "Steel.Effect.Atomic", "short_module": "SEA" }, { "abbrev": true, "full_module": "FStar.Tactics", "short_module": "T" }, { "abbrev": false, "full_module": "Steel.Memory", "short_module": null }, { "abbrev": true, "full_module": "Steel.ST.Effect.Atomic", "short_module": "STA" }, { "abbrev": true, "full_module": "Steel.ST.Effect.AtomicAndGhost", "short_module": "STAG" }, { "abbrev": false, "full_module": "Steel.Effect.Common", "short_module": null }, { "abbrev": true, "full_module": "FStar.Tactics", "short_module": "T" }, { "abbrev": false, "full_module": "Steel.Memory", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let admit_ _ = STGhostF?.reflect (fun _ -> NMSTTotal.nmst_tot_admit ())
val admit_ (#a:Type) (#opened:inames) (#p:pre_t) (#q:post_t a) (_:unit) : STGhostF a opened p q True (fun _ -> False) let admit_ _ =
true
null
false
STGhostF?.reflect (fun _ -> NMSTTotal.nmst_tot_admit ())
{ "checked_file": "Steel.ST.Effect.Ghost.fst.checked", "dependencies": [ "Steel.ST.Effect.AtomicAndGhost.fst.checked", "Steel.Memory.fsti.checked", "Steel.Effect.Atomic.fst.checked", "prims.fst.checked", "FStar.Tactics.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.NMSTTotal.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.Effect.Ghost.fst" }
[]
[ "Steel.Memory.inames", "Steel.Effect.Common.pre_t", "Steel.Effect.Common.post_t", "Prims.unit", "Steel.Memory.slprop", "FStar.NMSTTotal.nmst_tot_admit", "Steel.Memory.full_mem", "Steel.Memory.mem_evolves", "Prims.l_True", "Prims.l_False" ]
[]
(* Copyright 2020 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module Steel.ST.Effect.Ghost friend Steel.ST.Effect.AtomicAndGhost friend Steel.Effect.Atomic open Steel.Memory module T = FStar.Tactics module SEA = Steel.Effect.Atomic /// Any Steel ghost computation can always be lifted to an atomic computation if needed. /// Note that because SteelGhost is marked as erasable, the F* typechecker will throw an error /// if this lift is applied to a ghost computation with an informative return value let lift_ghost_atomic (a:Type) (opened:inames) (#framed:eqtype_as_type bool) (#[@@@ framing_implicit] pre:pre_t) (#[@@@ framing_implicit] post:post_t a) (#[@@@ framing_implicit] req:Type0) (#[@@@ framing_implicit] ens:a -> Type0) (f:STAG.repr a framed opened Unobservable pre post req ens) : STAG.repr a framed opened Unobservable pre post req ens = f let as_atomic_action_ghost (#a:Type u#a) (#opened_invariants:inames) (#fp:slprop) (#fp': a -> slprop) (f:action_except a opened_invariants fp fp') : STGhostT a opened_invariants (to_vprop fp) (fun x -> to_vprop (fp' x)) = let ff = SEA.reify_steel_ghost_comp (fun _ -> SEA.as_atomic_action_ghost f) in STGhostBase?.reflect ff let extract_fact0 (#opened:inames) (p:vprop) (fact:prop) (l:(m:mem) -> Lemma (requires interp (hp_of p) m) (ensures fact)) : STAG.repr unit false opened Unobservable p (fun _ -> p) True (fun _ -> fact) = fun frame -> let m0:full_mem = NMSTTotal.get () in Classical.forall_intro_3 reveal_mk_rmem; let h0 = mk_rmem p (core_mem m0) in l (core_mem m0) let extract_fact (#opened:inames) (p:vprop) (fact:prop) (l:(m:mem) -> Lemma (requires interp (hp_of p) m) (ensures fact)) : STGhost unit opened p (fun _ -> p) True (fun _ -> fact) = STGhostBase?.reflect (extract_fact0 p fact l)
false
false
Steel.ST.Effect.Ghost.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val admit_ (#a:Type) (#opened:inames) (#p:pre_t) (#q:post_t a) (_:unit) : STGhostF a opened p q True (fun _ -> False)
[]
Steel.ST.Effect.Ghost.admit_
{ "file_name": "lib/steel/Steel.ST.Effect.Ghost.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
_: Prims.unit -> Steel.ST.Effect.Ghost.STGhostF a
{ "end_col": 71, "end_line": 72, "start_col": 15, "start_line": 72 }
Steel.ST.Effect.Ghost.STGhost
val extract_fact (#opened:inames) (p:vprop) (fact:prop) (l:(m:mem) -> Lemma (requires interp (hp_of p) m) (ensures fact)) : STGhost unit opened p (fun _ -> p) True (fun _ -> fact)
[ { "abbrev": true, "full_module": "Steel.Effect.Atomic", "short_module": "SEA" }, { "abbrev": true, "full_module": "FStar.Tactics", "short_module": "T" }, { "abbrev": false, "full_module": "Steel.Memory", "short_module": null }, { "abbrev": true, "full_module": "Steel.ST.Effect.Atomic", "short_module": "STA" }, { "abbrev": true, "full_module": "Steel.ST.Effect.AtomicAndGhost", "short_module": "STAG" }, { "abbrev": false, "full_module": "Steel.Effect.Common", "short_module": null }, { "abbrev": true, "full_module": "FStar.Tactics", "short_module": "T" }, { "abbrev": false, "full_module": "Steel.Memory", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let extract_fact (#opened:inames) (p:vprop) (fact:prop) (l:(m:mem) -> Lemma (requires interp (hp_of p) m) (ensures fact)) : STGhost unit opened p (fun _ -> p) True (fun _ -> fact) = STGhostBase?.reflect (extract_fact0 p fact l)
val extract_fact (#opened:inames) (p:vprop) (fact:prop) (l:(m:mem) -> Lemma (requires interp (hp_of p) m) (ensures fact)) : STGhost unit opened p (fun _ -> p) True (fun _ -> fact) let extract_fact (#opened: inames) (p: vprop) (fact: prop) (l: (m: mem -> Lemma (requires interp (hp_of p) m) (ensures fact))) : STGhost unit opened p (fun _ -> p) True (fun _ -> fact) =
true
null
false
STGhostBase?.reflect (extract_fact0 p fact l)
{ "checked_file": "Steel.ST.Effect.Ghost.fst.checked", "dependencies": [ "Steel.ST.Effect.AtomicAndGhost.fst.checked", "Steel.Memory.fsti.checked", "Steel.Effect.Atomic.fst.checked", "prims.fst.checked", "FStar.Tactics.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.NMSTTotal.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.Effect.Ghost.fst" }
[]
[ "Steel.Memory.inames", "Steel.Effect.Common.vprop", "Prims.prop", "Steel.Memory.mem", "Prims.unit", "Steel.Memory.interp", "Steel.Effect.Common.hp_of", "Prims.squash", "Prims.Nil", "FStar.Pervasives.pattern", "Steel.ST.Effect.Ghost.extract_fact0", "Prims.l_True" ]
[]
(* Copyright 2020 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module Steel.ST.Effect.Ghost friend Steel.ST.Effect.AtomicAndGhost friend Steel.Effect.Atomic open Steel.Memory module T = FStar.Tactics module SEA = Steel.Effect.Atomic /// Any Steel ghost computation can always be lifted to an atomic computation if needed. /// Note that because SteelGhost is marked as erasable, the F* typechecker will throw an error /// if this lift is applied to a ghost computation with an informative return value let lift_ghost_atomic (a:Type) (opened:inames) (#framed:eqtype_as_type bool) (#[@@@ framing_implicit] pre:pre_t) (#[@@@ framing_implicit] post:post_t a) (#[@@@ framing_implicit] req:Type0) (#[@@@ framing_implicit] ens:a -> Type0) (f:STAG.repr a framed opened Unobservable pre post req ens) : STAG.repr a framed opened Unobservable pre post req ens = f let as_atomic_action_ghost (#a:Type u#a) (#opened_invariants:inames) (#fp:slprop) (#fp': a -> slprop) (f:action_except a opened_invariants fp fp') : STGhostT a opened_invariants (to_vprop fp) (fun x -> to_vprop (fp' x)) = let ff = SEA.reify_steel_ghost_comp (fun _ -> SEA.as_atomic_action_ghost f) in STGhostBase?.reflect ff let extract_fact0 (#opened:inames) (p:vprop) (fact:prop) (l:(m:mem) -> Lemma (requires interp (hp_of p) m) (ensures fact)) : STAG.repr unit false opened Unobservable p (fun _ -> p) True (fun _ -> fact) = fun frame -> let m0:full_mem = NMSTTotal.get () in Classical.forall_intro_3 reveal_mk_rmem; let h0 = mk_rmem p (core_mem m0) in l (core_mem m0) let extract_fact (#opened:inames) (p:vprop) (fact:prop) (l:(m:mem) -> Lemma (requires interp (hp_of p) m) (ensures fact))
false
false
Steel.ST.Effect.Ghost.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val extract_fact (#opened:inames) (p:vprop) (fact:prop) (l:(m:mem) -> Lemma (requires interp (hp_of p) m) (ensures fact)) : STGhost unit opened p (fun _ -> p) True (fun _ -> fact)
[]
Steel.ST.Effect.Ghost.extract_fact
{ "file_name": "lib/steel/Steel.ST.Effect.Ghost.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
p: Steel.Effect.Common.vprop -> fact: Prims.prop -> l: (m: Steel.Memory.mem -> FStar.Pervasives.Lemma (requires Steel.Memory.interp (Steel.Effect.Common.hp_of p) m) (ensures fact)) -> Steel.ST.Effect.Ghost.STGhost Prims.unit
{ "end_col": 49, "end_line": 70, "start_col": 4, "start_line": 70 }
Prims.Tot
val extract_fact0 (#opened: inames) (p: vprop) (fact: prop) (l: (m: mem -> Lemma (requires interp (hp_of p) m) (ensures fact))) : STAG.repr unit false opened Unobservable p (fun _ -> p) True (fun _ -> fact)
[ { "abbrev": true, "full_module": "Steel.Effect.Atomic", "short_module": "SEA" }, { "abbrev": true, "full_module": "FStar.Tactics", "short_module": "T" }, { "abbrev": false, "full_module": "Steel.Memory", "short_module": null }, { "abbrev": true, "full_module": "Steel.ST.Effect.Atomic", "short_module": "STA" }, { "abbrev": true, "full_module": "Steel.ST.Effect.AtomicAndGhost", "short_module": "STAG" }, { "abbrev": false, "full_module": "Steel.Effect.Common", "short_module": null }, { "abbrev": true, "full_module": "FStar.Tactics", "short_module": "T" }, { "abbrev": false, "full_module": "Steel.Memory", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "Steel.ST.Effect", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let extract_fact0 (#opened:inames) (p:vprop) (fact:prop) (l:(m:mem) -> Lemma (requires interp (hp_of p) m) (ensures fact)) : STAG.repr unit false opened Unobservable p (fun _ -> p) True (fun _ -> fact) = fun frame -> let m0:full_mem = NMSTTotal.get () in Classical.forall_intro_3 reveal_mk_rmem; let h0 = mk_rmem p (core_mem m0) in l (core_mem m0)
val extract_fact0 (#opened: inames) (p: vprop) (fact: prop) (l: (m: mem -> Lemma (requires interp (hp_of p) m) (ensures fact))) : STAG.repr unit false opened Unobservable p (fun _ -> p) True (fun _ -> fact) let extract_fact0 (#opened: inames) (p: vprop) (fact: prop) (l: (m: mem -> Lemma (requires interp (hp_of p) m) (ensures fact))) : STAG.repr unit false opened Unobservable p (fun _ -> p) True (fun _ -> fact) =
false
null
false
fun frame -> let m0:full_mem = NMSTTotal.get () in Classical.forall_intro_3 reveal_mk_rmem; let h0 = mk_rmem p (core_mem m0) in l (core_mem m0)
{ "checked_file": "Steel.ST.Effect.Ghost.fst.checked", "dependencies": [ "Steel.ST.Effect.AtomicAndGhost.fst.checked", "Steel.Memory.fsti.checked", "Steel.Effect.Atomic.fst.checked", "prims.fst.checked", "FStar.Tactics.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.NMSTTotal.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Steel.ST.Effect.Ghost.fst" }
[ "total" ]
[ "Steel.Memory.inames", "Steel.Effect.Common.vprop", "Prims.prop", "Steel.Memory.mem", "Prims.unit", "Steel.Memory.interp", "Steel.Effect.Common.hp_of", "Prims.squash", "Prims.Nil", "FStar.Pervasives.pattern", "Steel.Memory.slprop", "Steel.Memory.core_mem", "Steel.Effect.Common.rmem'", "Steel.Effect.Common.valid_rmem", "Steel.Effect.Common.mk_rmem", "FStar.Classical.forall_intro_3", "Steel.Effect.Common.hmem", "Steel.Effect.Common.can_be_split", "Prims.eq2", "Steel.Effect.Common.normal", "Steel.Effect.Common.t_of", "Steel.Effect.Common.sel_of", "Steel.Effect.Common.reveal_mk_rmem", "Steel.Memory.full_mem", "FStar.NMSTTotal.get", "Steel.Memory.mem_evolves", "Steel.ST.Effect.AtomicAndGhost.repr", "Steel.Effect.Common.Unobservable", "Prims.l_True" ]
[]
(* Copyright 2020 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module Steel.ST.Effect.Ghost friend Steel.ST.Effect.AtomicAndGhost friend Steel.Effect.Atomic open Steel.Memory module T = FStar.Tactics module SEA = Steel.Effect.Atomic /// Any Steel ghost computation can always be lifted to an atomic computation if needed. /// Note that because SteelGhost is marked as erasable, the F* typechecker will throw an error /// if this lift is applied to a ghost computation with an informative return value let lift_ghost_atomic (a:Type) (opened:inames) (#framed:eqtype_as_type bool) (#[@@@ framing_implicit] pre:pre_t) (#[@@@ framing_implicit] post:post_t a) (#[@@@ framing_implicit] req:Type0) (#[@@@ framing_implicit] ens:a -> Type0) (f:STAG.repr a framed opened Unobservable pre post req ens) : STAG.repr a framed opened Unobservable pre post req ens = f let as_atomic_action_ghost (#a:Type u#a) (#opened_invariants:inames) (#fp:slprop) (#fp': a -> slprop) (f:action_except a opened_invariants fp fp') : STGhostT a opened_invariants (to_vprop fp) (fun x -> to_vprop (fp' x)) = let ff = SEA.reify_steel_ghost_comp (fun _ -> SEA.as_atomic_action_ghost f) in STGhostBase?.reflect ff let extract_fact0 (#opened:inames) (p:vprop) (fact:prop) (l:(m:mem) -> Lemma (requires interp (hp_of p) m) (ensures fact))
false
false
Steel.ST.Effect.Ghost.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val extract_fact0 (#opened: inames) (p: vprop) (fact: prop) (l: (m: mem -> Lemma (requires interp (hp_of p) m) (ensures fact))) : STAG.repr unit false opened Unobservable p (fun _ -> p) True (fun _ -> fact)
[]
Steel.ST.Effect.Ghost.extract_fact0
{ "file_name": "lib/steel/Steel.ST.Effect.Ghost.fst", "git_rev": "7fbb54e94dd4f48ff7cb867d3bae6889a635541e", "git_url": "https://github.com/FStarLang/steel.git", "project_name": "steel" }
p: Steel.Effect.Common.vprop -> fact: Prims.prop -> l: (m: Steel.Memory.mem -> FStar.Pervasives.Lemma (requires Steel.Memory.interp (Steel.Effect.Common.hp_of p) m) (ensures fact)) -> Steel.ST.Effect.AtomicAndGhost.repr Prims.unit false opened Steel.Effect.Common.Unobservable p (fun _ -> p) Prims.l_True (fun _ -> fact)
{ "end_col": 21, "end_line": 61, "start_col": 4, "start_line": 57 }
Prims.Tot
val sealed_ (#a: Type u#a) (witness: a) : Type u#0
[ { "abbrev": false, "full_module": "FStar.Sealed", "short_module": null }, { "abbrev": false, "full_module": "FStar.Sealed", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let sealed_ (#a:Type u#a) (witness:a) : Type u#0 = FStar.Sealed.sealed a
val sealed_ (#a: Type u#a) (witness: a) : Type u#0 let sealed_ (#a: Type u#a) (witness: a) : Type u#0 =
false
null
false
FStar.Sealed.sealed a
{ "checked_file": "FStar.Sealed.Inhabited.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Sealed.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Sealed.Inhabited.fst" }
[ "total" ]
[ "FStar.Sealed.sealed" ]
[]
(* Copyright 2023 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Authors: G. Martinez, N. Swamy *) module FStar.Sealed.Inhabited (* This module provides an instance of FStar.Sealed.sealed specialized for inhabited types. The main type `sealed w` is the singleton type of a sealed values that is provably equal to `seal w`. This type `sealed_` is not intended for use by clients, it is exposed only to enable writing an SMT pattern. *) let sealed_ (#a:Type u#a) (witness:a)
false
false
FStar.Sealed.Inhabited.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val sealed_ (#a: Type u#a) (witness: a) : Type u#0
[]
FStar.Sealed.Inhabited.sealed_
{ "file_name": "ulib/FStar.Sealed.Inhabited.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
witness: a -> Type0
{ "end_col": 25, "end_line": 33, "start_col": 4, "start_line": 33 }
Prims.Tot
val is_sealed (#a: Type u#a) (#witness: a) (x: sealed_ witness) : prop
[ { "abbrev": false, "full_module": "FStar.Sealed", "short_module": null }, { "abbrev": false, "full_module": "FStar.Sealed", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let is_sealed (#a:Type u#a) (#witness:a) (x:sealed_ witness) : prop = True
val is_sealed (#a: Type u#a) (#witness: a) (x: sealed_ witness) : prop let is_sealed (#a: Type u#a) (#witness: a) (x: sealed_ witness) : prop =
false
null
false
True
{ "checked_file": "FStar.Sealed.Inhabited.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Sealed.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Sealed.Inhabited.fst" }
[ "total" ]
[ "FStar.Sealed.Inhabited.sealed_", "Prims.l_True", "Prims.prop" ]
[]
(* Copyright 2023 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Authors: G. Martinez, N. Swamy *) module FStar.Sealed.Inhabited (* This module provides an instance of FStar.Sealed.sealed specialized for inhabited types. The main type `sealed w` is the singleton type of a sealed values that is provably equal to `seal w`. This type `sealed_` is not intended for use by clients, it is exposed only to enable writing an SMT pattern. *) let sealed_ (#a:Type u#a) (witness:a) : Type u#0 = FStar.Sealed.sealed a (* A trivial predicate, just for writing an SMT pattern on sealed_singleton *) let is_sealed (#a:Type u#a) (#witness:a) (x:sealed_ witness)
false
false
FStar.Sealed.Inhabited.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val is_sealed (#a: Type u#a) (#witness: a) (x: sealed_ witness) : prop
[]
FStar.Sealed.Inhabited.is_sealed
{ "file_name": "ulib/FStar.Sealed.Inhabited.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: FStar.Sealed.Inhabited.sealed_ witness -> Prims.prop
{ "end_col": 8, "end_line": 40, "start_col": 4, "start_line": 40 }
Prims.Tot
val sealed (#a: Type u#a) (witness: a) : Type u#0
[ { "abbrev": false, "full_module": "FStar.Sealed", "short_module": null }, { "abbrev": false, "full_module": "FStar.Sealed", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let sealed (#a:Type u#a) (witness:a) : Type u#0 = s:sealed_ witness { is_sealed s }
val sealed (#a: Type u#a) (witness: a) : Type u#0 let sealed (#a: Type u#a) (witness: a) : Type u#0 =
false
null
false
s: sealed_ witness {is_sealed s}
{ "checked_file": "FStar.Sealed.Inhabited.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Sealed.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Sealed.Inhabited.fst" }
[ "total" ]
[ "FStar.Sealed.Inhabited.sealed_", "FStar.Sealed.Inhabited.is_sealed" ]
[]
(* Copyright 2023 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Authors: G. Martinez, N. Swamy *) module FStar.Sealed.Inhabited (* This module provides an instance of FStar.Sealed.sealed specialized for inhabited types. The main type `sealed w` is the singleton type of a sealed values that is provably equal to `seal w`. This type `sealed_` is not intended for use by clients, it is exposed only to enable writing an SMT pattern. *) let sealed_ (#a:Type u#a) (witness:a) : Type u#0 = FStar.Sealed.sealed a (* A trivial predicate, just for writing an SMT pattern on sealed_singleton *) let is_sealed (#a:Type u#a) (#witness:a) (x:sealed_ witness) : prop = True let sealed (#a:Type u#a) (witness:a)
false
false
FStar.Sealed.Inhabited.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val sealed (#a: Type u#a) (witness: a) : Type u#0
[]
FStar.Sealed.Inhabited.sealed
{ "file_name": "ulib/FStar.Sealed.Inhabited.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
witness: a -> Type0
{ "end_col": 37, "end_line": 45, "start_col": 4, "start_line": 45 }
FStar.Pervasives.Lemma
val sealed_singleton (a: Type u#a) (w: a) (x: sealed w) : Lemma (x == seal #a #w w) [SMTPat (is_sealed #a #w x)]
[ { "abbrev": false, "full_module": "FStar.Sealed", "short_module": null }, { "abbrev": false, "full_module": "FStar.Sealed", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let sealed_singleton (a:Type u#a) (w:a) (x:sealed w) : Lemma (x == seal #a #w w) [SMTPat (is_sealed #a #w x)] = FStar.Sealed.sealed_singl x (seal #a #w w)
val sealed_singleton (a: Type u#a) (w: a) (x: sealed w) : Lemma (x == seal #a #w w) [SMTPat (is_sealed #a #w x)] let sealed_singleton (a: Type u#a) (w: a) (x: sealed w) : Lemma (x == seal #a #w w) [SMTPat (is_sealed #a #w x)] =
false
null
true
FStar.Sealed.sealed_singl x (seal #a #w w)
{ "checked_file": "FStar.Sealed.Inhabited.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Sealed.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Sealed.Inhabited.fst" }
[ "lemma" ]
[ "FStar.Sealed.Inhabited.sealed", "FStar.Sealed.sealed_singl", "FStar.Sealed.Inhabited.seal", "Prims.unit", "Prims.l_True", "Prims.squash", "Prims.eq2", "Prims.Cons", "FStar.Pervasives.pattern", "FStar.Pervasives.smt_pat", "Prims.prop", "FStar.Sealed.Inhabited.is_sealed", "Prims.Nil" ]
[]
(* Copyright 2023 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Authors: G. Martinez, N. Swamy *) module FStar.Sealed.Inhabited (* This module provides an instance of FStar.Sealed.sealed specialized for inhabited types. The main type `sealed w` is the singleton type of a sealed values that is provably equal to `seal w`. This type `sealed_` is not intended for use by clients, it is exposed only to enable writing an SMT pattern. *) let sealed_ (#a:Type u#a) (witness:a) : Type u#0 = FStar.Sealed.sealed a (* A trivial predicate, just for writing an SMT pattern on sealed_singleton *) let is_sealed (#a:Type u#a) (#witness:a) (x:sealed_ witness) : prop = True let sealed (#a:Type u#a) (witness:a) : Type u#0 = s:sealed_ witness { is_sealed s } (* Sealing a value `x:a` at the type `sealed w` *) let seal (#a:Type u#a) (#w:a) (x:a) : sealed w = FStar.Sealed.seal x (* A lemma with an SMT pattern for automatically proving that a `seal x == seal w`*) let sealed_singleton (a:Type u#a) (w:a) (x:sealed w) : Lemma (x == seal #a #w w)
false
false
FStar.Sealed.Inhabited.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val sealed_singleton (a: Type u#a) (w: a) (x: sealed w) : Lemma (x == seal #a #w w) [SMTPat (is_sealed #a #w x)]
[]
FStar.Sealed.Inhabited.sealed_singleton
{ "file_name": "ulib/FStar.Sealed.Inhabited.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
a: Type -> w: a -> x: FStar.Sealed.Inhabited.sealed w -> FStar.Pervasives.Lemma (ensures x == FStar.Sealed.Inhabited.seal w) [SMTPat (FStar.Sealed.Inhabited.is_sealed x)]
{ "end_col": 46, "end_line": 57, "start_col": 4, "start_line": 57 }
Prims.Tot
val seal (#a: Type u#a) (#w x: a) : sealed w
[ { "abbrev": false, "full_module": "FStar.Sealed", "short_module": null }, { "abbrev": false, "full_module": "FStar.Sealed", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let seal (#a:Type u#a) (#w:a) (x:a) : sealed w = FStar.Sealed.seal x
val seal (#a: Type u#a) (#w x: a) : sealed w let seal (#a: Type u#a) (#w x: a) : sealed w =
false
null
false
FStar.Sealed.seal x
{ "checked_file": "FStar.Sealed.Inhabited.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Sealed.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Sealed.Inhabited.fst" }
[ "total" ]
[ "FStar.Sealed.seal", "FStar.Sealed.Inhabited.sealed" ]
[]
(* Copyright 2023 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Authors: G. Martinez, N. Swamy *) module FStar.Sealed.Inhabited (* This module provides an instance of FStar.Sealed.sealed specialized for inhabited types. The main type `sealed w` is the singleton type of a sealed values that is provably equal to `seal w`. This type `sealed_` is not intended for use by clients, it is exposed only to enable writing an SMT pattern. *) let sealed_ (#a:Type u#a) (witness:a) : Type u#0 = FStar.Sealed.sealed a (* A trivial predicate, just for writing an SMT pattern on sealed_singleton *) let is_sealed (#a:Type u#a) (#witness:a) (x:sealed_ witness) : prop = True let sealed (#a:Type u#a) (witness:a) : Type u#0 = s:sealed_ witness { is_sealed s } (* Sealing a value `x:a` at the type `sealed w` *) let seal (#a:Type u#a) (#w:a) (x:a)
false
false
FStar.Sealed.Inhabited.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val seal (#a: Type u#a) (#w x: a) : sealed w
[]
FStar.Sealed.Inhabited.seal
{ "file_name": "ulib/FStar.Sealed.Inhabited.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: a -> FStar.Sealed.Inhabited.sealed w
{ "end_col": 23, "end_line": 50, "start_col": 4, "start_line": 50 }
Prims.Tot
val trivial_rel (a: Type0) : Preorder.relation a
[ { "abbrev": false, "full_module": "FStar.Monotonic.Heap", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let trivial_rel (a:Type0) :Preorder.relation a = fun x y -> True
val trivial_rel (a: Type0) : Preorder.relation a let trivial_rel (a: Type0) : Preorder.relation a =
false
null
false
fun x y -> True
{ "checked_file": "FStar.Heap.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Preorder.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Monotonic.Heap.fsti.checked" ], "interface_file": false, "source_file": "FStar.Heap.fst" }
[ "total" ]
[ "Prims.l_True", "FStar.Preorder.relation" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Heap include FStar.Monotonic.Heap
false
false
FStar.Heap.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val trivial_rel (a: Type0) : Preorder.relation a
[]
FStar.Heap.trivial_rel
{ "file_name": "ulib/FStar.Heap.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
a: Type0 -> FStar.Preorder.relation a
{ "end_col": 64, "end_line": 20, "start_col": 49, "start_line": 20 }
Prims.Tot
val trivial_preorder (a: Type0) : Preorder.preorder a
[ { "abbrev": false, "full_module": "FStar.Monotonic.Heap", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let trivial_preorder (a:Type0) :Preorder.preorder a = trivial_rel a
val trivial_preorder (a: Type0) : Preorder.preorder a let trivial_preorder (a: Type0) : Preorder.preorder a =
false
null
false
trivial_rel a
{ "checked_file": "FStar.Heap.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Preorder.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Monotonic.Heap.fsti.checked" ], "interface_file": false, "source_file": "FStar.Heap.fst" }
[ "total" ]
[ "FStar.Heap.trivial_rel", "FStar.Preorder.preorder" ]
[]
(* Copyright 2008-2018 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Heap include FStar.Monotonic.Heap let trivial_rel (a:Type0) :Preorder.relation a = fun x y -> True
false
false
FStar.Heap.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 8, "max_ifuel": 2, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val trivial_preorder (a: Type0) : Preorder.preorder a
[]
FStar.Heap.trivial_preorder
{ "file_name": "ulib/FStar.Heap.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
a: Type0 -> FStar.Preorder.preorder a
{ "end_col": 67, "end_line": 22, "start_col": 54, "start_line": 22 }
Prims.GTot
val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a)
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let v #_ h ll = B.deref h ll.v
val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll =
false
null
false
B.deref h ll.v
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[ "sometrivial" ]
[ "FStar.Monotonic.HyperStack.mem", "LowStar.Lib.LinkedList2.t", "FStar.Ghost.reveal", "Prims.list", "LowStar.Monotonic.Buffer.deref", "FStar.Ghost.erased", "LowStar.Buffer.trivial_preorder", "LowStar.Lib.LinkedList2.__proj__Mkt__item__v" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a)
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a)
[]
LowStar.Lib.LinkedList2.v
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
h: FStar.Monotonic.HyperStack.mem -> ll: LowStar.Lib.LinkedList2.t a -> Prims.GTot (Prims.list a)
{ "end_col": 16, "end_line": 86, "start_col": 2, "start_line": 86 }
Prims.GTot
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let region_of ll = B.loc_all_regions_from false ll.r
let region_of ll =
false
null
false
B.loc_all_regions_from false ll.r
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[ "sometrivial" ]
[ "LowStar.Lib.LinkedList2.t", "LowStar.Monotonic.Buffer.loc_all_regions_from", "LowStar.Lib.LinkedList2.__proj__Mkt__item__r", "LowStar.Monotonic.Buffer.loc" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v)
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val region_of : ll: LowStar.Lib.LinkedList2.t _ -> Prims.GTot LowStar.Monotonic.Buffer.loc
[]
LowStar.Lib.LinkedList2.region_of
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
ll: LowStar.Lib.LinkedList2.t _ -> Prims.GTot LowStar.Monotonic.Buffer.loc
{ "end_col": 52, "end_line": 100, "start_col": 19, "start_line": 100 }
Prims.Ghost
val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True)
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v)
val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll =
false
null
false
let head = B.deref h ll.ptr in let v = B.deref h ll.v in let open B in ((loc_addr_of_buffer ll.ptr) `loc_union` (loc_addr_of_buffer ll.v)) `loc_union` (LL1.footprint h head v)
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[]
[ "FStar.Monotonic.HyperStack.mem", "LowStar.Lib.LinkedList2.t", "LowStar.Monotonic.Buffer.loc_union", "LowStar.Monotonic.Buffer.loc_addr_of_buffer", "LowStar.Lib.LinkedList.t", "LowStar.Buffer.trivial_preorder", "LowStar.Lib.LinkedList2.__proj__Mkt__item__ptr", "FStar.Ghost.erased", "Prims.list", "LowStar.Lib.LinkedList2.__proj__Mkt__item__v", "LowStar.Lib.LinkedList.footprint", "FStar.Ghost.reveal", "LowStar.Monotonic.Buffer.deref", "LowStar.Monotonic.Buffer.loc" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll)
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True)
[]
LowStar.Lib.LinkedList2.footprint
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
h: FStar.Monotonic.HyperStack.mem -> ll: LowStar.Lib.LinkedList2.t a -> Prims.Ghost LowStar.Monotonic.Buffer.loc
{ "end_col": 102, "end_line": 81, "start_col": 23, "start_line": 78 }
Prims.Ghost
val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True)
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v)
val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll =
false
null
false
LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v)
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[]
[ "FStar.Monotonic.HyperStack.mem", "LowStar.Lib.LinkedList2.t", "LowStar.Lib.LinkedList.cells", "LowStar.Monotonic.Buffer.deref", "LowStar.Lib.LinkedList.t", "LowStar.Buffer.trivial_preorder", "LowStar.Lib.LinkedList2.__proj__Mkt__item__ptr", "FStar.Ghost.reveal", "Prims.list", "FStar.Ghost.erased", "LowStar.Lib.LinkedList2.__proj__Mkt__item__v", "LowStar.Buffer.pointer", "LowStar.Lib.LinkedList.cell" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True)
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True)
[]
LowStar.Lib.LinkedList2.cells
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
h: FStar.Monotonic.HyperStack.mem -> ll: LowStar.Lib.LinkedList2.t a -> Prims.Ghost (Prims.list (LowStar.Buffer.pointer (LowStar.Lib.LinkedList.cell a)))
{ "end_col": 49, "end_line": 97, "start_col": 2, "start_line": 97 }
Prims.Tot
val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r
val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll =
false
null
false
let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) ((loc_addr_of_buffer ll.ptr) `loc_union` (loc_addr_of_buffer ll.v))) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[ "total" ]
[ "FStar.Monotonic.HyperStack.mem", "LowStar.Lib.LinkedList2.t", "Prims.l_and", "LowStar.Monotonic.Buffer.live", "LowStar.Lib.LinkedList.t", "LowStar.Buffer.trivial_preorder", "LowStar.Lib.LinkedList2.__proj__Mkt__item__ptr", "LowStar.Monotonic.Buffer.freeable", "FStar.Ghost.erased", "Prims.list", "LowStar.Lib.LinkedList2.__proj__Mkt__item__v", "LowStar.Lib.LinkedList.well_formed", "FStar.Ghost.reveal", "LowStar.Lib.LinkedList.invariant", "FStar.HyperStack.ST.is_eternal_region", "LowStar.Lib.LinkedList2.__proj__Mkt__item__r", "LowStar.Lib.LinkedList2.__proj__Mkt__item__spine_rid", "LowStar.Lib.LinkedList2.__proj__Mkt__item__ptr_v_rid", "LowStar.Monotonic.Buffer.loc_includes", "LowStar.Monotonic.Buffer.loc_region_only", "LowStar.Monotonic.Buffer.loc_union", "LowStar.Monotonic.Buffer.loc_addr_of_buffer", "LowStar.Lib.LinkedList.footprint", "LowStar.Monotonic.Buffer.loc_disjoint", "Prims.b2t", "FStar.Monotonic.HyperHeap.extends", "Prims.eq2", "FStar.Monotonic.HyperHeap.rid", "FStar.Monotonic.HyperHeap.parent", "LowStar.Monotonic.Buffer.deref" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; }
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0
[]
LowStar.Lib.LinkedList2.invariant
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
h: FStar.Monotonic.HyperStack.mem -> ll: LowStar.Lib.LinkedList2.t a -> Type0
{ "end_col": 32, "end_line": 73, "start_col": 23, "start_line": 41 }
FStar.Pervasives.Lemma
val footprint_in_r (#a: _) (h: HS.mem) (ll: t a) : Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll)))
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let footprint_in_r #a (h: HS.mem) (ll: t a): Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) //[ SMTPat (footprint h ll) ] = assert B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h (B.deref h ll.ptr) (v h ll))); assert B.(loc_includes (loc_all_regions_from true ll.r) (loc_region_only true ll.spine_rid))
val footprint_in_r (#a: _) (h: HS.mem) (ll: t a) : Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) let footprint_in_r #a (h: HS.mem) (ll: t a) : Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) =
false
null
true
assert B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h (B.deref h ll.ptr) (v h ll))); assert B.(loc_includes (loc_all_regions_from true ll.r) (loc_region_only true ll.spine_rid))
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[ "lemma" ]
[ "FStar.Monotonic.HyperStack.mem", "LowStar.Lib.LinkedList2.t", "Prims._assert", "LowStar.Monotonic.Buffer.loc_includes", "LowStar.Monotonic.Buffer.loc_all_regions_from", "LowStar.Lib.LinkedList2.__proj__Mkt__item__r", "LowStar.Monotonic.Buffer.loc_region_only", "LowStar.Lib.LinkedList2.__proj__Mkt__item__spine_rid", "Prims.unit", "LowStar.Lib.LinkedList.footprint", "LowStar.Monotonic.Buffer.deref", "LowStar.Lib.LinkedList.t", "LowStar.Buffer.trivial_preorder", "LowStar.Lib.LinkedList2.__proj__Mkt__item__ptr", "LowStar.Lib.LinkedList2.v", "LowStar.Lib.LinkedList2.invariant", "Prims.squash", "LowStar.Lib.LinkedList2.region_of", "LowStar.Lib.LinkedList2.footprint", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v) // A workaround to avoid putting loc_all_regions_from true in patterns. let region_of ll = B.loc_all_regions_from false ll.r /// This is a most useful lemma for clients: all the bookkeeping of this linked /// list, including spine, is subsumed in region r, at any time. /// /// This allows clients to allocate a new region for ``r``, maintain the /// invariant that ``r`` is disjoint from their own data structures, and get /// easy separation and framing for their own data this way. /// /// Note that we don't generally have to state such lemmas, since in many cases, /// footprints are static and do not grow dynamically. /// /// Unfortunately, this lemma requires stating some intermediary asserts for /// some triggers to fire, and I could not find a good SMTPat for it, so clients /// have to call it manually. See test/Wireguard.fst. let footprint_in_r #a (h: HS.mem) (ll: t a): Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) //[ SMTPat (footprint h ll) ]
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val footprint_in_r (#a: _) (h: HS.mem) (ll: t a) : Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll)))
[]
LowStar.Lib.LinkedList2.footprint_in_r
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
h: FStar.Monotonic.HyperStack.mem -> ll: LowStar.Lib.LinkedList2.t a -> FStar.Pervasives.Lemma (requires LowStar.Lib.LinkedList2.invariant h ll) (ensures LowStar.Monotonic.Buffer.loc_includes (LowStar.Lib.LinkedList2.region_of ll) (LowStar.Lib.LinkedList2.footprint h ll))
{ "end_col": 94, "end_line": 121, "start_col": 2, "start_line": 120 }
FStar.Pervasives.Lemma
val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll)
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let frame_region #_ ll _ h0 h1 = footprint_in_r h0 ll; ()
val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_region #_ ll _ h0 h1 =
false
null
true
footprint_in_r h0 ll; ()
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[ "lemma" ]
[ "LowStar.Lib.LinkedList2.t", "LowStar.Monotonic.Buffer.loc", "FStar.Monotonic.HyperStack.mem", "Prims.unit", "LowStar.Lib.LinkedList2.footprint_in_r" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v) // A workaround to avoid putting loc_all_regions_from true in patterns. let region_of ll = B.loc_all_regions_from false ll.r /// This is a most useful lemma for clients: all the bookkeeping of this linked /// list, including spine, is subsumed in region r, at any time. /// /// This allows clients to allocate a new region for ``r``, maintain the /// invariant that ``r`` is disjoint from their own data structures, and get /// easy separation and framing for their own data this way. /// /// Note that we don't generally have to state such lemmas, since in many cases, /// footprints are static and do not grow dynamically. /// /// Unfortunately, this lemma requires stating some intermediary asserts for /// some triggers to fire, and I could not find a good SMTPat for it, so clients /// have to call it manually. See test/Wireguard.fst. let footprint_in_r #a (h: HS.mem) (ll: t a): Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) //[ SMTPat (footprint h ll) ] = assert B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h (B.deref h ll.ptr) (v h ll))); assert B.(loc_includes (loc_all_regions_from true ll.r) (loc_region_only true ll.spine_rid)) /// I'm stating this one for completeness, but clients are able to derive this /// lemma automatically because the representation is transparent. val frame_footprint (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.loc_disjoint l (footprint h0 ll) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_footprint #_ _ _ _ _ = () /// This one is the framing lemma clients want to use if they adopt region-based /// reasoning for their LL2 instance. Owing to the lack of pattern on footprint_in_r, /// clients also have to call this one manually, sadly. val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll)
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll)
[]
LowStar.Lib.LinkedList2.frame_region
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
ll: LowStar.Lib.LinkedList2.t a -> l: LowStar.Monotonic.Buffer.loc -> h0: FStar.Monotonic.HyperStack.mem -> h1: FStar.Monotonic.HyperStack.mem -> FStar.Pervasives.Lemma (requires LowStar.Lib.LinkedList2.invariant h0 ll /\ LowStar.Monotonic.Buffer.loc_disjoint l (LowStar.Lib.LinkedList2.region_of ll) /\ LowStar.Monotonic.Buffer.modifies l h0 h1) (ensures LowStar.Lib.LinkedList2.invariant h1 ll /\ LowStar.Lib.LinkedList2.footprint h1 ll == LowStar.Lib.LinkedList2.footprint h0 ll)
{ "end_col": 4, "end_line": 149, "start_col": 2, "start_line": 148 }
FStar.HyperStack.ST.ST
val create_in: #a:Type -> r:HS.rid -> ST (t a) (requires fun h0 -> ST.is_eternal_region r) (ensures fun h0 ll h1 -> invariant h1 ll /\ B.(modifies loc_none h0 h1) /\ B.fresh_loc (footprint h1 ll) h0 h1 /\ v h1 ll == [] /\ cells h1 ll == [] /\ ll.r == r)
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let create_in #a r = let ptr_v_rid = ST.new_region r in let spine_rid = ST.new_region r in let ptr = B.malloc ptr_v_rid (B.null <: LL1.t a) 1ul in let v = B.malloc ptr_v_rid (G.hide ([] <: list a)) 1ul in { ptr; v; r; ptr_v_rid; spine_rid }
val create_in: #a:Type -> r:HS.rid -> ST (t a) (requires fun h0 -> ST.is_eternal_region r) (ensures fun h0 ll h1 -> invariant h1 ll /\ B.(modifies loc_none h0 h1) /\ B.fresh_loc (footprint h1 ll) h0 h1 /\ v h1 ll == [] /\ cells h1 ll == [] /\ ll.r == r) let create_in #a r =
true
null
false
let ptr_v_rid = ST.new_region r in let spine_rid = ST.new_region r in let ptr = B.malloc ptr_v_rid (B.null <: LL1.t a) 1ul in let v = B.malloc ptr_v_rid (G.hide ([] <: list a)) 1ul in { ptr = ptr; v = v; r = r; ptr_v_rid = ptr_v_rid; spine_rid = spine_rid }
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[]
[ "FStar.Monotonic.HyperHeap.rid", "LowStar.Lib.LinkedList2.Mkt", "LowStar.Lib.LinkedList2.t", "LowStar.Monotonic.Buffer.mbuffer", "FStar.Ghost.erased", "Prims.list", "LowStar.Buffer.trivial_preorder", "Prims.l_and", "Prims.eq2", "Prims.nat", "LowStar.Monotonic.Buffer.length", "FStar.UInt32.v", "FStar.UInt32.uint_to_t", "FStar.UInt32.t", "Prims.b2t", "Prims.op_Negation", "LowStar.Monotonic.Buffer.g_is_null", "LowStar.Monotonic.Buffer.frameOf", "LowStar.Monotonic.Buffer.freeable", "LowStar.Buffer.malloc", "FStar.Ghost.hide", "Prims.Nil", "FStar.UInt32.__uint_to_t", "LowStar.Lib.LinkedList.t", "LowStar.Buffer.null", "LowStar.Lib.LinkedList.cell", "FStar.HyperStack.ST.new_region" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v) // A workaround to avoid putting loc_all_regions_from true in patterns. let region_of ll = B.loc_all_regions_from false ll.r /// This is a most useful lemma for clients: all the bookkeeping of this linked /// list, including spine, is subsumed in region r, at any time. /// /// This allows clients to allocate a new region for ``r``, maintain the /// invariant that ``r`` is disjoint from their own data structures, and get /// easy separation and framing for their own data this way. /// /// Note that we don't generally have to state such lemmas, since in many cases, /// footprints are static and do not grow dynamically. /// /// Unfortunately, this lemma requires stating some intermediary asserts for /// some triggers to fire, and I could not find a good SMTPat for it, so clients /// have to call it manually. See test/Wireguard.fst. let footprint_in_r #a (h: HS.mem) (ll: t a): Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) //[ SMTPat (footprint h ll) ] = assert B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h (B.deref h ll.ptr) (v h ll))); assert B.(loc_includes (loc_all_regions_from true ll.r) (loc_region_only true ll.spine_rid)) /// I'm stating this one for completeness, but clients are able to derive this /// lemma automatically because the representation is transparent. val frame_footprint (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.loc_disjoint l (footprint h0 ll) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_footprint #_ _ _ _ _ = () /// This one is the framing lemma clients want to use if they adopt region-based /// reasoning for their LL2 instance. Owing to the lack of pattern on footprint_in_r, /// clients also have to call this one manually, sadly. val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_region #_ ll _ h0 h1 = footprint_in_r h0 ll; () /// Stateful operations /// ------------------- /// /// These are high-level and use the ``v`` function. I expect clients to drop /// into the LL1 representation only when they need to iterate, e.g. to find a /// list element, or to remove a list element. /// /// Note that these functions have a "dual" specification, both in terms of the /// ``footprint`` predicate (coarse) and in terms of the ``cells`` predicate /// (precise). Most clients will be content with the former and region-based /// reasoning, but advanced clients that e.g. take pointers directly to list /// cells will most likely need to use the latter. /// Heap allocation of a fresh linked list. val create_in: #a:Type -> r:HS.rid -> ST (t a) (requires fun h0 -> ST.is_eternal_region r) (ensures fun h0 ll h1 -> invariant h1 ll /\ B.(modifies loc_none h0 h1) /\ B.fresh_loc (footprint h1 ll) h0 h1 /\ v h1 ll == [] /\ cells h1 ll == [] /\ ll.r == r)
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 1, "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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val create_in: #a:Type -> r:HS.rid -> ST (t a) (requires fun h0 -> ST.is_eternal_region r) (ensures fun h0 ll h1 -> invariant h1 ll /\ B.(modifies loc_none h0 h1) /\ B.fresh_loc (footprint h1 ll) h0 h1 /\ v h1 ll == [] /\ cells h1 ll == [] /\ ll.r == r)
[]
LowStar.Lib.LinkedList2.create_in
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
r: FStar.Monotonic.HyperHeap.rid -> FStar.HyperStack.ST.ST (LowStar.Lib.LinkedList2.t a)
{ "end_col": 37, "end_line": 182, "start_col": 20, "start_line": 177 }
FStar.HyperStack.ST.ST
val free: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> B.(modifies (footprint h0 ll) h0 h1))
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let free #_ ll = let v = !* ll.v in LL1.free #_ #v ll.ptr; B.free ll.ptr; B.free ll.v
val free: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> B.(modifies (footprint h0 ll) h0 h1)) let free #_ ll =
true
null
false
let v = !*ll.v in LL1.free #_ #v ll.ptr; B.free ll.ptr; B.free ll.v
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[]
[ "LowStar.Lib.LinkedList2.t", "LowStar.Monotonic.Buffer.free", "FStar.Ghost.erased", "Prims.list", "LowStar.Buffer.trivial_preorder", "LowStar.Lib.LinkedList2.__proj__Mkt__item__v", "Prims.unit", "LowStar.Lib.LinkedList.t", "LowStar.Lib.LinkedList2.__proj__Mkt__item__ptr", "LowStar.Lib.LinkedList.free", "LowStar.BufferOps.op_Bang_Star" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v) // A workaround to avoid putting loc_all_regions_from true in patterns. let region_of ll = B.loc_all_regions_from false ll.r /// This is a most useful lemma for clients: all the bookkeeping of this linked /// list, including spine, is subsumed in region r, at any time. /// /// This allows clients to allocate a new region for ``r``, maintain the /// invariant that ``r`` is disjoint from their own data structures, and get /// easy separation and framing for their own data this way. /// /// Note that we don't generally have to state such lemmas, since in many cases, /// footprints are static and do not grow dynamically. /// /// Unfortunately, this lemma requires stating some intermediary asserts for /// some triggers to fire, and I could not find a good SMTPat for it, so clients /// have to call it manually. See test/Wireguard.fst. let footprint_in_r #a (h: HS.mem) (ll: t a): Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) //[ SMTPat (footprint h ll) ] = assert B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h (B.deref h ll.ptr) (v h ll))); assert B.(loc_includes (loc_all_regions_from true ll.r) (loc_region_only true ll.spine_rid)) /// I'm stating this one for completeness, but clients are able to derive this /// lemma automatically because the representation is transparent. val frame_footprint (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.loc_disjoint l (footprint h0 ll) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_footprint #_ _ _ _ _ = () /// This one is the framing lemma clients want to use if they adopt region-based /// reasoning for their LL2 instance. Owing to the lack of pattern on footprint_in_r, /// clients also have to call this one manually, sadly. val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_region #_ ll _ h0 h1 = footprint_in_r h0 ll; () /// Stateful operations /// ------------------- /// /// These are high-level and use the ``v`` function. I expect clients to drop /// into the LL1 representation only when they need to iterate, e.g. to find a /// list element, or to remove a list element. /// /// Note that these functions have a "dual" specification, both in terms of the /// ``footprint`` predicate (coarse) and in terms of the ``cells`` predicate /// (precise). Most clients will be content with the former and region-based /// reasoning, but advanced clients that e.g. take pointers directly to list /// cells will most likely need to use the latter. /// Heap allocation of a fresh linked list. val create_in: #a:Type -> r:HS.rid -> ST (t a) (requires fun h0 -> ST.is_eternal_region r) (ensures fun h0 ll h1 -> invariant h1 ll /\ B.(modifies loc_none h0 h1) /\ B.fresh_loc (footprint h1 ll) h0 h1 /\ v h1 ll == [] /\ cells h1 ll == [] /\ ll.r == r) #push-options "--fuel 1" let create_in #a r = let ptr_v_rid = ST.new_region r in let spine_rid = ST.new_region r in let ptr = B.malloc ptr_v_rid (B.null <: LL1.t a) 1ul in let v = B.malloc ptr_v_rid (G.hide ([] <: list a)) 1ul in { ptr; v; r; ptr_v_rid; spine_rid } #pop-options val push: #a:Type -> ll: t a -> x: a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ // Coarse modifies clause B.(modifies (footprint h0 ll) h0 h1) /\ // Functional spec v h1 ll == x :: v h0 ll /\ // Precise effect on memory, ignore if you're content with reasoning via the // footprint (which is known to be always included in the region). Cons? (cells h1 ll) /\ List.Tot.tl (cells h1 ll) == cells h0 ll /\ B.fresh_loc (B.loc_addr_of_buffer (List.Tot.hd (cells h1 ll))) h0 h1) #push-options "--fuel 1 --ifuel 1" let push #a ll x = LL1.push ll.spine_rid (!* ll.v) ll.ptr x; let v = !* ll.v in ll.v *= G.hide (x :: v) #pop-options #push-options "--fuel 1" val pop: #a:Type -> ll: t a -> ST a (requires fun h0 -> invariant h0 ll /\ Cons? (v h0 ll)) (ensures fun h0 x h1 -> let hd :: tl = v h0 ll in invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) let pop #a ll = let r = LL1.pop ll.spine_rid (!* ll.v) ll.ptr in let v = !* ll.v in ll.v *= G.hide (List.Tot.tl v); r val maybe_pop: #a:Type -> ll: t a -> ST (option a) (requires fun h0 -> invariant h0 ll) (ensures fun h0 x h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ ( // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ match x with | Some x -> Cons? (v h0 ll) /\ ( let hd :: tl = v h0 ll in v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) | None -> Nil? (v h0 ll))) #pop-options #push-options "--fuel 1 --ifuel 1 --z3rlimit 50" let maybe_pop #a ll = if not (B.is_null (!* ll.ptr)) then let v = !* ll.v in let r = LL1.pop ll.spine_rid (!* ll.v) ll.ptr in ll.v *= G.hide (List.Tot.tl v); Some r else None #pop-options val clear: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v `loc_union` loc_region_only true ll.spine_rid) h0 h1) /\ v h1 ll == [] /\ cells h1 ll == []) #push-options "--fuel 1" let clear #a ll = let v = !* ll.v in LL1.free #_ #v ll.ptr; ll.v *= G.hide [] #pop-options val free: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> B.(modifies (footprint h0 ll) h0 h1))
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val free: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> B.(modifies (footprint h0 ll) h0 h1))
[]
LowStar.Lib.LinkedList2.free
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
ll: LowStar.Lib.LinkedList2.t a -> FStar.HyperStack.ST.ST Prims.unit
{ "end_col": 13, "end_line": 282, "start_col": 16, "start_line": 278 }
FStar.HyperStack.ST.ST
val clear: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v `loc_union` loc_region_only true ll.spine_rid) h0 h1) /\ v h1 ll == [] /\ cells h1 ll == [])
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let clear #a ll = let v = !* ll.v in LL1.free #_ #v ll.ptr; ll.v *= G.hide []
val clear: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v `loc_union` loc_region_only true ll.spine_rid) h0 h1) /\ v h1 ll == [] /\ cells h1 ll == []) let clear #a ll =
true
null
false
let v = !*ll.v in LL1.free #_ #v ll.ptr; ll.v *= G.hide []
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[]
[ "LowStar.Lib.LinkedList2.t", "LowStar.BufferOps.op_Star_Equals", "FStar.Ghost.erased", "Prims.list", "LowStar.Buffer.trivial_preorder", "LowStar.Lib.LinkedList2.__proj__Mkt__item__v", "FStar.Ghost.hide", "Prims.Nil", "Prims.unit", "LowStar.Lib.LinkedList.free", "LowStar.Lib.LinkedList2.__proj__Mkt__item__ptr", "LowStar.BufferOps.op_Bang_Star" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v) // A workaround to avoid putting loc_all_regions_from true in patterns. let region_of ll = B.loc_all_regions_from false ll.r /// This is a most useful lemma for clients: all the bookkeeping of this linked /// list, including spine, is subsumed in region r, at any time. /// /// This allows clients to allocate a new region for ``r``, maintain the /// invariant that ``r`` is disjoint from their own data structures, and get /// easy separation and framing for their own data this way. /// /// Note that we don't generally have to state such lemmas, since in many cases, /// footprints are static and do not grow dynamically. /// /// Unfortunately, this lemma requires stating some intermediary asserts for /// some triggers to fire, and I could not find a good SMTPat for it, so clients /// have to call it manually. See test/Wireguard.fst. let footprint_in_r #a (h: HS.mem) (ll: t a): Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) //[ SMTPat (footprint h ll) ] = assert B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h (B.deref h ll.ptr) (v h ll))); assert B.(loc_includes (loc_all_regions_from true ll.r) (loc_region_only true ll.spine_rid)) /// I'm stating this one for completeness, but clients are able to derive this /// lemma automatically because the representation is transparent. val frame_footprint (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.loc_disjoint l (footprint h0 ll) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_footprint #_ _ _ _ _ = () /// This one is the framing lemma clients want to use if they adopt region-based /// reasoning for their LL2 instance. Owing to the lack of pattern on footprint_in_r, /// clients also have to call this one manually, sadly. val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_region #_ ll _ h0 h1 = footprint_in_r h0 ll; () /// Stateful operations /// ------------------- /// /// These are high-level and use the ``v`` function. I expect clients to drop /// into the LL1 representation only when they need to iterate, e.g. to find a /// list element, or to remove a list element. /// /// Note that these functions have a "dual" specification, both in terms of the /// ``footprint`` predicate (coarse) and in terms of the ``cells`` predicate /// (precise). Most clients will be content with the former and region-based /// reasoning, but advanced clients that e.g. take pointers directly to list /// cells will most likely need to use the latter. /// Heap allocation of a fresh linked list. val create_in: #a:Type -> r:HS.rid -> ST (t a) (requires fun h0 -> ST.is_eternal_region r) (ensures fun h0 ll h1 -> invariant h1 ll /\ B.(modifies loc_none h0 h1) /\ B.fresh_loc (footprint h1 ll) h0 h1 /\ v h1 ll == [] /\ cells h1 ll == [] /\ ll.r == r) #push-options "--fuel 1" let create_in #a r = let ptr_v_rid = ST.new_region r in let spine_rid = ST.new_region r in let ptr = B.malloc ptr_v_rid (B.null <: LL1.t a) 1ul in let v = B.malloc ptr_v_rid (G.hide ([] <: list a)) 1ul in { ptr; v; r; ptr_v_rid; spine_rid } #pop-options val push: #a:Type -> ll: t a -> x: a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ // Coarse modifies clause B.(modifies (footprint h0 ll) h0 h1) /\ // Functional spec v h1 ll == x :: v h0 ll /\ // Precise effect on memory, ignore if you're content with reasoning via the // footprint (which is known to be always included in the region). Cons? (cells h1 ll) /\ List.Tot.tl (cells h1 ll) == cells h0 ll /\ B.fresh_loc (B.loc_addr_of_buffer (List.Tot.hd (cells h1 ll))) h0 h1) #push-options "--fuel 1 --ifuel 1" let push #a ll x = LL1.push ll.spine_rid (!* ll.v) ll.ptr x; let v = !* ll.v in ll.v *= G.hide (x :: v) #pop-options #push-options "--fuel 1" val pop: #a:Type -> ll: t a -> ST a (requires fun h0 -> invariant h0 ll /\ Cons? (v h0 ll)) (ensures fun h0 x h1 -> let hd :: tl = v h0 ll in invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) let pop #a ll = let r = LL1.pop ll.spine_rid (!* ll.v) ll.ptr in let v = !* ll.v in ll.v *= G.hide (List.Tot.tl v); r val maybe_pop: #a:Type -> ll: t a -> ST (option a) (requires fun h0 -> invariant h0 ll) (ensures fun h0 x h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ ( // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ match x with | Some x -> Cons? (v h0 ll) /\ ( let hd :: tl = v h0 ll in v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) | None -> Nil? (v h0 ll))) #pop-options #push-options "--fuel 1 --ifuel 1 --z3rlimit 50" let maybe_pop #a ll = if not (B.is_null (!* ll.ptr)) then let v = !* ll.v in let r = LL1.pop ll.spine_rid (!* ll.v) ll.ptr in ll.v *= G.hide (List.Tot.tl v); Some r else None #pop-options val clear: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v `loc_union` loc_region_only true ll.spine_rid) h0 h1) /\ v h1 ll == [] /\ cells h1 ll == [])
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 1, "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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val clear: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v `loc_union` loc_region_only true ll.spine_rid) h0 h1) /\ v h1 ll == [] /\ cells h1 ll == [])
[]
LowStar.Lib.LinkedList2.clear
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
ll: LowStar.Lib.LinkedList2.t a -> FStar.HyperStack.ST.ST Prims.unit
{ "end_col": 19, "end_line": 269, "start_col": 17, "start_line": 266 }
FStar.HyperStack.ST.ST
val pop: #a:Type -> ll: t a -> ST a (requires fun h0 -> invariant h0 ll /\ Cons? (v h0 ll)) (ensures fun h0 x h1 -> let hd :: tl = v h0 ll in invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd)
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let pop #a ll = let r = LL1.pop ll.spine_rid (!* ll.v) ll.ptr in let v = !* ll.v in ll.v *= G.hide (List.Tot.tl v); r
val pop: #a:Type -> ll: t a -> ST a (requires fun h0 -> invariant h0 ll /\ Cons? (v h0 ll)) (ensures fun h0 x h1 -> let hd :: tl = v h0 ll in invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) let pop #a ll =
true
null
false
let r = LL1.pop ll.spine_rid (!*ll.v) ll.ptr in let v = !*ll.v in ll.v *= G.hide (List.Tot.tl v); r
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[]
[ "LowStar.Lib.LinkedList2.t", "Prims.unit", "LowStar.BufferOps.op_Star_Equals", "FStar.Ghost.erased", "Prims.list", "LowStar.Buffer.trivial_preorder", "LowStar.Lib.LinkedList2.__proj__Mkt__item__v", "FStar.Ghost.hide", "FStar.List.Tot.Base.tl", "FStar.Ghost.reveal", "LowStar.BufferOps.op_Bang_Star", "LowStar.Lib.LinkedList.pop", "LowStar.Lib.LinkedList2.__proj__Mkt__item__spine_rid", "LowStar.Lib.LinkedList2.__proj__Mkt__item__ptr" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v) // A workaround to avoid putting loc_all_regions_from true in patterns. let region_of ll = B.loc_all_regions_from false ll.r /// This is a most useful lemma for clients: all the bookkeeping of this linked /// list, including spine, is subsumed in region r, at any time. /// /// This allows clients to allocate a new region for ``r``, maintain the /// invariant that ``r`` is disjoint from their own data structures, and get /// easy separation and framing for their own data this way. /// /// Note that we don't generally have to state such lemmas, since in many cases, /// footprints are static and do not grow dynamically. /// /// Unfortunately, this lemma requires stating some intermediary asserts for /// some triggers to fire, and I could not find a good SMTPat for it, so clients /// have to call it manually. See test/Wireguard.fst. let footprint_in_r #a (h: HS.mem) (ll: t a): Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) //[ SMTPat (footprint h ll) ] = assert B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h (B.deref h ll.ptr) (v h ll))); assert B.(loc_includes (loc_all_regions_from true ll.r) (loc_region_only true ll.spine_rid)) /// I'm stating this one for completeness, but clients are able to derive this /// lemma automatically because the representation is transparent. val frame_footprint (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.loc_disjoint l (footprint h0 ll) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_footprint #_ _ _ _ _ = () /// This one is the framing lemma clients want to use if they adopt region-based /// reasoning for their LL2 instance. Owing to the lack of pattern on footprint_in_r, /// clients also have to call this one manually, sadly. val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_region #_ ll _ h0 h1 = footprint_in_r h0 ll; () /// Stateful operations /// ------------------- /// /// These are high-level and use the ``v`` function. I expect clients to drop /// into the LL1 representation only when they need to iterate, e.g. to find a /// list element, or to remove a list element. /// /// Note that these functions have a "dual" specification, both in terms of the /// ``footprint`` predicate (coarse) and in terms of the ``cells`` predicate /// (precise). Most clients will be content with the former and region-based /// reasoning, but advanced clients that e.g. take pointers directly to list /// cells will most likely need to use the latter. /// Heap allocation of a fresh linked list. val create_in: #a:Type -> r:HS.rid -> ST (t a) (requires fun h0 -> ST.is_eternal_region r) (ensures fun h0 ll h1 -> invariant h1 ll /\ B.(modifies loc_none h0 h1) /\ B.fresh_loc (footprint h1 ll) h0 h1 /\ v h1 ll == [] /\ cells h1 ll == [] /\ ll.r == r) #push-options "--fuel 1" let create_in #a r = let ptr_v_rid = ST.new_region r in let spine_rid = ST.new_region r in let ptr = B.malloc ptr_v_rid (B.null <: LL1.t a) 1ul in let v = B.malloc ptr_v_rid (G.hide ([] <: list a)) 1ul in { ptr; v; r; ptr_v_rid; spine_rid } #pop-options val push: #a:Type -> ll: t a -> x: a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ // Coarse modifies clause B.(modifies (footprint h0 ll) h0 h1) /\ // Functional spec v h1 ll == x :: v h0 ll /\ // Precise effect on memory, ignore if you're content with reasoning via the // footprint (which is known to be always included in the region). Cons? (cells h1 ll) /\ List.Tot.tl (cells h1 ll) == cells h0 ll /\ B.fresh_loc (B.loc_addr_of_buffer (List.Tot.hd (cells h1 ll))) h0 h1) #push-options "--fuel 1 --ifuel 1" let push #a ll x = LL1.push ll.spine_rid (!* ll.v) ll.ptr x; let v = !* ll.v in ll.v *= G.hide (x :: v) #pop-options #push-options "--fuel 1" val pop: #a:Type -> ll: t a -> ST a (requires fun h0 -> invariant h0 ll /\ Cons? (v h0 ll)) (ensures fun h0 x h1 -> let hd :: tl = v h0 ll in invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd)
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 1, "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_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val pop: #a:Type -> ll: t a -> ST a (requires fun h0 -> invariant h0 ll /\ Cons? (v h0 ll)) (ensures fun h0 x h1 -> let hd :: tl = v h0 ll in invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd)
[]
LowStar.Lib.LinkedList2.pop
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
ll: LowStar.Lib.LinkedList2.t a -> FStar.HyperStack.ST.ST a
{ "end_col": 3, "end_line": 224, "start_col": 15, "start_line": 220 }
FStar.HyperStack.ST.ST
val push: #a:Type -> ll: t a -> x: a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ // Coarse modifies clause B.(modifies (footprint h0 ll) h0 h1) /\ // Functional spec v h1 ll == x :: v h0 ll /\ // Precise effect on memory, ignore if you're content with reasoning via the // footprint (which is known to be always included in the region). Cons? (cells h1 ll) /\ List.Tot.tl (cells h1 ll) == cells h0 ll /\ B.fresh_loc (B.loc_addr_of_buffer (List.Tot.hd (cells h1 ll))) h0 h1)
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let push #a ll x = LL1.push ll.spine_rid (!* ll.v) ll.ptr x; let v = !* ll.v in ll.v *= G.hide (x :: v)
val push: #a:Type -> ll: t a -> x: a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ // Coarse modifies clause B.(modifies (footprint h0 ll) h0 h1) /\ // Functional spec v h1 ll == x :: v h0 ll /\ // Precise effect on memory, ignore if you're content with reasoning via the // footprint (which is known to be always included in the region). Cons? (cells h1 ll) /\ List.Tot.tl (cells h1 ll) == cells h0 ll /\ B.fresh_loc (B.loc_addr_of_buffer (List.Tot.hd (cells h1 ll))) h0 h1) let push #a ll x =
true
null
false
LL1.push ll.spine_rid (!*ll.v) ll.ptr x; let v = !*ll.v in ll.v *= G.hide (x :: v)
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[]
[ "LowStar.Lib.LinkedList2.t", "LowStar.BufferOps.op_Star_Equals", "FStar.Ghost.erased", "Prims.list", "LowStar.Buffer.trivial_preorder", "LowStar.Lib.LinkedList2.__proj__Mkt__item__v", "FStar.Ghost.hide", "Prims.Cons", "FStar.Ghost.reveal", "Prims.unit", "LowStar.BufferOps.op_Bang_Star", "LowStar.Lib.LinkedList.push", "LowStar.Lib.LinkedList2.__proj__Mkt__item__spine_rid", "LowStar.Lib.LinkedList2.__proj__Mkt__item__ptr" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v) // A workaround to avoid putting loc_all_regions_from true in patterns. let region_of ll = B.loc_all_regions_from false ll.r /// This is a most useful lemma for clients: all the bookkeeping of this linked /// list, including spine, is subsumed in region r, at any time. /// /// This allows clients to allocate a new region for ``r``, maintain the /// invariant that ``r`` is disjoint from their own data structures, and get /// easy separation and framing for their own data this way. /// /// Note that we don't generally have to state such lemmas, since in many cases, /// footprints are static and do not grow dynamically. /// /// Unfortunately, this lemma requires stating some intermediary asserts for /// some triggers to fire, and I could not find a good SMTPat for it, so clients /// have to call it manually. See test/Wireguard.fst. let footprint_in_r #a (h: HS.mem) (ll: t a): Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) //[ SMTPat (footprint h ll) ] = assert B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h (B.deref h ll.ptr) (v h ll))); assert B.(loc_includes (loc_all_regions_from true ll.r) (loc_region_only true ll.spine_rid)) /// I'm stating this one for completeness, but clients are able to derive this /// lemma automatically because the representation is transparent. val frame_footprint (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.loc_disjoint l (footprint h0 ll) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_footprint #_ _ _ _ _ = () /// This one is the framing lemma clients want to use if they adopt region-based /// reasoning for their LL2 instance. Owing to the lack of pattern on footprint_in_r, /// clients also have to call this one manually, sadly. val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_region #_ ll _ h0 h1 = footprint_in_r h0 ll; () /// Stateful operations /// ------------------- /// /// These are high-level and use the ``v`` function. I expect clients to drop /// into the LL1 representation only when they need to iterate, e.g. to find a /// list element, or to remove a list element. /// /// Note that these functions have a "dual" specification, both in terms of the /// ``footprint`` predicate (coarse) and in terms of the ``cells`` predicate /// (precise). Most clients will be content with the former and region-based /// reasoning, but advanced clients that e.g. take pointers directly to list /// cells will most likely need to use the latter. /// Heap allocation of a fresh linked list. val create_in: #a:Type -> r:HS.rid -> ST (t a) (requires fun h0 -> ST.is_eternal_region r) (ensures fun h0 ll h1 -> invariant h1 ll /\ B.(modifies loc_none h0 h1) /\ B.fresh_loc (footprint h1 ll) h0 h1 /\ v h1 ll == [] /\ cells h1 ll == [] /\ ll.r == r) #push-options "--fuel 1" let create_in #a r = let ptr_v_rid = ST.new_region r in let spine_rid = ST.new_region r in let ptr = B.malloc ptr_v_rid (B.null <: LL1.t a) 1ul in let v = B.malloc ptr_v_rid (G.hide ([] <: list a)) 1ul in { ptr; v; r; ptr_v_rid; spine_rid } #pop-options val push: #a:Type -> ll: t a -> x: a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ // Coarse modifies clause B.(modifies (footprint h0 ll) h0 h1) /\ // Functional spec v h1 ll == x :: v h0 ll /\ // Precise effect on memory, ignore if you're content with reasoning via the // footprint (which is known to be always included in the region). Cons? (cells h1 ll) /\ List.Tot.tl (cells h1 ll) == cells h0 ll /\ B.fresh_loc (B.loc_addr_of_buffer (List.Tot.hd (cells h1 ll))) h0 h1) #push-options "--fuel 1 --ifuel 1"
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 1, "initial_ifuel": 1, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val push: #a:Type -> ll: t a -> x: a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ // Coarse modifies clause B.(modifies (footprint h0 ll) h0 h1) /\ // Functional spec v h1 ll == x :: v h0 ll /\ // Precise effect on memory, ignore if you're content with reasoning via the // footprint (which is known to be always included in the region). Cons? (cells h1 ll) /\ List.Tot.tl (cells h1 ll) == cells h0 ll /\ B.fresh_loc (B.loc_addr_of_buffer (List.Tot.hd (cells h1 ll))) h0 h1)
[]
LowStar.Lib.LinkedList2.push
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
ll: LowStar.Lib.LinkedList2.t a -> x: a -> FStar.HyperStack.ST.ST Prims.unit
{ "end_col": 25, "end_line": 203, "start_col": 2, "start_line": 201 }
FStar.HyperStack.ST.ST
val maybe_pop: #a:Type -> ll: t a -> ST (option a) (requires fun h0 -> invariant h0 ll) (ensures fun h0 x h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ ( // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ match x with | Some x -> Cons? (v h0 ll) /\ ( let hd :: tl = v h0 ll in v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) | None -> Nil? (v h0 ll)))
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let maybe_pop #a ll = if not (B.is_null (!* ll.ptr)) then let v = !* ll.v in let r = LL1.pop ll.spine_rid (!* ll.v) ll.ptr in ll.v *= G.hide (List.Tot.tl v); Some r else None
val maybe_pop: #a:Type -> ll: t a -> ST (option a) (requires fun h0 -> invariant h0 ll) (ensures fun h0 x h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ ( // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ match x with | Some x -> Cons? (v h0 ll) /\ ( let hd :: tl = v h0 ll in v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) | None -> Nil? (v h0 ll))) let maybe_pop #a ll =
true
null
false
if not (B.is_null (!*ll.ptr)) then let v = !*ll.v in let r = LL1.pop ll.spine_rid (!*ll.v) ll.ptr in ll.v *= G.hide (List.Tot.tl v); Some r else None
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[]
[ "LowStar.Lib.LinkedList2.t", "FStar.Pervasives.Native.Some", "FStar.Pervasives.Native.option", "Prims.unit", "LowStar.BufferOps.op_Star_Equals", "FStar.Ghost.erased", "Prims.list", "LowStar.Buffer.trivial_preorder", "LowStar.Lib.LinkedList2.__proj__Mkt__item__v", "FStar.Ghost.hide", "FStar.List.Tot.Base.tl", "FStar.Ghost.reveal", "LowStar.Lib.LinkedList.pop", "LowStar.Lib.LinkedList2.__proj__Mkt__item__spine_rid", "LowStar.Lib.LinkedList2.__proj__Mkt__item__ptr", "LowStar.BufferOps.op_Bang_Star", "Prims.bool", "FStar.Pervasives.Native.None", "Prims.op_Negation", "LowStar.Monotonic.Buffer.is_null", "LowStar.Lib.LinkedList.cell", "LowStar.Monotonic.Buffer.mbuffer", "LowStar.Lib.LinkedList.t" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v) // A workaround to avoid putting loc_all_regions_from true in patterns. let region_of ll = B.loc_all_regions_from false ll.r /// This is a most useful lemma for clients: all the bookkeeping of this linked /// list, including spine, is subsumed in region r, at any time. /// /// This allows clients to allocate a new region for ``r``, maintain the /// invariant that ``r`` is disjoint from their own data structures, and get /// easy separation and framing for their own data this way. /// /// Note that we don't generally have to state such lemmas, since in many cases, /// footprints are static and do not grow dynamically. /// /// Unfortunately, this lemma requires stating some intermediary asserts for /// some triggers to fire, and I could not find a good SMTPat for it, so clients /// have to call it manually. See test/Wireguard.fst. let footprint_in_r #a (h: HS.mem) (ll: t a): Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) //[ SMTPat (footprint h ll) ] = assert B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h (B.deref h ll.ptr) (v h ll))); assert B.(loc_includes (loc_all_regions_from true ll.r) (loc_region_only true ll.spine_rid)) /// I'm stating this one for completeness, but clients are able to derive this /// lemma automatically because the representation is transparent. val frame_footprint (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.loc_disjoint l (footprint h0 ll) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_footprint #_ _ _ _ _ = () /// This one is the framing lemma clients want to use if they adopt region-based /// reasoning for their LL2 instance. Owing to the lack of pattern on footprint_in_r, /// clients also have to call this one manually, sadly. val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_region #_ ll _ h0 h1 = footprint_in_r h0 ll; () /// Stateful operations /// ------------------- /// /// These are high-level and use the ``v`` function. I expect clients to drop /// into the LL1 representation only when they need to iterate, e.g. to find a /// list element, or to remove a list element. /// /// Note that these functions have a "dual" specification, both in terms of the /// ``footprint`` predicate (coarse) and in terms of the ``cells`` predicate /// (precise). Most clients will be content with the former and region-based /// reasoning, but advanced clients that e.g. take pointers directly to list /// cells will most likely need to use the latter. /// Heap allocation of a fresh linked list. val create_in: #a:Type -> r:HS.rid -> ST (t a) (requires fun h0 -> ST.is_eternal_region r) (ensures fun h0 ll h1 -> invariant h1 ll /\ B.(modifies loc_none h0 h1) /\ B.fresh_loc (footprint h1 ll) h0 h1 /\ v h1 ll == [] /\ cells h1 ll == [] /\ ll.r == r) #push-options "--fuel 1" let create_in #a r = let ptr_v_rid = ST.new_region r in let spine_rid = ST.new_region r in let ptr = B.malloc ptr_v_rid (B.null <: LL1.t a) 1ul in let v = B.malloc ptr_v_rid (G.hide ([] <: list a)) 1ul in { ptr; v; r; ptr_v_rid; spine_rid } #pop-options val push: #a:Type -> ll: t a -> x: a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ // Coarse modifies clause B.(modifies (footprint h0 ll) h0 h1) /\ // Functional spec v h1 ll == x :: v h0 ll /\ // Precise effect on memory, ignore if you're content with reasoning via the // footprint (which is known to be always included in the region). Cons? (cells h1 ll) /\ List.Tot.tl (cells h1 ll) == cells h0 ll /\ B.fresh_loc (B.loc_addr_of_buffer (List.Tot.hd (cells h1 ll))) h0 h1) #push-options "--fuel 1 --ifuel 1" let push #a ll x = LL1.push ll.spine_rid (!* ll.v) ll.ptr x; let v = !* ll.v in ll.v *= G.hide (x :: v) #pop-options #push-options "--fuel 1" val pop: #a:Type -> ll: t a -> ST a (requires fun h0 -> invariant h0 ll /\ Cons? (v h0 ll)) (ensures fun h0 x h1 -> let hd :: tl = v h0 ll in invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) let pop #a ll = let r = LL1.pop ll.spine_rid (!* ll.v) ll.ptr in let v = !* ll.v in ll.v *= G.hide (List.Tot.tl v); r val maybe_pop: #a:Type -> ll: t a -> ST (option a) (requires fun h0 -> invariant h0 ll) (ensures fun h0 x h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ ( // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ match x with | Some x -> Cons? (v h0 ll) /\ ( let hd :: tl = v h0 ll in v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) | None -> Nil? (v h0 ll))) #pop-options #push-options "--fuel 1 --ifuel 1 --z3rlimit 50"
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 1, "initial_ifuel": 1, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val maybe_pop: #a:Type -> ll: t a -> ST (option a) (requires fun h0 -> invariant h0 ll) (ensures fun h0 x h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ ( // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ match x with | Some x -> Cons? (v h0 ll) /\ ( let hd :: tl = v h0 ll in v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) | None -> Nil? (v h0 ll)))
[]
LowStar.Lib.LinkedList2.maybe_pop
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
ll: LowStar.Lib.LinkedList2.t a -> FStar.HyperStack.ST.ST (FStar.Pervasives.Native.option a)
{ "end_col": 8, "end_line": 252, "start_col": 3, "start_line": 246 }
FStar.HyperStack.ST.St
val test: Prims.unit -> St unit
[ { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": true, "full_module": "LowStar.Lib.LinkedList", "short_module": "LL1" }, { "abbrev": true, "full_module": "FStar.HyperStack.ST", "short_module": "ST" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": true, "full_module": "FStar.List.Tot", "short_module": "L" }, { "abbrev": true, "full_module": "FStar.Ghost", "short_module": "G" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "LowStar.BufferOps", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "LowStar.Lib", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test (): St unit = let r = HS.(new_region root) in let b = B.malloc HS.root 0ul 1ul in let l: t UInt32.t = create_in r in push l 0ul; push l 1ul; push l 2ul; B.upd b 0ul 1ul; let h0 = ST.get () in assert (v h0 l == [ 2ul; 1ul; 0ul ]); assert (B.deref h0 b == 1ul); ignore (pop l); let h1 = ST.get () in assert (v h1 l == [ 1ul; 0ul ]); assert (B.deref h0 b == 1ul); clear l; let h2 = ST.get () in assert (v h2 l == []); assert (B.deref h2 b == 1ul); free l; ()
val test: Prims.unit -> St unit let test () : St unit =
true
null
false
let r = let open HS in new_region root in let b = B.malloc HS.root 0ul 1ul in let l:t UInt32.t = create_in r in push l 0ul; push l 1ul; push l 2ul; B.upd b 0ul 1ul; let h0 = ST.get () in assert (v h0 l == [2ul; 1ul; 0ul]); assert (B.deref h0 b == 1ul); ignore (pop l); let h1 = ST.get () in assert (v h1 l == [1ul; 0ul]); assert (B.deref h0 b == 1ul); clear l; let h2 = ST.get () in assert (v h2 l == []); assert (B.deref h2 b == 1ul); free l; ()
{ "checked_file": "LowStar.Lib.LinkedList2.fst.checked", "dependencies": [ "prims.fst.checked", "LowStar.Lib.LinkedList.fst.checked", "LowStar.BufferOps.fst.checked", "LowStar.Buffer.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "LowStar.Lib.LinkedList2.fst" }
[]
[ "Prims.unit", "LowStar.Lib.LinkedList2.free", "FStar.UInt32.t", "Prims._assert", "Prims.eq2", "LowStar.Monotonic.Buffer.deref", "LowStar.Buffer.trivial_preorder", "FStar.UInt32.__uint_to_t", "Prims.list", "LowStar.Lib.LinkedList2.v", "Prims.Nil", "FStar.Monotonic.HyperStack.mem", "FStar.HyperStack.ST.get", "LowStar.Lib.LinkedList2.clear", "Prims.Cons", "FStar.Pervasives.ignore", "LowStar.Lib.LinkedList2.pop", "LowStar.Monotonic.Buffer.upd", "LowStar.Lib.LinkedList2.push", "LowStar.Lib.LinkedList2.t", "LowStar.Lib.LinkedList2.create_in", "LowStar.Monotonic.Buffer.mbuffer", "Prims.l_and", "Prims.nat", "LowStar.Monotonic.Buffer.length", "FStar.UInt32.v", "FStar.UInt32.uint_to_t", "Prims.b2t", "Prims.op_Negation", "LowStar.Monotonic.Buffer.g_is_null", "FStar.Monotonic.HyperHeap.rid", "LowStar.Monotonic.Buffer.frameOf", "FStar.Monotonic.HyperHeap.root", "LowStar.Monotonic.Buffer.freeable", "LowStar.Buffer.malloc", "FStar.HyperStack.ST.new_region" ]
[]
module LowStar.Lib.LinkedList2 /// This module provides a convenient abstraction over LL11 which uses a ``v`` /// function, therefore eliminating a large amount of syntactic overhead. It /// also takes care of packing the existential, dealing with the extra outer /// reference, and providing inclusion of the footprint in a static region at /// all times. /// /// Clients who want to modify the spine of the list or iterate over it can /// always use the LL11 definitions. AssocList is such an example. open LowStar.BufferOps module B = LowStar.Buffer module HS = FStar.HyperStack module G = FStar.Ghost module L = FStar.List.Tot module U32 = FStar.UInt32 module ST = FStar.HyperStack.ST module LL1 = LowStar.Lib.LinkedList open FStar.HyperStack.ST #set-options "--fuel 0 --ifuel 0" // Thanks to the KaRaMeL optimization, this type will extract just like // ``B.pointer (LL1.t a)`` would, with no indirection due to the record. noeq type t a = { ptr: B.pointer (LL1.t a); // Relies on a new pointer-to-unit elimination phase in KaRaMeL v: B.pointer (G.erased (list a)); // For separation; all erased. r: HS.rid; spine_rid: HS.rid; ptr_v_rid: HS.rid; } val invariant: #a:Type -> h:HS.mem -> ll:t a -> Type0 let invariant #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in // This is where we switch from a predicate (cumbersome for clients, requires // materializing the list at any time) to a ``v`` function which makes // specifications much easier. Any time the invariant holds, the pointer ``v`` // holds a computationally-irrelevant representation of the list that in turns // allows us to under-the-hood state the various predicates from LL1 that // require exhibiting a list. B.live h ll.ptr /\ B.freeable ll.ptr /\ B.live h ll.v /\ B.freeable ll.v /\ LL1.well_formed h head v /\ LL1.invariant h head v /\ // We use regions for separation only, not for any footprint reasoning: // - ptr_v_rid is a sub-region of r and contains ptr and v, disjoint from each other // - spine_rid is a sub-region of r, disjoint from ptr_v_rid, and contains the LL1.footprint ST.is_eternal_region ll.r /\ ST.is_eternal_region ll.spine_rid /\ ST.is_eternal_region ll.ptr_v_rid /\ B.(loc_includes (loc_region_only true ll.ptr_v_rid) (loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v)) /\ B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h head v)) /\ B.(loc_disjoint (loc_addr_of_buffer ll.ptr) (loc_addr_of_buffer ll.v)) /\ B.(loc_disjoint (loc_region_only true ll.ptr_v_rid) (loc_region_only true ll.spine_rid)) /\ // These are not redundant, and are important for showing that the footprint // is contained in ``r`` at any time, so long as the invariant holds. HS.extends ll.ptr_v_rid ll.r /\ HS.extends ll.spine_rid ll.r /\ HS.parent ll.ptr_v_rid == ll.r /\ HS.parent ll.spine_rid == ll.r val footprint: #a:Type -> h:HS.mem -> ll: t a -> Ghost B.loc (requires invariant h ll) (ensures fun _ -> True) let footprint #a h ll = let head = B.deref h ll.ptr in let v = B.deref h ll.v in B.(loc_addr_of_buffer ll.ptr `loc_union` loc_addr_of_buffer ll.v `loc_union` LL1.footprint h head v) /// There! Much easier reasoning for clients. val v: #a:Type -> h:HS.mem -> ll: t a -> GTot (list a) let v #_ h ll = B.deref h ll.v /// Normally clients want to reason via the footprint. However, in some case /// (e.g. taking pointers directly to list cells), it's helpful to have a more /// precise way to reason about the footprint. This is done via the cells, a /// list of pointers to the individual cells, which characterizes fully the /// footprint and the v function. See LL1. val cells: #a:Type -> h:HS.mem -> ll: t a -> Ghost (list (B.pointer (LL1.cell a))) (requires invariant h ll) (ensures fun _ -> True) let cells #a h ll = LL1.cells h (B.deref h ll.ptr) (B.deref h ll.v) // A workaround to avoid putting loc_all_regions_from true in patterns. let region_of ll = B.loc_all_regions_from false ll.r /// This is a most useful lemma for clients: all the bookkeeping of this linked /// list, including spine, is subsumed in region r, at any time. /// /// This allows clients to allocate a new region for ``r``, maintain the /// invariant that ``r`` is disjoint from their own data structures, and get /// easy separation and framing for their own data this way. /// /// Note that we don't generally have to state such lemmas, since in many cases, /// footprints are static and do not grow dynamically. /// /// Unfortunately, this lemma requires stating some intermediary asserts for /// some triggers to fire, and I could not find a good SMTPat for it, so clients /// have to call it manually. See test/Wireguard.fst. let footprint_in_r #a (h: HS.mem) (ll: t a): Lemma (requires invariant h ll) (ensures B.(loc_includes (region_of ll) (footprint h ll))) //[ SMTPat (footprint h ll) ] = assert B.(loc_includes (loc_region_only true ll.spine_rid) (LL1.footprint h (B.deref h ll.ptr) (v h ll))); assert B.(loc_includes (loc_all_regions_from true ll.r) (loc_region_only true ll.spine_rid)) /// I'm stating this one for completeness, but clients are able to derive this /// lemma automatically because the representation is transparent. val frame_footprint (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.loc_disjoint l (footprint h0 ll) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_footprint #_ _ _ _ _ = () /// This one is the framing lemma clients want to use if they adopt region-based /// reasoning for their LL2 instance. Owing to the lack of pattern on footprint_in_r, /// clients also have to call this one manually, sadly. val frame_region (#a: Type) (ll: t a) (l: B.loc) (h0 h1: HS.mem): Lemma (requires invariant h0 ll /\ B.(loc_disjoint l (region_of ll)) /\ B.modifies l h0 h1) (ensures invariant h1 ll /\ footprint h1 ll == footprint h0 ll) let frame_region #_ ll _ h0 h1 = footprint_in_r h0 ll; () /// Stateful operations /// ------------------- /// /// These are high-level and use the ``v`` function. I expect clients to drop /// into the LL1 representation only when they need to iterate, e.g. to find a /// list element, or to remove a list element. /// /// Note that these functions have a "dual" specification, both in terms of the /// ``footprint`` predicate (coarse) and in terms of the ``cells`` predicate /// (precise). Most clients will be content with the former and region-based /// reasoning, but advanced clients that e.g. take pointers directly to list /// cells will most likely need to use the latter. /// Heap allocation of a fresh linked list. val create_in: #a:Type -> r:HS.rid -> ST (t a) (requires fun h0 -> ST.is_eternal_region r) (ensures fun h0 ll h1 -> invariant h1 ll /\ B.(modifies loc_none h0 h1) /\ B.fresh_loc (footprint h1 ll) h0 h1 /\ v h1 ll == [] /\ cells h1 ll == [] /\ ll.r == r) #push-options "--fuel 1" let create_in #a r = let ptr_v_rid = ST.new_region r in let spine_rid = ST.new_region r in let ptr = B.malloc ptr_v_rid (B.null <: LL1.t a) 1ul in let v = B.malloc ptr_v_rid (G.hide ([] <: list a)) 1ul in { ptr; v; r; ptr_v_rid; spine_rid } #pop-options val push: #a:Type -> ll: t a -> x: a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ // Coarse modifies clause B.(modifies (footprint h0 ll) h0 h1) /\ // Functional spec v h1 ll == x :: v h0 ll /\ // Precise effect on memory, ignore if you're content with reasoning via the // footprint (which is known to be always included in the region). Cons? (cells h1 ll) /\ List.Tot.tl (cells h1 ll) == cells h0 ll /\ B.fresh_loc (B.loc_addr_of_buffer (List.Tot.hd (cells h1 ll))) h0 h1) #push-options "--fuel 1 --ifuel 1" let push #a ll x = LL1.push ll.spine_rid (!* ll.v) ll.ptr x; let v = !* ll.v in ll.v *= G.hide (x :: v) #pop-options #push-options "--fuel 1" val pop: #a:Type -> ll: t a -> ST a (requires fun h0 -> invariant h0 ll /\ Cons? (v h0 ll)) (ensures fun h0 x h1 -> let hd :: tl = v h0 ll in invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) let pop #a ll = let r = LL1.pop ll.spine_rid (!* ll.v) ll.ptr in let v = !* ll.v in ll.v *= G.hide (List.Tot.tl v); r val maybe_pop: #a:Type -> ll: t a -> ST (option a) (requires fun h0 -> invariant h0 ll) (ensures fun h0 x h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ ( // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v) h0 h1) /\ match x with | Some x -> Cons? (v h0 ll) /\ ( let hd :: tl = v h0 ll in v h1 ll == tl /\ cells h1 ll == List.Tot.tl (cells h0 ll) /\ x == hd) | None -> Nil? (v h0 ll))) #pop-options #push-options "--fuel 1 --ifuel 1 --z3rlimit 50" let maybe_pop #a ll = if not (B.is_null (!* ll.ptr)) then let v = !* ll.v in let r = LL1.pop ll.spine_rid (!* ll.v) ll.ptr in ll.v *= G.hide (List.Tot.tl v); Some r else None #pop-options val clear: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> invariant h1 ll /\ B.(modifies (footprint h0 ll) h0 h1) /\ // B.(modifies (loc_buffer ll.ptr `loc_union` loc_buffer ll.v `loc_union` loc_region_only true ll.spine_rid) h0 h1) /\ v h1 ll == [] /\ cells h1 ll == []) #push-options "--fuel 1" let clear #a ll = let v = !* ll.v in LL1.free #_ #v ll.ptr; ll.v *= G.hide [] #pop-options val free: #a:Type -> ll: t a -> ST unit (requires fun h0 -> invariant h0 ll) (ensures fun h0 _ h1 -> B.(modifies (footprint h0 ll) h0 h1)) let free #_ ll = let v = !* ll.v in LL1.free #_ #v ll.ptr; B.free ll.ptr; B.free ll.v /// Some small testing /// ------------------
false
false
LowStar.Lib.LinkedList2.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test: Prims.unit -> St unit
[]
LowStar.Lib.LinkedList2.test
{ "file_name": "krmllib/LowStar.Lib.LinkedList2.fst", "git_rev": "a7be2a7c43eca637ceb57fe8f3ffd16fc6627ebd", "git_url": "https://github.com/FStarLang/karamel.git", "project_name": "karamel" }
_: Prims.unit -> FStar.HyperStack.ST.St Prims.unit
{ "end_col": 4, "end_line": 308, "start_col": 22, "start_line": 288 }
Prims.Tot
val test2_plaintext:list UInt8.t
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test2_plaintext: list UInt8.t = []
val test2_plaintext:list UInt8.t let test2_plaintext:list UInt8.t =
false
null
false
[]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Nil", "FStar.UInt8.t" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test2_plaintext:list UInt8.t
[]
Spec.Hash.Test.test2_plaintext
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 38, "end_line": 47, "start_col": 36, "start_line": 47 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test1_plaintext = [0x61uy; 0x62uy; 0x63uy]
let test1_plaintext =
false
null
false
[0x61uy; 0x62uy; 0x63uy]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test1_plaintext : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test1_plaintext
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 46, "end_line": 11, "start_col": 22, "start_line": 11 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ]
let test2_expected224 =
false
null
false
[ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = []
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test2_expected224 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test2_expected224
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 34, "end_line": 53, "start_col": 24, "start_line": 49 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ]
let test1_expected224 =
false
null
false
[ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test1_expected224 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test1_expected224
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 34, "end_line": 17, "start_col": 24, "start_line": 13 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ]
let test2_expected384 =
false
null
false
[ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test2_expected384 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test2_expected384
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 67, "start_col": 24, "start_line": 61 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ]
let test2_expected256 =
false
null
false
[ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test2_expected256 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test2_expected256
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 59, "start_col": 24, "start_line": 55 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ]
let test3_expected224 =
false
null
false
[ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test3_expected224 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test3_expected224
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 34, "end_line": 95, "start_col": 24, "start_line": 91 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ]
let test3_plaintext =
false
null
false
[ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test3_plaintext : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test3_plaintext
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 89, "start_col": 22, "start_line": 82 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ]
let test1_expected384 =
false
null
false
[ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test1_expected384 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test1_expected384
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 31, "start_col": 24, "start_line": 25 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ]
let test1_expected256 =
false
null
false
[ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test1_expected256 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test1_expected256
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 23, "start_col": 24, "start_line": 19 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test4_expected224 = [ 0xc9uy; 0x7cuy; 0xa9uy; 0xa5uy; 0x59uy; 0x85uy; 0x0cuy; 0xe9uy; 0x7auy; 0x04uy; 0xa9uy; 0x6duy; 0xefuy; 0x6duy; 0x99uy; 0xa9uy; 0xe0uy; 0xe0uy; 0xe2uy; 0xabuy; 0x14uy; 0xe6uy; 0xb8uy; 0xdfuy; 0x26uy; 0x5fuy; 0xc0uy; 0xb3uy ]
let test4_expected224 =
false
null
false
[ 0xc9uy; 0x7cuy; 0xa9uy; 0xa5uy; 0x59uy; 0x85uy; 0x0cuy; 0xe9uy; 0x7auy; 0x04uy; 0xa9uy; 0x6duy; 0xefuy; 0x6duy; 0x99uy; 0xa9uy; 0xe0uy; 0xe0uy; 0xe2uy; 0xabuy; 0x14uy; 0xe6uy; 0xb8uy; 0xdfuy; 0x26uy; 0x5fuy; 0xc0uy; 0xb3uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ] let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ] let test3_expected384 = [ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ] let test3_expected512 = [ 0x20uy; 0x4auy; 0x8fuy; 0xc6uy; 0xdduy; 0xa8uy; 0x2fuy; 0x0auy; 0x0cuy; 0xeduy; 0x7buy; 0xebuy; 0x8euy; 0x08uy; 0xa4uy; 0x16uy; 0x57uy; 0xc1uy; 0x6euy; 0xf4uy; 0x68uy; 0xb2uy; 0x28uy; 0xa8uy; 0x27uy; 0x9buy; 0xe3uy; 0x31uy; 0xa7uy; 0x03uy; 0xc3uy; 0x35uy; 0x96uy; 0xfduy; 0x15uy; 0xc1uy; 0x3buy; 0x1buy; 0x07uy; 0xf9uy; 0xaauy; 0x1duy; 0x3buy; 0xeauy; 0x57uy; 0x78uy; 0x9cuy; 0xa0uy; 0x31uy; 0xaduy; 0x85uy; 0xc7uy; 0xa7uy; 0x1duy; 0xd7uy; 0x03uy; 0x54uy; 0xecuy; 0x63uy; 0x12uy; 0x38uy; 0xcauy; 0x34uy; 0x45uy ] /// Test 4 let test4_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test4_expected224 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test4_expected224
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 34, "end_line": 144, "start_col": 24, "start_line": 140 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ]
let test3_expected256 =
false
null
false
[ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test3_expected256 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test3_expected256
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 101, "start_col": 24, "start_line": 97 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ]
let test2_expected512 =
false
null
false
[ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test2_expected512 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test2_expected512
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 77, "start_col": 24, "start_line": 69 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test3_expected384 = [ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ]
let test3_expected384 =
false
null
false
[ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ] let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test3_expected384 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test3_expected384
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 109, "start_col": 24, "start_line": 103 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ]
let test1_expected512 =
false
null
false
[ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test1_expected512 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test1_expected512
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 41, "start_col": 24, "start_line": 33 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test4_expected384 = [ 0x09uy; 0x33uy; 0x0cuy; 0x33uy; 0xf7uy; 0x11uy; 0x47uy; 0xe8uy; 0x3duy; 0x19uy; 0x2fuy; 0xc7uy; 0x82uy; 0xcduy; 0x1buy; 0x47uy; 0x53uy; 0x11uy; 0x1buy; 0x17uy; 0x3buy; 0x3buy; 0x05uy; 0xd2uy; 0x2fuy; 0xa0uy; 0x80uy; 0x86uy; 0xe3uy; 0xb0uy; 0xf7uy; 0x12uy; 0xfcuy; 0xc7uy; 0xc7uy; 0x1auy; 0x55uy; 0x7euy; 0x2duy; 0xb9uy; 0x66uy; 0xc3uy; 0xe9uy; 0xfauy; 0x91uy; 0x74uy; 0x60uy; 0x39uy ]
let test4_expected384 =
false
null
false
[ 0x09uy; 0x33uy; 0x0cuy; 0x33uy; 0xf7uy; 0x11uy; 0x47uy; 0xe8uy; 0x3duy; 0x19uy; 0x2fuy; 0xc7uy; 0x82uy; 0xcduy; 0x1buy; 0x47uy; 0x53uy; 0x11uy; 0x1buy; 0x17uy; 0x3buy; 0x3buy; 0x05uy; 0xd2uy; 0x2fuy; 0xa0uy; 0x80uy; 0x86uy; 0xe3uy; 0xb0uy; 0xf7uy; 0x12uy; 0xfcuy; 0xc7uy; 0xc7uy; 0x1auy; 0x55uy; 0x7euy; 0x2duy; 0xb9uy; 0x66uy; 0xc3uy; 0xe9uy; 0xfauy; 0x91uy; 0x74uy; 0x60uy; 0x39uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ] let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ] let test3_expected384 = [ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ] let test3_expected512 = [ 0x20uy; 0x4auy; 0x8fuy; 0xc6uy; 0xdduy; 0xa8uy; 0x2fuy; 0x0auy; 0x0cuy; 0xeduy; 0x7buy; 0xebuy; 0x8euy; 0x08uy; 0xa4uy; 0x16uy; 0x57uy; 0xc1uy; 0x6euy; 0xf4uy; 0x68uy; 0xb2uy; 0x28uy; 0xa8uy; 0x27uy; 0x9buy; 0xe3uy; 0x31uy; 0xa7uy; 0x03uy; 0xc3uy; 0x35uy; 0x96uy; 0xfduy; 0x15uy; 0xc1uy; 0x3buy; 0x1buy; 0x07uy; 0xf9uy; 0xaauy; 0x1duy; 0x3buy; 0xeauy; 0x57uy; 0x78uy; 0x9cuy; 0xa0uy; 0x31uy; 0xaduy; 0x85uy; 0xc7uy; 0xa7uy; 0x1duy; 0xd7uy; 0x03uy; 0x54uy; 0xecuy; 0x63uy; 0x12uy; 0x38uy; 0xcauy; 0x34uy; 0x45uy ] /// Test 4 let test4_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy ] let test4_expected224 = [ 0xc9uy; 0x7cuy; 0xa9uy; 0xa5uy; 0x59uy; 0x85uy; 0x0cuy; 0xe9uy; 0x7auy; 0x04uy; 0xa9uy; 0x6duy; 0xefuy; 0x6duy; 0x99uy; 0xa9uy; 0xe0uy; 0xe0uy; 0xe2uy; 0xabuy; 0x14uy; 0xe6uy; 0xb8uy; 0xdfuy; 0x26uy; 0x5fuy; 0xc0uy; 0xb3uy ] let test4_expected256 = [ 0xcfuy; 0x5buy; 0x16uy; 0xa7uy; 0x78uy; 0xafuy; 0x83uy; 0x80uy; 0x03uy; 0x6cuy; 0xe5uy; 0x9euy; 0x7buy; 0x04uy; 0x92uy; 0x37uy; 0x0buy; 0x24uy; 0x9buy; 0x11uy; 0xe8uy; 0xf0uy; 0x7auy; 0x51uy; 0xafuy; 0xacuy; 0x45uy; 0x03uy; 0x7auy; 0xfeuy; 0xe9uy; 0xd1uy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test4_expected384 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test4_expected384
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 158, "start_col": 24, "start_line": 152 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test4_expected256 = [ 0xcfuy; 0x5buy; 0x16uy; 0xa7uy; 0x78uy; 0xafuy; 0x83uy; 0x80uy; 0x03uy; 0x6cuy; 0xe5uy; 0x9euy; 0x7buy; 0x04uy; 0x92uy; 0x37uy; 0x0buy; 0x24uy; 0x9buy; 0x11uy; 0xe8uy; 0xf0uy; 0x7auy; 0x51uy; 0xafuy; 0xacuy; 0x45uy; 0x03uy; 0x7auy; 0xfeuy; 0xe9uy; 0xd1uy ]
let test4_expected256 =
false
null
false
[ 0xcfuy; 0x5buy; 0x16uy; 0xa7uy; 0x78uy; 0xafuy; 0x83uy; 0x80uy; 0x03uy; 0x6cuy; 0xe5uy; 0x9euy; 0x7buy; 0x04uy; 0x92uy; 0x37uy; 0x0buy; 0x24uy; 0x9buy; 0x11uy; 0xe8uy; 0xf0uy; 0x7auy; 0x51uy; 0xafuy; 0xacuy; 0x45uy; 0x03uy; 0x7auy; 0xfeuy; 0xe9uy; 0xd1uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ] let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ] let test3_expected384 = [ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ] let test3_expected512 = [ 0x20uy; 0x4auy; 0x8fuy; 0xc6uy; 0xdduy; 0xa8uy; 0x2fuy; 0x0auy; 0x0cuy; 0xeduy; 0x7buy; 0xebuy; 0x8euy; 0x08uy; 0xa4uy; 0x16uy; 0x57uy; 0xc1uy; 0x6euy; 0xf4uy; 0x68uy; 0xb2uy; 0x28uy; 0xa8uy; 0x27uy; 0x9buy; 0xe3uy; 0x31uy; 0xa7uy; 0x03uy; 0xc3uy; 0x35uy; 0x96uy; 0xfduy; 0x15uy; 0xc1uy; 0x3buy; 0x1buy; 0x07uy; 0xf9uy; 0xaauy; 0x1duy; 0x3buy; 0xeauy; 0x57uy; 0x78uy; 0x9cuy; 0xa0uy; 0x31uy; 0xaduy; 0x85uy; 0xc7uy; 0xa7uy; 0x1duy; 0xd7uy; 0x03uy; 0x54uy; 0xecuy; 0x63uy; 0x12uy; 0x38uy; 0xcauy; 0x34uy; 0x45uy ] /// Test 4 let test4_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy ] let test4_expected224 = [ 0xc9uy; 0x7cuy; 0xa9uy; 0xa5uy; 0x59uy; 0x85uy; 0x0cuy; 0xe9uy; 0x7auy; 0x04uy; 0xa9uy; 0x6duy; 0xefuy; 0x6duy; 0x99uy; 0xa9uy; 0xe0uy; 0xe0uy; 0xe2uy; 0xabuy; 0x14uy; 0xe6uy; 0xb8uy; 0xdfuy; 0x26uy; 0x5fuy; 0xc0uy; 0xb3uy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test4_expected256 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test4_expected256
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 150, "start_col": 24, "start_line": 146 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test3_expected512 = [ 0x20uy; 0x4auy; 0x8fuy; 0xc6uy; 0xdduy; 0xa8uy; 0x2fuy; 0x0auy; 0x0cuy; 0xeduy; 0x7buy; 0xebuy; 0x8euy; 0x08uy; 0xa4uy; 0x16uy; 0x57uy; 0xc1uy; 0x6euy; 0xf4uy; 0x68uy; 0xb2uy; 0x28uy; 0xa8uy; 0x27uy; 0x9buy; 0xe3uy; 0x31uy; 0xa7uy; 0x03uy; 0xc3uy; 0x35uy; 0x96uy; 0xfduy; 0x15uy; 0xc1uy; 0x3buy; 0x1buy; 0x07uy; 0xf9uy; 0xaauy; 0x1duy; 0x3buy; 0xeauy; 0x57uy; 0x78uy; 0x9cuy; 0xa0uy; 0x31uy; 0xaduy; 0x85uy; 0xc7uy; 0xa7uy; 0x1duy; 0xd7uy; 0x03uy; 0x54uy; 0xecuy; 0x63uy; 0x12uy; 0x38uy; 0xcauy; 0x34uy; 0x45uy ]
let test3_expected512 =
false
null
false
[ 0x20uy; 0x4auy; 0x8fuy; 0xc6uy; 0xdduy; 0xa8uy; 0x2fuy; 0x0auy; 0x0cuy; 0xeduy; 0x7buy; 0xebuy; 0x8euy; 0x08uy; 0xa4uy; 0x16uy; 0x57uy; 0xc1uy; 0x6euy; 0xf4uy; 0x68uy; 0xb2uy; 0x28uy; 0xa8uy; 0x27uy; 0x9buy; 0xe3uy; 0x31uy; 0xa7uy; 0x03uy; 0xc3uy; 0x35uy; 0x96uy; 0xfduy; 0x15uy; 0xc1uy; 0x3buy; 0x1buy; 0x07uy; 0xf9uy; 0xaauy; 0x1duy; 0x3buy; 0xeauy; 0x57uy; 0x78uy; 0x9cuy; 0xa0uy; 0x31uy; 0xaduy; 0x85uy; 0xc7uy; 0xa7uy; 0x1duy; 0xd7uy; 0x03uy; 0x54uy; 0xecuy; 0x63uy; 0x12uy; 0x38uy; 0xcauy; 0x34uy; 0x45uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ] let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ] let test3_expected384 = [ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test3_expected512 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test3_expected512
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 119, "start_col": 24, "start_line": 111 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test4_expected512 = [ 0x8euy; 0x95uy; 0x9buy; 0x75uy; 0xdauy; 0xe3uy; 0x13uy; 0xdauy; 0x8cuy; 0xf4uy; 0xf7uy; 0x28uy; 0x14uy; 0xfcuy; 0x14uy; 0x3fuy; 0x8fuy; 0x77uy; 0x79uy; 0xc6uy; 0xebuy; 0x9fuy; 0x7fuy; 0xa1uy; 0x72uy; 0x99uy; 0xaeuy; 0xaduy; 0xb6uy; 0x88uy; 0x90uy; 0x18uy; 0x50uy; 0x1duy; 0x28uy; 0x9euy; 0x49uy; 0x00uy; 0xf7uy; 0xe4uy; 0x33uy; 0x1buy; 0x99uy; 0xdeuy; 0xc4uy; 0xb5uy; 0x43uy; 0x3auy; 0xc7uy; 0xd3uy; 0x29uy; 0xeeuy; 0xb6uy; 0xdduy; 0x26uy; 0x54uy; 0x5euy; 0x96uy; 0xe5uy; 0x5buy; 0x87uy; 0x4buy; 0xe9uy; 0x09uy ]
let test4_expected512 =
false
null
false
[ 0x8euy; 0x95uy; 0x9buy; 0x75uy; 0xdauy; 0xe3uy; 0x13uy; 0xdauy; 0x8cuy; 0xf4uy; 0xf7uy; 0x28uy; 0x14uy; 0xfcuy; 0x14uy; 0x3fuy; 0x8fuy; 0x77uy; 0x79uy; 0xc6uy; 0xebuy; 0x9fuy; 0x7fuy; 0xa1uy; 0x72uy; 0x99uy; 0xaeuy; 0xaduy; 0xb6uy; 0x88uy; 0x90uy; 0x18uy; 0x50uy; 0x1duy; 0x28uy; 0x9euy; 0x49uy; 0x00uy; 0xf7uy; 0xe4uy; 0x33uy; 0x1buy; 0x99uy; 0xdeuy; 0xc4uy; 0xb5uy; 0x43uy; 0x3auy; 0xc7uy; 0xd3uy; 0x29uy; 0xeeuy; 0xb6uy; 0xdduy; 0x26uy; 0x54uy; 0x5euy; 0x96uy; 0xe5uy; 0x5buy; 0x87uy; 0x4buy; 0xe9uy; 0x09uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ] let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ] let test3_expected384 = [ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ] let test3_expected512 = [ 0x20uy; 0x4auy; 0x8fuy; 0xc6uy; 0xdduy; 0xa8uy; 0x2fuy; 0x0auy; 0x0cuy; 0xeduy; 0x7buy; 0xebuy; 0x8euy; 0x08uy; 0xa4uy; 0x16uy; 0x57uy; 0xc1uy; 0x6euy; 0xf4uy; 0x68uy; 0xb2uy; 0x28uy; 0xa8uy; 0x27uy; 0x9buy; 0xe3uy; 0x31uy; 0xa7uy; 0x03uy; 0xc3uy; 0x35uy; 0x96uy; 0xfduy; 0x15uy; 0xc1uy; 0x3buy; 0x1buy; 0x07uy; 0xf9uy; 0xaauy; 0x1duy; 0x3buy; 0xeauy; 0x57uy; 0x78uy; 0x9cuy; 0xa0uy; 0x31uy; 0xaduy; 0x85uy; 0xc7uy; 0xa7uy; 0x1duy; 0xd7uy; 0x03uy; 0x54uy; 0xecuy; 0x63uy; 0x12uy; 0x38uy; 0xcauy; 0x34uy; 0x45uy ] /// Test 4 let test4_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy ] let test4_expected224 = [ 0xc9uy; 0x7cuy; 0xa9uy; 0xa5uy; 0x59uy; 0x85uy; 0x0cuy; 0xe9uy; 0x7auy; 0x04uy; 0xa9uy; 0x6duy; 0xefuy; 0x6duy; 0x99uy; 0xa9uy; 0xe0uy; 0xe0uy; 0xe2uy; 0xabuy; 0x14uy; 0xe6uy; 0xb8uy; 0xdfuy; 0x26uy; 0x5fuy; 0xc0uy; 0xb3uy ] let test4_expected256 = [ 0xcfuy; 0x5buy; 0x16uy; 0xa7uy; 0x78uy; 0xafuy; 0x83uy; 0x80uy; 0x03uy; 0x6cuy; 0xe5uy; 0x9euy; 0x7buy; 0x04uy; 0x92uy; 0x37uy; 0x0buy; 0x24uy; 0x9buy; 0x11uy; 0xe8uy; 0xf0uy; 0x7auy; 0x51uy; 0xafuy; 0xacuy; 0x45uy; 0x03uy; 0x7auy; 0xfeuy; 0xe9uy; 0xd1uy ] let test4_expected384 = [ 0x09uy; 0x33uy; 0x0cuy; 0x33uy; 0xf7uy; 0x11uy; 0x47uy; 0xe8uy; 0x3duy; 0x19uy; 0x2fuy; 0xc7uy; 0x82uy; 0xcduy; 0x1buy; 0x47uy; 0x53uy; 0x11uy; 0x1buy; 0x17uy; 0x3buy; 0x3buy; 0x05uy; 0xd2uy; 0x2fuy; 0xa0uy; 0x80uy; 0x86uy; 0xe3uy; 0xb0uy; 0xf7uy; 0x12uy; 0xfcuy; 0xc7uy; 0xc7uy; 0x1auy; 0x55uy; 0x7euy; 0x2duy; 0xb9uy; 0x66uy; 0xc3uy; 0xe9uy; 0xfauy; 0x91uy; 0x74uy; 0x60uy; 0x39uy ]
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test4_expected512 : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test4_expected512
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 168, "start_col": 24, "start_line": 160 }
Prims.Tot
[ { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test4_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy ]
let test4_plaintext =
false
null
false
[ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ] let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ] let test3_expected384 = [ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ] let test3_expected512 = [ 0x20uy; 0x4auy; 0x8fuy; 0xc6uy; 0xdduy; 0xa8uy; 0x2fuy; 0x0auy; 0x0cuy; 0xeduy; 0x7buy; 0xebuy; 0x8euy; 0x08uy; 0xa4uy; 0x16uy; 0x57uy; 0xc1uy; 0x6euy; 0xf4uy; 0x68uy; 0xb2uy; 0x28uy; 0xa8uy; 0x27uy; 0x9buy; 0xe3uy; 0x31uy; 0xa7uy; 0x03uy; 0xc3uy; 0x35uy; 0x96uy; 0xfduy; 0x15uy; 0xc1uy; 0x3buy; 0x1buy; 0x07uy; 0xf9uy; 0xaauy; 0x1duy; 0x3buy; 0xeauy; 0x57uy; 0x78uy; 0x9cuy; 0xa0uy; 0x31uy; 0xaduy; 0x85uy; 0xc7uy; 0xa7uy; 0x1duy; 0xd7uy; 0x03uy; 0x54uy; 0xecuy; 0x63uy; 0x12uy; 0x38uy; 0xcauy; 0x34uy; 0x45uy ] /// Test 4
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test4_plaintext : Prims.list FStar.UInt8.t
[]
Spec.Hash.Test.test4_plaintext
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list FStar.UInt8.t
{ "end_col": 66, "end_line": 138, "start_col": 22, "start_line": 124 }
FStar.All.ALL
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test () = let res = List.for_all test_one test_vectors in if res then begin IO.print_string "\n\nHash: Success!\n"; true end else begin IO.print_string "\n\nHash: Failure :(\n"; false end
let test () =
true
null
false
let res = List.for_all test_one test_vectors in if res then (IO.print_string "\n\nHash: Success!\n"; true) else (IO.print_string "\n\nHash: Failure :(\n"; false)
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[]
[ "Prims.unit", "Prims.bool", "FStar.IO.print_string", "FStar.List.for_all", "Spec.Hash.Test.vec", "Spec.Hash.Test.test_one", "Spec.Hash.Test.test_vectors" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ] let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ] let test3_expected384 = [ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ] let test3_expected512 = [ 0x20uy; 0x4auy; 0x8fuy; 0xc6uy; 0xdduy; 0xa8uy; 0x2fuy; 0x0auy; 0x0cuy; 0xeduy; 0x7buy; 0xebuy; 0x8euy; 0x08uy; 0xa4uy; 0x16uy; 0x57uy; 0xc1uy; 0x6euy; 0xf4uy; 0x68uy; 0xb2uy; 0x28uy; 0xa8uy; 0x27uy; 0x9buy; 0xe3uy; 0x31uy; 0xa7uy; 0x03uy; 0xc3uy; 0x35uy; 0x96uy; 0xfduy; 0x15uy; 0xc1uy; 0x3buy; 0x1buy; 0x07uy; 0xf9uy; 0xaauy; 0x1duy; 0x3buy; 0xeauy; 0x57uy; 0x78uy; 0x9cuy; 0xa0uy; 0x31uy; 0xaduy; 0x85uy; 0xc7uy; 0xa7uy; 0x1duy; 0xd7uy; 0x03uy; 0x54uy; 0xecuy; 0x63uy; 0x12uy; 0x38uy; 0xcauy; 0x34uy; 0x45uy ] /// Test 4 let test4_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy ] let test4_expected224 = [ 0xc9uy; 0x7cuy; 0xa9uy; 0xa5uy; 0x59uy; 0x85uy; 0x0cuy; 0xe9uy; 0x7auy; 0x04uy; 0xa9uy; 0x6duy; 0xefuy; 0x6duy; 0x99uy; 0xa9uy; 0xe0uy; 0xe0uy; 0xe2uy; 0xabuy; 0x14uy; 0xe6uy; 0xb8uy; 0xdfuy; 0x26uy; 0x5fuy; 0xc0uy; 0xb3uy ] let test4_expected256 = [ 0xcfuy; 0x5buy; 0x16uy; 0xa7uy; 0x78uy; 0xafuy; 0x83uy; 0x80uy; 0x03uy; 0x6cuy; 0xe5uy; 0x9euy; 0x7buy; 0x04uy; 0x92uy; 0x37uy; 0x0buy; 0x24uy; 0x9buy; 0x11uy; 0xe8uy; 0xf0uy; 0x7auy; 0x51uy; 0xafuy; 0xacuy; 0x45uy; 0x03uy; 0x7auy; 0xfeuy; 0xe9uy; 0xd1uy ] let test4_expected384 = [ 0x09uy; 0x33uy; 0x0cuy; 0x33uy; 0xf7uy; 0x11uy; 0x47uy; 0xe8uy; 0x3duy; 0x19uy; 0x2fuy; 0xc7uy; 0x82uy; 0xcduy; 0x1buy; 0x47uy; 0x53uy; 0x11uy; 0x1buy; 0x17uy; 0x3buy; 0x3buy; 0x05uy; 0xd2uy; 0x2fuy; 0xa0uy; 0x80uy; 0x86uy; 0xe3uy; 0xb0uy; 0xf7uy; 0x12uy; 0xfcuy; 0xc7uy; 0xc7uy; 0x1auy; 0x55uy; 0x7euy; 0x2duy; 0xb9uy; 0x66uy; 0xc3uy; 0xe9uy; 0xfauy; 0x91uy; 0x74uy; 0x60uy; 0x39uy ] let test4_expected512 = [ 0x8euy; 0x95uy; 0x9buy; 0x75uy; 0xdauy; 0xe3uy; 0x13uy; 0xdauy; 0x8cuy; 0xf4uy; 0xf7uy; 0x28uy; 0x14uy; 0xfcuy; 0x14uy; 0x3fuy; 0x8fuy; 0x77uy; 0x79uy; 0xc6uy; 0xebuy; 0x9fuy; 0x7fuy; 0xa1uy; 0x72uy; 0x99uy; 0xaeuy; 0xaduy; 0xb6uy; 0x88uy; 0x90uy; 0x18uy; 0x50uy; 0x1duy; 0x28uy; 0x9euy; 0x49uy; 0x00uy; 0xf7uy; 0xe4uy; 0x33uy; 0x1buy; 0x99uy; 0xdeuy; 0xc4uy; 0xb5uy; 0x43uy; 0x3auy; 0xc7uy; 0xd3uy; 0x29uy; 0xeeuy; 0xb6uy; 0xdduy; 0x26uy; 0x54uy; 0x5euy; 0x96uy; 0xe5uy; 0x5buy; 0x87uy; 0x4buy; 0xe9uy; 0x09uy ] open Spec.Agile.Hash open Spec.Hash.Definitions type vec = | Vec : a:hash_alg { not (is_shake a) } -> plain:list UInt8.t {norm [delta; iota; zeta; primops] (List.Tot.length plain `less_than_max_input_length` a) == true} -> hash:list UInt8.t {norm [delta; iota; zeta; primops] (List.Tot.length hash = hash_length a) == true} -> vec let test_vectors: list vec = [ Vec SHA2_224 test1_plaintext test1_expected224; Vec SHA2_224 test2_plaintext test2_expected224; Vec SHA2_224 test3_plaintext test3_expected224; Vec SHA2_224 test4_plaintext test4_expected224; Vec SHA2_256 test1_plaintext test1_expected256; Vec SHA2_256 test2_plaintext test2_expected256; Vec SHA2_256 test3_plaintext test3_expected256; Vec SHA2_256 test4_plaintext test4_expected256; Vec SHA2_384 test1_plaintext test1_expected384; Vec SHA2_384 test2_plaintext test2_expected384; Vec SHA2_384 test3_plaintext test3_expected384; Vec SHA2_384 test4_plaintext test4_expected384; Vec SHA2_512 test1_plaintext test1_expected512; Vec SHA2_512 test2_plaintext test2_expected512; Vec SHA2_512 test3_plaintext test3_expected512; Vec SHA2_512 test4_plaintext test4_expected512; (* MD5 tests from: ./make_md5_tests.sh *) (let plain: list FStar.UInt8.t = [] in let cipher: list FStar.UInt8.t = [ 0xd4uy; 0x1duy; 0x8cuy; 0xd9uy; 0x8fuy; 0x00uy; 0xb2uy; 0x04uy; 0xe9uy; 0x80uy; 0x09uy; 0x98uy; 0xecuy; 0xf8uy; 0x42uy; 0x7euy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [0x61uy] in let cipher: list FStar.UInt8.t = [ 0x0cuy; 0xc1uy; 0x75uy; 0xb9uy; 0xc0uy; 0xf1uy; 0xb6uy; 0xa8uy; 0x31uy; 0xc3uy; 0x99uy; 0xe2uy; 0x69uy; 0x77uy; 0x26uy; 0x61uy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [0x61uy; 0x62uy; 0x63uy] in let cipher: list FStar.UInt8.t = [ 0x90uy; 0x01uy; 0x50uy; 0x98uy; 0x3cuy; 0xd2uy; 0x4fuy; 0xb0uy; 0xd6uy; 0x96uy; 0x3fuy; 0x7duy; 0x28uy; 0xe1uy; 0x7fuy; 0x72uy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x6duy; 0x65uy; 0x73uy; 0x73uy; 0x61uy; 0x67uy; 0x65uy; 0x20uy; 0x64uy; 0x69uy; 0x67uy; 0x65uy; 0x73uy; 0x74uy ] in let cipher: list FStar.UInt8.t = [ 0xf9uy; 0x6buy; 0x69uy; 0x7duy; 0x7cuy; 0xb7uy; 0x93uy; 0x8duy; 0x52uy; 0x5auy; 0x2fuy; 0x31uy; 0xaauy; 0xf1uy; 0x61uy; 0xd0uy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy; 0x76uy; 0x77uy; 0x78uy; 0x79uy; 0x7auy ] in let cipher: list FStar.UInt8.t = [ 0xc3uy; 0xfcuy; 0xd3uy; 0xd7uy; 0x61uy; 0x92uy; 0xe4uy; 0x00uy; 0x7duy; 0xfbuy; 0x49uy; 0x6cuy; 0xcauy; 0x67uy; 0xe1uy; 0x3buy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x41uy; 0x42uy; 0x43uy; 0x44uy; 0x45uy; 0x46uy; 0x47uy; 0x48uy; 0x49uy; 0x4auy; 0x4buy; 0x4cuy; 0x4duy; 0x4euy; 0x4fuy; 0x50uy; 0x51uy; 0x52uy; 0x53uy; 0x54uy; 0x55uy; 0x56uy; 0x57uy; 0x58uy; 0x59uy; 0x5auy; 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy; 0x76uy; 0x77uy; 0x78uy; 0x79uy; 0x7auy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy ] in let cipher: list FStar.UInt8.t = [ 0xd1uy; 0x74uy; 0xabuy; 0x98uy; 0xd2uy; 0x77uy; 0xd9uy; 0xf5uy; 0xa5uy; 0x61uy; 0x1cuy; 0x2cuy; 0x9fuy; 0x41uy; 0x9duy; 0x9fuy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy ] in let cipher: list FStar.UInt8.t = [ 0x57uy; 0xeduy; 0xf4uy; 0xa2uy; 0x2buy; 0xe3uy; 0xc9uy; 0x55uy; 0xacuy; 0x49uy; 0xdauy; 0x2euy; 0x21uy; 0x07uy; 0xb6uy; 0x7auy ] in Vec MD5 plain cipher); (* SHA1 tests from: ./make_sha1_tests.sh *) (let plain: list FStar.UInt8.t = [] in let cipher: list FStar.UInt8.t = [ 0xdauy; 0x39uy; 0xa3uy; 0xeeuy; 0x5euy; 0x6buy; 0x4buy; 0x0duy; 0x32uy; 0x55uy; 0xbfuy; 0xefuy; 0x95uy; 0x60uy; 0x18uy; 0x90uy; 0xafuy; 0xd8uy; 0x07uy; 0x09uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x36uy] in let cipher: list FStar.UInt8.t = [ 0xc1uy; 0xdfuy; 0xd9uy; 0x6euy; 0xeauy; 0x8cuy; 0xc2uy; 0xb6uy; 0x27uy; 0x85uy; 0x27uy; 0x5buy; 0xcauy; 0x38uy; 0xacuy; 0x26uy; 0x12uy; 0x56uy; 0xe2uy; 0x78uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x19uy; 0x5auy] in let cipher: list FStar.UInt8.t = [ 0x0auy; 0x1cuy; 0x2duy; 0x55uy; 0x5buy; 0xbeuy; 0x43uy; 0x1auy; 0xd6uy; 0x28uy; 0x8auy; 0xf5uy; 0xa5uy; 0x4fuy; 0x93uy; 0xe0uy; 0x44uy; 0x9cuy; 0x92uy; 0x32uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0xdfuy; 0x4buy; 0xd2uy] in let cipher: list FStar.UInt8.t = [ 0xbfuy; 0x36uy; 0xeduy; 0x5duy; 0x74uy; 0x72uy; 0x7duy; 0xfduy; 0x5duy; 0x78uy; 0x54uy; 0xecuy; 0x6buy; 0x1duy; 0x49uy; 0x46uy; 0x8duy; 0x8euy; 0xe8uy; 0xaauy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x54uy; 0x9euy; 0x95uy; 0x9euy] in let cipher: list FStar.UInt8.t = [ 0xb7uy; 0x8buy; 0xaeuy; 0x6duy; 0x14uy; 0x33uy; 0x8fuy; 0xfcuy; 0xcfuy; 0xd5uy; 0xd5uy; 0xb5uy; 0x67uy; 0x4auy; 0x27uy; 0x5fuy; 0x6euy; 0xf9uy; 0xc7uy; 0x17uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0xf7uy; 0xfbuy; 0x1buy; 0xe2uy; 0x05uy] in let cipher: list FStar.UInt8.t = [ 0x60uy; 0xb7uy; 0xd5uy; 0xbbuy; 0x56uy; 0x0auy; 0x1auy; 0xcfuy; 0x6fuy; 0xa4uy; 0x57uy; 0x21uy; 0xbduy; 0x0auy; 0xbbuy; 0x41uy; 0x9auy; 0x84uy; 0x1auy; 0x89uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0xc0uy; 0xe5uy; 0xabuy; 0xeauy; 0xeauy; 0x63uy] in let cipher: list FStar.UInt8.t = [ 0xa6uy; 0xd3uy; 0x38uy; 0x45uy; 0x97uy; 0x80uy; 0xc0uy; 0x83uy; 0x63uy; 0x09uy; 0x0fuy; 0xd8uy; 0xfcuy; 0x7duy; 0x28uy; 0xdcuy; 0x80uy; 0xe8uy; 0xe0uy; 0x1fuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x63uy; 0xbfuy; 0xc1uy; 0xeduy; 0x7fuy; 0x78uy; 0xabuy] in let cipher: list FStar.UInt8.t = [ 0x86uy; 0x03uy; 0x28uy; 0xd8uy; 0x05uy; 0x09uy; 0x50uy; 0x0cuy; 0x17uy; 0x83uy; 0x16uy; 0x9euy; 0xbfuy; 0x0buy; 0xa0uy; 0xc4uy; 0xb9uy; 0x4duy; 0xa5uy; 0xe5uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x7euy; 0x3duy; 0x7buy; 0x3euy; 0xaduy; 0xa9uy; 0x88uy; 0x66uy] in let cipher: list FStar.UInt8.t = [ 0x24uy; 0xa2uy; 0xc3uy; 0x4buy; 0x97uy; 0x63uy; 0x05uy; 0x27uy; 0x7cuy; 0xe5uy; 0x8cuy; 0x2fuy; 0x42uy; 0xd5uy; 0x09uy; 0x20uy; 0x31uy; 0x57uy; 0x25uy; 0x20uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x9euy; 0x61uy; 0xe5uy; 0x5duy; 0x9euy; 0xd3uy; 0x7buy; 0x1cuy; 0x20uy] in let cipher: list FStar.UInt8.t = [ 0x41uy; 0x1cuy; 0xceuy; 0xe1uy; 0xf6uy; 0xe3uy; 0x67uy; 0x7duy; 0xf1uy; 0x26uy; 0x98uy; 0x41uy; 0x1euy; 0xb0uy; 0x9duy; 0x3fuy; 0xf5uy; 0x80uy; 0xafuy; 0x97uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x97uy; 0x77uy; 0xcfuy; 0x90uy; 0xdduy; 0x7cuy; 0x7euy; 0x86uy; 0x35uy; 0x06uy] in let cipher: list FStar.UInt8.t = [ 0x05uy; 0xc9uy; 0x15uy; 0xb5uy; 0xeduy; 0x4euy; 0x4cuy; 0x4auy; 0xffuy; 0xfcuy; 0x20uy; 0x29uy; 0x61uy; 0xf3uy; 0x17uy; 0x43uy; 0x71uy; 0xe9uy; 0x0buy; 0x5cuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x4euy; 0xb0uy; 0x8cuy; 0x9euy; 0x68uy; 0x3cuy; 0x94uy; 0xbeuy; 0xa0uy; 0x0duy; 0xfauy] in let cipher: list FStar.UInt8.t = [ 0xafuy; 0x32uy; 0x0buy; 0x42uy; 0xd7uy; 0x78uy; 0x5cuy; 0xa6uy; 0xc8uy; 0xdduy; 0x22uy; 0x04uy; 0x63uy; 0xbeuy; 0x23uy; 0xa2uy; 0xd2uy; 0xcbuy; 0x5auy; 0xfcuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x09uy; 0x38uy; 0xf2uy; 0xe2uy; 0xebuy; 0xb6uy; 0x4fuy; 0x8auy; 0xf8uy; 0xbbuy; 0xfcuy; 0x91uy ] in let cipher: list FStar.UInt8.t = [ 0x9fuy; 0x4euy; 0x66uy; 0xb6uy; 0xceuy; 0xeauy; 0x40uy; 0xdcuy; 0xf4uy; 0xb9uy; 0x16uy; 0x6cuy; 0x28uy; 0xf1uy; 0xc8uy; 0x84uy; 0x74uy; 0x14uy; 0x1duy; 0xa9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x74uy; 0xc9uy; 0x99uy; 0x6duy; 0x14uy; 0xe8uy; 0x7duy; 0x3euy; 0x6cuy; 0xbeuy; 0xa7uy; 0x02uy; 0x9duy ] in let cipher: list FStar.UInt8.t = [ 0xe6uy; 0xc4uy; 0x36uy; 0x3cuy; 0x08uy; 0x52uy; 0x95uy; 0x19uy; 0x91uy; 0x05uy; 0x7fuy; 0x40uy; 0xdeuy; 0x27uy; 0xecuy; 0x08uy; 0x90uy; 0x46uy; 0x6fuy; 0x01uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x51uy; 0xdcuy; 0xa5uy; 0xc0uy; 0xf8uy; 0xe5uy; 0xd4uy; 0x95uy; 0x96uy; 0xf3uy; 0x2duy; 0x3euy; 0xb8uy; 0x74uy ] in let cipher: list FStar.UInt8.t = [ 0x04uy; 0x6auy; 0x7buy; 0x39uy; 0x6cuy; 0x01uy; 0x37uy; 0x9auy; 0x68uy; 0x4auy; 0x89uy; 0x45uy; 0x58uy; 0x77uy; 0x9buy; 0x07uy; 0xd8uy; 0xc7uy; 0xdauy; 0x20uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x3auy; 0x36uy; 0xeauy; 0x49uy; 0x68uy; 0x48uy; 0x20uy; 0xa2uy; 0xaduy; 0xc7uy; 0xfcuy; 0x41uy; 0x75uy; 0xbauy; 0x78uy ] in let cipher: list FStar.UInt8.t = [ 0xd5uy; 0x8auy; 0x26uy; 0x2euy; 0xe7uy; 0xb6uy; 0x57uy; 0x7cuy; 0x07uy; 0x22uy; 0x8euy; 0x71uy; 0xaeuy; 0x9buy; 0x3euy; 0x04uy; 0xc8uy; 0xabuy; 0xcduy; 0xa9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x35uy; 0x52uy; 0x69uy; 0x4cuy; 0xdfuy; 0x66uy; 0x3fuy; 0xd9uy; 0x4buy; 0x22uy; 0x47uy; 0x47uy; 0xacuy; 0x40uy; 0x6auy; 0xafuy ] in let cipher: list FStar.UInt8.t = [ 0xa1uy; 0x50uy; 0xdeuy; 0x92uy; 0x74uy; 0x54uy; 0x20uy; 0x2duy; 0x94uy; 0xe6uy; 0x56uy; 0xdeuy; 0x4cuy; 0x7cuy; 0x0cuy; 0xa6uy; 0x91uy; 0xdeuy; 0x95uy; 0x5duy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xf2uy; 0x16uy; 0xa1uy; 0xcbuy; 0xdeuy; 0x24uy; 0x46uy; 0xb1uy; 0xeduy; 0xf4uy; 0x1euy; 0x93uy; 0x48uy; 0x1duy; 0x33uy; 0xe2uy; 0xeduy ] in let cipher: list FStar.UInt8.t = [ 0x35uy; 0xa4uy; 0xb3uy; 0x9fuy; 0xefuy; 0x56uy; 0x0euy; 0x7euy; 0xa6uy; 0x12uy; 0x46uy; 0x67uy; 0x6euy; 0x1buy; 0x7euy; 0x13uy; 0xd5uy; 0x87uy; 0xbeuy; 0x30uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xa3uy; 0xcfuy; 0x71uy; 0x4buy; 0xf1uy; 0x12uy; 0x64uy; 0x7euy; 0x72uy; 0x7euy; 0x8cuy; 0xfduy; 0x46uy; 0x49uy; 0x9auy; 0xcduy; 0x35uy; 0xa6uy ] in let cipher: list FStar.UInt8.t = [ 0x7cuy; 0xe6uy; 0x9buy; 0x1auy; 0xcduy; 0xceuy; 0x52uy; 0xeauy; 0x7duy; 0xbduy; 0x38uy; 0x25uy; 0x31uy; 0xfauy; 0x1auy; 0x83uy; 0xdfuy; 0x13uy; 0xcauy; 0xe7uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x14uy; 0x8duy; 0xe6uy; 0x40uy; 0xf3uy; 0xc1uy; 0x15uy; 0x91uy; 0xa6uy; 0xf8uy; 0xc5uy; 0xc4uy; 0x86uy; 0x32uy; 0xc5uy; 0xfbuy; 0x79uy; 0xd3uy; 0xb7uy ] in let cipher: list FStar.UInt8.t = [ 0xb4uy; 0x7buy; 0xe2uy; 0xc6uy; 0x41uy; 0x24uy; 0xfauy; 0x9auy; 0x12uy; 0x4auy; 0x88uy; 0x7auy; 0xf9uy; 0x55uy; 0x1auy; 0x74uy; 0x35uy; 0x4cuy; 0xa4uy; 0x11uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x63uy; 0xa3uy; 0xccuy; 0x83uy; 0xfduy; 0x1euy; 0xc1uy; 0xb6uy; 0x68uy; 0x0euy; 0x99uy; 0x74uy; 0xa0uy; 0x51uy; 0x4euy; 0x1auy; 0x9euy; 0xceuy; 0xbbuy; 0x6auy ] in let cipher: list FStar.UInt8.t = [ 0x8buy; 0xb8uy; 0xc0uy; 0xd8uy; 0x15uy; 0xa9uy; 0xc6uy; 0x8auy; 0x1duy; 0x29uy; 0x10uy; 0xf3uy; 0x9duy; 0x94uy; 0x26uy; 0x03uy; 0xd8uy; 0x07uy; 0xfbuy; 0xccuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x87uy; 0x5auy; 0x90uy; 0x90uy; 0x9auy; 0x8auy; 0xfcuy; 0x92uy; 0xfbuy; 0x70uy; 0x70uy; 0x04uy; 0x7euy; 0x9duy; 0x08uy; 0x1euy; 0xc9uy; 0x2fuy; 0x3duy; 0x08uy; 0xb8uy ] in let cipher: list FStar.UInt8.t = [ 0xb4uy; 0x86uy; 0xf8uy; 0x7fuy; 0xb8uy; 0x33uy; 0xebuy; 0xf0uy; 0x32uy; 0x83uy; 0x93uy; 0x12uy; 0x86uy; 0x46uy; 0xa6uy; 0xf6uy; 0xe6uy; 0x60uy; 0xfcuy; 0xb1uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x44uy; 0x4buy; 0x25uy; 0xf9uy; 0xc9uy; 0x25uy; 0x9duy; 0xc2uy; 0x17uy; 0x77uy; 0x2cuy; 0xc4uy; 0x47uy; 0x8cuy; 0x44uy; 0xb6uy; 0xfeuy; 0xffuy; 0x62uy; 0x35uy; 0x36uy; 0x73uy ] in let cipher: list FStar.UInt8.t = [ 0x76uy; 0x15uy; 0x93uy; 0x68uy; 0xf9uy; 0x9duy; 0xecuy; 0xe3uy; 0x0auy; 0xaduy; 0xcfuy; 0xb9uy; 0xb7uy; 0xb4uy; 0x1duy; 0xabuy; 0x33uy; 0x68uy; 0x88uy; 0x58uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x48uy; 0x73uy; 0x51uy; 0xc8uy; 0xa5uy; 0xf4uy; 0x40uy; 0xe4uy; 0xd0uy; 0x33uy; 0x86uy; 0x48uy; 0x3duy; 0x5fuy; 0xe7uy; 0xbbuy; 0x66uy; 0x9duy; 0x41uy; 0xaduy; 0xcbuy; 0xfduy; 0xb7uy ] in let cipher: list FStar.UInt8.t = [ 0xdbuy; 0xc1uy; 0xcbuy; 0x57uy; 0x5cuy; 0xe6uy; 0xaeuy; 0xb9uy; 0xdcuy; 0x4euy; 0xbfuy; 0x0fuy; 0x84uy; 0x3buy; 0xa8uy; 0xaeuy; 0xb1uy; 0x45uy; 0x1euy; 0x89uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x46uy; 0xb0uy; 0x61uy; 0xefuy; 0x13uy; 0x2buy; 0x87uy; 0xf6uy; 0xd3uy; 0xb0uy; 0xeeuy; 0x24uy; 0x62uy; 0xf6uy; 0x7duy; 0x91uy; 0x09uy; 0x77uy; 0xdauy; 0x20uy; 0xaeuy; 0xd1uy; 0x37uy; 0x05uy ] in let cipher: list FStar.UInt8.t = [ 0xd7uy; 0xa9uy; 0x82uy; 0x89uy; 0x67uy; 0x90uy; 0x05uy; 0xebuy; 0x93uy; 0x0auy; 0xb7uy; 0x5euy; 0xfduy; 0x8fuy; 0x65uy; 0x0fuy; 0x99uy; 0x1euy; 0xe9uy; 0x52uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x38uy; 0x42uy; 0xb6uy; 0x13uy; 0x7buy; 0xb9uy; 0xd2uy; 0x7fuy; 0x3cuy; 0xa5uy; 0xbauy; 0xfeuy; 0x5buy; 0xbbuy; 0x62uy; 0x85uy; 0x83uy; 0x44uy; 0xfeuy; 0x4buy; 0xa5uy; 0xc4uy; 0x15uy; 0x89uy; 0xa5uy ] in let cipher: list FStar.UInt8.t = [ 0xfduy; 0xa2uy; 0x6fuy; 0xa9uy; 0xb4uy; 0x87uy; 0x4auy; 0xb7uy; 0x01uy; 0xeduy; 0x0buy; 0xb6uy; 0x4duy; 0x13uy; 0x4fuy; 0x89uy; 0xb9uy; 0xc4uy; 0xccuy; 0x50uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x44uy; 0xd9uy; 0x1duy; 0x3duy; 0x46uy; 0x5auy; 0x41uy; 0x11uy; 0x46uy; 0x2buy; 0xa0uy; 0xc7uy; 0xecuy; 0x22uy; 0x3duy; 0xa6uy; 0x73uy; 0x5fuy; 0x4fuy; 0x52uy; 0x00uy; 0x45uy; 0x3cuy; 0xf1uy; 0x32uy; 0xc3uy ] in let cipher: list FStar.UInt8.t = [ 0xc2uy; 0xffuy; 0x7cuy; 0xcduy; 0xe1uy; 0x43uy; 0xc8uy; 0xf0uy; 0x60uy; 0x1fuy; 0x69uy; 0x74uy; 0xb1uy; 0x90uy; 0x3euy; 0xb8uy; 0xd5uy; 0x74uy; 0x1buy; 0x6euy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xccuy; 0xe7uy; 0x3fuy; 0x2euy; 0xabuy; 0xcbuy; 0x52uy; 0xf7uy; 0x85uy; 0xd5uy; 0xa6uy; 0xdfuy; 0x63uy; 0xc0uy; 0xa1uy; 0x05uy; 0xf3uy; 0x4auy; 0x91uy; 0xcauy; 0x23uy; 0x7fuy; 0xe5uy; 0x34uy; 0xeeuy; 0x39uy; 0x9duy ] in let cipher: list FStar.UInt8.t = [ 0x64uy; 0x3cuy; 0x9duy; 0xc2uy; 0x0auy; 0x92uy; 0x96uy; 0x08uy; 0xf6uy; 0xcauy; 0xa9uy; 0x70uy; 0x9duy; 0x84uy; 0x3cuy; 0xa6uy; 0xfauy; 0x7auy; 0x76uy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x66uy; 0x4euy; 0x6euy; 0x79uy; 0x46uy; 0x83uy; 0x92uy; 0x03uy; 0x03uy; 0x7auy; 0x65uy; 0xa1uy; 0x21uy; 0x74uy; 0xb2uy; 0x44uy; 0xdeuy; 0x8cuy; 0xbcuy; 0x6euy; 0xc3uy; 0xf5uy; 0x78uy; 0x96uy; 0x7auy; 0x84uy; 0xf9uy; 0xceuy ] in let cipher: list FStar.UInt8.t = [ 0x50uy; 0x9euy; 0xf7uy; 0x87uy; 0x34uy; 0x3duy; 0x5buy; 0x5auy; 0x26uy; 0x92uy; 0x29uy; 0xb9uy; 0x61uy; 0xb9uy; 0x62uy; 0x41uy; 0x86uy; 0x4auy; 0x3duy; 0x74uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x95uy; 0x97uy; 0xf7uy; 0x14uy; 0xb2uy; 0xe4uy; 0x5euy; 0x33uy; 0x99uy; 0xa7uy; 0xf0uy; 0x2auy; 0xecuy; 0x44uy; 0x92uy; 0x1buy; 0xd7uy; 0x8buy; 0xe0uy; 0xfeuy; 0xfeuy; 0xe0uy; 0xc5uy; 0xe9uy; 0xb4uy; 0x99uy; 0x48uy; 0x8fuy; 0x6euy ] in let cipher: list FStar.UInt8.t = [ 0xb6uy; 0x1cuy; 0xe5uy; 0x38uy; 0xf1uy; 0xa1uy; 0xe6uy; 0xc9uy; 0x04uy; 0x32uy; 0xb2uy; 0x33uy; 0xd7uy; 0xafuy; 0x5buy; 0x65uy; 0x24uy; 0xebuy; 0xfbuy; 0xe3uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x75uy; 0xc5uy; 0xaduy; 0x1fuy; 0x3cuy; 0xbduy; 0x22uy; 0xe8uy; 0xa9uy; 0x5fuy; 0xc3uy; 0xb0uy; 0x89uy; 0x52uy; 0x67uy; 0x88uy; 0xfbuy; 0x4euy; 0xbcuy; 0xeeuy; 0xd3uy; 0xe7uy; 0xd4uy; 0x44uy; 0x3duy; 0xa6uy; 0xe0uy; 0x81uy; 0xa3uy; 0x5euy ] in let cipher: list FStar.UInt8.t = [ 0x5buy; 0x7buy; 0x94uy; 0x07uy; 0x6buy; 0x2fuy; 0xc2uy; 0x0duy; 0x6auy; 0xdbuy; 0x82uy; 0x47uy; 0x9euy; 0x6buy; 0x28uy; 0xd0uy; 0x7cuy; 0x90uy; 0x2buy; 0x75uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xdduy; 0x24uy; 0x5buy; 0xffuy; 0xe6uy; 0xa6uy; 0x38uy; 0x80uy; 0x66uy; 0x67uy; 0x76uy; 0x83uy; 0x60uy; 0xa9uy; 0x5duy; 0x05uy; 0x74uy; 0xe1uy; 0xa0uy; 0xbduy; 0x0duy; 0x18uy; 0x32uy; 0x9fuy; 0xdbuy; 0x91uy; 0x5cuy; 0xa4uy; 0x84uy; 0xacuy; 0x0duy ] in let cipher: list FStar.UInt8.t = [ 0x60uy; 0x66uy; 0xdbuy; 0x99uy; 0xfcuy; 0x35uy; 0x89uy; 0x52uy; 0xcfuy; 0x7fuy; 0xb0uy; 0xecuy; 0x4duy; 0x89uy; 0xcbuy; 0x01uy; 0x58uy; 0xeduy; 0x91uy; 0xd7uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x03uy; 0x21uy; 0x79uy; 0x4buy; 0x73uy; 0x94uy; 0x18uy; 0xc2uy; 0x4euy; 0x7cuy; 0x2euy; 0x56uy; 0x52uy; 0x74uy; 0x79uy; 0x1cuy; 0x4buy; 0xe7uy; 0x49uy; 0x75uy; 0x2auy; 0xd2uy; 0x34uy; 0xeduy; 0x56uy; 0xcbuy; 0x0auy; 0x63uy; 0x47uy; 0x43uy; 0x0cuy; 0x6buy ] in let cipher: list FStar.UInt8.t = [ 0xb8uy; 0x99uy; 0x62uy; 0xc9uy; 0x4duy; 0x60uy; 0xf6uy; 0xa3uy; 0x32uy; 0xfduy; 0x60uy; 0xf6uy; 0xf0uy; 0x7duy; 0x4fuy; 0x03uy; 0x2auy; 0x58uy; 0x6buy; 0x76uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x4cuy; 0x3duy; 0xcfuy; 0x95uy; 0xc2uy; 0xf0uy; 0xb5uy; 0x25uy; 0x8cuy; 0x65uy; 0x1fuy; 0xcduy; 0x1duy; 0x51uy; 0xbduy; 0x10uy; 0x42uy; 0x5duy; 0x62uy; 0x03uy; 0x06uy; 0x7duy; 0x07uy; 0x48uy; 0xd3uy; 0x7duy; 0x13uy; 0x40uy; 0xd9uy; 0xdduy; 0xdauy; 0x7duy; 0xb3uy ] in let cipher: list FStar.UInt8.t = [ 0x17uy; 0xbduy; 0xa8uy; 0x99uy; 0xc1uy; 0x3duy; 0x35uy; 0x41uy; 0x3duy; 0x25uy; 0x46uy; 0x21uy; 0x2buy; 0xcduy; 0x8auy; 0x93uy; 0xceuy; 0xb0uy; 0x65uy; 0x7buy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xb8uy; 0xd1uy; 0x25uy; 0x82uy; 0xd2uy; 0x5buy; 0x45uy; 0x29uy; 0x0auy; 0x6euy; 0x1buy; 0xb9uy; 0x5duy; 0xa4uy; 0x29uy; 0xbeuy; 0xfcuy; 0xfduy; 0xbfuy; 0x5buy; 0x4duy; 0xd4uy; 0x1cuy; 0xdfuy; 0x33uy; 0x11uy; 0xd6uy; 0x98uy; 0x8fuy; 0xa1uy; 0x7cuy; 0xecuy; 0x07uy; 0x23uy ] in let cipher: list FStar.UInt8.t = [ 0xbauy; 0xdcuy; 0xdduy; 0x53uy; 0xfduy; 0xc1uy; 0x44uy; 0xb8uy; 0xbfuy; 0x2cuy; 0xc1uy; 0xe6uy; 0x4duy; 0x10uy; 0xf6uy; 0x76uy; 0xeeuy; 0xbeuy; 0x66uy; 0xeduy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x6fuy; 0xdauy; 0x97uy; 0x52uy; 0x7auy; 0x66uy; 0x25uy; 0x52uy; 0xbeuy; 0x15uy; 0xefuy; 0xaeuy; 0xbauy; 0x32uy; 0xa3uy; 0xaeuy; 0xa4uy; 0xeduy; 0x44uy; 0x9auy; 0xbbuy; 0x5cuy; 0x1euy; 0xd8uy; 0xd9uy; 0xbfuy; 0xffuy; 0x54uy; 0x47uy; 0x08uy; 0xa4uy; 0x25uy; 0xd6uy; 0x9buy; 0x72uy ] in let cipher: list FStar.UInt8.t = [ 0x01uy; 0xb4uy; 0x64uy; 0x61uy; 0x80uy; 0xf1uy; 0xf6uy; 0xd2uy; 0xe0uy; 0x6buy; 0xbeuy; 0x22uy; 0xc2uy; 0x0euy; 0x50uy; 0x03uy; 0x03uy; 0x22uy; 0x67uy; 0x3auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x09uy; 0xfauy; 0x27uy; 0x92uy; 0xacuy; 0xbbuy; 0x24uy; 0x17uy; 0xe8uy; 0xeduy; 0x26uy; 0x90uy; 0x41uy; 0xccuy; 0x03uy; 0xc7uy; 0x70uy; 0x06uy; 0x46uy; 0x6euy; 0x6euy; 0x7auy; 0xe0uy; 0x02uy; 0xcfuy; 0x3fuy; 0x1auy; 0xf5uy; 0x51uy; 0xe8uy; 0xceuy; 0x0buy; 0xb5uy; 0x06uy; 0xd7uy; 0x05uy ] in let cipher: list FStar.UInt8.t = [ 0x10uy; 0x01uy; 0x6duy; 0xc3uy; 0xa2uy; 0x71uy; 0x9fuy; 0x90uy; 0x34uy; 0xffuy; 0xccuy; 0x68uy; 0x94uy; 0x26uy; 0xd2uy; 0x82uy; 0x92uy; 0xc4uy; 0x2fuy; 0xc9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x5euy; 0xfauy; 0x29uy; 0x87uy; 0xdauy; 0x0buy; 0xafuy; 0x0auy; 0x54uy; 0xd8uy; 0xd7uy; 0x28uy; 0x79uy; 0x2buy; 0xcfuy; 0xa7uy; 0x07uy; 0xa1uy; 0x57uy; 0x98uy; 0xdcuy; 0x66uy; 0x74uy; 0x37uy; 0x54uy; 0x40uy; 0x69uy; 0x14uy; 0xd1uy; 0xcfuy; 0xe3uy; 0x70uy; 0x9buy; 0x13uy; 0x74uy; 0xeauy; 0xebuy ] in let cipher: list FStar.UInt8.t = [ 0x9fuy; 0x42uy; 0xfauy; 0x2buy; 0xceuy; 0x6euy; 0xf0uy; 0x21uy; 0xd9uy; 0x3cuy; 0x6buy; 0x2duy; 0x90uy; 0x22uy; 0x73uy; 0x79uy; 0x7euy; 0x42uy; 0x65uy; 0x35uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x28uy; 0x36uy; 0xdeuy; 0x99uy; 0xc0uy; 0xf6uy; 0x41uy; 0xcduy; 0x55uy; 0xe8uy; 0x9fuy; 0x5auy; 0xf7uy; 0x66uy; 0x38uy; 0x94uy; 0x7buy; 0x82uy; 0x27uy; 0x37uy; 0x7euy; 0xf8uy; 0x8buy; 0xfbuy; 0xa6uy; 0x62uy; 0xe5uy; 0x68uy; 0x2buy; 0xabuy; 0xc1uy; 0xecuy; 0x96uy; 0xc6uy; 0x99uy; 0x2buy; 0xc9uy; 0xa0uy ] in let cipher: list FStar.UInt8.t = [ 0xcduy; 0xf4uy; 0x8buy; 0xacuy; 0xbfuy; 0xf6uy; 0xf6uy; 0x15uy; 0x25uy; 0x15uy; 0x32uy; 0x3fuy; 0x9buy; 0x43uy; 0xa2uy; 0x86uy; 0xe0uy; 0xcbuy; 0x81uy; 0x13uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x42uy; 0x14uy; 0x3auy; 0x2buy; 0x9euy; 0x1duy; 0x0buy; 0x35uy; 0x4duy; 0xf3uy; 0x26uy; 0x4duy; 0x08uy; 0xf7uy; 0xb6uy; 0x02uy; 0xf5uy; 0x4auy; 0xaduy; 0x92uy; 0x2auy; 0x3duy; 0x63uy; 0x00uy; 0x6duy; 0x09uy; 0x7fuy; 0x68uy; 0x3duy; 0xc1uy; 0x1buy; 0x90uy; 0x17uy; 0x84uy; 0x23uy; 0xbfuy; 0xf2uy; 0xf7uy; 0xfeuy ] in let cipher: list FStar.UInt8.t = [ 0xb8uy; 0x8fuy; 0xb7uy; 0x52uy; 0x74uy; 0xb9uy; 0xb0uy; 0xfduy; 0x57uy; 0xc0uy; 0x04uy; 0x59uy; 0x88uy; 0xcfuy; 0xceuy; 0xf6uy; 0xc3uy; 0xceuy; 0x65uy; 0x54uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xebuy; 0x60uy; 0xc2uy; 0x8auy; 0xd8uy; 0xaeuy; 0xdauy; 0x80uy; 0x7duy; 0x69uy; 0xebuy; 0xc8uy; 0x75uy; 0x52uy; 0x02uy; 0x4auy; 0xd8uy; 0xacuy; 0xa6uy; 0x82uy; 0x04uy; 0xf1uy; 0xbcuy; 0xd2uy; 0x9duy; 0xc5uy; 0xa8uy; 0x1duy; 0xd2uy; 0x28uy; 0xb5uy; 0x91uy; 0xe2uy; 0xefuy; 0xb7uy; 0xc4uy; 0xdfuy; 0x75uy; 0xefuy; 0x03uy ] in let cipher: list FStar.UInt8.t = [ 0xc0uy; 0x6duy; 0x3auy; 0x6auy; 0x12uy; 0xd9uy; 0xe8uy; 0xdbuy; 0x62uy; 0xe8uy; 0xcfuy; 0xf4uy; 0x0cuy; 0xa2uy; 0x38uy; 0x20uy; 0xd6uy; 0x1duy; 0x8auy; 0xa7uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x7duy; 0xe4uy; 0xbauy; 0x85uy; 0xecuy; 0x54uy; 0x74uy; 0x7cuy; 0xdcuy; 0x42uy; 0xb1uy; 0xf2uy; 0x35uy; 0x46uy; 0xb7uy; 0xe4uy; 0x90uy; 0xe3uy; 0x12uy; 0x80uy; 0xf0uy; 0x66uy; 0xe5uy; 0x2fuy; 0xacuy; 0x11uy; 0x7fuy; 0xd3uy; 0xb0uy; 0x79uy; 0x2euy; 0x4duy; 0xe6uy; 0x2duy; 0x58uy; 0x43uy; 0xeeuy; 0x98uy; 0xc7uy; 0x20uy; 0x15uy ] in let cipher: list FStar.UInt8.t = [ 0x6euy; 0x40uy; 0xf9uy; 0xe8uy; 0x3auy; 0x4buy; 0xe9uy; 0x38uy; 0x74uy; 0xbcuy; 0x97uy; 0xcduy; 0xebuy; 0xb8uy; 0xdauy; 0x68uy; 0x89uy; 0xaeuy; 0x2cuy; 0x7auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xe7uy; 0x06uy; 0x53uy; 0x63uy; 0x7buy; 0xc5uy; 0xe3uy; 0x88uy; 0xccuy; 0xd8uy; 0xdcuy; 0x44uy; 0xe5uy; 0xeauy; 0xceuy; 0x36uy; 0xf7uy; 0x39uy; 0x8fuy; 0x2buy; 0xacuy; 0x99uy; 0x30uy; 0x42uy; 0xb9uy; 0xbcuy; 0x2fuy; 0x4fuy; 0xb3uy; 0xb0uy; 0xeeuy; 0x7euy; 0x23uy; 0xa9uy; 0x64uy; 0x39uy; 0xdcuy; 0x01uy; 0x13uy; 0x4buy; 0x8cuy; 0x7duy ] in let cipher: list FStar.UInt8.t = [ 0x3euy; 0xfcuy; 0x94uy; 0x0cuy; 0x31uy; 0x2euy; 0xf0uy; 0xdfuy; 0xd4uy; 0xe1uy; 0x14uy; 0x38uy; 0x12uy; 0x24uy; 0x8duy; 0xb8uy; 0x95uy; 0x42uy; 0xf6uy; 0xa5uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xdduy; 0x37uy; 0xbcuy; 0x9fuy; 0x0buy; 0x3auy; 0x47uy; 0x88uy; 0xf9uy; 0xb5uy; 0x49uy; 0x66uy; 0xf2uy; 0x52uy; 0x17uy; 0x4cuy; 0x8cuy; 0xe4uy; 0x87uy; 0xcbuy; 0xe5uy; 0x9cuy; 0x53uy; 0xc2uy; 0x2buy; 0x81uy; 0xbfuy; 0x77uy; 0x62uy; 0x1auy; 0x7cuy; 0xe7uy; 0x61uy; 0x6duy; 0xcbuy; 0x5buy; 0x1euy; 0x2euy; 0xe6uy; 0x3cuy; 0x2cuy; 0x30uy; 0x9buy ] in let cipher: list FStar.UInt8.t = [ 0xa0uy; 0xcfuy; 0x03uy; 0xf7uy; 0xbauy; 0xdduy; 0x0cuy; 0x3cuy; 0x3cuy; 0x4euy; 0xa3uy; 0x71uy; 0x7fuy; 0x5auy; 0x4fuy; 0xb7uy; 0xe6uy; 0x7buy; 0x2euy; 0x56uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x5fuy; 0x48uy; 0x5cuy; 0x63uy; 0x7auy; 0xe3uy; 0x0buy; 0x1euy; 0x30uy; 0x49uy; 0x7fuy; 0x0fuy; 0xb7uy; 0xecuy; 0x36uy; 0x4euy; 0x13uy; 0xc9uy; 0x06uy; 0xe2uy; 0x81uy; 0x3duy; 0xaauy; 0x34uy; 0x16uy; 0x1buy; 0x7auy; 0xc4uy; 0xa4uy; 0xfduy; 0x7auy; 0x1buy; 0xdduy; 0xd7uy; 0x96uy; 0x01uy; 0xbbuy; 0xd2uy; 0x2cuy; 0xefuy; 0x1fuy; 0x57uy; 0xcbuy; 0xc7uy ] in let cipher: list FStar.UInt8.t = [ 0xa5uy; 0x44uy; 0xe0uy; 0x6fuy; 0x1auy; 0x07uy; 0xceuy; 0xb1uy; 0x75uy; 0xa5uy; 0x1duy; 0x6duy; 0x9cuy; 0x01uy; 0x11uy; 0xb3uy; 0xe1uy; 0x5euy; 0x98uy; 0x59uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xf6uy; 0xc2uy; 0x37uy; 0xfbuy; 0x3cuy; 0xfeuy; 0x95uy; 0xecuy; 0x84uy; 0x14uy; 0xccuy; 0x16uy; 0xd2uy; 0x03uy; 0xb4uy; 0x87uy; 0x4euy; 0x64uy; 0x4cuy; 0xc9uy; 0xa5uy; 0x43uy; 0x46uy; 0x5cuy; 0xaduy; 0x2duy; 0xc5uy; 0x63uy; 0x48uy; 0x8auy; 0x65uy; 0x9euy; 0x8auy; 0x2euy; 0x7cuy; 0x98uy; 0x1euy; 0x2auy; 0x9fuy; 0x22uy; 0xe5uy; 0xe8uy; 0x68uy; 0xffuy; 0xe1uy ] in let cipher: list FStar.UInt8.t = [ 0x19uy; 0x9duy; 0x98uy; 0x6euy; 0xd9uy; 0x91uy; 0xb9uy; 0x9auy; 0x07uy; 0x1fuy; 0x45uy; 0x0cuy; 0x6buy; 0x11uy; 0x21uy; 0xa7uy; 0x27uy; 0xe8uy; 0xc7uy; 0x35uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xdauy; 0x7auy; 0xb3uy; 0x29uy; 0x15uy; 0x53uy; 0xc6uy; 0x59uy; 0x87uy; 0x3cuy; 0x95uy; 0x91uy; 0x37uy; 0x68uy; 0x95uy; 0x3cuy; 0x6euy; 0x52uy; 0x6duy; 0x3auy; 0x26uy; 0x59uy; 0x08uy; 0x98uy; 0xc0uy; 0xaduy; 0xe8uy; 0x9fuy; 0xf5uy; 0x6fuy; 0xbduy; 0x11uy; 0x0fuy; 0x14uy; 0x36uy; 0xafuy; 0x59uy; 0x0buy; 0x17uy; 0xfeuy; 0xd4uy; 0x9fuy; 0x8cuy; 0x4buy; 0x2buy; 0x1euy ] in let cipher: list FStar.UInt8.t = [ 0x33uy; 0xbauy; 0xc6uy; 0x10uy; 0x4buy; 0x0auy; 0xd6uy; 0x12uy; 0x8duy; 0x09uy; 0x1buy; 0x5duy; 0x5euy; 0x29uy; 0x99uy; 0x09uy; 0x9cuy; 0x9fuy; 0x05uy; 0xdeuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x8cuy; 0xfauy; 0x5fuy; 0xd5uy; 0x6euy; 0xe2uy; 0x39uy; 0xcauy; 0x47uy; 0x73uy; 0x75uy; 0x91uy; 0xcbuy; 0xa1uy; 0x03uy; 0xe4uy; 0x1auy; 0x18uy; 0xacuy; 0xf8uy; 0xe8uy; 0xd2uy; 0x57uy; 0xb0uy; 0xdbuy; 0xe8uy; 0x85uy; 0x11uy; 0x34uy; 0xa8uy; 0x1fuy; 0xf6uy; 0xb2uy; 0xe9uy; 0x71uy; 0x04uy; 0xb3uy; 0x9buy; 0x76uy; 0xe1uy; 0x9duy; 0xa2uy; 0x56uy; 0xa1uy; 0x7cuy; 0xe5uy; 0x2duy ] in let cipher: list FStar.UInt8.t = [ 0x76uy; 0xd7uy; 0xdbuy; 0x6euy; 0x18uy; 0xc1uy; 0xf4uy; 0xaeuy; 0x22uy; 0x5cuy; 0xe8uy; 0xccuy; 0xc9uy; 0x3cuy; 0x8fuy; 0x9auy; 0x0duy; 0xfeuy; 0xb9uy; 0x69uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x57uy; 0xe8uy; 0x96uy; 0x59uy; 0xd8uy; 0x78uy; 0xf3uy; 0x60uy; 0xafuy; 0x6duy; 0xe4uy; 0x5auy; 0x9auy; 0x5euy; 0x37uy; 0x2euy; 0xf4uy; 0x0cuy; 0x38uy; 0x49uy; 0x88uy; 0xe8uy; 0x26uy; 0x40uy; 0xa3uy; 0xd5uy; 0xe4uy; 0xb7uy; 0x6duy; 0x2euy; 0xf1uy; 0x81uy; 0x78uy; 0x0buy; 0x9auy; 0x09uy; 0x9auy; 0xc0uy; 0x6euy; 0xf0uy; 0xf8uy; 0xa7uy; 0xf3uy; 0xf7uy; 0x64uy; 0x20uy; 0x97uy; 0x20uy ] in let cipher: list FStar.UInt8.t = [ 0xf6uy; 0x52uy; 0xf3uy; 0xb1uy; 0x54uy; 0x9fuy; 0x16uy; 0x71uy; 0x0cuy; 0x74uy; 0x02uy; 0x89uy; 0x59uy; 0x11uy; 0xe2uy; 0xb8uy; 0x6auy; 0x9buy; 0x2auy; 0xeeuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xb9uy; 0x1euy; 0x64uy; 0x23uy; 0x5duy; 0xbduy; 0x23uy; 0x4euy; 0xeauy; 0x2auy; 0xe1uy; 0x4auy; 0x92uy; 0xa1uy; 0x73uy; 0xebuy; 0xe8uy; 0x35uy; 0x34uy; 0x72uy; 0x39uy; 0xcfuy; 0xf8uy; 0xb0uy; 0x20uy; 0x74uy; 0x41uy; 0x6fuy; 0x55uy; 0xc6uy; 0xb6uy; 0x0duy; 0xc6uy; 0xceuy; 0xd0uy; 0x6auy; 0xe9uy; 0xf8uy; 0xd7uy; 0x05uy; 0x50uy; 0x5fuy; 0x0duy; 0x61uy; 0x7euy; 0x4buy; 0x29uy; 0xaeuy; 0xf9uy ] in let cipher: list FStar.UInt8.t = [ 0x63uy; 0xfauy; 0xebuy; 0xb8uy; 0x07uy; 0xf3uy; 0x2buy; 0xe7uy; 0x08uy; 0xcfuy; 0x00uy; 0xfcuy; 0x35uy; 0x51uy; 0x99uy; 0x91uy; 0xdcuy; 0x4euy; 0x7fuy; 0x68uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xe4uy; 0x2auy; 0x67uy; 0x36uy; 0x2auy; 0x58uy; 0x1euy; 0x8cuy; 0xf3uy; 0xd8uy; 0x47uy; 0x50uy; 0x22uy; 0x15uy; 0x75uy; 0x5duy; 0x7auy; 0xd4uy; 0x25uy; 0xcauy; 0x03uy; 0x0cuy; 0x43uy; 0x60uy; 0xb0uy; 0xf7uy; 0xefuy; 0x51uy; 0x3euy; 0x69uy; 0x80uy; 0x26uy; 0x5fuy; 0x61uy; 0xc9uy; 0xfauy; 0x18uy; 0xdduy; 0x9cuy; 0xe6uy; 0x68uy; 0xf3uy; 0x8duy; 0xbcuy; 0x2auy; 0x1euy; 0xf8uy; 0xf8uy; 0x3cuy; 0xd6uy ] in let cipher: list FStar.UInt8.t = [ 0x0euy; 0x67uy; 0x30uy; 0xbcuy; 0x4auy; 0x0euy; 0x93uy; 0x22uy; 0xeauy; 0x20uy; 0x5fuy; 0x4euy; 0xdfuy; 0xffuy; 0x1fuy; 0xffuy; 0xdauy; 0x26uy; 0xafuy; 0x0auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x63uy; 0x4duy; 0xb9uy; 0x2cuy; 0x22uy; 0x01uy; 0x0euy; 0x1cuy; 0xbfuy; 0x1euy; 0x16uy; 0x23uy; 0x92uy; 0x31uy; 0x80uy; 0x40uy; 0x6cuy; 0x51uy; 0x52uy; 0x72uy; 0x20uy; 0x9auy; 0x8auy; 0xccuy; 0x42uy; 0xdeuy; 0x05uy; 0xccuy; 0x2euy; 0x96uy; 0xa1uy; 0xe9uy; 0x4cuy; 0x1fuy; 0x9fuy; 0x6buy; 0x93uy; 0x23uy; 0x4buy; 0x7fuy; 0x4cuy; 0x55uy; 0xdeuy; 0x8buy; 0x19uy; 0x61uy; 0xa3uy; 0xbfuy; 0x35uy; 0x22uy; 0x59uy ] in let cipher: list FStar.UInt8.t = [ 0xb6uy; 0x1auy; 0x3auy; 0x6fuy; 0x42uy; 0xe8uy; 0xe6uy; 0x60uy; 0x4buy; 0x93uy; 0x19uy; 0x6cuy; 0x43uy; 0xc9uy; 0xe8uy; 0x4duy; 0x53uy; 0x59uy; 0xe6uy; 0xfeuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xccuy; 0x6cuy; 0xa3uy; 0xa8uy; 0xcbuy; 0x39uy; 0x1cuy; 0xd8uy; 0xa5uy; 0xafuy; 0xf1uy; 0xfauy; 0xa7uy; 0xb3uy; 0xffuy; 0xbduy; 0xd2uy; 0x1auy; 0x5auy; 0x3cuy; 0xe6uy; 0x6cuy; 0xfauy; 0xdduy; 0xbfuy; 0xe8uy; 0xb1uy; 0x79uy; 0xe4uy; 0xc8uy; 0x60uy; 0xbeuy; 0x5euy; 0xc6uy; 0x6buy; 0xd2uy; 0xc6uy; 0xdeuy; 0x6auy; 0x39uy; 0xa2uy; 0x56uy; 0x22uy; 0xf9uy; 0xf2uy; 0xfcuy; 0xb3uy; 0xfcuy; 0x05uy; 0xafuy; 0x12uy; 0xb5uy ] in let cipher: list FStar.UInt8.t = [ 0x32uy; 0xd9uy; 0x79uy; 0xcauy; 0x1buy; 0x3euy; 0xd0uy; 0xeduy; 0x8cuy; 0x89uy; 0x0duy; 0x99uy; 0xecuy; 0x6duy; 0xd8uy; 0x5euy; 0x6cuy; 0x16uy; 0xabuy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x7cuy; 0x0euy; 0x6auy; 0x0duy; 0x35uy; 0xf8uy; 0xacuy; 0x85uy; 0x4cuy; 0x72uy; 0x45uy; 0xebuy; 0xc7uy; 0x36uy; 0x93uy; 0x73uy; 0x1buy; 0xbbuy; 0xc3uy; 0xe6uy; 0xfauy; 0xb6uy; 0x44uy; 0x46uy; 0x6duy; 0xe2uy; 0x7buy; 0xb5uy; 0x22uy; 0xfcuy; 0xb9uy; 0x93uy; 0x07uy; 0x12uy; 0x6auy; 0xe7uy; 0x18uy; 0xfeuy; 0x8fuy; 0x00uy; 0x74uy; 0x2euy; 0x6euy; 0x5cuy; 0xb7uy; 0xa6uy; 0x87uy; 0xc8uy; 0x84uy; 0x47uy; 0xcbuy; 0xc9uy; 0x61uy ] in let cipher: list FStar.UInt8.t = [ 0x6fuy; 0x18uy; 0x19uy; 0x0buy; 0xd2uy; 0xd0uy; 0x2fuy; 0xc9uy; 0x3buy; 0xceuy; 0x64uy; 0x75uy; 0x65uy; 0x75uy; 0xceuy; 0xa3uy; 0x6duy; 0x08uy; 0xb1uy; 0xc3uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xc5uy; 0x58uy; 0x1duy; 0x40uy; 0xb3uy; 0x31uy; 0xe2uy; 0x40uy; 0x03uy; 0x90uy; 0x1buy; 0xd6uy; 0xbfuy; 0x24uy; 0x4auy; 0xcauy; 0x9euy; 0x96uy; 0x01uy; 0xb9uy; 0xd8uy; 0x12uy; 0x52uy; 0xbbuy; 0x38uy; 0x04uy; 0x86uy; 0x42uy; 0x73uy; 0x1fuy; 0x11uy; 0x46uy; 0xb8uy; 0xa4uy; 0xc6uy; 0x9fuy; 0x88uy; 0xe1uy; 0x48uy; 0xb2uy; 0xc8uy; 0xf8uy; 0xc1uy; 0x4fuy; 0x15uy; 0xe1uy; 0xd6uy; 0xdauy; 0x57uy; 0xb2uy; 0xdauy; 0xa9uy; 0x99uy; 0x1euy ] in let cipher: list FStar.UInt8.t = [ 0x68uy; 0xf5uy; 0x25uy; 0xfeuy; 0xeauy; 0x1duy; 0x8duy; 0xbeuy; 0x01uy; 0x17uy; 0xe4uy; 0x17uy; 0xcauy; 0x46uy; 0x70uy; 0x8duy; 0x18uy; 0xd7uy; 0x62uy; 0x9auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xecuy; 0x6buy; 0x4auy; 0x88uy; 0x71uy; 0x3duy; 0xf2uy; 0x7cuy; 0x0fuy; 0x2duy; 0x02uy; 0xe7uy; 0x38uy; 0xb6uy; 0x9duy; 0xb4uy; 0x3auy; 0xbduy; 0xa3uy; 0x92uy; 0x13uy; 0x17uy; 0x25uy; 0x9cuy; 0x86uy; 0x4cuy; 0x1cuy; 0x38uy; 0x6euy; 0x9auy; 0x5auy; 0x3fuy; 0x53uy; 0x3duy; 0xc0uy; 0x5fuy; 0x3buy; 0xeeuy; 0xb2uy; 0xbeuy; 0xc2uy; 0xaauy; 0xc8uy; 0xe0uy; 0x6duy; 0xb4uy; 0xc6uy; 0xcbuy; 0x3cuy; 0xdduy; 0xcfuy; 0x69uy; 0x7euy; 0x03uy; 0xd5uy ] in let cipher: list FStar.UInt8.t = [ 0xa7uy; 0x27uy; 0x2euy; 0x23uy; 0x08uy; 0x62uy; 0x2fuy; 0xf7uy; 0xa3uy; 0x39uy; 0x46uy; 0x0auy; 0xdcuy; 0x61uy; 0xefuy; 0xd0uy; 0xeauy; 0x8duy; 0xabuy; 0xdcuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x03uy; 0x21uy; 0x73uy; 0x6buy; 0xebuy; 0xa5uy; 0x78uy; 0xe9uy; 0x0auy; 0xbcuy; 0x1auy; 0x90uy; 0xaauy; 0x56uy; 0x15uy; 0x7duy; 0x87uy; 0x16uy; 0x18uy; 0xf6uy; 0xdeuy; 0x0duy; 0x76uy; 0x4cuy; 0xc8uy; 0xc9uy; 0x1euy; 0x06uy; 0xc6uy; 0x8euy; 0xcduy; 0x3buy; 0x9duy; 0xe3uy; 0x82uy; 0x40uy; 0x64uy; 0x50uy; 0x33uy; 0x84uy; 0xdbuy; 0x67uy; 0xbeuy; 0xb7uy; 0xfeuy; 0x01uy; 0x22uy; 0x32uy; 0xdauy; 0xcauy; 0xefuy; 0x93uy; 0xa0uy; 0x00uy; 0xfbuy; 0xa7uy ] in let cipher: list FStar.UInt8.t = [ 0xaeuy; 0xf8uy; 0x43uy; 0xb8uy; 0x69uy; 0x16uy; 0xc1uy; 0x6fuy; 0x66uy; 0xc8uy; 0x4duy; 0x83uy; 0xa6uy; 0x00uy; 0x5duy; 0x23uy; 0xfduy; 0x00uy; 0x5cuy; 0x9euy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xd0uy; 0xa2uy; 0x49uy; 0xa9uy; 0x7buy; 0x5fuy; 0x14uy; 0x86uy; 0x72uy; 0x1auy; 0x50uy; 0xd4uy; 0xc4uy; 0xabuy; 0x3fuy; 0x5duy; 0x67uy; 0x4auy; 0x0euy; 0x29uy; 0x92uy; 0x5duy; 0x5buy; 0xf2uy; 0x67uy; 0x8euy; 0xf6uy; 0xd8uy; 0xd5uy; 0x21uy; 0xe4uy; 0x56uy; 0xbduy; 0x84uy; 0xaauy; 0x75uy; 0x53uy; 0x28uy; 0xc8uy; 0x3fuy; 0xc8uy; 0x90uy; 0x83uy; 0x77uy; 0x26uy; 0xa8uy; 0xe7uy; 0x87uy; 0x7buy; 0x57uy; 0x0duy; 0xbauy; 0x39uy; 0x57uy; 0x9auy; 0xabuy; 0xdduy ] in let cipher: list FStar.UInt8.t = [ 0xbeuy; 0x2cuy; 0xd6uy; 0xf3uy; 0x80uy; 0x96uy; 0x9buy; 0xe5uy; 0x9cuy; 0xdeuy; 0x2duy; 0xffuy; 0x5euy; 0x84uy; 0x8auy; 0x44uy; 0xe7uy; 0x88uy; 0x0buy; 0xd6uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xc3uy; 0x21uy; 0x38uy; 0x53uy; 0x11uy; 0x18uy; 0xf0uy; 0x8cuy; 0x7duy; 0xccuy; 0x29uy; 0x24uy; 0x28uy; 0xaduy; 0x20uy; 0xb4uy; 0x5auy; 0xb2uy; 0x7duy; 0x95uy; 0x17uy; 0xa1uy; 0x84uy; 0x45uy; 0xf3uy; 0x8buy; 0x8fuy; 0x0cuy; 0x27uy; 0x95uy; 0xbcuy; 0xdfuy; 0xe3uy; 0xffuy; 0xe3uy; 0x84uy; 0xe6uy; 0x5euy; 0xcbuy; 0xf7uy; 0x4duy; 0x2cuy; 0x9duy; 0x0duy; 0xa8uy; 0x83uy; 0x98uy; 0x57uy; 0x53uy; 0x26uy; 0x07uy; 0x49uy; 0x04uy; 0xc1uy; 0x70uy; 0x9buy; 0xa0uy; 0x72uy ] in let cipher: list FStar.UInt8.t = [ 0xe5uy; 0xebuy; 0x45uy; 0x43uy; 0xdeuy; 0xeeuy; 0x8fuy; 0x6auy; 0x52uy; 0x87uy; 0x84uy; 0x5auy; 0xf8uy; 0xb5uy; 0x93uy; 0xa9uy; 0x5auy; 0x97uy; 0x49uy; 0xa1uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xb0uy; 0xf4uy; 0xcfuy; 0xb9uy; 0x39uy; 0xeauy; 0x78uy; 0x5euy; 0xabuy; 0xb7uy; 0xe7uy; 0xcauy; 0x7cuy; 0x47uy; 0x6cuy; 0xdduy; 0x9buy; 0x22uy; 0x7fuy; 0x01uy; 0x5duy; 0x90uy; 0x53uy; 0x68uy; 0xbauy; 0x00uy; 0xaeuy; 0x96uy; 0xb9uy; 0xaauy; 0xf7uy; 0x20uy; 0x29uy; 0x74uy; 0x91uy; 0xb3uy; 0x92uy; 0x12uy; 0x67uy; 0x57uy; 0x6buy; 0x72uy; 0xc8uy; 0xf5uy; 0x8duy; 0x57uy; 0x76uy; 0x17uy; 0xe8uy; 0x44uy; 0xf9uy; 0xf0uy; 0x75uy; 0x9buy; 0x39uy; 0x9cuy; 0x6buy; 0x06uy; 0x4cuy ] in let cipher: list FStar.UInt8.t = [ 0x53uy; 0x4cuy; 0x85uy; 0x04uy; 0x48uy; 0xdduy; 0x48uy; 0x67uy; 0x87uy; 0xb6uy; 0x2buy; 0xdeuy; 0xc2uy; 0xd4uy; 0xa0uy; 0xb1uy; 0x40uy; 0xa1uy; 0xb1uy; 0x70uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xbduy; 0x02uy; 0xe5uy; 0x1buy; 0x0cuy; 0xf2uy; 0xc2uy; 0xb8uy; 0xd2uy; 0x04uy; 0xa0uy; 0x26uy; 0xb4uy; 0x1auy; 0x66uy; 0xfbuy; 0xfcuy; 0x2auy; 0xc3uy; 0x7euy; 0xe9uy; 0x41uy; 0x1fuy; 0xc4uy; 0x49uy; 0xc8uy; 0xd1uy; 0x19uy; 0x4auy; 0x07uy; 0x92uy; 0xa2uy; 0x8euy; 0xe7uy; 0x31uy; 0x40uy; 0x7duy; 0xfcuy; 0x89uy; 0xb6uy; 0xdfuy; 0xc2uy; 0xb1uy; 0x0fuy; 0xaauy; 0x27uy; 0x72uy; 0x3auy; 0x18uy; 0x4auy; 0xfeuy; 0xf8uy; 0xfduy; 0x83uy; 0xdeuy; 0xf8uy; 0x58uy; 0xa3uy; 0x2duy; 0x3fuy ] in let cipher: list FStar.UInt8.t = [ 0x6fuy; 0xbfuy; 0xa6uy; 0xe4uy; 0xeduy; 0xceuy; 0x4cuy; 0xc8uy; 0x5auy; 0x84uy; 0x5buy; 0xf0uy; 0xd2uy; 0x28uy; 0xdcuy; 0x39uy; 0xacuy; 0xefuy; 0xc2uy; 0xfauy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xe3uy; 0x31uy; 0x46uy; 0xb8uy; 0x3euy; 0x4buy; 0xb6uy; 0x71uy; 0x39uy; 0x22uy; 0x18uy; 0xdauy; 0x9auy; 0x77uy; 0xf8uy; 0xd9uy; 0xf5uy; 0x97uy; 0x41uy; 0x47uy; 0x18uy; 0x2fuy; 0xb9uy; 0x5buy; 0xa6uy; 0x62uy; 0xcbuy; 0x66uy; 0x01uy; 0x19uy; 0x89uy; 0xc1uy; 0x6duy; 0x9auy; 0xf1uy; 0x04uy; 0x73uy; 0x5duy; 0x6fuy; 0x79uy; 0x84uy; 0x1auy; 0xa4uy; 0xd1uy; 0xdfuy; 0x27uy; 0x66uy; 0x15uy; 0xb5uy; 0x01uy; 0x08uy; 0xdfuy; 0x8auy; 0x29uy; 0xdbuy; 0xc9uy; 0xdeuy; 0x31uy; 0xf4uy; 0x26uy; 0x0duy ] in let cipher: list FStar.UInt8.t = [ 0x01uy; 0x88uy; 0x72uy; 0x69uy; 0x1duy; 0x9buy; 0x04uy; 0xe8uy; 0x22uy; 0x0euy; 0x09uy; 0x18uy; 0x7duy; 0xf5uy; 0xbcuy; 0x5fuy; 0xa6uy; 0x25uy; 0x7cuy; 0xd9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x41uy; 0x1cuy; 0x13uy; 0xc7uy; 0x50uy; 0x73uy; 0xc1uy; 0xe2uy; 0xd4uy; 0xb1uy; 0xecuy; 0xf1uy; 0x31uy; 0x39uy; 0xbauy; 0x96uy; 0x56uy; 0xcduy; 0x35uy; 0xc1uy; 0x42uy; 0x01uy; 0xf1uy; 0xc7uy; 0xc6uy; 0xf0uy; 0xeeuy; 0xb5uy; 0x8duy; 0x2duy; 0xbfuy; 0xe3uy; 0x5buy; 0xfduy; 0xecuy; 0xccuy; 0x92uy; 0xc3uy; 0x96uy; 0x1cuy; 0xfauy; 0xbbuy; 0x59uy; 0x0buy; 0xc1uy; 0xebuy; 0x77uy; 0xeauy; 0xc1uy; 0x57uy; 0x32uy; 0xfbuy; 0x02uy; 0x75uy; 0x79uy; 0x86uy; 0x80uy; 0xe0uy; 0xc7uy; 0x29uy; 0x2euy; 0x50uy ] in let cipher: list FStar.UInt8.t = [ 0xd9uy; 0x8duy; 0x51uy; 0x2auy; 0x35uy; 0x57uy; 0x2fuy; 0x8buy; 0xd2uy; 0x0duy; 0xe6uy; 0x2euy; 0x95uy; 0x10uy; 0xccuy; 0x21uy; 0x14uy; 0x5cuy; 0x5buy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xf2uy; 0xc7uy; 0x6euy; 0xf6uy; 0x17uy; 0xfauy; 0x2buy; 0xfcuy; 0x8auy; 0x4duy; 0x6buy; 0xcbuy; 0xb1uy; 0x5fuy; 0xe8uy; 0x84uy; 0x36uy; 0xfduy; 0xc2uy; 0x16uy; 0x5duy; 0x30uy; 0x74uy; 0x62uy; 0x95uy; 0x79uy; 0x07uy; 0x9duy; 0x4duy; 0x5buy; 0x86uy; 0xf5uy; 0x08uy; 0x1auy; 0xb1uy; 0x77uy; 0xb4uy; 0xc3uy; 0xf5uy; 0x30uy; 0x37uy; 0x6cuy; 0x9cuy; 0x92uy; 0x4cuy; 0xbduy; 0x42uy; 0x1auy; 0x8duy; 0xafuy; 0x88uy; 0x30uy; 0xd0uy; 0x94uy; 0x0cuy; 0x4fuy; 0xb7uy; 0x58uy; 0x98uy; 0x65uy; 0x83uy; 0x06uy; 0x99uy ] in let cipher: list FStar.UInt8.t = [ 0x9fuy; 0x3euy; 0xa2uy; 0x55uy; 0xf6uy; 0xafuy; 0x95uy; 0xc5uy; 0x45uy; 0x4euy; 0x55uy; 0xd7uy; 0x35uy; 0x4cuy; 0xabuy; 0xb4uy; 0x53uy; 0x52uy; 0xeauy; 0x0buy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x45uy; 0x92uy; 0x7euy; 0x32uy; 0xdduy; 0xf8uy; 0x01uy; 0xcauy; 0xf3uy; 0x5euy; 0x18uy; 0xe7uy; 0xb5uy; 0x07uy; 0x8buy; 0x7fuy; 0x54uy; 0x35uy; 0x27uy; 0x82uy; 0x12uy; 0xecuy; 0x6buy; 0xb9uy; 0x9duy; 0xf8uy; 0x84uy; 0xf4uy; 0x9buy; 0x32uy; 0x7cuy; 0x64uy; 0x86uy; 0xfeuy; 0xaeuy; 0x46uy; 0xbauy; 0x18uy; 0x7duy; 0xc1uy; 0xccuy; 0x91uy; 0x45uy; 0x12uy; 0x1euy; 0x14uy; 0x92uy; 0xe6uy; 0xb0uy; 0x6euy; 0x90uy; 0x07uy; 0x39uy; 0x4duy; 0xc3uy; 0x3buy; 0x77uy; 0x48uy; 0xf8uy; 0x6auy; 0xc3uy; 0x20uy; 0x7cuy; 0xfeuy ] in let cipher: list FStar.UInt8.t = [ 0xa7uy; 0x0cuy; 0xfbuy; 0xfeuy; 0x75uy; 0x63uy; 0xdduy; 0x0euy; 0x66uy; 0x5cuy; 0x7cuy; 0x67uy; 0x15uy; 0xa9uy; 0x6auy; 0x8duy; 0x75uy; 0x69uy; 0x50uy; 0xc0uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x7cuy; 0x9cuy; 0x67uy; 0x32uy; 0x3auy; 0x1duy; 0xf1uy; 0xaduy; 0xbfuy; 0xe5uy; 0xceuy; 0xb4uy; 0x15uy; 0xeauy; 0xefuy; 0x01uy; 0x55uy; 0xecuy; 0xe2uy; 0x82uy; 0x0fuy; 0x4duy; 0x50uy; 0xc1uy; 0xecuy; 0x22uy; 0xcbuy; 0xa4uy; 0x92uy; 0x8auy; 0xc6uy; 0x56uy; 0xc8uy; 0x3fuy; 0xe5uy; 0x85uy; 0xdbuy; 0x6auy; 0x78uy; 0xceuy; 0x40uy; 0xbcuy; 0x42uy; 0x75uy; 0x7auy; 0xbauy; 0x7euy; 0x5auy; 0x3fuy; 0x58uy; 0x24uy; 0x28uy; 0xd6uy; 0xcauy; 0x68uy; 0xd0uy; 0xc3uy; 0x97uy; 0x83uy; 0x36uy; 0xa6uy; 0xefuy; 0xb7uy; 0x29uy; 0x61uy; 0x3euy; 0x8duy; 0x99uy; 0x79uy; 0x01uy; 0x62uy; 0x04uy; 0xbfuy; 0xd9uy; 0x21uy; 0x32uy; 0x2fuy; 0xdduy; 0x52uy; 0x22uy; 0x18uy; 0x35uy; 0x54uy; 0x44uy; 0x7duy; 0xe5uy; 0xe6uy; 0xe9uy; 0xbbuy; 0xe6uy; 0xeduy; 0xf7uy; 0x6duy; 0x7buy; 0x71uy; 0xe1uy; 0x8duy; 0xc2uy; 0xe8uy; 0xd6uy; 0xdcuy; 0x89uy; 0xb7uy; 0x39uy; 0x83uy; 0x64uy; 0xf6uy; 0x52uy; 0xfauy; 0xfcuy; 0x73uy; 0x43uy; 0x29uy; 0xaauy; 0xfauy; 0x3duy; 0xcduy; 0x45uy; 0xd4uy; 0xf3uy; 0x1euy; 0x38uy; 0x8euy; 0x4fuy; 0xafuy; 0xd7uy; 0xfcuy; 0x64uy; 0x95uy; 0xf3uy; 0x7cuy; 0xa5uy; 0xcbuy; 0xabuy; 0x7fuy; 0x54uy; 0xd5uy; 0x86uy; 0x46uy; 0x3duy; 0xa4uy; 0xbfuy; 0xeauy; 0xa3uy; 0xbauy; 0xe0uy; 0x9fuy; 0x7buy; 0x8euy; 0x92uy; 0x39uy; 0xd8uy; 0x32uy; 0xb4uy; 0xf0uy; 0xa7uy; 0x33uy; 0xaauy; 0x60uy; 0x9cuy; 0xc1uy; 0xf8uy; 0xd4uy ] in let cipher: list FStar.UInt8.t = [ 0xd8uy; 0xfduy; 0x6auy; 0x91uy; 0xefuy; 0x3buy; 0x6cuy; 0xeduy; 0x05uy; 0xb9uy; 0x83uy; 0x58uy; 0xa9uy; 0x91uy; 0x07uy; 0xc1uy; 0xfauy; 0xc8uy; 0xc8uy; 0x07uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x6cuy; 0xb7uy; 0x0duy; 0x19uy; 0xc0uy; 0x96uy; 0x20uy; 0x0fuy; 0x92uy; 0x49uy; 0xd2uy; 0xdbuy; 0xc0uy; 0x42uy; 0x99uy; 0xb0uy; 0x08uy; 0x5euy; 0xb0uy; 0x68uy; 0x25uy; 0x75uy; 0x60uy; 0xbeuy; 0x3auy; 0x30uy; 0x7duy; 0xbduy; 0x74uy; 0x1auy; 0x33uy; 0x78uy; 0xebuy; 0xfauy; 0x03uy; 0xfcuy; 0xcauy; 0x61uy; 0x08uy; 0x83uy; 0xb0uy; 0x7fuy; 0x7fuy; 0xeauy; 0x56uy; 0x3auy; 0x86uy; 0x65uy; 0x71uy; 0x82uy; 0x24uy; 0x72uy; 0xdauy; 0xdeuy; 0x8auy; 0x0buy; 0xecuy; 0x4buy; 0x98uy; 0x20uy; 0x2duy; 0x47uy; 0xa3uy; 0x44uy; 0x31uy; 0x29uy; 0x76uy; 0xa7uy; 0xbcuy; 0xb3uy; 0x96uy; 0x44uy; 0x27uy; 0xeauy; 0xcbuy; 0x5buy; 0x05uy; 0x25uy; 0xdbuy; 0x22uy; 0x06uy; 0x65uy; 0x99uy; 0xb8uy; 0x1buy; 0xe4uy; 0x1euy; 0x5auy; 0xdauy; 0xf1uy; 0x57uy; 0xd9uy; 0x25uy; 0xfauy; 0xc0uy; 0x4buy; 0x06uy; 0xebuy; 0x6euy; 0x01uy; 0xdeuy; 0xb7uy; 0x53uy; 0xbauy; 0xbfuy; 0x33uy; 0xbeuy; 0x16uy; 0x16uy; 0x2buy; 0x21uy; 0x4euy; 0x8duy; 0xb0uy; 0x17uy; 0x21uy; 0x2fuy; 0xafuy; 0xa5uy; 0x12uy; 0xcduy; 0xc8uy; 0xc0uy; 0xd0uy; 0xa1uy; 0x5cuy; 0x10uy; 0xf6uy; 0x32uy; 0xe8uy; 0xf4uy; 0xf4uy; 0x77uy; 0x92uy; 0xc6uy; 0x4duy; 0x3fuy; 0x02uy; 0x60uy; 0x04uy; 0xd1uy; 0x73uy; 0xdfuy; 0x50uy; 0xcfuy; 0x0auy; 0xa7uy; 0x97uy; 0x60uy; 0x66uy; 0xa7uy; 0x9auy; 0x8duy; 0x78uy; 0xdeuy; 0xeeuy; 0xecuy; 0x95uy; 0x1duy; 0xabuy; 0x7cuy; 0xc9uy; 0x0fuy; 0x68uy; 0xd1uy; 0x6fuy; 0x78uy; 0x66uy; 0x71uy; 0xfeuy; 0xbauy; 0x0buy; 0x7duy; 0x26uy; 0x9duy; 0x92uy; 0x94uy; 0x1cuy; 0x4fuy; 0x02uy; 0xf4uy; 0x32uy; 0xaauy; 0x5cuy; 0xe2uy; 0xaauy; 0xb6uy; 0x19uy; 0x4duy; 0xccuy; 0x6fuy; 0xd3uy; 0xaeuy; 0x36uy; 0xc8uy; 0x43uy; 0x32uy; 0x74uy; 0xefuy; 0x6buy; 0x1buy; 0xd0uy; 0xd3uy; 0x14uy; 0x63uy; 0x6buy; 0xe4uy; 0x7buy; 0xa3uy; 0x8duy; 0x19uy; 0x48uy; 0x34uy; 0x3auy; 0x38uy; 0xbfuy; 0x94uy; 0x06uy; 0x52uy; 0x3auy; 0x0buy; 0x2auy; 0x8cuy; 0xd7uy; 0x8euy; 0xd6uy; 0x26uy; 0x6euy; 0xe3uy; 0xc9uy; 0xb5uy; 0xc6uy; 0x06uy; 0x20uy; 0xb3uy; 0x08uy; 0xccuy; 0x6buy; 0x3auy; 0x73uy; 0xc6uy; 0x06uy; 0x0duy; 0x52uy; 0x68uy; 0xa7uy; 0xd8uy; 0x2buy; 0x6auy; 0x33uy; 0xb9uy; 0x3auy; 0x6fuy; 0xd6uy; 0xfeuy; 0x1duy; 0xe5uy; 0x52uy; 0x31uy; 0xd1uy; 0x2cuy; 0x97uy ] in let cipher: list FStar.UInt8.t = [ 0x4auy; 0x75uy; 0xa4uy; 0x06uy; 0xf4uy; 0xdeuy; 0x5fuy; 0x9euy; 0x11uy; 0x32uy; 0x06uy; 0x9duy; 0x66uy; 0x71uy; 0x7fuy; 0xc4uy; 0x24uy; 0x37uy; 0x63uy; 0x88uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x64uy; 0x87uy; 0x97uy; 0x2duy; 0x88uy; 0xd0uy; 0xdduy; 0x39uy; 0x0duy; 0x8duy; 0x09uy; 0xd1uy; 0x34uy; 0x86uy; 0x0fuy; 0x26uy; 0x3fuy; 0x88uy; 0xdfuy; 0x7auy; 0x34uy; 0x12uy; 0x45uy; 0x7auy; 0xdfuy; 0x51uy; 0x0duy; 0xcfuy; 0x16uy; 0x4euy; 0x6cuy; 0xf0uy; 0x41uy; 0x67uy; 0x9buy; 0x3auy; 0x19uy; 0xfcuy; 0xc5uy; 0x42uy; 0xafuy; 0x6auy; 0x23uy; 0x6auy; 0xb0uy; 0x3duy; 0x66uy; 0xb2uy; 0xe8uy; 0xa1uy; 0x55uy; 0xd1uy; 0x06uy; 0x1auy; 0xb7uy; 0x85uy; 0x9fuy; 0x75uy; 0x73uy; 0x27uy; 0x75uy; 0xffuy; 0xf6uy; 0x82uy; 0xf8uy; 0xf4uy; 0xd5uy; 0xe5uy; 0x0duy; 0x3auy; 0xb3uy; 0x77uy; 0x0fuy; 0x4fuy; 0x66uy; 0xcbuy; 0x13uy; 0x81uy; 0x55uy; 0xb4uy; 0x71uy; 0x5duy; 0x24uy; 0x5buy; 0x80uy; 0x69uy; 0x94uy; 0x8euy; 0xa0uy; 0x16uy; 0xa4uy; 0x5buy; 0x7euy; 0xf0uy; 0xfduy; 0xdeuy; 0x93uy; 0x18uy; 0x8cuy; 0x57uy; 0xeeuy; 0xf4uy; 0x71uy; 0x7fuy; 0x34uy; 0x25uy; 0x18uy; 0x1duy; 0xe5uy; 0xb9uy; 0xa5uy; 0xd4uy; 0xe0uy; 0xa2uy; 0x96uy; 0x3fuy; 0x2auy; 0x67uy; 0xa3uy; 0x40uy; 0xebuy; 0x1auy; 0xe9uy; 0x94uy; 0xb9uy; 0x8auy; 0x48uy; 0xabuy; 0x19uy; 0xb9uy; 0x0auy; 0xb7uy; 0x43uy; 0x91uy; 0xc5uy; 0x04uy; 0x26uy; 0xd2uy; 0x82uy; 0x87uy; 0xacuy; 0x4fuy; 0x1euy; 0xb9uy; 0x3fuy; 0x5auy; 0xf1uy; 0xa6uy; 0x8cuy; 0x7duy; 0xaeuy; 0x40uy; 0x87uy; 0x6buy; 0x8auy; 0xfauy; 0xafuy; 0x35uy; 0xa1uy; 0x92uy; 0x93uy; 0xc1uy; 0x95uy; 0x2euy; 0x95uy; 0x79uy; 0x78uy; 0xabuy; 0xeeuy; 0x40uy; 0xecuy; 0x32uy; 0xf2uy; 0xaauy; 0x88uy; 0x0cuy; 0x95uy; 0x6cuy; 0x7euy; 0xb7uy; 0x2fuy; 0x11uy; 0x7buy; 0x39uy; 0x7cuy; 0xefuy; 0xcfuy; 0xb4uy; 0xe7uy; 0x5auy; 0xceuy; 0x3buy; 0x08uy; 0x17uy; 0x76uy; 0xe4uy; 0x6buy; 0x13uy; 0x52uy; 0x1euy; 0x93uy; 0x55uy; 0x9duy; 0x45uy; 0x3euy; 0x32uy; 0xabuy; 0x74uy; 0xebuy; 0xc0uy; 0x85uy; 0x9buy; 0x9auy; 0x8duy; 0xd4uy; 0xd1uy; 0xd3uy; 0x90uy; 0x00uy; 0xebuy; 0xe9uy; 0x5fuy; 0x98uy; 0x4duy; 0x80uy; 0xa3uy; 0xf5uy; 0x00uy; 0x4duy; 0xc9uy; 0x1auy; 0x05uy; 0x1duy; 0xfbuy; 0xdfuy; 0xe9uy; 0x19uy; 0x4fuy; 0x4fuy; 0x9auy; 0x48uy; 0x3euy; 0x4euy; 0x79uy; 0x55uy; 0x57uy; 0x7fuy; 0xb0uy; 0x93uy; 0x34uy; 0x64uy; 0xc6uy; 0x3euy; 0xaeuy; 0xc7uy; 0x71uy; 0x04uy; 0x4duy; 0x59uy; 0xabuy; 0xc3uy; 0x02uy; 0x9auy; 0x07uy; 0x95uy; 0x19uy; 0xf8uy; 0x46uy; 0x0auy; 0x69uy; 0x3buy; 0x25uy; 0xb4uy; 0xceuy; 0x20uy; 0x7auy; 0xe9uy; 0xd9uy; 0x44uy; 0x7fuy; 0xc4uy; 0xc5uy; 0x44uy; 0x6euy; 0x6duy; 0xaduy; 0x23uy; 0x4euy; 0x9auy; 0xfduy; 0xecuy; 0x0cuy; 0x56uy; 0x27uy; 0x98uy; 0xcduy; 0x02uy; 0x97uy; 0x31uy; 0x83uy; 0x99uy; 0xe8uy; 0x38uy; 0xbeuy; 0x38uy; 0x58uy; 0x45uy; 0xc6uy; 0xdduy; 0x79uy; 0xeduy; 0xe6uy; 0x6euy; 0x2auy; 0xe8uy; 0x0auy; 0xfeuy; 0xc6uy; 0x73uy; 0x8duy; 0x4duy; 0x9buy; 0xf4uy; 0x4cuy; 0x8duy; 0x9euy; 0xdduy; 0xffuy; 0x6cuy; 0x5cuy; 0xd2uy; 0xc9uy; 0x4euy; 0x34uy; 0x0euy; 0x0duy; 0xdauy; 0xc4uy; 0x03uy; 0x84uy; 0xb9uy; 0xa1uy; 0x40uy; 0x8cuy; 0x9auy; 0x4buy; 0x98uy; 0xc3uy; 0x7auy; 0x60uy; 0x81uy; 0xd5uy; 0x22uy; 0x0fuy; 0xbauy; 0x92uy; 0xf1uy; 0xd0uy; 0x31uy; 0x44uy; 0xdbuy ] in let cipher: list FStar.UInt8.t = [ 0xa1uy; 0x35uy; 0xe3uy; 0x25uy; 0x81uy; 0xbbuy; 0x06uy; 0x28uy; 0x9buy; 0x8cuy; 0x83uy; 0xf0uy; 0x40uy; 0xe9uy; 0x42uy; 0x1euy; 0xc7uy; 0x9buy; 0xbeuy; 0x01uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xbduy; 0x74uy; 0xe7uy; 0xf6uy; 0x07uy; 0xcduy; 0x7duy; 0x90uy; 0x5euy; 0x90uy; 0x17uy; 0x5duy; 0x67uy; 0x65uy; 0x0auy; 0x6duy; 0xc2uy; 0xf8uy; 0xa4uy; 0xe2uy; 0xd4uy; 0xabuy; 0x12uy; 0x49uy; 0xcauy; 0x88uy; 0x81uy; 0x2buy; 0xdauy; 0x79uy; 0x84uy; 0xdeuy; 0xccuy; 0xbbuy; 0xb6uy; 0xa1uy; 0xbauy; 0x90uy; 0xa0uy; 0xe9uy; 0x14uy; 0x34uy; 0xdduy; 0xf5uy; 0xe6uy; 0x13uy; 0x7buy; 0xa8uy; 0x5euy; 0x39uy; 0xa5uy; 0x98uy; 0x89uy; 0x0auy; 0x7fuy; 0x63uy; 0x5duy; 0x33uy; 0x52uy; 0x42uy; 0xfcuy; 0xe0uy; 0xe9uy; 0xe0uy; 0x37uy; 0x30uy; 0x3buy; 0x6cuy; 0x51uy; 0xe5uy; 0x4auy; 0xecuy; 0x06uy; 0x61uy; 0x4auy; 0xd5uy; 0xccuy; 0xceuy; 0x06uy; 0xd9uy; 0x59uy; 0x9cuy; 0x80uy; 0x01uy; 0x65uy; 0x30uy; 0xd7uy; 0xfbuy; 0xb1uy; 0xdauy; 0x6euy; 0xb5uy; 0x48uy; 0x08uy; 0x4buy; 0x2buy; 0x05uy; 0xbauy; 0xbduy; 0x7duy; 0x55uy; 0x36uy; 0x42uy; 0x44uy; 0x3euy; 0xfduy; 0xa7uy; 0x26uy; 0xa1uy; 0xfduy; 0x71uy; 0xa8uy; 0xbcuy; 0x08uy; 0x7cuy; 0x44uy; 0xf2uy; 0x85uy; 0xe2uy; 0xbcuy; 0xcfuy; 0x66uy; 0x1euy; 0xaduy; 0x47uy; 0x5auy; 0x72uy; 0x67uy; 0x3euy; 0x43uy; 0x86uy; 0xfcuy; 0x4euy; 0xeauy; 0x51uy; 0x97uy; 0xc4uy; 0xf1uy; 0x3cuy; 0x0fuy; 0xebuy; 0x0auy; 0x85uy; 0xbcuy; 0x8euy; 0x67uy; 0xe2uy; 0x8auy; 0xb8uy; 0x72uy; 0x68uy; 0x4buy; 0xbeuy; 0xbduy; 0xaauy; 0x52uy; 0x7fuy; 0x3cuy; 0x25uy; 0x3duy; 0xebuy; 0xb2uy; 0xdcuy; 0x12uy; 0xc2uy; 0x69uy; 0x3fuy; 0x8euy; 0x9euy; 0x26uy; 0x51uy; 0xb9uy; 0x34uy; 0x5cuy; 0x0auy; 0xbeuy; 0xd7uy; 0xa0uy; 0xfauy; 0xfauy; 0x3euy; 0x5duy; 0x30uy; 0x53uy; 0x86uy; 0xc9uy; 0x5auy; 0xcbuy; 0x7auy; 0x17uy; 0x2euy; 0x54uy; 0x13uy; 0xefuy; 0x08uy; 0xe7uy; 0x3buy; 0x1buy; 0xd4uy; 0xd0uy; 0xd6uy; 0x83uy; 0x2euy; 0x4cuy; 0x03uy; 0x5buy; 0xc8uy; 0x55uy; 0x9fuy; 0x9buy; 0x0cuy; 0xbduy; 0x0cuy; 0xafuy; 0x03uy; 0x7auy; 0x30uy; 0x70uy; 0x76uy; 0x41uy; 0xc0uy; 0x54uy; 0x53uy; 0x56uy; 0xbeuy; 0xe1uy; 0x51uy; 0xa2uy; 0x40uy; 0x68uy; 0xd7uy; 0x06uy; 0x74uy; 0xefuy; 0x1buy; 0xefuy; 0xe1uy; 0x6fuy; 0x87uy; 0x2auy; 0xefuy; 0x40uy; 0x60uy; 0xfauy; 0xaauy; 0xd1uy; 0xa9uy; 0x68uy; 0xc3uy; 0x9cuy; 0x45uy; 0xdbuy; 0xd7uy; 0x59uy; 0x5duy; 0xe8uy; 0xf4uy; 0x72uy; 0x01uy; 0x6buy; 0x5auy; 0xb8uy; 0x12uy; 0xd7uy; 0x7euy; 0x54uy; 0x5fuy; 0xcauy; 0x55uy; 0x00uy; 0x0euy; 0xe5uy; 0xceuy; 0x77uy; 0x3euy; 0xdauy; 0xa1uy; 0x29uy; 0xeauy; 0xc6uy; 0x47uy; 0x34uy; 0x10uy; 0xc2uy; 0x49uy; 0x90uy; 0x13uy; 0xb4uy; 0xbeuy; 0x89uy; 0x5fuy; 0x6cuy; 0x0fuy; 0x73uy; 0x4buy; 0xecuy; 0xfeuy; 0x99uy; 0x43uy; 0x06uy; 0xe7uy; 0x76uy; 0x26uy; 0x2duy; 0x45uy; 0x28uy; 0xeduy; 0x85uy; 0x77uy; 0x21uy; 0x8euy; 0x3cuy; 0xc5uy; 0x20uy; 0x1fuy; 0x1duy; 0x9euy; 0x5fuy; 0x3fuy; 0x62uy; 0x23uy; 0x0euy; 0xb2uy; 0xcauy; 0xeauy; 0x01uy; 0x4buy; 0xecuy; 0xfbuy; 0xa6uy; 0x0fuy; 0xcbuy; 0x1fuy; 0x39uy; 0x97uy; 0xaauy; 0x5buy; 0x3buy; 0xb6uy; 0x22uy; 0xb7uy; 0x20uy; 0x5cuy; 0x71uy; 0x43uy; 0x48uy; 0xbauy; 0x15uy; 0x5cuy; 0x30uy; 0xa7uy; 0x9auy; 0x2cuy; 0xeauy; 0x43uy; 0xb0uy; 0x70uy; 0xcauy; 0xdauy; 0x80uy; 0x7euy; 0x63uy; 0x0buy; 0x40uy; 0x86uy; 0xb1uy; 0x29uy; 0x05uy; 0x18uy; 0x98uy; 0xe1uy; 0xd9uy; 0xe6uy; 0x8duy; 0x1duy; 0x0euy; 0xccuy; 0x94uy; 0x29uy; 0xd2uy; 0x0duy; 0x6auy; 0x14uy; 0x03uy; 0xe0uy; 0x03uy; 0x5auy; 0x44uy; 0x2buy; 0x37uy; 0xbfuy; 0x50uy; 0x8euy; 0xb8uy; 0x7euy; 0x8euy; 0xa3uy; 0x47uy; 0xa3uy; 0xe6uy; 0x84uy; 0x27uy; 0xb6uy; 0xd4uy; 0x8euy; 0xd2uy; 0x99uy; 0xbauy; 0x65uy; 0xecuy; 0xb3uy; 0x7buy; 0x38uy; 0x75uy; 0x4fuy; 0x45uy; 0x47uy; 0x42uy; 0x3euy; 0xaeuy; 0xa2uy; 0xaeuy; 0xc4uy; 0x03uy; 0x33uy; 0x8duy; 0xb2uy; 0xdcuy; 0xfeuy; 0x61uy; 0xcfuy; 0xf4uy; 0xa8uy; 0xd1uy; 0x7cuy; 0x38uy; 0x36uy; 0x56uy; 0x98uy; 0x1euy; 0x18uy; 0x38uy; 0xa2uy; 0x38uy; 0x66uy; 0xb9uy; 0x1duy; 0x09uy; 0x69uy; 0x8fuy; 0x39uy; 0x17uy; 0x5duy; 0x98uy; 0xafuy; 0x41uy; 0x75uy; 0xcauy; 0xeduy; 0x53uy ] in let cipher: list FStar.UInt8.t = [ 0xb2uy; 0x2buy; 0x87uy; 0xeauy; 0x30uy; 0xf4uy; 0x05uy; 0x09uy; 0x13uy; 0xf8uy; 0xf0uy; 0x24uy; 0x1fuy; 0xc2uy; 0xaeuy; 0x2cuy; 0x31uy; 0x9fuy; 0x52uy; 0xe7uy ] in Vec SHA1 plain cipher) ] let test_one (v:vec) = let Vec a plain tag = v in assert_norm (List.Tot.length tag = hash_length a); assert_norm (List.Tot.length plain `less_than_max_input_length` a); let expected = seq_of_list (List.Tot.map Lib.RawIntTypes.u8_from_UInt8 tag) in let computed = hash a (seq_of_list (List.Tot.map Lib.RawIntTypes.u8_from_UInt8 plain)) in PS.print_compare true (hash_length a) expected computed
false
false
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test : _: Prims.unit -> FStar.All.ALL Prims.bool
[]
Spec.Hash.Test.test
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
_: Prims.unit -> FStar.All.ALL Prims.bool
{ "end_col": 64, "end_line": 1352, "start_col": 13, "start_line": 1349 }
FStar.All.ALL
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test_one (v:vec) = let Vec a plain tag = v in assert_norm (List.Tot.length tag = hash_length a); assert_norm (List.Tot.length plain `less_than_max_input_length` a); let expected = seq_of_list (List.Tot.map Lib.RawIntTypes.u8_from_UInt8 tag) in let computed = hash a (seq_of_list (List.Tot.map Lib.RawIntTypes.u8_from_UInt8 plain)) in PS.print_compare true (hash_length a) expected computed
let test_one (v: vec) =
true
null
false
let Vec a plain tag = v in assert_norm (List.Tot.length tag = hash_length a); assert_norm ((List.Tot.length plain) `less_than_max_input_length` a); let expected = seq_of_list (List.Tot.map Lib.RawIntTypes.u8_from_UInt8 tag) in let computed = hash a (seq_of_list (List.Tot.map Lib.RawIntTypes.u8_from_UInt8 plain)) in PS.print_compare true (hash_length a) expected computed
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[]
[ "Spec.Hash.Test.vec", "Spec.Hash.Definitions.hash_alg", "Prims.b2t", "Prims.op_Negation", "Spec.Hash.Definitions.is_shake", "Prims.list", "FStar.UInt8.t", "Prims.eq2", "Prims.bool", "FStar.Pervasives.norm", "Prims.Cons", "FStar.Pervasives.norm_step", "FStar.Pervasives.delta", "FStar.Pervasives.iota", "FStar.Pervasives.zeta", "FStar.Pervasives.primops", "Prims.Nil", "Spec.Hash.Definitions.less_than_max_input_length", "FStar.List.Tot.Base.length", "Prims.op_Equality", "Prims.nat", "Spec.Hash.Definitions.hash_length", "Lib.PrintSequence.print_compare", "Lib.Sequence.lseq", "Lib.IntTypes.int_t", "Lib.IntTypes.U8", "Lib.IntTypes.SEC", "Spec.Hash.Definitions.hash_length'", "Spec.Agile.Hash.hash", "FStar.Seq.Properties.seq_of_list", "Lib.IntTypes.uint8", "FStar.List.Tot.Base.map", "Lib.RawIntTypes.u8_from_UInt8", "FStar.Seq.Base.seq", "FStar.Seq.Base.length", "Lib.IntTypes.uint_t", "Prims.unit", "FStar.Pervasives.assert_norm" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ] let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ] let test3_expected384 = [ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ] let test3_expected512 = [ 0x20uy; 0x4auy; 0x8fuy; 0xc6uy; 0xdduy; 0xa8uy; 0x2fuy; 0x0auy; 0x0cuy; 0xeduy; 0x7buy; 0xebuy; 0x8euy; 0x08uy; 0xa4uy; 0x16uy; 0x57uy; 0xc1uy; 0x6euy; 0xf4uy; 0x68uy; 0xb2uy; 0x28uy; 0xa8uy; 0x27uy; 0x9buy; 0xe3uy; 0x31uy; 0xa7uy; 0x03uy; 0xc3uy; 0x35uy; 0x96uy; 0xfduy; 0x15uy; 0xc1uy; 0x3buy; 0x1buy; 0x07uy; 0xf9uy; 0xaauy; 0x1duy; 0x3buy; 0xeauy; 0x57uy; 0x78uy; 0x9cuy; 0xa0uy; 0x31uy; 0xaduy; 0x85uy; 0xc7uy; 0xa7uy; 0x1duy; 0xd7uy; 0x03uy; 0x54uy; 0xecuy; 0x63uy; 0x12uy; 0x38uy; 0xcauy; 0x34uy; 0x45uy ] /// Test 4 let test4_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy ] let test4_expected224 = [ 0xc9uy; 0x7cuy; 0xa9uy; 0xa5uy; 0x59uy; 0x85uy; 0x0cuy; 0xe9uy; 0x7auy; 0x04uy; 0xa9uy; 0x6duy; 0xefuy; 0x6duy; 0x99uy; 0xa9uy; 0xe0uy; 0xe0uy; 0xe2uy; 0xabuy; 0x14uy; 0xe6uy; 0xb8uy; 0xdfuy; 0x26uy; 0x5fuy; 0xc0uy; 0xb3uy ] let test4_expected256 = [ 0xcfuy; 0x5buy; 0x16uy; 0xa7uy; 0x78uy; 0xafuy; 0x83uy; 0x80uy; 0x03uy; 0x6cuy; 0xe5uy; 0x9euy; 0x7buy; 0x04uy; 0x92uy; 0x37uy; 0x0buy; 0x24uy; 0x9buy; 0x11uy; 0xe8uy; 0xf0uy; 0x7auy; 0x51uy; 0xafuy; 0xacuy; 0x45uy; 0x03uy; 0x7auy; 0xfeuy; 0xe9uy; 0xd1uy ] let test4_expected384 = [ 0x09uy; 0x33uy; 0x0cuy; 0x33uy; 0xf7uy; 0x11uy; 0x47uy; 0xe8uy; 0x3duy; 0x19uy; 0x2fuy; 0xc7uy; 0x82uy; 0xcduy; 0x1buy; 0x47uy; 0x53uy; 0x11uy; 0x1buy; 0x17uy; 0x3buy; 0x3buy; 0x05uy; 0xd2uy; 0x2fuy; 0xa0uy; 0x80uy; 0x86uy; 0xe3uy; 0xb0uy; 0xf7uy; 0x12uy; 0xfcuy; 0xc7uy; 0xc7uy; 0x1auy; 0x55uy; 0x7euy; 0x2duy; 0xb9uy; 0x66uy; 0xc3uy; 0xe9uy; 0xfauy; 0x91uy; 0x74uy; 0x60uy; 0x39uy ] let test4_expected512 = [ 0x8euy; 0x95uy; 0x9buy; 0x75uy; 0xdauy; 0xe3uy; 0x13uy; 0xdauy; 0x8cuy; 0xf4uy; 0xf7uy; 0x28uy; 0x14uy; 0xfcuy; 0x14uy; 0x3fuy; 0x8fuy; 0x77uy; 0x79uy; 0xc6uy; 0xebuy; 0x9fuy; 0x7fuy; 0xa1uy; 0x72uy; 0x99uy; 0xaeuy; 0xaduy; 0xb6uy; 0x88uy; 0x90uy; 0x18uy; 0x50uy; 0x1duy; 0x28uy; 0x9euy; 0x49uy; 0x00uy; 0xf7uy; 0xe4uy; 0x33uy; 0x1buy; 0x99uy; 0xdeuy; 0xc4uy; 0xb5uy; 0x43uy; 0x3auy; 0xc7uy; 0xd3uy; 0x29uy; 0xeeuy; 0xb6uy; 0xdduy; 0x26uy; 0x54uy; 0x5euy; 0x96uy; 0xe5uy; 0x5buy; 0x87uy; 0x4buy; 0xe9uy; 0x09uy ] open Spec.Agile.Hash open Spec.Hash.Definitions type vec = | Vec : a:hash_alg { not (is_shake a) } -> plain:list UInt8.t {norm [delta; iota; zeta; primops] (List.Tot.length plain `less_than_max_input_length` a) == true} -> hash:list UInt8.t {norm [delta; iota; zeta; primops] (List.Tot.length hash = hash_length a) == true} -> vec let test_vectors: list vec = [ Vec SHA2_224 test1_plaintext test1_expected224; Vec SHA2_224 test2_plaintext test2_expected224; Vec SHA2_224 test3_plaintext test3_expected224; Vec SHA2_224 test4_plaintext test4_expected224; Vec SHA2_256 test1_plaintext test1_expected256; Vec SHA2_256 test2_plaintext test2_expected256; Vec SHA2_256 test3_plaintext test3_expected256; Vec SHA2_256 test4_plaintext test4_expected256; Vec SHA2_384 test1_plaintext test1_expected384; Vec SHA2_384 test2_plaintext test2_expected384; Vec SHA2_384 test3_plaintext test3_expected384; Vec SHA2_384 test4_plaintext test4_expected384; Vec SHA2_512 test1_plaintext test1_expected512; Vec SHA2_512 test2_plaintext test2_expected512; Vec SHA2_512 test3_plaintext test3_expected512; Vec SHA2_512 test4_plaintext test4_expected512; (* MD5 tests from: ./make_md5_tests.sh *) (let plain: list FStar.UInt8.t = [] in let cipher: list FStar.UInt8.t = [ 0xd4uy; 0x1duy; 0x8cuy; 0xd9uy; 0x8fuy; 0x00uy; 0xb2uy; 0x04uy; 0xe9uy; 0x80uy; 0x09uy; 0x98uy; 0xecuy; 0xf8uy; 0x42uy; 0x7euy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [0x61uy] in let cipher: list FStar.UInt8.t = [ 0x0cuy; 0xc1uy; 0x75uy; 0xb9uy; 0xc0uy; 0xf1uy; 0xb6uy; 0xa8uy; 0x31uy; 0xc3uy; 0x99uy; 0xe2uy; 0x69uy; 0x77uy; 0x26uy; 0x61uy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [0x61uy; 0x62uy; 0x63uy] in let cipher: list FStar.UInt8.t = [ 0x90uy; 0x01uy; 0x50uy; 0x98uy; 0x3cuy; 0xd2uy; 0x4fuy; 0xb0uy; 0xd6uy; 0x96uy; 0x3fuy; 0x7duy; 0x28uy; 0xe1uy; 0x7fuy; 0x72uy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x6duy; 0x65uy; 0x73uy; 0x73uy; 0x61uy; 0x67uy; 0x65uy; 0x20uy; 0x64uy; 0x69uy; 0x67uy; 0x65uy; 0x73uy; 0x74uy ] in let cipher: list FStar.UInt8.t = [ 0xf9uy; 0x6buy; 0x69uy; 0x7duy; 0x7cuy; 0xb7uy; 0x93uy; 0x8duy; 0x52uy; 0x5auy; 0x2fuy; 0x31uy; 0xaauy; 0xf1uy; 0x61uy; 0xd0uy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy; 0x76uy; 0x77uy; 0x78uy; 0x79uy; 0x7auy ] in let cipher: list FStar.UInt8.t = [ 0xc3uy; 0xfcuy; 0xd3uy; 0xd7uy; 0x61uy; 0x92uy; 0xe4uy; 0x00uy; 0x7duy; 0xfbuy; 0x49uy; 0x6cuy; 0xcauy; 0x67uy; 0xe1uy; 0x3buy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x41uy; 0x42uy; 0x43uy; 0x44uy; 0x45uy; 0x46uy; 0x47uy; 0x48uy; 0x49uy; 0x4auy; 0x4buy; 0x4cuy; 0x4duy; 0x4euy; 0x4fuy; 0x50uy; 0x51uy; 0x52uy; 0x53uy; 0x54uy; 0x55uy; 0x56uy; 0x57uy; 0x58uy; 0x59uy; 0x5auy; 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy; 0x76uy; 0x77uy; 0x78uy; 0x79uy; 0x7auy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy ] in let cipher: list FStar.UInt8.t = [ 0xd1uy; 0x74uy; 0xabuy; 0x98uy; 0xd2uy; 0x77uy; 0xd9uy; 0xf5uy; 0xa5uy; 0x61uy; 0x1cuy; 0x2cuy; 0x9fuy; 0x41uy; 0x9duy; 0x9fuy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy ] in let cipher: list FStar.UInt8.t = [ 0x57uy; 0xeduy; 0xf4uy; 0xa2uy; 0x2buy; 0xe3uy; 0xc9uy; 0x55uy; 0xacuy; 0x49uy; 0xdauy; 0x2euy; 0x21uy; 0x07uy; 0xb6uy; 0x7auy ] in Vec MD5 plain cipher); (* SHA1 tests from: ./make_sha1_tests.sh *) (let plain: list FStar.UInt8.t = [] in let cipher: list FStar.UInt8.t = [ 0xdauy; 0x39uy; 0xa3uy; 0xeeuy; 0x5euy; 0x6buy; 0x4buy; 0x0duy; 0x32uy; 0x55uy; 0xbfuy; 0xefuy; 0x95uy; 0x60uy; 0x18uy; 0x90uy; 0xafuy; 0xd8uy; 0x07uy; 0x09uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x36uy] in let cipher: list FStar.UInt8.t = [ 0xc1uy; 0xdfuy; 0xd9uy; 0x6euy; 0xeauy; 0x8cuy; 0xc2uy; 0xb6uy; 0x27uy; 0x85uy; 0x27uy; 0x5buy; 0xcauy; 0x38uy; 0xacuy; 0x26uy; 0x12uy; 0x56uy; 0xe2uy; 0x78uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x19uy; 0x5auy] in let cipher: list FStar.UInt8.t = [ 0x0auy; 0x1cuy; 0x2duy; 0x55uy; 0x5buy; 0xbeuy; 0x43uy; 0x1auy; 0xd6uy; 0x28uy; 0x8auy; 0xf5uy; 0xa5uy; 0x4fuy; 0x93uy; 0xe0uy; 0x44uy; 0x9cuy; 0x92uy; 0x32uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0xdfuy; 0x4buy; 0xd2uy] in let cipher: list FStar.UInt8.t = [ 0xbfuy; 0x36uy; 0xeduy; 0x5duy; 0x74uy; 0x72uy; 0x7duy; 0xfduy; 0x5duy; 0x78uy; 0x54uy; 0xecuy; 0x6buy; 0x1duy; 0x49uy; 0x46uy; 0x8duy; 0x8euy; 0xe8uy; 0xaauy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x54uy; 0x9euy; 0x95uy; 0x9euy] in let cipher: list FStar.UInt8.t = [ 0xb7uy; 0x8buy; 0xaeuy; 0x6duy; 0x14uy; 0x33uy; 0x8fuy; 0xfcuy; 0xcfuy; 0xd5uy; 0xd5uy; 0xb5uy; 0x67uy; 0x4auy; 0x27uy; 0x5fuy; 0x6euy; 0xf9uy; 0xc7uy; 0x17uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0xf7uy; 0xfbuy; 0x1buy; 0xe2uy; 0x05uy] in let cipher: list FStar.UInt8.t = [ 0x60uy; 0xb7uy; 0xd5uy; 0xbbuy; 0x56uy; 0x0auy; 0x1auy; 0xcfuy; 0x6fuy; 0xa4uy; 0x57uy; 0x21uy; 0xbduy; 0x0auy; 0xbbuy; 0x41uy; 0x9auy; 0x84uy; 0x1auy; 0x89uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0xc0uy; 0xe5uy; 0xabuy; 0xeauy; 0xeauy; 0x63uy] in let cipher: list FStar.UInt8.t = [ 0xa6uy; 0xd3uy; 0x38uy; 0x45uy; 0x97uy; 0x80uy; 0xc0uy; 0x83uy; 0x63uy; 0x09uy; 0x0fuy; 0xd8uy; 0xfcuy; 0x7duy; 0x28uy; 0xdcuy; 0x80uy; 0xe8uy; 0xe0uy; 0x1fuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x63uy; 0xbfuy; 0xc1uy; 0xeduy; 0x7fuy; 0x78uy; 0xabuy] in let cipher: list FStar.UInt8.t = [ 0x86uy; 0x03uy; 0x28uy; 0xd8uy; 0x05uy; 0x09uy; 0x50uy; 0x0cuy; 0x17uy; 0x83uy; 0x16uy; 0x9euy; 0xbfuy; 0x0buy; 0xa0uy; 0xc4uy; 0xb9uy; 0x4duy; 0xa5uy; 0xe5uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x7euy; 0x3duy; 0x7buy; 0x3euy; 0xaduy; 0xa9uy; 0x88uy; 0x66uy] in let cipher: list FStar.UInt8.t = [ 0x24uy; 0xa2uy; 0xc3uy; 0x4buy; 0x97uy; 0x63uy; 0x05uy; 0x27uy; 0x7cuy; 0xe5uy; 0x8cuy; 0x2fuy; 0x42uy; 0xd5uy; 0x09uy; 0x20uy; 0x31uy; 0x57uy; 0x25uy; 0x20uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x9euy; 0x61uy; 0xe5uy; 0x5duy; 0x9euy; 0xd3uy; 0x7buy; 0x1cuy; 0x20uy] in let cipher: list FStar.UInt8.t = [ 0x41uy; 0x1cuy; 0xceuy; 0xe1uy; 0xf6uy; 0xe3uy; 0x67uy; 0x7duy; 0xf1uy; 0x26uy; 0x98uy; 0x41uy; 0x1euy; 0xb0uy; 0x9duy; 0x3fuy; 0xf5uy; 0x80uy; 0xafuy; 0x97uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x97uy; 0x77uy; 0xcfuy; 0x90uy; 0xdduy; 0x7cuy; 0x7euy; 0x86uy; 0x35uy; 0x06uy] in let cipher: list FStar.UInt8.t = [ 0x05uy; 0xc9uy; 0x15uy; 0xb5uy; 0xeduy; 0x4euy; 0x4cuy; 0x4auy; 0xffuy; 0xfcuy; 0x20uy; 0x29uy; 0x61uy; 0xf3uy; 0x17uy; 0x43uy; 0x71uy; 0xe9uy; 0x0buy; 0x5cuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x4euy; 0xb0uy; 0x8cuy; 0x9euy; 0x68uy; 0x3cuy; 0x94uy; 0xbeuy; 0xa0uy; 0x0duy; 0xfauy] in let cipher: list FStar.UInt8.t = [ 0xafuy; 0x32uy; 0x0buy; 0x42uy; 0xd7uy; 0x78uy; 0x5cuy; 0xa6uy; 0xc8uy; 0xdduy; 0x22uy; 0x04uy; 0x63uy; 0xbeuy; 0x23uy; 0xa2uy; 0xd2uy; 0xcbuy; 0x5auy; 0xfcuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x09uy; 0x38uy; 0xf2uy; 0xe2uy; 0xebuy; 0xb6uy; 0x4fuy; 0x8auy; 0xf8uy; 0xbbuy; 0xfcuy; 0x91uy ] in let cipher: list FStar.UInt8.t = [ 0x9fuy; 0x4euy; 0x66uy; 0xb6uy; 0xceuy; 0xeauy; 0x40uy; 0xdcuy; 0xf4uy; 0xb9uy; 0x16uy; 0x6cuy; 0x28uy; 0xf1uy; 0xc8uy; 0x84uy; 0x74uy; 0x14uy; 0x1duy; 0xa9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x74uy; 0xc9uy; 0x99uy; 0x6duy; 0x14uy; 0xe8uy; 0x7duy; 0x3euy; 0x6cuy; 0xbeuy; 0xa7uy; 0x02uy; 0x9duy ] in let cipher: list FStar.UInt8.t = [ 0xe6uy; 0xc4uy; 0x36uy; 0x3cuy; 0x08uy; 0x52uy; 0x95uy; 0x19uy; 0x91uy; 0x05uy; 0x7fuy; 0x40uy; 0xdeuy; 0x27uy; 0xecuy; 0x08uy; 0x90uy; 0x46uy; 0x6fuy; 0x01uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x51uy; 0xdcuy; 0xa5uy; 0xc0uy; 0xf8uy; 0xe5uy; 0xd4uy; 0x95uy; 0x96uy; 0xf3uy; 0x2duy; 0x3euy; 0xb8uy; 0x74uy ] in let cipher: list FStar.UInt8.t = [ 0x04uy; 0x6auy; 0x7buy; 0x39uy; 0x6cuy; 0x01uy; 0x37uy; 0x9auy; 0x68uy; 0x4auy; 0x89uy; 0x45uy; 0x58uy; 0x77uy; 0x9buy; 0x07uy; 0xd8uy; 0xc7uy; 0xdauy; 0x20uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x3auy; 0x36uy; 0xeauy; 0x49uy; 0x68uy; 0x48uy; 0x20uy; 0xa2uy; 0xaduy; 0xc7uy; 0xfcuy; 0x41uy; 0x75uy; 0xbauy; 0x78uy ] in let cipher: list FStar.UInt8.t = [ 0xd5uy; 0x8auy; 0x26uy; 0x2euy; 0xe7uy; 0xb6uy; 0x57uy; 0x7cuy; 0x07uy; 0x22uy; 0x8euy; 0x71uy; 0xaeuy; 0x9buy; 0x3euy; 0x04uy; 0xc8uy; 0xabuy; 0xcduy; 0xa9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x35uy; 0x52uy; 0x69uy; 0x4cuy; 0xdfuy; 0x66uy; 0x3fuy; 0xd9uy; 0x4buy; 0x22uy; 0x47uy; 0x47uy; 0xacuy; 0x40uy; 0x6auy; 0xafuy ] in let cipher: list FStar.UInt8.t = [ 0xa1uy; 0x50uy; 0xdeuy; 0x92uy; 0x74uy; 0x54uy; 0x20uy; 0x2duy; 0x94uy; 0xe6uy; 0x56uy; 0xdeuy; 0x4cuy; 0x7cuy; 0x0cuy; 0xa6uy; 0x91uy; 0xdeuy; 0x95uy; 0x5duy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xf2uy; 0x16uy; 0xa1uy; 0xcbuy; 0xdeuy; 0x24uy; 0x46uy; 0xb1uy; 0xeduy; 0xf4uy; 0x1euy; 0x93uy; 0x48uy; 0x1duy; 0x33uy; 0xe2uy; 0xeduy ] in let cipher: list FStar.UInt8.t = [ 0x35uy; 0xa4uy; 0xb3uy; 0x9fuy; 0xefuy; 0x56uy; 0x0euy; 0x7euy; 0xa6uy; 0x12uy; 0x46uy; 0x67uy; 0x6euy; 0x1buy; 0x7euy; 0x13uy; 0xd5uy; 0x87uy; 0xbeuy; 0x30uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xa3uy; 0xcfuy; 0x71uy; 0x4buy; 0xf1uy; 0x12uy; 0x64uy; 0x7euy; 0x72uy; 0x7euy; 0x8cuy; 0xfduy; 0x46uy; 0x49uy; 0x9auy; 0xcduy; 0x35uy; 0xa6uy ] in let cipher: list FStar.UInt8.t = [ 0x7cuy; 0xe6uy; 0x9buy; 0x1auy; 0xcduy; 0xceuy; 0x52uy; 0xeauy; 0x7duy; 0xbduy; 0x38uy; 0x25uy; 0x31uy; 0xfauy; 0x1auy; 0x83uy; 0xdfuy; 0x13uy; 0xcauy; 0xe7uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x14uy; 0x8duy; 0xe6uy; 0x40uy; 0xf3uy; 0xc1uy; 0x15uy; 0x91uy; 0xa6uy; 0xf8uy; 0xc5uy; 0xc4uy; 0x86uy; 0x32uy; 0xc5uy; 0xfbuy; 0x79uy; 0xd3uy; 0xb7uy ] in let cipher: list FStar.UInt8.t = [ 0xb4uy; 0x7buy; 0xe2uy; 0xc6uy; 0x41uy; 0x24uy; 0xfauy; 0x9auy; 0x12uy; 0x4auy; 0x88uy; 0x7auy; 0xf9uy; 0x55uy; 0x1auy; 0x74uy; 0x35uy; 0x4cuy; 0xa4uy; 0x11uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x63uy; 0xa3uy; 0xccuy; 0x83uy; 0xfduy; 0x1euy; 0xc1uy; 0xb6uy; 0x68uy; 0x0euy; 0x99uy; 0x74uy; 0xa0uy; 0x51uy; 0x4euy; 0x1auy; 0x9euy; 0xceuy; 0xbbuy; 0x6auy ] in let cipher: list FStar.UInt8.t = [ 0x8buy; 0xb8uy; 0xc0uy; 0xd8uy; 0x15uy; 0xa9uy; 0xc6uy; 0x8auy; 0x1duy; 0x29uy; 0x10uy; 0xf3uy; 0x9duy; 0x94uy; 0x26uy; 0x03uy; 0xd8uy; 0x07uy; 0xfbuy; 0xccuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x87uy; 0x5auy; 0x90uy; 0x90uy; 0x9auy; 0x8auy; 0xfcuy; 0x92uy; 0xfbuy; 0x70uy; 0x70uy; 0x04uy; 0x7euy; 0x9duy; 0x08uy; 0x1euy; 0xc9uy; 0x2fuy; 0x3duy; 0x08uy; 0xb8uy ] in let cipher: list FStar.UInt8.t = [ 0xb4uy; 0x86uy; 0xf8uy; 0x7fuy; 0xb8uy; 0x33uy; 0xebuy; 0xf0uy; 0x32uy; 0x83uy; 0x93uy; 0x12uy; 0x86uy; 0x46uy; 0xa6uy; 0xf6uy; 0xe6uy; 0x60uy; 0xfcuy; 0xb1uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x44uy; 0x4buy; 0x25uy; 0xf9uy; 0xc9uy; 0x25uy; 0x9duy; 0xc2uy; 0x17uy; 0x77uy; 0x2cuy; 0xc4uy; 0x47uy; 0x8cuy; 0x44uy; 0xb6uy; 0xfeuy; 0xffuy; 0x62uy; 0x35uy; 0x36uy; 0x73uy ] in let cipher: list FStar.UInt8.t = [ 0x76uy; 0x15uy; 0x93uy; 0x68uy; 0xf9uy; 0x9duy; 0xecuy; 0xe3uy; 0x0auy; 0xaduy; 0xcfuy; 0xb9uy; 0xb7uy; 0xb4uy; 0x1duy; 0xabuy; 0x33uy; 0x68uy; 0x88uy; 0x58uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x48uy; 0x73uy; 0x51uy; 0xc8uy; 0xa5uy; 0xf4uy; 0x40uy; 0xe4uy; 0xd0uy; 0x33uy; 0x86uy; 0x48uy; 0x3duy; 0x5fuy; 0xe7uy; 0xbbuy; 0x66uy; 0x9duy; 0x41uy; 0xaduy; 0xcbuy; 0xfduy; 0xb7uy ] in let cipher: list FStar.UInt8.t = [ 0xdbuy; 0xc1uy; 0xcbuy; 0x57uy; 0x5cuy; 0xe6uy; 0xaeuy; 0xb9uy; 0xdcuy; 0x4euy; 0xbfuy; 0x0fuy; 0x84uy; 0x3buy; 0xa8uy; 0xaeuy; 0xb1uy; 0x45uy; 0x1euy; 0x89uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x46uy; 0xb0uy; 0x61uy; 0xefuy; 0x13uy; 0x2buy; 0x87uy; 0xf6uy; 0xd3uy; 0xb0uy; 0xeeuy; 0x24uy; 0x62uy; 0xf6uy; 0x7duy; 0x91uy; 0x09uy; 0x77uy; 0xdauy; 0x20uy; 0xaeuy; 0xd1uy; 0x37uy; 0x05uy ] in let cipher: list FStar.UInt8.t = [ 0xd7uy; 0xa9uy; 0x82uy; 0x89uy; 0x67uy; 0x90uy; 0x05uy; 0xebuy; 0x93uy; 0x0auy; 0xb7uy; 0x5euy; 0xfduy; 0x8fuy; 0x65uy; 0x0fuy; 0x99uy; 0x1euy; 0xe9uy; 0x52uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x38uy; 0x42uy; 0xb6uy; 0x13uy; 0x7buy; 0xb9uy; 0xd2uy; 0x7fuy; 0x3cuy; 0xa5uy; 0xbauy; 0xfeuy; 0x5buy; 0xbbuy; 0x62uy; 0x85uy; 0x83uy; 0x44uy; 0xfeuy; 0x4buy; 0xa5uy; 0xc4uy; 0x15uy; 0x89uy; 0xa5uy ] in let cipher: list FStar.UInt8.t = [ 0xfduy; 0xa2uy; 0x6fuy; 0xa9uy; 0xb4uy; 0x87uy; 0x4auy; 0xb7uy; 0x01uy; 0xeduy; 0x0buy; 0xb6uy; 0x4duy; 0x13uy; 0x4fuy; 0x89uy; 0xb9uy; 0xc4uy; 0xccuy; 0x50uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x44uy; 0xd9uy; 0x1duy; 0x3duy; 0x46uy; 0x5auy; 0x41uy; 0x11uy; 0x46uy; 0x2buy; 0xa0uy; 0xc7uy; 0xecuy; 0x22uy; 0x3duy; 0xa6uy; 0x73uy; 0x5fuy; 0x4fuy; 0x52uy; 0x00uy; 0x45uy; 0x3cuy; 0xf1uy; 0x32uy; 0xc3uy ] in let cipher: list FStar.UInt8.t = [ 0xc2uy; 0xffuy; 0x7cuy; 0xcduy; 0xe1uy; 0x43uy; 0xc8uy; 0xf0uy; 0x60uy; 0x1fuy; 0x69uy; 0x74uy; 0xb1uy; 0x90uy; 0x3euy; 0xb8uy; 0xd5uy; 0x74uy; 0x1buy; 0x6euy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xccuy; 0xe7uy; 0x3fuy; 0x2euy; 0xabuy; 0xcbuy; 0x52uy; 0xf7uy; 0x85uy; 0xd5uy; 0xa6uy; 0xdfuy; 0x63uy; 0xc0uy; 0xa1uy; 0x05uy; 0xf3uy; 0x4auy; 0x91uy; 0xcauy; 0x23uy; 0x7fuy; 0xe5uy; 0x34uy; 0xeeuy; 0x39uy; 0x9duy ] in let cipher: list FStar.UInt8.t = [ 0x64uy; 0x3cuy; 0x9duy; 0xc2uy; 0x0auy; 0x92uy; 0x96uy; 0x08uy; 0xf6uy; 0xcauy; 0xa9uy; 0x70uy; 0x9duy; 0x84uy; 0x3cuy; 0xa6uy; 0xfauy; 0x7auy; 0x76uy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x66uy; 0x4euy; 0x6euy; 0x79uy; 0x46uy; 0x83uy; 0x92uy; 0x03uy; 0x03uy; 0x7auy; 0x65uy; 0xa1uy; 0x21uy; 0x74uy; 0xb2uy; 0x44uy; 0xdeuy; 0x8cuy; 0xbcuy; 0x6euy; 0xc3uy; 0xf5uy; 0x78uy; 0x96uy; 0x7auy; 0x84uy; 0xf9uy; 0xceuy ] in let cipher: list FStar.UInt8.t = [ 0x50uy; 0x9euy; 0xf7uy; 0x87uy; 0x34uy; 0x3duy; 0x5buy; 0x5auy; 0x26uy; 0x92uy; 0x29uy; 0xb9uy; 0x61uy; 0xb9uy; 0x62uy; 0x41uy; 0x86uy; 0x4auy; 0x3duy; 0x74uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x95uy; 0x97uy; 0xf7uy; 0x14uy; 0xb2uy; 0xe4uy; 0x5euy; 0x33uy; 0x99uy; 0xa7uy; 0xf0uy; 0x2auy; 0xecuy; 0x44uy; 0x92uy; 0x1buy; 0xd7uy; 0x8buy; 0xe0uy; 0xfeuy; 0xfeuy; 0xe0uy; 0xc5uy; 0xe9uy; 0xb4uy; 0x99uy; 0x48uy; 0x8fuy; 0x6euy ] in let cipher: list FStar.UInt8.t = [ 0xb6uy; 0x1cuy; 0xe5uy; 0x38uy; 0xf1uy; 0xa1uy; 0xe6uy; 0xc9uy; 0x04uy; 0x32uy; 0xb2uy; 0x33uy; 0xd7uy; 0xafuy; 0x5buy; 0x65uy; 0x24uy; 0xebuy; 0xfbuy; 0xe3uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x75uy; 0xc5uy; 0xaduy; 0x1fuy; 0x3cuy; 0xbduy; 0x22uy; 0xe8uy; 0xa9uy; 0x5fuy; 0xc3uy; 0xb0uy; 0x89uy; 0x52uy; 0x67uy; 0x88uy; 0xfbuy; 0x4euy; 0xbcuy; 0xeeuy; 0xd3uy; 0xe7uy; 0xd4uy; 0x44uy; 0x3duy; 0xa6uy; 0xe0uy; 0x81uy; 0xa3uy; 0x5euy ] in let cipher: list FStar.UInt8.t = [ 0x5buy; 0x7buy; 0x94uy; 0x07uy; 0x6buy; 0x2fuy; 0xc2uy; 0x0duy; 0x6auy; 0xdbuy; 0x82uy; 0x47uy; 0x9euy; 0x6buy; 0x28uy; 0xd0uy; 0x7cuy; 0x90uy; 0x2buy; 0x75uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xdduy; 0x24uy; 0x5buy; 0xffuy; 0xe6uy; 0xa6uy; 0x38uy; 0x80uy; 0x66uy; 0x67uy; 0x76uy; 0x83uy; 0x60uy; 0xa9uy; 0x5duy; 0x05uy; 0x74uy; 0xe1uy; 0xa0uy; 0xbduy; 0x0duy; 0x18uy; 0x32uy; 0x9fuy; 0xdbuy; 0x91uy; 0x5cuy; 0xa4uy; 0x84uy; 0xacuy; 0x0duy ] in let cipher: list FStar.UInt8.t = [ 0x60uy; 0x66uy; 0xdbuy; 0x99uy; 0xfcuy; 0x35uy; 0x89uy; 0x52uy; 0xcfuy; 0x7fuy; 0xb0uy; 0xecuy; 0x4duy; 0x89uy; 0xcbuy; 0x01uy; 0x58uy; 0xeduy; 0x91uy; 0xd7uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x03uy; 0x21uy; 0x79uy; 0x4buy; 0x73uy; 0x94uy; 0x18uy; 0xc2uy; 0x4euy; 0x7cuy; 0x2euy; 0x56uy; 0x52uy; 0x74uy; 0x79uy; 0x1cuy; 0x4buy; 0xe7uy; 0x49uy; 0x75uy; 0x2auy; 0xd2uy; 0x34uy; 0xeduy; 0x56uy; 0xcbuy; 0x0auy; 0x63uy; 0x47uy; 0x43uy; 0x0cuy; 0x6buy ] in let cipher: list FStar.UInt8.t = [ 0xb8uy; 0x99uy; 0x62uy; 0xc9uy; 0x4duy; 0x60uy; 0xf6uy; 0xa3uy; 0x32uy; 0xfduy; 0x60uy; 0xf6uy; 0xf0uy; 0x7duy; 0x4fuy; 0x03uy; 0x2auy; 0x58uy; 0x6buy; 0x76uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x4cuy; 0x3duy; 0xcfuy; 0x95uy; 0xc2uy; 0xf0uy; 0xb5uy; 0x25uy; 0x8cuy; 0x65uy; 0x1fuy; 0xcduy; 0x1duy; 0x51uy; 0xbduy; 0x10uy; 0x42uy; 0x5duy; 0x62uy; 0x03uy; 0x06uy; 0x7duy; 0x07uy; 0x48uy; 0xd3uy; 0x7duy; 0x13uy; 0x40uy; 0xd9uy; 0xdduy; 0xdauy; 0x7duy; 0xb3uy ] in let cipher: list FStar.UInt8.t = [ 0x17uy; 0xbduy; 0xa8uy; 0x99uy; 0xc1uy; 0x3duy; 0x35uy; 0x41uy; 0x3duy; 0x25uy; 0x46uy; 0x21uy; 0x2buy; 0xcduy; 0x8auy; 0x93uy; 0xceuy; 0xb0uy; 0x65uy; 0x7buy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xb8uy; 0xd1uy; 0x25uy; 0x82uy; 0xd2uy; 0x5buy; 0x45uy; 0x29uy; 0x0auy; 0x6euy; 0x1buy; 0xb9uy; 0x5duy; 0xa4uy; 0x29uy; 0xbeuy; 0xfcuy; 0xfduy; 0xbfuy; 0x5buy; 0x4duy; 0xd4uy; 0x1cuy; 0xdfuy; 0x33uy; 0x11uy; 0xd6uy; 0x98uy; 0x8fuy; 0xa1uy; 0x7cuy; 0xecuy; 0x07uy; 0x23uy ] in let cipher: list FStar.UInt8.t = [ 0xbauy; 0xdcuy; 0xdduy; 0x53uy; 0xfduy; 0xc1uy; 0x44uy; 0xb8uy; 0xbfuy; 0x2cuy; 0xc1uy; 0xe6uy; 0x4duy; 0x10uy; 0xf6uy; 0x76uy; 0xeeuy; 0xbeuy; 0x66uy; 0xeduy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x6fuy; 0xdauy; 0x97uy; 0x52uy; 0x7auy; 0x66uy; 0x25uy; 0x52uy; 0xbeuy; 0x15uy; 0xefuy; 0xaeuy; 0xbauy; 0x32uy; 0xa3uy; 0xaeuy; 0xa4uy; 0xeduy; 0x44uy; 0x9auy; 0xbbuy; 0x5cuy; 0x1euy; 0xd8uy; 0xd9uy; 0xbfuy; 0xffuy; 0x54uy; 0x47uy; 0x08uy; 0xa4uy; 0x25uy; 0xd6uy; 0x9buy; 0x72uy ] in let cipher: list FStar.UInt8.t = [ 0x01uy; 0xb4uy; 0x64uy; 0x61uy; 0x80uy; 0xf1uy; 0xf6uy; 0xd2uy; 0xe0uy; 0x6buy; 0xbeuy; 0x22uy; 0xc2uy; 0x0euy; 0x50uy; 0x03uy; 0x03uy; 0x22uy; 0x67uy; 0x3auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x09uy; 0xfauy; 0x27uy; 0x92uy; 0xacuy; 0xbbuy; 0x24uy; 0x17uy; 0xe8uy; 0xeduy; 0x26uy; 0x90uy; 0x41uy; 0xccuy; 0x03uy; 0xc7uy; 0x70uy; 0x06uy; 0x46uy; 0x6euy; 0x6euy; 0x7auy; 0xe0uy; 0x02uy; 0xcfuy; 0x3fuy; 0x1auy; 0xf5uy; 0x51uy; 0xe8uy; 0xceuy; 0x0buy; 0xb5uy; 0x06uy; 0xd7uy; 0x05uy ] in let cipher: list FStar.UInt8.t = [ 0x10uy; 0x01uy; 0x6duy; 0xc3uy; 0xa2uy; 0x71uy; 0x9fuy; 0x90uy; 0x34uy; 0xffuy; 0xccuy; 0x68uy; 0x94uy; 0x26uy; 0xd2uy; 0x82uy; 0x92uy; 0xc4uy; 0x2fuy; 0xc9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x5euy; 0xfauy; 0x29uy; 0x87uy; 0xdauy; 0x0buy; 0xafuy; 0x0auy; 0x54uy; 0xd8uy; 0xd7uy; 0x28uy; 0x79uy; 0x2buy; 0xcfuy; 0xa7uy; 0x07uy; 0xa1uy; 0x57uy; 0x98uy; 0xdcuy; 0x66uy; 0x74uy; 0x37uy; 0x54uy; 0x40uy; 0x69uy; 0x14uy; 0xd1uy; 0xcfuy; 0xe3uy; 0x70uy; 0x9buy; 0x13uy; 0x74uy; 0xeauy; 0xebuy ] in let cipher: list FStar.UInt8.t = [ 0x9fuy; 0x42uy; 0xfauy; 0x2buy; 0xceuy; 0x6euy; 0xf0uy; 0x21uy; 0xd9uy; 0x3cuy; 0x6buy; 0x2duy; 0x90uy; 0x22uy; 0x73uy; 0x79uy; 0x7euy; 0x42uy; 0x65uy; 0x35uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x28uy; 0x36uy; 0xdeuy; 0x99uy; 0xc0uy; 0xf6uy; 0x41uy; 0xcduy; 0x55uy; 0xe8uy; 0x9fuy; 0x5auy; 0xf7uy; 0x66uy; 0x38uy; 0x94uy; 0x7buy; 0x82uy; 0x27uy; 0x37uy; 0x7euy; 0xf8uy; 0x8buy; 0xfbuy; 0xa6uy; 0x62uy; 0xe5uy; 0x68uy; 0x2buy; 0xabuy; 0xc1uy; 0xecuy; 0x96uy; 0xc6uy; 0x99uy; 0x2buy; 0xc9uy; 0xa0uy ] in let cipher: list FStar.UInt8.t = [ 0xcduy; 0xf4uy; 0x8buy; 0xacuy; 0xbfuy; 0xf6uy; 0xf6uy; 0x15uy; 0x25uy; 0x15uy; 0x32uy; 0x3fuy; 0x9buy; 0x43uy; 0xa2uy; 0x86uy; 0xe0uy; 0xcbuy; 0x81uy; 0x13uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x42uy; 0x14uy; 0x3auy; 0x2buy; 0x9euy; 0x1duy; 0x0buy; 0x35uy; 0x4duy; 0xf3uy; 0x26uy; 0x4duy; 0x08uy; 0xf7uy; 0xb6uy; 0x02uy; 0xf5uy; 0x4auy; 0xaduy; 0x92uy; 0x2auy; 0x3duy; 0x63uy; 0x00uy; 0x6duy; 0x09uy; 0x7fuy; 0x68uy; 0x3duy; 0xc1uy; 0x1buy; 0x90uy; 0x17uy; 0x84uy; 0x23uy; 0xbfuy; 0xf2uy; 0xf7uy; 0xfeuy ] in let cipher: list FStar.UInt8.t = [ 0xb8uy; 0x8fuy; 0xb7uy; 0x52uy; 0x74uy; 0xb9uy; 0xb0uy; 0xfduy; 0x57uy; 0xc0uy; 0x04uy; 0x59uy; 0x88uy; 0xcfuy; 0xceuy; 0xf6uy; 0xc3uy; 0xceuy; 0x65uy; 0x54uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xebuy; 0x60uy; 0xc2uy; 0x8auy; 0xd8uy; 0xaeuy; 0xdauy; 0x80uy; 0x7duy; 0x69uy; 0xebuy; 0xc8uy; 0x75uy; 0x52uy; 0x02uy; 0x4auy; 0xd8uy; 0xacuy; 0xa6uy; 0x82uy; 0x04uy; 0xf1uy; 0xbcuy; 0xd2uy; 0x9duy; 0xc5uy; 0xa8uy; 0x1duy; 0xd2uy; 0x28uy; 0xb5uy; 0x91uy; 0xe2uy; 0xefuy; 0xb7uy; 0xc4uy; 0xdfuy; 0x75uy; 0xefuy; 0x03uy ] in let cipher: list FStar.UInt8.t = [ 0xc0uy; 0x6duy; 0x3auy; 0x6auy; 0x12uy; 0xd9uy; 0xe8uy; 0xdbuy; 0x62uy; 0xe8uy; 0xcfuy; 0xf4uy; 0x0cuy; 0xa2uy; 0x38uy; 0x20uy; 0xd6uy; 0x1duy; 0x8auy; 0xa7uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x7duy; 0xe4uy; 0xbauy; 0x85uy; 0xecuy; 0x54uy; 0x74uy; 0x7cuy; 0xdcuy; 0x42uy; 0xb1uy; 0xf2uy; 0x35uy; 0x46uy; 0xb7uy; 0xe4uy; 0x90uy; 0xe3uy; 0x12uy; 0x80uy; 0xf0uy; 0x66uy; 0xe5uy; 0x2fuy; 0xacuy; 0x11uy; 0x7fuy; 0xd3uy; 0xb0uy; 0x79uy; 0x2euy; 0x4duy; 0xe6uy; 0x2duy; 0x58uy; 0x43uy; 0xeeuy; 0x98uy; 0xc7uy; 0x20uy; 0x15uy ] in let cipher: list FStar.UInt8.t = [ 0x6euy; 0x40uy; 0xf9uy; 0xe8uy; 0x3auy; 0x4buy; 0xe9uy; 0x38uy; 0x74uy; 0xbcuy; 0x97uy; 0xcduy; 0xebuy; 0xb8uy; 0xdauy; 0x68uy; 0x89uy; 0xaeuy; 0x2cuy; 0x7auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xe7uy; 0x06uy; 0x53uy; 0x63uy; 0x7buy; 0xc5uy; 0xe3uy; 0x88uy; 0xccuy; 0xd8uy; 0xdcuy; 0x44uy; 0xe5uy; 0xeauy; 0xceuy; 0x36uy; 0xf7uy; 0x39uy; 0x8fuy; 0x2buy; 0xacuy; 0x99uy; 0x30uy; 0x42uy; 0xb9uy; 0xbcuy; 0x2fuy; 0x4fuy; 0xb3uy; 0xb0uy; 0xeeuy; 0x7euy; 0x23uy; 0xa9uy; 0x64uy; 0x39uy; 0xdcuy; 0x01uy; 0x13uy; 0x4buy; 0x8cuy; 0x7duy ] in let cipher: list FStar.UInt8.t = [ 0x3euy; 0xfcuy; 0x94uy; 0x0cuy; 0x31uy; 0x2euy; 0xf0uy; 0xdfuy; 0xd4uy; 0xe1uy; 0x14uy; 0x38uy; 0x12uy; 0x24uy; 0x8duy; 0xb8uy; 0x95uy; 0x42uy; 0xf6uy; 0xa5uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xdduy; 0x37uy; 0xbcuy; 0x9fuy; 0x0buy; 0x3auy; 0x47uy; 0x88uy; 0xf9uy; 0xb5uy; 0x49uy; 0x66uy; 0xf2uy; 0x52uy; 0x17uy; 0x4cuy; 0x8cuy; 0xe4uy; 0x87uy; 0xcbuy; 0xe5uy; 0x9cuy; 0x53uy; 0xc2uy; 0x2buy; 0x81uy; 0xbfuy; 0x77uy; 0x62uy; 0x1auy; 0x7cuy; 0xe7uy; 0x61uy; 0x6duy; 0xcbuy; 0x5buy; 0x1euy; 0x2euy; 0xe6uy; 0x3cuy; 0x2cuy; 0x30uy; 0x9buy ] in let cipher: list FStar.UInt8.t = [ 0xa0uy; 0xcfuy; 0x03uy; 0xf7uy; 0xbauy; 0xdduy; 0x0cuy; 0x3cuy; 0x3cuy; 0x4euy; 0xa3uy; 0x71uy; 0x7fuy; 0x5auy; 0x4fuy; 0xb7uy; 0xe6uy; 0x7buy; 0x2euy; 0x56uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x5fuy; 0x48uy; 0x5cuy; 0x63uy; 0x7auy; 0xe3uy; 0x0buy; 0x1euy; 0x30uy; 0x49uy; 0x7fuy; 0x0fuy; 0xb7uy; 0xecuy; 0x36uy; 0x4euy; 0x13uy; 0xc9uy; 0x06uy; 0xe2uy; 0x81uy; 0x3duy; 0xaauy; 0x34uy; 0x16uy; 0x1buy; 0x7auy; 0xc4uy; 0xa4uy; 0xfduy; 0x7auy; 0x1buy; 0xdduy; 0xd7uy; 0x96uy; 0x01uy; 0xbbuy; 0xd2uy; 0x2cuy; 0xefuy; 0x1fuy; 0x57uy; 0xcbuy; 0xc7uy ] in let cipher: list FStar.UInt8.t = [ 0xa5uy; 0x44uy; 0xe0uy; 0x6fuy; 0x1auy; 0x07uy; 0xceuy; 0xb1uy; 0x75uy; 0xa5uy; 0x1duy; 0x6duy; 0x9cuy; 0x01uy; 0x11uy; 0xb3uy; 0xe1uy; 0x5euy; 0x98uy; 0x59uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xf6uy; 0xc2uy; 0x37uy; 0xfbuy; 0x3cuy; 0xfeuy; 0x95uy; 0xecuy; 0x84uy; 0x14uy; 0xccuy; 0x16uy; 0xd2uy; 0x03uy; 0xb4uy; 0x87uy; 0x4euy; 0x64uy; 0x4cuy; 0xc9uy; 0xa5uy; 0x43uy; 0x46uy; 0x5cuy; 0xaduy; 0x2duy; 0xc5uy; 0x63uy; 0x48uy; 0x8auy; 0x65uy; 0x9euy; 0x8auy; 0x2euy; 0x7cuy; 0x98uy; 0x1euy; 0x2auy; 0x9fuy; 0x22uy; 0xe5uy; 0xe8uy; 0x68uy; 0xffuy; 0xe1uy ] in let cipher: list FStar.UInt8.t = [ 0x19uy; 0x9duy; 0x98uy; 0x6euy; 0xd9uy; 0x91uy; 0xb9uy; 0x9auy; 0x07uy; 0x1fuy; 0x45uy; 0x0cuy; 0x6buy; 0x11uy; 0x21uy; 0xa7uy; 0x27uy; 0xe8uy; 0xc7uy; 0x35uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xdauy; 0x7auy; 0xb3uy; 0x29uy; 0x15uy; 0x53uy; 0xc6uy; 0x59uy; 0x87uy; 0x3cuy; 0x95uy; 0x91uy; 0x37uy; 0x68uy; 0x95uy; 0x3cuy; 0x6euy; 0x52uy; 0x6duy; 0x3auy; 0x26uy; 0x59uy; 0x08uy; 0x98uy; 0xc0uy; 0xaduy; 0xe8uy; 0x9fuy; 0xf5uy; 0x6fuy; 0xbduy; 0x11uy; 0x0fuy; 0x14uy; 0x36uy; 0xafuy; 0x59uy; 0x0buy; 0x17uy; 0xfeuy; 0xd4uy; 0x9fuy; 0x8cuy; 0x4buy; 0x2buy; 0x1euy ] in let cipher: list FStar.UInt8.t = [ 0x33uy; 0xbauy; 0xc6uy; 0x10uy; 0x4buy; 0x0auy; 0xd6uy; 0x12uy; 0x8duy; 0x09uy; 0x1buy; 0x5duy; 0x5euy; 0x29uy; 0x99uy; 0x09uy; 0x9cuy; 0x9fuy; 0x05uy; 0xdeuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x8cuy; 0xfauy; 0x5fuy; 0xd5uy; 0x6euy; 0xe2uy; 0x39uy; 0xcauy; 0x47uy; 0x73uy; 0x75uy; 0x91uy; 0xcbuy; 0xa1uy; 0x03uy; 0xe4uy; 0x1auy; 0x18uy; 0xacuy; 0xf8uy; 0xe8uy; 0xd2uy; 0x57uy; 0xb0uy; 0xdbuy; 0xe8uy; 0x85uy; 0x11uy; 0x34uy; 0xa8uy; 0x1fuy; 0xf6uy; 0xb2uy; 0xe9uy; 0x71uy; 0x04uy; 0xb3uy; 0x9buy; 0x76uy; 0xe1uy; 0x9duy; 0xa2uy; 0x56uy; 0xa1uy; 0x7cuy; 0xe5uy; 0x2duy ] in let cipher: list FStar.UInt8.t = [ 0x76uy; 0xd7uy; 0xdbuy; 0x6euy; 0x18uy; 0xc1uy; 0xf4uy; 0xaeuy; 0x22uy; 0x5cuy; 0xe8uy; 0xccuy; 0xc9uy; 0x3cuy; 0x8fuy; 0x9auy; 0x0duy; 0xfeuy; 0xb9uy; 0x69uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x57uy; 0xe8uy; 0x96uy; 0x59uy; 0xd8uy; 0x78uy; 0xf3uy; 0x60uy; 0xafuy; 0x6duy; 0xe4uy; 0x5auy; 0x9auy; 0x5euy; 0x37uy; 0x2euy; 0xf4uy; 0x0cuy; 0x38uy; 0x49uy; 0x88uy; 0xe8uy; 0x26uy; 0x40uy; 0xa3uy; 0xd5uy; 0xe4uy; 0xb7uy; 0x6duy; 0x2euy; 0xf1uy; 0x81uy; 0x78uy; 0x0buy; 0x9auy; 0x09uy; 0x9auy; 0xc0uy; 0x6euy; 0xf0uy; 0xf8uy; 0xa7uy; 0xf3uy; 0xf7uy; 0x64uy; 0x20uy; 0x97uy; 0x20uy ] in let cipher: list FStar.UInt8.t = [ 0xf6uy; 0x52uy; 0xf3uy; 0xb1uy; 0x54uy; 0x9fuy; 0x16uy; 0x71uy; 0x0cuy; 0x74uy; 0x02uy; 0x89uy; 0x59uy; 0x11uy; 0xe2uy; 0xb8uy; 0x6auy; 0x9buy; 0x2auy; 0xeeuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xb9uy; 0x1euy; 0x64uy; 0x23uy; 0x5duy; 0xbduy; 0x23uy; 0x4euy; 0xeauy; 0x2auy; 0xe1uy; 0x4auy; 0x92uy; 0xa1uy; 0x73uy; 0xebuy; 0xe8uy; 0x35uy; 0x34uy; 0x72uy; 0x39uy; 0xcfuy; 0xf8uy; 0xb0uy; 0x20uy; 0x74uy; 0x41uy; 0x6fuy; 0x55uy; 0xc6uy; 0xb6uy; 0x0duy; 0xc6uy; 0xceuy; 0xd0uy; 0x6auy; 0xe9uy; 0xf8uy; 0xd7uy; 0x05uy; 0x50uy; 0x5fuy; 0x0duy; 0x61uy; 0x7euy; 0x4buy; 0x29uy; 0xaeuy; 0xf9uy ] in let cipher: list FStar.UInt8.t = [ 0x63uy; 0xfauy; 0xebuy; 0xb8uy; 0x07uy; 0xf3uy; 0x2buy; 0xe7uy; 0x08uy; 0xcfuy; 0x00uy; 0xfcuy; 0x35uy; 0x51uy; 0x99uy; 0x91uy; 0xdcuy; 0x4euy; 0x7fuy; 0x68uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xe4uy; 0x2auy; 0x67uy; 0x36uy; 0x2auy; 0x58uy; 0x1euy; 0x8cuy; 0xf3uy; 0xd8uy; 0x47uy; 0x50uy; 0x22uy; 0x15uy; 0x75uy; 0x5duy; 0x7auy; 0xd4uy; 0x25uy; 0xcauy; 0x03uy; 0x0cuy; 0x43uy; 0x60uy; 0xb0uy; 0xf7uy; 0xefuy; 0x51uy; 0x3euy; 0x69uy; 0x80uy; 0x26uy; 0x5fuy; 0x61uy; 0xc9uy; 0xfauy; 0x18uy; 0xdduy; 0x9cuy; 0xe6uy; 0x68uy; 0xf3uy; 0x8duy; 0xbcuy; 0x2auy; 0x1euy; 0xf8uy; 0xf8uy; 0x3cuy; 0xd6uy ] in let cipher: list FStar.UInt8.t = [ 0x0euy; 0x67uy; 0x30uy; 0xbcuy; 0x4auy; 0x0euy; 0x93uy; 0x22uy; 0xeauy; 0x20uy; 0x5fuy; 0x4euy; 0xdfuy; 0xffuy; 0x1fuy; 0xffuy; 0xdauy; 0x26uy; 0xafuy; 0x0auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x63uy; 0x4duy; 0xb9uy; 0x2cuy; 0x22uy; 0x01uy; 0x0euy; 0x1cuy; 0xbfuy; 0x1euy; 0x16uy; 0x23uy; 0x92uy; 0x31uy; 0x80uy; 0x40uy; 0x6cuy; 0x51uy; 0x52uy; 0x72uy; 0x20uy; 0x9auy; 0x8auy; 0xccuy; 0x42uy; 0xdeuy; 0x05uy; 0xccuy; 0x2euy; 0x96uy; 0xa1uy; 0xe9uy; 0x4cuy; 0x1fuy; 0x9fuy; 0x6buy; 0x93uy; 0x23uy; 0x4buy; 0x7fuy; 0x4cuy; 0x55uy; 0xdeuy; 0x8buy; 0x19uy; 0x61uy; 0xa3uy; 0xbfuy; 0x35uy; 0x22uy; 0x59uy ] in let cipher: list FStar.UInt8.t = [ 0xb6uy; 0x1auy; 0x3auy; 0x6fuy; 0x42uy; 0xe8uy; 0xe6uy; 0x60uy; 0x4buy; 0x93uy; 0x19uy; 0x6cuy; 0x43uy; 0xc9uy; 0xe8uy; 0x4duy; 0x53uy; 0x59uy; 0xe6uy; 0xfeuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xccuy; 0x6cuy; 0xa3uy; 0xa8uy; 0xcbuy; 0x39uy; 0x1cuy; 0xd8uy; 0xa5uy; 0xafuy; 0xf1uy; 0xfauy; 0xa7uy; 0xb3uy; 0xffuy; 0xbduy; 0xd2uy; 0x1auy; 0x5auy; 0x3cuy; 0xe6uy; 0x6cuy; 0xfauy; 0xdduy; 0xbfuy; 0xe8uy; 0xb1uy; 0x79uy; 0xe4uy; 0xc8uy; 0x60uy; 0xbeuy; 0x5euy; 0xc6uy; 0x6buy; 0xd2uy; 0xc6uy; 0xdeuy; 0x6auy; 0x39uy; 0xa2uy; 0x56uy; 0x22uy; 0xf9uy; 0xf2uy; 0xfcuy; 0xb3uy; 0xfcuy; 0x05uy; 0xafuy; 0x12uy; 0xb5uy ] in let cipher: list FStar.UInt8.t = [ 0x32uy; 0xd9uy; 0x79uy; 0xcauy; 0x1buy; 0x3euy; 0xd0uy; 0xeduy; 0x8cuy; 0x89uy; 0x0duy; 0x99uy; 0xecuy; 0x6duy; 0xd8uy; 0x5euy; 0x6cuy; 0x16uy; 0xabuy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x7cuy; 0x0euy; 0x6auy; 0x0duy; 0x35uy; 0xf8uy; 0xacuy; 0x85uy; 0x4cuy; 0x72uy; 0x45uy; 0xebuy; 0xc7uy; 0x36uy; 0x93uy; 0x73uy; 0x1buy; 0xbbuy; 0xc3uy; 0xe6uy; 0xfauy; 0xb6uy; 0x44uy; 0x46uy; 0x6duy; 0xe2uy; 0x7buy; 0xb5uy; 0x22uy; 0xfcuy; 0xb9uy; 0x93uy; 0x07uy; 0x12uy; 0x6auy; 0xe7uy; 0x18uy; 0xfeuy; 0x8fuy; 0x00uy; 0x74uy; 0x2euy; 0x6euy; 0x5cuy; 0xb7uy; 0xa6uy; 0x87uy; 0xc8uy; 0x84uy; 0x47uy; 0xcbuy; 0xc9uy; 0x61uy ] in let cipher: list FStar.UInt8.t = [ 0x6fuy; 0x18uy; 0x19uy; 0x0buy; 0xd2uy; 0xd0uy; 0x2fuy; 0xc9uy; 0x3buy; 0xceuy; 0x64uy; 0x75uy; 0x65uy; 0x75uy; 0xceuy; 0xa3uy; 0x6duy; 0x08uy; 0xb1uy; 0xc3uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xc5uy; 0x58uy; 0x1duy; 0x40uy; 0xb3uy; 0x31uy; 0xe2uy; 0x40uy; 0x03uy; 0x90uy; 0x1buy; 0xd6uy; 0xbfuy; 0x24uy; 0x4auy; 0xcauy; 0x9euy; 0x96uy; 0x01uy; 0xb9uy; 0xd8uy; 0x12uy; 0x52uy; 0xbbuy; 0x38uy; 0x04uy; 0x86uy; 0x42uy; 0x73uy; 0x1fuy; 0x11uy; 0x46uy; 0xb8uy; 0xa4uy; 0xc6uy; 0x9fuy; 0x88uy; 0xe1uy; 0x48uy; 0xb2uy; 0xc8uy; 0xf8uy; 0xc1uy; 0x4fuy; 0x15uy; 0xe1uy; 0xd6uy; 0xdauy; 0x57uy; 0xb2uy; 0xdauy; 0xa9uy; 0x99uy; 0x1euy ] in let cipher: list FStar.UInt8.t = [ 0x68uy; 0xf5uy; 0x25uy; 0xfeuy; 0xeauy; 0x1duy; 0x8duy; 0xbeuy; 0x01uy; 0x17uy; 0xe4uy; 0x17uy; 0xcauy; 0x46uy; 0x70uy; 0x8duy; 0x18uy; 0xd7uy; 0x62uy; 0x9auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xecuy; 0x6buy; 0x4auy; 0x88uy; 0x71uy; 0x3duy; 0xf2uy; 0x7cuy; 0x0fuy; 0x2duy; 0x02uy; 0xe7uy; 0x38uy; 0xb6uy; 0x9duy; 0xb4uy; 0x3auy; 0xbduy; 0xa3uy; 0x92uy; 0x13uy; 0x17uy; 0x25uy; 0x9cuy; 0x86uy; 0x4cuy; 0x1cuy; 0x38uy; 0x6euy; 0x9auy; 0x5auy; 0x3fuy; 0x53uy; 0x3duy; 0xc0uy; 0x5fuy; 0x3buy; 0xeeuy; 0xb2uy; 0xbeuy; 0xc2uy; 0xaauy; 0xc8uy; 0xe0uy; 0x6duy; 0xb4uy; 0xc6uy; 0xcbuy; 0x3cuy; 0xdduy; 0xcfuy; 0x69uy; 0x7euy; 0x03uy; 0xd5uy ] in let cipher: list FStar.UInt8.t = [ 0xa7uy; 0x27uy; 0x2euy; 0x23uy; 0x08uy; 0x62uy; 0x2fuy; 0xf7uy; 0xa3uy; 0x39uy; 0x46uy; 0x0auy; 0xdcuy; 0x61uy; 0xefuy; 0xd0uy; 0xeauy; 0x8duy; 0xabuy; 0xdcuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x03uy; 0x21uy; 0x73uy; 0x6buy; 0xebuy; 0xa5uy; 0x78uy; 0xe9uy; 0x0auy; 0xbcuy; 0x1auy; 0x90uy; 0xaauy; 0x56uy; 0x15uy; 0x7duy; 0x87uy; 0x16uy; 0x18uy; 0xf6uy; 0xdeuy; 0x0duy; 0x76uy; 0x4cuy; 0xc8uy; 0xc9uy; 0x1euy; 0x06uy; 0xc6uy; 0x8euy; 0xcduy; 0x3buy; 0x9duy; 0xe3uy; 0x82uy; 0x40uy; 0x64uy; 0x50uy; 0x33uy; 0x84uy; 0xdbuy; 0x67uy; 0xbeuy; 0xb7uy; 0xfeuy; 0x01uy; 0x22uy; 0x32uy; 0xdauy; 0xcauy; 0xefuy; 0x93uy; 0xa0uy; 0x00uy; 0xfbuy; 0xa7uy ] in let cipher: list FStar.UInt8.t = [ 0xaeuy; 0xf8uy; 0x43uy; 0xb8uy; 0x69uy; 0x16uy; 0xc1uy; 0x6fuy; 0x66uy; 0xc8uy; 0x4duy; 0x83uy; 0xa6uy; 0x00uy; 0x5duy; 0x23uy; 0xfduy; 0x00uy; 0x5cuy; 0x9euy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xd0uy; 0xa2uy; 0x49uy; 0xa9uy; 0x7buy; 0x5fuy; 0x14uy; 0x86uy; 0x72uy; 0x1auy; 0x50uy; 0xd4uy; 0xc4uy; 0xabuy; 0x3fuy; 0x5duy; 0x67uy; 0x4auy; 0x0euy; 0x29uy; 0x92uy; 0x5duy; 0x5buy; 0xf2uy; 0x67uy; 0x8euy; 0xf6uy; 0xd8uy; 0xd5uy; 0x21uy; 0xe4uy; 0x56uy; 0xbduy; 0x84uy; 0xaauy; 0x75uy; 0x53uy; 0x28uy; 0xc8uy; 0x3fuy; 0xc8uy; 0x90uy; 0x83uy; 0x77uy; 0x26uy; 0xa8uy; 0xe7uy; 0x87uy; 0x7buy; 0x57uy; 0x0duy; 0xbauy; 0x39uy; 0x57uy; 0x9auy; 0xabuy; 0xdduy ] in let cipher: list FStar.UInt8.t = [ 0xbeuy; 0x2cuy; 0xd6uy; 0xf3uy; 0x80uy; 0x96uy; 0x9buy; 0xe5uy; 0x9cuy; 0xdeuy; 0x2duy; 0xffuy; 0x5euy; 0x84uy; 0x8auy; 0x44uy; 0xe7uy; 0x88uy; 0x0buy; 0xd6uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xc3uy; 0x21uy; 0x38uy; 0x53uy; 0x11uy; 0x18uy; 0xf0uy; 0x8cuy; 0x7duy; 0xccuy; 0x29uy; 0x24uy; 0x28uy; 0xaduy; 0x20uy; 0xb4uy; 0x5auy; 0xb2uy; 0x7duy; 0x95uy; 0x17uy; 0xa1uy; 0x84uy; 0x45uy; 0xf3uy; 0x8buy; 0x8fuy; 0x0cuy; 0x27uy; 0x95uy; 0xbcuy; 0xdfuy; 0xe3uy; 0xffuy; 0xe3uy; 0x84uy; 0xe6uy; 0x5euy; 0xcbuy; 0xf7uy; 0x4duy; 0x2cuy; 0x9duy; 0x0duy; 0xa8uy; 0x83uy; 0x98uy; 0x57uy; 0x53uy; 0x26uy; 0x07uy; 0x49uy; 0x04uy; 0xc1uy; 0x70uy; 0x9buy; 0xa0uy; 0x72uy ] in let cipher: list FStar.UInt8.t = [ 0xe5uy; 0xebuy; 0x45uy; 0x43uy; 0xdeuy; 0xeeuy; 0x8fuy; 0x6auy; 0x52uy; 0x87uy; 0x84uy; 0x5auy; 0xf8uy; 0xb5uy; 0x93uy; 0xa9uy; 0x5auy; 0x97uy; 0x49uy; 0xa1uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xb0uy; 0xf4uy; 0xcfuy; 0xb9uy; 0x39uy; 0xeauy; 0x78uy; 0x5euy; 0xabuy; 0xb7uy; 0xe7uy; 0xcauy; 0x7cuy; 0x47uy; 0x6cuy; 0xdduy; 0x9buy; 0x22uy; 0x7fuy; 0x01uy; 0x5duy; 0x90uy; 0x53uy; 0x68uy; 0xbauy; 0x00uy; 0xaeuy; 0x96uy; 0xb9uy; 0xaauy; 0xf7uy; 0x20uy; 0x29uy; 0x74uy; 0x91uy; 0xb3uy; 0x92uy; 0x12uy; 0x67uy; 0x57uy; 0x6buy; 0x72uy; 0xc8uy; 0xf5uy; 0x8duy; 0x57uy; 0x76uy; 0x17uy; 0xe8uy; 0x44uy; 0xf9uy; 0xf0uy; 0x75uy; 0x9buy; 0x39uy; 0x9cuy; 0x6buy; 0x06uy; 0x4cuy ] in let cipher: list FStar.UInt8.t = [ 0x53uy; 0x4cuy; 0x85uy; 0x04uy; 0x48uy; 0xdduy; 0x48uy; 0x67uy; 0x87uy; 0xb6uy; 0x2buy; 0xdeuy; 0xc2uy; 0xd4uy; 0xa0uy; 0xb1uy; 0x40uy; 0xa1uy; 0xb1uy; 0x70uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xbduy; 0x02uy; 0xe5uy; 0x1buy; 0x0cuy; 0xf2uy; 0xc2uy; 0xb8uy; 0xd2uy; 0x04uy; 0xa0uy; 0x26uy; 0xb4uy; 0x1auy; 0x66uy; 0xfbuy; 0xfcuy; 0x2auy; 0xc3uy; 0x7euy; 0xe9uy; 0x41uy; 0x1fuy; 0xc4uy; 0x49uy; 0xc8uy; 0xd1uy; 0x19uy; 0x4auy; 0x07uy; 0x92uy; 0xa2uy; 0x8euy; 0xe7uy; 0x31uy; 0x40uy; 0x7duy; 0xfcuy; 0x89uy; 0xb6uy; 0xdfuy; 0xc2uy; 0xb1uy; 0x0fuy; 0xaauy; 0x27uy; 0x72uy; 0x3auy; 0x18uy; 0x4auy; 0xfeuy; 0xf8uy; 0xfduy; 0x83uy; 0xdeuy; 0xf8uy; 0x58uy; 0xa3uy; 0x2duy; 0x3fuy ] in let cipher: list FStar.UInt8.t = [ 0x6fuy; 0xbfuy; 0xa6uy; 0xe4uy; 0xeduy; 0xceuy; 0x4cuy; 0xc8uy; 0x5auy; 0x84uy; 0x5buy; 0xf0uy; 0xd2uy; 0x28uy; 0xdcuy; 0x39uy; 0xacuy; 0xefuy; 0xc2uy; 0xfauy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xe3uy; 0x31uy; 0x46uy; 0xb8uy; 0x3euy; 0x4buy; 0xb6uy; 0x71uy; 0x39uy; 0x22uy; 0x18uy; 0xdauy; 0x9auy; 0x77uy; 0xf8uy; 0xd9uy; 0xf5uy; 0x97uy; 0x41uy; 0x47uy; 0x18uy; 0x2fuy; 0xb9uy; 0x5buy; 0xa6uy; 0x62uy; 0xcbuy; 0x66uy; 0x01uy; 0x19uy; 0x89uy; 0xc1uy; 0x6duy; 0x9auy; 0xf1uy; 0x04uy; 0x73uy; 0x5duy; 0x6fuy; 0x79uy; 0x84uy; 0x1auy; 0xa4uy; 0xd1uy; 0xdfuy; 0x27uy; 0x66uy; 0x15uy; 0xb5uy; 0x01uy; 0x08uy; 0xdfuy; 0x8auy; 0x29uy; 0xdbuy; 0xc9uy; 0xdeuy; 0x31uy; 0xf4uy; 0x26uy; 0x0duy ] in let cipher: list FStar.UInt8.t = [ 0x01uy; 0x88uy; 0x72uy; 0x69uy; 0x1duy; 0x9buy; 0x04uy; 0xe8uy; 0x22uy; 0x0euy; 0x09uy; 0x18uy; 0x7duy; 0xf5uy; 0xbcuy; 0x5fuy; 0xa6uy; 0x25uy; 0x7cuy; 0xd9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x41uy; 0x1cuy; 0x13uy; 0xc7uy; 0x50uy; 0x73uy; 0xc1uy; 0xe2uy; 0xd4uy; 0xb1uy; 0xecuy; 0xf1uy; 0x31uy; 0x39uy; 0xbauy; 0x96uy; 0x56uy; 0xcduy; 0x35uy; 0xc1uy; 0x42uy; 0x01uy; 0xf1uy; 0xc7uy; 0xc6uy; 0xf0uy; 0xeeuy; 0xb5uy; 0x8duy; 0x2duy; 0xbfuy; 0xe3uy; 0x5buy; 0xfduy; 0xecuy; 0xccuy; 0x92uy; 0xc3uy; 0x96uy; 0x1cuy; 0xfauy; 0xbbuy; 0x59uy; 0x0buy; 0xc1uy; 0xebuy; 0x77uy; 0xeauy; 0xc1uy; 0x57uy; 0x32uy; 0xfbuy; 0x02uy; 0x75uy; 0x79uy; 0x86uy; 0x80uy; 0xe0uy; 0xc7uy; 0x29uy; 0x2euy; 0x50uy ] in let cipher: list FStar.UInt8.t = [ 0xd9uy; 0x8duy; 0x51uy; 0x2auy; 0x35uy; 0x57uy; 0x2fuy; 0x8buy; 0xd2uy; 0x0duy; 0xe6uy; 0x2euy; 0x95uy; 0x10uy; 0xccuy; 0x21uy; 0x14uy; 0x5cuy; 0x5buy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xf2uy; 0xc7uy; 0x6euy; 0xf6uy; 0x17uy; 0xfauy; 0x2buy; 0xfcuy; 0x8auy; 0x4duy; 0x6buy; 0xcbuy; 0xb1uy; 0x5fuy; 0xe8uy; 0x84uy; 0x36uy; 0xfduy; 0xc2uy; 0x16uy; 0x5duy; 0x30uy; 0x74uy; 0x62uy; 0x95uy; 0x79uy; 0x07uy; 0x9duy; 0x4duy; 0x5buy; 0x86uy; 0xf5uy; 0x08uy; 0x1auy; 0xb1uy; 0x77uy; 0xb4uy; 0xc3uy; 0xf5uy; 0x30uy; 0x37uy; 0x6cuy; 0x9cuy; 0x92uy; 0x4cuy; 0xbduy; 0x42uy; 0x1auy; 0x8duy; 0xafuy; 0x88uy; 0x30uy; 0xd0uy; 0x94uy; 0x0cuy; 0x4fuy; 0xb7uy; 0x58uy; 0x98uy; 0x65uy; 0x83uy; 0x06uy; 0x99uy ] in let cipher: list FStar.UInt8.t = [ 0x9fuy; 0x3euy; 0xa2uy; 0x55uy; 0xf6uy; 0xafuy; 0x95uy; 0xc5uy; 0x45uy; 0x4euy; 0x55uy; 0xd7uy; 0x35uy; 0x4cuy; 0xabuy; 0xb4uy; 0x53uy; 0x52uy; 0xeauy; 0x0buy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x45uy; 0x92uy; 0x7euy; 0x32uy; 0xdduy; 0xf8uy; 0x01uy; 0xcauy; 0xf3uy; 0x5euy; 0x18uy; 0xe7uy; 0xb5uy; 0x07uy; 0x8buy; 0x7fuy; 0x54uy; 0x35uy; 0x27uy; 0x82uy; 0x12uy; 0xecuy; 0x6buy; 0xb9uy; 0x9duy; 0xf8uy; 0x84uy; 0xf4uy; 0x9buy; 0x32uy; 0x7cuy; 0x64uy; 0x86uy; 0xfeuy; 0xaeuy; 0x46uy; 0xbauy; 0x18uy; 0x7duy; 0xc1uy; 0xccuy; 0x91uy; 0x45uy; 0x12uy; 0x1euy; 0x14uy; 0x92uy; 0xe6uy; 0xb0uy; 0x6euy; 0x90uy; 0x07uy; 0x39uy; 0x4duy; 0xc3uy; 0x3buy; 0x77uy; 0x48uy; 0xf8uy; 0x6auy; 0xc3uy; 0x20uy; 0x7cuy; 0xfeuy ] in let cipher: list FStar.UInt8.t = [ 0xa7uy; 0x0cuy; 0xfbuy; 0xfeuy; 0x75uy; 0x63uy; 0xdduy; 0x0euy; 0x66uy; 0x5cuy; 0x7cuy; 0x67uy; 0x15uy; 0xa9uy; 0x6auy; 0x8duy; 0x75uy; 0x69uy; 0x50uy; 0xc0uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x7cuy; 0x9cuy; 0x67uy; 0x32uy; 0x3auy; 0x1duy; 0xf1uy; 0xaduy; 0xbfuy; 0xe5uy; 0xceuy; 0xb4uy; 0x15uy; 0xeauy; 0xefuy; 0x01uy; 0x55uy; 0xecuy; 0xe2uy; 0x82uy; 0x0fuy; 0x4duy; 0x50uy; 0xc1uy; 0xecuy; 0x22uy; 0xcbuy; 0xa4uy; 0x92uy; 0x8auy; 0xc6uy; 0x56uy; 0xc8uy; 0x3fuy; 0xe5uy; 0x85uy; 0xdbuy; 0x6auy; 0x78uy; 0xceuy; 0x40uy; 0xbcuy; 0x42uy; 0x75uy; 0x7auy; 0xbauy; 0x7euy; 0x5auy; 0x3fuy; 0x58uy; 0x24uy; 0x28uy; 0xd6uy; 0xcauy; 0x68uy; 0xd0uy; 0xc3uy; 0x97uy; 0x83uy; 0x36uy; 0xa6uy; 0xefuy; 0xb7uy; 0x29uy; 0x61uy; 0x3euy; 0x8duy; 0x99uy; 0x79uy; 0x01uy; 0x62uy; 0x04uy; 0xbfuy; 0xd9uy; 0x21uy; 0x32uy; 0x2fuy; 0xdduy; 0x52uy; 0x22uy; 0x18uy; 0x35uy; 0x54uy; 0x44uy; 0x7duy; 0xe5uy; 0xe6uy; 0xe9uy; 0xbbuy; 0xe6uy; 0xeduy; 0xf7uy; 0x6duy; 0x7buy; 0x71uy; 0xe1uy; 0x8duy; 0xc2uy; 0xe8uy; 0xd6uy; 0xdcuy; 0x89uy; 0xb7uy; 0x39uy; 0x83uy; 0x64uy; 0xf6uy; 0x52uy; 0xfauy; 0xfcuy; 0x73uy; 0x43uy; 0x29uy; 0xaauy; 0xfauy; 0x3duy; 0xcduy; 0x45uy; 0xd4uy; 0xf3uy; 0x1euy; 0x38uy; 0x8euy; 0x4fuy; 0xafuy; 0xd7uy; 0xfcuy; 0x64uy; 0x95uy; 0xf3uy; 0x7cuy; 0xa5uy; 0xcbuy; 0xabuy; 0x7fuy; 0x54uy; 0xd5uy; 0x86uy; 0x46uy; 0x3duy; 0xa4uy; 0xbfuy; 0xeauy; 0xa3uy; 0xbauy; 0xe0uy; 0x9fuy; 0x7buy; 0x8euy; 0x92uy; 0x39uy; 0xd8uy; 0x32uy; 0xb4uy; 0xf0uy; 0xa7uy; 0x33uy; 0xaauy; 0x60uy; 0x9cuy; 0xc1uy; 0xf8uy; 0xd4uy ] in let cipher: list FStar.UInt8.t = [ 0xd8uy; 0xfduy; 0x6auy; 0x91uy; 0xefuy; 0x3buy; 0x6cuy; 0xeduy; 0x05uy; 0xb9uy; 0x83uy; 0x58uy; 0xa9uy; 0x91uy; 0x07uy; 0xc1uy; 0xfauy; 0xc8uy; 0xc8uy; 0x07uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x6cuy; 0xb7uy; 0x0duy; 0x19uy; 0xc0uy; 0x96uy; 0x20uy; 0x0fuy; 0x92uy; 0x49uy; 0xd2uy; 0xdbuy; 0xc0uy; 0x42uy; 0x99uy; 0xb0uy; 0x08uy; 0x5euy; 0xb0uy; 0x68uy; 0x25uy; 0x75uy; 0x60uy; 0xbeuy; 0x3auy; 0x30uy; 0x7duy; 0xbduy; 0x74uy; 0x1auy; 0x33uy; 0x78uy; 0xebuy; 0xfauy; 0x03uy; 0xfcuy; 0xcauy; 0x61uy; 0x08uy; 0x83uy; 0xb0uy; 0x7fuy; 0x7fuy; 0xeauy; 0x56uy; 0x3auy; 0x86uy; 0x65uy; 0x71uy; 0x82uy; 0x24uy; 0x72uy; 0xdauy; 0xdeuy; 0x8auy; 0x0buy; 0xecuy; 0x4buy; 0x98uy; 0x20uy; 0x2duy; 0x47uy; 0xa3uy; 0x44uy; 0x31uy; 0x29uy; 0x76uy; 0xa7uy; 0xbcuy; 0xb3uy; 0x96uy; 0x44uy; 0x27uy; 0xeauy; 0xcbuy; 0x5buy; 0x05uy; 0x25uy; 0xdbuy; 0x22uy; 0x06uy; 0x65uy; 0x99uy; 0xb8uy; 0x1buy; 0xe4uy; 0x1euy; 0x5auy; 0xdauy; 0xf1uy; 0x57uy; 0xd9uy; 0x25uy; 0xfauy; 0xc0uy; 0x4buy; 0x06uy; 0xebuy; 0x6euy; 0x01uy; 0xdeuy; 0xb7uy; 0x53uy; 0xbauy; 0xbfuy; 0x33uy; 0xbeuy; 0x16uy; 0x16uy; 0x2buy; 0x21uy; 0x4euy; 0x8duy; 0xb0uy; 0x17uy; 0x21uy; 0x2fuy; 0xafuy; 0xa5uy; 0x12uy; 0xcduy; 0xc8uy; 0xc0uy; 0xd0uy; 0xa1uy; 0x5cuy; 0x10uy; 0xf6uy; 0x32uy; 0xe8uy; 0xf4uy; 0xf4uy; 0x77uy; 0x92uy; 0xc6uy; 0x4duy; 0x3fuy; 0x02uy; 0x60uy; 0x04uy; 0xd1uy; 0x73uy; 0xdfuy; 0x50uy; 0xcfuy; 0x0auy; 0xa7uy; 0x97uy; 0x60uy; 0x66uy; 0xa7uy; 0x9auy; 0x8duy; 0x78uy; 0xdeuy; 0xeeuy; 0xecuy; 0x95uy; 0x1duy; 0xabuy; 0x7cuy; 0xc9uy; 0x0fuy; 0x68uy; 0xd1uy; 0x6fuy; 0x78uy; 0x66uy; 0x71uy; 0xfeuy; 0xbauy; 0x0buy; 0x7duy; 0x26uy; 0x9duy; 0x92uy; 0x94uy; 0x1cuy; 0x4fuy; 0x02uy; 0xf4uy; 0x32uy; 0xaauy; 0x5cuy; 0xe2uy; 0xaauy; 0xb6uy; 0x19uy; 0x4duy; 0xccuy; 0x6fuy; 0xd3uy; 0xaeuy; 0x36uy; 0xc8uy; 0x43uy; 0x32uy; 0x74uy; 0xefuy; 0x6buy; 0x1buy; 0xd0uy; 0xd3uy; 0x14uy; 0x63uy; 0x6buy; 0xe4uy; 0x7buy; 0xa3uy; 0x8duy; 0x19uy; 0x48uy; 0x34uy; 0x3auy; 0x38uy; 0xbfuy; 0x94uy; 0x06uy; 0x52uy; 0x3auy; 0x0buy; 0x2auy; 0x8cuy; 0xd7uy; 0x8euy; 0xd6uy; 0x26uy; 0x6euy; 0xe3uy; 0xc9uy; 0xb5uy; 0xc6uy; 0x06uy; 0x20uy; 0xb3uy; 0x08uy; 0xccuy; 0x6buy; 0x3auy; 0x73uy; 0xc6uy; 0x06uy; 0x0duy; 0x52uy; 0x68uy; 0xa7uy; 0xd8uy; 0x2buy; 0x6auy; 0x33uy; 0xb9uy; 0x3auy; 0x6fuy; 0xd6uy; 0xfeuy; 0x1duy; 0xe5uy; 0x52uy; 0x31uy; 0xd1uy; 0x2cuy; 0x97uy ] in let cipher: list FStar.UInt8.t = [ 0x4auy; 0x75uy; 0xa4uy; 0x06uy; 0xf4uy; 0xdeuy; 0x5fuy; 0x9euy; 0x11uy; 0x32uy; 0x06uy; 0x9duy; 0x66uy; 0x71uy; 0x7fuy; 0xc4uy; 0x24uy; 0x37uy; 0x63uy; 0x88uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x64uy; 0x87uy; 0x97uy; 0x2duy; 0x88uy; 0xd0uy; 0xdduy; 0x39uy; 0x0duy; 0x8duy; 0x09uy; 0xd1uy; 0x34uy; 0x86uy; 0x0fuy; 0x26uy; 0x3fuy; 0x88uy; 0xdfuy; 0x7auy; 0x34uy; 0x12uy; 0x45uy; 0x7auy; 0xdfuy; 0x51uy; 0x0duy; 0xcfuy; 0x16uy; 0x4euy; 0x6cuy; 0xf0uy; 0x41uy; 0x67uy; 0x9buy; 0x3auy; 0x19uy; 0xfcuy; 0xc5uy; 0x42uy; 0xafuy; 0x6auy; 0x23uy; 0x6auy; 0xb0uy; 0x3duy; 0x66uy; 0xb2uy; 0xe8uy; 0xa1uy; 0x55uy; 0xd1uy; 0x06uy; 0x1auy; 0xb7uy; 0x85uy; 0x9fuy; 0x75uy; 0x73uy; 0x27uy; 0x75uy; 0xffuy; 0xf6uy; 0x82uy; 0xf8uy; 0xf4uy; 0xd5uy; 0xe5uy; 0x0duy; 0x3auy; 0xb3uy; 0x77uy; 0x0fuy; 0x4fuy; 0x66uy; 0xcbuy; 0x13uy; 0x81uy; 0x55uy; 0xb4uy; 0x71uy; 0x5duy; 0x24uy; 0x5buy; 0x80uy; 0x69uy; 0x94uy; 0x8euy; 0xa0uy; 0x16uy; 0xa4uy; 0x5buy; 0x7euy; 0xf0uy; 0xfduy; 0xdeuy; 0x93uy; 0x18uy; 0x8cuy; 0x57uy; 0xeeuy; 0xf4uy; 0x71uy; 0x7fuy; 0x34uy; 0x25uy; 0x18uy; 0x1duy; 0xe5uy; 0xb9uy; 0xa5uy; 0xd4uy; 0xe0uy; 0xa2uy; 0x96uy; 0x3fuy; 0x2auy; 0x67uy; 0xa3uy; 0x40uy; 0xebuy; 0x1auy; 0xe9uy; 0x94uy; 0xb9uy; 0x8auy; 0x48uy; 0xabuy; 0x19uy; 0xb9uy; 0x0auy; 0xb7uy; 0x43uy; 0x91uy; 0xc5uy; 0x04uy; 0x26uy; 0xd2uy; 0x82uy; 0x87uy; 0xacuy; 0x4fuy; 0x1euy; 0xb9uy; 0x3fuy; 0x5auy; 0xf1uy; 0xa6uy; 0x8cuy; 0x7duy; 0xaeuy; 0x40uy; 0x87uy; 0x6buy; 0x8auy; 0xfauy; 0xafuy; 0x35uy; 0xa1uy; 0x92uy; 0x93uy; 0xc1uy; 0x95uy; 0x2euy; 0x95uy; 0x79uy; 0x78uy; 0xabuy; 0xeeuy; 0x40uy; 0xecuy; 0x32uy; 0xf2uy; 0xaauy; 0x88uy; 0x0cuy; 0x95uy; 0x6cuy; 0x7euy; 0xb7uy; 0x2fuy; 0x11uy; 0x7buy; 0x39uy; 0x7cuy; 0xefuy; 0xcfuy; 0xb4uy; 0xe7uy; 0x5auy; 0xceuy; 0x3buy; 0x08uy; 0x17uy; 0x76uy; 0xe4uy; 0x6buy; 0x13uy; 0x52uy; 0x1euy; 0x93uy; 0x55uy; 0x9duy; 0x45uy; 0x3euy; 0x32uy; 0xabuy; 0x74uy; 0xebuy; 0xc0uy; 0x85uy; 0x9buy; 0x9auy; 0x8duy; 0xd4uy; 0xd1uy; 0xd3uy; 0x90uy; 0x00uy; 0xebuy; 0xe9uy; 0x5fuy; 0x98uy; 0x4duy; 0x80uy; 0xa3uy; 0xf5uy; 0x00uy; 0x4duy; 0xc9uy; 0x1auy; 0x05uy; 0x1duy; 0xfbuy; 0xdfuy; 0xe9uy; 0x19uy; 0x4fuy; 0x4fuy; 0x9auy; 0x48uy; 0x3euy; 0x4euy; 0x79uy; 0x55uy; 0x57uy; 0x7fuy; 0xb0uy; 0x93uy; 0x34uy; 0x64uy; 0xc6uy; 0x3euy; 0xaeuy; 0xc7uy; 0x71uy; 0x04uy; 0x4duy; 0x59uy; 0xabuy; 0xc3uy; 0x02uy; 0x9auy; 0x07uy; 0x95uy; 0x19uy; 0xf8uy; 0x46uy; 0x0auy; 0x69uy; 0x3buy; 0x25uy; 0xb4uy; 0xceuy; 0x20uy; 0x7auy; 0xe9uy; 0xd9uy; 0x44uy; 0x7fuy; 0xc4uy; 0xc5uy; 0x44uy; 0x6euy; 0x6duy; 0xaduy; 0x23uy; 0x4euy; 0x9auy; 0xfduy; 0xecuy; 0x0cuy; 0x56uy; 0x27uy; 0x98uy; 0xcduy; 0x02uy; 0x97uy; 0x31uy; 0x83uy; 0x99uy; 0xe8uy; 0x38uy; 0xbeuy; 0x38uy; 0x58uy; 0x45uy; 0xc6uy; 0xdduy; 0x79uy; 0xeduy; 0xe6uy; 0x6euy; 0x2auy; 0xe8uy; 0x0auy; 0xfeuy; 0xc6uy; 0x73uy; 0x8duy; 0x4duy; 0x9buy; 0xf4uy; 0x4cuy; 0x8duy; 0x9euy; 0xdduy; 0xffuy; 0x6cuy; 0x5cuy; 0xd2uy; 0xc9uy; 0x4euy; 0x34uy; 0x0euy; 0x0duy; 0xdauy; 0xc4uy; 0x03uy; 0x84uy; 0xb9uy; 0xa1uy; 0x40uy; 0x8cuy; 0x9auy; 0x4buy; 0x98uy; 0xc3uy; 0x7auy; 0x60uy; 0x81uy; 0xd5uy; 0x22uy; 0x0fuy; 0xbauy; 0x92uy; 0xf1uy; 0xd0uy; 0x31uy; 0x44uy; 0xdbuy ] in let cipher: list FStar.UInt8.t = [ 0xa1uy; 0x35uy; 0xe3uy; 0x25uy; 0x81uy; 0xbbuy; 0x06uy; 0x28uy; 0x9buy; 0x8cuy; 0x83uy; 0xf0uy; 0x40uy; 0xe9uy; 0x42uy; 0x1euy; 0xc7uy; 0x9buy; 0xbeuy; 0x01uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xbduy; 0x74uy; 0xe7uy; 0xf6uy; 0x07uy; 0xcduy; 0x7duy; 0x90uy; 0x5euy; 0x90uy; 0x17uy; 0x5duy; 0x67uy; 0x65uy; 0x0auy; 0x6duy; 0xc2uy; 0xf8uy; 0xa4uy; 0xe2uy; 0xd4uy; 0xabuy; 0x12uy; 0x49uy; 0xcauy; 0x88uy; 0x81uy; 0x2buy; 0xdauy; 0x79uy; 0x84uy; 0xdeuy; 0xccuy; 0xbbuy; 0xb6uy; 0xa1uy; 0xbauy; 0x90uy; 0xa0uy; 0xe9uy; 0x14uy; 0x34uy; 0xdduy; 0xf5uy; 0xe6uy; 0x13uy; 0x7buy; 0xa8uy; 0x5euy; 0x39uy; 0xa5uy; 0x98uy; 0x89uy; 0x0auy; 0x7fuy; 0x63uy; 0x5duy; 0x33uy; 0x52uy; 0x42uy; 0xfcuy; 0xe0uy; 0xe9uy; 0xe0uy; 0x37uy; 0x30uy; 0x3buy; 0x6cuy; 0x51uy; 0xe5uy; 0x4auy; 0xecuy; 0x06uy; 0x61uy; 0x4auy; 0xd5uy; 0xccuy; 0xceuy; 0x06uy; 0xd9uy; 0x59uy; 0x9cuy; 0x80uy; 0x01uy; 0x65uy; 0x30uy; 0xd7uy; 0xfbuy; 0xb1uy; 0xdauy; 0x6euy; 0xb5uy; 0x48uy; 0x08uy; 0x4buy; 0x2buy; 0x05uy; 0xbauy; 0xbduy; 0x7duy; 0x55uy; 0x36uy; 0x42uy; 0x44uy; 0x3euy; 0xfduy; 0xa7uy; 0x26uy; 0xa1uy; 0xfduy; 0x71uy; 0xa8uy; 0xbcuy; 0x08uy; 0x7cuy; 0x44uy; 0xf2uy; 0x85uy; 0xe2uy; 0xbcuy; 0xcfuy; 0x66uy; 0x1euy; 0xaduy; 0x47uy; 0x5auy; 0x72uy; 0x67uy; 0x3euy; 0x43uy; 0x86uy; 0xfcuy; 0x4euy; 0xeauy; 0x51uy; 0x97uy; 0xc4uy; 0xf1uy; 0x3cuy; 0x0fuy; 0xebuy; 0x0auy; 0x85uy; 0xbcuy; 0x8euy; 0x67uy; 0xe2uy; 0x8auy; 0xb8uy; 0x72uy; 0x68uy; 0x4buy; 0xbeuy; 0xbduy; 0xaauy; 0x52uy; 0x7fuy; 0x3cuy; 0x25uy; 0x3duy; 0xebuy; 0xb2uy; 0xdcuy; 0x12uy; 0xc2uy; 0x69uy; 0x3fuy; 0x8euy; 0x9euy; 0x26uy; 0x51uy; 0xb9uy; 0x34uy; 0x5cuy; 0x0auy; 0xbeuy; 0xd7uy; 0xa0uy; 0xfauy; 0xfauy; 0x3euy; 0x5duy; 0x30uy; 0x53uy; 0x86uy; 0xc9uy; 0x5auy; 0xcbuy; 0x7auy; 0x17uy; 0x2euy; 0x54uy; 0x13uy; 0xefuy; 0x08uy; 0xe7uy; 0x3buy; 0x1buy; 0xd4uy; 0xd0uy; 0xd6uy; 0x83uy; 0x2euy; 0x4cuy; 0x03uy; 0x5buy; 0xc8uy; 0x55uy; 0x9fuy; 0x9buy; 0x0cuy; 0xbduy; 0x0cuy; 0xafuy; 0x03uy; 0x7auy; 0x30uy; 0x70uy; 0x76uy; 0x41uy; 0xc0uy; 0x54uy; 0x53uy; 0x56uy; 0xbeuy; 0xe1uy; 0x51uy; 0xa2uy; 0x40uy; 0x68uy; 0xd7uy; 0x06uy; 0x74uy; 0xefuy; 0x1buy; 0xefuy; 0xe1uy; 0x6fuy; 0x87uy; 0x2auy; 0xefuy; 0x40uy; 0x60uy; 0xfauy; 0xaauy; 0xd1uy; 0xa9uy; 0x68uy; 0xc3uy; 0x9cuy; 0x45uy; 0xdbuy; 0xd7uy; 0x59uy; 0x5duy; 0xe8uy; 0xf4uy; 0x72uy; 0x01uy; 0x6buy; 0x5auy; 0xb8uy; 0x12uy; 0xd7uy; 0x7euy; 0x54uy; 0x5fuy; 0xcauy; 0x55uy; 0x00uy; 0x0euy; 0xe5uy; 0xceuy; 0x77uy; 0x3euy; 0xdauy; 0xa1uy; 0x29uy; 0xeauy; 0xc6uy; 0x47uy; 0x34uy; 0x10uy; 0xc2uy; 0x49uy; 0x90uy; 0x13uy; 0xb4uy; 0xbeuy; 0x89uy; 0x5fuy; 0x6cuy; 0x0fuy; 0x73uy; 0x4buy; 0xecuy; 0xfeuy; 0x99uy; 0x43uy; 0x06uy; 0xe7uy; 0x76uy; 0x26uy; 0x2duy; 0x45uy; 0x28uy; 0xeduy; 0x85uy; 0x77uy; 0x21uy; 0x8euy; 0x3cuy; 0xc5uy; 0x20uy; 0x1fuy; 0x1duy; 0x9euy; 0x5fuy; 0x3fuy; 0x62uy; 0x23uy; 0x0euy; 0xb2uy; 0xcauy; 0xeauy; 0x01uy; 0x4buy; 0xecuy; 0xfbuy; 0xa6uy; 0x0fuy; 0xcbuy; 0x1fuy; 0x39uy; 0x97uy; 0xaauy; 0x5buy; 0x3buy; 0xb6uy; 0x22uy; 0xb7uy; 0x20uy; 0x5cuy; 0x71uy; 0x43uy; 0x48uy; 0xbauy; 0x15uy; 0x5cuy; 0x30uy; 0xa7uy; 0x9auy; 0x2cuy; 0xeauy; 0x43uy; 0xb0uy; 0x70uy; 0xcauy; 0xdauy; 0x80uy; 0x7euy; 0x63uy; 0x0buy; 0x40uy; 0x86uy; 0xb1uy; 0x29uy; 0x05uy; 0x18uy; 0x98uy; 0xe1uy; 0xd9uy; 0xe6uy; 0x8duy; 0x1duy; 0x0euy; 0xccuy; 0x94uy; 0x29uy; 0xd2uy; 0x0duy; 0x6auy; 0x14uy; 0x03uy; 0xe0uy; 0x03uy; 0x5auy; 0x44uy; 0x2buy; 0x37uy; 0xbfuy; 0x50uy; 0x8euy; 0xb8uy; 0x7euy; 0x8euy; 0xa3uy; 0x47uy; 0xa3uy; 0xe6uy; 0x84uy; 0x27uy; 0xb6uy; 0xd4uy; 0x8euy; 0xd2uy; 0x99uy; 0xbauy; 0x65uy; 0xecuy; 0xb3uy; 0x7buy; 0x38uy; 0x75uy; 0x4fuy; 0x45uy; 0x47uy; 0x42uy; 0x3euy; 0xaeuy; 0xa2uy; 0xaeuy; 0xc4uy; 0x03uy; 0x33uy; 0x8duy; 0xb2uy; 0xdcuy; 0xfeuy; 0x61uy; 0xcfuy; 0xf4uy; 0xa8uy; 0xd1uy; 0x7cuy; 0x38uy; 0x36uy; 0x56uy; 0x98uy; 0x1euy; 0x18uy; 0x38uy; 0xa2uy; 0x38uy; 0x66uy; 0xb9uy; 0x1duy; 0x09uy; 0x69uy; 0x8fuy; 0x39uy; 0x17uy; 0x5duy; 0x98uy; 0xafuy; 0x41uy; 0x75uy; 0xcauy; 0xeduy; 0x53uy ] in let cipher: list FStar.UInt8.t = [ 0xb2uy; 0x2buy; 0x87uy; 0xeauy; 0x30uy; 0xf4uy; 0x05uy; 0x09uy; 0x13uy; 0xf8uy; 0xf0uy; 0x24uy; 0x1fuy; 0xc2uy; 0xaeuy; 0x2cuy; 0x31uy; 0x9fuy; 0x52uy; 0xe7uy ] in Vec SHA1 plain cipher) ]
false
false
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test_one : v: Spec.Hash.Test.vec -> FStar.All.ALL Prims.bool
[]
Spec.Hash.Test.test_one
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
v: Spec.Hash.Test.vec -> FStar.All.ALL Prims.bool
{ "end_col": 57, "end_line": 1346, "start_col": 22, "start_line": 1339 }
Prims.Tot
val test_vectors:list vec
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": true, "full_module": "Lib.PrintSequence", "short_module": "PS" }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let test_vectors: list vec = [ Vec SHA2_224 test1_plaintext test1_expected224; Vec SHA2_224 test2_plaintext test2_expected224; Vec SHA2_224 test3_plaintext test3_expected224; Vec SHA2_224 test4_plaintext test4_expected224; Vec SHA2_256 test1_plaintext test1_expected256; Vec SHA2_256 test2_plaintext test2_expected256; Vec SHA2_256 test3_plaintext test3_expected256; Vec SHA2_256 test4_plaintext test4_expected256; Vec SHA2_384 test1_plaintext test1_expected384; Vec SHA2_384 test2_plaintext test2_expected384; Vec SHA2_384 test3_plaintext test3_expected384; Vec SHA2_384 test4_plaintext test4_expected384; Vec SHA2_512 test1_plaintext test1_expected512; Vec SHA2_512 test2_plaintext test2_expected512; Vec SHA2_512 test3_plaintext test3_expected512; Vec SHA2_512 test4_plaintext test4_expected512; (* MD5 tests from: ./make_md5_tests.sh *) (let plain: list FStar.UInt8.t = [] in let cipher: list FStar.UInt8.t = [ 0xd4uy; 0x1duy; 0x8cuy; 0xd9uy; 0x8fuy; 0x00uy; 0xb2uy; 0x04uy; 0xe9uy; 0x80uy; 0x09uy; 0x98uy; 0xecuy; 0xf8uy; 0x42uy; 0x7euy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [0x61uy] in let cipher: list FStar.UInt8.t = [ 0x0cuy; 0xc1uy; 0x75uy; 0xb9uy; 0xc0uy; 0xf1uy; 0xb6uy; 0xa8uy; 0x31uy; 0xc3uy; 0x99uy; 0xe2uy; 0x69uy; 0x77uy; 0x26uy; 0x61uy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [0x61uy; 0x62uy; 0x63uy] in let cipher: list FStar.UInt8.t = [ 0x90uy; 0x01uy; 0x50uy; 0x98uy; 0x3cuy; 0xd2uy; 0x4fuy; 0xb0uy; 0xd6uy; 0x96uy; 0x3fuy; 0x7duy; 0x28uy; 0xe1uy; 0x7fuy; 0x72uy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x6duy; 0x65uy; 0x73uy; 0x73uy; 0x61uy; 0x67uy; 0x65uy; 0x20uy; 0x64uy; 0x69uy; 0x67uy; 0x65uy; 0x73uy; 0x74uy ] in let cipher: list FStar.UInt8.t = [ 0xf9uy; 0x6buy; 0x69uy; 0x7duy; 0x7cuy; 0xb7uy; 0x93uy; 0x8duy; 0x52uy; 0x5auy; 0x2fuy; 0x31uy; 0xaauy; 0xf1uy; 0x61uy; 0xd0uy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy; 0x76uy; 0x77uy; 0x78uy; 0x79uy; 0x7auy ] in let cipher: list FStar.UInt8.t = [ 0xc3uy; 0xfcuy; 0xd3uy; 0xd7uy; 0x61uy; 0x92uy; 0xe4uy; 0x00uy; 0x7duy; 0xfbuy; 0x49uy; 0x6cuy; 0xcauy; 0x67uy; 0xe1uy; 0x3buy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x41uy; 0x42uy; 0x43uy; 0x44uy; 0x45uy; 0x46uy; 0x47uy; 0x48uy; 0x49uy; 0x4auy; 0x4buy; 0x4cuy; 0x4duy; 0x4euy; 0x4fuy; 0x50uy; 0x51uy; 0x52uy; 0x53uy; 0x54uy; 0x55uy; 0x56uy; 0x57uy; 0x58uy; 0x59uy; 0x5auy; 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy; 0x76uy; 0x77uy; 0x78uy; 0x79uy; 0x7auy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy ] in let cipher: list FStar.UInt8.t = [ 0xd1uy; 0x74uy; 0xabuy; 0x98uy; 0xd2uy; 0x77uy; 0xd9uy; 0xf5uy; 0xa5uy; 0x61uy; 0x1cuy; 0x2cuy; 0x9fuy; 0x41uy; 0x9duy; 0x9fuy ] in Vec MD5 plain cipher); (let plain: list FStar.UInt8.t = [ 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy ] in let cipher: list FStar.UInt8.t = [ 0x57uy; 0xeduy; 0xf4uy; 0xa2uy; 0x2buy; 0xe3uy; 0xc9uy; 0x55uy; 0xacuy; 0x49uy; 0xdauy; 0x2euy; 0x21uy; 0x07uy; 0xb6uy; 0x7auy ] in Vec MD5 plain cipher); (* SHA1 tests from: ./make_sha1_tests.sh *) (let plain: list FStar.UInt8.t = [] in let cipher: list FStar.UInt8.t = [ 0xdauy; 0x39uy; 0xa3uy; 0xeeuy; 0x5euy; 0x6buy; 0x4buy; 0x0duy; 0x32uy; 0x55uy; 0xbfuy; 0xefuy; 0x95uy; 0x60uy; 0x18uy; 0x90uy; 0xafuy; 0xd8uy; 0x07uy; 0x09uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x36uy] in let cipher: list FStar.UInt8.t = [ 0xc1uy; 0xdfuy; 0xd9uy; 0x6euy; 0xeauy; 0x8cuy; 0xc2uy; 0xb6uy; 0x27uy; 0x85uy; 0x27uy; 0x5buy; 0xcauy; 0x38uy; 0xacuy; 0x26uy; 0x12uy; 0x56uy; 0xe2uy; 0x78uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x19uy; 0x5auy] in let cipher: list FStar.UInt8.t = [ 0x0auy; 0x1cuy; 0x2duy; 0x55uy; 0x5buy; 0xbeuy; 0x43uy; 0x1auy; 0xd6uy; 0x28uy; 0x8auy; 0xf5uy; 0xa5uy; 0x4fuy; 0x93uy; 0xe0uy; 0x44uy; 0x9cuy; 0x92uy; 0x32uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0xdfuy; 0x4buy; 0xd2uy] in let cipher: list FStar.UInt8.t = [ 0xbfuy; 0x36uy; 0xeduy; 0x5duy; 0x74uy; 0x72uy; 0x7duy; 0xfduy; 0x5duy; 0x78uy; 0x54uy; 0xecuy; 0x6buy; 0x1duy; 0x49uy; 0x46uy; 0x8duy; 0x8euy; 0xe8uy; 0xaauy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x54uy; 0x9euy; 0x95uy; 0x9euy] in let cipher: list FStar.UInt8.t = [ 0xb7uy; 0x8buy; 0xaeuy; 0x6duy; 0x14uy; 0x33uy; 0x8fuy; 0xfcuy; 0xcfuy; 0xd5uy; 0xd5uy; 0xb5uy; 0x67uy; 0x4auy; 0x27uy; 0x5fuy; 0x6euy; 0xf9uy; 0xc7uy; 0x17uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0xf7uy; 0xfbuy; 0x1buy; 0xe2uy; 0x05uy] in let cipher: list FStar.UInt8.t = [ 0x60uy; 0xb7uy; 0xd5uy; 0xbbuy; 0x56uy; 0x0auy; 0x1auy; 0xcfuy; 0x6fuy; 0xa4uy; 0x57uy; 0x21uy; 0xbduy; 0x0auy; 0xbbuy; 0x41uy; 0x9auy; 0x84uy; 0x1auy; 0x89uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0xc0uy; 0xe5uy; 0xabuy; 0xeauy; 0xeauy; 0x63uy] in let cipher: list FStar.UInt8.t = [ 0xa6uy; 0xd3uy; 0x38uy; 0x45uy; 0x97uy; 0x80uy; 0xc0uy; 0x83uy; 0x63uy; 0x09uy; 0x0fuy; 0xd8uy; 0xfcuy; 0x7duy; 0x28uy; 0xdcuy; 0x80uy; 0xe8uy; 0xe0uy; 0x1fuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x63uy; 0xbfuy; 0xc1uy; 0xeduy; 0x7fuy; 0x78uy; 0xabuy] in let cipher: list FStar.UInt8.t = [ 0x86uy; 0x03uy; 0x28uy; 0xd8uy; 0x05uy; 0x09uy; 0x50uy; 0x0cuy; 0x17uy; 0x83uy; 0x16uy; 0x9euy; 0xbfuy; 0x0buy; 0xa0uy; 0xc4uy; 0xb9uy; 0x4duy; 0xa5uy; 0xe5uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x7euy; 0x3duy; 0x7buy; 0x3euy; 0xaduy; 0xa9uy; 0x88uy; 0x66uy] in let cipher: list FStar.UInt8.t = [ 0x24uy; 0xa2uy; 0xc3uy; 0x4buy; 0x97uy; 0x63uy; 0x05uy; 0x27uy; 0x7cuy; 0xe5uy; 0x8cuy; 0x2fuy; 0x42uy; 0xd5uy; 0x09uy; 0x20uy; 0x31uy; 0x57uy; 0x25uy; 0x20uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x9euy; 0x61uy; 0xe5uy; 0x5duy; 0x9euy; 0xd3uy; 0x7buy; 0x1cuy; 0x20uy] in let cipher: list FStar.UInt8.t = [ 0x41uy; 0x1cuy; 0xceuy; 0xe1uy; 0xf6uy; 0xe3uy; 0x67uy; 0x7duy; 0xf1uy; 0x26uy; 0x98uy; 0x41uy; 0x1euy; 0xb0uy; 0x9duy; 0x3fuy; 0xf5uy; 0x80uy; 0xafuy; 0x97uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x97uy; 0x77uy; 0xcfuy; 0x90uy; 0xdduy; 0x7cuy; 0x7euy; 0x86uy; 0x35uy; 0x06uy] in let cipher: list FStar.UInt8.t = [ 0x05uy; 0xc9uy; 0x15uy; 0xb5uy; 0xeduy; 0x4euy; 0x4cuy; 0x4auy; 0xffuy; 0xfcuy; 0x20uy; 0x29uy; 0x61uy; 0xf3uy; 0x17uy; 0x43uy; 0x71uy; 0xe9uy; 0x0buy; 0x5cuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [0x4euy; 0xb0uy; 0x8cuy; 0x9euy; 0x68uy; 0x3cuy; 0x94uy; 0xbeuy; 0xa0uy; 0x0duy; 0xfauy] in let cipher: list FStar.UInt8.t = [ 0xafuy; 0x32uy; 0x0buy; 0x42uy; 0xd7uy; 0x78uy; 0x5cuy; 0xa6uy; 0xc8uy; 0xdduy; 0x22uy; 0x04uy; 0x63uy; 0xbeuy; 0x23uy; 0xa2uy; 0xd2uy; 0xcbuy; 0x5auy; 0xfcuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x09uy; 0x38uy; 0xf2uy; 0xe2uy; 0xebuy; 0xb6uy; 0x4fuy; 0x8auy; 0xf8uy; 0xbbuy; 0xfcuy; 0x91uy ] in let cipher: list FStar.UInt8.t = [ 0x9fuy; 0x4euy; 0x66uy; 0xb6uy; 0xceuy; 0xeauy; 0x40uy; 0xdcuy; 0xf4uy; 0xb9uy; 0x16uy; 0x6cuy; 0x28uy; 0xf1uy; 0xc8uy; 0x84uy; 0x74uy; 0x14uy; 0x1duy; 0xa9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x74uy; 0xc9uy; 0x99uy; 0x6duy; 0x14uy; 0xe8uy; 0x7duy; 0x3euy; 0x6cuy; 0xbeuy; 0xa7uy; 0x02uy; 0x9duy ] in let cipher: list FStar.UInt8.t = [ 0xe6uy; 0xc4uy; 0x36uy; 0x3cuy; 0x08uy; 0x52uy; 0x95uy; 0x19uy; 0x91uy; 0x05uy; 0x7fuy; 0x40uy; 0xdeuy; 0x27uy; 0xecuy; 0x08uy; 0x90uy; 0x46uy; 0x6fuy; 0x01uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x51uy; 0xdcuy; 0xa5uy; 0xc0uy; 0xf8uy; 0xe5uy; 0xd4uy; 0x95uy; 0x96uy; 0xf3uy; 0x2duy; 0x3euy; 0xb8uy; 0x74uy ] in let cipher: list FStar.UInt8.t = [ 0x04uy; 0x6auy; 0x7buy; 0x39uy; 0x6cuy; 0x01uy; 0x37uy; 0x9auy; 0x68uy; 0x4auy; 0x89uy; 0x45uy; 0x58uy; 0x77uy; 0x9buy; 0x07uy; 0xd8uy; 0xc7uy; 0xdauy; 0x20uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x3auy; 0x36uy; 0xeauy; 0x49uy; 0x68uy; 0x48uy; 0x20uy; 0xa2uy; 0xaduy; 0xc7uy; 0xfcuy; 0x41uy; 0x75uy; 0xbauy; 0x78uy ] in let cipher: list FStar.UInt8.t = [ 0xd5uy; 0x8auy; 0x26uy; 0x2euy; 0xe7uy; 0xb6uy; 0x57uy; 0x7cuy; 0x07uy; 0x22uy; 0x8euy; 0x71uy; 0xaeuy; 0x9buy; 0x3euy; 0x04uy; 0xc8uy; 0xabuy; 0xcduy; 0xa9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x35uy; 0x52uy; 0x69uy; 0x4cuy; 0xdfuy; 0x66uy; 0x3fuy; 0xd9uy; 0x4buy; 0x22uy; 0x47uy; 0x47uy; 0xacuy; 0x40uy; 0x6auy; 0xafuy ] in let cipher: list FStar.UInt8.t = [ 0xa1uy; 0x50uy; 0xdeuy; 0x92uy; 0x74uy; 0x54uy; 0x20uy; 0x2duy; 0x94uy; 0xe6uy; 0x56uy; 0xdeuy; 0x4cuy; 0x7cuy; 0x0cuy; 0xa6uy; 0x91uy; 0xdeuy; 0x95uy; 0x5duy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xf2uy; 0x16uy; 0xa1uy; 0xcbuy; 0xdeuy; 0x24uy; 0x46uy; 0xb1uy; 0xeduy; 0xf4uy; 0x1euy; 0x93uy; 0x48uy; 0x1duy; 0x33uy; 0xe2uy; 0xeduy ] in let cipher: list FStar.UInt8.t = [ 0x35uy; 0xa4uy; 0xb3uy; 0x9fuy; 0xefuy; 0x56uy; 0x0euy; 0x7euy; 0xa6uy; 0x12uy; 0x46uy; 0x67uy; 0x6euy; 0x1buy; 0x7euy; 0x13uy; 0xd5uy; 0x87uy; 0xbeuy; 0x30uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xa3uy; 0xcfuy; 0x71uy; 0x4buy; 0xf1uy; 0x12uy; 0x64uy; 0x7euy; 0x72uy; 0x7euy; 0x8cuy; 0xfduy; 0x46uy; 0x49uy; 0x9auy; 0xcduy; 0x35uy; 0xa6uy ] in let cipher: list FStar.UInt8.t = [ 0x7cuy; 0xe6uy; 0x9buy; 0x1auy; 0xcduy; 0xceuy; 0x52uy; 0xeauy; 0x7duy; 0xbduy; 0x38uy; 0x25uy; 0x31uy; 0xfauy; 0x1auy; 0x83uy; 0xdfuy; 0x13uy; 0xcauy; 0xe7uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x14uy; 0x8duy; 0xe6uy; 0x40uy; 0xf3uy; 0xc1uy; 0x15uy; 0x91uy; 0xa6uy; 0xf8uy; 0xc5uy; 0xc4uy; 0x86uy; 0x32uy; 0xc5uy; 0xfbuy; 0x79uy; 0xd3uy; 0xb7uy ] in let cipher: list FStar.UInt8.t = [ 0xb4uy; 0x7buy; 0xe2uy; 0xc6uy; 0x41uy; 0x24uy; 0xfauy; 0x9auy; 0x12uy; 0x4auy; 0x88uy; 0x7auy; 0xf9uy; 0x55uy; 0x1auy; 0x74uy; 0x35uy; 0x4cuy; 0xa4uy; 0x11uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x63uy; 0xa3uy; 0xccuy; 0x83uy; 0xfduy; 0x1euy; 0xc1uy; 0xb6uy; 0x68uy; 0x0euy; 0x99uy; 0x74uy; 0xa0uy; 0x51uy; 0x4euy; 0x1auy; 0x9euy; 0xceuy; 0xbbuy; 0x6auy ] in let cipher: list FStar.UInt8.t = [ 0x8buy; 0xb8uy; 0xc0uy; 0xd8uy; 0x15uy; 0xa9uy; 0xc6uy; 0x8auy; 0x1duy; 0x29uy; 0x10uy; 0xf3uy; 0x9duy; 0x94uy; 0x26uy; 0x03uy; 0xd8uy; 0x07uy; 0xfbuy; 0xccuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x87uy; 0x5auy; 0x90uy; 0x90uy; 0x9auy; 0x8auy; 0xfcuy; 0x92uy; 0xfbuy; 0x70uy; 0x70uy; 0x04uy; 0x7euy; 0x9duy; 0x08uy; 0x1euy; 0xc9uy; 0x2fuy; 0x3duy; 0x08uy; 0xb8uy ] in let cipher: list FStar.UInt8.t = [ 0xb4uy; 0x86uy; 0xf8uy; 0x7fuy; 0xb8uy; 0x33uy; 0xebuy; 0xf0uy; 0x32uy; 0x83uy; 0x93uy; 0x12uy; 0x86uy; 0x46uy; 0xa6uy; 0xf6uy; 0xe6uy; 0x60uy; 0xfcuy; 0xb1uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x44uy; 0x4buy; 0x25uy; 0xf9uy; 0xc9uy; 0x25uy; 0x9duy; 0xc2uy; 0x17uy; 0x77uy; 0x2cuy; 0xc4uy; 0x47uy; 0x8cuy; 0x44uy; 0xb6uy; 0xfeuy; 0xffuy; 0x62uy; 0x35uy; 0x36uy; 0x73uy ] in let cipher: list FStar.UInt8.t = [ 0x76uy; 0x15uy; 0x93uy; 0x68uy; 0xf9uy; 0x9duy; 0xecuy; 0xe3uy; 0x0auy; 0xaduy; 0xcfuy; 0xb9uy; 0xb7uy; 0xb4uy; 0x1duy; 0xabuy; 0x33uy; 0x68uy; 0x88uy; 0x58uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x48uy; 0x73uy; 0x51uy; 0xc8uy; 0xa5uy; 0xf4uy; 0x40uy; 0xe4uy; 0xd0uy; 0x33uy; 0x86uy; 0x48uy; 0x3duy; 0x5fuy; 0xe7uy; 0xbbuy; 0x66uy; 0x9duy; 0x41uy; 0xaduy; 0xcbuy; 0xfduy; 0xb7uy ] in let cipher: list FStar.UInt8.t = [ 0xdbuy; 0xc1uy; 0xcbuy; 0x57uy; 0x5cuy; 0xe6uy; 0xaeuy; 0xb9uy; 0xdcuy; 0x4euy; 0xbfuy; 0x0fuy; 0x84uy; 0x3buy; 0xa8uy; 0xaeuy; 0xb1uy; 0x45uy; 0x1euy; 0x89uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x46uy; 0xb0uy; 0x61uy; 0xefuy; 0x13uy; 0x2buy; 0x87uy; 0xf6uy; 0xd3uy; 0xb0uy; 0xeeuy; 0x24uy; 0x62uy; 0xf6uy; 0x7duy; 0x91uy; 0x09uy; 0x77uy; 0xdauy; 0x20uy; 0xaeuy; 0xd1uy; 0x37uy; 0x05uy ] in let cipher: list FStar.UInt8.t = [ 0xd7uy; 0xa9uy; 0x82uy; 0x89uy; 0x67uy; 0x90uy; 0x05uy; 0xebuy; 0x93uy; 0x0auy; 0xb7uy; 0x5euy; 0xfduy; 0x8fuy; 0x65uy; 0x0fuy; 0x99uy; 0x1euy; 0xe9uy; 0x52uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x38uy; 0x42uy; 0xb6uy; 0x13uy; 0x7buy; 0xb9uy; 0xd2uy; 0x7fuy; 0x3cuy; 0xa5uy; 0xbauy; 0xfeuy; 0x5buy; 0xbbuy; 0x62uy; 0x85uy; 0x83uy; 0x44uy; 0xfeuy; 0x4buy; 0xa5uy; 0xc4uy; 0x15uy; 0x89uy; 0xa5uy ] in let cipher: list FStar.UInt8.t = [ 0xfduy; 0xa2uy; 0x6fuy; 0xa9uy; 0xb4uy; 0x87uy; 0x4auy; 0xb7uy; 0x01uy; 0xeduy; 0x0buy; 0xb6uy; 0x4duy; 0x13uy; 0x4fuy; 0x89uy; 0xb9uy; 0xc4uy; 0xccuy; 0x50uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x44uy; 0xd9uy; 0x1duy; 0x3duy; 0x46uy; 0x5auy; 0x41uy; 0x11uy; 0x46uy; 0x2buy; 0xa0uy; 0xc7uy; 0xecuy; 0x22uy; 0x3duy; 0xa6uy; 0x73uy; 0x5fuy; 0x4fuy; 0x52uy; 0x00uy; 0x45uy; 0x3cuy; 0xf1uy; 0x32uy; 0xc3uy ] in let cipher: list FStar.UInt8.t = [ 0xc2uy; 0xffuy; 0x7cuy; 0xcduy; 0xe1uy; 0x43uy; 0xc8uy; 0xf0uy; 0x60uy; 0x1fuy; 0x69uy; 0x74uy; 0xb1uy; 0x90uy; 0x3euy; 0xb8uy; 0xd5uy; 0x74uy; 0x1buy; 0x6euy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xccuy; 0xe7uy; 0x3fuy; 0x2euy; 0xabuy; 0xcbuy; 0x52uy; 0xf7uy; 0x85uy; 0xd5uy; 0xa6uy; 0xdfuy; 0x63uy; 0xc0uy; 0xa1uy; 0x05uy; 0xf3uy; 0x4auy; 0x91uy; 0xcauy; 0x23uy; 0x7fuy; 0xe5uy; 0x34uy; 0xeeuy; 0x39uy; 0x9duy ] in let cipher: list FStar.UInt8.t = [ 0x64uy; 0x3cuy; 0x9duy; 0xc2uy; 0x0auy; 0x92uy; 0x96uy; 0x08uy; 0xf6uy; 0xcauy; 0xa9uy; 0x70uy; 0x9duy; 0x84uy; 0x3cuy; 0xa6uy; 0xfauy; 0x7auy; 0x76uy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x66uy; 0x4euy; 0x6euy; 0x79uy; 0x46uy; 0x83uy; 0x92uy; 0x03uy; 0x03uy; 0x7auy; 0x65uy; 0xa1uy; 0x21uy; 0x74uy; 0xb2uy; 0x44uy; 0xdeuy; 0x8cuy; 0xbcuy; 0x6euy; 0xc3uy; 0xf5uy; 0x78uy; 0x96uy; 0x7auy; 0x84uy; 0xf9uy; 0xceuy ] in let cipher: list FStar.UInt8.t = [ 0x50uy; 0x9euy; 0xf7uy; 0x87uy; 0x34uy; 0x3duy; 0x5buy; 0x5auy; 0x26uy; 0x92uy; 0x29uy; 0xb9uy; 0x61uy; 0xb9uy; 0x62uy; 0x41uy; 0x86uy; 0x4auy; 0x3duy; 0x74uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x95uy; 0x97uy; 0xf7uy; 0x14uy; 0xb2uy; 0xe4uy; 0x5euy; 0x33uy; 0x99uy; 0xa7uy; 0xf0uy; 0x2auy; 0xecuy; 0x44uy; 0x92uy; 0x1buy; 0xd7uy; 0x8buy; 0xe0uy; 0xfeuy; 0xfeuy; 0xe0uy; 0xc5uy; 0xe9uy; 0xb4uy; 0x99uy; 0x48uy; 0x8fuy; 0x6euy ] in let cipher: list FStar.UInt8.t = [ 0xb6uy; 0x1cuy; 0xe5uy; 0x38uy; 0xf1uy; 0xa1uy; 0xe6uy; 0xc9uy; 0x04uy; 0x32uy; 0xb2uy; 0x33uy; 0xd7uy; 0xafuy; 0x5buy; 0x65uy; 0x24uy; 0xebuy; 0xfbuy; 0xe3uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x75uy; 0xc5uy; 0xaduy; 0x1fuy; 0x3cuy; 0xbduy; 0x22uy; 0xe8uy; 0xa9uy; 0x5fuy; 0xc3uy; 0xb0uy; 0x89uy; 0x52uy; 0x67uy; 0x88uy; 0xfbuy; 0x4euy; 0xbcuy; 0xeeuy; 0xd3uy; 0xe7uy; 0xd4uy; 0x44uy; 0x3duy; 0xa6uy; 0xe0uy; 0x81uy; 0xa3uy; 0x5euy ] in let cipher: list FStar.UInt8.t = [ 0x5buy; 0x7buy; 0x94uy; 0x07uy; 0x6buy; 0x2fuy; 0xc2uy; 0x0duy; 0x6auy; 0xdbuy; 0x82uy; 0x47uy; 0x9euy; 0x6buy; 0x28uy; 0xd0uy; 0x7cuy; 0x90uy; 0x2buy; 0x75uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xdduy; 0x24uy; 0x5buy; 0xffuy; 0xe6uy; 0xa6uy; 0x38uy; 0x80uy; 0x66uy; 0x67uy; 0x76uy; 0x83uy; 0x60uy; 0xa9uy; 0x5duy; 0x05uy; 0x74uy; 0xe1uy; 0xa0uy; 0xbduy; 0x0duy; 0x18uy; 0x32uy; 0x9fuy; 0xdbuy; 0x91uy; 0x5cuy; 0xa4uy; 0x84uy; 0xacuy; 0x0duy ] in let cipher: list FStar.UInt8.t = [ 0x60uy; 0x66uy; 0xdbuy; 0x99uy; 0xfcuy; 0x35uy; 0x89uy; 0x52uy; 0xcfuy; 0x7fuy; 0xb0uy; 0xecuy; 0x4duy; 0x89uy; 0xcbuy; 0x01uy; 0x58uy; 0xeduy; 0x91uy; 0xd7uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x03uy; 0x21uy; 0x79uy; 0x4buy; 0x73uy; 0x94uy; 0x18uy; 0xc2uy; 0x4euy; 0x7cuy; 0x2euy; 0x56uy; 0x52uy; 0x74uy; 0x79uy; 0x1cuy; 0x4buy; 0xe7uy; 0x49uy; 0x75uy; 0x2auy; 0xd2uy; 0x34uy; 0xeduy; 0x56uy; 0xcbuy; 0x0auy; 0x63uy; 0x47uy; 0x43uy; 0x0cuy; 0x6buy ] in let cipher: list FStar.UInt8.t = [ 0xb8uy; 0x99uy; 0x62uy; 0xc9uy; 0x4duy; 0x60uy; 0xf6uy; 0xa3uy; 0x32uy; 0xfduy; 0x60uy; 0xf6uy; 0xf0uy; 0x7duy; 0x4fuy; 0x03uy; 0x2auy; 0x58uy; 0x6buy; 0x76uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x4cuy; 0x3duy; 0xcfuy; 0x95uy; 0xc2uy; 0xf0uy; 0xb5uy; 0x25uy; 0x8cuy; 0x65uy; 0x1fuy; 0xcduy; 0x1duy; 0x51uy; 0xbduy; 0x10uy; 0x42uy; 0x5duy; 0x62uy; 0x03uy; 0x06uy; 0x7duy; 0x07uy; 0x48uy; 0xd3uy; 0x7duy; 0x13uy; 0x40uy; 0xd9uy; 0xdduy; 0xdauy; 0x7duy; 0xb3uy ] in let cipher: list FStar.UInt8.t = [ 0x17uy; 0xbduy; 0xa8uy; 0x99uy; 0xc1uy; 0x3duy; 0x35uy; 0x41uy; 0x3duy; 0x25uy; 0x46uy; 0x21uy; 0x2buy; 0xcduy; 0x8auy; 0x93uy; 0xceuy; 0xb0uy; 0x65uy; 0x7buy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xb8uy; 0xd1uy; 0x25uy; 0x82uy; 0xd2uy; 0x5buy; 0x45uy; 0x29uy; 0x0auy; 0x6euy; 0x1buy; 0xb9uy; 0x5duy; 0xa4uy; 0x29uy; 0xbeuy; 0xfcuy; 0xfduy; 0xbfuy; 0x5buy; 0x4duy; 0xd4uy; 0x1cuy; 0xdfuy; 0x33uy; 0x11uy; 0xd6uy; 0x98uy; 0x8fuy; 0xa1uy; 0x7cuy; 0xecuy; 0x07uy; 0x23uy ] in let cipher: list FStar.UInt8.t = [ 0xbauy; 0xdcuy; 0xdduy; 0x53uy; 0xfduy; 0xc1uy; 0x44uy; 0xb8uy; 0xbfuy; 0x2cuy; 0xc1uy; 0xe6uy; 0x4duy; 0x10uy; 0xf6uy; 0x76uy; 0xeeuy; 0xbeuy; 0x66uy; 0xeduy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x6fuy; 0xdauy; 0x97uy; 0x52uy; 0x7auy; 0x66uy; 0x25uy; 0x52uy; 0xbeuy; 0x15uy; 0xefuy; 0xaeuy; 0xbauy; 0x32uy; 0xa3uy; 0xaeuy; 0xa4uy; 0xeduy; 0x44uy; 0x9auy; 0xbbuy; 0x5cuy; 0x1euy; 0xd8uy; 0xd9uy; 0xbfuy; 0xffuy; 0x54uy; 0x47uy; 0x08uy; 0xa4uy; 0x25uy; 0xd6uy; 0x9buy; 0x72uy ] in let cipher: list FStar.UInt8.t = [ 0x01uy; 0xb4uy; 0x64uy; 0x61uy; 0x80uy; 0xf1uy; 0xf6uy; 0xd2uy; 0xe0uy; 0x6buy; 0xbeuy; 0x22uy; 0xc2uy; 0x0euy; 0x50uy; 0x03uy; 0x03uy; 0x22uy; 0x67uy; 0x3auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x09uy; 0xfauy; 0x27uy; 0x92uy; 0xacuy; 0xbbuy; 0x24uy; 0x17uy; 0xe8uy; 0xeduy; 0x26uy; 0x90uy; 0x41uy; 0xccuy; 0x03uy; 0xc7uy; 0x70uy; 0x06uy; 0x46uy; 0x6euy; 0x6euy; 0x7auy; 0xe0uy; 0x02uy; 0xcfuy; 0x3fuy; 0x1auy; 0xf5uy; 0x51uy; 0xe8uy; 0xceuy; 0x0buy; 0xb5uy; 0x06uy; 0xd7uy; 0x05uy ] in let cipher: list FStar.UInt8.t = [ 0x10uy; 0x01uy; 0x6duy; 0xc3uy; 0xa2uy; 0x71uy; 0x9fuy; 0x90uy; 0x34uy; 0xffuy; 0xccuy; 0x68uy; 0x94uy; 0x26uy; 0xd2uy; 0x82uy; 0x92uy; 0xc4uy; 0x2fuy; 0xc9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x5euy; 0xfauy; 0x29uy; 0x87uy; 0xdauy; 0x0buy; 0xafuy; 0x0auy; 0x54uy; 0xd8uy; 0xd7uy; 0x28uy; 0x79uy; 0x2buy; 0xcfuy; 0xa7uy; 0x07uy; 0xa1uy; 0x57uy; 0x98uy; 0xdcuy; 0x66uy; 0x74uy; 0x37uy; 0x54uy; 0x40uy; 0x69uy; 0x14uy; 0xd1uy; 0xcfuy; 0xe3uy; 0x70uy; 0x9buy; 0x13uy; 0x74uy; 0xeauy; 0xebuy ] in let cipher: list FStar.UInt8.t = [ 0x9fuy; 0x42uy; 0xfauy; 0x2buy; 0xceuy; 0x6euy; 0xf0uy; 0x21uy; 0xd9uy; 0x3cuy; 0x6buy; 0x2duy; 0x90uy; 0x22uy; 0x73uy; 0x79uy; 0x7euy; 0x42uy; 0x65uy; 0x35uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x28uy; 0x36uy; 0xdeuy; 0x99uy; 0xc0uy; 0xf6uy; 0x41uy; 0xcduy; 0x55uy; 0xe8uy; 0x9fuy; 0x5auy; 0xf7uy; 0x66uy; 0x38uy; 0x94uy; 0x7buy; 0x82uy; 0x27uy; 0x37uy; 0x7euy; 0xf8uy; 0x8buy; 0xfbuy; 0xa6uy; 0x62uy; 0xe5uy; 0x68uy; 0x2buy; 0xabuy; 0xc1uy; 0xecuy; 0x96uy; 0xc6uy; 0x99uy; 0x2buy; 0xc9uy; 0xa0uy ] in let cipher: list FStar.UInt8.t = [ 0xcduy; 0xf4uy; 0x8buy; 0xacuy; 0xbfuy; 0xf6uy; 0xf6uy; 0x15uy; 0x25uy; 0x15uy; 0x32uy; 0x3fuy; 0x9buy; 0x43uy; 0xa2uy; 0x86uy; 0xe0uy; 0xcbuy; 0x81uy; 0x13uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x42uy; 0x14uy; 0x3auy; 0x2buy; 0x9euy; 0x1duy; 0x0buy; 0x35uy; 0x4duy; 0xf3uy; 0x26uy; 0x4duy; 0x08uy; 0xf7uy; 0xb6uy; 0x02uy; 0xf5uy; 0x4auy; 0xaduy; 0x92uy; 0x2auy; 0x3duy; 0x63uy; 0x00uy; 0x6duy; 0x09uy; 0x7fuy; 0x68uy; 0x3duy; 0xc1uy; 0x1buy; 0x90uy; 0x17uy; 0x84uy; 0x23uy; 0xbfuy; 0xf2uy; 0xf7uy; 0xfeuy ] in let cipher: list FStar.UInt8.t = [ 0xb8uy; 0x8fuy; 0xb7uy; 0x52uy; 0x74uy; 0xb9uy; 0xb0uy; 0xfduy; 0x57uy; 0xc0uy; 0x04uy; 0x59uy; 0x88uy; 0xcfuy; 0xceuy; 0xf6uy; 0xc3uy; 0xceuy; 0x65uy; 0x54uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xebuy; 0x60uy; 0xc2uy; 0x8auy; 0xd8uy; 0xaeuy; 0xdauy; 0x80uy; 0x7duy; 0x69uy; 0xebuy; 0xc8uy; 0x75uy; 0x52uy; 0x02uy; 0x4auy; 0xd8uy; 0xacuy; 0xa6uy; 0x82uy; 0x04uy; 0xf1uy; 0xbcuy; 0xd2uy; 0x9duy; 0xc5uy; 0xa8uy; 0x1duy; 0xd2uy; 0x28uy; 0xb5uy; 0x91uy; 0xe2uy; 0xefuy; 0xb7uy; 0xc4uy; 0xdfuy; 0x75uy; 0xefuy; 0x03uy ] in let cipher: list FStar.UInt8.t = [ 0xc0uy; 0x6duy; 0x3auy; 0x6auy; 0x12uy; 0xd9uy; 0xe8uy; 0xdbuy; 0x62uy; 0xe8uy; 0xcfuy; 0xf4uy; 0x0cuy; 0xa2uy; 0x38uy; 0x20uy; 0xd6uy; 0x1duy; 0x8auy; 0xa7uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x7duy; 0xe4uy; 0xbauy; 0x85uy; 0xecuy; 0x54uy; 0x74uy; 0x7cuy; 0xdcuy; 0x42uy; 0xb1uy; 0xf2uy; 0x35uy; 0x46uy; 0xb7uy; 0xe4uy; 0x90uy; 0xe3uy; 0x12uy; 0x80uy; 0xf0uy; 0x66uy; 0xe5uy; 0x2fuy; 0xacuy; 0x11uy; 0x7fuy; 0xd3uy; 0xb0uy; 0x79uy; 0x2euy; 0x4duy; 0xe6uy; 0x2duy; 0x58uy; 0x43uy; 0xeeuy; 0x98uy; 0xc7uy; 0x20uy; 0x15uy ] in let cipher: list FStar.UInt8.t = [ 0x6euy; 0x40uy; 0xf9uy; 0xe8uy; 0x3auy; 0x4buy; 0xe9uy; 0x38uy; 0x74uy; 0xbcuy; 0x97uy; 0xcduy; 0xebuy; 0xb8uy; 0xdauy; 0x68uy; 0x89uy; 0xaeuy; 0x2cuy; 0x7auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xe7uy; 0x06uy; 0x53uy; 0x63uy; 0x7buy; 0xc5uy; 0xe3uy; 0x88uy; 0xccuy; 0xd8uy; 0xdcuy; 0x44uy; 0xe5uy; 0xeauy; 0xceuy; 0x36uy; 0xf7uy; 0x39uy; 0x8fuy; 0x2buy; 0xacuy; 0x99uy; 0x30uy; 0x42uy; 0xb9uy; 0xbcuy; 0x2fuy; 0x4fuy; 0xb3uy; 0xb0uy; 0xeeuy; 0x7euy; 0x23uy; 0xa9uy; 0x64uy; 0x39uy; 0xdcuy; 0x01uy; 0x13uy; 0x4buy; 0x8cuy; 0x7duy ] in let cipher: list FStar.UInt8.t = [ 0x3euy; 0xfcuy; 0x94uy; 0x0cuy; 0x31uy; 0x2euy; 0xf0uy; 0xdfuy; 0xd4uy; 0xe1uy; 0x14uy; 0x38uy; 0x12uy; 0x24uy; 0x8duy; 0xb8uy; 0x95uy; 0x42uy; 0xf6uy; 0xa5uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xdduy; 0x37uy; 0xbcuy; 0x9fuy; 0x0buy; 0x3auy; 0x47uy; 0x88uy; 0xf9uy; 0xb5uy; 0x49uy; 0x66uy; 0xf2uy; 0x52uy; 0x17uy; 0x4cuy; 0x8cuy; 0xe4uy; 0x87uy; 0xcbuy; 0xe5uy; 0x9cuy; 0x53uy; 0xc2uy; 0x2buy; 0x81uy; 0xbfuy; 0x77uy; 0x62uy; 0x1auy; 0x7cuy; 0xe7uy; 0x61uy; 0x6duy; 0xcbuy; 0x5buy; 0x1euy; 0x2euy; 0xe6uy; 0x3cuy; 0x2cuy; 0x30uy; 0x9buy ] in let cipher: list FStar.UInt8.t = [ 0xa0uy; 0xcfuy; 0x03uy; 0xf7uy; 0xbauy; 0xdduy; 0x0cuy; 0x3cuy; 0x3cuy; 0x4euy; 0xa3uy; 0x71uy; 0x7fuy; 0x5auy; 0x4fuy; 0xb7uy; 0xe6uy; 0x7buy; 0x2euy; 0x56uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x5fuy; 0x48uy; 0x5cuy; 0x63uy; 0x7auy; 0xe3uy; 0x0buy; 0x1euy; 0x30uy; 0x49uy; 0x7fuy; 0x0fuy; 0xb7uy; 0xecuy; 0x36uy; 0x4euy; 0x13uy; 0xc9uy; 0x06uy; 0xe2uy; 0x81uy; 0x3duy; 0xaauy; 0x34uy; 0x16uy; 0x1buy; 0x7auy; 0xc4uy; 0xa4uy; 0xfduy; 0x7auy; 0x1buy; 0xdduy; 0xd7uy; 0x96uy; 0x01uy; 0xbbuy; 0xd2uy; 0x2cuy; 0xefuy; 0x1fuy; 0x57uy; 0xcbuy; 0xc7uy ] in let cipher: list FStar.UInt8.t = [ 0xa5uy; 0x44uy; 0xe0uy; 0x6fuy; 0x1auy; 0x07uy; 0xceuy; 0xb1uy; 0x75uy; 0xa5uy; 0x1duy; 0x6duy; 0x9cuy; 0x01uy; 0x11uy; 0xb3uy; 0xe1uy; 0x5euy; 0x98uy; 0x59uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xf6uy; 0xc2uy; 0x37uy; 0xfbuy; 0x3cuy; 0xfeuy; 0x95uy; 0xecuy; 0x84uy; 0x14uy; 0xccuy; 0x16uy; 0xd2uy; 0x03uy; 0xb4uy; 0x87uy; 0x4euy; 0x64uy; 0x4cuy; 0xc9uy; 0xa5uy; 0x43uy; 0x46uy; 0x5cuy; 0xaduy; 0x2duy; 0xc5uy; 0x63uy; 0x48uy; 0x8auy; 0x65uy; 0x9euy; 0x8auy; 0x2euy; 0x7cuy; 0x98uy; 0x1euy; 0x2auy; 0x9fuy; 0x22uy; 0xe5uy; 0xe8uy; 0x68uy; 0xffuy; 0xe1uy ] in let cipher: list FStar.UInt8.t = [ 0x19uy; 0x9duy; 0x98uy; 0x6euy; 0xd9uy; 0x91uy; 0xb9uy; 0x9auy; 0x07uy; 0x1fuy; 0x45uy; 0x0cuy; 0x6buy; 0x11uy; 0x21uy; 0xa7uy; 0x27uy; 0xe8uy; 0xc7uy; 0x35uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xdauy; 0x7auy; 0xb3uy; 0x29uy; 0x15uy; 0x53uy; 0xc6uy; 0x59uy; 0x87uy; 0x3cuy; 0x95uy; 0x91uy; 0x37uy; 0x68uy; 0x95uy; 0x3cuy; 0x6euy; 0x52uy; 0x6duy; 0x3auy; 0x26uy; 0x59uy; 0x08uy; 0x98uy; 0xc0uy; 0xaduy; 0xe8uy; 0x9fuy; 0xf5uy; 0x6fuy; 0xbduy; 0x11uy; 0x0fuy; 0x14uy; 0x36uy; 0xafuy; 0x59uy; 0x0buy; 0x17uy; 0xfeuy; 0xd4uy; 0x9fuy; 0x8cuy; 0x4buy; 0x2buy; 0x1euy ] in let cipher: list FStar.UInt8.t = [ 0x33uy; 0xbauy; 0xc6uy; 0x10uy; 0x4buy; 0x0auy; 0xd6uy; 0x12uy; 0x8duy; 0x09uy; 0x1buy; 0x5duy; 0x5euy; 0x29uy; 0x99uy; 0x09uy; 0x9cuy; 0x9fuy; 0x05uy; 0xdeuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x8cuy; 0xfauy; 0x5fuy; 0xd5uy; 0x6euy; 0xe2uy; 0x39uy; 0xcauy; 0x47uy; 0x73uy; 0x75uy; 0x91uy; 0xcbuy; 0xa1uy; 0x03uy; 0xe4uy; 0x1auy; 0x18uy; 0xacuy; 0xf8uy; 0xe8uy; 0xd2uy; 0x57uy; 0xb0uy; 0xdbuy; 0xe8uy; 0x85uy; 0x11uy; 0x34uy; 0xa8uy; 0x1fuy; 0xf6uy; 0xb2uy; 0xe9uy; 0x71uy; 0x04uy; 0xb3uy; 0x9buy; 0x76uy; 0xe1uy; 0x9duy; 0xa2uy; 0x56uy; 0xa1uy; 0x7cuy; 0xe5uy; 0x2duy ] in let cipher: list FStar.UInt8.t = [ 0x76uy; 0xd7uy; 0xdbuy; 0x6euy; 0x18uy; 0xc1uy; 0xf4uy; 0xaeuy; 0x22uy; 0x5cuy; 0xe8uy; 0xccuy; 0xc9uy; 0x3cuy; 0x8fuy; 0x9auy; 0x0duy; 0xfeuy; 0xb9uy; 0x69uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x57uy; 0xe8uy; 0x96uy; 0x59uy; 0xd8uy; 0x78uy; 0xf3uy; 0x60uy; 0xafuy; 0x6duy; 0xe4uy; 0x5auy; 0x9auy; 0x5euy; 0x37uy; 0x2euy; 0xf4uy; 0x0cuy; 0x38uy; 0x49uy; 0x88uy; 0xe8uy; 0x26uy; 0x40uy; 0xa3uy; 0xd5uy; 0xe4uy; 0xb7uy; 0x6duy; 0x2euy; 0xf1uy; 0x81uy; 0x78uy; 0x0buy; 0x9auy; 0x09uy; 0x9auy; 0xc0uy; 0x6euy; 0xf0uy; 0xf8uy; 0xa7uy; 0xf3uy; 0xf7uy; 0x64uy; 0x20uy; 0x97uy; 0x20uy ] in let cipher: list FStar.UInt8.t = [ 0xf6uy; 0x52uy; 0xf3uy; 0xb1uy; 0x54uy; 0x9fuy; 0x16uy; 0x71uy; 0x0cuy; 0x74uy; 0x02uy; 0x89uy; 0x59uy; 0x11uy; 0xe2uy; 0xb8uy; 0x6auy; 0x9buy; 0x2auy; 0xeeuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xb9uy; 0x1euy; 0x64uy; 0x23uy; 0x5duy; 0xbduy; 0x23uy; 0x4euy; 0xeauy; 0x2auy; 0xe1uy; 0x4auy; 0x92uy; 0xa1uy; 0x73uy; 0xebuy; 0xe8uy; 0x35uy; 0x34uy; 0x72uy; 0x39uy; 0xcfuy; 0xf8uy; 0xb0uy; 0x20uy; 0x74uy; 0x41uy; 0x6fuy; 0x55uy; 0xc6uy; 0xb6uy; 0x0duy; 0xc6uy; 0xceuy; 0xd0uy; 0x6auy; 0xe9uy; 0xf8uy; 0xd7uy; 0x05uy; 0x50uy; 0x5fuy; 0x0duy; 0x61uy; 0x7euy; 0x4buy; 0x29uy; 0xaeuy; 0xf9uy ] in let cipher: list FStar.UInt8.t = [ 0x63uy; 0xfauy; 0xebuy; 0xb8uy; 0x07uy; 0xf3uy; 0x2buy; 0xe7uy; 0x08uy; 0xcfuy; 0x00uy; 0xfcuy; 0x35uy; 0x51uy; 0x99uy; 0x91uy; 0xdcuy; 0x4euy; 0x7fuy; 0x68uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xe4uy; 0x2auy; 0x67uy; 0x36uy; 0x2auy; 0x58uy; 0x1euy; 0x8cuy; 0xf3uy; 0xd8uy; 0x47uy; 0x50uy; 0x22uy; 0x15uy; 0x75uy; 0x5duy; 0x7auy; 0xd4uy; 0x25uy; 0xcauy; 0x03uy; 0x0cuy; 0x43uy; 0x60uy; 0xb0uy; 0xf7uy; 0xefuy; 0x51uy; 0x3euy; 0x69uy; 0x80uy; 0x26uy; 0x5fuy; 0x61uy; 0xc9uy; 0xfauy; 0x18uy; 0xdduy; 0x9cuy; 0xe6uy; 0x68uy; 0xf3uy; 0x8duy; 0xbcuy; 0x2auy; 0x1euy; 0xf8uy; 0xf8uy; 0x3cuy; 0xd6uy ] in let cipher: list FStar.UInt8.t = [ 0x0euy; 0x67uy; 0x30uy; 0xbcuy; 0x4auy; 0x0euy; 0x93uy; 0x22uy; 0xeauy; 0x20uy; 0x5fuy; 0x4euy; 0xdfuy; 0xffuy; 0x1fuy; 0xffuy; 0xdauy; 0x26uy; 0xafuy; 0x0auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x63uy; 0x4duy; 0xb9uy; 0x2cuy; 0x22uy; 0x01uy; 0x0euy; 0x1cuy; 0xbfuy; 0x1euy; 0x16uy; 0x23uy; 0x92uy; 0x31uy; 0x80uy; 0x40uy; 0x6cuy; 0x51uy; 0x52uy; 0x72uy; 0x20uy; 0x9auy; 0x8auy; 0xccuy; 0x42uy; 0xdeuy; 0x05uy; 0xccuy; 0x2euy; 0x96uy; 0xa1uy; 0xe9uy; 0x4cuy; 0x1fuy; 0x9fuy; 0x6buy; 0x93uy; 0x23uy; 0x4buy; 0x7fuy; 0x4cuy; 0x55uy; 0xdeuy; 0x8buy; 0x19uy; 0x61uy; 0xa3uy; 0xbfuy; 0x35uy; 0x22uy; 0x59uy ] in let cipher: list FStar.UInt8.t = [ 0xb6uy; 0x1auy; 0x3auy; 0x6fuy; 0x42uy; 0xe8uy; 0xe6uy; 0x60uy; 0x4buy; 0x93uy; 0x19uy; 0x6cuy; 0x43uy; 0xc9uy; 0xe8uy; 0x4duy; 0x53uy; 0x59uy; 0xe6uy; 0xfeuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xccuy; 0x6cuy; 0xa3uy; 0xa8uy; 0xcbuy; 0x39uy; 0x1cuy; 0xd8uy; 0xa5uy; 0xafuy; 0xf1uy; 0xfauy; 0xa7uy; 0xb3uy; 0xffuy; 0xbduy; 0xd2uy; 0x1auy; 0x5auy; 0x3cuy; 0xe6uy; 0x6cuy; 0xfauy; 0xdduy; 0xbfuy; 0xe8uy; 0xb1uy; 0x79uy; 0xe4uy; 0xc8uy; 0x60uy; 0xbeuy; 0x5euy; 0xc6uy; 0x6buy; 0xd2uy; 0xc6uy; 0xdeuy; 0x6auy; 0x39uy; 0xa2uy; 0x56uy; 0x22uy; 0xf9uy; 0xf2uy; 0xfcuy; 0xb3uy; 0xfcuy; 0x05uy; 0xafuy; 0x12uy; 0xb5uy ] in let cipher: list FStar.UInt8.t = [ 0x32uy; 0xd9uy; 0x79uy; 0xcauy; 0x1buy; 0x3euy; 0xd0uy; 0xeduy; 0x8cuy; 0x89uy; 0x0duy; 0x99uy; 0xecuy; 0x6duy; 0xd8uy; 0x5euy; 0x6cuy; 0x16uy; 0xabuy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x7cuy; 0x0euy; 0x6auy; 0x0duy; 0x35uy; 0xf8uy; 0xacuy; 0x85uy; 0x4cuy; 0x72uy; 0x45uy; 0xebuy; 0xc7uy; 0x36uy; 0x93uy; 0x73uy; 0x1buy; 0xbbuy; 0xc3uy; 0xe6uy; 0xfauy; 0xb6uy; 0x44uy; 0x46uy; 0x6duy; 0xe2uy; 0x7buy; 0xb5uy; 0x22uy; 0xfcuy; 0xb9uy; 0x93uy; 0x07uy; 0x12uy; 0x6auy; 0xe7uy; 0x18uy; 0xfeuy; 0x8fuy; 0x00uy; 0x74uy; 0x2euy; 0x6euy; 0x5cuy; 0xb7uy; 0xa6uy; 0x87uy; 0xc8uy; 0x84uy; 0x47uy; 0xcbuy; 0xc9uy; 0x61uy ] in let cipher: list FStar.UInt8.t = [ 0x6fuy; 0x18uy; 0x19uy; 0x0buy; 0xd2uy; 0xd0uy; 0x2fuy; 0xc9uy; 0x3buy; 0xceuy; 0x64uy; 0x75uy; 0x65uy; 0x75uy; 0xceuy; 0xa3uy; 0x6duy; 0x08uy; 0xb1uy; 0xc3uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xc5uy; 0x58uy; 0x1duy; 0x40uy; 0xb3uy; 0x31uy; 0xe2uy; 0x40uy; 0x03uy; 0x90uy; 0x1buy; 0xd6uy; 0xbfuy; 0x24uy; 0x4auy; 0xcauy; 0x9euy; 0x96uy; 0x01uy; 0xb9uy; 0xd8uy; 0x12uy; 0x52uy; 0xbbuy; 0x38uy; 0x04uy; 0x86uy; 0x42uy; 0x73uy; 0x1fuy; 0x11uy; 0x46uy; 0xb8uy; 0xa4uy; 0xc6uy; 0x9fuy; 0x88uy; 0xe1uy; 0x48uy; 0xb2uy; 0xc8uy; 0xf8uy; 0xc1uy; 0x4fuy; 0x15uy; 0xe1uy; 0xd6uy; 0xdauy; 0x57uy; 0xb2uy; 0xdauy; 0xa9uy; 0x99uy; 0x1euy ] in let cipher: list FStar.UInt8.t = [ 0x68uy; 0xf5uy; 0x25uy; 0xfeuy; 0xeauy; 0x1duy; 0x8duy; 0xbeuy; 0x01uy; 0x17uy; 0xe4uy; 0x17uy; 0xcauy; 0x46uy; 0x70uy; 0x8duy; 0x18uy; 0xd7uy; 0x62uy; 0x9auy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xecuy; 0x6buy; 0x4auy; 0x88uy; 0x71uy; 0x3duy; 0xf2uy; 0x7cuy; 0x0fuy; 0x2duy; 0x02uy; 0xe7uy; 0x38uy; 0xb6uy; 0x9duy; 0xb4uy; 0x3auy; 0xbduy; 0xa3uy; 0x92uy; 0x13uy; 0x17uy; 0x25uy; 0x9cuy; 0x86uy; 0x4cuy; 0x1cuy; 0x38uy; 0x6euy; 0x9auy; 0x5auy; 0x3fuy; 0x53uy; 0x3duy; 0xc0uy; 0x5fuy; 0x3buy; 0xeeuy; 0xb2uy; 0xbeuy; 0xc2uy; 0xaauy; 0xc8uy; 0xe0uy; 0x6duy; 0xb4uy; 0xc6uy; 0xcbuy; 0x3cuy; 0xdduy; 0xcfuy; 0x69uy; 0x7euy; 0x03uy; 0xd5uy ] in let cipher: list FStar.UInt8.t = [ 0xa7uy; 0x27uy; 0x2euy; 0x23uy; 0x08uy; 0x62uy; 0x2fuy; 0xf7uy; 0xa3uy; 0x39uy; 0x46uy; 0x0auy; 0xdcuy; 0x61uy; 0xefuy; 0xd0uy; 0xeauy; 0x8duy; 0xabuy; 0xdcuy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x03uy; 0x21uy; 0x73uy; 0x6buy; 0xebuy; 0xa5uy; 0x78uy; 0xe9uy; 0x0auy; 0xbcuy; 0x1auy; 0x90uy; 0xaauy; 0x56uy; 0x15uy; 0x7duy; 0x87uy; 0x16uy; 0x18uy; 0xf6uy; 0xdeuy; 0x0duy; 0x76uy; 0x4cuy; 0xc8uy; 0xc9uy; 0x1euy; 0x06uy; 0xc6uy; 0x8euy; 0xcduy; 0x3buy; 0x9duy; 0xe3uy; 0x82uy; 0x40uy; 0x64uy; 0x50uy; 0x33uy; 0x84uy; 0xdbuy; 0x67uy; 0xbeuy; 0xb7uy; 0xfeuy; 0x01uy; 0x22uy; 0x32uy; 0xdauy; 0xcauy; 0xefuy; 0x93uy; 0xa0uy; 0x00uy; 0xfbuy; 0xa7uy ] in let cipher: list FStar.UInt8.t = [ 0xaeuy; 0xf8uy; 0x43uy; 0xb8uy; 0x69uy; 0x16uy; 0xc1uy; 0x6fuy; 0x66uy; 0xc8uy; 0x4duy; 0x83uy; 0xa6uy; 0x00uy; 0x5duy; 0x23uy; 0xfduy; 0x00uy; 0x5cuy; 0x9euy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xd0uy; 0xa2uy; 0x49uy; 0xa9uy; 0x7buy; 0x5fuy; 0x14uy; 0x86uy; 0x72uy; 0x1auy; 0x50uy; 0xd4uy; 0xc4uy; 0xabuy; 0x3fuy; 0x5duy; 0x67uy; 0x4auy; 0x0euy; 0x29uy; 0x92uy; 0x5duy; 0x5buy; 0xf2uy; 0x67uy; 0x8euy; 0xf6uy; 0xd8uy; 0xd5uy; 0x21uy; 0xe4uy; 0x56uy; 0xbduy; 0x84uy; 0xaauy; 0x75uy; 0x53uy; 0x28uy; 0xc8uy; 0x3fuy; 0xc8uy; 0x90uy; 0x83uy; 0x77uy; 0x26uy; 0xa8uy; 0xe7uy; 0x87uy; 0x7buy; 0x57uy; 0x0duy; 0xbauy; 0x39uy; 0x57uy; 0x9auy; 0xabuy; 0xdduy ] in let cipher: list FStar.UInt8.t = [ 0xbeuy; 0x2cuy; 0xd6uy; 0xf3uy; 0x80uy; 0x96uy; 0x9buy; 0xe5uy; 0x9cuy; 0xdeuy; 0x2duy; 0xffuy; 0x5euy; 0x84uy; 0x8auy; 0x44uy; 0xe7uy; 0x88uy; 0x0buy; 0xd6uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xc3uy; 0x21uy; 0x38uy; 0x53uy; 0x11uy; 0x18uy; 0xf0uy; 0x8cuy; 0x7duy; 0xccuy; 0x29uy; 0x24uy; 0x28uy; 0xaduy; 0x20uy; 0xb4uy; 0x5auy; 0xb2uy; 0x7duy; 0x95uy; 0x17uy; 0xa1uy; 0x84uy; 0x45uy; 0xf3uy; 0x8buy; 0x8fuy; 0x0cuy; 0x27uy; 0x95uy; 0xbcuy; 0xdfuy; 0xe3uy; 0xffuy; 0xe3uy; 0x84uy; 0xe6uy; 0x5euy; 0xcbuy; 0xf7uy; 0x4duy; 0x2cuy; 0x9duy; 0x0duy; 0xa8uy; 0x83uy; 0x98uy; 0x57uy; 0x53uy; 0x26uy; 0x07uy; 0x49uy; 0x04uy; 0xc1uy; 0x70uy; 0x9buy; 0xa0uy; 0x72uy ] in let cipher: list FStar.UInt8.t = [ 0xe5uy; 0xebuy; 0x45uy; 0x43uy; 0xdeuy; 0xeeuy; 0x8fuy; 0x6auy; 0x52uy; 0x87uy; 0x84uy; 0x5auy; 0xf8uy; 0xb5uy; 0x93uy; 0xa9uy; 0x5auy; 0x97uy; 0x49uy; 0xa1uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xb0uy; 0xf4uy; 0xcfuy; 0xb9uy; 0x39uy; 0xeauy; 0x78uy; 0x5euy; 0xabuy; 0xb7uy; 0xe7uy; 0xcauy; 0x7cuy; 0x47uy; 0x6cuy; 0xdduy; 0x9buy; 0x22uy; 0x7fuy; 0x01uy; 0x5duy; 0x90uy; 0x53uy; 0x68uy; 0xbauy; 0x00uy; 0xaeuy; 0x96uy; 0xb9uy; 0xaauy; 0xf7uy; 0x20uy; 0x29uy; 0x74uy; 0x91uy; 0xb3uy; 0x92uy; 0x12uy; 0x67uy; 0x57uy; 0x6buy; 0x72uy; 0xc8uy; 0xf5uy; 0x8duy; 0x57uy; 0x76uy; 0x17uy; 0xe8uy; 0x44uy; 0xf9uy; 0xf0uy; 0x75uy; 0x9buy; 0x39uy; 0x9cuy; 0x6buy; 0x06uy; 0x4cuy ] in let cipher: list FStar.UInt8.t = [ 0x53uy; 0x4cuy; 0x85uy; 0x04uy; 0x48uy; 0xdduy; 0x48uy; 0x67uy; 0x87uy; 0xb6uy; 0x2buy; 0xdeuy; 0xc2uy; 0xd4uy; 0xa0uy; 0xb1uy; 0x40uy; 0xa1uy; 0xb1uy; 0x70uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xbduy; 0x02uy; 0xe5uy; 0x1buy; 0x0cuy; 0xf2uy; 0xc2uy; 0xb8uy; 0xd2uy; 0x04uy; 0xa0uy; 0x26uy; 0xb4uy; 0x1auy; 0x66uy; 0xfbuy; 0xfcuy; 0x2auy; 0xc3uy; 0x7euy; 0xe9uy; 0x41uy; 0x1fuy; 0xc4uy; 0x49uy; 0xc8uy; 0xd1uy; 0x19uy; 0x4auy; 0x07uy; 0x92uy; 0xa2uy; 0x8euy; 0xe7uy; 0x31uy; 0x40uy; 0x7duy; 0xfcuy; 0x89uy; 0xb6uy; 0xdfuy; 0xc2uy; 0xb1uy; 0x0fuy; 0xaauy; 0x27uy; 0x72uy; 0x3auy; 0x18uy; 0x4auy; 0xfeuy; 0xf8uy; 0xfduy; 0x83uy; 0xdeuy; 0xf8uy; 0x58uy; 0xa3uy; 0x2duy; 0x3fuy ] in let cipher: list FStar.UInt8.t = [ 0x6fuy; 0xbfuy; 0xa6uy; 0xe4uy; 0xeduy; 0xceuy; 0x4cuy; 0xc8uy; 0x5auy; 0x84uy; 0x5buy; 0xf0uy; 0xd2uy; 0x28uy; 0xdcuy; 0x39uy; 0xacuy; 0xefuy; 0xc2uy; 0xfauy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xe3uy; 0x31uy; 0x46uy; 0xb8uy; 0x3euy; 0x4buy; 0xb6uy; 0x71uy; 0x39uy; 0x22uy; 0x18uy; 0xdauy; 0x9auy; 0x77uy; 0xf8uy; 0xd9uy; 0xf5uy; 0x97uy; 0x41uy; 0x47uy; 0x18uy; 0x2fuy; 0xb9uy; 0x5buy; 0xa6uy; 0x62uy; 0xcbuy; 0x66uy; 0x01uy; 0x19uy; 0x89uy; 0xc1uy; 0x6duy; 0x9auy; 0xf1uy; 0x04uy; 0x73uy; 0x5duy; 0x6fuy; 0x79uy; 0x84uy; 0x1auy; 0xa4uy; 0xd1uy; 0xdfuy; 0x27uy; 0x66uy; 0x15uy; 0xb5uy; 0x01uy; 0x08uy; 0xdfuy; 0x8auy; 0x29uy; 0xdbuy; 0xc9uy; 0xdeuy; 0x31uy; 0xf4uy; 0x26uy; 0x0duy ] in let cipher: list FStar.UInt8.t = [ 0x01uy; 0x88uy; 0x72uy; 0x69uy; 0x1duy; 0x9buy; 0x04uy; 0xe8uy; 0x22uy; 0x0euy; 0x09uy; 0x18uy; 0x7duy; 0xf5uy; 0xbcuy; 0x5fuy; 0xa6uy; 0x25uy; 0x7cuy; 0xd9uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x41uy; 0x1cuy; 0x13uy; 0xc7uy; 0x50uy; 0x73uy; 0xc1uy; 0xe2uy; 0xd4uy; 0xb1uy; 0xecuy; 0xf1uy; 0x31uy; 0x39uy; 0xbauy; 0x96uy; 0x56uy; 0xcduy; 0x35uy; 0xc1uy; 0x42uy; 0x01uy; 0xf1uy; 0xc7uy; 0xc6uy; 0xf0uy; 0xeeuy; 0xb5uy; 0x8duy; 0x2duy; 0xbfuy; 0xe3uy; 0x5buy; 0xfduy; 0xecuy; 0xccuy; 0x92uy; 0xc3uy; 0x96uy; 0x1cuy; 0xfauy; 0xbbuy; 0x59uy; 0x0buy; 0xc1uy; 0xebuy; 0x77uy; 0xeauy; 0xc1uy; 0x57uy; 0x32uy; 0xfbuy; 0x02uy; 0x75uy; 0x79uy; 0x86uy; 0x80uy; 0xe0uy; 0xc7uy; 0x29uy; 0x2euy; 0x50uy ] in let cipher: list FStar.UInt8.t = [ 0xd9uy; 0x8duy; 0x51uy; 0x2auy; 0x35uy; 0x57uy; 0x2fuy; 0x8buy; 0xd2uy; 0x0duy; 0xe6uy; 0x2euy; 0x95uy; 0x10uy; 0xccuy; 0x21uy; 0x14uy; 0x5cuy; 0x5buy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xf2uy; 0xc7uy; 0x6euy; 0xf6uy; 0x17uy; 0xfauy; 0x2buy; 0xfcuy; 0x8auy; 0x4duy; 0x6buy; 0xcbuy; 0xb1uy; 0x5fuy; 0xe8uy; 0x84uy; 0x36uy; 0xfduy; 0xc2uy; 0x16uy; 0x5duy; 0x30uy; 0x74uy; 0x62uy; 0x95uy; 0x79uy; 0x07uy; 0x9duy; 0x4duy; 0x5buy; 0x86uy; 0xf5uy; 0x08uy; 0x1auy; 0xb1uy; 0x77uy; 0xb4uy; 0xc3uy; 0xf5uy; 0x30uy; 0x37uy; 0x6cuy; 0x9cuy; 0x92uy; 0x4cuy; 0xbduy; 0x42uy; 0x1auy; 0x8duy; 0xafuy; 0x88uy; 0x30uy; 0xd0uy; 0x94uy; 0x0cuy; 0x4fuy; 0xb7uy; 0x58uy; 0x98uy; 0x65uy; 0x83uy; 0x06uy; 0x99uy ] in let cipher: list FStar.UInt8.t = [ 0x9fuy; 0x3euy; 0xa2uy; 0x55uy; 0xf6uy; 0xafuy; 0x95uy; 0xc5uy; 0x45uy; 0x4euy; 0x55uy; 0xd7uy; 0x35uy; 0x4cuy; 0xabuy; 0xb4uy; 0x53uy; 0x52uy; 0xeauy; 0x0buy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x45uy; 0x92uy; 0x7euy; 0x32uy; 0xdduy; 0xf8uy; 0x01uy; 0xcauy; 0xf3uy; 0x5euy; 0x18uy; 0xe7uy; 0xb5uy; 0x07uy; 0x8buy; 0x7fuy; 0x54uy; 0x35uy; 0x27uy; 0x82uy; 0x12uy; 0xecuy; 0x6buy; 0xb9uy; 0x9duy; 0xf8uy; 0x84uy; 0xf4uy; 0x9buy; 0x32uy; 0x7cuy; 0x64uy; 0x86uy; 0xfeuy; 0xaeuy; 0x46uy; 0xbauy; 0x18uy; 0x7duy; 0xc1uy; 0xccuy; 0x91uy; 0x45uy; 0x12uy; 0x1euy; 0x14uy; 0x92uy; 0xe6uy; 0xb0uy; 0x6euy; 0x90uy; 0x07uy; 0x39uy; 0x4duy; 0xc3uy; 0x3buy; 0x77uy; 0x48uy; 0xf8uy; 0x6auy; 0xc3uy; 0x20uy; 0x7cuy; 0xfeuy ] in let cipher: list FStar.UInt8.t = [ 0xa7uy; 0x0cuy; 0xfbuy; 0xfeuy; 0x75uy; 0x63uy; 0xdduy; 0x0euy; 0x66uy; 0x5cuy; 0x7cuy; 0x67uy; 0x15uy; 0xa9uy; 0x6auy; 0x8duy; 0x75uy; 0x69uy; 0x50uy; 0xc0uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x7cuy; 0x9cuy; 0x67uy; 0x32uy; 0x3auy; 0x1duy; 0xf1uy; 0xaduy; 0xbfuy; 0xe5uy; 0xceuy; 0xb4uy; 0x15uy; 0xeauy; 0xefuy; 0x01uy; 0x55uy; 0xecuy; 0xe2uy; 0x82uy; 0x0fuy; 0x4duy; 0x50uy; 0xc1uy; 0xecuy; 0x22uy; 0xcbuy; 0xa4uy; 0x92uy; 0x8auy; 0xc6uy; 0x56uy; 0xc8uy; 0x3fuy; 0xe5uy; 0x85uy; 0xdbuy; 0x6auy; 0x78uy; 0xceuy; 0x40uy; 0xbcuy; 0x42uy; 0x75uy; 0x7auy; 0xbauy; 0x7euy; 0x5auy; 0x3fuy; 0x58uy; 0x24uy; 0x28uy; 0xd6uy; 0xcauy; 0x68uy; 0xd0uy; 0xc3uy; 0x97uy; 0x83uy; 0x36uy; 0xa6uy; 0xefuy; 0xb7uy; 0x29uy; 0x61uy; 0x3euy; 0x8duy; 0x99uy; 0x79uy; 0x01uy; 0x62uy; 0x04uy; 0xbfuy; 0xd9uy; 0x21uy; 0x32uy; 0x2fuy; 0xdduy; 0x52uy; 0x22uy; 0x18uy; 0x35uy; 0x54uy; 0x44uy; 0x7duy; 0xe5uy; 0xe6uy; 0xe9uy; 0xbbuy; 0xe6uy; 0xeduy; 0xf7uy; 0x6duy; 0x7buy; 0x71uy; 0xe1uy; 0x8duy; 0xc2uy; 0xe8uy; 0xd6uy; 0xdcuy; 0x89uy; 0xb7uy; 0x39uy; 0x83uy; 0x64uy; 0xf6uy; 0x52uy; 0xfauy; 0xfcuy; 0x73uy; 0x43uy; 0x29uy; 0xaauy; 0xfauy; 0x3duy; 0xcduy; 0x45uy; 0xd4uy; 0xf3uy; 0x1euy; 0x38uy; 0x8euy; 0x4fuy; 0xafuy; 0xd7uy; 0xfcuy; 0x64uy; 0x95uy; 0xf3uy; 0x7cuy; 0xa5uy; 0xcbuy; 0xabuy; 0x7fuy; 0x54uy; 0xd5uy; 0x86uy; 0x46uy; 0x3duy; 0xa4uy; 0xbfuy; 0xeauy; 0xa3uy; 0xbauy; 0xe0uy; 0x9fuy; 0x7buy; 0x8euy; 0x92uy; 0x39uy; 0xd8uy; 0x32uy; 0xb4uy; 0xf0uy; 0xa7uy; 0x33uy; 0xaauy; 0x60uy; 0x9cuy; 0xc1uy; 0xf8uy; 0xd4uy ] in let cipher: list FStar.UInt8.t = [ 0xd8uy; 0xfduy; 0x6auy; 0x91uy; 0xefuy; 0x3buy; 0x6cuy; 0xeduy; 0x05uy; 0xb9uy; 0x83uy; 0x58uy; 0xa9uy; 0x91uy; 0x07uy; 0xc1uy; 0xfauy; 0xc8uy; 0xc8uy; 0x07uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x6cuy; 0xb7uy; 0x0duy; 0x19uy; 0xc0uy; 0x96uy; 0x20uy; 0x0fuy; 0x92uy; 0x49uy; 0xd2uy; 0xdbuy; 0xc0uy; 0x42uy; 0x99uy; 0xb0uy; 0x08uy; 0x5euy; 0xb0uy; 0x68uy; 0x25uy; 0x75uy; 0x60uy; 0xbeuy; 0x3auy; 0x30uy; 0x7duy; 0xbduy; 0x74uy; 0x1auy; 0x33uy; 0x78uy; 0xebuy; 0xfauy; 0x03uy; 0xfcuy; 0xcauy; 0x61uy; 0x08uy; 0x83uy; 0xb0uy; 0x7fuy; 0x7fuy; 0xeauy; 0x56uy; 0x3auy; 0x86uy; 0x65uy; 0x71uy; 0x82uy; 0x24uy; 0x72uy; 0xdauy; 0xdeuy; 0x8auy; 0x0buy; 0xecuy; 0x4buy; 0x98uy; 0x20uy; 0x2duy; 0x47uy; 0xa3uy; 0x44uy; 0x31uy; 0x29uy; 0x76uy; 0xa7uy; 0xbcuy; 0xb3uy; 0x96uy; 0x44uy; 0x27uy; 0xeauy; 0xcbuy; 0x5buy; 0x05uy; 0x25uy; 0xdbuy; 0x22uy; 0x06uy; 0x65uy; 0x99uy; 0xb8uy; 0x1buy; 0xe4uy; 0x1euy; 0x5auy; 0xdauy; 0xf1uy; 0x57uy; 0xd9uy; 0x25uy; 0xfauy; 0xc0uy; 0x4buy; 0x06uy; 0xebuy; 0x6euy; 0x01uy; 0xdeuy; 0xb7uy; 0x53uy; 0xbauy; 0xbfuy; 0x33uy; 0xbeuy; 0x16uy; 0x16uy; 0x2buy; 0x21uy; 0x4euy; 0x8duy; 0xb0uy; 0x17uy; 0x21uy; 0x2fuy; 0xafuy; 0xa5uy; 0x12uy; 0xcduy; 0xc8uy; 0xc0uy; 0xd0uy; 0xa1uy; 0x5cuy; 0x10uy; 0xf6uy; 0x32uy; 0xe8uy; 0xf4uy; 0xf4uy; 0x77uy; 0x92uy; 0xc6uy; 0x4duy; 0x3fuy; 0x02uy; 0x60uy; 0x04uy; 0xd1uy; 0x73uy; 0xdfuy; 0x50uy; 0xcfuy; 0x0auy; 0xa7uy; 0x97uy; 0x60uy; 0x66uy; 0xa7uy; 0x9auy; 0x8duy; 0x78uy; 0xdeuy; 0xeeuy; 0xecuy; 0x95uy; 0x1duy; 0xabuy; 0x7cuy; 0xc9uy; 0x0fuy; 0x68uy; 0xd1uy; 0x6fuy; 0x78uy; 0x66uy; 0x71uy; 0xfeuy; 0xbauy; 0x0buy; 0x7duy; 0x26uy; 0x9duy; 0x92uy; 0x94uy; 0x1cuy; 0x4fuy; 0x02uy; 0xf4uy; 0x32uy; 0xaauy; 0x5cuy; 0xe2uy; 0xaauy; 0xb6uy; 0x19uy; 0x4duy; 0xccuy; 0x6fuy; 0xd3uy; 0xaeuy; 0x36uy; 0xc8uy; 0x43uy; 0x32uy; 0x74uy; 0xefuy; 0x6buy; 0x1buy; 0xd0uy; 0xd3uy; 0x14uy; 0x63uy; 0x6buy; 0xe4uy; 0x7buy; 0xa3uy; 0x8duy; 0x19uy; 0x48uy; 0x34uy; 0x3auy; 0x38uy; 0xbfuy; 0x94uy; 0x06uy; 0x52uy; 0x3auy; 0x0buy; 0x2auy; 0x8cuy; 0xd7uy; 0x8euy; 0xd6uy; 0x26uy; 0x6euy; 0xe3uy; 0xc9uy; 0xb5uy; 0xc6uy; 0x06uy; 0x20uy; 0xb3uy; 0x08uy; 0xccuy; 0x6buy; 0x3auy; 0x73uy; 0xc6uy; 0x06uy; 0x0duy; 0x52uy; 0x68uy; 0xa7uy; 0xd8uy; 0x2buy; 0x6auy; 0x33uy; 0xb9uy; 0x3auy; 0x6fuy; 0xd6uy; 0xfeuy; 0x1duy; 0xe5uy; 0x52uy; 0x31uy; 0xd1uy; 0x2cuy; 0x97uy ] in let cipher: list FStar.UInt8.t = [ 0x4auy; 0x75uy; 0xa4uy; 0x06uy; 0xf4uy; 0xdeuy; 0x5fuy; 0x9euy; 0x11uy; 0x32uy; 0x06uy; 0x9duy; 0x66uy; 0x71uy; 0x7fuy; 0xc4uy; 0x24uy; 0x37uy; 0x63uy; 0x88uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0x64uy; 0x87uy; 0x97uy; 0x2duy; 0x88uy; 0xd0uy; 0xdduy; 0x39uy; 0x0duy; 0x8duy; 0x09uy; 0xd1uy; 0x34uy; 0x86uy; 0x0fuy; 0x26uy; 0x3fuy; 0x88uy; 0xdfuy; 0x7auy; 0x34uy; 0x12uy; 0x45uy; 0x7auy; 0xdfuy; 0x51uy; 0x0duy; 0xcfuy; 0x16uy; 0x4euy; 0x6cuy; 0xf0uy; 0x41uy; 0x67uy; 0x9buy; 0x3auy; 0x19uy; 0xfcuy; 0xc5uy; 0x42uy; 0xafuy; 0x6auy; 0x23uy; 0x6auy; 0xb0uy; 0x3duy; 0x66uy; 0xb2uy; 0xe8uy; 0xa1uy; 0x55uy; 0xd1uy; 0x06uy; 0x1auy; 0xb7uy; 0x85uy; 0x9fuy; 0x75uy; 0x73uy; 0x27uy; 0x75uy; 0xffuy; 0xf6uy; 0x82uy; 0xf8uy; 0xf4uy; 0xd5uy; 0xe5uy; 0x0duy; 0x3auy; 0xb3uy; 0x77uy; 0x0fuy; 0x4fuy; 0x66uy; 0xcbuy; 0x13uy; 0x81uy; 0x55uy; 0xb4uy; 0x71uy; 0x5duy; 0x24uy; 0x5buy; 0x80uy; 0x69uy; 0x94uy; 0x8euy; 0xa0uy; 0x16uy; 0xa4uy; 0x5buy; 0x7euy; 0xf0uy; 0xfduy; 0xdeuy; 0x93uy; 0x18uy; 0x8cuy; 0x57uy; 0xeeuy; 0xf4uy; 0x71uy; 0x7fuy; 0x34uy; 0x25uy; 0x18uy; 0x1duy; 0xe5uy; 0xb9uy; 0xa5uy; 0xd4uy; 0xe0uy; 0xa2uy; 0x96uy; 0x3fuy; 0x2auy; 0x67uy; 0xa3uy; 0x40uy; 0xebuy; 0x1auy; 0xe9uy; 0x94uy; 0xb9uy; 0x8auy; 0x48uy; 0xabuy; 0x19uy; 0xb9uy; 0x0auy; 0xb7uy; 0x43uy; 0x91uy; 0xc5uy; 0x04uy; 0x26uy; 0xd2uy; 0x82uy; 0x87uy; 0xacuy; 0x4fuy; 0x1euy; 0xb9uy; 0x3fuy; 0x5auy; 0xf1uy; 0xa6uy; 0x8cuy; 0x7duy; 0xaeuy; 0x40uy; 0x87uy; 0x6buy; 0x8auy; 0xfauy; 0xafuy; 0x35uy; 0xa1uy; 0x92uy; 0x93uy; 0xc1uy; 0x95uy; 0x2euy; 0x95uy; 0x79uy; 0x78uy; 0xabuy; 0xeeuy; 0x40uy; 0xecuy; 0x32uy; 0xf2uy; 0xaauy; 0x88uy; 0x0cuy; 0x95uy; 0x6cuy; 0x7euy; 0xb7uy; 0x2fuy; 0x11uy; 0x7buy; 0x39uy; 0x7cuy; 0xefuy; 0xcfuy; 0xb4uy; 0xe7uy; 0x5auy; 0xceuy; 0x3buy; 0x08uy; 0x17uy; 0x76uy; 0xe4uy; 0x6buy; 0x13uy; 0x52uy; 0x1euy; 0x93uy; 0x55uy; 0x9duy; 0x45uy; 0x3euy; 0x32uy; 0xabuy; 0x74uy; 0xebuy; 0xc0uy; 0x85uy; 0x9buy; 0x9auy; 0x8duy; 0xd4uy; 0xd1uy; 0xd3uy; 0x90uy; 0x00uy; 0xebuy; 0xe9uy; 0x5fuy; 0x98uy; 0x4duy; 0x80uy; 0xa3uy; 0xf5uy; 0x00uy; 0x4duy; 0xc9uy; 0x1auy; 0x05uy; 0x1duy; 0xfbuy; 0xdfuy; 0xe9uy; 0x19uy; 0x4fuy; 0x4fuy; 0x9auy; 0x48uy; 0x3euy; 0x4euy; 0x79uy; 0x55uy; 0x57uy; 0x7fuy; 0xb0uy; 0x93uy; 0x34uy; 0x64uy; 0xc6uy; 0x3euy; 0xaeuy; 0xc7uy; 0x71uy; 0x04uy; 0x4duy; 0x59uy; 0xabuy; 0xc3uy; 0x02uy; 0x9auy; 0x07uy; 0x95uy; 0x19uy; 0xf8uy; 0x46uy; 0x0auy; 0x69uy; 0x3buy; 0x25uy; 0xb4uy; 0xceuy; 0x20uy; 0x7auy; 0xe9uy; 0xd9uy; 0x44uy; 0x7fuy; 0xc4uy; 0xc5uy; 0x44uy; 0x6euy; 0x6duy; 0xaduy; 0x23uy; 0x4euy; 0x9auy; 0xfduy; 0xecuy; 0x0cuy; 0x56uy; 0x27uy; 0x98uy; 0xcduy; 0x02uy; 0x97uy; 0x31uy; 0x83uy; 0x99uy; 0xe8uy; 0x38uy; 0xbeuy; 0x38uy; 0x58uy; 0x45uy; 0xc6uy; 0xdduy; 0x79uy; 0xeduy; 0xe6uy; 0x6euy; 0x2auy; 0xe8uy; 0x0auy; 0xfeuy; 0xc6uy; 0x73uy; 0x8duy; 0x4duy; 0x9buy; 0xf4uy; 0x4cuy; 0x8duy; 0x9euy; 0xdduy; 0xffuy; 0x6cuy; 0x5cuy; 0xd2uy; 0xc9uy; 0x4euy; 0x34uy; 0x0euy; 0x0duy; 0xdauy; 0xc4uy; 0x03uy; 0x84uy; 0xb9uy; 0xa1uy; 0x40uy; 0x8cuy; 0x9auy; 0x4buy; 0x98uy; 0xc3uy; 0x7auy; 0x60uy; 0x81uy; 0xd5uy; 0x22uy; 0x0fuy; 0xbauy; 0x92uy; 0xf1uy; 0xd0uy; 0x31uy; 0x44uy; 0xdbuy ] in let cipher: list FStar.UInt8.t = [ 0xa1uy; 0x35uy; 0xe3uy; 0x25uy; 0x81uy; 0xbbuy; 0x06uy; 0x28uy; 0x9buy; 0x8cuy; 0x83uy; 0xf0uy; 0x40uy; 0xe9uy; 0x42uy; 0x1euy; 0xc7uy; 0x9buy; 0xbeuy; 0x01uy ] in Vec SHA1 plain cipher); (let plain: list FStar.UInt8.t = [ 0xbduy; 0x74uy; 0xe7uy; 0xf6uy; 0x07uy; 0xcduy; 0x7duy; 0x90uy; 0x5euy; 0x90uy; 0x17uy; 0x5duy; 0x67uy; 0x65uy; 0x0auy; 0x6duy; 0xc2uy; 0xf8uy; 0xa4uy; 0xe2uy; 0xd4uy; 0xabuy; 0x12uy; 0x49uy; 0xcauy; 0x88uy; 0x81uy; 0x2buy; 0xdauy; 0x79uy; 0x84uy; 0xdeuy; 0xccuy; 0xbbuy; 0xb6uy; 0xa1uy; 0xbauy; 0x90uy; 0xa0uy; 0xe9uy; 0x14uy; 0x34uy; 0xdduy; 0xf5uy; 0xe6uy; 0x13uy; 0x7buy; 0xa8uy; 0x5euy; 0x39uy; 0xa5uy; 0x98uy; 0x89uy; 0x0auy; 0x7fuy; 0x63uy; 0x5duy; 0x33uy; 0x52uy; 0x42uy; 0xfcuy; 0xe0uy; 0xe9uy; 0xe0uy; 0x37uy; 0x30uy; 0x3buy; 0x6cuy; 0x51uy; 0xe5uy; 0x4auy; 0xecuy; 0x06uy; 0x61uy; 0x4auy; 0xd5uy; 0xccuy; 0xceuy; 0x06uy; 0xd9uy; 0x59uy; 0x9cuy; 0x80uy; 0x01uy; 0x65uy; 0x30uy; 0xd7uy; 0xfbuy; 0xb1uy; 0xdauy; 0x6euy; 0xb5uy; 0x48uy; 0x08uy; 0x4buy; 0x2buy; 0x05uy; 0xbauy; 0xbduy; 0x7duy; 0x55uy; 0x36uy; 0x42uy; 0x44uy; 0x3euy; 0xfduy; 0xa7uy; 0x26uy; 0xa1uy; 0xfduy; 0x71uy; 0xa8uy; 0xbcuy; 0x08uy; 0x7cuy; 0x44uy; 0xf2uy; 0x85uy; 0xe2uy; 0xbcuy; 0xcfuy; 0x66uy; 0x1euy; 0xaduy; 0x47uy; 0x5auy; 0x72uy; 0x67uy; 0x3euy; 0x43uy; 0x86uy; 0xfcuy; 0x4euy; 0xeauy; 0x51uy; 0x97uy; 0xc4uy; 0xf1uy; 0x3cuy; 0x0fuy; 0xebuy; 0x0auy; 0x85uy; 0xbcuy; 0x8euy; 0x67uy; 0xe2uy; 0x8auy; 0xb8uy; 0x72uy; 0x68uy; 0x4buy; 0xbeuy; 0xbduy; 0xaauy; 0x52uy; 0x7fuy; 0x3cuy; 0x25uy; 0x3duy; 0xebuy; 0xb2uy; 0xdcuy; 0x12uy; 0xc2uy; 0x69uy; 0x3fuy; 0x8euy; 0x9euy; 0x26uy; 0x51uy; 0xb9uy; 0x34uy; 0x5cuy; 0x0auy; 0xbeuy; 0xd7uy; 0xa0uy; 0xfauy; 0xfauy; 0x3euy; 0x5duy; 0x30uy; 0x53uy; 0x86uy; 0xc9uy; 0x5auy; 0xcbuy; 0x7auy; 0x17uy; 0x2euy; 0x54uy; 0x13uy; 0xefuy; 0x08uy; 0xe7uy; 0x3buy; 0x1buy; 0xd4uy; 0xd0uy; 0xd6uy; 0x83uy; 0x2euy; 0x4cuy; 0x03uy; 0x5buy; 0xc8uy; 0x55uy; 0x9fuy; 0x9buy; 0x0cuy; 0xbduy; 0x0cuy; 0xafuy; 0x03uy; 0x7auy; 0x30uy; 0x70uy; 0x76uy; 0x41uy; 0xc0uy; 0x54uy; 0x53uy; 0x56uy; 0xbeuy; 0xe1uy; 0x51uy; 0xa2uy; 0x40uy; 0x68uy; 0xd7uy; 0x06uy; 0x74uy; 0xefuy; 0x1buy; 0xefuy; 0xe1uy; 0x6fuy; 0x87uy; 0x2auy; 0xefuy; 0x40uy; 0x60uy; 0xfauy; 0xaauy; 0xd1uy; 0xa9uy; 0x68uy; 0xc3uy; 0x9cuy; 0x45uy; 0xdbuy; 0xd7uy; 0x59uy; 0x5duy; 0xe8uy; 0xf4uy; 0x72uy; 0x01uy; 0x6buy; 0x5auy; 0xb8uy; 0x12uy; 0xd7uy; 0x7euy; 0x54uy; 0x5fuy; 0xcauy; 0x55uy; 0x00uy; 0x0euy; 0xe5uy; 0xceuy; 0x77uy; 0x3euy; 0xdauy; 0xa1uy; 0x29uy; 0xeauy; 0xc6uy; 0x47uy; 0x34uy; 0x10uy; 0xc2uy; 0x49uy; 0x90uy; 0x13uy; 0xb4uy; 0xbeuy; 0x89uy; 0x5fuy; 0x6cuy; 0x0fuy; 0x73uy; 0x4buy; 0xecuy; 0xfeuy; 0x99uy; 0x43uy; 0x06uy; 0xe7uy; 0x76uy; 0x26uy; 0x2duy; 0x45uy; 0x28uy; 0xeduy; 0x85uy; 0x77uy; 0x21uy; 0x8euy; 0x3cuy; 0xc5uy; 0x20uy; 0x1fuy; 0x1duy; 0x9euy; 0x5fuy; 0x3fuy; 0x62uy; 0x23uy; 0x0euy; 0xb2uy; 0xcauy; 0xeauy; 0x01uy; 0x4buy; 0xecuy; 0xfbuy; 0xa6uy; 0x0fuy; 0xcbuy; 0x1fuy; 0x39uy; 0x97uy; 0xaauy; 0x5buy; 0x3buy; 0xb6uy; 0x22uy; 0xb7uy; 0x20uy; 0x5cuy; 0x71uy; 0x43uy; 0x48uy; 0xbauy; 0x15uy; 0x5cuy; 0x30uy; 0xa7uy; 0x9auy; 0x2cuy; 0xeauy; 0x43uy; 0xb0uy; 0x70uy; 0xcauy; 0xdauy; 0x80uy; 0x7euy; 0x63uy; 0x0buy; 0x40uy; 0x86uy; 0xb1uy; 0x29uy; 0x05uy; 0x18uy; 0x98uy; 0xe1uy; 0xd9uy; 0xe6uy; 0x8duy; 0x1duy; 0x0euy; 0xccuy; 0x94uy; 0x29uy; 0xd2uy; 0x0duy; 0x6auy; 0x14uy; 0x03uy; 0xe0uy; 0x03uy; 0x5auy; 0x44uy; 0x2buy; 0x37uy; 0xbfuy; 0x50uy; 0x8euy; 0xb8uy; 0x7euy; 0x8euy; 0xa3uy; 0x47uy; 0xa3uy; 0xe6uy; 0x84uy; 0x27uy; 0xb6uy; 0xd4uy; 0x8euy; 0xd2uy; 0x99uy; 0xbauy; 0x65uy; 0xecuy; 0xb3uy; 0x7buy; 0x38uy; 0x75uy; 0x4fuy; 0x45uy; 0x47uy; 0x42uy; 0x3euy; 0xaeuy; 0xa2uy; 0xaeuy; 0xc4uy; 0x03uy; 0x33uy; 0x8duy; 0xb2uy; 0xdcuy; 0xfeuy; 0x61uy; 0xcfuy; 0xf4uy; 0xa8uy; 0xd1uy; 0x7cuy; 0x38uy; 0x36uy; 0x56uy; 0x98uy; 0x1euy; 0x18uy; 0x38uy; 0xa2uy; 0x38uy; 0x66uy; 0xb9uy; 0x1duy; 0x09uy; 0x69uy; 0x8fuy; 0x39uy; 0x17uy; 0x5duy; 0x98uy; 0xafuy; 0x41uy; 0x75uy; 0xcauy; 0xeduy; 0x53uy ] in let cipher: list FStar.UInt8.t = [ 0xb2uy; 0x2buy; 0x87uy; 0xeauy; 0x30uy; 0xf4uy; 0x05uy; 0x09uy; 0x13uy; 0xf8uy; 0xf0uy; 0x24uy; 0x1fuy; 0xc2uy; 0xaeuy; 0x2cuy; 0x31uy; 0x9fuy; 0x52uy; 0xe7uy ] in Vec SHA1 plain cipher) ]
val test_vectors:list vec let test_vectors:list vec =
false
null
false
[ Vec SHA2_224 test1_plaintext test1_expected224; Vec SHA2_224 test2_plaintext test2_expected224; Vec SHA2_224 test3_plaintext test3_expected224; Vec SHA2_224 test4_plaintext test4_expected224; Vec SHA2_256 test1_plaintext test1_expected256; Vec SHA2_256 test2_plaintext test2_expected256; Vec SHA2_256 test3_plaintext test3_expected256; Vec SHA2_256 test4_plaintext test4_expected256; Vec SHA2_384 test1_plaintext test1_expected384; Vec SHA2_384 test2_plaintext test2_expected384; Vec SHA2_384 test3_plaintext test3_expected384; Vec SHA2_384 test4_plaintext test4_expected384; Vec SHA2_512 test1_plaintext test1_expected512; Vec SHA2_512 test2_plaintext test2_expected512; Vec SHA2_512 test3_plaintext test3_expected512; Vec SHA2_512 test4_plaintext test4_expected512; (let plain:list FStar.UInt8.t = [] in let cipher:list FStar.UInt8.t = [ 0xd4uy; 0x1duy; 0x8cuy; 0xd9uy; 0x8fuy; 0x00uy; 0xb2uy; 0x04uy; 0xe9uy; 0x80uy; 0x09uy; 0x98uy; 0xecuy; 0xf8uy; 0x42uy; 0x7euy ] in Vec MD5 plain cipher); (let plain:list FStar.UInt8.t = [0x61uy] in let cipher:list FStar.UInt8.t = [ 0x0cuy; 0xc1uy; 0x75uy; 0xb9uy; 0xc0uy; 0xf1uy; 0xb6uy; 0xa8uy; 0x31uy; 0xc3uy; 0x99uy; 0xe2uy; 0x69uy; 0x77uy; 0x26uy; 0x61uy ] in Vec MD5 plain cipher); (let plain:list FStar.UInt8.t = [0x61uy; 0x62uy; 0x63uy] in let cipher:list FStar.UInt8.t = [ 0x90uy; 0x01uy; 0x50uy; 0x98uy; 0x3cuy; 0xd2uy; 0x4fuy; 0xb0uy; 0xd6uy; 0x96uy; 0x3fuy; 0x7duy; 0x28uy; 0xe1uy; 0x7fuy; 0x72uy ] in Vec MD5 plain cipher); (let plain:list FStar.UInt8.t = [ 0x6duy; 0x65uy; 0x73uy; 0x73uy; 0x61uy; 0x67uy; 0x65uy; 0x20uy; 0x64uy; 0x69uy; 0x67uy; 0x65uy; 0x73uy; 0x74uy ] in let cipher:list FStar.UInt8.t = [ 0xf9uy; 0x6buy; 0x69uy; 0x7duy; 0x7cuy; 0xb7uy; 0x93uy; 0x8duy; 0x52uy; 0x5auy; 0x2fuy; 0x31uy; 0xaauy; 0xf1uy; 0x61uy; 0xd0uy ] in Vec MD5 plain cipher); (let plain:list FStar.UInt8.t = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy; 0x76uy; 0x77uy; 0x78uy; 0x79uy; 0x7auy ] in let cipher:list FStar.UInt8.t = [ 0xc3uy; 0xfcuy; 0xd3uy; 0xd7uy; 0x61uy; 0x92uy; 0xe4uy; 0x00uy; 0x7duy; 0xfbuy; 0x49uy; 0x6cuy; 0xcauy; 0x67uy; 0xe1uy; 0x3buy ] in Vec MD5 plain cipher); (let plain:list FStar.UInt8.t = [ 0x41uy; 0x42uy; 0x43uy; 0x44uy; 0x45uy; 0x46uy; 0x47uy; 0x48uy; 0x49uy; 0x4auy; 0x4buy; 0x4cuy; 0x4duy; 0x4euy; 0x4fuy; 0x50uy; 0x51uy; 0x52uy; 0x53uy; 0x54uy; 0x55uy; 0x56uy; 0x57uy; 0x58uy; 0x59uy; 0x5auy; 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy; 0x76uy; 0x77uy; 0x78uy; 0x79uy; 0x7auy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy ] in let cipher:list FStar.UInt8.t = [ 0xd1uy; 0x74uy; 0xabuy; 0x98uy; 0xd2uy; 0x77uy; 0xd9uy; 0xf5uy; 0xa5uy; 0x61uy; 0x1cuy; 0x2cuy; 0x9fuy; 0x41uy; 0x9duy; 0x9fuy ] in Vec MD5 plain cipher); (let plain:list FStar.UInt8.t = [ 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy; 0x31uy; 0x32uy; 0x33uy; 0x34uy; 0x35uy; 0x36uy; 0x37uy; 0x38uy; 0x39uy; 0x30uy ] in let cipher:list FStar.UInt8.t = [ 0x57uy; 0xeduy; 0xf4uy; 0xa2uy; 0x2buy; 0xe3uy; 0xc9uy; 0x55uy; 0xacuy; 0x49uy; 0xdauy; 0x2euy; 0x21uy; 0x07uy; 0xb6uy; 0x7auy ] in Vec MD5 plain cipher); (let plain:list FStar.UInt8.t = [] in let cipher:list FStar.UInt8.t = [ 0xdauy; 0x39uy; 0xa3uy; 0xeeuy; 0x5euy; 0x6buy; 0x4buy; 0x0duy; 0x32uy; 0x55uy; 0xbfuy; 0xefuy; 0x95uy; 0x60uy; 0x18uy; 0x90uy; 0xafuy; 0xd8uy; 0x07uy; 0x09uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0x36uy] in let cipher:list FStar.UInt8.t = [ 0xc1uy; 0xdfuy; 0xd9uy; 0x6euy; 0xeauy; 0x8cuy; 0xc2uy; 0xb6uy; 0x27uy; 0x85uy; 0x27uy; 0x5buy; 0xcauy; 0x38uy; 0xacuy; 0x26uy; 0x12uy; 0x56uy; 0xe2uy; 0x78uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0x19uy; 0x5auy] in let cipher:list FStar.UInt8.t = [ 0x0auy; 0x1cuy; 0x2duy; 0x55uy; 0x5buy; 0xbeuy; 0x43uy; 0x1auy; 0xd6uy; 0x28uy; 0x8auy; 0xf5uy; 0xa5uy; 0x4fuy; 0x93uy; 0xe0uy; 0x44uy; 0x9cuy; 0x92uy; 0x32uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0xdfuy; 0x4buy; 0xd2uy] in let cipher:list FStar.UInt8.t = [ 0xbfuy; 0x36uy; 0xeduy; 0x5duy; 0x74uy; 0x72uy; 0x7duy; 0xfduy; 0x5duy; 0x78uy; 0x54uy; 0xecuy; 0x6buy; 0x1duy; 0x49uy; 0x46uy; 0x8duy; 0x8euy; 0xe8uy; 0xaauy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0x54uy; 0x9euy; 0x95uy; 0x9euy] in let cipher:list FStar.UInt8.t = [ 0xb7uy; 0x8buy; 0xaeuy; 0x6duy; 0x14uy; 0x33uy; 0x8fuy; 0xfcuy; 0xcfuy; 0xd5uy; 0xd5uy; 0xb5uy; 0x67uy; 0x4auy; 0x27uy; 0x5fuy; 0x6euy; 0xf9uy; 0xc7uy; 0x17uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0xf7uy; 0xfbuy; 0x1buy; 0xe2uy; 0x05uy] in let cipher:list FStar.UInt8.t = [ 0x60uy; 0xb7uy; 0xd5uy; 0xbbuy; 0x56uy; 0x0auy; 0x1auy; 0xcfuy; 0x6fuy; 0xa4uy; 0x57uy; 0x21uy; 0xbduy; 0x0auy; 0xbbuy; 0x41uy; 0x9auy; 0x84uy; 0x1auy; 0x89uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0xc0uy; 0xe5uy; 0xabuy; 0xeauy; 0xeauy; 0x63uy] in let cipher:list FStar.UInt8.t = [ 0xa6uy; 0xd3uy; 0x38uy; 0x45uy; 0x97uy; 0x80uy; 0xc0uy; 0x83uy; 0x63uy; 0x09uy; 0x0fuy; 0xd8uy; 0xfcuy; 0x7duy; 0x28uy; 0xdcuy; 0x80uy; 0xe8uy; 0xe0uy; 0x1fuy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0x63uy; 0xbfuy; 0xc1uy; 0xeduy; 0x7fuy; 0x78uy; 0xabuy] in let cipher:list FStar.UInt8.t = [ 0x86uy; 0x03uy; 0x28uy; 0xd8uy; 0x05uy; 0x09uy; 0x50uy; 0x0cuy; 0x17uy; 0x83uy; 0x16uy; 0x9euy; 0xbfuy; 0x0buy; 0xa0uy; 0xc4uy; 0xb9uy; 0x4duy; 0xa5uy; 0xe5uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0x7euy; 0x3duy; 0x7buy; 0x3euy; 0xaduy; 0xa9uy; 0x88uy; 0x66uy] in let cipher:list FStar.UInt8.t = [ 0x24uy; 0xa2uy; 0xc3uy; 0x4buy; 0x97uy; 0x63uy; 0x05uy; 0x27uy; 0x7cuy; 0xe5uy; 0x8cuy; 0x2fuy; 0x42uy; 0xd5uy; 0x09uy; 0x20uy; 0x31uy; 0x57uy; 0x25uy; 0x20uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0x9euy; 0x61uy; 0xe5uy; 0x5duy; 0x9euy; 0xd3uy; 0x7buy; 0x1cuy; 0x20uy] in let cipher:list FStar.UInt8.t = [ 0x41uy; 0x1cuy; 0xceuy; 0xe1uy; 0xf6uy; 0xe3uy; 0x67uy; 0x7duy; 0xf1uy; 0x26uy; 0x98uy; 0x41uy; 0x1euy; 0xb0uy; 0x9duy; 0x3fuy; 0xf5uy; 0x80uy; 0xafuy; 0x97uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0x97uy; 0x77uy; 0xcfuy; 0x90uy; 0xdduy; 0x7cuy; 0x7euy; 0x86uy; 0x35uy; 0x06uy] in let cipher:list FStar.UInt8.t = [ 0x05uy; 0xc9uy; 0x15uy; 0xb5uy; 0xeduy; 0x4euy; 0x4cuy; 0x4auy; 0xffuy; 0xfcuy; 0x20uy; 0x29uy; 0x61uy; 0xf3uy; 0x17uy; 0x43uy; 0x71uy; 0xe9uy; 0x0buy; 0x5cuy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [0x4euy; 0xb0uy; 0x8cuy; 0x9euy; 0x68uy; 0x3cuy; 0x94uy; 0xbeuy; 0xa0uy; 0x0duy; 0xfauy] in let cipher:list FStar.UInt8.t = [ 0xafuy; 0x32uy; 0x0buy; 0x42uy; 0xd7uy; 0x78uy; 0x5cuy; 0xa6uy; 0xc8uy; 0xdduy; 0x22uy; 0x04uy; 0x63uy; 0xbeuy; 0x23uy; 0xa2uy; 0xd2uy; 0xcbuy; 0x5auy; 0xfcuy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x09uy; 0x38uy; 0xf2uy; 0xe2uy; 0xebuy; 0xb6uy; 0x4fuy; 0x8auy; 0xf8uy; 0xbbuy; 0xfcuy; 0x91uy ] in let cipher:list FStar.UInt8.t = [ 0x9fuy; 0x4euy; 0x66uy; 0xb6uy; 0xceuy; 0xeauy; 0x40uy; 0xdcuy; 0xf4uy; 0xb9uy; 0x16uy; 0x6cuy; 0x28uy; 0xf1uy; 0xc8uy; 0x84uy; 0x74uy; 0x14uy; 0x1duy; 0xa9uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x74uy; 0xc9uy; 0x99uy; 0x6duy; 0x14uy; 0xe8uy; 0x7duy; 0x3euy; 0x6cuy; 0xbeuy; 0xa7uy; 0x02uy; 0x9duy ] in let cipher:list FStar.UInt8.t = [ 0xe6uy; 0xc4uy; 0x36uy; 0x3cuy; 0x08uy; 0x52uy; 0x95uy; 0x19uy; 0x91uy; 0x05uy; 0x7fuy; 0x40uy; 0xdeuy; 0x27uy; 0xecuy; 0x08uy; 0x90uy; 0x46uy; 0x6fuy; 0x01uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x51uy; 0xdcuy; 0xa5uy; 0xc0uy; 0xf8uy; 0xe5uy; 0xd4uy; 0x95uy; 0x96uy; 0xf3uy; 0x2duy; 0x3euy; 0xb8uy; 0x74uy ] in let cipher:list FStar.UInt8.t = [ 0x04uy; 0x6auy; 0x7buy; 0x39uy; 0x6cuy; 0x01uy; 0x37uy; 0x9auy; 0x68uy; 0x4auy; 0x89uy; 0x45uy; 0x58uy; 0x77uy; 0x9buy; 0x07uy; 0xd8uy; 0xc7uy; 0xdauy; 0x20uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x3auy; 0x36uy; 0xeauy; 0x49uy; 0x68uy; 0x48uy; 0x20uy; 0xa2uy; 0xaduy; 0xc7uy; 0xfcuy; 0x41uy; 0x75uy; 0xbauy; 0x78uy ] in let cipher:list FStar.UInt8.t = [ 0xd5uy; 0x8auy; 0x26uy; 0x2euy; 0xe7uy; 0xb6uy; 0x57uy; 0x7cuy; 0x07uy; 0x22uy; 0x8euy; 0x71uy; 0xaeuy; 0x9buy; 0x3euy; 0x04uy; 0xc8uy; 0xabuy; 0xcduy; 0xa9uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x35uy; 0x52uy; 0x69uy; 0x4cuy; 0xdfuy; 0x66uy; 0x3fuy; 0xd9uy; 0x4buy; 0x22uy; 0x47uy; 0x47uy; 0xacuy; 0x40uy; 0x6auy; 0xafuy ] in let cipher:list FStar.UInt8.t = [ 0xa1uy; 0x50uy; 0xdeuy; 0x92uy; 0x74uy; 0x54uy; 0x20uy; 0x2duy; 0x94uy; 0xe6uy; 0x56uy; 0xdeuy; 0x4cuy; 0x7cuy; 0x0cuy; 0xa6uy; 0x91uy; 0xdeuy; 0x95uy; 0x5duy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xf2uy; 0x16uy; 0xa1uy; 0xcbuy; 0xdeuy; 0x24uy; 0x46uy; 0xb1uy; 0xeduy; 0xf4uy; 0x1euy; 0x93uy; 0x48uy; 0x1duy; 0x33uy; 0xe2uy; 0xeduy ] in let cipher:list FStar.UInt8.t = [ 0x35uy; 0xa4uy; 0xb3uy; 0x9fuy; 0xefuy; 0x56uy; 0x0euy; 0x7euy; 0xa6uy; 0x12uy; 0x46uy; 0x67uy; 0x6euy; 0x1buy; 0x7euy; 0x13uy; 0xd5uy; 0x87uy; 0xbeuy; 0x30uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xa3uy; 0xcfuy; 0x71uy; 0x4buy; 0xf1uy; 0x12uy; 0x64uy; 0x7euy; 0x72uy; 0x7euy; 0x8cuy; 0xfduy; 0x46uy; 0x49uy; 0x9auy; 0xcduy; 0x35uy; 0xa6uy ] in let cipher:list FStar.UInt8.t = [ 0x7cuy; 0xe6uy; 0x9buy; 0x1auy; 0xcduy; 0xceuy; 0x52uy; 0xeauy; 0x7duy; 0xbduy; 0x38uy; 0x25uy; 0x31uy; 0xfauy; 0x1auy; 0x83uy; 0xdfuy; 0x13uy; 0xcauy; 0xe7uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x14uy; 0x8duy; 0xe6uy; 0x40uy; 0xf3uy; 0xc1uy; 0x15uy; 0x91uy; 0xa6uy; 0xf8uy; 0xc5uy; 0xc4uy; 0x86uy; 0x32uy; 0xc5uy; 0xfbuy; 0x79uy; 0xd3uy; 0xb7uy ] in let cipher:list FStar.UInt8.t = [ 0xb4uy; 0x7buy; 0xe2uy; 0xc6uy; 0x41uy; 0x24uy; 0xfauy; 0x9auy; 0x12uy; 0x4auy; 0x88uy; 0x7auy; 0xf9uy; 0x55uy; 0x1auy; 0x74uy; 0x35uy; 0x4cuy; 0xa4uy; 0x11uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x63uy; 0xa3uy; 0xccuy; 0x83uy; 0xfduy; 0x1euy; 0xc1uy; 0xb6uy; 0x68uy; 0x0euy; 0x99uy; 0x74uy; 0xa0uy; 0x51uy; 0x4euy; 0x1auy; 0x9euy; 0xceuy; 0xbbuy; 0x6auy ] in let cipher:list FStar.UInt8.t = [ 0x8buy; 0xb8uy; 0xc0uy; 0xd8uy; 0x15uy; 0xa9uy; 0xc6uy; 0x8auy; 0x1duy; 0x29uy; 0x10uy; 0xf3uy; 0x9duy; 0x94uy; 0x26uy; 0x03uy; 0xd8uy; 0x07uy; 0xfbuy; 0xccuy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x87uy; 0x5auy; 0x90uy; 0x90uy; 0x9auy; 0x8auy; 0xfcuy; 0x92uy; 0xfbuy; 0x70uy; 0x70uy; 0x04uy; 0x7euy; 0x9duy; 0x08uy; 0x1euy; 0xc9uy; 0x2fuy; 0x3duy; 0x08uy; 0xb8uy ] in let cipher:list FStar.UInt8.t = [ 0xb4uy; 0x86uy; 0xf8uy; 0x7fuy; 0xb8uy; 0x33uy; 0xebuy; 0xf0uy; 0x32uy; 0x83uy; 0x93uy; 0x12uy; 0x86uy; 0x46uy; 0xa6uy; 0xf6uy; 0xe6uy; 0x60uy; 0xfcuy; 0xb1uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x44uy; 0x4buy; 0x25uy; 0xf9uy; 0xc9uy; 0x25uy; 0x9duy; 0xc2uy; 0x17uy; 0x77uy; 0x2cuy; 0xc4uy; 0x47uy; 0x8cuy; 0x44uy; 0xb6uy; 0xfeuy; 0xffuy; 0x62uy; 0x35uy; 0x36uy; 0x73uy ] in let cipher:list FStar.UInt8.t = [ 0x76uy; 0x15uy; 0x93uy; 0x68uy; 0xf9uy; 0x9duy; 0xecuy; 0xe3uy; 0x0auy; 0xaduy; 0xcfuy; 0xb9uy; 0xb7uy; 0xb4uy; 0x1duy; 0xabuy; 0x33uy; 0x68uy; 0x88uy; 0x58uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x48uy; 0x73uy; 0x51uy; 0xc8uy; 0xa5uy; 0xf4uy; 0x40uy; 0xe4uy; 0xd0uy; 0x33uy; 0x86uy; 0x48uy; 0x3duy; 0x5fuy; 0xe7uy; 0xbbuy; 0x66uy; 0x9duy; 0x41uy; 0xaduy; 0xcbuy; 0xfduy; 0xb7uy ] in let cipher:list FStar.UInt8.t = [ 0xdbuy; 0xc1uy; 0xcbuy; 0x57uy; 0x5cuy; 0xe6uy; 0xaeuy; 0xb9uy; 0xdcuy; 0x4euy; 0xbfuy; 0x0fuy; 0x84uy; 0x3buy; 0xa8uy; 0xaeuy; 0xb1uy; 0x45uy; 0x1euy; 0x89uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x46uy; 0xb0uy; 0x61uy; 0xefuy; 0x13uy; 0x2buy; 0x87uy; 0xf6uy; 0xd3uy; 0xb0uy; 0xeeuy; 0x24uy; 0x62uy; 0xf6uy; 0x7duy; 0x91uy; 0x09uy; 0x77uy; 0xdauy; 0x20uy; 0xaeuy; 0xd1uy; 0x37uy; 0x05uy ] in let cipher:list FStar.UInt8.t = [ 0xd7uy; 0xa9uy; 0x82uy; 0x89uy; 0x67uy; 0x90uy; 0x05uy; 0xebuy; 0x93uy; 0x0auy; 0xb7uy; 0x5euy; 0xfduy; 0x8fuy; 0x65uy; 0x0fuy; 0x99uy; 0x1euy; 0xe9uy; 0x52uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x38uy; 0x42uy; 0xb6uy; 0x13uy; 0x7buy; 0xb9uy; 0xd2uy; 0x7fuy; 0x3cuy; 0xa5uy; 0xbauy; 0xfeuy; 0x5buy; 0xbbuy; 0x62uy; 0x85uy; 0x83uy; 0x44uy; 0xfeuy; 0x4buy; 0xa5uy; 0xc4uy; 0x15uy; 0x89uy; 0xa5uy ] in let cipher:list FStar.UInt8.t = [ 0xfduy; 0xa2uy; 0x6fuy; 0xa9uy; 0xb4uy; 0x87uy; 0x4auy; 0xb7uy; 0x01uy; 0xeduy; 0x0buy; 0xb6uy; 0x4duy; 0x13uy; 0x4fuy; 0x89uy; 0xb9uy; 0xc4uy; 0xccuy; 0x50uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x44uy; 0xd9uy; 0x1duy; 0x3duy; 0x46uy; 0x5auy; 0x41uy; 0x11uy; 0x46uy; 0x2buy; 0xa0uy; 0xc7uy; 0xecuy; 0x22uy; 0x3duy; 0xa6uy; 0x73uy; 0x5fuy; 0x4fuy; 0x52uy; 0x00uy; 0x45uy; 0x3cuy; 0xf1uy; 0x32uy; 0xc3uy ] in let cipher:list FStar.UInt8.t = [ 0xc2uy; 0xffuy; 0x7cuy; 0xcduy; 0xe1uy; 0x43uy; 0xc8uy; 0xf0uy; 0x60uy; 0x1fuy; 0x69uy; 0x74uy; 0xb1uy; 0x90uy; 0x3euy; 0xb8uy; 0xd5uy; 0x74uy; 0x1buy; 0x6euy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xccuy; 0xe7uy; 0x3fuy; 0x2euy; 0xabuy; 0xcbuy; 0x52uy; 0xf7uy; 0x85uy; 0xd5uy; 0xa6uy; 0xdfuy; 0x63uy; 0xc0uy; 0xa1uy; 0x05uy; 0xf3uy; 0x4auy; 0x91uy; 0xcauy; 0x23uy; 0x7fuy; 0xe5uy; 0x34uy; 0xeeuy; 0x39uy; 0x9duy ] in let cipher:list FStar.UInt8.t = [ 0x64uy; 0x3cuy; 0x9duy; 0xc2uy; 0x0auy; 0x92uy; 0x96uy; 0x08uy; 0xf6uy; 0xcauy; 0xa9uy; 0x70uy; 0x9duy; 0x84uy; 0x3cuy; 0xa6uy; 0xfauy; 0x7auy; 0x76uy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x66uy; 0x4euy; 0x6euy; 0x79uy; 0x46uy; 0x83uy; 0x92uy; 0x03uy; 0x03uy; 0x7auy; 0x65uy; 0xa1uy; 0x21uy; 0x74uy; 0xb2uy; 0x44uy; 0xdeuy; 0x8cuy; 0xbcuy; 0x6euy; 0xc3uy; 0xf5uy; 0x78uy; 0x96uy; 0x7auy; 0x84uy; 0xf9uy; 0xceuy ] in let cipher:list FStar.UInt8.t = [ 0x50uy; 0x9euy; 0xf7uy; 0x87uy; 0x34uy; 0x3duy; 0x5buy; 0x5auy; 0x26uy; 0x92uy; 0x29uy; 0xb9uy; 0x61uy; 0xb9uy; 0x62uy; 0x41uy; 0x86uy; 0x4auy; 0x3duy; 0x74uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x95uy; 0x97uy; 0xf7uy; 0x14uy; 0xb2uy; 0xe4uy; 0x5euy; 0x33uy; 0x99uy; 0xa7uy; 0xf0uy; 0x2auy; 0xecuy; 0x44uy; 0x92uy; 0x1buy; 0xd7uy; 0x8buy; 0xe0uy; 0xfeuy; 0xfeuy; 0xe0uy; 0xc5uy; 0xe9uy; 0xb4uy; 0x99uy; 0x48uy; 0x8fuy; 0x6euy ] in let cipher:list FStar.UInt8.t = [ 0xb6uy; 0x1cuy; 0xe5uy; 0x38uy; 0xf1uy; 0xa1uy; 0xe6uy; 0xc9uy; 0x04uy; 0x32uy; 0xb2uy; 0x33uy; 0xd7uy; 0xafuy; 0x5buy; 0x65uy; 0x24uy; 0xebuy; 0xfbuy; 0xe3uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x75uy; 0xc5uy; 0xaduy; 0x1fuy; 0x3cuy; 0xbduy; 0x22uy; 0xe8uy; 0xa9uy; 0x5fuy; 0xc3uy; 0xb0uy; 0x89uy; 0x52uy; 0x67uy; 0x88uy; 0xfbuy; 0x4euy; 0xbcuy; 0xeeuy; 0xd3uy; 0xe7uy; 0xd4uy; 0x44uy; 0x3duy; 0xa6uy; 0xe0uy; 0x81uy; 0xa3uy; 0x5euy ] in let cipher:list FStar.UInt8.t = [ 0x5buy; 0x7buy; 0x94uy; 0x07uy; 0x6buy; 0x2fuy; 0xc2uy; 0x0duy; 0x6auy; 0xdbuy; 0x82uy; 0x47uy; 0x9euy; 0x6buy; 0x28uy; 0xd0uy; 0x7cuy; 0x90uy; 0x2buy; 0x75uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xdduy; 0x24uy; 0x5buy; 0xffuy; 0xe6uy; 0xa6uy; 0x38uy; 0x80uy; 0x66uy; 0x67uy; 0x76uy; 0x83uy; 0x60uy; 0xa9uy; 0x5duy; 0x05uy; 0x74uy; 0xe1uy; 0xa0uy; 0xbduy; 0x0duy; 0x18uy; 0x32uy; 0x9fuy; 0xdbuy; 0x91uy; 0x5cuy; 0xa4uy; 0x84uy; 0xacuy; 0x0duy ] in let cipher:list FStar.UInt8.t = [ 0x60uy; 0x66uy; 0xdbuy; 0x99uy; 0xfcuy; 0x35uy; 0x89uy; 0x52uy; 0xcfuy; 0x7fuy; 0xb0uy; 0xecuy; 0x4duy; 0x89uy; 0xcbuy; 0x01uy; 0x58uy; 0xeduy; 0x91uy; 0xd7uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x03uy; 0x21uy; 0x79uy; 0x4buy; 0x73uy; 0x94uy; 0x18uy; 0xc2uy; 0x4euy; 0x7cuy; 0x2euy; 0x56uy; 0x52uy; 0x74uy; 0x79uy; 0x1cuy; 0x4buy; 0xe7uy; 0x49uy; 0x75uy; 0x2auy; 0xd2uy; 0x34uy; 0xeduy; 0x56uy; 0xcbuy; 0x0auy; 0x63uy; 0x47uy; 0x43uy; 0x0cuy; 0x6buy ] in let cipher:list FStar.UInt8.t = [ 0xb8uy; 0x99uy; 0x62uy; 0xc9uy; 0x4duy; 0x60uy; 0xf6uy; 0xa3uy; 0x32uy; 0xfduy; 0x60uy; 0xf6uy; 0xf0uy; 0x7duy; 0x4fuy; 0x03uy; 0x2auy; 0x58uy; 0x6buy; 0x76uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x4cuy; 0x3duy; 0xcfuy; 0x95uy; 0xc2uy; 0xf0uy; 0xb5uy; 0x25uy; 0x8cuy; 0x65uy; 0x1fuy; 0xcduy; 0x1duy; 0x51uy; 0xbduy; 0x10uy; 0x42uy; 0x5duy; 0x62uy; 0x03uy; 0x06uy; 0x7duy; 0x07uy; 0x48uy; 0xd3uy; 0x7duy; 0x13uy; 0x40uy; 0xd9uy; 0xdduy; 0xdauy; 0x7duy; 0xb3uy ] in let cipher:list FStar.UInt8.t = [ 0x17uy; 0xbduy; 0xa8uy; 0x99uy; 0xc1uy; 0x3duy; 0x35uy; 0x41uy; 0x3duy; 0x25uy; 0x46uy; 0x21uy; 0x2buy; 0xcduy; 0x8auy; 0x93uy; 0xceuy; 0xb0uy; 0x65uy; 0x7buy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xb8uy; 0xd1uy; 0x25uy; 0x82uy; 0xd2uy; 0x5buy; 0x45uy; 0x29uy; 0x0auy; 0x6euy; 0x1buy; 0xb9uy; 0x5duy; 0xa4uy; 0x29uy; 0xbeuy; 0xfcuy; 0xfduy; 0xbfuy; 0x5buy; 0x4duy; 0xd4uy; 0x1cuy; 0xdfuy; 0x33uy; 0x11uy; 0xd6uy; 0x98uy; 0x8fuy; 0xa1uy; 0x7cuy; 0xecuy; 0x07uy; 0x23uy ] in let cipher:list FStar.UInt8.t = [ 0xbauy; 0xdcuy; 0xdduy; 0x53uy; 0xfduy; 0xc1uy; 0x44uy; 0xb8uy; 0xbfuy; 0x2cuy; 0xc1uy; 0xe6uy; 0x4duy; 0x10uy; 0xf6uy; 0x76uy; 0xeeuy; 0xbeuy; 0x66uy; 0xeduy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x6fuy; 0xdauy; 0x97uy; 0x52uy; 0x7auy; 0x66uy; 0x25uy; 0x52uy; 0xbeuy; 0x15uy; 0xefuy; 0xaeuy; 0xbauy; 0x32uy; 0xa3uy; 0xaeuy; 0xa4uy; 0xeduy; 0x44uy; 0x9auy; 0xbbuy; 0x5cuy; 0x1euy; 0xd8uy; 0xd9uy; 0xbfuy; 0xffuy; 0x54uy; 0x47uy; 0x08uy; 0xa4uy; 0x25uy; 0xd6uy; 0x9buy; 0x72uy ] in let cipher:list FStar.UInt8.t = [ 0x01uy; 0xb4uy; 0x64uy; 0x61uy; 0x80uy; 0xf1uy; 0xf6uy; 0xd2uy; 0xe0uy; 0x6buy; 0xbeuy; 0x22uy; 0xc2uy; 0x0euy; 0x50uy; 0x03uy; 0x03uy; 0x22uy; 0x67uy; 0x3auy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x09uy; 0xfauy; 0x27uy; 0x92uy; 0xacuy; 0xbbuy; 0x24uy; 0x17uy; 0xe8uy; 0xeduy; 0x26uy; 0x90uy; 0x41uy; 0xccuy; 0x03uy; 0xc7uy; 0x70uy; 0x06uy; 0x46uy; 0x6euy; 0x6euy; 0x7auy; 0xe0uy; 0x02uy; 0xcfuy; 0x3fuy; 0x1auy; 0xf5uy; 0x51uy; 0xe8uy; 0xceuy; 0x0buy; 0xb5uy; 0x06uy; 0xd7uy; 0x05uy ] in let cipher:list FStar.UInt8.t = [ 0x10uy; 0x01uy; 0x6duy; 0xc3uy; 0xa2uy; 0x71uy; 0x9fuy; 0x90uy; 0x34uy; 0xffuy; 0xccuy; 0x68uy; 0x94uy; 0x26uy; 0xd2uy; 0x82uy; 0x92uy; 0xc4uy; 0x2fuy; 0xc9uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x5euy; 0xfauy; 0x29uy; 0x87uy; 0xdauy; 0x0buy; 0xafuy; 0x0auy; 0x54uy; 0xd8uy; 0xd7uy; 0x28uy; 0x79uy; 0x2buy; 0xcfuy; 0xa7uy; 0x07uy; 0xa1uy; 0x57uy; 0x98uy; 0xdcuy; 0x66uy; 0x74uy; 0x37uy; 0x54uy; 0x40uy; 0x69uy; 0x14uy; 0xd1uy; 0xcfuy; 0xe3uy; 0x70uy; 0x9buy; 0x13uy; 0x74uy; 0xeauy; 0xebuy ] in let cipher:list FStar.UInt8.t = [ 0x9fuy; 0x42uy; 0xfauy; 0x2buy; 0xceuy; 0x6euy; 0xf0uy; 0x21uy; 0xd9uy; 0x3cuy; 0x6buy; 0x2duy; 0x90uy; 0x22uy; 0x73uy; 0x79uy; 0x7euy; 0x42uy; 0x65uy; 0x35uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x28uy; 0x36uy; 0xdeuy; 0x99uy; 0xc0uy; 0xf6uy; 0x41uy; 0xcduy; 0x55uy; 0xe8uy; 0x9fuy; 0x5auy; 0xf7uy; 0x66uy; 0x38uy; 0x94uy; 0x7buy; 0x82uy; 0x27uy; 0x37uy; 0x7euy; 0xf8uy; 0x8buy; 0xfbuy; 0xa6uy; 0x62uy; 0xe5uy; 0x68uy; 0x2buy; 0xabuy; 0xc1uy; 0xecuy; 0x96uy; 0xc6uy; 0x99uy; 0x2buy; 0xc9uy; 0xa0uy ] in let cipher:list FStar.UInt8.t = [ 0xcduy; 0xf4uy; 0x8buy; 0xacuy; 0xbfuy; 0xf6uy; 0xf6uy; 0x15uy; 0x25uy; 0x15uy; 0x32uy; 0x3fuy; 0x9buy; 0x43uy; 0xa2uy; 0x86uy; 0xe0uy; 0xcbuy; 0x81uy; 0x13uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x42uy; 0x14uy; 0x3auy; 0x2buy; 0x9euy; 0x1duy; 0x0buy; 0x35uy; 0x4duy; 0xf3uy; 0x26uy; 0x4duy; 0x08uy; 0xf7uy; 0xb6uy; 0x02uy; 0xf5uy; 0x4auy; 0xaduy; 0x92uy; 0x2auy; 0x3duy; 0x63uy; 0x00uy; 0x6duy; 0x09uy; 0x7fuy; 0x68uy; 0x3duy; 0xc1uy; 0x1buy; 0x90uy; 0x17uy; 0x84uy; 0x23uy; 0xbfuy; 0xf2uy; 0xf7uy; 0xfeuy ] in let cipher:list FStar.UInt8.t = [ 0xb8uy; 0x8fuy; 0xb7uy; 0x52uy; 0x74uy; 0xb9uy; 0xb0uy; 0xfduy; 0x57uy; 0xc0uy; 0x04uy; 0x59uy; 0x88uy; 0xcfuy; 0xceuy; 0xf6uy; 0xc3uy; 0xceuy; 0x65uy; 0x54uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xebuy; 0x60uy; 0xc2uy; 0x8auy; 0xd8uy; 0xaeuy; 0xdauy; 0x80uy; 0x7duy; 0x69uy; 0xebuy; 0xc8uy; 0x75uy; 0x52uy; 0x02uy; 0x4auy; 0xd8uy; 0xacuy; 0xa6uy; 0x82uy; 0x04uy; 0xf1uy; 0xbcuy; 0xd2uy; 0x9duy; 0xc5uy; 0xa8uy; 0x1duy; 0xd2uy; 0x28uy; 0xb5uy; 0x91uy; 0xe2uy; 0xefuy; 0xb7uy; 0xc4uy; 0xdfuy; 0x75uy; 0xefuy; 0x03uy ] in let cipher:list FStar.UInt8.t = [ 0xc0uy; 0x6duy; 0x3auy; 0x6auy; 0x12uy; 0xd9uy; 0xe8uy; 0xdbuy; 0x62uy; 0xe8uy; 0xcfuy; 0xf4uy; 0x0cuy; 0xa2uy; 0x38uy; 0x20uy; 0xd6uy; 0x1duy; 0x8auy; 0xa7uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x7duy; 0xe4uy; 0xbauy; 0x85uy; 0xecuy; 0x54uy; 0x74uy; 0x7cuy; 0xdcuy; 0x42uy; 0xb1uy; 0xf2uy; 0x35uy; 0x46uy; 0xb7uy; 0xe4uy; 0x90uy; 0xe3uy; 0x12uy; 0x80uy; 0xf0uy; 0x66uy; 0xe5uy; 0x2fuy; 0xacuy; 0x11uy; 0x7fuy; 0xd3uy; 0xb0uy; 0x79uy; 0x2euy; 0x4duy; 0xe6uy; 0x2duy; 0x58uy; 0x43uy; 0xeeuy; 0x98uy; 0xc7uy; 0x20uy; 0x15uy ] in let cipher:list FStar.UInt8.t = [ 0x6euy; 0x40uy; 0xf9uy; 0xe8uy; 0x3auy; 0x4buy; 0xe9uy; 0x38uy; 0x74uy; 0xbcuy; 0x97uy; 0xcduy; 0xebuy; 0xb8uy; 0xdauy; 0x68uy; 0x89uy; 0xaeuy; 0x2cuy; 0x7auy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xe7uy; 0x06uy; 0x53uy; 0x63uy; 0x7buy; 0xc5uy; 0xe3uy; 0x88uy; 0xccuy; 0xd8uy; 0xdcuy; 0x44uy; 0xe5uy; 0xeauy; 0xceuy; 0x36uy; 0xf7uy; 0x39uy; 0x8fuy; 0x2buy; 0xacuy; 0x99uy; 0x30uy; 0x42uy; 0xb9uy; 0xbcuy; 0x2fuy; 0x4fuy; 0xb3uy; 0xb0uy; 0xeeuy; 0x7euy; 0x23uy; 0xa9uy; 0x64uy; 0x39uy; 0xdcuy; 0x01uy; 0x13uy; 0x4buy; 0x8cuy; 0x7duy ] in let cipher:list FStar.UInt8.t = [ 0x3euy; 0xfcuy; 0x94uy; 0x0cuy; 0x31uy; 0x2euy; 0xf0uy; 0xdfuy; 0xd4uy; 0xe1uy; 0x14uy; 0x38uy; 0x12uy; 0x24uy; 0x8duy; 0xb8uy; 0x95uy; 0x42uy; 0xf6uy; 0xa5uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xdduy; 0x37uy; 0xbcuy; 0x9fuy; 0x0buy; 0x3auy; 0x47uy; 0x88uy; 0xf9uy; 0xb5uy; 0x49uy; 0x66uy; 0xf2uy; 0x52uy; 0x17uy; 0x4cuy; 0x8cuy; 0xe4uy; 0x87uy; 0xcbuy; 0xe5uy; 0x9cuy; 0x53uy; 0xc2uy; 0x2buy; 0x81uy; 0xbfuy; 0x77uy; 0x62uy; 0x1auy; 0x7cuy; 0xe7uy; 0x61uy; 0x6duy; 0xcbuy; 0x5buy; 0x1euy; 0x2euy; 0xe6uy; 0x3cuy; 0x2cuy; 0x30uy; 0x9buy ] in let cipher:list FStar.UInt8.t = [ 0xa0uy; 0xcfuy; 0x03uy; 0xf7uy; 0xbauy; 0xdduy; 0x0cuy; 0x3cuy; 0x3cuy; 0x4euy; 0xa3uy; 0x71uy; 0x7fuy; 0x5auy; 0x4fuy; 0xb7uy; 0xe6uy; 0x7buy; 0x2euy; 0x56uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x5fuy; 0x48uy; 0x5cuy; 0x63uy; 0x7auy; 0xe3uy; 0x0buy; 0x1euy; 0x30uy; 0x49uy; 0x7fuy; 0x0fuy; 0xb7uy; 0xecuy; 0x36uy; 0x4euy; 0x13uy; 0xc9uy; 0x06uy; 0xe2uy; 0x81uy; 0x3duy; 0xaauy; 0x34uy; 0x16uy; 0x1buy; 0x7auy; 0xc4uy; 0xa4uy; 0xfduy; 0x7auy; 0x1buy; 0xdduy; 0xd7uy; 0x96uy; 0x01uy; 0xbbuy; 0xd2uy; 0x2cuy; 0xefuy; 0x1fuy; 0x57uy; 0xcbuy; 0xc7uy ] in let cipher:list FStar.UInt8.t = [ 0xa5uy; 0x44uy; 0xe0uy; 0x6fuy; 0x1auy; 0x07uy; 0xceuy; 0xb1uy; 0x75uy; 0xa5uy; 0x1duy; 0x6duy; 0x9cuy; 0x01uy; 0x11uy; 0xb3uy; 0xe1uy; 0x5euy; 0x98uy; 0x59uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xf6uy; 0xc2uy; 0x37uy; 0xfbuy; 0x3cuy; 0xfeuy; 0x95uy; 0xecuy; 0x84uy; 0x14uy; 0xccuy; 0x16uy; 0xd2uy; 0x03uy; 0xb4uy; 0x87uy; 0x4euy; 0x64uy; 0x4cuy; 0xc9uy; 0xa5uy; 0x43uy; 0x46uy; 0x5cuy; 0xaduy; 0x2duy; 0xc5uy; 0x63uy; 0x48uy; 0x8auy; 0x65uy; 0x9euy; 0x8auy; 0x2euy; 0x7cuy; 0x98uy; 0x1euy; 0x2auy; 0x9fuy; 0x22uy; 0xe5uy; 0xe8uy; 0x68uy; 0xffuy; 0xe1uy ] in let cipher:list FStar.UInt8.t = [ 0x19uy; 0x9duy; 0x98uy; 0x6euy; 0xd9uy; 0x91uy; 0xb9uy; 0x9auy; 0x07uy; 0x1fuy; 0x45uy; 0x0cuy; 0x6buy; 0x11uy; 0x21uy; 0xa7uy; 0x27uy; 0xe8uy; 0xc7uy; 0x35uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xdauy; 0x7auy; 0xb3uy; 0x29uy; 0x15uy; 0x53uy; 0xc6uy; 0x59uy; 0x87uy; 0x3cuy; 0x95uy; 0x91uy; 0x37uy; 0x68uy; 0x95uy; 0x3cuy; 0x6euy; 0x52uy; 0x6duy; 0x3auy; 0x26uy; 0x59uy; 0x08uy; 0x98uy; 0xc0uy; 0xaduy; 0xe8uy; 0x9fuy; 0xf5uy; 0x6fuy; 0xbduy; 0x11uy; 0x0fuy; 0x14uy; 0x36uy; 0xafuy; 0x59uy; 0x0buy; 0x17uy; 0xfeuy; 0xd4uy; 0x9fuy; 0x8cuy; 0x4buy; 0x2buy; 0x1euy ] in let cipher:list FStar.UInt8.t = [ 0x33uy; 0xbauy; 0xc6uy; 0x10uy; 0x4buy; 0x0auy; 0xd6uy; 0x12uy; 0x8duy; 0x09uy; 0x1buy; 0x5duy; 0x5euy; 0x29uy; 0x99uy; 0x09uy; 0x9cuy; 0x9fuy; 0x05uy; 0xdeuy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x8cuy; 0xfauy; 0x5fuy; 0xd5uy; 0x6euy; 0xe2uy; 0x39uy; 0xcauy; 0x47uy; 0x73uy; 0x75uy; 0x91uy; 0xcbuy; 0xa1uy; 0x03uy; 0xe4uy; 0x1auy; 0x18uy; 0xacuy; 0xf8uy; 0xe8uy; 0xd2uy; 0x57uy; 0xb0uy; 0xdbuy; 0xe8uy; 0x85uy; 0x11uy; 0x34uy; 0xa8uy; 0x1fuy; 0xf6uy; 0xb2uy; 0xe9uy; 0x71uy; 0x04uy; 0xb3uy; 0x9buy; 0x76uy; 0xe1uy; 0x9duy; 0xa2uy; 0x56uy; 0xa1uy; 0x7cuy; 0xe5uy; 0x2duy ] in let cipher:list FStar.UInt8.t = [ 0x76uy; 0xd7uy; 0xdbuy; 0x6euy; 0x18uy; 0xc1uy; 0xf4uy; 0xaeuy; 0x22uy; 0x5cuy; 0xe8uy; 0xccuy; 0xc9uy; 0x3cuy; 0x8fuy; 0x9auy; 0x0duy; 0xfeuy; 0xb9uy; 0x69uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x57uy; 0xe8uy; 0x96uy; 0x59uy; 0xd8uy; 0x78uy; 0xf3uy; 0x60uy; 0xafuy; 0x6duy; 0xe4uy; 0x5auy; 0x9auy; 0x5euy; 0x37uy; 0x2euy; 0xf4uy; 0x0cuy; 0x38uy; 0x49uy; 0x88uy; 0xe8uy; 0x26uy; 0x40uy; 0xa3uy; 0xd5uy; 0xe4uy; 0xb7uy; 0x6duy; 0x2euy; 0xf1uy; 0x81uy; 0x78uy; 0x0buy; 0x9auy; 0x09uy; 0x9auy; 0xc0uy; 0x6euy; 0xf0uy; 0xf8uy; 0xa7uy; 0xf3uy; 0xf7uy; 0x64uy; 0x20uy; 0x97uy; 0x20uy ] in let cipher:list FStar.UInt8.t = [ 0xf6uy; 0x52uy; 0xf3uy; 0xb1uy; 0x54uy; 0x9fuy; 0x16uy; 0x71uy; 0x0cuy; 0x74uy; 0x02uy; 0x89uy; 0x59uy; 0x11uy; 0xe2uy; 0xb8uy; 0x6auy; 0x9buy; 0x2auy; 0xeeuy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xb9uy; 0x1euy; 0x64uy; 0x23uy; 0x5duy; 0xbduy; 0x23uy; 0x4euy; 0xeauy; 0x2auy; 0xe1uy; 0x4auy; 0x92uy; 0xa1uy; 0x73uy; 0xebuy; 0xe8uy; 0x35uy; 0x34uy; 0x72uy; 0x39uy; 0xcfuy; 0xf8uy; 0xb0uy; 0x20uy; 0x74uy; 0x41uy; 0x6fuy; 0x55uy; 0xc6uy; 0xb6uy; 0x0duy; 0xc6uy; 0xceuy; 0xd0uy; 0x6auy; 0xe9uy; 0xf8uy; 0xd7uy; 0x05uy; 0x50uy; 0x5fuy; 0x0duy; 0x61uy; 0x7euy; 0x4buy; 0x29uy; 0xaeuy; 0xf9uy ] in let cipher:list FStar.UInt8.t = [ 0x63uy; 0xfauy; 0xebuy; 0xb8uy; 0x07uy; 0xf3uy; 0x2buy; 0xe7uy; 0x08uy; 0xcfuy; 0x00uy; 0xfcuy; 0x35uy; 0x51uy; 0x99uy; 0x91uy; 0xdcuy; 0x4euy; 0x7fuy; 0x68uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xe4uy; 0x2auy; 0x67uy; 0x36uy; 0x2auy; 0x58uy; 0x1euy; 0x8cuy; 0xf3uy; 0xd8uy; 0x47uy; 0x50uy; 0x22uy; 0x15uy; 0x75uy; 0x5duy; 0x7auy; 0xd4uy; 0x25uy; 0xcauy; 0x03uy; 0x0cuy; 0x43uy; 0x60uy; 0xb0uy; 0xf7uy; 0xefuy; 0x51uy; 0x3euy; 0x69uy; 0x80uy; 0x26uy; 0x5fuy; 0x61uy; 0xc9uy; 0xfauy; 0x18uy; 0xdduy; 0x9cuy; 0xe6uy; 0x68uy; 0xf3uy; 0x8duy; 0xbcuy; 0x2auy; 0x1euy; 0xf8uy; 0xf8uy; 0x3cuy; 0xd6uy ] in let cipher:list FStar.UInt8.t = [ 0x0euy; 0x67uy; 0x30uy; 0xbcuy; 0x4auy; 0x0euy; 0x93uy; 0x22uy; 0xeauy; 0x20uy; 0x5fuy; 0x4euy; 0xdfuy; 0xffuy; 0x1fuy; 0xffuy; 0xdauy; 0x26uy; 0xafuy; 0x0auy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x63uy; 0x4duy; 0xb9uy; 0x2cuy; 0x22uy; 0x01uy; 0x0euy; 0x1cuy; 0xbfuy; 0x1euy; 0x16uy; 0x23uy; 0x92uy; 0x31uy; 0x80uy; 0x40uy; 0x6cuy; 0x51uy; 0x52uy; 0x72uy; 0x20uy; 0x9auy; 0x8auy; 0xccuy; 0x42uy; 0xdeuy; 0x05uy; 0xccuy; 0x2euy; 0x96uy; 0xa1uy; 0xe9uy; 0x4cuy; 0x1fuy; 0x9fuy; 0x6buy; 0x93uy; 0x23uy; 0x4buy; 0x7fuy; 0x4cuy; 0x55uy; 0xdeuy; 0x8buy; 0x19uy; 0x61uy; 0xa3uy; 0xbfuy; 0x35uy; 0x22uy; 0x59uy ] in let cipher:list FStar.UInt8.t = [ 0xb6uy; 0x1auy; 0x3auy; 0x6fuy; 0x42uy; 0xe8uy; 0xe6uy; 0x60uy; 0x4buy; 0x93uy; 0x19uy; 0x6cuy; 0x43uy; 0xc9uy; 0xe8uy; 0x4duy; 0x53uy; 0x59uy; 0xe6uy; 0xfeuy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xccuy; 0x6cuy; 0xa3uy; 0xa8uy; 0xcbuy; 0x39uy; 0x1cuy; 0xd8uy; 0xa5uy; 0xafuy; 0xf1uy; 0xfauy; 0xa7uy; 0xb3uy; 0xffuy; 0xbduy; 0xd2uy; 0x1auy; 0x5auy; 0x3cuy; 0xe6uy; 0x6cuy; 0xfauy; 0xdduy; 0xbfuy; 0xe8uy; 0xb1uy; 0x79uy; 0xe4uy; 0xc8uy; 0x60uy; 0xbeuy; 0x5euy; 0xc6uy; 0x6buy; 0xd2uy; 0xc6uy; 0xdeuy; 0x6auy; 0x39uy; 0xa2uy; 0x56uy; 0x22uy; 0xf9uy; 0xf2uy; 0xfcuy; 0xb3uy; 0xfcuy; 0x05uy; 0xafuy; 0x12uy; 0xb5uy ] in let cipher:list FStar.UInt8.t = [ 0x32uy; 0xd9uy; 0x79uy; 0xcauy; 0x1buy; 0x3euy; 0xd0uy; 0xeduy; 0x8cuy; 0x89uy; 0x0duy; 0x99uy; 0xecuy; 0x6duy; 0xd8uy; 0x5euy; 0x6cuy; 0x16uy; 0xabuy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x7cuy; 0x0euy; 0x6auy; 0x0duy; 0x35uy; 0xf8uy; 0xacuy; 0x85uy; 0x4cuy; 0x72uy; 0x45uy; 0xebuy; 0xc7uy; 0x36uy; 0x93uy; 0x73uy; 0x1buy; 0xbbuy; 0xc3uy; 0xe6uy; 0xfauy; 0xb6uy; 0x44uy; 0x46uy; 0x6duy; 0xe2uy; 0x7buy; 0xb5uy; 0x22uy; 0xfcuy; 0xb9uy; 0x93uy; 0x07uy; 0x12uy; 0x6auy; 0xe7uy; 0x18uy; 0xfeuy; 0x8fuy; 0x00uy; 0x74uy; 0x2euy; 0x6euy; 0x5cuy; 0xb7uy; 0xa6uy; 0x87uy; 0xc8uy; 0x84uy; 0x47uy; 0xcbuy; 0xc9uy; 0x61uy ] in let cipher:list FStar.UInt8.t = [ 0x6fuy; 0x18uy; 0x19uy; 0x0buy; 0xd2uy; 0xd0uy; 0x2fuy; 0xc9uy; 0x3buy; 0xceuy; 0x64uy; 0x75uy; 0x65uy; 0x75uy; 0xceuy; 0xa3uy; 0x6duy; 0x08uy; 0xb1uy; 0xc3uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xc5uy; 0x58uy; 0x1duy; 0x40uy; 0xb3uy; 0x31uy; 0xe2uy; 0x40uy; 0x03uy; 0x90uy; 0x1buy; 0xd6uy; 0xbfuy; 0x24uy; 0x4auy; 0xcauy; 0x9euy; 0x96uy; 0x01uy; 0xb9uy; 0xd8uy; 0x12uy; 0x52uy; 0xbbuy; 0x38uy; 0x04uy; 0x86uy; 0x42uy; 0x73uy; 0x1fuy; 0x11uy; 0x46uy; 0xb8uy; 0xa4uy; 0xc6uy; 0x9fuy; 0x88uy; 0xe1uy; 0x48uy; 0xb2uy; 0xc8uy; 0xf8uy; 0xc1uy; 0x4fuy; 0x15uy; 0xe1uy; 0xd6uy; 0xdauy; 0x57uy; 0xb2uy; 0xdauy; 0xa9uy; 0x99uy; 0x1euy ] in let cipher:list FStar.UInt8.t = [ 0x68uy; 0xf5uy; 0x25uy; 0xfeuy; 0xeauy; 0x1duy; 0x8duy; 0xbeuy; 0x01uy; 0x17uy; 0xe4uy; 0x17uy; 0xcauy; 0x46uy; 0x70uy; 0x8duy; 0x18uy; 0xd7uy; 0x62uy; 0x9auy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xecuy; 0x6buy; 0x4auy; 0x88uy; 0x71uy; 0x3duy; 0xf2uy; 0x7cuy; 0x0fuy; 0x2duy; 0x02uy; 0xe7uy; 0x38uy; 0xb6uy; 0x9duy; 0xb4uy; 0x3auy; 0xbduy; 0xa3uy; 0x92uy; 0x13uy; 0x17uy; 0x25uy; 0x9cuy; 0x86uy; 0x4cuy; 0x1cuy; 0x38uy; 0x6euy; 0x9auy; 0x5auy; 0x3fuy; 0x53uy; 0x3duy; 0xc0uy; 0x5fuy; 0x3buy; 0xeeuy; 0xb2uy; 0xbeuy; 0xc2uy; 0xaauy; 0xc8uy; 0xe0uy; 0x6duy; 0xb4uy; 0xc6uy; 0xcbuy; 0x3cuy; 0xdduy; 0xcfuy; 0x69uy; 0x7euy; 0x03uy; 0xd5uy ] in let cipher:list FStar.UInt8.t = [ 0xa7uy; 0x27uy; 0x2euy; 0x23uy; 0x08uy; 0x62uy; 0x2fuy; 0xf7uy; 0xa3uy; 0x39uy; 0x46uy; 0x0auy; 0xdcuy; 0x61uy; 0xefuy; 0xd0uy; 0xeauy; 0x8duy; 0xabuy; 0xdcuy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x03uy; 0x21uy; 0x73uy; 0x6buy; 0xebuy; 0xa5uy; 0x78uy; 0xe9uy; 0x0auy; 0xbcuy; 0x1auy; 0x90uy; 0xaauy; 0x56uy; 0x15uy; 0x7duy; 0x87uy; 0x16uy; 0x18uy; 0xf6uy; 0xdeuy; 0x0duy; 0x76uy; 0x4cuy; 0xc8uy; 0xc9uy; 0x1euy; 0x06uy; 0xc6uy; 0x8euy; 0xcduy; 0x3buy; 0x9duy; 0xe3uy; 0x82uy; 0x40uy; 0x64uy; 0x50uy; 0x33uy; 0x84uy; 0xdbuy; 0x67uy; 0xbeuy; 0xb7uy; 0xfeuy; 0x01uy; 0x22uy; 0x32uy; 0xdauy; 0xcauy; 0xefuy; 0x93uy; 0xa0uy; 0x00uy; 0xfbuy; 0xa7uy ] in let cipher:list FStar.UInt8.t = [ 0xaeuy; 0xf8uy; 0x43uy; 0xb8uy; 0x69uy; 0x16uy; 0xc1uy; 0x6fuy; 0x66uy; 0xc8uy; 0x4duy; 0x83uy; 0xa6uy; 0x00uy; 0x5duy; 0x23uy; 0xfduy; 0x00uy; 0x5cuy; 0x9euy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xd0uy; 0xa2uy; 0x49uy; 0xa9uy; 0x7buy; 0x5fuy; 0x14uy; 0x86uy; 0x72uy; 0x1auy; 0x50uy; 0xd4uy; 0xc4uy; 0xabuy; 0x3fuy; 0x5duy; 0x67uy; 0x4auy; 0x0euy; 0x29uy; 0x92uy; 0x5duy; 0x5buy; 0xf2uy; 0x67uy; 0x8euy; 0xf6uy; 0xd8uy; 0xd5uy; 0x21uy; 0xe4uy; 0x56uy; 0xbduy; 0x84uy; 0xaauy; 0x75uy; 0x53uy; 0x28uy; 0xc8uy; 0x3fuy; 0xc8uy; 0x90uy; 0x83uy; 0x77uy; 0x26uy; 0xa8uy; 0xe7uy; 0x87uy; 0x7buy; 0x57uy; 0x0duy; 0xbauy; 0x39uy; 0x57uy; 0x9auy; 0xabuy; 0xdduy ] in let cipher:list FStar.UInt8.t = [ 0xbeuy; 0x2cuy; 0xd6uy; 0xf3uy; 0x80uy; 0x96uy; 0x9buy; 0xe5uy; 0x9cuy; 0xdeuy; 0x2duy; 0xffuy; 0x5euy; 0x84uy; 0x8auy; 0x44uy; 0xe7uy; 0x88uy; 0x0buy; 0xd6uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xc3uy; 0x21uy; 0x38uy; 0x53uy; 0x11uy; 0x18uy; 0xf0uy; 0x8cuy; 0x7duy; 0xccuy; 0x29uy; 0x24uy; 0x28uy; 0xaduy; 0x20uy; 0xb4uy; 0x5auy; 0xb2uy; 0x7duy; 0x95uy; 0x17uy; 0xa1uy; 0x84uy; 0x45uy; 0xf3uy; 0x8buy; 0x8fuy; 0x0cuy; 0x27uy; 0x95uy; 0xbcuy; 0xdfuy; 0xe3uy; 0xffuy; 0xe3uy; 0x84uy; 0xe6uy; 0x5euy; 0xcbuy; 0xf7uy; 0x4duy; 0x2cuy; 0x9duy; 0x0duy; 0xa8uy; 0x83uy; 0x98uy; 0x57uy; 0x53uy; 0x26uy; 0x07uy; 0x49uy; 0x04uy; 0xc1uy; 0x70uy; 0x9buy; 0xa0uy; 0x72uy ] in let cipher:list FStar.UInt8.t = [ 0xe5uy; 0xebuy; 0x45uy; 0x43uy; 0xdeuy; 0xeeuy; 0x8fuy; 0x6auy; 0x52uy; 0x87uy; 0x84uy; 0x5auy; 0xf8uy; 0xb5uy; 0x93uy; 0xa9uy; 0x5auy; 0x97uy; 0x49uy; 0xa1uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xb0uy; 0xf4uy; 0xcfuy; 0xb9uy; 0x39uy; 0xeauy; 0x78uy; 0x5euy; 0xabuy; 0xb7uy; 0xe7uy; 0xcauy; 0x7cuy; 0x47uy; 0x6cuy; 0xdduy; 0x9buy; 0x22uy; 0x7fuy; 0x01uy; 0x5duy; 0x90uy; 0x53uy; 0x68uy; 0xbauy; 0x00uy; 0xaeuy; 0x96uy; 0xb9uy; 0xaauy; 0xf7uy; 0x20uy; 0x29uy; 0x74uy; 0x91uy; 0xb3uy; 0x92uy; 0x12uy; 0x67uy; 0x57uy; 0x6buy; 0x72uy; 0xc8uy; 0xf5uy; 0x8duy; 0x57uy; 0x76uy; 0x17uy; 0xe8uy; 0x44uy; 0xf9uy; 0xf0uy; 0x75uy; 0x9buy; 0x39uy; 0x9cuy; 0x6buy; 0x06uy; 0x4cuy ] in let cipher:list FStar.UInt8.t = [ 0x53uy; 0x4cuy; 0x85uy; 0x04uy; 0x48uy; 0xdduy; 0x48uy; 0x67uy; 0x87uy; 0xb6uy; 0x2buy; 0xdeuy; 0xc2uy; 0xd4uy; 0xa0uy; 0xb1uy; 0x40uy; 0xa1uy; 0xb1uy; 0x70uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xbduy; 0x02uy; 0xe5uy; 0x1buy; 0x0cuy; 0xf2uy; 0xc2uy; 0xb8uy; 0xd2uy; 0x04uy; 0xa0uy; 0x26uy; 0xb4uy; 0x1auy; 0x66uy; 0xfbuy; 0xfcuy; 0x2auy; 0xc3uy; 0x7euy; 0xe9uy; 0x41uy; 0x1fuy; 0xc4uy; 0x49uy; 0xc8uy; 0xd1uy; 0x19uy; 0x4auy; 0x07uy; 0x92uy; 0xa2uy; 0x8euy; 0xe7uy; 0x31uy; 0x40uy; 0x7duy; 0xfcuy; 0x89uy; 0xb6uy; 0xdfuy; 0xc2uy; 0xb1uy; 0x0fuy; 0xaauy; 0x27uy; 0x72uy; 0x3auy; 0x18uy; 0x4auy; 0xfeuy; 0xf8uy; 0xfduy; 0x83uy; 0xdeuy; 0xf8uy; 0x58uy; 0xa3uy; 0x2duy; 0x3fuy ] in let cipher:list FStar.UInt8.t = [ 0x6fuy; 0xbfuy; 0xa6uy; 0xe4uy; 0xeduy; 0xceuy; 0x4cuy; 0xc8uy; 0x5auy; 0x84uy; 0x5buy; 0xf0uy; 0xd2uy; 0x28uy; 0xdcuy; 0x39uy; 0xacuy; 0xefuy; 0xc2uy; 0xfauy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xe3uy; 0x31uy; 0x46uy; 0xb8uy; 0x3euy; 0x4buy; 0xb6uy; 0x71uy; 0x39uy; 0x22uy; 0x18uy; 0xdauy; 0x9auy; 0x77uy; 0xf8uy; 0xd9uy; 0xf5uy; 0x97uy; 0x41uy; 0x47uy; 0x18uy; 0x2fuy; 0xb9uy; 0x5buy; 0xa6uy; 0x62uy; 0xcbuy; 0x66uy; 0x01uy; 0x19uy; 0x89uy; 0xc1uy; 0x6duy; 0x9auy; 0xf1uy; 0x04uy; 0x73uy; 0x5duy; 0x6fuy; 0x79uy; 0x84uy; 0x1auy; 0xa4uy; 0xd1uy; 0xdfuy; 0x27uy; 0x66uy; 0x15uy; 0xb5uy; 0x01uy; 0x08uy; 0xdfuy; 0x8auy; 0x29uy; 0xdbuy; 0xc9uy; 0xdeuy; 0x31uy; 0xf4uy; 0x26uy; 0x0duy ] in let cipher:list FStar.UInt8.t = [ 0x01uy; 0x88uy; 0x72uy; 0x69uy; 0x1duy; 0x9buy; 0x04uy; 0xe8uy; 0x22uy; 0x0euy; 0x09uy; 0x18uy; 0x7duy; 0xf5uy; 0xbcuy; 0x5fuy; 0xa6uy; 0x25uy; 0x7cuy; 0xd9uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x41uy; 0x1cuy; 0x13uy; 0xc7uy; 0x50uy; 0x73uy; 0xc1uy; 0xe2uy; 0xd4uy; 0xb1uy; 0xecuy; 0xf1uy; 0x31uy; 0x39uy; 0xbauy; 0x96uy; 0x56uy; 0xcduy; 0x35uy; 0xc1uy; 0x42uy; 0x01uy; 0xf1uy; 0xc7uy; 0xc6uy; 0xf0uy; 0xeeuy; 0xb5uy; 0x8duy; 0x2duy; 0xbfuy; 0xe3uy; 0x5buy; 0xfduy; 0xecuy; 0xccuy; 0x92uy; 0xc3uy; 0x96uy; 0x1cuy; 0xfauy; 0xbbuy; 0x59uy; 0x0buy; 0xc1uy; 0xebuy; 0x77uy; 0xeauy; 0xc1uy; 0x57uy; 0x32uy; 0xfbuy; 0x02uy; 0x75uy; 0x79uy; 0x86uy; 0x80uy; 0xe0uy; 0xc7uy; 0x29uy; 0x2euy; 0x50uy ] in let cipher:list FStar.UInt8.t = [ 0xd9uy; 0x8duy; 0x51uy; 0x2auy; 0x35uy; 0x57uy; 0x2fuy; 0x8buy; 0xd2uy; 0x0duy; 0xe6uy; 0x2euy; 0x95uy; 0x10uy; 0xccuy; 0x21uy; 0x14uy; 0x5cuy; 0x5buy; 0xf4uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xf2uy; 0xc7uy; 0x6euy; 0xf6uy; 0x17uy; 0xfauy; 0x2buy; 0xfcuy; 0x8auy; 0x4duy; 0x6buy; 0xcbuy; 0xb1uy; 0x5fuy; 0xe8uy; 0x84uy; 0x36uy; 0xfduy; 0xc2uy; 0x16uy; 0x5duy; 0x30uy; 0x74uy; 0x62uy; 0x95uy; 0x79uy; 0x07uy; 0x9duy; 0x4duy; 0x5buy; 0x86uy; 0xf5uy; 0x08uy; 0x1auy; 0xb1uy; 0x77uy; 0xb4uy; 0xc3uy; 0xf5uy; 0x30uy; 0x37uy; 0x6cuy; 0x9cuy; 0x92uy; 0x4cuy; 0xbduy; 0x42uy; 0x1auy; 0x8duy; 0xafuy; 0x88uy; 0x30uy; 0xd0uy; 0x94uy; 0x0cuy; 0x4fuy; 0xb7uy; 0x58uy; 0x98uy; 0x65uy; 0x83uy; 0x06uy; 0x99uy ] in let cipher:list FStar.UInt8.t = [ 0x9fuy; 0x3euy; 0xa2uy; 0x55uy; 0xf6uy; 0xafuy; 0x95uy; 0xc5uy; 0x45uy; 0x4euy; 0x55uy; 0xd7uy; 0x35uy; 0x4cuy; 0xabuy; 0xb4uy; 0x53uy; 0x52uy; 0xeauy; 0x0buy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x45uy; 0x92uy; 0x7euy; 0x32uy; 0xdduy; 0xf8uy; 0x01uy; 0xcauy; 0xf3uy; 0x5euy; 0x18uy; 0xe7uy; 0xb5uy; 0x07uy; 0x8buy; 0x7fuy; 0x54uy; 0x35uy; 0x27uy; 0x82uy; 0x12uy; 0xecuy; 0x6buy; 0xb9uy; 0x9duy; 0xf8uy; 0x84uy; 0xf4uy; 0x9buy; 0x32uy; 0x7cuy; 0x64uy; 0x86uy; 0xfeuy; 0xaeuy; 0x46uy; 0xbauy; 0x18uy; 0x7duy; 0xc1uy; 0xccuy; 0x91uy; 0x45uy; 0x12uy; 0x1euy; 0x14uy; 0x92uy; 0xe6uy; 0xb0uy; 0x6euy; 0x90uy; 0x07uy; 0x39uy; 0x4duy; 0xc3uy; 0x3buy; 0x77uy; 0x48uy; 0xf8uy; 0x6auy; 0xc3uy; 0x20uy; 0x7cuy; 0xfeuy ] in let cipher:list FStar.UInt8.t = [ 0xa7uy; 0x0cuy; 0xfbuy; 0xfeuy; 0x75uy; 0x63uy; 0xdduy; 0x0euy; 0x66uy; 0x5cuy; 0x7cuy; 0x67uy; 0x15uy; 0xa9uy; 0x6auy; 0x8duy; 0x75uy; 0x69uy; 0x50uy; 0xc0uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x7cuy; 0x9cuy; 0x67uy; 0x32uy; 0x3auy; 0x1duy; 0xf1uy; 0xaduy; 0xbfuy; 0xe5uy; 0xceuy; 0xb4uy; 0x15uy; 0xeauy; 0xefuy; 0x01uy; 0x55uy; 0xecuy; 0xe2uy; 0x82uy; 0x0fuy; 0x4duy; 0x50uy; 0xc1uy; 0xecuy; 0x22uy; 0xcbuy; 0xa4uy; 0x92uy; 0x8auy; 0xc6uy; 0x56uy; 0xc8uy; 0x3fuy; 0xe5uy; 0x85uy; 0xdbuy; 0x6auy; 0x78uy; 0xceuy; 0x40uy; 0xbcuy; 0x42uy; 0x75uy; 0x7auy; 0xbauy; 0x7euy; 0x5auy; 0x3fuy; 0x58uy; 0x24uy; 0x28uy; 0xd6uy; 0xcauy; 0x68uy; 0xd0uy; 0xc3uy; 0x97uy; 0x83uy; 0x36uy; 0xa6uy; 0xefuy; 0xb7uy; 0x29uy; 0x61uy; 0x3euy; 0x8duy; 0x99uy; 0x79uy; 0x01uy; 0x62uy; 0x04uy; 0xbfuy; 0xd9uy; 0x21uy; 0x32uy; 0x2fuy; 0xdduy; 0x52uy; 0x22uy; 0x18uy; 0x35uy; 0x54uy; 0x44uy; 0x7duy; 0xe5uy; 0xe6uy; 0xe9uy; 0xbbuy; 0xe6uy; 0xeduy; 0xf7uy; 0x6duy; 0x7buy; 0x71uy; 0xe1uy; 0x8duy; 0xc2uy; 0xe8uy; 0xd6uy; 0xdcuy; 0x89uy; 0xb7uy; 0x39uy; 0x83uy; 0x64uy; 0xf6uy; 0x52uy; 0xfauy; 0xfcuy; 0x73uy; 0x43uy; 0x29uy; 0xaauy; 0xfauy; 0x3duy; 0xcduy; 0x45uy; 0xd4uy; 0xf3uy; 0x1euy; 0x38uy; 0x8euy; 0x4fuy; 0xafuy; 0xd7uy; 0xfcuy; 0x64uy; 0x95uy; 0xf3uy; 0x7cuy; 0xa5uy; 0xcbuy; 0xabuy; 0x7fuy; 0x54uy; 0xd5uy; 0x86uy; 0x46uy; 0x3duy; 0xa4uy; 0xbfuy; 0xeauy; 0xa3uy; 0xbauy; 0xe0uy; 0x9fuy; 0x7buy; 0x8euy; 0x92uy; 0x39uy; 0xd8uy; 0x32uy; 0xb4uy; 0xf0uy; 0xa7uy; 0x33uy; 0xaauy; 0x60uy; 0x9cuy; 0xc1uy; 0xf8uy; 0xd4uy ] in let cipher:list FStar.UInt8.t = [ 0xd8uy; 0xfduy; 0x6auy; 0x91uy; 0xefuy; 0x3buy; 0x6cuy; 0xeduy; 0x05uy; 0xb9uy; 0x83uy; 0x58uy; 0xa9uy; 0x91uy; 0x07uy; 0xc1uy; 0xfauy; 0xc8uy; 0xc8uy; 0x07uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x6cuy; 0xb7uy; 0x0duy; 0x19uy; 0xc0uy; 0x96uy; 0x20uy; 0x0fuy; 0x92uy; 0x49uy; 0xd2uy; 0xdbuy; 0xc0uy; 0x42uy; 0x99uy; 0xb0uy; 0x08uy; 0x5euy; 0xb0uy; 0x68uy; 0x25uy; 0x75uy; 0x60uy; 0xbeuy; 0x3auy; 0x30uy; 0x7duy; 0xbduy; 0x74uy; 0x1auy; 0x33uy; 0x78uy; 0xebuy; 0xfauy; 0x03uy; 0xfcuy; 0xcauy; 0x61uy; 0x08uy; 0x83uy; 0xb0uy; 0x7fuy; 0x7fuy; 0xeauy; 0x56uy; 0x3auy; 0x86uy; 0x65uy; 0x71uy; 0x82uy; 0x24uy; 0x72uy; 0xdauy; 0xdeuy; 0x8auy; 0x0buy; 0xecuy; 0x4buy; 0x98uy; 0x20uy; 0x2duy; 0x47uy; 0xa3uy; 0x44uy; 0x31uy; 0x29uy; 0x76uy; 0xa7uy; 0xbcuy; 0xb3uy; 0x96uy; 0x44uy; 0x27uy; 0xeauy; 0xcbuy; 0x5buy; 0x05uy; 0x25uy; 0xdbuy; 0x22uy; 0x06uy; 0x65uy; 0x99uy; 0xb8uy; 0x1buy; 0xe4uy; 0x1euy; 0x5auy; 0xdauy; 0xf1uy; 0x57uy; 0xd9uy; 0x25uy; 0xfauy; 0xc0uy; 0x4buy; 0x06uy; 0xebuy; 0x6euy; 0x01uy; 0xdeuy; 0xb7uy; 0x53uy; 0xbauy; 0xbfuy; 0x33uy; 0xbeuy; 0x16uy; 0x16uy; 0x2buy; 0x21uy; 0x4euy; 0x8duy; 0xb0uy; 0x17uy; 0x21uy; 0x2fuy; 0xafuy; 0xa5uy; 0x12uy; 0xcduy; 0xc8uy; 0xc0uy; 0xd0uy; 0xa1uy; 0x5cuy; 0x10uy; 0xf6uy; 0x32uy; 0xe8uy; 0xf4uy; 0xf4uy; 0x77uy; 0x92uy; 0xc6uy; 0x4duy; 0x3fuy; 0x02uy; 0x60uy; 0x04uy; 0xd1uy; 0x73uy; 0xdfuy; 0x50uy; 0xcfuy; 0x0auy; 0xa7uy; 0x97uy; 0x60uy; 0x66uy; 0xa7uy; 0x9auy; 0x8duy; 0x78uy; 0xdeuy; 0xeeuy; 0xecuy; 0x95uy; 0x1duy; 0xabuy; 0x7cuy; 0xc9uy; 0x0fuy; 0x68uy; 0xd1uy; 0x6fuy; 0x78uy; 0x66uy; 0x71uy; 0xfeuy; 0xbauy; 0x0buy; 0x7duy; 0x26uy; 0x9duy; 0x92uy; 0x94uy; 0x1cuy; 0x4fuy; 0x02uy; 0xf4uy; 0x32uy; 0xaauy; 0x5cuy; 0xe2uy; 0xaauy; 0xb6uy; 0x19uy; 0x4duy; 0xccuy; 0x6fuy; 0xd3uy; 0xaeuy; 0x36uy; 0xc8uy; 0x43uy; 0x32uy; 0x74uy; 0xefuy; 0x6buy; 0x1buy; 0xd0uy; 0xd3uy; 0x14uy; 0x63uy; 0x6buy; 0xe4uy; 0x7buy; 0xa3uy; 0x8duy; 0x19uy; 0x48uy; 0x34uy; 0x3auy; 0x38uy; 0xbfuy; 0x94uy; 0x06uy; 0x52uy; 0x3auy; 0x0buy; 0x2auy; 0x8cuy; 0xd7uy; 0x8euy; 0xd6uy; 0x26uy; 0x6euy; 0xe3uy; 0xc9uy; 0xb5uy; 0xc6uy; 0x06uy; 0x20uy; 0xb3uy; 0x08uy; 0xccuy; 0x6buy; 0x3auy; 0x73uy; 0xc6uy; 0x06uy; 0x0duy; 0x52uy; 0x68uy; 0xa7uy; 0xd8uy; 0x2buy; 0x6auy; 0x33uy; 0xb9uy; 0x3auy; 0x6fuy; 0xd6uy; 0xfeuy; 0x1duy; 0xe5uy; 0x52uy; 0x31uy; 0xd1uy; 0x2cuy; 0x97uy ] in let cipher:list FStar.UInt8.t = [ 0x4auy; 0x75uy; 0xa4uy; 0x06uy; 0xf4uy; 0xdeuy; 0x5fuy; 0x9euy; 0x11uy; 0x32uy; 0x06uy; 0x9duy; 0x66uy; 0x71uy; 0x7fuy; 0xc4uy; 0x24uy; 0x37uy; 0x63uy; 0x88uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0x64uy; 0x87uy; 0x97uy; 0x2duy; 0x88uy; 0xd0uy; 0xdduy; 0x39uy; 0x0duy; 0x8duy; 0x09uy; 0xd1uy; 0x34uy; 0x86uy; 0x0fuy; 0x26uy; 0x3fuy; 0x88uy; 0xdfuy; 0x7auy; 0x34uy; 0x12uy; 0x45uy; 0x7auy; 0xdfuy; 0x51uy; 0x0duy; 0xcfuy; 0x16uy; 0x4euy; 0x6cuy; 0xf0uy; 0x41uy; 0x67uy; 0x9buy; 0x3auy; 0x19uy; 0xfcuy; 0xc5uy; 0x42uy; 0xafuy; 0x6auy; 0x23uy; 0x6auy; 0xb0uy; 0x3duy; 0x66uy; 0xb2uy; 0xe8uy; 0xa1uy; 0x55uy; 0xd1uy; 0x06uy; 0x1auy; 0xb7uy; 0x85uy; 0x9fuy; 0x75uy; 0x73uy; 0x27uy; 0x75uy; 0xffuy; 0xf6uy; 0x82uy; 0xf8uy; 0xf4uy; 0xd5uy; 0xe5uy; 0x0duy; 0x3auy; 0xb3uy; 0x77uy; 0x0fuy; 0x4fuy; 0x66uy; 0xcbuy; 0x13uy; 0x81uy; 0x55uy; 0xb4uy; 0x71uy; 0x5duy; 0x24uy; 0x5buy; 0x80uy; 0x69uy; 0x94uy; 0x8euy; 0xa0uy; 0x16uy; 0xa4uy; 0x5buy; 0x7euy; 0xf0uy; 0xfduy; 0xdeuy; 0x93uy; 0x18uy; 0x8cuy; 0x57uy; 0xeeuy; 0xf4uy; 0x71uy; 0x7fuy; 0x34uy; 0x25uy; 0x18uy; 0x1duy; 0xe5uy; 0xb9uy; 0xa5uy; 0xd4uy; 0xe0uy; 0xa2uy; 0x96uy; 0x3fuy; 0x2auy; 0x67uy; 0xa3uy; 0x40uy; 0xebuy; 0x1auy; 0xe9uy; 0x94uy; 0xb9uy; 0x8auy; 0x48uy; 0xabuy; 0x19uy; 0xb9uy; 0x0auy; 0xb7uy; 0x43uy; 0x91uy; 0xc5uy; 0x04uy; 0x26uy; 0xd2uy; 0x82uy; 0x87uy; 0xacuy; 0x4fuy; 0x1euy; 0xb9uy; 0x3fuy; 0x5auy; 0xf1uy; 0xa6uy; 0x8cuy; 0x7duy; 0xaeuy; 0x40uy; 0x87uy; 0x6buy; 0x8auy; 0xfauy; 0xafuy; 0x35uy; 0xa1uy; 0x92uy; 0x93uy; 0xc1uy; 0x95uy; 0x2euy; 0x95uy; 0x79uy; 0x78uy; 0xabuy; 0xeeuy; 0x40uy; 0xecuy; 0x32uy; 0xf2uy; 0xaauy; 0x88uy; 0x0cuy; 0x95uy; 0x6cuy; 0x7euy; 0xb7uy; 0x2fuy; 0x11uy; 0x7buy; 0x39uy; 0x7cuy; 0xefuy; 0xcfuy; 0xb4uy; 0xe7uy; 0x5auy; 0xceuy; 0x3buy; 0x08uy; 0x17uy; 0x76uy; 0xe4uy; 0x6buy; 0x13uy; 0x52uy; 0x1euy; 0x93uy; 0x55uy; 0x9duy; 0x45uy; 0x3euy; 0x32uy; 0xabuy; 0x74uy; 0xebuy; 0xc0uy; 0x85uy; 0x9buy; 0x9auy; 0x8duy; 0xd4uy; 0xd1uy; 0xd3uy; 0x90uy; 0x00uy; 0xebuy; 0xe9uy; 0x5fuy; 0x98uy; 0x4duy; 0x80uy; 0xa3uy; 0xf5uy; 0x00uy; 0x4duy; 0xc9uy; 0x1auy; 0x05uy; 0x1duy; 0xfbuy; 0xdfuy; 0xe9uy; 0x19uy; 0x4fuy; 0x4fuy; 0x9auy; 0x48uy; 0x3euy; 0x4euy; 0x79uy; 0x55uy; 0x57uy; 0x7fuy; 0xb0uy; 0x93uy; 0x34uy; 0x64uy; 0xc6uy; 0x3euy; 0xaeuy; 0xc7uy; 0x71uy; 0x04uy; 0x4duy; 0x59uy; 0xabuy; 0xc3uy; 0x02uy; 0x9auy; 0x07uy; 0x95uy; 0x19uy; 0xf8uy; 0x46uy; 0x0auy; 0x69uy; 0x3buy; 0x25uy; 0xb4uy; 0xceuy; 0x20uy; 0x7auy; 0xe9uy; 0xd9uy; 0x44uy; 0x7fuy; 0xc4uy; 0xc5uy; 0x44uy; 0x6euy; 0x6duy; 0xaduy; 0x23uy; 0x4euy; 0x9auy; 0xfduy; 0xecuy; 0x0cuy; 0x56uy; 0x27uy; 0x98uy; 0xcduy; 0x02uy; 0x97uy; 0x31uy; 0x83uy; 0x99uy; 0xe8uy; 0x38uy; 0xbeuy; 0x38uy; 0x58uy; 0x45uy; 0xc6uy; 0xdduy; 0x79uy; 0xeduy; 0xe6uy; 0x6euy; 0x2auy; 0xe8uy; 0x0auy; 0xfeuy; 0xc6uy; 0x73uy; 0x8duy; 0x4duy; 0x9buy; 0xf4uy; 0x4cuy; 0x8duy; 0x9euy; 0xdduy; 0xffuy; 0x6cuy; 0x5cuy; 0xd2uy; 0xc9uy; 0x4euy; 0x34uy; 0x0euy; 0x0duy; 0xdauy; 0xc4uy; 0x03uy; 0x84uy; 0xb9uy; 0xa1uy; 0x40uy; 0x8cuy; 0x9auy; 0x4buy; 0x98uy; 0xc3uy; 0x7auy; 0x60uy; 0x81uy; 0xd5uy; 0x22uy; 0x0fuy; 0xbauy; 0x92uy; 0xf1uy; 0xd0uy; 0x31uy; 0x44uy; 0xdbuy ] in let cipher:list FStar.UInt8.t = [ 0xa1uy; 0x35uy; 0xe3uy; 0x25uy; 0x81uy; 0xbbuy; 0x06uy; 0x28uy; 0x9buy; 0x8cuy; 0x83uy; 0xf0uy; 0x40uy; 0xe9uy; 0x42uy; 0x1euy; 0xc7uy; 0x9buy; 0xbeuy; 0x01uy ] in Vec SHA1 plain cipher); (let plain:list FStar.UInt8.t = [ 0xbduy; 0x74uy; 0xe7uy; 0xf6uy; 0x07uy; 0xcduy; 0x7duy; 0x90uy; 0x5euy; 0x90uy; 0x17uy; 0x5duy; 0x67uy; 0x65uy; 0x0auy; 0x6duy; 0xc2uy; 0xf8uy; 0xa4uy; 0xe2uy; 0xd4uy; 0xabuy; 0x12uy; 0x49uy; 0xcauy; 0x88uy; 0x81uy; 0x2buy; 0xdauy; 0x79uy; 0x84uy; 0xdeuy; 0xccuy; 0xbbuy; 0xb6uy; 0xa1uy; 0xbauy; 0x90uy; 0xa0uy; 0xe9uy; 0x14uy; 0x34uy; 0xdduy; 0xf5uy; 0xe6uy; 0x13uy; 0x7buy; 0xa8uy; 0x5euy; 0x39uy; 0xa5uy; 0x98uy; 0x89uy; 0x0auy; 0x7fuy; 0x63uy; 0x5duy; 0x33uy; 0x52uy; 0x42uy; 0xfcuy; 0xe0uy; 0xe9uy; 0xe0uy; 0x37uy; 0x30uy; 0x3buy; 0x6cuy; 0x51uy; 0xe5uy; 0x4auy; 0xecuy; 0x06uy; 0x61uy; 0x4auy; 0xd5uy; 0xccuy; 0xceuy; 0x06uy; 0xd9uy; 0x59uy; 0x9cuy; 0x80uy; 0x01uy; 0x65uy; 0x30uy; 0xd7uy; 0xfbuy; 0xb1uy; 0xdauy; 0x6euy; 0xb5uy; 0x48uy; 0x08uy; 0x4buy; 0x2buy; 0x05uy; 0xbauy; 0xbduy; 0x7duy; 0x55uy; 0x36uy; 0x42uy; 0x44uy; 0x3euy; 0xfduy; 0xa7uy; 0x26uy; 0xa1uy; 0xfduy; 0x71uy; 0xa8uy; 0xbcuy; 0x08uy; 0x7cuy; 0x44uy; 0xf2uy; 0x85uy; 0xe2uy; 0xbcuy; 0xcfuy; 0x66uy; 0x1euy; 0xaduy; 0x47uy; 0x5auy; 0x72uy; 0x67uy; 0x3euy; 0x43uy; 0x86uy; 0xfcuy; 0x4euy; 0xeauy; 0x51uy; 0x97uy; 0xc4uy; 0xf1uy; 0x3cuy; 0x0fuy; 0xebuy; 0x0auy; 0x85uy; 0xbcuy; 0x8euy; 0x67uy; 0xe2uy; 0x8auy; 0xb8uy; 0x72uy; 0x68uy; 0x4buy; 0xbeuy; 0xbduy; 0xaauy; 0x52uy; 0x7fuy; 0x3cuy; 0x25uy; 0x3duy; 0xebuy; 0xb2uy; 0xdcuy; 0x12uy; 0xc2uy; 0x69uy; 0x3fuy; 0x8euy; 0x9euy; 0x26uy; 0x51uy; 0xb9uy; 0x34uy; 0x5cuy; 0x0auy; 0xbeuy; 0xd7uy; 0xa0uy; 0xfauy; 0xfauy; 0x3euy; 0x5duy; 0x30uy; 0x53uy; 0x86uy; 0xc9uy; 0x5auy; 0xcbuy; 0x7auy; 0x17uy; 0x2euy; 0x54uy; 0x13uy; 0xefuy; 0x08uy; 0xe7uy; 0x3buy; 0x1buy; 0xd4uy; 0xd0uy; 0xd6uy; 0x83uy; 0x2euy; 0x4cuy; 0x03uy; 0x5buy; 0xc8uy; 0x55uy; 0x9fuy; 0x9buy; 0x0cuy; 0xbduy; 0x0cuy; 0xafuy; 0x03uy; 0x7auy; 0x30uy; 0x70uy; 0x76uy; 0x41uy; 0xc0uy; 0x54uy; 0x53uy; 0x56uy; 0xbeuy; 0xe1uy; 0x51uy; 0xa2uy; 0x40uy; 0x68uy; 0xd7uy; 0x06uy; 0x74uy; 0xefuy; 0x1buy; 0xefuy; 0xe1uy; 0x6fuy; 0x87uy; 0x2auy; 0xefuy; 0x40uy; 0x60uy; 0xfauy; 0xaauy; 0xd1uy; 0xa9uy; 0x68uy; 0xc3uy; 0x9cuy; 0x45uy; 0xdbuy; 0xd7uy; 0x59uy; 0x5duy; 0xe8uy; 0xf4uy; 0x72uy; 0x01uy; 0x6buy; 0x5auy; 0xb8uy; 0x12uy; 0xd7uy; 0x7euy; 0x54uy; 0x5fuy; 0xcauy; 0x55uy; 0x00uy; 0x0euy; 0xe5uy; 0xceuy; 0x77uy; 0x3euy; 0xdauy; 0xa1uy; 0x29uy; 0xeauy; 0xc6uy; 0x47uy; 0x34uy; 0x10uy; 0xc2uy; 0x49uy; 0x90uy; 0x13uy; 0xb4uy; 0xbeuy; 0x89uy; 0x5fuy; 0x6cuy; 0x0fuy; 0x73uy; 0x4buy; 0xecuy; 0xfeuy; 0x99uy; 0x43uy; 0x06uy; 0xe7uy; 0x76uy; 0x26uy; 0x2duy; 0x45uy; 0x28uy; 0xeduy; 0x85uy; 0x77uy; 0x21uy; 0x8euy; 0x3cuy; 0xc5uy; 0x20uy; 0x1fuy; 0x1duy; 0x9euy; 0x5fuy; 0x3fuy; 0x62uy; 0x23uy; 0x0euy; 0xb2uy; 0xcauy; 0xeauy; 0x01uy; 0x4buy; 0xecuy; 0xfbuy; 0xa6uy; 0x0fuy; 0xcbuy; 0x1fuy; 0x39uy; 0x97uy; 0xaauy; 0x5buy; 0x3buy; 0xb6uy; 0x22uy; 0xb7uy; 0x20uy; 0x5cuy; 0x71uy; 0x43uy; 0x48uy; 0xbauy; 0x15uy; 0x5cuy; 0x30uy; 0xa7uy; 0x9auy; 0x2cuy; 0xeauy; 0x43uy; 0xb0uy; 0x70uy; 0xcauy; 0xdauy; 0x80uy; 0x7euy; 0x63uy; 0x0buy; 0x40uy; 0x86uy; 0xb1uy; 0x29uy; 0x05uy; 0x18uy; 0x98uy; 0xe1uy; 0xd9uy; 0xe6uy; 0x8duy; 0x1duy; 0x0euy; 0xccuy; 0x94uy; 0x29uy; 0xd2uy; 0x0duy; 0x6auy; 0x14uy; 0x03uy; 0xe0uy; 0x03uy; 0x5auy; 0x44uy; 0x2buy; 0x37uy; 0xbfuy; 0x50uy; 0x8euy; 0xb8uy; 0x7euy; 0x8euy; 0xa3uy; 0x47uy; 0xa3uy; 0xe6uy; 0x84uy; 0x27uy; 0xb6uy; 0xd4uy; 0x8euy; 0xd2uy; 0x99uy; 0xbauy; 0x65uy; 0xecuy; 0xb3uy; 0x7buy; 0x38uy; 0x75uy; 0x4fuy; 0x45uy; 0x47uy; 0x42uy; 0x3euy; 0xaeuy; 0xa2uy; 0xaeuy; 0xc4uy; 0x03uy; 0x33uy; 0x8duy; 0xb2uy; 0xdcuy; 0xfeuy; 0x61uy; 0xcfuy; 0xf4uy; 0xa8uy; 0xd1uy; 0x7cuy; 0x38uy; 0x36uy; 0x56uy; 0x98uy; 0x1euy; 0x18uy; 0x38uy; 0xa2uy; 0x38uy; 0x66uy; 0xb9uy; 0x1duy; 0x09uy; 0x69uy; 0x8fuy; 0x39uy; 0x17uy; 0x5duy; 0x98uy; 0xafuy; 0x41uy; 0x75uy; 0xcauy; 0xeduy; 0x53uy ] in let cipher:list FStar.UInt8.t = [ 0xb2uy; 0x2buy; 0x87uy; 0xeauy; 0x30uy; 0xf4uy; 0x05uy; 0x09uy; 0x13uy; 0xf8uy; 0xf0uy; 0x24uy; 0x1fuy; 0xc2uy; 0xaeuy; 0x2cuy; 0x31uy; 0x9fuy; 0x52uy; 0xe7uy ] in Vec SHA1 plain cipher) ]
{ "checked_file": "Spec.Hash.Test.fst.checked", "dependencies": [ "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "Lib.RawIntTypes.fsti.checked", "Lib.PrintSequence.fsti.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.List.fst.checked", "FStar.IO.fst.checked" ], "interface_file": false, "source_file": "Spec.Hash.Test.fst" }
[ "total" ]
[ "Prims.Cons", "Spec.Hash.Test.vec", "Spec.Hash.Test.Vec", "Spec.Hash.Definitions.SHA2_224", "Spec.Hash.Test.test1_plaintext", "Spec.Hash.Test.test1_expected224", "Spec.Hash.Test.test2_plaintext", "Spec.Hash.Test.test2_expected224", "Spec.Hash.Test.test3_plaintext", "Spec.Hash.Test.test3_expected224", "Spec.Hash.Test.test4_plaintext", "Spec.Hash.Test.test4_expected224", "Spec.Hash.Definitions.SHA2_256", "Spec.Hash.Test.test1_expected256", "Spec.Hash.Test.test2_expected256", "Spec.Hash.Test.test3_expected256", "Spec.Hash.Test.test4_expected256", "Spec.Hash.Definitions.SHA2_384", "Spec.Hash.Test.test1_expected384", "Spec.Hash.Test.test2_expected384", "Spec.Hash.Test.test3_expected384", "Spec.Hash.Test.test4_expected384", "Spec.Hash.Definitions.SHA2_512", "Spec.Hash.Test.test1_expected512", "Spec.Hash.Test.test2_expected512", "Spec.Hash.Test.test3_expected512", "Spec.Hash.Test.test4_expected512", "Spec.Hash.Definitions.MD5", "Prims.list", "FStar.UInt8.t", "FStar.UInt8.__uint_to_t", "Prims.Nil", "Spec.Hash.Definitions.SHA1" ]
[]
module Spec.Hash.Test open FStar.Seq module PS = Lib.PrintSequence #set-options "--z3rlimit 50 --fuel 0 --ifuel 0" /// Test 1 let test1_plaintext = [0x61uy; 0x62uy; 0x63uy] let test1_expected224 = [ 0x23uy; 0x09uy; 0x7duy; 0x22uy; 0x34uy; 0x05uy; 0xd8uy; 0x22uy; 0x86uy; 0x42uy; 0xa4uy; 0x77uy; 0xbduy; 0xa2uy; 0x55uy; 0xb3uy; 0x2auy; 0xaduy; 0xbcuy; 0xe4uy; 0xbduy; 0xa0uy; 0xb3uy; 0xf7uy; 0xe3uy; 0x6cuy; 0x9duy; 0xa7uy ] let test1_expected256 = [ 0xbauy; 0x78uy; 0x16uy; 0xbfuy; 0x8fuy; 0x01uy; 0xcfuy; 0xeauy; 0x41uy; 0x41uy; 0x40uy; 0xdeuy; 0x5duy; 0xaeuy; 0x22uy; 0x23uy; 0xb0uy; 0x03uy; 0x61uy; 0xa3uy; 0x96uy; 0x17uy; 0x7auy; 0x9cuy; 0xb4uy; 0x10uy; 0xffuy; 0x61uy; 0xf2uy; 0x00uy; 0x15uy; 0xaduy ] let test1_expected384 = [ 0xcbuy; 0x00uy; 0x75uy; 0x3fuy; 0x45uy; 0xa3uy; 0x5euy; 0x8buy; 0xb5uy; 0xa0uy; 0x3duy; 0x69uy; 0x9auy; 0xc6uy; 0x50uy; 0x07uy; 0x27uy; 0x2cuy; 0x32uy; 0xabuy; 0x0euy; 0xdeuy; 0xd1uy; 0x63uy; 0x1auy; 0x8buy; 0x60uy; 0x5auy; 0x43uy; 0xffuy; 0x5buy; 0xeduy; 0x80uy; 0x86uy; 0x07uy; 0x2buy; 0xa1uy; 0xe7uy; 0xccuy; 0x23uy; 0x58uy; 0xbauy; 0xecuy; 0xa1uy; 0x34uy; 0xc8uy; 0x25uy; 0xa7uy ] let test1_expected512 = [ 0xdduy; 0xafuy; 0x35uy; 0xa1uy; 0x93uy; 0x61uy; 0x7auy; 0xbauy; 0xccuy; 0x41uy; 0x73uy; 0x49uy; 0xaeuy; 0x20uy; 0x41uy; 0x31uy; 0x12uy; 0xe6uy; 0xfauy; 0x4euy; 0x89uy; 0xa9uy; 0x7euy; 0xa2uy; 0x0auy; 0x9euy; 0xeeuy; 0xe6uy; 0x4buy; 0x55uy; 0xd3uy; 0x9auy; 0x21uy; 0x92uy; 0x99uy; 0x2auy; 0x27uy; 0x4fuy; 0xc1uy; 0xa8uy; 0x36uy; 0xbauy; 0x3cuy; 0x23uy; 0xa3uy; 0xfeuy; 0xebuy; 0xbduy; 0x45uy; 0x4duy; 0x44uy; 0x23uy; 0x64uy; 0x3cuy; 0xe8uy; 0x0euy; 0x2auy; 0x9auy; 0xc9uy; 0x4fuy; 0xa5uy; 0x4cuy; 0xa4uy; 0x9fuy ] /// Test 2 // This empty list must have its type annotated, otherwise // length preconditions on test vectors cannot be normalized let test2_plaintext: list UInt8.t = [] let test2_expected224 = [ 0xd1uy; 0x4auy; 0x02uy; 0x8cuy; 0x2auy; 0x3auy; 0x2buy; 0xc9uy; 0x47uy; 0x61uy; 0x02uy; 0xbbuy; 0x28uy; 0x82uy; 0x34uy; 0xc4uy; 0x15uy; 0xa2uy; 0xb0uy; 0x1fuy; 0x82uy; 0x8euy; 0xa6uy; 0x2auy; 0xc5uy; 0xb3uy; 0xe4uy; 0x2fuy ] let test2_expected256 = [ 0xe3uy; 0xb0uy; 0xc4uy; 0x42uy; 0x98uy; 0xfcuy; 0x1cuy; 0x14uy; 0x9auy; 0xfbuy; 0xf4uy; 0xc8uy; 0x99uy; 0x6fuy; 0xb9uy; 0x24uy; 0x27uy; 0xaeuy; 0x41uy; 0xe4uy; 0x64uy; 0x9buy; 0x93uy; 0x4cuy; 0xa4uy; 0x95uy; 0x99uy; 0x1buy; 0x78uy; 0x52uy; 0xb8uy; 0x55uy ] let test2_expected384 = [ 0x38uy; 0xb0uy; 0x60uy; 0xa7uy; 0x51uy; 0xacuy; 0x96uy; 0x38uy; 0x4cuy; 0xd9uy; 0x32uy; 0x7euy; 0xb1uy; 0xb1uy; 0xe3uy; 0x6auy; 0x21uy; 0xfduy; 0xb7uy; 0x11uy; 0x14uy; 0xbeuy; 0x07uy; 0x43uy; 0x4cuy; 0x0cuy; 0xc7uy; 0xbfuy; 0x63uy; 0xf6uy; 0xe1uy; 0xdauy; 0x27uy; 0x4euy; 0xdeuy; 0xbfuy; 0xe7uy; 0x6fuy; 0x65uy; 0xfbuy; 0xd5uy; 0x1auy; 0xd2uy; 0xf1uy; 0x48uy; 0x98uy; 0xb9uy; 0x5buy ] let test2_expected512 = [ 0xcfuy; 0x83uy; 0xe1uy; 0x35uy; 0x7euy; 0xefuy; 0xb8uy; 0xbduy; 0xf1uy; 0x54uy; 0x28uy; 0x50uy; 0xd6uy; 0x6duy; 0x80uy; 0x07uy; 0xd6uy; 0x20uy; 0xe4uy; 0x05uy; 0x0buy; 0x57uy; 0x15uy; 0xdcuy; 0x83uy; 0xf4uy; 0xa9uy; 0x21uy; 0xd3uy; 0x6cuy; 0xe9uy; 0xceuy; 0x47uy; 0xd0uy; 0xd1uy; 0x3cuy; 0x5duy; 0x85uy; 0xf2uy; 0xb0uy; 0xffuy; 0x83uy; 0x18uy; 0xd2uy; 0x87uy; 0x7euy; 0xecuy; 0x2fuy; 0x63uy; 0xb9uy; 0x31uy; 0xbduy; 0x47uy; 0x41uy; 0x7auy; 0x81uy; 0xa5uy; 0x38uy; 0x32uy; 0x7auy; 0xf9uy; 0x27uy; 0xdauy; 0x3euy ] /// Test 3 let test3_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy ] let test3_expected224 = [ 0x75uy; 0x38uy; 0x8buy; 0x16uy; 0x51uy; 0x27uy; 0x76uy; 0xccuy; 0x5duy; 0xbauy; 0x5duy; 0xa1uy; 0xfduy; 0x89uy; 0x01uy; 0x50uy; 0xb0uy; 0xc6uy; 0x45uy; 0x5cuy; 0xb4uy; 0xf5uy; 0x8buy; 0x19uy; 0x52uy; 0x52uy; 0x25uy; 0x25uy ] let test3_expected256 = [ 0x24uy; 0x8duy; 0x6auy; 0x61uy; 0xd2uy; 0x06uy; 0x38uy; 0xb8uy; 0xe5uy; 0xc0uy; 0x26uy; 0x93uy; 0x0cuy; 0x3euy; 0x60uy; 0x39uy; 0xa3uy; 0x3cuy; 0xe4uy; 0x59uy; 0x64uy; 0xffuy; 0x21uy; 0x67uy; 0xf6uy; 0xecuy; 0xeduy; 0xd4uy; 0x19uy; 0xdbuy; 0x06uy; 0xc1uy ] let test3_expected384 = [ 0x33uy; 0x91uy; 0xfduy; 0xdduy; 0xfcuy; 0x8duy; 0xc7uy; 0x39uy; 0x37uy; 0x07uy; 0xa6uy; 0x5buy; 0x1buy; 0x47uy; 0x09uy; 0x39uy; 0x7cuy; 0xf8uy; 0xb1uy; 0xd1uy; 0x62uy; 0xafuy; 0x05uy; 0xabuy; 0xfeuy; 0x8fuy; 0x45uy; 0x0duy; 0xe5uy; 0xf3uy; 0x6buy; 0xc6uy; 0xb0uy; 0x45uy; 0x5auy; 0x85uy; 0x20uy; 0xbcuy; 0x4euy; 0x6fuy; 0x5fuy; 0xe9uy; 0x5buy; 0x1fuy; 0xe3uy; 0xc8uy; 0x45uy; 0x2buy ] let test3_expected512 = [ 0x20uy; 0x4auy; 0x8fuy; 0xc6uy; 0xdduy; 0xa8uy; 0x2fuy; 0x0auy; 0x0cuy; 0xeduy; 0x7buy; 0xebuy; 0x8euy; 0x08uy; 0xa4uy; 0x16uy; 0x57uy; 0xc1uy; 0x6euy; 0xf4uy; 0x68uy; 0xb2uy; 0x28uy; 0xa8uy; 0x27uy; 0x9buy; 0xe3uy; 0x31uy; 0xa7uy; 0x03uy; 0xc3uy; 0x35uy; 0x96uy; 0xfduy; 0x15uy; 0xc1uy; 0x3buy; 0x1buy; 0x07uy; 0xf9uy; 0xaauy; 0x1duy; 0x3buy; 0xeauy; 0x57uy; 0x78uy; 0x9cuy; 0xa0uy; 0x31uy; 0xaduy; 0x85uy; 0xc7uy; 0xa7uy; 0x1duy; 0xd7uy; 0x03uy; 0x54uy; 0xecuy; 0x63uy; 0x12uy; 0x38uy; 0xcauy; 0x34uy; 0x45uy ] /// Test 4 let test4_plaintext = [ 0x61uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x62uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x63uy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x64uy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x65uy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x66uy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x67uy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x68uy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x69uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x6auy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x6buy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x6cuy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x6duy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x6euy; 0x6fuy; 0x70uy; 0x71uy; 0x72uy; 0x73uy; 0x74uy; 0x75uy ] let test4_expected224 = [ 0xc9uy; 0x7cuy; 0xa9uy; 0xa5uy; 0x59uy; 0x85uy; 0x0cuy; 0xe9uy; 0x7auy; 0x04uy; 0xa9uy; 0x6duy; 0xefuy; 0x6duy; 0x99uy; 0xa9uy; 0xe0uy; 0xe0uy; 0xe2uy; 0xabuy; 0x14uy; 0xe6uy; 0xb8uy; 0xdfuy; 0x26uy; 0x5fuy; 0xc0uy; 0xb3uy ] let test4_expected256 = [ 0xcfuy; 0x5buy; 0x16uy; 0xa7uy; 0x78uy; 0xafuy; 0x83uy; 0x80uy; 0x03uy; 0x6cuy; 0xe5uy; 0x9euy; 0x7buy; 0x04uy; 0x92uy; 0x37uy; 0x0buy; 0x24uy; 0x9buy; 0x11uy; 0xe8uy; 0xf0uy; 0x7auy; 0x51uy; 0xafuy; 0xacuy; 0x45uy; 0x03uy; 0x7auy; 0xfeuy; 0xe9uy; 0xd1uy ] let test4_expected384 = [ 0x09uy; 0x33uy; 0x0cuy; 0x33uy; 0xf7uy; 0x11uy; 0x47uy; 0xe8uy; 0x3duy; 0x19uy; 0x2fuy; 0xc7uy; 0x82uy; 0xcduy; 0x1buy; 0x47uy; 0x53uy; 0x11uy; 0x1buy; 0x17uy; 0x3buy; 0x3buy; 0x05uy; 0xd2uy; 0x2fuy; 0xa0uy; 0x80uy; 0x86uy; 0xe3uy; 0xb0uy; 0xf7uy; 0x12uy; 0xfcuy; 0xc7uy; 0xc7uy; 0x1auy; 0x55uy; 0x7euy; 0x2duy; 0xb9uy; 0x66uy; 0xc3uy; 0xe9uy; 0xfauy; 0x91uy; 0x74uy; 0x60uy; 0x39uy ] let test4_expected512 = [ 0x8euy; 0x95uy; 0x9buy; 0x75uy; 0xdauy; 0xe3uy; 0x13uy; 0xdauy; 0x8cuy; 0xf4uy; 0xf7uy; 0x28uy; 0x14uy; 0xfcuy; 0x14uy; 0x3fuy; 0x8fuy; 0x77uy; 0x79uy; 0xc6uy; 0xebuy; 0x9fuy; 0x7fuy; 0xa1uy; 0x72uy; 0x99uy; 0xaeuy; 0xaduy; 0xb6uy; 0x88uy; 0x90uy; 0x18uy; 0x50uy; 0x1duy; 0x28uy; 0x9euy; 0x49uy; 0x00uy; 0xf7uy; 0xe4uy; 0x33uy; 0x1buy; 0x99uy; 0xdeuy; 0xc4uy; 0xb5uy; 0x43uy; 0x3auy; 0xc7uy; 0xd3uy; 0x29uy; 0xeeuy; 0xb6uy; 0xdduy; 0x26uy; 0x54uy; 0x5euy; 0x96uy; 0xe5uy; 0x5buy; 0x87uy; 0x4buy; 0xe9uy; 0x09uy ] open Spec.Agile.Hash open Spec.Hash.Definitions type vec = | Vec : a:hash_alg { not (is_shake a) } -> plain:list UInt8.t {norm [delta; iota; zeta; primops] (List.Tot.length plain `less_than_max_input_length` a) == true} -> hash:list UInt8.t {norm [delta; iota; zeta; primops] (List.Tot.length hash = hash_length a) == true} -> vec
false
true
Spec.Hash.Test.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 0, "initial_ifuel": 0, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val test_vectors:list vec
[]
Spec.Hash.Test.test_vectors
{ "file_name": "specs/tests/Spec.Hash.Test.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list Spec.Hash.Test.vec
{ "end_col": 3, "end_line": 1336, "start_col": 2, "start_line": 185 }
Prims.Tot
val b_b2i (#n: pos) (vec: bv_t n) : uint_t n
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let b_b2i (#n:pos) (vec:bv_t n) : uint_t n = bv2int vec
val b_b2i (#n: pos) (vec: bv_t n) : uint_t n let b_b2i (#n: pos) (vec: bv_t n) : uint_t n =
false
null
false
bv2int vec
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.BV.bv_t", "FStar.BV.bv2int", "FStar.UInt.uint_t" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val b_b2i (#n: pos) (vec: bv_t n) : uint_t n
[]
Vale.Math.Bits.b_b2i
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
vec: FStar.BV.bv_t n -> FStar.UInt.uint_t n
{ "end_col": 74, "end_line": 7, "start_col": 64, "start_line": 7 }
Prims.Tot
val b_i2b (#n: pos) (num: uint_t n) : bv_t n
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let b_i2b (#n:pos) (num:uint_t n) : bv_t n = int2bv num
val b_i2b (#n: pos) (num: uint_t n) : bv_t n let b_i2b (#n: pos) (num: uint_t n) : bv_t n =
false
null
false
int2bv num
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.UInt.uint_t", "FStar.BV.int2bv", "FStar.BV.bv_t" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val b_i2b (#n: pos) (num: uint_t n) : bv_t n
[]
Vale.Math.Bits.b_i2b
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
num: FStar.UInt.uint_t n -> FStar.BV.bv_t n
{ "end_col": 74, "end_line": 6, "start_col": 64, "start_line": 6 }
Prims.Tot
val b_not (#n: pos) (a: bv_t n) : bv_t n
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let b_not (#n:pos) (a:bv_t n) : bv_t n = bvnot a
val b_not (#n: pos) (a: bv_t n) : bv_t n let b_not (#n: pos) (a: bv_t n) : bv_t n =
false
null
false
bvnot a
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.BV.bv_t", "FStar.BV.bvnot" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul [@"opaque_to_smt"] let b_i2b (#n:pos) (num:uint_t n) : bv_t n = int2bv num [@"opaque_to_smt"] let b_b2i (#n:pos) (vec:bv_t n) : uint_t n = bv2int vec [@"opaque_to_smt"] let b_uext (#n #m:pos) (a:bv_t n) : normalize (bv_t (m + n)) = bv_uext #n #m a [@"opaque_to_smt"] let b_and (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvand a b [@"opaque_to_smt"] let b_or (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvor a b
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val b_not (#n: pos) (a: bv_t n) : bv_t n
[]
Vale.Math.Bits.b_not
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: FStar.BV.bv_t n -> FStar.BV.bv_t n
{ "end_col": 67, "end_line": 12, "start_col": 60, "start_line": 12 }
Prims.Tot
val b_shr (#n: pos) (a: bv_t n) (s: nat) : bv_t n
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let b_shr (#n:pos) (a:bv_t n) (s:nat) : bv_t n = bvshr a s
val b_shr (#n: pos) (a: bv_t n) (s: nat) : bv_t n let b_shr (#n: pos) (a: bv_t n) (s: nat) : bv_t n =
false
null
false
bvshr a s
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.BV.bv_t", "Prims.nat", "FStar.BV.bvshr" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul [@"opaque_to_smt"] let b_i2b (#n:pos) (num:uint_t n) : bv_t n = int2bv num [@"opaque_to_smt"] let b_b2i (#n:pos) (vec:bv_t n) : uint_t n = bv2int vec [@"opaque_to_smt"] let b_uext (#n #m:pos) (a:bv_t n) : normalize (bv_t (m + n)) = bv_uext #n #m a [@"opaque_to_smt"] let b_and (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvand a b [@"opaque_to_smt"] let b_or (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvor a b [@"opaque_to_smt"] let b_xor (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvxor a b [@"opaque_to_smt"] let b_not (#n:pos) (a:bv_t n) : bv_t n = bvnot a
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val b_shr (#n: pos) (a: bv_t n) (s: nat) : bv_t n
[]
Vale.Math.Bits.b_shr
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: FStar.BV.bv_t n -> s: Prims.nat -> FStar.BV.bv_t n
{ "end_col": 77, "end_line": 14, "start_col": 68, "start_line": 14 }
Prims.Tot
val b_shl (#n: pos) (a: bv_t n) (s: nat) : bv_t n
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let b_shl (#n:pos) (a:bv_t n) (s:nat) : bv_t n = bvshl a s
val b_shl (#n: pos) (a: bv_t n) (s: nat) : bv_t n let b_shl (#n: pos) (a: bv_t n) (s: nat) : bv_t n =
false
null
false
bvshl a s
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.BV.bv_t", "Prims.nat", "FStar.BV.bvshl" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul [@"opaque_to_smt"] let b_i2b (#n:pos) (num:uint_t n) : bv_t n = int2bv num [@"opaque_to_smt"] let b_b2i (#n:pos) (vec:bv_t n) : uint_t n = bv2int vec [@"opaque_to_smt"] let b_uext (#n #m:pos) (a:bv_t n) : normalize (bv_t (m + n)) = bv_uext #n #m a [@"opaque_to_smt"] let b_and (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvand a b [@"opaque_to_smt"] let b_or (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvor a b [@"opaque_to_smt"] let b_xor (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvxor a b
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val b_shl (#n: pos) (a: bv_t n) (s: nat) : bv_t n
[]
Vale.Math.Bits.b_shl
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: FStar.BV.bv_t n -> s: Prims.nat -> FStar.BV.bv_t n
{ "end_col": 77, "end_line": 13, "start_col": 68, "start_line": 13 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let bveq (#n:pos) (a b:bv_t n) = bvxor a b == bvxor a a
let bveq (#n: pos) (a b: bv_t n) =
false
null
false
bvxor a b == bvxor a a
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.BV.bv_t", "Prims.eq2", "FStar.BV.bvxor", "Prims.logical" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul [@"opaque_to_smt"] let b_i2b (#n:pos) (num:uint_t n) : bv_t n = int2bv num [@"opaque_to_smt"] let b_b2i (#n:pos) (vec:bv_t n) : uint_t n = bv2int vec [@"opaque_to_smt"] let b_uext (#n #m:pos) (a:bv_t n) : normalize (bv_t (m + n)) = bv_uext #n #m a [@"opaque_to_smt"] let b_and (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvand a b [@"opaque_to_smt"] let b_or (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvor a b [@"opaque_to_smt"] let b_xor (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvxor a b [@"opaque_to_smt"] let b_not (#n:pos) (a:bv_t n) : bv_t n = bvnot a [@"opaque_to_smt"] let b_shl (#n:pos) (a:bv_t n) (s:nat) : bv_t n = bvshl a s [@"opaque_to_smt"] let b_shr (#n:pos) (a:bv_t n) (s:nat) : bv_t n = bvshr a s [@"opaque_to_smt"] let b_add (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvadd a b [@"opaque_to_smt"] let b_sub (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvsub a b [@"opaque_to_smt"] let b_mul (#n:pos) (a:bv_t n) (b:uint_t n) : bv_t n = bvmul a b [@"opaque_to_smt"] let b_div (#n:pos) (a:bv_t n) (b:uint_t n{b <> 0}) : bv_t n = bvdiv a b [@"opaque_to_smt"] let b_mod (#n:pos) (a:bv_t n) (b:uint_t n{b <> 0}) : bv_t n = bvmod a b // TODO: b_ult, when F*'s SMT encoding fully supports it private val lemma_pow2_le (m n:nat) : Lemma (requires m <= n) (ensures pow2 m <= pow2 n) let uext (#n #m:pos) (a:uint_t n) : normalize (uint_t (m + n)) = lemma_pow2_le n (n + m); a val lemma_i2b_eq (#n:pos) (a b:uint_t n) : Lemma (requires b_i2b a == b_i2b b) (ensures a == b) val lemma_i2b_uext (#n m:pos) (a:uint_t n) : Lemma (b_i2b (uext #n #m a) == b_uext #n #m (b_i2b #n a)) val lemma_i2b_and (#n:pos) (a b:uint_t n) : Lemma (b_i2b #n (logand #n a b) == b_and #n (b_i2b a) (b_i2b b)) val lemma_i2b_or (#n:pos) (a b:uint_t n) : Lemma (b_i2b #n (logor #n a b) == b_or #n (b_i2b a) (b_i2b b)) val lemma_i2b_xor (#n:pos) (a b:uint_t n) : Lemma (b_i2b #n (logxor #n a b) == b_xor #n (b_i2b a) (b_i2b b)) // TODO, when FStar.BV supports int2bv_lognot: //val lemma_i2b_not (#n:pos) (a:uint_t n) : Lemma // (b_i2b #n (lognot #n a) == b_not #n (b_i2b a)) // TODO (fix FStar.BV): b should be nat, not uint_t n val lemma_i2b_shl (#n:pos) (a:uint_t n) (b:uint_t n) : Lemma (b_i2b #n (shift_left #n a b) == b_shl #n (b_i2b a) b) // TODO (fix FStar.BV): b should be nat, not uint_t n val lemma_i2b_shr (#n:pos) (a:uint_t n) (b:uint_t n) : Lemma (b_i2b #n (shift_right #n a b) == b_shr #n (b_i2b a) b) val lemma_i2b_add (#n:pos) (a b:uint_t n) : Lemma (b_i2b #n (add_mod #n a b) == b_add #n (b_i2b a) (b_i2b b)) val lemma_i2b_sub (#n:pos) (a b:uint_t n) : Lemma (b_i2b #n (sub_mod #n a b) == b_sub #n (b_i2b a) (b_i2b b)) val lemma_i2b_mul (#n:pos) (a b:uint_t n) : Lemma (b_i2b #n (mul_mod #n a b) == b_mul #n (b_i2b a) b) val lemma_i2b_div (#n:pos) (a:uint_t n) (b:uint_t n{b <> 0}) : Lemma (b_i2b #n (udiv #n a b) == b_div #n (b_i2b a) b) val lemma_i2b_mod (#n:pos) (a:uint_t n) (b:uint_t n{b <> 0}) : Lemma (b_i2b #n (mod #n a b) == b_mod #n (b_i2b a) b) val add_hide (#n:pos) (a b:uint_t n) : Pure (uint_t n) (requires True) (ensures fun x -> a + b < pow2 n ==> x == a + b) val sub_hide (#n:pos) (a b:uint_t n) : Pure (uint_t n) (requires True) (ensures fun x -> 0 <= a - b ==> x == a - b) val mul_hide (#n:pos) (a b:uint_t n) : Pure (uint_t n) (requires True) (ensures fun x -> 0 <= a * b /\ (a * b < pow2 n ==> x == a * b)) let lemmas_i2b_all = (forall (#n:pos) (m:pos) (a:uint_t n) (mn:pos).{:pattern (b_i2b #mn (uext #n #m a))} mn == m + n ==> b_i2b #mn (uext #n #m a) == b_uext #n #m (b_i2b #n a)) /\ (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (logand a b))} b_i2b #n (logand #n a b) == b_and #n (b_i2b a) (b_i2b b)) /\ (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (logor a b))} b_i2b #n (logor #n a b) == b_or #n (b_i2b a) (b_i2b b)) /\ (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (logxor a b))} b_i2b #n (logxor #n a b) == b_xor #n (b_i2b a) (b_i2b b)) /\ // TODO: shl and shr should take a nat (see comment above) (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (shift_left a b))} b_i2b #n (shift_left #n a b) == b_shl #n (b_i2b a) b) /\ (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (shift_right a b))} b_i2b #n (shift_right #n a b) == b_shr #n (b_i2b a) b) /\ (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (add_hide a b))} b_i2b #n (add_hide #n a b) == b_add #n (b_i2b a) (b_i2b b)) /\ (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (sub_hide a b))} b_i2b #n (sub_hide #n a b) == b_sub #n (b_i2b a) (b_i2b b)) /\ (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (mul_hide a b))} b_i2b #n (mul_hide #n a b) == b_mul #n (b_i2b a) b) /\ (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (add_mod a b))} b_i2b #n (add_mod #n a b) == b_add #n (b_i2b a) (b_i2b b)) /\ (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (sub_mod a b))} b_i2b #n (sub_mod #n a b) == b_sub #n (b_i2b a) (b_i2b b)) /\ (forall (#n:pos) (a b:uint_t n).{:pattern (b_i2b #n (mul_mod a b))} b_i2b #n (mul_mod #n a b) == b_mul #n (b_i2b a) b) /\ (forall (#n:pos) (a:uint_t n) (b:uint_t n{b <> 0}).{:pattern (b_i2b #n (udiv a b))} b_i2b #n (udiv #n a b) == b_div #n (b_i2b a) b) /\ (forall (#n:pos) (a:uint_t n) (b:uint_t n{b <> 0}).{:pattern (b_i2b #n (mod a b))} b_i2b #n (mod #n a b) == b_mod #n (b_i2b a) b) /\ True val lemma_i2b_all (_:unit) : Lemma lemmas_i2b_all val lemma_i2b_with_all (n:pos) (p:Type0) : Lemma (requires lemmas_i2b_all ==> p) (ensures p) val lemma_i2b_equal (#n:pos) (x y:uint_t n) : Lemma (requires lemmas_i2b_all ==> b_i2b x == b_i2b y) (ensures x == y) unfold let is_bv8 (#n:nat{n >= 8}) (a:bv_t n) = lemma_pow2_le 8 n; a == b_and a (b_i2b 0xff) unfold let is_bv16 (#n:nat{n >= 16}) (a:bv_t n) = lemma_pow2_le 16 n; a == b_and a (b_i2b 0xffff) unfold let is_bv32 (#n:nat{n >= 32}) (a:bv_t n) = lemma_pow2_le 32 n; a == b_and a (b_i2b 0xffffffff) unfold let is_bv64 (#n:nat{n >= 64}) (a:bv_t n) = lemma_pow2_le 64 n; a == b_and a (b_i2b 0xffffffffffffffff)
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val bveq : a: FStar.BV.bv_t n -> b: FStar.BV.bv_t n -> Prims.logical
[]
Vale.Math.Bits.bveq
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: FStar.BV.bv_t n -> b: FStar.BV.bv_t n -> Prims.logical
{ "end_col": 62, "end_line": 115, "start_col": 40, "start_line": 115 }
Prims.Tot
val b_or (#n: pos) (a b: bv_t n) : bv_t n
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let b_or (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvor a b
val b_or (#n: pos) (a b: bv_t n) : bv_t n let b_or (#n: pos) (a b: bv_t n) : bv_t n =
false
null
false
bvor a b
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.BV.bv_t", "FStar.BV.bvor" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul [@"opaque_to_smt"] let b_i2b (#n:pos) (num:uint_t n) : bv_t n = int2bv num [@"opaque_to_smt"] let b_b2i (#n:pos) (vec:bv_t n) : uint_t n = bv2int vec [@"opaque_to_smt"] let b_uext (#n #m:pos) (a:bv_t n) : normalize (bv_t (m + n)) = bv_uext #n #m a
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val b_or (#n: pos) (a b: bv_t n) : bv_t n
[]
Vale.Math.Bits.b_or
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: FStar.BV.bv_t n -> b: FStar.BV.bv_t n -> FStar.BV.bv_t n
{ "end_col": 79, "end_line": 10, "start_col": 71, "start_line": 10 }
Prims.Tot
val b_div (#n: pos) (a: bv_t n) (b: uint_t n {b <> 0}) : bv_t n
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let b_div (#n:pos) (a:bv_t n) (b:uint_t n{b <> 0}) : bv_t n = bvdiv a b
val b_div (#n: pos) (a: bv_t n) (b: uint_t n {b <> 0}) : bv_t n let b_div (#n: pos) (a: bv_t n) (b: uint_t n {b <> 0}) : bv_t n =
false
null
false
bvdiv a b
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.BV.bv_t", "FStar.UInt.uint_t", "Prims.b2t", "Prims.op_disEquality", "Prims.int", "FStar.BV.bvdiv" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul [@"opaque_to_smt"] let b_i2b (#n:pos) (num:uint_t n) : bv_t n = int2bv num [@"opaque_to_smt"] let b_b2i (#n:pos) (vec:bv_t n) : uint_t n = bv2int vec [@"opaque_to_smt"] let b_uext (#n #m:pos) (a:bv_t n) : normalize (bv_t (m + n)) = bv_uext #n #m a [@"opaque_to_smt"] let b_and (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvand a b [@"opaque_to_smt"] let b_or (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvor a b [@"opaque_to_smt"] let b_xor (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvxor a b [@"opaque_to_smt"] let b_not (#n:pos) (a:bv_t n) : bv_t n = bvnot a [@"opaque_to_smt"] let b_shl (#n:pos) (a:bv_t n) (s:nat) : bv_t n = bvshl a s [@"opaque_to_smt"] let b_shr (#n:pos) (a:bv_t n) (s:nat) : bv_t n = bvshr a s [@"opaque_to_smt"] let b_add (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvadd a b [@"opaque_to_smt"] let b_sub (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvsub a b
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val b_div (#n: pos) (a: bv_t n) (b: uint_t n {b <> 0}) : bv_t n
[]
Vale.Math.Bits.b_div
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: FStar.BV.bv_t n -> b: FStar.UInt.uint_t n {b <> 0} -> FStar.BV.bv_t n
{ "end_col": 90, "end_line": 18, "start_col": 81, "start_line": 18 }
Prims.Tot
val uext (#n #m: pos) (a: uint_t n) : normalize (uint_t (m + n))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let uext (#n #m:pos) (a:uint_t n) : normalize (uint_t (m + n)) = lemma_pow2_le n (n + m); a
val uext (#n #m: pos) (a: uint_t n) : normalize (uint_t (m + n)) let uext (#n #m: pos) (a: uint_t n) : normalize (uint_t (m + n)) =
false
null
false
lemma_pow2_le n (n + m); a
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.UInt.uint_t", "Prims.unit", "Vale.Math.Bits.lemma_pow2_le", "Prims.op_Addition", "FStar.Pervasives.normalize" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul [@"opaque_to_smt"] let b_i2b (#n:pos) (num:uint_t n) : bv_t n = int2bv num [@"opaque_to_smt"] let b_b2i (#n:pos) (vec:bv_t n) : uint_t n = bv2int vec [@"opaque_to_smt"] let b_uext (#n #m:pos) (a:bv_t n) : normalize (bv_t (m + n)) = bv_uext #n #m a [@"opaque_to_smt"] let b_and (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvand a b [@"opaque_to_smt"] let b_or (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvor a b [@"opaque_to_smt"] let b_xor (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvxor a b [@"opaque_to_smt"] let b_not (#n:pos) (a:bv_t n) : bv_t n = bvnot a [@"opaque_to_smt"] let b_shl (#n:pos) (a:bv_t n) (s:nat) : bv_t n = bvshl a s [@"opaque_to_smt"] let b_shr (#n:pos) (a:bv_t n) (s:nat) : bv_t n = bvshr a s [@"opaque_to_smt"] let b_add (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvadd a b [@"opaque_to_smt"] let b_sub (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvsub a b [@"opaque_to_smt"] let b_mul (#n:pos) (a:bv_t n) (b:uint_t n) : bv_t n = bvmul a b [@"opaque_to_smt"] let b_div (#n:pos) (a:bv_t n) (b:uint_t n{b <> 0}) : bv_t n = bvdiv a b [@"opaque_to_smt"] let b_mod (#n:pos) (a:bv_t n) (b:uint_t n{b <> 0}) : bv_t n = bvmod a b // TODO: b_ult, when F*'s SMT encoding fully supports it
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val uext (#n #m: pos) (a: uint_t n) : normalize (uint_t (m + n))
[]
Vale.Math.Bits.uext
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: FStar.UInt.uint_t n -> FStar.Pervasives.normalize (FStar.UInt.uint_t (m + n))
{ "end_col": 91, "end_line": 23, "start_col": 65, "start_line": 23 }
Prims.Tot
val b_uext (#n #m: pos) (a: bv_t n) : normalize (bv_t (m + n))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let b_uext (#n #m:pos) (a:bv_t n) : normalize (bv_t (m + n)) = bv_uext #n #m a
val b_uext (#n #m: pos) (a: bv_t n) : normalize (bv_t (m + n)) let b_uext (#n #m: pos) (a: bv_t n) : normalize (bv_t (m + n)) =
false
null
false
bv_uext #n #m a
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.BV.bv_t", "FStar.BV.bv_uext", "FStar.Pervasives.normalize", "Prims.op_Addition" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul [@"opaque_to_smt"] let b_i2b (#n:pos) (num:uint_t n) : bv_t n = int2bv num
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val b_uext (#n #m: pos) (a: bv_t n) : normalize (bv_t (m + n))
[]
Vale.Math.Bits.b_uext
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: FStar.BV.bv_t n -> FStar.Pervasives.normalize (FStar.BV.bv_t (m + n))
{ "end_col": 97, "end_line": 8, "start_col": 82, "start_line": 8 }
Prims.Tot
val b_mod (#n: pos) (a: bv_t n) (b: uint_t n {b <> 0}) : bv_t n
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt", "short_module": null }, { "abbrev": false, "full_module": "FStar.BV", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "Vale.Math", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let b_mod (#n:pos) (a:bv_t n) (b:uint_t n{b <> 0}) : bv_t n = bvmod a b
val b_mod (#n: pos) (a: bv_t n) (b: uint_t n {b <> 0}) : bv_t n let b_mod (#n: pos) (a: bv_t n) (b: uint_t n {b <> 0}) : bv_t n =
false
null
false
bvmod a b
{ "checked_file": "Vale.Math.Bits.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.BV.fsti.checked" ], "interface_file": false, "source_file": "Vale.Math.Bits.fsti" }
[ "total" ]
[ "Prims.pos", "FStar.BV.bv_t", "FStar.UInt.uint_t", "Prims.b2t", "Prims.op_disEquality", "Prims.int", "FStar.BV.bvmod" ]
[]
module Vale.Math.Bits open FStar.BV open FStar.UInt open FStar.Mul [@"opaque_to_smt"] let b_i2b (#n:pos) (num:uint_t n) : bv_t n = int2bv num [@"opaque_to_smt"] let b_b2i (#n:pos) (vec:bv_t n) : uint_t n = bv2int vec [@"opaque_to_smt"] let b_uext (#n #m:pos) (a:bv_t n) : normalize (bv_t (m + n)) = bv_uext #n #m a [@"opaque_to_smt"] let b_and (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvand a b [@"opaque_to_smt"] let b_or (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvor a b [@"opaque_to_smt"] let b_xor (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvxor a b [@"opaque_to_smt"] let b_not (#n:pos) (a:bv_t n) : bv_t n = bvnot a [@"opaque_to_smt"] let b_shl (#n:pos) (a:bv_t n) (s:nat) : bv_t n = bvshl a s [@"opaque_to_smt"] let b_shr (#n:pos) (a:bv_t n) (s:nat) : bv_t n = bvshr a s [@"opaque_to_smt"] let b_add (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvadd a b [@"opaque_to_smt"] let b_sub (#n:pos) (a:bv_t n) (b:bv_t n) : bv_t n = bvsub a b [@"opaque_to_smt"] let b_mul (#n:pos) (a:bv_t n) (b:uint_t n) : bv_t n = bvmul a b
false
false
Vale.Math.Bits.fsti
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val b_mod (#n: pos) (a: bv_t n) (b: uint_t n {b <> 0}) : bv_t n
[]
Vale.Math.Bits.b_mod
{ "file_name": "vale/code/lib/math/Vale.Math.Bits.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: FStar.BV.bv_t n -> b: FStar.UInt.uint_t n {b <> 0} -> FStar.BV.bv_t n
{ "end_col": 90, "end_line": 19, "start_col": 81, "start_line": 19 }