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
Prims.Tot
val inot32 (a: nat32) : nat32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 inot32 (a:nat32) : nat32 = inot a
val inot32 (a: nat32) : nat32 let inot32 (a: nat32) : nat32 =
false
null
false
inot a
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat32", "Vale.Def.Types_s.inot", "Vale.Def.Words_s.pow2_32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b
false
true
Vale.Arch.Types.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 inot32 (a: nat32) : nat32
[]
Vale.Arch.Types.inot32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat32 -> Vale.Def.Words_s.nat32
{ "end_col": 44, "end_line": 26, "start_col": 38, "start_line": 26 }
Prims.Tot
val ixor32 (a b: nat32) : nat32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b
val ixor32 (a b: nat32) : nat32 let ixor32 (a b: nat32) : nat32 =
false
null
false
ixor a b
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat32", "Vale.Def.Types_s.ixor", "Vale.Def.Words_s.pow2_32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y
false
true
Vale.Arch.Types.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 ixor32 (a b: nat32) : nat32
[]
Vale.Arch.Types.ixor32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat32 -> b: Vale.Def.Words_s.nat32 -> Vale.Def.Words_s.nat32
{ "end_col": 56, "end_line": 24, "start_col": 48, "start_line": 24 }
Prims.Tot
val ior128 (a b: nat128) : nat128
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ior128 (a:nat128) (b:nat128) : nat128 = ior a b
val ior128 (a b: nat128) : nat128 let ior128 (a b: nat128) : nat128 =
false
null
false
ior a b
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat128", "Vale.Def.Types_s.ior", "Vale.Def.Words_s.pow2_128" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b
false
true
Vale.Arch.Types.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 ior128 (a b: nat128) : nat128
[]
Vale.Arch.Types.ior128
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat128 -> b: Vale.Def.Words_s.nat128 -> Vale.Def.Words_s.nat128
{ "end_col": 58, "end_line": 39, "start_col": 51, "start_line": 39 }
Prims.Tot
val ishr32 (a: nat32) (s: int) : nat32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ishr32 (a:nat32) (s:int) : nat32 = ishr a s
val ishr32 (a: nat32) (s: int) : nat32 let ishr32 (a: nat32) (s: int) : nat32 =
false
null
false
ishr a s
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat32", "Prims.int", "Vale.Def.Types_s.ishr", "Vale.Def.Words_s.pow2_32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a
false
true
Vale.Arch.Types.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 ishr32 (a: nat32) (s: int) : nat32
[]
Vale.Arch.Types.ishr32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat32 -> s: Prims.int -> Vale.Def.Words_s.nat32
{ "end_col": 54, "end_line": 28, "start_col": 46, "start_line": 28 }
Prims.Tot
val sub_wrap64 (x y: nat64) : nat64
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y
val sub_wrap64 (x y: nat64) : nat64 let sub_wrap64 (x y: nat64) : nat64 =
false
null
false
sub_wrap x y
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat64", "Vale.Def.Types_s.sub_wrap", "Vale.Def.Words_s.pow2_64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y
false
true
Vale.Arch.Types.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 sub_wrap64 (x y: nat64) : nat64
[]
Vale.Arch.Types.sub_wrap64
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
x: Vale.Def.Words_s.nat64 -> y: Vale.Def.Words_s.nat64 -> Vale.Def.Words_s.nat64
{ "end_col": 64, "end_line": 21, "start_col": 52, "start_line": 21 }
Prims.Tot
val add_wrap64 (x y: nat64) : nat64
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y
val add_wrap64 (x y: nat64) : nat64 let add_wrap64 (x y: nat64) : nat64 =
false
null
false
add_wrap x y
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat64", "Vale.Def.Types_s.add_wrap", "Vale.Def.Words_s.pow2_64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor
false
true
Vale.Arch.Types.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 add_wrap64 (x y: nat64) : nat64
[]
Vale.Arch.Types.add_wrap64
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
x: Vale.Def.Words_s.nat64 -> y: Vale.Def.Words_s.nat64 -> Vale.Def.Words_s.nat64
{ "end_col": 64, "end_line": 19, "start_col": 52, "start_line": 19 }
Prims.Tot
val iand32 (a b: nat32) : nat32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 iand32 (a:nat32) (b:nat32) : nat32 = iand a b
val iand32 (a b: nat32) : nat32 let iand32 (a b: nat32) : nat32 =
false
null
false
iand a b
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat32", "Vale.Def.Types_s.iand", "Vale.Def.Words_s.pow2_32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y
false
true
Vale.Arch.Types.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 iand32 (a b: nat32) : nat32
[]
Vale.Arch.Types.iand32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat32 -> b: Vale.Def.Words_s.nat32 -> Vale.Def.Words_s.nat32
{ "end_col": 56, "end_line": 23, "start_col": 48, "start_line": 23 }
Prims.Tot
val ixor128 (a b: nat128) : nat128
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b
val ixor128 (a b: nat128) : nat128 let ixor128 (a b: nat128) : nat128 =
false
null
false
ixor a b
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat128", "Vale.Def.Types_s.ixor", "Vale.Def.Words_s.pow2_128" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s
false
true
Vale.Arch.Types.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 ixor128 (a b: nat128) : nat128
[]
Vale.Arch.Types.ixor128
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat128 -> b: Vale.Def.Words_s.nat128 -> Vale.Def.Words_s.nat128
{ "end_col": 60, "end_line": 38, "start_col": 52, "start_line": 38 }
Prims.Tot
val ior32 (a b: nat32) : nat32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ior32 (a:nat32) (b:nat32) : nat32 = ior a b
val ior32 (a b: nat32) : nat32 let ior32 (a b: nat32) : nat32 =
false
null
false
ior a b
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat32", "Vale.Def.Types_s.ior", "Vale.Def.Words_s.pow2_32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b
false
true
Vale.Arch.Types.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 ior32 (a b: nat32) : nat32
[]
Vale.Arch.Types.ior32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat32 -> b: Vale.Def.Words_s.nat32 -> Vale.Def.Words_s.nat32
{ "end_col": 54, "end_line": 25, "start_col": 47, "start_line": 25 }
Prims.Tot
val ishl32 (a: nat32) (s: int) : nat32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ishl32 (a:nat32) (s:int) : nat32 = ishl a s
val ishl32 (a: nat32) (s: int) : nat32 let ishl32 (a: nat32) (s: int) : nat32 =
false
null
false
ishl a s
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat32", "Prims.int", "Vale.Def.Types_s.ishl", "Vale.Def.Words_s.pow2_32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b
false
true
Vale.Arch.Types.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 ishl32 (a: nat32) (s: int) : nat32
[]
Vale.Arch.Types.ishl32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat32 -> s: Prims.int -> Vale.Def.Words_s.nat32
{ "end_col": 54, "end_line": 27, "start_col": 46, "start_line": 27 }
FStar.Pervasives.Lemma
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 hi64_reveal = opaque_revealer (`%hi64) hi64 hi64_def
let hi64_reveal =
false
null
true
opaque_revealer (`%hi64) hi64 hi64_def
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "lemma" ]
[ "Vale.Def.Opaque_s.opaque_revealer", "Vale.Def.Types_s.quad32", "Vale.Def.Words_s.nat64", "Vale.Arch.Types.hi64", "Vale.Arch.Types.hi64_def" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 ) let lo64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 0) [@"opaque_to_smt"] let lo64 = opaque_make lo64_def irreducible let lo64_reveal = opaque_revealer (`%lo64) lo64 lo64_def let hi64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 1)
false
false
Vale.Arch.Types.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 hi64_reveal : _: Prims.unit -> FStar.Pervasives.Lemma (ensures Vale.Arch.Types.hi64 == Vale.Arch.Types.hi64_def)
[]
Vale.Arch.Types.hi64_reveal
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
_: Prims.unit -> FStar.Pervasives.Lemma (ensures Vale.Arch.Types.hi64 == Vale.Arch.Types.hi64_def)
{ "end_col": 68, "end_line": 120, "start_col": 30, "start_line": 120 }
Prims.Tot
val ishl128 (a: nat128) (s: int) : nat128
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ishl128 (a:nat128) (s:int) : nat128 = ishl a s
val ishl128 (a: nat128) (s: int) : nat128 let ishl128 (a: nat128) (s: int) : nat128 =
false
null
false
ishl a s
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat128", "Prims.int", "Vale.Def.Types_s.ishl", "Vale.Def.Words_s.pow2_128" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b
false
true
Vale.Arch.Types.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 ishl128 (a: nat128) (s: int) : nat128
[]
Vale.Arch.Types.ishl128
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat128 -> s: Prims.int -> Vale.Def.Words_s.nat128
{ "end_col": 57, "end_line": 41, "start_col": 49, "start_line": 41 }
Prims.Tot
val ior64 (a b: nat64) : nat64
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ior64 (a:nat64) (b:nat64) : nat64 = ior a b
val ior64 (a b: nat64) : nat64 let ior64 (a b: nat64) : nat64 =
false
null
false
ior a b
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat64", "Vale.Def.Types_s.ior", "Vale.Def.Words_s.pow2_64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b
false
true
Vale.Arch.Types.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 ior64 (a b: nat64) : nat64
[]
Vale.Arch.Types.ior64
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat64 -> b: Vale.Def.Words_s.nat64 -> Vale.Def.Words_s.nat64
{ "end_col": 54, "end_line": 32, "start_col": 47, "start_line": 32 }
Prims.Tot
val two_to_nat32 (x: two nat32) : nat64
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x
val two_to_nat32 (x: two nat32) : nat64 let two_to_nat32 (x: two nat32) : nat64 =
false
null
false
two_to_nat 32 x
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.two", "Vale.Def.Words_s.nat32", "Vale.Def.Words.Two_s.two_to_nat", "Vale.Def.Words_s.nat64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s
false
true
Vale.Arch.Types.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 two_to_nat32 (x: two nat32) : nat64
[]
Vale.Arch.Types.two_to_nat32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
x: Vale.Def.Words_s.two Vale.Def.Words_s.nat32 -> Vale.Def.Words_s.nat64
{ "end_col": 63, "end_line": 44, "start_col": 48, "start_line": 44 }
Prims.Tot
val inot64 (a: nat64) : nat64
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 inot64 (a:nat64) : nat64 = inot a
val inot64 (a: nat64) : nat64 let inot64 (a: nat64) : nat64 =
false
null
false
inot a
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat64", "Vale.Def.Types_s.inot", "Vale.Def.Words_s.pow2_64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b
false
true
Vale.Arch.Types.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 inot64 (a: nat64) : nat64
[]
Vale.Arch.Types.inot64
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat64 -> Vale.Def.Words_s.nat64
{ "end_col": 44, "end_line": 33, "start_col": 38, "start_line": 33 }
Prims.Tot
val add_wrap32 (x y: nat32) : nat32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y
val add_wrap32 (x y: nat32) : nat32 let add_wrap32 (x y: nat32) : nat32 =
false
null
false
add_wrap x y
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat32", "Vale.Def.Types_s.add_wrap", "Vale.Def.Words_s.pow2_32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor
false
true
Vale.Arch.Types.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 add_wrap32 (x y: nat32) : nat32
[]
Vale.Arch.Types.add_wrap32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
x: Vale.Def.Words_s.nat32 -> y: Vale.Def.Words_s.nat32 -> Vale.Def.Words_s.nat32
{ "end_col": 64, "end_line": 18, "start_col": 52, "start_line": 18 }
Prims.Tot
val quad32_shl32 (q: quad32) : quad32
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2
val quad32_shl32 (q: quad32) : quad32 let quad32_shl32 (q: quad32) : quad32 =
false
null
false
let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Types_s.quad32", "Vale.Def.Types_s.nat32", "Vale.Def.Words_s.Mkfour" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000))
false
true
Vale.Arch.Types.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 quad32_shl32 (q: quad32) : quad32
[]
Vale.Arch.Types.quad32_shl32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q: Vale.Def.Types_s.quad32 -> Vale.Def.Types_s.quad32
{ "end_col": 19, "end_line": 52, "start_col": 38, "start_line": 50 }
Prims.Tot
val inot128 (a: nat128) : nat128
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 inot128 (a:nat128) : nat128 = inot a
val inot128 (a: nat128) : nat128 let inot128 (a: nat128) : nat128 =
false
null
false
inot a
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat128", "Vale.Def.Types_s.inot", "Vale.Def.Words_s.pow2_128" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b
false
true
Vale.Arch.Types.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 inot128 (a: nat128) : nat128
[]
Vale.Arch.Types.inot128
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat128 -> Vale.Def.Words_s.nat128
{ "end_col": 47, "end_line": 40, "start_col": 41, "start_line": 40 }
Prims.Tot
val hi64_def (q: quad32) : nat64
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 hi64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 1)
val hi64_def (q: quad32) : nat64 let hi64_def (q: quad32) : nat64 =
false
null
false
two_to_nat 32 (two_select (four_to_two_two q) 1)
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Types_s.quad32", "Vale.Def.Words.Two_s.two_to_nat", "Vale.Def.Words.Two_s.two_select", "Vale.Def.Words_s.two", "Vale.Def.Types_s.nat32", "Vale.Def.Words.Four_s.four_to_two_two", "Vale.Def.Words_s.nat64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 ) let lo64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 0) [@"opaque_to_smt"] let lo64 = opaque_make lo64_def irreducible let lo64_reveal = opaque_revealer (`%lo64) lo64 lo64_def
false
true
Vale.Arch.Types.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 hi64_def (q: quad32) : nat64
[]
Vale.Arch.Types.hi64_def
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q: Vale.Def.Types_s.quad32 -> Vale.Def.Words_s.nat64
{ "end_col": 82, "end_line": 118, "start_col": 34, "start_line": 118 }
Prims.Tot
val quad32_double_lo (q: quad32) : double32
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo
val quad32_double_lo (q: quad32) : double32 let quad32_double_lo (q: quad32) : double32 =
false
null
false
(four_to_two_two q).lo
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Types_s.quad32", "Vale.Def.Words_s.__proj__Mktwo__item__lo", "Vale.Def.Words_s.two", "Vale.Def.Types_s.nat32", "Vale.Def.Words.Four_s.four_to_two_two", "Vale.Def.Types_s.double32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0)
false
true
Vale.Arch.Types.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 quad32_double_lo (q: quad32) : double32
[]
Vale.Arch.Types.quad32_double_lo
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q: Vale.Def.Types_s.quad32 -> Vale.Def.Types_s.double32
{ "end_col": 67, "end_line": 78, "start_col": 45, "start_line": 78 }
Prims.Tot
val sub_wrap32 (x y: nat32) : nat32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y
val sub_wrap32 (x y: nat32) : nat32 let sub_wrap32 (x y: nat32) : nat32 =
false
null
false
sub_wrap x y
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat32", "Vale.Def.Types_s.sub_wrap", "Vale.Def.Words_s.pow2_32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y
false
true
Vale.Arch.Types.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 sub_wrap32 (x y: nat32) : nat32
[]
Vale.Arch.Types.sub_wrap32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
x: Vale.Def.Words_s.nat32 -> y: Vale.Def.Words_s.nat32 -> Vale.Def.Words_s.nat32
{ "end_col": 64, "end_line": 20, "start_col": 52, "start_line": 20 }
Prims.Tot
val ishl64 (a: nat64) (s: int) : nat64
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ishl64 (a:nat64) (s:int) : nat64 = ishl a s
val ishl64 (a: nat64) (s: int) : nat64 let ishl64 (a: nat64) (s: int) : nat64 =
false
null
false
ishl a s
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat64", "Prims.int", "Vale.Def.Types_s.ishl", "Vale.Def.Words_s.pow2_64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b
false
true
Vale.Arch.Types.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 ishl64 (a: nat64) (s: int) : nat64
[]
Vale.Arch.Types.ishl64
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat64 -> s: Prims.int -> Vale.Def.Words_s.nat64
{ "end_col": 54, "end_line": 34, "start_col": 46, "start_line": 34 }
Prims.Tot
val add_wrap_quad32 (q0 q1: quad32) : quad32
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3)
val add_wrap_quad32 (q0 q1: quad32) : quad32 let add_wrap_quad32 (q0 q1: quad32) : quad32 =
false
null
false
let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3)
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Types_s.quad32", "Vale.Def.Words_s.Mkfour", "Vale.Def.Types_s.nat32", "Vale.Def.Types_s.add_wrap", "Vale.Def.Words_s.pow2_32", "Vale.Def.Words_s.__proj__Mkfour__item__lo0", "Vale.Def.Words_s.__proj__Mkfour__item__lo1", "Vale.Def.Words_s.__proj__Mkfour__item__hi2", "Vale.Def.Words_s.__proj__Mkfour__item__hi3" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2
false
true
Vale.Arch.Types.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 add_wrap_quad32 (q0 q1: quad32) : quad32
[]
Vale.Arch.Types.add_wrap_quad32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q0: Vale.Def.Types_s.quad32 -> q1: Vale.Def.Types_s.quad32 -> Vale.Def.Types_s.quad32
{ "end_col": 33, "end_line": 59, "start_col": 2, "start_line": 55 }
Prims.Tot
val ishr128 (a: nat128) (s: int) : nat128
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ishr128 (a:nat128) (s:int) : nat128 = ishr a s
val ishr128 (a: nat128) (s: int) : nat128 let ishr128 (a: nat128) (s: int) : nat128 =
false
null
false
ishr a s
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat128", "Prims.int", "Vale.Def.Types_s.ishr", "Vale.Def.Words_s.pow2_128" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a
false
true
Vale.Arch.Types.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 ishr128 (a: nat128) (s: int) : nat128
[]
Vale.Arch.Types.ishr128
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat128 -> s: Prims.int -> Vale.Def.Words_s.nat128
{ "end_col": 57, "end_line": 42, "start_col": 49, "start_line": 42 }
Prims.Tot
val reverse_bytes_quad32_seq (s: seq quad32) : seq quad32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 reverse_bytes_quad32_seq (s:seq quad32) : seq quad32 = seq_map reverse_bytes_quad32 s
val reverse_bytes_quad32_seq (s: seq quad32) : seq quad32 let reverse_bytes_quad32_seq (s: seq quad32) : seq quad32 =
false
null
false
seq_map reverse_bytes_quad32 s
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Lib.Seqs_s.seq_map", "Vale.Def.Types_s.reverse_bytes_quad32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 ) let lo64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 0) [@"opaque_to_smt"] let lo64 = opaque_make lo64_def irreducible let lo64_reveal = opaque_revealer (`%lo64) lo64 lo64_def let hi64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 1) [@"opaque_to_smt"] let hi64 = opaque_make hi64_def irreducible let hi64_reveal = opaque_revealer (`%hi64) hi64 hi64_def val lemma_lo64_properties (_:unit) : Lemma (forall (q0 q1:quad32).{:pattern lo64 q0; lo64 q1} (q0.lo0 == q1.lo0 /\ q0.lo1 == q1.lo1) <==> (lo64 q0 == lo64 q1)) val lemma_hi64_properties (_:unit) : Lemma (forall (q0 q1:quad32).{:pattern hi64 q0; hi64 q1} (q0.hi2 == q1.hi2 /\ q0.hi3 == q1.hi3) <==> (hi64 q0 == hi64 q1)) val lemma_reverse_bytes_quad32_64 (src orig final:quad32) : Lemma (requires final == insert_nat64 (insert_nat64 orig (reverse_bytes_nat64 (hi64 src)) 0) (reverse_bytes_nat64 (lo64 src)) 1) (ensures final == reverse_bytes_quad32 src) val lemma_equality_check_helper (q:quad32) : Lemma ((q.lo0 == 0 /\ q.lo1 == 0 ==> lo64 q == 0) /\ ((not (q.lo0 = 0) \/ not (q.lo1 = 0)) ==> not (lo64 q = 0)) /\ (q.hi2 == 0 /\ q.hi3 == 0 ==> hi64 q == 0) /\ ((~(q.hi2 = 0) \/ ~(q.hi3 = 0)) ==> ~(hi64 q = 0)) /\ (q.lo0 == 0xFFFFFFFF /\ q.lo1 == 0xFFFFFFFF <==> lo64 q == 0xFFFFFFFFFFFFFFFF) /\ (q.hi2 == 0xFFFFFFFF /\ q.hi3 == 0xFFFFFFFF <==> hi64 q == 0xFFFFFFFFFFFFFFFF) ) let lemma_equality_check_helper_2 (q1 q2 cmp:quad32) (tmp1 result1 tmp2 tmp3 result2:nat64) : Lemma (requires cmp == Mkfour (if q1.lo0 = q2.lo0 then 0xFFFFFFFF else 0) (if q1.lo1 = q2.lo1 then 0xFFFFFFFF else 0) (if q1.hi2 = q2.hi2 then 0xFFFFFFFF else 0) (if q1.hi3 = q2.hi3 then 0xFFFFFFFF else 0) /\ tmp1 = lo64 cmp /\ result1 = (if tmp1 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ tmp2 = hi64 cmp /\ tmp3 = (if tmp2 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ result2 = tmp3 + result1) (ensures (if q1 = q2 then result2 = 0 else result2 > 0)) = lemma_equality_check_helper cmp; () val push_pop_xmm (x y:quad32) : Lemma (let x' = insert_nat64 (insert_nat64 y (hi64 x) 1) (lo64 x) 0 in x == x') val lemma_insrq_extrq_relations (x y:quad32) : Lemma (let z = insert_nat64 x (lo64 y) 0 in z == Mkfour y.lo0 y.lo1 x.hi2 x.hi3 /\ (let z = insert_nat64 x (hi64 y) 1 in z == Mkfour x.lo0 x.lo1 y.hi2 y.hi3)) val le_bytes_to_nat64_to_bytes (s:nat64) : Lemma (le_bytes_to_nat64 (le_nat64_to_bytes s) == s) val le_nat64_to_bytes_to_nat64 (s:seq nat8 { length s == 8 }) : Lemma (le_nat64_to_bytes (le_bytes_to_nat64 s) == s) val le_bytes_to_seq_quad32_empty: unit -> Lemma (forall s . {:pattern (length (le_bytes_to_seq_quad32 s)) } length s == 0 ==> length (le_bytes_to_seq_quad32 s) == 0) val be_bytes_to_seq_quad32_empty: unit -> Lemma (forall s . {:pattern (length (be_bytes_to_seq_quad32 s)) } length s == 0 ==> length (be_bytes_to_seq_quad32 s) == 0) val le_bytes_to_seq_quad32_to_bytes_one_quad (b:quad32) : Lemma (le_bytes_to_seq_quad32 (le_quad32_to_bytes b) == create 1 b) let be_quad32_to_bytes (q:quad32) : seq16 nat8 = seq_four_to_seq_BE (seq_map (nat_to_four 8) (four_to_seq_BE q)) val be_bytes_to_seq_quad32_to_bytes_one_quad (b:quad32) : Lemma (be_bytes_to_seq_quad32 (be_quad32_to_bytes b) == create 1 b) val le_bytes_to_seq_quad32_to_bytes (s:seq quad32) : Lemma (le_bytes_to_seq_quad32 (le_seq_quad32_to_bytes s) == s) val be_bytes_to_seq_quad32_to_bytes (s:seq quad32) : Lemma (be_bytes_to_seq_quad32 (seq_nat32_to_seq_nat8_BE (seq_four_to_seq_BE s)) == s) val le_seq_quad32_to_bytes_to_seq_quad32 (s:seq nat8{length s % 16 = 0}) : Lemma (le_seq_quad32_to_bytes (le_bytes_to_seq_quad32 s) == s) val le_quad32_to_bytes_to_quad32 (s:seq nat8 { length s == 16 }) : Lemma(le_quad32_to_bytes (le_bytes_to_quad32 s) == s) val be_quad32_to_bytes_to_quad32 (s:seq nat8 { length s == 16 }) : Lemma(be_quad32_to_bytes (be_bytes_to_quad32 s) == s) val le_seq_quad32_to_bytes_of_singleton (q:quad32) : Lemma (le_quad32_to_bytes q == le_seq_quad32_to_bytes (create 1 q)) val be_seq_quad32_to_bytes_of_singleton (q:quad32) : Lemma (be_quad32_to_bytes q == seq_nat32_to_seq_nat8_BE (seq_four_to_seq_BE (create 1 q))) val le_quad32_to_bytes_injective: unit -> Lemma (forall b b' . le_quad32_to_bytes b == le_quad32_to_bytes b' ==> b == b') val be_quad32_to_bytes_injective: unit -> Lemma (forall b b' . be_quad32_to_bytes b == be_quad32_to_bytes b' ==> b == b') val le_quad32_to_bytes_injective_specific (b b':quad32) : Lemma (le_quad32_to_bytes b == le_quad32_to_bytes b' ==> b == b') val be_quad32_to_bytes_injective_specific (b b':quad32) : Lemma (be_quad32_to_bytes b == be_quad32_to_bytes b' ==> b == b') val le_seq_quad32_to_bytes_injective (b b':Seq.seq quad32) : Lemma (requires Seq.equal (le_seq_quad32_to_bytes b) (le_seq_quad32_to_bytes b')) (ensures b == b') val seq_to_four_LE_is_seq_to_seq_four_LE (#a:Type) (s:seq4 a) : Lemma (create 1 (seq_to_four_LE s) == seq_to_seq_four_LE s) val seq_to_four_BE_is_seq_to_seq_four_BE (#a:Type) (s:seq4 a) : Lemma (create 1 (seq_to_four_BE s) == seq_to_seq_four_BE s) val le_bytes_to_seq_quad_of_singleton (q:quad32) (b:seq nat8 { length b == 16 }) : Lemma (requires q == le_bytes_to_quad32 b) (ensures create 1 q == le_bytes_to_seq_quad32 b) val be_bytes_to_seq_quad_of_singleton (q:quad32) (b:seq nat8 { length b == 16 }) : Lemma (requires q == be_bytes_to_quad32 b) (ensures create 1 q == be_bytes_to_seq_quad32 b) val le_bytes_to_quad32_to_bytes (q:quad32) : Lemma(le_bytes_to_quad32 (le_quad32_to_bytes q) == q) val be_bytes_to_quad32_to_bytes (q:quad32) : Lemma (be_bytes_to_quad32 (be_quad32_to_bytes q) == q) [SMTPat (be_bytes_to_quad32 (be_quad32_to_bytes q))] // Reverse each nat32 in the quad, but leave the nat32s in their original order let reverse_bytes_nat32_quad32 (q:quad32) : quad32 = Vale.Def.Words.Four_s.four_map reverse_bytes_nat32 q val lemma_reverse_reverse_bytes_nat32_quad32 (s:quad32) : Lemma (reverse_bytes_nat32_quad32 (reverse_bytes_nat32_quad32 s) == s) [SMTPat (reverse_bytes_nat32_quad32 (reverse_bytes_nat32_quad32 s))] let reverse_bytes_nat32_quad32_seq (q:seq quad32) : seq quad32 = seq_map reverse_bytes_nat32_quad32 q val lemma_reverse_reverse_bytes_nat32_quad32_seq (s:seq quad32) : Lemma (reverse_bytes_nat32_quad32_seq (reverse_bytes_nat32_quad32_seq s) == s) [SMTPat (reverse_bytes_nat32_quad32_seq (reverse_bytes_nat32_quad32_seq s))]
false
true
Vale.Arch.Types.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 reverse_bytes_quad32_seq (s: seq quad32) : seq quad32
[]
Vale.Arch.Types.reverse_bytes_quad32_seq
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
s: FStar.Seq.Base.seq Vale.Def.Types_s.quad32 -> FStar.Seq.Base.seq Vale.Def.Types_s.quad32
{ "end_col": 32, "end_line": 263, "start_col": 2, "start_line": 263 }
FStar.Pervasives.Lemma
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 lo64_reveal = opaque_revealer (`%lo64) lo64 lo64_def
let lo64_reveal =
false
null
true
opaque_revealer (`%lo64) lo64 lo64_def
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "lemma" ]
[ "Vale.Def.Opaque_s.opaque_revealer", "Vale.Def.Types_s.quad32", "Vale.Def.Words_s.nat64", "Vale.Arch.Types.lo64", "Vale.Arch.Types.lo64_def" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 ) let lo64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 0)
false
false
Vale.Arch.Types.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 lo64_reveal : _: Prims.unit -> FStar.Pervasives.Lemma (ensures Vale.Arch.Types.lo64 == Vale.Arch.Types.lo64_def)
[]
Vale.Arch.Types.lo64_reveal
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
_: Prims.unit -> FStar.Pervasives.Lemma (ensures Vale.Arch.Types.lo64 == Vale.Arch.Types.lo64_def)
{ "end_col": 68, "end_line": 116, "start_col": 30, "start_line": 116 }
Prims.Tot
val iand64 (a b: nat64) : nat64
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 iand64 (a:nat64) (b:nat64) : nat64 = iand a b
val iand64 (a b: nat64) : nat64 let iand64 (a b: nat64) : nat64 =
false
null
false
iand a b
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat64", "Vale.Def.Types_s.iand", "Vale.Def.Words_s.pow2_64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s
false
true
Vale.Arch.Types.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 iand64 (a b: nat64) : nat64
[]
Vale.Arch.Types.iand64
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat64 -> b: Vale.Def.Words_s.nat64 -> Vale.Def.Words_s.nat64
{ "end_col": 56, "end_line": 30, "start_col": 48, "start_line": 30 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 hi64 = opaque_make hi64_def
let hi64 =
false
null
false
opaque_make hi64_def
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Opaque_s.opaque_make", "Vale.Def.Types_s.quad32", "Vale.Def.Words_s.nat64", "Vale.Arch.Types.hi64_def" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 ) let lo64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 0) [@"opaque_to_smt"] let lo64 = opaque_make lo64_def irreducible let lo64_reveal = opaque_revealer (`%lo64) lo64 lo64_def
false
true
Vale.Arch.Types.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 hi64 : _: Vale.Def.Types_s.quad32 -> Vale.Def.Words_s.nat64
[]
Vale.Arch.Types.hi64
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
_: Vale.Def.Types_s.quad32 -> Vale.Def.Words_s.nat64
{ "end_col": 50, "end_line": 119, "start_col": 30, "start_line": 119 }
Prims.Tot
val ishr64 (a: nat64) (s: int) : nat64
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ishr64 (a:nat64) (s:int) : nat64 = ishr a s
val ishr64 (a: nat64) (s: int) : nat64 let ishr64 (a: nat64) (s: int) : nat64 =
false
null
false
ishr a s
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat64", "Prims.int", "Vale.Def.Types_s.ishr", "Vale.Def.Words_s.pow2_64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a
false
true
Vale.Arch.Types.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 ishr64 (a: nat64) (s: int) : nat64
[]
Vale.Arch.Types.ishr64
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat64 -> s: Prims.int -> Vale.Def.Words_s.nat64
{ "end_col": 54, "end_line": 35, "start_col": 46, "start_line": 35 }
Prims.Tot
val lo64_def (q: quad32) : nat64
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 lo64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 0)
val lo64_def (q: quad32) : nat64 let lo64_def (q: quad32) : nat64 =
false
null
false
two_to_nat 32 (two_select (four_to_two_two q) 0)
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Types_s.quad32", "Vale.Def.Words.Two_s.two_to_nat", "Vale.Def.Words.Two_s.two_select", "Vale.Def.Words_s.two", "Vale.Def.Types_s.nat32", "Vale.Def.Words.Four_s.four_to_two_two", "Vale.Def.Words_s.nat64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 )
false
true
Vale.Arch.Types.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 lo64_def (q: quad32) : nat64
[]
Vale.Arch.Types.lo64_def
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q: Vale.Def.Types_s.quad32 -> Vale.Def.Words_s.nat64
{ "end_col": 82, "end_line": 114, "start_col": 34, "start_line": 114 }
Prims.Tot
val reverse_bytes_nat32_quad32 (q: quad32) : quad32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 reverse_bytes_nat32_quad32 (q:quad32) : quad32 = Vale.Def.Words.Four_s.four_map reverse_bytes_nat32 q
val reverse_bytes_nat32_quad32 (q: quad32) : quad32 let reverse_bytes_nat32_quad32 (q: quad32) : quad32 =
false
null
false
Vale.Def.Words.Four_s.four_map reverse_bytes_nat32 q
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Types_s.quad32", "Vale.Def.Words.Four_s.four_map", "Vale.Def.Types_s.nat32", "Vale.Def.Types_s.reverse_bytes_nat32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 ) let lo64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 0) [@"opaque_to_smt"] let lo64 = opaque_make lo64_def irreducible let lo64_reveal = opaque_revealer (`%lo64) lo64 lo64_def let hi64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 1) [@"opaque_to_smt"] let hi64 = opaque_make hi64_def irreducible let hi64_reveal = opaque_revealer (`%hi64) hi64 hi64_def val lemma_lo64_properties (_:unit) : Lemma (forall (q0 q1:quad32).{:pattern lo64 q0; lo64 q1} (q0.lo0 == q1.lo0 /\ q0.lo1 == q1.lo1) <==> (lo64 q0 == lo64 q1)) val lemma_hi64_properties (_:unit) : Lemma (forall (q0 q1:quad32).{:pattern hi64 q0; hi64 q1} (q0.hi2 == q1.hi2 /\ q0.hi3 == q1.hi3) <==> (hi64 q0 == hi64 q1)) val lemma_reverse_bytes_quad32_64 (src orig final:quad32) : Lemma (requires final == insert_nat64 (insert_nat64 orig (reverse_bytes_nat64 (hi64 src)) 0) (reverse_bytes_nat64 (lo64 src)) 1) (ensures final == reverse_bytes_quad32 src) val lemma_equality_check_helper (q:quad32) : Lemma ((q.lo0 == 0 /\ q.lo1 == 0 ==> lo64 q == 0) /\ ((not (q.lo0 = 0) \/ not (q.lo1 = 0)) ==> not (lo64 q = 0)) /\ (q.hi2 == 0 /\ q.hi3 == 0 ==> hi64 q == 0) /\ ((~(q.hi2 = 0) \/ ~(q.hi3 = 0)) ==> ~(hi64 q = 0)) /\ (q.lo0 == 0xFFFFFFFF /\ q.lo1 == 0xFFFFFFFF <==> lo64 q == 0xFFFFFFFFFFFFFFFF) /\ (q.hi2 == 0xFFFFFFFF /\ q.hi3 == 0xFFFFFFFF <==> hi64 q == 0xFFFFFFFFFFFFFFFF) ) let lemma_equality_check_helper_2 (q1 q2 cmp:quad32) (tmp1 result1 tmp2 tmp3 result2:nat64) : Lemma (requires cmp == Mkfour (if q1.lo0 = q2.lo0 then 0xFFFFFFFF else 0) (if q1.lo1 = q2.lo1 then 0xFFFFFFFF else 0) (if q1.hi2 = q2.hi2 then 0xFFFFFFFF else 0) (if q1.hi3 = q2.hi3 then 0xFFFFFFFF else 0) /\ tmp1 = lo64 cmp /\ result1 = (if tmp1 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ tmp2 = hi64 cmp /\ tmp3 = (if tmp2 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ result2 = tmp3 + result1) (ensures (if q1 = q2 then result2 = 0 else result2 > 0)) = lemma_equality_check_helper cmp; () val push_pop_xmm (x y:quad32) : Lemma (let x' = insert_nat64 (insert_nat64 y (hi64 x) 1) (lo64 x) 0 in x == x') val lemma_insrq_extrq_relations (x y:quad32) : Lemma (let z = insert_nat64 x (lo64 y) 0 in z == Mkfour y.lo0 y.lo1 x.hi2 x.hi3 /\ (let z = insert_nat64 x (hi64 y) 1 in z == Mkfour x.lo0 x.lo1 y.hi2 y.hi3)) val le_bytes_to_nat64_to_bytes (s:nat64) : Lemma (le_bytes_to_nat64 (le_nat64_to_bytes s) == s) val le_nat64_to_bytes_to_nat64 (s:seq nat8 { length s == 8 }) : Lemma (le_nat64_to_bytes (le_bytes_to_nat64 s) == s) val le_bytes_to_seq_quad32_empty: unit -> Lemma (forall s . {:pattern (length (le_bytes_to_seq_quad32 s)) } length s == 0 ==> length (le_bytes_to_seq_quad32 s) == 0) val be_bytes_to_seq_quad32_empty: unit -> Lemma (forall s . {:pattern (length (be_bytes_to_seq_quad32 s)) } length s == 0 ==> length (be_bytes_to_seq_quad32 s) == 0) val le_bytes_to_seq_quad32_to_bytes_one_quad (b:quad32) : Lemma (le_bytes_to_seq_quad32 (le_quad32_to_bytes b) == create 1 b) let be_quad32_to_bytes (q:quad32) : seq16 nat8 = seq_four_to_seq_BE (seq_map (nat_to_four 8) (four_to_seq_BE q)) val be_bytes_to_seq_quad32_to_bytes_one_quad (b:quad32) : Lemma (be_bytes_to_seq_quad32 (be_quad32_to_bytes b) == create 1 b) val le_bytes_to_seq_quad32_to_bytes (s:seq quad32) : Lemma (le_bytes_to_seq_quad32 (le_seq_quad32_to_bytes s) == s) val be_bytes_to_seq_quad32_to_bytes (s:seq quad32) : Lemma (be_bytes_to_seq_quad32 (seq_nat32_to_seq_nat8_BE (seq_four_to_seq_BE s)) == s) val le_seq_quad32_to_bytes_to_seq_quad32 (s:seq nat8{length s % 16 = 0}) : Lemma (le_seq_quad32_to_bytes (le_bytes_to_seq_quad32 s) == s) val le_quad32_to_bytes_to_quad32 (s:seq nat8 { length s == 16 }) : Lemma(le_quad32_to_bytes (le_bytes_to_quad32 s) == s) val be_quad32_to_bytes_to_quad32 (s:seq nat8 { length s == 16 }) : Lemma(be_quad32_to_bytes (be_bytes_to_quad32 s) == s) val le_seq_quad32_to_bytes_of_singleton (q:quad32) : Lemma (le_quad32_to_bytes q == le_seq_quad32_to_bytes (create 1 q)) val be_seq_quad32_to_bytes_of_singleton (q:quad32) : Lemma (be_quad32_to_bytes q == seq_nat32_to_seq_nat8_BE (seq_four_to_seq_BE (create 1 q))) val le_quad32_to_bytes_injective: unit -> Lemma (forall b b' . le_quad32_to_bytes b == le_quad32_to_bytes b' ==> b == b') val be_quad32_to_bytes_injective: unit -> Lemma (forall b b' . be_quad32_to_bytes b == be_quad32_to_bytes b' ==> b == b') val le_quad32_to_bytes_injective_specific (b b':quad32) : Lemma (le_quad32_to_bytes b == le_quad32_to_bytes b' ==> b == b') val be_quad32_to_bytes_injective_specific (b b':quad32) : Lemma (be_quad32_to_bytes b == be_quad32_to_bytes b' ==> b == b') val le_seq_quad32_to_bytes_injective (b b':Seq.seq quad32) : Lemma (requires Seq.equal (le_seq_quad32_to_bytes b) (le_seq_quad32_to_bytes b')) (ensures b == b') val seq_to_four_LE_is_seq_to_seq_four_LE (#a:Type) (s:seq4 a) : Lemma (create 1 (seq_to_four_LE s) == seq_to_seq_four_LE s) val seq_to_four_BE_is_seq_to_seq_four_BE (#a:Type) (s:seq4 a) : Lemma (create 1 (seq_to_four_BE s) == seq_to_seq_four_BE s) val le_bytes_to_seq_quad_of_singleton (q:quad32) (b:seq nat8 { length b == 16 }) : Lemma (requires q == le_bytes_to_quad32 b) (ensures create 1 q == le_bytes_to_seq_quad32 b) val be_bytes_to_seq_quad_of_singleton (q:quad32) (b:seq nat8 { length b == 16 }) : Lemma (requires q == be_bytes_to_quad32 b) (ensures create 1 q == be_bytes_to_seq_quad32 b) val le_bytes_to_quad32_to_bytes (q:quad32) : Lemma(le_bytes_to_quad32 (le_quad32_to_bytes q) == q) val be_bytes_to_quad32_to_bytes (q:quad32) : Lemma (be_bytes_to_quad32 (be_quad32_to_bytes q) == q) [SMTPat (be_bytes_to_quad32 (be_quad32_to_bytes q))] // Reverse each nat32 in the quad, but leave the nat32s in their original order
false
true
Vale.Arch.Types.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 reverse_bytes_nat32_quad32 (q: quad32) : quad32
[]
Vale.Arch.Types.reverse_bytes_nat32_quad32
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q: Vale.Def.Types_s.quad32 -> Vale.Def.Types_s.quad32
{ "end_col": 54, "end_line": 249, "start_col": 2, "start_line": 249 }
Prims.Tot
val iand128 (a b: nat128) : nat128
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 iand128 (a:nat128) (b:nat128) : nat128 = iand a b
val iand128 (a b: nat128) : nat128 let iand128 (a b: nat128) : nat128 =
false
null
false
iand a b
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat128", "Vale.Def.Types_s.iand", "Vale.Def.Words_s.pow2_128" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s
false
true
Vale.Arch.Types.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 iand128 (a b: nat128) : nat128
[]
Vale.Arch.Types.iand128
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat128 -> b: Vale.Def.Words_s.nat128 -> Vale.Def.Words_s.nat128
{ "end_col": 60, "end_line": 37, "start_col": 52, "start_line": 37 }
Prims.Tot
val quad32_to_seq (q: quad32) : seq nat32
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q
val quad32_to_seq (q: quad32) : seq nat32 let quad32_to_seq (q: quad32) : seq nat32 =
false
null
false
four_to_seq_LE q
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Types_s.quad32", "Vale.Def.Words.Seq_s.four_to_seq_LE", "Vale.Def.Types_s.nat32", "FStar.Seq.Base.seq", "Vale.Def.Words_s.nat32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))]
false
true
Vale.Arch.Types.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 quad32_to_seq (q: quad32) : seq nat32
[]
Vale.Arch.Types.quad32_to_seq
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q: Vale.Def.Types_s.quad32 -> FStar.Seq.Base.seq Vale.Def.Words_s.nat32
{ "end_col": 66, "end_line": 97, "start_col": 50, "start_line": 97 }
Prims.Tot
val reverse_bytes_nat32_quad32_seq (q: seq quad32) : seq quad32
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 reverse_bytes_nat32_quad32_seq (q:seq quad32) : seq quad32 = seq_map reverse_bytes_nat32_quad32 q
val reverse_bytes_nat32_quad32_seq (q: seq quad32) : seq quad32 let reverse_bytes_nat32_quad32_seq (q: seq quad32) : seq quad32 =
false
null
false
seq_map reverse_bytes_nat32_quad32 q
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Lib.Seqs_s.seq_map", "Vale.Arch.Types.reverse_bytes_nat32_quad32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 ) let lo64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 0) [@"opaque_to_smt"] let lo64 = opaque_make lo64_def irreducible let lo64_reveal = opaque_revealer (`%lo64) lo64 lo64_def let hi64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 1) [@"opaque_to_smt"] let hi64 = opaque_make hi64_def irreducible let hi64_reveal = opaque_revealer (`%hi64) hi64 hi64_def val lemma_lo64_properties (_:unit) : Lemma (forall (q0 q1:quad32).{:pattern lo64 q0; lo64 q1} (q0.lo0 == q1.lo0 /\ q0.lo1 == q1.lo1) <==> (lo64 q0 == lo64 q1)) val lemma_hi64_properties (_:unit) : Lemma (forall (q0 q1:quad32).{:pattern hi64 q0; hi64 q1} (q0.hi2 == q1.hi2 /\ q0.hi3 == q1.hi3) <==> (hi64 q0 == hi64 q1)) val lemma_reverse_bytes_quad32_64 (src orig final:quad32) : Lemma (requires final == insert_nat64 (insert_nat64 orig (reverse_bytes_nat64 (hi64 src)) 0) (reverse_bytes_nat64 (lo64 src)) 1) (ensures final == reverse_bytes_quad32 src) val lemma_equality_check_helper (q:quad32) : Lemma ((q.lo0 == 0 /\ q.lo1 == 0 ==> lo64 q == 0) /\ ((not (q.lo0 = 0) \/ not (q.lo1 = 0)) ==> not (lo64 q = 0)) /\ (q.hi2 == 0 /\ q.hi3 == 0 ==> hi64 q == 0) /\ ((~(q.hi2 = 0) \/ ~(q.hi3 = 0)) ==> ~(hi64 q = 0)) /\ (q.lo0 == 0xFFFFFFFF /\ q.lo1 == 0xFFFFFFFF <==> lo64 q == 0xFFFFFFFFFFFFFFFF) /\ (q.hi2 == 0xFFFFFFFF /\ q.hi3 == 0xFFFFFFFF <==> hi64 q == 0xFFFFFFFFFFFFFFFF) ) let lemma_equality_check_helper_2 (q1 q2 cmp:quad32) (tmp1 result1 tmp2 tmp3 result2:nat64) : Lemma (requires cmp == Mkfour (if q1.lo0 = q2.lo0 then 0xFFFFFFFF else 0) (if q1.lo1 = q2.lo1 then 0xFFFFFFFF else 0) (if q1.hi2 = q2.hi2 then 0xFFFFFFFF else 0) (if q1.hi3 = q2.hi3 then 0xFFFFFFFF else 0) /\ tmp1 = lo64 cmp /\ result1 = (if tmp1 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ tmp2 = hi64 cmp /\ tmp3 = (if tmp2 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ result2 = tmp3 + result1) (ensures (if q1 = q2 then result2 = 0 else result2 > 0)) = lemma_equality_check_helper cmp; () val push_pop_xmm (x y:quad32) : Lemma (let x' = insert_nat64 (insert_nat64 y (hi64 x) 1) (lo64 x) 0 in x == x') val lemma_insrq_extrq_relations (x y:quad32) : Lemma (let z = insert_nat64 x (lo64 y) 0 in z == Mkfour y.lo0 y.lo1 x.hi2 x.hi3 /\ (let z = insert_nat64 x (hi64 y) 1 in z == Mkfour x.lo0 x.lo1 y.hi2 y.hi3)) val le_bytes_to_nat64_to_bytes (s:nat64) : Lemma (le_bytes_to_nat64 (le_nat64_to_bytes s) == s) val le_nat64_to_bytes_to_nat64 (s:seq nat8 { length s == 8 }) : Lemma (le_nat64_to_bytes (le_bytes_to_nat64 s) == s) val le_bytes_to_seq_quad32_empty: unit -> Lemma (forall s . {:pattern (length (le_bytes_to_seq_quad32 s)) } length s == 0 ==> length (le_bytes_to_seq_quad32 s) == 0) val be_bytes_to_seq_quad32_empty: unit -> Lemma (forall s . {:pattern (length (be_bytes_to_seq_quad32 s)) } length s == 0 ==> length (be_bytes_to_seq_quad32 s) == 0) val le_bytes_to_seq_quad32_to_bytes_one_quad (b:quad32) : Lemma (le_bytes_to_seq_quad32 (le_quad32_to_bytes b) == create 1 b) let be_quad32_to_bytes (q:quad32) : seq16 nat8 = seq_four_to_seq_BE (seq_map (nat_to_four 8) (four_to_seq_BE q)) val be_bytes_to_seq_quad32_to_bytes_one_quad (b:quad32) : Lemma (be_bytes_to_seq_quad32 (be_quad32_to_bytes b) == create 1 b) val le_bytes_to_seq_quad32_to_bytes (s:seq quad32) : Lemma (le_bytes_to_seq_quad32 (le_seq_quad32_to_bytes s) == s) val be_bytes_to_seq_quad32_to_bytes (s:seq quad32) : Lemma (be_bytes_to_seq_quad32 (seq_nat32_to_seq_nat8_BE (seq_four_to_seq_BE s)) == s) val le_seq_quad32_to_bytes_to_seq_quad32 (s:seq nat8{length s % 16 = 0}) : Lemma (le_seq_quad32_to_bytes (le_bytes_to_seq_quad32 s) == s) val le_quad32_to_bytes_to_quad32 (s:seq nat8 { length s == 16 }) : Lemma(le_quad32_to_bytes (le_bytes_to_quad32 s) == s) val be_quad32_to_bytes_to_quad32 (s:seq nat8 { length s == 16 }) : Lemma(be_quad32_to_bytes (be_bytes_to_quad32 s) == s) val le_seq_quad32_to_bytes_of_singleton (q:quad32) : Lemma (le_quad32_to_bytes q == le_seq_quad32_to_bytes (create 1 q)) val be_seq_quad32_to_bytes_of_singleton (q:quad32) : Lemma (be_quad32_to_bytes q == seq_nat32_to_seq_nat8_BE (seq_four_to_seq_BE (create 1 q))) val le_quad32_to_bytes_injective: unit -> Lemma (forall b b' . le_quad32_to_bytes b == le_quad32_to_bytes b' ==> b == b') val be_quad32_to_bytes_injective: unit -> Lemma (forall b b' . be_quad32_to_bytes b == be_quad32_to_bytes b' ==> b == b') val le_quad32_to_bytes_injective_specific (b b':quad32) : Lemma (le_quad32_to_bytes b == le_quad32_to_bytes b' ==> b == b') val be_quad32_to_bytes_injective_specific (b b':quad32) : Lemma (be_quad32_to_bytes b == be_quad32_to_bytes b' ==> b == b') val le_seq_quad32_to_bytes_injective (b b':Seq.seq quad32) : Lemma (requires Seq.equal (le_seq_quad32_to_bytes b) (le_seq_quad32_to_bytes b')) (ensures b == b') val seq_to_four_LE_is_seq_to_seq_four_LE (#a:Type) (s:seq4 a) : Lemma (create 1 (seq_to_four_LE s) == seq_to_seq_four_LE s) val seq_to_four_BE_is_seq_to_seq_four_BE (#a:Type) (s:seq4 a) : Lemma (create 1 (seq_to_four_BE s) == seq_to_seq_four_BE s) val le_bytes_to_seq_quad_of_singleton (q:quad32) (b:seq nat8 { length b == 16 }) : Lemma (requires q == le_bytes_to_quad32 b) (ensures create 1 q == le_bytes_to_seq_quad32 b) val be_bytes_to_seq_quad_of_singleton (q:quad32) (b:seq nat8 { length b == 16 }) : Lemma (requires q == be_bytes_to_quad32 b) (ensures create 1 q == be_bytes_to_seq_quad32 b) val le_bytes_to_quad32_to_bytes (q:quad32) : Lemma(le_bytes_to_quad32 (le_quad32_to_bytes q) == q) val be_bytes_to_quad32_to_bytes (q:quad32) : Lemma (be_bytes_to_quad32 (be_quad32_to_bytes q) == q) [SMTPat (be_bytes_to_quad32 (be_quad32_to_bytes q))] // Reverse each nat32 in the quad, but leave the nat32s in their original order let reverse_bytes_nat32_quad32 (q:quad32) : quad32 = Vale.Def.Words.Four_s.four_map reverse_bytes_nat32 q val lemma_reverse_reverse_bytes_nat32_quad32 (s:quad32) : Lemma (reverse_bytes_nat32_quad32 (reverse_bytes_nat32_quad32 s) == s) [SMTPat (reverse_bytes_nat32_quad32 (reverse_bytes_nat32_quad32 s))]
false
true
Vale.Arch.Types.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 reverse_bytes_nat32_quad32_seq (q: seq quad32) : seq quad32
[]
Vale.Arch.Types.reverse_bytes_nat32_quad32_seq
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q: FStar.Seq.Base.seq Vale.Def.Types_s.quad32 -> FStar.Seq.Base.seq Vale.Def.Types_s.quad32
{ "end_col": 38, "end_line": 256, "start_col": 2, "start_line": 256 }
Prims.Tot
val ixor64 (a b: nat64) : nat64
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b
val ixor64 (a b: nat64) : nat64 let ixor64 (a b: nat64) : nat64 =
false
null
false
ixor a b
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Words_s.nat64", "Vale.Def.Types_s.ixor", "Vale.Def.Words_s.pow2_64" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s
false
true
Vale.Arch.Types.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 ixor64 (a b: nat64) : nat64
[]
Vale.Arch.Types.ixor64
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.Def.Words_s.nat64 -> b: Vale.Def.Words_s.nat64 -> Vale.Def.Words_s.nat64
{ "end_col": 56, "end_line": 31, "start_col": 48, "start_line": 31 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 lo64 = opaque_make lo64_def
let lo64 =
false
null
false
opaque_make lo64_def
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Opaque_s.opaque_make", "Vale.Def.Types_s.quad32", "Vale.Def.Words_s.nat64", "Vale.Arch.Types.lo64_def" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 )
false
true
Vale.Arch.Types.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 lo64 : _: Vale.Def.Types_s.quad32 -> Vale.Def.Words_s.nat64
[]
Vale.Arch.Types.lo64
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
_: Vale.Def.Types_s.quad32 -> Vale.Def.Words_s.nat64
{ "end_col": 50, "end_line": 115, "start_col": 30, "start_line": 115 }
Prims.Tot
val quad32_double_hi (q: quad32) : double32
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi
val quad32_double_hi (q: quad32) : double32 let quad32_double_hi (q: quad32) : double32 =
false
null
false
(four_to_two_two q).hi
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Types_s.quad32", "Vale.Def.Words_s.__proj__Mktwo__item__hi", "Vale.Def.Words_s.two", "Vale.Def.Types_s.nat32", "Vale.Def.Words.Four_s.four_to_two_two", "Vale.Def.Types_s.double32" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0)
false
true
Vale.Arch.Types.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 quad32_double_hi (q: quad32) : double32
[]
Vale.Arch.Types.quad32_double_hi
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q: Vale.Def.Types_s.quad32 -> Vale.Def.Types_s.double32
{ "end_col": 67, "end_line": 79, "start_col": 45, "start_line": 79 }
Prims.Tot
val be_quad32_to_bytes (q: quad32) : seq16 nat8
[ { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 be_quad32_to_bytes (q:quad32) : seq16 nat8 = seq_four_to_seq_BE (seq_map (nat_to_four 8) (four_to_seq_BE q))
val be_quad32_to_bytes (q: quad32) : seq16 nat8 let be_quad32_to_bytes (q: quad32) : seq16 nat8 =
false
null
false
seq_four_to_seq_BE (seq_map (nat_to_four 8) (four_to_seq_BE q))
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "total" ]
[ "Vale.Def.Types_s.quad32", "Vale.Def.Words.Seq_s.seq_four_to_seq_BE", "Vale.Def.Words_s.nat8", "Vale.Lib.Seqs_s.seq_map", "Vale.Def.Types_s.nat32", "Vale.Def.Words_s.four", "Vale.Def.Words.Four_s.nat_to_four", "Vale.Def.Words.Seq_s.four_to_seq_BE", "Vale.Def.Words.Seq_s.seq16" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 ) let lo64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 0) [@"opaque_to_smt"] let lo64 = opaque_make lo64_def irreducible let lo64_reveal = opaque_revealer (`%lo64) lo64 lo64_def let hi64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 1) [@"opaque_to_smt"] let hi64 = opaque_make hi64_def irreducible let hi64_reveal = opaque_revealer (`%hi64) hi64 hi64_def val lemma_lo64_properties (_:unit) : Lemma (forall (q0 q1:quad32).{:pattern lo64 q0; lo64 q1} (q0.lo0 == q1.lo0 /\ q0.lo1 == q1.lo1) <==> (lo64 q0 == lo64 q1)) val lemma_hi64_properties (_:unit) : Lemma (forall (q0 q1:quad32).{:pattern hi64 q0; hi64 q1} (q0.hi2 == q1.hi2 /\ q0.hi3 == q1.hi3) <==> (hi64 q0 == hi64 q1)) val lemma_reverse_bytes_quad32_64 (src orig final:quad32) : Lemma (requires final == insert_nat64 (insert_nat64 orig (reverse_bytes_nat64 (hi64 src)) 0) (reverse_bytes_nat64 (lo64 src)) 1) (ensures final == reverse_bytes_quad32 src) val lemma_equality_check_helper (q:quad32) : Lemma ((q.lo0 == 0 /\ q.lo1 == 0 ==> lo64 q == 0) /\ ((not (q.lo0 = 0) \/ not (q.lo1 = 0)) ==> not (lo64 q = 0)) /\ (q.hi2 == 0 /\ q.hi3 == 0 ==> hi64 q == 0) /\ ((~(q.hi2 = 0) \/ ~(q.hi3 = 0)) ==> ~(hi64 q = 0)) /\ (q.lo0 == 0xFFFFFFFF /\ q.lo1 == 0xFFFFFFFF <==> lo64 q == 0xFFFFFFFFFFFFFFFF) /\ (q.hi2 == 0xFFFFFFFF /\ q.hi3 == 0xFFFFFFFF <==> hi64 q == 0xFFFFFFFFFFFFFFFF) ) let lemma_equality_check_helper_2 (q1 q2 cmp:quad32) (tmp1 result1 tmp2 tmp3 result2:nat64) : Lemma (requires cmp == Mkfour (if q1.lo0 = q2.lo0 then 0xFFFFFFFF else 0) (if q1.lo1 = q2.lo1 then 0xFFFFFFFF else 0) (if q1.hi2 = q2.hi2 then 0xFFFFFFFF else 0) (if q1.hi3 = q2.hi3 then 0xFFFFFFFF else 0) /\ tmp1 = lo64 cmp /\ result1 = (if tmp1 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ tmp2 = hi64 cmp /\ tmp3 = (if tmp2 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ result2 = tmp3 + result1) (ensures (if q1 = q2 then result2 = 0 else result2 > 0)) = lemma_equality_check_helper cmp; () val push_pop_xmm (x y:quad32) : Lemma (let x' = insert_nat64 (insert_nat64 y (hi64 x) 1) (lo64 x) 0 in x == x') val lemma_insrq_extrq_relations (x y:quad32) : Lemma (let z = insert_nat64 x (lo64 y) 0 in z == Mkfour y.lo0 y.lo1 x.hi2 x.hi3 /\ (let z = insert_nat64 x (hi64 y) 1 in z == Mkfour x.lo0 x.lo1 y.hi2 y.hi3)) val le_bytes_to_nat64_to_bytes (s:nat64) : Lemma (le_bytes_to_nat64 (le_nat64_to_bytes s) == s) val le_nat64_to_bytes_to_nat64 (s:seq nat8 { length s == 8 }) : Lemma (le_nat64_to_bytes (le_bytes_to_nat64 s) == s) val le_bytes_to_seq_quad32_empty: unit -> Lemma (forall s . {:pattern (length (le_bytes_to_seq_quad32 s)) } length s == 0 ==> length (le_bytes_to_seq_quad32 s) == 0) val be_bytes_to_seq_quad32_empty: unit -> Lemma (forall s . {:pattern (length (be_bytes_to_seq_quad32 s)) } length s == 0 ==> length (be_bytes_to_seq_quad32 s) == 0) val le_bytes_to_seq_quad32_to_bytes_one_quad (b:quad32) : Lemma (le_bytes_to_seq_quad32 (le_quad32_to_bytes b) == create 1 b)
false
true
Vale.Arch.Types.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 be_quad32_to_bytes (q: quad32) : seq16 nat8
[]
Vale.Arch.Types.be_quad32_to_bytes
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q: Vale.Def.Types_s.quad32 -> Vale.Def.Words.Seq_s.seq16 Vale.Def.Words_s.nat8
{ "end_col": 65, "end_line": 184, "start_col": 2, "start_line": 184 }
FStar.Pervasives.Lemma
val lemma_equality_check_helper_2 (q1 q2 cmp: quad32) (tmp1 result1 tmp2 tmp3 result2: nat64) : Lemma (requires cmp == Mkfour (if q1.lo0 = q2.lo0 then 0xFFFFFFFF else 0) (if q1.lo1 = q2.lo1 then 0xFFFFFFFF else 0) (if q1.hi2 = q2.hi2 then 0xFFFFFFFF else 0) (if q1.hi3 = q2.hi3 then 0xFFFFFFFF else 0) /\ tmp1 = lo64 cmp /\ result1 = (if tmp1 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ tmp2 = hi64 cmp /\ tmp3 = (if tmp2 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ result2 = tmp3 + result1) (ensures (if q1 = q2 then result2 = 0 else result2 > 0))
[ { "abbrev": false, "full_module": "FStar.Calc", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.TypesNative", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Two_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Four_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs", "short_module": null }, { "abbrev": false, "full_module": "Vale.Lib.Seqs_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch", "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 lemma_equality_check_helper_2 (q1 q2 cmp:quad32) (tmp1 result1 tmp2 tmp3 result2:nat64) : Lemma (requires cmp == Mkfour (if q1.lo0 = q2.lo0 then 0xFFFFFFFF else 0) (if q1.lo1 = q2.lo1 then 0xFFFFFFFF else 0) (if q1.hi2 = q2.hi2 then 0xFFFFFFFF else 0) (if q1.hi3 = q2.hi3 then 0xFFFFFFFF else 0) /\ tmp1 = lo64 cmp /\ result1 = (if tmp1 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ tmp2 = hi64 cmp /\ tmp3 = (if tmp2 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ result2 = tmp3 + result1) (ensures (if q1 = q2 then result2 = 0 else result2 > 0)) = lemma_equality_check_helper cmp; ()
val lemma_equality_check_helper_2 (q1 q2 cmp: quad32) (tmp1 result1 tmp2 tmp3 result2: nat64) : Lemma (requires cmp == Mkfour (if q1.lo0 = q2.lo0 then 0xFFFFFFFF else 0) (if q1.lo1 = q2.lo1 then 0xFFFFFFFF else 0) (if q1.hi2 = q2.hi2 then 0xFFFFFFFF else 0) (if q1.hi3 = q2.hi3 then 0xFFFFFFFF else 0) /\ tmp1 = lo64 cmp /\ result1 = (if tmp1 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ tmp2 = hi64 cmp /\ tmp3 = (if tmp2 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ result2 = tmp3 + result1) (ensures (if q1 = q2 then result2 = 0 else result2 > 0)) let lemma_equality_check_helper_2 (q1 q2 cmp: quad32) (tmp1 result1 tmp2 tmp3 result2: nat64) : Lemma (requires cmp == Mkfour (if q1.lo0 = q2.lo0 then 0xFFFFFFFF else 0) (if q1.lo1 = q2.lo1 then 0xFFFFFFFF else 0) (if q1.hi2 = q2.hi2 then 0xFFFFFFFF else 0) (if q1.hi3 = q2.hi3 then 0xFFFFFFFF else 0) /\ tmp1 = lo64 cmp /\ result1 = (if tmp1 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ tmp2 = hi64 cmp /\ tmp3 = (if tmp2 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ result2 = tmp3 + result1) (ensures (if q1 = q2 then result2 = 0 else result2 > 0)) =
false
null
true
lemma_equality_check_helper cmp; ()
{ "checked_file": "Vale.Arch.Types.fsti.checked", "dependencies": [ "Vale.Lib.Seqs_s.fst.checked", "Vale.Lib.Seqs.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Two_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Words.Seq.fsti.checked", "Vale.Def.Words.Four_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "prims.fst.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked" ], "interface_file": false, "source_file": "Vale.Arch.Types.fsti" }
[ "lemma" ]
[ "Vale.Def.Types_s.quad32", "Vale.Def.Words_s.nat64", "Prims.unit", "Vale.Arch.Types.lemma_equality_check_helper", "Prims.l_and", "Prims.eq2", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.Def.Words_s.Mkfour", "Prims.op_Equality", "Vale.Def.Words_s.__proj__Mkfour__item__lo0", "Prims.bool", "Vale.Def.Words_s.__proj__Mkfour__item__lo1", "Vale.Def.Words_s.__proj__Mkfour__item__hi2", "Vale.Def.Words_s.__proj__Mkfour__item__hi3", "Prims.b2t", "Vale.Arch.Types.lo64", "Prims.int", "Vale.Arch.Types.hi64", "Prims.op_Addition", "Prims.squash", "Prims.op_GreaterThan", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module Vale.Arch.Types open FStar.Mul open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Lib.Seqs_s open Vale.Lib.Seqs open Vale.Def.Words_s open Vale.Def.Words.Four_s open Vale.Def.Words.Seq_s open Vale.Def.Words.Seq open FStar.Seq open Vale.Def.Words.Two_s unfold let ( *^ ) = nat32_xor unfold let ( *^^ ) = quad32_xor unfold let add_wrap32 (x:nat32) (y:nat32) : nat32 = add_wrap x y unfold let add_wrap64 (x:nat64) (y:nat64) : nat64 = add_wrap x y unfold let sub_wrap32 (x:nat32) (y:nat32) : nat32 = sub_wrap x y unfold let sub_wrap64 (x:nat64) (y:nat64) : nat64 = sub_wrap x y unfold let iand32 (a:nat32) (b:nat32) : nat32 = iand a b unfold let ixor32 (a:nat32) (b:nat32) : nat32 = ixor a b unfold let ior32 (a:nat32) (b:nat32) : nat32 = ior a b unfold let inot32 (a:nat32) : nat32 = inot a unfold let ishl32 (a:nat32) (s:int) : nat32 = ishl a s unfold let ishr32 (a:nat32) (s:int) : nat32 = ishr a s unfold let iand64 (a:nat64) (b:nat64) : nat64 = iand a b unfold let ixor64 (a:nat64) (b:nat64) : nat64 = ixor a b unfold let ior64 (a:nat64) (b:nat64) : nat64 = ior a b unfold let inot64 (a:nat64) : nat64 = inot a unfold let ishl64 (a:nat64) (s:int) : nat64 = ishl a s unfold let ishr64 (a:nat64) (s:int) : nat64 = ishr a s unfold let iand128 (a:nat128) (b:nat128) : nat128 = iand a b unfold let ixor128 (a:nat128) (b:nat128) : nat128 = ixor a b unfold let ior128 (a:nat128) (b:nat128) : nat128 = ior a b unfold let inot128 (a:nat128) : nat128 = inot a unfold let ishl128 (a:nat128) (s:int) : nat128 = ishl a s unfold let ishr128 (a:nat128) (s:int) : nat128 = ishr a s unfold let two_to_nat32 (x:two nat32) : nat64 = two_to_nat 32 x val lemma_nat_to_two32 (_:unit) : Lemma (forall (x:nat64).{:pattern (nat_to_two 32 x)} nat_to_two 32 x == Mktwo (x % 0x100000000) (x / 0x100000000)) let quad32_shl32 (q:quad32) : quad32 = let Mkfour v0 v1 v2 v3 = q in Mkfour 0 v0 v1 v2 let add_wrap_quad32 (q0 q1:quad32) : quad32 = let open Vale.Def.Words_s in Mkfour (add_wrap q0.lo0 q1.lo0) (add_wrap q0.lo1 q1.lo1) (add_wrap q0.hi2 q1.hi2) (add_wrap q0.hi3 q1.hi3) val lemma_BitwiseXorCommutative (x y:nat32) : Lemma (x *^ y == y *^ x) val lemma_BitwiseXorWithZero (n:nat32) : Lemma (n *^ 0 == n) val lemma_BitwiseXorCancel (n:nat32) : Lemma (n *^ n == 0) val lemma_BitwiseXorCancel64 (n:nat64) : Lemma (ixor n n == 0) val lemma_BitwiseXorAssociative (x y z:nat32) : Lemma (x *^ (y *^ z) == (x *^ y) *^ z) val xor_lemmas (_:unit) : Lemma (ensures (forall (x y:nat32).{:pattern (x *^ y)} x *^ y == y *^ x) /\ (forall (n:nat32).{:pattern (n *^ 0)} n *^ 0 == n) /\ (forall (n:nat32).{:pattern (n *^ n)} n *^ n == 0) /\ (forall (n:nat64).{:pattern (ixor n n)} ixor n n == 0) /\ (forall (x y z:nat32).{:pattern (x *^ (y *^ z))} x *^ (y *^ z) == (x *^ y) *^ z) ) val lemma_quad32_xor (_:unit) : Lemma (forall q . {:pattern quad32_xor q q} quad32_xor q q == Mkfour 0 0 0 0) let quad32_double_lo (q:quad32) : double32 = (four_to_two_two q).lo let quad32_double_hi (q:quad32) : double32 = (four_to_two_two q).hi val lemma_reverse_reverse_bytes_nat32 (n:nat32) : Lemma (reverse_bytes_nat32 (reverse_bytes_nat32 n) == n) [SMTPat (reverse_bytes_nat32 (reverse_bytes_nat32 n))] val lemma_reverse_bytes_quad32 (q:quad32) : Lemma (reverse_bytes_quad32 (reverse_bytes_quad32 q) == q) [SMTPat (reverse_bytes_quad32 (reverse_bytes_quad32 q))] val lemma_reverse_bytes_quad32_zero (_:unit) : Lemma (let z = Mkfour 0 0 0 0 in reverse_bytes_quad32 z == z) val lemma_reverse_reverse_bytes_nat32_seq (s:seq nat32) : Lemma (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s) == s) [SMTPat (reverse_bytes_nat32_seq (reverse_bytes_nat32_seq s))] unfold let quad32_to_seq (q:quad32) : seq nat32 = four_to_seq_LE q val lemma_insert_nat64_properties (q:quad32) (n:nat64) : Lemma ( (let q' = insert_nat64 q n 0 in q'.hi2 == q.hi2 /\ q'.hi3 == q.hi3) /\ (let q' = insert_nat64 q n 1 in q'.lo0 == q.lo0 /\ q'.lo1 == q.lo1)) [SMTPat (insert_nat64 q n)] val lemma_insert_nat64_nat32s (q:quad32) (n0 n1:nat32) : Lemma ( insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 0 == Mkfour n0 n1 q.hi2 q.hi3 /\ insert_nat64 q (two_to_nat32 (Mktwo n0 n1)) 1 == Mkfour q.lo0 q.lo1 n0 n1 ) let lo64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 0) [@"opaque_to_smt"] let lo64 = opaque_make lo64_def irreducible let lo64_reveal = opaque_revealer (`%lo64) lo64 lo64_def let hi64_def (q:quad32) : nat64 = two_to_nat 32 (two_select (four_to_two_two q) 1) [@"opaque_to_smt"] let hi64 = opaque_make hi64_def irreducible let hi64_reveal = opaque_revealer (`%hi64) hi64 hi64_def val lemma_lo64_properties (_:unit) : Lemma (forall (q0 q1:quad32).{:pattern lo64 q0; lo64 q1} (q0.lo0 == q1.lo0 /\ q0.lo1 == q1.lo1) <==> (lo64 q0 == lo64 q1)) val lemma_hi64_properties (_:unit) : Lemma (forall (q0 q1:quad32).{:pattern hi64 q0; hi64 q1} (q0.hi2 == q1.hi2 /\ q0.hi3 == q1.hi3) <==> (hi64 q0 == hi64 q1)) val lemma_reverse_bytes_quad32_64 (src orig final:quad32) : Lemma (requires final == insert_nat64 (insert_nat64 orig (reverse_bytes_nat64 (hi64 src)) 0) (reverse_bytes_nat64 (lo64 src)) 1) (ensures final == reverse_bytes_quad32 src) val lemma_equality_check_helper (q:quad32) : Lemma ((q.lo0 == 0 /\ q.lo1 == 0 ==> lo64 q == 0) /\ ((not (q.lo0 = 0) \/ not (q.lo1 = 0)) ==> not (lo64 q = 0)) /\ (q.hi2 == 0 /\ q.hi3 == 0 ==> hi64 q == 0) /\ ((~(q.hi2 = 0) \/ ~(q.hi3 = 0)) ==> ~(hi64 q = 0)) /\ (q.lo0 == 0xFFFFFFFF /\ q.lo1 == 0xFFFFFFFF <==> lo64 q == 0xFFFFFFFFFFFFFFFF) /\ (q.hi2 == 0xFFFFFFFF /\ q.hi3 == 0xFFFFFFFF <==> hi64 q == 0xFFFFFFFFFFFFFFFF) ) let lemma_equality_check_helper_2 (q1 q2 cmp:quad32) (tmp1 result1 tmp2 tmp3 result2:nat64) : Lemma (requires cmp == Mkfour (if q1.lo0 = q2.lo0 then 0xFFFFFFFF else 0) (if q1.lo1 = q2.lo1 then 0xFFFFFFFF else 0) (if q1.hi2 = q2.hi2 then 0xFFFFFFFF else 0) (if q1.hi3 = q2.hi3 then 0xFFFFFFFF else 0) /\ tmp1 = lo64 cmp /\ result1 = (if tmp1 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ tmp2 = hi64 cmp /\ tmp3 = (if tmp2 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ result2 = tmp3 + result1) (ensures (if q1 = q2 then result2 = 0 else result2 > 0))
false
false
Vale.Arch.Types.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 lemma_equality_check_helper_2 (q1 q2 cmp: quad32) (tmp1 result1 tmp2 tmp3 result2: nat64) : Lemma (requires cmp == Mkfour (if q1.lo0 = q2.lo0 then 0xFFFFFFFF else 0) (if q1.lo1 = q2.lo1 then 0xFFFFFFFF else 0) (if q1.hi2 = q2.hi2 then 0xFFFFFFFF else 0) (if q1.hi3 = q2.hi3 then 0xFFFFFFFF else 0) /\ tmp1 = lo64 cmp /\ result1 = (if tmp1 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ tmp2 = hi64 cmp /\ tmp3 = (if tmp2 = 0xFFFFFFFFFFFFFFFF then 0 else 1) /\ result2 = tmp3 + result1) (ensures (if q1 = q2 then result2 = 0 else result2 > 0))
[]
Vale.Arch.Types.lemma_equality_check_helper_2
{ "file_name": "vale/code/arch/Vale.Arch.Types.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
q1: Vale.Def.Types_s.quad32 -> q2: Vale.Def.Types_s.quad32 -> cmp: Vale.Def.Types_s.quad32 -> tmp1: Vale.Def.Words_s.nat64 -> result1: Vale.Def.Words_s.nat64 -> tmp2: Vale.Def.Words_s.nat64 -> tmp3: Vale.Def.Words_s.nat64 -> result2: Vale.Def.Words_s.nat64 -> FStar.Pervasives.Lemma (requires cmp == Vale.Def.Words_s.Mkfour (match Mkfour?.lo0 q1 = Mkfour?.lo0 q2 with | true -> 0xFFFFFFFF | _ -> 0) (match Mkfour?.lo1 q1 = Mkfour?.lo1 q2 with | true -> 0xFFFFFFFF | _ -> 0) (match Mkfour?.hi2 q1 = Mkfour?.hi2 q2 with | true -> 0xFFFFFFFF | _ -> 0) (match Mkfour?.hi3 q1 = Mkfour?.hi3 q2 with | true -> 0xFFFFFFFF | _ -> 0) /\ tmp1 = Vale.Arch.Types.lo64 cmp /\ result1 = (match tmp1 = 0xFFFFFFFFFFFFFFFF with | true -> 0 | _ -> 1) /\ tmp2 = Vale.Arch.Types.hi64 cmp /\ tmp3 = (match tmp2 = 0xFFFFFFFFFFFFFFFF with | true -> 0 | _ -> 1) /\ result2 = tmp3 + result1) (ensures ((match q1 = q2 with | true -> result2 = 0 | _ -> result2 > 0) <: Type0))
{ "end_col": 4, "end_line": 156, "start_col": 2, "start_line": 155 }
Prims.Tot
val stack_to_s (s:vale_stack) : machine_stack
[ { "abbrev": true, "full_module": "Vale.PPC64LE.Semantics_s", "short_module": "S" }, { "abbrev": false, "full_module": "Vale.PPC64LE.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE", "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 stack_to_s s = s
val stack_to_s (s:vale_stack) : machine_stack let stack_to_s s =
false
null
false
s
{ "checked_file": "Vale.PPC64LE.Stack_Sems.fst.checked", "dependencies": [ "Vale.PPC64LE.Stack_i.fst.checked", "Vale.Lib.Set.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Map.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Vale.PPC64LE.Stack_Sems.fst" }
[ "total" ]
[ "Vale.PPC64LE.Stack_i.vale_stack", "Vale.PPC64LE.Machine_s.machine_stack" ]
[]
module Vale.PPC64LE.Stack_Sems open FStar.Mul friend Vale.PPC64LE.Stack_i
false
true
Vale.PPC64LE.Stack_Sems.fst
{ "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 stack_to_s (s:vale_stack) : machine_stack
[]
Vale.PPC64LE.Stack_Sems.stack_to_s
{ "file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.Stack_Sems.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
s: Vale.PPC64LE.Stack_i.vale_stack -> Vale.PPC64LE.Machine_s.machine_stack
{ "end_col": 20, "end_line": 6, "start_col": 19, "start_line": 6 }
Prims.Tot
val stack_from_s (s:machine_stack) : vale_stack
[ { "abbrev": true, "full_module": "Vale.PPC64LE.Semantics_s", "short_module": "S" }, { "abbrev": false, "full_module": "Vale.PPC64LE.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE", "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 stack_from_s s = s
val stack_from_s (s:machine_stack) : vale_stack let stack_from_s s =
false
null
false
s
{ "checked_file": "Vale.PPC64LE.Stack_Sems.fst.checked", "dependencies": [ "Vale.PPC64LE.Stack_i.fst.checked", "Vale.Lib.Set.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Map.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Vale.PPC64LE.Stack_Sems.fst" }
[ "total" ]
[ "Vale.PPC64LE.Machine_s.machine_stack", "Vale.PPC64LE.Stack_i.vale_stack" ]
[]
module Vale.PPC64LE.Stack_Sems open FStar.Mul friend Vale.PPC64LE.Stack_i
false
true
Vale.PPC64LE.Stack_Sems.fst
{ "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 stack_from_s (s:machine_stack) : vale_stack
[]
Vale.PPC64LE.Stack_Sems.stack_from_s
{ "file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.Stack_Sems.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
s: Vale.PPC64LE.Machine_s.machine_stack -> Vale.PPC64LE.Stack_i.vale_stack
{ "end_col": 22, "end_line": 7, "start_col": 21, "start_line": 7 }
FStar.Pervasives.Lemma
val free_stack_same_load128 (start:int) (finish:int) (ptr:int) (h:machine_stack) : Lemma (requires S.valid_src_stack128 ptr h /\ (ptr >= finish \/ ptr + 16 <= start)) (ensures S.eval_stack128 ptr h == S.eval_stack128 ptr (S.free_stack' start finish h)) [SMTPat (S.eval_stack128 ptr (S.free_stack' start finish h))]
[ { "abbrev": true, "full_module": "Vale.PPC64LE.Semantics_s", "short_module": "S" }, { "abbrev": false, "full_module": "Vale.PPC64LE.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE", "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_stack_same_load128 start finish ptr h = reveal_opaque (`%S.valid_addr128) S.valid_addr128; let Machine_stack _ mem = h in let Machine_stack _ mem' = S.free_stack' start finish h in Classical.forall_intro (Vale.Lib.Set.remove_between_reveal (Map.domain mem) start finish); S.get_heap_val128_reveal (); S.get_heap_val32_reveal ()
val free_stack_same_load128 (start:int) (finish:int) (ptr:int) (h:machine_stack) : Lemma (requires S.valid_src_stack128 ptr h /\ (ptr >= finish \/ ptr + 16 <= start)) (ensures S.eval_stack128 ptr h == S.eval_stack128 ptr (S.free_stack' start finish h)) [SMTPat (S.eval_stack128 ptr (S.free_stack' start finish h))] let free_stack_same_load128 start finish ptr h =
false
null
true
reveal_opaque (`%S.valid_addr128) S.valid_addr128; let Machine_stack _ mem = h in let Machine_stack _ mem' = S.free_stack' start finish h in Classical.forall_intro (Vale.Lib.Set.remove_between_reveal (Map.domain mem) start finish); S.get_heap_val128_reveal (); S.get_heap_val32_reveal ()
{ "checked_file": "Vale.PPC64LE.Stack_Sems.fst.checked", "dependencies": [ "Vale.PPC64LE.Stack_i.fst.checked", "Vale.Lib.Set.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Map.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Vale.PPC64LE.Stack_Sems.fst" }
[ "lemma" ]
[ "Prims.int", "Vale.PPC64LE.Machine_s.machine_stack", "Vale.PPC64LE.Machine_s.nat64", "Prims.b2t", "Prims.op_GreaterThanOrEqual", "FStar.Map.t", "Vale.PPC64LE.Machine_s.nat8", "Vale.Arch.MachineHeap_s.get_heap_val32_reveal", "Prims.unit", "Vale.Arch.MachineHeap_s.get_heap_val128_reveal", "FStar.Classical.forall_intro", "Prims.l_and", "Prims.l_imp", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "Prims.op_Negation", "FStar.Set.mem", "Vale.Lib.Set.remove_between", "FStar.Map.domain", "Prims.l_or", "Prims.op_Equality", "Prims.bool", "Vale.Lib.Set.remove_between_reveal", "Vale.PPC64LE.Semantics_s.free_stack'", "FStar.Pervasives.reveal_opaque", "Vale.Arch.MachineHeap_s.machine_heap", "Vale.Arch.MachineHeap_s.valid_addr128" ]
[]
module Vale.PPC64LE.Stack_Sems open FStar.Mul friend Vale.PPC64LE.Stack_i let stack_to_s s = s let stack_from_s s = s let lemma_stack_from_to s = () let lemma_stack_to_from s = () let equiv_valid_src_stack64 ptr h = () let equiv_load_stack64 ptr h = () let free_stack_same_load start finish ptr h = reveal_opaque (`%S.valid_addr64) S.valid_addr64; let Machine_stack _ mem = h in let Machine_stack _ mem' = S.free_stack' start finish h in Classical.forall_intro (Vale.Lib.Set.remove_between_reveal (Map.domain mem) start finish); S.get_heap_val64_reveal () let equiv_store_stack64 ptr v h = () let store64_same_init_r1 ptr v h = () let equiv_init_r1 h = () let equiv_free_stack start finish h = () let equiv_valid_src_stack128 ptr h = () let equiv_load_stack128 ptr h = ()
false
false
Vale.PPC64LE.Stack_Sems.fst
{ "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 free_stack_same_load128 (start:int) (finish:int) (ptr:int) (h:machine_stack) : Lemma (requires S.valid_src_stack128 ptr h /\ (ptr >= finish \/ ptr + 16 <= start)) (ensures S.eval_stack128 ptr h == S.eval_stack128 ptr (S.free_stack' start finish h)) [SMTPat (S.eval_stack128 ptr (S.free_stack' start finish h))]
[]
Vale.PPC64LE.Stack_Sems.free_stack_same_load128
{ "file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.Stack_Sems.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
start: Prims.int -> finish: Prims.int -> ptr: Prims.int -> h: Vale.PPC64LE.Machine_s.machine_stack -> FStar.Pervasives.Lemma (requires Vale.PPC64LE.Semantics_s.valid_src_stack128 ptr h /\ (ptr >= finish \/ ptr + 16 <= start)) (ensures Vale.PPC64LE.Semantics_s.eval_stack128 ptr h == Vale.PPC64LE.Semantics_s.eval_stack128 ptr (Vale.PPC64LE.Semantics_s.free_stack' start finish h)) [ SMTPat (Vale.PPC64LE.Semantics_s.eval_stack128 ptr (Vale.PPC64LE.Semantics_s.free_stack' start finish h)) ]
{ "end_col": 28, "end_line": 41, "start_col": 2, "start_line": 36 }
FStar.Pervasives.Lemma
val free_stack_same_load (start:int) (finish:int) (ptr:int) (h:machine_stack) : Lemma (requires S.valid_src_stack64 ptr h /\ (ptr >= finish \/ ptr + 8 <= start)) (ensures S.eval_stack ptr h == S.eval_stack ptr (S.free_stack' start finish h)) [SMTPat (S.eval_stack ptr (S.free_stack' start finish h))]
[ { "abbrev": true, "full_module": "Vale.PPC64LE.Semantics_s", "short_module": "S" }, { "abbrev": false, "full_module": "Vale.PPC64LE.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE", "short_module": null }, { "abbrev": false, "full_module": "Vale.PPC64LE", "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_stack_same_load start finish ptr h = reveal_opaque (`%S.valid_addr64) S.valid_addr64; let Machine_stack _ mem = h in let Machine_stack _ mem' = S.free_stack' start finish h in Classical.forall_intro (Vale.Lib.Set.remove_between_reveal (Map.domain mem) start finish); S.get_heap_val64_reveal ()
val free_stack_same_load (start:int) (finish:int) (ptr:int) (h:machine_stack) : Lemma (requires S.valid_src_stack64 ptr h /\ (ptr >= finish \/ ptr + 8 <= start)) (ensures S.eval_stack ptr h == S.eval_stack ptr (S.free_stack' start finish h)) [SMTPat (S.eval_stack ptr (S.free_stack' start finish h))] let free_stack_same_load start finish ptr h =
false
null
true
reveal_opaque (`%S.valid_addr64) S.valid_addr64; let Machine_stack _ mem = h in let Machine_stack _ mem' = S.free_stack' start finish h in Classical.forall_intro (Vale.Lib.Set.remove_between_reveal (Map.domain mem) start finish); S.get_heap_val64_reveal ()
{ "checked_file": "Vale.PPC64LE.Stack_Sems.fst.checked", "dependencies": [ "Vale.PPC64LE.Stack_i.fst.checked", "Vale.Lib.Set.fsti.checked", "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Map.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Vale.PPC64LE.Stack_Sems.fst" }
[ "lemma" ]
[ "Prims.int", "Vale.PPC64LE.Machine_s.machine_stack", "Vale.PPC64LE.Machine_s.nat64", "Prims.b2t", "Prims.op_GreaterThanOrEqual", "FStar.Map.t", "Vale.PPC64LE.Machine_s.nat8", "Vale.Arch.MachineHeap_s.get_heap_val64_reveal", "Prims.unit", "FStar.Classical.forall_intro", "Prims.l_and", "Prims.l_imp", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "Prims.op_Negation", "FStar.Set.mem", "Vale.Lib.Set.remove_between", "FStar.Map.domain", "Prims.l_or", "Prims.op_Equality", "Prims.bool", "Vale.Lib.Set.remove_between_reveal", "Vale.PPC64LE.Semantics_s.free_stack'", "FStar.Pervasives.reveal_opaque", "Vale.Arch.MachineHeap_s.machine_heap", "Vale.Arch.MachineHeap_s.valid_addr64" ]
[]
module Vale.PPC64LE.Stack_Sems open FStar.Mul friend Vale.PPC64LE.Stack_i let stack_to_s s = s let stack_from_s s = s let lemma_stack_from_to s = () let lemma_stack_to_from s = () let equiv_valid_src_stack64 ptr h = () let equiv_load_stack64 ptr h = ()
false
false
Vale.PPC64LE.Stack_Sems.fst
{ "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 free_stack_same_load (start:int) (finish:int) (ptr:int) (h:machine_stack) : Lemma (requires S.valid_src_stack64 ptr h /\ (ptr >= finish \/ ptr + 8 <= start)) (ensures S.eval_stack ptr h == S.eval_stack ptr (S.free_stack' start finish h)) [SMTPat (S.eval_stack ptr (S.free_stack' start finish h))]
[]
Vale.PPC64LE.Stack_Sems.free_stack_same_load
{ "file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.Stack_Sems.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
start: Prims.int -> finish: Prims.int -> ptr: Prims.int -> h: Vale.PPC64LE.Machine_s.machine_stack -> FStar.Pervasives.Lemma (requires Vale.PPC64LE.Semantics_s.valid_src_stack64 ptr h /\ (ptr >= finish \/ ptr + 8 <= start)) (ensures Vale.PPC64LE.Semantics_s.eval_stack ptr h == Vale.PPC64LE.Semantics_s.eval_stack ptr (Vale.PPC64LE.Semantics_s.free_stack' start finish h)) [ SMTPat (Vale.PPC64LE.Semantics_s.eval_stack ptr (Vale.PPC64LE.Semantics_s.free_stack' start finish h)) ]
{ "end_col": 28, "end_line": 21, "start_col": 2, "start_line": 17 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.Reflection.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Stubs.Syntax.Syntax", "short_module": null }, { "abbrev": false, "full_module": "FStar.Reflection.V2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Reflection.V2", "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 ppname_t = FStar.Sealed.Inhabited.sealed ""
let ppname_t =
false
null
false
FStar.Sealed.Inhabited.sealed ""
{ "checked_file": "FStar.Reflection.V2.Data.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Stubs.Syntax.Syntax.fsti.checked", "FStar.Sealed.Inhabited.fst.checked", "FStar.Reflection.Types.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Reflection.V2.Data.fsti" }
[ "total" ]
[ "FStar.Sealed.Inhabited.sealed", "Prims.string" ]
[]
(* 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.Reflection.V2.Data include FStar.Stubs.Syntax.Syntax open FStar.Reflection.Types (* The type of a string observable only with a tactic.
false
false
FStar.Reflection.V2.Data.fsti
{ "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 ppname_t : Type0
[]
FStar.Reflection.V2.Data.ppname_t
{ "file_name": "ulib/FStar.Reflection.V2.Data.fsti", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
Type0
{ "end_col": 47, "end_line": 23, "start_col": 15, "start_line": 23 }
Prims.Tot
val as_ppname (x: string) : ppname_t
[ { "abbrev": false, "full_module": "FStar.Reflection.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Stubs.Syntax.Syntax", "short_module": null }, { "abbrev": false, "full_module": "FStar.Reflection.V2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Reflection.V2", "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 as_ppname (x:string) : ppname_t = FStar.Sealed.Inhabited.seal x
val as_ppname (x: string) : ppname_t let as_ppname (x: string) : ppname_t =
false
null
false
FStar.Sealed.Inhabited.seal x
{ "checked_file": "FStar.Reflection.V2.Data.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Stubs.Syntax.Syntax.fsti.checked", "FStar.Sealed.Inhabited.fst.checked", "FStar.Reflection.Types.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Reflection.V2.Data.fsti" }
[ "total" ]
[ "Prims.string", "FStar.Sealed.Inhabited.seal", "FStar.Reflection.V2.Data.ppname_t" ]
[]
(* 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.Reflection.V2.Data include FStar.Stubs.Syntax.Syntax open FStar.Reflection.Types (* The type of a string observable only with a tactic. All values of type ppname_t are provably equal *)
false
false
FStar.Reflection.V2.Data.fsti
{ "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 as_ppname (x: string) : ppname_t
[]
FStar.Reflection.V2.Data.as_ppname
{ "file_name": "ulib/FStar.Reflection.V2.Data.fsti", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: Prims.string -> FStar.Reflection.V2.Data.ppname_t
{ "end_col": 67, "end_line": 24, "start_col": 38, "start_line": 24 }
Prims.Tot
val notAscription (tv: term_view) : bool
[ { "abbrev": false, "full_module": "FStar.Reflection.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Stubs.Syntax.Syntax", "short_module": null }, { "abbrev": false, "full_module": "FStar.Reflection.V2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Reflection.V2", "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 notAscription (tv:term_view) : bool = not (Tv_AscribedT? tv) && not (Tv_AscribedC? tv)
val notAscription (tv: term_view) : bool let notAscription (tv: term_view) : bool =
false
null
false
not (Tv_AscribedT? tv) && not (Tv_AscribedC? tv)
{ "checked_file": "FStar.Reflection.V2.Data.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Stubs.Syntax.Syntax.fsti.checked", "FStar.Sealed.Inhabited.fst.checked", "FStar.Reflection.Types.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Reflection.V2.Data.fsti" }
[ "total" ]
[ "FStar.Reflection.V2.Data.term_view", "Prims.op_AmpAmp", "Prims.op_Negation", "FStar.Reflection.V2.Data.uu___is_Tv_AscribedT", "FStar.Reflection.V2.Data.uu___is_Tv_AscribedC", "Prims.bool" ]
[]
(* 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.Reflection.V2.Data include FStar.Stubs.Syntax.Syntax open FStar.Reflection.Types (* The type of a string observable only with a tactic. All values of type ppname_t are provably equal *) let ppname_t = FStar.Sealed.Inhabited.sealed "" let as_ppname (x:string) : ppname_t = FStar.Sealed.Inhabited.seal x noeq type vconst = | C_Unit : vconst | C_Int : int -> vconst // Not exposing the full details of our integer repr. | C_True : vconst | C_False : vconst | C_String : string -> vconst | C_Range : range -> vconst | C_Reify : vconst | C_Reflect : name -> vconst (* TODO: complete *) type universes = list universe type ident_view = string & range noeq type pattern = // A built-in constant | Pat_Constant : c : vconst -> pattern // A fully applied constructor, each boolean marks whether the // argument was an explicitly-provided implicit argument | Pat_Cons : head : fv -> univs : option universes -> subpats : list (pattern * bool) -> pattern // A pattern-bound variable. It has a sealed sort in it. // This sort is ignored by the typechecker, but may be useful // for metaprogram to look at heuristically. There is nothing // else here but a ppname, the variable is referred to by its DB index. // This means all Pat_Var are provably equal. | Pat_Var : sort : sealed term -> ppname : ppname_t -> pattern // Dot pattern: resolved by other elements in the pattern and type | Pat_Dot_Term : t : option term -> pattern type branch = pattern * term // | pattern -> term noeq type aqualv = | Q_Implicit | Q_Explicit | Q_Meta of term type argv = term * aqualv (* A named variable, with a unique identifier *) noeq type namedv_view = { uniq : nat; sort : sealed typ; // REMOVE? ppname : ppname_t; } (* A bound variable, with a de Bruijn index *) noeq type bv_view = { index : nat; sort : sealed typ; // REMOVE? ppname : ppname_t; } (* Binders consist of a type, qualifiers, and attributes. There is also a sealed name. *) noeq type binder_view = { sort : typ; qual : aqualv; attrs : list term; ppname : ppname_t; } (* A binding is a variable in the environment. It is like a namedv, but has an explicit (unsealed) sort *) noeq type binding = { uniq : nat; sort : typ; ppname : ppname_t; } type bindings = list binding (** We use the binder type for letbindings and refinements, but no qualifiers nor attributes can appear there. We call these binders simple. This module assumes an abstract predicate for them, which is later assumed to be equivalent to being a binder without qualifiers nor attributes (once inspect_binder is in scope). *) val binder_is_simple : binder -> Tot bool type simple_binder = b:binder{binder_is_simple b} noeq type universe_view = | Uv_Zero : universe_view | Uv_Succ : universe -> universe_view | Uv_Max : universes -> universe_view | Uv_BVar : nat -> universe_view | Uv_Name : univ_name -> universe_view | Uv_Unif : universe_uvar -> universe_view | Uv_Unk : universe_view noeq type term_view = | Tv_Var : v:namedv -> term_view | Tv_BVar : v:bv -> term_view | Tv_FVar : v:fv -> term_view | Tv_UInst : v:fv -> us:universes -> term_view | Tv_App : hd:term -> a:argv -> term_view | Tv_Abs : bv:binder -> body:term -> term_view | Tv_Arrow : bv:binder -> c:comp -> term_view | Tv_Type : universe -> term_view | Tv_Refine : b:simple_binder -> ref:term -> term_view | Tv_Const : vconst -> term_view | Tv_Uvar : nat -> ctx_uvar_and_subst -> term_view | Tv_Let : recf:bool -> attrs:(list term) -> b:simple_binder -> def:term -> body:term -> term_view | Tv_Match : scrutinee:term -> ret:option match_returns_ascription -> brs:(list branch) -> term_view | Tv_AscribedT : e:term -> t:term -> tac:option term -> use_eq:bool -> term_view | Tv_AscribedC : e:term -> c:comp -> tac:option term -> use_eq:bool -> term_view | Tv_Unknown : term_view // An underscore: _ | Tv_Unsupp : term_view // failed to inspect, not supported
false
false
FStar.Reflection.V2.Data.fsti
{ "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 notAscription (tv: term_view) : bool
[]
FStar.Reflection.V2.Data.notAscription
{ "file_name": "ulib/FStar.Reflection.V2.Data.fsti", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
tv: FStar.Reflection.V2.Data.term_view -> Prims.bool
{ "end_col": 50, "end_line": 158, "start_col": 2, "start_line": 158 }
Prims.Tot
val var:eqtype
[ { "abbrev": false, "full_module": "FStar.Reflection.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Stubs.Syntax.Syntax", "short_module": null }, { "abbrev": false, "full_module": "FStar.Reflection.V2", "short_module": null }, { "abbrev": false, "full_module": "FStar.Reflection.V2", "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 var : eqtype = nat
val var:eqtype let var:eqtype =
false
null
false
nat
{ "checked_file": "FStar.Reflection.V2.Data.fsti.checked", "dependencies": [ "prims.fst.checked", "FStar.Stubs.Syntax.Syntax.fsti.checked", "FStar.Sealed.Inhabited.fst.checked", "FStar.Reflection.Types.fsti.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "FStar.Reflection.V2.Data.fsti" }
[ "total" ]
[ "Prims.nat" ]
[]
(* 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.Reflection.V2.Data include FStar.Stubs.Syntax.Syntax open FStar.Reflection.Types (* The type of a string observable only with a tactic. All values of type ppname_t are provably equal *) let ppname_t = FStar.Sealed.Inhabited.sealed "" let as_ppname (x:string) : ppname_t = FStar.Sealed.Inhabited.seal x noeq type vconst = | C_Unit : vconst | C_Int : int -> vconst // Not exposing the full details of our integer repr. | C_True : vconst | C_False : vconst | C_String : string -> vconst | C_Range : range -> vconst | C_Reify : vconst | C_Reflect : name -> vconst (* TODO: complete *) type universes = list universe type ident_view = string & range noeq type pattern = // A built-in constant | Pat_Constant : c : vconst -> pattern // A fully applied constructor, each boolean marks whether the // argument was an explicitly-provided implicit argument | Pat_Cons : head : fv -> univs : option universes -> subpats : list (pattern * bool) -> pattern // A pattern-bound variable. It has a sealed sort in it. // This sort is ignored by the typechecker, but may be useful // for metaprogram to look at heuristically. There is nothing // else here but a ppname, the variable is referred to by its DB index. // This means all Pat_Var are provably equal. | Pat_Var : sort : sealed term -> ppname : ppname_t -> pattern // Dot pattern: resolved by other elements in the pattern and type | Pat_Dot_Term : t : option term -> pattern type branch = pattern * term // | pattern -> term noeq type aqualv = | Q_Implicit | Q_Explicit | Q_Meta of term type argv = term * aqualv (* A named variable, with a unique identifier *) noeq type namedv_view = { uniq : nat; sort : sealed typ; // REMOVE? ppname : ppname_t; } (* A bound variable, with a de Bruijn index *) noeq type bv_view = { index : nat; sort : sealed typ; // REMOVE? ppname : ppname_t; } (* Binders consist of a type, qualifiers, and attributes. There is also a sealed name. *) noeq type binder_view = { sort : typ; qual : aqualv; attrs : list term; ppname : ppname_t; } (* A binding is a variable in the environment. It is like a namedv, but has an explicit (unsealed) sort *) noeq type binding = { uniq : nat; sort : typ; ppname : ppname_t; } type bindings = list binding (** We use the binder type for letbindings and refinements, but no qualifiers nor attributes can appear there. We call these binders simple. This module assumes an abstract predicate for them, which is later assumed to be equivalent to being a binder without qualifiers nor attributes (once inspect_binder is in scope). *) val binder_is_simple : binder -> Tot bool type simple_binder = b:binder{binder_is_simple b} noeq type universe_view = | Uv_Zero : universe_view | Uv_Succ : universe -> universe_view | Uv_Max : universes -> universe_view | Uv_BVar : nat -> universe_view | Uv_Name : univ_name -> universe_view | Uv_Unif : universe_uvar -> universe_view | Uv_Unk : universe_view noeq type term_view = | Tv_Var : v:namedv -> term_view | Tv_BVar : v:bv -> term_view | Tv_FVar : v:fv -> term_view | Tv_UInst : v:fv -> us:universes -> term_view | Tv_App : hd:term -> a:argv -> term_view | Tv_Abs : bv:binder -> body:term -> term_view | Tv_Arrow : bv:binder -> c:comp -> term_view | Tv_Type : universe -> term_view | Tv_Refine : b:simple_binder -> ref:term -> term_view | Tv_Const : vconst -> term_view | Tv_Uvar : nat -> ctx_uvar_and_subst -> term_view | Tv_Let : recf:bool -> attrs:(list term) -> b:simple_binder -> def:term -> body:term -> term_view | Tv_Match : scrutinee:term -> ret:option match_returns_ascription -> brs:(list branch) -> term_view | Tv_AscribedT : e:term -> t:term -> tac:option term -> use_eq:bool -> term_view | Tv_AscribedC : e:term -> c:comp -> tac:option term -> use_eq:bool -> term_view | Tv_Unknown : term_view // An underscore: _ | Tv_Unsupp : term_view // failed to inspect, not supported let notAscription (tv:term_view) : bool = not (Tv_AscribedT? tv) && not (Tv_AscribedC? tv) // Very basic for now noeq type comp_view = | C_Total : ret:typ -> comp_view | C_GTotal : ret:typ -> comp_view | C_Lemma : term -> term -> term -> comp_view // pre, post, patterns | C_Eff : us:universes -> eff_name:name -> result:term -> eff_args:(list argv) -> decrs:list term -> comp_view (* Constructor for an inductive type. See explanation in [Sg_Inductive] below. *) type ctor = name & typ noeq type lb_view = { lb_fv : fv; lb_us : list univ_name; lb_typ : typ; lb_def : term } noeq type sigelt_view = | Sg_Let : (r:bool) -> (lbs:list letbinding) -> sigelt_view // Sg_Inductive basically coalesces the Sig_bundle used internally, // where the type definition and its constructors are split. // While that might be better for typechecking, this is probably better for metaprogrammers // (no mutually defined types for now) | Sg_Inductive : (nm:name) -> // name of the inductive type being defined (univs:list univ_name) -> // universe variables (params:binders) -> // parameters (typ:typ) -> // the type annotation for the inductive, i.e., indices -> Type #u (cts:list ctor) -> // the constructors, opened with univs and applied to params already sigelt_view | Sg_Val : (nm:name) -> (univs:list univ_name) -> (typ:typ) -> sigelt_view | Unk (* Qualifiers for sigelts, see src/FStar.Syntax.Syntax for an explanation. *) noeq type qualifier = | Assumption | InternalAssumption | New | Private | Unfold_for_unification_and_vcgen | Visible_default | Irreducible | Inline_for_extraction | NoExtract | Noeq | Unopteq | TotalEffect | Logic | Reifiable | Reflectable of name | Discriminator of name | Projector of name * ident | RecordType of list ident * list ident | RecordConstructor of list ident * list ident | Action of name | ExceptionConstructor | HasMaskedEffect | Effect | OnlyName
false
false
FStar.Reflection.V2.Data.fsti
{ "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 var:eqtype
[]
FStar.Reflection.V2.Data.var
{ "file_name": "ulib/FStar.Reflection.V2.Data.fsti", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
Prims.eqtype
{ "end_col": 22, "end_line": 241, "start_col": 19, "start_line": 241 }
Prims.Tot
val parse_constint32le_kind:parser_kind
[ { "abbrev": true, "full_module": "LowParse.Math", "short_module": "M" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "FStar.UInt8", "short_module": "U8" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "LowParse.Spec.Int32le", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Endianness", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "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_constint32le_kind : parser_kind = strong_parser_kind 4 4 None
val parse_constint32le_kind:parser_kind let parse_constint32le_kind:parser_kind =
false
null
false
strong_parser_kind 4 4 None
{ "checked_file": "LowParse.Spec.ConstInt32.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.Int32le.fst.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Base.fsti.checked", "LowParse.Math.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Endianness.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": false, "source_file": "LowParse.Spec.ConstInt32.fst" }
[ "total" ]
[ "LowParse.Spec.Base.strong_parser_kind", "FStar.Pervasives.Native.None", "LowParse.Spec.Base.parser_kind_metadata_some" ]
[]
module LowParse.Spec.ConstInt32 (* LowParse specification module for parsing 32 bits = 4 bytes unsigned constants Examples: uint32 foo = 5 uint32_le foo = 7 *) (* TODO: support big endian constants *) include FStar.Endianness include LowParse.Spec.Base include LowParse.Spec.Combinators include LowParse.Spec.Int32le module U32 = FStar.UInt32 module U8 = FStar.UInt8 module Seq = FStar.Seq module M = LowParse.Math let constint32 (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot Type = (u: U32.t { U32.v u == v } ) inline_for_extraction let parse_constint32le_kind
false
true
LowParse.Spec.ConstInt32.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 parse_constint32le_kind:parser_kind
[]
LowParse.Spec.ConstInt32.parse_constint32le_kind
{ "file_name": "src/lowparse/LowParse.Spec.ConstInt32.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
LowParse.Spec.Base.parser_kind
{ "end_col": 29, "end_line": 33, "start_col": 2, "start_line": 33 }
Prims.Tot
val parse_constint32le (v: nat{0 <= v /\ v < 4294967296}) : Tot (parser parse_constint32le_kind (constint32 v))
[ { "abbrev": true, "full_module": "LowParse.Math", "short_module": "M" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "FStar.UInt8", "short_module": "U8" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "LowParse.Spec.Int32le", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Endianness", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "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_constint32le (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot (parser parse_constint32le_kind (constint32 v)) = decode_constint32le_injective v; make_constant_size_parser 4 (constint32 v) (decode_constint32le v)
val parse_constint32le (v: nat{0 <= v /\ v < 4294967296}) : Tot (parser parse_constint32le_kind (constint32 v)) let parse_constint32le (v: nat{0 <= v /\ v < 4294967296}) : Tot (parser parse_constint32le_kind (constint32 v)) =
false
null
false
decode_constint32le_injective v; make_constant_size_parser 4 (constint32 v) (decode_constint32le v)
{ "checked_file": "LowParse.Spec.ConstInt32.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.Int32le.fst.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Base.fsti.checked", "LowParse.Math.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Endianness.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": false, "source_file": "LowParse.Spec.ConstInt32.fst" }
[ "total" ]
[ "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "LowParse.Spec.Combinators.make_constant_size_parser", "LowParse.Spec.ConstInt32.constint32", "LowParse.Spec.ConstInt32.decode_constint32le", "Prims.unit", "LowParse.Spec.ConstInt32.decode_constint32le_injective", "LowParse.Spec.Base.parser", "LowParse.Spec.ConstInt32.parse_constint32le_kind" ]
[]
module LowParse.Spec.ConstInt32 (* LowParse specification module for parsing 32 bits = 4 bytes unsigned constants Examples: uint32 foo = 5 uint32_le foo = 7 *) (* TODO: support big endian constants *) include FStar.Endianness include LowParse.Spec.Base include LowParse.Spec.Combinators include LowParse.Spec.Int32le module U32 = FStar.UInt32 module U8 = FStar.UInt8 module Seq = FStar.Seq module M = LowParse.Math let constint32 (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot Type = (u: U32.t { U32.v u == v } ) inline_for_extraction let parse_constint32le_kind : parser_kind = strong_parser_kind 4 4 None let decode_constint32le (v: nat {0 <= v /\ v < 4294967296 } ) (b: bytes { Seq.length b == 4 } ) : Tot (option (constint32 v)) = let v' = decode_int32le b in if U32.v v' = v then Some v' else None let decode_constint32le_injective' (v: nat { 0 <= v /\ v < 4294967296 } ) (b1: bytes { Seq.length b1 == 4 } ) (b2: bytes { Seq.length b2 == 4 } ) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2) = let res1 = decode_constint32le v b1 in let res2 = decode_constint32le v b2 in match res1 with | Some v1 -> assert ( U32.v v1 == v ); (match res2 with | Some v2 -> assert ( U32.v v2 == v ); assert ( v1 == v2 ); decode_int32le_injective b1 b2 | None -> ()) | None -> () let decode_constint32le_injective (v: nat { 0 <= v /\ v < 4294967296 } ) : Lemma (make_constant_size_parser_precond 4 (constint32 v) (decode_constint32le v)) = Classical.forall_intro_2 (decode_constint32le_injective' v) let parse_constint32le (v: nat { 0 <= v /\ v < 4294967296 } )
false
false
LowParse.Spec.ConstInt32.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 parse_constint32le (v: nat{0 <= v /\ v < 4294967296}) : Tot (parser parse_constint32le_kind (constint32 v))
[]
LowParse.Spec.ConstInt32.parse_constint32le
{ "file_name": "src/lowparse/LowParse.Spec.ConstInt32.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
v: Prims.nat{0 <= v /\ v < 4294967296} -> LowParse.Spec.Base.parser LowParse.Spec.ConstInt32.parse_constint32le_kind (LowParse.Spec.ConstInt32.constint32 v)
{ "end_col": 68, "end_line": 76, "start_col": 2, "start_line": 75 }
Prims.Tot
val serialize_constint32le (v: nat{0 <= v /\ v < 4294967296}) : Tot (serializer (parse_constint32le v))
[ { "abbrev": true, "full_module": "LowParse.Math", "short_module": "M" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "FStar.UInt8", "short_module": "U8" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "LowParse.Spec.Int32le", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Endianness", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "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 serialize_constint32le (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot (serializer (parse_constint32le v)) = serialize_constint32le_correct v; serialize_constint32le' v
val serialize_constint32le (v: nat{0 <= v /\ v < 4294967296}) : Tot (serializer (parse_constint32le v)) let serialize_constint32le (v: nat{0 <= v /\ v < 4294967296}) : Tot (serializer (parse_constint32le v)) =
false
null
false
serialize_constint32le_correct v; serialize_constint32le' v
{ "checked_file": "LowParse.Spec.ConstInt32.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.Int32le.fst.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Base.fsti.checked", "LowParse.Math.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Endianness.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": false, "source_file": "LowParse.Spec.ConstInt32.fst" }
[ "total" ]
[ "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "LowParse.Spec.ConstInt32.serialize_constint32le'", "Prims.unit", "LowParse.Spec.ConstInt32.serialize_constint32le_correct", "LowParse.Spec.Base.serializer", "LowParse.Spec.ConstInt32.parse_constint32le_kind", "LowParse.Spec.ConstInt32.constint32", "LowParse.Spec.ConstInt32.parse_constint32le" ]
[]
module LowParse.Spec.ConstInt32 (* LowParse specification module for parsing 32 bits = 4 bytes unsigned constants Examples: uint32 foo = 5 uint32_le foo = 7 *) (* TODO: support big endian constants *) include FStar.Endianness include LowParse.Spec.Base include LowParse.Spec.Combinators include LowParse.Spec.Int32le module U32 = FStar.UInt32 module U8 = FStar.UInt8 module Seq = FStar.Seq module M = LowParse.Math let constint32 (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot Type = (u: U32.t { U32.v u == v } ) inline_for_extraction let parse_constint32le_kind : parser_kind = strong_parser_kind 4 4 None let decode_constint32le (v: nat {0 <= v /\ v < 4294967296 } ) (b: bytes { Seq.length b == 4 } ) : Tot (option (constint32 v)) = let v' = decode_int32le b in if U32.v v' = v then Some v' else None let decode_constint32le_injective' (v: nat { 0 <= v /\ v < 4294967296 } ) (b1: bytes { Seq.length b1 == 4 } ) (b2: bytes { Seq.length b2 == 4 } ) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2) = let res1 = decode_constint32le v b1 in let res2 = decode_constint32le v b2 in match res1 with | Some v1 -> assert ( U32.v v1 == v ); (match res2 with | Some v2 -> assert ( U32.v v2 == v ); assert ( v1 == v2 ); decode_int32le_injective b1 b2 | None -> ()) | None -> () let decode_constint32le_injective (v: nat { 0 <= v /\ v < 4294967296 } ) : Lemma (make_constant_size_parser_precond 4 (constint32 v) (decode_constint32le v)) = Classical.forall_intro_2 (decode_constint32le_injective' v) let parse_constint32le (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot (parser parse_constint32le_kind (constint32 v)) = decode_constint32le_injective v; make_constant_size_parser 4 (constint32 v) (decode_constint32le v) let parse_constint32le_unfold (v: nat { 0 <= v /\ v < 4294967296 } ) (input: bytes) : Lemma (parse (parse_constint32le v) input == (let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then Some (x, consumed) else None | None -> None)) = let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then () else () | None -> () let serialize_constint32le' (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot (bare_serializer (constint32 v)) = fun (x: constint32 v) -> let res = n_to_le 4 v in res let serialize_constint32le_correct (v: nat { 0 <= v /\ v < 4294967296 } ) : Lemma (serializer_correct (parse_constint32le v) (serialize_constint32le' v)) = let prf (x: constint32 v) : Lemma (let res = n_to_le 4 v in U32.v x == v /\ Seq.length res == 4 /\ (parse (parse_constint32le v) res == Some (x, 4))) = () in Classical.forall_intro prf let serialize_constint32le (v: nat { 0 <= v /\ v < 4294967296 } )
false
false
LowParse.Spec.ConstInt32.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 serialize_constint32le (v: nat{0 <= v /\ v < 4294967296}) : Tot (serializer (parse_constint32le v))
[]
LowParse.Spec.ConstInt32.serialize_constint32le
{ "file_name": "src/lowparse/LowParse.Spec.ConstInt32.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
v: Prims.nat{0 <= v /\ v < 4294967296} -> LowParse.Spec.Base.serializer (LowParse.Spec.ConstInt32.parse_constint32le v)
{ "end_col": 27, "end_line": 124, "start_col": 2, "start_line": 123 }
Prims.Tot
val serialize_constint32le' (v: nat{0 <= v /\ v < 4294967296}) : Tot (bare_serializer (constint32 v))
[ { "abbrev": true, "full_module": "LowParse.Math", "short_module": "M" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "FStar.UInt8", "short_module": "U8" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "LowParse.Spec.Int32le", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Endianness", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "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 serialize_constint32le' (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot (bare_serializer (constint32 v)) = fun (x: constint32 v) -> let res = n_to_le 4 v in res
val serialize_constint32le' (v: nat{0 <= v /\ v < 4294967296}) : Tot (bare_serializer (constint32 v)) let serialize_constint32le' (v: nat{0 <= v /\ v < 4294967296}) : Tot (bare_serializer (constint32 v)) =
false
null
false
fun (x: constint32 v) -> let res = n_to_le 4 v in res
{ "checked_file": "LowParse.Spec.ConstInt32.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.Int32le.fst.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Base.fsti.checked", "LowParse.Math.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Endianness.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": false, "source_file": "LowParse.Spec.ConstInt32.fst" }
[ "total" ]
[ "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "LowParse.Spec.ConstInt32.constint32", "FStar.Endianness.bytes", "Prims.eq2", "FStar.Seq.Base.length", "FStar.UInt8.t", "FStar.Endianness.le_to_n", "FStar.Endianness.n_to_le", "LowParse.Bytes.bytes", "LowParse.Spec.Base.bare_serializer" ]
[]
module LowParse.Spec.ConstInt32 (* LowParse specification module for parsing 32 bits = 4 bytes unsigned constants Examples: uint32 foo = 5 uint32_le foo = 7 *) (* TODO: support big endian constants *) include FStar.Endianness include LowParse.Spec.Base include LowParse.Spec.Combinators include LowParse.Spec.Int32le module U32 = FStar.UInt32 module U8 = FStar.UInt8 module Seq = FStar.Seq module M = LowParse.Math let constint32 (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot Type = (u: U32.t { U32.v u == v } ) inline_for_extraction let parse_constint32le_kind : parser_kind = strong_parser_kind 4 4 None let decode_constint32le (v: nat {0 <= v /\ v < 4294967296 } ) (b: bytes { Seq.length b == 4 } ) : Tot (option (constint32 v)) = let v' = decode_int32le b in if U32.v v' = v then Some v' else None let decode_constint32le_injective' (v: nat { 0 <= v /\ v < 4294967296 } ) (b1: bytes { Seq.length b1 == 4 } ) (b2: bytes { Seq.length b2 == 4 } ) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2) = let res1 = decode_constint32le v b1 in let res2 = decode_constint32le v b2 in match res1 with | Some v1 -> assert ( U32.v v1 == v ); (match res2 with | Some v2 -> assert ( U32.v v2 == v ); assert ( v1 == v2 ); decode_int32le_injective b1 b2 | None -> ()) | None -> () let decode_constint32le_injective (v: nat { 0 <= v /\ v < 4294967296 } ) : Lemma (make_constant_size_parser_precond 4 (constint32 v) (decode_constint32le v)) = Classical.forall_intro_2 (decode_constint32le_injective' v) let parse_constint32le (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot (parser parse_constint32le_kind (constint32 v)) = decode_constint32le_injective v; make_constant_size_parser 4 (constint32 v) (decode_constint32le v) let parse_constint32le_unfold (v: nat { 0 <= v /\ v < 4294967296 } ) (input: bytes) : Lemma (parse (parse_constint32le v) input == (let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then Some (x, consumed) else None | None -> None)) = let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then () else () | None -> () let serialize_constint32le' (v: nat { 0 <= v /\ v < 4294967296 } )
false
false
LowParse.Spec.ConstInt32.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 serialize_constint32le' (v: nat{0 <= v /\ v < 4294967296}) : Tot (bare_serializer (constint32 v))
[]
LowParse.Spec.ConstInt32.serialize_constint32le'
{ "file_name": "src/lowparse/LowParse.Spec.ConstInt32.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
v: Prims.nat{0 <= v /\ v < 4294967296} -> LowParse.Spec.Base.bare_serializer (LowParse.Spec.ConstInt32.constint32 v)
{ "end_col": 5, "end_line": 105, "start_col": 2, "start_line": 103 }
Prims.Tot
val decode_constint32le (v: nat{0 <= v /\ v < 4294967296}) (b: bytes{Seq.length b == 4}) : Tot (option (constint32 v))
[ { "abbrev": true, "full_module": "LowParse.Math", "short_module": "M" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "FStar.UInt8", "short_module": "U8" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "LowParse.Spec.Int32le", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Endianness", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "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 decode_constint32le (v: nat {0 <= v /\ v < 4294967296 } ) (b: bytes { Seq.length b == 4 } ) : Tot (option (constint32 v)) = let v' = decode_int32le b in if U32.v v' = v then Some v' else None
val decode_constint32le (v: nat{0 <= v /\ v < 4294967296}) (b: bytes{Seq.length b == 4}) : Tot (option (constint32 v)) let decode_constint32le (v: nat{0 <= v /\ v < 4294967296}) (b: bytes{Seq.length b == 4}) : Tot (option (constint32 v)) =
false
null
false
let v' = decode_int32le b in if U32.v v' = v then Some v' else None
{ "checked_file": "LowParse.Spec.ConstInt32.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.Int32le.fst.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Base.fsti.checked", "LowParse.Math.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Endianness.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": false, "source_file": "LowParse.Spec.ConstInt32.fst" }
[ "total" ]
[ "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "LowParse.Bytes.bytes", "Prims.eq2", "Prims.int", "FStar.Seq.Base.length", "LowParse.Bytes.byte", "Prims.op_Equality", "Prims.l_or", "Prims.op_GreaterThanOrEqual", "FStar.UInt.size", "FStar.UInt32.n", "FStar.UInt32.v", "FStar.Pervasives.Native.Some", "LowParse.Spec.ConstInt32.constint32", "Prims.bool", "FStar.Pervasives.Native.None", "FStar.Pervasives.Native.option", "FStar.UInt32.t", "LowParse.Spec.Int32le.decode_int32le" ]
[]
module LowParse.Spec.ConstInt32 (* LowParse specification module for parsing 32 bits = 4 bytes unsigned constants Examples: uint32 foo = 5 uint32_le foo = 7 *) (* TODO: support big endian constants *) include FStar.Endianness include LowParse.Spec.Base include LowParse.Spec.Combinators include LowParse.Spec.Int32le module U32 = FStar.UInt32 module U8 = FStar.UInt8 module Seq = FStar.Seq module M = LowParse.Math let constint32 (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot Type = (u: U32.t { U32.v u == v } ) inline_for_extraction let parse_constint32le_kind : parser_kind = strong_parser_kind 4 4 None let decode_constint32le (v: nat {0 <= v /\ v < 4294967296 } ) (b: bytes { Seq.length b == 4 } )
false
false
LowParse.Spec.ConstInt32.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 decode_constint32le (v: nat{0 <= v /\ v < 4294967296}) (b: bytes{Seq.length b == 4}) : Tot (option (constint32 v))
[]
LowParse.Spec.ConstInt32.decode_constint32le
{ "file_name": "src/lowparse/LowParse.Spec.ConstInt32.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
v: Prims.nat{0 <= v /\ v < 4294967296} -> b: LowParse.Bytes.bytes{FStar.Seq.Base.length b == 4} -> FStar.Pervasives.Native.option (LowParse.Spec.ConstInt32.constint32 v)
{ "end_col": 10, "end_line": 43, "start_col": 1, "start_line": 39 }
FStar.Pervasives.Lemma
val decode_constint32le_injective (v: nat{0 <= v /\ v < 4294967296}) : Lemma (make_constant_size_parser_precond 4 (constint32 v) (decode_constint32le v))
[ { "abbrev": true, "full_module": "LowParse.Math", "short_module": "M" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "FStar.UInt8", "short_module": "U8" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "LowParse.Spec.Int32le", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Endianness", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "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 decode_constint32le_injective (v: nat { 0 <= v /\ v < 4294967296 } ) : Lemma (make_constant_size_parser_precond 4 (constint32 v) (decode_constint32le v)) = Classical.forall_intro_2 (decode_constint32le_injective' v)
val decode_constint32le_injective (v: nat{0 <= v /\ v < 4294967296}) : Lemma (make_constant_size_parser_precond 4 (constint32 v) (decode_constint32le v)) let decode_constint32le_injective (v: nat{0 <= v /\ v < 4294967296}) : Lemma (make_constant_size_parser_precond 4 (constint32 v) (decode_constint32le v)) =
false
null
true
Classical.forall_intro_2 (decode_constint32le_injective' v)
{ "checked_file": "LowParse.Spec.ConstInt32.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.Int32le.fst.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Base.fsti.checked", "LowParse.Math.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Endianness.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": false, "source_file": "LowParse.Spec.ConstInt32.fst" }
[ "lemma" ]
[ "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "FStar.Classical.forall_intro_2", "LowParse.Bytes.bytes", "Prims.eq2", "Prims.int", "FStar.Seq.Base.length", "LowParse.Bytes.byte", "Prims.l_imp", "Prims.l_or", "FStar.Pervasives.Native.uu___is_Some", "LowParse.Spec.ConstInt32.constint32", "LowParse.Spec.ConstInt32.decode_constint32le", "FStar.Pervasives.Native.option", "FStar.Seq.Base.equal", "LowParse.Spec.ConstInt32.decode_constint32le_injective'", "Prims.unit", "Prims.l_True", "Prims.squash", "LowParse.Spec.Combinators.make_constant_size_parser_precond", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module LowParse.Spec.ConstInt32 (* LowParse specification module for parsing 32 bits = 4 bytes unsigned constants Examples: uint32 foo = 5 uint32_le foo = 7 *) (* TODO: support big endian constants *) include FStar.Endianness include LowParse.Spec.Base include LowParse.Spec.Combinators include LowParse.Spec.Int32le module U32 = FStar.UInt32 module U8 = FStar.UInt8 module Seq = FStar.Seq module M = LowParse.Math let constint32 (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot Type = (u: U32.t { U32.v u == v } ) inline_for_extraction let parse_constint32le_kind : parser_kind = strong_parser_kind 4 4 None let decode_constint32le (v: nat {0 <= v /\ v < 4294967296 } ) (b: bytes { Seq.length b == 4 } ) : Tot (option (constint32 v)) = let v' = decode_int32le b in if U32.v v' = v then Some v' else None let decode_constint32le_injective' (v: nat { 0 <= v /\ v < 4294967296 } ) (b1: bytes { Seq.length b1 == 4 } ) (b2: bytes { Seq.length b2 == 4 } ) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2) = let res1 = decode_constint32le v b1 in let res2 = decode_constint32le v b2 in match res1 with | Some v1 -> assert ( U32.v v1 == v ); (match res2 with | Some v2 -> assert ( U32.v v2 == v ); assert ( v1 == v2 ); decode_int32le_injective b1 b2 | None -> ()) | None -> () let decode_constint32le_injective (v: nat { 0 <= v /\ v < 4294967296 } ) : Lemma
false
false
LowParse.Spec.ConstInt32.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 decode_constint32le_injective (v: nat{0 <= v /\ v < 4294967296}) : Lemma (make_constant_size_parser_precond 4 (constint32 v) (decode_constint32le v))
[]
LowParse.Spec.ConstInt32.decode_constint32le_injective
{ "file_name": "src/lowparse/LowParse.Spec.ConstInt32.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
v: Prims.nat{0 <= v /\ v < 4294967296} -> FStar.Pervasives.Lemma (ensures LowParse.Spec.Combinators.make_constant_size_parser_precond 4 (LowParse.Spec.ConstInt32.constint32 v) (LowParse.Spec.ConstInt32.decode_constint32le v))
{ "end_col": 61, "end_line": 70, "start_col": 2, "start_line": 70 }
FStar.Pervasives.Lemma
val decode_constint32le_injective' (v: nat{0 <= v /\ v < 4294967296}) (b1: bytes{Seq.length b1 == 4}) (b2: bytes{Seq.length b2 == 4}) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2)
[ { "abbrev": true, "full_module": "LowParse.Math", "short_module": "M" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "FStar.UInt8", "short_module": "U8" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "LowParse.Spec.Int32le", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Endianness", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "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 decode_constint32le_injective' (v: nat { 0 <= v /\ v < 4294967296 } ) (b1: bytes { Seq.length b1 == 4 } ) (b2: bytes { Seq.length b2 == 4 } ) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2) = let res1 = decode_constint32le v b1 in let res2 = decode_constint32le v b2 in match res1 with | Some v1 -> assert ( U32.v v1 == v ); (match res2 with | Some v2 -> assert ( U32.v v2 == v ); assert ( v1 == v2 ); decode_int32le_injective b1 b2 | None -> ()) | None -> ()
val decode_constint32le_injective' (v: nat{0 <= v /\ v < 4294967296}) (b1: bytes{Seq.length b1 == 4}) (b2: bytes{Seq.length b2 == 4}) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2) let decode_constint32le_injective' (v: nat{0 <= v /\ v < 4294967296}) (b1: bytes{Seq.length b1 == 4}) (b2: bytes{Seq.length b2 == 4}) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2) =
false
null
true
let res1 = decode_constint32le v b1 in let res2 = decode_constint32le v b2 in match res1 with | Some v1 -> assert (U32.v v1 == v); (match res2 with | Some v2 -> assert (U32.v v2 == v); assert (v1 == v2); decode_int32le_injective b1 b2 | None -> ()) | None -> ()
{ "checked_file": "LowParse.Spec.ConstInt32.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.Int32le.fst.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Base.fsti.checked", "LowParse.Math.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Endianness.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": false, "source_file": "LowParse.Spec.ConstInt32.fst" }
[ "lemma" ]
[ "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "LowParse.Bytes.bytes", "Prims.eq2", "Prims.int", "FStar.Seq.Base.length", "LowParse.Bytes.byte", "LowParse.Spec.ConstInt32.constint32", "LowParse.Spec.Int32le.decode_int32le_injective", "Prims.unit", "Prims._assert", "Prims.l_or", "FStar.UInt.size", "FStar.UInt32.n", "Prims.op_GreaterThanOrEqual", "FStar.UInt32.v", "FStar.Pervasives.Native.option", "LowParse.Spec.ConstInt32.decode_constint32le", "Prims.l_True", "Prims.squash", "Prims.l_imp", "FStar.Pervasives.Native.uu___is_Some", "FStar.Seq.Base.equal", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module LowParse.Spec.ConstInt32 (* LowParse specification module for parsing 32 bits = 4 bytes unsigned constants Examples: uint32 foo = 5 uint32_le foo = 7 *) (* TODO: support big endian constants *) include FStar.Endianness include LowParse.Spec.Base include LowParse.Spec.Combinators include LowParse.Spec.Int32le module U32 = FStar.UInt32 module U8 = FStar.UInt8 module Seq = FStar.Seq module M = LowParse.Math let constint32 (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot Type = (u: U32.t { U32.v u == v } ) inline_for_extraction let parse_constint32le_kind : parser_kind = strong_parser_kind 4 4 None let decode_constint32le (v: nat {0 <= v /\ v < 4294967296 } ) (b: bytes { Seq.length b == 4 } ) : Tot (option (constint32 v)) = let v' = decode_int32le b in if U32.v v' = v then Some v' else None let decode_constint32le_injective' (v: nat { 0 <= v /\ v < 4294967296 } ) (b1: bytes { Seq.length b1 == 4 } ) (b2: bytes { Seq.length b2 == 4 } ) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2)
false
false
LowParse.Spec.ConstInt32.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 decode_constint32le_injective' (v: nat{0 <= v /\ v < 4294967296}) (b1: bytes{Seq.length b1 == 4}) (b2: bytes{Seq.length b2 == 4}) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2)
[]
LowParse.Spec.ConstInt32.decode_constint32le_injective'
{ "file_name": "src/lowparse/LowParse.Spec.ConstInt32.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
v: Prims.nat{0 <= v /\ v < 4294967296} -> b1: LowParse.Bytes.bytes{FStar.Seq.Base.length b1 == 4} -> b2: LowParse.Bytes.bytes{FStar.Seq.Base.length b2 == 4} -> FStar.Pervasives.Lemma (ensures (Some? (LowParse.Spec.ConstInt32.decode_constint32le v b1) \/ Some? (LowParse.Spec.ConstInt32.decode_constint32le v b2)) /\ LowParse.Spec.ConstInt32.decode_constint32le v b1 == LowParse.Spec.ConstInt32.decode_constint32le v b2 ==> FStar.Seq.Base.equal b1 b2)
{ "end_col": 14, "end_line": 64, "start_col": 1, "start_line": 53 }
FStar.Pervasives.Lemma
val serialize_constint32le_correct (v: nat{0 <= v /\ v < 4294967296}) : Lemma (serializer_correct (parse_constint32le v) (serialize_constint32le' v))
[ { "abbrev": true, "full_module": "LowParse.Math", "short_module": "M" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "FStar.UInt8", "short_module": "U8" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "LowParse.Spec.Int32le", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Endianness", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "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 serialize_constint32le_correct (v: nat { 0 <= v /\ v < 4294967296 } ) : Lemma (serializer_correct (parse_constint32le v) (serialize_constint32le' v)) = let prf (x: constint32 v) : Lemma (let res = n_to_le 4 v in U32.v x == v /\ Seq.length res == 4 /\ (parse (parse_constint32le v) res == Some (x, 4))) = () in Classical.forall_intro prf
val serialize_constint32le_correct (v: nat{0 <= v /\ v < 4294967296}) : Lemma (serializer_correct (parse_constint32le v) (serialize_constint32le' v)) let serialize_constint32le_correct (v: nat{0 <= v /\ v < 4294967296}) : Lemma (serializer_correct (parse_constint32le v) (serialize_constint32le' v)) =
false
null
true
let prf (x: constint32 v) : Lemma (let res = n_to_le 4 v in U32.v x == v /\ Seq.length res == 4 /\ (parse (parse_constint32le v) res == Some (x, 4))) = () in Classical.forall_intro prf
{ "checked_file": "LowParse.Spec.ConstInt32.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.Int32le.fst.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Base.fsti.checked", "LowParse.Math.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Endianness.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": false, "source_file": "LowParse.Spec.ConstInt32.fst" }
[ "lemma" ]
[ "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "FStar.Classical.forall_intro", "LowParse.Spec.ConstInt32.constint32", "Prims.eq2", "Prims.int", "Prims.l_or", "FStar.UInt.size", "FStar.UInt32.n", "Prims.op_GreaterThanOrEqual", "FStar.UInt32.v", "FStar.Seq.Base.length", "FStar.UInt8.t", "FStar.Endianness.n_to_le", "FStar.Pervasives.Native.option", "FStar.Pervasives.Native.tuple2", "LowParse.Spec.Base.consumed_length", "LowParse.Spec.Base.parse", "LowParse.Spec.ConstInt32.parse_constint32le", "FStar.Pervasives.Native.Some", "FStar.Pervasives.Native.Mktuple2", "Prims.unit", "Prims.l_True", "Prims.squash", "Prims.Nil", "FStar.Pervasives.pattern", "FStar.Endianness.bytes", "FStar.Endianness.le_to_n", "LowParse.Spec.Base.serializer_correct", "LowParse.Spec.ConstInt32.parse_constint32le_kind", "LowParse.Spec.ConstInt32.serialize_constint32le'" ]
[]
module LowParse.Spec.ConstInt32 (* LowParse specification module for parsing 32 bits = 4 bytes unsigned constants Examples: uint32 foo = 5 uint32_le foo = 7 *) (* TODO: support big endian constants *) include FStar.Endianness include LowParse.Spec.Base include LowParse.Spec.Combinators include LowParse.Spec.Int32le module U32 = FStar.UInt32 module U8 = FStar.UInt8 module Seq = FStar.Seq module M = LowParse.Math let constint32 (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot Type = (u: U32.t { U32.v u == v } ) inline_for_extraction let parse_constint32le_kind : parser_kind = strong_parser_kind 4 4 None let decode_constint32le (v: nat {0 <= v /\ v < 4294967296 } ) (b: bytes { Seq.length b == 4 } ) : Tot (option (constint32 v)) = let v' = decode_int32le b in if U32.v v' = v then Some v' else None let decode_constint32le_injective' (v: nat { 0 <= v /\ v < 4294967296 } ) (b1: bytes { Seq.length b1 == 4 } ) (b2: bytes { Seq.length b2 == 4 } ) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2) = let res1 = decode_constint32le v b1 in let res2 = decode_constint32le v b2 in match res1 with | Some v1 -> assert ( U32.v v1 == v ); (match res2 with | Some v2 -> assert ( U32.v v2 == v ); assert ( v1 == v2 ); decode_int32le_injective b1 b2 | None -> ()) | None -> () let decode_constint32le_injective (v: nat { 0 <= v /\ v < 4294967296 } ) : Lemma (make_constant_size_parser_precond 4 (constint32 v) (decode_constint32le v)) = Classical.forall_intro_2 (decode_constint32le_injective' v) let parse_constint32le (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot (parser parse_constint32le_kind (constint32 v)) = decode_constint32le_injective v; make_constant_size_parser 4 (constint32 v) (decode_constint32le v) let parse_constint32le_unfold (v: nat { 0 <= v /\ v < 4294967296 } ) (input: bytes) : Lemma (parse (parse_constint32le v) input == (let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then Some (x, consumed) else None | None -> None)) = let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then () else () | None -> () let serialize_constint32le' (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot (bare_serializer (constint32 v)) = fun (x: constint32 v) -> let res = n_to_le 4 v in res let serialize_constint32le_correct (v: nat { 0 <= v /\ v < 4294967296 } ) : Lemma
false
false
LowParse.Spec.ConstInt32.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 serialize_constint32le_correct (v: nat{0 <= v /\ v < 4294967296}) : Lemma (serializer_correct (parse_constint32le v) (serialize_constint32le' v))
[]
LowParse.Spec.ConstInt32.serialize_constint32le_correct
{ "file_name": "src/lowparse/LowParse.Spec.ConstInt32.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
v: Prims.nat{0 <= v /\ v < 4294967296} -> FStar.Pervasives.Lemma (ensures LowParse.Spec.Base.serializer_correct (LowParse.Spec.ConstInt32.parse_constint32le v) (LowParse.Spec.ConstInt32.serialize_constint32le' v))
{ "end_col": 28, "end_line": 118, "start_col": 1, "start_line": 111 }
FStar.Pervasives.Lemma
val parse_constint32le_unfold (v: nat{0 <= v /\ v < 4294967296}) (input: bytes) : Lemma (parse (parse_constint32le v) input == (let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then Some (x, consumed) else None | None -> None))
[ { "abbrev": true, "full_module": "LowParse.Math", "short_module": "M" }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "FStar.UInt8", "short_module": "U8" }, { "abbrev": true, "full_module": "FStar.UInt32", "short_module": "U32" }, { "abbrev": false, "full_module": "LowParse.Spec.Int32le", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Combinators", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec.Base", "short_module": null }, { "abbrev": false, "full_module": "FStar.Endianness", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "short_module": null }, { "abbrev": false, "full_module": "LowParse.Spec", "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_constint32le_unfold (v: nat { 0 <= v /\ v < 4294967296 } ) (input: bytes) : Lemma (parse (parse_constint32le v) input == (let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then Some (x, consumed) else None | None -> None)) = let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then () else () | None -> ()
val parse_constint32le_unfold (v: nat{0 <= v /\ v < 4294967296}) (input: bytes) : Lemma (parse (parse_constint32le v) input == (let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then Some (x, consumed) else None | None -> None)) let parse_constint32le_unfold (v: nat{0 <= v /\ v < 4294967296}) (input: bytes) : Lemma (parse (parse_constint32le v) input == (let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then Some (x, consumed) else None | None -> None)) =
false
null
true
let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then () | None -> ()
{ "checked_file": "LowParse.Spec.ConstInt32.fst.checked", "dependencies": [ "prims.fst.checked", "LowParse.Spec.Int32le.fst.checked", "LowParse.Spec.Combinators.fsti.checked", "LowParse.Spec.Base.fsti.checked", "LowParse.Math.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Endianness.fsti.checked", "FStar.Classical.fsti.checked" ], "interface_file": false, "source_file": "LowParse.Spec.ConstInt32.fst" }
[ "lemma" ]
[ "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "LowParse.Bytes.bytes", "FStar.UInt32.t", "LowParse.Spec.Base.consumed_length", "Prims.op_AmpAmp", "Prims.op_Equality", "Prims.int", "Prims.l_or", "FStar.UInt.size", "FStar.UInt32.n", "Prims.op_GreaterThanOrEqual", "FStar.UInt32.v", "Prims.bool", "Prims.unit", "FStar.Pervasives.Native.option", "FStar.Pervasives.Native.tuple2", "LowParse.Spec.Base.parse", "LowParse.Spec.Int32le.parse_int32le", "Prims.l_True", "Prims.squash", "Prims.eq2", "LowParse.Spec.ConstInt32.constint32", "LowParse.Spec.ConstInt32.parse_constint32le", "FStar.Pervasives.Native.Some", "FStar.Pervasives.Native.Mktuple2", "FStar.Pervasives.Native.None", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
module LowParse.Spec.ConstInt32 (* LowParse specification module for parsing 32 bits = 4 bytes unsigned constants Examples: uint32 foo = 5 uint32_le foo = 7 *) (* TODO: support big endian constants *) include FStar.Endianness include LowParse.Spec.Base include LowParse.Spec.Combinators include LowParse.Spec.Int32le module U32 = FStar.UInt32 module U8 = FStar.UInt8 module Seq = FStar.Seq module M = LowParse.Math let constint32 (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot Type = (u: U32.t { U32.v u == v } ) inline_for_extraction let parse_constint32le_kind : parser_kind = strong_parser_kind 4 4 None let decode_constint32le (v: nat {0 <= v /\ v < 4294967296 } ) (b: bytes { Seq.length b == 4 } ) : Tot (option (constint32 v)) = let v' = decode_int32le b in if U32.v v' = v then Some v' else None let decode_constint32le_injective' (v: nat { 0 <= v /\ v < 4294967296 } ) (b1: bytes { Seq.length b1 == 4 } ) (b2: bytes { Seq.length b2 == 4 } ) : Lemma ((Some? (decode_constint32le v b1) \/ Some? (decode_constint32le v b2)) /\ (decode_constint32le v b1 == decode_constint32le v b2) ==> Seq.equal b1 b2) = let res1 = decode_constint32le v b1 in let res2 = decode_constint32le v b2 in match res1 with | Some v1 -> assert ( U32.v v1 == v ); (match res2 with | Some v2 -> assert ( U32.v v2 == v ); assert ( v1 == v2 ); decode_int32le_injective b1 b2 | None -> ()) | None -> () let decode_constint32le_injective (v: nat { 0 <= v /\ v < 4294967296 } ) : Lemma (make_constant_size_parser_precond 4 (constint32 v) (decode_constint32le v)) = Classical.forall_intro_2 (decode_constint32le_injective' v) let parse_constint32le (v: nat { 0 <= v /\ v < 4294967296 } ) : Tot (parser parse_constint32le_kind (constint32 v)) = decode_constint32le_injective v; make_constant_size_parser 4 (constint32 v) (decode_constint32le v) let parse_constint32le_unfold (v: nat { 0 <= v /\ v < 4294967296 } ) (input: bytes) : Lemma (parse (parse_constint32le v) input == (let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then Some (x, consumed) else None
false
false
LowParse.Spec.ConstInt32.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 parse_constint32le_unfold (v: nat{0 <= v /\ v < 4294967296}) (input: bytes) : Lemma (parse (parse_constint32le v) input == (let res = parse parse_int32le input in match res with | Some (x, consumed) -> if U32.v x = v && consumed = 4 then Some (x, consumed) else None | None -> None))
[]
LowParse.Spec.ConstInt32.parse_constint32le_unfold
{ "file_name": "src/lowparse/LowParse.Spec.ConstInt32.fst", "git_rev": "446a08ce38df905547cf20f28c43776b22b8087a", "git_url": "https://github.com/project-everest/everparse.git", "project_name": "everparse" }
v: Prims.nat{0 <= v /\ v < 4294967296} -> input: LowParse.Bytes.bytes -> FStar.Pervasives.Lemma (ensures LowParse.Spec.Base.parse (LowParse.Spec.ConstInt32.parse_constint32le v) input == (let res = LowParse.Spec.Base.parse LowParse.Spec.Int32le.parse_int32le input in (match res with | FStar.Pervasives.Native.Some #_ (FStar.Pervasives.Native.Mktuple2 #_ #_ x consumed) -> (match FStar.UInt32.v x = v && consumed = 4 with | true -> FStar.Pervasives.Native.Some (x, consumed) | _ -> FStar.Pervasives.Native.None) <: FStar.Pervasives.Native.option (LowParse.Spec.ConstInt32.constint32 v * LowParse.Spec.Base.consumed_length input) | FStar.Pervasives.Native.None #_ -> FStar.Pervasives.Native.None) <: FStar.Pervasives.Native.option (LowParse.Spec.ConstInt32.constint32 v * LowParse.Spec.Base.consumed_length input)))
{ "end_col": 16, "end_line": 98, "start_col": 1, "start_line": 91 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "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 uint64 = UInt64.t
let uint64 =
false
null
false
UInt64.t
{ "checked_file": "Vale.Wrapper.X64.GCTR.fsti.checked", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCTR.fsti" }
[ "total" ]
[ "FStar.UInt64.t" ]
[]
module Vale.Wrapper.X64.GCTR open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.AES.AES_s open Vale.AES.GCTR open Vale.AES.GCTR_s open Vale.Interop.Base open Vale.Def.Types_s unfold
false
true
Vale.Wrapper.X64.GCTR.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 uint64 : Prims.eqtype
[]
Vale.Wrapper.X64.GCTR.uint64
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCTR.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.eqtype
{ "end_col": 21, "end_line": 20, "start_col": 13, "start_line": 20 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "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_p = B.buffer UInt8.t
let uint8_p =
false
null
false
B.buffer UInt8.t
{ "checked_file": "Vale.Wrapper.X64.GCTR.fsti.checked", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCTR.fsti" }
[ "total" ]
[ "LowStar.Buffer.buffer", "FStar.UInt8.t" ]
[]
module Vale.Wrapper.X64.GCTR open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.AES.AES_s open Vale.AES.GCTR open Vale.AES.GCTR_s open Vale.Interop.Base open Vale.Def.Types_s
false
true
Vale.Wrapper.X64.GCTR.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 uint8_p : Type0
[]
Vale.Wrapper.X64.GCTR.uint8_p
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCTR.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 30, "end_line": 19, "start_col": 14, "start_line": 19 }
Prims.Tot
[ { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Interop.Base", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.GCTR", "short_module": null }, { "abbrev": false, "full_module": "Vale.AES.AES_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": true, "full_module": "LowStar.BufferView.Up", "short_module": "UV" }, { "abbrev": true, "full_module": "LowStar.BufferView.Down", "short_module": "DV" }, { "abbrev": true, "full_module": "FStar.HyperStack", "short_module": "HS" }, { "abbrev": true, "full_module": "LowStar.Buffer", "short_module": "B" }, { "abbrev": false, "full_module": "FStar.HyperStack.ST", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.Wrapper.X64", "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 gctr_bytes_st (a: algorithm { a = AES_128 \/ a = AES_256 }) = key:Ghost.erased (Seq.seq nat32) -> in_b:uint8_p -> num_bytes:uint64 -> out_b:uint8_p -> keys_b:uint8_p -> ctr_b:uint8_p -> Stack unit (requires fun h0 -> B.disjoint in_b out_b /\ B.disjoint keys_b out_b /\ B.disjoint in_b keys_b /\ B.disjoint ctr_b in_b /\ B.disjoint ctr_b out_b /\ B.disjoint ctr_b keys_b /\ B.live h0 keys_b /\ B.live h0 in_b /\ B.live h0 out_b /\ B.live h0 ctr_b /\ B.length in_b = UInt64.v num_bytes /\ B.length out_b = B.length in_b /\ B.length ctr_b = 16 /\ B.length keys_b = Vale.Wrapper.X64.AES.key_offset a /\ 4096 * (UInt64.v num_bytes) < pow2_32 /\ aesni_enabled /\ avx_enabled /\ sse_enabled /\ is_aes_key_LE a (Ghost.reveal key) /\ (Seq.equal (B.as_seq h0 keys_b) (seq_nat8_to_seq_uint8 (le_seq_quad32_to_bytes (key_to_round_keys_LE a (Ghost.reveal key))))) ) (ensures fun h0 r h1 -> B.modifies (B.loc_buffer out_b) h0 h1 /\ (let ctr = seq_uint8_to_seq_nat8 (B.as_seq h0 ctr_b) in let plain = seq_uint8_to_seq_nat8 (B.as_seq h0 in_b) in let cipher = seq_uint8_to_seq_nat8 (B.as_seq h1 out_b) in Seq.equal (gctr_encrypt_LE (le_bytes_to_quad32 ctr) (make_gctr_plain_LE plain) a (Ghost.reveal key)) cipher ) )
let gctr_bytes_st (a: algorithm{a = AES_128 \/ a = AES_256}) =
false
null
false
key: Ghost.erased (Seq.seq nat32) -> in_b: uint8_p -> num_bytes: uint64 -> out_b: uint8_p -> keys_b: uint8_p -> ctr_b: uint8_p -> Stack unit (requires fun h0 -> B.disjoint in_b out_b /\ B.disjoint keys_b out_b /\ B.disjoint in_b keys_b /\ B.disjoint ctr_b in_b /\ B.disjoint ctr_b out_b /\ B.disjoint ctr_b keys_b /\ B.live h0 keys_b /\ B.live h0 in_b /\ B.live h0 out_b /\ B.live h0 ctr_b /\ B.length in_b = UInt64.v num_bytes /\ B.length out_b = B.length in_b /\ B.length ctr_b = 16 /\ B.length keys_b = Vale.Wrapper.X64.AES.key_offset a /\ 4096 * (UInt64.v num_bytes) < pow2_32 /\ aesni_enabled /\ avx_enabled /\ sse_enabled /\ is_aes_key_LE a (Ghost.reveal key) /\ (Seq.equal (B.as_seq h0 keys_b) (seq_nat8_to_seq_uint8 (le_seq_quad32_to_bytes (key_to_round_keys_LE a (Ghost.reveal key)))))) (ensures fun h0 r h1 -> B.modifies (B.loc_buffer out_b) h0 h1 /\ (let ctr = seq_uint8_to_seq_nat8 (B.as_seq h0 ctr_b) in let plain = seq_uint8_to_seq_nat8 (B.as_seq h0 in_b) in let cipher = seq_uint8_to_seq_nat8 (B.as_seq h1 out_b) in Seq.equal (gctr_encrypt_LE (le_bytes_to_quad32 ctr) (make_gctr_plain_LE plain) a (Ghost.reveal key)) cipher))
{ "checked_file": "Vale.Wrapper.X64.GCTR.fsti.checked", "dependencies": [ "Vale.X64.CPU_Features_s.fst.checked", "Vale.Wrapper.X64.AES.fsti.checked", "Vale.Interop.Base.fst.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.AES.GCTR_s.fst.checked", "Vale.AES.GCTR.fsti.checked", "Vale.AES.AES_s.fst.checked", "prims.fst.checked", "LowStar.BufferView.Up.fsti.checked", "LowStar.BufferView.Down.fsti.checked", "LowStar.Buffer.fst.checked", "FStar.UInt8.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.HyperStack.ST.fsti.checked", "FStar.HyperStack.fst.checked", "FStar.Ghost.fsti.checked" ], "interface_file": false, "source_file": "Vale.Wrapper.X64.GCTR.fsti" }
[ "total" ]
[ "Vale.AES.AES_common_s.algorithm", "Prims.l_or", "Prims.b2t", "Prims.op_Equality", "Vale.AES.AES_common_s.AES_128", "Vale.AES.AES_common_s.AES_256", "FStar.Ghost.erased", "FStar.Seq.Base.seq", "Vale.Def.Types_s.nat32", "Vale.Wrapper.X64.GCTR.uint8_p", "Vale.Wrapper.X64.GCTR.uint64", "Prims.unit", "FStar.Monotonic.HyperStack.mem", "Prims.l_and", "LowStar.Monotonic.Buffer.disjoint", "FStar.UInt8.t", "LowStar.Buffer.trivial_preorder", "LowStar.Monotonic.Buffer.live", "Prims.int", "Prims.op_GreaterThanOrEqual", "FStar.UInt.size", "FStar.UInt64.n", "LowStar.Monotonic.Buffer.length", "FStar.UInt64.v", "Prims.nat", "Vale.Wrapper.X64.AES.key_offset", "Prims.op_LessThan", "FStar.Mul.op_Star", "Vale.Def.Words_s.pow2_32", "Vale.X64.CPU_Features_s.aesni_enabled", "Vale.X64.CPU_Features_s.avx_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.AES.AES_s.is_aes_key_LE", "FStar.Ghost.reveal", "FStar.Seq.Base.equal", "LowStar.Monotonic.Buffer.as_seq", "Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8", "Vale.Def.Types_s.le_seq_quad32_to_bytes", "Vale.AES.AES_s.key_to_round_keys_LE", "LowStar.Monotonic.Buffer.modifies", "LowStar.Monotonic.Buffer.loc_buffer", "Vale.Def.Types_s.nat8", "Vale.AES.GCTR_s.gctr_encrypt_LE", "Vale.Def.Types_s.le_bytes_to_quad32", "Vale.AES.GCTR.make_gctr_plain_LE", "Vale.Def.Words_s.nat8", "Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8" ]
[]
module Vale.Wrapper.X64.GCTR open Vale.X64.CPU_Features_s open FStar.HyperStack.ST module B = LowStar.Buffer module HS = FStar.HyperStack module DV = LowStar.BufferView.Down module UV = LowStar.BufferView.Up open FStar.Mul open Vale.Def.Words_s open Vale.Def.Words.Seq_s open Vale.AES.AES_s open Vale.AES.GCTR open Vale.AES.GCTR_s open Vale.Interop.Base open Vale.Def.Types_s unfold let uint8_p = B.buffer UInt8.t let uint64 = UInt64.t inline_for_extraction noextract
false
false
Vale.Wrapper.X64.GCTR.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 gctr_bytes_st : a: Vale.AES.AES_common_s.algorithm {a = Vale.AES.AES_common_s.AES_128 \/ a = Vale.AES.AES_common_s.AES_256} -> Type0
[]
Vale.Wrapper.X64.GCTR.gctr_bytes_st
{ "file_name": "vale/code/arch/x64/interop/Vale.Wrapper.X64.GCTR.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
a: Vale.AES.AES_common_s.algorithm {a = Vale.AES.AES_common_s.AES_128 \/ a = Vale.AES.AES_common_s.AES_256} -> Type0
{ "end_col": 4, "end_line": 64, "start_col": 1, "start_line": 24 }
Prims.Tot
val va_quick_SHA256_rnds2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_SHA256_rnds2 dst src))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt32", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "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 va_quick_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_SHA256_rnds2 dst src)) = (va_QProc (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_rnds2 dst src t block hash_orig) (va_wpProof_SHA256_rnds2 dst src t block hash_orig))
val va_quick_SHA256_rnds2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_SHA256_rnds2 dst src)) let va_quick_SHA256_rnds2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_SHA256_rnds2 dst src)) =
false
null
false
(va_QProc (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_rnds2 dst src t block hash_orig) (va_wpProof_SHA256_rnds2 dst src t block hash_orig))
{ "checked_file": "Vale.X64.InsSha.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Arch.Types.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "Vale.X64.InsSha.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.SHA.SHA_helpers.counter", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.X64.InsSha.va_code_SHA256_rnds2", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_mod_xmm", "Prims.Nil", "Vale.X64.InsSha.va_wp_SHA256_rnds2", "Vale.X64.InsSha.va_wpProof_SHA256_rnds2", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.X64.InsSha open Vale.Def.Words_s open Vale.Def.Types_s open Vale.Arch.Types open Spec.SHA2 open Spec.Hash.Definitions open Vale.SHA.SHA_helpers open Vale.X64.Machine_s open Vale.X64.State open Vale.X64.Decls open Vale.X64.QuickCode open Vale.X64.InsVector open FStar.UInt32 open FStar.Seq open Spec.Loops open Vale.X64.CPU_Features_s //-- SHA256_rnds2 val va_code_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_rnds2 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_rnds2 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig ==> va_k va_sM (()))) val va_wpProof_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_SHA256_rnds2 dst src t block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@ "opaque_to_smt" va_qattr] let va_quick_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w)
false
false
Vale.X64.InsSha.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 va_quick_SHA256_rnds2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_SHA256_rnds2 dst src))
[]
Vale.X64.InsSha.va_quick_SHA256_rnds2
{ "file_name": "obj/Vale.X64.InsSha.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> t: Vale.SHA.SHA_helpers.counter -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.X64.InsSha.va_code_SHA256_rnds2 dst src)
{ "end_col": 67, "end_line": 59, "start_col": 2, "start_line": 58 }
Prims.Tot
val va_quick_SHA256_msg2 (dst src: va_operand_xmm) (t: counter) (block: block_w) : (va_quickCode unit (va_code_SHA256_msg2 dst src))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt32", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "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 va_quick_SHA256_msg2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) : (va_quickCode unit (va_code_SHA256_msg2 dst src)) = (va_QProc (va_code_SHA256_msg2 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_msg2 dst src t block) (va_wpProof_SHA256_msg2 dst src t block))
val va_quick_SHA256_msg2 (dst src: va_operand_xmm) (t: counter) (block: block_w) : (va_quickCode unit (va_code_SHA256_msg2 dst src)) let va_quick_SHA256_msg2 (dst src: va_operand_xmm) (t: counter) (block: block_w) : (va_quickCode unit (va_code_SHA256_msg2 dst src)) =
false
null
false
(va_QProc (va_code_SHA256_msg2 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_msg2 dst src t block) (va_wpProof_SHA256_msg2 dst src t block))
{ "checked_file": "Vale.X64.InsSha.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Arch.Types.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "Vale.X64.InsSha.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.SHA.SHA_helpers.counter", "Vale.SHA.SHA_helpers.block_w", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.X64.InsSha.va_code_SHA256_msg2", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_mod_xmm", "Prims.Nil", "Vale.X64.InsSha.va_wp_SHA256_msg2", "Vale.X64.InsSha.va_wpProof_SHA256_msg2", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.X64.InsSha open Vale.Def.Words_s open Vale.Def.Types_s open Vale.Arch.Types open Spec.SHA2 open Spec.Hash.Definitions open Vale.SHA.SHA_helpers open Vale.X64.Machine_s open Vale.X64.State open Vale.X64.Decls open Vale.X64.QuickCode open Vale.X64.InsVector open FStar.UInt32 open FStar.Seq open Spec.Loops open Vale.X64.CPU_Features_s //-- SHA256_rnds2 val va_code_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_rnds2 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_rnds2 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig ==> va_k va_sM (()))) val va_wpProof_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_SHA256_rnds2 dst src t block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@ "opaque_to_smt" va_qattr] let va_quick_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_SHA256_rnds2 dst src)) = (va_QProc (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_rnds2 dst src t block hash_orig) (va_wpProof_SHA256_rnds2 dst src t block hash_orig)) //-- //-- SHA256_msg1 val va_code_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_msg1 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_msg1 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256)) /\ va_eval_xmm va_s0 dst == ws_quad32 (t - 16) block /\ (va_eval_xmm va_s0 src).lo0 == ws_opaque block (t - 12))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_partial t block /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_msg1 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256)) /\ va_eval_xmm va_s0 dst == ws_quad32 (t - 16) block /\ (va_eval_xmm va_s0 src).lo0 == ws_opaque block (t - 12) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_partial t block ==> va_k va_sM (()))) val va_wpProof_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_SHA256_msg1 dst src t block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_SHA256_msg1 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@ "opaque_to_smt" va_qattr] let va_quick_SHA256_msg1 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) : (va_quickCode unit (va_code_SHA256_msg1 dst src)) = (va_QProc (va_code_SHA256_msg1 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_msg1 dst src t block) (va_wpProof_SHA256_msg1 dst src t block)) //-- //-- SHA256_msg2 val va_code_SHA256_msg2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_msg2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_msg2 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_msg2 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256 - 3)) /\ (let step1 = ws_partial t block in let t_minus_7 = ws_quad32 (t - 7) block in va_eval_xmm va_s0 dst == add_wrap_quad32 step1 t_minus_7) /\ (va_eval_xmm va_s0 src).hi2 == ws_opaque block (t - 2) /\ (va_eval_xmm va_s0 src).hi3 == ws_opaque block (t - 1))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_quad32 t block /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_msg2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256 - 3)) /\ (let step1 = ws_partial t block in let t_minus_7 = ws_quad32 (t - 7) block in va_eval_xmm va_s0 dst == add_wrap_quad32 step1 t_minus_7) /\ (va_eval_xmm va_s0 src).hi2 == ws_opaque block (t - 2) /\ (va_eval_xmm va_s0 src).hi3 == ws_opaque block (t - 1) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_quad32 t block ==> va_k va_sM (()))) val va_wpProof_SHA256_msg2 : dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_SHA256_msg2 dst src t block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_SHA256_msg2 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@ "opaque_to_smt" va_qattr] let va_quick_SHA256_msg2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) :
false
false
Vale.X64.InsSha.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 va_quick_SHA256_msg2 (dst src: va_operand_xmm) (t: counter) (block: block_w) : (va_quickCode unit (va_code_SHA256_msg2 dst src))
[]
Vale.X64.InsSha.va_quick_SHA256_msg2
{ "file_name": "obj/Vale.X64.InsSha.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> t: Vale.SHA.SHA_helpers.counter -> block: Vale.SHA.SHA_helpers.block_w -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.X64.InsSha.va_code_SHA256_msg2 dst src)
{ "end_col": 45, "end_line": 135, "start_col": 2, "start_line": 134 }
Prims.Tot
val va_quick_SHA256_msg1 (dst src: va_operand_xmm) (t: counter) (block: block_w) : (va_quickCode unit (va_code_SHA256_msg1 dst src))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt32", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "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 va_quick_SHA256_msg1 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) : (va_quickCode unit (va_code_SHA256_msg1 dst src)) = (va_QProc (va_code_SHA256_msg1 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_msg1 dst src t block) (va_wpProof_SHA256_msg1 dst src t block))
val va_quick_SHA256_msg1 (dst src: va_operand_xmm) (t: counter) (block: block_w) : (va_quickCode unit (va_code_SHA256_msg1 dst src)) let va_quick_SHA256_msg1 (dst src: va_operand_xmm) (t: counter) (block: block_w) : (va_quickCode unit (va_code_SHA256_msg1 dst src)) =
false
null
false
(va_QProc (va_code_SHA256_msg1 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_msg1 dst src t block) (va_wpProof_SHA256_msg1 dst src t block))
{ "checked_file": "Vale.X64.InsSha.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Arch.Types.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "Vale.X64.InsSha.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.SHA.SHA_helpers.counter", "Vale.SHA.SHA_helpers.block_w", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.X64.InsSha.va_code_SHA256_msg1", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_mod_xmm", "Prims.Nil", "Vale.X64.InsSha.va_wp_SHA256_msg1", "Vale.X64.InsSha.va_wpProof_SHA256_msg1", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.X64.InsSha open Vale.Def.Words_s open Vale.Def.Types_s open Vale.Arch.Types open Spec.SHA2 open Spec.Hash.Definitions open Vale.SHA.SHA_helpers open Vale.X64.Machine_s open Vale.X64.State open Vale.X64.Decls open Vale.X64.QuickCode open Vale.X64.InsVector open FStar.UInt32 open FStar.Seq open Spec.Loops open Vale.X64.CPU_Features_s //-- SHA256_rnds2 val va_code_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_rnds2 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_rnds2 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig ==> va_k va_sM (()))) val va_wpProof_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_SHA256_rnds2 dst src t block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@ "opaque_to_smt" va_qattr] let va_quick_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_SHA256_rnds2 dst src)) = (va_QProc (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_rnds2 dst src t block hash_orig) (va_wpProof_SHA256_rnds2 dst src t block hash_orig)) //-- //-- SHA256_msg1 val va_code_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_msg1 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_msg1 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256)) /\ va_eval_xmm va_s0 dst == ws_quad32 (t - 16) block /\ (va_eval_xmm va_s0 src).lo0 == ws_opaque block (t - 12))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_partial t block /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_msg1 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256)) /\ va_eval_xmm va_s0 dst == ws_quad32 (t - 16) block /\ (va_eval_xmm va_s0 src).lo0 == ws_opaque block (t - 12) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_partial t block ==> va_k va_sM (()))) val va_wpProof_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_SHA256_msg1 dst src t block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_SHA256_msg1 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@ "opaque_to_smt" va_qattr] let va_quick_SHA256_msg1 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) :
false
false
Vale.X64.InsSha.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 va_quick_SHA256_msg1 (dst src: va_operand_xmm) (t: counter) (block: block_w) : (va_quickCode unit (va_code_SHA256_msg1 dst src))
[]
Vale.X64.InsSha.va_quick_SHA256_msg1
{ "file_name": "obj/Vale.X64.InsSha.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> t: Vale.SHA.SHA_helpers.counter -> block: Vale.SHA.SHA_helpers.block_w -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.X64.InsSha.va_code_SHA256_msg1 dst src)
{ "end_col": 45, "end_line": 96, "start_col": 2, "start_line": 95 }
Prims.Tot
val va_wp_SHA256_msg1 (dst src: va_operand_xmm) (t: counter) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt32", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "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 va_wp_SHA256_msg1 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256)) /\ va_eval_xmm va_s0 dst == ws_quad32 (t - 16) block /\ (va_eval_xmm va_s0 src).lo0 == ws_opaque block (t - 12) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_partial t block ==> va_k va_sM (())))
val va_wp_SHA256_msg1 (dst src: va_operand_xmm) (t: counter) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_SHA256_msg1 (dst src: va_operand_xmm) (t: counter) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256)) /\ va_eval_xmm va_s0 dst == ws_quad32 (t - 16) block /\ (va_eval_xmm va_s0 src).lo0 == ws_opaque block (t - 12) /\ (forall (va_x_dst: va_value_xmm). let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_partial t block ==> va_k va_sM (())))
{ "checked_file": "Vale.X64.InsSha.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Arch.Types.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "Vale.X64.InsSha.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.SHA.SHA_helpers.counter", "Vale.SHA.SHA_helpers.block_w", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Vale.X64.Decls.va_is_dst_xmm", "Vale.X64.Decls.va_is_src_xmm", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Prims.op_AmpAmp", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "Vale.SHA.SHA_helpers.size_k_w_256", "Prims.eq2", "Vale.Def.Types_s.quad32", "Vale.X64.Decls.va_eval_xmm", "Vale.SHA.SHA_helpers.ws_quad32", "Prims.op_Subtraction", "Vale.Def.Words_s.nat32", "Vale.Def.Words_s.__proj__Mkfour__item__lo0", "Vale.Def.Types_s.nat32", "Vale.SHA.SHA_helpers.ws_opaque", "Prims.l_Forall", "Vale.X64.Decls.va_value_xmm", "Prims.l_imp", "Vale.SHA.SHA_helpers.ws_partial", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_operand_xmm" ]
[]
module Vale.X64.InsSha open Vale.Def.Words_s open Vale.Def.Types_s open Vale.Arch.Types open Spec.SHA2 open Spec.Hash.Definitions open Vale.SHA.SHA_helpers open Vale.X64.Machine_s open Vale.X64.State open Vale.X64.Decls open Vale.X64.QuickCode open Vale.X64.InsVector open FStar.UInt32 open FStar.Seq open Spec.Loops open Vale.X64.CPU_Features_s //-- SHA256_rnds2 val va_code_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_rnds2 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_rnds2 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig ==> va_k va_sM (()))) val va_wpProof_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_SHA256_rnds2 dst src t block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@ "opaque_to_smt" va_qattr] let va_quick_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_SHA256_rnds2 dst src)) = (va_QProc (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_rnds2 dst src t block hash_orig) (va_wpProof_SHA256_rnds2 dst src t block hash_orig)) //-- //-- SHA256_msg1 val va_code_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_msg1 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_msg1 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256)) /\ va_eval_xmm va_s0 dst == ws_quad32 (t - 16) block /\ (va_eval_xmm va_s0 src).lo0 == ws_opaque block (t - 12))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_partial t block /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_msg1 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w)
false
true
Vale.X64.InsSha.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 va_wp_SHA256_msg1 (dst src: va_operand_xmm) (t: counter) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.X64.InsSha.va_wp_SHA256_msg1
{ "file_name": "obj/Vale.X64.InsSha.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> t: Vale.SHA.SHA_helpers.counter -> block: Vale.SHA.SHA_helpers.block_w -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 33, "end_line": 84, "start_col": 2, "start_line": 80 }
Prims.Tot
val va_wp_SHA256_rnds2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt32", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "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 va_wp_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig ==> va_k va_sM (())))
val va_wp_SHA256_rnds2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_SHA256_rnds2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig /\ (forall (va_x_dst: va_value_xmm). let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig ==> va_k va_sM (())))
{ "checked_file": "Vale.X64.InsSha.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Arch.Types.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "Vale.X64.InsSha.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.SHA.SHA_helpers.counter", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Vale.X64.Decls.va_is_dst_xmm", "Vale.X64.Decls.va_is_src_xmm", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Prims.op_LessThan", "Prims.op_Addition", "Vale.SHA.SHA_helpers.size_k_w_256", "Prims.eq2", "Vale.Def.Words_s.natN", "Vale.Def.Words_s.pow2_32", "Vale.Def.Words_s.__proj__Mkfour__item__lo0", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Types_s.add_wrap", "Vale.SHA.SHA_helpers.word_to_nat32", "FStar.Seq.Base.index", "Vale.SHA.SHA_helpers.word", "Vale.SHA.SHA_helpers.k", "Vale.SHA.SHA_helpers.ws_opaque", "Vale.Def.Words_s.__proj__Mkfour__item__lo1", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_eval_xmm", "Spec.Loops.repeat_range", "Vale.SHA.SHA_helpers.shuffle_core_opaque", "Prims.l_Forall", "Vale.X64.Decls.va_value_xmm", "Prims.l_imp", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_operand_xmm" ]
[]
module Vale.X64.InsSha open Vale.Def.Words_s open Vale.Def.Types_s open Vale.Arch.Types open Spec.SHA2 open Spec.Hash.Definitions open Vale.SHA.SHA_helpers open Vale.X64.Machine_s open Vale.X64.State open Vale.X64.Decls open Vale.X64.QuickCode open Vale.X64.InsVector open FStar.UInt32 open FStar.Seq open Spec.Loops open Vale.X64.CPU_Features_s //-- SHA256_rnds2 val va_code_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_rnds2 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_rnds2 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w)
false
true
Vale.X64.InsSha.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 va_wp_SHA256_rnds2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.X64.InsSha.va_wp_SHA256_rnds2
{ "file_name": "obj/Vale.X64.InsSha.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> t: Vale.SHA.SHA_helpers.counter -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 21, "end_line": 47, "start_col": 2, "start_line": 40 }
Prims.Tot
val va_wp_SHA256_msg2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "FStar.UInt32", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64", "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 va_wp_SHA256_msg2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256 - 3)) /\ (let step1 = ws_partial t block in let t_minus_7 = ws_quad32 (t - 7) block in va_eval_xmm va_s0 dst == add_wrap_quad32 step1 t_minus_7) /\ (va_eval_xmm va_s0 src).hi2 == ws_opaque block (t - 2) /\ (va_eval_xmm va_s0 src).hi3 == ws_opaque block (t - 1) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_quad32 t block ==> va_k va_sM (())))
val va_wp_SHA256_msg2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_SHA256_msg2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256 - 3)) /\ (let step1 = ws_partial t block in let t_minus_7 = ws_quad32 (t - 7) block in va_eval_xmm va_s0 dst == add_wrap_quad32 step1 t_minus_7) /\ (va_eval_xmm va_s0 src).hi2 == ws_opaque block (t - 2) /\ (va_eval_xmm va_s0 src).hi3 == ws_opaque block (t - 1) /\ (forall (va_x_dst: va_value_xmm). let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_quad32 t block ==> va_k va_sM (())))
{ "checked_file": "Vale.X64.InsSha.fsti.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Arch.Types.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": false, "source_file": "Vale.X64.InsSha.fsti" }
[ "total" ]
[ "Vale.X64.Decls.va_operand_xmm", "Vale.SHA.SHA_helpers.counter", "Vale.SHA.SHA_helpers.block_w", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Vale.X64.Decls.va_is_dst_xmm", "Vale.X64.Decls.va_is_src_xmm", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Prims.op_AmpAmp", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "Prims.op_Subtraction", "Vale.SHA.SHA_helpers.size_k_w_256", "Prims.eq2", "Vale.Def.Types_s.quad32", "Vale.X64.Decls.va_eval_xmm", "Vale.Arch.Types.add_wrap_quad32", "Vale.SHA.SHA_helpers.ws_quad32", "Vale.SHA.SHA_helpers.ws_partial", "Vale.Def.Words_s.nat32", "Vale.Def.Words_s.__proj__Mkfour__item__hi2", "Vale.Def.Types_s.nat32", "Vale.SHA.SHA_helpers.ws_opaque", "Vale.Def.Words_s.__proj__Mkfour__item__hi3", "Prims.l_Forall", "Vale.X64.Decls.va_value_xmm", "Prims.l_imp", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_operand_xmm" ]
[]
module Vale.X64.InsSha open Vale.Def.Words_s open Vale.Def.Types_s open Vale.Arch.Types open Spec.SHA2 open Spec.Hash.Definitions open Vale.SHA.SHA_helpers open Vale.X64.Machine_s open Vale.X64.State open Vale.X64.Decls open Vale.X64.QuickCode open Vale.X64.InsVector open FStar.UInt32 open FStar.Seq open Spec.Loops open Vale.X64.CPU_Features_s //-- SHA256_rnds2 val va_code_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_rnds2 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_rnds2 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ t + 1 < size_k_w_256 /\ (va_get_xmm 0 va_s0).lo0 == add_wrap (word_to_nat32 (index k t)) (ws_opaque block t) /\ (va_get_xmm 0 va_s0).lo1 == add_wrap (word_to_nat32 (index k (t + 1))) (ws_opaque block (t + 1)) /\ make_hash (va_eval_xmm va_s0 src) (va_eval_xmm va_s0 dst) == repeat_range 0 t (shuffle_core_opaque block) hash_orig /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ make_hash (va_eval_xmm va_sM dst) (va_eval_xmm va_s0 src) == repeat_range 0 (t + 2) (shuffle_core_opaque block) hash_orig ==> va_k va_sM (()))) val va_wpProof_SHA256_rnds2 : dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_SHA256_rnds2 dst src t block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@ "opaque_to_smt" va_qattr] let va_quick_SHA256_rnds2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_SHA256_rnds2 dst src)) = (va_QProc (va_code_SHA256_rnds2 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_rnds2 dst src t block hash_orig) (va_wpProof_SHA256_rnds2 dst src t block hash_orig)) //-- //-- SHA256_msg1 val va_code_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_msg1 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_msg1 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256)) /\ va_eval_xmm va_s0 dst == ws_quad32 (t - 16) block /\ (va_eval_xmm va_s0 src).lo0 == ws_opaque block (t - 12))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_partial t block /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_msg1 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256)) /\ va_eval_xmm va_s0 dst == ws_quad32 (t - 16) block /\ (va_eval_xmm va_s0 src).lo0 == ws_opaque block (t - 12) /\ (forall (va_x_dst:va_value_xmm) . let va_sM = va_upd_operand_xmm dst va_x_dst va_s0 in va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_partial t block ==> va_k va_sM (()))) val va_wpProof_SHA256_msg1 : dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_SHA256_msg1 dst src t block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_SHA256_msg1 dst src) ([va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@ "opaque_to_smt" va_qattr] let va_quick_SHA256_msg1 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w) : (va_quickCode unit (va_code_SHA256_msg1 dst src)) = (va_QProc (va_code_SHA256_msg1 dst src) ([va_mod_xmm dst]) (va_wp_SHA256_msg1 dst src t block) (va_wpProof_SHA256_msg1 dst src t block)) //-- //-- SHA256_msg2 val va_code_SHA256_msg2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_code val va_codegen_success_SHA256_msg2 : dst:va_operand_xmm -> src:va_operand_xmm -> Tot va_pbool val va_lemma_SHA256_msg2 : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm -> src:va_operand_xmm -> t:counter -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_SHA256_msg2 dst src) va_s0 /\ va_is_dst_xmm dst va_s0 /\ va_is_src_xmm src va_s0 /\ va_get_ok va_s0 /\ sha_enabled /\ ((16 <= t && t < size_k_w_256 - 3)) /\ (let step1 = ws_partial t block in let t_minus_7 = ws_quad32 (t - 7) block in va_eval_xmm va_s0 dst == add_wrap_quad32 step1 t_minus_7) /\ (va_eval_xmm va_s0 src).hi2 == ws_opaque block (t - 2) /\ (va_eval_xmm va_s0 src).hi3 == ws_opaque block (t - 1))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ va_eval_xmm va_sM dst == ws_quad32 t block /\ va_state_eq va_sM (va_update_ok va_sM (va_update_operand_xmm dst va_sM va_s0)))) [@ va_qattr] let va_wp_SHA256_msg2 (dst:va_operand_xmm) (src:va_operand_xmm) (t:counter) (block:block_w)
false
true
Vale.X64.InsSha.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 va_wp_SHA256_msg2 (dst src: va_operand_xmm) (t: counter) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.X64.InsSha.va_wp_SHA256_msg2
{ "file_name": "obj/Vale.X64.InsSha.fsti", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
dst: Vale.X64.Decls.va_operand_xmm -> src: Vale.X64.Decls.va_operand_xmm -> t: Vale.SHA.SHA_helpers.counter -> block: Vale.SHA.SHA_helpers.block_w -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 87, "end_line": 123, "start_col": 2, "start_line": 118 }
Prims.Tot
[ { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "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 rotc_t = rotval U64
let rotc_t =
false
null
false
rotval U64
{ "checked_file": "Spec.SHA3.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA3.Constants.fst" }
[ "total" ]
[ "Lib.IntTypes.rotval", "Lib.IntTypes.U64" ]
[]
module Spec.SHA3.Constants open Lib.IntTypes open Lib.Sequence #reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
false
true
Spec.SHA3.Constants.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 rotc_t : Type0
[]
Spec.SHA3.Constants.rotc_t
{ "file_name": "specs/Spec.SHA3.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 23, "end_line": 8, "start_col": 13, "start_line": 8 }
Prims.Tot
[ { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "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 piln_t = x:size_t{size_v x < 25}
let piln_t =
false
null
false
x: size_t{size_v x < 25}
{ "checked_file": "Spec.SHA3.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA3.Constants.fst" }
[ "total" ]
[ "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThan", "Lib.IntTypes.size_v" ]
[]
module Spec.SHA3.Constants open Lib.IntTypes open Lib.Sequence #reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0" let rotc_t = rotval U64 unfold let rotc_list: list rotc_t = [1ul; 3ul; 6ul; 10ul; 15ul; 21ul; 28ul; 36ul; 45ul; 55ul; 2ul; 14ul; 27ul; 41ul; 56ul; 8ul; 25ul; 43ul; 62ul; 18ul; 39ul; 61ul; 20ul; 44ul] let keccak_rotc:lseq rotc_t 24 = assert_norm (List.Tot.length rotc_list == 24); of_list rotc_list
false
true
Spec.SHA3.Constants.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 piln_t : Type0
[]
Spec.SHA3.Constants.piln_t
{ "file_name": "specs/Spec.SHA3.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 36, "end_line": 19, "start_col": 13, "start_line": 19 }
Prims.Tot
val rndc_list:list pub_uint64
[ { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "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 rndc_list: list pub_uint64 = [0x0000000000000001uL; 0x0000000000008082uL; 0x800000000000808auL; 0x8000000080008000uL; 0x000000000000808buL; 0x0000000080000001uL; 0x8000000080008081uL; 0x8000000000008009uL; 0x000000000000008auL; 0x0000000000000088uL; 0x0000000080008009uL; 0x000000008000000auL; 0x000000008000808buL; 0x800000000000008buL; 0x8000000000008089uL; 0x8000000000008003uL; 0x8000000000008002uL; 0x8000000000000080uL; 0x000000000000800auL; 0x800000008000000auL; 0x8000000080008081uL; 0x8000000000008080uL; 0x0000000080000001uL; 0x8000000080008008uL]
val rndc_list:list pub_uint64 let rndc_list:list pub_uint64 =
false
null
false
[ 0x0000000000000001uL; 0x0000000000008082uL; 0x800000000000808auL; 0x8000000080008000uL; 0x000000000000808buL; 0x0000000080000001uL; 0x8000000080008081uL; 0x8000000000008009uL; 0x000000000000008auL; 0x0000000000000088uL; 0x0000000080008009uL; 0x000000008000000auL; 0x000000008000808buL; 0x800000000000008buL; 0x8000000000008089uL; 0x8000000000008003uL; 0x8000000000008002uL; 0x8000000000000080uL; 0x000000000000800auL; 0x800000008000000auL; 0x8000000080008081uL; 0x8000000000008080uL; 0x0000000080000001uL; 0x8000000080008008uL ]
{ "checked_file": "Spec.SHA3.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA3.Constants.fst" }
[ "total" ]
[ "Prims.Cons", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.PUB", "FStar.UInt64.__uint_to_t", "Prims.Nil" ]
[]
module Spec.SHA3.Constants open Lib.IntTypes open Lib.Sequence #reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0" let rotc_t = rotval U64 unfold let rotc_list: list rotc_t = [1ul; 3ul; 6ul; 10ul; 15ul; 21ul; 28ul; 36ul; 45ul; 55ul; 2ul; 14ul; 27ul; 41ul; 56ul; 8ul; 25ul; 43ul; 62ul; 18ul; 39ul; 61ul; 20ul; 44ul] let keccak_rotc:lseq rotc_t 24 = assert_norm (List.Tot.length rotc_list == 24); of_list rotc_list let piln_t = x:size_t{size_v x < 25} unfold let piln_list: list piln_t = [10ul; 7ul; 11ul; 17ul; 18ul; 3ul; 5ul; 16ul; 8ul; 21ul; 24ul; 4ul; 15ul; 23ul; 19ul; 13ul; 12ul; 2ul; 20ul; 14ul; 22ul; 9ul; 6ul; 1ul] let keccak_piln: lseq piln_t 24 = assert_norm (List.Tot.length piln_list == 24); of_list piln_list
false
true
Spec.SHA3.Constants.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 rndc_list:list pub_uint64
[]
Spec.SHA3.Constants.rndc_list
{ "file_name": "specs/Spec.SHA3.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.PUB)
{ "end_col": 90, "end_line": 36, "start_col": 2, "start_line": 31 }
Prims.Tot
val rotc_list:list rotc_t
[ { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "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 rotc_list: list rotc_t = [1ul; 3ul; 6ul; 10ul; 15ul; 21ul; 28ul; 36ul; 45ul; 55ul; 2ul; 14ul; 27ul; 41ul; 56ul; 8ul; 25ul; 43ul; 62ul; 18ul; 39ul; 61ul; 20ul; 44ul]
val rotc_list:list rotc_t let rotc_list:list rotc_t =
false
null
false
[ 1ul; 3ul; 6ul; 10ul; 15ul; 21ul; 28ul; 36ul; 45ul; 55ul; 2ul; 14ul; 27ul; 41ul; 56ul; 8ul; 25ul; 43ul; 62ul; 18ul; 39ul; 61ul; 20ul; 44ul ]
{ "checked_file": "Spec.SHA3.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA3.Constants.fst" }
[ "total" ]
[ "Prims.Cons", "Spec.SHA3.Constants.rotc_t", "FStar.UInt32.__uint_to_t", "Prims.Nil" ]
[]
module Spec.SHA3.Constants open Lib.IntTypes open Lib.Sequence #reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0" let rotc_t = rotval U64
false
true
Spec.SHA3.Constants.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 rotc_list:list rotc_t
[]
Spec.SHA3.Constants.rotc_list
{ "file_name": "specs/Spec.SHA3.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list Spec.SHA3.Constants.rotc_t
{ "end_col": 50, "end_line": 13, "start_col": 2, "start_line": 11 }
Prims.Tot
val piln_list:list piln_t
[ { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "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 piln_list: list piln_t = [10ul; 7ul; 11ul; 17ul; 18ul; 3ul; 5ul; 16ul; 8ul; 21ul; 24ul; 4ul; 15ul; 23ul; 19ul; 13ul; 12ul; 2ul; 20ul; 14ul; 22ul; 9ul; 6ul; 1ul]
val piln_list:list piln_t let piln_list:list piln_t =
false
null
false
[ 10ul; 7ul; 11ul; 17ul; 18ul; 3ul; 5ul; 16ul; 8ul; 21ul; 24ul; 4ul; 15ul; 23ul; 19ul; 13ul; 12ul; 2ul; 20ul; 14ul; 22ul; 9ul; 6ul; 1ul ]
{ "checked_file": "Spec.SHA3.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA3.Constants.fst" }
[ "total" ]
[ "Prims.Cons", "Spec.SHA3.Constants.piln_t", "FStar.UInt32.__uint_to_t", "Prims.Nil" ]
[]
module Spec.SHA3.Constants open Lib.IntTypes open Lib.Sequence #reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0" let rotc_t = rotval U64 unfold let rotc_list: list rotc_t = [1ul; 3ul; 6ul; 10ul; 15ul; 21ul; 28ul; 36ul; 45ul; 55ul; 2ul; 14ul; 27ul; 41ul; 56ul; 8ul; 25ul; 43ul; 62ul; 18ul; 39ul; 61ul; 20ul; 44ul] let keccak_rotc:lseq rotc_t 24 = assert_norm (List.Tot.length rotc_list == 24); of_list rotc_list let piln_t = x:size_t{size_v x < 25}
false
true
Spec.SHA3.Constants.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 piln_list:list piln_t
[]
Spec.SHA3.Constants.piln_list
{ "file_name": "specs/Spec.SHA3.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list Spec.SHA3.Constants.piln_t
{ "end_col": 46, "end_line": 24, "start_col": 2, "start_line": 22 }
Prims.Tot
val keccak_piln:lseq piln_t 24
[ { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "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 keccak_piln: lseq piln_t 24 = assert_norm (List.Tot.length piln_list == 24); of_list piln_list
val keccak_piln:lseq piln_t 24 let keccak_piln:lseq piln_t 24 =
false
null
false
assert_norm (List.Tot.length piln_list == 24); of_list piln_list
{ "checked_file": "Spec.SHA3.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA3.Constants.fst" }
[ "total" ]
[ "Lib.Sequence.of_list", "Spec.SHA3.Constants.piln_t", "Spec.SHA3.Constants.piln_list", "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.int", "FStar.List.Tot.Base.length" ]
[]
module Spec.SHA3.Constants open Lib.IntTypes open Lib.Sequence #reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0" let rotc_t = rotval U64 unfold let rotc_list: list rotc_t = [1ul; 3ul; 6ul; 10ul; 15ul; 21ul; 28ul; 36ul; 45ul; 55ul; 2ul; 14ul; 27ul; 41ul; 56ul; 8ul; 25ul; 43ul; 62ul; 18ul; 39ul; 61ul; 20ul; 44ul] let keccak_rotc:lseq rotc_t 24 = assert_norm (List.Tot.length rotc_list == 24); of_list rotc_list let piln_t = x:size_t{size_v x < 25} unfold let piln_list: list piln_t = [10ul; 7ul; 11ul; 17ul; 18ul; 3ul; 5ul; 16ul; 8ul; 21ul; 24ul; 4ul; 15ul; 23ul; 19ul; 13ul; 12ul; 2ul; 20ul; 14ul; 22ul; 9ul; 6ul; 1ul]
false
false
Spec.SHA3.Constants.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 keccak_piln:lseq piln_t 24
[]
Spec.SHA3.Constants.keccak_piln
{ "file_name": "specs/Spec.SHA3.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Lib.Sequence.lseq Spec.SHA3.Constants.piln_t 24
{ "end_col": 19, "end_line": 28, "start_col": 2, "start_line": 27 }
Prims.Tot
val keccak_rotc:lseq rotc_t 24
[ { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "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 keccak_rotc:lseq rotc_t 24 = assert_norm (List.Tot.length rotc_list == 24); of_list rotc_list
val keccak_rotc:lseq rotc_t 24 let keccak_rotc:lseq rotc_t 24 =
false
null
false
assert_norm (List.Tot.length rotc_list == 24); of_list rotc_list
{ "checked_file": "Spec.SHA3.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA3.Constants.fst" }
[ "total" ]
[ "Lib.Sequence.of_list", "Spec.SHA3.Constants.rotc_t", "Spec.SHA3.Constants.rotc_list", "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.int", "FStar.List.Tot.Base.length" ]
[]
module Spec.SHA3.Constants open Lib.IntTypes open Lib.Sequence #reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0" let rotc_t = rotval U64 unfold let rotc_list: list rotc_t = [1ul; 3ul; 6ul; 10ul; 15ul; 21ul; 28ul; 36ul; 45ul; 55ul; 2ul; 14ul; 27ul; 41ul; 56ul; 8ul; 25ul; 43ul; 62ul; 18ul; 39ul; 61ul; 20ul; 44ul]
false
false
Spec.SHA3.Constants.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 keccak_rotc:lseq rotc_t 24
[]
Spec.SHA3.Constants.keccak_rotc
{ "file_name": "specs/Spec.SHA3.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Lib.Sequence.lseq Spec.SHA3.Constants.rotc_t 24
{ "end_col": 19, "end_line": 17, "start_col": 2, "start_line": 16 }
Prims.Tot
val keccak_rndc:lseq pub_uint64 24
[ { "abbrev": false, "full_module": "Lib.Sequence", "short_module": null }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA3", "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 keccak_rndc: lseq pub_uint64 24 = assert_norm (List.Tot.length rndc_list == 24); of_list rndc_list
val keccak_rndc:lseq pub_uint64 24 let keccak_rndc:lseq pub_uint64 24 =
false
null
false
assert_norm (List.Tot.length rndc_list == 24); of_list rndc_list
{ "checked_file": "Spec.SHA3.Constants.fst.checked", "dependencies": [ "prims.fst.checked", "Lib.Sequence.fsti.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt64.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "Spec.SHA3.Constants.fst" }
[ "total" ]
[ "Lib.Sequence.of_list", "Lib.IntTypes.int_t", "Lib.IntTypes.U64", "Lib.IntTypes.PUB", "Spec.SHA3.Constants.rndc_list", "Prims.unit", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.int", "FStar.List.Tot.Base.length" ]
[]
module Spec.SHA3.Constants open Lib.IntTypes open Lib.Sequence #reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0" let rotc_t = rotval U64 unfold let rotc_list: list rotc_t = [1ul; 3ul; 6ul; 10ul; 15ul; 21ul; 28ul; 36ul; 45ul; 55ul; 2ul; 14ul; 27ul; 41ul; 56ul; 8ul; 25ul; 43ul; 62ul; 18ul; 39ul; 61ul; 20ul; 44ul] let keccak_rotc:lseq rotc_t 24 = assert_norm (List.Tot.length rotc_list == 24); of_list rotc_list let piln_t = x:size_t{size_v x < 25} unfold let piln_list: list piln_t = [10ul; 7ul; 11ul; 17ul; 18ul; 3ul; 5ul; 16ul; 8ul; 21ul; 24ul; 4ul; 15ul; 23ul; 19ul; 13ul; 12ul; 2ul; 20ul; 14ul; 22ul; 9ul; 6ul; 1ul] let keccak_piln: lseq piln_t 24 = assert_norm (List.Tot.length piln_list == 24); of_list piln_list unfold let rndc_list: list pub_uint64 = [0x0000000000000001uL; 0x0000000000008082uL; 0x800000000000808auL; 0x8000000080008000uL; 0x000000000000808buL; 0x0000000080000001uL; 0x8000000080008081uL; 0x8000000000008009uL; 0x000000000000008auL; 0x0000000000000088uL; 0x0000000080008009uL; 0x000000008000000auL; 0x000000008000808buL; 0x800000000000008buL; 0x8000000000008089uL; 0x8000000000008003uL; 0x8000000000008002uL; 0x8000000000000080uL; 0x000000000000800auL; 0x800000008000000auL; 0x8000000080008081uL; 0x8000000000008080uL; 0x0000000080000001uL; 0x8000000080008008uL]
false
false
Spec.SHA3.Constants.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 keccak_rndc:lseq pub_uint64 24
[]
Spec.SHA3.Constants.keccak_rndc
{ "file_name": "specs/Spec.SHA3.Constants.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Lib.Sequence.lseq (Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.PUB) 24
{ "end_col": 19, "end_line": 40, "start_col": 2, "start_line": 39 }
Prims.Pure
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 apply_swap (#a:Type) = apply_swap_aux #a 0
let apply_swap (#a: Type) =
false
null
false
apply_swap_aux #a 0
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "" ]
[ "FStar.Tactics.CanonCommSwaps.apply_swap_aux", "Prims.list", "FStar.Tactics.CanonCommSwaps.swap", "Prims.op_Addition", "FStar.List.Tot.Base.length", "Prims.l_True", "Prims.eq2", "Prims.nat" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s
false
false
FStar.Tactics.CanonCommSwaps.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 apply_swap : xs: Prims.list a -> s: FStar.Tactics.CanonCommSwaps.swap (FStar.List.Tot.Base.length xs + 0) -> Prims.Pure (Prims.list a)
[]
FStar.Tactics.CanonCommSwaps.apply_swap
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
xs: Prims.list a -> s: FStar.Tactics.CanonCommSwaps.swap (FStar.List.Tot.Base.length xs + 0) -> Prims.Pure (Prims.list a)
{ "end_col": 46, "end_line": 31, "start_col": 27, "start_line": 31 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 swaps_for (#a:eqtype) (xs:list a) = list (swap_for xs)
let swaps_for (#a: eqtype) (xs: list a) =
false
null
false
list (swap_for xs)
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "total" ]
[ "Prims.eqtype", "Prims.list", "FStar.Tactics.CanonCommSwaps.swap_for" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s let apply_swap (#a:Type) = apply_swap_aux #a 0 let rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) = match ss with | [] -> xs | s::ss' -> apply_swaps (apply_swap xs s) ss' let equal_counts (#a:eqtype) (xs ys:list a) : Type0 = (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e xs == count e ys) let extend_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts xs ys) (ensures equal_counts (h::xs) (h::ys)) = () let retract_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts (h::xs) (h::ys)) (ensures equal_counts xs ys) = assert (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e (h::xs) == count e (h::ys))
false
false
FStar.Tactics.CanonCommSwaps.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 swaps_for : xs: Prims.list a -> Type0
[]
FStar.Tactics.CanonCommSwaps.swaps_for
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
xs: Prims.list a -> Type0
{ "end_col": 65, "end_line": 56, "start_col": 47, "start_line": 56 }
Prims.Tot
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 swap_for (#a:eqtype) (xs:list a) = swap (length xs)
let swap_for (#a: eqtype) (xs: list a) =
false
null
false
swap (length xs)
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "total" ]
[ "Prims.eqtype", "Prims.list", "FStar.Tactics.CanonCommSwaps.swap", "FStar.List.Tot.Base.length" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s let apply_swap (#a:Type) = apply_swap_aux #a 0 let rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) = match ss with | [] -> xs | s::ss' -> apply_swaps (apply_swap xs s) ss' let equal_counts (#a:eqtype) (xs ys:list a) : Type0 = (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e xs == count e ys) let extend_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts xs ys) (ensures equal_counts (h::xs) (h::ys)) = () let retract_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts (h::xs) (h::ys)) (ensures equal_counts xs ys) = assert (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e (h::xs) == count e (h::ys))
false
false
FStar.Tactics.CanonCommSwaps.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 swap_for : xs: Prims.list a -> Type0
[]
FStar.Tactics.CanonCommSwaps.swap_for
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
xs: Prims.list a -> Type0
{ "end_col": 62, "end_line": 55, "start_col": 46, "start_line": 55 }
Prims.Tot
val equal_counts (#a: eqtype) (xs ys: list a) : Type0
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 equal_counts (#a:eqtype) (xs ys:list a) : Type0 = (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e xs == count e ys)
val equal_counts (#a: eqtype) (xs ys: list a) : Type0 let equal_counts (#a: eqtype) (xs ys: list a) : Type0 =
false
null
false
(forall (e: a). {:pattern (count e xs)\/(count e ys)} count e xs == count e ys)
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "total" ]
[ "Prims.eqtype", "Prims.list", "Prims.l_Forall", "Prims.eq2", "Prims.nat", "FStar.List.Tot.Base.count" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s let apply_swap (#a:Type) = apply_swap_aux #a 0 let rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) = match ss with | [] -> xs | s::ss' -> apply_swaps (apply_swap xs s) ss'
false
false
FStar.Tactics.CanonCommSwaps.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 equal_counts (#a: eqtype) (xs ys: list a) : Type0
[]
FStar.Tactics.CanonCommSwaps.equal_counts
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
xs: Prims.list a -> ys: Prims.list a -> Type0
{ "end_col": 81, "end_line": 41, "start_col": 2, "start_line": 41 }
FStar.Pervasives.Lemma
val retract_equal_counts (#a: eqtype) (h: a) (xs ys: list a) : Lemma (requires equal_counts (h :: xs) (h :: ys)) (ensures equal_counts xs ys)
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 retract_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts (h::xs) (h::ys)) (ensures equal_counts xs ys) = assert (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e (h::xs) == count e (h::ys))
val retract_equal_counts (#a: eqtype) (h: a) (xs ys: list a) : Lemma (requires equal_counts (h :: xs) (h :: ys)) (ensures equal_counts xs ys) let retract_equal_counts (#a: eqtype) (h: a) (xs ys: list a) : Lemma (requires equal_counts (h :: xs) (h :: ys)) (ensures equal_counts xs ys) =
false
null
true
assert (forall (e: a). {:pattern (count e xs)\/(count e ys)} count e (h :: xs) == count e (h :: ys))
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "lemma" ]
[ "Prims.eqtype", "Prims.list", "Prims._assert", "Prims.l_Forall", "Prims.eq2", "Prims.nat", "FStar.List.Tot.Base.count", "Prims.Cons", "Prims.unit", "FStar.Tactics.CanonCommSwaps.equal_counts", "Prims.squash", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s let apply_swap (#a:Type) = apply_swap_aux #a 0 let rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) = match ss with | [] -> xs | s::ss' -> apply_swaps (apply_swap xs s) ss' let equal_counts (#a:eqtype) (xs ys:list a) : Type0 = (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e xs == count e ys) let extend_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts xs ys) (ensures equal_counts (h::xs) (h::ys)) = () let retract_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts (h::xs) (h::ys)) (ensures equal_counts xs ys)
false
false
FStar.Tactics.CanonCommSwaps.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 retract_equal_counts (#a: eqtype) (h: a) (xs ys: list a) : Lemma (requires equal_counts (h :: xs) (h :: ys)) (ensures equal_counts xs ys)
[]
FStar.Tactics.CanonCommSwaps.retract_equal_counts
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
h: a -> xs: Prims.list a -> ys: Prims.list a -> FStar.Pervasives.Lemma (requires FStar.Tactics.CanonCommSwaps.equal_counts (h :: xs) (h :: ys)) (ensures FStar.Tactics.CanonCommSwaps.equal_counts xs ys)
{ "end_col": 98, "end_line": 53, "start_col": 2, "start_line": 53 }
Prims.Pure
val apply_swaps (#a: Type) (xs: list a) (ss: list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss)
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) = match ss with | [] -> xs | s::ss' -> apply_swaps (apply_swap xs s) ss'
val apply_swaps (#a: Type) (xs: list a) (ss: list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) let rec apply_swaps (#a: Type) (xs: list a) (ss: list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) =
false
null
false
match ss with | [] -> xs | s :: ss' -> apply_swaps (apply_swap xs s) ss'
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "" ]
[ "Prims.list", "FStar.Tactics.CanonCommSwaps.swap", "FStar.List.Tot.Base.length", "FStar.Tactics.CanonCommSwaps.apply_swaps", "FStar.Tactics.CanonCommSwaps.apply_swap", "Prims.l_True", "Prims.eq2", "Prims.nat" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s let apply_swap (#a:Type) = apply_swap_aux #a 0 let rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True)
false
false
FStar.Tactics.CanonCommSwaps.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 apply_swaps (#a: Type) (xs: list a) (ss: list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss)
[ "recursion" ]
FStar.Tactics.CanonCommSwaps.apply_swaps
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
xs: Prims.list a -> ss: Prims.list (FStar.Tactics.CanonCommSwaps.swap (FStar.List.Tot.Base.length xs)) -> Prims.Pure (Prims.list a)
{ "end_col": 47, "end_line": 38, "start_col": 2, "start_line": 36 }
Prims.Pure
val lift_swaps_cons (#a: eqtype) (h: a) (xs: list a) (ss: swaps_for xs) : Pure (swaps_for (h :: xs)) (requires True) (ensures (fun ss' -> apply_swaps (h :: xs) ss' == h :: (apply_swaps xs ss))) (decreases ss)
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 rec lift_swaps_cons (#a:eqtype) (h:a) (xs:list a) (ss:swaps_for xs) : Pure (swaps_for (h::xs)) (requires True) (ensures (fun ss' -> apply_swaps (h::xs) ss' == h::(apply_swaps xs ss) )) (decreases ss) = match ss with | [] -> [] | s::st -> ( lift_swap_cons 0 h xs s; (s + 1)::(lift_swaps_cons h (apply_swap xs s) st) )
val lift_swaps_cons (#a: eqtype) (h: a) (xs: list a) (ss: swaps_for xs) : Pure (swaps_for (h :: xs)) (requires True) (ensures (fun ss' -> apply_swaps (h :: xs) ss' == h :: (apply_swaps xs ss))) (decreases ss) let rec lift_swaps_cons (#a: eqtype) (h: a) (xs: list a) (ss: swaps_for xs) : Pure (swaps_for (h :: xs)) (requires True) (ensures (fun ss' -> apply_swaps (h :: xs) ss' == h :: (apply_swaps xs ss))) (decreases ss) =
false
null
false
match ss with | [] -> [] | s :: st -> (lift_swap_cons 0 h xs s; (s + 1) :: (lift_swaps_cons h (apply_swap xs s) st))
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "" ]
[ "Prims.eqtype", "Prims.list", "FStar.Tactics.CanonCommSwaps.swaps_for", "Prims.Nil", "FStar.Tactics.CanonCommSwaps.swap_for", "Prims.Cons", "FStar.Tactics.CanonCommSwaps.apply_swap", "Prims.op_Addition", "FStar.Tactics.CanonCommSwaps.lift_swaps_cons", "Prims.unit", "FStar.Tactics.CanonCommSwaps.lift_swap_cons", "Prims.l_True", "Prims.eq2", "FStar.Tactics.CanonCommSwaps.apply_swaps" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s let apply_swap (#a:Type) = apply_swap_aux #a 0 let rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) = match ss with | [] -> xs | s::ss' -> apply_swaps (apply_swap xs s) ss' let equal_counts (#a:eqtype) (xs ys:list a) : Type0 = (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e xs == count e ys) let extend_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts xs ys) (ensures equal_counts (h::xs) (h::ys)) = () let retract_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts (h::xs) (h::ys)) (ensures equal_counts xs ys) = assert (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e (h::xs) == count e (h::ys)) unfold let swap_for (#a:eqtype) (xs:list a) = swap (length xs) unfold let swaps_for (#a:eqtype) (xs:list a) = list (swap_for xs) let rec append_swaps (#a:eqtype) (xs:list a) (ss1 ss2:swaps_for xs) : Lemma (ensures apply_swaps xs (ss1 @ ss2) == apply_swaps (apply_swaps xs ss1) ss2) (decreases ss1) = match ss1 with | [] -> () | h::t -> append_swaps (apply_swap xs h) t ss2 let rec lift_swap_cons (#a:eqtype) (n:nat) (h:a) (xs:list a) (s:swap (length xs + n)) : Lemma (requires n <= s) (ensures apply_swap_aux n (h::xs) (s + 1) == h::(apply_swap_aux n xs s)) (decreases xs) = match xs with | [] -> () | x::xt -> if n < s then lift_swap_cons (n + 1) x xt s let rec lift_swaps_cons (#a:eqtype) (h:a) (xs:list a) (ss:swaps_for xs) : Pure (swaps_for (h::xs)) (requires True) (ensures (fun ss' -> apply_swaps (h::xs) ss' == h::(apply_swaps xs ss) )) (decreases ss)
false
false
FStar.Tactics.CanonCommSwaps.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_swaps_cons (#a: eqtype) (h: a) (xs: list a) (ss: swaps_for xs) : Pure (swaps_for (h :: xs)) (requires True) (ensures (fun ss' -> apply_swaps (h :: xs) ss' == h :: (apply_swaps xs ss))) (decreases ss)
[ "recursion" ]
FStar.Tactics.CanonCommSwaps.lift_swaps_cons
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
h: a -> xs: Prims.list a -> ss: FStar.Tactics.CanonCommSwaps.swaps_for xs -> Prims.Pure (FStar.Tactics.CanonCommSwaps.swaps_for (h :: xs))
{ "end_col": 5, "end_line": 88, "start_col": 2, "start_line": 82 }
Prims.Pure
val apply_swap_aux (#a: Type) (n: nat) (xs: list a) (s: swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs)
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s
val apply_swap_aux (#a: Type) (n: nat) (xs: list a) (s: swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) let rec apply_swap_aux (#a: Type) (n: nat) (xs: list a) (s: swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) =
false
null
false
match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n + 1) (x2 :: xs') s
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "" ]
[ "Prims.nat", "Prims.list", "FStar.Tactics.CanonCommSwaps.swap", "Prims.op_Addition", "FStar.List.Tot.Base.length", "Prims.op_Equality", "Prims.Cons", "Prims.bool", "FStar.Tactics.CanonCommSwaps.apply_swap_aux", "Prims.l_True", "Prims.eq2" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True)
false
false
FStar.Tactics.CanonCommSwaps.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 apply_swap_aux (#a: Type) (n: nat) (xs: list a) (s: swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs)
[ "recursion" ]
FStar.Tactics.CanonCommSwaps.apply_swap_aux
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
n: Prims.nat -> xs: Prims.list a -> s: FStar.Tactics.CanonCommSwaps.swap (FStar.List.Tot.Base.length xs + n) -> Prims.Pure (Prims.list a)
{ "end_col": 68, "end_line": 29, "start_col": 2, "start_line": 25 }
Prims.Pure
val equal_counts_implies_swaps (#a: eqtype) (xs ys: list a) : Pure (swaps_for xs) (requires equal_counts xs ys) (ensures (fun ss -> ys == apply_swaps xs ss)) (decreases ys)
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 rec equal_counts_implies_swaps (#a:eqtype) (xs ys:list a) : Pure (swaps_for xs) (requires equal_counts xs ys) (ensures (fun ss -> ys == apply_swaps xs ss)) (decreases ys) = match ys with | [] -> ( match xs with | [] -> [] | x::xt -> ( assert (count x xs >= 1); [] ) ) | y::yt -> ( assert (count y ys >= 1); assert (count y xs >= 1); let ss0 = swap_to_front y xs in // find y in xs, swap it to the front let xs' = apply_swaps xs ss0 in // hd xs' == y let xt = tl xs' in // xs' == y::xt retract_equal_counts y xt yt; // prove (equal_counts xt yt) let ss1 = equal_counts_implies_swaps xt yt in // prove (yt == apply_swaps xt ss1) let ss1' = lift_swaps_cons y xt ss1 in // y::yt == apply_swaps (y::xt) ss1' // ys == apply_swaps (apply_swaps xs ss0) ss1' append_swaps xs ss0 ss1'; ss0 @ ss1' )
val equal_counts_implies_swaps (#a: eqtype) (xs ys: list a) : Pure (swaps_for xs) (requires equal_counts xs ys) (ensures (fun ss -> ys == apply_swaps xs ss)) (decreases ys) let rec equal_counts_implies_swaps (#a: eqtype) (xs ys: list a) : Pure (swaps_for xs) (requires equal_counts xs ys) (ensures (fun ss -> ys == apply_swaps xs ss)) (decreases ys) =
false
null
false
match ys with | [] -> (match xs with | [] -> [] | x :: xt -> (assert (count x xs >= 1); [])) | y :: yt -> (assert (count y ys >= 1); assert (count y xs >= 1); let ss0 = swap_to_front y xs in let xs' = apply_swaps xs ss0 in let xt = tl xs' in retract_equal_counts y xt yt; let ss1 = equal_counts_implies_swaps xt yt in let ss1' = lift_swaps_cons y xt ss1 in append_swaps xs ss0 ss1'; ss0 @ ss1')
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "" ]
[ "Prims.eqtype", "Prims.list", "Prims.Nil", "FStar.Tactics.CanonCommSwaps.swap_for", "Prims.unit", "Prims._assert", "Prims.b2t", "Prims.op_GreaterThanOrEqual", "FStar.List.Tot.Base.count", "FStar.Tactics.CanonCommSwaps.swaps_for", "FStar.List.Tot.Base.op_At", "FStar.Tactics.CanonCommSwaps.append_swaps", "FStar.Tactics.CanonCommSwaps.swap", "FStar.List.Tot.Base.length", "Prims.Cons", "FStar.Tactics.CanonCommSwaps.lift_swaps_cons", "FStar.Tactics.CanonCommSwaps.equal_counts_implies_swaps", "FStar.Tactics.CanonCommSwaps.retract_equal_counts", "FStar.List.Tot.Base.tl", "FStar.Tactics.CanonCommSwaps.apply_swaps", "FStar.Tactics.CanonCommSwaps.swap_to_front", "FStar.Tactics.CanonCommSwaps.equal_counts", "Prims.eq2" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s let apply_swap (#a:Type) = apply_swap_aux #a 0 let rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) = match ss with | [] -> xs | s::ss' -> apply_swaps (apply_swap xs s) ss' let equal_counts (#a:eqtype) (xs ys:list a) : Type0 = (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e xs == count e ys) let extend_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts xs ys) (ensures equal_counts (h::xs) (h::ys)) = () let retract_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts (h::xs) (h::ys)) (ensures equal_counts xs ys) = assert (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e (h::xs) == count e (h::ys)) unfold let swap_for (#a:eqtype) (xs:list a) = swap (length xs) unfold let swaps_for (#a:eqtype) (xs:list a) = list (swap_for xs) let rec append_swaps (#a:eqtype) (xs:list a) (ss1 ss2:swaps_for xs) : Lemma (ensures apply_swaps xs (ss1 @ ss2) == apply_swaps (apply_swaps xs ss1) ss2) (decreases ss1) = match ss1 with | [] -> () | h::t -> append_swaps (apply_swap xs h) t ss2 let rec lift_swap_cons (#a:eqtype) (n:nat) (h:a) (xs:list a) (s:swap (length xs + n)) : Lemma (requires n <= s) (ensures apply_swap_aux n (h::xs) (s + 1) == h::(apply_swap_aux n xs s)) (decreases xs) = match xs with | [] -> () | x::xt -> if n < s then lift_swap_cons (n + 1) x xt s let rec lift_swaps_cons (#a:eqtype) (h:a) (xs:list a) (ss:swaps_for xs) : Pure (swaps_for (h::xs)) (requires True) (ensures (fun ss' -> apply_swaps (h::xs) ss' == h::(apply_swaps xs ss) )) (decreases ss) = match ss with | [] -> [] | s::st -> ( lift_swap_cons 0 h xs s; (s + 1)::(lift_swaps_cons h (apply_swap xs s) st) ) let rec swap_to_front (#a:eqtype) (h:a) (xs:list a) : Pure (swaps_for xs) (requires count h xs >= 1) (ensures (fun ss -> let ys = apply_swaps xs ss in equal_counts xs ys /\ Cons? ys /\ hd ys == h )) = match xs with | [] -> [] | x::xt -> ( if x = h then [] else ( let ss = swap_to_front h xt in // ss turns xt into h::xt' let ss' = lift_swaps_cons x xt ss in // ss' turns x::xt into x::h::xt' let s:swap_for xs = 0 in append_swaps xs ss' [s]; ss' @ [s] ) ) let rec equal_counts_implies_swaps (#a:eqtype) (xs ys:list a) : Pure (swaps_for xs) (requires equal_counts xs ys) (ensures (fun ss -> ys == apply_swaps xs ss)) (decreases ys)
false
false
FStar.Tactics.CanonCommSwaps.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 equal_counts_implies_swaps (#a: eqtype) (xs ys: list a) : Pure (swaps_for xs) (requires equal_counts xs ys) (ensures (fun ss -> ys == apply_swaps xs ss)) (decreases ys)
[ "recursion" ]
FStar.Tactics.CanonCommSwaps.equal_counts_implies_swaps
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
xs: Prims.list a -> ys: Prims.list a -> Prims.Pure (FStar.Tactics.CanonCommSwaps.swaps_for xs)
{ "end_col": 5, "end_line": 143, "start_col": 2, "start_line": 119 }
FStar.Pervasives.Lemma
val append_swaps (#a: eqtype) (xs: list a) (ss1 ss2: swaps_for xs) : Lemma (ensures apply_swaps xs (ss1 @ ss2) == apply_swaps (apply_swaps xs ss1) ss2) (decreases ss1)
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 rec append_swaps (#a:eqtype) (xs:list a) (ss1 ss2:swaps_for xs) : Lemma (ensures apply_swaps xs (ss1 @ ss2) == apply_swaps (apply_swaps xs ss1) ss2) (decreases ss1) = match ss1 with | [] -> () | h::t -> append_swaps (apply_swap xs h) t ss2
val append_swaps (#a: eqtype) (xs: list a) (ss1 ss2: swaps_for xs) : Lemma (ensures apply_swaps xs (ss1 @ ss2) == apply_swaps (apply_swaps xs ss1) ss2) (decreases ss1) let rec append_swaps (#a: eqtype) (xs: list a) (ss1 ss2: swaps_for xs) : Lemma (ensures apply_swaps xs (ss1 @ ss2) == apply_swaps (apply_swaps xs ss1) ss2) (decreases ss1) =
false
null
true
match ss1 with | [] -> () | h :: t -> append_swaps (apply_swap xs h) t ss2
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "lemma", "" ]
[ "Prims.eqtype", "Prims.list", "FStar.Tactics.CanonCommSwaps.swaps_for", "FStar.Tactics.CanonCommSwaps.swap_for", "FStar.Tactics.CanonCommSwaps.append_swaps", "FStar.Tactics.CanonCommSwaps.apply_swap", "Prims.unit", "Prims.l_True", "Prims.squash", "Prims.eq2", "FStar.Tactics.CanonCommSwaps.apply_swaps", "FStar.List.Tot.Base.op_At", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s let apply_swap (#a:Type) = apply_swap_aux #a 0 let rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) = match ss with | [] -> xs | s::ss' -> apply_swaps (apply_swap xs s) ss' let equal_counts (#a:eqtype) (xs ys:list a) : Type0 = (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e xs == count e ys) let extend_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts xs ys) (ensures equal_counts (h::xs) (h::ys)) = () let retract_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts (h::xs) (h::ys)) (ensures equal_counts xs ys) = assert (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e (h::xs) == count e (h::ys)) unfold let swap_for (#a:eqtype) (xs:list a) = swap (length xs) unfold let swaps_for (#a:eqtype) (xs:list a) = list (swap_for xs) let rec append_swaps (#a:eqtype) (xs:list a) (ss1 ss2:swaps_for xs) : Lemma (ensures apply_swaps xs (ss1 @ ss2) == apply_swaps (apply_swaps xs ss1) ss2) (decreases ss1)
false
false
FStar.Tactics.CanonCommSwaps.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 append_swaps (#a: eqtype) (xs: list a) (ss1 ss2: swaps_for xs) : Lemma (ensures apply_swaps xs (ss1 @ ss2) == apply_swaps (apply_swaps xs ss1) ss2) (decreases ss1)
[ "recursion" ]
FStar.Tactics.CanonCommSwaps.append_swaps
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
xs: Prims.list a -> ss1: FStar.Tactics.CanonCommSwaps.swaps_for xs -> ss2: FStar.Tactics.CanonCommSwaps.swaps_for xs -> FStar.Pervasives.Lemma (ensures FStar.Tactics.CanonCommSwaps.apply_swaps xs (ss1 @ ss2) == FStar.Tactics.CanonCommSwaps.apply_swaps (FStar.Tactics.CanonCommSwaps.apply_swaps xs ss1) ss2) (decreases ss1)
{ "end_col": 48, "end_line": 64, "start_col": 2, "start_line": 62 }
Prims.Pure
val swap_to_front (#a: eqtype) (h: a) (xs: list a) : Pure (swaps_for xs) (requires count h xs >= 1) (ensures (fun ss -> let ys = apply_swaps xs ss in equal_counts xs ys /\ Cons? ys /\ hd ys == h))
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 rec swap_to_front (#a:eqtype) (h:a) (xs:list a) : Pure (swaps_for xs) (requires count h xs >= 1) (ensures (fun ss -> let ys = apply_swaps xs ss in equal_counts xs ys /\ Cons? ys /\ hd ys == h )) = match xs with | [] -> [] | x::xt -> ( if x = h then [] else ( let ss = swap_to_front h xt in // ss turns xt into h::xt' let ss' = lift_swaps_cons x xt ss in // ss' turns x::xt into x::h::xt' let s:swap_for xs = 0 in append_swaps xs ss' [s]; ss' @ [s] ) )
val swap_to_front (#a: eqtype) (h: a) (xs: list a) : Pure (swaps_for xs) (requires count h xs >= 1) (ensures (fun ss -> let ys = apply_swaps xs ss in equal_counts xs ys /\ Cons? ys /\ hd ys == h)) let rec swap_to_front (#a: eqtype) (h: a) (xs: list a) : Pure (swaps_for xs) (requires count h xs >= 1) (ensures (fun ss -> let ys = apply_swaps xs ss in equal_counts xs ys /\ Cons? ys /\ hd ys == h)) =
false
null
false
match xs with | [] -> [] | x :: xt -> (if x = h then [] else (let ss = swap_to_front h xt in let ss' = lift_swaps_cons x xt ss in let s:swap_for xs = 0 in append_swaps xs ss' [s]; ss' @ [s]))
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[]
[ "Prims.eqtype", "Prims.list", "Prims.Nil", "FStar.Tactics.CanonCommSwaps.swap_for", "Prims.op_Equality", "Prims.bool", "FStar.List.Tot.Base.op_At", "Prims.Cons", "Prims.unit", "FStar.Tactics.CanonCommSwaps.append_swaps", "FStar.Tactics.CanonCommSwaps.swap", "FStar.List.Tot.Base.length", "FStar.Tactics.CanonCommSwaps.lift_swaps_cons", "FStar.Tactics.CanonCommSwaps.swap_to_front", "FStar.Tactics.CanonCommSwaps.swaps_for", "Prims.b2t", "Prims.op_GreaterThanOrEqual", "FStar.List.Tot.Base.count", "Prims.l_and", "FStar.Tactics.CanonCommSwaps.equal_counts", "Prims.uu___is_Cons", "Prims.eq2", "FStar.List.Tot.Base.hd", "FStar.Tactics.CanonCommSwaps.apply_swaps" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s let apply_swap (#a:Type) = apply_swap_aux #a 0 let rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) = match ss with | [] -> xs | s::ss' -> apply_swaps (apply_swap xs s) ss' let equal_counts (#a:eqtype) (xs ys:list a) : Type0 = (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e xs == count e ys) let extend_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts xs ys) (ensures equal_counts (h::xs) (h::ys)) = () let retract_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts (h::xs) (h::ys)) (ensures equal_counts xs ys) = assert (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e (h::xs) == count e (h::ys)) unfold let swap_for (#a:eqtype) (xs:list a) = swap (length xs) unfold let swaps_for (#a:eqtype) (xs:list a) = list (swap_for xs) let rec append_swaps (#a:eqtype) (xs:list a) (ss1 ss2:swaps_for xs) : Lemma (ensures apply_swaps xs (ss1 @ ss2) == apply_swaps (apply_swaps xs ss1) ss2) (decreases ss1) = match ss1 with | [] -> () | h::t -> append_swaps (apply_swap xs h) t ss2 let rec lift_swap_cons (#a:eqtype) (n:nat) (h:a) (xs:list a) (s:swap (length xs + n)) : Lemma (requires n <= s) (ensures apply_swap_aux n (h::xs) (s + 1) == h::(apply_swap_aux n xs s)) (decreases xs) = match xs with | [] -> () | x::xt -> if n < s then lift_swap_cons (n + 1) x xt s let rec lift_swaps_cons (#a:eqtype) (h:a) (xs:list a) (ss:swaps_for xs) : Pure (swaps_for (h::xs)) (requires True) (ensures (fun ss' -> apply_swaps (h::xs) ss' == h::(apply_swaps xs ss) )) (decreases ss) = match ss with | [] -> [] | s::st -> ( lift_swap_cons 0 h xs s; (s + 1)::(lift_swaps_cons h (apply_swap xs s) st) ) let rec swap_to_front (#a:eqtype) (h:a) (xs:list a) : Pure (swaps_for xs) (requires count h xs >= 1) (ensures (fun ss -> let ys = apply_swaps xs ss in equal_counts xs ys /\ Cons? ys /\ hd ys == h ))
false
false
FStar.Tactics.CanonCommSwaps.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 swap_to_front (#a: eqtype) (h: a) (xs: list a) : Pure (swaps_for xs) (requires count h xs >= 1) (ensures (fun ss -> let ys = apply_swaps xs ss in equal_counts xs ys /\ Cons? ys /\ hd ys == h))
[ "recursion" ]
FStar.Tactics.CanonCommSwaps.swap_to_front
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
h: a -> xs: Prims.list a -> Prims.Pure (FStar.Tactics.CanonCommSwaps.swaps_for xs)
{ "end_col": 5, "end_line": 112, "start_col": 2, "start_line": 99 }
FStar.Pervasives.Lemma
val lift_swap_cons (#a: eqtype) (n: nat) (h: a) (xs: list a) (s: swap (length xs + n)) : Lemma (requires n <= s) (ensures apply_swap_aux n (h :: xs) (s + 1) == h :: (apply_swap_aux n xs s)) (decreases xs)
[ { "abbrev": false, "full_module": "FStar.List.Tot", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "short_module": null }, { "abbrev": false, "full_module": "FStar.Tactics", "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 rec lift_swap_cons (#a:eqtype) (n:nat) (h:a) (xs:list a) (s:swap (length xs + n)) : Lemma (requires n <= s) (ensures apply_swap_aux n (h::xs) (s + 1) == h::(apply_swap_aux n xs s)) (decreases xs) = match xs with | [] -> () | x::xt -> if n < s then lift_swap_cons (n + 1) x xt s
val lift_swap_cons (#a: eqtype) (n: nat) (h: a) (xs: list a) (s: swap (length xs + n)) : Lemma (requires n <= s) (ensures apply_swap_aux n (h :: xs) (s + 1) == h :: (apply_swap_aux n xs s)) (decreases xs) let rec lift_swap_cons (#a: eqtype) (n: nat) (h: a) (xs: list a) (s: swap (length xs + n)) : Lemma (requires n <= s) (ensures apply_swap_aux n (h :: xs) (s + 1) == h :: (apply_swap_aux n xs s)) (decreases xs) =
false
null
true
match xs with | [] -> () | x :: xt -> if n < s then lift_swap_cons (n + 1) x xt s
{ "checked_file": "FStar.Tactics.CanonCommSwaps.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked" ], "interface_file": false, "source_file": "FStar.Tactics.CanonCommSwaps.fst" }
[ "lemma", "" ]
[ "Prims.eqtype", "Prims.nat", "Prims.list", "FStar.Tactics.CanonCommSwaps.swap", "Prims.op_Addition", "FStar.List.Tot.Base.length", "Prims.op_LessThan", "FStar.Tactics.CanonCommSwaps.lift_swap_cons", "Prims.bool", "Prims.unit", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.squash", "Prims.eq2", "FStar.Tactics.CanonCommSwaps.apply_swap_aux", "Prims.Cons", "Prims.Nil", "FStar.Pervasives.pattern" ]
[]
(* 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.Tactics.CanonCommSwaps open FStar.List.Tot let swap (n:nat) :Type = x:nat{x < n-1} let rec apply_swap_aux (#a:Type) (n:nat) (xs:list a) (s:swap (length xs + n)) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases xs) = match xs with | [] | [_] -> xs | x1 :: x2 :: xs' -> if n = (s <: nat) then x2 :: x1 :: xs' else x1 :: apply_swap_aux (n+1) (x2 :: xs') s let apply_swap (#a:Type) = apply_swap_aux #a 0 let rec apply_swaps (#a:Type) (xs:list a) (ss:list (swap (length xs))) : Pure (list a) (requires True) (ensures (fun zs -> length zs == length xs)) (decreases ss) = match ss with | [] -> xs | s::ss' -> apply_swaps (apply_swap xs s) ss' let equal_counts (#a:eqtype) (xs ys:list a) : Type0 = (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e xs == count e ys) let extend_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts xs ys) (ensures equal_counts (h::xs) (h::ys)) = () let retract_equal_counts (#a:eqtype) (h:a) (xs ys:list a) : Lemma (requires equal_counts (h::xs) (h::ys)) (ensures equal_counts xs ys) = assert (forall (e:a).{:pattern (count e xs) \/ (count e ys)} count e (h::xs) == count e (h::ys)) unfold let swap_for (#a:eqtype) (xs:list a) = swap (length xs) unfold let swaps_for (#a:eqtype) (xs:list a) = list (swap_for xs) let rec append_swaps (#a:eqtype) (xs:list a) (ss1 ss2:swaps_for xs) : Lemma (ensures apply_swaps xs (ss1 @ ss2) == apply_swaps (apply_swaps xs ss1) ss2) (decreases ss1) = match ss1 with | [] -> () | h::t -> append_swaps (apply_swap xs h) t ss2 let rec lift_swap_cons (#a:eqtype) (n:nat) (h:a) (xs:list a) (s:swap (length xs + n)) : Lemma (requires n <= s) (ensures apply_swap_aux n (h::xs) (s + 1) == h::(apply_swap_aux n xs s)) (decreases xs)
false
false
FStar.Tactics.CanonCommSwaps.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_swap_cons (#a: eqtype) (n: nat) (h: a) (xs: list a) (s: swap (length xs + n)) : Lemma (requires n <= s) (ensures apply_swap_aux n (h :: xs) (s + 1) == h :: (apply_swap_aux n xs s)) (decreases xs)
[ "recursion" ]
FStar.Tactics.CanonCommSwaps.lift_swap_cons
{ "file_name": "ulib/FStar.Tactics.CanonCommSwaps.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
n: Prims.nat -> h: a -> xs: Prims.list a -> s: FStar.Tactics.CanonCommSwaps.swap (FStar.List.Tot.Base.length xs + n) -> FStar.Pervasives.Lemma (requires n <= s) (ensures FStar.Tactics.CanonCommSwaps.apply_swap_aux n (h :: xs) (s + 1) == h :: FStar.Tactics.CanonCommSwaps.apply_swap_aux n xs s) (decreases xs)
{ "end_col": 56, "end_line": 73, "start_col": 2, "start_line": 71 }
Prims.Tot
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 step3_body' = step3_body'_aux
let step3_body' =
false
null
false
step3_body'_aux
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Spec.SHA1.step3_body'_aux" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction let f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z (* Section 4.2.1 *) inline_for_extraction let k (t: size_t { v t <= 79 } ) : Tot (word SHA1) = if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6 (* Section 6.1.2 Step 3 *) let word_block = Seq.lseq (word SHA1) (block_word_length SHA1) let step3_body'_aux (mi: word_block) (st: words_state SHA1) (t: size_t {v t < 80}) (wt: word SHA1 { wt == w mi t } ) : Tot (words_state SHA1) = let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in let _T = (sta <<<. 5ul) +. f t stb stc std +. ste +. k t +. wt in let e = std in let d = stc in let c = stb <<<. 30ul in let b = sta in let a = _T in let l : list uint32 = [ a; b; c; d; e; ] in assert_norm (List.Tot.length l = 5); Seq.seq_of_list l
false
false
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val step3_body' : mi: Spec.SHA1.word_block -> st: Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1 -> t: Lib.IntTypes.size_t{Lib.IntTypes.v t < 80} -> wt: Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1 {wt == Spec.SHA1.w mi t} -> Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1
[]
Spec.SHA1.step3_body'
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
mi: Spec.SHA1.word_block -> st: Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1 -> t: Lib.IntTypes.size_t{Lib.IntTypes.v t < 80} -> wt: Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1 {wt == Spec.SHA1.w mi t} -> Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1
{ "end_col": 33, "end_line": 171, "start_col": 18, "start_line": 171 }
Prims.Tot
val f (t: size_t{v t <= 79}) (x y z: word SHA1) : Tot (word SHA1)
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z
val f (t: size_t{v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) let f (t: size_t{v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) =
false
null
false
if t <. 20ul then (x &. y) ^. (~.x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThanOrEqual", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Spec.Hash.Definitions.word", "Spec.Hash.Definitions.SHA1", "Lib.IntTypes.op_Less_Dot", "FStar.UInt32.__uint_to_t", "Lib.IntTypes.op_Hat_Dot", "Spec.Hash.Definitions.word_t", "Lib.IntTypes.SEC", "Lib.IntTypes.op_Amp_Dot", "Lib.IntTypes.op_Tilde_Dot", "Prims.bool", "Prims.op_AmpAmp" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction
false
false
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val f (t: size_t{v t <= 79}) (x y z: word SHA1) : Tot (word SHA1)
[]
Spec.SHA1.f
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
t: Lib.IntTypes.size_t{Lib.IntTypes.v t <= 79} -> x: Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1 -> y: Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1 -> z: Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1 -> Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1
{ "end_col": 15, "end_line": 125, "start_col": 2, "start_line": 118 }
Prims.Tot
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 step4 = step4_aux
let step4 =
false
null
false
step4_aux
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Spec.SHA1.step4_aux" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction let f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z (* Section 4.2.1 *) inline_for_extraction let k (t: size_t { v t <= 79 } ) : Tot (word SHA1) = if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6 (* Section 6.1.2 Step 3 *) let word_block = Seq.lseq (word SHA1) (block_word_length SHA1) let step3_body'_aux (mi: word_block) (st: words_state SHA1) (t: size_t {v t < 80}) (wt: word SHA1 { wt == w mi t } ) : Tot (words_state SHA1) = let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in let _T = (sta <<<. 5ul) +. f t stb stc std +. ste +. k t +. wt in let e = std in let d = stc in let c = stb <<<. 30ul in let b = sta in let a = _T in let l : list uint32 = [ a; b; c; d; e; ] in assert_norm (List.Tot.length l = 5); Seq.seq_of_list l [@"opaque_to_smt"] let step3_body' = step3_body'_aux #reset-options "--z3rlimit 50" [@unifier_hint_injective] inline_for_extraction let step3_body_w_t (mi: word_block) : Tot Type = (t: nat { t < 80 }) -> Tot (wt: word SHA1 { wt == w' mi t } ) let step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat {t < 80}) : Tot (words_state SHA1) = step3_body' mi st (size t) (w t) inline_for_extraction let index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 { compute_w_post mi 80 cwt } ) : Tot (step3_body_w_t mi) = fun (t: nat {t < 80}) -> (Seq.index cwt t <: (wt: word SHA1 { wt == w' mi t })) let step3_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1) = let cwt = compute_w mi 0 Seq.empty in Spec.Loops.repeat_range 0 80 (step3_body mi (index_compute_w mi cwt)) h [@"opaque_to_smt"] let step3 = step3_aux (* Section 6.1.2 Step 4 *) let step4_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1) = let st = step3 mi h in let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in Seq.seq_of_list [ sta +. Seq.index h 0; stb +. Seq.index h 1; stc +. Seq.index h 2; std +. Seq.index h 3; ste +. Seq.index h 4; ]
false
true
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val step4 : mi: Spec.SHA1.word_block -> h: Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1 -> Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1
[]
Spec.SHA1.step4
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
mi: Spec.SHA1.word_block -> h: Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1 -> Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1
{ "end_col": 21, "end_line": 227, "start_col": 12, "start_line": 227 }
Prims.Tot
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 step3 = step3_aux
let step3 =
false
null
false
step3_aux
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Spec.SHA1.step3_aux" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction let f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z (* Section 4.2.1 *) inline_for_extraction let k (t: size_t { v t <= 79 } ) : Tot (word SHA1) = if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6 (* Section 6.1.2 Step 3 *) let word_block = Seq.lseq (word SHA1) (block_word_length SHA1) let step3_body'_aux (mi: word_block) (st: words_state SHA1) (t: size_t {v t < 80}) (wt: word SHA1 { wt == w mi t } ) : Tot (words_state SHA1) = let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in let _T = (sta <<<. 5ul) +. f t stb stc std +. ste +. k t +. wt in let e = std in let d = stc in let c = stb <<<. 30ul in let b = sta in let a = _T in let l : list uint32 = [ a; b; c; d; e; ] in assert_norm (List.Tot.length l = 5); Seq.seq_of_list l [@"opaque_to_smt"] let step3_body' = step3_body'_aux #reset-options "--z3rlimit 50" [@unifier_hint_injective] inline_for_extraction let step3_body_w_t (mi: word_block) : Tot Type = (t: nat { t < 80 }) -> Tot (wt: word SHA1 { wt == w' mi t } ) let step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat {t < 80}) : Tot (words_state SHA1) = step3_body' mi st (size t) (w t) inline_for_extraction let index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 { compute_w_post mi 80 cwt } ) : Tot (step3_body_w_t mi) = fun (t: nat {t < 80}) -> (Seq.index cwt t <: (wt: word SHA1 { wt == w' mi t })) let step3_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1) = let cwt = compute_w mi 0 Seq.empty in Spec.Loops.repeat_range 0 80 (step3_body mi (index_compute_w mi cwt)) h
false
true
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val step3 : mi: Spec.SHA1.word_block -> h: Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1 -> Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1
[]
Spec.SHA1.step3
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
mi: Spec.SHA1.word_block -> h: Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1 -> Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1
{ "end_col": 21, "end_line": 204, "start_col": 12, "start_line": 204 }
Prims.Tot
val update: update_t SHA1
[ { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 = update_aux
val update: update_t SHA1 let update =
false
null
false
update_aux
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Spec.SHA1.update_aux" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction let f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z (* Section 4.2.1 *) inline_for_extraction let k (t: size_t { v t <= 79 } ) : Tot (word SHA1) = if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6 (* Section 6.1.2 Step 3 *) let word_block = Seq.lseq (word SHA1) (block_word_length SHA1) let step3_body'_aux (mi: word_block) (st: words_state SHA1) (t: size_t {v t < 80}) (wt: word SHA1 { wt == w mi t } ) : Tot (words_state SHA1) = let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in let _T = (sta <<<. 5ul) +. f t stb stc std +. ste +. k t +. wt in let e = std in let d = stc in let c = stb <<<. 30ul in let b = sta in let a = _T in let l : list uint32 = [ a; b; c; d; e; ] in assert_norm (List.Tot.length l = 5); Seq.seq_of_list l [@"opaque_to_smt"] let step3_body' = step3_body'_aux #reset-options "--z3rlimit 50" [@unifier_hint_injective] inline_for_extraction let step3_body_w_t (mi: word_block) : Tot Type = (t: nat { t < 80 }) -> Tot (wt: word SHA1 { wt == w' mi t } ) let step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat {t < 80}) : Tot (words_state SHA1) = step3_body' mi st (size t) (w t) inline_for_extraction let index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 { compute_w_post mi 80 cwt } ) : Tot (step3_body_w_t mi) = fun (t: nat {t < 80}) -> (Seq.index cwt t <: (wt: word SHA1 { wt == w' mi t })) let step3_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1) = let cwt = compute_w mi 0 Seq.empty in Spec.Loops.repeat_range 0 80 (step3_body mi (index_compute_w mi cwt)) h [@"opaque_to_smt"] let step3 = step3_aux (* Section 6.1.2 Step 4 *) let step4_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1) = let st = step3 mi h in let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in Seq.seq_of_list [ sta +. Seq.index h 0; stb +. Seq.index h 1; stc +. Seq.index h 2; std +. Seq.index h 3; ste +. Seq.index h 4; ] [@"opaque_to_smt"] let step4 = step4_aux (* Section 3.1 al. 2: words and bytes, big-endian *) let words_of_bytes_block (l: bytes { Seq.length l == block_length SHA1 } ) : Tot word_block = words_of_bytes SHA1 #((block_word_length SHA1)) l (* Section 6.1.2: outer loop body *) let update_aux (h:words_state SHA1) l : (words_state SHA1) = let mi = words_of_bytes_block l in step4 mi h
false
true
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val update: update_t SHA1
[]
Spec.SHA1.update
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Spec.Hash.Definitions.update_t Spec.Hash.Definitions.SHA1
{ "end_col": 23, "end_line": 242, "start_col": 13, "start_line": 242 }
Prims.Tot
val index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 {compute_w_post mi 80 cwt}) : Tot (step3_body_w_t mi)
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 { compute_w_post mi 80 cwt } ) : Tot (step3_body_w_t mi) = fun (t: nat {t < 80}) -> (Seq.index cwt t <: (wt: word SHA1 { wt == w' mi t }))
val index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 {compute_w_post mi 80 cwt}) : Tot (step3_body_w_t mi) let index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 {compute_w_post mi 80 cwt}) : Tot (step3_body_w_t mi) =
false
null
false
fun (t: nat{t < 80}) -> (Seq.index cwt t <: (wt: word SHA1 {wt == w' mi t}))
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Spec.SHA1.word_block", "FStar.Seq.Properties.lseq", "Spec.Hash.Definitions.word", "Spec.Hash.Definitions.SHA1", "Spec.SHA1.compute_w_post", "Prims.nat", "Prims.b2t", "Prims.op_LessThan", "FStar.Seq.Base.index", "Prims.eq2", "Spec.SHA1.w'", "Spec.SHA1.step3_body_w_t" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction let f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z (* Section 4.2.1 *) inline_for_extraction let k (t: size_t { v t <= 79 } ) : Tot (word SHA1) = if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6 (* Section 6.1.2 Step 3 *) let word_block = Seq.lseq (word SHA1) (block_word_length SHA1) let step3_body'_aux (mi: word_block) (st: words_state SHA1) (t: size_t {v t < 80}) (wt: word SHA1 { wt == w mi t } ) : Tot (words_state SHA1) = let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in let _T = (sta <<<. 5ul) +. f t stb stc std +. ste +. k t +. wt in let e = std in let d = stc in let c = stb <<<. 30ul in let b = sta in let a = _T in let l : list uint32 = [ a; b; c; d; e; ] in assert_norm (List.Tot.length l = 5); Seq.seq_of_list l [@"opaque_to_smt"] let step3_body' = step3_body'_aux #reset-options "--z3rlimit 50" [@unifier_hint_injective] inline_for_extraction let step3_body_w_t (mi: word_block) : Tot Type = (t: nat { t < 80 }) -> Tot (wt: word SHA1 { wt == w' mi t } ) let step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat {t < 80}) : Tot (words_state SHA1) = step3_body' mi st (size t) (w t) inline_for_extraction let index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 { compute_w_post mi 80 cwt } )
false
false
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 {compute_w_post mi 80 cwt}) : Tot (step3_body_w_t mi)
[]
Spec.SHA1.index_compute_w
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
mi: Spec.SHA1.word_block -> cwt: FStar.Seq.Properties.lseq (Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1) 80 {Spec.SHA1.compute_w_post mi 80 cwt} -> Spec.SHA1.step3_body_w_t mi
{ "end_col": 81, "end_line": 194, "start_col": 2, "start_line": 194 }
Prims.Tot
val init_as_list:list uint32
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ]
val init_as_list:list uint32 let init_as_list:list uint32 =
false
null
false
[u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0]
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Prims.Cons", "Lib.IntTypes.int_t", "Lib.IntTypes.U32", "Lib.IntTypes.SEC", "Lib.IntTypes.u32", "Prims.Nil" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *)
false
true
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val init_as_list:list uint32
[]
Spec.SHA1.init_as_list
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Prims.list (Lib.IntTypes.int_t Lib.IntTypes.U32 Lib.IntTypes.SEC)
{ "end_col": 1, "end_line": 19, "start_col": 33, "start_line": 13 }
Prims.Tot
val step3_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1)
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 step3_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1) = let cwt = compute_w mi 0 Seq.empty in Spec.Loops.repeat_range 0 80 (step3_body mi (index_compute_w mi cwt)) h
val step3_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1) let step3_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1) =
false
null
false
let cwt = compute_w mi 0 Seq.empty in Spec.Loops.repeat_range 0 80 (step3_body mi (index_compute_w mi cwt)) h
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Spec.SHA1.word_block", "Spec.Hash.Definitions.words_state", "Spec.Hash.Definitions.SHA1", "Spec.Loops.repeat_range", "Spec.SHA1.step3_body", "Spec.SHA1.index_compute_w", "FStar.Seq.Properties.lseq", "Spec.Hash.Definitions.word", "Spec.SHA1.compute_w", "FStar.Seq.Base.empty" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction let f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z (* Section 4.2.1 *) inline_for_extraction let k (t: size_t { v t <= 79 } ) : Tot (word SHA1) = if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6 (* Section 6.1.2 Step 3 *) let word_block = Seq.lseq (word SHA1) (block_word_length SHA1) let step3_body'_aux (mi: word_block) (st: words_state SHA1) (t: size_t {v t < 80}) (wt: word SHA1 { wt == w mi t } ) : Tot (words_state SHA1) = let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in let _T = (sta <<<. 5ul) +. f t stb stc std +. ste +. k t +. wt in let e = std in let d = stc in let c = stb <<<. 30ul in let b = sta in let a = _T in let l : list uint32 = [ a; b; c; d; e; ] in assert_norm (List.Tot.length l = 5); Seq.seq_of_list l [@"opaque_to_smt"] let step3_body' = step3_body'_aux #reset-options "--z3rlimit 50" [@unifier_hint_injective] inline_for_extraction let step3_body_w_t (mi: word_block) : Tot Type = (t: nat { t < 80 }) -> Tot (wt: word SHA1 { wt == w' mi t } ) let step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat {t < 80}) : Tot (words_state SHA1) = step3_body' mi st (size t) (w t) inline_for_extraction let index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 { compute_w_post mi 80 cwt } ) : Tot (step3_body_w_t mi) = fun (t: nat {t < 80}) -> (Seq.index cwt t <: (wt: word SHA1 { wt == w' mi t })) let step3_aux (mi: word_block) (h: words_state SHA1)
false
true
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val step3_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1)
[]
Spec.SHA1.step3_aux
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
mi: Spec.SHA1.word_block -> h: Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1 -> Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1
{ "end_col": 73, "end_line": 201, "start_col": 1, "start_line": 200 }
Prims.Tot
val k (t: size_t{v t <= 79}) : Tot (word SHA1)
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 k (t: size_t { v t <= 79 } ) : Tot (word SHA1) = if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6
val k (t: size_t{v t <= 79}) : Tot (word SHA1) let k (t: size_t{v t <= 79}) : Tot (word SHA1) =
false
null
false
if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThanOrEqual", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Lib.IntTypes.op_Less_Dot", "FStar.UInt32.__uint_to_t", "Lib.IntTypes.u32", "Prims.bool", "Spec.Hash.Definitions.word", "Spec.Hash.Definitions.SHA1" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction let f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z (* Section 4.2.1 *) inline_for_extraction
false
false
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val k (t: size_t{v t <= 79}) : Tot (word SHA1)
[]
Spec.SHA1.k
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
t: Lib.IntTypes.size_t{Lib.IntTypes.v t <= 79} -> Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1
{ "end_col": 21, "end_line": 137, "start_col": 2, "start_line": 131 }
Prims.Tot
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 word_block = Seq.lseq (word SHA1) (block_word_length SHA1)
let word_block =
false
null
false
Seq.lseq (word SHA1) (block_word_length SHA1)
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "FStar.Seq.Properties.lseq", "Spec.Hash.Definitions.word", "Spec.Hash.Definitions.SHA1", "Spec.Hash.Definitions.block_word_length" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction let f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z (* Section 4.2.1 *) inline_for_extraction let k (t: size_t { v t <= 79 } ) : Tot (word SHA1) = if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6 (* Section 6.1.2 Step 3 *)
false
true
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val word_block : Type0
[]
Spec.SHA1.word_block
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
Type0
{ "end_col": 62, "end_line": 141, "start_col": 17, "start_line": 141 }
Prims.Tot
val words_of_bytes_block (l: bytes{Seq.length l == block_length SHA1}) : Tot word_block
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 words_of_bytes_block (l: bytes { Seq.length l == block_length SHA1 } ) : Tot word_block = words_of_bytes SHA1 #((block_word_length SHA1)) l
val words_of_bytes_block (l: bytes{Seq.length l == block_length SHA1}) : Tot word_block let words_of_bytes_block (l: bytes{Seq.length l == block_length SHA1}) : Tot word_block =
false
null
false
words_of_bytes SHA1 #((block_word_length SHA1)) l
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Spec.Hash.Definitions.bytes", "Prims.eq2", "Prims.int", "Prims.l_or", "Prims.b2t", "Prims.op_GreaterThanOrEqual", "Prims.op_disEquality", "FStar.Seq.Base.length", "Lib.IntTypes.uint8", "Spec.Hash.Definitions.block_length", "Spec.Hash.Definitions.SHA1", "Spec.Hash.Definitions.words_of_bytes", "Spec.Hash.Definitions.block_word_length", "Spec.SHA1.word_block" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction let f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z (* Section 4.2.1 *) inline_for_extraction let k (t: size_t { v t <= 79 } ) : Tot (word SHA1) = if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6 (* Section 6.1.2 Step 3 *) let word_block = Seq.lseq (word SHA1) (block_word_length SHA1) let step3_body'_aux (mi: word_block) (st: words_state SHA1) (t: size_t {v t < 80}) (wt: word SHA1 { wt == w mi t } ) : Tot (words_state SHA1) = let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in let _T = (sta <<<. 5ul) +. f t stb stc std +. ste +. k t +. wt in let e = std in let d = stc in let c = stb <<<. 30ul in let b = sta in let a = _T in let l : list uint32 = [ a; b; c; d; e; ] in assert_norm (List.Tot.length l = 5); Seq.seq_of_list l [@"opaque_to_smt"] let step3_body' = step3_body'_aux #reset-options "--z3rlimit 50" [@unifier_hint_injective] inline_for_extraction let step3_body_w_t (mi: word_block) : Tot Type = (t: nat { t < 80 }) -> Tot (wt: word SHA1 { wt == w' mi t } ) let step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat {t < 80}) : Tot (words_state SHA1) = step3_body' mi st (size t) (w t) inline_for_extraction let index_compute_w (mi: word_block) (cwt: Seq.lseq (word SHA1) 80 { compute_w_post mi 80 cwt } ) : Tot (step3_body_w_t mi) = fun (t: nat {t < 80}) -> (Seq.index cwt t <: (wt: word SHA1 { wt == w' mi t })) let step3_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1) = let cwt = compute_w mi 0 Seq.empty in Spec.Loops.repeat_range 0 80 (step3_body mi (index_compute_w mi cwt)) h [@"opaque_to_smt"] let step3 = step3_aux (* Section 6.1.2 Step 4 *) let step4_aux (mi: word_block) (h: words_state SHA1) : Tot (words_state SHA1) = let st = step3 mi h in let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in Seq.seq_of_list [ sta +. Seq.index h 0; stb +. Seq.index h 1; stc +. Seq.index h 2; std +. Seq.index h 3; ste +. Seq.index h 4; ] [@"opaque_to_smt"] let step4 = step4_aux (* Section 3.1 al. 2: words and bytes, big-endian *) let words_of_bytes_block (l: bytes { Seq.length l == block_length SHA1 } )
false
false
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val words_of_bytes_block (l: bytes{Seq.length l == block_length SHA1}) : Tot word_block
[]
Spec.SHA1.words_of_bytes_block
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
l: Spec.Hash.Definitions.bytes {FStar.Seq.Base.length l == Spec.Hash.Definitions.block_length Spec.Hash.Definitions.SHA1} -> Spec.SHA1.word_block
{ "end_col": 51, "end_line": 234, "start_col": 2, "start_line": 234 }
Prims.Tot
val step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat{t < 80}) : Tot (words_state SHA1)
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat {t < 80}) : Tot (words_state SHA1) = step3_body' mi st (size t) (w t)
val step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat{t < 80}) : Tot (words_state SHA1) let step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat{t < 80}) : Tot (words_state SHA1) =
false
null
false
step3_body' mi st (size t) (w t)
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "total" ]
[ "Spec.SHA1.word_block", "Spec.SHA1.step3_body_w_t", "Spec.Hash.Definitions.words_state", "Spec.Hash.Definitions.SHA1", "Prims.nat", "Prims.b2t", "Prims.op_LessThan", "Spec.SHA1.step3_body'", "Lib.IntTypes.size" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w inline_for_extraction let compute_w_next (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) (n + 1)) (requires (compute_w_post mi n accu)) (ensures (fun accu' -> compute_w_post mi (n + 1) accu')) = let wn = compute_w_n mi n accu in let accu' = Seq.snoc accu wn in assert (n + 1 <= 80); let g (i: nat) : Lemma (requires (i < n + 1)) (ensures (i < n + 1 /\ Seq.index accu' i == w' mi i)) = if i = n then () else () in compute_w_post_intro mi (n + 1) accu' () g; accu' let rec compute_w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (accu: Seq.lseq (word SHA1) n) : Pure (Seq.lseq (word SHA1) 80) (requires (compute_w_post mi n accu)) (ensures (fun res -> compute_w_post mi 80 res)) (decreases (80 - n)) = assert (n <= 80); // this assert is necessary for Z3 to prove that n <= 79 in the else branch if n = 80 then accu else compute_w mi (n + 1) (compute_w_next mi n accu) (* Section 4.1.1: logical functions *) inline_for_extraction let f (t: size_t {v t <= 79}) (x y z: word SHA1) : Tot (word SHA1) = if t <. 20ul then (x &. y) ^. (~. x &. z) else if 39ul <. t && t <. 60ul then (x &. y) ^. (x &. z) ^. (y &. z) else x ^. y ^. z (* Section 4.2.1 *) inline_for_extraction let k (t: size_t { v t <= 79 } ) : Tot (word SHA1) = if t <. 20ul then u32 0x5a827999 else if t <. 40ul then u32 0x6ed9eba1 else if t <. 60ul then u32 0x8f1bbcdc else u32 0xca62c1d6 (* Section 6.1.2 Step 3 *) let word_block = Seq.lseq (word SHA1) (block_word_length SHA1) let step3_body'_aux (mi: word_block) (st: words_state SHA1) (t: size_t {v t < 80}) (wt: word SHA1 { wt == w mi t } ) : Tot (words_state SHA1) = let sta = Seq.index st 0 in let stb = Seq.index st 1 in let stc = Seq.index st 2 in let std = Seq.index st 3 in let ste = Seq.index st 4 in let _T = (sta <<<. 5ul) +. f t stb stc std +. ste +. k t +. wt in let e = std in let d = stc in let c = stb <<<. 30ul in let b = sta in let a = _T in let l : list uint32 = [ a; b; c; d; e; ] in assert_norm (List.Tot.length l = 5); Seq.seq_of_list l [@"opaque_to_smt"] let step3_body' = step3_body'_aux #reset-options "--z3rlimit 50" [@unifier_hint_injective] inline_for_extraction let step3_body_w_t (mi: word_block) : Tot Type = (t: nat { t < 80 }) -> Tot (wt: word SHA1 { wt == w' mi t } ) let step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat {t < 80})
false
false
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 50, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val step3_body (mi: word_block) (w: step3_body_w_t mi) (st: words_state SHA1) (t: nat{t < 80}) : Tot (words_state SHA1)
[]
Spec.SHA1.step3_body
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
mi: Spec.SHA1.word_block -> w: Spec.SHA1.step3_body_w_t mi -> st: Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1 -> t: Prims.nat{t < 80} -> Spec.Hash.Definitions.words_state Spec.Hash.Definitions.SHA1
{ "end_col": 34, "end_line": 187, "start_col": 2, "start_line": 187 }
Prims.GTot
val compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i ))
val compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 =
false
null
false
(n <= 80 /\ (forall (i: nat). i < n ==> Seq.index res i == w' mi i))
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "sometrivial" ]
[ "FStar.Seq.Properties.lseq", "Spec.Hash.Definitions.word", "Spec.Hash.Definitions.SHA1", "Spec.Hash.Definitions.block_word_length", "Prims.nat", "Prims.l_and", "Prims.b2t", "Prims.op_LessThanOrEqual", "Prims.l_Forall", "Prims.l_imp", "Prims.op_LessThan", "Prims.eq2", "FStar.Seq.Base.index", "Spec.SHA1.w'" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n)
false
false
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0
[]
Spec.SHA1.compute_w_post
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
mi: FStar.Seq.Properties.lseq (Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1) (Spec.Hash.Definitions.block_word_length Spec.Hash.Definitions.SHA1) -> n: Prims.nat -> res: FStar.Seq.Properties.lseq (Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1) n -> Prims.GTot Type0
{ "end_col": 4, "end_line": 39, "start_col": 2, "start_line": 37 }
Prims.Pure
val compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat{n <= 79}) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n))
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) = [@inline_let] let w (i: nat {i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w
val compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat{n <= 79}) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat{n <= 79}) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n)) =
false
null
false
[@@ inline_let ]let w (i: nat{i < n}) : Tot (y: word SHA1 {y == w' mi i}) = Seq.index accu i in compute_w_n' mi n w
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[]
[ "FStar.Seq.Properties.lseq", "Spec.Hash.Definitions.word", "Spec.Hash.Definitions.SHA1", "Spec.Hash.Definitions.block_word_length", "Prims.nat", "Prims.b2t", "Prims.op_LessThanOrEqual", "Spec.SHA1.compute_w_n'", "Prims.op_LessThan", "Prims.eq2", "Spec.SHA1.w'", "FStar.Seq.Base.index", "Spec.SHA1.compute_w_post", "Prims.l_and" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t) let compute_w_post (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) : GTot Type0 = (n <= 80 /\ ( forall (i: nat) . i < n ==> Seq.index res i == w' mi i )) let compute_w_post_intro (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat) (res: Seq.lseq (word SHA1) n) (u: squash (n <= 80)) (f: (i: nat) -> Lemma (requires (i < n)) (ensures (i < n /\ Seq.index res i == w' mi i))) : Lemma (compute_w_post mi n res) = Classical.forall_intro (Classical.move_requires f) inline_for_extraction let compute_w_n' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (w: ((i: nat {i < n}) -> Tot (y: word SHA1 {y == w' mi i}))) : Tot (y: word SHA1 {y == w' mi n}) = let r = if n < 16 then Seq.index mi n else (w (n - 3) ^. w (n - 8) ^. w (n - 14) ^. w (n - 16)) <<<. 1ul in r inline_for_extraction let compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat { n <= 79 } ) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu))
false
false
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val compute_w_n (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (n: nat{n <= 79}) (accu: Seq.lseq (word SHA1) n) : Pure (word SHA1) (requires (compute_w_post mi n accu)) (ensures (fun y -> n <= 79 /\ y == w' mi n))
[]
Spec.SHA1.compute_w_n
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
mi: FStar.Seq.Properties.lseq (Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1) (Spec.Hash.Definitions.block_word_length Spec.Hash.Definitions.SHA1) -> n: Prims.nat{n <= 79} -> accu: FStar.Seq.Properties.lseq (Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1) n -> Prims.Pure (Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1)
{ "end_col": 21, "end_line": 76, "start_col": 2, "start_line": 74 }
Prims.GTot
val w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t{v t <= 79}) : GTot (word SHA1)
[ { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": true, "full_module": "FStar.Seq", "short_module": "Seq" }, { "abbrev": true, "full_module": "Spec.Hash.Definitions", "short_module": "H" }, { "abbrev": false, "full_module": "Lib.IntTypes", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec", "short_module": null }, { "abbrev": false, "full_module": "Spec", "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 w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t {v t <= 79}) : GTot (word SHA1) = w' mi (v t)
val w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t{v t <= 79}) : GTot (word SHA1) let w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t{v t <= 79}) : GTot (word SHA1) =
false
null
false
w' mi (v t)
{ "checked_file": "Spec.SHA1.fst.checked", "dependencies": [ "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "prims.fst.checked", "Lib.IntTypes.fsti.checked", "FStar.UInt32.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.fsti.checked", "FStar.List.Tot.fst.checked", "FStar.Classical.fsti.checked" ], "interface_file": true, "source_file": "Spec.SHA1.fst" }
[ "sometrivial" ]
[ "FStar.Seq.Properties.lseq", "Spec.Hash.Definitions.word", "Spec.Hash.Definitions.SHA1", "Spec.Hash.Definitions.block_word_length", "Lib.IntTypes.size_t", "Prims.b2t", "Prims.op_LessThanOrEqual", "Lib.IntTypes.v", "Lib.IntTypes.U32", "Lib.IntTypes.PUB", "Spec.SHA1.w'" ]
[]
module Spec.SHA1 open Lib.IntTypes module H = Spec.Hash.Definitions module Seq = FStar.Seq open Spec.Hash.Definitions (* Source: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf *) (* Section 5.3.1 *) inline_for_extraction let init_as_list : list uint32 = [ u32 0x67452301; u32 0xefcdab89; u32 0x98badcfe; u32 0x10325476; u32 0xc3d2e1f0; ] let init : words_state SHA1 = Seq.seq_of_list init_as_list (* Section 6.1.2 Step 1: message schedule *) let rec w' (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: nat {t <= 79}) : GTot (word SHA1) (decreases (t)) = if t < 16 then Seq.index mi (t) else (w' mi (t - 3) ^. w' mi (t - 8) ^. w' mi (t - 14) ^. w' mi (t - 16)) <<<. 1ul
false
false
Spec.SHA1.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": false, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val w (mi: Seq.lseq (word SHA1) (block_word_length SHA1)) (t: size_t{v t <= 79}) : GTot (word SHA1)
[]
Spec.SHA1.w
{ "file_name": "specs/Spec.SHA1.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
mi: FStar.Seq.Properties.lseq (Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1) (Spec.Hash.Definitions.block_word_length Spec.Hash.Definitions.SHA1) -> t: Lib.IntTypes.size_t{Lib.IntTypes.v t <= 79} -> Prims.GTot (Spec.Hash.Definitions.word Spec.Hash.Definitions.SHA1)
{ "end_col": 114, "end_line": 30, "start_col": 103, "start_line": 30 }