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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FStar.Int64.fsti | FStar.Int64.lte | val lte (a b: t) : Tot bool | val lte (a b: t) : Tot bool | let lte (a:t) (b:t) : Tot bool = lte #n (v a) (v b) | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 51,
"end_line": 118,
"start_col": 0,
"start_line": 118
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.Int64.t",
"FStar.Int.lte",
"FStar.Int64.n",
"FStar.Int64.v",
"Prims.bool"
] | [] | false | false | false | true | false | let lte (a b: t) : Tot bool =
| lte #n (v a) (v b) | false |
FStar.Int64.fsti | FStar.Int64.op_Plus_Hat | val op_Plus_Hat : a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.Pure FStar.Int64.t | let op_Plus_Hat = add | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 28,
"end_line": 121,
"start_col": 7,
"start_line": 121
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.add"
] | [] | false | false | false | false | false | let op_Plus_Hat =
| add | false | |
FStar.Int64.fsti | FStar.Int64.op_Subtraction_Hat | val op_Subtraction_Hat : a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.Pure FStar.Int64.t | let op_Subtraction_Hat = sub | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 35,
"end_line": 122,
"start_col": 7,
"start_line": 122
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.sub"
] | [] | false | false | false | false | false | let op_Subtraction_Hat =
| sub | false | |
FStar.Int64.fsti | FStar.Int64.op_Star_Hat | val op_Star_Hat : a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.Pure FStar.Int64.t | let op_Star_Hat = mul | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 28,
"end_line": 123,
"start_col": 7,
"start_line": 123
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.mul"
] | [] | false | false | false | false | false | let op_Star_Hat =
| mul | false | |
FStar.Int64.fsti | FStar.Int64.op_Percent_Hat | val op_Percent_Hat : a: FStar.Int64.t -> b: FStar.Int64.t{FStar.Int64.v b <> 0} -> Prims.Pure FStar.Int64.t | let op_Percent_Hat = rem | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 31,
"end_line": 125,
"start_col": 7,
"start_line": 125
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t{FStar.Int64.v b <> 0} -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.rem"
] | [] | false | false | false | false | false | let op_Percent_Hat =
| rem | false | |
FStar.Int64.fsti | FStar.Int64.op_Slash_Hat | val op_Slash_Hat : a: FStar.Int64.t -> b: FStar.Int64.t{FStar.Int64.v b <> 0} -> Prims.Pure FStar.Int64.t | let op_Slash_Hat = div | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 29,
"end_line": 124,
"start_col": 7,
"start_line": 124
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t{FStar.Int64.v b <> 0} -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.div"
] | [] | false | false | false | false | false | let op_Slash_Hat =
| div | false | |
FStar.Int64.fsti | FStar.Int64.op_Hat_Hat | val op_Hat_Hat : x: FStar.Int64.t -> y: FStar.Int64.t -> Prims.Pure FStar.Int64.t | let op_Hat_Hat = logxor | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 30,
"end_line": 126,
"start_col": 7,
"start_line": 126
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> y: FStar.Int64.t -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.logxor"
] | [] | false | false | false | false | false | let op_Hat_Hat =
| logxor | false | |
FStar.Int64.fsti | FStar.Int64.op_Amp_Hat | val op_Amp_Hat : x: FStar.Int64.t -> y: FStar.Int64.t -> Prims.Pure FStar.Int64.t | let op_Amp_Hat = logand | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 30,
"end_line": 127,
"start_col": 7,
"start_line": 127
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> y: FStar.Int64.t -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.logand"
] | [] | false | false | false | false | false | let op_Amp_Hat =
| logand | false | |
C.Loops.fst | C.Loops.total_while_gen | val total_while_gen
(#t: Type)
(#a: (t -> Type))
(tmes: (x: t -> GTot (a x)))
(tinv: (bool -> t -> GTot Type0))
(tcontinue: (t -> Tot bool))
(body:
(x: t
-> Pure t
(requires (tinv true x))
(ensures
(fun y... | val total_while_gen
(#t: Type)
(#a: (t -> Type))
(tmes: (x: t -> GTot (a x)))
(tinv: (bool -> t -> GTot Type0))
(tcontinue: (t -> Tot bool))
(body:
(x: t
-> Pure t
(requires (tinv true x))
(ensures
(fun y... | let rec total_while_gen
(#t: Type)
(#a:t -> Type)
(tmes: (x:t -> GTot (a x)))
(tinv: (bool -> t -> GTot Type0))
(tcontinue: (t -> Tot bool))
(body:
(x: t) ->
Pure t
(requires (tinv true x))
(ensures (fun y ->
tinv (tcontinue y) y /\ (
if tcontinue y then tmes y << tmes x else Tru... | {
"file_name": "krmllib/C.Loops.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 8,
"end_line": 527,
"start_col": 0,
"start_line": 504
} | (* This module exposes a series of combinators; they are modeled using
* higher-order functions and specifications, and extracted, using a
* meta-theoretic argument, to actual C loops. *)
module C.Loops
open FStar.HyperStack.ST
open LowStar.Buffer
open LowStar.BufferOps
module HS = FStar.HyperStack
module HST = FSt... | {
"checked_file": "/",
"dependencies": [
"Spec.Loops.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "Buffer"
},
{
"abbrev": false,
"full_module": "Spec.Loops",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "UInt64"
},
{
"abbrev": true,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
tmes: (x: t -> Prims.GTot (a x)) ->
tinv: (_: Prims.bool -> _: t -> Prims.GTot Type0) ->
tcontinue: (_: t -> Prims.bool) ->
body: (x: t -> Prims.Pure t) ->
x: t
-> Prims.Pure t | Prims.Pure | [
""
] | [] | [
"Prims.bool",
"Prims.l_and",
"Prims.precedes",
"Prims.l_True",
"Prims.logical",
"C.Loops.total_while_gen"
] | [
"recursion"
] | false | false | false | false | false | let rec total_while_gen
(#t: Type)
(#a: (t -> Type))
(tmes: (x: t -> GTot (a x)))
(tinv: (bool -> t -> GTot Type0))
(tcontinue: (t -> Tot bool))
(body:
(x: t
-> Pure t
(requires (tinv true x))
(ensures
(f... | let y = body x in
let continue = tcontinue y in
if continue then total_while_gen tmes tinv tcontinue body y else y | false |
FStar.Int64.fsti | FStar.Int64.op_Bar_Hat | val op_Bar_Hat : x: FStar.Int64.t -> y: FStar.Int64.t -> Prims.Pure FStar.Int64.t | let op_Bar_Hat = logor | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 29,
"end_line": 128,
"start_col": 7,
"start_line": 128
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> y: FStar.Int64.t -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.logor"
] | [] | false | false | false | false | false | let op_Bar_Hat =
| logor | false | |
C.Loops.fst | C.Loops.total_while | val total_while
(#t: Type)
(tmes: (t -> GTot nat))
(tinv: (bool -> t -> GTot Type0))
(body:
(x: t
-> Pure (bool * t)
(requires (tinv true x))
(ensures
(fun (continue, y) ->
tinv continue y /\ ... | val total_while
(#t: Type)
(tmes: (t -> GTot nat))
(tinv: (bool -> t -> GTot Type0))
(body:
(x: t
-> Pure (bool * t)
(requires (tinv true x))
(ensures
(fun (continue, y) ->
tinv continue y /\ ... | let total_while
(#t: Type)
(tmes: (t -> GTot nat))
(tinv: (bool -> t -> GTot Type0))
(body:
(x: t) ->
Pure (bool * t)
(requires (tinv true x))
(ensures (fun (continue, y) ->
tinv continue y /\ (
if continue then tmes y < tmes x else True)
)))
(x: t)
: Pure t
(requires (tinv t... | {
"file_name": "krmllib/C.Loops.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 5,
"end_line": 555,
"start_col": 0,
"start_line": 530
} | (* This module exposes a series of combinators; they are modeled using
* higher-order functions and specifications, and extracted, using a
* meta-theoretic argument, to actual C loops. *)
module C.Loops
open FStar.HyperStack.ST
open LowStar.Buffer
open LowStar.BufferOps
module HS = FStar.HyperStack
module HST = FSt... | {
"checked_file": "/",
"dependencies": [
"Spec.Loops.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "Buffer"
},
{
"abbrev": false,
"full_module": "Spec.Loops",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "UInt64"
},
{
"abbrev": true,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
tmes: (_: t -> Prims.GTot Prims.nat) ->
tinv: (_: Prims.bool -> _: t -> Prims.GTot Type0) ->
body: (x: t -> Prims.Pure (Prims.bool * t)) ->
x: t
-> Prims.Pure t | Prims.Pure | [
""
] | [] | [
"Prims.nat",
"Prims.bool",
"FStar.Pervasives.Native.tuple2",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.l_True",
"Prims.logical",
"C.Loops.total_while_gen",
"Prims.eq2",
"FStar.Pervasives.Native.Mktuple2"
] | [] | false | false | false | false | false | let total_while
(#t: Type)
(tmes: (t -> GTot nat))
(tinv: (bool -> t -> GTot Type0))
(body:
(x: t
-> Pure (bool * t)
(requires (tinv true x))
(ensures
(fun (continue, y) ->
tinv continue y /\ ... | let _, res =
total_while_gen (fun (_, x) -> tmes x)
(fun b (b_, x) -> b == b_ /\ tinv b x)
(fun (x, _) -> x)
(fun (_, x) -> body x)
(true, x)
in
res | false |
FStar.WellFounded.Util.fsti | FStar.WellFounded.Util.top | val top : Type | let top = (b:Type & b) | {
"file_name": "ulib/FStar.WellFounded.Util.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 34,
"start_col": 0,
"start_line": 34
} | (*
Copyright 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.WellFounded.Util.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"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 | Type | Prims.Tot | [
"total"
] | [] | [
"Prims.dtuple2"
] | [] | false | false | false | true | true | let top =
| (b: Type & b) | false | |
FStar.Int64.fsti | FStar.Int64.op_Greater_Greater_Hat | val op_Greater_Greater_Hat : a: FStar.Int64.t -> s: FStar.UInt32.t -> Prims.Pure FStar.Int64.t | let op_Greater_Greater_Hat = shift_right | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 47,
"end_line": 130,
"start_col": 7,
"start_line": 130
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> s: FStar.UInt32.t -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.shift_right"
] | [] | false | false | false | false | false | let op_Greater_Greater_Hat =
| shift_right | false | |
FStar.Int64.fsti | FStar.Int64.op_Less_Less_Hat | val op_Less_Less_Hat : a: FStar.Int64.t -> s: FStar.UInt32.t -> Prims.Pure FStar.Int64.t | let op_Less_Less_Hat = shift_left | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 40,
"end_line": 129,
"start_col": 7,
"start_line": 129
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> s: FStar.UInt32.t -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.shift_left"
] | [] | false | false | false | false | false | let op_Less_Less_Hat =
| shift_left | false | |
Hacl.Hash.MD.fst | Hacl.Hash.MD.len_add32 | val len_add32 (a: hash_alg{not (is_keccak a)})
(prev_len: len_t a)
(input_len: U32.t { (U32.v input_len + len_v a prev_len) `less_than_max_input_length` a }):
x:len_t a { len_v a x = len_v a prev_len + U32.v input_len } | val len_add32 (a: hash_alg{not (is_keccak a)})
(prev_len: len_t a)
(input_len: U32.t { (U32.v input_len + len_v a prev_len) `less_than_max_input_length` a }):
x:len_t a { len_v a x = len_v a prev_len + U32.v input_len } | let len_add32 a prev_len input_len =
let open FStar.Int.Cast.Full in
match a with
| SHA2_224 | SHA2_256 | MD5 | SHA1 | Blake2S ->
assert_norm (pow2 61 < pow2 64);
U64.(prev_len +^ uint32_to_uint64 input_len)
| SHA2_384 | SHA2_512 | Blake2B ->
assert_norm (pow2 125 < pow2 128);
U128.(prev... | {
"file_name": "code/hash/Hacl.Hash.MD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 71,
"end_line": 84,
"start_col": 0,
"start_line": 76
} | module Hacl.Hash.MD
(** The Merkle-Damgård construction. *)
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module Int = Lib.IntTypes
module Lemmas = FStar.Math.Lemmas
module B = LowStar.Buffer
module S = FStar.Seq
module HS = FStar.HyperStack
module ST = FStar.... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.MD.fst.checked",
"Spec.Hash.Lemmas.fsti.checked",
"Spec.Hash.Incremental.fsti.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fst.checked",
"Spec.Agile.Hash.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.chec... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "AH"
},
{
"abbrev": true,
"full_module": "Spec.Hash.Incremental",
"short_module": "HI"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Spec.Hash.Definitions.hash_alg{Prims.op_Negation (Spec.Hash.Definitions.is_keccak a)} ->
prev_len: Spec.Hash.Definitions.len_t a ->
input_len:
FStar.UInt32.t
{ Spec.Hash.Definitions.less_than_max_input_length (FStar.UInt32.v input_len +
Spec.Hash.Definitions.len_v a prev_len)... | Prims.Tot | [
"total"
] | [] | [
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Prims.op_Negation",
"Spec.Hash.Definitions.is_keccak",
"Spec.Hash.Definitions.len_t",
"FStar.UInt32.t",
"Spec.Hash.Definitions.less_than_max_input_length",
"Prims.op_Addition",
"FStar.UInt32.v",
"Spec.Hash.Definitions.len_v",
"FStar.UInt64.op_Plus_... | [] | false | false | false | false | false | let len_add32 a prev_len input_len =
| let open FStar.Int.Cast.Full in
match a with
| SHA2_224
| SHA2_256
| MD5
| SHA1
| Blake2S ->
assert_norm (pow2 61 < pow2 64);
let open U64 in prev_len +^ uint32_to_uint64 input_len
| SHA2_384
| SHA2_512
| Blake2B ->
assert_norm (pow2 125 < pow2 128);
let open U128 in prev_len +^ uint64_to_uint128 (uint32_to_uin... | false |
FStar.Int64.fsti | FStar.Int64.op_Greater_Hat | val op_Greater_Hat : a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | let op_Greater_Hat = gt | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 30,
"end_line": 133,
"start_col": 7,
"start_line": 133
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.Int64.gt"
] | [] | false | false | false | true | false | let op_Greater_Hat =
| gt | false | |
FStar.Int64.fsti | FStar.Int64.op_Equals_Hat | val op_Equals_Hat : a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | let op_Equals_Hat = eq | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 29,
"end_line": 132,
"start_col": 7,
"start_line": 132
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.Int64.eq"
] | [] | false | false | false | true | false | let op_Equals_Hat =
| eq | false | |
FStar.Int64.fsti | FStar.Int64.op_Greater_Equals_Hat | val op_Greater_Equals_Hat : a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | let op_Greater_Equals_Hat = gte | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 38,
"end_line": 134,
"start_col": 7,
"start_line": 134
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.Int64.gte"
] | [] | false | false | false | true | false | let op_Greater_Equals_Hat =
| gte | false | |
C.Loops.fst | C.Loops.in_place_map | val in_place_map:
#a:Type0 ->
b: buffer a ->
l: UInt32.t{ UInt32.v l = Buffer.length b } ->
f:(a -> Tot a) ->
Stack unit
(requires (fun h -> live h b))
(ensures (fun h_1 r h_2 -> modifies (loc_buffer b) h_1 h_2 /\ live h_2 b /\ live h_1 b
/\ (let s1 = as_seq h_1 b in
let s2 = as_seq h_2... | val in_place_map:
#a:Type0 ->
b: buffer a ->
l: UInt32.t{ UInt32.v l = Buffer.length b } ->
f:(a -> Tot a) ->
Stack unit
(requires (fun h -> live h b))
(ensures (fun h_1 r h_2 -> modifies (loc_buffer b) h_1 h_2 /\ live h_2 b /\ live h_1 b
/\ (let s1 = as_seq h_1 b in
let s2 = as_seq h_2... | let in_place_map #a b l f =
let h0 = HST.get() in
let inv (h1: HS.mem) (i: nat): Type0 =
live h1 b /\ modifies (loc_buffer b) h0 h1 /\ i <= UInt32.v l
/\ (forall (j:nat). (j >= i /\ j < UInt32.v l) ==> get h1 b j == get h0 b j)
/\ (forall (j:nat). j < i ==> get h1 b j == f (get h0 b j))
in
let f' (i... | {
"file_name": "krmllib/C.Loops.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 60,
"end_line": 317,
"start_col": 0,
"start_line": 301
} | (* This module exposes a series of combinators; they are modeled using
* higher-order functions and specifications, and extracted, using a
* meta-theoretic argument, to actual C loops. *)
module C.Loops
open FStar.HyperStack.ST
open LowStar.Buffer
open LowStar.BufferOps
module HS = FStar.HyperStack
module HST = FSt... | {
"checked_file": "/",
"dependencies": [
"Spec.Loops.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "Buffer"
},
{
"abbrev": false,
"full_module": "Spec.Loops",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "UInt64"
},
{
"abbrev": true,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b: LowStar.Buffer.buffer a ->
l: FStar.UInt32.t{FStar.UInt32.v l = LowStar.Monotonic.Buffer.length b} ->
f: (_: a -> a)
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"LowStar.Buffer.buffer",
"FStar.UInt32.t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"FStar.UInt.size",
"FStar.UInt32.n",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt32.v",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"FStar.Seq.Base.lemma_eq_intro",... | [] | false | true | false | false | false | let in_place_map #a b l f =
| let h0 = HST.get () in
let inv (h1: HS.mem) (i: nat) : Type0 =
live h1 b /\ modifies (loc_buffer b) h0 h1 /\ i <= UInt32.v l /\
(forall (j: nat). (j >= i /\ j < UInt32.v l) ==> get h1 b j == get h0 b j) /\
(forall (j: nat). j < i ==> get h1 b j == f (get h0 b j))
in
let f' (i: UInt32.t{let open UInt32 in 0 <= v i... | false |
FStar.Int64.fsti | FStar.Int64.op_Less_Hat | val op_Less_Hat : a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | let op_Less_Hat = lt | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 27,
"end_line": 135,
"start_col": 7,
"start_line": 135
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.Int64.lt"
] | [] | false | false | false | true | false | let op_Less_Hat =
| lt | false | |
C.Loops.fst | C.Loops.repeat | val repeat:
#a:Type0 ->
l: UInt32.t ->
f:(s:Seq.seq a{Seq.length s = UInt32.v l} ->
Tot (s':Seq.seq a{Seq.length s' = Seq.length s})) ->
b: buffer a{Buffer.length b = UInt32.v l} ->
max:UInt32.t ->
fc:(b:buffer a{length b = UInt32.v l} ->
Stack unit
(requires (fun h -> live h b))
(ensure... | val repeat:
#a:Type0 ->
l: UInt32.t ->
f:(s:Seq.seq a{Seq.length s = UInt32.v l} ->
Tot (s':Seq.seq a{Seq.length s' = Seq.length s})) ->
b: buffer a{Buffer.length b = UInt32.v l} ->
max:UInt32.t ->
fc:(b:buffer a{length b = UInt32.v l} ->
Stack unit
(requires (fun h -> live h b))
(ensure... | let repeat #a l f b max fc =
let h0 = HST.get() in
let inv (h1: HS.mem) (i: nat): Type0 =
live h1 b /\ modifies (loc_buffer b) h0 h1 /\ i <= UInt32.v max
/\ as_seq h1 b == Spec.Loops.repeat i f (as_seq h0 b)
in
let f' (i:UInt32.t{ UInt32.( 0 <= v i /\ v i < v max ) }): Stack unit
(requires (fun h ->... | {
"file_name": "krmllib/C.Loops.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 20,
"end_line": 410,
"start_col": 0,
"start_line": 396
} | (* This module exposes a series of combinators; they are modeled using
* higher-order functions and specifications, and extracted, using a
* meta-theoretic argument, to actual C loops. *)
module C.Loops
open FStar.HyperStack.ST
open LowStar.Buffer
open LowStar.BufferOps
module HS = FStar.HyperStack
module HST = FSt... | {
"checked_file": "/",
"dependencies": [
"Spec.Loops.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "Buffer"
},
{
"abbrev": false,
"full_module": "Spec.Loops",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "UInt64"
},
{
"abbrev": true,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
l: FStar.UInt32.t ->
f:
(s: FStar.Seq.Base.seq a {FStar.Seq.Base.length s = FStar.UInt32.v l}
-> s': FStar.Seq.Base.seq a {FStar.Seq.Base.length s' = FStar.Seq.Base.length s}) ->
b: LowStar.Buffer.buffer a {LowStar.Monotonic.Buffer.length b = FStar.UInt32.v l} ->
max: FStar.UInt32.t ->
... | FStar.HyperStack.ST.Stack | [] | [] | [
"FStar.UInt32.t",
"FStar.Seq.Base.seq",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"FStar.Seq.Base.length",
"FStar.UInt32.v",
"Prims.nat",
"LowStar.Buffer.buffer",
"LowStar.Monotonic.Buffer.length",
"Lo... | [] | false | true | false | false | false | let repeat #a l f b max fc =
| let h0 = HST.get () in
let inv (h1: HS.mem) (i: nat) : Type0 =
live h1 b /\ modifies (loc_buffer b) h0 h1 /\ i <= UInt32.v max /\
as_seq h1 b == Spec.Loops.repeat i f (as_seq h0 b)
in
let f' (i: UInt32.t{let open UInt32 in 0 <= v i /\ v i < v max})
: Stack unit
(requires (fun h -> inv h (UInt32.v i)))
... | false |
FStar.WellFounded.Util.fsti | FStar.WellFounded.Util.lift_binrel_as_well_founded_relation | val lift_binrel_as_well_founded_relation
(#a: Type u#a)
(#r: binrel u#a u#r a)
(wf_r: well_founded r)
: well_founded_relation u#(a + 1) u#r (top u#a) | val lift_binrel_as_well_founded_relation
(#a: Type u#a)
(#r: binrel u#a u#r a)
(wf_r: well_founded r)
: well_founded_relation u#(a + 1) u#r (top u#a) | let lift_binrel_as_well_founded_relation (#a:Type u#a) (#r:binrel u#a u#r a) (wf_r:well_founded r)
: well_founded_relation u#(a + 1) u#r (top u#a)
= as_well_founded #top #(lift_binrel r) (lift_binrel_well_founded wf_r) | {
"file_name": "ulib/FStar.WellFounded.Util.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 73,
"end_line": 66,
"start_col": 0,
"start_line": 64
} | (*
Copyright 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.WellFounded.Util.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"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 | wf_r: FStar.WellFounded.well_founded r
-> FStar.WellFounded.well_founded_relation FStar.WellFounded.Util.top | Prims.Tot | [
"total"
] | [] | [
"FStar.WellFounded.binrel",
"FStar.WellFounded.well_founded",
"FStar.WellFounded.as_well_founded",
"FStar.WellFounded.Util.top",
"FStar.WellFounded.Util.lift_binrel",
"FStar.WellFounded.Util.lift_binrel_well_founded",
"FStar.WellFounded.well_founded_relation"
] | [] | false | false | false | false | false | let lift_binrel_as_well_founded_relation
(#a: Type u#a)
(#r: binrel u#a u#r a)
(wf_r: well_founded r)
: well_founded_relation u#(a + 1) u#r (top u#a) =
| as_well_founded #top #(lift_binrel r) (lift_binrel_well_founded wf_r) | false |
FStar.Int64.fsti | FStar.Int64.op_Greater_Greater_Greater_Hat | val op_Greater_Greater_Greater_Hat : a: FStar.Int64.t -> s: FStar.UInt32.t -> Prims.Pure FStar.Int64.t | let op_Greater_Greater_Greater_Hat = shift_arithmetic_right | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 66,
"end_line": 131,
"start_col": 7,
"start_line": 131
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> s: FStar.UInt32.t -> Prims.Pure FStar.Int64.t | Prims.Pure | [] | [] | [
"FStar.Int64.shift_arithmetic_right"
] | [] | false | false | false | false | false | let op_Greater_Greater_Greater_Hat =
| shift_arithmetic_right | false | |
C.Loops.fst | C.Loops.in_place_map2 | val in_place_map2:
#a:Type0 -> #b:Type0 ->
in1: buffer a ->
in2: buffer b{disjoint in1 in2} ->
l: UInt32.t{ UInt32.v l = Buffer.length in1 /\ UInt32.v l = Buffer.length in2} ->
f:(a -> b -> Tot a) ->
Stack unit
(requires (fun h -> live h in1 /\ live h in2))
(ensures (fun h_1 r h_2 -> modifies (loc_b... | val in_place_map2:
#a:Type0 -> #b:Type0 ->
in1: buffer a ->
in2: buffer b{disjoint in1 in2} ->
l: UInt32.t{ UInt32.v l = Buffer.length in1 /\ UInt32.v l = Buffer.length in2} ->
f:(a -> b -> Tot a) ->
Stack unit
(requires (fun h -> live h in1 /\ live h in2))
(ensures (fun h_1 r h_2 -> modifies (loc_b... | let in_place_map2 #a #b in1 in2 l f =
let h0 = HST.get() in
let inv (h1: HS.mem) (i: nat): Type0 =
live h1 in1 /\ live h1 in2 /\ modifies (loc_buffer in1) h0 h1 /\ i <= UInt32.v l
/\ (forall (j:nat). (j >= i /\ j < UInt32.v l) ==> get h1 in1 j == get h0 in1 j)
/\ (forall (j:nat). j < i ==> get h1 in1 j ... | {
"file_name": "krmllib/C.Loops.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 81,
"end_line": 357,
"start_col": 0,
"start_line": 340
} | (* This module exposes a series of combinators; they are modeled using
* higher-order functions and specifications, and extracted, using a
* meta-theoretic argument, to actual C loops. *)
module C.Loops
open FStar.HyperStack.ST
open LowStar.Buffer
open LowStar.BufferOps
module HS = FStar.HyperStack
module HST = FSt... | {
"checked_file": "/",
"dependencies": [
"Spec.Loops.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "Buffer"
},
{
"abbrev": false,
"full_module": "Spec.Loops",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "UInt64"
},
{
"abbrev": true,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
in1: LowStar.Buffer.buffer a ->
in2: LowStar.Buffer.buffer b {LowStar.Monotonic.Buffer.disjoint in1 in2} ->
l:
FStar.UInt32.t
{ FStar.UInt32.v l = LowStar.Monotonic.Buffer.length in1 /\
FStar.UInt32.v l = LowStar.Monotonic.Buffer.length in2 } ->
f: (_: a -> _: b -> a)
-> FStar... | FStar.HyperStack.ST.Stack | [] | [] | [
"LowStar.Buffer.buffer",
"LowStar.Monotonic.Buffer.disjoint",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"FStar.UInt.size",
"FStar.UInt32.n",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt32.v",
"LowStar.Mono... | [] | false | true | false | false | false | let in_place_map2 #a #b in1 in2 l f =
| let h0 = HST.get () in
let inv (h1: HS.mem) (i: nat) : Type0 =
live h1 in1 /\ live h1 in2 /\ modifies (loc_buffer in1) h0 h1 /\ i <= UInt32.v l /\
(forall (j: nat). (j >= i /\ j < UInt32.v l) ==> get h1 in1 j == get h0 in1 j) /\
(forall (j: nat). j < i ==> get h1 in1 j == f (get h0 in1 j) (get h0 in2 j))
in
let f... | false |
FStar.Int64.fsti | FStar.Int64.op_Less_Equals_Hat | val op_Less_Equals_Hat : a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | let op_Less_Equals_Hat = lte | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 35,
"end_line": 136,
"start_col": 7,
"start_line": 136
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t -> b: FStar.Int64.t -> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"FStar.Int64.lte"
] | [] | false | false | false | true | false | let op_Less_Equals_Hat =
| lte | false | |
C.Loops.fst | C.Loops.map2 | val map2:
#a:Type0 -> #b:Type0 -> #c:Type0 ->
output: buffer c ->
in1: buffer a{disjoint output in1} -> in2: buffer b{disjoint output in2} ->
l: UInt32.t{ UInt32.v l = Buffer.length output /\ UInt32.v l = Buffer.length in1
/\ UInt32.v l = Buffer.length in2 } ->
f:(a -> b -> Tot c) ->
Stack unit
(re... | val map2:
#a:Type0 -> #b:Type0 -> #c:Type0 ->
output: buffer c ->
in1: buffer a{disjoint output in1} -> in2: buffer b{disjoint output in2} ->
l: UInt32.t{ UInt32.v l = Buffer.length output /\ UInt32.v l = Buffer.length in1
/\ UInt32.v l = Buffer.length in2 } ->
f:(a -> b -> Tot c) ->
Stack unit
(re... | let map2 #a #b #c output in1 in2 l f =
let h0 = HST.get() in
let inv (h1: HS.mem) (i: nat): Type0 =
live h1 output /\ live h1 in1 /\ live h1 in2 /\ modifies (loc_buffer output) h0 h1 /\ i <= UInt32.v l
/\ (forall (j:nat). (j >= i /\ j < UInt32.v l) ==> get h1 output j == get h0 output j)
/\ (forall (j:n... | {
"file_name": "krmllib/C.Loops.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 84,
"end_line": 281,
"start_col": 0,
"start_line": 264
} | (* This module exposes a series of combinators; they are modeled using
* higher-order functions and specifications, and extracted, using a
* meta-theoretic argument, to actual C loops. *)
module C.Loops
open FStar.HyperStack.ST
open LowStar.Buffer
open LowStar.BufferOps
module HS = FStar.HyperStack
module HST = FSt... | {
"checked_file": "/",
"dependencies": [
"Spec.Loops.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "Buffer"
},
{
"abbrev": false,
"full_module": "Spec.Loops",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "UInt64"
},
{
"abbrev": true,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
output: LowStar.Buffer.buffer c ->
in1: LowStar.Buffer.buffer a {LowStar.Monotonic.Buffer.disjoint output in1} ->
in2: LowStar.Buffer.buffer b {LowStar.Monotonic.Buffer.disjoint output in2} ->
l:
FStar.UInt32.t
{ FStar.UInt32.v l = LowStar.Monotonic.Buffer.length output /\
FStar... | FStar.HyperStack.ST.Stack | [] | [] | [
"LowStar.Buffer.buffer",
"LowStar.Monotonic.Buffer.disjoint",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"FStar.UInt.size",
"FStar.UInt32.n",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt32.v",
"LowStar.Mono... | [] | false | true | false | false | false | let map2 #a #b #c output in1 in2 l f =
| let h0 = HST.get () in
let inv (h1: HS.mem) (i: nat) : Type0 =
live h1 output /\ live h1 in1 /\ live h1 in2 /\ modifies (loc_buffer output) h0 h1 /\
i <= UInt32.v l /\
(forall (j: nat). (j >= i /\ j < UInt32.v l) ==> get h1 output j == get h0 output j) /\
(forall (j: nat). j < i ==> get h1 output j == f (get h0... | false |
FStar.WellFounded.Util.fsti | FStar.WellFounded.Util.squash_binrel | val squash_binrel : r: FStar.WellFounded.binrel a -> x: a -> y: a -> Type0 | let squash_binrel (#a:Type) (r:binrel u#a u#r a) (x y:a) = squash (r x y) | {
"file_name": "ulib/FStar.WellFounded.Util.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 73,
"end_line": 93,
"start_col": 0,
"start_line": 93
} | (*
Copyright 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.WellFounded.Util.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"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: FStar.WellFounded.binrel a -> x: a -> y: a -> Type0 | Prims.Tot | [
"total"
] | [] | [
"FStar.WellFounded.binrel",
"Prims.squash"
] | [] | false | false | false | true | true | let squash_binrel (#a: Type) (r: binrel u#a u#r a) (x y: a) =
| squash (r x y) | false | |
FStar.WellFounded.Util.fsti | FStar.WellFounded.Util.lift_binrel_squashed_as_well_founded_relation | val lift_binrel_squashed_as_well_founded_relation
(#a: Type u#a)
(#r: binrel u#a u#r a)
(wf_r: well_founded (squash_binrel r))
: well_founded_relation u#(a + 1) u#0 top | val lift_binrel_squashed_as_well_founded_relation
(#a: Type u#a)
(#r: binrel u#a u#r a)
(wf_r: well_founded (squash_binrel r))
: well_founded_relation u#(a + 1) u#0 top | let lift_binrel_squashed_as_well_founded_relation (#a:Type u#a)
(#r:binrel u#a u#r a)
(wf_r:well_founded (squash_binrel r))
: well_founded_relation u#(a + 1) u#0 top
= as_well_founded #top #(lift_binrel_squashed r) (... | {
"file_name": "ulib/FStar.WellFounded.Util.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 91,
"end_line": 105,
"start_col": 0,
"start_line": 101
} | (*
Copyright 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 agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.WellFounded.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.WellFounded.Util.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.WellFounded",
"short_module": null
},
{
"abbrev": false,
"ful... | {
"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 | wf_r: FStar.WellFounded.well_founded (FStar.WellFounded.Util.squash_binrel r)
-> FStar.WellFounded.well_founded_relation FStar.WellFounded.Util.top | Prims.Tot | [
"total"
] | [] | [
"FStar.WellFounded.binrel",
"FStar.WellFounded.well_founded",
"FStar.WellFounded.Util.squash_binrel",
"FStar.WellFounded.as_well_founded",
"FStar.WellFounded.Util.top",
"FStar.WellFounded.Util.lift_binrel_squashed",
"FStar.WellFounded.Util.lift_binrel_squashed_well_founded",
"FStar.WellFounded.well_fo... | [] | false | false | false | false | false | let lift_binrel_squashed_as_well_founded_relation
(#a: Type u#a)
(#r: binrel u#a u#r a)
(wf_r: well_founded (squash_binrel r))
: well_founded_relation u#(a + 1) u#0 top =
| as_well_founded #top #(lift_binrel_squashed r) (lift_binrel_squashed_well_founded wf_r) | false |
C.Loops.fst | C.Loops.repeat_range | val repeat_range:
#a:Type0 ->
min:UInt32.t ->
max:UInt32.t{UInt32.v min <= UInt32.v max} ->
f: (Ghost.erased (repeat_range_body_spec a (UInt32.v max))) ->
inv: (HS.mem -> GTot Type0) ->
interp: repeat_range_body_interp a inv ->
fc: repeat_range_body_impl min max f inv interp ->
HST.Stack unit
(requi... | val repeat_range:
#a:Type0 ->
min:UInt32.t ->
max:UInt32.t{UInt32.v min <= UInt32.v max} ->
f: (Ghost.erased (repeat_range_body_spec a (UInt32.v max))) ->
inv: (HS.mem -> GTot Type0) ->
interp: repeat_range_body_interp a inv ->
fc: repeat_range_body_impl min max f inv interp ->
HST.Stack unit
(requi... | let repeat_range #a min max f inv interp fc =
let h0 = HST.get() in
let inv' (h1: HS.mem) (i: nat): Type0 =
inv h1 /\
i <= UInt32.v max /\ UInt32.v min <= i /\
interp h1 == Spec.Loops.repeat_range (UInt32.v min) i (Ghost.reveal f) (interp h0)
in
let f' (i:UInt32.t{ UInt32.( 0 <= v i /\ v i < v max )... | {
"file_name": "krmllib/C.Loops.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 21,
"end_line": 501,
"start_col": 0,
"start_line": 486
} | (* This module exposes a series of combinators; they are modeled using
* higher-order functions and specifications, and extracted, using a
* meta-theoretic argument, to actual C loops. *)
module C.Loops
open FStar.HyperStack.ST
open LowStar.Buffer
open LowStar.BufferOps
module HS = FStar.HyperStack
module HST = FSt... | {
"checked_file": "/",
"dependencies": [
"Spec.Loops.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "Buffer"
},
{
"abbrev": false,
"full_module": "Spec.Loops",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "UInt64"
},
{
"abbrev": true,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
min: FStar.UInt32.t ->
max: FStar.UInt32.t{FStar.UInt32.v min <= FStar.UInt32.v max} ->
f: FStar.Ghost.erased (C.Loops.repeat_range_body_spec a (FStar.UInt32.v max)) ->
inv: (_: FStar.Monotonic.HyperStack.mem -> Prims.GTot Type0) ->
interp: C.Loops.repeat_range_body_interp a inv ->
fc: C.Loops.... | FStar.HyperStack.ST.Stack | [] | [] | [
"FStar.UInt32.t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.UInt32.v",
"FStar.Ghost.erased",
"C.Loops.repeat_range_body_spec",
"FStar.Monotonic.HyperStack.mem",
"C.Loops.repeat_range_body_interp",
"C.Loops.repeat_range_body_impl",
"C.Loops.for",
"Prims.unit",
"Spec.Loops.repeat_range_bas... | [] | false | true | false | false | false | let repeat_range #a min max f inv interp fc =
| let h0 = HST.get () in
let inv' (h1: HS.mem) (i: nat) : Type0 =
inv h1 /\ i <= UInt32.v max /\ UInt32.v min <= i /\
interp h1 == Spec.Loops.repeat_range (UInt32.v min) i (Ghost.reveal f) (interp h0)
in
let f' (i: UInt32.t{let open UInt32 in 0 <= v i /\ v i < v max})
: HST.Stack unit
(requires (fun h -> in... | false |
C.Loops.fst | C.Loops.map | val map:
#a:Type0 -> #b:Type0 ->
output: buffer b ->
input: buffer a{disjoint input output} ->
l: UInt32.t{ UInt32.v l = Buffer.length output /\ UInt32.v l = Buffer.length input } ->
f:(a -> Tot b) ->
Stack unit
(requires (fun h -> live h input /\ live h output ))
(ensures (fun h_1 r h_2 -> modifies... | val map:
#a:Type0 -> #b:Type0 ->
output: buffer b ->
input: buffer a{disjoint input output} ->
l: UInt32.t{ UInt32.v l = Buffer.length output /\ UInt32.v l = Buffer.length input } ->
f:(a -> Tot b) ->
Stack unit
(requires (fun h -> live h input /\ live h output ))
(ensures (fun h_1 r h_2 -> modifies... | let map #a #b output input l f =
let h0 = HST.get() in
let inv (h1: HS.mem) (i: nat): Type0 =
live h1 output /\ live h1 input /\ modifies (loc_buffer output) h0 h1 /\ i <= UInt32.v l
/\ (forall (j:nat). (j >= i /\ j < UInt32.v l) ==> get h1 output j == get h0 output j)
/\ (forall (j:nat). j < i ==> get ... | {
"file_name": "krmllib/C.Loops.fst",
"git_rev": "da1e941b2fcb196aa5d1e34941aa00b4c67ac321",
"git_url": "https://github.com/FStarLang/karamel.git",
"project_name": "karamel"
} | {
"end_col": 69,
"end_line": 240,
"start_col": 0,
"start_line": 224
} | (* This module exposes a series of combinators; they are modeled using
* higher-order functions and specifications, and extracted, using a
* meta-theoretic argument, to actual C loops. *)
module C.Loops
open FStar.HyperStack.ST
open LowStar.Buffer
open LowStar.BufferOps
module HS = FStar.HyperStack
module HST = FSt... | {
"checked_file": "/",
"dependencies": [
"Spec.Loops.fst.checked",
"prims.fst.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.... | [
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "Buffer"
},
{
"abbrev": false,
"full_module": "Spec.Loops",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "UInt64"
},
{
"abbrev": true,
"full_module":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
output: LowStar.Buffer.buffer b ->
input: LowStar.Buffer.buffer a {LowStar.Monotonic.Buffer.disjoint input output} ->
l:
FStar.UInt32.t
{ FStar.UInt32.v l = LowStar.Monotonic.Buffer.length output /\
FStar.UInt32.v l = LowStar.Monotonic.Buffer.length input } ->
f: (_: a -> b)
-... | FStar.HyperStack.ST.Stack | [] | [] | [
"LowStar.Buffer.buffer",
"LowStar.Monotonic.Buffer.disjoint",
"LowStar.Buffer.trivial_preorder",
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"FStar.UInt.size",
"FStar.UInt32.n",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt32.v",
"LowStar.Mono... | [] | false | true | false | false | false | let map #a #b output input l f =
| let h0 = HST.get () in
let inv (h1: HS.mem) (i: nat) : Type0 =
live h1 output /\ live h1 input /\ modifies (loc_buffer output) h0 h1 /\ i <= UInt32.v l /\
(forall (j: nat). (j >= i /\ j < UInt32.v l) ==> get h1 output j == get h0 output j) /\
(forall (j: nat). j < i ==> get h1 output j == f (get h0 input j))
in
l... | false |
FStar.Int64.fsti | FStar.Int64.ct_abs | val ct_abs (a: t{min_int n < v a}) : Tot (b: t{v b = abs (v a)}) | val ct_abs (a: t{min_int n < v a}) : Tot (b: t{v b = abs (v a)}) | let ct_abs (a:t{min_int n < v a}) : Tot (b:t{v b = abs (v a)}) =
let mask = a >>>^ UInt32.uint_to_t (n - 1) in
if 0 <= v a then
begin
sign_bit_positive (v a);
nth_lemma (v mask) (FStar.Int.zero _);
logxor_lemma_1 (v a)
end
else
begin
sign_bit_negative (v a);
nth_lemma (v mask) (one... | {
"file_name": "ulib/FStar.Int64.fsti",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 21,
"end_line": 155,
"start_col": 0,
"start_line": 139
} | (*
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.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Int.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.Int64.fsti"
} | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Int",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"sho... | {
"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: FStar.Int64.t{FStar.Int.min_int FStar.Int64.n < FStar.Int64.v a}
-> b: FStar.Int64.t{FStar.Int64.v b = Prims.abs (FStar.Int64.v a)} | Prims.Tot | [
"total"
] | [] | [
"FStar.Int64.t",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Int.min_int",
"FStar.Int64.n",
"FStar.Int64.v",
"FStar.Int64.op_Subtraction_Hat",
"FStar.Int64.op_Hat_Hat",
"Prims.unit",
"Prims.op_LessThanOrEqual",
"FStar.Int.logxor_lemma_1",
"FStar.Int.nth_lemma",
"FStar.Int.zero",
"FStar.Int.si... | [] | false | false | false | false | false | let ct_abs (a: t{min_int n < v a}) : Tot (b: t{v b = abs (v a)}) =
| let mask = a >>>^ UInt32.uint_to_t (n - 1) in
if 0 <= v a
then
(sign_bit_positive (v a);
nth_lemma (v mask) (FStar.Int.zero _);
logxor_lemma_1 (v a))
else
(sign_bit_negative (v a);
nth_lemma (v mask) (ones _);
logxor_lemma_2 (v a);
lognot_negative (v a);
UInt.lemma_lognot_value #n (to_uint (... | false |
Hacl.SHA3.fst | Hacl.SHA3.shake128_hacl | val shake128_hacl:
inputByteLen:size_t
-> input:lbuffer uint8 inputByteLen
-> outputByteLen:size_t
-> output:lbuffer uint8 outputByteLen
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
... | val shake128_hacl:
inputByteLen:size_t
-> input:lbuffer uint8 inputByteLen
-> outputByteLen:size_t
-> output:lbuffer uint8 outputByteLen
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
... | let shake128_hacl inputByteLen input outputByteLen output =
keccak 1344ul 256ul inputByteLen input (byte 0x1F) outputByteLen output | {
"file_name": "code/sha3/Hacl.SHA3.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 73,
"end_line": 34,
"start_col": 0,
"start_line": 33
} | module Hacl.SHA3
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.SHA3
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module S = Spec.SHA3
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0 --usi... | {
"checked_file": "/",
"dependencies": [
"Spec.SHA3.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Impl.SHA3.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives... | [
{
"abbrev": true,
"full_module": "Spec.SHA3",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Ha... | {
"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 |
inputByteLen: Lib.IntTypes.size_t ->
input: Lib.Buffer.lbuffer Lib.IntTypes.uint8 inputByteLen ->
outputByteLen: Lib.IntTypes.size_t ->
output: Lib.Buffer.lbuffer Lib.IntTypes.uint8 outputByteLen
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"Hacl.Impl.SHA3.keccak",
"FStar.UInt32.__uint_to_t",
"Lib.IntTypes.byte",
"Prims.unit"
] | [] | false | true | false | false | false | let shake128_hacl inputByteLen input outputByteLen output =
| keccak 1344ul 256ul inputByteLen input (byte 0x1F) outputByteLen output | false |
Hacl.SHA3.fst | Hacl.SHA3.shake256_hacl | val shake256_hacl:
inputByteLen:size_t
-> input:lbuffer uint8 inputByteLen
-> outputByteLen:size_t
-> output:lbuffer uint8 outputByteLen
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
... | val shake256_hacl:
inputByteLen:size_t
-> input:lbuffer uint8 inputByteLen
-> outputByteLen:size_t
-> output:lbuffer uint8 outputByteLen
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
... | let shake256_hacl inputByteLen input outputByteLen output =
keccak 1088ul 512ul inputByteLen input (byte 0x1F) outputByteLen output | {
"file_name": "code/sha3/Hacl.SHA3.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 73,
"end_line": 49,
"start_col": 0,
"start_line": 48
} | module Hacl.SHA3
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.SHA3
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module S = Spec.SHA3
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0 --usi... | {
"checked_file": "/",
"dependencies": [
"Spec.SHA3.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Impl.SHA3.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives... | [
{
"abbrev": true,
"full_module": "Spec.SHA3",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Ha... | {
"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 |
inputByteLen: Lib.IntTypes.size_t ->
input: Lib.Buffer.lbuffer Lib.IntTypes.uint8 inputByteLen ->
outputByteLen: Lib.IntTypes.size_t ->
output: Lib.Buffer.lbuffer Lib.IntTypes.uint8 outputByteLen
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.IntTypes.size_t",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"Hacl.Impl.SHA3.keccak",
"FStar.UInt32.__uint_to_t",
"Lib.IntTypes.byte",
"Prims.unit"
] | [] | false | true | false | false | false | let shake256_hacl inputByteLen input outputByteLen output =
| keccak 1088ul 512ul inputByteLen input (byte 0x1F) outputByteLen output | false |
Hacl.SHA3.fst | Hacl.SHA3.sha3_384 | val sha3_384:
output:lbuffer uint8 48ul
-> input:buffer_t MUT uint8
-> input_len:size_t{v input_len == length input}
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
as_seq h1 output ... | val sha3_384:
output:lbuffer uint8 48ul
-> input:buffer_t MUT uint8
-> input_len:size_t{v input_len == length input}
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
as_seq h1 output ... | let sha3_384 output input input_len =
keccak 832ul 768ul input_len input (byte 0x06) 48ul output | {
"file_name": "code/sha3/Hacl.SHA3.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 60,
"end_line": 91,
"start_col": 0,
"start_line": 90
} | module Hacl.SHA3
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.SHA3
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module S = Spec.SHA3
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0 --usi... | {
"checked_file": "/",
"dependencies": [
"Spec.SHA3.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Impl.SHA3.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives... | [
{
"abbrev": true,
"full_module": "Spec.SHA3",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Ha... | {
"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 |
output: Lib.Buffer.lbuffer Lib.IntTypes.uint8 48ul ->
input: Lib.Buffer.buffer_t Lib.Buffer.MUT Lib.IntTypes.uint8 ->
input_len: Lib.IntTypes.size_t{Lib.IntTypes.v input_len == Lib.Buffer.length input}
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Lib.Buffer.buffer_t",
"Lib.Buffer.MUT",
"Lib.IntTypes.size_t",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"Lib.IntTypes.range",
"Lib.IntTypes.U32",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Lib.IntTypes.v",
"Lib.Int... | [] | false | true | false | false | false | let sha3_384 output input input_len =
| keccak 832ul 768ul input_len input (byte 0x06) 48ul output | false |
Hacl.SHA3.fst | Hacl.SHA3.sha3_224 | val sha3_224:
output:lbuffer uint8 28ul
-> input:buffer_t MUT uint8
-> input_len:size_t{v input_len == length input}
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
as_seq h1 output ... | val sha3_224:
output:lbuffer uint8 28ul
-> input:buffer_t MUT uint8
-> input_len:size_t{v input_len == length input}
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
as_seq h1 output ... | let sha3_224 output input input_len =
keccak 1152ul 448ul input_len input (byte 0x06) 28ul output | {
"file_name": "code/sha3/Hacl.SHA3.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 61,
"end_line": 63,
"start_col": 0,
"start_line": 62
} | module Hacl.SHA3
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.SHA3
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module S = Spec.SHA3
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0 --usi... | {
"checked_file": "/",
"dependencies": [
"Spec.SHA3.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Impl.SHA3.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives... | [
{
"abbrev": true,
"full_module": "Spec.SHA3",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Ha... | {
"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 |
output: Lib.Buffer.lbuffer Lib.IntTypes.uint8 28ul ->
input: Lib.Buffer.buffer_t Lib.Buffer.MUT Lib.IntTypes.uint8 ->
input_len: Lib.IntTypes.size_t{Lib.IntTypes.v input_len == Lib.Buffer.length input}
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Lib.Buffer.buffer_t",
"Lib.Buffer.MUT",
"Lib.IntTypes.size_t",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"Lib.IntTypes.range",
"Lib.IntTypes.U32",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Lib.IntTypes.v",
"Lib.Int... | [] | false | true | false | false | false | let sha3_224 output input input_len =
| keccak 1152ul 448ul input_len input (byte 0x06) 28ul output | false |
Hacl.SHA3.fst | Hacl.SHA3.sha3_512 | val sha3_512:
output:lbuffer uint8 64ul
-> input:buffer_t MUT uint8
-> input_len:size_t{v input_len == length input}
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
as_seq h1 output ... | val sha3_512:
output:lbuffer uint8 64ul
-> input:buffer_t MUT uint8
-> input_len:size_t{v input_len == length input}
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
as_seq h1 output ... | let sha3_512 output input input_len =
keccak 576ul 1024ul input_len input (byte 0x06) 64ul output | {
"file_name": "code/sha3/Hacl.SHA3.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 61,
"end_line": 105,
"start_col": 0,
"start_line": 104
} | module Hacl.SHA3
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.SHA3
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module S = Spec.SHA3
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0 --usi... | {
"checked_file": "/",
"dependencies": [
"Spec.SHA3.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Impl.SHA3.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives... | [
{
"abbrev": true,
"full_module": "Spec.SHA3",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Ha... | {
"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 |
output: Lib.Buffer.lbuffer Lib.IntTypes.uint8 64ul ->
input: Lib.Buffer.buffer_t Lib.Buffer.MUT Lib.IntTypes.uint8 ->
input_len: Lib.IntTypes.size_t{Lib.IntTypes.v input_len == Lib.Buffer.length input}
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Lib.Buffer.buffer_t",
"Lib.Buffer.MUT",
"Lib.IntTypes.size_t",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"Lib.IntTypes.range",
"Lib.IntTypes.U32",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Lib.IntTypes.v",
"Lib.Int... | [] | false | true | false | false | false | let sha3_512 output input input_len =
| keccak 576ul 1024ul input_len input (byte 0x06) 64ul output | false |
Hacl.Hash.MD.fst | Hacl.Hash.MD.mk_update_multi | val mk_update_multi: a:legacy_alg -> update:update_st (|a, ()|) -> update_multi_st (|a, ()|) | val mk_update_multi: a:legacy_alg -> update:update_st (|a, ()|) -> update_multi_st (|a, ()|) | let mk_update_multi a update s () blocks n_blocks =
let h0 = ST.get () in
let inv (h: HS.mem) (i: nat) =
let i_block = i * block_length a in
i <= U32.v n_blocks /\
B.live h s /\ B.live h blocks /\
B.(modifies (loc_buffer s) h0 h) /\
as_seq h s ==
Spec.Agile.Hash.update_multi a (as_seq h0 s... | {
"file_name": "code/hash/Hacl.Hash.MD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 131,
"start_col": 0,
"start_line": 90
} | module Hacl.Hash.MD
(** The Merkle-Damgård construction. *)
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module Int = Lib.IntTypes
module Lemmas = FStar.Math.Lemmas
module B = LowStar.Buffer
module S = FStar.Seq
module HS = FStar.HyperStack
module ST = FStar.... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.MD.fst.checked",
"Spec.Hash.Lemmas.fsti.checked",
"Spec.Hash.Incremental.fsti.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fst.checked",
"Spec.Agile.Hash.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.chec... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "AH"
},
{
"abbrev": true,
"full_module": "Spec.Hash.Incremental",
"short_module": "HI"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Hacl.Hash.MD.legacy_alg -> update: Hacl.Hash.Definitions.update_st (| a, () |)
-> Hacl.Hash.Definitions.update_multi_st (| a, () |) | Prims.Tot | [
"total"
] | [] | [
"Hacl.Hash.MD.legacy_alg",
"Hacl.Hash.Definitions.update_st",
"Prims.Mkdtuple2",
"Spec.Hash.Definitions.hash_alg",
"Hacl.Hash.Definitions.m_spec",
"Hacl.Hash.Definitions.state",
"Prims.unit",
"Hacl.Hash.Definitions.blocks_t",
"Hacl.Hash.Definitions.get_alg",
"Lib.IntTypes.size_t",
"Prims.b2t",
... | [] | false | false | false | false | false | let mk_update_multi a update s () blocks n_blocks =
| let h0 = ST.get () in
let inv (h: HS.mem) (i: nat) =
let i_block = i * block_length a in
i <= U32.v n_blocks /\ B.live h s /\ B.live h blocks /\ B.(modifies (loc_buffer s) h0 h) /\
as_seq h s ==
Spec.Agile.Hash.update_multi a (as_seq h0 s) () (S.slice (B.as_seq h0 blocks) 0 i_block)
in
let f (i: U32.t{let open ... | false |
Hacl.SHA3.fst | Hacl.SHA3.sha3_256 | val sha3_256:
output:lbuffer uint8 32ul
-> input:buffer_t MUT uint8
-> input_len:size_t{v input_len == length input}
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
as_seq h1 output ... | val sha3_256:
output:lbuffer uint8 32ul
-> input:buffer_t MUT uint8
-> input_len:size_t{v input_len == length input}
-> Stack unit
(requires fun h ->
live h input /\ live h output /\ disjoint input output)
(ensures fun h0 _ h1 ->
modifies (loc output) h0 h1 /\
as_seq h1 output ... | let sha3_256 output input input_len =
keccak 1088ul 512ul input_len input (byte 0x06) 32ul output | {
"file_name": "code/sha3/Hacl.SHA3.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 61,
"end_line": 77,
"start_col": 0,
"start_line": 76
} | module Hacl.SHA3
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open LowStar.Buffer
open Lib.IntTypes
open Lib.Buffer
open Lib.ByteBuffer
open Hacl.Impl.SHA3
module ST = FStar.HyperStack.ST
module B = LowStar.Buffer
module S = Spec.SHA3
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0 --usi... | {
"checked_file": "/",
"dependencies": [
"Spec.SHA3.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Impl.SHA3.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives... | [
{
"abbrev": true,
"full_module": "Spec.SHA3",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Ha... | {
"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 |
output: Lib.Buffer.lbuffer Lib.IntTypes.uint8 32ul ->
input: Lib.Buffer.buffer_t Lib.Buffer.MUT Lib.IntTypes.uint8 ->
input_len: Lib.IntTypes.size_t{Lib.IntTypes.v input_len == Lib.Buffer.length input}
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint8",
"FStar.UInt32.__uint_to_t",
"Lib.Buffer.buffer_t",
"Lib.Buffer.MUT",
"Lib.IntTypes.size_t",
"Prims.eq2",
"Prims.int",
"Prims.l_or",
"Lib.IntTypes.range",
"Lib.IntTypes.U32",
"Prims.b2t",
"Prims.op_GreaterThanOrEqual",
"Lib.IntTypes.v",
"Lib.Int... | [] | false | true | false | false | false | let sha3_256 output input input_len =
| keccak 1088ul 512ul input_len input (byte 0x06) 32ul output | false |
Hacl.Hash.MD.fst | Hacl.Hash.MD.split_blocks | val split_blocks (a : hash_alg) (input:B.buffer Int.uint8)
(input_len : Int.size_t { B.length input = U32.v input_len }) :
ST.Stack (Int.size_t & Int.size_t & B.buffer Int.uint8 & Int.size_t & B.buffer Int.uint8)
(requires fun h -> B.live h input /\ B.length input `less_than_max_input_length` a)
... | val split_blocks (a : hash_alg) (input:B.buffer Int.uint8)
(input_len : Int.size_t { B.length input = U32.v input_len }) :
ST.Stack (Int.size_t & Int.size_t & B.buffer Int.uint8 & Int.size_t & B.buffer Int.uint8)
(requires fun h -> B.live h input /\ B.length input `less_than_max_input_length` a)
... | let split_blocks a input input_len =
let blocks_n = U32.(input_len /^ block_len a) in
let blocks_n = if U32.(input_len %^ block_len a =^ uint_to_t 0) && U32.(blocks_n >^ uint_to_t 0)
then U32.(blocks_n -^ uint_to_t 1) else blocks_n in
let blocks_len = U32.(blocks_n *^ block_len a) in
let blocks... | {
"file_name": "code/hash/Hacl.Hash.MD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 48,
"end_line": 261,
"start_col": 0,
"start_line": 253
} | module Hacl.Hash.MD
(** The Merkle-Damgård construction. *)
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module Int = Lib.IntTypes
module Lemmas = FStar.Math.Lemmas
module B = LowStar.Buffer
module S = FStar.Seq
module HS = FStar.HyperStack
module ST = FStar.... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.MD.fst.checked",
"Spec.Hash.Lemmas.fsti.checked",
"Spec.Hash.Incremental.fsti.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fst.checked",
"Spec.Agile.Hash.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.chec... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "AH"
},
{
"abbrev": true,
"full_module": "Spec.Hash.Incremental",
"short_module": "HI"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Spec.Hash.Definitions.hash_alg ->
input: LowStar.Buffer.buffer Lib.IntTypes.uint8 ->
input_len: Lib.IntTypes.size_t{LowStar.Monotonic.Buffer.length input = FStar.UInt32.v input_len}
-> FStar.HyperStack.ST.Stack
((((Lib.IntTypes.size_t * Lib.IntTypes.size_t) * LowStar.Buffer.buffer Lib.IntTypes.uin... | FStar.HyperStack.ST.Stack | [] | [] | [
"Spec.Hash.Definitions.hash_alg",
"LowStar.Buffer.buffer",
"Lib.IntTypes.uint8",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_... | [] | false | true | false | false | false | let split_blocks a input input_len =
| let blocks_n = let open U32 in input_len /^ block_len a in
let blocks_n =
if U32.(input_len %^ block_len a =^ uint_to_t 0) && U32.(blocks_n >^ uint_to_t 0)
then let open U32 in blocks_n -^ uint_to_t 1
else blocks_n
in
let blocks_len = let open U32 in blocks_n *^ block_len a in
let blocks = B.sub input 0ul blocks_... | false |
Hacl.Hash.MD.fst | Hacl.Hash.MD.mk_hash | val mk_hash: a:md_alg ->
alloca:alloca_st (|a, ()|) ->
update_multi:update_multi_st (|a, ()|) ->
update_last:update_last_st (|a, ()|) ->
finish:finish_st (|a, ()|) ->
hash_st a | val mk_hash: a:md_alg ->
alloca:alloca_st (|a, ()|) ->
update_multi:update_multi_st (|a, ()|) ->
update_last:update_last_st (|a, ()|) ->
finish:finish_st (|a, ()|) ->
hash_st a | let mk_hash a alloca update_multi update_last finish output input input_len =
(**) let h0 = ST.get () in
ST.push_frame ();
let s = alloca () in
let (blocks_n, blocks_len, blocks, rest_len, rest) = split_blocks a input input_len in
(**) let blocks_v0 : Ghost.erased _ = B.as_seq h0 blocks in
(**) let rest_v0... | {
"file_name": "code/hash/Hacl.Hash.MD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 17,
"end_line": 317,
"start_col": 0,
"start_line": 271
} | module Hacl.Hash.MD
(** The Merkle-Damgård construction. *)
module U8 = FStar.UInt8
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module Int = Lib.IntTypes
module Lemmas = FStar.Math.Lemmas
module B = LowStar.Buffer
module S = FStar.Seq
module HS = FStar.HyperStack
module ST = FStar.... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.MD.fst.checked",
"Spec.Hash.Lemmas.fsti.checked",
"Spec.Hash.Incremental.fsti.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fst.checked",
"Spec.Agile.Hash.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.chec... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "AH"
},
{
"abbrev": true,
"full_module": "Spec.Hash.Incremental",
"short_module": "HI"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Spec.Hash.Definitions.md_alg ->
alloca: Hacl.Hash.Definitions.alloca_st (| a, () |) ->
update_multi: Hacl.Hash.Definitions.update_multi_st (| a, () |) ->
update_last: Hacl.Hash.Definitions.update_last_st (| a, () |) ->
finish: Hacl.Hash.Definitions.finish_st (| a, () |)
-> Hacl.Hash.Definition... | Prims.Tot | [
"total"
] | [] | [
"Spec.Hash.Definitions.md_alg",
"Hacl.Hash.Definitions.alloca_st",
"Prims.Mkdtuple2",
"Spec.Hash.Definitions.hash_alg",
"Hacl.Hash.Definitions.m_spec",
"Hacl.Hash.Definitions.update_multi_st",
"Hacl.Hash.Definitions.update_last_st",
"Hacl.Hash.Definitions.finish_st",
"Hacl.Hash.Definitions.hash_t",
... | [] | false | false | false | false | false | let mk_hash a alloca update_multi update_last finish output input input_len =
| let h0 = ST.get () in
ST.push_frame ();
let s = alloca () in
let blocks_n, blocks_len, blocks, rest_len, rest = split_blocks a input input_len in
let blocks_v0:Ghost.erased _ = B.as_seq h0 blocks in
let rest_v0:Ghost.erased _ = B.as_seq h0 rest in
let input_v0:Ghost.erased _ = B.as_seq h0 input in
assert (input_v0 `S.e... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_fits_lemma | val load_tup64_fits_lemma:
f:tup64_5
-> lo:uint64
-> hi:uint64 ->
Lemma
(requires
(let (f0, f1, f2, f3, f4) = f in
v f0 == v lo % pow2 26 /\
v f1 == (v lo / pow2 26) % pow2 26 /\
v f2 == v lo / pow2 52 + (v hi % pow2 14) * pow2 12 /\
v f3 == (v hi / pow2 14) % pow2 26 /\
v f4 == v hi ... | val load_tup64_fits_lemma:
f:tup64_5
-> lo:uint64
-> hi:uint64 ->
Lemma
(requires
(let (f0, f1, f2, f3, f4) = f in
v f0 == v lo % pow2 26 /\
v f1 == (v lo / pow2 26) % pow2 26 /\
v f2 == v lo / pow2 52 + (v hi % pow2 14) * pow2 12 /\
v f3 == (v hi / pow2 14) % pow2 26 /\
v f4 == v hi ... | let load_tup64_fits_lemma f lo hi =
let (f0, f1, f2, f3, f4) = f in
assert_norm (pow26 = pow2 26);
FStar.Math.Lemmas.lemma_div_lt_nat (v lo) 64 52;
lemma_mult_le (v hi % pow2 14) (pow2 14 - 1) (pow2 12) (pow2 12);
assert_norm (pow2 14 * pow2 12 = pow2 26);
FStar.Math.Lemmas.lemma_div_lt_nat (v hi) 64 40;
... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 119,
"start_col": 0,
"start_line": 112
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Hacl.Spec.Poly1305.Field32xN.tup64_5 -> lo: Lib.IntTypes.uint64 -> hi: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
(let _ = f in
(let FStar.Pervasives.Native.Mktuple5 #_ #_ #_ #_ #_ f0 f1 f2 f3 f4 = _ in
Lib.IntTypes.v f0 == Lib.IntTypes.v lo % Prims.pow2 26 /\
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Poly1305.Field32xN.tup64_5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.unit",
"FStar.Math.Lemmas.lemma_div_lt_nat",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.op_Equality",
"Prims.int",
"FS... | [] | false | false | true | false | false | let load_tup64_fits_lemma f lo hi =
| let f0, f1, f2, f3, f4 = f in
assert_norm (pow26 = pow2 26);
FStar.Math.Lemmas.lemma_div_lt_nat (v lo) 64 52;
lemma_mult_le (v hi % pow2 14) (pow2 14 - 1) (pow2 12) (pow2 12);
assert_norm (pow2 14 * pow2 12 = pow2 26);
FStar.Math.Lemmas.lemma_div_lt_nat (v hi) 64 40;
assert_norm (pow2 24 < pow2 26) | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_4_compact | val load_tup64_4_compact: lo:uint64 -> hi:uint64 -> tup64_5 | val load_tup64_4_compact: lo:uint64 -> hi:uint64 -> tup64_5 | let load_tup64_4_compact lo hi =
let mask26 = u64 0x3ffffff in
let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
let o0 = lo &. mask26 in
let o1 = (lo >>. 26ul) &. mask26 in
let o2 = (t3 >>. 4ul) &. mask26 in
let o3 = (t3 >>. 30ul) &. mask26 in
let o4 = hi >>. 40ul in
(o0, o1, o2, o3, o4) | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 232,
"start_col": 0,
"start_line": 224
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | lo: Lib.IntTypes.uint64 -> hi: Lib.IntTypes.uint64 -> Hacl.Spec.Poly1305.Field32xN.tup64_5 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Greater_Greater_Dot",
"FStar.UInt32.__uint_to_t",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.op_Bar_Dot",
"Lib.IntTypes.op_Less_Less_Dot",
"Prims.eq2",
"Prims... | [] | false | false | false | true | false | let load_tup64_4_compact lo hi =
| let mask26 = u64 0x3ffffff in
let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
let o0 = lo &. mask26 in
let o1 = (lo >>. 26ul) &. mask26 in
let o2 = (t3 >>. 4ul) &. mask26 in
let o3 = (t3 >>. 30ul) &. mask26 in
let o4 = hi >>. 40ul in
(o0, o1, o2, o3, o4) | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lemma_tup64_pow2_128 | val lemma_tup64_pow2_128: f:tup64_5 ->
Lemma
(requires tup64_fits5 f (1, 1, 1, 1, 1))
(ensures
(let (f0, f1, f2, f3, f4) = f in
v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 + (v f4 % pow2 24) * pow104 < pow2 128)) | val lemma_tup64_pow2_128: f:tup64_5 ->
Lemma
(requires tup64_fits5 f (1, 1, 1, 1, 1))
(ensures
(let (f0, f1, f2, f3, f4) = f in
v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 + (v f4 % pow2 24) * pow104 < pow2 128)) | let lemma_tup64_pow2_128 f =
let (f0, f1, f2, f3, f4) = f in
let tmp = v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 + (v f4 % pow2 24) * pow104 in
assert (tmp <= pow2 26 - 1 + (pow2 26 - 1) * pow26 + (pow2 26 - 1) * pow52 +
(pow2 26 - 1) * pow78 + (pow2 24 - 1) * pow104);
assert (tmp <= pow2 24 * pow10... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 43,
"end_line": 431,
"start_col": 0,
"start_line": 425
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Hacl.Spec.Poly1305.Field32xN.tup64_5
-> FStar.Pervasives.Lemma (requires Hacl.Spec.Poly1305.Field32xN.tup64_fits5 f (1, 1, 1, 1, 1))
(ensures
(let _ = f in
(let FStar.Pervasives.Native.Mktuple5 #_ #_ #_ #_ #_ f0 f1 f2 f3 f4 = _ in
Lib.IntTypes.v f0 + Lib.IntTypes.v f1 * Hacl.Spe... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Poly1305.Field32xN.tup64_5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.Mul.op_Star",
"Prims.pow2",
"Hacl.Spec.Poly1305.Field32xN.pow104",
"Prims.unit",
"Prims._assert",
"Prims.op_LessThanOrEqual",
"Prims.op_Subtrac... | [] | false | false | true | false | false | let lemma_tup64_pow2_128 f =
| let f0, f1, f2, f3, f4 = f in
let tmp = v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 + (v f4 % pow2 24) * pow104 in
assert (tmp <=
pow2 26 - 1 + (pow2 26 - 1) * pow26 + (pow2 26 - 1) * pow52 + (pow2 26 - 1) * pow78 +
(pow2 24 - 1) * pow104);
assert (tmp <= pow2 24 * pow104 - 1);
assert_norm (pow2 24 * pow1... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_mul64_wide | val lemma_bound_mul64_wide (ma mb:nat) (mma mmb:nat) (a b:uint64) : Lemma
(requires v a <= ma * mma /\ v b <= mb * mmb)
(ensures (let r = mul64_wide a b in
v r = v a * v b /\ v r <= ma * mb * (mma * mmb))) | val lemma_bound_mul64_wide (ma mb:nat) (mma mmb:nat) (a b:uint64) : Lemma
(requires v a <= ma * mma /\ v b <= mb * mmb)
(ensures (let r = mul64_wide a b in
v r = v a * v b /\ v r <= ma * mb * (mma * mmb))) | let lemma_bound_mul64_wide ma mb mma mmb a b =
ML.lemma_bound_mul64_wide ma mb mma mmb (v a) (v b) | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 53,
"end_line": 22,
"start_col": 0,
"start_line": 21
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
ma: Prims.nat ->
mb: Prims.nat ->
mma: Prims.nat ->
mmb: Prims.nat ->
a: Lib.IntTypes.uint64 ->
b: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma (requires Lib.IntTypes.v a <= ma * mma /\ Lib.IntTypes.v b <= mb * mmb)
(ensures
(let r = Lib.IntTypes.mul64_wide a b in
Lib... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint64",
"Hacl.Spec.K256.MathLemmas.lemma_bound_mul64_wide",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.unit"
] | [] | true | false | true | false | false | let lemma_bound_mul64_wide ma mb mma mmb a b =
| ML.lemma_bound_mul64_wide ma mb mma mmb (v a) (v b) | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_16_max52_max48 | val lemma_16_max52_max48: a:pos -> Lemma ((a * 16) * (max52 * max48) < a * (max52 * max52)) | val lemma_16_max52_max48: a:pos -> Lemma ((a * 16) * (max52 * max48) < a * (max52 * max52)) | let lemma_16_max52_max48 a =
assert_norm (16 * (max52 * max48) < max52 * max52);
calc (<) {
(a * 16) * (max52 * max48);
(==) { Math.Lemmas.paren_mul_right a 16 (max52 * max48) }
a * (16 * (max52 * max48));
(<) { Math.Lemmas.lemma_mult_lt_left a (16 * (max52 * max48)) (max52 * max52) }
a * (max52... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 58,
"start_col": 0,
"start_line": 50
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Prims.pos
-> FStar.Pervasives.Lemma
(ensures
(a * 16) *
(Hacl.Spec.K256.Field52.Definitions.max52 * Hacl.Spec.K256.Field52.Definitions.max48) <
a * (Hacl.Spec.K256.Field52.Definitions.max52 * Hacl.Spec.K256.Field52.Definitions.max52)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Hacl.Spec.K256.Field52.Definitions.max52",
"Hacl.Spec.K256.Field52.Definitions.max48",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.eq2",
"Prims.Nil",
"Prims.unit",
"FStar.Calc.ca... | [] | false | false | true | false | false | let lemma_16_max52_max48 a =
| assert_norm (16 * (max52 * max48) < max52 * max52);
calc ( < ) {
(a * 16) * (max52 * max48);
( == ) { Math.Lemmas.paren_mul_right a 16 (max52 * max48) }
a * (16 * (max52 * max48));
( < ) { Math.Lemmas.lemma_mult_lt_left a (16 * (max52 * max48)) (max52 * max52) }
a * (max52 * max52);
} | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_4_compact_lemma_f2_mod | val load_tup64_4_compact_lemma_f2_mod: lo:uint64 -> hi:uint64 -> Lemma
((v lo / pow2 52 + (v hi % pow2 14) * pow2 12) % pow2 26 == v lo / pow2 52 + (v hi % pow2 14) * pow2 12) | val load_tup64_4_compact_lemma_f2_mod: lo:uint64 -> hi:uint64 -> Lemma
((v lo / pow2 52 + (v hi % pow2 14) * pow2 12) % pow2 26 == v lo / pow2 52 + (v hi % pow2 14) * pow2 12) | let load_tup64_4_compact_lemma_f2_mod lo hi =
calc (<) {
v lo / pow2 52 + (v hi % pow2 14) * pow2 12;
(<) { Math.Lemmas.lemma_div_lt (v lo) 64 52 }
pow2 12 + (v hi % pow2 14) * pow2 12;
(<=) { Math.Lemmas.lemma_mult_le_right (pow2 12) (v hi % pow2 14) (pow2 14 - 1) }
pow2 12 + (pow2 14 - 1) * pow2... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 90,
"end_line": 247,
"start_col": 0,
"start_line": 236
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | lo: Lib.IntTypes.uint64 -> hi: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(ensures
(Lib.IntTypes.v lo / Prims.pow2 52 + (Lib.IntTypes.v hi % Prims.pow2 14) * Prims.pow2 12) %
Prims.pow2 26 ==
Lib.IntTypes.v lo / Prims.pow2 52 + (Lib.IntTypes.v hi % Prims.pow2 14) * Prims.pow2 12) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_modulo_lemma_1",
"Prims.op_Addition",
"Prims.op_Division",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.pow2",
"FStar.Mul.op_Star",
"Prims.op_Modulus",
"Prims.unit",
"Prims._assert",
"Prims.b2t",
"Prims.op_LessThan",
"FS... | [] | false | false | true | false | false | let load_tup64_4_compact_lemma_f2_mod lo hi =
| calc ( < ) {
v lo / pow2 52 + (v hi % pow2 14) * pow2 12;
( < ) { Math.Lemmas.lemma_div_lt (v lo) 64 52 }
pow2 12 + (v hi % pow2 14) * pow2 12;
( <= ) { Math.Lemmas.lemma_mult_le_right (pow2 12) (v hi % pow2 14) (pow2 14 - 1) }
pow2 12 + (pow2 14 - 1) * pow2 12;
( == ) { (Math.Lemmas.distributivity_sub_left... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lemma_store_felem_lo | val lemma_store_felem_lo:
f:tup64_5{tup64_fits5 f (1, 1, 1, 1, 1)}
-> lo:uint64 ->
Lemma
(let (f0, f1, f2, f3, f4) = f in
let lo = f0 |. (f1 <<. 26ul) |. (f2 <<. 52ul) in
v lo == v f0 + v f1 * pow2 26 + (v f2 * pow2 52) % pow2 64) | val lemma_store_felem_lo:
f:tup64_5{tup64_fits5 f (1, 1, 1, 1, 1)}
-> lo:uint64 ->
Lemma
(let (f0, f1, f2, f3, f4) = f in
let lo = f0 |. (f1 <<. 26ul) |. (f2 <<. 52ul) in
v lo == v f0 + v f1 * pow2 26 + (v f2 * pow2 52) % pow2 64) | let lemma_store_felem_lo f lo =
let (f0, f1, f2, f3, f4) = f in
assert_norm (max26 = pow2 26 - 1);
let lo = f0 |. (f1 <<. 26ul) |. (f2 <<. 52ul) in
assert (v (f1 <<. 26ul) == v f1 * pow2 26 % pow2 64);
FStar.Math.Lemmas.modulo_lemma (v f1 * pow2 26) (pow2 64);
FStar.Math.Lemmas.pow2_multiplication_modulo_le... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 55,
"end_line": 381,
"start_col": 0,
"start_line": 368
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
f:
Hacl.Spec.Poly1305.Field32xN.tup64_5
{Hacl.Spec.Poly1305.Field32xN.tup64_fits5 f (1, 1, 1, 1, 1)} ->
lo: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(ensures
(let _ = f in
(let FStar.Pervasives.Native.Mktuple5 #_ #_ #_ #_ #_ f0 f1 f2 _ _ = _ in
let lo = f0 |. f1... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Poly1305.Field32xN.tup64_5",
"Hacl.Spec.Poly1305.Field32xN.tup64_fits5",
"FStar.Pervasives.Native.Mktuple5",
"Prims.nat",
"Lib.IntTypes.uint64",
"Lib.IntTypes.logor_disjoint",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Bar_Dot",
"Lib.IntTypes.op_Less_Less_Dot",
"FStar.UI... | [] | false | false | true | false | false | let lemma_store_felem_lo f lo =
| let f0, f1, f2, f3, f4 = f in
assert_norm (max26 = pow2 26 - 1);
let lo = f0 |. (f1 <<. 26ul) |. (f2 <<. 52ul) in
assert (v (f1 <<. 26ul) == v f1 * pow2 26 % pow2 64);
FStar.Math.Lemmas.modulo_lemma (v f1 * pow2 26) (pow2 64);
FStar.Math.Lemmas.pow2_multiplication_modulo_lemma_1 (v f1) 26 26;
logor_disjoint f0 (f1 <<. ... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_4_compact_lemma | val load_tup64_4_compact_lemma: lo:uint64 -> hi:uint64 ->
Lemma (load_tup64_4_compact lo hi == load_tup64_lemma lo hi) | val load_tup64_4_compact_lemma: lo:uint64 -> hi:uint64 ->
Lemma (load_tup64_4_compact lo hi == load_tup64_lemma lo hi) | let load_tup64_4_compact_lemma lo hi =
let (l0, l1, l2, l3, l4) = load_tup64_4_compact lo hi in
let (r0, r1, r2, r3, r4) = load_tup64_lemma lo hi in
assert (l0 == r0 /\ l1 == r1 /\ l4 == r4);
let mask26 = u64 0x3ffffff in
let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
let l2 = (t3 >>. 4ul) &. mask26 in
load_... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 37,
"end_line": 355,
"start_col": 0,
"start_line": 336
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | lo: Lib.IntTypes.uint64 -> hi: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(ensures
Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_4_compact lo hi ==
Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_lemma lo hi) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_4_compact_lemma_f3",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.op_Greater_Greater_Dot",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims... | [] | false | false | true | false | false | let load_tup64_4_compact_lemma lo hi =
| let l0, l1, l2, l3, l4 = load_tup64_4_compact lo hi in
let r0, r1, r2, r3, r4 = load_tup64_lemma lo hi in
assert (l0 == r0 /\ l1 == r1 /\ l4 == r4);
let mask26 = u64 0x3ffffff in
let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
let l2 = (t3 >>. 4ul) &. mask26 in
load_tup64_4_compact_lemma_f2 lo hi;
let r2 = (lo >>. 52ul) |. ... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lemma_sum_lt_pow2_26 | val lemma_sum_lt_pow2_26: i:nat -> a:nat{a < pow2 (i % 26)} -> b:nat{b <= pow2 (i % 26)} ->
Lemma (a + b <= max26) | val lemma_sum_lt_pow2_26: i:nat -> a:nat{a < pow2 (i % 26)} -> b:nat{b <= pow2 (i % 26)} ->
Lemma (a + b <= max26) | let lemma_sum_lt_pow2_26 i a b =
assert (a + b < pow2 (i % 26) + pow2 (i % 26));
FStar.Math.Lemmas.pow2_le_compat 25 (i % 26);
assert (a + b < pow2 25 + pow2 25);
FStar.Math.Lemmas.pow2_double_sum 25;
assert_norm (pow26 = pow2 26) | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 31,
"end_line": 528,
"start_col": 0,
"start_line": 523
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | i: Prims.nat -> a: Prims.nat{a < Prims.pow2 (i % 26)} -> b: Prims.nat{b <= Prims.pow2 (i % 26)}
-> FStar.Pervasives.Lemma (ensures a + b <= Hacl.Spec.Poly1305.Field32xN.max26) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.op_Modulus",
"Prims.op_LessThanOrEqual",
"FStar.Pervasives.assert_norm",
"Prims.op_Equality",
"Prims.pos",
"Hacl.Spec.Poly1305.Field32xN.pow26",
"Prims.unit",
"FStar.Math.Lemmas.pow2_double_sum",
"Prims._assert",
"Prims.op... | [] | true | false | true | false | false | let lemma_sum_lt_pow2_26 i a b =
| assert (a + b < pow2 (i % 26) + pow2 (i % 26));
FStar.Math.Lemmas.pow2_le_compat 25 (i % 26);
assert (a + b < pow2 25 + pow2 25);
FStar.Math.Lemmas.pow2_double_sum 25;
assert_norm (pow26 = pow2 26) | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_four_mul64_wide | val lemma_four_mul64_wide (a0 a1 a2 a3 b0 b1 b2 b3:uint64) : Lemma
(requires
felem_fits1 a0 64 /\ felem_fits1 b0 64 /\
felem_fits1 a1 64 /\ felem_fits1 b1 64 /\
felem_fits1 a2 64 /\ felem_fits1 b2 64 /\
felem_fits1 a3 64 /\ felem_fits1 b3 64)
(ensures
(let d = mul64_wide a0 b3 +. mul64_wide a1 b2... | val lemma_four_mul64_wide (a0 a1 a2 a3 b0 b1 b2 b3:uint64) : Lemma
(requires
felem_fits1 a0 64 /\ felem_fits1 b0 64 /\
felem_fits1 a1 64 /\ felem_fits1 b1 64 /\
felem_fits1 a2 64 /\ felem_fits1 b2 64 /\
felem_fits1 a3 64 /\ felem_fits1 b3 64)
(ensures
(let d = mul64_wide a0 b3 +. mul64_wide a1 b2... | let lemma_four_mul64_wide a0 a1 a2 a3 b0 b1 b2 b3 =
lemma_bound_mul64_wide 64 64 max52 max52 a0 b3;
lemma_bound_mul64_wide 64 64 max52 max52 a1 b2;
lemma_bound_mul64_wide 64 64 max52 max52 a2 b1;
lemma_bound_mul64_wide 64 64 max52 max52 a3 b0;
assert (v a0 * v b3 + v a1 * v b2 + v a2 * v b1 + v a3 * v b0 <= 1... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 90,
"end_line": 46,
"start_col": 0,
"start_line": 36
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a0: Lib.IntTypes.uint64 ->
a1: Lib.IntTypes.uint64 ->
a2: Lib.IntTypes.uint64 ->
a3: Lib.IntTypes.uint64 ->
b0: Lib.IntTypes.uint64 ->
b1: Lib.IntTypes.uint64 ->
b2: Lib.IntTypes.uint64 ->
b3: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Hacl.Spec.K256.Field52... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.K256.Field52.Definitions.max52",
... | [] | true | false | true | false | false | let lemma_four_mul64_wide a0 a1 a2 a3 b0 b1 b2 b3 =
| lemma_bound_mul64_wide 64 64 max52 max52 a0 b3;
lemma_bound_mul64_wide 64 64 max52 max52 a1 b2;
lemma_bound_mul64_wide 64 64 max52 max52 a2 b1;
lemma_bound_mul64_wide 64 64 max52 max52 a3 b0;
assert (v a0 * v b3 + v a1 * v b2 + v a2 * v b1 + v a3 * v b0 <= 16384 * (max52 * max52));
assert_norm (16384 * (max52 * max52) ... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_lemma | val load_tup64_lemma: lo:uint64 -> hi:uint64 ->
Pure tup64_5
(requires True)
(ensures fun f ->
tup64_fits5 f (1, 1, 1, 1, 1) /\
as_nat5 f < pow2 128 /\
as_nat5 f % prime == v hi * pow2 64 + v lo) | val load_tup64_lemma: lo:uint64 -> hi:uint64 ->
Pure tup64_5
(requires True)
(ensures fun f ->
tup64_fits5 f (1, 1, 1, 1, 1) /\
as_nat5 f < pow2 128 /\
as_nat5 f % prime == v hi * pow2 64 + v lo) | let load_tup64_lemma lo hi =
let mask26 = u64 0x3ffffff in
assert_norm (0x3ffffff = pow2 26 - 1);
assert_norm (0x3fff = pow2 14 - 1);
let f0 = lo &. mask26 in
mod_mask_lemma lo 26ul;
assert (v (mod_mask #U64 #SEC 26ul) == v mask26);
assert (v f0 == v lo % pow2 26);
let f1 = (lo >>. 26ul) &. mask26 in
... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 205,
"start_col": 0,
"start_line": 175
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | lo: Lib.IntTypes.uint64 -> hi: Lib.IntTypes.uint64
-> Prims.Pure Hacl.Spec.Poly1305.Field32xN.tup64_5 | Prims.Pure | [] | [] | [
"Lib.IntTypes.uint64",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Modulus",
"Hacl.Spec.Poly1305.Field32xN.as_nat5",
"Hacl.Spec.Poly1305.Vec.prime",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.pow2",
"F... | [] | false | false | false | false | false | let load_tup64_lemma lo hi =
| let mask26 = u64 0x3ffffff in
assert_norm (0x3ffffff = pow2 26 - 1);
assert_norm (0x3fff = pow2 14 - 1);
let f0 = lo &. mask26 in
mod_mask_lemma lo 26ul;
assert (v (mod_mask #U64 #SEC 26ul) == v mask26);
assert (v f0 == v lo % pow2 26);
let f1 = (lo >>. 26ul) &. mask26 in
assert (v f1 == (v lo / pow2 26) % pow2 26);
le... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_felem5_lemma_i | val load_felem5_lemma_i:
#w:lanes
-> lo:uint64xN w
-> hi:uint64xN w
-> i:nat{i < w} ->
Lemma
(let f = as_tup64_i (load_felem5 #w lo hi) i in
tup64_fits5 f (1, 1, 1, 1, 1) /\
as_nat5 f < pow2 128 /\
as_nat5 f % prime == (uint64xN_v hi).[i] * pow2 64 + (uint64xN_v lo).[i]) | val load_felem5_lemma_i:
#w:lanes
-> lo:uint64xN w
-> hi:uint64xN w
-> i:nat{i < w} ->
Lemma
(let f = as_tup64_i (load_felem5 #w lo hi) i in
tup64_fits5 f (1, 1, 1, 1, 1) /\
as_nat5 f < pow2 128 /\
as_nat5 f % prime == (uint64xN_v hi).[i] * pow2 64 + (uint64xN_v lo).[i]) | let load_felem5_lemma_i #w lo hi i =
assert (as_tup64_i (load_felem5 #w lo hi) i == load_tup64_lemma (vec_v lo).[i] (vec_v hi).[i]) | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 96,
"end_line": 220,
"start_col": 0,
"start_line": 219
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
lo: Hacl.Spec.Poly1305.Field32xN.uint64xN w ->
hi: Hacl.Spec.Poly1305.Field32xN.uint64xN w ->
i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
(let f =
Hacl.Spec.Poly1305.Field32xN.as_tup64_i (Hacl.Spec.Poly1305.Field32xN.load_felem5 lo hi) i
in
Hacl.Spec.Poly130... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Poly1305.Field32xN.lanes",
"Hacl.Spec.Poly1305.Field32xN.uint64xN",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims._assert",
"Prims.eq2",
"Hacl.Spec.Poly1305.Field32xN.tup64_5",
"Hacl.Spec.Poly1305.Field32xN.as_tup64_i",
"Hacl.Spec.Poly1305.Field32xN.load_felem5",
"Hacl.Poly130... | [] | true | false | true | false | false | let load_felem5_lemma_i #w lo hi i =
| assert (as_tup64_i (load_felem5 #w lo hi) i == load_tup64_lemma (vec_v lo).[ i ] (vec_v hi).[ i ]) | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_r_rsh4 | val lemma_r_rsh4: unit ->
Lemma (let rs = u64 0x1000003D10 >>. 4ul in
v rs = 0x1000003D10 / pow2 4 /\ v rs < pow2 33) | val lemma_r_rsh4: unit ->
Lemma (let rs = u64 0x1000003D10 >>. 4ul in
v rs = 0x1000003D10 / pow2 4 /\ v rs < pow2 33) | let lemma_r_rsh4 () =
let rs = u64 0x1000003D10 >>. 4ul in
assert_norm (0x1000003D10 < pow2 37);
Math.Lemmas.lemma_div_lt 0x1000003D10 37 4 | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 44,
"end_line": 296,
"start_col": 0,
"start_line": 293
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | _: Prims.unit
-> FStar.Pervasives.Lemma
(ensures
(let rs = Lib.IntTypes.u64 0x1000003D10 >>. 4ul in
Lib.IntTypes.v rs = 0x1000003D10 / Prims.pow2 4 /\ Lib.IntTypes.v rs < Prims.pow2 33)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.unit",
"FStar.Math.Lemmas.lemma_div_lt",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Greater_Greater_Dot",
"Lib.IntTypes.u64",
"FStar.UInt32.__uint_to_t"
] | [] | true | false | true | false | false | let lemma_r_rsh4 () =
| let rs = u64 0x1000003D10 >>. 4ul in
assert_norm (0x1000003D10 < pow2 37);
Math.Lemmas.lemma_div_lt 0x1000003D10 37 4 | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_c0 | val lemma_bound_c0: c0:uint128 -> Lemma
(requires v c0 <= 4096 * (max48 * max48))
(ensures v c0 / pow2 64 <= pow2 44) | val lemma_bound_c0: c0:uint128 -> Lemma
(requires v c0 <= 4096 * (max48 * max48))
(ensures v c0 / pow2 64 <= pow2 44) | let lemma_bound_c0 c0 =
lemma_u128_div64_max48 4096 c0;
assert_norm (pow2 12 = 4096);
Math.Lemmas.pow2_plus 12 32 | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 29,
"end_line": 443,
"start_col": 0,
"start_line": 440
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | c0: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v c0 <=
4096 * (Hacl.Spec.K256.Field52.Definitions.max48 * Hacl.Spec.K256.Field52.Definitions.max48)
) (ensures Lib.IntTypes.v c0 / Prims.pow2 64 <= Prims.pow2 44) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint128",
"FStar.Math.Lemmas.pow2_plus",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.pow2",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_u128_div64_max48"
] | [] | true | false | true | false | false | let lemma_bound_c0 c0 =
| lemma_u128_div64_max48 4096 c0;
assert_norm (pow2 12 = 4096);
Math.Lemmas.pow2_plus 12 32 | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5_lemma_aux | val lset_bit5_lemma_aux: fi:uint64 -> i:size_nat{i <= 128} ->
Lemma
(requires v fi < pow2 (i % 26))
(ensures (v (fi |. (u64 1 <<. size (i % 26))) == v fi + pow2 (i % 26))) | val lset_bit5_lemma_aux: fi:uint64 -> i:size_nat{i <= 128} ->
Lemma
(requires v fi < pow2 (i % 26))
(ensures (v (fi |. (u64 1 <<. size (i % 26))) == v fi + pow2 (i % 26))) | let lset_bit5_lemma_aux fi i =
let b = u64 1 <<. size (i % 26) in
FStar.Math.Lemmas.pow2_lt_compat 26 (i % 26);
FStar.Math.Lemmas.pow2_lt_compat 64 26;
FStar.Math.Lemmas.modulo_lemma (pow2 (i % 26)) (pow2 64);
assert (v b == pow2 (i % 26));
logor_disjoint fi b (i % 26);
let out_i = fi |. b in
assert (v ... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 548,
"start_col": 0,
"start_line": 536
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | fi: Lib.IntTypes.uint64 -> i: Lib.IntTypes.size_nat{i <= 128}
-> FStar.Pervasives.Lemma (requires Lib.IntTypes.v fi < Prims.pow2 (i % 26))
(ensures
Lib.IntTypes.v (fi |. Lib.IntTypes.u64 1 <<. Lib.IntTypes.size (i % 26)) ==
Lib.IntTypes.v fi + Prims.pow2 (i % 26)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims._assert",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Hacl.Spec.Poly1305.Field32xN.max26",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.op_Equality",
"Prims.pos",
"Hacl.Sp... | [] | true | false | true | false | false | let lset_bit5_lemma_aux fi i =
| let b = u64 1 <<. size (i % 26) in
FStar.Math.Lemmas.pow2_lt_compat 26 (i % 26);
FStar.Math.Lemmas.pow2_lt_compat 64 26;
FStar.Math.Lemmas.modulo_lemma (pow2 (i % 26)) (pow2 64);
assert (v b == pow2 (i % 26));
logor_disjoint fi b (i % 26);
let out_i = fi |. b in
assert (v out_i == v fi + v b);
assert (v out_i == v fi +... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.store_felem5_lemma | val store_felem5_lemma:
#w:lanes
-> f:felem5 w ->
Lemma
(requires felem_fits5 f (1, 1, 1, 1, 1))
(ensures
(let (lo, hi) = store_felem5 f in
v hi * pow2 64 + v lo == (fas_nat5 f).[0] % pow2 128)) | val store_felem5_lemma:
#w:lanes
-> f:felem5 w ->
Lemma
(requires felem_fits5 f (1, 1, 1, 1, 1))
(ensures
(let (lo, hi) = store_felem5 f in
v hi * pow2 64 + v lo == (fas_nat5 f).[0] % pow2 128)) | let store_felem5_lemma #w f =
let (lo, hi) = store_felem5 f in
assert (store_tup64_lemma (as_tup64_i f 0) == (lo, hi)) | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 57,
"end_line": 517,
"start_col": 0,
"start_line": 515
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 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 | f: Hacl.Spec.Poly1305.Field32xN.felem5 w
-> FStar.Pervasives.Lemma (requires Hacl.Spec.Poly1305.Field32xN.felem_fits5 f (1, 1, 1, 1, 1))
(ensures
(let _ = Hacl.Spec.Poly1305.Field32xN.store_felem5 f in
(let FStar.Pervasives.Native.Mktuple2 #_ #_ lo hi = _ in
Lib.IntTypes.v hi * Pri... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Poly1305.Field32xN.lanes",
"Hacl.Spec.Poly1305.Field32xN.felem5",
"Lib.IntTypes.uint64",
"Prims._assert",
"Prims.eq2",
"FStar.Pervasives.Native.tuple2",
"Hacl.Poly1305.Field32xN.Lemmas2.store_tup64_lemma",
"Hacl.Spec.Poly1305.Field32xN.as_tup64_i",
"FStar.Pervasives.Native.Mktuple2",
"P... | [] | false | false | true | false | false | let store_felem5_lemma #w f =
| let lo, hi = store_felem5 f in
assert (store_tup64_lemma (as_tup64_i f 0) == (lo, hi)) | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_r_lsh12 | val lemma_r_lsh12: unit ->
Lemma (let rs = u64 0x1000003D10 <<. 12ul in
v rs = 0x1000003D10 * pow2 12 /\ v rs < pow2 49) | val lemma_r_lsh12: unit ->
Lemma (let rs = u64 0x1000003D10 <<. 12ul in
v rs = 0x1000003D10 * pow2 12 /\ v rs < pow2 49) | let lemma_r_lsh12 () =
let rs = u64 0x1000003D10 <<. 12ul in
assert_norm (0x1000003D10 < pow2 37);
assert (v rs = 0x1000003D10 * pow2 12 % pow2 64);
calc (<) {
0x1000003D10 * pow2 12;
(<) { Math.Lemmas.lemma_mult_lt_right (pow2 12) 0x1000003D10 (pow2 37) }
pow2 37 * pow2 12;
(==) { Math.Lemmas.... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 40,
"end_line": 286,
"start_col": 0,
"start_line": 271
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | _: Prims.unit
-> FStar.Pervasives.Lemma
(ensures
(let rs = Lib.IntTypes.u64 0x1000003D10 <<. 12ul in
Lib.IntTypes.v rs = 0x1000003D10 * Prims.pow2 12 /\ Lib.IntTypes.v rs < Prims.pow2 49)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.unit",
"Prims._assert",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Prims.pow2",
"FStar.Math.Lemmas.small_mod",
"FStar.Math.Lemmas.pow2_lt_compat",
"FStar.Calc.calc_finish",
"Prims.op_LessThan",
"Pr... | [] | false | false | true | false | false | let lemma_r_lsh12 () =
| let rs = u64 0x1000003D10 <<. 12ul in
assert_norm (0x1000003D10 < pow2 37);
assert (v rs = 0x1000003D10 * pow2 12 % pow2 64);
calc ( < ) {
0x1000003D10 * pow2 12;
( < ) { Math.Lemmas.lemma_mult_lt_right (pow2 12) 0x1000003D10 (pow2 37) }
pow2 37 * pow2 12;
( == ) { Math.Lemmas.pow2_plus 12 37 }
pow2 49;
};
Ma... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lemma_store_felem_hi | val lemma_store_felem_hi: f:tup64_5 -> hi:uint64 ->
Lemma
(requires tup64_fits5 f (1, 1, 1, 1, 1))
(ensures
(let (f0, f1, f2, f3, f4) = f in
let hi = (f2 >>. 12ul) |. (f3 <<. 14ul) |. (f4 <<. 40ul) in
v hi == v f2 / pow2 12 + v f3 * pow2 14 + (v f4 * pow2 40) % pow2 64)) | val lemma_store_felem_hi: f:tup64_5 -> hi:uint64 ->
Lemma
(requires tup64_fits5 f (1, 1, 1, 1, 1))
(ensures
(let (f0, f1, f2, f3, f4) = f in
let hi = (f2 >>. 12ul) |. (f3 <<. 14ul) |. (f4 <<. 40ul) in
v hi == v f2 / pow2 12 + v f3 * pow2 14 + (v f4 * pow2 40) % pow2 64)) | let lemma_store_felem_hi f hi =
let (f0, f1, f2, f3, f4) = f in
assert_norm (max26 = pow2 26 - 1);
let hi = (f2 >>. 12ul) |. (f3 <<. 14ul) |. (f4 <<. 40ul) in
FStar.Math.Lemmas.lemma_div_lt (v f2) 26 12;
assert (v f2 / pow2 12 < pow2 14);
assert (v (f3 <<. 14ul) == v f3 * pow2 14 % pow2 64);
FStar.Math.L... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 66,
"end_line": 415,
"start_col": 0,
"start_line": 392
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Hacl.Spec.Poly1305.Field32xN.tup64_5 -> hi: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma (requires Hacl.Spec.Poly1305.Field32xN.tup64_fits5 f (1, 1, 1, 1, 1))
(ensures
(let _ = f in
(let FStar.Pervasives.Native.Mktuple5 #_ #_ #_ #_ #_ _ _ f2 f3 f4 = _ in
let hi = f2 >>. 12ul |.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Poly1305.Field32xN.tup64_5",
"Lib.IntTypes.uint64",
"Lib.IntTypes.logor_disjoint",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Bar_Dot",
"Lib.IntTypes.op_Greater_Greater_Dot",
"FStar.UInt32.__uint_to_t",
"Lib.IntTypes.op_Less_Less_Dot",
"Prims.unit",
"Prims._assert",
"P... | [] | false | false | true | false | false | let lemma_store_felem_hi f hi =
| let f0, f1, f2, f3, f4 = f in
assert_norm (max26 = pow2 26 - 1);
let hi = (f2 >>. 12ul) |. (f3 <<. 14ul) |. (f4 <<. 40ul) in
FStar.Math.Lemmas.lemma_div_lt (v f2) 26 12;
assert (v f2 / pow2 12 < pow2 14);
assert (v (f3 <<. 14ul) == v f3 * pow2 14 % pow2 64);
FStar.Math.Lemmas.lemma_mult_le_right (pow2 14) (v f3) (pow2 ... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_u128_div64_max48 | val lemma_u128_div64_max48: md:pos -> a:uint128 -> Lemma
(requires v a <= md * (max48 * max48))
(ensures v a / pow2 64 <= md * pow2 32) | val lemma_u128_div64_max48: md:pos -> a:uint128 -> Lemma
(requires v a <= md * (max48 * max48))
(ensures v a / pow2 64 <= md * pow2 32) | let lemma_u128_div64_max48 md a =
assert_norm (max48 < pow2 48);
ML.lemma_ab_lt_cd max48 max48 (pow2 48) (pow2 48);
Math.Lemmas.pow2_plus 48 48;
assert (max48 * max48 < pow2 96);
Math.Lemmas.lemma_mult_le_left md (max48 * max48) (pow2 96);
assert (v a < md * pow2 96);
Math.Lemmas.lemma_div_le (v a) (md *... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 62,
"end_line": 416,
"start_col": 0,
"start_line": 406
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | md: Prims.pos -> a: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v a <=
md * (Hacl.Spec.K256.Field52.Definitions.max48 * Hacl.Spec.K256.Field52.Definitions.max48))
(ensures Lib.IntTypes.v a / Prims.pow2 64 <= md * Prims.pow2 32) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.IntTypes.uint128",
"FStar.Math.Lemmas.multiple_division_lemma",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.unit",
"FStar.Math.Lemmas.pow2_plus",
"FStar.Math.Lemmas.lemma_div_le",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims._assert",
"Prims.b2t",
"Prim... | [] | true | false | true | false | false | let lemma_u128_div64_max48 md a =
| assert_norm (max48 < pow2 48);
ML.lemma_ab_lt_cd max48 max48 (pow2 48) (pow2 48);
Math.Lemmas.pow2_plus 48 48;
assert (max48 * max48 < pow2 96);
Math.Lemmas.lemma_mult_le_left md (max48 * max48) (pow2 96);
assert (v a < md * pow2 96);
Math.Lemmas.lemma_div_le (v a) (md * pow2 96) (pow2 64);
Math.Lemmas.pow2_plus 64 32;... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_two_mul64_wide52 | val lemma_add_two_mul64_wide52 (md:nat) (d:uint128) (a0 a1 b0 b1:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 4097 /\
felem_fits1 a0 64 /\ felem_fits1 b0 64 /\
felem_fits1 a1 64 /\ felem_fits1 b1 64)
(ensures
(let d1 = d +. mul64_wide a0 b1 +. mul64_wide a1 b0 in
v d1 == v d + v a0 * v b1... | val lemma_add_two_mul64_wide52 (md:nat) (d:uint128) (a0 a1 b0 b1:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 4097 /\
felem_fits1 a0 64 /\ felem_fits1 b0 64 /\
felem_fits1 a1 64 /\ felem_fits1 b1 64)
(ensures
(let d1 = d +. mul64_wide a0 b1 +. mul64_wide a1 b0 in
v d1 == v d + v a0 * v b1... | let lemma_add_two_mul64_wide52 md d a0 a1 b0 b1 =
lemma_bound_mul64_wide 64 64 max52 max52 a0 b1;
lemma_bound_mul64_wide 64 64 max52 max52 a1 b0;
assert (v d + v a0 * v b1 + v a1 * v b0 <= md * max52 + 8192 * (max52 * max52));
calc (<=) {
md * max52 + 8192 * (max52 * max52);
(<=) { assert_norm (4097 < ... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 68,
"end_line": 233,
"start_col": 0,
"start_line": 218
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a0: Lib.IntTypes.uint64 ->
a1: Lib.IntTypes.uint64 ->
b0: Lib.IntTypes.uint64 ->
b1: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <= md * Hacl.Spec.K256.Field52.Definitions.max52 /\ md <= 4097 /\
Hac... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Pr... | [] | false | false | true | false | false | let lemma_add_two_mul64_wide52 md d a0 a1 b0 b1 =
| lemma_bound_mul64_wide 64 64 max52 max52 a0 b1;
lemma_bound_mul64_wide 64 64 max52 max52 a1 b0;
assert (v d + v a0 * v b1 + v a1 * v b0 <= md * max52 + 8192 * (max52 * max52));
calc ( <= ) {
md * max52 + 8192 * (max52 * max52);
( <= ) { (assert_norm (4097 < max52);
Math.Lemmas.lemma_mult_le_right max52 md max52... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_d10 | val lemma_bound_d10: d10:uint128 -> Lemma
(requires v d10 <= 513 * (max52 * max52))
(ensures v d10 / pow2 64 < pow2 50) | val lemma_bound_d10: d10:uint128 -> Lemma
(requires v d10 <= 513 * (max52 * max52))
(ensures v d10 / pow2 64 < pow2 50) | let lemma_bound_d10 d10 =
lemma_u128_div64_max52 513 d10;
assert_norm (513 < pow2 10);
Math.Lemmas.lemma_mult_le_right (pow2 38) 513 (pow2 10);
Math.Lemmas.pow2_plus 10 40 | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 29,
"end_line": 454,
"start_col": 0,
"start_line": 450
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | d10: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d10 <=
513 * (Hacl.Spec.K256.Field52.Definitions.max52 * Hacl.Spec.K256.Field52.Definitions.max52))
(ensures Lib.IntTypes.v d10 / Prims.pow2 64 < Prims.pow2 50) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint128",
"FStar.Math.Lemmas.pow2_plus",
"Prims.unit",
"FStar.Math.Lemmas.lemma_mult_le_right",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_u128_div64_max52"
] | [] | true | false | true | false | false | let lemma_bound_d10 d10 =
| lemma_u128_div64_max52 513 d10;
assert_norm (513 < pow2 10);
Math.Lemmas.lemma_mult_le_right (pow2 38) 513 (pow2 10);
Math.Lemmas.pow2_plus 10 40 | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_add_mul64_wide_r_lsh12 | val lemma_bound_add_mul64_wide_r_lsh12 (md:nat) (d:uint128) (c:uint64) : Lemma
(requires v d <= md * (max52 * max52) /\ md <= 12801 /\ v c <= pow2 44)
(ensures (let r = d +. mul64_wide (u64 0x1000003D10 <<. 12ul) c in
v r = v d + 0x1000003D10 * pow2 12 * v c /\ v r <= (md + 1) * (max52 * max52))) | val lemma_bound_add_mul64_wide_r_lsh12 (md:nat) (d:uint128) (c:uint64) : Lemma
(requires v d <= md * (max52 * max52) /\ md <= 12801 /\ v c <= pow2 44)
(ensures (let r = d +. mul64_wide (u64 0x1000003D10 <<. 12ul) c in
v r = v d + 0x1000003D10 * pow2 12 * v c /\ v r <= (md + 1) * (max52 * max52))) | let lemma_bound_add_mul64_wide_r_lsh12 md d c =
let rs = u64 0x1000003D10 <<. 12ul in
lemma_r_lsh12 ();
Math.Lemmas.pow2_lt_compat 45 44;
lemma_add_mul64_wide 49 45 md d rs c | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 38,
"end_line": 347,
"start_col": 0,
"start_line": 343
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | md: Prims.nat -> d: Lib.IntTypes.uint128 -> c: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <=
md * (Hacl.Spec.K256.Field52.Definitions.max52 * Hacl.Spec.K256.Field52.Definitions.max52) /\
md <= 12801 /\ Lib.IntTypes.v c <= Prims.pow2 44)
(ensures
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_add_mul64_wide",
"Prims.unit",
"FStar.Math.Lemmas.pow2_lt_compat",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_r_lsh12",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Less... | [] | true | false | true | false | false | let lemma_bound_add_mul64_wide_r_lsh12 md d c =
| let rs = u64 0x1000003D10 <<. 12ul in
lemma_r_lsh12 ();
Math.Lemmas.pow2_lt_compat 45 44;
lemma_add_mul64_wide 49 45 md d rs c | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_lemma_f2 | val load_tup64_lemma_f2: lo:uint64 -> hi:uint64 -> Lemma
(v ((lo >>. 52ul) |. ((hi &. u64 0x3fff) <<. 12ul)) ==
v lo / pow2 52 + (v hi % pow2 14) * pow2 12) | val load_tup64_lemma_f2: lo:uint64 -> hi:uint64 -> Lemma
(v ((lo >>. 52ul) |. ((hi &. u64 0x3fff) <<. 12ul)) ==
v lo / pow2 52 + (v hi % pow2 14) * pow2 12) | let load_tup64_lemma_f2 lo hi =
let f2 = (lo >>. 52ul) |. ((hi &. u64 0x3fff) <<. 12ul) in
let tmp = (hi &. u64 0x3fff) in
calc (==) {
v (tmp <<. 12ul) % pow2 12;
(==) { shift_left_lemma (hi &. u64 0x3fff) 12ul }
(v tmp * pow2 12 % pow2 64) % pow2 12;
(==) { assert_norm (pow2 64 = pow2 12 * pow2 52) ... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 62,
"end_line": 164,
"start_col": 0,
"start_line": 126
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | lo: Lib.IntTypes.uint64 -> hi: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(ensures
Lib.IntTypes.v (lo >>. 52ul |. (hi &. Lib.IntTypes.u64 0x3fff) <<. 12ul) ==
Lib.IntTypes.v lo / Prims.pow2 52 + (Lib.IntTypes.v hi % Prims.pow2 14) * Prims.pow2 12) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.op_Addition",
"Prims.op_Division",
"Prims.pow2",
"FStar.Mul.op_Star",
"Prims.op_Modulus",
"Prims.unit",
"FStar.Math.Lemmas.small_modulo_lemma_1",
"FStar.Perv... | [] | false | false | true | false | false | let load_tup64_lemma_f2 lo hi =
| let f2 = (lo >>. 52ul) |. ((hi &. u64 0x3fff) <<. 12ul) in
let tmp = (hi &. u64 0x3fff) in
calc ( == ) {
v (tmp <<. 12ul) % pow2 12;
( == ) { shift_left_lemma (hi &. u64 0x3fff) 12ul }
(v tmp * pow2 12 % pow2 64) % pow2 12;
( == ) { assert_norm (pow2 64 = pow2 12 * pow2 52) }
(v tmp * pow2 12 % (pow2 12 * pow... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_lemma0_lo | val load_tup64_lemma0_lo: lo:uint64 ->
Lemma
(v lo % pow2 26 + ((v lo / pow2 26) % pow2 26) * pow26 +
v lo / pow2 52 * pow52 == v lo) | val load_tup64_lemma0_lo: lo:uint64 ->
Lemma
(v lo % pow2 26 + ((v lo / pow2 26) % pow2 26) * pow26 +
v lo / pow2 52 * pow52 == v lo) | let load_tup64_lemma0_lo lo =
calc (==) {
v lo % pow2 26 + ((v lo / pow2 26) % pow2 26) * pow26 + v lo / pow2 52 * pow52;
(==) { FStar.Math.Lemmas.pow2_modulo_modulo_lemma_1 (v lo) 26 52 }
(v lo % pow2 52) % pow2 26 + ((v lo / pow2 26) % pow2 26) * pow2 26 + v lo / pow2 52 * pow2 52;
(==) { FStar.Math.Lem... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 35,
"start_col": 0,
"start_line": 24
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | lo: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(ensures
Lib.IntTypes.v lo % Prims.pow2 26 +
(Lib.IntTypes.v lo / Prims.pow2 26 % Prims.pow2 26) * Hacl.Spec.Poly1305.Field32xN.pow26 +
(Lib.IntTypes.v lo / Prims.pow2 52) * Hacl.Spec.Poly1305.Field32xN.pow52 ==
Lib.IntTypes.v lo) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Addition",
"Prims.op_Modulus",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.pow2",
"FStar.Mul.op_Star",
"Prims.op_Division",
"Hacl.Spec.Poly1305.Field32xN.pow26",
"Hacl.Spec.Poly1305.Fi... | [] | false | false | true | false | false | let load_tup64_lemma0_lo lo =
| calc ( == ) {
v lo % pow2 26 + ((v lo / pow2 26) % pow2 26) * pow26 + (v lo / pow2 52) * pow52;
( == ) { FStar.Math.Lemmas.pow2_modulo_modulo_lemma_1 (v lo) 26 52 }
(v lo % pow2 52) % pow2 26 + ((v lo / pow2 26) % pow2 26) * pow2 26 + (v lo / pow2 52) * pow2 52;
( == ) { FStar.Math.Lemmas.pow2_modulo_division_l... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_u128_div52 | val lemma_u128_div52: md:pos -> a:uint128 -> Lemma
(requires v a <= md * max52 * max52)
(ensures v a / pow2 52 <= md * max52) | val lemma_u128_div52: md:pos -> a:uint128 -> Lemma
(requires v a <= md * max52 * max52)
(ensures v a / pow2 52 <= md * max52) | let lemma_u128_div52 md a =
Math.Lemmas.lemma_mult_lt_left (md * max52) max52 (pow2 52);
Math.Lemmas.lemma_div_le (v a) (md * max52 * pow2 52) (pow2 52);
Math.Lemmas.multiple_division_lemma (md * max52) (pow2 52) | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 60,
"end_line": 399,
"start_col": 0,
"start_line": 396
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | md: Prims.pos -> a: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v a <=
(md * Hacl.Spec.K256.Field52.Definitions.max52) * Hacl.Spec.K256.Field52.Definitions.max52)
(ensures Lib.IntTypes.v a / Prims.pow2 52 <= md * Hacl.Spec.K256.Field52.Definitions.max52) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.IntTypes.uint128",
"FStar.Math.Lemmas.multiple_division_lemma",
"FStar.Mul.op_Star",
"Hacl.Spec.K256.Field52.Definitions.max52",
"Prims.pow2",
"Prims.unit",
"FStar.Math.Lemmas.lemma_div_le",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Math.Lemmas.lemma_m... | [] | true | false | true | false | false | let lemma_u128_div52 md a =
| Math.Lemmas.lemma_mult_lt_left (md * max52) max52 (pow2 52);
Math.Lemmas.lemma_div_le (v a) ((md * max52) * pow2 52) (pow2 52);
Math.Lemmas.multiple_division_lemma (md * max52) (pow2 52) | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_five_mul64_wide | val lemma_add_five_mul64_wide (md:nat) (d:uint128) (a0 a1 a2 a3 a4 b0 b1 b2 b3 b4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 16385 /\
felem_fits1 a0 64 /\ felem_fits1 b0 64 /\
felem_fits1 a1 64 /\ felem_fits1 b1 64 /\
felem_fits1 a2 64 /\ felem_fits1 b2 64 /\
felem_fits1 a3 64 /\ felem_f... | val lemma_add_five_mul64_wide (md:nat) (d:uint128) (a0 a1 a2 a3 a4 b0 b1 b2 b3 b4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 16385 /\
felem_fits1 a0 64 /\ felem_fits1 b0 64 /\
felem_fits1 a1 64 /\ felem_fits1 b1 64 /\
felem_fits1 a2 64 /\ felem_fits1 b2 64 /\
felem_fits1 a3 64 /\ felem_f... | let lemma_add_five_mul64_wide md d a0 a1 a2 a3 a4 b0 b1 b2 b3 b4 =
lemma_bound_mul64_wide 64 64 max52 max48 a0 b4;
lemma_bound_mul64_wide 64 64 max52 max52 a1 b3;
lemma_bound_mul64_wide 64 64 max52 max52 a2 b2;
lemma_bound_mul64_wide 64 64 max52 max52 a3 b1;
lemma_bound_mul64_wide 64 64 max48 max52 a4 b0;
M... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 110,
"end_line": 100,
"start_col": 0,
"start_line": 75
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a0: Lib.IntTypes.uint64 ->
a1: Lib.IntTypes.uint64 ->
a2: Lib.IntTypes.uint64 ->
a3: Lib.IntTypes.uint64 ->
a4: Lib.IntTypes.uint64 ->
b0: Lib.IntTypes.uint64 ->
b1: Lib.IntTypes.uint64 ->
b2: Lib.IntTypes.uint64 ->
b3: Lib.IntType... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Pr... | [] | false | false | true | false | false | let lemma_add_five_mul64_wide md d a0 a1 a2 a3 a4 b0 b1 b2 b3 b4 =
| lemma_bound_mul64_wide 64 64 max52 max48 a0 b4;
lemma_bound_mul64_wide 64 64 max52 max52 a1 b3;
lemma_bound_mul64_wide 64 64 max52 max52 a2 b2;
lemma_bound_mul64_wide 64 64 max52 max52 a3 b1;
lemma_bound_mul64_wide 64 64 max48 max52 a4 b0;
Math.Lemmas.swap_mul max52 max48;
assert (v d + v a0 * v b4 + v a1 * v b3 + v a2... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_add_mul64_wide_r | val lemma_bound_add_mul64_wide_r (md:nat) (d c:uint128) : Lemma
(requires v d <= md * (max52 * max52) /\ md <= 16384)
(ensures (let r = d +. mul64_wide (u64 0x1000003D10) (to_u64 c) in
v r = v d + 0x1000003D10 * (v c % pow2 64) /\ v r <= (md + 1) * (max52 * max52))) | val lemma_bound_add_mul64_wide_r (md:nat) (d c:uint128) : Lemma
(requires v d <= md * (max52 * max52) /\ md <= 16384)
(ensures (let r = d +. mul64_wide (u64 0x1000003D10) (to_u64 c) in
v r = v d + 0x1000003D10 * (v c % pow2 64) /\ v r <= (md + 1) * (max52 * max52))) | let lemma_bound_add_mul64_wide_r md d c =
assert_norm (0x1000003D10 < pow2 37);
lemma_add_mul64_wide 37 64 md d (u64 0x1000003D10) (to_u64 c) | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 63,
"end_line": 335,
"start_col": 0,
"start_line": 333
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | md: Prims.nat -> d: Lib.IntTypes.uint128 -> c: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <=
md * (Hacl.Spec.K256.Field52.Definitions.max52 * Hacl.Spec.K256.Field52.Definitions.max52) /\
md <= 16384)
(ensures
(let r =
d +. Lib.IntT... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_add_mul64_wide",
"Lib.IntTypes.u64",
"Lib.IntTypes.to_u64",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2"
] | [] | true | false | true | false | false | let lemma_bound_add_mul64_wide_r md d c =
| assert_norm (0x1000003D10 < pow2 37);
lemma_add_mul64_wide 37 64 md d (u64 0x1000003D10) (to_u64 c) | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_u128_to_u64_mask52 | val lemma_u128_to_u64_mask52: d:uint128 ->
Lemma (let r = to_u64 d &. mask52 in
v r = v d % pow2 52 /\ felem_fits1 r 1) | val lemma_u128_to_u64_mask52: d:uint128 ->
Lemma (let r = to_u64 d &. mask52 in
v r = v d % pow2 52 /\ felem_fits1 r 1) | let lemma_u128_to_u64_mask52 d =
let r = to_u64 d &. mask52 in
LD.lemma_mask52 (to_u64 d);
assert (v r = v d % pow2 64 % pow2 52);
Math.Lemmas.pow2_modulo_modulo_lemma_1 (v d) 52 64 | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 52,
"end_line": 475,
"start_col": 0,
"start_line": 471
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | d: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma
(ensures
(let r = Lib.IntTypes.to_u64 d &. Hacl.Spec.K256.Field52.Definitions.mask52 in
Lib.IntTypes.v r = Lib.IntTypes.v d % Prims.pow2 52 /\
Hacl.Spec.K256.Field52.Definitions.felem_fits1 r 1)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint128",
"FStar.Math.Lemmas.pow2_modulo_modulo_lemma_1",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"Prims._assert",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Lib.IntTypes.U64",
"Prims.op_Modulus",
"Prims.pow2",
"Hacl.Spec.K256.Field52.Def... | [] | true | false | true | false | false | let lemma_u128_to_u64_mask52 d =
| let r = to_u64 d &. mask52 in
LD.lemma_mask52 (to_u64 d);
assert (v r = v d % pow2 64 % pow2 52);
Math.Lemmas.pow2_modulo_modulo_lemma_1 (v d) 52 64 | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_two_mul64_wide | val lemma_add_two_mul64_wide (md:nat) (d:uint128) (a3 a4 b3 b4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 8193 /\
felem_fits1 a3 64 /\ felem_fits1 b3 64 /\
felem_fits_last1 a4 64 /\ felem_fits_last1 b4 64)
(ensures
(let d1 = d +. mul64_wide a3 b4 +. mul64_wide a4 b3 in
v d1 == v d + v a... | val lemma_add_two_mul64_wide (md:nat) (d:uint128) (a3 a4 b3 b4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 8193 /\
felem_fits1 a3 64 /\ felem_fits1 b3 64 /\
felem_fits_last1 a4 64 /\ felem_fits_last1 b4 64)
(ensures
(let d1 = d +. mul64_wide a3 b4 +. mul64_wide a4 b3 in
v d1 == v d + v a... | let lemma_add_two_mul64_wide md d a3 a4 b3 b4 =
lemma_bound_mul64_wide 64 64 max52 max48 a3 b4;
lemma_bound_mul64_wide 64 64 max48 max52 a4 b3;
Math.Lemmas.swap_mul max52 max48;
assert (v d + v a3 * v b4 + v a4 * v b3 <= md * max52 + 8192 * (max52 * max48));
calc (<) {
md * max52 + 8192 * (max52 * max48)... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 68,
"end_line": 264,
"start_col": 0,
"start_line": 246
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a3: Lib.IntTypes.uint64 ->
a4: Lib.IntTypes.uint64 ->
b3: Lib.IntTypes.uint64 ->
b4: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <= md * Hacl.Spec.K256.Field52.Definitions.max52 /\ md <= 8193 /\
Hac... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Pr... | [] | false | false | true | false | false | let lemma_add_two_mul64_wide md d a3 a4 b3 b4 =
| lemma_bound_mul64_wide 64 64 max52 max48 a3 b4;
lemma_bound_mul64_wide 64 64 max48 max52 a4 b3;
Math.Lemmas.swap_mul max52 max48;
assert (v d + v a3 * v b4 + v a4 * v b3 <= md * max52 + 8192 * (max52 * max48));
calc ( < ) {
md * max52 + 8192 * (max52 * max48);
( < ) { lemma_16_max52_max48 512 }
md * max52 + 512 *... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_u128_div64_max52 | val lemma_u128_div64_max52: md:pos -> a:uint128 -> Lemma
(requires v a <= md * (max52 * max52))
(ensures v a / pow2 64 <= md * pow2 40) | val lemma_u128_div64_max52: md:pos -> a:uint128 -> Lemma
(requires v a <= md * (max52 * max52))
(ensures v a / pow2 64 <= md * pow2 40) | let lemma_u128_div64_max52 md a =
assert_norm (max52 < pow2 52);
ML.lemma_ab_lt_cd max52 max52 (pow2 52) (pow2 52);
Math.Lemmas.pow2_plus 52 52;
assert (max52 * max52 < pow2 104);
Math.Lemmas.lemma_mult_le_left md (max52 * max52) (pow2 104);
assert (v a < md * pow2 104);
Math.Lemmas.lemma_div_le (v a) (m... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 62,
"end_line": 433,
"start_col": 0,
"start_line": 423
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | md: Prims.pos -> a: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v a <=
md * (Hacl.Spec.K256.Field52.Definitions.max52 * Hacl.Spec.K256.Field52.Definitions.max52))
(ensures Lib.IntTypes.v a / Prims.pow2 64 <= md * Prims.pow2 40) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.IntTypes.uint128",
"FStar.Math.Lemmas.multiple_division_lemma",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.unit",
"FStar.Math.Lemmas.pow2_plus",
"FStar.Math.Lemmas.lemma_div_le",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims._assert",
"Prims.b2t",
"Prim... | [] | true | false | true | false | false | let lemma_u128_div64_max52 md a =
| assert_norm (max52 < pow2 52);
ML.lemma_ab_lt_cd max52 max52 (pow2 52) (pow2 52);
Math.Lemmas.pow2_plus 52 52;
assert (max52 * max52 < pow2 104);
Math.Lemmas.lemma_mult_le_left md (max52 * max52) (pow2 104);
assert (v a < md * pow2 104);
Math.Lemmas.lemma_div_le (v a) (md * pow2 104) (pow2 64);
Math.Lemmas.pow2_plus 64... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_three_mul64_wide | val lemma_add_three_mul64_wide (md:nat) (d:uint128) (a2 a3 a4 b2 b3 b4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 8705 /\
felem_fits1 a2 64 /\ felem_fits1 b2 64 /\
felem_fits1 a3 64 /\ felem_fits1 b3 64 /\
felem_fits_last1 a4 64 /\ felem_fits_last1 b4 64)
(ensures
(let d1 = d +. mul64_w... | val lemma_add_three_mul64_wide (md:nat) (d:uint128) (a2 a3 a4 b2 b3 b4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 8705 /\
felem_fits1 a2 64 /\ felem_fits1 b2 64 /\
felem_fits1 a3 64 /\ felem_fits1 b3 64 /\
felem_fits_last1 a4 64 /\ felem_fits_last1 b4 64)
(ensures
(let d1 = d +. mul64_w... | let lemma_add_three_mul64_wide md d a2 a3 a4 b2 b3 b4 =
lemma_bound_mul64_wide 64 64 max52 max48 a2 b4;
lemma_bound_mul64_wide 64 64 max52 max52 a3 b3;
lemma_bound_mul64_wide 64 64 max48 max52 a4 b2;
Math.Lemmas.swap_mul max52 max48;
assert (v d + v a2 * v b4 + v a3 * v b3 + v a4 * v b2 <=
md * max52 + 81... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 82,
"end_line": 205,
"start_col": 0,
"start_line": 184
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a2: Lib.IntTypes.uint64 ->
a3: Lib.IntTypes.uint64 ->
a4: Lib.IntTypes.uint64 ->
b2: Lib.IntTypes.uint64 ->
b3: Lib.IntTypes.uint64 ->
b4: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <= md * Hacl.Sp... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Pr... | [] | false | false | true | false | false | let lemma_add_three_mul64_wide md d a2 a3 a4 b2 b3 b4 =
| lemma_bound_mul64_wide 64 64 max52 max48 a2 b4;
lemma_bound_mul64_wide 64 64 max52 max52 a3 b3;
lemma_bound_mul64_wide 64 64 max48 max52 a4 b2;
Math.Lemmas.swap_mul max52 max48;
assert (v d + v a2 * v b4 + v a3 * v b3 + v a4 * v b2 <=
md * max52 + 8192 * (max52 * max48) + 4096 * (max52 * max52));
calc ( < ) {
md ... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_mul64_wide | val lemma_add_mul64_wide (pa pb md:nat) (d:uint128) (a b:uint64) : Lemma
(requires
v a < pow2 pa /\ v b < pow2 pb /\ md + 1 <= 16385 /\ // md + 1 <= pow2 24
v d <= md * (max52 * max52) /\ pa + pb <= 103)
(ensures (let r = d +. mul64_wide a b in
v r = v d + v a * v b /\ v r <= (md + 1) * (max52 * max52))... | val lemma_add_mul64_wide (pa pb md:nat) (d:uint128) (a b:uint64) : Lemma
(requires
v a < pow2 pa /\ v b < pow2 pb /\ md + 1 <= 16385 /\ // md + 1 <= pow2 24
v d <= md * (max52 * max52) /\ pa + pb <= 103)
(ensures (let r = d +. mul64_wide a b in
v r = v d + v a * v b /\ v r <= (md + 1) * (max52 * max52))... | let lemma_add_mul64_wide pa pb md d a b =
let r = d +. mul64_wide a b in
lemma_bound_mul64_wide 1 1 (pow2 pa) (pow2 pb) a b;
assert (v d + v a * v b <= md * (max52 * max52) + pow2 pa * pow2 pb);
calc (<) {
md * (max52 * max52) + pow2 pa * pow2 pb;
(==) { Math.Lemmas.pow2_plus pa pb }
md * (max52 * ... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 52,
"end_line": 325,
"start_col": 0,
"start_line": 306
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
pa: Prims.nat ->
pb: Prims.nat ->
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a: Lib.IntTypes.uint64 ->
b: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v a < Prims.pow2 pa /\ Lib.IntTypes.v b < Prims.pow2 pb /\ md + 1 <= 16385 /\
Lib.IntTypes.v d ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Pr... | [] | false | false | true | false | false | let lemma_add_mul64_wide pa pb md d a b =
| let r = d +. mul64_wide a b in
lemma_bound_mul64_wide 1 1 (pow2 pa) (pow2 pb) a b;
assert (v d + v a * v b <= md * (max52 * max52) + pow2 pa * pow2 pb);
calc ( < ) {
md * (max52 * max52) + pow2 pa * pow2 pb;
( == ) { Math.Lemmas.pow2_plus pa pb }
md * (max52 * max52) + pow2 (pa + pb);
( <= ) { Math.Lemmas.pow2_... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_add_mul64_wide_r_rsh4 | val lemma_bound_add_mul64_wide_r_rsh4 (md:nat) (d:uint128) (c:uint64) : Lemma
(requires v d <= md * (max52 * max52) /\ md <= 4096 /\ v c < pow2 56)
(ensures (let r = d +. mul64_wide c (u64 0x1000003D10 >>. 4ul) in
v r = v d + v c * (0x1000003D10 / pow2 4) /\ v r <= (md + 1) * (max52 * max52))) | val lemma_bound_add_mul64_wide_r_rsh4 (md:nat) (d:uint128) (c:uint64) : Lemma
(requires v d <= md * (max52 * max52) /\ md <= 4096 /\ v c < pow2 56)
(ensures (let r = d +. mul64_wide c (u64 0x1000003D10 >>. 4ul) in
v r = v d + v c * (0x1000003D10 / pow2 4) /\ v r <= (md + 1) * (max52 * max52))) | let lemma_bound_add_mul64_wide_r_rsh4 md d c =
let rs = u64 0x1000003D10 >>. 4ul in
lemma_r_rsh4 ();
lemma_add_mul64_wide 33 56 md d rs c | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 38,
"end_line": 358,
"start_col": 0,
"start_line": 355
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | md: Prims.nat -> d: Lib.IntTypes.uint128 -> c: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <=
md * (Hacl.Spec.K256.Field52.Definitions.max52 * Hacl.Spec.K256.Field52.Definitions.max52) /\
md <= 4096 /\ Lib.IntTypes.v c < Prims.pow2 56)
(ensures
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_add_mul64_wide",
"Prims.unit",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_r_rsh4",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Greater_Greater_Dot",
"Lib.IntTypes.u64",... | [] | true | false | true | false | false | let lemma_bound_add_mul64_wide_r_rsh4 md d c =
| let rs = u64 0x1000003D10 >>. 4ul in
lemma_r_rsh4 ();
lemma_add_mul64_wide 33 56 md d rs c | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5_ | val lset_bit5_:
f:lseq uint64 5
-> i:size_nat{i <= 128} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(forall (i:nat). i < 5 ... | val lset_bit5_:
f:lseq uint64 5
-> i:size_nat{i <= 128} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(forall (i:nat). i < 5 ... | let lset_bit5_ f i =
let ind = i / 26 in
let j = i % 26 in
FStar.Math.Lemmas.euclidean_division_definition i 26;
assert (i == ind * 26 + j);
match ind with
| 0 -> lset_bit5_lemma0 f i
| 1 -> lset_bit5_lemma1 f i
| 2 -> lset_bit5_lemma2 f i
| 3 -> lset_bit5_lemma3 f i
| 4 -> lset_bit5_lemma4 f i | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 29,
"end_line": 780,
"start_col": 0,
"start_line": 769
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Lib.Sequence.lseq Lib.IntTypes.uint64 5 -> i: Lib.IntTypes.size_nat{i <= 128}
-> FStar.Pervasives.Lemma
(requires
(forall (i: Prims.nat).
i < 5 ==> Lib.IntTypes.v f.[ i ] <= Hacl.Spec.Poly1305.Field32xN.max26) /\
Hacl.Spec.Poly1305.Field32xN.as_nat5 (f.[ 0 ], f.[ 1 ], f.[ 2 ], f.[... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.Sequence.lseq",
"Lib.IntTypes.uint64",
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5_lemma0",
"Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5_lemma1",
"Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5_lemma2",
"Hacl.Poly1305.Field32xN.Lemmas2.l... | [] | false | false | true | false | false | let lset_bit5_ f i =
| let ind = i / 26 in
let j = i % 26 in
FStar.Math.Lemmas.euclidean_division_definition i 26;
assert (i == ind * 26 + j);
match ind with
| 0 -> lset_bit5_lemma0 f i
| 1 -> lset_bit5_lemma1 f i
| 2 -> lset_bit5_lemma2 f i
| 3 -> lset_bit5_lemma3 f i
| 4 -> lset_bit5_lemma4 f i | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_four_mul64_wide | val lemma_add_four_mul64_wide (md:nat) (d:uint128) (a1 a2 a3 a4 b1 b2 b3 b4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 12802 /\
felem_fits1 a1 64 /\ felem_fits1 b1 64 /\
felem_fits1 a2 64 /\ felem_fits1 b2 64 /\
felem_fits1 a3 64 /\ felem_fits1 b3 64 /\
felem_fits_last1 a4 64 /\ felem_fi... | val lemma_add_four_mul64_wide (md:nat) (d:uint128) (a1 a2 a3 a4 b1 b2 b3 b4:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 12802 /\
felem_fits1 a1 64 /\ felem_fits1 b1 64 /\
felem_fits1 a2 64 /\ felem_fits1 b2 64 /\
felem_fits1 a3 64 /\ felem_fits1 b3 64 /\
felem_fits_last1 a4 64 /\ felem_fi... | let lemma_add_four_mul64_wide md d a1 a2 a3 a4 b1 b2 b3 b4 =
lemma_bound_mul64_wide 64 64 max52 max48 a1 b4;
lemma_bound_mul64_wide 64 64 max52 max52 a2 b3;
lemma_bound_mul64_wide 64 64 max52 max52 a3 b2;
lemma_bound_mul64_wide 64 64 max48 max52 a4 b1;
assert (v d + v a1 * v b4 + v a2 * v b3 + v a3 * v b2 + v... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 96,
"end_line": 138,
"start_col": 0,
"start_line": 116
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a1: Lib.IntTypes.uint64 ->
a2: Lib.IntTypes.uint64 ->
a3: Lib.IntTypes.uint64 ->
a4: Lib.IntTypes.uint64 ->
b1: Lib.IntTypes.uint64 ->
b2: Lib.IntTypes.uint64 ->
b3: Lib.IntTypes.uint64 ->
b4: Lib.IntTypes.uint64
-> FStar.Pervasives.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Pr... | [] | false | false | true | false | false | let lemma_add_four_mul64_wide md d a1 a2 a3 a4 b1 b2 b3 b4 =
| lemma_bound_mul64_wide 64 64 max52 max48 a1 b4;
lemma_bound_mul64_wide 64 64 max52 max52 a2 b3;
lemma_bound_mul64_wide 64 64 max52 max52 a3 b2;
lemma_bound_mul64_wide 64 64 max48 max52 a4 b1;
assert (v d + v a1 * v b4 + v a2 * v b3 + v a3 * v b2 + v a4 * v b1 <=
md * max52 + 8192 * (max52 * max48) + 8192 * (max52 *... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_mask48_rsh48 | val lemma_bound_mask48_rsh48: t4:uint64 -> Lemma
(requires felem_fits1 t4 1)
(ensures (let tx = t4 >>. 48ul in let r = t4 &. mask48 in
v tx = v t4 / pow2 48 /\ v r = v t4 % pow2 48 /\
felem_fits_last1 r 1 /\ v tx < pow2 4)) | val lemma_bound_mask48_rsh48: t4:uint64 -> Lemma
(requires felem_fits1 t4 1)
(ensures (let tx = t4 >>. 48ul in let r = t4 &. mask48 in
v tx = v t4 / pow2 48 /\ v r = v t4 % pow2 48 /\
felem_fits_last1 r 1 /\ v tx < pow2 4)) | let lemma_bound_mask48_rsh48 t4 =
LD.lemma_mask48 t4;
Math.Lemmas.lemma_div_lt (v t4) 52 48 | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 510,
"start_col": 0,
"start_line": 508
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | t4: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma (requires Hacl.Spec.K256.Field52.Definitions.felem_fits1 t4 1)
(ensures
(let tx = t4 >>. 48ul in
let r = t4 &. Hacl.Spec.K256.Field52.Definitions.mask48 in
Lib.IntTypes.v tx = Lib.IntTypes.v t4 / Prims.pow2 48 /\
Lib.IntType... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.lemma_div_lt",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.unit",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.lemma_mask48"
] | [] | true | false | true | false | false | let lemma_bound_mask48_rsh48 t4 =
| LD.lemma_mask48 t4;
Math.Lemmas.lemma_div_lt (v t4) 52 48 | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_add_three_mul64_wide52 | val lemma_add_three_mul64_wide52 (md:nat) (d:uint128) (a0 a1 a2 b0 b1 b2:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 8194 /\
felem_fits1 a0 64 /\ felem_fits1 b0 64 /\
felem_fits1 a1 64 /\ felem_fits1 b1 64 /\
felem_fits1 a2 64 /\ felem_fits1 b2 64)
(ensures
(let d1 = d +. mul64_wide a0 b... | val lemma_add_three_mul64_wide52 (md:nat) (d:uint128) (a0 a1 a2 b0 b1 b2:uint64) : Lemma
(requires
v d <= md * max52 /\ md <= 8194 /\
felem_fits1 a0 64 /\ felem_fits1 b0 64 /\
felem_fits1 a1 64 /\ felem_fits1 b1 64 /\
felem_fits1 a2 64 /\ felem_fits1 b2 64)
(ensures
(let d1 = d +. mul64_wide a0 b... | let lemma_add_three_mul64_wide52 md d a0 a1 a2 b0 b1 b2 =
lemma_bound_mul64_wide 64 64 max52 max52 a0 b2;
lemma_bound_mul64_wide 64 64 max52 max52 a1 b1;
lemma_bound_mul64_wide 64 64 max52 max52 a2 b0;
assert (v d + v a0 * v b2 + v a1 * v b1 + v a2 * v b0 <=
md * max52 + 12288 * (max52 * max52));
calc (<... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 82,
"end_line": 170,
"start_col": 0,
"start_line": 152
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
md: Prims.nat ->
d: Lib.IntTypes.uint128 ->
a0: Lib.IntTypes.uint64 ->
a1: Lib.IntTypes.uint64 ->
a2: Lib.IntTypes.uint64 ->
b0: Lib.IntTypes.uint64 ->
b1: Lib.IntTypes.uint64 ->
b2: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <= md * Hacl.Sp... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Pr... | [] | false | false | true | false | false | let lemma_add_three_mul64_wide52 md d a0 a1 a2 b0 b1 b2 =
| lemma_bound_mul64_wide 64 64 max52 max52 a0 b2;
lemma_bound_mul64_wide 64 64 max52 max52 a1 b1;
lemma_bound_mul64_wide 64 64 max52 max52 a2 b0;
assert (v d + v a0 * v b2 + v a1 * v b1 + v a2 * v b0 <= md * max52 + 12288 * (max52 * max52));
calc ( <= ) {
md * max52 + 12288 * (max52 * max52);
( <= ) { (assert_norm (8... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_rsh64_to | val lemma_bound_rsh64_to: a:uint128 ->
Lemma (v (to_u64 (a >>. 64ul)) = v a / pow2 64) | val lemma_bound_rsh64_to: a:uint128 ->
Lemma (v (to_u64 (a >>. 64ul)) = v a / pow2 64) | let lemma_bound_rsh64_to a =
let r = to_u64 (a >>. 64ul) in
assert (v r == (v a / pow2 64) % pow2 64);
Math.Lemmas.lemma_div_lt (v a) 128 64;
Math.Lemmas.small_mod (v a / pow2 64) (pow2 64) | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 49,
"end_line": 464,
"start_col": 0,
"start_line": 460
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma
(ensures Lib.IntTypes.v (Lib.IntTypes.to_u64 (a >>. 64ul)) = Lib.IntTypes.v a / Prims.pow2 64) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint128",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Division",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.pow2",
"Prims.unit",
"FStar.Math.Lemmas.lemma_div_lt",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.U64",
"Prims.op_Modulus",
"Lib.Int... | [] | true | false | true | false | false | let lemma_bound_rsh64_to a =
| let r = to_u64 (a >>. 64ul) in
assert (v r == (v a / pow2 64) % pow2 64);
Math.Lemmas.lemma_div_lt (v a) 128 64;
Math.Lemmas.small_mod (v a / pow2 64) (pow2 64) | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_4_compact_lemma_f3 | val load_tup64_4_compact_lemma_f3: lo:uint64 -> hi:uint64 -> Lemma
(let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
v ((t3 >>. 30ul) &. u64 0x3ffffff) == (v hi / pow2 14) % pow2 26) | val load_tup64_4_compact_lemma_f3: lo:uint64 -> hi:uint64 -> Lemma
(let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
v ((t3 >>. 30ul) &. u64 0x3ffffff) == (v hi / pow2 14) % pow2 26) | let load_tup64_4_compact_lemma_f3 lo hi =
let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
let f3 = (t3 >>. 30ul) &. u64 0x3ffffff in
Math.Lemmas.lemma_div_lt (v lo) 64 48;
logor_disjoint (lo >>. 48ul) (hi <<. 16ul) 16;
assert (v t3 == v lo / pow2 48 + (v hi * pow2 16) % pow2 64);
calc (==) {
(v lo / pow2 4... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 63,
"end_line": 331,
"start_col": 0,
"start_line": 301
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | lo: Lib.IntTypes.uint64 -> hi: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(ensures
(let t3 = lo >>. 48ul |. hi <<. 16ul in
Lib.IntTypes.v (t3 >>. 30ul &. Lib.IntTypes.u64 0x3ffffff) ==
Lib.IntTypes.v hi / Prims.pow2 14 % Prims.pow2 26)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.pow2_modulo_modulo_lemma_1",
"Prims.op_Division",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.pow2",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Modulus",
"Lib.IntTypes.op_Greater_Greater_Dot",
"FStar.UIn... | [] | false | false | true | false | false | let load_tup64_4_compact_lemma_f3 lo hi =
| let t3 = (lo >>. 48ul) |. (hi <<. 16ul) in
let f3 = (t3 >>. 30ul) &. u64 0x3ffffff in
Math.Lemmas.lemma_div_lt (v lo) 64 48;
logor_disjoint (lo >>. 48ul) (hi <<. 16ul) 16;
assert (v t3 == v lo / pow2 48 + (v hi * pow2 16) % pow2 64);
calc ( == ) {
(v lo / pow2 48 + (v hi * pow2 16) % pow2 64) / pow2 30;
( == ) { Ma... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lset_bit5 | val lset_bit5:
f:lseq uint64 5
-> i:size_nat{i <= 128} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(forall (i:nat). i < 5 =... | val lset_bit5:
f:lseq uint64 5
-> i:size_nat{i <= 128} ->
Lemma
(requires
(forall (i:nat). i < 5 ==> v f.[i] <= max26) /\
as_nat5 (f.[0], f.[1], f.[2], f.[3], f.[4]) < pow2 i)
(ensures
(let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
(forall (i:nat). i < 5 =... | let lset_bit5 f i =
let b = u64 1 <<. size (i % 26) in
let out = f.[i / 26] <- f.[i / 26] |. b in
lset_bit5_ f i;
let out = (out.[0], out.[1], out.[2], out.[3], out.[4]) in
let f = (f.[0], f.[1], f.[2], f.[3], f.[4]) in
assert (as_nat5 out % prime == (pow2 i + as_nat5 f) % prime);
FStar.Math.Lemmas.lemma_... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 69,
"end_line": 803,
"start_col": 0,
"start_line": 796
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Lib.Sequence.lseq Lib.IntTypes.uint64 5 -> i: Lib.IntTypes.size_nat{i <= 128}
-> FStar.Pervasives.Lemma
(requires
(forall (i: Prims.nat).
i < 5 ==> Lib.IntTypes.v f.[ i ] <= Hacl.Spec.Poly1305.Field32xN.max26) /\
Hacl.Spec.Poly1305.Field32xN.as_nat5 (f.[ 0 ], f.[ 1 ], f.[ 2 ], f.[... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.Sequence.lseq",
"Lib.IntTypes.uint64",
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Math.Lemmas.lemma_mod_plus_distr_r",
"Prims.pow2",
"Hacl.Spec.Poly1305.Field32xN.as_nat5",
"Hacl.Spec.Poly1305.Vec.prime",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.i... | [] | true | false | true | false | false | let lset_bit5 f i =
| let b = u64 1 <<. size (i % 26) in
let out = f.[ i / 26 ] <- f.[ i / 26 ] |. b in
lset_bit5_ f i;
let out = (out.[ 0 ], out.[ 1 ], out.[ 2 ], out.[ 3 ], out.[ 4 ]) in
let f = (f.[ 0 ], f.[ 1 ], f.[ 2 ], f.[ 3 ], f.[ 4 ]) in
assert (as_nat5 out % prime == (pow2 i + as_nat5 f) % prime);
FStar.Math.Lemmas.lemma_mod_plus_d... | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.serialize_bitfield64 | val serialize_bitfield64 (l: list nat {valid_bitfield_widths 0 64 l})
: Tot (serializer (parse_bitfield64 l)) | val serialize_bitfield64 (l: list nat {valid_bitfield_widths 0 64 l})
: Tot (serializer (parse_bitfield64 l)) | let serialize_bitfield64 (l: list nat { valid_bitfield_widths 0 64 l }) : Tot (serializer (parse_bitfield64 l)) =
serialize_bitfield serialize_u64 uint64 l | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 43,
"end_line": 158,
"start_col": 0,
"start_line": 157
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 64 l}
-> LowParse.Spec.Base.serializer (LowParse.Spec.BitFields.parse_bitfield64 l) | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"Prims.nat",
"Prims.b2t",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.serialize_bitfield",
"FStar.UInt64.t",
"LowParse.Spec.Int.parse_u64_kind",
"LowParse.Spec.Int.parse_u64",
"LowParse.Spec.Int.serialize_u64",
"LowParse.BitFields.uint64",
"LowParse.Sp... | [] | false | false | false | false | false | let serialize_bitfield64 (l: list nat {valid_bitfield_widths 0 64 l})
: Tot (serializer (parse_bitfield64 l)) =
| serialize_bitfield serialize_u64 uint64 l | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.serialize_bitfield32 | val serialize_bitfield32 (l: list nat {valid_bitfield_widths 0 32 l})
: Tot (serializer (parse_bitfield32 l)) | val serialize_bitfield32 (l: list nat {valid_bitfield_widths 0 32 l})
: Tot (serializer (parse_bitfield32 l)) | let serialize_bitfield32 (l: list nat { valid_bitfield_widths 0 32 l }) : Tot (serializer (parse_bitfield32 l)) =
serialize_bitfield serialize_u32 uint32 l | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 43,
"end_line": 164,
"start_col": 0,
"start_line": 163
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 32 l}
-> LowParse.Spec.Base.serializer (LowParse.Spec.BitFields.parse_bitfield32 l) | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"Prims.nat",
"Prims.b2t",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.serialize_bitfield",
"FStar.UInt32.t",
"LowParse.Spec.Int.parse_u32_kind",
"LowParse.Spec.Int.parse_u32",
"LowParse.Spec.Int.serialize_u32",
"LowParse.BitFields.uint32",
"LowParse.Sp... | [] | false | false | false | false | false | let serialize_bitfield32 (l: list nat {valid_bitfield_widths 0 32 l})
: Tot (serializer (parse_bitfield32 l)) =
| serialize_bitfield serialize_u32 uint32 l | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.parse_bitfield64 | val parse_bitfield64 (l: list nat {valid_bitfield_widths 0 64 l})
: Tot (parser parse_u64_kind (bitfields uint64 0 64 l)) | val parse_bitfield64 (l: list nat {valid_bitfield_widths 0 64 l})
: Tot (parser parse_u64_kind (bitfields uint64 0 64 l)) | let parse_bitfield64 (l: list nat { valid_bitfield_widths 0 64 l }) : Tot (parser parse_u64_kind (bitfields uint64 0 64 l)) =
parse_bitfield parse_u64 uint64 l | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 35,
"end_line": 155,
"start_col": 0,
"start_line": 154
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 64 l}
-> LowParse.Spec.Base.parser LowParse.Spec.Int.parse_u64_kind
(LowParse.Spec.BitFields.bitfields LowParse.BitFields.uint64 0 64 l) | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"Prims.nat",
"Prims.b2t",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.parse_bitfield",
"FStar.UInt64.t",
"LowParse.Spec.Int.parse_u64_kind",
"LowParse.Spec.Int.parse_u64",
"LowParse.BitFields.uint64",
"LowParse.Spec.Base.parser",
"LowParse.Spec.BitFiel... | [] | false | false | false | false | false | let parse_bitfield64 (l: list nat {valid_bitfield_widths 0 64 l})
: Tot (parser parse_u64_kind (bitfields uint64 0 64 l)) =
| parse_bitfield parse_u64 uint64 l | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.parse_bitfield16 | val parse_bitfield16 (l: list nat {valid_bitfield_widths 0 16 l})
: Tot (parser parse_u16_kind (bitfields uint16 0 16 l)) | val parse_bitfield16 (l: list nat {valid_bitfield_widths 0 16 l})
: Tot (parser parse_u16_kind (bitfields uint16 0 16 l)) | let parse_bitfield16 (l: list nat { valid_bitfield_widths 0 16 l }) : Tot (parser parse_u16_kind (bitfields uint16 0 16 l)) =
parse_bitfield parse_u16 uint16 l | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 35,
"end_line": 167,
"start_col": 0,
"start_line": 166
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 16 l}
-> LowParse.Spec.Base.parser LowParse.Spec.Int.parse_u16_kind
(LowParse.Spec.BitFields.bitfields LowParse.BitFields.uint16 0 16 l) | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"Prims.nat",
"Prims.b2t",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.parse_bitfield",
"FStar.UInt16.t",
"LowParse.Spec.Int.parse_u16_kind",
"LowParse.Spec.Int.parse_u16",
"LowParse.BitFields.uint16",
"LowParse.Spec.Base.parser",
"LowParse.Spec.BitFiel... | [] | false | false | false | false | false | let parse_bitfield16 (l: list nat {valid_bitfield_widths 0 16 l})
: Tot (parser parse_u16_kind (bitfields uint16 0 16 l)) =
| parse_bitfield parse_u16 uint16 l | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.parse_bitfield32 | val parse_bitfield32 (l: list nat {valid_bitfield_widths 0 32 l})
: Tot (parser parse_u32_kind (bitfields uint32 0 32 l)) | val parse_bitfield32 (l: list nat {valid_bitfield_widths 0 32 l})
: Tot (parser parse_u32_kind (bitfields uint32 0 32 l)) | let parse_bitfield32 (l: list nat { valid_bitfield_widths 0 32 l }) : Tot (parser parse_u32_kind (bitfields uint32 0 32 l)) =
parse_bitfield parse_u32 uint32 l | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 35,
"end_line": 161,
"start_col": 0,
"start_line": 160
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 32 l}
-> LowParse.Spec.Base.parser LowParse.Spec.Int.parse_u32_kind
(LowParse.Spec.BitFields.bitfields LowParse.BitFields.uint32 0 32 l) | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"Prims.nat",
"Prims.b2t",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.parse_bitfield",
"FStar.UInt32.t",
"LowParse.Spec.Int.parse_u32_kind",
"LowParse.Spec.Int.parse_u32",
"LowParse.BitFields.uint32",
"LowParse.Spec.Base.parser",
"LowParse.Spec.BitFiel... | [] | false | false | false | false | false | let parse_bitfield32 (l: list nat {valid_bitfield_widths 0 32 l})
: Tot (parser parse_u32_kind (bitfields uint32 0 32 l)) =
| parse_bitfield parse_u32 uint32 l | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.serialize_bitfield8 | val serialize_bitfield8 (l: list nat {valid_bitfield_widths 0 8 l})
: Tot (serializer (parse_bitfield8 l)) | val serialize_bitfield8 (l: list nat {valid_bitfield_widths 0 8 l})
: Tot (serializer (parse_bitfield8 l)) | let serialize_bitfield8 (l: list nat { valid_bitfield_widths 0 8 l }) : Tot (serializer (parse_bitfield8 l)) =
serialize_bitfield serialize_u8 uint8 l | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 41,
"end_line": 176,
"start_col": 0,
"start_line": 175
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 8 l}
-> LowParse.Spec.Base.serializer (LowParse.Spec.BitFields.parse_bitfield8 l) | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"Prims.nat",
"Prims.b2t",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.serialize_bitfield",
"FStar.UInt8.t",
"LowParse.Spec.Int.parse_u8_kind",
"LowParse.Spec.Int.parse_u8",
"LowParse.Spec.Int.serialize_u8",
"LowParse.BitFields.uint8",
"LowParse.Spec.Ba... | [] | false | false | false | false | false | let serialize_bitfield8 (l: list nat {valid_bitfield_widths 0 8 l})
: Tot (serializer (parse_bitfield8 l)) =
| serialize_bitfield serialize_u8 uint8 l | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_mod_add_last | val lemma_mod_add_last (c12 t4':uint64) : Lemma
(requires v c12 < pow2 48 /\ v t4' < pow2 48)
(ensures (let r4 = c12 +. t4' in
v r4 = v c12 + v t4' /\ felem_fits_last1 r4 2)) | val lemma_mod_add_last (c12 t4':uint64) : Lemma
(requires v c12 < pow2 48 /\ v t4' < pow2 48)
(ensures (let r4 = c12 +. t4' in
v r4 = v c12 + v t4' /\ felem_fits_last1 r4 2)) | let lemma_mod_add_last c12 t4' =
let r4 = c12 +. t4' in
assert (v c12 + v t4' < pow2 48 + pow2 48);
Math.Lemmas.pow2_double_sum 48;
assert (v c12 + v t4' < pow2 49);
Math.Lemmas.pow2_lt_compat 64 49;
Math.Lemmas.small_mod (v c12 + v t4') (pow2 64);
assert (v r4 = v c12 + v t4') | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 31,
"end_line": 573,
"start_col": 0,
"start_line": 566
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | c12: Lib.IntTypes.uint64 -> t4': Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires Lib.IntTypes.v c12 < Prims.pow2 48 /\ Lib.IntTypes.v t4' < Prims.pow2 48)
(ensures
(let r4 = c12 +. t4' in
Lib.IntTypes.v r4 = Lib.IntTypes.v c12 + Lib.IntTypes.v t4' /\
Hacl.Spec.K256.Fiel... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"Prims._assert",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.op_Addition",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.pow2",
"FStar.Math.Lemmas.pow2_lt_compat",
"Prims.op_LessThan",
"FStar... | [] | true | false | true | false | false | let lemma_mod_add_last c12 t4' =
| let r4 = c12 +. t4' in
assert (v c12 + v t4' < pow2 48 + pow2 48);
Math.Lemmas.pow2_double_sum 48;
assert (v c12 + v t4' < pow2 49);
Math.Lemmas.pow2_lt_compat 64 49;
Math.Lemmas.small_mod (v c12 + v t4') (pow2 64);
assert (v r4 = v c12 + v t4') | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.lemma_tup64_mod_pow2_128 | val lemma_tup64_mod_pow2_128: f:tup64_5 ->
Lemma
(requires tup64_fits5 f (1, 1, 1, 1, 1))
(ensures
(let (f0, f1, f2, f3, f4) = f in
(as_nat5 f) % pow2 128 == v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 + (v f4 % pow2 24) * pow104)) | val lemma_tup64_mod_pow2_128: f:tup64_5 ->
Lemma
(requires tup64_fits5 f (1, 1, 1, 1, 1))
(ensures
(let (f0, f1, f2, f3, f4) = f in
(as_nat5 f) % pow2 128 == v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 + (v f4 % pow2 24) * pow104)) | let lemma_tup64_mod_pow2_128 f =
let (f0, f1, f2, f3, f4) = f in
let tmp = v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 in
calc (==) {
(as_nat5 f) % pow2 128;
(==) { }
(v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 + v f4 * pow104) % pow2 128;
(==) { FStar.Math.Lemmas.lemma_mod_plus_dist... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 68,
"end_line": 456,
"start_col": 0,
"start_line": 441
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Hacl.Spec.Poly1305.Field32xN.tup64_5
-> FStar.Pervasives.Lemma (requires Hacl.Spec.Poly1305.Field32xN.tup64_fits5 f (1, 1, 1, 1, 1))
(ensures
(let _ = f in
(let FStar.Pervasives.Native.Mktuple5 #_ #_ #_ #_ #_ f0 f1 f2 f3 f4 = _ in
Hacl.Spec.Poly1305.Field32xN.as_nat5 f % Prims.p... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Poly1305.Field32xN.tup64_5",
"Lib.IntTypes.uint64",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Prims.op_Modulus",
"Hacl.Spec.Poly1305.Field32xN.as_nat5",
"Prims.pow2",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Hacl.Spec... | [] | false | false | true | false | false | let lemma_tup64_mod_pow2_128 f =
| let f0, f1, f2, f3, f4 = f in
let tmp = v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 in
calc ( == ) {
(as_nat5 f) % pow2 128;
( == ) { () }
(v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 + v f4 * pow104) % pow2 128;
( == ) { FStar.Math.Lemmas.lemma_mod_plus_distr_r tmp (v f4 * pow104) (pow2 128) }
(t... | false |
Hacl.Poly1305.Field32xN.Lemmas2.fst | Hacl.Poly1305.Field32xN.Lemmas2.load_tup64_lemma0 | val load_tup64_lemma0:
f:tup64_5
-> lo:uint64
-> hi:uint64 ->
Lemma
(requires
(let (f0, f1, f2, f3, f4) = f in
v f0 == v lo % pow2 26 /\
v f1 == (v lo / pow2 26) % pow2 26 /\
v f2 == v lo / pow2 52 + (v hi % pow2 14) * pow2 12 /\
v f3 == (v hi / pow2 14) % pow2 26 /\
v f4 == v hi / po... | val load_tup64_lemma0:
f:tup64_5
-> lo:uint64
-> hi:uint64 ->
Lemma
(requires
(let (f0, f1, f2, f3, f4) = f in
v f0 == v lo % pow2 26 /\
v f1 == (v lo / pow2 26) % pow2 26 /\
v f2 == v lo / pow2 52 + (v hi % pow2 14) * pow2 12 /\
v f3 == (v hi / pow2 14) % pow2 26 /\
v f4 == v hi / po... | let load_tup64_lemma0 f lo hi =
let (f0, f1, f2, f3, f4) = f in
calc (==) {
as_nat5 f;
(==) { }
v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 + v f4 * pow104;
(==) { }
v lo % pow2 26 + (v lo / pow2 26) % pow2 26 * pow26 +
v lo / pow2 52 * pow52 + (v hi % pow2 14) * pow2 12 * pow52 +
... | {
"file_name": "code/poly1305/Hacl.Poly1305.Field32xN.Lemmas2.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 45,
"end_line": 95,
"start_col": 0,
"start_line": 78
} | module Hacl.Poly1305.Field32xN.Lemmas2
open Lib.IntTypes
open Lib.IntVector
open Lib.Sequence
open FStar.Mul
open FStar.Calc
open Hacl.Spec.Poly1305.Vec
include Hacl.Spec.Poly1305.Field32xN
#reset-options "--z3rlimit 50 --using_facts_from '* -FStar.Seq' --max_fuel 0 --max_ifuel 0"
val lemma_mult_le: a:nat -> b:nat ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.Poly1305.Vec.fst.checked",
"Hacl.Spec.Poly1305.Field32xN.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Field32xN",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.Poly1305.Vec",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Calc",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Hacl.Spec.Poly1305.Field32xN.tup64_5 -> lo: Lib.IntTypes.uint64 -> hi: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
(let _ = f in
(let FStar.Pervasives.Native.Mktuple5 #_ #_ #_ #_ #_ f0 f1 f2 f3 f4 = _ in
Lib.IntTypes.v f0 == Lib.IntTypes.v lo % Prims.pow2 26 /\
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Poly1305.Field32xN.tup64_5",
"Lib.IntTypes.uint64",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Hacl.Spec.Poly1305.Field32xN.as_nat5",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.pow2",
"Prims.unit",
"FStar.Calc.calc... | [] | false | false | true | false | false | let load_tup64_lemma0 f lo hi =
| let f0, f1, f2, f3, f4 = f in
calc ( == ) {
as_nat5 f;
( == ) { () }
v f0 + v f1 * pow26 + v f2 * pow52 + v f3 * pow78 + v f4 * pow104;
( == ) { () }
v lo % pow2 26 + ((v lo / pow2 26) % pow2 26) * pow26 + (v lo / pow2 52) * pow52 +
((v hi % pow2 14) * pow2 12) * pow52 +
((v hi / pow2 14) % pow2 26) * pow... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_add_mul64_wide_r_mask52 | val lemma_bound_add_mul64_wide_r_mask52 (md:pos) (d8 c5:uint128) : Lemma
(requires v d8 <= md * (max52 * max52) /\ v c5 <= md * (max52 * max52) /\ md <= 8193)
(ensures (let r = c5 +. mul64_wide (to_u64 d8 &. mask52) (u64 0x1000003D10) in
let d9 = d8 >>. 52ul in v d9 = v d8 / pow2 52 /\ v d9 <= md * max52 /\
... | val lemma_bound_add_mul64_wide_r_mask52 (md:pos) (d8 c5:uint128) : Lemma
(requires v d8 <= md * (max52 * max52) /\ v c5 <= md * (max52 * max52) /\ md <= 8193)
(ensures (let r = c5 +. mul64_wide (to_u64 d8 &. mask52) (u64 0x1000003D10) in
let d9 = d8 >>. 52ul in v d9 = v d8 / pow2 52 /\ v d9 <= md * max52 /\
... | let lemma_bound_add_mul64_wide_r_mask52 md d8 c5 =
let tm = to_u64 d8 &. mask52 in
lemma_bound_mask52_rsh52 md d8;
assert_norm (0x1000003D10 < pow2 37);
lemma_add_mul64_wide 64 37 md c5 tm (u64 0x1000003D10) | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 499,
"start_col": 0,
"start_line": 495
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | md: Prims.pos -> d8: Lib.IntTypes.uint128 -> c5: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d8 <=
md * (Hacl.Spec.K256.Field52.Definitions.max52 * Hacl.Spec.K256.Field52.Definitions.max52) /\
Lib.IntTypes.v c5 <=
md * (Hacl.Spec.K256.Field52.Definitio... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.IntTypes.uint128",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_add_mul64_wide",
"Lib.IntTypes.u64",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_mask52_rsh52",
"Lib.IntTypes.int_t",
"Lib.In... | [] | true | false | true | false | false | let lemma_bound_add_mul64_wide_r_mask52 md d8 c5 =
| let tm = to_u64 d8 &. mask52 in
lemma_bound_mask52_rsh52 md d8;
assert_norm (0x1000003D10 < pow2 37);
lemma_add_mul64_wide 64 37 md c5 tm (u64 0x1000003D10) | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_mul_by2 | val lemma_mul_by2: m:nat -> max:nat -> a:uint64 -> Lemma
(requires v a <= m * max /\ 2 * m <= 4096 /\ max <= max52)
(ensures (let r = a *. u64 2 in
v r = v a * 2 /\ v r <= (2 * m) * max)) | val lemma_mul_by2: m:nat -> max:nat -> a:uint64 -> Lemma
(requires v a <= m * max /\ 2 * m <= 4096 /\ max <= max52)
(ensures (let r = a *. u64 2 in
v r = v a * 2 /\ v r <= (2 * m) * max)) | let lemma_mul_by2 m max a =
let r = a *. u64 2 in
calc (<=) {
v a * 2;
(<=) { Math.Lemmas.lemma_mult_le_right 2 (v a) (m * max) }
m * max * 2;
(==) { Math.Lemmas.swap_mul (m * max) 2 }
2 * (m * max);
(==) { Math.Lemmas.paren_mul_right 2 m max }
2 * m * max;
};
assert (v a * 2 <= 2 ... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 43,
"end_line": 598,
"start_col": 0,
"start_line": 583
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | m: Prims.nat -> max: Prims.nat -> a: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v a <= m * max /\ 2 * m <= 4096 /\
max <= Hacl.Spec.K256.Field52.Definitions.max52)
(ensures
(let r = a *. Lib.IntTypes.u64 2 in
Lib.IntTypes.v r = Lib.IntTypes.v a *... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"FStar.Mul.op_Star",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.pow2",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.K256.Field52.Definitions.max52",
"Hacl.... | [] | false | false | true | false | false | let lemma_mul_by2 m max a =
| let r = a *. u64 2 in
calc ( <= ) {
v a * 2;
( <= ) { Math.Lemmas.lemma_mult_le_right 2 (v a) (m * max) }
(m * max) * 2;
( == ) { Math.Lemmas.swap_mul (m * max) 2 }
2 * (m * max);
( == ) { Math.Lemmas.paren_mul_right 2 m max }
(2 * m) * max;
};
assert (v a * 2 <= (2 * m) * max);
ML.lemma_ab_le_cd (2 * m) ... | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_mask52_rsh52 | val lemma_bound_mask52_rsh52: md:pos -> d:uint128 -> Lemma
(requires v d <= md * (max52 * max52) /\ md <= 16385)
(ensures (let r = to_u64 d &. mask52 in let k = d >>. 52ul in
v r = v d % pow2 52 /\ v k = v d / pow2 52 /\
felem_fits1 r 1 /\ v k <= md * max52)) | val lemma_bound_mask52_rsh52: md:pos -> d:uint128 -> Lemma
(requires v d <= md * (max52 * max52) /\ md <= 16385)
(ensures (let r = to_u64 d &. mask52 in let k = d >>. 52ul in
v r = v d % pow2 52 /\ v k = v d / pow2 52 /\
felem_fits1 r 1 /\ v k <= md * max52)) | let lemma_bound_mask52_rsh52 md d =
lemma_u128_to_u64_mask52 d;
lemma_u128_div52 md d | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 23,
"end_line": 486,
"start_col": 0,
"start_line": 484
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | md: Prims.pos -> d: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v d <=
md * (Hacl.Spec.K256.Field52.Definitions.max52 * Hacl.Spec.K256.Field52.Definitions.max52) /\
md <= 16385)
(ensures
(let r = Lib.IntTypes.to_u64 d &. Hacl.Spec.K256.Field52.Defi... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Lib.IntTypes.uint128",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_u128_div52",
"Prims.unit",
"Hacl.Spec.K256.Field52.Lemmas5.lemma_u128_to_u64_mask52"
] | [] | true | false | true | false | false | let lemma_bound_mask52_rsh52 md d =
| lemma_u128_to_u64_mask52 d;
lemma_u128_div52 md d | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.serialize_bitfield16 | val serialize_bitfield16 (l: list nat {valid_bitfield_widths 0 16 l})
: Tot (serializer (parse_bitfield16 l)) | val serialize_bitfield16 (l: list nat {valid_bitfield_widths 0 16 l})
: Tot (serializer (parse_bitfield16 l)) | let serialize_bitfield16 (l: list nat { valid_bitfield_widths 0 16 l }) : Tot (serializer (parse_bitfield16 l)) =
serialize_bitfield serialize_u16 uint16 l | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 43,
"end_line": 170,
"start_col": 0,
"start_line": 169
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 16 l}
-> LowParse.Spec.Base.serializer (LowParse.Spec.BitFields.parse_bitfield16 l) | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"Prims.nat",
"Prims.b2t",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.serialize_bitfield",
"FStar.UInt16.t",
"LowParse.Spec.Int.parse_u16_kind",
"LowParse.Spec.Int.parse_u16",
"LowParse.Spec.Int.serialize_u16",
"LowParse.BitFields.uint16",
"LowParse.Sp... | [] | false | false | false | false | false | let serialize_bitfield16 (l: list nat {valid_bitfield_widths 0 16 l})
: Tot (serializer (parse_bitfield16 l)) =
| serialize_bitfield serialize_u16 uint16 l | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.parse_bitfield8 | val parse_bitfield8 (l: list nat {valid_bitfield_widths 0 8 l})
: Tot (parser parse_u8_kind (bitfields uint8 0 8 l)) | val parse_bitfield8 (l: list nat {valid_bitfield_widths 0 8 l})
: Tot (parser parse_u8_kind (bitfields uint8 0 8 l)) | let parse_bitfield8 (l: list nat { valid_bitfield_widths 0 8 l }) : Tot (parser parse_u8_kind (bitfields uint8 0 8 l)) =
parse_bitfield parse_u8 uint8 l | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 33,
"end_line": 173,
"start_col": 0,
"start_line": 172
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths 0 8 l}
-> LowParse.Spec.Base.parser LowParse.Spec.Int.parse_u8_kind
(LowParse.Spec.BitFields.bitfields LowParse.BitFields.uint8 0 8 l) | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"Prims.nat",
"Prims.b2t",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.parse_bitfield",
"FStar.UInt8.t",
"LowParse.Spec.Int.parse_u8_kind",
"LowParse.Spec.Int.parse_u8",
"LowParse.BitFields.uint8",
"LowParse.Spec.Base.parser",
"LowParse.Spec.BitFields.b... | [] | false | false | false | false | false | let parse_bitfield8 (l: list nat {valid_bitfield_widths 0 8 l})
: Tot (parser parse_u8_kind (bitfields uint8 0 8 l)) =
| parse_bitfield parse_u8 uint8 l | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_add_mul64_wide_r_lsh12_add | val lemma_bound_add_mul64_wide_r_lsh12_add (md:nat) (c:uint128) (d t3:uint64) : Lemma
(requires v c <= md * max52 /\ md <= 12290 /\ v d < pow2 50 /\ felem_fits1 t3 1)
(ensures (let r = c +. mul64_wide (u64 0x1000003D10 <<. 12ul) d +. to_u128 t3 in
v r = v c + 0x1000003D10 * pow2 12 * v d + v t3 /\ v r < pow2 1... | val lemma_bound_add_mul64_wide_r_lsh12_add (md:nat) (c:uint128) (d t3:uint64) : Lemma
(requires v c <= md * max52 /\ md <= 12290 /\ v d < pow2 50 /\ felem_fits1 t3 1)
(ensures (let r = c +. mul64_wide (u64 0x1000003D10 <<. 12ul) d +. to_u128 t3 in
v r = v c + 0x1000003D10 * pow2 12 * v d + v t3 /\ v r < pow2 1... | let lemma_bound_add_mul64_wide_r_lsh12_add md c d t3 =
let rs = u64 0x1000003D10 <<. 12ul in
lemma_r_lsh12 ();
assert (v rs = 0x1000003D10 * pow2 12 /\ v rs < pow2 49);
let r = c +. mul64_wide rs d +. to_u128 t3 in
lemma_bound_mul64_wide 1 1 (pow2 49) (pow2 50) rs d;
assert (v (mul64_wide rs d) = v rs * v ... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 60,
"end_line": 389,
"start_col": 0,
"start_line": 366
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | md: Prims.nat -> c: Lib.IntTypes.uint128 -> d: Lib.IntTypes.uint64 -> t3: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v c <= md * Hacl.Spec.K256.Field52.Definitions.max52 /\ md <= 12290 /\
Lib.IntTypes.v d < Prims.pow2 50 /\ Hacl.Spec.K256.Field52.Definitions.felem_fits1... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"FStar.Mul.op_Star",
"Lib.IntTypes.U64",
"Prims.pow2",
"Prims.unit",
"FStar.Math.Lemmas.pow2_lt_compat",
"FStar.Calc.ca... | [] | false | false | true | false | false | let lemma_bound_add_mul64_wide_r_lsh12_add md c d t3 =
| let rs = u64 0x1000003D10 <<. 12ul in
lemma_r_lsh12 ();
assert (v rs = 0x1000003D10 * pow2 12 /\ v rs < pow2 49);
let r = c +. mul64_wide rs d +. to_u128 t3 in
lemma_bound_mul64_wide 1 1 (pow2 49) (pow2 50) rs d;
assert (v (mul64_wide rs d) = v rs * v d /\ v rs * v d < pow2 49 * pow2 50);
calc ( < ) {
md * max52 + po... | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.synth_bitfield_recip | val synth_bitfield_recip
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: bitfields cl lo hi l)
: Tot t | val synth_bitfield_recip
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: bitfields cl lo hi l)
: Tot t | let synth_bitfield_recip (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat) (hi: nat { lo <= hi /\ hi <= tot }) (l: list nat { valid_bitfield_widths lo hi l }) (x: bitfields cl lo hi l) : Tot t = synth_bitfield_recip' cl lo hi l x | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 231,
"end_line": 103,
"start_col": 0,
"start_line": 103
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo hi l} ->
x: LowParse.Spec.BitFields.bitfields cl lo hi l
-> t | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.bitfields",
"LowParse.Spec.BitFields.synth_bitfield_recip'"
] | [] | false | false | false | false | false | let synth_bitfield_recip
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: bitfields cl lo hi l)
: Tot t =
| synth_bitfield_recip' cl lo hi l x | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_bound_mask52_rsh52_sp | val lemma_bound_mask52_rsh52_sp: d:uint128 -> Lemma
(requires v d < pow2 100)
(ensures (let r = to_u64 d &. mask52 in let k = to_u64 (d >>. 52ul) in
v r = v d % pow2 52 /\ v k = v d / pow2 52 /\
felem_fits1 r 1 /\ v k < pow2 48)) | val lemma_bound_mask52_rsh52_sp: d:uint128 -> Lemma
(requires v d < pow2 100)
(ensures (let r = to_u64 d &. mask52 in let k = to_u64 (d >>. 52ul) in
v r = v d % pow2 52 /\ v k = v d / pow2 52 /\
felem_fits1 r 1 /\ v k < pow2 48)) | let lemma_bound_mask52_rsh52_sp d =
let r = to_u64 d &. mask52 in
lemma_u128_to_u64_mask52 d;
let k = to_u64 (d >>. 52ul) in
assert (v k == v d / pow2 52 % pow2 64);
Math.Lemmas.lemma_div_lt (v d) 100 52;
Math.Lemmas.pow2_lt_compat 64 48;
Math.Lemmas.small_mod (v d / pow2 52) (pow2 64) | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 49,
"end_line": 527,
"start_col": 0,
"start_line": 519
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | d: Lib.IntTypes.uint128
-> FStar.Pervasives.Lemma (requires Lib.IntTypes.v d < Prims.pow2 100)
(ensures
(let r = Lib.IntTypes.to_u64 d &. Hacl.Spec.K256.Field52.Definitions.mask52 in
let k = Lib.IntTypes.to_u64 (d >>. 52ul) in
Lib.IntTypes.v r = Lib.IntTypes.v d % Prims.pow2 52 /\
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint128",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Division",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.pow2",
"Prims.unit",
"FStar.Math.Lemmas.pow2_lt_compat",
"FStar.Math.Lemmas.lemma_div_lt",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.... | [] | true | false | true | false | false | let lemma_bound_mask52_rsh52_sp d =
| let r = to_u64 d &. mask52 in
lemma_u128_to_u64_mask52 d;
let k = to_u64 (d >>. 52ul) in
assert (v k == v d / pow2 52 % pow2 64);
Math.Lemmas.lemma_div_lt (v d) 100 52;
Math.Lemmas.pow2_lt_compat 64 48;
Math.Lemmas.small_mod (v d / pow2 52) (pow2 64) | false |
Hacl.Spec.K256.Field52.Lemmas5.fst | Hacl.Spec.K256.Field52.Lemmas5.lemma_tx_logor_u0_lsh4 | val lemma_tx_logor_u0_lsh4 (tx u0:uint64) : Lemma
(requires v tx < pow2 4 /\ felem_fits1 u0 1)
(ensures (let u0' = tx |. (u0 <<. 4ul) in
v u0' == v tx + v u0 * pow2 4 /\ v u0' < pow2 56)) | val lemma_tx_logor_u0_lsh4 (tx u0:uint64) : Lemma
(requires v tx < pow2 4 /\ felem_fits1 u0 1)
(ensures (let u0' = tx |. (u0 <<. 4ul) in
v u0' == v tx + v u0 * pow2 4 /\ v u0' < pow2 56)) | let lemma_tx_logor_u0_lsh4 tx u0 =
let u0' = tx |. (u0 <<. 4ul) in
assert (v (u0 <<. 4ul) = v u0 * pow2 4 % pow2 64);
calc (<=) {
v u0 * pow2 4;
(<=) { Math.Lemmas.lemma_mult_le_right (pow2 4) (v u0) (pow2 52 - 1) }
(pow2 52 - 1) * pow2 4;
(==) { Math.Lemmas.distributivity_sub_left (pow2 52) 1 (p... | {
"file_name": "code/k256/Hacl.Spec.K256.Field52.Lemmas5.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 26,
"end_line": 558,
"start_col": 0,
"start_line": 535
} | module Hacl.Spec.K256.Field52.Lemmas5
open FStar.Mul
open Lib.IntTypes
module S = Spec.K256
include Hacl.Spec.K256.Field52.Definitions
include Hacl.Spec.K256.Field52
module ML = Hacl.Spec.K256.MathLemmas
module LD = Hacl.Spec.K256.Field52.Definitions.Lemmas
#set-options "--z3rlimit 100 --fuel 0 --ifuel 0"
val lem... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.K256.MathLemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.Lemmas.fst.checked",
"Hacl.Spec.K256.Field52.Definitions.fst.checked",
"Hacl.Spec.K256.Field52.... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.Field52.Definitions.Lemmas",
"short_module": "LD"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.K256.MathLemmas",
"short_module": "ML"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.K256.Field52",
"short_module": null
}... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | tx: Lib.IntTypes.uint64 -> u0: Lib.IntTypes.uint64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v tx < Prims.pow2 4 /\ Hacl.Spec.K256.Field52.Definitions.felem_fits1 u0 1)
(ensures
(let u0' = tx |. u0 <<. 4ul in
Lib.IntTypes.v u0' == Lib.IntTypes.v tx + Lib.IntTypes.v u0 * Pr... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.uint64",
"Prims._assert",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.pow2",
"Prims.unit",
"Prims.eq2",
"Prims.int",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Lib.IntTypes.logor_disjoint",
"Lib.IntTypes.op_Less_Less_Do... | [] | false | false | true | false | false | let lemma_tx_logor_u0_lsh4 tx u0 =
| let u0' = tx |. (u0 <<. 4ul) in
assert (v (u0 <<. 4ul) = v u0 * pow2 4 % pow2 64);
calc ( <= ) {
v u0 * pow2 4;
( <= ) { Math.Lemmas.lemma_mult_le_right (pow2 4) (v u0) (pow2 52 - 1) }
(pow2 52 - 1) * pow2 4;
( == ) { Math.Lemmas.distributivity_sub_left (pow2 52) 1 (pow2 4) }
pow2 52 * pow2 4 - pow2 4;
( ==... | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.synth_bitfield | val synth_bitfield
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: t)
: Tot (bitfields cl lo hi l) | val synth_bitfield
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: t)
: Tot (bitfields cl lo hi l) | let synth_bitfield (#tot: pos) (#t: Type) (cl: uint_t tot t) (lo: nat) (hi: nat { lo <= hi /\ hi <= tot }) (l: list nat { valid_bitfield_widths lo hi l }) (x: t) : Tot (bitfields cl lo hi l) = synth_bitfield' cl lo hi l x | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 221,
"end_line": 45,
"start_col": 0,
"start_line": 45
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "FStar.UInt",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
cl: LowParse.BitFields.uint_t tot t ->
lo: Prims.nat ->
hi: Prims.nat{lo <= hi /\ hi <= tot} ->
l: Prims.list Prims.nat {LowParse.Spec.BitFields.valid_bitfield_widths lo hi l} ->
x: t
-> LowParse.Spec.BitFields.bitfields cl lo hi l | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"LowParse.Spec.BitFields.synth_bitfield'",
"LowParse.Spec.BitFields.bitfields"
] | [] | false | false | false | false | false | let synth_bitfield
(#tot: pos)
(#t: Type)
(cl: uint_t tot t)
(lo: nat)
(hi: nat{lo <= hi /\ hi <= tot})
(l: list nat {valid_bitfield_widths lo hi l})
(x: t)
: Tot (bitfields cl lo hi l) =
| synth_bitfield' cl lo hi l x | false |
LowParse.Spec.BitFields.fst | LowParse.Spec.BitFields.valid_bitfield_widths | val valid_bitfield_widths (lo: nat) (hi: nat{lo <= hi}) (l: list nat) : Tot bool (decreases l) | val valid_bitfield_widths (lo: nat) (hi: nat{lo <= hi}) (l: list nat) : Tot bool (decreases l) | let rec valid_bitfield_widths (lo: nat) (hi: nat { lo <= hi }) (l: list nat) : Tot bool (decreases l) =
match l with
| [] -> lo = hi
| sz :: q -> lo + sz <= hi && valid_bitfield_widths (lo + sz) hi q | {
"file_name": "src/lowparse/LowParse.Spec.BitFields.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 68,
"end_line": 19,
"start_col": 0,
"start_line": 16
} | module LowParse.Spec.BitFields
include LowParse.Spec.Combinators
include LowParse.Spec.Int
include LowParse.BitFields
module BF = LowParse.BitFields
// IMPORTANT: these bitfield operators are defined in a least
// significant bit (LSB) first fashion.
let rec valid_bitfield_bounds (lo: nat) (hi: nat { lo <= hi }) (l:... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.Int.fsti.checked",
"LowParse.Spec.Combinators.fsti.checked",
"LowParse.BitFields.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.... | [
{
"abbrev": true,
"full_module": "LowParse.BitFields",
"short_module": "BF"
},
{
"abbrev": false,
"full_module": "LowParse.BitFields",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.Int",
"short_module": null
},
{
"abbrev": false,
"fu... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | lo: Prims.nat -> hi: Prims.nat{lo <= hi} -> l: Prims.list Prims.nat -> Prims.Tot Prims.bool | Prims.Tot | [
"total",
""
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.list",
"Prims.op_Equality",
"Prims.op_AmpAmp",
"Prims.op_Addition",
"LowParse.Spec.BitFields.valid_bitfield_widths",
"Prims.bool"
] | [
"recursion"
] | false | false | false | false | false | let rec valid_bitfield_widths (lo: nat) (hi: nat{lo <= hi}) (l: list nat) : Tot bool (decreases l) =
| match l with
| [] -> lo = hi
| sz :: q -> lo + sz <= hi && valid_bitfield_widths (lo + sz) hi q | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.