effect stringclasses 48
values | original_source_type stringlengths 0 23k | opens_and_abbrevs listlengths 2 92 | isa_cross_project_example bool 1
class | source_definition stringlengths 9 57.9k | partial_definition stringlengths 7 23.3k | is_div bool 2
classes | is_type null | is_proof bool 2
classes | completed_definiton stringlengths 1 250k | dependencies dict | effect_flags listlengths 0 2 | ideal_premises listlengths 0 236 | mutual_with listlengths 0 11 | file_context stringlengths 0 407k | interleaved bool 1
class | is_simply_typed bool 2
classes | file_name stringlengths 5 48 | vconfig dict | is_simple_lemma null | source_type stringlengths 10 23k | proof_features listlengths 0 1 | name stringlengths 8 95 | source dict | verbose_type stringlengths 1 7.42k | source_range dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Prims.Pure | val logxor (x:t) (y:t) : Pure t
(requires True)
(ensures (fun z -> v x `logxor` v y == v z)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let logxor x y = Mk (logxor (v x) (v y)) | val logxor (x:t) (y:t) : Pure t
(requires True)
(ensures (fun z -> v x `logxor` v y == v z))
let logxor x y = | false | null | false | Mk (logxor (v x) (v y)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"FStar.UInt8.Mk",
"FStar.UInt.logxor",
"FStar.UInt8.n",
"FStar.UInt8.v"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val logxor (x:t) (y:t) : Pure t
(requires True)
(ensures (fun z -> v x `logxor` v y == v z)) | [] | FStar.UInt8.logxor | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | x: FStar.UInt8.t -> y: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | {
"end_col": 40,
"end_line": 66,
"start_col": 17,
"start_line": 66
} |
Prims.Pure | val uint_to_t (x:uint_t n) : Pure t
(requires True)
(ensures (fun y -> v y = x)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let uint_to_t x = Mk x | val uint_to_t (x:uint_t n) : Pure t
(requires True)
(ensures (fun y -> v y = x))
let uint_to_t x = | false | null | false | Mk x | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt.uint_t",
"FStar.UInt8.n",
"FStar.UInt8.Mk",
"FStar.UInt8.t"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val uint_to_t (x:uint_t n) : Pure t
(requires True)
(ensures (fun y -> v y = x)) | [] | FStar.UInt8.uint_to_t | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | x: FStar.UInt.uint_t FStar.UInt8.n -> Prims.Pure FStar.UInt8.t | {
"end_col": 22,
"end_line": 30,
"start_col": 18,
"start_line": 30
} |
Prims.Pure | val logor (x:t) (y:t) : Pure t
(requires True)
(ensures (fun z -> v x `logor` v y == v z)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let logor x y = Mk (logor (v x) (v y)) | val logor (x:t) (y:t) : Pure t
(requires True)
(ensures (fun z -> v x `logor` v y == v z))
let logor x y = | false | null | false | Mk (logor (v x) (v y)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"FStar.UInt8.Mk",
"FStar.UInt.logor",
"FStar.UInt8.n",
"FStar.UInt8.v"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val logor (x:t) (y:t) : Pure t
(requires True)
(ensures (fun z -> v x `logor` v y == v z)) | [] | FStar.UInt8.logor | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | x: FStar.UInt8.t -> y: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | {
"end_col": 38,
"end_line": 68,
"start_col": 16,
"start_line": 68
} |
Prims.Pure | val lognot (x:t) : Pure t
(requires True)
(ensures (fun z -> lognot (v x) == v z)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let lognot x = Mk (lognot (v x)) | val lognot (x:t) : Pure t
(requires True)
(ensures (fun z -> lognot (v x) == v z))
let lognot x = | false | null | false | Mk (lognot (v x)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"FStar.UInt8.Mk",
"FStar.UInt.lognot",
"FStar.UInt8.n",
"FStar.UInt8.v"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lognot (x:t) : Pure t
(requires True)
(ensures (fun z -> lognot (v x) == v z)) | [] | FStar.UInt8.lognot | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | x: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | {
"end_col": 32,
"end_line": 70,
"start_col": 15,
"start_line": 70
} |
Prims.Pure | val sub_mod (a:t) (b:t) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.sub_mod (v a) (v b) = v c)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let sub_mod a b = Mk (sub_mod (v a) (v b)) | val sub_mod (a:t) (b:t) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.sub_mod (v a) (v b) = v c))
let sub_mod a b = | false | null | false | Mk (sub_mod (v a) (v b)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"FStar.UInt8.Mk",
"FStar.UInt.sub_mod",
"FStar.UInt8.n",
"FStar.UInt8.v"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val sub_mod (a:t) (b:t) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.sub_mod (v a) (v b) = v c)) | [] | FStar.UInt8.sub_mod | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | a: FStar.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | {
"end_col": 42,
"end_line": 52,
"start_col": 18,
"start_line": 52
} |
Prims.Pure | val add_mod (a:t) (b:t) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.add_mod (v a) (v b) = v c)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let add_mod a b = Mk (add_mod (v a) (v b)) | val add_mod (a:t) (b:t) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.add_mod (v a) (v b) = v c))
let add_mod a b = | false | null | false | Mk (add_mod (v a) (v b)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"FStar.UInt8.Mk",
"FStar.UInt.add_mod",
"FStar.UInt8.n",
"FStar.UInt8.v"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val add_mod (a:t) (b:t) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.add_mod (v a) (v b) = v c)) | [] | FStar.UInt8.add_mod | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | a: FStar.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | {
"end_col": 42,
"end_line": 46,
"start_col": 18,
"start_line": 46
} |
Prims.Pure | val rem (a:t) (b:t{v b <> 0}) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.mod (v a) (v b) = v c)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let rem a b = Mk (mod (v a) (v b)) | val rem (a:t) (b:t{v b <> 0}) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.mod (v a) (v b) = v c))
let rem a b = | false | null | false | Mk (mod (v a) (v b)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"Prims.b2t",
"Prims.op_disEquality",
"Prims.int",
"FStar.UInt8.v",
"FStar.UInt8.Mk",
"FStar.UInt.mod",
"FStar.UInt8.n"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val rem (a:t) (b:t{v b <> 0}) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.mod (v a) (v b) = v c)) | [] | FStar.UInt8.rem | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | a: FStar.UInt8.t -> b: FStar.UInt8.t{FStar.UInt8.v b <> 0} -> Prims.Pure FStar.UInt8.t | {
"end_col": 34,
"end_line": 62,
"start_col": 14,
"start_line": 62
} |
Prims.Pure | val shift_right (a:t) (s:UInt32.t) : Pure t
(requires (UInt32.v s < n))
(ensures (fun c -> FStar.UInt.shift_right (v a) (UInt32.v s) = v c)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let shift_right a s = Mk (shift_right (v a) (UInt32.v s)) | val shift_right (a:t) (s:UInt32.t) : Pure t
(requires (UInt32.v s < n))
(ensures (fun c -> FStar.UInt.shift_right (v a) (UInt32.v s) = v c))
let shift_right a s = | false | null | false | Mk (shift_right (v a) (UInt32.v s)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"FStar.UInt32.t",
"FStar.UInt8.Mk",
"FStar.UInt.shift_right",
"FStar.UInt8.n",
"FStar.UInt8.v",
"FStar.UInt32.v"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val shift_right (a:t) (s:UInt32.t) : Pure t
(requires (UInt32.v s < n))
(ensures (fun c -> FStar.UInt.shift_right (v a) (UInt32.v s) = v c)) | [] | FStar.UInt8.shift_right | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | a: FStar.UInt8.t -> s: FStar.UInt32.t -> Prims.Pure FStar.UInt8.t | {
"end_col": 57,
"end_line": 72,
"start_col": 22,
"start_line": 72
} |
Prims.Pure | val mul_mod (a:t) (b:t) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.mul_mod (v a) (v b) = v c)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let mul_mod a b = Mk (mul_mod (v a) (v b)) | val mul_mod (a:t) (b:t) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.mul_mod (v a) (v b) = v c))
let mul_mod a b = | false | null | false | Mk (mul_mod (v a) (v b)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"FStar.UInt8.Mk",
"FStar.UInt.mul_mod",
"FStar.UInt8.n",
"FStar.UInt8.v"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mul_mod (a:t) (b:t) : Pure t
(requires True)
(ensures (fun c -> FStar.UInt.mul_mod (v a) (v b) = v c)) | [] | FStar.UInt8.mul_mod | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | a: FStar.UInt8.t -> b: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | {
"end_col": 42,
"end_line": 58,
"start_col": 18,
"start_line": 58
} |
Prims.Pure | val logand (x:t) (y:t) : Pure t
(requires True)
(ensures (fun z -> v x `logand` v y = v z)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let logand x y = Mk (logand (v x) (v y)) | val logand (x:t) (y:t) : Pure t
(requires True)
(ensures (fun z -> v x `logand` v y = v z))
let logand x y = | false | null | false | Mk (logand (v x) (v y)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"FStar.UInt8.Mk",
"FStar.UInt.logand",
"FStar.UInt8.n",
"FStar.UInt8.v"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val logand (x:t) (y:t) : Pure t
(requires True)
(ensures (fun z -> v x `logand` v y = v z)) | [] | FStar.UInt8.logand | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | x: FStar.UInt8.t -> y: FStar.UInt8.t -> Prims.Pure FStar.UInt8.t | {
"end_col": 40,
"end_line": 64,
"start_col": 17,
"start_line": 64
} |
Prims.Pure | val shift_left (a:t) (s:UInt32.t) : Pure t
(requires (UInt32.v s < n))
(ensures (fun c -> FStar.UInt.shift_left (v a) (UInt32.v s) = v c)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let shift_left a s = Mk (shift_left (v a) (UInt32.v s)) | val shift_left (a:t) (s:UInt32.t) : Pure t
(requires (UInt32.v s < n))
(ensures (fun c -> FStar.UInt.shift_left (v a) (UInt32.v s) = v c))
let shift_left a s = | false | null | false | Mk (shift_left (v a) (UInt32.v s)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"FStar.UInt32.t",
"FStar.UInt8.Mk",
"FStar.UInt.shift_left",
"FStar.UInt8.n",
"FStar.UInt8.v",
"FStar.UInt32.v"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val shift_left (a:t) (s:UInt32.t) : Pure t
(requires (UInt32.v s < n))
(ensures (fun c -> FStar.UInt.shift_left (v a) (UInt32.v s) = v c)) | [] | FStar.UInt8.shift_left | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | a: FStar.UInt8.t -> s: FStar.UInt32.t -> Prims.Pure FStar.UInt8.t | {
"end_col": 55,
"end_line": 76,
"start_col": 21,
"start_line": 76
} |
Prims.Pure | val div (a:t) (b:t{v b <> 0}) : Pure t
(requires (True))
(ensures (fun c -> v a / v b = v c)) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let div a b = Mk (div (v a) (v b)) | val div (a:t) (b:t{v b <> 0}) : Pure t
(requires (True))
(ensures (fun c -> v a / v b = v c))
let div a b = | false | null | false | Mk (div (v a) (v b)) | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [] | [
"FStar.UInt8.t",
"Prims.b2t",
"Prims.op_disEquality",
"Prims.int",
"FStar.UInt8.v",
"FStar.UInt8.Mk",
"FStar.UInt.div",
"FStar.UInt8.n"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val div (a:t) (b:t{v b <> 0}) : Pure t
(requires (True))
(ensures (fun c -> v a / v b = v c)) | [] | FStar.UInt8.div | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | a: FStar.UInt8.t -> b: FStar.UInt8.t{FStar.UInt8.v b <> 0} -> Prims.Pure FStar.UInt8.t | {
"end_col": 34,
"end_line": 60,
"start_col": 14,
"start_line": 60
} |
FStar.Pervasives.Lemma | val lemma_sub_msbs (a:t) (b:t)
: Lemma ((msb (v a) = msb (v b)) ==> (v a < v b <==> msb (v (sub_mod a b)))) | [
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.UInt"... | false | let lemma_sub_msbs a b
= from_vec_propriety (to_vec (v a)) 1;
from_vec_propriety (to_vec (v b)) 1;
from_vec_propriety (to_vec (v (sub_mod a b))) 1 | val lemma_sub_msbs (a:t) (b:t)
: Lemma ((msb (v a) = msb (v b)) ==> (v a < v b <==> msb (v (sub_mod a b))))
let lemma_sub_msbs a b = | false | null | true | from_vec_propriety (to_vec (v a)) 1;
from_vec_propriety (to_vec (v b)) 1;
from_vec_propriety (to_vec (v (sub_mod a b))) 1 | {
"checked_file": "FStar.UInt8.fst.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked"
],
"interface_file": true,
"source_file": "FStar.UInt8.fst"
} | [
"lemma"
] | [
"FStar.UInt8.t",
"FStar.UInt.from_vec_propriety",
"FStar.UInt8.n",
"FStar.UInt.to_vec",
"FStar.UInt8.v",
"FStar.UInt8.sub_mod",
"Prims.unit"
] | [] | (*
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... | false | false | FStar.UInt8.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_sub_msbs (a:t) (b:t)
: Lemma ((msb (v a) = msb (v b)) ==> (v a < v b <==> msb (v (sub_mod a b)))) | [] | FStar.UInt8.lemma_sub_msbs | {
"file_name": "ulib/FStar.UInt8.fst",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | a: FStar.UInt8.t -> b: FStar.UInt8.t
-> FStar.Pervasives.Lemma
(ensures
FStar.UInt.msb (FStar.UInt8.v a) = FStar.UInt.msb (FStar.UInt8.v b) ==>
(FStar.UInt8.v a < FStar.UInt8.v b <==>
FStar.UInt.msb (FStar.UInt8.v (FStar.UInt8.sub_mod a b)))) | {
"end_col": 53,
"end_line": 81,
"start_col": 6,
"start_line": 79
} |
Prims.Tot | val fsquare_times_inv: #s:field_spec -> h:mem -> f:felem s -> Type0 | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | false | let fsquare_times_inv #s h f =
match s with
| M51 -> C.f51_felem_fits h f (1, 2, 1, 1, 1)
| M64 -> True | val fsquare_times_inv: #s:field_spec -> h:mem -> f:felem s -> Type0
let fsquare_times_inv #s h f = | false | null | false | match s with
| M51 -> C.f51_felem_fits h f (1, 2, 1, 1, 1)
| M64 -> True | {
"checked_file": "Hacl.Impl.Curve25519.Finv.fst.checked",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"H... | [
"total"
] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Hacl.Impl.Curve25519.Fields.Core.f51_felem_fits",
"FStar.Pervasives.Native.Mktuple5",
"Prims.nat",
"Prims.l_True"
] | [] | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | false | false | Hacl.Impl.Curve25519.Finv.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val fsquare_times_inv: #s:field_spec -> h:mem -> f:felem s -> Type0 | [] | Hacl.Impl.Curve25519.Finv.fsquare_times_inv | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | h: FStar.Monotonic.HyperStack.mem -> f: Hacl.Impl.Curve25519.Fields.Core.felem s -> Type0 | {
"end_col": 15,
"end_line": 26,
"start_col": 2,
"start_line": 24
} |
Prims.Tot | val fmuls_pre: #s:field_spec -> h:mem -> f1:felem s -> f2:felem s -> Type0 | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | false | let fmuls_pre #s h f1 f2 =
match s with
| M51 -> f51_felem_fits h f1 (1, 2, 1, 1, 1) /\ f51_felem_fits h f2 (1, 2, 1, 1, 1)
| M64 -> True | val fmuls_pre: #s:field_spec -> h:mem -> f1:felem s -> f2:felem s -> Type0
let fmuls_pre #s h f1 f2 = | false | null | false | match s with
| M51 -> f51_felem_fits h f1 (1, 2, 1, 1, 1) /\ f51_felem_fits h f2 (1, 2, 1, 1, 1)
| M64 -> True | {
"checked_file": "Hacl.Impl.Curve25519.Finv.fst.checked",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"H... | [
"total"
] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Prims.l_and",
"Hacl.Impl.Curve25519.Fields.Core.f51_felem_fits",
"FStar.Pervasives.Native.Mktuple5",
"Prims.nat",
"Prims.l_True"
] | [] | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | false | false | Hacl.Impl.Curve25519.Finv.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val fmuls_pre: #s:field_spec -> h:mem -> f1:felem s -> f2:felem s -> Type0 | [] | Hacl.Impl.Curve25519.Finv.fmuls_pre | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
h: FStar.Monotonic.HyperStack.mem ->
f1: Hacl.Impl.Curve25519.Fields.Core.felem s ->
f2: Hacl.Impl.Curve25519.Fields.Core.felem s
-> Type0 | {
"end_col": 15,
"end_line": 55,
"start_col": 2,
"start_line": 53
} |
FStar.HyperStack.ST.Stack | val fsqr_s:
#s:field_spec
-> out:felem s
-> f1:felem s
-> tmp:felem_wide s
-> Stack unit
(requires fun h ->
live h out /\ live h f1 /\ live h tmp /\
(disjoint out f1 \/ out == f1) /\
(disjoint out tmp) /\
disjoint tmp f1 /\
fsquare_times_inv h f1)
(ensures fun h0 _ h1 ... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | false | let fsqr_s #s out f1 tmp =
C.fsqr #s out f1 tmp | val fsqr_s:
#s:field_spec
-> out:felem s
-> f1:felem s
-> tmp:felem_wide s
-> Stack unit
(requires fun h ->
live h out /\ live h f1 /\ live h tmp /\
(disjoint out f1 \/ out == f1) /\
(disjoint out tmp) /\
disjoint tmp f1 /\
fsquare_times_inv h f1)
(ensures fun h0 _ h1 ... | true | null | false | C.fsqr #s out f1 tmp | {
"checked_file": "Hacl.Impl.Curve25519.Finv.fst.checked",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"H... | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Hacl.Impl.Curve25519.Fields.Core.felem_wide",
"Hacl.Impl.Curve25519.Fields.Core.fsqr",
"Prims.unit"
] | [] | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | false | false | Hacl.Impl.Curve25519.Finv.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val fsqr_s:
#s:field_spec
-> out:felem s
-> f1:felem s
-> tmp:felem_wide s
-> Stack unit
(requires fun h ->
live h out /\ live h f1 /\ live h tmp /\
(disjoint out f1 \/ out == f1) /\
(disjoint out tmp) /\
disjoint tmp f1 /\
fsquare_times_inv h f1)
(ensures fun h0 _ h1 ... | [] | Hacl.Impl.Curve25519.Finv.fsqr_s | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
out: Hacl.Impl.Curve25519.Fields.Core.felem s ->
f1: Hacl.Impl.Curve25519.Fields.Core.felem s ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide s
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 22,
"end_line": 47,
"start_col": 2,
"start_line": 47
} |
FStar.HyperStack.ST.Stack | val fmul_s:
#s:field_spec
-> out:felem s
-> f1:felem s
-> f2:felem s
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h ->
live h out /\ live h f1 /\ live h f2 /\ live h tmp /\
(disjoint out f1 \/ out == f1) /\
(disjoint out f2 \/ out == f2) /\
(disjoint out tmp) /\
(disj... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | false | let fmul_s #s out f1 f2 tmp =
C.fmul #s out f1 f2 tmp | val fmul_s:
#s:field_spec
-> out:felem s
-> f1:felem s
-> f2:felem s
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h ->
live h out /\ live h f1 /\ live h f2 /\ live h tmp /\
(disjoint out f1 \/ out == f1) /\
(disjoint out f2 \/ out == f2) /\
(disjoint out tmp) /\
(disj... | true | null | false | C.fmul #s out f1 f2 tmp | {
"checked_file": "Hacl.Impl.Curve25519.Finv.fst.checked",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"H... | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Hacl.Impl.Curve25519.Fields.Core.felem_wide2",
"Hacl.Impl.Curve25519.Fields.Core.fmul",
"Prims.unit"
] | [] | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | false | false | Hacl.Impl.Curve25519.Finv.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val fmul_s:
#s:field_spec
-> out:felem s
-> f1:felem s
-> f2:felem s
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h ->
live h out /\ live h f1 /\ live h f2 /\ live h tmp /\
(disjoint out f1 \/ out == f1) /\
(disjoint out f2 \/ out == f2) /\
(disjoint out tmp) /\
(disj... | [] | Hacl.Impl.Curve25519.Finv.fmul_s | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
out: Hacl.Impl.Curve25519.Fields.Core.felem s ->
f1: Hacl.Impl.Curve25519.Fields.Core.felem s ->
f2: Hacl.Impl.Curve25519.Fields.Core.felem s ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 25,
"end_line": 79,
"start_col": 2,
"start_line": 79
} |
FStar.HyperStack.ST.Stack | val fsquare_times:
#s:field_spec
-> o:felem s
-> i:felem s
-> tmp:felem_wide s
-> n:size_t{v n > 0}
-> Stack unit
(requires fun h0 ->
live h0 o /\ live h0 i /\ live h0 tmp /\
(disjoint o i \/ o == i) /\
disjoint o tmp /\
disjoint tmp i /\
fsquare_times_inv h0 i)
(ensu... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | false | let fsquare_times #s o inp tmp n =
let h0 = ST.get() in
fsqr_s #s o inp tmp;
S.lemma_pow_one (feval h0 inp);
S.lemma_pow_add (feval h0 inp) 1 1;
assert_norm (pow2 1 = 2);
let inv (h:mem) (i:nat{i < v n}) =
modifies (loc o |+| loc tmp) h0 h /\
fsquare_times_inv #s h o /\
feval h o == S.pow (feva... | val fsquare_times:
#s:field_spec
-> o:felem s
-> i:felem s
-> tmp:felem_wide s
-> n:size_t{v n > 0}
-> Stack unit
(requires fun h0 ->
live h0 o /\ live h0 i /\ live h0 tmp /\
(disjoint o i \/ o == i) /\
disjoint o tmp /\
disjoint tmp i /\
fsquare_times_inv h0 i)
(ensu... | true | null | false | let h0 = ST.get () in
fsqr_s #s o inp tmp;
S.lemma_pow_one (feval h0 inp);
S.lemma_pow_add (feval h0 inp) 1 1;
assert_norm (pow2 1 = 2);
let inv (h: mem) (i: nat{i < v n}) =
modifies (loc o |+| loc tmp) h0 h /\ fsquare_times_inv #s h o /\
feval h o == S.pow (feval #s h0 inp) (pow2 (i + 1))
in
let h1 = ST.get () in
... | {
"checked_file": "Hacl.Impl.Curve25519.Finv.fst.checked",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"H... | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Hacl.Impl.Curve25519.Fields.Core.felem_wide",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_GreaterThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.Loops.for",
"FStar.UInt32.__uint_to_t... | [] | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | false | false | Hacl.Impl.Curve25519.Finv.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val fsquare_times:
#s:field_spec
-> o:felem s
-> i:felem s
-> tmp:felem_wide s
-> n:size_t{v n > 0}
-> Stack unit
(requires fun h0 ->
live h0 o /\ live h0 i /\ live h0 tmp /\
(disjoint o i \/ o == i) /\
disjoint o tmp /\
disjoint tmp i /\
fsquare_times_inv h0 i)
(ensu... | [] | Hacl.Impl.Curve25519.Finv.fsquare_times | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
o: Hacl.Impl.Curve25519.Fields.Core.felem s ->
i: Hacl.Impl.Curve25519.Fields.Core.felem s ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide s ->
n: Lib.IntTypes.size_t{Lib.IntTypes.v n > 0}
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 42,
"end_line": 120,
"start_col": 34,
"start_line": 100
} |
FStar.HyperStack.ST.Stack | val finv3:
#s:field_spec
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 t1 /\ live h0 tmp /\ disjoint t1 tmp /\
(let as0 : felem s = gsub t1 0ul (nlimb s) in
let bs : felem s = gsub t1 (nlimb s) (nlimb s) in
let cs : felem s = gsub t1 (2... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | false | let finv3 #s t1 tmp =
let h0 = ST.get () in
let a : felem s = sub t1 0ul (nlimb s) in
let b : felem s = sub t1 (nlimb s) (nlimb s) in
let c : felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0 : felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1 : felem_wide s = sub tmp 0ul (nwide s) in
(* 2^200 -... | val finv3:
#s:field_spec
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 t1 /\ live h0 tmp /\ disjoint t1 tmp /\
(let as0 : felem s = gsub t1 0ul (nlimb s) in
let bs : felem s = gsub t1 (nlimb s) (nlimb s) in
let cs : felem s = gsub t1 (2... | true | null | false | let h0 = ST.get () in
let a:felem s = sub t1 0ul (nlimb s) in
let b:felem s = sub t1 (nlimb s) (nlimb s) in
let c:felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0:felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1:felem_wide s = sub tmp 0ul (nwide s) in
fsquare_times #s t0 c tmp1 100ul;
fmul_s #s t0 t0 c tmp;... | {
"checked_file": "Hacl.Impl.Curve25519.Finv.fst.checked",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"H... | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Lib.Buffer.lbuffer",
"Hacl.Impl.Curve25519.Fields.Core.limb",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Curve25519.Fields.Core.nlimb",
"Hacl.Impl.Curve25519.Fields.Core.felem_wide2",
"... | [] | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | false | false | Hacl.Impl.Curve25519.Finv.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val finv3:
#s:field_spec
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 t1 /\ live h0 tmp /\ disjoint t1 tmp /\
(let as0 : felem s = gsub t1 0ul (nlimb s) in
let bs : felem s = gsub t1 (nlimb s) (nlimb s) in
let cs : felem s = gsub t1 (2... | [] | Hacl.Impl.Curve25519.Finv.finv3 | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
t1:
Lib.Buffer.lbuffer (Hacl.Impl.Curve25519.Fields.Core.limb s)
(4ul *! Hacl.Impl.Curve25519.Fields.Core.nlimb s) ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 51,
"end_line": 249,
"start_col": 21,
"start_line": 238
} |
FStar.HyperStack.ST.Stack | val finv1:
#s:field_spec
-> i:felem s
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 i /\ live h0 t1 /\ live h0 tmp /\
disjoint i t1 /\ disjoint i tmp /\ disjoint t1 tmp /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
modifies (... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | false | let finv1 #s i t1 tmp =
let h0 = ST.get () in
let a : felem s = sub t1 0ul (nlimb s) in
let b : felem s = sub t1 (nlimb s) (nlimb s) in
let c : felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0 : felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1 : felem_wide s = sub tmp 0ul (nwide s) in
(* 2 *) ... | val finv1:
#s:field_spec
-> i:felem s
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 i /\ live h0 t1 /\ live h0 tmp /\
disjoint i t1 /\ disjoint i tmp /\ disjoint t1 tmp /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
modifies (... | true | null | false | let h0 = ST.get () in
let a:felem s = sub t1 0ul (nlimb s) in
let b:felem s = sub t1 (nlimb s) (nlimb s) in
let c:felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0:felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1:felem_wide s = sub tmp 0ul (nwide s) in
fsquare_times #s a i tmp1 1ul;
fsquare_times #s t0 a tmp... | {
"checked_file": "Hacl.Impl.Curve25519.Finv.fst.checked",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"H... | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Lib.Buffer.lbuffer",
"Hacl.Impl.Curve25519.Fields.Core.limb",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Curve25519.Fields.Core.nlimb",
"Hacl.I... | [] | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | false | false | Hacl.Impl.Curve25519.Finv.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val finv1:
#s:field_spec
-> i:felem s
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 i /\ live h0 t1 /\ live h0 tmp /\
disjoint i t1 /\ disjoint i tmp /\ disjoint t1 tmp /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
modifies (... | [] | Hacl.Impl.Curve25519.Finv.finv1 | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
i: Hacl.Impl.Curve25519.Fields.Core.felem s ->
t1:
Lib.Buffer.lbuffer (Hacl.Impl.Curve25519.Fields.Core.limb s)
(4ul *! Hacl.Impl.Curve25519.Fields.Core.nlimb s) ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 39,
"end_line": 163,
"start_col": 23,
"start_line": 149
} |
FStar.HyperStack.ST.Stack | val finv0:
#s:field_spec
-> i:felem s
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h0 ->
live h0 i /\ live h0 t1 /\ live h0 tmp /\
disjoint i t1 /\ disjoint i tmp /\ disjoint t1 tmp /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | false | let finv0 #s i t1 tmp =
let h0 = ST.get () in
let a : felem s = sub t1 0ul (nlimb s) in
let b : felem s = sub t1 (nlimb s) (nlimb s) in
let c : felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0 : felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
finv1 #s i t1 tmp;
finv2 #s t1 tmp;
finv3 #s t1 tmp;
le... | val finv0:
#s:field_spec
-> i:felem s
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h0 ->
live h0 i /\ live h0 t1 /\ live h0 tmp /\
disjoint i t1 /\ disjoint i tmp /\ disjoint t1 tmp /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
... | true | null | false | let h0 = ST.get () in
let a:felem s = sub t1 0ul (nlimb s) in
let b:felem s = sub t1 (nlimb s) (nlimb s) in
let c:felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0:felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
finv1 #s i t1 tmp;
finv2 #s t1 tmp;
finv3 #s t1 tmp;
let h1 = ST.get () in
assert (fsquare_times_inv h1 t... | {
"checked_file": "Hacl.Impl.Curve25519.Finv.fst.checked",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"H... | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Lib.Buffer.lbuffer",
"Hacl.Impl.Curve25519.Fields.Core.limb",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Curve25519.Fields.Core.nlimb",
"Hacl.I... | [] | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | false | false | Hacl.Impl.Curve25519.Finv.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val finv0:
#s:field_spec
-> i:felem s
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h0 ->
live h0 i /\ live h0 t1 /\ live h0 tmp /\
disjoint i t1 /\ disjoint i tmp /\ disjoint t1 tmp /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
... | [] | Hacl.Impl.Curve25519.Finv.finv0 | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
i: Hacl.Impl.Curve25519.Fields.Core.felem s ->
t1:
Lib.Buffer.lbuffer (Hacl.Impl.Curve25519.Fields.Core.limb s)
(4ul *! Hacl.Impl.Curve25519.Fields.Core.nlimb s) ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 61,
"end_line": 285,
"start_col": 23,
"start_line": 272
} |
FStar.HyperStack.ST.Stack | val finv2:
#s:field_spec
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 t1 /\ live h0 tmp /\ disjoint t1 tmp /\
(let as0 : felem s = gsub t1 0ul (nlimb s) in
let bs : felem s = gsub t1 (nlimb s) (nlimb s) in
fsquare_times_inv h0 as0 /\ f... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | false | let finv2 #s t1 tmp =
let h0 = ST.get () in
let a : felem s = sub t1 0ul (nlimb s) in
let b : felem s = sub t1 (nlimb s) (nlimb s) in
let c : felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0 : felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1 : felem_wide s = sub tmp 0ul (nwide s) in
(* 2^20 - ... | val finv2:
#s:field_spec
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 t1 /\ live h0 tmp /\ disjoint t1 tmp /\
(let as0 : felem s = gsub t1 0ul (nlimb s) in
let bs : felem s = gsub t1 (nlimb s) (nlimb s) in
fsquare_times_inv h0 as0 /\ f... | true | null | false | let h0 = ST.get () in
let a:felem s = sub t1 0ul (nlimb s) in
let b:felem s = sub t1 (nlimb s) (nlimb s) in
let c:felem s = sub t1 (2ul *! nlimb s) (nlimb s) in
let t0:felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
let tmp1:felem_wide s = sub tmp 0ul (nwide s) in
fsquare_times #s t0 b tmp1 10ul;
fmul_s #s c t0 b tmp;
f... | {
"checked_file": "Hacl.Impl.Curve25519.Finv.fst.checked",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"H... | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Lib.Buffer.lbuffer",
"Hacl.Impl.Curve25519.Fields.Core.limb",
"Lib.IntTypes.op_Star_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"FStar.UInt32.__uint_to_t",
"Hacl.Impl.Curve25519.Fields.Core.nlimb",
"Hacl.Impl.Curve25519.Fields.Core.felem_wide2",
"... | [] | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | false | false | Hacl.Impl.Curve25519.Finv.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val finv2:
#s:field_spec
-> t1:lbuffer (limb s) (4ul *! nlimb s)
-> tmp:felem_wide2 s ->
Stack unit
(requires fun h0 ->
live h0 t1 /\ live h0 tmp /\ disjoint t1 tmp /\
(let as0 : felem s = gsub t1 0ul (nlimb s) in
let bs : felem s = gsub t1 (nlimb s) (nlimb s) in
fsquare_times_inv h0 as0 /\ f... | [] | Hacl.Impl.Curve25519.Finv.finv2 | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
t1:
Lib.Buffer.lbuffer (Hacl.Impl.Curve25519.Fields.Core.limb s)
(4ul *! Hacl.Impl.Curve25519.Fields.Core.nlimb s) ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 40,
"end_line": 208,
"start_col": 21,
"start_line": 194
} |
FStar.HyperStack.ST.Stack | val finv:
#s:field_spec
-> o:felem s
-> i:felem s
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h0 ->
live h0 o /\ live h0 i /\ live h0 tmp /\
disjoint o i /\ disjoint i tmp /\
(disjoint o tmp) /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
modifies (loc o |+| l... | [
{
"abbrev": true,
"full_module": "Spec.Curve25519",
"short_module": "P"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Curve25519.Finv",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Curve25519.Fields.Core",
"short_module": "C"
},
{
"abbrev": ... | false | let finv #s o i tmp =
push_frame();
let t1 = create (4ul *! nlimb s) (limb_zero s) in
let h0 = ST.get () in
finv0 #s i t1 tmp;
let a : felem s = sub t1 0ul (nlimb s) in
let t0 : felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
(* 2^255 - 21 *) fmul_s #s o t0 a tmp;
let h1 = ST.get () in
assert (feval h1... | val finv:
#s:field_spec
-> o:felem s
-> i:felem s
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h0 ->
live h0 o /\ live h0 i /\ live h0 tmp /\
disjoint o i /\ disjoint i tmp /\
(disjoint o tmp) /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
modifies (loc o |+| l... | true | null | false | push_frame ();
let t1 = create (4ul *! nlimb s) (limb_zero s) in
let h0 = ST.get () in
finv0 #s i t1 tmp;
let a:felem s = sub t1 0ul (nlimb s) in
let t0:felem s = sub t1 (3ul *! nlimb s) (nlimb s) in
fmul_s #s o t0 a tmp;
let h1 = ST.get () in
assert (feval h1 o == S.finv (feval h0 i));
pop_frame () | {
"checked_file": "Hacl.Impl.Curve25519.Finv.fst.checked",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Meta.Attribute.fst.checked",
"Lib.Loops.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Curve25519.Finv.fst.checked",
"H... | [] | [
"Hacl.Impl.Curve25519.Fields.Core.field_spec",
"Hacl.Impl.Curve25519.Fields.Core.felem",
"Hacl.Impl.Curve25519.Fields.Core.felem_wide2",
"FStar.HyperStack.ST.pop_frame",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Spec.Curve25519.elem",
"Hacl.Impl.Curve25519.Fields.Core.feval",
"Hacl.Spec.Curve25... | [] | module Hacl.Impl.Curve25519.Finv
open FStar.HyperStack
open FStar.HyperStack.All
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Impl.Curve25519.Fields
module ST = FStar.HyperStack.ST
module C = Hacl.Impl.Curve25519.Fields.Core
module S = Hacl.Spec.Curve25519.Finv
module P = Spec.Curve25519
let _: squas... | false | false | Hacl.Impl.Curve25519.Finv.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val finv:
#s:field_spec
-> o:felem s
-> i:felem s
-> tmp:felem_wide2 s
-> Stack unit
(requires fun h0 ->
live h0 o /\ live h0 i /\ live h0 tmp /\
disjoint o i /\ disjoint i tmp /\
(disjoint o tmp) /\
fsquare_times_inv h0 i)
(ensures fun h0 _ h1 ->
modifies (loc o |+| l... | [] | Hacl.Impl.Curve25519.Finv.finv | {
"file_name": "code/curve25519/Hacl.Impl.Curve25519.Finv.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
o: Hacl.Impl.Curve25519.Fields.Core.felem s ->
i: Hacl.Impl.Curve25519.Fields.Core.felem s ->
tmp: Hacl.Impl.Curve25519.Fields.Core.felem_wide2 s
-> FStar.HyperStack.ST.Stack Prims.unit | {
"end_col": 13,
"end_line": 314,
"start_col": 2,
"start_line": 305
} |
Prims.Tot | val exp_mont_ladder (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_mont_ladder (#t:Type) (k:comm_monoid t) (a:t) (bBits:nat) (b:nat{b < pow2 bBits}) : t =
let (r0, r1) = Loops.repeati bBits (exp_mont_ladder_f k bBits b) (one, a) in
r0 | val exp_mont_ladder (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t
let exp_mont_ladder (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t = | false | null | false | let r0, r1 = Loops.repeati bBits (exp_mont_ladder_f k bBits b) (one, a) in
r0 | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Pervasives.Native.tuple2",
"Lib.LoopCombinators.repeati",
"Lib.Exponentiation.exp_mont_ladder_f",
"FStar.Pervasives.Native.Mktuple2",
"Lib.Exponentiation.Definition.one"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_mont_ladder (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t | [] | Lib.Exponentiation.exp_mont_ladder | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a: t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits}
-> t | {
"end_col": 4,
"end_line": 49,
"start_col": 95,
"start_line": 47
} |
Prims.Tot | val exp_lr (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_lr (#t:Type) (k:comm_monoid t) (a:t) (bBits:nat) (b:nat{b < pow2 bBits}) : t =
Loops.repeati bBits (exp_lr_f k a bBits b) one | val exp_lr (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t
let exp_lr (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t = | false | null | false | Loops.repeati bBits (exp_lr_f k a bBits b) one | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Lib.LoopCombinators.repeati",
"Lib.Exponentiation.exp_lr_f",
"Lib.Exponentiation.Definition.one"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_lr (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t | [] | Lib.Exponentiation.exp_lr | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a: t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits}
-> t | {
"end_col": 48,
"end_line": 34,
"start_col": 2,
"start_line": 34
} |
Prims.Tot | val exp_mont_ladder_swap2 (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits})
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_mont_ladder_swap2 (#t:Type) (k:comm_monoid t) (a:t) (bBits:nat) (b:nat{b < pow2 bBits}) : t =
let (r0, r1) = Loops.repeati bBits (exp_mont_ladder_swap2_f k bBits b) (one, a) in
r0 | val exp_mont_ladder_swap2 (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits})
: t
let exp_mont_ladder_swap2 (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits})
: t = | false | null | false | let r0, r1 = Loops.repeati bBits (exp_mont_ladder_swap2_f k bBits b) (one, a) in
r0 | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Pervasives.Native.tuple2",
"Lib.LoopCombinators.repeati",
"Lib.Exponentiation.exp_mont_ladder_swap2_f",
"FStar.Pervasives.Native.Mktuple2",
"Lib.Exponentiation.Definition.one"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_mont_ladder_swap2 (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits})
: t | [] | Lib.Exponentiation.exp_mont_ladder_swap2 | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a: t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits}
-> t | {
"end_col": 4,
"end_line": 69,
"start_col": 101,
"start_line": 67
} |
Prims.Tot | val exp_mont_ladder_swap (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits})
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_mont_ladder_swap (#t:Type) (k:comm_monoid t) (a:t) (bBits:nat) (b:nat{b < pow2 bBits}) : t =
let (r0, r1, sw) = Loops.repeati bBits (exp_mont_ladder_swap_f k bBits b) (one, a, 0) in
let (r0, r1) = cswap sw r0 r1 in
r0 | val exp_mont_ladder_swap (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits})
: t
let exp_mont_ladder_swap (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits})
: t = | false | null | false | let r0, r1, sw = Loops.repeati bBits (exp_mont_ladder_swap_f k bBits b) (one, a, 0) in
let r0, r1 = cswap sw r0 r1 in
r0 | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Pervasives.Native.tuple2",
"Lib.Exponentiation.cswap",
"FStar.Pervasives.Native.tuple3",
"Lib.LoopCombinators.repeati",
"Lib.Exponentiation.exp_mont_ladder_swap_f",
"FStar.Pervasives.... | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_mont_ladder_swap (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits})
: t | [] | Lib.Exponentiation.exp_mont_ladder_swap | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a: t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits}
-> t | {
"end_col": 4,
"end_line": 86,
"start_col": 100,
"start_line": 83
} |
Prims.Tot | [
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
... | false | let exp_rl_f (#t:Type) (k:comm_monoid t) (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) ((acc, c) : tuple2 t t) : tuple2 t t =
let acc = if (get_ith_bit bBits b i = 0) then acc else mul acc c in
let c = mul c c in
(acc, c) | let exp_rl_f
(#t: Type)
(k: comm_monoid t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(i: nat{i < bBits})
(acc, c: tuple2 t t)
: tuple2 t t = | false | null | false | let acc = if (get_ith_bit bBits b i = 0) then acc else mul acc c in
let c = mul c c in
(acc, c) | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.Mktuple2",
"Lib.Exponentiation.Definition.mul",
"Prims.op_Equality",
"Prims.int",
"Lib.Exponentiation.get_ith_bit",
"Prims.bool"
... | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2 | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_rl_f : k: Lib.Exponentiation.Definition.comm_monoid t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
i: Prims.nat{i < bBits} ->
_: (t * t)
-> t * t | [] | Lib.Exponentiation.exp_rl_f | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
i: Prims.nat{i < bBits} ->
_: (t * t)
-> t * t | {
"end_col": 10,
"end_line": 17,
"start_col": 134,
"start_line": 14
} | |
Prims.Tot | val exp_rl (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t | [
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
... | false | let exp_rl (#t:Type) (k:comm_monoid t) (a:t) (bBits:nat) (b:nat{b < pow2 bBits}) : t =
let (acc, c) = Loops.repeati bBits (exp_rl_f k bBits b) (one, a) in
acc | val exp_rl (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t
let exp_rl (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t = | false | null | false | let acc, c = Loops.repeati bBits (exp_rl_f k bBits b) (one, a) in
acc | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Pervasives.Native.tuple2",
"Lib.LoopCombinators.repeati",
"Lib.Exponentiation.exp_rl_f",
"FStar.Pervasives.Native.Mktuple2",
"Lib.Exponentiation.Definition.one"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_rl (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) : t | [] | Lib.Exponentiation.exp_rl | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a: t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits}
-> t | {
"end_col": 5,
"end_line": 21,
"start_col": 86,
"start_line": 19
} |
Prims.Tot | val cswap (#t: Type) (sw: nat) (r0 r1: t) : tuple2 t t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let cswap (#t:Type) (sw:nat) (r0:t) (r1:t) : tuple2 t t =
if sw = 1 then (r1, r0) else (r0, r1) | val cswap (#t: Type) (sw: nat) (r0 r1: t) : tuple2 t t
let cswap (#t: Type) (sw: nat) (r0 r1: t) : tuple2 t t = | false | null | false | if sw = 1 then (r1, r0) else (r0, r1) | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Prims.nat",
"Prims.op_Equality",
"Prims.int",
"FStar.Pervasives.Native.Mktuple2",
"Prims.bool",
"FStar.Pervasives.Native.tuple2"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val cswap (#t: Type) (sw: nat) (r0 r1: t) : tuple2 t t | [] | Lib.Exponentiation.cswap | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | sw: Prims.nat -> r0: t -> r1: t -> t * t | {
"end_col": 39,
"end_line": 57,
"start_col": 2,
"start_line": 57
} |
Prims.Tot | val exp_pow2 (#t: Type) (k: comm_monoid t) (a: t) (b: nat) : t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_pow2 (#t:Type) (k:comm_monoid t) (a:t) (b:nat) : t =
Loops.repeat b (sqr k) a | val exp_pow2 (#t: Type) (k: comm_monoid t) (a: t) (b: nat) : t
let exp_pow2 (#t: Type) (k: comm_monoid t) (a: t) (b: nat) : t = | false | null | false | Loops.repeat b (sqr k) a | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Lib.LoopCombinators.repeat",
"Lib.Exponentiation.Definition.sqr"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_pow2 (#t: Type) (k: comm_monoid t) (a: t) (b: nat) : t | [] | Lib.Exponentiation.exp_pow2 | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | k: Lib.Exponentiation.Definition.comm_monoid t -> a: t -> b: Prims.nat -> t | {
"end_col": 26,
"end_line": 94,
"start_col": 2,
"start_line": 94
} |
Prims.Tot | [
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
... | false | let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2 | let get_ith_bit (bBits: nat) (b: nat{b < pow2 bBits}) (i: nat{i < bBits}) = | false | null | false | b / pow2 i % 2 | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.op_Modulus",
"Prims.op_Division",
"Prims.int"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0" | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val get_ith_bit : bBits: Prims.nat -> b: Prims.nat{b < Prims.pow2 bBits} -> i: Prims.nat{i < bBits} -> Prims.int | [] | Lib.Exponentiation.get_ith_bit | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | bBits: Prims.nat -> b: Prims.nat{b < Prims.pow2 bBits} -> i: Prims.nat{i < bBits} -> Prims.int | {
"end_col": 16,
"end_line": 11,
"start_col": 2,
"start_line": 11
} | |
Prims.Tot | val exp_lr_f
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(i: nat{i < bBits})
(acc: t)
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_lr_f (#t:Type) (k:comm_monoid t) (a:t) (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) (acc:t) : t =
let acc = mul acc acc in
let acc = if (get_ith_bit bBits b (bBits - 1 - i) = 0) then acc else mul acc a in
acc | val exp_lr_f
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(i: nat{i < bBits})
(acc: t)
: t
let exp_lr_f
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(i: nat{i < bBits})
(ac... | false | null | false | let acc = mul acc acc in
let acc = if (get_ith_bit bBits b (bBits - 1 - i) = 0) then acc else mul acc a in
acc | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.op_Equality",
"Prims.int",
"Lib.Exponentiation.get_ith_bit",
"Prims.op_Subtraction",
"Prims.bool",
"Lib.Exponentiation.Definition.mul"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_lr_f
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(i: nat{i < bBits})
(acc: t)
: t | [] | Lib.Exponentiation.exp_lr_f | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a: t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
i: Prims.nat{i < bBits} ->
acc: t
-> t | {
"end_col": 5,
"end_line": 31,
"start_col": 115,
"start_line": 28
} |
Prims.Tot | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_mont_ladder_f (#t:Type) (k:comm_monoid t) (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) ((r0, r1) : tuple2 t t) : tuple2 t t =
if (get_ith_bit bBits b (bBits - 1 - i) = 0) then
(mul r0 r0, mul r1 r0)
else
(mul r0 r1, mul r1 r1) | let exp_mont_ladder_f
(#t: Type)
(k: comm_monoid t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(i: nat{i < bBits})
(r0, r1: tuple2 t t)
: tuple2 t t = | false | null | false | if (get_ith_bit bBits b (bBits - 1 - i) = 0) then (mul r0 r0, mul r1 r0) else (mul r0 r1, mul r1 r1) | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Pervasives.Native.tuple2",
"Prims.op_Equality",
"Prims.int",
"Lib.Exponentiation.get_ith_bit",
"Prims.op_Subtraction",
"FStar.Pervasives.Native.Mktuple2",
"Lib.Exponentiation.Defini... | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_mont_ladder_f : k: Lib.Exponentiation.Definition.comm_monoid t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
i: Prims.nat{i < bBits} ->
_: (t * t)
-> t * t | [] | Lib.Exponentiation.exp_mont_ladder_f | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
i: Prims.nat{i < bBits} ->
_: (t * t)
-> t * t | {
"end_col": 26,
"end_line": 45,
"start_col": 2,
"start_line": 42
} | |
Prims.Tot | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let get_ith_lbits (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) (l:pos) =
b / pow2 i % pow2 l | let get_ith_lbits (bBits: nat) (b: nat{b < pow2 bBits}) (i: nat{i < bBits}) (l: pos) = | false | null | false | b / pow2 i % pow2 l | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Prims.op_Modulus",
"Prims.op_Division",
"Prims.int"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val get_ith_lbits : bBits: Prims.nat -> b: Prims.nat{b < Prims.pow2 bBits} -> i: Prims.nat{i < bBits} -> l: Prims.pos
-> Prims.int | [] | Lib.Exponentiation.get_ith_lbits | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | bBits: Prims.nat -> b: Prims.nat{b < Prims.pow2 bBits} -> i: Prims.nat{i < bBits} -> l: Prims.pos
-> Prims.int | {
"end_col": 21,
"end_line": 101,
"start_col": 2,
"start_line": 101
} | |
Prims.Tot | val mul_acc_pow_a_bits_l
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(acc: t)
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let mul_acc_pow_a_bits_l (#t:Type) (k:comm_monoid t) (a:t) (bBits:nat) (b:nat{b < pow2 bBits}) (l:pos) (i:nat{i < bBits / l}) (acc:t) : t =
let bits_l = get_bits_l bBits b l i in
mul acc (pow k a bits_l) | val mul_acc_pow_a_bits_l
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(acc: t)
: t
let mul_acc_pow_a_bits_l
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 ... | false | null | false | let bits_l = get_bits_l bBits b l i in
mul acc (pow k a bits_l) | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Prims.op_Division",
"Lib.Exponentiation.Definition.mul",
"Lib.Exponentiation.Definition.pow",
"Lib.Exponentiation.get_bits_l"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mul_acc_pow_a_bits_l
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(acc: t)
: t | [] | Lib.Exponentiation.mul_acc_pow_a_bits_l | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a: t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
l: Prims.pos ->
i: Prims.nat{i < bBits / l} ->
acc: t
-> t | {
"end_col": 26,
"end_line": 110,
"start_col": 139,
"start_line": 108
} |
Prims.Tot | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_mont_ladder_swap2_f (#t:Type) (k:comm_monoid t) (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) ((r0, r1) : tuple2 t t) : tuple2 t t =
let bit = get_ith_bit bBits b (bBits - 1 - i) in
let r0, r1 = cswap bit r0 r1 in
let r0, r1 = (mul r0 r0, mul r1 r0) in
let r0, r1 = cswap bit r0 r1 in
(r0, r1) | let exp_mont_ladder_swap2_f
(#t: Type)
(k: comm_monoid t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(i: nat{i < bBits})
(r0, r1: tuple2 t t)
: tuple2 t t = | false | null | false | let bit = get_ith_bit bBits b (bBits - 1 - i) in
let r0, r1 = cswap bit r0 r1 in
let r0, r1 = (mul r0 r0, mul r1 r0) in
let r0, r1 = cswap bit r0 r1 in
(r0, r1) | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.Mktuple2",
"Lib.Exponentiation.cswap",
"Lib.Exponentiation.Definition.mul",
"Prims.int",
"Lib.Exponentiation.get_ith_bit",
"Prims... | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_mont_ladder_swap2_f : k: Lib.Exponentiation.Definition.comm_monoid t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
i: Prims.nat{i < bBits} ->
_: (t * t)
-> t * t | [] | Lib.Exponentiation.exp_mont_ladder_swap2_f | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
i: Prims.nat{i < bBits} ->
_: (t * t)
-> t * t | {
"end_col": 10,
"end_line": 65,
"start_col": 149,
"start_line": 60
} | |
Prims.Tot | val exp_double_fw_f
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(acc: t)
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_double_fw_f (#t:Type) (k:comm_monoid t)
(a1:t) (bBits:nat) (b1:nat{b1 < pow2 bBits})
(a2:t) (b2:nat{b2 < pow2 bBits})
(l:pos) (i:nat{i < bBits / l}) (acc:t) : t
=
let acc1 = exp_fw_f k a2 bBits b2 l i acc in
mul_acc_pow_a_bits_l k a1 bBits b1 l i acc1 | val exp_double_fw_f
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(acc: t)
: t
let exp_double_fw_f
(#t: Type)
(k: comm_monoid t)
(a1: t)
... | false | null | false | let acc1 = exp_fw_f k a2 bBits b2 l i acc in
mul_acc_pow_a_bits_l k a1 bBits b1 l i acc1 | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Prims.op_Division",
"Lib.Exponentiation.mul_acc_pow_a_bits_l",
"Lib.Exponentiation.exp_fw_f"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_double_fw_f
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(acc: t)
: t | [] | Lib.Exponentiation.exp_double_fw_f | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a1: t ->
bBits: Prims.nat ->
b1: Prims.nat{b1 < Prims.pow2 bBits} ->
a2: t ->
b2: Prims.nat{b2 < Prims.pow2 bBits} ->
l: Prims.pos ->
i: Prims.nat{i < bBits / l} ->
acc: t
-> t | {
"end_col": 45,
"end_line": 141,
"start_col": 2,
"start_line": 139
} |
Prims.Tot | val exp_fw (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) (l: pos) : t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_fw (#t:Type) (k:comm_monoid t) (a:t) (bBits:nat) (b:nat{b < pow2 bBits}) (l:pos) : t =
let acc0 = if bBits % l = 0 then one else exp_fw_acc0 k a bBits b l in
let res = Loops.repeati (bBits / l) (exp_fw_f k a bBits b l) acc0 in
res | val exp_fw (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) (l: pos) : t
let exp_fw (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) (l: pos) : t = | false | null | false | let acc0 = if bBits % l = 0 then one else exp_fw_acc0 k a bBits b l in
let res = Loops.repeati (bBits / l) (exp_fw_f k a bBits b l) acc0 in
res | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Lib.LoopCombinators.repeati",
"Prims.op_Division",
"Lib.Exponentiation.exp_fw_f",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Modulus",
"Lib.Exponentiation.Definition.one",... | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_fw (#t: Type) (k: comm_monoid t) (a: t) (bBits: nat) (b: nat{b < pow2 bBits}) (l: pos) : t | [] | Lib.Exponentiation.exp_fw | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a: t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
l: Prims.pos
-> t | {
"end_col": 5,
"end_line": 124,
"start_col": 94,
"start_line": 121
} |
Prims.Tot | val exp_double_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(l: pos{bBits % l <> 0})
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_double_fw_acc0 (#t:Type) (k:comm_monoid t)
(a1:t) (bBits:nat) (b1:nat{b1 < pow2 bBits})
(a2:t) (b2:nat{b2 < pow2 bBits}) (l:pos{bBits % l <> 0}) : t =
let acc_a1 = exp_fw_acc0 k a1 bBits b1 l in
let acc_a2 = exp_fw_acc0 k a2 bBits b2 l in
mul acc_a1 acc_a2 | val exp_double_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(l: pos{bBits % l <> 0})
: t
let exp_double_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
... | false | null | false | let acc_a1 = exp_fw_acc0 k a1 bBits b1 l in
let acc_a2 = exp_fw_acc0 k a2 bBits b2 l in
mul acc_a1 acc_a2 | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Prims.op_disEquality",
"Prims.int",
"Prims.op_Modulus",
"Lib.Exponentiation.Definition.mul",
"Lib.Exponentiation.exp_fw_acc0"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_double_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(l: pos{bBits % l <> 0})
: t | [] | Lib.Exponentiation.exp_double_fw_acc0 | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a1: t ->
bBits: Prims.nat ->
b1: Prims.nat{b1 < Prims.pow2 bBits} ->
a2: t ->
b2: Prims.nat{b2 < Prims.pow2 bBits} ->
l: Prims.pos{bBits % l <> 0}
-> t | {
"end_col": 19,
"end_line": 148,
"start_col": 64,
"start_line": 145
} |
Prims.Tot | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_mont_ladder_swap_f (#t:Type) (k:comm_monoid t) (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) ((r0, r1, privbit) : tuple3 t t nat) : tuple3 t t nat =
let bit = get_ith_bit bBits b (bBits - 1 - i) in
let sw = (bit + privbit) % 2 in
let r0, r1 = cswap sw r0 r1 in
let r0, r1 = (mul r0 r0, mul r1 r0... | let exp_mont_ladder_swap_f
(#t: Type)
(k: comm_monoid t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(i: nat{i < bBits})
(r0, r1, privbit: tuple3 t t nat)
: tuple3 t t nat = | false | null | false | let bit = get_ith_bit bBits b (bBits - 1 - i) in
let sw = (bit + privbit) % 2 in
let r0, r1 = cswap sw r0 r1 in
let r0, r1 = (mul r0 r0, mul r1 r0) in
(r0, r1, bit) | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.Mktuple3",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.Mktuple2",
"Lib.Exponentiation.Definition.mul",
"Lib.Exponent... | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_mont_ladder_swap_f : k: Lib.Exponentiation.Definition.comm_monoid t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
i: Prims.nat{i < bBits} ->
_: ((t * t) * Prims.nat)
-> (t * t) * Prims.nat | [] | Lib.Exponentiation.exp_mont_ladder_swap_f | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
i: Prims.nat{i < bBits} ->
_: ((t * t) * Prims.nat)
-> (t * t) * Prims.nat | {
"end_col": 15,
"end_line": 81,
"start_col": 165,
"start_line": 76
} | |
Prims.Tot | val exp_fw_f
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(acc: t)
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_fw_f (#t:Type) (k:comm_monoid t) (a:t) (bBits:nat) (b:nat{b < pow2 bBits}) (l:pos) (i:nat{i < bBits / l}) (acc:t) : t =
let acc1 = exp_pow2 k acc l in
mul_acc_pow_a_bits_l k a bBits b l i acc1 | val exp_fw_f
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(acc: t)
: t
let exp_fw_f
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos)
... | false | null | false | let acc1 = exp_pow2 k acc l in
mul_acc_pow_a_bits_l k a bBits b l i acc1 | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Prims.op_Division",
"Lib.Exponentiation.mul_acc_pow_a_bits_l",
"Lib.Exponentiation.exp_pow2"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_fw_f
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(acc: t)
: t | [] | Lib.Exponentiation.exp_fw_f | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a: t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
l: Prims.pos ->
i: Prims.nat{i < bBits / l} ->
acc: t
-> t | {
"end_col": 43,
"end_line": 114,
"start_col": 127,
"start_line": 112
} |
Prims.Tot | val exp_double_fw
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(l: pos)
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_double_fw (#t:Type) (k:comm_monoid t)
(a1:t) (bBits:nat) (b1:nat{b1 < pow2 bBits})
(a2:t) (b2:nat{b2 < pow2 bBits}) (l:pos) : t =
let acc0 = if bBits % l = 0 then one else exp_double_fw_acc0 k a1 bBits b1 a2 b2 l in
Loops.repeati (bBits / l) (exp_double_fw_f k a1 bBits b1 a2 b2 l) acc0 | val exp_double_fw
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(l: pos)
: t
let exp_double_fw
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits}... | false | null | false | let acc0 = if bBits % l = 0 then one else exp_double_fw_acc0 k a1 bBits b1 a2 b2 l in
Loops.repeati (bBits / l) (exp_double_fw_f k a1 bBits b1 a2 b2 l) acc0 | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Lib.LoopCombinators.repeati",
"Prims.op_Division",
"Lib.Exponentiation.exp_double_fw_f",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Modulus",
"Lib.Exponentiation.Definitio... | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_double_fw
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(l: pos)
: t | [] | Lib.Exponentiation.exp_double_fw | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a1: t ->
bBits: Prims.nat ->
b1: Prims.nat{b1 < Prims.pow2 bBits} ->
a2: t ->
b2: Prims.nat{b2 < Prims.pow2 bBits} ->
l: Prims.pos
-> t | {
"end_col": 72,
"end_line": 155,
"start_col": 48,
"start_line": 153
} |
Prims.Tot | val exp_four_fw
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(a3: t)
(b3: nat{b3 < pow2 bBits})
(a4: t)
(b4: nat{b4 < pow2 bBits})
(l: pos)
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_four_fw (#t:Type) (k:comm_monoid t)
(a1:t) (bBits:nat) (b1:nat{b1 < pow2 bBits})
(a2:t) (b2:nat{b2 < pow2 bBits})
(a3:t) (b3:nat{b3 < pow2 bBits})
(a4:t) (b4:nat{b4 < pow2 bBits})
(l:pos) : t =
let acc0 =
if bBits % l = 0 then one
else exp_four_fw_acc0 k a1 bBits b1 a2 b2 a3 b3 a4 b4 l in
... | val exp_four_fw
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(a3: t)
(b3: nat{b3 < pow2 bBits})
(a4: t)
(b4: nat{b4 < pow2 bBits})
(l: pos)
: t
let exp_four_fw
(#t: Type)... | false | null | false | let acc0 = if bBits % l = 0 then one else exp_four_fw_acc0 k a1 bBits b1 a2 b2 a3 b3 a4 b4 l in
Loops.repeati (bBits / l) (exp_four_fw_f k a1 bBits b1 a2 b2 a3 b3 a4 b4 l) acc0 | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Lib.LoopCombinators.repeati",
"Prims.op_Division",
"Lib.Exponentiation.exp_four_fw_f",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Modulus",
"Lib.Exponentiation.Definition.... | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_four_fw
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(a3: t)
(b3: nat{b3 < pow2 bBits})
(a4: t)
(b4: nat{b4 < pow2 bBits})
(l: pos)
: t | [] | Lib.Exponentiation.exp_four_fw | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a1: t ->
bBits: Prims.nat ->
b1: Prims.nat{b1 < Prims.pow2 bBits} ->
a2: t ->
b2: Prims.nat{b2 < Prims.pow2 bBits} ->
a3: t ->
b3: Prims.nat{b3 < Prims.pow2 bBits} ->
a4: t ->
b4: Prims.nat{b4 < Prims.pow2 bBits} ->
l: Prims.... | {
"end_col": 58,
"end_line": 200,
"start_col": 15,
"start_line": 195
} |
Prims.Tot | val exp_four_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(a3: t)
(b3: nat{b3 < pow2 bBits})
(a4: t)
(b4: nat{b4 < pow2 bBits})
(l: pos{bBits % l <> 0})
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_four_fw_acc0 (#t:Type) (k:comm_monoid t)
(a1:t) (bBits:nat) (b1:nat{b1 < pow2 bBits})
(a2:t) (b2:nat{b2 < pow2 bBits})
(a3:t) (b3:nat{b3 < pow2 bBits})
(a4:t) (b4:nat{b4 < pow2 bBits})
(l:pos{bBits % l <> 0}) : t =
let acc_a12 = exp_double_fw_acc0 k a1 bBits b1 a2 b2 l in
let acc_a34 = exp_double_... | val exp_four_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(a3: t)
(b3: nat{b3 < pow2 bBits})
(a4: t)
(b4: nat{b4 < pow2 bBits})
(l: pos{bBits % l <> 0})
: t
let exp_fou... | false | null | false | let acc_a12 = exp_double_fw_acc0 k a1 bBits b1 a2 b2 l in
let acc_a34 = exp_double_fw_acc0 k a3 bBits b3 a4 b4 l in
mul acc_a12 acc_a34 | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Prims.op_disEquality",
"Prims.int",
"Prims.op_Modulus",
"Lib.Exponentiation.Definition.mul",
"Lib.Exponentiation.exp_double_fw_acc0"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_four_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(a3: t)
(b3: nat{b3 < pow2 bBits})
(a4: t)
(b4: nat{b4 < pow2 bBits})
(l: pos{bBits % l <> 0})
: t | [] | Lib.Exponentiation.exp_four_fw_acc0 | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a1: t ->
bBits: Prims.nat ->
b1: Prims.nat{b1 < Prims.pow2 bBits} ->
a2: t ->
b2: Prims.nat{b2 < Prims.pow2 bBits} ->
a3: t ->
b3: Prims.nat{b3 < Prims.pow2 bBits} ->
a4: t ->
b4: Prims.nat{b4 < Prims.pow2 bBits} ->
l: Prims.... | {
"end_col": 21,
"end_line": 188,
"start_col": 31,
"start_line": 185
} |
Prims.Tot | val exp_four_fw_f
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(a3: t)
(b3: nat{b3 < pow2 bBits})
(a4: t)
(b4: nat{b4 < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(a... | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_four_fw_f (#t:Type) (k:comm_monoid t)
(a1:t) (bBits:nat) (b1:nat{b1 < pow2 bBits})
(a2:t) (b2:nat{b2 < pow2 bBits})
(a3:t) (b3:nat{b3 < pow2 bBits})
(a4:t) (b4:nat{b4 < pow2 bBits})
(l:pos) (i:nat{i < bBits / l}) (acc:t) : t
=
let acc = exp_fw_f k a4 bBits b4 l i acc in
let acc = mul_acc_pow_a_bi... | val exp_four_fw_f
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(a3: t)
(b3: nat{b3 < pow2 bBits})
(a4: t)
(b4: nat{b4 < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(a... | false | null | false | let acc = exp_fw_f k a4 bBits b4 l i acc in
let acc = mul_acc_pow_a_bits_l k a3 bBits b3 l i acc in
let acc = mul_acc_pow_a_bits_l k a2 bBits b2 l i acc in
let acc = mul_acc_pow_a_bits_l k a1 bBits b1 l i acc in
acc | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Prims.op_Division",
"Lib.Exponentiation.mul_acc_pow_a_bits_l",
"Lib.Exponentiation.exp_fw_f"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_four_fw_f
(#t: Type)
(k: comm_monoid t)
(a1: t)
(bBits: nat)
(b1: nat{b1 < pow2 bBits})
(a2: t)
(b2: nat{b2 < pow2 bBits})
(a3: t)
(b3: nat{b3 < pow2 bBits})
(a4: t)
(b4: nat{b4 < pow2 bBits})
(l: pos)
(i: nat{i < bBits / l})
(a... | [] | Lib.Exponentiation.exp_four_fw_f | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a1: t ->
bBits: Prims.nat ->
b1: Prims.nat{b1 < Prims.pow2 bBits} ->
a2: t ->
b2: Prims.nat{b2 < Prims.pow2 bBits} ->
a3: t ->
b3: Prims.nat{b3 < Prims.pow2 bBits} ->
a4: t ->
b4: Prims.nat{b4 < Prims.pow2 bBits} ->
l: Prims.... | {
"end_col": 5,
"end_line": 178,
"start_col": 2,
"start_line": 173
} |
Prims.Tot | val exp_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos{bBits % l <> 0})
: t | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let exp_fw_acc0 (#t:Type) (k:comm_monoid t) (a:t) (bBits:nat) (b:nat{b < pow2 bBits}) (l:pos{bBits % l <> 0}) : t =
let bits_c = get_ith_lbits bBits b (bBits / l * l) l in
pow k a bits_c | val exp_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos{bBits % l <> 0})
: t
let exp_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos{bBits % l <> 0})
: t ... | false | null | false | let bits_c = get_ith_lbits bBits b ((bBits / l) * l) l in
pow k a bits_c | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Lib.Exponentiation.Definition.comm_monoid",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Prims.op_disEquality",
"Prims.int",
"Prims.op_Modulus",
"Lib.Exponentiation.Definition.pow",
"Lib.Exponentiation.get_ith_lbits",
"FStar.Mul.op_Star",
"Prims.op_Division"
] | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val exp_fw_acc0
(#t: Type)
(k: comm_monoid t)
(a: t)
(bBits: nat)
(b: nat{b < pow2 bBits})
(l: pos{bBits % l <> 0})
: t | [] | Lib.Exponentiation.exp_fw_acc0 | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
k: Lib.Exponentiation.Definition.comm_monoid t ->
a: t ->
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
l: Prims.pos{bBits % l <> 0}
-> t | {
"end_col": 16,
"end_line": 119,
"start_col": 115,
"start_line": 117
} |
Prims.Tot | val get_bits_l (bBits: nat) (b: nat{b < pow2 bBits}) (l: pos) (i: nat{i < bBits / l})
: r: nat{r < pow2 l} | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Exponentiation.Definition",
"short_module": null
},
{
"abbrev": true,
... | false | let get_bits_l (bBits:nat) (b:nat{b < pow2 bBits}) (l:pos) (i:nat{i < bBits / l}) : r:nat{r < pow2 l} =
Math.Lemmas.lemma_mult_le_left l (i + 1) (bBits / l);
assert (l * (i + 1) <= l * (bBits / l));
get_ith_lbits bBits b (bBits - bBits % l - l * i - l) l | val get_bits_l (bBits: nat) (b: nat{b < pow2 bBits}) (l: pos) (i: nat{i < bBits / l})
: r: nat{r < pow2 l}
let get_bits_l (bBits: nat) (b: nat{b < pow2 bBits}) (l: pos) (i: nat{i < bBits / l})
: r: nat{r < pow2 l} = | false | null | false | Math.Lemmas.lemma_mult_le_left l (i + 1) (bBits / l);
assert (l * (i + 1) <= l * (bBits / l));
get_ith_lbits bBits b (bBits - bBits % l - l * i - l) l | {
"checked_file": "Lib.Exponentiation.fsti.checked",
"dependencies": [
"prims.fst.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.Definition.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemma... | [
"total"
] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.pos",
"Prims.op_Division",
"Lib.Exponentiation.get_ith_lbits",
"Prims.op_Subtraction",
"Prims.op_Modulus",
"FStar.Mul.op_Star",
"Prims.unit",
"Prims._assert",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"FStar.Math.... | [] | module Lib.Exponentiation
open FStar.Mul
module Loops = Lib.LoopCombinators
include Lib.Exponentiation.Definition
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let get_ith_bit (bBits:nat) (b:nat{b < pow2 bBits}) (i:nat{i < bBits}) =
b / pow2 i % 2
//a right-to-left binary method
let exp_rl_f (#t:Type) (k:comm_... | false | false | Lib.Exponentiation.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val get_bits_l (bBits: nat) (b: nat{b < pow2 bBits}) (l: pos) (i: nat{i < bBits / l})
: r: nat{r < pow2 l} | [] | Lib.Exponentiation.get_bits_l | {
"file_name": "lib/Lib.Exponentiation.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
bBits: Prims.nat ->
b: Prims.nat{b < Prims.pow2 bBits} ->
l: Prims.pos ->
i: Prims.nat{i < bBits / l}
-> r: Prims.nat{r < Prims.pow2 l} | {
"end_col": 57,
"end_line": 106,
"start_col": 2,
"start_line": 104
} |
Prims.Tot | val size32_u16_le:size32 serialize_u16_le | [
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.SLow",
"short_module": null
},
{
"abbrev": false,
... | false | let size32_u16_le: size32 serialize_u16_le =
assert_norm (size32_constant_precond serialize_u16_le 2ul);
size32_constant serialize_u16_le 2ul () | val size32_u16_le:size32 serialize_u16_le
let size32_u16_le:size32 serialize_u16_le = | false | null | false | assert_norm (size32_constant_precond serialize_u16_le 2ul);
size32_constant serialize_u16_le 2ul () | {
"checked_file": "LowParse.SLow.BoundedInt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLo... | [
"total"
] | [
"LowParse.SLow.Base.size32_constant",
"LowParse.Spec.Int.parse_u16_kind",
"FStar.UInt16.t",
"LowParse.Spec.BoundedInt.parse_u16_le",
"LowParse.Spec.BoundedInt.serialize_u16_le",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"LowParse.SLow.Base.size32_constant_precond"
] | [] | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | false | true | LowParse.SLow.BoundedInt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val size32_u16_le:size32 serialize_u16_le | [] | LowParse.SLow.BoundedInt.size32_u16_le | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | LowParse.SLow.Base.size32 LowParse.Spec.BoundedInt.serialize_u16_le | {
"end_col": 41,
"end_line": 124,
"start_col": 2,
"start_line": 123
} |
Prims.Tot | val size32_u32_le:size32 serialize_u32_le | [
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.SLow",
"short_module": null
},
{
"abbrev": false,
... | false | let size32_u32_le: size32 serialize_u32_le =
assert_norm (size32_constant_precond serialize_u32_le 4ul);
size32_constant serialize_u32_le 4ul () | val size32_u32_le:size32 serialize_u32_le
let size32_u32_le:size32 serialize_u32_le = | false | null | false | assert_norm (size32_constant_precond serialize_u32_le 4ul);
size32_constant serialize_u32_le 4ul () | {
"checked_file": "LowParse.SLow.BoundedInt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLo... | [
"total"
] | [
"LowParse.SLow.Base.size32_constant",
"LowParse.Spec.Int.parse_u32_kind",
"FStar.UInt32.t",
"LowParse.Spec.BoundedInt.parse_u32_le",
"LowParse.Spec.BoundedInt.serialize_u32_le",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"LowParse.SLow.Base.size32_constant_precond"
] | [] | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | false | true | LowParse.SLow.BoundedInt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val size32_u32_le:size32 serialize_u32_le | [] | LowParse.SLow.BoundedInt.size32_u32_le | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | LowParse.SLow.Base.size32 LowParse.Spec.BoundedInt.serialize_u32_le | {
"end_col": 41,
"end_line": 129,
"start_col": 2,
"start_line": 128
} |
Prims.Tot | val parse32_bounded_integer_le (sz: integer_size) : Tot (parser32 (parse_bounded_integer_le sz)) | [
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.SLow",
"short_module": null
},
{
"abbrev": false,
... | false | let parse32_bounded_integer_le (sz: integer_size) : Tot (parser32 (parse_bounded_integer_le sz))
= match sz with
| 1 -> parse32_bounded_integer_le_1
| 2 -> parse32_bounded_integer_le_2
| 3 -> parse32_bounded_integer_le_3
| 4 -> parse32_bounded_integer_le_4 | val parse32_bounded_integer_le (sz: integer_size) : Tot (parser32 (parse_bounded_integer_le sz))
let parse32_bounded_integer_le (sz: integer_size) : Tot (parser32 (parse_bounded_integer_le sz)) = | false | null | false | match sz with
| 1 -> parse32_bounded_integer_le_1
| 2 -> parse32_bounded_integer_le_2
| 3 -> parse32_bounded_integer_le_3
| 4 -> parse32_bounded_integer_le_4 | {
"checked_file": "LowParse.SLow.BoundedInt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLo... | [
"total"
] | [
"LowParse.Spec.BoundedInt.integer_size",
"LowParse.SLow.BoundedInt.parse32_bounded_integer_le_1",
"LowParse.SLow.BoundedInt.parse32_bounded_integer_le_2",
"LowParse.SLow.BoundedInt.parse32_bounded_integer_le_3",
"LowParse.SLow.BoundedInt.parse32_bounded_integer_le_4",
"LowParse.SLow.Base.parser32",
"Low... | [] | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | false | false | LowParse.SLow.BoundedInt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"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... | null | val parse32_bounded_integer_le (sz: integer_size) : Tot (parser32 (parse_bounded_integer_le sz)) | [] | LowParse.SLow.BoundedInt.parse32_bounded_integer_le | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | sz: LowParse.Spec.BoundedInt.integer_size
-> LowParse.SLow.Base.parser32 (LowParse.Spec.BoundedInt.parse_bounded_integer_le sz) | {
"end_col": 37,
"end_line": 84,
"start_col": 2,
"start_line": 80
} |
Prims.Tot | val parse32_bounded_integer (sz: integer_size) : Tot (parser32 (parse_bounded_integer sz)) | [
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.SLow",
"short_module": null
},
{
"abbrev": false,
... | false | let parse32_bounded_integer (sz: integer_size) : Tot (parser32 (parse_bounded_integer sz))
= match sz with
| 1 -> parse32_bounded_integer_1
| 2 -> parse32_bounded_integer_2
| 3 -> parse32_bounded_integer_3
| 4 -> parse32_bounded_integer_4 | val parse32_bounded_integer (sz: integer_size) : Tot (parser32 (parse_bounded_integer sz))
let parse32_bounded_integer (sz: integer_size) : Tot (parser32 (parse_bounded_integer sz)) = | false | null | false | match sz with
| 1 -> parse32_bounded_integer_1
| 2 -> parse32_bounded_integer_2
| 3 -> parse32_bounded_integer_3
| 4 -> parse32_bounded_integer_4 | {
"checked_file": "LowParse.SLow.BoundedInt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLo... | [
"total"
] | [
"LowParse.Spec.BoundedInt.integer_size",
"LowParse.SLow.BoundedInt.parse32_bounded_integer_1",
"LowParse.SLow.BoundedInt.parse32_bounded_integer_2",
"LowParse.SLow.BoundedInt.parse32_bounded_integer_3",
"LowParse.SLow.BoundedInt.parse32_bounded_integer_4",
"LowParse.SLow.Base.parser32",
"LowParse.Spec.B... | [] | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | false | false | LowParse.SLow.BoundedInt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val parse32_bounded_integer (sz: integer_size) : Tot (parser32 (parse_bounded_integer sz)) | [] | LowParse.SLow.BoundedInt.parse32_bounded_integer | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | sz: LowParse.Spec.BoundedInt.integer_size
-> LowParse.SLow.Base.parser32 (LowParse.Spec.BoundedInt.parse_bounded_integer sz) | {
"end_col": 34,
"end_line": 30,
"start_col": 2,
"start_line": 26
} |
Prims.Tot | val serialize32_bounded_integer (sz: integer_size)
: Tot (serializer32 (serialize_bounded_integer sz)) | [
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.SLow",
"short_module": null
},
{
"abbrev": false,
... | false | let serialize32_bounded_integer
(sz: integer_size)
: Tot (serializer32 (serialize_bounded_integer sz))
= match sz with
| 1 -> serialize32_bounded_integer_1
| 2 -> serialize32_bounded_integer_2
| 3 -> serialize32_bounded_integer_3
| 4 -> serialize32_bounded_integer_4 | val serialize32_bounded_integer (sz: integer_size)
: Tot (serializer32 (serialize_bounded_integer sz))
let serialize32_bounded_integer (sz: integer_size)
: Tot (serializer32 (serialize_bounded_integer sz)) = | false | null | false | match sz with
| 1 -> serialize32_bounded_integer_1
| 2 -> serialize32_bounded_integer_2
| 3 -> serialize32_bounded_integer_3
| 4 -> serialize32_bounded_integer_4 | {
"checked_file": "LowParse.SLow.BoundedInt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLo... | [
"total"
] | [
"LowParse.Spec.BoundedInt.integer_size",
"LowParse.SLow.BoundedInt.serialize32_bounded_integer_1",
"LowParse.SLow.BoundedInt.serialize32_bounded_integer_2",
"LowParse.SLow.BoundedInt.serialize32_bounded_integer_3",
"LowParse.SLow.BoundedInt.serialize32_bounded_integer_4",
"LowParse.SLow.Base.serializer32"... | [] | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | false | false | LowParse.SLow.BoundedInt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val serialize32_bounded_integer (sz: integer_size)
: Tot (serializer32 (serialize_bounded_integer sz)) | [] | LowParse.SLow.BoundedInt.serialize32_bounded_integer | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | sz: LowParse.Spec.BoundedInt.integer_size
-> LowParse.SLow.Base.serializer32 (LowParse.Spec.BoundedInt.serialize_bounded_integer sz) | {
"end_col": 38,
"end_line": 57,
"start_col": 2,
"start_line": 53
} |
Prims.Tot | val serialize32_bounded_integer_le (sz: integer_size)
: Tot (serializer32 (serialize_bounded_integer_le sz)) | [
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.SLow",
"short_module": null
},
{
"abbrev": false,
... | false | let serialize32_bounded_integer_le (sz: integer_size) : Tot (serializer32 (serialize_bounded_integer_le sz))
= match sz with
| 1 -> serialize32_bounded_integer_le_1
| 2 -> serialize32_bounded_integer_le_2
| 3 -> serialize32_bounded_integer_le_3
| 4 -> serialize32_bounded_integer_le_4 | val serialize32_bounded_integer_le (sz: integer_size)
: Tot (serializer32 (serialize_bounded_integer_le sz))
let serialize32_bounded_integer_le (sz: integer_size)
: Tot (serializer32 (serialize_bounded_integer_le sz)) = | false | null | false | match sz with
| 1 -> serialize32_bounded_integer_le_1
| 2 -> serialize32_bounded_integer_le_2
| 3 -> serialize32_bounded_integer_le_3
| 4 -> serialize32_bounded_integer_le_4 | {
"checked_file": "LowParse.SLow.BoundedInt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLo... | [
"total"
] | [
"LowParse.Spec.BoundedInt.integer_size",
"LowParse.SLow.BoundedInt.serialize32_bounded_integer_le_1",
"LowParse.SLow.BoundedInt.serialize32_bounded_integer_le_2",
"LowParse.SLow.BoundedInt.serialize32_bounded_integer_le_3",
"LowParse.SLow.BoundedInt.serialize32_bounded_integer_le_4",
"LowParse.SLow.Base.s... | [] | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | false | false | LowParse.SLow.BoundedInt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val serialize32_bounded_integer_le (sz: integer_size)
: Tot (serializer32 (serialize_bounded_integer_le sz)) | [] | LowParse.SLow.BoundedInt.serialize32_bounded_integer_le | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | sz: LowParse.Spec.BoundedInt.integer_size
-> LowParse.SLow.Base.serializer32 (LowParse.Spec.BoundedInt.serialize_bounded_integer_le sz) | {
"end_col": 41,
"end_line": 113,
"start_col": 2,
"start_line": 109
} |
Prims.Tot | val parse32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (parser32 (parse_bounded_int32 (U32.v min32) (U32.v max32))) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"... | false | let parse32_bounded_int32
(min32: U32.t)
(max32: U32.t { 0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296 })
: Tot (parser32 (parse_bounded_int32 (U32.v min32) (U32.v max32)))
= fun input -> (
if max32 `U32.lt` 256ul
then parse32_bounded_int32_1 min32 max32 input
else if max32 `U32.lt... | val parse32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (parser32 (parse_bounded_int32 (U32.v min32) (U32.v max32)))
let parse32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v... | false | null | false | fun input ->
(if max32 `U32.lt` 256ul
then parse32_bounded_int32_1 min32 max32 input
else
if max32 `U32.lt` 65536ul
then parse32_bounded_int32_2 min32 max32 input
else
if max32 `U32.lt` 16777216ul
then parse32_bounded_int32_3 min32 max32 input
else parse32_bounded_int... | {
"checked_file": "LowParse.SLow.BoundedInt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLo... | [
"total"
] | [
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"Prims.op_LessThanOrEqual",
"LowParse.SLow.Base.bytes32",
"FStar.UInt32.lt",
"FStar.UInt32.__uint_to_t",
"LowParse.SLow.BoundedInt.parse32_bounded_int32_1",
"Prims.bool",
"LowParse.SLow.BoundedInt.parse32_boun... | [] | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | false | false | LowParse.SLow.BoundedInt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val parse32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (parser32 (parse_bounded_int32 (U32.v min32) (U32.v max32))) | [] | LowParse.SLow.BoundedInt.parse32_bounded_int32 | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} |
min32: FStar.UInt32.t ->
max32:
FStar.UInt32.t
{ 0 < FStar.UInt32.v max32 /\ FStar.UInt32.v min32 <= FStar.UInt32.v max32 /\
FStar.UInt32.v max32 < 4294967296 }
-> LowParse.SLow.Base.parser32 (LowParse.Spec.BoundedInt.parse_bounded_int32 (FStar.UInt32.v min32
)
(FS... | {
"end_col": 3,
"end_line": 166,
"start_col": 2,
"start_line": 158
} |
Prims.Tot | val parse32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (parser32 (parse_bounded_int32_le (U32.v min32) (U32.v max32))) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"... | false | let parse32_bounded_int32_le
(min32: U32.t)
(max32: U32.t { 0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296 })
: Tot (parser32 (parse_bounded_int32_le (U32.v min32) (U32.v max32)))
= fun input -> (
if max32 `U32.lt` 256ul
then parse32_bounded_int32_le_1 min32 max32 input
else if max3... | val parse32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (parser32 (parse_bounded_int32_le (U32.v min32) (U32.v max32)))
let parse32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32... | false | null | false | fun input ->
(if max32 `U32.lt` 256ul
then parse32_bounded_int32_le_1 min32 max32 input
else
if max32 `U32.lt` 65536ul
then parse32_bounded_int32_le_2 min32 max32 input
else
if max32 `U32.lt` 16777216ul
then parse32_bounded_int32_le_3 min32 max32 input
else parse32_bo... | {
"checked_file": "LowParse.SLow.BoundedInt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLo... | [
"total"
] | [
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"Prims.op_LessThanOrEqual",
"LowParse.SLow.Base.bytes32",
"FStar.UInt32.lt",
"FStar.UInt32.__uint_to_t",
"LowParse.SLow.BoundedInt.parse32_bounded_int32_le_1",
"Prims.bool",
"LowParse.SLow.BoundedInt.parse32_b... | [] | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | false | false | LowParse.SLow.BoundedInt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val parse32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (parser32 (parse_bounded_int32_le (U32.v min32) (U32.v max32))) | [] | LowParse.SLow.BoundedInt.parse32_bounded_int32_le | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} |
min32: FStar.UInt32.t ->
max32:
FStar.UInt32.t
{ 0 < FStar.UInt32.v max32 /\ FStar.UInt32.v min32 <= FStar.UInt32.v max32 /\
FStar.UInt32.v max32 < 4294967296 }
-> LowParse.SLow.Base.parser32 (LowParse.Spec.BoundedInt.parse_bounded_int32_le (FStar.UInt32.v min32
)
... | {
"end_col": 3,
"end_line": 237,
"start_col": 2,
"start_line": 229
} |
Prims.Tot | val serialize32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (serializer32 (serialize_bounded_int32 (U32.v min32) (U32.v max32))) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"... | false | let serialize32_bounded_int32
(min32: U32.t)
(max32: U32.t { 0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296 })
: Tot (serializer32 (serialize_bounded_int32 (U32.v min32) (U32.v max32)))
= fun input -> (
if max32 `U32.lt` 256ul
then serialize32_bounded_int32_1 min32 max32 input
else ... | val serialize32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (serializer32 (serialize_bounded_int32 (U32.v min32) (U32.v max32)))
let serialize32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.... | false | null | false | fun input ->
(if max32 `U32.lt` 256ul
then serialize32_bounded_int32_1 min32 max32 input
else
if max32 `U32.lt` 65536ul
then serialize32_bounded_int32_2 min32 max32 input
else
if max32 `U32.lt` 16777216ul
then serialize32_bounded_int32_3 min32 max32 input
else seriali... | {
"checked_file": "LowParse.SLow.BoundedInt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLo... | [
"total"
] | [
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.BoundedInt.bounded_int32",
"FStar.UInt32.lt",
"FStar.UInt32.__uint_to_t",
"LowParse.SLow.BoundedInt.serialize32_bounded_int32_1",
"Prims.bool",
"LowParse.SLow.Bounded... | [] | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | false | false | LowParse.SLow.BoundedInt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val serialize32_bounded_int32
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (serializer32 (serialize_bounded_int32 (U32.v min32) (U32.v max32))) | [] | LowParse.SLow.BoundedInt.serialize32_bounded_int32 | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} |
min32: FStar.UInt32.t ->
max32:
FStar.UInt32.t
{ 0 < FStar.UInt32.v max32 /\ FStar.UInt32.v min32 <= FStar.UInt32.v max32 /\
FStar.UInt32.v max32 < 4294967296 }
-> LowParse.SLow.Base.serializer32 (LowParse.Spec.BoundedInt.serialize_bounded_int32 (FStar.UInt32.v
min32)
... | {
"end_col": 3,
"end_line": 201,
"start_col": 2,
"start_line": 193
} |
Prims.Tot | val serialize32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (serializer32 (serialize_bounded_int32_le (U32.v min32) (U32.v max32))) | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_module": "LowParse.SLow.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BoundedInt",
"short_module": null
},
{
"abbrev": false,
"... | false | let serialize32_bounded_int32_le
(min32: U32.t)
(max32: U32.t { 0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296 })
: Tot (serializer32 (serialize_bounded_int32_le (U32.v min32) (U32.v max32)))
= fun input -> (
if max32 `U32.lt` 256ul
then serialize32_bounded_int32_le_1 min32 max32 inpu... | val serialize32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (serializer32 (serialize_bounded_int32_le (U32.v min32) (U32.v max32)))
let serialize32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max3... | false | null | false | fun input ->
(if max32 `U32.lt` 256ul
then serialize32_bounded_int32_le_1 min32 max32 input
else
if max32 `U32.lt` 65536ul
then serialize32_bounded_int32_le_2 min32 max32 input
else
if max32 `U32.lt` 16777216ul
then serialize32_bounded_int32_le_3 min32 max32 input
els... | {
"checked_file": "LowParse.SLow.BoundedInt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BoundedInt.fsti.checked",
"LowParse.SLow.Base.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": false,
"source_file": "LowParse.SLo... | [
"total"
] | [
"FStar.UInt32.t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.UInt32.v",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.BoundedInt.bounded_int32",
"FStar.UInt32.lt",
"FStar.UInt32.__uint_to_t",
"LowParse.SLow.BoundedInt.serialize32_bounded_int32_le_1",
"Prims.bool",
"LowParse.SLow.Boun... | [] | module LowParse.SLow.BoundedInt
include LowParse.Spec.BoundedInt
include LowParse.SLow.Base
(* bounded integers *)
inline_for_extraction
val parse32_bounded_integer_1
: (parser32 (parse_bounded_integer 1))
inline_for_extraction
val parse32_bounded_integer_2
: (parser32 (parse_bounded_integer 2))
inline_for_extracti... | false | false | LowParse.SLow.BoundedInt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val serialize32_bounded_int32_le
(min32: U32.t)
(max32: U32.t{0 < U32.v max32 /\ U32.v min32 <= U32.v max32 /\ U32.v max32 < 4294967296})
: Tot (serializer32 (serialize_bounded_int32_le (U32.v min32) (U32.v max32))) | [] | LowParse.SLow.BoundedInt.serialize32_bounded_int32_le | {
"file_name": "src/lowparse/LowParse.SLow.BoundedInt.fsti",
"git_rev": "446a08ce38df905547cf20f28c43776b22b8087a",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} |
min32: FStar.UInt32.t ->
max32:
FStar.UInt32.t
{ 0 < FStar.UInt32.v max32 /\ FStar.UInt32.v min32 <= FStar.UInt32.v max32 /\
FStar.UInt32.v max32 < 4294967296 }
-> LowParse.SLow.Base.serializer32 (LowParse.Spec.BoundedInt.serialize_bounded_int32_le (FStar.UInt32.v
min32)... | {
"end_col": 3,
"end_line": 272,
"start_col": 2,
"start_line": 264
} |
Prims.Tot | val lowerUpper128u (l u: uint_t 64) : uint_t 128 | [
{
"abbrev": false,
"full_module": "FStar.UInt",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.BV",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Poly130... | false | let lowerUpper128u (l:uint_t 64) (u:uint_t 64) : uint_t 128 =
0x10000000000000000 * u + l | val lowerUpper128u (l u: uint_t 64) : uint_t 128
let lowerUpper128u (l u: uint_t 64) : uint_t 128 = | false | null | false | 0x10000000000000000 * u + l | {
"checked_file": "Vale.Poly1305.Bitvectors.fsti.checked",
"dependencies": [
"prims.fst.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.BV.fsti.checked"
],
"interface_file": false,
"source_file": "Vale.Poly1305.Bitvectors.fsti"
} | [
"total"
] | [
"FStar.UInt.uint_t",
"Prims.op_Addition",
"FStar.Mul.op_Star"
] | [] | module Vale.Poly1305.Bitvectors
open FStar.BV
open FStar.Mul
open FStar.UInt
val lemma_shr2: (x:uint_t 64) -> Lemma
((shift_right #64 x 2 == udiv #64 x 4))
[SMTPat (shift_right #64 x 2)]
val lemma_shr4: x:uint_t 64 -> Lemma (shift_right #64 x 4 == udiv #64 x 16)
[SMTPat (shift_... | false | false | Vale.Poly1305.Bitvectors.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lowerUpper128u (l u: uint_t 64) : uint_t 128 | [] | Vale.Poly1305.Bitvectors.lowerUpper128u | {
"file_name": "vale/code/crypto/poly1305/x64/Vale.Poly1305.Bitvectors.fsti",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | l: FStar.UInt.uint_t 64 -> u3: FStar.UInt.uint_t 64 -> FStar.UInt.uint_t 128 | {
"end_col": 31,
"end_line": 57,
"start_col": 4,
"start_line": 57
} |
Prims.Tot | [
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abbrev": true,
"full_module": "EverCrypt.Hash",
"short_module": "EHS"
},
{
"abbrev": true,
"... | false | let mt_p = MerkleTree.Low.mt_p | let mt_p = | false | null | false | MerkleTree.Low.mt_p | {
"checked_file": "MerkleTree.EverCrypt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"MerkleTree.New.High.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Regional.fst.checked",
"LowStar... | [
"total"
] | [
"MerkleTree.Low.mt_p"
] | [] | module MerkleTree.EverCrypt
module HH = FStar.Monotonic.HyperHeap
module B = LowStar.Buffer
module HST = FStar.HyperStack.ST
module MTH = MerkleTree.New.High
module MTLH = MerkleTree.Low.Hashfunctions
module MTLD = MerkleTree.Low.Datastructures
open LowStar.Regional
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
... | false | true | MerkleTree.EverCrypt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mt_p : Type0 | [] | MerkleTree.EverCrypt.mt_p | {
"file_name": "src/MerkleTree.EverCrypt.fsti",
"git_rev": "3b0f086655c145aa23f58a97259ebf4cf112a4a3",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | Type0 | {
"end_col": 30,
"end_line": 21,
"start_col": 11,
"start_line": 21
} | |
Prims.GTot | [
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abbrev": true,
"full_module": "EverCrypt.Hash",
"short_module": "EHS"
},
{
"abbrev": true,
"... | false | let mt_safe = MerkleTree.Low.mt_safe | let mt_safe = | false | null | false | MerkleTree.Low.mt_safe | {
"checked_file": "MerkleTree.EverCrypt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"MerkleTree.New.High.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Regional.fst.checked",
"LowStar... | [
"sometrivial"
] | [
"MerkleTree.Low.mt_safe"
] | [] | module MerkleTree.EverCrypt
module HH = FStar.Monotonic.HyperHeap
module B = LowStar.Buffer
module HST = FStar.HyperStack.ST
module MTH = MerkleTree.New.High
module MTLH = MerkleTree.Low.Hashfunctions
module MTLD = MerkleTree.Low.Datastructures
open LowStar.Regional
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
... | false | false | MerkleTree.EverCrypt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mt_safe : h: FStar.Monotonic.HyperStack.mem -> mt: MerkleTree.Low.mt_p -> Prims.GTot Type0 | [] | MerkleTree.EverCrypt.mt_safe | {
"file_name": "src/MerkleTree.EverCrypt.fsti",
"git_rev": "3b0f086655c145aa23f58a97259ebf4cf112a4a3",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | h: FStar.Monotonic.HyperStack.mem -> mt: MerkleTree.Low.mt_p -> Prims.GTot Type0 | {
"end_col": 36,
"end_line": 25,
"start_col": 14,
"start_line": 25
} | |
Prims.GTot | [
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abbrev": true,
"full_module": "EverCrypt.Hash",
"short_module": "EHS"
},
{
"abbrev": true,
"... | false | let mt_loc = MerkleTree.Low.mt_loc | let mt_loc = | false | null | false | MerkleTree.Low.mt_loc | {
"checked_file": "MerkleTree.EverCrypt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"MerkleTree.New.High.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Regional.fst.checked",
"LowStar... | [
"sometrivial"
] | [
"MerkleTree.Low.mt_loc"
] | [] | module MerkleTree.EverCrypt
module HH = FStar.Monotonic.HyperHeap
module B = LowStar.Buffer
module HST = FStar.HyperStack.ST
module MTH = MerkleTree.New.High
module MTLH = MerkleTree.Low.Hashfunctions
module MTLD = MerkleTree.Low.Datastructures
open LowStar.Regional
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
... | false | false | MerkleTree.EverCrypt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mt_loc : mt: MerkleTree.Low.mt_p -> Prims.GTot LowStar.Monotonic.Buffer.loc | [] | MerkleTree.EverCrypt.mt_loc | {
"file_name": "src/MerkleTree.EverCrypt.fsti",
"git_rev": "3b0f086655c145aa23f58a97259ebf4cf112a4a3",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | mt: MerkleTree.Low.mt_p -> Prims.GTot LowStar.Monotonic.Buffer.loc | {
"end_col": 34,
"end_line": 23,
"start_col": 13,
"start_line": 23
} | |
Prims.Tot | [
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abbrev": true,
"full_module": "EverCrypt.Hash",
"short_module": "EHS"
},
{
"abbrev": true,
"... | false | let hash #hash_size = MTLD.hash #hash_size | let hash #hash_size = | false | null | false | MTLD.hash #hash_size | {
"checked_file": "MerkleTree.EverCrypt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"MerkleTree.New.High.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Regional.fst.checked",
"LowStar... | [
"total"
] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"MerkleTree.Low.Datastructures.hash"
] | [] | module MerkleTree.EverCrypt
module HH = FStar.Monotonic.HyperHeap
module B = LowStar.Buffer
module HST = FStar.HyperStack.ST
module MTH = MerkleTree.New.High
module MTLH = MerkleTree.Low.Hashfunctions
module MTLD = MerkleTree.Low.Datastructures
open LowStar.Regional
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
... | false | true | MerkleTree.EverCrypt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val hash : Type0 | [] | MerkleTree.EverCrypt.hash | {
"file_name": "src/MerkleTree.EverCrypt.fsti",
"git_rev": "3b0f086655c145aa23f58a97259ebf4cf112a4a3",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | Type0 | {
"end_col": 42,
"end_line": 19,
"start_col": 22,
"start_line": 19
} | |
Prims.GTot | [
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abbrev": true,
"full_module": "EverCrypt.Hash",
"short_module": "EHS"
},
{
"abbrev": true,
"... | false | let mt_lift = MerkleTree.Low.mt_lift | let mt_lift = | false | null | false | MerkleTree.Low.mt_lift | {
"checked_file": "MerkleTree.EverCrypt.fsti.checked",
"dependencies": [
"prims.fst.checked",
"MerkleTree.New.High.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Regional.fst.checked",
"LowStar... | [
"sometrivial"
] | [
"MerkleTree.Low.mt_lift"
] | [] | module MerkleTree.EverCrypt
module HH = FStar.Monotonic.HyperHeap
module B = LowStar.Buffer
module HST = FStar.HyperStack.ST
module MTH = MerkleTree.New.High
module MTLH = MerkleTree.Low.Hashfunctions
module MTLD = MerkleTree.Low.Datastructures
open LowStar.Regional
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
... | false | false | MerkleTree.EverCrypt.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mt_lift : h: FStar.Monotonic.HyperStack.mem -> mt: MerkleTree.Low.mt_p{MerkleTree.Low.mt_safe h mt}
-> Prims.GTot (r: MerkleTree.New.High.merkle_tree{MerkleTree.New.High.mt_wf_elts r}) | [] | MerkleTree.EverCrypt.mt_lift | {
"file_name": "src/MerkleTree.EverCrypt.fsti",
"git_rev": "3b0f086655c145aa23f58a97259ebf4cf112a4a3",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | h: FStar.Monotonic.HyperStack.mem -> mt: MerkleTree.Low.mt_p{MerkleTree.Low.mt_safe h mt}
-> Prims.GTot (r: MerkleTree.New.High.merkle_tree{MerkleTree.New.High.mt_wf_elts r}) | {
"end_col": 36,
"end_line": 27,
"start_col": 14,
"start_line": 27
} | |
FStar.HyperStack.ST.Stack | val bn_is_odd:
#t:limb_t
-> len:size_t{v len > 0}
-> a:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_is_odd (as_seq h0 a)) | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | false | let bn_is_odd #t len a = a.(0ul) &. uint #t 1 | val bn_is_odd:
#t:limb_t
-> len:size_t{v len > 0}
-> a:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_is_odd (as_seq h0 a))
let bn_is_odd #t len a = | true | null | false | a.(0ul) &. uint #t 1 | {
"checked_file": "Hacl.Bignum.Comparison.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked"... | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_GreaterThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.Definitions.lbignum",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.SEC",
"Lib.IntTypes.uint",
"Hacl.Bignum.Definitions.limb",
"Lib.... | [] | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | false | false | Hacl.Bignum.Comparison.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val bn_is_odd:
#t:limb_t
-> len:size_t{v len > 0}
-> a:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_is_odd (as_seq h0 a)) | [] | Hacl.Bignum.Comparison.bn_is_odd | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | len: Lib.IntTypes.size_t{Lib.IntTypes.v len > 0} -> a: Hacl.Bignum.Definitions.lbignum t len
-> FStar.HyperStack.ST.Stack (Hacl.Bignum.Definitions.limb t) | {
"end_col": 45,
"end_line": 35,
"start_col": 25,
"start_line": 35
} |
FStar.HyperStack.ST.Stack | val bn_is_zero_mask:
#t:limb_t
-> len:size_t{v len > 0}
-> a:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_is_zero_mask (as_seq h0 a)) | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | false | let bn_is_zero_mask #t len b =
push_frame ();
let bn_zero = create len (uint #t 0) in
let res = bn_eq_mask len b bn_zero in
pop_frame ();
res | val bn_is_zero_mask:
#t:limb_t
-> len:size_t{v len > 0}
-> a:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_is_zero_mask (as_seq h0 a))
let bn_is_zero_mask #t len b = | true | null | false | push_frame ();
let bn_zero = create len (uint #t 0) in
let res = bn_eq_mask len b bn_zero in
pop_frame ();
res | {
"checked_file": "Hacl.Bignum.Comparison.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked"... | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_GreaterThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.Definitions.limb",
"Prims.unit",
"FStar.HyperStack.ST.pop_frame",
"Hacl.Bignum.Comparison.bn_e... | [] | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | false | false | Hacl.Bignum.Comparison.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val bn_is_zero_mask:
#t:limb_t
-> len:size_t{v len > 0}
-> a:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_is_zero_mask (as_seq h0 a)) | [] | Hacl.Bignum.Comparison.bn_is_zero_mask | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | len: Lib.IntTypes.size_t{Lib.IntTypes.v len > 0} -> a: Hacl.Bignum.Definitions.lbignum t len
-> FStar.HyperStack.ST.Stack (Hacl.Bignum.Definitions.limb t) | {
"end_col": 5,
"end_line": 72,
"start_col": 2,
"start_line": 68
} |
FStar.HyperStack.ST.Stack | val bn_lt_pow2_mask:
#t:limb_t
-> len:size_t{0 < v len /\ bits t * v len <= max_size_t}
-> b:lbignum t len
-> x:size_t{v x < bits t * v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_lt_pow2_mask (as_seq h0 b) (v x)) | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | false | let bn_lt_pow2_mask #t len b x =
push_frame ();
let b2 = create len (uint #t 0) in
bn_set_ith_bit len b2 x;
let res = bn_lt_mask len b b2 in
pop_frame ();
res | val bn_lt_pow2_mask:
#t:limb_t
-> len:size_t{0 < v len /\ bits t * v len <= max_size_t}
-> b:lbignum t len
-> x:size_t{v x < bits t * v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_lt_pow2_mask (as_seq h0 b) (v x))
let bn_lt_pow2_mask #t l... | true | null | false | push_frame ();
let b2 = create len (uint #t 0) in
bn_set_ith_bit len b2 x;
let res = bn_lt_mask len b b2 in
pop_frame ();
res | {
"checked_file": "Hacl.Bignum.Comparison.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked"... | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Lib.IntTypes.max_size_t",
"Hacl.Bignum.Definitions.lbignu... | [] | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | false | false | Hacl.Bignum.Comparison.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val bn_lt_pow2_mask:
#t:limb_t
-> len:size_t{0 < v len /\ bits t * v len <= max_size_t}
-> b:lbignum t len
-> x:size_t{v x < bits t * v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_lt_pow2_mask (as_seq h0 b) (v x)) | [] | Hacl.Bignum.Comparison.bn_lt_pow2_mask | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len:
Lib.IntTypes.size_t
{ 0 < Lib.IntTypes.v len /\
Lib.IntTypes.bits t * Lib.IntTypes.v len <= Lib.IntTypes.max_size_t } ->
b: Hacl.Bignum.Definitions.lbignum t len ->
x: Lib.IntTypes.size_t{Lib.IntTypes.v x < Lib.IntTypes.bits t * Lib.IntTypes.v len}
-> FStar.HyperStack.ST.Stac... | {
"end_col": 5,
"end_line": 127,
"start_col": 2,
"start_line": 122
} |
FStar.HyperStack.ST.Stack | val bn_gt_pow2_mask:
#t:limb_t
-> len:size_t{0 < v len /\ bits t * v len <= max_size_t}
-> b:lbignum t len
-> x:size_t{v x < bits t * v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_gt_pow2_mask (as_seq h0 b) (v x)) | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | false | let bn_gt_pow2_mask #t len b x =
push_frame ();
let b2 = create len (uint #t 0) in
bn_set_ith_bit len b2 x;
let res = bn_lt_mask len b2 b in
pop_frame ();
res | val bn_gt_pow2_mask:
#t:limb_t
-> len:size_t{0 < v len /\ bits t * v len <= max_size_t}
-> b:lbignum t len
-> x:size_t{v x < bits t * v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_gt_pow2_mask (as_seq h0 b) (v x))
let bn_gt_pow2_mask #t l... | true | null | false | push_frame ();
let b2 = create len (uint #t 0) in
bn_set_ith_bit len b2 x;
let res = bn_lt_mask len b2 b in
pop_frame ();
res | {
"checked_file": "Hacl.Bignum.Comparison.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked"... | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Lib.IntTypes.max_size_t",
"Hacl.Bignum.Definitions.lbignu... | [] | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | false | false | Hacl.Bignum.Comparison.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val bn_gt_pow2_mask:
#t:limb_t
-> len:size_t{0 < v len /\ bits t * v len <= max_size_t}
-> b:lbignum t len
-> x:size_t{v x < bits t * v len} ->
Stack (limb t)
(requires fun h -> live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_gt_pow2_mask (as_seq h0 b) (v x)) | [] | Hacl.Bignum.Comparison.bn_gt_pow2_mask | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len:
Lib.IntTypes.size_t
{ 0 < Lib.IntTypes.v len /\
Lib.IntTypes.bits t * Lib.IntTypes.v len <= Lib.IntTypes.max_size_t } ->
b: Hacl.Bignum.Definitions.lbignum t len ->
x: Lib.IntTypes.size_t{Lib.IntTypes.v x < Lib.IntTypes.bits t * Lib.IntTypes.v len}
-> FStar.HyperStack.ST.Stac... | {
"end_col": 5,
"end_line": 147,
"start_col": 2,
"start_line": 142
} |
FStar.HyperStack.ST.Stack | val bn_lt_mask:
#t:limb_t
-> len:size_t
-> a:lbignum t len
-> b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_lt_mask (as_seq h0 a) (as_seq h0 b)) | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | false | let bn_lt_mask #t len a b =
push_frame ();
let acc = create 1ul (uint #t 0) in
[@inline_let]
let refl h i : GTot (limb t) = Lib.Sequence.index (as_seq h acc) 0 in
[@inline_let]
let footprint i = loc acc in
[@inline_let]
let spec h = S.bn_lt_mask_f (as_seq h a) (as_seq h b) in
let h0 = ST.get () in
... | val bn_lt_mask:
#t:limb_t
-> len:size_t
-> a:lbignum t len
-> b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_lt_mask (as_seq h0 a) (as_seq h0 b))
let bn_lt_mask #t len a b = | true | null | false | push_frame ();
let acc = create 1ul (uint #t 0) in
[@@ inline_let ]let refl h i : GTot (limb t) = Lib.Sequence.index (as_seq h acc) 0 in
[@@ inline_let ]let footprint i = loc acc in
[@@ inline_let ]let spec h = S.bn_lt_mask_f (as_seq h a) (as_seq h b) in
let h0 = ST.get () in
loop h0
len
(S.bn_lt_mask_t t (v len))
... | {
"checked_file": "Hacl.Bignum.Comparison.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked"... | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.Definitions.limb",
"Prims.unit",
"FStar.HyperStack.ST.pop_frame",
"Lib.Buffer.op_Array_Access",
"Lib.Buffer.MUT",
"FStar.UInt32.__uint_to_t",
"Lib.Buffer.loop",
"Hacl.Spec.Bignum.Comparison.b... | [] | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | false | false | Hacl.Bignum.Comparison.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val bn_lt_mask:
#t:limb_t
-> len:size_t
-> a:lbignum t len
-> b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_lt_mask (as_seq h0 a) (as_seq h0 b)) | [] | Hacl.Bignum.Comparison.bn_lt_mask | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Lib.IntTypes.size_t ->
a: Hacl.Bignum.Definitions.lbignum t len ->
b: Hacl.Bignum.Definitions.lbignum t len
-> FStar.HyperStack.ST.Stack (Hacl.Bignum.Definitions.limb t) | {
"end_col": 6,
"end_line": 107,
"start_col": 2,
"start_line": 87
} |
FStar.HyperStack.ST.Stack | val bn_eq_mask:
#t:limb_t
-> len:size_t
-> a:lbignum t len
-> b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_eq_mask (as_seq h0 a) (as_seq h0 b)) | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Comparison",
"short_module": "S"
},
{
"abbrev": fa... | false | let bn_eq_mask #t len a b =
push_frame ();
let mask = create 1ul (ones t SEC) in
let mask = Lib.ByteBuffer.buf_eq_mask a b len mask in
pop_frame ();
mask | val bn_eq_mask:
#t:limb_t
-> len:size_t
-> a:lbignum t len
-> b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_eq_mask (as_seq h0 a) (as_seq h0 b))
let bn_eq_mask #t len a b = | true | null | false | push_frame ();
let mask = create 1ul (ones t SEC) in
let mask = Lib.ByteBuffer.buf_eq_mask a b len mask in
pop_frame ();
mask | {
"checked_file": "Hacl.Bignum.Comparison.fst.checked",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteBuffer.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Bignum.Comparison.fst.checked"... | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.Definitions.limb",
"Prims.unit",
"FStar.HyperStack.ST.pop_frame",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Lib.ByteBuffer.buf_eq_mask",
"Lib.Buffer.lbuffer_t",
"Lib.Buffer.MUT",
"FStar.UI... | [] | module Hacl.Bignum.Comparison
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Base
open Hacl.Bignum.Definitions
open Hacl.Bignum.Lib
module S = Hacl.Spec.Bignum.Comparison
module ST = FStar.HyperStack.ST
module Loops = Lib.LoopCombinators
#set-optio... | false | false | Hacl.Bignum.Comparison.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val bn_eq_mask:
#t:limb_t
-> len:size_t
-> a:lbignum t len
-> b:lbignum t len ->
Stack (limb t)
(requires fun h -> live h a /\ live h b)
(ensures fun h0 r h1 -> modifies0 h0 h1 /\
r == S.bn_eq_mask (as_seq h0 a) (as_seq h0 b)) | [] | Hacl.Bignum.Comparison.bn_eq_mask | {
"file_name": "code/bignum/Hacl.Bignum.Comparison.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
len: Lib.IntTypes.size_t ->
a: Hacl.Bignum.Definitions.lbignum t len ->
b: Hacl.Bignum.Definitions.lbignum t len
-> FStar.HyperStack.ST.Stack (Hacl.Bignum.Definitions.limb t) | {
"end_col": 6,
"end_line": 54,
"start_col": 2,
"start_line": 50
} |
Prims.Pure | val choose:
b:uint64
-> x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires v b == 0 \/ v b == 1)
(ensures fun z -> if v b = 1 then z == x else z == y) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let choose b (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
let mask = b -. u64 1 in
let z0 = x0 ^. (mask &. (x0 ^. y0)) in
Lemmas.lemma_choose_step b x0 y0;
let z1 = x1 ^. (mask &. (x1 ^. y1)) in
Lemmas.lemma_choose_step b x1 y1;
let z2 = x2 ^. (mask &. (x2 ^. y2)) in
Lemmas.lemma_choose_step b x2 y2;
let... | val choose:
b:uint64
-> x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires v b == 0 \/ v b == 1)
(ensures fun z -> if v b = 1 then z == x else z == y)
let choose b (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) = | false | null | false | let mask = b -. u64 1 in
let z0 = x0 ^. (mask &. (x0 ^. y0)) in
Lemmas.lemma_choose_step b x0 y0;
let z1 = x1 ^. (mask &. (x1 ^. y1)) in
Lemmas.lemma_choose_step b x1 y1;
let z2 = x2 ^. (mask &. (x2 ^. y2)) in
Lemmas.lemma_choose_step b x2 y2;
let z3 = x3 ^. (mask &. (x3 ^. y3)) in
Lemmas.lemma_choose_step b x3 y3;
let... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint64",
"Hacl.Spec.BignumQ.Definitions.qelem5",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple5",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_choose_step",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val choose:
b:uint64
-> x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires v b == 0 \/ v b == 1)
(ensures fun z -> if v b = 1 then z == x else z == y) | [] | Hacl.Spec.BignumQ.Mul.choose | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
b: Lib.IntTypes.uint64 ->
x: Hacl.Spec.BignumQ.Definitions.qelem5 ->
y: Hacl.Spec.BignumQ.Definitions.qelem5
-> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | {
"end_col": 22,
"end_line": 71,
"start_col": 56,
"start_line": 59
} |
Prims.Tot | val mask56:x: uint64{v x == pow2 56 - 1} | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (pow2 56 - 1 == 0xffffffffffffff);
u64 0xffffffffffffff | val mask56:x: uint64{v x == pow2 56 - 1}
let mask56:x: uint64{v x == pow2 56 - 1} = | false | null | false | assert_norm (pow2 56 - 1 == 0xffffffffffffff);
u64 0xffffffffffffff | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
"total"
] | [
"Lib.IntTypes.u64",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"Prims.op_Subtraction",
"Prims.pow2"
] | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mask56:x: uint64{v x == pow2 56 - 1} | [] | Hacl.Spec.BignumQ.Mul.mask56 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC {Lib.IntTypes.v x == Prims.pow2 56 - 1} | {
"end_col": 22,
"end_line": 17,
"start_col": 2,
"start_line": 16
} |
Prims.Pure | val mod_264: t:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 t (1, 1, 1, 1, 1, 1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (wide_as_nat5 t) % pow2 264) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let mod_264 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) =
Lemmas.lemma_mod_264 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
(t0, t1, t2, t3, t4 &. mask40) | val mod_264: t:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 t (1, 1, 1, 1, 1, 1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (wide_as_nat5 t) % pow2 264)
let mod_264 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) = | false | null | false | Lemmas.lemma_mod_264 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
(t0, t1, t2, t3, t4 &. mask40) | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem_wide5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Hacl.Spec.BignumQ.Mul.mask40",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_mod_264",
"FStar.Pervasives.Native.Mktuple10",
... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mod_264: t:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 t (1, 1, 1, 1, 1, 1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (wide_as_nat5 t) % pow2 264) | [] | Hacl.Spec.BignumQ.Mul.mod_264 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | t: Hacl.Spec.BignumQ.Definitions.qelem_wide5 -> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | {
"end_col": 32,
"end_line": 733,
"start_col": 2,
"start_line": 732
} |
Prims.Tot | val mask40:x: uint64{v x == pow2 40 - 1} | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let mask40 : x:uint64{v x == pow2 40 - 1} =
assert_norm (pow2 40 - 1 == 0xffffffffff);
u64 0xffffffffff | val mask40:x: uint64{v x == pow2 40 - 1}
let mask40:x: uint64{v x == pow2 40 - 1} = | false | null | false | assert_norm (pow2 40 - 1 == 0xffffffffff);
u64 0xffffffffff | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
"total"
] | [
"Lib.IntTypes.u64",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"Prims.op_Subtraction",
"Prims.pow2"
] | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mask40:x: uint64{v x == pow2 40 - 1} | [] | Hacl.Spec.BignumQ.Mul.mask40 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Lib.IntTypes.int_t Lib.IntTypes.U64 Lib.IntTypes.SEC {Lib.IntTypes.v x == Prims.pow2 40 - 1} | {
"end_col": 18,
"end_line": 23,
"start_col": 2,
"start_line": 22
} |
Prims.Tot | val make_m: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == S.q} | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let make_m () =
let m0 = u64 0x12631a5cf5d3ed in
let m1 = u64 0xf9dea2f79cd658 in
let m2 = u64 0x000000000014de in
let m3 = u64 0x00000000000000 in
let m4 = u64 0x00000010000000 in
assert_norm (as_nat5 (m0, m1, m2, m3, m4) == S.q);
(m0, m1, m2, m3, m4) | val make_m: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == S.q}
let make_m () = | false | null | false | let m0 = u64 0x12631a5cf5d3ed in
let m1 = u64 0xf9dea2f79cd658 in
let m2 = u64 0x000000000014de in
let m3 = u64 0x00000000000000 in
let m4 = u64 0x00000010000000 in
assert_norm (as_nat5 (m0, m1, m2, m3, m4) == S.q);
(m0, m1, m2, m3, m4) | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
"total"
] | [
"Prims.unit",
"FStar.Pervasives.Native.Mktuple5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.nat",
"Hacl.Spec.BignumQ.Definitions.as_nat5",
"Spec.Ed25519.q",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.int",
"Lib.IntTypes.range",
"Li... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val make_m: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == S.q} | [] | Hacl.Spec.BignumQ.Mul.make_m | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | _: Prims.unit
-> m:
Hacl.Spec.BignumQ.Definitions.qelem5
{ Hacl.Spec.BignumQ.Definitions.qelem_fits5 m (1, 1, 1, 1, 1) /\
Hacl.Spec.BignumQ.Definitions.as_nat5 m == Spec.Ed25519.q } | {
"end_col": 22,
"end_line": 35,
"start_col": 15,
"start_line": 28
} |
Prims.Pure | val add4:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d /\
v z <= pow2 116) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let add4 a b c d =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Mat... | val add4:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d /\
v z <= pow2 116)
let add4 a b c d = | false | null | false | assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Math.Lemmas.small_mod (v a + v b +... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint128",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan"
] | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val add4:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d /\
v z <= pow2 116) | [] | Hacl.Spec.BignumQ.Mul.add4 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
a: Lib.IntTypes.uint128 ->
b: Lib.IntTypes.uint128 ->
c: Lib.IntTypes.uint128 ->
d: Lib.IntTypes.uint128
-> Prims.Pure Lib.IntTypes.uint128 | {
"end_col": 18,
"end_line": 300,
"start_col": 2,
"start_line": 293
} |
Prims.Pure | val add2:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112)
(ensures fun z ->
v z == v a + v b /\
v z <= pow2 116) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let add2 a b =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
a +. b | val add2:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112)
(ensures fun z ->
v z == v a + v b /\
v z <= pow2 116)
let add2 a b = | false | null | false | assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
a +. b | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint128",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan"
] | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val add2:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112)
(ensures fun z ->
v z == v a + v b /\
v z <= pow2 116) | [] | Hacl.Spec.BignumQ.Mul.add2 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | a: Lib.IntTypes.uint128 -> b: Lib.IntTypes.uint128 -> Prims.Pure Lib.IntTypes.uint128 | {
"end_col": 8,
"end_line": 266,
"start_col": 2,
"start_line": 263
} |
Prims.Pure | val add_inner_carry:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a <= pow2 116 /\ v b < pow2 61)
(ensures fun z ->
v z == v a + v b /\
v z < pow2 117) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let add_inner_carry a b =
assert_norm (pow2 116 + pow2 61 < pow2 128);
assert_norm (pow2 116 + pow2 61 < pow2 117);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
a +. b | val add_inner_carry:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a <= pow2 116 /\ v b < pow2 61)
(ensures fun z ->
v z == v a + v b /\
v z < pow2 117)
let add_inner_carry a b = | false | null | false | assert_norm (pow2 116 + pow2 61 < pow2 128);
assert_norm (pow2 116 + pow2 61 < pow2 117);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
a +. b | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint128",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan"
] | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val add_inner_carry:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a <= pow2 116 /\ v b < pow2 61)
(ensures fun z ->
v z == v a + v b /\
v z < pow2 117) | [] | Hacl.Spec.BignumQ.Mul.add_inner_carry | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | a: Lib.IntTypes.uint128 -> b: Lib.IntTypes.uint128 -> Prims.Pure Lib.IntTypes.uint128 | {
"end_col": 8,
"end_line": 334,
"start_col": 2,
"start_line": 331
} |
Prims.Pure | val subm_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow56 /\ v y <= pow56)
(ensures fun (b, t) ->
v b <= 1 /\ qelem_fits1 t 1 /\
v x - v y == v t - v b * pow56) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let subm_step x y =
let b = (x -. y) >>. 63ul in
//assert (if v x >= v y then v b == 0 else v b == 1);
let lshift56 = (b <<. 56ul) in
//assert (if v x >= v y then v lshift56 == 0 else v lshift56 == pow56);
//assert (v lshift56 == v b * pow56);
//assert (v ((b <<. 56ul) +! x) == v b * pow56 + v x);
let t =... | val subm_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow56 /\ v y <= pow56)
(ensures fun (b, t) ->
v b <= 1 /\ qelem_fits1 t 1 /\
v x - v y == v t - v b * pow56)
let subm_step x y = | false | null | false | let b = (x -. y) >>. 63ul in
let lshift56 = (b <<. 56ul) in
let t = ((b <<. 56ul) +! x) -! y in
b, t | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple2",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Subtraction_Bang",
"Lib.IntTypes.op_Plus_Bang",
"Lib.IntTypes.op_Less_Less_Dot",
"FStar.UInt32.__uint_to_t",
"Lib.IntTypes.op_Greater_Greater_Dot",
"Lib.IntTy... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val subm_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow56 /\ v y <= pow56)
(ensures fun (b, t) ->
v b <= 1 /\ qelem_fits1 t 1 /\
v x - v y == v t - v b * pow56) | [] | Hacl.Spec.BignumQ.Mul.subm_step | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Lib.IntTypes.uint64 -> y: Lib.IntTypes.uint64
-> Prims.Pure (Lib.IntTypes.uint64 * Lib.IntTypes.uint64) | {
"end_col": 6,
"end_line": 90,
"start_col": 19,
"start_line": 82
} |
Prims.Pure | val carry56: x:uint64 ->
Pure (uint64 & uint64)
(requires v x <= pow2 57)
(ensures fun (t, c) ->
v t < pow56 /\ v c <= 2 /\
v x == v c * pow56 + v t) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let carry56 x =
let carry = x >>. 56ul in
FStar.Math.Lemmas.pow2_minus 57 56;
let t = x &. mask56 in
assert_norm (pow2 56 < pow2 64);
mod_mask_lemma x 56ul;
assert (v (mod_mask #U64 #SEC 56ul) == v mask56);
assert (v t == v x % pow2 56);
assert (v x == v carry * pow2 56 + v t);
t, carry | val carry56: x:uint64 ->
Pure (uint64 & uint64)
(requires v x <= pow2 57)
(ensures fun (t, c) ->
v t < pow56 /\ v c <= 2 /\
v x == v c * pow56 + v t)
let carry56 x = | false | null | false | let carry = x >>. 56ul in
FStar.Math.Lemmas.pow2_minus 57 56;
let t = x &. mask56 in
assert_norm (pow2 56 < pow2 64);
mod_mask_lemma x 56ul;
assert (v (mod_mask #U64 #SEC 56ul) == v mask56);
assert (v t == v x % pow2 56);
assert (v x == v carry * pow2 56 + v t);
t, carry | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple2",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Modulus",
"Lib.IntTypes.range_t",
"Lib.IntTypes.... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val carry56: x:uint64 ->
Pure (uint64 & uint64)
(requires v x <= pow2 57)
(ensures fun (t, c) ->
v t < pow56 /\ v c <= 2 /\
v x == v c * pow56 + v t) | [] | Hacl.Spec.BignumQ.Mul.carry56 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Lib.IntTypes.uint64 -> Prims.Pure (Lib.IntTypes.uint64 * Lib.IntTypes.uint64) | {
"end_col": 10,
"end_line": 161,
"start_col": 15,
"start_line": 152
} |
Prims.Pure | val add3:
(a:uint128) -> (b:uint128) -> (c:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 )
(ensures fun z ->
v z == v a + v b + v c /\
v z <= pow2 116) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let add3 a b c =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Math.Lemmas.small_mod (v a + v b + v c) (pow2 128);
a +. b +. c | val add3:
(a:uint128) -> (b:uint128) -> (c:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 )
(ensures fun z ->
v z == v a + v b + v c /\
v z <= pow2 116)
let add3 a b c = | false | null | false | assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Math.Lemmas.small_mod (v a + v b + v c) (pow2 128);
a +. b +. c | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint128",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan"
] | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val add3:
(a:uint128) -> (b:uint128) -> (c:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 )
(ensures fun z ->
v z == v a + v b + v c /\
v z <= pow2 116) | [] | Hacl.Spec.BignumQ.Mul.add3 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | a: Lib.IntTypes.uint128 -> b: Lib.IntTypes.uint128 -> c: Lib.IntTypes.uint128
-> Prims.Pure Lib.IntTypes.uint128 | {
"end_col": 13,
"end_line": 282,
"start_col": 2,
"start_line": 277
} |
Prims.Pure | val div_264: x:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 x (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 x < pow2 528)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (wide_as_nat5 x) / pow2 264) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let div_264 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) =
// x / pow2 264 == (x / pow2 224) / pow2 40
let z0 = div_2_40_step x4 x5 in
let z1 = div_2_40_step x5 x6 in
let z2 = div_2_40_step x6 x7 in
let z3 = div_2_40_step x7 x8 in
let z4 = div_2_40_step x8 x9 in
assert (qelem_fits5 (z0, z1, z2, z3, z4) (1, 1,... | val div_264: x:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 x (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 x < pow2 528)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (wide_as_nat5 x) / pow2 264)
let div_264 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) = | false | null | false | let z0 = div_2_40_step x4 x5 in
let z1 = div_2_40_step x5 x6 in
let z2 = div_2_40_step x6 x7 in
let z3 = div_2_40_step x7 x8 in
let z4 = div_2_40_step x8 x9 in
assert (qelem_fits5 (z0, z1, z2, z3, z4) (1, 1, 1, 1, 1));
Lemmas.lemma_div264 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
(z0, z1, z2, z3, z4) | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem_wide5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_div264",
"FStar.Pervasives.Native.Mktuple10",
"Prims._assert",
"Hacl.Spec.BignumQ.Definitions.qelem_fits5",
"Prims.nat",
"Lib.IntTypes.int_t",
"Li... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val div_264: x:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 x (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 x < pow2 528)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (wide_as_nat5 x) / pow2 264) | [] | Hacl.Spec.BignumQ.Mul.div_264 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Hacl.Spec.BignumQ.Definitions.qelem_wide5 -> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | {
"end_col": 22,
"end_line": 719,
"start_col": 54,
"start_line": 710
} |
Prims.Pure | val div_248: x:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 x (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 x < pow2 512)
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (wide_as_nat5 x) / pow2 248) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let div_248 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) =
// x / pow2 248 == (x / pow2 224) / pow2 24
let z0 = div_2_24_step x4 x5 in
let z1 = div_2_24_step x5 x6 in
let z2 = div_2_24_step x6 x7 in
let z3 = div_2_24_step x7 x8 in
let z4 = div_2_24_step x8 x9 in
assert (qelem_fits5 (z0, z1, z2, z3, z4) (1, 1,... | val div_248: x:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 x (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 x < pow2 512)
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (wide_as_nat5 x) / pow2 248)
let div_248 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) = | false | null | false | let z0 = div_2_24_step x4 x5 in
let z1 = div_2_24_step x5 x6 in
let z2 = div_2_24_step x6 x7 in
let z3 = div_2_24_step x7 x8 in
let z4 = div_2_24_step x8 x9 in
assert (qelem_fits5 (z0, z1, z2, z3, z4) (1, 1, 1, 1, 1));
Lemmas.lemma_div248 (x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
(z0, z1, z2, z3, z4) | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem_wide5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_div248",
"FStar.Pervasives.Native.Mktuple10",
"Prims._assert",
"Hacl.Spec.BignumQ.Definitions.qelem_fits5",
"Prims.nat",
"Lib.IntTypes.int_t",
"Li... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val div_248: x:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 x (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 x < pow2 512)
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (wide_as_nat5 x) / pow2 248) | [] | Hacl.Spec.BignumQ.Mul.div_248 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Hacl.Spec.BignumQ.Definitions.qelem_wide5 -> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | {
"end_col": 22,
"end_line": 674,
"start_col": 54,
"start_line": 665
} |
FStar.Pervasives.Lemma | val lemma_mult_distr_3 (a b c n: nat)
: Lemma ((a + b - c * pow2 56) * pow2 n == a * pow2 n + b * pow2 n - c * pow2 (n + 56)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let lemma_mult_distr_3 (a b c:nat) (n:nat) : Lemma
((a + b - c * pow2 56) * pow2 n == a * pow2 n + b * pow2 n - c * pow2 (n + 56))
=
Math.Lemmas.distributivity_sub_left (a + b) (c * pow2 56) (pow2 n);
Math.Lemmas.distributivity_add_left a b (pow2 n);
Math.Lemmas.pow2_plus 56 n | val lemma_mult_distr_3 (a b c n: nat)
: Lemma ((a + b - c * pow2 56) * pow2 n == a * pow2 n + b * pow2 n - c * pow2 (n + 56))
let lemma_mult_distr_3 (a b c n: nat)
: Lemma ((a + b - c * pow2 56) * pow2 n == a * pow2 n + b * pow2 n - c * pow2 (n + 56)) = | false | null | true | Math.Lemmas.distributivity_sub_left (a + b) (c * pow2 56) (pow2 n);
Math.Lemmas.distributivity_add_left a b (pow2 n);
Math.Lemmas.pow2_plus 56 n | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
"lemma"
] | [
"Prims.nat",
"FStar.Math.Lemmas.pow2_plus",
"Prims.unit",
"FStar.Math.Lemmas.distributivity_add_left",
"Prims.pow2",
"FStar.Math.Lemmas.distributivity_sub_left",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"Prims.op_Subtraction",
"Pri... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val lemma_mult_distr_3 (a b c n: nat)
: Lemma ((a + b - c * pow2 56) * pow2 n == a * pow2 n + b * pow2 n - c * pow2 (n + 56)) | [] | Hacl.Spec.BignumQ.Mul.lemma_mult_distr_3 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | a: Prims.nat -> b: Prims.nat -> c: Prims.nat -> n: Prims.nat
-> FStar.Pervasives.Lemma
(ensures
(a + b - c * Prims.pow2 56) * Prims.pow2 n ==
a * Prims.pow2 n + b * Prims.pow2 n - c * Prims.pow2 (n + 56)) | {
"end_col": 30,
"end_line": 353,
"start_col": 4,
"start_line": 351
} |
Prims.Pure | val carry56_wide: x:uint128 ->
Pure (uint128 & uint64)
(requires v x < pow2 117)
(ensures fun (c, t) -> v t < pow56 /\ v c < pow2 61 /\
v x - v c * pow56 == v t /\
v c == v x / pow56) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let carry56_wide x =
let carry = x >>. 56ul in
let t = to_u64 x &. mask56 in
assert_norm (pow2 56 < pow2 64);
Math.Lemmas.lemma_div_lt_nat (v x) 117 56;
mod_mask_lemma (to_u64 x) 56ul;
assert (v (mod_mask #U64 #SEC 56ul) == v mask56);
assert (v t == (v x % pow2 64) % pow2 56);
FStar.Math.Lemmas.pow2... | val carry56_wide: x:uint128 ->
Pure (uint128 & uint64)
(requires v x < pow2 117)
(ensures fun (c, t) -> v t < pow56 /\ v c < pow2 61 /\
v x - v c * pow56 == v t /\
v c == v x / pow56)
let carry56_wide x = | false | null | false | let carry = x >>. 56ul in
let t = to_u64 x &. mask56 in
assert_norm (pow2 56 < pow2 64);
Math.Lemmas.lemma_div_lt_nat (v x) 117 56;
mod_mask_lemma (to_u64 x) 56ul;
assert (v (mod_mask #U64 #SEC 56ul) == v mask56);
assert (v t == (v x % pow2 64) % pow2 56);
FStar.Math.Lemmas.pow2_modulo_modulo_lemma_1 (v x) 56 64;
asser... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint128",
"FStar.Pervasives.Native.Mktuple2",
"Lib.IntTypes.uint64",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.pow2",
"Lib.IntTypes.U64",
"Prims.op_Mod... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val carry56_wide: x:uint128 ->
Pure (uint128 & uint64)
(requires v x < pow2 117)
(ensures fun (c, t) -> v t < pow56 /\ v c < pow2 61 /\
v x - v c * pow56 == v t /\
v c == v x / pow56) | [] | Hacl.Spec.BignumQ.Mul.carry56_wide | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Lib.IntTypes.uint128 -> Prims.Pure (Lib.IntTypes.uint128 * Lib.IntTypes.uint64) | {
"end_col": 10,
"end_line": 209,
"start_col": 20,
"start_line": 198
} |
Prims.Pure | val add5:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) -> (e:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112 /\ v e < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d + v e/\
v z <= pow2 116) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let add5 a b c d e =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2... | val add5:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) -> (e:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112 /\ v e < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d + v e/\
v z <= pow2 116)
let add5 a b c d e = | false | null | false | assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 + pow2 112 <= p... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint128",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U128",
"Lib.IntTypes.SEC",
"Prims.unit",
"FStar.Math.Lemmas.small_mod",
"Prims.op_Addition",
"Lib.IntTypes.v",
"Prims.pow2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_LessThan"
] | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val add5:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) -> (e:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112 /\ v e < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d + v e/\
v z <= pow2 116) | [] | Hacl.Spec.BignumQ.Mul.add5 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} |
a: Lib.IntTypes.uint128 ->
b: Lib.IntTypes.uint128 ->
c: Lib.IntTypes.uint128 ->
d: Lib.IntTypes.uint128 ->
e: Lib.IntTypes.uint128
-> Prims.Pure Lib.IntTypes.uint128 | {
"end_col": 23,
"end_line": 320,
"start_col": 2,
"start_line": 311
} |
Prims.Pure | val div_2_40_step: x:uint64 -> y:uint64 ->
Pure uint64
(requires v x < pow56)
(ensures fun z -> v z < pow56 /\
v z == v x / pow2 40 + pow2 16 * (v y % pow2 40)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let div_2_40_step x y =
let y' = (y &. mask40) <<. 16ul in
assert_norm (pow2 40 < pow2 64);
mod_mask_lemma y 40ul;
assert (v (mod_mask #U64 #SEC 40ul) == v mask40);
assert (v y' == (v y % pow2 40) * pow2 16);
let x' = x >>. 40ul in
FStar.Math.Lemmas.pow2_minus 56 40;
assert (v x' == v x / pow2 40);
a... | val div_2_40_step: x:uint64 -> y:uint64 ->
Pure uint64
(requires v x < pow56)
(ensures fun z -> v z < pow56 /\
v z == v x / pow2 40 + pow2 16 * (v y % pow2 40))
let div_2_40_step x y = | false | null | false | let y' = (y &. mask40) <<. 16ul in
assert_norm (pow2 40 < pow2 64);
mod_mask_lemma y 40ul;
assert (v (mod_mask #U64 #SEC 40ul) == v mask40);
assert (v y' == (v y % pow2 40) * pow2 16);
let x' = x >>. 40ul in
FStar.Math.Lemmas.pow2_minus 56 40;
assert (v x' == v x / pow2 40);
assert (v x' < pow2 16);
let z = x' |. y' in... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint64",
"Prims.unit",
"Lib.IntTypes.logor_disjoint",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.int_t",
"Lib.IntTypes.op_Bar_Dot",
"Prims._assert",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.IntTypes.v",
"Prims.pow2",
"Prims.eq2",
"Prims.int",
"Prims.op_Division",
... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val div_2_40_step: x:uint64 -> y:uint64 ->
Pure uint64
(requires v x < pow56)
(ensures fun z -> v z < pow56 /\
v z == v x / pow2 40 + pow2 16 * (v y % pow2 40)) | [] | Hacl.Spec.BignumQ.Mul.div_2_40_step | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Lib.IntTypes.uint64 -> y: Lib.IntTypes.uint64 -> Prims.Pure Lib.IntTypes.uint64 | {
"end_col": 3,
"end_line": 697,
"start_col": 23,
"start_line": 684
} |
Prims.Pure | val div_2_24_step: x:uint64 -> y:uint64 ->
Pure uint64
(requires v x < pow56 /\ v y < pow56)
(ensures fun r -> v r < pow56 /\
v r == v x / pow2 24 + pow2 32 * (v y % pow2 24)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let div_2_24_step x y =
let y' = (y &. u64 0xffffff) <<. 32ul in
assert_norm (pow2 24 - 1 = 0xffffff);
assert_norm (pow2 24 < pow2 64);
mod_mask_lemma y 24ul;
assert (v (mod_mask #U64 #SEC 24ul) == 0xffffff);
assert (v (y &. u64 0xffffff) == v y % pow2 24);
assert (v y' == (v y % pow2 24) * pow2 32);
le... | val div_2_24_step: x:uint64 -> y:uint64 ->
Pure uint64
(requires v x < pow56 /\ v y < pow56)
(ensures fun r -> v r < pow56 /\
v r == v x / pow2 24 + pow2 32 * (v y % pow2 24))
let div_2_24_step x y = | false | null | false | let y' = (y &. u64 0xffffff) <<. 32ul in
assert_norm (pow2 24 - 1 = 0xffffff);
assert_norm (pow2 24 < pow2 64);
mod_mask_lemma y 24ul;
assert (v (mod_mask #U64 #SEC 24ul) == 0xffffff);
assert (v (y &. u64 0xffffff) == v y % pow2 24);
assert (v y' == (v y % pow2 24) * pow2 32);
let x' = x >>. 24ul in
FStar.Math.Lemmas.p... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint64",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.op_Addition",
"Prims.op_Division",
"Prims.pow2",
"FStar.Mul.op_Star",
"Prims.op_Modulus",
"Lib.IntTypes.logor_disjoint",
"Lib.IntTypes.int_t",
... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val div_2_24_step: x:uint64 -> y:uint64 ->
Pure uint64
(requires v x < pow56 /\ v y < pow56)
(ensures fun r -> v r < pow56 /\
v r == v x / pow2 24 + pow2 32 * (v y % pow2 24)) | [] | Hacl.Spec.BignumQ.Mul.div_2_24_step | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Lib.IntTypes.uint64 -> y: Lib.IntTypes.uint64 -> Prims.Pure Lib.IntTypes.uint64 | {
"end_col": 3,
"end_line": 652,
"start_col": 23,
"start_line": 638
} |
Prims.Pure | val subm_last_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow2 40 /\ v y <= pow2 40)
(ensures fun (b, t) -> v b <= 1 /\ v t < pow2 40 /\
v x - v y == v t - pow2 40 * v b) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let subm_last_step x y =
assert_norm (pow2 40 < pow2 63);
let b = (x -. y) >>. 63ul in
assert (if v x >= v y then v b == 0 else v b == 1);
let t = ((b <<. 40ul) +! x) -! y in
b, t | val subm_last_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow2 40 /\ v y <= pow2 40)
(ensures fun (b, t) -> v b <= 1 /\ v t < pow2 40 /\
v x - v y == v t - pow2 40 * v b)
let subm_last_step x y = | false | null | false | assert_norm (pow2 40 < pow2 63);
let b = (x -. y) >>. 63ul in
assert (if v x >= v y then v b == 0 else v b == 1);
let t = ((b <<. 40ul) +! x) -! y in
b, t | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple2",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Subtraction_Bang",
"Lib.IntTypes.op_Plus_Bang",
"Lib.IntTypes.op_Less_Less_Dot",
"FStar.UInt32.__uint_to_t",
"Prims.unit",
"Prims._assert",
"Prims.op_Greate... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val subm_last_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow2 40 /\ v y <= pow2 40)
(ensures fun (b, t) -> v b <= 1 /\ v t < pow2 40 /\
v x - v y == v t - pow2 40 * v b) | [] | Hacl.Spec.BignumQ.Mul.subm_last_step | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Lib.IntTypes.uint64 -> y: Lib.IntTypes.uint64
-> Prims.Pure (Lib.IntTypes.uint64 * Lib.IntTypes.uint64) | {
"end_col": 6,
"end_line": 748,
"start_col": 2,
"start_line": 744
} |
Prims.Pure | val mul64_wide_5:
(a:uint64) -> (b:uint64) ->
Pure uint128
(requires qelem_fits1 a 1 /\ qelem_fits1 b 1)
(ensures fun z ->
v z == v a * v b /\
v z <= pow2 112 - pow2 57 + 1 /\
v z < pow2 112) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let mul64_wide_5 a b =
let lemma_smaller (a b:uint64) : Lemma
(requires qelem_fits1 a 1 /\ qelem_fits1 b 1)
(ensures v (mul64_wide a b) < pow2 112)
= if v a = 0 || v b = 0 then () else
calc (<) {
v a * v b <: int;
(<) { Math.Lemmas.lemma_mult_le_left (v a) (v b) (pow2 56) }
v a ... | val mul64_wide_5:
(a:uint64) -> (b:uint64) ->
Pure uint128
(requires qelem_fits1 a 1 /\ qelem_fits1 b 1)
(ensures fun z ->
v z == v a * v b /\
v z <= pow2 112 - pow2 57 + 1 /\
v z < pow2 112)
let mul64_wide_5 a b = | false | null | false | let lemma_smaller (a b: uint64)
: Lemma (requires qelem_fits1 a 1 /\ qelem_fits1 b 1) (ensures v (mul64_wide a b) < pow2 112) =
if v a = 0 || v b = 0
then ()
else
calc ( < ) {
v a * v b <: int;
( < ) { Math.Lemmas.lemma_mult_le_left (v a) (v b) (pow2 56) }
v a * pow2 56;
( < ) { Ma... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Lib.IntTypes.uint64",
"Lib.IntTypes.mul64_wide",
"Prims.unit",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.l_and",
"Prims.b2t",
"Hacl.Spec.BignumQ.Definitions.qelem_fits1",
"Prims.squash",
"Prims.op_LessThanOrEqual",
"Lib.IntTypes.v",
"Lib.IntTypes.U128",
"Prims.o... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mul64_wide_5:
(a:uint64) -> (b:uint64) ->
Pure uint128
(requires qelem_fits1 a 1 /\ qelem_fits1 b 1)
(ensures fun z ->
v z == v a * v b /\
v z <= pow2 112 - pow2 57 + 1 /\
v z < pow2 112) | [] | Hacl.Spec.BignumQ.Mul.mul64_wide_5 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | a: Lib.IntTypes.uint64 -> b: Lib.IntTypes.uint64 -> Prims.Pure Lib.IntTypes.uint128 | {
"end_col": 16,
"end_line": 252,
"start_col": 22,
"start_line": 220
} |
Prims.Tot | val make_mu: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == pow2 512 / S.q} | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let make_mu m =
let m0 = u64 0x9ce5a30a2c131b in
let m1 = u64 0x215d086329a7ed in
let m2 = u64 0xffffffffeb2106 in
let m3 = u64 0xffffffffffffff in
let m4 = u64 0x00000fffffffff in
assert_norm (as_nat5 (m0, m1, m2, m3, m4) == pow2 512 / S.q);
(m0, m1, m2, m3, m4) | val make_mu: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == pow2 512 / S.q}
let make_mu m = | false | null | false | let m0 = u64 0x9ce5a30a2c131b in
let m1 = u64 0x215d086329a7ed in
let m2 = u64 0xffffffffeb2106 in
let m3 = u64 0xffffffffffffff in
let m4 = u64 0x00000fffffffff in
assert_norm (as_nat5 (m0, m1, m2, m3, m4) == pow2 512 / S.q);
(m0, m1, m2, m3, m4) | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [
"total"
] | [
"Prims.unit",
"FStar.Pervasives.Native.Mktuple5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.int",
"Hacl.Spec.BignumQ.Definitions.as_nat5",
"Prims.op_Division",
"Prims.pow2",
"Spec.Ed25519.q",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Li... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val make_mu: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == pow2 512 / S.q} | [] | Hacl.Spec.BignumQ.Mul.make_mu | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | m: Prims.unit
-> m:
Hacl.Spec.BignumQ.Definitions.qelem5
{ Hacl.Spec.BignumQ.Definitions.qelem_fits5 m (1, 1, 1, 1, 1) /\
Hacl.Spec.BignumQ.Definitions.as_nat5 m == Prims.pow2 512 / Spec.Ed25519.q } | {
"end_col": 22,
"end_line": 47,
"start_col": 15,
"start_line": 40
} |
Prims.Pure | val mul_modq5: x:qelem5 -> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < pow2 256 /\
as_nat5 y < pow2 256)
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % S.q) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let mul_modq5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
let (r0, r1, r2, r3, r4, r5, r6, r7, r8, r9) = mul_5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) in
Lemmas.lemma_mul_lt (as_nat5 (x0, x1, x2, x3, x4)) (pow2 256) (as_nat5 (y0, y1, y2, y3, y4)) (pow2 256);
assert_norm (pow2 256 * pow2 256 = pow2 512);
let (... | val mul_modq5: x:qelem5 -> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < pow2 256 /\
as_nat5 y < pow2 256)
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % S.q)
let mul_modq5 (x0, x1... | false | null | false | let r0, r1, r2, r3, r4, r5, r6, r7, r8, r9 = mul_5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) in
Lemmas.lemma_mul_lt (as_nat5 (x0, x1, x2, x3, x4))
(pow2 256)
(as_nat5 (y0, y1, y2, y3, y4))
(pow2 256);
assert_norm (pow2 256 * pow2 256 = pow2 512);
let o0, o1, o2, o3, o4 = barrett_reduction5 (r0, r1, r2, r3, r4, r5... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem5",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Hacl.Spec.BignumQ.Mul.barrett_reduction5",
"FStar.Pervasives.Native.Mktuple10",
"Prims.unit",
"FStar.Pervasives.assert_norm",
"P... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val mul_modq5: x:qelem5 -> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < pow2 256 /\
as_nat5 y < pow2 256)
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % S.q) | [] | Hacl.Spec.BignumQ.Mul.mul_modq5 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Hacl.Spec.BignumQ.Definitions.qelem5 -> y: Hacl.Spec.BignumQ.Definitions.qelem5
-> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | {
"end_col": 22,
"end_line": 862,
"start_col": 57,
"start_line": 857
} |
Prims.Pure | val add_modq5:
x:qelem5
-> y:qelem5
-> Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < S.q /\ as_nat5 y < S.q)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (as_nat5 x + as_nat5 y) % S.q) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let add_modq5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
assert_norm (pow56 - 1 + pow56 - 1 == pow2 57 - 2);
let (t0, c0) = carry56 (x0 +! y0) in
let (t1, c1) = carry56 (x1 +! y1 +! c0) in
let (t2, c2) = carry56 (x2 +! y2 +! c1) in
let (t3, c3) = carry56 (x3 +! y3 +! c2) in
let t4 = x4 +! y4 +! c3 in
ass... | val add_modq5:
x:qelem5
-> y:qelem5
-> Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < S.q /\ as_nat5 y < S.q)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (as_nat5 x + as_nat5 y) % S.q)
let add_modq5 (x... | false | null | false | assert_norm (pow56 - 1 + pow56 - 1 == pow2 57 - 2);
let t0, c0 = carry56 (x0 +! y0) in
let t1, c1 = carry56 (x1 +! y1 +! c0) in
let t2, c2 = carry56 (x2 +! y2 +! c1) in
let t3, c3 = carry56 (x3 +! y3 +! c2) in
let t4 = x4 +! y4 +! c3 in
assert (as_nat5 (t0, t1, t2, t3, t4) == as_nat5 (x0, x1, x2, x3, x4) + as_nat5 (y0,... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem5",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_add_modq5",
"Hacl.Spec.BignumQ.Mul.subm_conditional",
"Prims._assert",
"Prims.eq2",... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val add_modq5:
x:qelem5
-> y:qelem5
-> Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < S.q /\ as_nat5 y < S.q)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (as_nat5 x + as_nat5 y) % S.q) | [] | Hacl.Spec.BignumQ.Mul.add_modq5 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Hacl.Spec.BignumQ.Definitions.qelem5 -> y: Hacl.Spec.BignumQ.Definitions.qelem5
-> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | {
"end_col": 22,
"end_line": 187,
"start_col": 2,
"start_line": 178
} |
Prims.Pure | val subm_conditional: x:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
(if as_nat5 x >= S.q then as_nat5 r == as_nat5 x - S.q else as_nat5 r == as_nat5 x)) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let subm_conditional (x0, x1, x2, x3, x4) =
let (y0, y1, y2, y3, y4) = make_m () in
let (b0, t0) = subm_step x0 y0 in
assert (v x0 - v y0 == v t0 - v b0 * pow56);
let (b1, t1) = subm_step x1 (y1 +! b0) in
assert (v x1 - v y1 - v b0 == v t1 - v b1 * pow56);
let (b2, t2) = subm_step x2 (y2 +! b1) in
assert ... | val subm_conditional: x:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
(if as_nat5 x >= S.q then as_nat5 r == as_nat5 x - S.q else as_nat5 r == as_nat5 x))
let subm_conditional (x0, x1, x2, x3, x4) = | false | null | false | let y0, y1, y2, y3, y4 = make_m () in
let b0, t0 = subm_step x0 y0 in
assert (v x0 - v y0 == v t0 - v b0 * pow56);
let b1, t1 = subm_step x1 (y1 +! b0) in
assert (v x1 - v y1 - v b0 == v t1 - v b1 * pow56);
let b2, t2 = subm_step x2 (y2 +! b1) in
assert (v x2 - v y2 - v b1 == v t2 - v b2 * pow56);
let b3, t3 = subm_ste... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Prims._assert",
"Prims.op_GreaterThanOrEqual",
"Hacl.Spec.BignumQ.Definitions.as_nat5",
"Spec.Ed25519.q",
"Prims.l_and",
"Prims.eq2",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val subm_conditional: x:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
(if as_nat5 x >= S.q then as_nat5 r == as_nat5 x - S.q else as_nat5 r == as_nat5 x)) | [] | Hacl.Spec.BignumQ.Mul.subm_conditional | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Hacl.Spec.BignumQ.Definitions.qelem5 -> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | {
"end_col": 22,
"end_line": 141,
"start_col": 43,
"start_line": 102
} |
Prims.Pure | val sub_mod_264: x:qelem5 -> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < pow2 264 /\
as_nat5 y < pow2 264)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
(if as_nat5 x >= as_nat5 y then
as_nat5 z == as_nat5 x - as... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let sub_mod_264 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
let (c1, t0) = subm_step x0 y0 in
assert (v x0 - v y0 == v t0 - v c1 * pow56);
let (c2, t1) = subm_step x1 (y1 +! c1) in
assert (v x1 - v y1 - v c1 == v t1 - v c2 * pow56);
let (c3, t2) = subm_step x2 (y2 +! c2) in
assert (v x2 - v y2 - v c2 == v t... | val sub_mod_264: x:qelem5 -> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < pow2 264 /\
as_nat5 y < pow2 264)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
(if as_nat5 x >= as_nat5 y then
as_nat5 z == as_nat5 x - as... | false | null | false | let c1, t0 = subm_step x0 y0 in
assert (v x0 - v y0 == v t0 - v c1 * pow56);
let c2, t1 = subm_step x1 (y1 +! c1) in
assert (v x1 - v y1 - v c1 == v t1 - v c2 * pow56);
let c3, t2 = subm_step x2 (y2 +! c2) in
assert (v x2 - v y2 - v c2 == v t2 - v c3 * pow56);
let c4, t3 = subm_step x3 (y3 +! c3) in
assert (v x3 - v y3... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem5",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_sub_mod_264",
"Prims._assert",
"Prims.eq2",
"Prims.int",
"Hacl.Spec.BignumQ.Defin... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val sub_mod_264: x:qelem5 -> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < pow2 264 /\
as_nat5 y < pow2 264)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
(if as_nat5 x >= as_nat5 y then
as_nat5 z == as_nat5 x - as... | [] | Hacl.Spec.BignumQ.Mul.sub_mod_264 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Hacl.Spec.BignumQ.Definitions.qelem5 -> y: Hacl.Spec.BignumQ.Definitions.qelem5
-> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | {
"end_col": 22,
"end_line": 798,
"start_col": 59,
"start_line": 766
} |
Prims.Pure | val barrett_reduction5: t:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 t (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 t < pow2 512)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (wide_as_nat5 t) % S.q) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let barrett_reduction5 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) =
let (m0, m1, m2, m3, m4) = make_m () in
let (mu0, mu1, mu2, mu3, mu4) = make_mu () in
let (q0, q1, q2, q3, q4) = div_248 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) in
assert (as_nat5 (q0, q1, q2, q3, q4) == wide_as_nat5 (t0, t1, t2, t3, t4, t5, t6... | val barrett_reduction5: t:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 t (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 t < pow2 512)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (wide_as_nat5 t) % S.q)
let barrett_reduction5 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) = | false | null | false | let m0, m1, m2, m3, m4 = make_m () in
let mu0, mu1, mu2, mu3, mu4 = make_mu () in
let q0, q1, q2, q3, q4 = div_248 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) in
assert (as_nat5 (q0, q1, q2, q3, q4) ==
wide_as_nat5 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) / pow2 248);
FStar.Math.Lemmas.lemma_div_lt_nat (wide_as_nat5 (... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem_wide5",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_barrett_reduce'",
"Hacl.Spec.BignumQ.Definitions.wide_as_nat5",
"FStar.Pervasives.Native.Mktuple10",
"Hacl.Spec.BignumQ.Definitions.qelem5",
"Hacl.Spe... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val barrett_reduction5: t:qelem_wide5 ->
Pure qelem5
(requires
qelem_wide_fits5 t (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 t < pow2 512)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (wide_as_nat5 t) % S.q) | [] | Hacl.Spec.BignumQ.Mul.barrett_reduction5 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | t: Hacl.Spec.BignumQ.Definitions.qelem_wide5 -> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | {
"end_col": 22,
"end_line": 843,
"start_col": 65,
"start_line": 814
} |
Prims.Pure | val low_mul_5:
x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % pow2 264) | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": ... | false | let low_mul_5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
let xy00 = mul64_wide_5 x0 y0 in
let xy01 = mul64_wide_5 x0 y1 in
let xy02 = mul64_wide_5 x0 y2 in
let xy03 = mul64_wide_5 x0 y3 in
let xy04 = mul64_wide_5 x0 y4 in
let xy10 = mul64_wide_5 x1 y0 in
let xy11 = mul64_wide_5 x1 y1 in
let xy12 = mul6... | val low_mul_5:
x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % pow2 264)
let low_mul_5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) = | false | null | false | let xy00 = mul64_wide_5 x0 y0 in
let xy01 = mul64_wide_5 x0 y1 in
let xy02 = mul64_wide_5 x0 y2 in
let xy03 = mul64_wide_5 x0 y3 in
let xy04 = mul64_wide_5 x0 y4 in
let xy10 = mul64_wide_5 x1 y0 in
let xy11 = mul64_wide_5 x1 y1 in
let xy12 = mul64_wide_5 x1 y2 in
let xy13 = mul64_wide_5 x1 y3 in
let xy20 = mul64_wide_5... | {
"checked_file": "Hacl.Spec.BignumQ.Mul.fst.checked",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Nativ... | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem5",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple5",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.l... | [] | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (... | false | false | Hacl.Spec.BignumQ.Mul.fst | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val low_mul_5:
x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % pow2 264) | [] | Hacl.Spec.BignumQ.Mul.low_mul_5 | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e",
"git_url": "https://github.com/hacl-star/hacl-star.git",
"project_name": "hacl-star"
} | x: Hacl.Spec.BignumQ.Definitions.qelem5 -> y: Hacl.Spec.BignumQ.Definitions.qelem5
-> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | {
"end_col": 22,
"end_line": 628,
"start_col": 57,
"start_line": 582
} |
Prims.Tot | [
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"... | false | let associative #a (f: (a -> a -> a)) = forall x y z. f (f x y) z == f x (f y z) | let associative #a (f: (a -> a -> a)) = | false | null | false | forall x y z. f (f x y) z == f x (f y z) | {
"checked_file": "FStar.IFC.fsti.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.IFC.fsti"
} | [
"total"
] | [
"Prims.l_Forall",
"Prims.eq2",
"Prims.logical"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | false | false | FStar.IFC.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val associative : f: (_: a -> _: a -> a) -> Prims.logical | [] | FStar.IFC.associative | {
"file_name": "ulib/FStar.IFC.fsti",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: a -> _: a -> a) -> Prims.logical | {
"end_col": 80,
"end_line": 40,
"start_col": 40,
"start_line": 40
} | |
Prims.Tot | [
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"... | false | let commutative #a (f: (a -> a -> a)) = forall x y. f x y == f y x | let commutative #a (f: (a -> a -> a)) = | false | null | false | forall x y. f x y == f y x | {
"checked_file": "FStar.IFC.fsti.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.IFC.fsti"
} | [
"total"
] | [
"Prims.l_Forall",
"Prims.eq2",
"Prims.logical"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | false | false | FStar.IFC.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val commutative : f: (_: a -> _: a -> a) -> Prims.logical | [] | FStar.IFC.commutative | {
"file_name": "ulib/FStar.IFC.fsti",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: a -> _: a -> a) -> Prims.logical | {
"end_col": 66,
"end_line": 43,
"start_col": 40,
"start_line": 43
} | |
Prims.Tot | [
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"... | false | let idempotent #a (f: (a -> a -> a)) = forall x. f x x == x | let idempotent #a (f: (a -> a -> a)) = | false | null | false | forall x. f x x == x | {
"checked_file": "FStar.IFC.fsti.checked",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "FStar.IFC.fsti"
} | [
"total"
] | [
"Prims.l_Forall",
"Prims.eq2",
"Prims.logical"
] | [] | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | false | false | FStar.IFC.fsti | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | null | val idempotent : f: (_: a -> _: a -> a) -> Prims.logical | [] | FStar.IFC.idempotent | {
"file_name": "ulib/FStar.IFC.fsti",
"git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | f: (_: a -> _: a -> a) -> Prims.logical | {
"end_col": 59,
"end_line": 46,
"start_col": 39,
"start_line": 46
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.