file_name stringlengths 5 52 | name stringlengths 4 95 | original_source_type stringlengths 0 23k | source_type stringlengths 9 23k | source_definition stringlengths 9 57.9k | source dict | source_range dict | file_context stringlengths 0 721k | dependencies dict | opens_and_abbrevs listlengths 2 94 | vconfig dict | interleaved bool 1
class | verbose_type stringlengths 1 7.42k | effect stringclasses 118
values | effect_flags listlengths 0 2 | mutual_with listlengths 0 11 | ideal_premises listlengths 0 236 | proof_features listlengths 0 1 | is_simple_lemma bool 2
classes | is_div bool 2
classes | is_proof bool 2
classes | is_simply_typed bool 2
classes | is_type bool 2
classes | partial_definition stringlengths 5 3.99k | completed_definiton stringlengths 1 1.63M | isa_cross_project_example bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LowParse.SLow.BoundedInt.fsti | LowParse.SLow.BoundedInt.parse32_bounded_int32 | val parse32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (parser32 (parse_bounded_int32 (U32.v min32) (U32.v max32))) | val parse32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (parser32 (parse_bounded_int32 (U32.v min32) (U32.v max32))) | let parse32_bounded_int32
(min32: U32.t)
(max32: U32.t { 0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296 })
: Tot (parser32 (parse_bounded_int32 (U32.v min32) (U32.v max32)))
= fun input -> (
if max32 `U32.lt` 256ul
then parse32_bounded_int32_1 min32 max32 input
else if max32 `U32.lt... | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 166,
"start_col": 0,
"start_line": 154
} | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLow.BoundedInt.fsti"
} | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
min32: FStar.UInt32.t ->
max32:
FStar.UInt32.t
{ 0 < FStar.UInt32.v max32 /\ FStar.UInt32.v min32 <= FStar.UInt32.v max32 /\
FStar.UInt32.v max32 < 4294967296 }
-> LowParse.SLow.Base.parser32 (LowParse.Spec.BoundedInt.parse_bounded_int32 (FStar.UInt32.v min32
)
(FS... | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"Prims.op_LessThanOrEqual",
"LowParse.SLow.Base.bytes32",
"FStar.UInt32.lt",
"FStar.UInt32.__uint_to_t",
"LowParse.SLow.BoundedInt.parse32_bounded_int32_1",
"Prims.bool",
"LowParse.SLow.BoundedInt.parse32_boun... | [] | false | false | false | false | false | let parse32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (parser32 (parse_bounded_int32 (U32.v min32) (U32.v max32))) =
| fun input ->
(if max32 `U32.lt` 256ul
then parse32_bounded_int32_1 min32 max32 input
else
if max32 `U32.lt` 65536ul
then parse32_bounded_int32_2 min32 max32 input
else
if max32 `U32.lt` 16777216ul
then parse32_bounded_int32_3 min32 max32 input
else parse32_bounded_int... | false |
Steel.ST.Printf.fst | Steel.ST.Printf.test3_printf | val test3_printf
(m: UInt64.t)
(l: UInt32.t)
(x: A.array bool {A.length x == U32.v l})
(v: Ghost.erased (Seq.seq bool))
: STT unit (A.pts_to x full_perm v) (fun _ -> A.pts_to x full_perm v) | val test3_printf
(m: UInt64.t)
(l: UInt32.t)
(x: A.array bool {A.length x == U32.v l})
(v: Ghost.erased (Seq.seq bool))
: STT unit (A.pts_to x full_perm v) (fun _ -> A.pts_to x full_perm v) | let test3_printf (m:UInt64.t) (l:UInt32.t) (x:A.array bool {A.length x == U32.v l}) (v: Ghost.erased (Seq.seq bool))
: STT unit (A.pts_to x full_perm v) (fun _ -> A.pts_to x full_perm v)
= skip "Hello %b Steel.ST %uL Printf %xb %s"
true //%b boolean
m //%uL u64
l x /... | {
"file_name": "lib/steel/Steel.ST.Printf.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 18,
"end_line": 579,
"start_col": 0,
"start_line": 572
} | (*
Copyright 2008-2022 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Array.fsti.checked",
"Steel.Effect.Common.fsti.checked",
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt16.fsti.checked",
"FStar... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Steel.ST.Array",
"short_module": "A"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": "Ste... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
m: FStar.UInt64.t ->
l: FStar.UInt32.t ->
x: Steel.ST.Array.array Prims.bool {Steel.ST.Array.length x == FStar.UInt32.v l} ->
v: FStar.Ghost.erased (FStar.Seq.Base.seq Prims.bool)
-> Steel.ST.Effect.STT Prims.unit | Steel.ST.Effect.STT | [] | [] | [
"FStar.UInt64.t",
"FStar.UInt32.t",
"Steel.ST.Array.array",
"Prims.bool",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"Steel.ST.Array.length",
"FStar.UInt32.v",
"FStar.Ghost.erased",
"FStar.Seq.Base.seq",
"Ste... | [] | false | true | false | false | false | let test3_printf
(m: UInt64.t)
(l: UInt32.t)
(x: A.array bool {A.length x == U32.v l})
(v: Ghost.erased (Seq.seq bool))
: STT unit (A.pts_to x full_perm v) (fun _ -> A.pts_to x full_perm v) =
| skip "Hello %b Steel.ST %uL Printf %xb %s" true m l x "bye" done | false |
LowParse.SLow.BoundedInt.fsti | LowParse.SLow.BoundedInt.serialize32_bounded_int32_le | val serialize32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (serializer32 (serialize_bounded_int32_le (U32.v min32) (U32.v max32))) | val serialize32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (serializer32 (serialize_bounded_int32_le (U32.v min32) (U32.v max32))) | let serialize32_bounded_int32_le
(min32: U32.t)
(max32: U32.t { 0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296 })
: Tot (serializer32 (serialize_bounded_int32_le (U32.v min32) (U32.v max32)))
= fun input -> (
if max32 `U32.lt` 256ul
then serialize32_bounded_int32_le_1 min32 max32 inpu... | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 3,
"end_line": 272,
"start_col": 0,
"start_line": 260
} | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLow.BoundedInt.fsti"
} | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
min32: FStar.UInt32.t ->
max32:
FStar.UInt32.t
{ 0 < FStar.UInt32.v max32 /\ FStar.UInt32.v min32 <= FStar.UInt32.v max32 /\
FStar.UInt32.v max32 < 4294967296 }
-> LowParse.SLow.Base.serializer32 (LowParse.Spec.BoundedInt.serialize_bounded_int32_le (FStar.UInt32.v
min32)... | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.BoundedInt.bounded_int32",
"FStar.UInt32.lt",
"FStar.UInt32.__uint_to_t",
"LowParse.SLow.BoundedInt.serialize32_bounded_int32_le_1",
"Prims.bool",
"LowParse.SLow.Boun... | [] | false | false | false | false | false | let serialize32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (serializer32 (serialize_bounded_int32_le (U32.v min32) (U32.v max32))) =
| fun input ->
(if max32 `U32.lt` 256ul
then serialize32_bounded_int32_le_1 min32 max32 input
else
if max32 `U32.lt` 65536ul
then serialize32_bounded_int32_le_2 min32 max32 input
else
if max32 `U32.lt` 16777216ul
then serialize32_bounded_int32_le_3 min32 max32 input
els... | false |
HaclExample2.fst | HaclExample2.test_alloc_free | val test_alloc_free: Prims.unit -> STT unit emp (fun _ -> emp) | val test_alloc_free: Prims.unit -> STT unit emp (fun _ -> emp) | let test_alloc_free
()
: STT unit
emp
(fun _ -> emp)
=
let a = array_alloc (scalar bool) 42sz in
let _ = gen_elim () in
if array_is_null a
then begin
rewrite (array_pts_to_or_null _ _) emp;
rewrite (freeable_or_null_array _) emp;
noop ()
end else begin
let s = vpattern_replace (array... | {
"file_name": "share/steel/examples/steelc/HaclExample2.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 5,
"end_line": 100,
"start_col": 0,
"start_line": 82
} | module HaclExample2
open Steel.ST.GenElim
open Steel.ST.C.Types
open Steel.C.Typenat
open Steel.C.Typestring
module SZ = FStar.SizeT
module U64 = FStar.UInt64
(** In this file we demonstrate how Steel could be used to manipulate the following data type used in Hacl*:
https://github.com/project-everest/hacl-star... | {
"checked_file": "/",
"dependencies": [
"Steel.ST.GenElim.fsti.checked",
"Steel.ST.C.Types.fst.checked",
"Steel.C.Typestring.fsti.checked",
"Steel.C.Typenat.fsti.checked",
"prims.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.SizeT.fsti.checked",
"FStar.Seq.fst.checked",
"FSt... | [
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.SizeT",
"short_module": "SZ"
},
{
"abbrev": false,
"full_module": "Steel.C.Typestring",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | _: Prims.unit -> Steel.ST.Effect.STT Prims.unit | Steel.ST.Effect.STT | [] | [] | [
"Prims.unit",
"Steel.ST.Util.noop",
"FStar.Ghost.hide",
"FStar.Set.set",
"Steel.Memory.iname",
"FStar.Set.empty",
"Steel.ST.Util.rewrite",
"Steel.ST.C.Types.Array.freeable_or_null_array",
"Steel.ST.C.Types.Scalar.scalar_t",
"Prims.bool",
"Steel.ST.C.Types.Scalar.scalar",
"Steel.Effect.Common.e... | [] | false | true | false | false | false | let test_alloc_free () : STT unit emp (fun _ -> emp) =
| let a = array_alloc (scalar bool) 42sz in
let _ = gen_elim () in
if array_is_null a
then
(rewrite (array_pts_to_or_null _ _) emp;
rewrite (freeable_or_null_array _) emp;
noop ())
else
let s = vpattern_replace (array_pts_to_or_null _) in
rewrite (array_pts_to_or_null _ _) (array_pts_to a s);
rewrite (fre... | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.pow2_64 | val pow2_64 : Prims.int | let pow2_64 = 0x10000000000000000 | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 33,
"end_line": 33,
"start_col": 0,
"start_line": 33
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.int | Prims.Tot | [
"total"
] | [] | [] | [] | false | false | false | true | false | let pow2_64 =
| 0x10000000000000000 | false | |
OPLSS2021.Vale.fst | OPLSS2021.Vale.update_state | val update_state (r: reg) (s' s: state) : state | val update_state (r: reg) (s' s: state) : state | let update_state (r:reg) (s' s:state) : state =
update_reg s r (s' r) | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 23,
"end_line": 86,
"start_col": 0,
"start_line": 85
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: OPLSS2021.Vale.reg -> s': OPLSS2021.Vale.state -> s: OPLSS2021.Vale.state -> OPLSS2021.Vale.state | Prims.Tot | [
"total"
] | [] | [
"OPLSS2021.Vale.reg",
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.update_reg"
] | [] | false | false | false | true | false | let update_state (r: reg) (s' s: state) : state =
| update_reg s r (s' r) | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.eval_ins | val eval_ins (ins: ins) (s: state) : state | val eval_ins (ins: ins) (s: state) : state | let eval_ins (ins:ins) (s:state) : state =
match ins with
| Mov64 (OConst _) _ ->
unknown_state s
| Mov64 (OReg dst) src ->
update_reg s dst (eval_operand src s)
| Add64 (OConst _) _ ->
unknown_state s
| Add64 (OReg dst) src ->
update_reg s dst ((s dst + eval_operand src s) % 0x100000000000... | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 73,
"end_line": 110,
"start_col": 0,
"start_line": 98
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | ins: OPLSS2021.Vale.ins -> s: OPLSS2021.Vale.state -> OPLSS2021.Vale.state | Prims.Tot | [
"total"
] | [] | [
"OPLSS2021.Vale.ins",
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.nat64",
"OPLSS2021.Vale.operand",
"OPLSS2021.Vale.unknown_state",
"OPLSS2021.Vale.reg",
"OPLSS2021.Vale.update_reg",
"OPLSS2021.Vale.eval_operand",
"Prims.op_Modulus",
"Prims.op_Addition"
] | [] | false | false | false | true | false | let eval_ins (ins: ins) (s: state) : state =
| match ins with
| Mov64 (OConst _) _ -> unknown_state s
| Mov64 (OReg dst) src -> update_reg s dst (eval_operand src s)
| Add64 (OConst _) _ -> unknown_state s
| Add64 (OReg dst) src -> update_reg s dst ((s dst + eval_operand src s) % 0x10000000000000000) | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.eval_code | val eval_code (c: code) (f: fuel) (s: state) : option state | val eval_code (c: code) (f: fuel) (s: state) : option state | let rec eval_code (c:code) (f:fuel) (s:state)
: option state
= match c with
| Ins ins ->
Some (eval_ins ins s)
| Block cs ->
eval_codes cs f s
| WhileLessThan src1 src2 body ->
if f = 0 then None
else if eval_operand src1 s < eval_operand src2 s then
match eval_code ... | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 35,
"end_line": 139,
"start_col": 0,
"start_line": 115
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | c: OPLSS2021.Vale.code -> f: OPLSS2021.Vale.fuel -> s: OPLSS2021.Vale.state
-> FStar.Pervasives.Native.option OPLSS2021.Vale.state | Prims.Tot | [
"total"
] | [
"eval_code",
"eval_codes"
] | [
"OPLSS2021.Vale.code",
"OPLSS2021.Vale.fuel",
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.ins",
"FStar.Pervasives.Native.Some",
"OPLSS2021.Vale.eval_ins",
"Prims.list",
"OPLSS2021.Vale.eval_codes",
"OPLSS2021.Vale.operand",
"Prims.op_Equality",
"Prims.int",
"FStar.Pervasives.Native.None",
"Prims... | [
"mutual recursion"
] | false | false | false | true | false | let rec eval_code (c: code) (f: fuel) (s: state) : option state =
| match c with
| Ins ins -> Some (eval_ins ins s)
| Block cs -> eval_codes cs f s
| WhileLessThan src1 src2 body ->
if f = 0
then None
else
if eval_operand src1 s < eval_operand src2 s
then
match eval_code body f s with
| None -> None
| Some s -> eval_code c (f - 1) s
else Some s | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.eval_codes | val eval_codes (cs: list code) (f: fuel) (s: state) : option state | val eval_codes (cs: list code) (f: fuel) (s: state) : option state | let rec eval_code (c:code) (f:fuel) (s:state)
: option state
= match c with
| Ins ins ->
Some (eval_ins ins s)
| Block cs ->
eval_codes cs f s
| WhileLessThan src1 src2 body ->
if f = 0 then None
else if eval_operand src1 s < eval_operand src2 s then
match eval_code ... | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 35,
"end_line": 139,
"start_col": 0,
"start_line": 115
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | cs: Prims.list OPLSS2021.Vale.code -> f: OPLSS2021.Vale.fuel -> s: OPLSS2021.Vale.state
-> FStar.Pervasives.Native.option OPLSS2021.Vale.state | Prims.Tot | [
"total"
] | [
"eval_code",
"eval_codes"
] | [
"Prims.list",
"OPLSS2021.Vale.code",
"OPLSS2021.Vale.fuel",
"OPLSS2021.Vale.state",
"FStar.Pervasives.Native.Some",
"OPLSS2021.Vale.eval_code",
"FStar.Pervasives.Native.None",
"OPLSS2021.Vale.eval_codes",
"FStar.Pervasives.Native.option"
] | [
"mutual recursion"
] | false | false | false | true | false | let rec eval_codes (cs: list code) (f: fuel) (s: state) : option state =
| match cs with
| [] -> Some s
| c :: cs ->
match eval_code c f s with
| None -> None
| Some s -> eval_codes cs f s | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.eval_operand | val eval_operand (o: operand) (s: state) : nat64 | val eval_operand (o: operand) (s: state) : nat64 | let eval_operand (o:operand) (s:state) : nat64 =
match o with
| OReg r -> s r
| OConst n -> n | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 17,
"end_line": 76,
"start_col": 0,
"start_line": 73
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | o: OPLSS2021.Vale.operand -> s: OPLSS2021.Vale.state -> OPLSS2021.Vale.nat64 | Prims.Tot | [
"total"
] | [] | [
"OPLSS2021.Vale.operand",
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.reg",
"OPLSS2021.Vale.nat64"
] | [] | false | false | false | true | false | let eval_operand (o: operand) (s: state) : nat64 =
| match o with
| OReg r -> s r
| OConst n -> n | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.codes_Triple | val codes_Triple:list code | val codes_Triple:list code | let codes_Triple : list code =
[
Ins (Mov64 (OReg Rbx) (OReg Rax)); //mov rbx rax;
Ins (Add64 (OReg Rax) (OReg Rbx)); //add rax rbx;
Ins (Add64 (OReg Rbx) (OReg Rax)) //add rbx rax;
] | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 3,
"end_line": 235,
"start_col": 0,
"start_line": 230
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.list OPLSS2021.Vale.code | Prims.Tot | [
"total"
] | [] | [
"Prims.Cons",
"OPLSS2021.Vale.code",
"OPLSS2021.Vale.Ins",
"OPLSS2021.Vale.Mov64",
"OPLSS2021.Vale.OReg",
"OPLSS2021.Vale.Rbx",
"OPLSS2021.Vale.Rax",
"OPLSS2021.Vale.Add64",
"Prims.Nil"
] | [] | false | false | false | true | false | let codes_Triple:list code =
| [
Ins (Mov64 (OReg Rbx) (OReg Rax));
Ins (Add64 (OReg Rax) (OReg Rbx));
Ins (Add64 (OReg Rbx) (OReg Rax))
] | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.update_reg | val update_reg (s: state) (r: reg) (v: nat64) : state | val update_reg (s: state) (r: reg) (v: nat64) : state | let update_reg (s:state) (r:reg) (v:nat64) : state =
fun r' -> if r = r' then v else s r' | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 38,
"end_line": 81,
"start_col": 0,
"start_line": 80
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s: OPLSS2021.Vale.state -> r: OPLSS2021.Vale.reg -> v: OPLSS2021.Vale.nat64 -> OPLSS2021.Vale.state | Prims.Tot | [
"total"
] | [] | [
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.reg",
"OPLSS2021.Vale.nat64",
"Prims.op_Equality",
"Prims.bool"
] | [] | false | false | false | true | false | let update_reg (s: state) (r: reg) (v: nat64) : state =
| fun r' -> if r = r' then v else s r' | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.increase_fuels | val increase_fuels (c: list code) (s0: state) (f0: fuel) (sN: state) (fN: fuel)
: Lemma (requires eval_code (Block c) f0 s0 == Some sN /\ f0 <= fN)
(ensures eval_code (Block c) fN s0 == Some sN)
(decreases %[f0;c]) | val increase_fuels (c: list code) (s0: state) (f0: fuel) (sN: state) (fN: fuel)
: Lemma (requires eval_code (Block c) f0 s0 == Some sN /\ f0 <= fN)
(ensures eval_code (Block c) fN s0 == Some sN)
(decreases %[f0;c]) | let rec increase_fuel (c:code) (s0:state) (f0:fuel) (sN:state) (fN:fuel)
: Lemma
(requires
eval_code c f0 s0 == Some sN /\
f0 <= fN)
(ensures
eval_code c fN s0 == Some sN)
(decreases %[f0; c])
=
match c with
| Ins ins -> ()
| Block l -> increase_fuels l s0 f0 sN fN
| WhileLessT... | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 180,
"start_col": 0,
"start_line": 146
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
c: Prims.list OPLSS2021.Vale.code ->
s0: OPLSS2021.Vale.state ->
f0: OPLSS2021.Vale.fuel ->
sN: OPLSS2021.Vale.state ->
fN: OPLSS2021.Vale.fuel
-> FStar.Pervasives.Lemma
(requires
OPLSS2021.Vale.eval_code (OPLSS2021.Vale.Block c) f0 s0 == FStar.Pervasives.Native.Some sN /\
f... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [
"increase_fuel",
"increase_fuels"
] | [
"Prims.list",
"OPLSS2021.Vale.code",
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.fuel",
"OPLSS2021.Vale.increase_fuels",
"Prims.unit",
"OPLSS2021.Vale.increase_fuel",
"FStar.Pervasives.Native.option",
"OPLSS2021.Vale.eval_code",
"Prims.l_and",
"Prims.eq2",
"OPLSS2021.Vale.Block",
"FStar.Pervasiv... | [
"mutual recursion"
] | false | false | true | false | false | let rec increase_fuels (c: list code) (s0: state) (f0: fuel) (sN: state) (fN: fuel)
: Lemma (requires eval_code (Block c) f0 s0 == Some sN /\ f0 <= fN)
(ensures eval_code (Block c) fN s0 == Some sN)
(decreases %[f0;c]) =
| match c with
| [] -> ()
| h :: t ->
let Some s1 = eval_code h f0 s0 in
increase_fuel h s0 f0 s1 fN;
increase_fuels t s1 f0 sN fN | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.increase_fuel | val increase_fuel (c: code) (s0: state) (f0: fuel) (sN: state) (fN: fuel)
: Lemma (requires eval_code c f0 s0 == Some sN /\ f0 <= fN)
(ensures eval_code c fN s0 == Some sN)
(decreases %[f0;c]) | val increase_fuel (c: code) (s0: state) (f0: fuel) (sN: state) (fN: fuel)
: Lemma (requires eval_code c f0 s0 == Some sN /\ f0 <= fN)
(ensures eval_code c fN s0 == Some sN)
(decreases %[f0;c]) | let rec increase_fuel (c:code) (s0:state) (f0:fuel) (sN:state) (fN:fuel)
: Lemma
(requires
eval_code c f0 s0 == Some sN /\
f0 <= fN)
(ensures
eval_code c fN s0 == Some sN)
(decreases %[f0; c])
=
match c with
| Ins ins -> ()
| Block l -> increase_fuels l s0 f0 sN fN
| WhileLessT... | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 34,
"end_line": 180,
"start_col": 0,
"start_line": 146
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
c: OPLSS2021.Vale.code ->
s0: OPLSS2021.Vale.state ->
f0: OPLSS2021.Vale.fuel ->
sN: OPLSS2021.Vale.state ->
fN: OPLSS2021.Vale.fuel
-> FStar.Pervasives.Lemma
(requires OPLSS2021.Vale.eval_code c f0 s0 == FStar.Pervasives.Native.Some sN /\ f0 <= fN)
(ensures OPLSS2021.Vale.eval_code c... | FStar.Pervasives.Lemma | [
"lemma",
""
] | [
"increase_fuel",
"increase_fuels"
] | [
"OPLSS2021.Vale.code",
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.fuel",
"OPLSS2021.Vale.ins",
"Prims.list",
"OPLSS2021.Vale.increase_fuels",
"OPLSS2021.Vale.operand",
"Prims.op_LessThan",
"OPLSS2021.Vale.eval_operand",
"OPLSS2021.Vale.eval_code",
"OPLSS2021.Vale.increase_fuel",
"Prims.op_Subtrac... | [
"mutual recursion"
] | false | false | true | false | false | let rec increase_fuel (c: code) (s0: state) (f0: fuel) (sN: state) (fN: fuel)
: Lemma (requires eval_code c f0 s0 == Some sN /\ f0 <= fN)
(ensures eval_code c fN s0 == Some sN)
(decreases %[f0;c]) =
| match c with
| Ins ins -> ()
| Block l -> increase_fuels l s0 f0 sN fN
| WhileLessThan src1 src2 body ->
if eval_operand src1 s0 < eval_operand src2 s0
then
match eval_code body f0 s0 with
| None -> ()
| Some s1 ->
increase_fuel body s0 f0 s1 fN;
increase_fuel c s1 (f0 - 1) sN (fN - 1) | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.lemma_merge | val lemma_merge (c: code) (cs: list code) (s0: state) (f0: fuel) (sM: state) (fM: fuel) (sN: state)
: Pure fuel
(requires eval_code c f0 s0 == Some sM /\ eval_code (Block cs) fM sM == Some sN)
(ensures fun fN -> eval_code (Block (c :: cs)) fN s0 == Some sN) | val lemma_merge (c: code) (cs: list code) (s0: state) (f0: fuel) (sM: state) (fM: fuel) (sN: state)
: Pure fuel
(requires eval_code c f0 s0 == Some sM /\ eval_code (Block cs) fM sM == Some sN)
(ensures fun fN -> eval_code (Block (c :: cs)) fN s0 == Some sN) | let lemma_merge (c:code) (cs:list code) (s0:state) (f0:fuel) (sM:state) (fM:fuel) (sN:state)
: Pure fuel
(requires
eval_code c f0 s0 == Some sM /\
eval_code (Block cs) fM sM == Some sN)
(ensures fun fN ->
eval_code (Block (c::cs)) fN s0 == Some sN)
= let f = if f0 > fM then f0 else fM in
... | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 202,
"start_col": 0,
"start_line": 192
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
c: OPLSS2021.Vale.code ->
cs: Prims.list OPLSS2021.Vale.code ->
s0: OPLSS2021.Vale.state ->
f0: OPLSS2021.Vale.fuel ->
sM: OPLSS2021.Vale.state ->
fM: OPLSS2021.Vale.fuel ->
sN: OPLSS2021.Vale.state
-> Prims.Pure OPLSS2021.Vale.fuel | Prims.Pure | [] | [] | [
"OPLSS2021.Vale.code",
"Prims.list",
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.fuel",
"Prims.unit",
"OPLSS2021.Vale.increase_fuel",
"OPLSS2021.Vale.Block",
"Prims.op_GreaterThan",
"Prims.bool",
"Prims.l_and",
"Prims.eq2",
"FStar.Pervasives.Native.option",
"OPLSS2021.Vale.eval_code",
"FStar.P... | [] | false | false | false | false | false | let lemma_merge (c: code) (cs: list code) (s0: state) (f0: fuel) (sM: state) (fM: fuel) (sN: state)
: Pure fuel
(requires eval_code c f0 s0 == Some sM /\ eval_code (Block cs) fM sM == Some sN)
(ensures fun fN -> eval_code (Block (c :: cs)) fN s0 == Some sN) =
| let f = if f0 > fM then f0 else fM in
increase_fuel c s0 f0 sM f;
increase_fuel (Block cs) sM fM sN f;
f | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.lemma_Move | val lemma_Move (s0: state) (dst src: operand)
: Pure (state & fuel)
(requires OReg? dst)
(ensures
fun (sM, fM) ->
eval_code (Ins (Mov64 dst src)) fM s0 == Some sM /\
eval_operand dst sM == eval_operand src s0 /\ sM == update_state (OReg?.r dst) sM s0) | val lemma_Move (s0: state) (dst src: operand)
: Pure (state & fuel)
(requires OReg? dst)
(ensures
fun (sM, fM) ->
eval_code (Ins (Mov64 dst src)) fM s0 == Some sM /\
eval_operand dst sM == eval_operand src s0 /\ sM == update_state (OReg?.r dst) sM s0) | let lemma_Move (s0:state) (dst:operand) (src:operand)
: Pure (state & fuel)
(requires OReg? dst)
(ensures fun (sM, fM) ->
eval_code (Ins (Mov64 dst src)) fM s0 == Some sM /\
eval_operand dst sM == eval_operand src s0 /\
sM == update_state (OReg?.r dst) sM s0
)
=
let Some sM = eval_code (Ins (Mov... | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 9,
"end_line": 216,
"start_col": 0,
"start_line": 206
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s0: OPLSS2021.Vale.state -> dst: OPLSS2021.Vale.operand -> src: OPLSS2021.Vale.operand
-> Prims.Pure (OPLSS2021.Vale.state * OPLSS2021.Vale.fuel) | Prims.Pure | [] | [] | [
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.operand",
"FStar.Pervasives.Native.Mktuple2",
"OPLSS2021.Vale.fuel",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.option",
"OPLSS2021.Vale.eval_code",
"OPLSS2021.Vale.Ins",
"OPLSS2021.Vale.Mov64",
"Prims.b2t",
"OPLSS2021.Vale.uu___is_OReg",
... | [] | false | false | false | false | false | let lemma_Move (s0: state) (dst src: operand)
: Pure (state & fuel)
(requires OReg? dst)
(ensures
fun (sM, fM) ->
eval_code (Ins (Mov64 dst src)) fM s0 == Some sM /\
eval_operand dst sM == eval_operand src s0 /\ sM == update_state (OReg?.r dst) sM s0) =
| let Some sM = eval_code (Ins (Mov64 dst src)) 0 s0 in
(sM, 0) | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.lemma_Add | val lemma_Add (s0: state) (dst src: operand)
: Pure (state & fuel)
(requires OReg? dst /\ eval_operand dst s0 + eval_operand src s0 < pow2_64)
(ensures
fun (sM, fM) ->
eval_code (Ins (Add64 dst src)) fM s0 == Some sM /\
eval_operand dst sM == eval_operand dst s0 + eval_operan... | val lemma_Add (s0: state) (dst src: operand)
: Pure (state & fuel)
(requires OReg? dst /\ eval_operand dst s0 + eval_operand src s0 < pow2_64)
(ensures
fun (sM, fM) ->
eval_code (Ins (Add64 dst src)) fM s0 == Some sM /\
eval_operand dst sM == eval_operand dst s0 + eval_operan... | let lemma_Add (s0:state) (dst:operand) (src:operand)
: Pure (state & fuel)
(requires OReg? dst /\ eval_operand dst s0 + eval_operand src s0 < pow2_64)
(ensures fun (sM, fM) ->
eval_code (Ins (Add64 dst src)) fM s0 == Some sM /\
eval_operand dst sM == eval_operand dst s0 + eval_operand src s0 /\
sM ==... | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 9,
"end_line": 228,
"start_col": 0,
"start_line": 218
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s0: OPLSS2021.Vale.state -> dst: OPLSS2021.Vale.operand -> src: OPLSS2021.Vale.operand
-> Prims.Pure (OPLSS2021.Vale.state * OPLSS2021.Vale.fuel) | Prims.Pure | [] | [] | [
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.operand",
"FStar.Pervasives.Native.Mktuple2",
"OPLSS2021.Vale.fuel",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.option",
"OPLSS2021.Vale.eval_code",
"OPLSS2021.Vale.Ins",
"OPLSS2021.Vale.Add64",
"Prims.l_and",
"Prims.b2t",
"OPLSS2021.Vale... | [] | false | false | false | false | false | let lemma_Add (s0: state) (dst src: operand)
: Pure (state & fuel)
(requires OReg? dst /\ eval_operand dst s0 + eval_operand src s0 < pow2_64)
(ensures
fun (sM, fM) ->
eval_code (Ins (Add64 dst src)) fM s0 == Some sM /\
eval_operand dst sM == eval_operand dst s0 + eval_operan... | let Some sM = eval_code (Ins (Add64 dst src)) 0 s0 in
(sM, 0) | false |
OPLSS2021.Vale.fst | OPLSS2021.Vale.lemma_Triple | val lemma_Triple (s0: state)
: Pure (state & fuel)
(requires s0 Rax < 100)
(ensures
fun (sM, f0) ->
eval_code (Block codes_Triple) f0 s0 == Some sM /\ sM Rbx == 3 * s0 Rax /\
sM `feq` (update_state Rax sM (update_state Rbx sM s0))) | val lemma_Triple (s0: state)
: Pure (state & fuel)
(requires s0 Rax < 100)
(ensures
fun (sM, f0) ->
eval_code (Block codes_Triple) f0 s0 == Some sM /\ sM Rbx == 3 * s0 Rax /\
sM `feq` (update_state Rax sM (update_state Rbx sM s0))) | let lemma_Triple (s0:state)
: Pure (state & fuel)
(requires
s0 Rax < 100)
(ensures fun (sM, f0) ->
eval_code (Block codes_Triple) f0 s0 == Some sM /\
sM Rbx == 3 * s0 Rax /\
sM `feq` update_state Rax sM (update_state Rbx sM s0)) =
// Naive proof:
let b1 = codes_Triple in
let (s2, f... | {
"file_name": "examples/oplss2021/OPLSS2021.Vale.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 10,
"end_line": 254,
"start_col": 0,
"start_line": 237
} | (*
Copyright 2008-2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": false,
"source_file": "OPLSS2021.Vale.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "OPLSS2021",
"short_module": null
},
{
"abbrev": false,
"full_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s0: OPLSS2021.Vale.state -> Prims.Pure (OPLSS2021.Vale.state * OPLSS2021.Vale.fuel) | Prims.Pure | [] | [] | [
"OPLSS2021.Vale.state",
"OPLSS2021.Vale.fuel",
"FStar.Pervasives.Native.Mktuple2",
"OPLSS2021.Vale.lemma_merge",
"Prims.__proj__Cons__item__hd",
"OPLSS2021.Vale.code",
"FStar.Pervasives.Native.tuple2",
"Prims.list",
"Prims.__proj__Cons__item__tl",
"OPLSS2021.Vale.lemma_Add",
"OPLSS2021.Vale.OReg... | [] | false | false | false | false | false | let lemma_Triple (s0: state)
: Pure (state & fuel)
(requires s0 Rax < 100)
(ensures
fun (sM, f0) ->
eval_code (Block codes_Triple) f0 s0 == Some sM /\ sM Rbx == 3 * s0 Rax /\
sM `feq` (update_state Rax sM (update_state Rbx sM s0))) =
| let b1 = codes_Triple in
let s2, fc2 = lemma_Move s0 (OReg Rbx) (OReg Rax) in
let b2 = Cons?.tl b1 in
let s3, fc3 = lemma_Add s2 (OReg Rax) (OReg Rbx) in
let b3 = Cons?.tl b2 in
let s4, fc4 = lemma_Add s3 (OReg Rbx) (OReg Rax) in
let b4 = Cons?.tl b3 in
let sM, f4 = (s4, 0) in
let f3 = lemma_merge (Cons?.hd b3) b4 s3 f... | false |
Hacl.Bignum.Comparison.fst | Hacl.Bignum.Comparison.bn_is_odd | val bn_is_odd:
#t:limb_t
-> len:size_t{v len > 0}
-> a:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_is_odd (as_seq h0 a)) | val bn_is_odd:
#t:limb_t
-> len:size_t{v len > 0}
-> a:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_is_odd (as_seq h0 a)) | let bn_is_odd #t len a = a.(0ul) &. uint #t 1 | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 45,
"end_line": 35,
"start_col": 0,
"start_line": 35
} | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked",
"Hacl.Bignum.Lib.fst.checke... | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | len: Lib.IntTypes.size_t{Lib.IntTypes.v len > 0} -> a: Hacl.Bignum.Definitions.lbignum t len
-> FStar.HyperStack.ST.Stack (Hacl.Bignum.Definitions.limb t) | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_GreaterThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.Definitions.lbignum",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.SEC",
"Lib.IntTypes.uint",
"Hacl.Bignum.Definitions.limb",
"Lib.... | [] | false | true | false | false | false | let bn_is_odd #t len a =
| a.(0ul) &. uint #t 1 | false |
Hacl.Bignum.Comparison.fst | Hacl.Bignum.Comparison.bn_gt_pow2_mask | val bn_gt_pow2_mask:
#t:limb_t
-> len:size_t{0 < v len /\ bits t * v len <= max_size_t}
-> b:lbignum t len
-> x:size_t{v x < bits t * v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_gt_pow2_mask (as_seq h0 b) (v x)) | val bn_gt_pow2_mask:
#t:limb_t
-> len:size_t{0 < v len /\ bits t * v len <= max_size_t}
-> b:lbignum t len
-> x:size_t{v x < bits t * v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_gt_pow2_mask (as_seq h0 b) (v x)) | let bn_gt_pow2_mask #t len b x =
push_frame ();
let b2 = create len (uint #t 0) in
bn_set_ith_bit len b2 x;
let res = bn_lt_mask len b2 b in
pop_frame ();
res | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 147,
"start_col": 0,
"start_line": 141
} | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked",
"Hacl.Bignum.Lib.fst.checke... | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
len:
Lib.IntTypes.size_t
{ 0 < Lib.IntTypes.v len /\
Lib.IntTypes.bits t * Lib.IntTypes.v len <= Lib.IntTypes.max_size_t } ->
b: Hacl.Bignum.Definitions.lbignum t len ->
x: Lib.IntTypes.size_t{Lib.IntTypes.v x < Lib.IntTypes.bits t * Lib.IntTypes.v len}
-> FStar.HyperStack.ST.Stac... | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Lib.IntTypes.max_size_t",
"Hacl.Bignum.Definitions.lbignu... | [] | false | true | false | false | false | let bn_gt_pow2_mask #t len b x =
| push_frame ();
let b2 = create len (uint #t 0) in
bn_set_ith_bit len b2 x;
let res = bn_lt_mask len b2 b in
pop_frame ();
res | false |
Hacl.Bignum.Comparison.fst | Hacl.Bignum.Comparison.bn_lt_mask | val bn_lt_mask:
#t:limb_t
-> len:size_t
-> a:lbignum t len
-> b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_lt_mask (as_seq h0 a) (as_seq h0 b)) | val bn_lt_mask:
#t:limb_t
-> len:size_t
-> a:lbignum t len
-> b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_lt_mask (as_seq h0 a) (as_seq h0 b)) | let bn_lt_mask #t len a b =
push_frame ();
let acc = create 1ul (uint #t 0) in
[@inline_let]
let refl h i : GTot (limb t) = Lib.Sequence.index (as_seq h acc) 0 in
[@inline_let]
let footprint i = loc acc in
[@inline_let]
let spec h = S.bn_lt_mask_f (as_seq h a) (as_seq h b) in
let h0 = ST.get () in
... | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 6,
"end_line": 107,
"start_col": 0,
"start_line": 86
} | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked",
"Hacl.Bignum.Lib.fst.checke... | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
len: Lib.IntTypes.size_t ->
a: Hacl.Bignum.Definitions.lbignum t len ->
b: Hacl.Bignum.Definitions.lbignum t len
-> FStar.HyperStack.ST.Stack (Hacl.Bignum.Definitions.limb t) | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.Definitions.limb",
"Prims.unit",
"FStar.HyperStack.ST.pop_frame",
"Lib.Buffer.op_Array_Access",
"Lib.Buffer.MUT",
"FStar.UInt32.__uint_to_t",
"Lib.Buffer.loop",
"Hacl.Spec.Bignum.Comparison.b... | [] | false | true | false | false | false | let bn_lt_mask #t len a b =
| push_frame ();
let acc = create 1ul (uint #t 0) in
[@@ inline_let ]let refl h i : GTot (limb t) = Lib.Sequence.index (as_seq h acc) 0 in
[@@ inline_let ]let footprint i = loc acc in
[@@ inline_let ]let spec h = S.bn_lt_mask_f (as_seq h a) (as_seq h b) in
let h0 = ST.get () in
loop h0
len
(S.bn_lt_mask_t t (v len))
... | false |
Hacl.Bignum.Comparison.fst | Hacl.Bignum.Comparison.bn_lt_pow2_mask | val bn_lt_pow2_mask:
#t:limb_t
-> len:size_t{0 < v len /\ bits t * v len <= max_size_t}
-> b:lbignum t len
-> x:size_t{v x < bits t * v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_lt_pow2_mask (as_seq h0 b) (v x)) | val bn_lt_pow2_mask:
#t:limb_t
-> len:size_t{0 < v len /\ bits t * v len <= max_size_t}
-> b:lbignum t len
-> x:size_t{v x < bits t * v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_lt_pow2_mask (as_seq h0 b) (v x)) | let bn_lt_pow2_mask #t len b x =
push_frame ();
let b2 = create len (uint #t 0) in
bn_set_ith_bit len b2 x;
let res = bn_lt_mask len b b2 in
pop_frame ();
res | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 127,
"start_col": 0,
"start_line": 121
} | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked",
"Hacl.Bignum.Lib.fst.checke... | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
len:
Lib.IntTypes.size_t
{ 0 < Lib.IntTypes.v len /\
Lib.IntTypes.bits t * Lib.IntTypes.v len <= Lib.IntTypes.max_size_t } ->
b: Hacl.Bignum.Definitions.lbignum t len ->
x: Lib.IntTypes.size_t{Lib.IntTypes.v x < Lib.IntTypes.bits t * Lib.IntTypes.v len}
-> FStar.HyperStack.ST.Stac... | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Lib.IntTypes.max_size_t",
"Hacl.Bignum.Definitions.lbignu... | [] | false | true | false | false | false | let bn_lt_pow2_mask #t len b x =
| push_frame ();
let b2 = create len (uint #t 0) in
bn_set_ith_bit len b2 x;
let res = bn_lt_mask len b b2 in
pop_frame ();
res | false |
Hacl.Bignum.Comparison.fst | Hacl.Bignum.Comparison.bn_is_zero_mask | val bn_is_zero_mask:
#t:limb_t
-> len:size_t{v len > 0}
-> a:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_is_zero_mask (as_seq h0 a)) | val bn_is_zero_mask:
#t:limb_t
-> len:size_t{v len > 0}
-> a:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_is_zero_mask (as_seq h0 a)) | let bn_is_zero_mask #t len b =
push_frame ();
let bn_zero = create len (uint #t 0) in
let res = bn_eq_mask len b bn_zero in
pop_frame ();
res | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 72,
"start_col": 0,
"start_line": 67
} | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked",
"Hacl.Bignum.Lib.fst.checke... | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | len: Lib.IntTypes.size_t{Lib.IntTypes.v len > 0} -> a: Hacl.Bignum.Definitions.lbignum t len
-> FStar.HyperStack.ST.Stack (Hacl.Bignum.Definitions.limb t) | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_GreaterThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.Definitions.limb",
"Prims.unit",
"FStar.HyperStack.ST.pop_frame",
"Hacl.Bignum.Comparison.bn_e... | [] | false | true | false | false | false | let bn_is_zero_mask #t len b =
| push_frame ();
let bn_zero = create len (uint #t 0) in
let res = bn_eq_mask len b bn_zero in
pop_frame ();
res | false |
Hacl.Bignum.Comparison.fst | Hacl.Bignum.Comparison.bn_eq_mask | val bn_eq_mask:
#t:limb_t
-> len:size_t
-> a:lbignum t len
-> b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_eq_mask (as_seq h0 a) (as_seq h0 b)) | val bn_eq_mask:
#t:limb_t
-> len:size_t
-> a:lbignum t len
-> b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_eq_mask (as_seq h0 a) (as_seq h0 b)) | let bn_eq_mask #t len a b =
push_frame ();
let mask = create 1ul (ones t SEC) in
let mask = Lib.ByteBuffer.buf_eq_mask a b len mask in
pop_frame ();
mask | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 6,
"end_line": 54,
"start_col": 0,
"start_line": 49
} | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked",
"Hacl.Bignum.Lib.fst.checke... | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
len: Lib.IntTypes.size_t ->
a: Hacl.Bignum.Definitions.lbignum t len ->
b: Hacl.Bignum.Definitions.lbignum t len
-> FStar.HyperStack.ST.Stack (Hacl.Bignum.Definitions.limb t) | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.Definitions.limb",
"Prims.unit",
"FStar.HyperStack.ST.pop_frame",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Lib.ByteBuffer.buf_eq_mask",
"Lib.Buffer.lbuffer_t",
"Lib.Buffer.MUT",
"FStar.UI... | [] | false | true | false | false | false | let bn_eq_mask #t len a b =
| push_frame ();
let mask = create 1ul (ones t SEC) in
let mask = Lib.ByteBuffer.buf_eq_mask a b len mask in
pop_frame ();
mask | false |
Hacl.Impl.Curve25519.Finv.fst | Hacl.Impl.Curve25519.Finv.finv3 | val finv3:
#s:field_spec
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 t1 /\ live h0 tmp /\ disjoint t1 tmp /\
(let as0 : felem s = gsub t1 0ul (nlimb s) in
let bs : felem s = gsub t1 (nlimb s) (nlimb s) in
let cs : felem s = gsub t1 (2... | val finv3:
#s:field_spec
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 t1 /\ live h0 tmp /\ disjoint t1 tmp /\
(let as0 : felem s = gsub t1 0ul (nlimb s) in
let bs : felem s = gsub t1 (nlimb s) (nlimb s) in
let cs : felem s = gsub t1 (2... | let finv3 #s t1 tmp =
let h0 = ST.get () in
let a : felem s = sub t1 0ul (nlimb s) in
let b : felem s = sub t1 (nlimb s) (nlimb s) in
let c : felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0 : felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1 : felem_wide s = sub tmp 0ul (nwide s) in
(* 2^200 -... | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 51,
"end_line": 249,
"start_col": 0,
"start_line": 238
} | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | {
"checked_file": "/",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"Hacl.Impl.Curve25519.Fields.Core.fsti... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
t1:
Lib.Buffer.lbuffer (Hacl.Impl.Curve25519.Fields.Core.limb s)
(4ul *! Hacl.Impl.Curve25519.Fields.Core.nlimb s) ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Lib.Buffer.lbuffer",
"Hacl.Impl.Curve25519.Fields.Core.limb",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Curve25519.Fields.Core.nlimb",
"Hacl.Impl.Curve25519.Fields.Core.felem_wide2",
"... | [] | false | true | false | false | false | let finv3 #s t1 tmp =
| let h0 = ST.get () in
let a:felem s = sub t1 0ul (nlimb s) in
let b:felem s = sub t1 (nlimb s) (nlimb s) in
let c:felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0:felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1:felem_wide s = sub tmp 0ul (nwide s) in
fsquare_times #s t0 c tmp1 100ul;
fmul_s #s t0 t0 c tmp;... | false |
Hacl.Impl.Curve25519.Finv.fst | Hacl.Impl.Curve25519.Finv.finv1 | val finv1:
#s:field_spec
-> i:felem s
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 i /\ live h0 t1 /\ live h0 tmp /\
disjoint i t1 /\ disjoint i tmp /\ disjoint t1 tmp /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
modifies (... | val finv1:
#s:field_spec
-> i:felem s
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 i /\ live h0 t1 /\ live h0 tmp /\
disjoint i t1 /\ disjoint i tmp /\ disjoint t1 tmp /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
modifies (... | let finv1 #s i t1 tmp =
let h0 = ST.get () in
let a : felem s = sub t1 0ul (nlimb s) in
let b : felem s = sub t1 (nlimb s) (nlimb s) in
let c : felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0 : felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1 : felem_wide s = sub tmp 0ul (nwide s) in
(* 2 *) ... | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 163,
"start_col": 0,
"start_line": 149
} | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | {
"checked_file": "/",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"Hacl.Impl.Curve25519.Fields.Core.fsti... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
i: Hacl.Impl.Curve25519.Fields.Core.felem s ->
t1:
Lib.Buffer.lbuffer (Hacl.Impl.Curve25519.Fields.Core.limb s)
(4ul *! Hacl.Impl.Curve25519.Fields.Core.nlimb s) ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Lib.Buffer.lbuffer",
"Hacl.Impl.Curve25519.Fields.Core.limb",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Curve25519.Fields.Core.nlimb",
"Hacl.I... | [] | false | true | false | false | false | let finv1 #s i t1 tmp =
| let h0 = ST.get () in
let a:felem s = sub t1 0ul (nlimb s) in
let b:felem s = sub t1 (nlimb s) (nlimb s) in
let c:felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0:felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1:felem_wide s = sub tmp 0ul (nwide s) in
fsquare_times #s a i tmp1 1ul;
fsquare_times #s t0 a tmp... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.mask40 | val mask40:x: uint64{v x == pow2 40 - 1} | val mask40:x: uint64{v x == pow2 40 - 1} | let mask40 : x:uint64{v x == pow2 40 - 1} =
assert_norm (pow2 40 - 1 == 0xffffffffff);
u64 0xffffffffff | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 18,
"end_line": 23,
"start_col": 0,
"start_line": 21
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC {Lib.IntTypes.v x == Prims.pow2 40 - 1} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.u64",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"Prims.op_Subtraction",
"Prims.pow2"
] | [] | false | false | false | false | false | let mask40:x: uint64{v x == pow2 40 - 1} =
| assert_norm (pow2 40 - 1 == 0xffffffffff);
u64 0xffffffffff | false |
Hacl.Impl.Curve25519.Finv.fst | Hacl.Impl.Curve25519.Finv.finv0 | val finv0:
#s:field_spec
-> i:felem s
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h0 ->
live h0 i /\ live h0 t1 /\ live h0 tmp /\
disjoint i t1 /\ disjoint i tmp /\ disjoint t1 tmp /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
... | val finv0:
#s:field_spec
-> i:felem s
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h0 ->
live h0 i /\ live h0 t1 /\ live h0 tmp /\
disjoint i t1 /\ disjoint i tmp /\ disjoint t1 tmp /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
... | let finv0 #s i t1 tmp =
let h0 = ST.get () in
let a : felem s = sub t1 0ul (nlimb s) in
let b : felem s = sub t1 (nlimb s) (nlimb s) in
let c : felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0 : felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
finv1 #s i t1 tmp;
finv2 #s t1 tmp;
finv3 #s t1 tmp;
le... | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 61,
"end_line": 285,
"start_col": 0,
"start_line": 272
} | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | {
"checked_file": "/",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"Hacl.Impl.Curve25519.Fields.Core.fsti... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
i: Hacl.Impl.Curve25519.Fields.Core.felem s ->
t1:
Lib.Buffer.lbuffer (Hacl.Impl.Curve25519.Fields.Core.limb s)
(4ul *! Hacl.Impl.Curve25519.Fields.Core.nlimb s) ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Lib.Buffer.lbuffer",
"Hacl.Impl.Curve25519.Fields.Core.limb",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Curve25519.Fields.Core.nlimb",
"Hacl.I... | [] | false | true | false | false | false | let finv0 #s i t1 tmp =
| let h0 = ST.get () in
let a:felem s = sub t1 0ul (nlimb s) in
let b:felem s = sub t1 (nlimb s) (nlimb s) in
let c:felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0:felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
finv1 #s i t1 tmp;
finv2 #s t1 tmp;
finv3 #s t1 tmp;
let h1 = ST.get () in
assert (fsquare_times_inv h1 t... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.mask56 | val mask56:x: uint64{v x == pow2 56 - 1} | val mask56:x: uint64{v x == pow2 56 - 1} | let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (pow2 56 - 1 == 0xffffffffffffff);
u64 0xffffffffffffff | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 17,
"start_col": 0,
"start_line": 15
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0" | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC {Lib.IntTypes.v x == Prims.pow2 56 - 1} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.u64",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"Prims.op_Subtraction",
"Prims.pow2"
] | [] | false | false | false | false | false | let mask56:x: uint64{v x == pow2 56 - 1} =
| assert_norm (pow2 56 - 1 == 0xffffffffffffff);
u64 0xffffffffffffff | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.make_m | val make_m: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == S.q} | val make_m: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == S.q} | let make_m () =
let m0 = u64 0x12631a5cf5d3ed in
let m1 = u64 0xf9dea2f79cd658 in
let m2 = u64 0x000000000014de in
let m3 = u64 0x00000000000000 in
let m4 = u64 0x00000010000000 in
assert_norm (as_nat5 (m0, m1, m2, m3, m4) == S.q);
(m0, m1, m2, m3, m4) | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 35,
"start_col": 0,
"start_line": 28
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | _: Prims.unit
-> m:
Hacl.Spec.BignumQ.Definitions.qelem5
{ Hacl.Spec.BignumQ.Definitions.qelem_fits5 m (1, 1, 1, 1, 1) /\
Hacl.Spec.BignumQ.Definitions.as_nat5 m == Spec.Ed25519.q } | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"FStar.Pervasives.Native.Mktuple5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.nat",
"Hacl.Spec.BignumQ.Definitions.as_nat5",
"Spec.Ed25519.q",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.int",
"Lib.IntTypes.range",
"Li... | [] | false | false | false | false | false | let make_m () =
| let m0 = u64 0x12631a5cf5d3ed in
let m1 = u64 0xf9dea2f79cd658 in
let m2 = u64 0x000000000014de in
let m3 = u64 0x00000000000000 in
let m4 = u64 0x00000010000000 in
assert_norm (as_nat5 (m0, m1, m2, m3, m4) == S.q);
(m0, m1, m2, m3, m4) | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.subm_step | val subm_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow56 /\ v y <= pow56)
(ensures fun (b, t) ->
v b <= 1 /\ qelem_fits1 t 1 /\
v x - v y == v t - v b * pow56) | val subm_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow56 /\ v y <= pow56)
(ensures fun (b, t) ->
v b <= 1 /\ qelem_fits1 t 1 /\
v x - v y == v t - v b * pow56) | let subm_step x y =
let b = (x -. y) >>. 63ul in
//assert (if v x >= v y then v b == 0 else v b == 1);
let lshift56 = (b <<. 56ul) in
//assert (if v x >= v y then v lshift56 == 0 else v lshift56 == pow56);
//assert (v lshift56 == v b * pow56);
//assert (v ((b <<. 56ul) +! x) == v b * pow56 + v x);
let t =... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 6,
"end_line": 90,
"start_col": 0,
"start_line": 82
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Lib.IntTypes.uint64 -> y: Lib.IntTypes.uint64
-> Prims.Pure (Lib.IntTypes.uint64 * Lib.IntTypes.uint64) | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple2",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Subtraction_Bang",
"Lib.IntTypes.op_Plus_Bang",
"Lib.IntTypes.op_Less_Less_Dot",
"FStar.UInt32.__uint_to_t",
"Lib.IntTypes.op_Greater_Greater_Dot",
"Lib.IntTy... | [] | false | false | false | false | false | let subm_step x y =
| let b = (x -. y) >>. 63ul in
let lshift56 = (b <<. 56ul) in
let t = ((b <<. 56ul) +! x) -! y in
b, t | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.choose | val choose:
b:uint64
-> x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires v b == 0 \/ v b == 1)
(ensures fun z -> if v b = 1 then z == x else z == y) | val choose:
b:uint64
-> x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires v b == 0 \/ v b == 1)
(ensures fun z -> if v b = 1 then z == x else z == y) | let choose b (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
let mask = b -. u64 1 in
let z0 = x0 ^. (mask &. (x0 ^. y0)) in
Lemmas.lemma_choose_step b x0 y0;
let z1 = x1 ^. (mask &. (x1 ^. y1)) in
Lemmas.lemma_choose_step b x1 y1;
let z2 = x2 ^. (mask &. (x2 ^. y2)) in
Lemmas.lemma_choose_step b x2 y2;
let... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 71,
"start_col": 0,
"start_line": 59
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b: Lib.IntTypes.uint64 ->
x: Hacl.Spec.BignumQ.Definitions.qelem5 ->
y: Hacl.Spec.BignumQ.Definitions.qelem5
-> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint64",
"Hacl.Spec.BignumQ.Definitions.qelem5",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple5",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_choose_step",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.... | [] | false | false | false | false | false | let choose b (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
| let mask = b -. u64 1 in
let z0 = x0 ^. (mask &. (x0 ^. y0)) in
Lemmas.lemma_choose_step b x0 y0;
let z1 = x1 ^. (mask &. (x1 ^. y1)) in
Lemmas.lemma_choose_step b x1 y1;
let z2 = x2 ^. (mask &. (x2 ^. y2)) in
Lemmas.lemma_choose_step b x2 y2;
let z3 = x3 ^. (mask &. (x3 ^. y3)) in
Lemmas.lemma_choose_step b x3 y3;
let... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.carry56 | val carry56: x:uint64 ->
Pure (uint64 & uint64)
(requires v x <= pow2 57)
(ensures fun (t, c) ->
v t < pow56 /\ v c <= 2 /\
v x == v c * pow56 + v t) | val carry56: x:uint64 ->
Pure (uint64 & uint64)
(requires v x <= pow2 57)
(ensures fun (t, c) ->
v t < pow56 /\ v c <= 2 /\
v x == v c * pow56 + v t) | let carry56 x =
let carry = x >>. 56ul in
FStar.Math.Lemmas.pow2_minus 57 56;
let t = x &. mask56 in
assert_norm (pow2 56 < pow2 64);
mod_mask_lemma x 56ul;
assert (v (mod_mask #U64 #SEC 56ul) == v mask56);
assert (v t == v x % pow2 56);
assert (v x == v carry * pow2 56 + v t);
t, carry | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 161,
"start_col": 0,
"start_line": 152
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Lib.IntTypes.uint64 -> Prims.Pure (Lib.IntTypes.uint64 * Lib.IntTypes.uint64) | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple2",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Modulus",
"Lib.IntTypes.range_t",
"Lib.IntTypes.... | [] | false | false | false | false | false | let carry56 x =
| let carry = x >>. 56ul in
FStar.Math.Lemmas.pow2_minus 57 56;
let t = x &. mask56 in
assert_norm (pow2 56 < pow2 64);
mod_mask_lemma x 56ul;
assert (v (mod_mask #U64 #SEC 56ul) == v mask56);
assert (v t == v x % pow2 56);
assert (v x == v carry * pow2 56 + v t);
t, carry | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.add2 | val add2:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112)
(ensures fun z ->
v z == v a + v b /\
v z <= pow2 116) | val add2:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112)
(ensures fun z ->
v z == v a + v b /\
v z <= pow2 116) | let add2 a b =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
a +. b | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 8,
"end_line": 266,
"start_col": 0,
"start_line": 262
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Lib.IntTypes.uint128 -> b: Lib.IntTypes.uint128 -> Prims.Pure Lib.IntTypes.uint128 | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint128",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan"
] | [] | false | false | false | false | false | let add2 a b =
| assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
a +. b | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.add3 | val add3:
(a:uint128) -> (b:uint128) -> (c:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 )
(ensures fun z ->
v z == v a + v b + v c /\
v z <= pow2 116) | val add3:
(a:uint128) -> (b:uint128) -> (c:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 )
(ensures fun z ->
v z == v a + v b + v c /\
v z <= pow2 116) | let add3 a b c =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Math.Lemmas.small_mod (v a + v b + v c) (pow2 128);
a +. b +. c | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 13,
"end_line": 282,
"start_col": 0,
"start_line": 276
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Lib.IntTypes.uint128 -> b: Lib.IntTypes.uint128 -> c: Lib.IntTypes.uint128
-> Prims.Pure Lib.IntTypes.uint128 | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint128",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan"
] | [] | false | false | false | false | false | let add3 a b c =
| assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Math.Lemmas.small_mod (v a + v b + v c) (pow2 128);
a +. b +. c | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.add_inner_carry | val add_inner_carry:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a <= pow2 116 /\ v b < pow2 61)
(ensures fun z ->
v z == v a + v b /\
v z < pow2 117) | val add_inner_carry:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a <= pow2 116 /\ v b < pow2 61)
(ensures fun z ->
v z == v a + v b /\
v z < pow2 117) | let add_inner_carry a b =
assert_norm (pow2 116 + pow2 61 < pow2 128);
assert_norm (pow2 116 + pow2 61 < pow2 117);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
a +. b | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 8,
"end_line": 334,
"start_col": 0,
"start_line": 330
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Lib.IntTypes.uint128 -> b: Lib.IntTypes.uint128 -> Prims.Pure Lib.IntTypes.uint128 | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint128",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan"
] | [] | false | false | false | false | false | let add_inner_carry a b =
| assert_norm (pow2 116 + pow2 61 < pow2 128);
assert_norm (pow2 116 + pow2 61 < pow2 117);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
a +. b | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.carry56_wide | val carry56_wide: x:uint128 ->
Pure (uint128 & uint64)
(requires v x < pow2 117)
(ensures fun (c, t) -> v t < pow56 /\ v c < pow2 61 /\
v x - v c * pow56 == v t /\
v c == v x / pow56) | val carry56_wide: x:uint128 ->
Pure (uint128 & uint64)
(requires v x < pow2 117)
(ensures fun (c, t) -> v t < pow56 /\ v c < pow2 61 /\
v x - v c * pow56 == v t /\
v c == v x / pow56) | let carry56_wide x =
let carry = x >>. 56ul in
let t = to_u64 x &. mask56 in
assert_norm (pow2 56 < pow2 64);
Math.Lemmas.lemma_div_lt_nat (v x) 117 56;
mod_mask_lemma (to_u64 x) 56ul;
assert (v (mod_mask #U64 #SEC 56ul) == v mask56);
assert (v t == (v x % pow2 64) % pow2 56);
FStar.Math.Lemmas.pow2... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 209,
"start_col": 0,
"start_line": 198
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Lib.IntTypes.uint128 -> Prims.Pure (Lib.IntTypes.uint128 * Lib.IntTypes.uint64) | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint128",
"FStar.Pervasives.Native.Mktuple2",
"Lib.IntTypes.uint64",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.pow2",
"Lib.IntTypes.U64",
"Prims.op_Mod... | [] | false | false | false | false | false | let carry56_wide x =
| let carry = x >>. 56ul in
let t = to_u64 x &. mask56 in
assert_norm (pow2 56 < pow2 64);
Math.Lemmas.lemma_div_lt_nat (v x) 117 56;
mod_mask_lemma (to_u64 x) 56ul;
assert (v (mod_mask #U64 #SEC 56ul) == v mask56);
assert (v t == (v x % pow2 64) % pow2 56);
FStar.Math.Lemmas.pow2_modulo_modulo_lemma_1 (v x) 56 64;
asser... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.make_mu | val make_mu: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == pow2 512 / S.q} | val make_mu: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == pow2 512 / S.q} | let make_mu m =
let m0 = u64 0x9ce5a30a2c131b in
let m1 = u64 0x215d086329a7ed in
let m2 = u64 0xffffffffeb2106 in
let m3 = u64 0xffffffffffffff in
let m4 = u64 0x00000fffffffff in
assert_norm (as_nat5 (m0, m1, m2, m3, m4) == pow2 512 / S.q);
(m0, m1, m2, m3, m4) | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 47,
"start_col": 0,
"start_line": 40
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | m: Prims.unit
-> m:
Hacl.Spec.BignumQ.Definitions.qelem5
{ Hacl.Spec.BignumQ.Definitions.qelem_fits5 m (1, 1, 1, 1, 1) /\
Hacl.Spec.BignumQ.Definitions.as_nat5 m == Prims.pow2 512 / Spec.Ed25519.q } | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"FStar.Pervasives.Native.Mktuple5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"Hacl.Spec.BignumQ.Definitions.as_nat5",
"Prims.op_Division",
"Prims.pow2",
"Spec.Ed25519.q",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Li... | [] | false | false | false | false | false | let make_mu m =
| let m0 = u64 0x9ce5a30a2c131b in
let m1 = u64 0x215d086329a7ed in
let m2 = u64 0xffffffffeb2106 in
let m3 = u64 0xffffffffffffff in
let m4 = u64 0x00000fffffffff in
assert_norm (as_nat5 (m0, m1, m2, m3, m4) == pow2 512 / S.q);
(m0, m1, m2, m3, m4) | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.mul64_wide_5 | val mul64_wide_5:
(a:uint64) -> (b:uint64) ->
Pure uint128
(requires qelem_fits1 a 1 /\ qelem_fits1 b 1)
(ensures fun z ->
v z == v a * v b /\
v z <= pow2 112 - pow2 57 + 1 /\
v z < pow2 112) | val mul64_wide_5:
(a:uint64) -> (b:uint64) ->
Pure uint128
(requires qelem_fits1 a 1 /\ qelem_fits1 b 1)
(ensures fun z ->
v z == v a * v b /\
v z <= pow2 112 - pow2 57 + 1 /\
v z < pow2 112) | let mul64_wide_5 a b =
let lemma_smaller (a b:uint64) : Lemma
(requires qelem_fits1 a 1 /\ qelem_fits1 b 1)
(ensures v (mul64_wide a b) < pow2 112)
= if v a = 0 || v b = 0 then () else
calc (<) {
v a * v b <: int;
(<) { Math.Lemmas.lemma_mult_le_left (v a) (v b) (pow2 56) }
v a ... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 252,
"start_col": 0,
"start_line": 220
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Lib.IntTypes.uint64 -> b: Lib.IntTypes.uint64 -> Prims.Pure Lib.IntTypes.uint128 | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint64",
"Lib.IntTypes.mul64_wide",
"Prims.unit",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.l_and",
"Prims.b2t",
"Hacl.Spec.BignumQ.Definitions.qelem_fits1",
"Prims.squash",
"Prims.op_LessThanOrEqual",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Prims.o... | [] | false | false | false | false | false | let mul64_wide_5 a b =
| let lemma_smaller (a b: uint64)
: Lemma (requires qelem_fits1 a 1 /\ qelem_fits1 b 1) (ensures v (mul64_wide a b) < pow2 112) =
if v a = 0 || v b = 0
then ()
else
calc ( < ) {
v a * v b <: int;
( < ) { Math.Lemmas.lemma_mult_le_left (v a) (v b) (pow2 56) }
v a * pow2 56;
( < ) { Ma... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.add4 | val add4:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d /\
v z <= pow2 116) | val add4:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d /\
v z <= pow2 116) | let add4 a b c d =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Mat... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 18,
"end_line": 300,
"start_col": 0,
"start_line": 292
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Lib.IntTypes.uint128 ->
b: Lib.IntTypes.uint128 ->
c: Lib.IntTypes.uint128 ->
d: Lib.IntTypes.uint128
-> Prims.Pure Lib.IntTypes.uint128 | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint128",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan"
] | [] | false | false | false | false | false | let add4 a b c d =
| assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Math.Lemmas.small_mod (v a + v b +... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.add_modq5 | val add_modq5:
x:qelem5
-> y:qelem5
-> Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < S.q /\ as_nat5 y < S.q)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (as_nat5 x + as_nat5 y) % S.q) | val add_modq5:
x:qelem5
-> y:qelem5
-> Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < S.q /\ as_nat5 y < S.q)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (as_nat5 x + as_nat5 y) % S.q) | let add_modq5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
assert_norm (pow56 - 1 + pow56 - 1 == pow2 57 - 2);
let (t0, c0) = carry56 (x0 +! y0) in
let (t1, c1) = carry56 (x1 +! y1 +! c0) in
let (t2, c2) = carry56 (x2 +! y2 +! c1) in
let (t3, c3) = carry56 (x3 +! y3 +! c2) in
let t4 = x4 +! y4 +! c3 in
ass... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 187,
"start_col": 0,
"start_line": 177
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Hacl.Spec.BignumQ.Definitions.qelem5 -> y: Hacl.Spec.BignumQ.Definitions.qelem5
-> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | Prims.Pure | [] | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem5",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_add_modq5",
"Hacl.Spec.BignumQ.Mul.subm_conditional",
"Prims._assert",
"Prims.eq2",... | [] | false | false | false | false | false | let add_modq5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
| assert_norm (pow56 - 1 + pow56 - 1 == pow2 57 - 2);
let t0, c0 = carry56 (x0 +! y0) in
let t1, c1 = carry56 (x1 +! y1 +! c0) in
let t2, c2 = carry56 (x2 +! y2 +! c1) in
let t3, c3 = carry56 (x3 +! y3 +! c2) in
let t4 = x4 +! y4 +! c3 in
assert (as_nat5 (t0, t1, t2, t3, t4) == as_nat5 (x0, x1, x2, x3, x4) + as_nat5 (y0,... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.add5 | val add5:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) -> (e:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112 /\ v e < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d + v e/\
v z <= pow2 116) | val add5:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) -> (e:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112 /\ v e < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d + v e/\
v z <= pow2 116) | let add5 a b c d e =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 23,
"end_line": 320,
"start_col": 0,
"start_line": 310
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Lib.IntTypes.uint128 ->
b: Lib.IntTypes.uint128 ->
c: Lib.IntTypes.uint128 ->
d: Lib.IntTypes.uint128 ->
e: Lib.IntTypes.uint128
-> Prims.Pure Lib.IntTypes.uint128 | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint128",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan"
] | [] | false | false | false | false | false | let add5 a b c d e =
| assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 + pow2 112 <= p... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.lemma_mult_distr_3 | val lemma_mult_distr_3 (a b c n: nat)
: Lemma ((a + b - c * pow2 56) * pow2 n == a * pow2 n + b * pow2 n - c * pow2 (n + 56)) | val lemma_mult_distr_3 (a b c n: nat)
: Lemma ((a + b - c * pow2 56) * pow2 n == a * pow2 n + b * pow2 n - c * pow2 (n + 56)) | let lemma_mult_distr_3 (a b c:nat) (n:nat) : Lemma
((a + b - c * pow2 56) * pow2 n == a * pow2 n + b * pow2 n - c * pow2 (n + 56))
=
Math.Lemmas.distributivity_sub_left (a + b) (c * pow2 56) (pow2 n);
Math.Lemmas.distributivity_add_left a b (pow2 n);
Math.Lemmas.pow2_plus 56 n | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 353,
"start_col": 0,
"start_line": 348
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Prims.nat -> b: Prims.nat -> c: Prims.nat -> n: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
(a + b - c * Prims.pow2 56) * Prims.pow2 n ==
a * Prims.pow2 n + b * Prims.pow2 n - c * Prims.pow2 (n + 56)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"FStar.Math.Lemmas.pow2_plus",
"Prims.unit",
"FStar.Math.Lemmas.distributivity_add_left",
"Prims.pow2",
"FStar.Math.Lemmas.distributivity_sub_left",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"Prims.op_Subtraction",
"Pri... | [] | true | false | true | false | false | let lemma_mult_distr_3 (a b c n: nat)
: Lemma ((a + b - c * pow2 56) * pow2 n == a * pow2 n + b * pow2 n - c * pow2 (n + 56)) =
| Math.Lemmas.distributivity_sub_left (a + b) (c * pow2 56) (pow2 n);
Math.Lemmas.distributivity_add_left a b (pow2 n);
Math.Lemmas.pow2_plus 56 n | false |
Hacl.Impl.Curve25519.Finv.fst | Hacl.Impl.Curve25519.Finv.finv2 | val finv2:
#s:field_spec
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 t1 /\ live h0 tmp /\ disjoint t1 tmp /\
(let as0 : felem s = gsub t1 0ul (nlimb s) in
let bs : felem s = gsub t1 (nlimb s) (nlimb s) in
fsquare_times_inv h0 as0 /\ f... | val finv2:
#s:field_spec
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 t1 /\ live h0 tmp /\ disjoint t1 tmp /\
(let as0 : felem s = gsub t1 0ul (nlimb s) in
let bs : felem s = gsub t1 (nlimb s) (nlimb s) in
fsquare_times_inv h0 as0 /\ f... | let finv2 #s t1 tmp =
let h0 = ST.get () in
let a : felem s = sub t1 0ul (nlimb s) in
let b : felem s = sub t1 (nlimb s) (nlimb s) in
let c : felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0 : felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1 : felem_wide s = sub tmp 0ul (nwide s) in
(* 2^20 - ... | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 40,
"end_line": 208,
"start_col": 0,
"start_line": 194
} | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | {
"checked_file": "/",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"Hacl.Impl.Curve25519.Fields.Core.fsti... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
t1:
Lib.Buffer.lbuffer (Hacl.Impl.Curve25519.Fields.Core.limb s)
(4ul *! Hacl.Impl.Curve25519.Fields.Core.nlimb s) ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Lib.Buffer.lbuffer",
"Hacl.Impl.Curve25519.Fields.Core.limb",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Curve25519.Fields.Core.nlimb",
"Hacl.Impl.Curve25519.Fields.Core.felem_wide2",
"... | [] | false | true | false | false | false | let finv2 #s t1 tmp =
| let h0 = ST.get () in
let a:felem s = sub t1 0ul (nlimb s) in
let b:felem s = sub t1 (nlimb s) (nlimb s) in
let c:felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0:felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1:felem_wide s = sub tmp 0ul (nwide s) in
fsquare_times #s t0 b tmp1 10ul;
fmul_s #s c t0 b tmp;
f... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.div_248 | val div_248: x:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 x (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 x < pow2 512)
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (wide_as_nat5 x) / pow2 248) | val div_248: x:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 x (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 x < pow2 512)
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (wide_as_nat5 x) / pow2 248) | let div_248 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) =
// x / pow2 248 == (x / pow2 224) / pow2 24
let z0 = div_2_24_step x4 x5 in
let z1 = div_2_24_step x5 x6 in
let z2 = div_2_24_step x6 x7 in
let z3 = div_2_24_step x7 x8 in
let z4 = div_2_24_step x8 x9 in
assert (qelem_fits5 (z0, z1, z2, z3, z4) (1, 1,... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 674,
"start_col": 0,
"start_line": 665
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Hacl.Spec.BignumQ.Definitions.qelem_wide5 -> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | Prims.Pure | [] | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem_wide5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_div248",
"FStar.Pervasives.Native.Mktuple10",
"Prims._assert",
"Hacl.Spec.BignumQ.Definitions.qelem_fits5",
"Prims.nat",
"Lib.IntTypes.int_t",
"Li... | [] | false | false | false | false | false | let div_248 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) =
| let z0 = div_2_24_step x4 x5 in
let z1 = div_2_24_step x5 x6 in
let z2 = div_2_24_step x6 x7 in
let z3 = div_2_24_step x7 x8 in
let z4 = div_2_24_step x8 x9 in
assert (qelem_fits5 (z0, z1, z2, z3, z4) (1, 1, 1, 1, 1));
Lemmas.lemma_div248 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
(z0, z1, z2, z3, z4) | false |
Hacl.Impl.Curve25519.Finv.fst | Hacl.Impl.Curve25519.Finv.finv | val finv:
#s:field_spec
-> o:felem s
-> i:felem s
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h0 ->
live h0 o /\ live h0 i /\ live h0 tmp /\
disjoint o i /\ disjoint i tmp /\
(disjoint o tmp) /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
modifies (loc o |+| l... | val finv:
#s:field_spec
-> o:felem s
-> i:felem s
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h0 ->
live h0 o /\ live h0 i /\ live h0 tmp /\
disjoint o i /\ disjoint i tmp /\
(disjoint o tmp) /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
modifies (loc o |+| l... | let finv #s o i tmp =
push_frame();
let t1 = create (4ul *! nlimb s) (limb_zero s) in
let h0 = ST.get () in
finv0 #s i t1 tmp;
let a : felem s = sub t1 0ul (nlimb s) in
let t0 : felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
(* 2^255 - 21 *) fmul_s #s o t0 a tmp;
let h1 = ST.get () in
assert (feval h1... | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 13,
"end_line": 314,
"start_col": 0,
"start_line": 304
} | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | {
"checked_file": "/",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"Hacl.Impl.Curve25519.Fields.Core.fsti... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
o: Hacl.Impl.Curve25519.Fields.Core.felem s ->
i: Hacl.Impl.Curve25519.Fields.Core.felem s ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Hacl.Impl.Curve25519.Fields.Core.felem_wide2",
"FStar.HyperStack.ST.pop_frame",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Spec.Curve25519.elem",
"Hacl.Impl.Curve25519.Fields.Core.feval",
"Hacl.Spec.Curve25... | [] | false | true | false | false | false | let finv #s o i tmp =
| push_frame ();
let t1 = create (4ul *! nlimb s) (limb_zero s) in
let h0 = ST.get () in
finv0 #s i t1 tmp;
let a:felem s = sub t1 0ul (nlimb s) in
let t0:felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
fmul_s #s o t0 a tmp;
let h1 = ST.get () in
assert (feval h1 o == S.finv (feval h0 i));
pop_frame () | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.div_2_24_step | val div_2_24_step: x:uint64 -> y:uint64 ->
Pure uint64
(requires v x < pow56 /\ v y < pow56)
(ensures fun r -> v r < pow56 /\
v r == v x / pow2 24 + pow2 32 * (v y % pow2 24)) | val div_2_24_step: x:uint64 -> y:uint64 ->
Pure uint64
(requires v x < pow56 /\ v y < pow56)
(ensures fun r -> v r < pow56 /\
v r == v x / pow2 24 + pow2 32 * (v y % pow2 24)) | let div_2_24_step x y =
let y' = (y &. u64 0xffffff) <<. 32ul in
assert_norm (pow2 24 - 1 = 0xffffff);
assert_norm (pow2 24 < pow2 64);
mod_mask_lemma y 24ul;
assert (v (mod_mask #U64 #SEC 24ul) == 0xffffff);
assert (v (y &. u64 0xffffff) == v y % pow2 24);
assert (v y' == (v y % pow2 24) * pow2 32);
le... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 652,
"start_col": 0,
"start_line": 638
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Lib.IntTypes.uint64 -> y: Lib.IntTypes.uint64 -> Prims.Pure Lib.IntTypes.uint64 | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint64",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.op_Addition",
"Prims.op_Division",
"Prims.pow2",
"FStar.Mul.op_Star",
"Prims.op_Modulus",
"Lib.IntTypes.logor_disjoint",
"Lib.IntTypes.int_t",
... | [] | false | false | false | false | false | let div_2_24_step x y =
| let y' = (y &. u64 0xffffff) <<. 32ul in
assert_norm (pow2 24 - 1 = 0xffffff);
assert_norm (pow2 24 < pow2 64);
mod_mask_lemma y 24ul;
assert (v (mod_mask #U64 #SEC 24ul) == 0xffffff);
assert (v (y &. u64 0xffffff) == v y % pow2 24);
assert (v y' == (v y % pow2 24) * pow2 32);
let x' = x >>. 24ul in
FStar.Math.Lemmas.p... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.subm_conditional | val subm_conditional: x:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
(if as_nat5 x >= S.q then as_nat5 r == as_nat5 x - S.q else as_nat5 r == as_nat5 x)) | val subm_conditional: x:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
(if as_nat5 x >= S.q then as_nat5 r == as_nat5 x - S.q else as_nat5 r == as_nat5 x)) | let subm_conditional (x0, x1, x2, x3, x4) =
let (y0, y1, y2, y3, y4) = make_m () in
let (b0, t0) = subm_step x0 y0 in
assert (v x0 - v y0 == v t0 - v b0 * pow56);
let (b1, t1) = subm_step x1 (y1 +! b0) in
assert (v x1 - v y1 - v b0 == v t1 - v b1 * pow56);
let (b2, t2) = subm_step x2 (y2 +! b1) in
assert ... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 141,
"start_col": 0,
"start_line": 102
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Hacl.Spec.BignumQ.Definitions.qelem5 -> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | Prims.Pure | [] | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Prims._assert",
"Prims.op_GreaterThanOrEqual",
"Hacl.Spec.BignumQ.Definitions.as_nat5",
"Spec.Ed25519.q",
"Prims.l_and",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes... | [] | false | false | false | false | false | let subm_conditional (x0, x1, x2, x3, x4) =
| let y0, y1, y2, y3, y4 = make_m () in
let b0, t0 = subm_step x0 y0 in
assert (v x0 - v y0 == v t0 - v b0 * pow56);
let b1, t1 = subm_step x1 (y1 +! b0) in
assert (v x1 - v y1 - v b0 == v t1 - v b1 * pow56);
let b2, t2 = subm_step x2 (y2 +! b1) in
assert (v x2 - v y2 - v b1 == v t2 - v b2 * pow56);
let b3, t3 = subm_ste... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.mod_264 | val mod_264: t:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 t (1, 1, 1, 1, 1, 1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (wide_as_nat5 t) % pow2 264) | val mod_264: t:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 t (1, 1, 1, 1, 1, 1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (wide_as_nat5 t) % pow2 264) | let mod_264 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) =
Lemmas.lemma_mod_264 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
(t0, t1, t2, t3, t4 &. mask40) | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 733,
"start_col": 0,
"start_line": 731
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | t: Hacl.Spec.BignumQ.Definitions.qelem_wide5 -> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | Prims.Pure | [] | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem_wide5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Hacl.Spec.BignumQ.Mul.mask40",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_mod_264",
"FStar.Pervasives.Native.Mktuple10",
... | [] | false | false | false | false | false | let mod_264 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) =
| Lemmas.lemma_mod_264 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
(t0, t1, t2, t3, t4 &. mask40) | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.div_264 | val div_264: x:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 x (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 x < pow2 528)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (wide_as_nat5 x) / pow2 264) | val div_264: x:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 x (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 x < pow2 528)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (wide_as_nat5 x) / pow2 264) | let div_264 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) =
// x / pow2 264 == (x / pow2 224) / pow2 40
let z0 = div_2_40_step x4 x5 in
let z1 = div_2_40_step x5 x6 in
let z2 = div_2_40_step x6 x7 in
let z3 = div_2_40_step x7 x8 in
let z4 = div_2_40_step x8 x9 in
assert (qelem_fits5 (z0, z1, z2, z3, z4) (1, 1,... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 719,
"start_col": 0,
"start_line": 710
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Hacl.Spec.BignumQ.Definitions.qelem_wide5 -> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | Prims.Pure | [] | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem_wide5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_div264",
"FStar.Pervasives.Native.Mktuple10",
"Prims._assert",
"Hacl.Spec.BignumQ.Definitions.qelem_fits5",
"Prims.nat",
"Lib.IntTypes.int_t",
"Li... | [] | false | false | false | false | false | let div_264 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) =
| let z0 = div_2_40_step x4 x5 in
let z1 = div_2_40_step x5 x6 in
let z2 = div_2_40_step x6 x7 in
let z3 = div_2_40_step x7 x8 in
let z4 = div_2_40_step x8 x9 in
assert (qelem_fits5 (z0, z1, z2, z3, z4) (1, 1, 1, 1, 1));
Lemmas.lemma_div264 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
(z0, z1, z2, z3, z4) | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.div_2_40_step | val div_2_40_step: x:uint64 -> y:uint64 ->
Pure uint64
(requires v x < pow56)
(ensures fun z -> v z < pow56 /\
v z == v x / pow2 40 + pow2 16 * (v y % pow2 40)) | val div_2_40_step: x:uint64 -> y:uint64 ->
Pure uint64
(requires v x < pow56)
(ensures fun z -> v z < pow56 /\
v z == v x / pow2 40 + pow2 16 * (v y % pow2 40)) | let div_2_40_step x y =
let y' = (y &. mask40) <<. 16ul in
assert_norm (pow2 40 < pow2 64);
mod_mask_lemma y 40ul;
assert (v (mod_mask #U64 #SEC 40ul) == v mask40);
assert (v y' == (v y % pow2 40) * pow2 16);
let x' = x >>. 40ul in
FStar.Math.Lemmas.pow2_minus 56 40;
assert (v x' == v x / pow2 40);
a... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 697,
"start_col": 0,
"start_line": 684
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Lib.IntTypes.uint64 -> y: Lib.IntTypes.uint64 -> Prims.Pure Lib.IntTypes.uint64 | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint64",
"Prims.unit",
"Lib.IntTypes.logor_disjoint",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.int_t",
"Lib.IntTypes.op_Bar_Dot",
"Prims._assert",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Prims.pow2",
"Prims.eq2",
"Prims.int",
"Prims.op_Division",
... | [] | false | false | false | false | false | let div_2_40_step x y =
| let y' = (y &. mask40) <<. 16ul in
assert_norm (pow2 40 < pow2 64);
mod_mask_lemma y 40ul;
assert (v (mod_mask #U64 #SEC 40ul) == v mask40);
assert (v y' == (v y % pow2 40) * pow2 16);
let x' = x >>. 40ul in
FStar.Math.Lemmas.pow2_minus 56 40;
assert (v x' == v x / pow2 40);
assert (v x' < pow2 16);
let z = x' |. y' in... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.mul_modq5 | val mul_modq5: x:qelem5 -> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < pow2 256 /\
as_nat5 y < pow2 256)
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % S.q) | val mul_modq5: x:qelem5 -> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < pow2 256 /\
as_nat5 y < pow2 256)
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % S.q) | let mul_modq5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
let (r0, r1, r2, r3, r4, r5, r6, r7, r8, r9) = mul_5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) in
Lemmas.lemma_mul_lt (as_nat5 (x0, x1, x2, x3, x4)) (pow2 256) (as_nat5 (y0, y1, y2, y3, y4)) (pow2 256);
assert_norm (pow2 256 * pow2 256 = pow2 512);
let (... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 862,
"start_col": 0,
"start_line": 857
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Hacl.Spec.BignumQ.Definitions.qelem5 -> y: Hacl.Spec.BignumQ.Definitions.qelem5
-> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | Prims.Pure | [] | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem5",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Hacl.Spec.BignumQ.Mul.barrett_reduction5",
"FStar.Pervasives.Native.Mktuple10",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"P... | [] | false | false | false | false | false | let mul_modq5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
| let r0, r1, r2, r3, r4, r5, r6, r7, r8, r9 = mul_5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) in
Lemmas.lemma_mul_lt (as_nat5 (x0, x1, x2, x3, x4))
(pow2 256)
(as_nat5 (y0, y1, y2, y3, y4))
(pow2 256);
assert_norm (pow2 256 * pow2 256 = pow2 512);
let o0, o1, o2, o3, o4 = barrett_reduction5 (r0, r1, r2, r3, r4, r5... | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.subm_last_step | val subm_last_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow2 40 /\ v y <= pow2 40)
(ensures fun (b, t) -> v b <= 1 /\ v t < pow2 40 /\
v x - v y == v t - pow2 40 * v b) | val subm_last_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow2 40 /\ v y <= pow2 40)
(ensures fun (b, t) -> v b <= 1 /\ v t < pow2 40 /\
v x - v y == v t - pow2 40 * v b) | let subm_last_step x y =
assert_norm (pow2 40 < pow2 63);
let b = (x -. y) >>. 63ul in
assert (if v x >= v y then v b == 0 else v b == 1);
let t = ((b <<. 40ul) +! x) -! y in
b, t | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 6,
"end_line": 748,
"start_col": 0,
"start_line": 743
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Lib.IntTypes.uint64 -> y: Lib.IntTypes.uint64
-> Prims.Pure (Lib.IntTypes.uint64 * Lib.IntTypes.uint64) | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple2",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Subtraction_Bang",
"Lib.IntTypes.op_Plus_Bang",
"Lib.IntTypes.op_Less_Less_Dot",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"Prims._assert",
"Prims.op_Greate... | [] | false | false | false | false | false | let subm_last_step x y =
| assert_norm (pow2 40 < pow2 63);
let b = (x -. y) >>. 63ul in
assert (if v x >= v y then v b == 0 else v b == 1);
let t = ((b <<. 40ul) +! x) -! y in
b, t | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.uint8_t | val uint8_t : Prims.eqtype | let uint8_t = U8.t | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 18,
"end_line": 33,
"start_col": 0,
"start_line": 33
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.eqtype | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt8.t"
] | [] | false | false | false | true | false | let uint8_t =
| U8.t | false | |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.uint16_t | val uint16_t : Prims.eqtype | let uint16_t = U16.t | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 20,
"end_line": 34,
"start_col": 0,
"start_line": 34
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.eqtype | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt16.t"
] | [] | false | false | false | true | false | let uint16_t =
| U16.t | false | |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.uint32_t | val uint32_t : Prims.eqtype | let uint32_t = U32.t | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 20,
"end_line": 35,
"start_col": 0,
"start_line": 35
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.eqtype | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt32.t"
] | [] | false | false | false | true | false | let uint32_t =
| U32.t | false | |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_index_t | val serialize_index_t : ok: Prims.bool ->
x: MerkleTree.Low.Serialization.uint32_t ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * Merk... | let serialize_index_t = serialize_uint32_t | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 50,
"end_line": 81,
"start_col": 8,
"start_line": 81
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Serialization.uint32_t ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * MerkleTree.Low.Serializ... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Serialization.serialize_uint32_t"
] | [] | false | true | false | false | false | let serialize_index_t =
| serialize_uint32_t | false | |
Steel.ST.Printf.fst | Steel.ST.Printf.aux | val aux (frags: fragments) (acc: list frag_t) (fp: fragment_printer) : interpret_frags frags acc | val aux (frags: fragments) (acc: list frag_t) (fp: fragment_printer) : interpret_frags frags acc | let rec aux (frags:fragments) (acc:list frag_t) (fp: fragment_printer) : interpret_frags frags acc =
match frags with
| [] ->
let f (l:lift u#0 u#1 unit)
: STT unit (live_frags acc) (fun _ -> live_frags acc)
= fp acc
in
(f <: interpret_frags [] acc)
| Frag s :: rest ->
coerce (aux res... | {
"file_name": "lib/steel/Steel.ST.Printf.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 95,
"end_line": 487,
"start_col": 0,
"start_line": 448
} | (*
Copyright 2008-2022 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Array.fsti.checked",
"Steel.Effect.Common.fsti.checked",
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt16.fsti.checked",
"FStar... | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Steel.ST.Array",
"short_module": "A"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": "Ste... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
frags: Steel.ST.Printf.fragments ->
acc: Prims.list Steel.ST.Printf.frag_t ->
fp: Steel.ST.Printf.fragment_printer
-> Steel.ST.Printf.interpret_frags frags acc | Prims.Tot | [
"total"
] | [] | [
"Steel.ST.Printf.fragments",
"Prims.list",
"Steel.ST.Printf.frag_t",
"Steel.ST.Printf.fragment_printer",
"Steel.ST.Printf.interpret_frags",
"Prims.Nil",
"Steel.ST.Printf.fragment",
"Steel.ST.Printf.lift",
"Prims.unit",
"Steel.ST.Printf.live_frags",
"Steel.Effect.Common.vprop",
"Prims.string",
... | [
"recursion"
] | false | false | false | false | false | let rec aux (frags: fragments) (acc: list frag_t) (fp: fragment_printer) : interpret_frags frags acc =
| match frags with
| [] ->
let f (l: lift u#0 u#1 unit) : STT unit (live_frags acc) (fun _ -> live_frags acc) = fp acc in
(f <: interpret_frags [] acc)
| Frag s :: rest -> coerce (aux rest (Inl s :: acc) fp)
| Interpolate (Base t) :: args ->
let f (x: base_typ_as_type t) : interpret_frags args (Inr (| Base t, Lift ... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.uint64_t | val uint64_t : Prims.eqtype | let uint64_t = U64.t | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 20,
"end_line": 36,
"start_col": 0,
"start_line": 36
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.eqtype | Prims.Tot | [
"total"
] | [] | [
"FStar.UInt64.t"
] | [] | false | false | false | true | false | let uint64_t =
| U64.t | false | |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.uint8_p | val uint8_p : Type0 | let uint8_p = B.buffer uint8_t | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 30,
"end_line": 38,
"start_col": 0,
"start_line": 38
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"LowStar.Buffer.buffer",
"MerkleTree.Low.Serialization.uint8_t"
] | [] | false | false | false | true | true | let uint8_p =
| B.buffer uint8_t | false | |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_offset_t | val serialize_offset_t : ok: Prims.bool ->
x: MerkleTree.Low.Serialization.uint64_t ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * Mer... | let serialize_offset_t = serialize_uint64_t | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 51,
"end_line": 80,
"start_col": 8,
"start_line": 80
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Serialization.uint64_t ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * MerkleTree.Low.Serializ... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Serialization.serialize_uint64_t"
] | [] | false | true | false | false | false | let serialize_offset_t =
| serialize_uint64_t | false | |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.hash_vv_bytes | val hash_vv_bytes
(#hash_size: hash_size_t)
(vv: hash_vv hash_size {V.size_of vv = merkle_tree_size_lg})
: HST.ST uint64_t (requires (fun h0 -> V.live h0 vv)) (ensures (fun h0 _ h1 -> h0 == h1)) | val hash_vv_bytes
(#hash_size: hash_size_t)
(vv: hash_vv hash_size {V.size_of vv = merkle_tree_size_lg})
: HST.ST uint64_t (requires (fun h0 -> V.live h0 vv)) (ensures (fun h0 _ h1 -> h0 == h1)) | let hash_vv_bytes
(#hash_size:hash_size_t)
(vv:hash_vv hash_size {V.size_of vv = merkle_tree_size_lg})
: HST.ST uint64_t
(requires (fun h0 -> V.live h0 vv))
(ensures (fun h0 _ h1 -> h0 == h1))
= hash_vv_bytes_i vv 0ul | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 24,
"end_line": 179,
"start_col": 0,
"start_line": 173
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
vv:
MerkleTree.Low.Datastructures.hash_vv hash_size
{LowStar.Vector.size_of vv = MerkleTree.Low.merkle_tree_size_lg}
-> FStar.HyperStack.ST.ST MerkleTree.Low.Serialization.uint64_t | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"MerkleTree.Low.Datastructures.hash_vv",
"Prims.b2t",
"Prims.op_Equality",
"LowStar.Vector.uint32_t",
"LowStar.Vector.size_of",
"MerkleTree.Low.Datastructures.hash_vec",
"MerkleTree.Low.merkle_tree_size_lg",
"MerkleTree.Low.Serialization.hash_vv_bytes_i",... | [] | false | true | false | false | false | let hash_vv_bytes
(#hash_size: hash_size_t)
(vv: hash_vv hash_size {V.size_of vv = merkle_tree_size_lg})
: HST.ST uint64_t (requires (fun h0 -> V.live h0 vv)) (ensures (fun h0 _ h1 -> h0 == h1)) =
| hash_vv_bytes_i vv 0ul | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.sub_mod_264 | val sub_mod_264: x:qelem5 -> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < pow2 264 /\
as_nat5 y < pow2 264)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
(if as_nat5 x >= as_nat5 y then
as_nat5 z == as_nat5 x - as... | val sub_mod_264: x:qelem5 -> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < pow2 264 /\
as_nat5 y < pow2 264)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
(if as_nat5 x >= as_nat5 y then
as_nat5 z == as_nat5 x - as... | let sub_mod_264 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
let (c1, t0) = subm_step x0 y0 in
assert (v x0 - v y0 == v t0 - v c1 * pow56);
let (c2, t1) = subm_step x1 (y1 +! c1) in
assert (v x1 - v y1 - v c1 == v t1 - v c2 * pow56);
let (c3, t2) = subm_step x2 (y2 +! c2) in
assert (v x2 - v y2 - v c2 == v t... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 798,
"start_col": 0,
"start_line": 766
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Hacl.Spec.BignumQ.Definitions.qelem5 -> y: Hacl.Spec.BignumQ.Definitions.qelem5
-> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | Prims.Pure | [] | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem5",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_sub_mod_264",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Hacl.Spec.BignumQ.Defin... | [] | false | false | false | false | false | let sub_mod_264 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
| let c1, t0 = subm_step x0 y0 in
assert (v x0 - v y0 == v t0 - v c1 * pow56);
let c2, t1 = subm_step x1 (y1 +! c1) in
assert (v x1 - v y1 - v c1 == v t1 - v c2 * pow56);
let c3, t2 = subm_step x2 (y2 +! c2) in
assert (v x2 - v y2 - v c2 == v t2 - v c3 * pow56);
let c4, t3 = subm_step x3 (y3 +! c3) in
assert (v x3 - v y3... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_index_t | val deserialize_index_t : ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.Low.Serializati... | let deserialize_index_t = deserialize_uint32_t | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 54,
"end_line": 266,
"start_col": 8,
"start_line": 266
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.Low.Serialization.uint32_t) * Merkle... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Serialization.deserialize_uint32_t"
] | [] | false | true | false | false | false | let deserialize_index_t =
| deserialize_uint32_t | false | |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_offset_t | val deserialize_offset_t : ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.Low.Serializat... | let deserialize_offset_t = deserialize_uint64_t | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 55,
"end_line": 265,
"start_col": 8,
"start_line": 265
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.Low.Serialization.uint32_t) * Merkle... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Serialization.deserialize_uint64_t"
] | [] | false | true | false | false | false | let deserialize_offset_t =
| deserialize_uint64_t | false | |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_uint16_t | val serialize_uint16_t
(ok: bool)
(x: uint16_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) | val serialize_uint16_t
(ok: bool)
(x: uint16_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) | let serialize_uint16_t (ok:bool) (x:uint16_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint8_t ok (Int.Cast.uint16_to_uint8 (U16.shift_right x 8ul)... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 62,
"end_line": 66,
"start_col": 8,
"start_line": 62
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Serialization.uint16_t ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * MerkleTree.Low.Serializ... | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.bool",
"MerkleTree.Low.Serialization.uint16_t",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"MerkleTree.Low.Serialization.uint8_t",
"LowStar.Buffer.trivial_preorder",
"... | [] | false | true | false | false | false | let serialize_uint16_t
(ok: bool)
(x: uint16_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) =
| let ok, pos = serialize_uint8_t ok (Int.Cast.uint16_to_uint8 (U16.shift_right x 8ul)) buf sz pos in
serialize_uint8_t ok (Int.Cast.uint16_to_uint8 x) buf sz pos | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.u64_add_fits | val u64_add_fits (x y: uint64_t) : Tot (r: bool{r ==> UInt.size (U64.v x + U64.v y) 64}) | val u64_add_fits (x y: uint64_t) : Tot (r: bool{r ==> UInt.size (U64.v x + U64.v y) 64}) | let u64_add_fits (x:uint64_t) (y:uint64_t): Tot (r:bool{r ==> UInt.size (U64.v x + U64.v y) 64}) = uint64_max - x >= y | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 118,
"end_line": 107,
"start_col": 0,
"start_line": 107
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: MerkleTree.Low.Serialization.uint64_t -> y: MerkleTree.Low.Serialization.uint64_t
-> r: Prims.bool{r ==> FStar.UInt.size (FStar.UInt64.v x + FStar.UInt64.v y) 64} | Prims.Tot | [
"total"
] | [] | [
"MerkleTree.Low.Serialization.uint64_t",
"FStar.Integers.op_Greater_Equals",
"FStar.Integers.Unsigned",
"FStar.Integers.W64",
"FStar.Integers.op_Subtraction",
"MerkleTree.Low.uint64_max",
"Prims.bool",
"Prims.l_imp",
"Prims.b2t",
"FStar.UInt.size",
"FStar.Integers.op_Plus",
"FStar.Integers.Sig... | [] | false | false | false | false | false | let u64_add_fits (x y: uint64_t) : Tot (r: bool{r ==> UInt.size (U64.v x + U64.v y) 64}) =
| uint64_max - x >= y | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_bool | val serialize_bool (ok x: bool) (buf: uint8_p) (sz: uint32_t{B.len buf = sz}) (pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) | val serialize_bool (ok x: bool) (buf: uint8_p) (sz: uint32_t{B.len buf = sz}) (pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) | let serialize_bool (ok:bool) (x:bool) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
B.upd buf pos (if x then 1uy else ... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 52,
"start_col": 8,
"start_line": 45
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: Prims.bool ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * MerkleTree.Low.Serialization.uint32_t) | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.bool",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"MerkleTree.Low.Serialization.uint8_t",
"LowStar.Buffer.trivial_preorder",
"Prims.op_BarBar",
"Prims.op_Negation",
... | [] | false | true | false | false | false | let serialize_bool (ok x: bool) (buf: uint8_p) (sz: uint32_t{B.len buf = sz}) (pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) =
| if not ok || pos >= sz
then (false, 0ul)
else
(B.upd buf pos (if x then 1uy else 0uy);
(true, pos + 1ul)) | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_uint8_t | val serialize_uint8_t
(ok: bool)
(x: uint8_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) | val serialize_uint8_t
(ok: bool)
(x: uint8_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) | let serialize_uint8_t (ok:bool) (x:uint8_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin B.upd buf pos x;
(true, pos ... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 60,
"start_col": 8,
"start_line": 54
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Serialization.uint8_t ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * MerkleTree.Low.Serializa... | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.bool",
"MerkleTree.Low.Serialization.uint8_t",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"LowStar.Buffer.trivial_preorder",
"Prims.op_BarBar",
"Prims.op_Negation",
... | [] | false | true | false | false | false | let serialize_uint8_t
(ok: bool)
(x: uint8_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) =
| if not ok || pos >= sz
then (false, 0ul)
else
(B.upd buf pos x;
(true, pos + 1ul)) | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_uint32_t | val serialize_uint32_t
(ok: bool)
(x: uint32_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) | val serialize_uint32_t
(ok: bool)
(x: uint32_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) | let serialize_uint32_t (ok:bool) (x:uint32_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint16_t ok (Int.Cast.uint32_to_uint16 (U32.shift_right x 16... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 64,
"end_line": 72,
"start_col": 8,
"start_line": 68
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Serialization.uint32_t ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * MerkleTree.Low.Serializ... | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.bool",
"MerkleTree.Low.Serialization.uint32_t",
"MerkleTree.Low.Serialization.uint8_p",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"MerkleTree.Low.Serialization.uint8_t",
"LowStar.Buffer.trivial_preorder",
"MerkleTree.Low.Serialization.serialize_uint... | [] | false | true | false | false | false | let serialize_uint32_t
(ok: bool)
(x: uint32_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) =
| let ok, pos =
serialize_uint16_t ok (Int.Cast.uint32_to_uint16 (U32.shift_right x 16ul)) buf sz pos
in
serialize_uint16_t ok (Int.Cast.uint32_to_uint16 x) buf sz pos | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_uint64_t | val serialize_uint64_t
(ok: bool)
(x: uint64_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) | val serialize_uint64_t
(ok: bool)
(x: uint64_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) | let serialize_uint64_t (ok:bool) (x:uint64_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint32_t ok (Int.Cast.uint64_to_uint32 (U64.shift_right x 32... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 64,
"end_line": 78,
"start_col": 8,
"start_line": 74
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Serialization.uint64_t ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * MerkleTree.Low.Serializ... | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.bool",
"MerkleTree.Low.Serialization.uint64_t",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"MerkleTree.Low.Serialization.uint8_t",
"LowStar.Buffer.trivial_preorder",
"... | [] | false | true | false | false | false | let serialize_uint64_t
(ok: bool)
(x: uint64_t)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1)) =
| let ok, pos =
serialize_uint32_t ok (Int.Cast.uint64_to_uint32 (U64.shift_right x 32ul)) buf sz pos
in
serialize_uint32_t ok (Int.Cast.uint64_to_uint32 x) buf sz pos | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_hash | val serialize_hash
(#hash_size: hash_size_t)
(ok: bool)
(x: hash #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> mo... | val serialize_hash
(#hash_size: hash_size_t)
(ok: bool)
(x: hash #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> mo... | let serialize_hash
(#hash_size:hash_size_t)
(ok:bool) (x:hash #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok |... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 43,
"end_line": 104,
"start_col": 0,
"start_line": 97
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Datastructures.hash ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * MerkleTree.Low.Serializati... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Datastructures.hash",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"MerkleTree.Low.Serialization.uint8_... | [] | false | true | false | false | false | let serialize_hash
(#hash_size: hash_size_t)
(ok: bool)
(x: hash #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> mo... | if not ok || pos >= sz then (false, 0ul) else serialize_hash_i ok x buf sz pos 0ul | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_hash_i | val serialize_hash_i
(#hash_size: hash_size_t)
(ok: bool)
(x: hash #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
(i: uint32_t{i < hash_size})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_siz... | val serialize_hash_i
(#hash_size: hash_size_t)
(ok: bool)
(x: hash #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
(i: uint32_t{i < hash_size})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_siz... | let rec serialize_hash_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < hash_size})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> modifies (B.... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 21,
"end_line": 94,
"start_col": 8,
"start_line": 83
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Datastructures.hash ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t ->
i: MerkleTree.Low.Serialization.uint32_t{i < hash_size}
-> ... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Datastructures.hash",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"MerkleTree.Low.Serialization.uint8_... | [
"recursion"
] | false | true | false | false | false | let rec serialize_hash_i
(#hash_size: hash_size_t)
(ok: bool)
(x: hash #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
(i: uint32_t{i < hash_size})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash... | if not ok || pos >= sz
then (false, 0ul)
else
let b = x.(i) in
let ok, pos = serialize_uint8_t ok (Lib.RawIntTypes.u8_to_UInt8 b) buf sz pos in
let j = i + 1ul in
if j < hash_size then serialize_hash_i #hash_size ok x buf sz pos j else (ok, pos) | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_hash_vec | val serialize_hash_vec
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vec #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV.rv_inv h0 x /\
HS.disjoint ... | val serialize_hash_vec
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vec #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV.rv_inv h0 x /\
HS.disjoint ... | let serialize_hash_vec
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vec #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvreg hash_size) x)))
(ensures (fun h0 _... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 150,
"start_col": 0,
"start_line": 136
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Datastructures.hash_vec ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * MerkleTree.Low.Seriali... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Datastructures.hash_vec",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"MerkleTree.Low.Serialization.ui... | [] | false | true | false | false | false | let serialize_hash_vec
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vec #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV.rv_inv h0 x /\
HS.disjoint ... | if not ok || pos >= sz
then (false, 0ul)
else
let h0 = HST.get () in
let ok, pos = serialize_uint32_t ok (V.size_of x) buf sz pos in
let h1 = HST.get () in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
if ok && V.size_of x > 0ul then serialize_hash_vec_i ok x buf sz pos 0ul else (ok, pos) | false |
FStar.FiniteSet.Ambient.fst | FStar.FiniteSet.Ambient.all_finite_set_facts_ambient | val all_finite_set_facts_ambient:(squash all_finite_set_facts) | val all_finite_set_facts_ambient:(squash all_finite_set_facts) | let all_finite_set_facts_ambient : (squash all_finite_set_facts) =
all_finite_set_facts_lemma () | {
"file_name": "ulib/FStar.FiniteSet.Ambient.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 31,
"end_line": 43,
"start_col": 0,
"start_line": 42
} | (*
Copyright 2008-2021 John Li, Jay Lorch, Rustan Leino, Alex Summers,
Dan Rosen, Nikhil Swamy, Microsoft Research, and contributors to
the Dafny Project
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 c... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.FiniteSet.Base.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.FiniteSet.Ambient.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.FiniteSet.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FiniteSet",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.FiniteSet",
"short_module": null
},
{
"abbrev": false,
"full... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.squash FStar.FiniteSet.Base.all_finite_set_facts | Prims.Tot | [
"total"
] | [] | [
"FStar.FiniteSet.Base.all_finite_set_facts_lemma"
] | [] | false | false | true | true | false | let all_finite_set_facts_ambient:(squash all_finite_set_facts) =
| all_finite_set_facts_lemma () | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_uint64_t | val deserialize_uint64_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint64_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) | val deserialize_uint64_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint64_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) | let deserialize_uint64_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint64_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0UL)
else begin
let ok, pos, b0 = deserialize... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 263,
"start_col": 0,
"start_line": 255
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.Low.Serialization.uint32_t) * Merkle... | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.bool",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.ConstBuffer.length",
"MerkleTree.Low.Serialization.uint... | [] | false | true | false | false | false | let deserialize_uint64_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint64_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) =
| if not ok || pos >= sz
then (false, pos, 0uL)
else
let ok, pos, b0 = deserialize_uint32_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint32_t ok buf sz pos in
(ok, pos, (U64.shift_left (u32_64 b0) 32ul) + u32_64 b1) | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.hash_vv_bytes_i | val hash_vv_bytes_i (#hash_size: hash_size_t) (vv: hash_vv hash_size) (i: uint32_t)
: HST.ST uint64_t (requires (fun h0 -> V.live h0 vv)) (ensures (fun h0 _ h1 -> h0 == h1)) | val hash_vv_bytes_i (#hash_size: hash_size_t) (vv: hash_vv hash_size) (i: uint32_t)
: HST.ST uint64_t (requires (fun h0 -> V.live h0 vv)) (ensures (fun h0 _ h1 -> h0 == h1)) | let rec hash_vv_bytes_i
(#hash_size:hash_size_t)
(vv:hash_vv hash_size)
(i:uint32_t)
: HST.ST uint64_t
(requires (fun h0 -> V.live h0 vv))
(ensures (fun h0 _ h1 -> h0 == h1))
= if i >= V.size_of vv then 4UL
else begin
let vvi = V.index vv i in
let r = hash_vec_bytes vvi in
let rest = hash_vv_... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 170,
"start_col": 0,
"start_line": 153
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | vv: MerkleTree.Low.Datastructures.hash_vv hash_size -> i: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST MerkleTree.Low.Serialization.uint64_t | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"MerkleTree.Low.Datastructures.hash_vv",
"MerkleTree.Low.Serialization.uint32_t",
"FStar.Integers.op_Greater_Equals",
"FStar.Integers.Unsigned",
"FStar.Integers.W32",
"LowStar.Vector.size_of",
"MerkleTree.Low.Datastructures.hash_vec",
"FStar.UInt64.__uint... | [
"recursion"
] | false | true | false | false | false | let rec hash_vv_bytes_i (#hash_size: hash_size_t) (vv: hash_vv hash_size) (i: uint32_t)
: HST.ST uint64_t (requires (fun h0 -> V.live h0 vv)) (ensures (fun h0 _ h1 -> h0 == h1)) =
| if i >= V.size_of vv
then 4uL
else
let vvi = V.index vv i in
let r = hash_vec_bytes vvi in
let rest = hash_vv_bytes_i vv (i + 1ul) in
if u64_add_fits r rest
then
(assert (UInt.size (U64.v r + U64.v rest) 64);
r + rest)
else uint64_max | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_sha_support | val va_codegen_success_Check_sha_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_sha_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_op... | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 14,
"end_line": 152,
"start_col": 0,
"start_line": 144
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.C... | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_... | [] | false | false | false | true | false | let va_codegen_success_Check_sha_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codege... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_uint8_t | val deserialize_uint8_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint8_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) | val deserialize_uint8_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint8_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) | let deserialize_uint8_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint8_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0uy)
else (true, pos + 1ul, CB.index buf pos) | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 42,
"end_line": 230,
"start_col": 0,
"start_line": 226
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.Low.Serialization.uint32_t) * Merkle... | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.bool",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.ConstBuffer.length",
"MerkleTree.Low.Serialization.uint... | [] | false | true | false | false | false | let deserialize_uint8_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint8_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) =
| if not ok || pos >= sz then (false, pos, 0uy) else (true, pos + 1ul, CB.index buf pos) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_aesni_support | val va_codegen_success_Check_aesni_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_aesni_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_... | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 81,
"end_line": 48,
"start_col": 0,
"start_line": 38
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.C... | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_... | [] | false | false | false | true | false | let va_codegen_success_Check_aesni_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codege... | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_aesni_support | val va_code_Check_aesni_support : va_dummy:unit -> Tot va_code | val va_code_Check_aesni_support : va_dummy:unit -> Tot va_code | let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
())... | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 81,
"end_line": 35,
"start_col": 0,
"start_line": 26
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.C... | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Val... | [] | false | false | false | true | false | let va_code_Check_aesni_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_CCons (va_code_Cpuid_AES ())
... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_uint32_t | val deserialize_uint32_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint32_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) | val deserialize_uint32_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint32_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) | let deserialize_uint32_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint32_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0ul)
else begin
let ok, pos, b0 = deserialize... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 252,
"start_col": 0,
"start_line": 244
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.Low.Serialization.uint32_t) * Merkle... | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.bool",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.ConstBuffer.length",
"MerkleTree.Low.Serialization.uint... | [] | false | true | false | false | false | let deserialize_uint32_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint32_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) =
| if not ok || pos >= sz
then (false, pos, 0ul)
else
let ok, pos, b0 = deserialize_uint16_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint16_t ok buf sz pos in
(ok, pos, (U32.shift_left (Int.Cast.uint16_to_uint32 b0) 16ul) + Int.Cast.uint16_to_uint32 b1) | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.barrett_reduction5 | val barrett_reduction5: t:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 t (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 t < pow2 512)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (wide_as_nat5 t) % S.q) | val barrett_reduction5: t:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 t (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 t < pow2 512)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (wide_as_nat5 t) % S.q) | let barrett_reduction5 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) =
let (m0, m1, m2, m3, m4) = make_m () in
let (mu0, mu1, mu2, mu3, mu4) = make_mu () in
let (q0, q1, q2, q3, q4) = div_248 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) in
assert (as_nat5 (q0, q1, q2, q3, q4) == wide_as_nat5 (t0, t1, t2, t3, t4, t5, t6... | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 843,
"start_col": 0,
"start_line": 814
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Perva... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | t: Hacl.Spec.BignumQ.Definitions.qelem_wide5 -> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | Prims.Pure | [] | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem_wide5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_barrett_reduce'",
"Hacl.Spec.BignumQ.Definitions.wide_as_nat5",
"FStar.Pervasives.Native.Mktuple10",
"Hacl.Spec.BignumQ.Definitions.qelem5",
"Hacl.Spe... | [] | false | false | false | false | false | let barrett_reduction5 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) =
| let m0, m1, m2, m3, m4 = make_m () in
let mu0, mu1, mu2, mu3, mu4 = make_mu () in
let q0, q1, q2, q3, q4 = div_248 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) in
assert (as_nat5 (q0, q1, q2, q3, q4) ==
wide_as_nat5 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) / pow2 248);
FStar.Math.Lemmas.lemma_div_lt_nat (wide_as_nat5 (... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_bool | val deserialize_bool
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & bool)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) | val deserialize_bool
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & bool)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) | let deserialize_bool (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & bool)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, false)
else (true, pos + 1ul, (match CB.index buf pos wit... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 81,
"end_line": 223,
"start_col": 0,
"start_line": 219
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST ((Prims.bool * MerkleTree.Low.Serialization.uint32_t) * Prims.bool... | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.bool",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.ConstBuffer.length",
"MerkleTree.Low.Serialization.uint... | [] | false | true | false | false | false | let deserialize_bool
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & bool)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) =
| if not ok || pos >= sz
then (false, pos, false)
else
(true,
pos + 1ul,
(match CB.index buf pos with
| 0uy -> false
| _ -> true)) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_sha_support | val va_code_Check_sha_support : va_dummy:unit -> Tot va_code | val va_code_Check_sha_support : va_dummy:unit -> Tot va_code | let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (... | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 78,
"end_line": 141,
"start_col": 0,
"start_line": 135
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.C... | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Val... | [] | false | false | false | true | false | let va_code_Check_sha_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Cpuid_Sha ())
... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_hash_vec_i | val serialize_hash_vec_i
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vec #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
(i: uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV.... | val serialize_hash_vec_i
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vec #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
(i: uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV.... | let rec serialize_hash_vec_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vec #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ loc_disjoint (B.loc_buffer buf) (loc_rvector x)))
... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 133,
"start_col": 0,
"start_line": 120
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Datastructures.hash_vec ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t ->
i: MerkleTree.Low.Serialization.uint32_t{i < LowStar.Vect... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Datastructures.hash_vec",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"MerkleTree.Low.Serialization.ui... | [
"recursion"
] | false | true | false | false | false | let rec serialize_hash_vec_i
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vec #hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
(i: uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\... | if not ok || pos >= sz
then (false, 0ul)
else
let vi = V.index x i in
let ok, pos = serialize_hash ok vi buf sz pos in
let j = i + 1ul in
if j < V.size_of x then serialize_hash_vec_i ok x buf sz pos j else (ok, pos) | false |
Pulse.Checker.Prover.ElimPure.fst | Pulse.Checker.Prover.ElimPure.elim_pure_head | val elim_pure_head : Pulse.Syntax.Base.term | let elim_pure_head =
let elim_pure_explicit_lid = mk_pulse_lib_core_lid "elim_pure_explicit" in
tm_fvar (as_fv elim_pure_explicit_lid) | {
"file_name": "lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 42,
"end_line": 37,
"start_col": 0,
"start_line": 35
} | (*
Copyright 2023 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Pulse.Typing.Metatheory.fsti.checked",
"Pulse.Typing.Combinators.fsti.checked",
"Pulse.Typing.fst.checked",
"Pulse.Syntax.fst.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"Pulse.Checker.VPropEquiv.fsti.checked... | [
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Reflection.Util",
"short_module": null
},
{
"abbrev": tru... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Pulse.Syntax.Base.term | Prims.Tot | [
"total"
] | [] | [
"Pulse.Syntax.Pure.tm_fvar",
"Pulse.Syntax.Base.as_fv",
"Prims.list",
"Prims.string",
"Pulse.Reflection.Util.mk_pulse_lib_core_lid"
] | [] | false | false | false | true | false | let elim_pure_head =
| let elim_pure_explicit_lid = mk_pulse_lib_core_lid "elim_pure_explicit" in
tm_fvar (as_fv elim_pure_explicit_lid) | false | |
Pulse.Checker.Prover.ElimPure.fst | Pulse.Checker.Prover.ElimPure.elim_pure_head_ty | val elim_pure_head_ty : FStar.Stubs.Reflection.Types.term | let elim_pure_head_ty =
// let open Pulse.Steel.Wrapper in
// let open Steel.Effect.Common in
let squash_p = mk_squash u0 (RT.bound_var 0) in
let pure_p = mk_pure (RT.bound_var 0) in
let post =
mk_abs squash_p R.Q_Explicit (R.pack_ln (R.Tv_FVar (R.pack_fv emp_lid)))
in
let cod = mk_st... | {
"file_name": "lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 9,
"end_line": 50,
"start_col": 0,
"start_line": 39
} | (*
Copyright 2023 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Pulse.Typing.Metatheory.fsti.checked",
"Pulse.Typing.Combinators.fsti.checked",
"Pulse.Typing.fst.checked",
"Pulse.Syntax.fst.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"Pulse.Checker.VPropEquiv.fsti.checked... | [
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Reflection.Util",
"short_module": null
},
{
"abbrev": tru... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | FStar.Stubs.Reflection.Types.term | Prims.Tot | [
"total"
] | [] | [
"Pulse.Reflection.Util.mk_arrow",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Stubs.Reflection.Types.term",
"FStar.Stubs.Reflection.V2.Data.aqualv",
"FStar.Stubs.Reflection.V2.Builtins.pack_ln",
"FStar.Stubs.Reflection.V2.Data.Tv_FVar",
"FStar.Stubs.Reflection.V2.Builtins.pack_fv",
"FStar.Reflection.Co... | [] | false | false | false | true | false | let elim_pure_head_ty =
| let squash_p = mk_squash u0 (RT.bound_var 0) in
let pure_p = mk_pure (RT.bound_var 0) in
let post = mk_abs squash_p R.Q_Explicit (R.pack_ln (R.Tv_FVar (R.pack_fv emp_lid))) in
let cod = mk_stt_ghost_comp u0 squash_p pure_p post in
mk_arrow (R.pack_ln (R.Tv_FVar (R.pack_fv R.prop_qn)), R.Q_Explicit) cod | false | |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_adx_bmi2_support | val va_code_Check_adx_bmi2_support : va_dummy:unit -> Tot va_code | val va_code_Check_adx_bmi2_support : va_dummy:unit -> Tot va_code | let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_... | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 81,
"end_line": 225,
"start_col": 0,
"start_line": 216
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.C... | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Val... | [] | false | false | false | true | false | let va_code_Check_adx_bmi2_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Cpuid_Adx_Bmi2 ())
... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_uint16_t | val deserialize_uint16_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint16_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) | val deserialize_uint16_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint16_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) | let deserialize_uint16_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint16_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0us)
else begin
let ok, pos, b0 = deserialize... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 241,
"start_col": 0,
"start_line": 233
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.Low.Serialization.uint32_t) * Merkle... | FStar.HyperStack.ST.ST | [] | [] | [
"Prims.bool",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.ConstBuffer.length",
"MerkleTree.Low.Serialization.uint... | [] | false | true | false | false | false | let deserialize_uint16_t
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t & uint16_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1)) =
| if not ok || pos >= sz
then (false, pos, 0us)
else
let ok, pos, b0 = deserialize_uint8_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint8_t ok buf sz pos in
(ok, pos, (U16.shift_left (Int.Cast.uint8_to_uint16 b0) 8ul) + Int.Cast.uint8_to_uint16 b1) | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_hash_vv | val serialize_hash_vv
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vv hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV.rv_inv h0 x /\
HS.disjoint (B.... | val serialize_hash_vv
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vv hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV.rv_inv h0 x /\
HS.disjoint (B.... | let serialize_hash_vv
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vv hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvvreg hash_size) x)))
(ensures (fun h0 _ h1... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 216,
"start_col": 0,
"start_line": 202
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Datastructures.hash_vv hash_size ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST (Prims.bool * MerkleTree.Lo... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Datastructures.hash_vv",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"MerkleTree.Low.Serialization.uin... | [] | false | true | false | false | false | let serialize_hash_vv
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vv hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV.rv_inv h0 x /\
HS.disjoint (B.... | if not ok || pos >= sz
then (false, 0ul)
else
let h0 = HST.get () in
let ok, pos = serialize_uint32_t ok (V.size_of x) buf sz pos in
let h1 = HST.get () in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
if (V.size_of x > 0ul) then serialize_hash_vv_i ok x buf sz pos 0ul else (ok, pos) | false |
Pulse.Checker.Prover.ElimPure.fst | Pulse.Checker.Prover.ElimPure.mk_elim_pure | val mk_elim_pure (p: term) : st_term | val mk_elim_pure (p: term) : st_term | let mk_elim_pure (p:term)
: st_term
= let t = Tm_STApp { head = elim_pure_head;
arg_qual = None;
arg = p }
in
wtag (Some STT_Ghost) t | {
"file_name": "lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 27,
"end_line": 68,
"start_col": 0,
"start_line": 62
} | (*
Copyright 2023 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Pulse.Typing.Metatheory.fsti.checked",
"Pulse.Typing.Combinators.fsti.checked",
"Pulse.Typing.fst.checked",
"Pulse.Syntax.fst.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"Pulse.Checker.VPropEquiv.fsti.checked... | [
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Reflection.Util",
"short_module": null
},
{
"abbrev": tru... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | p: Pulse.Syntax.Base.term -> Pulse.Syntax.Base.st_term | Prims.Tot | [
"total"
] | [] | [
"Pulse.Syntax.Base.term",
"Pulse.Typing.wtag",
"FStar.Pervasives.Native.Some",
"Pulse.Syntax.Base.ctag",
"Pulse.Syntax.Base.STT_Ghost",
"Pulse.Syntax.Base.st_term'",
"Pulse.Syntax.Base.Tm_STApp",
"Pulse.Syntax.Base.Mkst_term'__Tm_STApp__payload",
"Pulse.Checker.Prover.ElimPure.elim_pure_head",
"FS... | [] | false | false | false | true | false | let mk_elim_pure (p: term) : st_term =
| let t = Tm_STApp ({ head = elim_pure_head; arg_qual = None; arg = p }) in
wtag (Some STT_Ghost) t | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.serialize_hash_vv_i | val serialize_hash_vv_i
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vv hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
(i: uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV.rv_... | val serialize_hash_vv_i
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vv hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
(i: uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV.rv_... | let rec serialize_hash_vv_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vv hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvvreg has... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 199,
"start_col": 0,
"start_line": 182
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
x: MerkleTree.Low.Datastructures.hash_vv hash_size ->
buf: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.Monotonic.Buffer.len buf = sz} ->
pos: MerkleTree.Low.Serialization.uint32_t ->
i: MerkleTree.Low.Serialization.uint32_t{i < Low... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Datastructures.hash_vv",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.len",
"MerkleTree.Low.Serialization.uin... | [
"recursion"
] | false | true | false | false | false | let rec serialize_hash_vv_i
(#hash_size: hash_size_t)
(ok: bool)
(x: hash_vv hash_size)
(buf: uint8_p)
(sz: uint32_t{B.len buf = sz})
(pos: uint32_t)
(i: uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires
(fun h0 ->
B.live h0 buf /\ RV... | if not ok || pos >= sz
then (false, 0ul)
else
let vi = V.index x i in
let h0 = HST.get () in
let ok, pos = serialize_hash_vec #hash_size ok vi buf sz pos in
let h1 = HST.get () in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
let j = i + 1ul in
if j < V.size_of x then serialize_hash_vv_i #hash_size ok x... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.mt_serialize_path | val mt_serialize_path: #hsz:Ghost.erased hash_size_t -> p:const_path_p -> output:uint8_p -> sz:uint64_t -> HST.ST uint64_t
(requires (fun h0 -> let ncp = CB.cast p in
let phv = B.get h0 ncp 0 in
Path?.hash_size phv = Ghost.reveal hsz /\
path_safe h0... | val mt_serialize_path: #hsz:Ghost.erased hash_size_t -> p:const_path_p -> output:uint8_p -> sz:uint64_t -> HST.ST uint64_t
(requires (fun h0 -> let ncp = CB.cast p in
let phv = B.get h0 ncp 0 in
Path?.hash_size phv = Ghost.reveal hsz /\
path_safe h0... | let mt_serialize_path #hsz p output sz =
let hsz = Path?.hash_size !*(CB.cast p) in
let sz = FStar.Int.Cast.uint64_to_uint32 sz in
let ncp = CB.cast p in
let h0 = HST.get() in
let ok, pos = serialize_uint32_t true hsz output sz 0ul in
let h1 = HST.get() in
let ncpd = !*ncp in
let ok, pos = serialize_has... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 59,
"end_line": 503,
"start_col": 0,
"start_line": 494
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 2,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
p: MerkleTree.Low.const_path_p ->
output: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint64_t
-> FStar.HyperStack.ST.ST MerkleTree.Low.Serialization.uint64_t | FStar.HyperStack.ST.ST | [] | [] | [
"FStar.Ghost.erased",
"MerkleTree.Low.Datastructures.hash_size_t",
"MerkleTree.Low.const_path_p",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint64_t",
"Prims.bool",
"MerkleTree.Low.Serialization.uint32_t",
"FStar.Int.Cast.uint32_to_uint64",
"FStar.UInt64.__uint_to_t",
"... | [] | false | true | false | false | false | let mt_serialize_path #hsz p output sz =
| let hsz = Path?.hash_size !*(CB.cast p) in
let sz = FStar.Int.Cast.uint64_to_uint32 sz in
let ncp = CB.cast p in
let h0 = HST.get () in
let ok, pos = serialize_uint32_t true hsz output sz 0ul in
let h1 = HST.get () in
let ncpd = !*ncp in
let ok, pos = serialize_hash_vec #hsz ok (Path?.hashes ncpd) output sz pos in
if o... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_hash_vec_i | val deserialize_hash_vec_i
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
(res: hash_vec #hash_size)
(i: uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -... | val deserialize_hash_vec_i
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
(res: hash_vec #hash_size)
(i: uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -... | let rec deserialize_hash_vec_i
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t) (res:hash_vec #hash_size) (i:uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> CB.live h0 buf /\ V.live h0 res))
(ensures (fun h0... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 315,
"start_col": 0,
"start_line": 287
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
r: FStar.HyperStack.ST.erid ->
pos: MerkleTree.Low.Serialization.uint32_t ->
res: MerkleTree.Low.Datastructures.hash_vec ->
i... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.ConstBuffe... | [
"recursion"
] | false | true | false | false | false | let rec deserialize_hash_vec_i
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
(res: hash_vec #hash_size)
(i: uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun ... | if not ok || pos >= sz
then (false, pos)
else
let ok, pos, h = deserialize_hash ok buf sz r pos in
if not ok
then (false, pos)
else
(V.assign res i h;
V.loc_vector_within_included res i (i + 1ul);
let j = i + 1ul in
if j < V.size_of res then deserialize_hash_vec_i ok buf sz r pos res j els... | false |
Pulse.Checker.Prover.ElimPure.fst | Pulse.Checker.Prover.ElimPure.is_elim_pure | val is_elim_pure (vp: term) : T.Tac bool | val is_elim_pure (vp: term) : T.Tac bool | let is_elim_pure (vp:term) : T.Tac bool =
match vp.t with
| Tm_Pure {t=Tm_FStar _} -> true
| _ -> false | {
"file_name": "lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 14,
"end_line": 90,
"start_col": 0,
"start_line": 87
} | (*
Copyright 2023 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"Pulse.Typing.Metatheory.fsti.checked",
"Pulse.Typing.Combinators.fsti.checked",
"Pulse.Typing.fst.checked",
"Pulse.Syntax.fst.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"Pulse.Checker.VPropEquiv.fsti.checked... | [
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Reflection.Util",
"short_module": null
},
{
"abbrev": tru... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | vp: Pulse.Syntax.Base.term -> FStar.Tactics.Effect.Tac Prims.bool | FStar.Tactics.Effect.Tac | [] | [] | [
"Pulse.Syntax.Base.term",
"Pulse.Syntax.Base.__proj__Mkterm__item__t",
"Pulse.Syntax.Base.host_term",
"Pulse.Syntax.Base.range",
"Pulse.Syntax.Base.term'",
"Prims.bool"
] | [] | false | true | false | false | false | let is_elim_pure (vp: term) : T.Tac bool =
| match vp.t with
| Tm_Pure { t = Tm_FStar _ } -> true
| _ -> false | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_hash_vv_i | val deserialize_hash_vv_i
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
(res: hash_vv hash_size)
(i: uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires
(fun... | val deserialize_hash_vv_i
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
(res: hash_vv hash_size)
(i: uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires
(fun... | let rec deserialize_hash_vv_i
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t) (res:hash_vv hash_size) (i:uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> CB.live h0 buf /\ V.live h0 res /\
... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 370,
"start_col": 0,
"start_line": 339
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
r: FStar.HyperStack.ST.erid ->
pos: MerkleTree.Low.Serialization.uint32_t ->
res: MerkleTree.Low.Datastructures.hash_vv hash_size... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.ConstBuffe... | [
"recursion"
] | false | true | false | false | false | let rec deserialize_hash_vv_i
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
(res: hash_vv hash_size)
(i: uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires
... | if not ok || pos >= sz
then (false, 0ul)
else
let ok, pos, hv = deserialize_hash_vec ok buf sz r pos in
let h0 = HST.get () in
if not ok
then (false, pos)
else
(V.assign res i hv;
V.loc_vector_within_included res i (i + 1ul);
let j = i + 1ul in
if j = V.size_of res then (true, pos) else ... | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_avx_support | val va_code_Check_avx_support : va_dummy:unit -> Tot va_code | val va_code_Check_avx_support : va_dummy:unit -> Tot va_code | let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (... | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 79,
"end_line": 332,
"start_col": 0,
"start_line": 325
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.C... | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Val... | [] | false | false | false | true | false | let va_code_Check_avx_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_CCons (va_code_Cpuid_Avx ())
... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_hash_vec | val deserialize_hash_vec
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
: HST.ST (bool & uint32_t & hash_vec #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> B.... | val deserialize_hash_vec
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
: HST.ST (bool & uint32_t & hash_vec #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> B.... | let deserialize_hash_vec
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash_vec #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> B.modifies B.loc_none h0 h1))
= let rg = hvreg has... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 336,
"start_col": 0,
"start_line": 318
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
r: FStar.HyperStack.ST.erid ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.L... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.ConstBuffe... | [] | false | true | false | false | false | let deserialize_hash_vec
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
: HST.ST (bool & uint32_t & hash_vec #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> B.... | let rg = hvreg hash_size in
if not ok || pos >= sz
then (false, pos, rg_dummy rg)
else
let ok, pos, n = deserialize_uint32_t ok buf sz pos in
if not ok
then (false, pos, V.alloc_empty hash)
else
if n = 0ul
then (true, pos, V.alloc_empty hash)
else
let hrg = hreg hash_size in
let res = V.... | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_hash | val deserialize_hash
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
: HST.ST (bool & uint32_t & hash #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures
(fun h0 (k, _, h) ... | val deserialize_hash
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
: HST.ST (bool & uint32_t & hash #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures
(fun h0 (k, _, h) ... | let deserialize_hash
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 (k, _, h) h1 -> (k ==> Rgl?.r_inv (hreg hash_size) h1 h) /\
... | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 284,
"start_col": 0,
"start_line": 269
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monoto... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Re... | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abb... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
r: FStar.HyperStack.ST.erid ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.L... | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.ConstBuffe... | [] | false | true | false | false | false | let deserialize_hash
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
: HST.ST (bool & uint32_t & hash #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures
(fun h0 (k, _, h) ... | let rg = hreg hash_size in
if not ok || pos >= sz
then (false, pos, rg_dummy rg)
else
if sz - pos < hash_size
then (false, pos, rg_dummy rg)
else
let hash = rg_alloc rg r in
Lib.RawBuffer.blit (CB.cast buf) pos hash 0ul hash_size;
(true, pos + hash_size, hash) | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.