file_name stringlengths 5 52 | name stringlengths 4 95 | original_source_type stringlengths 0 23k | source_type stringlengths 9 23k | source_definition stringlengths 9 57.9k | source dict | source_range dict | file_context stringlengths 0 721k | dependencies dict | opens_and_abbrevs listlengths 2 94 | vconfig dict | interleaved bool 1
class | verbose_type stringlengths 1 7.42k | effect stringclasses 118
values | effect_flags listlengths 0 2 | mutual_with listlengths 0 11 | ideal_premises listlengths 0 236 | proof_features listlengths 0 1 | is_simple_lemma bool 2
classes | is_div bool 2
classes | is_proof bool 2
classes | is_simply_typed bool 2
classes | is_type bool 2
classes | partial_definition stringlengths 5 3.99k | completed_definiton stringlengths 1 1.63M | isa_cross_project_example bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Spec.Salsa20.fst | Spec.Salsa20.salsa20_encrypt_block | val salsa20_encrypt_block (st0: state) (incr: counter) (b: block) : Tot block | val salsa20_encrypt_block (st0: state) (incr: counter) (b: block) : Tot block | let salsa20_encrypt_block (st0:state) (incr:counter) (b:block) : Tot block =
let k = salsa20_core incr st0 in
xor_block k b | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 140,
"start_col": 0,
"start_line": 138
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | st0: Spec.Salsa20.state -> incr: Spec.Salsa20.counter -> b: Spec.Salsa20.block -> Spec.Salsa20.block | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.state",
"Spec.Salsa20.counter",
"Spec.Salsa20.block",
"Spec.Salsa20.xor_block",
"Spec.Salsa20.salsa20_core"
] | [] | false | false | false | true | false | let salsa20_encrypt_block (st0: state) (incr: counter) (b: block) : Tot block =
| let k = salsa20_core incr st0 in
xor_block k b | false |
Spec.Salsa20.fst | Spec.Salsa20.row_round | val row_round:shuffle | val row_round:shuffle | let row_round : shuffle =
quarter_round 0 1 2 3 @
quarter_round 5 6 7 4 @
quarter_round 10 11 8 9 @
quarter_round 15 12 13 14 | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 52,
"start_col": 0,
"start_line": 48
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | Spec.Salsa20.shuffle | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.op_At",
"Spec.Salsa20.state",
"Spec.Salsa20.quarter_round"
] | [] | false | false | false | true | false | let row_round:shuffle =
| quarter_round 0 1 2 3 @ quarter_round 5 6 7 4 @ quarter_round 10 11 8 9 @ quarter_round 15 12 13 14 | false |
Spec.Salsa20.fst | Spec.Salsa20.salsa20_add_counter | val salsa20_add_counter (s: state) (ctr: counter) : Tot state | val salsa20_add_counter (s: state) (ctr: counter) : Tot state | let salsa20_add_counter (s:state) (ctr:counter) : Tot state =
s.[8] <- s.[8] +. (u32 ctr) | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 29,
"end_line": 61,
"start_col": 0,
"start_line": 60
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | s: Spec.Salsa20.state -> ctr: Spec.Salsa20.counter -> Spec.Salsa20.state | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.state",
"Spec.Salsa20.counter",
"Lib.Sequence.op_String_Assignment",
"Lib.IntTypes.uint32",
"Lib.IntTypes.op_Plus_Dot",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Lib.Sequence.op_String_Access",
"Lib.IntTypes.u32"
] | [] | false | false | false | true | false | let salsa20_add_counter (s: state) (ctr: counter) : Tot state =
| s.[ 8 ] <- s.[ 8 ] +. (u32 ctr) | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.scalar_rounds | val scalar_rounds (m: Scalar.state) : Scalar.state | val scalar_rounds (m: Scalar.state) : Scalar.state | let scalar_rounds (m:Scalar.state) : Scalar.state =
Scalar.double_round (Scalar.double_round (
Scalar.double_round (Scalar.double_round (
Scalar.double_round (Scalar.double_round (
Scalar.double_round (Scalar.double_round (
Scalar.double_round (Scalar.double_round m))))))))) | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 53,
"end_line": 229,
"start_col": 0,
"start_line": 224
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | m: Spec.Chacha20.state -> Spec.Chacha20.state | Prims.Tot | [
"total"
] | [] | [
"Spec.Chacha20.state",
"Spec.Chacha20.double_round"
] | [] | false | false | false | true | false | let scalar_rounds (m: Scalar.state) : Scalar.state =
| Scalar.double_round (Scalar.double_round (Scalar.double_round (Scalar.double_round (Scalar.double_round
(Scalar.double_round (Scalar.double_round (Scalar.double_round (Scalar.double_round
(Scalar.double_round m))))))))) | false |
Spec.Salsa20.fst | Spec.Salsa20.constant0 | val constant0 : u40: Lib.IntTypes.uint32{Lib.IntTypes.v u40 == 0x61707865} | let constant0 = u32 0x61707865 | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 71,
"start_col": 0,
"start_line": 71
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | u40: Lib.IntTypes.uint32{Lib.IntTypes.v u40 == 0x61707865} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.u32"
] | [] | false | false | false | false | false | let constant0 =
| u32 0x61707865 | false | |
Spec.Salsa20.fst | Spec.Salsa20.constant1 | val constant1 : u40: Lib.IntTypes.uint32{Lib.IntTypes.v u40 == 0x3320646e} | let constant1 = u32 0x3320646e | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 73,
"start_col": 0,
"start_line": 73
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | u40: Lib.IntTypes.uint32{Lib.IntTypes.v u40 == 0x3320646e} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.u32"
] | [] | false | false | false | false | false | let constant1 =
| u32 0x3320646e | false | |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.blocksize | val blocksize : Prims.int | let blocksize = size_block | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 26,
"end_line": 19,
"start_col": 0,
"start_line": 19
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Prims.int | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Chacha20.Vec.size_block"
] | [] | false | false | false | true | false | let blocksize =
| size_block | false | |
Spec.Salsa20.fst | Spec.Salsa20.salsa20_core | val salsa20_core (ctr: counter) (s: state) : Tot state | val salsa20_core (ctr: counter) (s: state) : Tot state | let salsa20_core (ctr:counter) (s:state) : Tot state =
let s' = salsa20_add_counter s ctr in
let s' = rounds s' in
let s' = map2 (+.) s' s in
salsa20_add_counter s' ctr | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 28,
"end_line": 67,
"start_col": 0,
"start_line": 63
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | ctr: Spec.Salsa20.counter -> s: Spec.Salsa20.state -> Spec.Salsa20.state | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.counter",
"Spec.Salsa20.state",
"Spec.Salsa20.salsa20_add_counter",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Prims.l_Forall",
"Prims.nat",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.eq2",
"Lib.Sequence.index",
"Lib.Int... | [] | false | false | false | true | false | let salsa20_core (ctr: counter) (s: state) : Tot state =
| let s' = salsa20_add_counter s ctr in
let s' = rounds s' in
let s' = map2 ( +. ) s' s in
salsa20_add_counter s' ctr | false |
Spec.Salsa20.fst | Spec.Salsa20.constant2 | val constant2 : u40: Lib.IntTypes.uint32{Lib.IntTypes.v u40 == 0x79622d32} | let constant2 = u32 0x79622d32 | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 75,
"start_col": 0,
"start_line": 75
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | u40: Lib.IntTypes.uint32{Lib.IntTypes.v u40 == 0x79622d32} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.u32"
] | [] | false | false | false | false | false | let constant2 =
| u32 0x79622d32 | false | |
Spec.Salsa20.fst | Spec.Salsa20.salsa20_key_block0 | val salsa20_key_block0 (k: key) (n: nonce) : Tot block | val salsa20_key_block0 (k: key) (n: nonce) : Tot block | let salsa20_key_block0 (k:key) (n:nonce) : Tot block =
let st = salsa20_init k n 0 in
salsa20_key_block st | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 131,
"start_col": 0,
"start_line": 129
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | k: Spec.Salsa20.key -> n: Spec.Salsa20.nonce -> Spec.Salsa20.block | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.key",
"Spec.Salsa20.nonce",
"Spec.Salsa20.salsa20_key_block",
"Spec.Salsa20.state",
"Spec.Salsa20.salsa20_init",
"Spec.Salsa20.block"
] | [] | false | false | false | true | false | let salsa20_key_block0 (k: key) (n: nonce) : Tot block =
| let st = salsa20_init k n 0 in
salsa20_key_block st | false |
Spec.Salsa20.fst | Spec.Salsa20.salsa20_encrypt_bytes | val salsa20_encrypt_bytes:
k: key
-> n: nonce
-> c: counter
-> msg: bytes{length msg / size_block <= max_size_t}
-> cipher: bytes{length cipher == length msg} | val salsa20_encrypt_bytes:
k: key
-> n: nonce
-> c: counter
-> msg: bytes{length msg / size_block <= max_size_t}
-> cipher: bytes{length cipher == length msg} | let salsa20_encrypt_bytes key nonce ctr0 msg =
let st0 = salsa20_init key nonce ctr0 in
salsa20_update st0 msg | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 24,
"end_line": 171,
"start_col": 0,
"start_line": 169
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false |
k: Spec.Salsa20.key ->
n: Spec.Salsa20.nonce ->
c: Spec.Salsa20.counter ->
msg:
Lib.ByteSequence.bytes
{Lib.Sequence.length msg / Spec.Salsa20.size_block <= Lib.IntTypes.max_size_t}
-> cipher: Lib.ByteSequence.bytes{Lib.Sequence.length cipher == Lib.Sequence.length msg} | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.key",
"Spec.Salsa20.nonce",
"Spec.Salsa20.counter",
"Lib.ByteSequence.bytes",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Division",
"Lib.Sequence.length",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Spec.Salsa20.size_block",
"Lib.IntTypes.max_size_t",... | [] | false | false | false | false | false | let salsa20_encrypt_bytes key nonce ctr0 msg =
| let st0 = salsa20_init key nonce ctr0 in
salsa20_update st0 msg | false |
Spec.Salsa20.fst | Spec.Salsa20.salsa20_decrypt_bytes | val salsa20_decrypt_bytes:
k: key
-> n: nonce
-> c: counter
-> cipher: bytes{length cipher / size_block <= max_size_t}
-> msg: bytes{length cipher == length msg} | val salsa20_decrypt_bytes:
k: key
-> n: nonce
-> c: counter
-> cipher: bytes{length cipher / size_block <= max_size_t}
-> msg: bytes{length cipher == length msg} | let salsa20_decrypt_bytes key nonce ctr0 cipher =
let st0 = salsa20_init key nonce ctr0 in
salsa20_update st0 cipher | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 183,
"start_col": 0,
"start_line": 181
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false |
k: Spec.Salsa20.key ->
n: Spec.Salsa20.nonce ->
c: Spec.Salsa20.counter ->
cipher:
Lib.ByteSequence.bytes
{Lib.Sequence.length cipher / Spec.Salsa20.size_block <= Lib.IntTypes.max_size_t}
-> msg: Lib.ByteSequence.bytes{Lib.Sequence.length cipher == Lib.Sequence.length msg} | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.key",
"Spec.Salsa20.nonce",
"Spec.Salsa20.counter",
"Lib.ByteSequence.bytes",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Division",
"Lib.Sequence.length",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Spec.Salsa20.size_block",
"Lib.IntTypes.max_size_t",... | [] | false | false | false | false | false | let salsa20_decrypt_bytes key nonce ctr0 cipher =
| let st0 = salsa20_init key nonce ctr0 in
salsa20_update st0 cipher | false |
Spec.Salsa20.fst | Spec.Salsa20.line | val line (a b d: idx) (s: rotval U32) (m: state) : state | val line (a b d: idx) (s: rotval U32) (m: state) : state | let line (a:idx) (b:idx) (d:idx) (s:rotval U32) (m:state) : state =
let m = m.[a] <- (m.[a] ^. ((m.[b] +. m.[d]) <<<. s)) in
m | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 34,
"start_col": 0,
"start_line": 32
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false |
a: Spec.Salsa20.idx ->
b: Spec.Salsa20.idx ->
d: Spec.Salsa20.idx ->
s: Lib.IntTypes.rotval Lib.IntTypes.U32 ->
m: Spec.Salsa20.state
-> Spec.Salsa20.state | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.idx",
"Lib.IntTypes.rotval",
"Lib.IntTypes.U32",
"Spec.Salsa20.state",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Prims.l_and",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
"FStar.Seq.Base.upd",
"Lib.IntTypes.logxor",
"Lib.Sequence.index",
... | [] | false | false | false | true | false | let line (a b d: idx) (s: rotval U32) (m: state) : state =
| let m = m.[ a ] <- (m.[ a ] ^. ((m.[ b ] +. m.[ d ]) <<<. s)) in
m | false |
Spec.Salsa20.fst | Spec.Salsa20.xor_block | val xor_block (k: state) (b: block) : block | val xor_block (k: state) (b: block) : block | let xor_block (k:state) (b:block) : block =
let ib = uints_from_bytes_le b in
let ob = map2 (^.) ib k in
uints_to_bytes_le ob | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 136,
"start_col": 0,
"start_line": 133
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | k: Spec.Salsa20.state -> b: Spec.Salsa20.block -> Spec.Salsa20.block | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.state",
"Spec.Salsa20.block",
"Lib.ByteSequence.uints_to_bytes_le",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Prims.l_Forall",
"Prims.nat",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.eq2",
"Lib.Sequence.index",
"Lib.Int... | [] | false | false | false | true | false | let xor_block (k: state) (b: block) : block =
| let ib = uints_from_bytes_le b in
let ob = map2 ( ^. ) ib k in
uints_to_bytes_le ob | false |
Spec.Salsa20.fst | Spec.Salsa20.column_round | val column_round:shuffle | val column_round:shuffle | let column_round : shuffle =
quarter_round 0 4 8 12 @
quarter_round 5 9 13 1 @
quarter_round 10 14 2 6 @
quarter_round 15 3 7 11 | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 25,
"end_line": 46,
"start_col": 0,
"start_line": 42
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | Spec.Salsa20.shuffle | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.op_At",
"Spec.Salsa20.state",
"Spec.Salsa20.quarter_round"
] | [] | false | false | false | true | false | let column_round:shuffle =
| quarter_round 0 4 8 12 @ quarter_round 5 9 13 1 @ quarter_round 10 14 2 6 @ quarter_round 15 3 7 11 | false |
Spec.Salsa20.fst | Spec.Salsa20.hsalsa20_init | val hsalsa20_init (k: key) (n: xnonce) : Tot state | val hsalsa20_init (k: key) (n: xnonce) : Tot state | let hsalsa20_init (k:key) (n:xnonce) : Tot state =
let st = create 16 (u32 0) in
let st = xsetup k n st in
st | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 4,
"end_line": 114,
"start_col": 0,
"start_line": 111
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | k: Spec.Salsa20.key -> n: Spec.Salsa20.xnonce -> Spec.Salsa20.state | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.key",
"Spec.Salsa20.xnonce",
"Spec.Salsa20.state",
"Spec.Salsa20.xsetup",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Prims.l_and",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
"FStar.Seq.Base.create",
"Lib.IntTypes.mk_int"... | [] | false | false | false | true | false | let hsalsa20_init (k: key) (n: xnonce) : Tot state =
| let st = create 16 (u32 0) in
let st = xsetup k n st in
st | false |
Spec.Salsa20.fst | Spec.Salsa20.salsa20_key_block | val salsa20_key_block (st: state) : Tot block | val salsa20_key_block (st: state) : Tot block | let salsa20_key_block (st:state) : Tot block =
let st' = salsa20_core 0 st in
uints_to_bytes_le st' | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 23,
"end_line": 127,
"start_col": 0,
"start_line": 125
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | st: Spec.Salsa20.state -> Spec.Salsa20.block | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.state",
"Lib.ByteSequence.uints_to_bytes_le",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Spec.Salsa20.salsa20_core",
"Spec.Salsa20.block"
] | [] | false | false | false | true | false | let salsa20_key_block (st: state) : Tot block =
| let st' = salsa20_core 0 st in
uints_to_bytes_le st' | false |
Spec.Salsa20.fst | Spec.Salsa20.constant3 | val constant3 : u40: Lib.IntTypes.uint32{Lib.IntTypes.v u40 == 0x6b206574} | let constant3 = u32 0x6b206574 | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 77,
"start_col": 0,
"start_line": 77
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | u40: Lib.IntTypes.uint32{Lib.IntTypes.v u40 == 0x6b206574} | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.u32"
] | [] | false | false | false | false | false | let constant3 =
| u32 0x6b206574 | false | |
Spec.Salsa20.fst | Spec.Salsa20.salsa20_init | val salsa20_init (k: key) (n: nonce) (ctr0: counter) : Tot state | val salsa20_init (k: key) (n: nonce) (ctr0: counter) : Tot state | let salsa20_init (k:key) (n:nonce) (ctr0:counter) : Tot state =
let st = create 16 (u32 0) in
let st = setup k n ctr0 st in
st | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 4,
"end_line": 97,
"start_col": 0,
"start_line": 94
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | k: Spec.Salsa20.key -> n: Spec.Salsa20.nonce -> ctr0: Spec.Salsa20.counter -> Spec.Salsa20.state | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.key",
"Spec.Salsa20.nonce",
"Spec.Salsa20.counter",
"Spec.Salsa20.state",
"Spec.Salsa20.setup",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Prims.l_and",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
"FStar.Seq.Base.create",... | [] | false | false | false | true | false | let salsa20_init (k: key) (n: nonce) (ctr0: counter) : Tot state =
| let st = create 16 (u32 0) in
let st = setup k n ctr0 st in
st | false |
Spec.Salsa20.fst | Spec.Salsa20.salsa20_update | val salsa20_update:
ctx: state
-> msg: bytes{length msg / size_block <= max_size_t}
-> cipher: bytes{length cipher == length msg} | val salsa20_update:
ctx: state
-> msg: bytes{length msg / size_block <= max_size_t}
-> cipher: bytes{length cipher == length msg} | let salsa20_update ctx msg =
let cipher = msg in
map_blocks size_block cipher
(salsa20_encrypt_block ctx)
(salsa20_encrypt_last ctx) | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 159,
"start_col": 0,
"start_line": 155
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false |
ctx: Spec.Salsa20.state ->
msg:
Lib.ByteSequence.bytes
{Lib.Sequence.length msg / Spec.Salsa20.size_block <= Lib.IntTypes.max_size_t}
-> cipher: Lib.ByteSequence.bytes{Lib.Sequence.length cipher == Lib.Sequence.length msg} | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.state",
"Lib.ByteSequence.bytes",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Division",
"Lib.Sequence.length",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Spec.Salsa20.size_block",
"Lib.IntTypes.max_size_t",
"Lib.Sequence.map_blocks",
"Spec.Salsa20.sa... | [] | false | false | false | false | false | let salsa20_update ctx msg =
| let cipher = msg in
map_blocks size_block cipher (salsa20_encrypt_block ctx) (salsa20_encrypt_last ctx) | false |
Spec.Salsa20.fst | Spec.Salsa20.salsa20_encrypt_last | val salsa20_encrypt_last
(st0: state)
(incr: counter)
(len: size_nat{len < size_block})
(b: lbytes len)
: lbytes len | val salsa20_encrypt_last
(st0: state)
(incr: counter)
(len: size_nat{len < size_block})
(b: lbytes len)
: lbytes len | let salsa20_encrypt_last (st0:state) (incr:counter)
(len:size_nat{len < size_block})
(b:lbytes len) : lbytes len =
let plain = create size_block (u8 0) in
let plain = update_sub plain 0 (length b) b in
let cipher = salsa20_encrypt_block st0 incr plain in
sub cipher 0 len | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 18,
"end_line": 148,
"start_col": 0,
"start_line": 142
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false |
st0: Spec.Salsa20.state ->
incr: Spec.Salsa20.counter ->
len: Lib.IntTypes.size_nat{len < Spec.Salsa20.size_block} ->
b: Lib.ByteSequence.lbytes len
-> Lib.ByteSequence.lbytes len | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.state",
"Spec.Salsa20.counter",
"Lib.IntTypes.size_nat",
"Prims.b2t",
"Prims.op_LessThan",
"Spec.Salsa20.size_block",
"Lib.ByteSequence.lbytes",
"Lib.Sequence.sub",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Spec.Salsa20.block",
"Spec.Salsa20.salsa20_encrypt... | [] | false | false | false | false | false | let salsa20_encrypt_last
(st0: state)
(incr: counter)
(len: size_nat{len < size_block})
(b: lbytes len)
: lbytes len =
| let plain = create size_block (u8 0) in
let plain = update_sub plain 0 (length b) b in
let cipher = salsa20_encrypt_block st0 incr plain in
sub cipher 0 len | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.scalar_rounds_unroll_lemma | val scalar_rounds_unroll_lemma: m:Scalar.state ->
Lemma (scalar_rounds m `Seq.equal` Scalar.rounds m) | val scalar_rounds_unroll_lemma: m:Scalar.state ->
Lemma (scalar_rounds m `Seq.equal` Scalar.rounds m) | let scalar_rounds_unroll_lemma m =
let open Lib.LoopCombinators in
eq_repeat0 Scalar.double_round m;
unfold_repeat 10 Scalar.double_round m 0;
unfold_repeat 10 Scalar.double_round m 1;
unfold_repeat 10 Scalar.double_round m 2;
unfold_repeat 10 Scalar.double_round m 3;
unfold_repeat 10 Scalar.double_round ... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 42,
"end_line": 247,
"start_col": 0,
"start_line": 235
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | m: Spec.Chacha20.state
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (Hacl.Spec.Chacha20.Equiv.scalar_rounds m) (Spec.Chacha20.rounds m)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Spec.Chacha20.state",
"Lib.LoopCombinators.unfold_repeat",
"Spec.Chacha20.double_round",
"Prims.unit",
"Lib.LoopCombinators.eq_repeat0"
] | [] | true | false | true | false | false | let scalar_rounds_unroll_lemma m =
| let open Lib.LoopCombinators in
eq_repeat0 Scalar.double_round m;
unfold_repeat 10 Scalar.double_round m 0;
unfold_repeat 10 Scalar.double_round m 1;
unfold_repeat 10 Scalar.double_round m 2;
unfold_repeat 10 Scalar.double_round m 3;
unfold_repeat 10 Scalar.double_round m 4;
unfold_repeat 10 Scalar.double_round m 5;
un... | false |
Spec.Salsa20.fst | Spec.Salsa20.xsetup | val xsetup (k: key) (n: xnonce) (st: state) : Tot state | val xsetup (k: key) (n: xnonce) (st: state) : Tot state | let xsetup (k:key) (n:xnonce) (st:state) : Tot state =
let ks = uints_from_bytes_le #U32 #SEC #8 k in
let ns = uints_from_bytes_le #U32 #SEC #4 n in
let st = st.[0] <- constant0 in
let st = update_sub st 1 4 (slice ks 0 4) in
let st = st.[5] <- constant1 in
let st = update_sub st 6 4 ns in
let st = st.[10... | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 4,
"end_line": 109,
"start_col": 0,
"start_line": 99
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | k: Spec.Salsa20.key -> n: Spec.Salsa20.xnonce -> st: Spec.Salsa20.state -> Spec.Salsa20.state | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.key",
"Spec.Salsa20.xnonce",
"Spec.Salsa20.state",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Prims.l_and",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
"FStar.Seq.Base.upd",
"Spec.Salsa20.constant3",
"Lib.Sequence.index",... | [] | false | false | false | true | false | let xsetup (k: key) (n: xnonce) (st: state) : Tot state =
| let ks = uints_from_bytes_le #U32 #SEC #8 k in
let ns = uints_from_bytes_le #U32 #SEC #4 n in
let st = st.[ 0 ] <- constant0 in
let st = update_sub st 1 4 (slice ks 0 4) in
let st = st.[ 5 ] <- constant1 in
let st = update_sub st 6 4 ns in
let st = st.[ 10 ] <- constant2 in
let st = update_sub st 11 4 (slice ks 4 8) in... | false |
Spec.Salsa20.fst | Spec.Salsa20.hsalsa20 | val hsalsa20 (k: key) (n: xnonce) : Tot (lbytes 32) | val hsalsa20 (k: key) (n: xnonce) : Tot (lbytes 32) | let hsalsa20 (k:key) (n:xnonce) : Tot (lbytes 32) =
let st = hsalsa20_init k n in
let st = rounds st in
[@inline_let]
let res_l = [st.[0]; st.[5]; st.[10]; st.[15]; st.[6]; st.[7]; st.[8]; st.[9]] in
assert_norm(List.Tot.length res_l == 8);
let res = createL res_l in
uints_to_bytes_le res | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 23,
"end_line": 123,
"start_col": 0,
"start_line": 116
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | k: Spec.Salsa20.key -> n: Spec.Salsa20.xnonce -> Lib.ByteSequence.lbytes 32 | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.key",
"Spec.Salsa20.xnonce",
"Lib.ByteSequence.uints_to_bytes_le",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"FStar.List.Tot.Base.length",
"Lib.IntTypes.uint_t",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
"FStar.Seq.Base.s... | [] | false | false | false | false | false | let hsalsa20 (k: key) (n: xnonce) : Tot (lbytes 32) =
| let st = hsalsa20_init k n in
let st = rounds st in
[@@ inline_let ]let res_l =
[st.[ 0 ]; st.[ 5 ]; st.[ 10 ]; st.[ 15 ]; st.[ 6 ]; st.[ 7 ]; st.[ 8 ]; st.[ 9 ]]
in
assert_norm (List.Tot.length res_l == 8);
let res = createL res_l in
uints_to_bytes_le res | false |
Spec.Salsa20.fst | Spec.Salsa20.setup | val setup (k: key) (n: nonce) (ctr0: counter) (st: state) : Tot state | val setup (k: key) (n: nonce) (ctr0: counter) (st: state) : Tot state | let setup (k:key) (n:nonce) (ctr0:counter) (st:state) : Tot state =
let ks = uints_from_bytes_le #U32 #SEC #8 k in
let ns = uints_from_bytes_le #U32 #SEC #2 n in
let st = st.[0] <- constant0 in
let st = update_sub st 1 4 (slice ks 0 4) in
let st = st.[5] <- constant1 in
let st = update_sub st 6 2 ns in
le... | {
"file_name": "specs/Spec.Salsa20.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 4,
"end_line": 92,
"start_col": 0,
"start_line": 80
} | module Spec.Salsa20
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.RawIntTypes
open Lib.LoopCombinators
#set-options "--max_fuel 0 --z3rlimit 100"
(* Constants *)
let size_key = 32 (* in bytes *)
let size_block = 64 (* in bytes *)
let size_nonce = 8 (* in bytes *)
let size_xnonc... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"... | [
{
"abbrev": false,
"full_module": "Lib.LoopCombinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.RawIntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.ByteSequence",
"short_module": null
},
{
"abbrev": false,
"full... | {
"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... | false | k: Spec.Salsa20.key -> n: Spec.Salsa20.nonce -> ctr0: Spec.Salsa20.counter -> st: Spec.Salsa20.state
-> Spec.Salsa20.state | Prims.Tot | [
"total"
] | [] | [
"Spec.Salsa20.key",
"Spec.Salsa20.nonce",
"Spec.Salsa20.counter",
"Spec.Salsa20.state",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Prims.l_and",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
"FStar.Seq.Base.upd",
"Spec.Salsa20.constant3"... | [] | false | false | false | true | false | let setup (k: key) (n: nonce) (ctr0: counter) (st: state) : Tot state =
| let ks = uints_from_bytes_le #U32 #SEC #8 k in
let ns = uints_from_bytes_le #U32 #SEC #2 n in
let st = st.[ 0 ] <- constant0 in
let st = update_sub st 1 4 (slice ks 0 4) in
let st = st.[ 5 ] <- constant1 in
let st = update_sub st 6 2 ns in
let st = st.[ 8 ] <- u32 ctr0 in
let st = st.[ 9 ] <- u32 0 in
let st = st.[ 10 ... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.column_round_lemma_i | val column_round_lemma_i: #w:lanes -> m:state w -> i:nat{i < w} ->
Lemma ((transpose_state (column_round #w m)).[i] `Seq.equal` Scalar.column_round (transpose_state m).[i]) | val column_round_lemma_i: #w:lanes -> m:state w -> i:nat{i < w} ->
Lemma ((transpose_state (column_round #w m)).[i] `Seq.equal` Scalar.column_round (transpose_state m).[i]) | let column_round_lemma_i #w m i =
let lp0 = quarter_round 0 4 8 12 m in
let lp1 = quarter_round 1 5 9 13 lp0 in
let lp2 = quarter_round 2 6 10 14 lp1 in
let lp3 = quarter_round 3 7 11 15 lp2 in
assert (column_round #w m == lp3);
quarter_round_lemma_i 0 4 8 12 m i;
quarter_round_lemma_i 1 5 9 13 lp0 i;... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 98,
"end_line": 194,
"start_col": 0,
"start_line": 184
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | m: Hacl.Spec.Chacha20.Vec.state w -> i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (Hacl.Spec.Chacha20.Vec.transpose_state (Hacl.Spec.Chacha20.Vec.column_round
m)).[ i ]
(Spec.Chacha20.column_round (Hacl.Spec.Chacha20.Vec.transpose_state m).[ i ])) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.state",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.Sequence.eq_intro",
"Lib.IntTypes.uint32",
"Lib.Sequence.op_String_Access",
"Lib.Sequence.lseq",
"Hacl.Spec.Chacha20.Vec.transpose_state",
"Hacl.Spec.Chacha20.Vec.column_round",
... | [] | true | false | true | false | false | let column_round_lemma_i #w m i =
| let lp0 = quarter_round 0 4 8 12 m in
let lp1 = quarter_round 1 5 9 13 lp0 in
let lp2 = quarter_round 2 6 10 14 lp1 in
let lp3 = quarter_round 3 7 11 15 lp2 in
assert (column_round #w m == lp3);
quarter_round_lemma_i 0 4 8 12 m i;
quarter_round_lemma_i 1 5 9 13 lp0 i;
quarter_round_lemma_i 2 6 10 14 lp1 i;
quarter_roun... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.rounds_lemma_i | val rounds_lemma_i: #w:lanes -> m:state w -> i:nat{i < w} ->
Lemma ((transpose_state (rounds #w m)).[i] `Seq.equal` Scalar.rounds (transpose_state m).[i]) | val rounds_lemma_i: #w:lanes -> m:state w -> i:nat{i < w} ->
Lemma ((transpose_state (rounds #w m)).[i] `Seq.equal` Scalar.rounds (transpose_state m).[i]) | let rounds_lemma_i #w m i =
let ms = (transpose_state m).[i] in
let m1 = double_round m in
let m2 = double_round m1 in
let m3 = double_round m2 in
let m4 = double_round m3 in
let m5 = double_round m4 in
let m6 = double_round m5 in
let m7 = double_round m6 in
let m8 = double_round m7 in
let m9 = doub... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 31,
"end_line": 277,
"start_col": 0,
"start_line": 253
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | m: Hacl.Spec.Chacha20.Vec.state w -> i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (Hacl.Spec.Chacha20.Vec.transpose_state (Hacl.Spec.Chacha20.Vec.rounds m)
).[ i ]
(Spec.Chacha20.rounds (Hacl.Spec.Chacha20.Vec.transpose_state m).[ i ])) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.state",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.Chacha20.Equiv.scalar_rounds_unroll_lemma",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint32",
"Lib.Sequence.op_String_Access",
"Hacl... | [] | true | false | true | false | false | let rounds_lemma_i #w m i =
| let ms = (transpose_state m).[ i ] in
let m1 = double_round m in
let m2 = double_round m1 in
let m3 = double_round m2 in
let m4 = double_round m3 in
let m5 = double_round m4 in
let m6 = double_round m5 in
let m7 = double_round m6 in
let m8 = double_round m7 in
let m9 = double_round m8 in
let m10 = double_round m9 in
as... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.quarter_round_lemma_i | val quarter_round_lemma_i:
#w:lanes
-> a:idx -> b:idx -> c:idx -> d:idx
-> m:state w
-> i:nat{i < w} ->
Lemma ((transpose_state (quarter_round #w a b c d m)).[i] `Seq.equal`
Scalar.quarter_round a b c d (transpose_state m).[i]) | val quarter_round_lemma_i:
#w:lanes
-> a:idx -> b:idx -> c:idx -> d:idx
-> m:state w
-> i:nat{i < w} ->
Lemma ((transpose_state (quarter_round #w a b c d m)).[i] `Seq.equal`
Scalar.quarter_round a b c d (transpose_state m).[i]) | let quarter_round_lemma_i #w a b c d m i =
let lp0 = line a b d (size 16) m in
let lp1 = line c d b (size 12) lp0 in
let lp2 = line a b d (size 8) lp1 in
let lp3 = line c d b (size 7) lp2 in
assert (quarter_round #w a b c d m == lp3);
line_lemma_i a b d (size 16) m i;
line_lemma_i c d b (size 12) lp0 i;
... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 58,
"end_line": 178,
"start_col": 0,
"start_line": 167
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Hacl.Spec.Chacha20.Vec.idx ->
b: Hacl.Spec.Chacha20.Vec.idx ->
c: Hacl.Spec.Chacha20.Vec.idx ->
d: Hacl.Spec.Chacha20.Vec.idx ->
m: Hacl.Spec.Chacha20.Vec.state w ->
i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (Hacl.Spec.Chacha20.Vec.transpose_stat... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.idx",
"Hacl.Spec.Chacha20.Vec.state",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.Sequence.eq_intro",
"Lib.IntTypes.uint32",
"Lib.Sequence.op_String_Access",
"Lib.Sequence.lseq",
"Hacl.Spec.Chacha20.Vec.transpose_state",
"Hacl.Spe... | [] | true | false | true | false | false | let quarter_round_lemma_i #w a b c d m i =
| let lp0 = line a b d (size 16) m in
let lp1 = line c d b (size 12) lp0 in
let lp2 = line a b d (size 8) lp1 in
let lp3 = line c d b (size 7) lp2 in
assert (quarter_round #w a b c d m == lp3);
line_lemma_i a b d (size 16) m i;
line_lemma_i c d b (size 12) lp0 i;
line_lemma_i a b d (size 8) lp1 i;
line_lemma_i c d b (siz... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.lemma_i_div_w4 | val lemma_i_div_w4: w:pos -> i:nat{i < w * blocksize} ->
Lemma (let bs = w * 4 in i / bs * bs + i % bs / 4 * 4 == i / 4 * 4) | val lemma_i_div_w4: w:pos -> i:nat{i < w * blocksize} ->
Lemma (let bs = w * 4 in i / bs * bs + i % bs / 4 * 4 == i / 4 * 4) | let lemma_i_div_w4 w i =
let bs = w * 4 in
calc (==) {
i / bs * bs + i % bs / 4 * 4;
(==) { Math.Lemmas.euclidean_division_definition (i % bs) 4 }
i / bs * bs + i % bs - i % bs % 4;
(==) { Math.Lemmas.euclidean_division_definition i bs }
i - i % bs % 4;
(==) { Math.Lemmas.modulo_modulo_lemma... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 356,
"start_col": 0,
"start_line": 344
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | w: Prims.pos -> i: Prims.nat{i < w * Hacl.Spec.Chacha20.Equiv.blocksize}
-> FStar.Pervasives.Lemma
(ensures
(let bs = w * 4 in
(i / bs) * bs + (i % bs / 4) * 4 == (i / 4) * 4)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Hacl.Spec.Chacha20.Equiv.blocksize",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Addition",
"Prims.op_Division",
"Prims.op_Modulus",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
... | [] | false | false | true | false | false | let lemma_i_div_w4 w i =
| let bs = w * 4 in
calc ( == ) {
(i / bs) * bs + (i % bs / 4) * 4;
( == ) { Math.Lemmas.euclidean_division_definition (i % bs) 4 }
(i / bs) * bs + i % bs - i % bs % 4;
( == ) { Math.Lemmas.euclidean_division_definition i bs }
i - i % bs % 4;
( == ) { Math.Lemmas.modulo_modulo_lemma i 4 w }
i - i % 4;
( =... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.double_round_lemma_i | val double_round_lemma_i: #w:lanes -> m:state w -> i:nat{i < w} ->
Lemma ((transpose_state (double_round #w m)).[i] `Seq.equal` Scalar.double_round (transpose_state m).[i]) | val double_round_lemma_i: #w:lanes -> m:state w -> i:nat{i < w} ->
Lemma ((transpose_state (double_round #w m)).[i] `Seq.equal` Scalar.double_round (transpose_state m).[i]) | let double_round_lemma_i #w m i =
let m1 = column_round m in
let m2 = diagonal_round m1 in
column_round_lemma_i m i;
diagonal_round_lemma_i m1 i | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 29,
"end_line": 220,
"start_col": 0,
"start_line": 216
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | m: Hacl.Spec.Chacha20.Vec.state w -> i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (Hacl.Spec.Chacha20.Vec.transpose_state (Hacl.Spec.Chacha20.Vec.double_round
m)).[ i ]
(Spec.Chacha20.double_round (Hacl.Spec.Chacha20.Vec.transpose_state m).[ i ])) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.state",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.Chacha20.Equiv.diagonal_round_lemma_i",
"Prims.unit",
"Hacl.Spec.Chacha20.Equiv.column_round_lemma_i",
"Hacl.Spec.Chacha20.Vec.diagonal_round",
"Hacl.Spec.Chacha20.Vec.column_r... | [] | true | false | true | false | false | let double_round_lemma_i #w m i =
| let m1 = column_round m in
let m2 = diagonal_round m1 in
column_round_lemma_i m i;
diagonal_round_lemma_i m1 i | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.lemma_i_div_blocksize | val lemma_i_div_blocksize: w:pos -> i:nat{i < w * blocksize} ->
Lemma (i / blocksize * blocksize + i % blocksize / 4 * 4 == i / 4 * 4) | val lemma_i_div_blocksize: w:pos -> i:nat{i < w * blocksize} ->
Lemma (i / blocksize * blocksize + i % blocksize / 4 * 4 == i / 4 * 4) | let lemma_i_div_blocksize w i =
calc (==) {
i / blocksize * blocksize + i % blocksize / 4 * 4;
(==) { Math.Lemmas.euclidean_division_definition (i % blocksize) 4 }
i / blocksize * blocksize + i % blocksize - i % blocksize % 4;
(==) { Math.Lemmas.modulo_modulo_lemma i 4 16 }
i / blocksize * blocksi... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 371,
"start_col": 0,
"start_line": 360
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | w: Prims.pos -> i: Prims.nat{i < w * Hacl.Spec.Chacha20.Equiv.blocksize}
-> FStar.Pervasives.Lemma
(ensures
(i / Hacl.Spec.Chacha20.Equiv.blocksize) * Hacl.Spec.Chacha20.Equiv.blocksize +
(i % Hacl.Spec.Chacha20.Equiv.blocksize / 4) * 4 ==
(i / 4) * 4) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.pos",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Hacl.Spec.Chacha20.Equiv.blocksize",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Prims.op_Addition",
"Prims.op_Division",
"Prims.op_Modulus",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
... | [] | false | false | true | false | false | let lemma_i_div_blocksize w i =
| calc ( == ) {
(i / blocksize) * blocksize + (i % blocksize / 4) * 4;
( == ) { Math.Lemmas.euclidean_division_definition (i % blocksize) 4 }
(i / blocksize) * blocksize + i % blocksize - i % blocksize % 4;
( == ) { Math.Lemmas.modulo_modulo_lemma i 4 16 }
(i / blocksize) * blocksize + i % blocksize - i % 4;
... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.diagonal_round_lemma_i | val diagonal_round_lemma_i: #w:lanes -> m:state w -> i:nat{i < w} ->
Lemma ((transpose_state (diagonal_round #w m)).[i] `Seq.equal` Scalar.diagonal_round (transpose_state m).[i]) | val diagonal_round_lemma_i: #w:lanes -> m:state w -> i:nat{i < w} ->
Lemma ((transpose_state (diagonal_round #w m)).[i] `Seq.equal` Scalar.diagonal_round (transpose_state m).[i]) | let diagonal_round_lemma_i #w m i =
let lp0 = quarter_round 0 5 10 15 m in
let lp1 = quarter_round 1 6 11 12 lp0 in
let lp2 = quarter_round 2 7 8 13 lp1 in
let lp3 = quarter_round 3 4 9 14 lp2 in
assert (diagonal_round #w m == lp3);
quarter_round_lemma_i 0 5 10 15 m i;
quarter_round_lemma_i 1 6 11 12 lp... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 102,
"end_line": 210,
"start_col": 0,
"start_line": 200
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | m: Hacl.Spec.Chacha20.Vec.state w -> i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (Hacl.Spec.Chacha20.Vec.transpose_state (Hacl.Spec.Chacha20.Vec.diagonal_round
m)).[ i ]
(Spec.Chacha20.diagonal_round (Hacl.Spec.Chacha20.Vec.transpose_state m).[ i ])) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.state",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.Sequence.eq_intro",
"Lib.IntTypes.uint32",
"Lib.Sequence.op_String_Access",
"Lib.Sequence.lseq",
"Hacl.Spec.Chacha20.Vec.transpose_state",
"Hacl.Spec.Chacha20.Vec.diagonal_round",
... | [] | true | false | true | false | false | let diagonal_round_lemma_i #w m i =
| let lp0 = quarter_round 0 5 10 15 m in
let lp1 = quarter_round 1 6 11 12 lp0 in
let lp2 = quarter_round 2 7 8 13 lp1 in
let lp3 = quarter_round 3 4 9 14 lp2 in
assert (diagonal_round #w m == lp3);
quarter_round_lemma_i 0 5 10 15 m i;
quarter_round_lemma_i 1 6 11 12 lp0 i;
quarter_round_lemma_i 2 7 8 13 lp1 i;
quarter_r... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.add_counter_lemma_aux | val add_counter_lemma_aux:
w:lanes
-> c0:counter
-> c:counter{w * c <= max_size_t /\ c0 + w <= max_size_t}
-> i:nat{i < w}
-> b:uint32 ->
Lemma (b +. u32 c0 +. u32 (w * c + i) == b +. u32 (c0 + i) +. u32 (w * c)) | val add_counter_lemma_aux:
w:lanes
-> c0:counter
-> c:counter{w * c <= max_size_t /\ c0 + w <= max_size_t}
-> i:nat{i < w}
-> b:uint32 ->
Lemma (b +. u32 c0 +. u32 (w * c + i) == b +. u32 (c0 + i) +. u32 (w * c)) | let add_counter_lemma_aux w c0 c i b =
let lp = b +. u32 c0 +. u32 (w * c + i) in
let rp = b +. u32 (c0 + i) +. u32 (w * c) in
assert (v lp == ((v b + c0) % modulus U32 + (w * c + i)) % modulus U32);
assert (v rp == ((v b + c0 + i) % modulus U32 + (w * c)) % modulus U32);
Math.Lemmas.lemma_mod_plus_distr_l (v... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 73,
"end_line": 83,
"start_col": 0,
"start_line": 77
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
w: Hacl.Spec.Chacha20.Vec.lanes ->
c0: Hacl.Spec.Chacha20.Vec.counter ->
c:
Hacl.Spec.Chacha20.Vec.counter
{w * c <= Lib.IntTypes.max_size_t /\ c0 + w <= Lib.IntTypes.max_size_t} ->
i: Prims.nat{i < w} ->
b: Lib.IntTypes.uint32
-> FStar.Pervasives.Lemma
(ensures
b +. Lib.I... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Prims.op_Addition",
"Prims.nat",
"Prims.op_LessThan",
"Lib.IntTypes.uint32",
"FStar.Math.Lemmas.lemma_mod_plus_distr_l",
... | [] | true | false | true | false | false | let add_counter_lemma_aux w c0 c i b =
| let lp = b +. u32 c0 +. u32 (w * c + i) in
let rp = b +. u32 (c0 + i) +. u32 (w * c) in
assert (v lp == ((v b + c0) % modulus U32 + (w * c + i)) % modulus U32);
assert (v rp == ((v b + c0 + i) % modulus U32 + (w * c)) % modulus U32);
Math.Lemmas.lemma_mod_plus_distr_l (v b + c0) (w * c + i) (modulus U32);
Math.Lemmas.l... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.sum_state_lemma_i | val sum_state_lemma_i: #w:lanes -> st1:state w -> st2:state w -> i:nat{i < w} ->
Lemma ((transpose_state (sum_state st1 st2)).[i] `Seq.equal` Scalar.sum_state (transpose_state st1).[i] (transpose_state st2).[i]) | val sum_state_lemma_i: #w:lanes -> st1:state w -> st2:state w -> i:nat{i < w} ->
Lemma ((transpose_state (sum_state st1 st2)).[i] `Seq.equal` Scalar.sum_state (transpose_state st1).[i] (transpose_state st2).[i]) | let sum_state_lemma_i #w st1 st2 i =
eq_intro (transpose_state (sum_state st1 st2)).[i] (Scalar.sum_state (transpose_state st1).[i] (transpose_state st2).[i]) | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 123,
"end_line": 284,
"start_col": 0,
"start_line": 283
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | st1: Hacl.Spec.Chacha20.Vec.state w -> st2: Hacl.Spec.Chacha20.Vec.state w -> i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (Hacl.Spec.Chacha20.Vec.transpose_state (Hacl.Spec.Chacha20.Vec.sum_state
st1
st2)).[ i ]
(Spec.Chacha20.sum_state... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.state",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.Sequence.eq_intro",
"Lib.IntTypes.uint32",
"Lib.Sequence.op_String_Access",
"Lib.Sequence.lseq",
"Hacl.Spec.Chacha20.Vec.transpose_state",
"Hacl.Spec.Chacha20.Vec.sum_state",
"Sp... | [] | true | false | true | false | false | let sum_state_lemma_i #w st1 st2 i =
| eq_intro (transpose_state (sum_state st1 st2)).[ i ]
(Scalar.sum_state (transpose_state st1).[ i ] (transpose_state st2).[ i ]) | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.kb_equiv_lemma | val kb_equiv_lemma:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter
-> c:counter{w * c <= max_size_t /\ c0 + w <= max_size_t}
-> i:nat{i < w} -> Lemma
(let st1 = Scalar.chacha20_init k n c0 in
let st2 = Scalar.chacha20_init k n (c0 + i) in
Scalar.chacha20_core (w * c + i) st1 `Seq.equal` Scalar.chacha2... | val kb_equiv_lemma:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter
-> c:counter{w * c <= max_size_t /\ c0 + w <= max_size_t}
-> i:nat{i < w} -> Lemma
(let st1 = Scalar.chacha20_init k n c0 in
let st2 = Scalar.chacha20_init k n (c0 + i) in
Scalar.chacha20_core (w * c + i) st1 `Seq.equal` Scalar.chacha2... | let kb_equiv_lemma #w k n c0 c i =
let st1 = Scalar.chacha20_init k n c0 in
let st2 = Scalar.chacha20_init k n (c0 + i) in
chacha20_init_scalar_lemma k n c0;
chacha20_init_scalar_lemma k n (c0 + i);
chacha20_core_scalar_lemma w st1 st2 c0 c i | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 45,
"end_line": 136,
"start_col": 0,
"start_line": 131
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Hacl.Spec.Chacha20.Vec.key ->
n: Hacl.Spec.Chacha20.Vec.nonce ->
c0: Hacl.Spec.Chacha20.Vec.counter ->
c:
Hacl.Spec.Chacha20.Vec.counter
{w * c <= Lib.IntTypes.max_size_t /\ c0 + w <= Lib.IntTypes.max_size_t} ->
i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
(le... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.key",
"Hacl.Spec.Chacha20.Vec.nonce",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Prims.op_Addition",
"Prims.nat",
"Prims.op_LessThan",
"Hacl... | [] | true | false | true | false | false | let kb_equiv_lemma #w k n c0 c i =
| let st1 = Scalar.chacha20_init k n c0 in
let st2 = Scalar.chacha20_init k n (c0 + i) in
chacha20_init_scalar_lemma k n c0;
chacha20_init_scalar_lemma k n (c0 + i);
chacha20_core_scalar_lemma w st1 st2 c0 c i | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.add_counter_lemma_i | val add_counter_lemma_i: #w:lanes -> st:state w -> c:counter{w * c <= max_size_t} -> i:nat{i < w} ->
Lemma ((transpose_state (add_counter #w c st)).[i] `Seq.equal` Scalar.chacha20_add_counter (transpose_state st).[i] (w * c)) | val add_counter_lemma_i: #w:lanes -> st:state w -> c:counter{w * c <= max_size_t} -> i:nat{i < w} ->
Lemma ((transpose_state (add_counter #w c st)).[i] `Seq.equal` Scalar.chacha20_add_counter (transpose_state st).[i] (w * c)) | let add_counter_lemma_i #w st c i =
Math.Lemmas.modulo_lemma (w * c) (pow2 32);
assert (v (u32 w *! u32 c) == v (u32 (w * c)));
eq_intro (transpose_state (add_counter #w c st)).[i] (Scalar.chacha20_add_counter (transpose_state st).[i] (w * c)) | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 117,
"end_line": 293,
"start_col": 0,
"start_line": 290
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
st: Hacl.Spec.Chacha20.Vec.state w ->
c: Hacl.Spec.Chacha20.Vec.counter{w * c <= Lib.IntTypes.max_size_t} ->
i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (Hacl.Spec.Chacha20.Vec.transpose_state (Hacl.Spec.Chacha20.Vec.add_counter
c
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.state",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Prims.nat",
"Prims.op_LessThan",
"Lib.Sequence.eq_intro",
"Lib.IntTypes.uint32",
"Lib.Sequence.op_String_A... | [] | true | false | true | false | false | let add_counter_lemma_i #w st c i =
| Math.Lemmas.modulo_lemma (w * c) (pow2 32);
assert (v (u32 w *! u32 c) == v (u32 (w * c)));
eq_intro (transpose_state (add_counter #w c st)).[ i ]
(Scalar.chacha20_add_counter (transpose_state st).[ i ] (w * c)) | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.xor_block_scalar_lemma_i | val xor_block_scalar_lemma_i: k:Scalar.state -> b:Scalar.block -> i:nat{i < blocksize} -> Lemma
((Scalar.xor_block k b).[i] == (uint_to_bytes_le ((uint_from_bytes_le (sub b (i / 4 * 4) 4)) ^. k.[i / 4])).[i % 4]) | val xor_block_scalar_lemma_i: k:Scalar.state -> b:Scalar.block -> i:nat{i < blocksize} -> Lemma
((Scalar.xor_block k b).[i] == (uint_to_bytes_le ((uint_from_bytes_le (sub b (i / 4 * 4) 4)) ^. k.[i / 4])).[i % 4]) | let xor_block_scalar_lemma_i k b i =
let ib = uints_from_bytes_le b in
let ob = map2 (^.) ib k in
let b_i = sub b (i / 4 * 4) 4 in
calc (==) {
Seq.index (uints_to_bytes_le ob) i;
(==) { index_uints_to_bytes_le ob i }
Seq.index (uint_to_bytes_le ob.[i / 4]) (i % 4);
(==) { (* def of xor *) }
... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 425,
"start_col": 0,
"start_line": 412
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Spec.Chacha20.state ->
b: Spec.Chacha20.block ->
i: Prims.nat{i < Hacl.Spec.Chacha20.Equiv.blocksize}
-> FStar.Pervasives.Lemma
(ensures
(Spec.Chacha20.xor_block k b).[ i ] ==
(Lib.ByteSequence.uint_to_bytes_le (Lib.ByteSequence.uint_from_bytes_le (Lib.Sequence.sub b
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Spec.Chacha20.state",
"Spec.Chacha20.block",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.Chacha20.Equiv.blocksize",
"FStar.Calc.calc_finish",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"Prims.eq2",
"FStar.Seq.Base.index",
"Lib.ByteSequence.uints_to_bytes_le"... | [] | false | false | true | false | false | let xor_block_scalar_lemma_i k b i =
| let ib = uints_from_bytes_le b in
let ob = map2 ( ^. ) ib k in
let b_i = sub b ((i / 4) * 4) 4 in
calc ( == ) {
Seq.index (uints_to_bytes_le ob) i;
( == ) { index_uints_to_bytes_le ob i }
Seq.index (uint_to_bytes_le ob.[ i / 4 ]) (i % 4);
( == ) { () }
Seq.index (uint_to_bytes_le (ib.[ i / 4 ] ^. k.[ i / 4 ])... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.update_sub_is_append | val update_sub_is_append:
#a:Type0
-> zero:a
-> blocksize:size_pos
-> len:nat{len < blocksize}
-> b_v:lseq a len ->
Lemma
(let plain = create blocksize zero in
let plain = update_sub plain 0 len b_v in
let zeros = create (blocksize - len) zero in
plain == Seq.append b_v zeros) | val update_sub_is_append:
#a:Type0
-> zero:a
-> blocksize:size_pos
-> len:nat{len < blocksize}
-> b_v:lseq a len ->
Lemma
(let plain = create blocksize zero in
let plain = update_sub plain 0 len b_v in
let zeros = create (blocksize - len) zero in
plain == Seq.append b_v zeros) | let update_sub_is_append #a zero blocksize len b_v =
let plain = create blocksize zero in
let plain = update_sub plain 0 len b_v in
let zeros = create (blocksize - len) zero in
Seq.Properties.lemma_split plain len;
Seq.Properties.lemma_split (Seq.append b_v zeros) len;
eq_intro plain (Seq.append b_v zeros) | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 594,
"start_col": 0,
"start_line": 588
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
zero: a ->
blocksize: Lib.IntTypes.size_pos ->
len: Prims.nat{len < blocksize} ->
b_v: Lib.Sequence.lseq a len
-> FStar.Pervasives.Lemma
(ensures
(let plain = Lib.Sequence.create blocksize zero in
let plain = Lib.Sequence.update_sub plain 0 len b_v in
let zeros = Lib.Sequenc... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_pos",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Lib.Sequence.eq_intro",
"FStar.Seq.Base.append",
"Prims.unit",
"FStar.Seq.Properties.lemma_split",
"Prims.op_Subtraction",
"Prims.l_and",
"Prims.eq2",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
... | [] | true | false | true | false | false | let update_sub_is_append #a zero blocksize len b_v =
| let plain = create blocksize zero in
let plain = update_sub plain 0 len b_v in
let zeros = create (blocksize - len) zero in
Seq.Properties.lemma_split plain len;
Seq.Properties.lemma_split (Seq.append b_v zeros) len;
eq_intro plain (Seq.append b_v zeros) | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.chacha20_core_lemma_i | val chacha20_core_lemma_i: #w:lanes -> c:counter{w * c <= max_size_t} -> st_v0:state w -> i:nat{i < w} ->
Lemma ((transpose_state (chacha20_core c st_v0)).[i] `Seq.equal` Scalar.chacha20_core (w * c) (transpose_state st_v0).[i]) | val chacha20_core_lemma_i: #w:lanes -> c:counter{w * c <= max_size_t} -> st_v0:state w -> i:nat{i < w} ->
Lemma ((transpose_state (chacha20_core c st_v0)).[i] `Seq.equal` Scalar.chacha20_core (w * c) (transpose_state st_v0).[i]) | let chacha20_core_lemma_i #w c st_v0 i =
let k0 = add_counter c st_v0 in
add_counter_lemma_i st_v0 c i;
let k1 = rounds k0 in
rounds_lemma_i k0 i;
let k2 = sum_state k1 st_v0 in
sum_state_lemma_i k1 st_v0 i;
let k3 = add_counter c k2 in
add_counter_lemma_i k2 c i | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 28,
"end_line": 307,
"start_col": 0,
"start_line": 299
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
c: Hacl.Spec.Chacha20.Vec.counter{w * c <= Lib.IntTypes.max_size_t} ->
st_v0: Hacl.Spec.Chacha20.Vec.state w ->
i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (Hacl.Spec.Chacha20.Vec.transpose_state (Hacl.Spec.Chacha20.Vec.chacha20_core
c
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Hacl.Spec.Chacha20.Vec.state",
"Prims.nat",
"Prims.op_LessThan",
"Hacl.Spec.Chacha20.Equiv.add_counter_lemma_i",
"Hacl.Spec.Chacha20.Vec.add... | [] | true | false | true | false | false | let chacha20_core_lemma_i #w c st_v0 i =
| let k0 = add_counter c st_v0 in
add_counter_lemma_i st_v0 c i;
let k1 = rounds k0 in
rounds_lemma_i k0 i;
let k2 = sum_state k1 st_v0 in
sum_state_lemma_i k1 st_v0 i;
let k3 = add_counter c k2 in
add_counter_lemma_i k2 c i | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.transpose_lemma_i | val transpose_lemma_i: #w:lanes -> k:state w -> i:nat{i < w * blocksize} -> Lemma
(Seq.index (vec_v (Seq.index (transpose k) (i / (w * 4)))) (i % (w * 4) / 4) ==
Seq.index (Seq.index (transpose_state k) (i / blocksize)) (i % blocksize / 4)) | val transpose_lemma_i: #w:lanes -> k:state w -> i:nat{i < w * blocksize} -> Lemma
(Seq.index (vec_v (Seq.index (transpose k) (i / (w * 4)))) (i % (w * 4) / 4) ==
Seq.index (Seq.index (transpose_state k) (i / blocksize)) (i % blocksize / 4)) | let transpose_lemma_i #w k i =
let bs = w * 4 in
let j = i / bs in
let ki = (transpose_state k).[i / blocksize] in
calc (==) {
Seq.index (vec_v (Seq.index (transpose k) j)) (i % bs / 4);
(==) { Math.Lemmas.modulo_division_lemma i 4 w }
Seq.index (vec_v (Seq.index (transpose k) j)) (i / 4 % w);
(... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 446,
"start_col": 0,
"start_line": 432
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | k: Hacl.Spec.Chacha20.Vec.state w -> i: Prims.nat{i < w * Hacl.Spec.Chacha20.Equiv.blocksize}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.index (Lib.IntVector.vec_v (FStar.Seq.Base.index (Hacl.Spec.Chacha20.Vec.transpose
k)
(i / (w * 4))))
(i % (w * 4) / 4) ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.state",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Hacl.Spec.Chacha20.Equiv.blocksize",
"FStar.Calc.calc_finish",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Prims.eq2",
"FStar.Seq.Base.inde... | [] | false | false | true | false | false | let transpose_lemma_i #w k i =
| let bs = w * 4 in
let j = i / bs in
let ki = (transpose_state k).[ i / blocksize ] in
calc ( == ) {
Seq.index (vec_v (Seq.index (transpose k) j)) (i % bs / 4);
( == ) { Math.Lemmas.modulo_division_lemma i 4 w }
Seq.index (vec_v (Seq.index (transpose k) j)) (i / 4 % w);
( == ) { Math.Lemmas.division_multiplicati... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.update_sub_get_last_lemma_plain_k | val update_sub_get_last_lemma_plain_k:
#a:Type
-> w:size_pos
-> blocksize:size_pos{w * blocksize <= max_size_t}
-> zero:a
-> len:nat{len < w * blocksize}
-> b_v:lseq a len
-> j:nat{len / blocksize * blocksize <= j /\ j < len}
-> k:nat{k < blocksize} ->
Lemma
(let block_l = SeqLemmas.get_last_s #a... | val update_sub_get_last_lemma_plain_k:
#a:Type
-> w:size_pos
-> blocksize:size_pos{w * blocksize <= max_size_t}
-> zero:a
-> len:nat{len < w * blocksize}
-> b_v:lseq a len
-> j:nat{len / blocksize * blocksize <= j /\ j < len}
-> k:nat{k < blocksize} ->
Lemma
(let block_l = SeqLemmas.get_last_s #a... | let update_sub_get_last_lemma_plain_k #a w blocksize zero len b_v j k =
let block_l = SeqLemmas.get_last_s #a #len blocksize b_v in
let plain = create blocksize zero in
let plain = update_sub plain 0 (len % blocksize) block_l in
let zeros = create (blocksize - len % blocksize) zero in
update_sub_is_append #a... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 9,
"end_line": 718,
"start_col": 0,
"start_line": 699
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
w: Lib.IntTypes.size_pos ->
blocksize: Lib.IntTypes.size_pos{w * blocksize <= Lib.IntTypes.max_size_t} ->
zero: a ->
len: Prims.nat{len < w * blocksize} ->
b_v: Lib.Sequence.lseq a len ->
j: Prims.nat{(len / blocksize) * blocksize <= j /\ j < len} ->
k: Prims.nat{k < blocksize}
-> FStar.P... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_pos",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Prims.nat",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Prims.l_and",
"Prims.op_Division",
"Prims.op_Modulus",
"FStar.Calc.calc_finish",
"Prims.eq2",
"FStar.Seq.Base.index",
... | [] | false | false | true | false | false | let update_sub_get_last_lemma_plain_k #a w blocksize zero len b_v j k =
| let block_l = SeqLemmas.get_last_s #a #len blocksize b_v in
let plain = create blocksize zero in
let plain = update_sub plain 0 (len % blocksize) block_l in
let zeros = create (blocksize - len % blocksize) zero in
update_sub_is_append #a zero blocksize (len % blocksize) block_l;
assert (plain == Seq.append block_l zero... | false |
Vale.Stdcalls.X64.GCMencryptOpt.fst | Vale.Stdcalls.X64.GCMencryptOpt.gcm256_lemma' | val gcm256_lemma'
(s: Ghost.erased (Seq.seq nat32))
(iv: Ghost.erased supported_iv_LE)
(code: V.va_code)
(_win: bool)
(auth_b: b128)
(auth_bytes auth_num: uint64)
(keys_b iv_b hkeys_b abytes_b in128x6_b out128x6_b: b128)
(len128x6_num: uint64)
(in128_b out128_b: b12... | val gcm256_lemma'
(s: Ghost.erased (Seq.seq nat32))
(iv: Ghost.erased supported_iv_LE)
(code: V.va_code)
(_win: bool)
(auth_b: b128)
(auth_bytes auth_num: uint64)
(keys_b iv_b hkeys_b abytes_b in128x6_b out128x6_b: b128)
(len128x6_num: uint64)
(in128_b out128_b: b12... | let gcm256_lemma'
(s:Ghost.erased (Seq.seq nat32))
(iv:Ghost.erased supported_iv_LE)
(code:V.va_code)
(_win:bool)
(auth_b:b128)
(auth_bytes:uint64)
(auth_num:uint64)
(keys_b:b128)
(iv_b:b128)
(hkeys_b:b128)
(abytes_b:b128)
(in128x6_b:b128)
(out128x6_b:b128)
(len12... | {
"file_name": "vale/code/arch/x64/interop/Vale.Stdcalls.X64.GCMencryptOpt.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 368,
"start_col": 0,
"start_line": 300
} | module Vale.Stdcalls.X64.GCMencryptOpt
open FStar.HyperStack.ST
module B = LowStar.Buffer
module HS = FStar.HyperStack
open FStar.Mul
module DV = LowStar.BufferView.Down
module UV = LowStar.BufferView.Up
open Vale.Def.Types_s
open Vale.Interop.Base
module IX64 = Vale.Interop.X64
module VSig = Vale.AsLowStar.ValeSig
... | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.MemoryAdapters.fsti.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.Interop.X64.fsti.checked",
"Vale.Interop.Base.fst.checked",
"Vale.Int... | [
{
"abbrev": false,
"full_module": "Vale.AES.GCM_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.AES.AES_s",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.AES.X64.GCMencryptOpt",
"short_module": "GC"
},
{
"abbrev": true,
"fu... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
s: FStar.Ghost.erased (FStar.Seq.Base.seq Vale.Def.Types_s.nat32) ->
iv: FStar.Ghost.erased Vale.AES.GCM_s.supported_iv_LE ->
code: Vale.X64.Decls.va_code ->
_win: Prims.bool ->
auth_b: Vale.Stdcalls.X64.GCMencryptOpt.b128 ->
auth_bytes: Vale.Stdcalls.X64.GCMencryptOpt.uint64 ->
auth_num: V... | Prims.Ghost | [] | [] | [
"FStar.Ghost.erased",
"FStar.Seq.Base.seq",
"Vale.Def.Types_s.nat32",
"Vale.AES.GCM_s.supported_iv_LE",
"Vale.X64.Decls.va_code",
"Prims.bool",
"Vale.Stdcalls.X64.GCMencryptOpt.b128",
"Vale.Stdcalls.X64.GCMencryptOpt.uint64",
"Vale.X64.Decls.va_state",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives... | [] | false | false | false | false | false | let gcm256_lemma'
(s: Ghost.erased (Seq.seq nat32))
(iv: Ghost.erased supported_iv_LE)
(code: V.va_code)
(_win: bool)
(auth_b: b128)
(auth_bytes auth_num: uint64)
(keys_b iv_b hkeys_b abytes_b in128x6_b out128x6_b: b128)
(len128x6_num: uint64)
(in128_b out128_b: b12... | let va_s1, f =
GC.va_lemma_Gcm_blocks_stdcall code va_s0 IA.win AES_256 (as_vale_buffer auth_b)
(UInt64.v auth_bytes) (UInt64.v auth_num) (as_vale_buffer keys_b) (as_vale_buffer iv_b)
(Ghost.reveal iv) (as_vale_buffer hkeys_b) (as_vale_buffer abytes_b) (as_vale_buffer in128x6_b)
(as_vale_buffer out128x6_b... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.update_sub_get_last_lemma | val update_sub_get_last_lemma:
#a:Type
-> w:size_pos
-> blocksize:size_pos{w * blocksize <= max_size_t}
-> zero:a
-> len:nat{len < w * blocksize}
-> b_v:lseq a len
-> j:nat{len / blocksize * blocksize <= j /\ j < len} ->
Lemma
(let blocksize_v = w * blocksize in
let plain_v = create blocksize_v... | val update_sub_get_last_lemma:
#a:Type
-> w:size_pos
-> blocksize:size_pos{w * blocksize <= max_size_t}
-> zero:a
-> len:nat{len < w * blocksize}
-> b_v:lseq a len
-> j:nat{len / blocksize * blocksize <= j /\ j < len} ->
Lemma
(let blocksize_v = w * blocksize in
let plain_v = create blocksize_v... | let update_sub_get_last_lemma #a w blocksize zero len b_v j =
let blocksize_v = w * blocksize in
let plain_v = create blocksize_v zero in
let plain_v = update_sub plain_v 0 len b_v in
div_mul_lt blocksize j w;
Math.Lemmas.cancel_mul_div w blocksize;
let block_l = SeqLemmas.get_last_s #a #len blocksize b_v ... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 18,
"end_line": 808,
"start_col": 0,
"start_line": 791
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
w: Lib.IntTypes.size_pos ->
blocksize: Lib.IntTypes.size_pos{w * blocksize <= Lib.IntTypes.max_size_t} ->
zero: a ->
len: Prims.nat{len < w * blocksize} ->
b_v: Lib.Sequence.lseq a len ->
j: Prims.nat{(len / blocksize) * blocksize <= j /\ j < len}
-> FStar.Pervasives.Lemma
(ensures
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_pos",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Prims.nat",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Prims.l_and",
"Prims.op_Division",
"Lib.Sequence.eq_intro",
"Prims.unit",
"FStar.Classical.forall_intro",
"Prims.eq2",
... | [] | false | false | true | false | false | let update_sub_get_last_lemma #a w blocksize zero len b_v j =
| let blocksize_v = w * blocksize in
let plain_v = create blocksize_v zero in
let plain_v = update_sub plain_v 0 len b_v in
div_mul_lt blocksize j w;
Math.Lemmas.cancel_mul_div w blocksize;
let block_l = SeqLemmas.get_last_s #a #len blocksize b_v in
let plain = create blocksize zero in
let plain = update_sub plain 0 (len... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.update_sub_get_block_lemma | val update_sub_get_block_lemma:
#a:Type
-> w:size_pos
-> blocksize:size_pos{w * blocksize <= max_size_t}
-> zero:a
-> len:nat{len < w * blocksize}
-> b_v:lseq a len
-> j:nat{j < len / blocksize * blocksize} ->
Lemma
(let blocksize_v = w * blocksize in
let plain_v = create blocksize_v zero in
... | val update_sub_get_block_lemma:
#a:Type
-> w:size_pos
-> blocksize:size_pos{w * blocksize <= max_size_t}
-> zero:a
-> len:nat{len < w * blocksize}
-> b_v:lseq a len
-> j:nat{j < len / blocksize * blocksize} ->
Lemma
(let blocksize_v = w * blocksize in
let plain_v = create blocksize_v zero in
... | let update_sub_get_block_lemma #a w blocksize zero len b_v j =
let blocksize_v = w * blocksize in
let plain = create blocksize_v zero in
let plain = update_sub plain 0 len b_v in
div_mul_lt blocksize j w;
Math.Lemmas.cancel_mul_div w blocksize;
let b_p = SeqLemmas.get_block_s #a #blocksize_v blocksize plai... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 680,
"start_col": 0,
"start_line": 670
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
w: Lib.IntTypes.size_pos ->
blocksize: Lib.IntTypes.size_pos{w * blocksize <= Lib.IntTypes.max_size_t} ->
zero: a ->
len: Prims.nat{len < w * blocksize} ->
b_v: Lib.Sequence.lseq a len ->
j: Prims.nat{j < (len / blocksize) * blocksize}
-> FStar.Pervasives.Lemma
(ensures
(let blocksi... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_pos",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Prims.nat",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Prims.op_Division",
"Lib.Sequence.eq_intro",
"Prims.unit",
"FStar.Classical.forall_intro",
"Prims.eq2",
"FStar.Seq.Base.... | [] | false | false | true | false | false | let update_sub_get_block_lemma #a w blocksize zero len b_v j =
| let blocksize_v = w * blocksize in
let plain = create blocksize_v zero in
let plain = update_sub plain 0 len b_v in
div_mul_lt blocksize j w;
Math.Lemmas.cancel_mul_div w blocksize;
let b_p = SeqLemmas.get_block_s #a #blocksize_v blocksize plain j in
let b = SeqLemmas.get_block_s #a #len blocksize b_v j in
Classical.fo... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.chacha20_map_blocks_vec_equiv_pre_k | val chacha20_map_blocks_vec_equiv_pre_k:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter{c0 + w <= max_size_t}
-> hi_fv:size_nat{w * hi_fv + w <= max_size_t} // n == hi_fv == len / (w * blocksize)
-> rem:nat{rem < w * blocksize}
-> b_v:lseq uint8 rem
-> j:nat{j < rem} ->
Lemma
(let st_v0 = chacha20_in... | val chacha20_map_blocks_vec_equiv_pre_k:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter{c0 + w <= max_size_t}
-> hi_fv:size_nat{w * hi_fv + w <= max_size_t} // n == hi_fv == len / (w * blocksize)
-> rem:nat{rem < w * blocksize}
-> b_v:lseq uint8 rem
-> j:nat{j < rem} ->
Lemma
(let st_v0 = chacha20_in... | let chacha20_map_blocks_vec_equiv_pre_k #w k n c0 hi_fv rem b_v j =
if j < rem / blocksize * blocksize then
chacha20_map_blocks_vec_equiv_pre_k0 #w k n c0 hi_fv rem b_v j
else
chacha20_map_blocks_vec_equiv_pre_k1 #w k n c0 hi_fv rem b_v j | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 66,
"end_line": 922,
"start_col": 0,
"start_line": 918
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Hacl.Spec.Chacha20.Vec.key ->
n: Hacl.Spec.Chacha20.Vec.nonce ->
c0: Hacl.Spec.Chacha20.Vec.counter{c0 + w <= Lib.IntTypes.max_size_t} ->
hi_fv: Lib.IntTypes.size_nat{w * hi_fv + w <= Lib.IntTypes.max_size_t} ->
rem: Prims.nat{rem < w * Hacl.Spec.Chacha20.Equiv.blocksize} ->
b_v: Lib.Sequenc... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.key",
"Hacl.Spec.Chacha20.Vec.nonce",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.IntTypes.max_size_t",
"Lib.IntTypes.size_nat",
"FStar.Mul.op_Star",
"Prims.nat",
"Prims.op_LessThan... | [] | false | false | true | false | false | let chacha20_map_blocks_vec_equiv_pre_k #w k n c0 hi_fv rem b_v j =
| if j < (rem / blocksize) * blocksize
then chacha20_map_blocks_vec_equiv_pre_k0 #w k n c0 hi_fv rem b_v j
else chacha20_map_blocks_vec_equiv_pre_k1 #w k n c0 hi_fv rem b_v j | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.update_sub_get_last_lemma_plain_v_k | val update_sub_get_last_lemma_plain_v_k:
#a:Type
-> w:size_pos
-> blocksize:size_pos{w * blocksize <= max_size_t}
-> zero:a
-> len:nat{len < w * blocksize}
-> b_v:lseq a len
-> j:nat{len / blocksize * blocksize <= j /\ j < len}
-> k:nat{k < blocksize} ->
Lemma
(let blocksize_v = w * blocksize in
... | val update_sub_get_last_lemma_plain_v_k:
#a:Type
-> w:size_pos
-> blocksize:size_pos{w * blocksize <= max_size_t}
-> zero:a
-> len:nat{len < w * blocksize}
-> b_v:lseq a len
-> j:nat{len / blocksize * blocksize <= j /\ j < len}
-> k:nat{k < blocksize} ->
Lemma
(let blocksize_v = w * blocksize in
... | let update_sub_get_last_lemma_plain_v_k #a w blocksize zero len b_v j k =
let blocksize_v = w * blocksize in
let plain_v = create blocksize_v zero in
let plain_v = update_sub plain_v 0 len b_v in
let zeros_v = create (blocksize_v - len) zero in
update_sub_is_append #a zero blocksize_v len b_v;
assert (plain... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 767,
"start_col": 0,
"start_line": 741
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
w: Lib.IntTypes.size_pos ->
blocksize: Lib.IntTypes.size_pos{w * blocksize <= Lib.IntTypes.max_size_t} ->
zero: a ->
len: Prims.nat{len < w * blocksize} ->
b_v: Lib.Sequence.lseq a len ->
j: Prims.nat{(len / blocksize) * blocksize <= j /\ j < len} ->
k: Prims.nat{k < blocksize}
-> FStar.P... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_pos",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Prims.nat",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Prims.l_and",
"Prims.op_Division",
"FStar.Calc.calc_finish",
"Prims.eq2",
"FStar.Seq.Base.index",
"FStar.Seq.Base.slice"... | [] | false | false | true | false | false | let update_sub_get_last_lemma_plain_v_k #a w blocksize zero len b_v j k =
| let blocksize_v = w * blocksize in
let plain_v = create blocksize_v zero in
let plain_v = update_sub plain_v 0 len b_v in
let zeros_v = create (blocksize_v - len) zero in
update_sub_is_append #a zero blocksize_v len b_v;
assert (plain_v == Seq.append b_v zeros_v);
div_mul_lt blocksize j w;
Math.Lemmas.cancel_mul_div w ... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.update_sub_get_block_lemma_k | val update_sub_get_block_lemma_k:
#a:Type
-> w:size_pos
-> blocksize:size_pos{w * blocksize <= max_size_t}
-> zero:a
-> len:nat{len < w * blocksize}
-> b_v:lseq a len
-> j:nat{j < len / blocksize * blocksize}
-> k:nat{k < blocksize} ->
Lemma
(let blocksize_v = w * blocksize in
let plain_v = c... | val update_sub_get_block_lemma_k:
#a:Type
-> w:size_pos
-> blocksize:size_pos{w * blocksize <= max_size_t}
-> zero:a
-> len:nat{len < w * blocksize}
-> b_v:lseq a len
-> j:nat{j < len / blocksize * blocksize}
-> k:nat{k < blocksize} ->
Lemma
(let blocksize_v = w * blocksize in
let plain_v = c... | let update_sub_get_block_lemma_k #a w blocksize zero len b_v j k =
let blocksize_v = w * blocksize in
let plain = create blocksize_v zero in
let plain = update_sub plain 0 len b_v in
let zeros = create (blocksize_v - len) zero in
update_sub_is_append #a zero blocksize_v len b_v;
assert (plain == Seq.append ... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 97,
"end_line": 649,
"start_col": 0,
"start_line": 616
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
w: Lib.IntTypes.size_pos ->
blocksize: Lib.IntTypes.size_pos{w * blocksize <= Lib.IntTypes.max_size_t} ->
zero: a ->
len: Prims.nat{len < w * blocksize} ->
b_v: Lib.Sequence.lseq a len ->
j: Prims.nat{j < (len / blocksize) * blocksize} ->
k: Prims.nat{k < blocksize}
-> FStar.Pervasives.Le... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Lib.IntTypes.size_pos",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Prims.nat",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Prims.op_Division",
"FStar.Seq.Base.lemma_index_slice",
"Prims.op_Addition",
"Prims.unit",
"FStar.Calc.calc_finish",
"Pr... | [] | false | false | true | false | false | let update_sub_get_block_lemma_k #a w blocksize zero len b_v j k =
| let blocksize_v = w * blocksize in
let plain = create blocksize_v zero in
let plain = update_sub plain 0 len b_v in
let zeros = create (blocksize_v - len) zero in
update_sub_is_append #a zero blocksize_v len b_v;
assert (plain == Seq.append b_v zeros);
div_mul_lt blocksize j w;
Math.Lemmas.cancel_mul_div w blocksize;
l... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.chacha20_core_scalar_lemma | val chacha20_core_scalar_lemma:
w:lanes
-> st1:Scalar.state
-> st2:Scalar.state
-> c0:counter
-> c:counter{w * c <= max_size_t /\ c0 + w <= max_size_t}
-> i:nat{i < w} -> Lemma
(requires
(forall (j:nat). j < 16 /\ j <> 12 ==> st1.[j] == st2.[j] /\
st1.[12] == u32 c0 /\ st2.[12] == u32 (c0 + i)))... | val chacha20_core_scalar_lemma:
w:lanes
-> st1:Scalar.state
-> st2:Scalar.state
-> c0:counter
-> c:counter{w * c <= max_size_t /\ c0 + w <= max_size_t}
-> i:nat{i < w} -> Lemma
(requires
(forall (j:nat). j < 16 /\ j <> 12 ==> st1.[j] == st2.[j] /\
st1.[12] == u32 c0 /\ st2.[12] == u32 (c0 + i)))... | let chacha20_core_scalar_lemma w st1 st2 c0 c i =
let k1 = Scalar.chacha20_add_counter st1 (w * c + i) in
assert (k1.[12] == u32 c0 +. u32 (w * c + i));
let k2 = Scalar.chacha20_add_counter st2 (w * c) in
assert (k2.[12] == u32 (c0 + i) +. u32 (w * c));
assert (v k1.[12] == v k2.[12]);
eq_intro k1 k2;
let... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 117,
"start_col": 0,
"start_line": 99
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
w: Hacl.Spec.Chacha20.Vec.lanes ->
st1: Spec.Chacha20.state ->
st2: Spec.Chacha20.state ->
c0: Hacl.Spec.Chacha20.Vec.counter ->
c:
Hacl.Spec.Chacha20.Vec.counter
{w * c <= Lib.IntTypes.max_size_t /\ c0 + w <= Lib.IntTypes.max_size_t} ->
i: Prims.nat{i < w}
-> FStar.Pervasives.L... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Spec.Chacha20.state",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Prims.op_Addition",
"Prims.nat",
"Prims.op_LessThan",
"Lib.Sequence.eq_intro",
"Lib.IntTypes.uint3... | [] | false | false | true | false | false | let chacha20_core_scalar_lemma w st1 st2 c0 c i =
| let k1 = Scalar.chacha20_add_counter st1 (w * c + i) in
assert (k1.[ 12 ] == u32 c0 +. u32 (w * c + i));
let k2 = Scalar.chacha20_add_counter st2 (w * c) in
assert (k2.[ 12 ] == u32 (c0 + i) +. u32 (w * c));
assert (v k1.[ 12 ] == v k2.[ 12 ]);
eq_intro k1 k2;
let k = Scalar.rounds k1 in
let k1 = Scalar.sum_state k st1... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.chacha20_init_scalar_lemma | val chacha20_init_scalar_lemma: k:key -> n:nonce -> c0:counter -> Lemma
(let uc = map secret chacha20_constants in
let uk = uints_from_bytes_le #U32 #SEC #8 k in
let uctr = create 1 (u32 c0) in
let un = uints_from_bytes_le #U32 #SEC #3 n in
Scalar.chacha20_init k n c0 == uc @| uk @| uctr @| un) | val chacha20_init_scalar_lemma: k:key -> n:nonce -> c0:counter -> Lemma
(let uc = map secret chacha20_constants in
let uk = uints_from_bytes_le #U32 #SEC #8 k in
let uctr = create 1 (u32 c0) in
let un = uints_from_bytes_le #U32 #SEC #3 n in
Scalar.chacha20_init k n c0 == uc @| uk @| uctr @| un) | let chacha20_init_scalar_lemma k n c0 =
let uc = map secret chacha20_constants in
let uk = uints_from_bytes_le #U32 #SEC #8 k in
let uctr = create 1 (u32 c0) in
let un = uints_from_bytes_le #U32 #SEC #3 n in
let res = uc @| uk @| uctr @| un in
assert (res == concat uc (concat uk (concat uctr un)));
eq_int... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 54,
"end_line": 66,
"start_col": 0,
"start_line": 32
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Hacl.Spec.Chacha20.Vec.key ->
n: Hacl.Spec.Chacha20.Vec.nonce ->
c0: Hacl.Spec.Chacha20.Vec.counter
-> FStar.Pervasives.Lemma
(ensures
(let uc = Lib.Sequence.map Lib.IntTypes.secret Hacl.Spec.Chacha20.Vec.chacha20_constants in
let uk = Lib.ByteSequence.uints_from_bytes_le k in
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.key",
"Hacl.Spec.Chacha20.Vec.nonce",
"Hacl.Spec.Chacha20.Vec.counter",
"FStar.Seq.Properties.lemma_split",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U32",
"Lib.IntTypes.SEC",
"Prims.op_Addition",
"Prims.unit",
"Lib.Sequence.sub",
"Lib.Sequence.eq_intro",
"Lib.Sequence.lseq"... | [] | true | false | true | false | false | let chacha20_init_scalar_lemma k n c0 =
| let uc = map secret chacha20_constants in
let uk = uints_from_bytes_le #U32 #SEC #8 k in
let uctr = create 1 (u32 c0) in
let un = uints_from_bytes_le #U32 #SEC #3 n in
let res = uc @| uk @| uctr @| un in
assert (res == concat uc (concat uk (concat uctr un)));
eq_intro res (concat (concat (concat uc uk) uctr) un);
let l... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.encrypt_block_lemma_st0_i | val encrypt_block_lemma_st0_i:
#w:lanes
-> st_v0:state w
-> c:counter{w * c <= max_size_t}
-> b_v:blocks w
-> j:nat{j < w * blocksize} ->
Lemma
(Math.Lemmas.cancel_mul_div w blocksize;
let b = SeqLemmas.get_block_s #uint8 #(w * blocksize) blocksize b_v j in
div_mul_lt blocksize j w;
(chacha20_e... | val encrypt_block_lemma_st0_i:
#w:lanes
-> st_v0:state w
-> c:counter{w * c <= max_size_t}
-> b_v:blocks w
-> j:nat{j < w * blocksize} ->
Lemma
(Math.Lemmas.cancel_mul_div w blocksize;
let b = SeqLemmas.get_block_s #uint8 #(w * blocksize) blocksize b_v j in
div_mul_lt blocksize j w;
(chacha20_e... | let encrypt_block_lemma_st0_i #w st_v0 c b_v j =
let k = chacha20_core c st_v0 in
chacha20_core_lemma_i #w c st_v0 (j / blocksize);
xor_block_lemma_i #w k b_v j | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 521,
"start_col": 0,
"start_line": 518
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
st_v0: Hacl.Spec.Chacha20.Vec.state w ->
c: Hacl.Spec.Chacha20.Vec.counter{w * c <= Lib.IntTypes.max_size_t} ->
b_v: Hacl.Spec.Chacha20.Vec.blocks w ->
j: Prims.nat{j < w * Hacl.Spec.Chacha20.Equiv.blocksize}
-> FStar.Pervasives.Lemma
(ensures
(FStar.Math.Lemmas.cancel_mul_div w Hacl.Spec.C... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.state",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Hacl.Spec.Chacha20.Vec.blocks",
"Prims.nat",
"Prims.op_LessThan",
"Hacl.Spec.Chacha20.Equiv.blocksize",
"H... | [] | true | false | true | false | false | let encrypt_block_lemma_st0_i #w st_v0 c b_v j =
| let k = chacha20_core c st_v0 in
chacha20_core_lemma_i #w c st_v0 (j / blocksize);
xor_block_lemma_i #w k b_v j | false |
Steel.ST.OnRange.fst | Steel.ST.OnRange.on_range_split | val on_range_split
(#opened: _)
(p: (nat -> vprop))
(i j k: nat)
: STGhost unit opened
(on_range p i k)
(fun _ -> on_range p i j `star` on_range p j k)
(i <= j /\ j <= k)
(fun _ -> True) | val on_range_split
(#opened: _)
(p: (nat -> vprop))
(i j k: nat)
: STGhost unit opened
(on_range p i k)
(fun _ -> on_range p i j `star` on_range p j k)
(i <= j /\ j <= k)
(fun _ -> True) | let rec on_range_split
(#opened: _)
(p: (nat -> vprop))
(i j k: nat)
: STGhost unit opened
(on_range p i k)
(fun _ -> on_range p i j `star` on_range p j k)
(i <= j /\ j <= k)
(fun _ -> True)
(decreases (j - i))
= if i = j
then begin
rewrite emp (on_range p i j);
rewrite (on_range p i... | {
"file_name": "lib/steel/Steel.ST.OnRange.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 5,
"end_line": 56,
"start_col": 0,
"start_line": 38
} | module Steel.ST.OnRange
open Steel.ST.GenElim
let rec on_range
(p: (nat -> vprop))
(i j: nat)
: Tot vprop
(decreases (if j <= i then 0 else j - i))
= if j < i
then pure False
else if j = i
then emp
else p i `star` on_range p (i + 1) j
let on_range_le
p i j
= if i <= j
then noop ()
else begin
r... | {
"checked_file": "/",
"dependencies": [
"Steel.ST.GenElim.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Steel.ST.OnRange.fst"
} | [
{
"abbrev": false,
"full_module": "Steel.ST.GenElim",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.ST.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "St... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | p: (_: Prims.nat -> Steel.Effect.Common.vprop) -> i: Prims.nat -> j: Prims.nat -> k: Prims.nat
-> Steel.ST.Effect.Ghost.STGhost Prims.unit | Steel.ST.Effect.Ghost.STGhost | [
""
] | [] | [
"Steel.Memory.inames",
"Prims.nat",
"Steel.Effect.Common.vprop",
"Prims.op_Equality",
"Steel.ST.Util.rewrite",
"Steel.ST.OnRange.on_range",
"Prims.unit",
"Steel.Effect.Common.emp",
"Prims.bool",
"Steel.Effect.Common.star",
"Prims.op_Addition",
"Steel.ST.OnRange.on_range_split",
"Prims.l_and"... | [
"recursion"
] | false | true | false | false | false | let rec on_range_split (#opened: _) (p: (nat -> vprop)) (i j k: nat)
: STGhost unit
opened
(on_range p i k)
(fun _ -> (on_range p i j) `star` (on_range p j k))
(i <= j /\ j <= k)
(fun _ -> True)
(decreases (j - i)) =
| if i = j
then
(rewrite emp (on_range p i j);
rewrite (on_range p i k) (on_range p j k))
else
(rewrite (on_range p i k) ((p i) `star` (on_range p (i + 1) k));
on_range_split p (i + 1) j k;
rewrite ((p i) `star` (on_range p (i + 1) j)) (on_range p i j)) | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.lemma_chacha20_vec_equiv | val lemma_chacha20_vec_equiv:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter{c0 + w <= max_size_t}
-> msg:seq uint8{length msg <= max_size_t} ->
Lemma (chacha20_encrypt_bytes #w k n c0 msg `Seq.equal` Scalar.chacha20_encrypt_bytes k n c0 msg) | val lemma_chacha20_vec_equiv:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter{c0 + w <= max_size_t}
-> msg:seq uint8{length msg <= max_size_t} ->
Lemma (chacha20_encrypt_bytes #w k n c0 msg `Seq.equal` Scalar.chacha20_encrypt_bytes k n c0 msg) | let lemma_chacha20_vec_equiv #w k n c0 msg =
let blocksize_v = w * blocksize in
let res = Scalar.chacha20_encrypt_bytes k n c0 msg in
let res_v = chacha20_encrypt_bytes #w k n c0 msg in
let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
let f_v = chacha20_encrypt_block st_v0 ... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 66,
"end_line": 957,
"start_col": 0,
"start_line": 936
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Hacl.Spec.Chacha20.Vec.key ->
n: Hacl.Spec.Chacha20.Vec.nonce ->
c0: Hacl.Spec.Chacha20.Vec.counter{c0 + w <= Lib.IntTypes.max_size_t} ->
msg: Lib.Sequence.seq Lib.IntTypes.uint8 {Lib.Sequence.length msg <= Lib.IntTypes.max_size_t}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.key",
"Hacl.Spec.Chacha20.Vec.nonce",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.IntTypes.max_size_t",
"Lib.Sequence.seq",
"Lib.IntTypes.uint8",
"Lib.Sequence.length",
"Lib.Vec.Lem... | [] | false | false | true | false | false | let lemma_chacha20_vec_equiv #w k n c0 msg =
| let blocksize_v = w * blocksize in
let res = Scalar.chacha20_encrypt_bytes k n c0 msg in
let res_v = chacha20_encrypt_bytes #w k n c0 msg in
let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
let f_v = chacha20_encrypt_block st_v0 in
let g_v = chacha20_encrypt_last st_v0 in
let f = Scalar.c... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.encrypt_block_scalar_lemma_i | val encrypt_block_scalar_lemma_i:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter
-> c:counter{w * c <= max_size_t /\ c0 + w <= max_size_t}
-> b_i:Scalar.block
-> i:nat{i < w} ->
Lemma
(let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
Scalar.chacha20_encrypt_block st0... | val encrypt_block_scalar_lemma_i:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter
-> c:counter{w * c <= max_size_t /\ c0 + w <= max_size_t}
-> b_i:Scalar.block
-> i:nat{i < w} ->
Lemma
(let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
Scalar.chacha20_encrypt_block st0... | let encrypt_block_scalar_lemma_i #w k n c0 c b i =
let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
chacha20_init_lemma_i #w k n c0 i;
assert ((transpose_state st_v0).[i] == Scalar.chacha20_init k n (c0 + i));
kb_equiv_lemma #w k n c0 c i | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 502,
"start_col": 0,
"start_line": 497
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Hacl.Spec.Chacha20.Vec.key ->
n: Hacl.Spec.Chacha20.Vec.nonce ->
c0: Hacl.Spec.Chacha20.Vec.counter ->
c:
Hacl.Spec.Chacha20.Vec.counter
{w * c <= Lib.IntTypes.max_size_t /\ c0 + w <= Lib.IntTypes.max_size_t} ->
b_i: Spec.Chacha20.block ->
i: Prims.nat{i < w}
-> FStar.Pervasi... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.key",
"Hacl.Spec.Chacha20.Vec.nonce",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Lib.IntTypes.max_size_t",
"Prims.op_Addition",
"Spec.Chacha20.block",
"Prims.nat",
"Pr... | [] | true | false | true | false | false | let encrypt_block_scalar_lemma_i #w k n c0 c b i =
| let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
chacha20_init_lemma_i #w k n c0 i;
assert ((transpose_state st_v0).[ i ] == Scalar.chacha20_init k n (c0 + i));
kb_equiv_lemma #w k n c0 c i | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.xor_block_vec_lemma_i | val xor_block_vec_lemma_i: #w:lanes -> k:state w -> b:blocks w -> i:nat{i < w * blocksize} -> Lemma
(let bs = w * 4 in
let j = i / bs in
let block = sub b (i / 4 * 4) 4 in
Seq.index (xor_block k b) i ==
Seq.index (uint_to_bytes_le ((uint_from_bytes_le block) ^. (Seq.index (vec_v k.[j]) (i % bs / 4)))) (i ... | val xor_block_vec_lemma_i: #w:lanes -> k:state w -> b:blocks w -> i:nat{i < w * blocksize} -> Lemma
(let bs = w * 4 in
let j = i / bs in
let block = sub b (i / 4 * 4) 4 in
Seq.index (xor_block k b) i ==
Seq.index (uint_to_bytes_le ((uint_from_bytes_le block) ^. (Seq.index (vec_v k.[j]) (i % bs / 4)))) (i ... | let xor_block_vec_lemma_i #w k b i =
let bs = w * 4 in
let j = i / bs in
let kb_j = vec_v k.[j] in
let b_j = sub b (i / bs * bs) bs in
let b_i = sub b_j (i % bs / 4 * 4) 4 in
let block = sub b (i / 4 * 4) 4 in
let ob = map2 (^.) (uints_from_bytes_le b_j) kb_j in
calc (==) {
Seq.index (xor_block k... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 406,
"start_col": 0,
"start_line": 381
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Hacl.Spec.Chacha20.Vec.state w ->
b: Hacl.Spec.Chacha20.Vec.blocks w ->
i: Prims.nat{i < w * Hacl.Spec.Chacha20.Equiv.blocksize}
-> FStar.Pervasives.Lemma
(ensures
(let bs = w * 4 in
let j = i / bs in
let block = Lib.Sequence.sub b ((i / 4) * 4) 4 in
FStar.Seq.Base.in... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.state",
"Hacl.Spec.Chacha20.Vec.blocks",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Hacl.Spec.Chacha20.Equiv.blocksize",
"FStar.Calc.calc_finish",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"... | [] | false | false | true | false | false | let xor_block_vec_lemma_i #w k b i =
| let bs = w * 4 in
let j = i / bs in
let kb_j = vec_v k.[ j ] in
let b_j = sub b ((i / bs) * bs) bs in
let b_i = sub b_j ((i % bs / 4) * 4) 4 in
let block = sub b ((i / 4) * 4) 4 in
let ob = map2 ( ^. ) (uints_from_bytes_le b_j) kb_j in
calc ( == ) {
Seq.index (xor_block k b) i;
( == ) { index_map_blocks_multi (w * ... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.xor_block_lemma_i | val xor_block_lemma_i: #w:lanes -> k:state w -> b:blocks w -> i:nat{i < w * blocksize} -> Lemma
(let k_i = (transpose_state k).[i / blocksize] in
let b_i = sub b (i / blocksize * blocksize) blocksize in
(xor_block (transpose k) b).[i] == (Scalar.xor_block k_i b_i).[i % blocksize]) | val xor_block_lemma_i: #w:lanes -> k:state w -> b:blocks w -> i:nat{i < w * blocksize} -> Lemma
(let k_i = (transpose_state k).[i / blocksize] in
let b_i = sub b (i / blocksize * blocksize) blocksize in
(xor_block (transpose k) b).[i] == (Scalar.xor_block k_i b_i).[i % blocksize]) | let xor_block_lemma_i #w k b i =
let bs = w * 4 in
let j = i / bs in
let ki = (transpose_state k).[i / blocksize] in
let b_i = sub b (i / blocksize * blocksize) blocksize in
let block = sub b (i / 4 * 4) 4 in
calc (==) {
Seq.index (xor_block (transpose k) b) i;
(==) { xor_block_vec_lemma_i #w (tra... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 477,
"start_col": 0,
"start_line": 454
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Hacl.Spec.Chacha20.Vec.state w ->
b: Hacl.Spec.Chacha20.Vec.blocks w ->
i: Prims.nat{i < w * Hacl.Spec.Chacha20.Equiv.blocksize}
-> FStar.Pervasives.Lemma
(ensures
(let k_i =
(Hacl.Spec.Chacha20.Vec.transpose_state k).[ i / Hacl.Spec.Chacha20.Equiv.blocksize ]
in
le... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.state",
"Hacl.Spec.Chacha20.Vec.blocks",
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"FStar.Mul.op_Star",
"Hacl.Spec.Chacha20.Equiv.blocksize",
"FStar.Calc.calc_finish",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U8",
"Lib.IntTypes.SEC",
"... | [] | false | false | true | false | false | let xor_block_lemma_i #w k b i =
| let bs = w * 4 in
let j = i / bs in
let ki = (transpose_state k).[ i / blocksize ] in
let b_i = sub b ((i / blocksize) * blocksize) blocksize in
let block = sub b ((i / 4) * 4) 4 in
calc ( == ) {
Seq.index (xor_block (transpose k) b) i;
( == ) { xor_block_vec_lemma_i #w (transpose k) b i }
Seq.index (uint_to_byte... | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.chacha20_init_lemma_i | val chacha20_init_lemma_i: #w:lanes -> k:key -> n:nonce -> c0:counter{c0 + w <= max_size_t} -> i:nat{i < w} ->
Lemma ((transpose_state (chacha20_init #w k n c0)).[i] `Seq.equal` Scalar.chacha20_init k n (c0 + i)) | val chacha20_init_lemma_i: #w:lanes -> k:key -> n:nonce -> c0:counter{c0 + w <= max_size_t} -> i:nat{i < w} ->
Lemma ((transpose_state (chacha20_init #w k n c0)).[i] `Seq.equal` Scalar.chacha20_init k n (c0 + i)) | let chacha20_init_lemma_i #w k n c0 i =
let st1 = setup1 k n c0 in
assert (st1 == Scalar.chacha20_init k n c0);
assert (st1.[12] == u32 c0);
let st = map (vec_load_i w) st1 in
eq_intro (transpose_state st).[i] st1;
assert ((transpose_state st).[i] == st1);
let c = vec_counter U32 w in
assert ((vec_v c... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 20,
"end_line": 336,
"start_col": 0,
"start_line": 313
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Hacl.Spec.Chacha20.Vec.key ->
n: Hacl.Spec.Chacha20.Vec.nonce ->
c0: Hacl.Spec.Chacha20.Vec.counter{c0 + w <= Lib.IntTypes.max_size_t} ->
i: Prims.nat{i < w}
-> FStar.Pervasives.Lemma
(ensures
FStar.Seq.Base.equal (Hacl.Spec.Chacha20.Vec.transpose_state (Hacl.Spec.Chacha20.Vec.chacha20_i... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.key",
"Hacl.Spec.Chacha20.Vec.nonce",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.IntTypes.max_size_t",
"Prims.nat",
"Prims.op_LessThan",
"Lib.Sequence.eq_intro",
"Lib.IntTypes.uint... | [] | true | false | true | false | false | let chacha20_init_lemma_i #w k n c0 i =
| let st1 = setup1 k n c0 in
assert (st1 == Scalar.chacha20_init k n c0);
assert (st1.[ 12 ] == u32 c0);
let st = map (vec_load_i w) st1 in
eq_intro (transpose_state st).[ i ] st1;
assert ((transpose_state st).[ i ] == st1);
let c = vec_counter U32 w in
assert ((vec_v c).[ i ] == u32 i);
let res = st.[ 12 ] <- st.[ 12 ] ... | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.lemma_label_bool | val lemma_label_bool (r:range) (msg:string) (b:bool) : Lemma
(requires label r msg b)
(ensures b)
[SMTPat (label r msg b)] | val lemma_label_bool (r:range) (msg:string) (b:bool) : Lemma
(requires label r msg b)
(ensures b)
[SMTPat (label r msg b)] | let lemma_label_bool r msg b = lemma_label_Type0 r msg b | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 14,
"start_col": 0,
"start_line": 14
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= () | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Range",
"short_module": null
},
{
"abbrev": false,
"full_modu... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: FStar.Range.range -> msg: Prims.string -> b: Prims.bool
-> FStar.Pervasives.Lemma (requires Vale.PPC64LE.QuickCodes.label r msg b)
(ensures b)
[SMTPat (Vale.PPC64LE.QuickCodes.label r msg b)] | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"FStar.Range.range",
"Prims.string",
"Prims.bool",
"Vale.PPC64LE.QuickCodes.lemma_label_Type0",
"Prims.b2t",
"Prims.unit"
] | [] | true | false | true | false | false | let lemma_label_bool r msg b =
| lemma_label_Type0 r msg b | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.update_state_mods_refl | val update_state_mods_refl (mods: mods_t) (s: state)
: Lemma (ensures state_eq (update_state_mods mods s s) s) | val update_state_mods_refl (mods: mods_t) (s: state)
: Lemma (ensures state_eq (update_state_mods mods s s) s) | let rec update_state_mods_refl (mods:mods_t) (s:state) : Lemma
(ensures state_eq (update_state_mods mods s s) s)
=
match mods with
| [] -> ()
| _::mods -> update_state_mods_refl mods s | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 44,
"end_line": 40,
"start_col": 0,
"start_line": 35
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | mods: Vale.PPC64LE.QuickCode.mods_t -> s: Vale.PPC64LE.State.state
-> FStar.Pervasives.Lemma
(ensures Vale.PPC64LE.State.state_eq (Vale.PPC64LE.QuickCode.update_state_mods mods s s) s) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"Vale.PPC64LE.QuickCode.mod_t",
"Prims.list",
"Vale.PPC64LE.QuickCodes.update_state_mods_refl",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Vale.PPC64LE.State.state_eq",
"Vale.PPC64LE.QuickCode.update_state_mods",
"Prims.Nil",
"FS... | [
"recursion"
] | false | false | true | false | false | let rec update_state_mods_refl (mods: mods_t) (s: state)
: Lemma (ensures state_eq (update_state_mods mods s s) s) =
| match mods with
| [] -> ()
| _ :: mods -> update_state_mods_refl mods s | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.empty_list_is_small | val empty_list_is_small (#a:Type) (x:list a) : Lemma
([] #a == x \/ [] #a << x) | val empty_list_is_small (#a:Type) (x:list a) : Lemma
([] #a == x \/ [] #a << x) | let rec empty_list_is_small #a x =
match x with
| [] -> ()
| h::t -> empty_list_is_small t | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 19,
"start_col": 0,
"start_line": 16
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Prims.list a -> FStar.Pervasives.Lemma (ensures [] == x \/ [] << x) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.list",
"Vale.PPC64LE.QuickCodes.empty_list_is_small",
"Prims.unit"
] | [
"recursion"
] | false | false | true | false | false | let rec empty_list_is_small #a x =
| match x with
| [] -> ()
| h :: t -> empty_list_is_small t | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.update_state_mods_weaken1 | val update_state_mods_weaken1 (mods mods': mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires (mods_contains1 mods m0 \/ state_mod_eq m0 s s') /\ mods_contains mods' mods)
(ensures (mods_contains1 mods' m0 \/ state_mod_eq m0 s s')) | val update_state_mods_weaken1 (mods mods': mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires (mods_contains1 mods m0 \/ state_mod_eq m0 s s') /\ mods_contains mods' mods)
(ensures (mods_contains1 mods' m0 \/ state_mod_eq m0 s s')) | let rec update_state_mods_weaken1 (mods mods':mods_t) (s' s:state) (m0:mod_t) : Lemma
(requires (mods_contains1 mods m0 \/ state_mod_eq m0 s s') /\ mods_contains mods' mods)
(ensures (mods_contains1 mods' m0 \/ state_mod_eq m0 s s'))
=
match mods with
| [] -> ()
| _::mods ->
if mods_contains mods' mod... | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 52,
"end_line": 135,
"start_col": 0,
"start_line": 127
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
mods: Vale.PPC64LE.QuickCode.mods_t ->
mods': Vale.PPC64LE.QuickCode.mods_t ->
s': Vale.PPC64LE.State.state ->
s: Vale.PPC64LE.State.state ->
m0: Vale.PPC64LE.QuickCode.mod_t
-> FStar.Pervasives.Lemma
(requires
(Vale.PPC64LE.QuickCodes.mods_contains1 mods m0 \/
Vale.PPC64L... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"Vale.PPC64LE.QuickCode.mod_t",
"Prims.list",
"Prims.op_AmpAmp",
"Vale.PPC64LE.QuickCodes.mods_contains",
"Vale.PPC64LE.QuickCodes.mods_contains1",
"Vale.PPC64LE.QuickCodes.update_state_mods_weaken1",
"Prims.bool",
"Prims.unit",
"Prims... | [
"recursion"
] | false | false | true | false | false | let rec update_state_mods_weaken1 (mods mods': mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires (mods_contains1 mods m0 \/ state_mod_eq m0 s s') /\ mods_contains mods' mods)
(ensures (mods_contains1 mods' m0 \/ state_mod_eq m0 s s')) =
| match mods with
| [] -> ()
| _ :: mods ->
if mods_contains mods' mods && mods_contains1 mods m0
then update_state_mods_weaken1 mods mods' s' s m0 | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.chacha20_map_blocks_vec_equiv_pre_k0 | val chacha20_map_blocks_vec_equiv_pre_k0:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter{c0 + w <= max_size_t}
-> hi_fv:size_nat{w * hi_fv + w <= max_size_t} // n == hi_fv == len / (w * blocksize)
-> rem:nat{rem < w * blocksize}
-> b_v:lseq uint8 rem
-> j:nat{j < rem / blocksize * blocksize} ->
Lemma
... | val chacha20_map_blocks_vec_equiv_pre_k0:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter{c0 + w <= max_size_t}
-> hi_fv:size_nat{w * hi_fv + w <= max_size_t} // n == hi_fv == len / (w * blocksize)
-> rem:nat{rem < w * blocksize}
-> b_v:lseq uint8 rem
-> j:nat{j < rem / blocksize * blocksize} ->
Lemma
... | let chacha20_map_blocks_vec_equiv_pre_k0 #w k n c0 hi_fv rem b_v j =
let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
let g_v = chacha20_encrypt_last st_v0 in
let f = Scalar.chacha20_encrypt_block st0 in
let g = Scalar.chacha20_encrypt_last st0 in
let blocksize_v = w * blocks... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 851,
"start_col": 0,
"start_line": 830
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Hacl.Spec.Chacha20.Vec.key ->
n: Hacl.Spec.Chacha20.Vec.nonce ->
c0: Hacl.Spec.Chacha20.Vec.counter{c0 + w <= Lib.IntTypes.max_size_t} ->
hi_fv: Lib.IntTypes.size_nat{w * hi_fv + w <= Lib.IntTypes.max_size_t} ->
rem: Prims.nat{rem < w * Hacl.Spec.Chacha20.Equiv.blocksize} ->
b_v: Lib.Sequenc... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.key",
"Hacl.Spec.Chacha20.Vec.nonce",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.IntTypes.max_size_t",
"Lib.IntTypes.size_nat",
"FStar.Mul.op_Star",
"Prims.nat",
"Prims.op_LessThan... | [] | false | false | true | false | false | let chacha20_map_blocks_vec_equiv_pre_k0 #w k n c0 hi_fv rem b_v j =
| let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
let g_v = chacha20_encrypt_last st_v0 in
let f = Scalar.chacha20_encrypt_block st0 in
let g = Scalar.chacha20_encrypt_last st0 in
let blocksize_v = w * blocksize in
let plain_v = create blocksize_v (u8 0) in
let plain_v = update_sub plain_v... | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.update_state_mods_weaken | val update_state_mods_weaken (mods mods': mods_t) (s' s: state)
: Lemma (requires update_state_mods mods s' s == s' /\ mods_contains mods' mods)
(ensures update_state_mods mods' s' s == s') | val update_state_mods_weaken (mods mods': mods_t) (s' s: state)
: Lemma (requires update_state_mods mods s' s == s' /\ mods_contains mods' mods)
(ensures update_state_mods mods' s' s == s') | let update_state_mods_weaken (mods mods':mods_t) (s' s:state) : Lemma
(requires update_state_mods mods s' s == s' /\ mods_contains mods' mods)
(ensures update_state_mods mods' s' s == s')
=
update_state_mods_from mods s' s;
let f1 (m0:mod_t) : Lemma (mods_contains1 mods' m0 \/ state_mod_eq m0 s s') =
upda... | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 146,
"start_col": 0,
"start_line": 137
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
mods: Vale.PPC64LE.QuickCode.mods_t ->
mods': Vale.PPC64LE.QuickCode.mods_t ->
s': Vale.PPC64LE.State.state ->
s: Vale.PPC64LE.State.state
-> FStar.Pervasives.Lemma
(requires
Vale.PPC64LE.QuickCode.update_state_mods mods s' s == s' /\
Vale.PPC64LE.QuickCodes.mods_contains mods' ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"Vale.PPC64LE.QuickCodes.update_state_mods_to",
"Prims.unit",
"FStar.Classical.forall_intro",
"Vale.PPC64LE.QuickCode.mod_t",
"Prims.l_or",
"Prims.b2t",
"Vale.PPC64LE.QuickCodes.mods_contains1",
"Vale.PPC64LE.QuickCodes.state_mod_eq",
... | [] | false | false | true | false | false | let update_state_mods_weaken (mods mods': mods_t) (s' s: state)
: Lemma (requires update_state_mods mods s' s == s' /\ mods_contains mods' mods)
(ensures update_state_mods mods' s' s == s') =
| update_state_mods_from mods s' s;
let f1 (m0: mod_t) : Lemma (mods_contains1 mods' m0 \/ state_mod_eq m0 s s') =
update_state_mods_weaken1 mods mods' s' s m0
in
FStar.Classical.forall_intro f1;
update_state_mods_to mods' s' s | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.update_state_mods_not1 | val update_state_mods_not1 (mods: mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires not (mods_contains1 mods m0))
(ensures state_mod_eq m0 s (update_state_mods mods s' s)) | val update_state_mods_not1 (mods: mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires not (mods_contains1 mods m0))
(ensures state_mod_eq m0 s (update_state_mods mods s' s)) | let rec update_state_mods_not1 (mods:mods_t) (s' s:state) (m0:mod_t) : Lemma
(requires not (mods_contains1 mods m0))
(ensures state_mod_eq m0 s (update_state_mods mods s' s))
=
match mods with
| [] -> ()
| _::mods -> update_state_mods_not1 mods s' s m0 | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 50,
"end_line": 48,
"start_col": 0,
"start_line": 42
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
mods: Vale.PPC64LE.QuickCode.mods_t ->
s': Vale.PPC64LE.State.state ->
s: Vale.PPC64LE.State.state ->
m0: Vale.PPC64LE.QuickCode.mod_t
-> FStar.Pervasives.Lemma
(requires Prims.op_Negation (Vale.PPC64LE.QuickCodes.mods_contains1 mods m0))
(ensures
Vale.PPC64LE.QuickCodes.state_mod... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"Vale.PPC64LE.QuickCode.mod_t",
"Prims.list",
"Vale.PPC64LE.QuickCodes.update_state_mods_not1",
"Prims.unit",
"Prims.b2t",
"Prims.op_Negation",
"Vale.PPC64LE.QuickCodes.mods_contains1",
"Prims.squash",
"Vale.PPC64LE.QuickCodes.state_mo... | [
"recursion"
] | false | false | true | false | false | let rec update_state_mods_not1 (mods: mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires not (mods_contains1 mods m0))
(ensures state_mod_eq m0 s (update_state_mods mods s' s)) =
| match mods with
| [] -> ()
| _ :: mods -> update_state_mods_not1 mods s' s m0 | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.state_mod_eq | val state_mod_eq : m: Vale.PPC64LE.QuickCode.mod_t -> s1: Vale.PPC64LE.State.state -> s2: Vale.PPC64LE.State.state
-> Prims.logical | let state_mod_eq (m:mod_t) (s1 s2:state) =
match m with
| Mod_None -> True
| Mod_ok -> s1.ok == s2.ok
| Mod_reg r -> eval_reg r s1 == eval_reg r s2
| Mod_vec v -> eval_vec v s1 == eval_vec v s2
| Mod_cr0 -> s1.cr0 == s2.cr0
| Mod_xer -> s1.xer == s2.xer
| Mod_mem -> (coerce s1.ms_heap).vf_heap == (coerc... | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 58,
"end_line": 33,
"start_col": 0,
"start_line": 21
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | m: Vale.PPC64LE.QuickCode.mod_t -> s1: Vale.PPC64LE.State.state -> s2: Vale.PPC64LE.State.state
-> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Vale.PPC64LE.QuickCode.mod_t",
"Vale.PPC64LE.State.state",
"Prims.l_True",
"Prims.eq2",
"Prims.bool",
"Vale.PPC64LE.Machine_s.__proj__Mkstate__item__ok",
"Vale.PPC64LE.Machine_s.reg",
"Vale.PPC64LE.Machine_s.nat64",
"Vale.PPC64LE.State.eval_reg",
"Vale.PPC64LE.Machine_s.vec",
"Vale.PPC64LE.Mach... | [] | false | false | false | true | true | let state_mod_eq (m: mod_t) (s1 s2: state) =
| match m with
| Mod_None -> True
| Mod_ok -> s1.ok == s2.ok
| Mod_reg r -> eval_reg r s1 == eval_reg r s2
| Mod_vec v -> eval_vec v s1 == eval_vec v s2
| Mod_cr0 -> s1.cr0 == s2.cr0
| Mod_xer -> s1.xer == s2.xer
| Mod_mem -> (coerce s1.ms_heap).vf_heap == (coerce s2.ms_heap).vf_heap
| Mod_mem_layout -> (coerce s1.ms_hea... | false | |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.update_state_mods_from | val update_state_mods_from (mods: mods_t) (s' s: state)
: Lemma (requires update_state_mods mods s' s == s')
(ensures
(forall (m0: mod_t). {:pattern mods_contains1 mods m0\/state_mod_eq m0 s s'}
mods_contains1 mods m0 \/ state_mod_eq m0 s s')) | val update_state_mods_from (mods: mods_t) (s' s: state)
: Lemma (requires update_state_mods mods s' s == s')
(ensures
(forall (m0: mod_t). {:pattern mods_contains1 mods m0\/state_mod_eq m0 s s'}
mods_contains1 mods m0 \/ state_mod_eq m0 s s')) | let update_state_mods_from (mods:mods_t) (s' s:state) : Lemma
(requires update_state_mods mods s' s == s')
(ensures (
forall (m0:mod_t).{:pattern mods_contains1 mods m0 \/ state_mod_eq m0 s s'}
mods_contains1 mods m0 \/ state_mod_eq m0 s s'
))
=
let f1 (m0:mod_t) : Lemma (mods_contains1 mods m0 \/ s... | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 79,
"start_col": 0,
"start_line": 69
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | mods: Vale.PPC64LE.QuickCode.mods_t -> s': Vale.PPC64LE.State.state -> s: Vale.PPC64LE.State.state
-> FStar.Pervasives.Lemma (requires Vale.PPC64LE.QuickCode.update_state_mods mods s' s == s')
(ensures
forall (m0: Vale.PPC64LE.QuickCode.mod_t).
{:pattern
Vale.PPC64LE.QuickCodes.mo... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"FStar.Classical.forall_intro",
"Vale.PPC64LE.QuickCode.mod_t",
"Prims.l_or",
"Prims.b2t",
"Vale.PPC64LE.QuickCodes.mods_contains1",
"Vale.PPC64LE.QuickCodes.state_mod_eq",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.Nil",
... | [] | false | false | true | false | false | let update_state_mods_from (mods: mods_t) (s' s: state)
: Lemma (requires update_state_mods mods s' s == s')
(ensures
(forall (m0: mod_t). {:pattern mods_contains1 mods m0\/state_mod_eq m0 s s'}
mods_contains1 mods m0 \/ state_mod_eq m0 s s')) =
| let f1 (m0: mod_t) : Lemma (mods_contains1 mods m0 \/ state_mod_eq m0 s s') =
update_state_mods_from1 mods s' s m0
in
FStar.Classical.forall_intro f1 | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.call_QPURE | val call_QPURE
(#a: Type0)
(#cs: codes)
(r: range)
(msg: string)
(pre: ((unit -> GTot Type0) -> GTot Type0){is_monotonic pre})
(l: (unit -> PURE unit (as_pure_wp pre)))
(qcs: quickCodes a cs)
(mods: mods_t)
(k: (state -> a -> Type0))
(s0: state)
: Lemma
... | val call_QPURE
(#a: Type0)
(#cs: codes)
(r: range)
(msg: string)
(pre: ((unit -> GTot Type0) -> GTot Type0){is_monotonic pre})
(l: (unit -> PURE unit (as_pure_wp pre)))
(qcs: quickCodes a cs)
(mods: mods_t)
(k: (state -> a -> Type0))
(s0: state)
: Lemma
... | let call_QPURE
(#a:Type0) (#cs:codes) (r:range) (msg:string) (pre:((unit -> GTot Type0) -> GTot Type0){is_monotonic pre})
(l:unit -> PURE unit (as_pure_wp pre)) (qcs:quickCodes a cs) (mods:mods_t) (k:state -> a -> Type0) (s0:state)
: Lemma
(requires
(forall (p:unit -> GTot Type0).{:pattern pre p}
... | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 6,
"end_line": 157,
"start_col": 0,
"start_line": 148
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
r: FStar.Range.range ->
msg: Prims.string ->
pre:
(_: (_: Prims.unit -> Prims.GTot Type0) -> Prims.GTot Type0)
{FStar.Monotonic.Pure.is_monotonic pre} ->
l: (_: Prims.unit -> Prims.PURE Prims.unit) ->
qcs: Vale.PPC64LE.QuickCodes.quickCodes a cs ->
mods: Vale.PPC64LE.QuickCode.mod... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.PPC64LE.QuickCodes.codes",
"FStar.Range.range",
"Prims.string",
"Prims.unit",
"FStar.Monotonic.Pure.is_monotonic",
"FStar.Monotonic.Pure.as_pure_wp",
"Vale.PPC64LE.QuickCodes.quickCodes",
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"Prims.l_Forall",
"Prims.l_imp",
"Vale.... | [] | true | false | true | false | false | let call_QPURE
(#a: Type0)
(#cs: codes)
(r: range)
(msg: string)
(pre: ((unit -> GTot Type0) -> GTot Type0){is_monotonic pre})
(l: (unit -> PURE unit (as_pure_wp pre)))
(qcs: quickCodes a cs)
(mods: mods_t)
(k: (state -> a -> Type0))
(s0: state)
: Lemma
... | l () | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.update_state_mods_from1 | val update_state_mods_from1 (mods: mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires state_mod_eq m0 s' (update_state_mods mods s' s))
(ensures mods_contains1 mods m0 \/ state_mod_eq m0 s s') | val update_state_mods_from1 (mods: mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires state_mod_eq m0 s' (update_state_mods mods s' s))
(ensures mods_contains1 mods m0 \/ state_mod_eq m0 s s') | let update_state_mods_from1 (mods:mods_t) (s' s:state) (m0:mod_t) : Lemma
(requires state_mod_eq m0 s' (update_state_mods mods s' s))
(ensures mods_contains1 mods m0 \/ state_mod_eq m0 s s')
=
if not (mods_contains1 mods m0) then update_state_mods_not1 mods s' s m0 | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 74,
"end_line": 54,
"start_col": 0,
"start_line": 50
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
mods: Vale.PPC64LE.QuickCode.mods_t ->
s': Vale.PPC64LE.State.state ->
s: Vale.PPC64LE.State.state ->
m0: Vale.PPC64LE.QuickCode.mod_t
-> FStar.Pervasives.Lemma
(requires
Vale.PPC64LE.QuickCodes.state_mod_eq m0
s'
(Vale.PPC64LE.QuickCode.update_state_mods mods s' s))... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"Vale.PPC64LE.QuickCode.mod_t",
"Prims.op_Negation",
"Vale.PPC64LE.QuickCodes.mods_contains1",
"Vale.PPC64LE.QuickCodes.update_state_mods_not1",
"Prims.bool",
"Prims.unit",
"Vale.PPC64LE.QuickCodes.state_mod_eq",
"Vale.PPC64LE.QuickCode.... | [] | false | false | true | false | false | let update_state_mods_from1 (mods: mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires state_mod_eq m0 s' (update_state_mods mods s' s))
(ensures mods_contains1 mods m0 \/ state_mod_eq m0 s s') =
| if not (mods_contains1 mods m0) then update_state_mods_not1 mods s' s m0 | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.qAssertLemma | val qAssertLemma (p:Type0) : tAssertLemma p | val qAssertLemma (p:Type0) : tAssertLemma p | let qAssertLemma p = fun () -> () | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 320,
"start_col": 0,
"start_line": 320
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | p: Type0 -> Vale.PPC64LE.QuickCodes.tAssertLemma p | Prims.Tot | [
"total"
] | [] | [
"Prims.unit"
] | [] | false | false | false | true | false | let qAssertLemma p =
| fun () -> () | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.qWhile_proof | val qWhile_proof
(#a #d:Type) (#c:code) (b:cmp) (qc:a -> quickCode a c) (mods:mods_t) (inv:va_state -> a -> Type0)
(dec:va_state -> a -> d) (g0:a) (s0:va_state) (k:va_state -> a -> Type0)
: Ghost (va_state & va_fuel & a)
(requires t_require s0 /\ wp_While b qc mods inv dec g0 s0 k)
(ensures fun (sM, f0, g... | val qWhile_proof
(#a #d:Type) (#c:code) (b:cmp) (qc:a -> quickCode a c) (mods:mods_t) (inv:va_state -> a -> Type0)
(dec:va_state -> a -> d) (g0:a) (s0:va_state) (k:va_state -> a -> Type0)
: Ghost (va_state & va_fuel & a)
(requires t_require s0 /\ wp_While b qc mods inv dec g0 s0 k)
(ensures fun (sM, f0, g... | let qWhile_proof #a #d #c b qc mods inv dec g0 s0 k =
let ob = cmp_to_ocmp b in
let (s1, f1) = va_lemma_while_total ob c s0 in
update_state_mods_refl mods s0;
qWhile_proof_rec b qc mods inv dec s0 s1 g0 f1 k | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 50,
"end_line": 318,
"start_col": 0,
"start_line": 314
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b: Vale.PPC64LE.QuickCodes.cmp ->
qc: (_: a -> Vale.PPC64LE.QuickCode.quickCode a c) ->
mods: Vale.PPC64LE.QuickCode.mods_t ->
inv: (_: Vale.PPC64LE.Decls.va_state -> _: a -> Type0) ->
dec: (_: Vale.PPC64LE.Decls.va_state -> _: a -> d) ->
g0: a ->
s0: Vale.PPC64LE.Decls.va_state ->
k: (... | Prims.Ghost | [] | [] | [
"Vale.PPC64LE.QuickCodes.code",
"Vale.PPC64LE.QuickCodes.cmp",
"Vale.PPC64LE.QuickCode.quickCode",
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.Decls.va_state",
"Vale.PPC64LE.Decls.va_fuel",
"Vale.PPC64LE.QuickCodes.qWhile_proof_rec",
"Prims.unit",
"Vale.PPC64LE.QuickCodes.update_state_mods_refl",... | [] | false | false | false | false | false | let qWhile_proof #a #d #c b qc mods inv dec g0 s0 k =
| let ob = cmp_to_ocmp b in
let s1, f1 = va_lemma_while_total ob c s0 in
update_state_mods_refl mods s0;
qWhile_proof_rec b qc mods inv dec s0 s1 g0 f1 k | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.qblock_proof | val qblock_proof (#a:Type) (#cs:codes) (qcs:va_state -> GTot (quickCodes a cs)) (mods:mods_t) (s0:va_state) (k:va_state -> a -> Type0)
: Ghost (va_state & va_fuel & a)
(requires t_require s0 /\ wp_block qcs mods s0 k)
(ensures fun (sM, f0, g) ->
eval_code (block cs) s0 f0 sM /\ update_state_mods mods sM s0 ==... | val qblock_proof (#a:Type) (#cs:codes) (qcs:va_state -> GTot (quickCodes a cs)) (mods:mods_t) (s0:va_state) (k:va_state -> a -> Type0)
: Ghost (va_state & va_fuel & a)
(requires t_require s0 /\ wp_block qcs mods s0 k)
(ensures fun (sM, f0, g) ->
eval_code (block cs) s0 f0 sM /\ update_state_mods mods sM s0 ==... | let qblock_proof #a #cs qcs mods s0 k =
wp_sound cs (qcs s0) mods k s0 | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 234,
"start_col": 0,
"start_line": 233
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
qcs: (_: Vale.PPC64LE.Decls.va_state -> Prims.GTot (Vale.PPC64LE.QuickCodes.quickCodes a cs)) ->
mods: Vale.PPC64LE.QuickCode.mods_t ->
s0: Vale.PPC64LE.Decls.va_state ->
k: (_: Vale.PPC64LE.Decls.va_state -> _: a -> Type0)
-> Prims.Ghost ((Vale.PPC64LE.Decls.va_state * Vale.PPC64LE.Decls.va_fuel) * ... | Prims.Ghost | [] | [] | [
"Vale.PPC64LE.QuickCodes.codes",
"Vale.PPC64LE.Decls.va_state",
"Vale.PPC64LE.QuickCodes.quickCodes",
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.QuickCodes.wp_sound",
"FStar.Pervasives.Native.tuple3",
"Vale.PPC64LE.Decls.va_fuel"
] | [] | false | false | false | false | false | let qblock_proof #a #cs qcs mods s0 k =
| wp_sound cs (qcs s0) mods k s0 | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.wp_sound | val wp_sound (#a:Type0) (cs:codes) (qcs:quickCodes a cs) (mods:mods_t) (k:va_state -> a -> Type0) (s0:va_state)
: Ghost (va_state & va_fuel & a)
(requires t_require s0 /\ wp cs qcs mods k s0)
(ensures fun (sN, fN, gN) ->
eval (Block cs) s0 fN sN /\ update_state_mods mods sN s0 == sN /\ state_inv sN /\ k sN gN... | val wp_sound (#a:Type0) (cs:codes) (qcs:quickCodes a cs) (mods:mods_t) (k:va_state -> a -> Type0) (s0:va_state)
: Ghost (va_state & va_fuel & a)
(requires t_require s0 /\ wp cs qcs mods k s0)
(ensures fun (sN, fN, gN) ->
eval (Block cs) s0 fN sN /\ update_state_mods mods sN s0 == sN /\ state_inv sN /\ k sN gN... | let rec wp_sound #a cs qcs mods k s0 =
let qcs0 = qcs in
match qcs with
| QEmpty g ->
update_state_mods_refl mods s0;
let (sN, fN) = va_lemma_empty_total s0 [] in (sN, fN, g)
| QSeq _ _ qc qcs ->
let QProc _ _ wp1' proof = qc in
let c::cs = cs in
let k' = wp_Seq cs qcs mods k in
... | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 31,
"end_line": 231,
"start_col": 0,
"start_line": 174
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
cs: Vale.PPC64LE.QuickCodes.codes ->
qcs: Vale.PPC64LE.QuickCodes.quickCodes a cs ->
mods: Vale.PPC64LE.QuickCode.mods_t ->
k: (_: Vale.PPC64LE.Decls.va_state -> _: a -> Type0) ->
s0: Vale.PPC64LE.Decls.va_state
-> Prims.Ghost ((Vale.PPC64LE.Decls.va_state * Vale.PPC64LE.Decls.va_fuel) * a) | Prims.Ghost | [] | [] | [
"Vale.PPC64LE.QuickCodes.codes",
"Vale.PPC64LE.QuickCodes.quickCodes",
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.Decls.va_state",
"Vale.PPC64LE.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.PPC64LE.Machine_s.state",... | [
"recursion"
] | false | false | false | false | false | let rec wp_sound #a cs qcs mods k s0 =
| let qcs0 = qcs in
match qcs with
| QEmpty g ->
update_state_mods_refl mods s0;
let sN, fN = va_lemma_empty_total s0 [] in
(sN, fN, g)
| QSeq _ _ qc qcs ->
let QProc _ _ wp1' proof = qc in
let c :: cs = cs in
let k' = wp_Seq cs qcs mods k in
let sM, fM, gM = proof s0 k' in
let sN, fN, gN = wp_sound cs qc... | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.update_state_mods_trans | val update_state_mods_trans (mods: mods_t) (s0 s1 s2: state)
: Lemma (requires update_state_mods mods s1 s0 == s1 /\ update_state_mods mods s2 s1 == s2)
(ensures update_state_mods mods s2 s0 == s2) | val update_state_mods_trans (mods: mods_t) (s0 s1 s2: state)
: Lemma (requires update_state_mods mods s1 s0 == s1 /\ update_state_mods mods s2 s1 == s2)
(ensures update_state_mods mods s2 s0 == s2) | let update_state_mods_trans (mods:mods_t) (s0 s1 s2:state) : Lemma
(requires update_state_mods mods s1 s0 == s1 /\ update_state_mods mods s2 s1 == s2)
(ensures update_state_mods mods s2 s0 == s2)
=
update_state_mods_from mods s1 s0;
update_state_mods_from mods s2 s1;
update_state_mods_to mods s2 s0 | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 125,
"start_col": 0,
"start_line": 119
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
mods: Vale.PPC64LE.QuickCode.mods_t ->
s0: Vale.PPC64LE.State.state ->
s1: Vale.PPC64LE.State.state ->
s2: Vale.PPC64LE.State.state
-> FStar.Pervasives.Lemma
(requires
Vale.PPC64LE.QuickCode.update_state_mods mods s1 s0 == s1 /\
Vale.PPC64LE.QuickCode.update_state_mods mods s2 s... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"Vale.PPC64LE.QuickCodes.update_state_mods_to",
"Prims.unit",
"Vale.PPC64LE.QuickCodes.update_state_mods_from",
"Prims.l_and",
"Prims.eq2",
"Vale.PPC64LE.QuickCode.update_state_mods",
"Prims.squash",
"Prims.Nil",
"FStar.Pervasives.patt... | [] | true | false | true | false | false | let update_state_mods_trans (mods: mods_t) (s0 s1 s2: state)
: Lemma (requires update_state_mods mods s1 s0 == s1 /\ update_state_mods mods s2 s1 == s2)
(ensures update_state_mods mods s2 s0 == s2) =
| update_state_mods_from mods s1 s0;
update_state_mods_from mods s2 s1;
update_state_mods_to mods s2 s0 | false |
Hacl.Spec.K256.Scalar.Lemmas.fst | Hacl.Spec.K256.Scalar.Lemmas.qas_nat4_is_qas_nat | val qas_nat4_is_qas_nat (f:qelem_lseq) :
Lemma (SD.bn_v f == qas_nat4 (f.[0], f.[1], f.[2], f.[3])) | val qas_nat4_is_qas_nat (f:qelem_lseq) :
Lemma (SD.bn_v f == qas_nat4 (f.[0], f.[1], f.[2], f.[3])) | let qas_nat4_is_qas_nat f =
SD.bn_eval_unfold_i f 4;
SD.bn_eval_unfold_i f 3;
SD.bn_eval_unfold_i f 2;
SD.bn_eval_unfold_i f 1;
SD.bn_eval0 f | {
"file_name": "code/k256/Hacl.Spec.K256.Scalar.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 26,
"start_col": 0,
"start_line": 21
} | module Hacl.Spec.K256.Scalar.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Hacl.Spec.K256.Scalar
module S = Spec.K256
module SD = Hacl.Spec.Bignum.Definitions
module SB = Hacl.Spec.Bignum
module BB = Hacl.Spec.Bignum.Base
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fs... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Hacl.Spec.K256.Scalar.qelem_lseq
-> FStar.Pervasives.Lemma
(ensures
Hacl.Spec.Bignum.Definitions.bn_v f ==
Hacl.Spec.K256.Scalar.qas_nat4 (f.[ 0 ], f.[ 1 ], f.[ 2 ], f.[ 3 ])) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.K256.Scalar.qelem_lseq",
"Hacl.Spec.Bignum.Definitions.bn_eval0",
"Lib.IntTypes.U64",
"Prims.unit",
"Hacl.Spec.Bignum.Definitions.bn_eval_unfold_i"
] | [] | true | false | true | false | false | let qas_nat4_is_qas_nat f =
| SD.bn_eval_unfold_i f 4;
SD.bn_eval_unfold_i f 3;
SD.bn_eval_unfold_i f 2;
SD.bn_eval_unfold_i f 1;
SD.bn_eval0 f | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.update_state_mods_to | val update_state_mods_to (mods: mods_t) (s' s: state)
: Lemma
(requires
(forall (m0: mod_t). {:pattern mods_contains1 mods m0\/state_mod_eq m0 s s'}
mods_contains1 mods m0 \/ state_mod_eq m0 s s'))
(ensures state_eq s' (update_state_mods mods s' s)) | val update_state_mods_to (mods: mods_t) (s' s: state)
: Lemma
(requires
(forall (m0: mod_t). {:pattern mods_contains1 mods m0\/state_mod_eq m0 s s'}
mods_contains1 mods m0 \/ state_mod_eq m0 s s'))
(ensures state_eq s' (update_state_mods mods s' s)) | let update_state_mods_to (mods:mods_t) (s' s:state) : Lemma
(requires (
forall (m0:mod_t).{:pattern mods_contains1 mods m0 \/ state_mod_eq m0 s s'}
mods_contains1 mods m0 \/ state_mod_eq m0 s s'
))
(ensures state_eq s' (update_state_mods mods s' s))
=
let s'' = update_state_mods mods s' s in
let f... | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 4,
"end_line": 117,
"start_col": 0,
"start_line": 81
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | mods: Vale.PPC64LE.QuickCode.mods_t -> s': Vale.PPC64LE.State.state -> s: Vale.PPC64LE.State.state
-> FStar.Pervasives.Lemma
(requires
forall (m0: Vale.PPC64LE.QuickCode.mod_t).
{:pattern
Vale.PPC64LE.QuickCodes.mods_contains1 mods m0\/Vale.PPC64LE.QuickCodes.state_mod_eq m0
... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"Vale.Arch.HeapImpl.heaplet_id",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"Prims.eq2",
"Vale.Arch.HeapImpl.vale_heap",
"Vale.Lib.Map16.sel",
"Vale.Arch.HeapImpl.__proj__Mkvale_full_heap__item__vf_heaplets",
"Vale.PPC64LE.Machine_s... | [] | false | false | true | false | false | let update_state_mods_to (mods: mods_t) (s' s: state)
: Lemma
(requires
(forall (m0: mod_t). {:pattern mods_contains1 mods m0\/state_mod_eq m0 s s'}
mods_contains1 mods m0 \/ state_mod_eq m0 s s'))
(ensures state_eq s' (update_state_mods mods s' s)) =
| let s'' = update_state_mods mods s' s in
let f1 (m0: mod_t) : Lemma (state_mod_eq m0 s' s'') = update_state_mods_to1 mods s' s m0 in
f1 Mod_ok;
f1 Mod_cr0;
f1 Mod_xer;
f1 Mod_mem;
f1 Mod_mem_layout;
f1 Mod_stack;
f1 Mod_stackTaint;
let f1_reg (r: reg) : Lemma (ensures s'.regs r == s''.regs r) [SMTPat (s'.regs r)] =
f... | false |
Hacl.Spec.K256.Scalar.Lemmas.fst | Hacl.Spec.K256.Scalar.Lemmas.is_qelem_le_q_halved_vartime4_lemma | val is_qelem_le_q_halved_vartime4_lemma: f:qelem4 ->
Lemma (is_qelem_le_q_halved_vartime4 f == (qas_nat4 f <= S.q / 2)) | val is_qelem_le_q_halved_vartime4_lemma: f:qelem4 ->
Lemma (is_qelem_le_q_halved_vartime4 f == (qas_nat4 f <= S.q / 2)) | let is_qelem_le_q_halved_vartime4_lemma f =
assert_norm (0xdfe92f46681b20a0 + 0x5d576e7357a4501d * pow2 64 +
0xffffffffffffffff * pow2 128 + 0x7fffffffffffffff * pow2 192 = S.q / 2) | {
"file_name": "code/k256/Hacl.Spec.K256.Scalar.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 76,
"end_line": 61,
"start_col": 0,
"start_line": 59
} | module Hacl.Spec.K256.Scalar.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Hacl.Spec.K256.Scalar
module S = Spec.K256
module SD = Hacl.Spec.Bignum.Definitions
module SB = Hacl.Spec.Bignum
module BB = Hacl.Spec.Bignum.Base
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fs... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Hacl.Spec.K256.Scalar.qelem4
-> FStar.Pervasives.Lemma
(ensures
Hacl.Spec.K256.Scalar.is_qelem_le_q_halved_vartime4 f ==
(Hacl.Spec.K256.Scalar.qas_nat4 f <= Spec.K256.PointOps.q / 2)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.K256.Scalar.qelem4",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.pow2",
"Prims.op_Division",
"Spec.K256.PointOps.q",
"Prims.unit"
] | [] | true | false | true | false | false | let is_qelem_le_q_halved_vartime4_lemma f =
| assert_norm (0xdfe92f46681b20a0 + 0x5d576e7357a4501d * pow2 64 + 0xffffffffffffffff * pow2 128 +
0x7fffffffffffffff * pow2 192 =
S.q / 2) | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.qAssertSquashLemma | val qAssertSquashLemma (p:Type0) : tAssertSquashLemma p | val qAssertSquashLemma (p:Type0) : tAssertSquashLemma p | let qAssertSquashLemma p = fun () -> () | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 322,
"start_col": 0,
"start_line": 322
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | p: Type0 -> Vale.PPC64LE.QuickCodes.tAssertSquashLemma p | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Prims.squash"
] | [] | false | false | false | true | false | let qAssertSquashLemma p =
| fun () -> () | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.qIf_proof | val qIf_proof (#a:Type) (#c1:code) (#c2:code) (b:cmp) (qc1:quickCode a c1) (qc2:quickCode a c2) (mods:mods_t) (s0:va_state) (k:va_state -> a -> Type0)
: Ghost (va_state & va_fuel & a)
(requires t_require s0 /\ wp_If b qc1 qc2 mods s0 k)
(ensures fun (sM, f0, g) ->
eval_code (IfElse (cmp_to_ocmp b) c1 c2) s0 f... | val qIf_proof (#a:Type) (#c1:code) (#c2:code) (b:cmp) (qc1:quickCode a c1) (qc2:quickCode a c2) (mods:mods_t) (s0:va_state) (k:va_state -> a -> Type0)
: Ghost (va_state & va_fuel & a)
(requires t_require s0 /\ wp_If b qc1 qc2 mods s0 k)
(ensures fun (sM, f0, g) ->
eval_code (IfElse (cmp_to_ocmp b) c1 c2) s0 f... | let qIf_proof #a #c1 #c2 b qc1 qc2 mods s0 k =
( match b with
| Cmp_eq o1 o2 -> lemma_valid_cmp_eq s0 o1 o2; lemma_cmp_eq s0 o1 o2
| Cmp_ne o1 o2 -> lemma_valid_cmp_ne s0 o1 o2; lemma_cmp_ne s0 o1 o2
| Cmp_le o1 o2 -> lemma_valid_cmp_le s0 o1 o2; lemma_cmp_le s0 o1 o2
| Cmp_ge o1 o2 -> lemma_valid_cmp... | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 276,
"start_col": 0,
"start_line": 250
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b: Vale.PPC64LE.QuickCodes.cmp ->
qc1: Vale.PPC64LE.QuickCode.quickCode a c1 ->
qc2: Vale.PPC64LE.QuickCode.quickCode a c2 ->
mods: Vale.PPC64LE.QuickCode.mods_t ->
s0: Vale.PPC64LE.Decls.va_state ->
k: (_: Vale.PPC64LE.Decls.va_state -> _: a -> Type0)
-> Prims.Ghost ((Vale.PPC64LE.Decls.va_s... | Prims.Ghost | [] | [] | [
"Vale.PPC64LE.QuickCodes.code",
"Vale.PPC64LE.QuickCodes.cmp",
"Vale.PPC64LE.QuickCode.quickCode",
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.Decls.va_state",
"Vale.PPC64LE.QuickCodes.eval_cmp",
"Vale.PPC64LE.State.state",
"Vale.PPC64LE.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Prim... | [] | false | false | false | false | false | let qIf_proof #a #c1 #c2 b qc1 qc2 mods s0 k =
| (match b with
| Cmp_eq o1 o2 ->
lemma_valid_cmp_eq s0 o1 o2;
lemma_cmp_eq s0 o1 o2
| Cmp_ne o1 o2 ->
lemma_valid_cmp_ne s0 o1 o2;
lemma_cmp_ne s0 o1 o2
| Cmp_le o1 o2 ->
lemma_valid_cmp_le s0 o1 o2;
lemma_cmp_le s0 o1 o2
| Cmp_ge o1 o2 ->
lemma_valid_cmp_ge s0 o1 o2;
lemma_cmp_ge... | false |
Hacl.Spec.K256.Scalar.Lemmas.fst | Hacl.Spec.K256.Scalar.Lemmas.qas_nat4_inj | val qas_nat4_inj (f1 f2:qelem4) : Lemma
(requires qas_nat4 f1 = qas_nat4 f2)
(ensures
(let (a0,a1,a2,a3) = f1 in
let (b0,b1,b2,b3) = f2 in
a0 == b0 /\ a1 == b1 /\ a2 == b2 /\ a3 == b3)) | val qas_nat4_inj (f1 f2:qelem4) : Lemma
(requires qas_nat4 f1 = qas_nat4 f2)
(ensures
(let (a0,a1,a2,a3) = f1 in
let (b0,b1,b2,b3) = f2 in
a0 == b0 /\ a1 == b1 /\ a2 == b2 /\ a3 == b3)) | let qas_nat4_inj f1 f2 =
let (a0,a1,a2,a3) = f1 in
let (b0,b1,b2,b3) = f2 in
let bf1 = create4 a0 a1 a2 a3 in
let bf2 = create4 b0 b1 b2 b3 in
qas_nat4_is_qas_nat bf1;
qas_nat4_is_qas_nat bf2;
SD.bn_eval_inj 4 bf1 bf2 | {
"file_name": "code/k256/Hacl.Spec.K256.Scalar.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 26,
"end_line": 43,
"start_col": 0,
"start_line": 36
} | module Hacl.Spec.K256.Scalar.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Hacl.Spec.K256.Scalar
module S = Spec.K256
module SD = Hacl.Spec.Bignum.Definitions
module SB = Hacl.Spec.Bignum
module BB = Hacl.Spec.Bignum.Base
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fs... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f1: Hacl.Spec.K256.Scalar.qelem4 -> f2: Hacl.Spec.K256.Scalar.qelem4
-> FStar.Pervasives.Lemma
(requires Hacl.Spec.K256.Scalar.qas_nat4 f1 = Hacl.Spec.K256.Scalar.qas_nat4 f2)
(ensures
(let _ = f1 in
(let FStar.Pervasives.Native.Mktuple4 #_ #_ #_ #_ a0 a1 a2 a3 = _ in
let _ =... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.K256.Scalar.qelem4",
"Lib.IntTypes.uint64",
"Hacl.Spec.Bignum.Definitions.bn_eval_inj",
"Lib.IntTypes.U64",
"Prims.unit",
"Hacl.Spec.K256.Scalar.Lemmas.qas_nat4_is_qas_nat",
"Lib.Sequence.lseq",
"Lib.IntTypes.int_t",
"Lib.IntTypes.SEC",
"Lib.Sequence.create4"
] | [] | false | false | true | false | false | let qas_nat4_inj f1 f2 =
| let a0, a1, a2, a3 = f1 in
let b0, b1, b2, b3 = f2 in
let bf1 = create4 a0 a1 a2 a3 in
let bf2 = create4 b0 b1 b2 b3 in
qas_nat4_is_qas_nat bf1;
qas_nat4_is_qas_nat bf2;
SD.bn_eval_inj 4 bf1 bf2 | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.wp_sound_code_wrap | val wp_sound_code_wrap
(#a: Type0)
(c: code)
(qc: quickCode a c)
(s0: state)
(k: (s0': state{s0 == s0'} -> state -> a -> Type0))
: Ghost (state & fuel & a)
(t_require s0 /\ wp_sound_code_pre qc s0 k)
(wp_sound_code_post qc s0 k) | val wp_sound_code_wrap
(#a: Type0)
(c: code)
(qc: quickCode a c)
(s0: state)
(k: (s0': state{s0 == s0'} -> state -> a -> Type0))
: Ghost (state & fuel & a)
(t_require s0 /\ wp_sound_code_pre qc s0 k)
(wp_sound_code_post qc s0 k) | let wp_sound_code_wrap (#a:Type0) (c:code) (qc:quickCode a c) (s0:state) (k:(s0':state{s0 == s0'}) -> state -> a -> Type0) :
Ghost (state & fuel & a)
(t_require s0 /\ wp_sound_code_pre qc s0 k)
(wp_sound_code_post qc s0 k)
=
wp_sound_code c qc (k s0) s0 | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 339,
"start_col": 0,
"start_line": 334
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
c: Vale.PPC64LE.QuickCodes.code ->
qc: Vale.PPC64LE.QuickCode.quickCode a c ->
s0: Vale.PPC64LE.State.state ->
k: (s0': Vale.PPC64LE.State.state{s0 == s0'} -> _: Vale.PPC64LE.State.state -> _: a -> Type0)
-> Prims.Ghost ((Vale.PPC64LE.State.state * Vale.PPC64LE.QuickCodes.fuel) * a) | Prims.Ghost | [] | [] | [
"Vale.PPC64LE.QuickCodes.code",
"Vale.PPC64LE.QuickCode.quickCode",
"Vale.PPC64LE.State.state",
"Prims.eq2",
"Vale.PPC64LE.QuickCodes.wp_sound_code",
"FStar.Pervasives.Native.tuple3",
"Vale.PPC64LE.QuickCodes.fuel",
"Prims.l_and",
"Vale.PPC64LE.QuickCode.t_require",
"Vale.PPC64LE.QuickCodes.wp_sou... | [] | false | false | false | false | false | let wp_sound_code_wrap
(#a: Type0)
(c: code)
(qc: quickCode a c)
(s0: state)
(k: (s0': state{s0 == s0'} -> state -> a -> Type0))
: Ghost (state & fuel & a)
(t_require s0 /\ wp_sound_code_pre qc s0 k)
(wp_sound_code_post qc s0 k) =
| wp_sound_code c qc (k s0) s0 | false |
Hacl.Spec.K256.Scalar.Lemmas.fst | Hacl.Spec.K256.Scalar.Lemmas.lemma_get_carry_from_bn_add | val lemma_get_carry_from_bn_add: r:nat{r < pow2 256} -> c:nat ->
Lemma ((r + c * pow2 256) / pow2 256 = c) | val lemma_get_carry_from_bn_add: r:nat{r < pow2 256} -> c:nat ->
Lemma ((r + c * pow2 256) / pow2 256 = c) | let lemma_get_carry_from_bn_add r c =
Math.Lemmas.lemma_div_plus r c (pow2 256);
Math.Lemmas.small_div r (pow2 256) | {
"file_name": "code/k256/Hacl.Spec.K256.Scalar.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 113,
"start_col": 0,
"start_line": 111
} | module Hacl.Spec.K256.Scalar.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Hacl.Spec.K256.Scalar
module S = Spec.K256
module SD = Hacl.Spec.Bignum.Definitions
module SB = Hacl.Spec.Bignum
module BB = Hacl.Spec.Bignum.Base
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fs... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Prims.nat{r < Prims.pow2 256} -> c: Prims.nat
-> FStar.Pervasives.Lemma (ensures (r + c * Prims.pow2 256) / Prims.pow2 256 = c) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Math.Lemmas.small_div",
"Prims.unit",
"FStar.Math.Lemmas.lemma_div_plus"
] | [] | true | false | true | false | false | let lemma_get_carry_from_bn_add r c =
| Math.Lemmas.lemma_div_plus r c (pow2 256);
Math.Lemmas.small_div r (pow2 256) | false |
Target.fsti | Target.mk_expr | val mk_expr : e: Target.expr' -> Target.expr' * (Ast.pos * Ast.pos) | let mk_expr (e:expr') = e, A.dummy_range | {
"file_name": "src/3d/Target.fsti",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 40,
"end_line": 66,
"start_col": 0,
"start_line": 66
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.List.fst.checked",
"FStar.All.fst.checked",
"Binding.fsti.checked",
"Ast.fst.checked"
],
"interface_file": fa... | [
{
"abbrev": false,
"full_module": "Binding",
"short_module": null
},
{
"abbrev": true,
"full_module": "Ast",
"short_module": "A"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "Binding",
"short_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | e: Target.expr' -> Target.expr' * (Ast.pos * Ast.pos) | Prims.Tot | [
"total"
] | [] | [
"Target.expr'",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple2",
"Ast.pos",
"Ast.dummy_range"
] | [] | false | false | false | true | false | let mk_expr (e: expr') =
| e, A.dummy_range | false | |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.va_wp_sound_code_norm | val va_wp_sound_code_norm (#a:Type0) (c:code) (qc:quickCode a c) (s0:va_state) (k:(s0':va_state{s0 == s0'}) -> va_state -> a -> Type0) :
Ghost (va_state & fuel & a)
(t_require s0 /\ normal (wp_sound_code_pre qc s0 k))
(wp_sound_code_post qc s0 k) | val va_wp_sound_code_norm (#a:Type0) (c:code) (qc:quickCode a c) (s0:va_state) (k:(s0':va_state{s0 == s0'}) -> va_state -> a -> Type0) :
Ghost (va_state & fuel & a)
(t_require s0 /\ normal (wp_sound_code_pre qc s0 k))
(wp_sound_code_post qc s0 k) | let va_wp_sound_code_norm #a c qc s0 k =
assert_normal (wp_sound_code_pre qc s0 k);
wp_sound_code_wrap c qc s0 k | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 349,
"start_col": 0,
"start_line": 347
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
c: Vale.PPC64LE.QuickCodes.code ->
qc: Vale.PPC64LE.QuickCode.quickCode a c ->
s0: Vale.PPC64LE.Decls.va_state ->
k:
(s0': Vale.PPC64LE.Decls.va_state{s0 == s0'} -> _: Vale.PPC64LE.Decls.va_state -> _: a
-> Type0)
-> Prims.Ghost ((Vale.PPC64LE.Decls.va_state * Vale.PPC64LE.QuickCodes.... | Prims.Ghost | [] | [] | [
"Vale.PPC64LE.QuickCodes.code",
"Vale.PPC64LE.QuickCode.quickCode",
"Vale.PPC64LE.Decls.va_state",
"Prims.eq2",
"Vale.PPC64LE.QuickCodes.wp_sound_code_wrap",
"Prims.unit",
"Vale.PPC64LE.QuickCodes.assert_normal",
"Vale.PPC64LE.QuickCodes.wp_sound_code_pre",
"FStar.Pervasives.Native.tuple3",
"Vale.... | [] | false | false | false | false | false | let va_wp_sound_code_norm #a c qc s0 k =
| assert_normal (wp_sound_code_pre qc s0 k);
wp_sound_code_wrap c qc s0 k | false |
Hacl.Spec.K256.Scalar.Lemmas.fst | Hacl.Spec.K256.Scalar.Lemmas.lemma_check_overflow | val lemma_check_overflow: b:nat{b < pow2 256} ->
Lemma (let overflow = (b + (pow2 256 - S.q)) / pow2 256 in
overflow = (if b < S.q then 0 else 1)) | val lemma_check_overflow: b:nat{b < pow2 256} ->
Lemma (let overflow = (b + (pow2 256 - S.q)) / pow2 256 in
overflow = (if b < S.q then 0 else 1)) | let lemma_check_overflow b =
let overflow = (b + (pow2 256 - S.q)) / pow2 256 in
if b < S.q then begin
assert (pow2 256 + b - S.q < pow2 256);
assert (pow2 256 - S.q <= pow2 256 + b - S.q);
assert_norm (0 < pow2 256 - S.q);
Math.Lemmas.small_div (pow2 256 + b - S.q) (pow2 256);
assert (overflow ... | {
"file_name": "code/k256/Hacl.Spec.K256.Scalar.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 105,
"start_col": 0,
"start_line": 87
} | module Hacl.Spec.K256.Scalar.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Hacl.Spec.K256.Scalar
module S = Spec.K256
module SD = Hacl.Spec.Bignum.Definitions
module SB = Hacl.Spec.Bignum
module BB = Hacl.Spec.Bignum.Base
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fs... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: Prims.nat{b < Prims.pow2 256}
-> FStar.Pervasives.Lemma
(ensures
(let overflow = (b + (Prims.pow2 256 - Spec.K256.PointOps.q)) / Prims.pow2 256 in
overflow =
(match b < Spec.K256.PointOps.q with
| true -> 0
| _ -> 1))) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Spec.K256.PointOps.q",
"Prims._assert",
"Prims.op_Equality",
"Prims.int",
"Prims.unit",
"FStar.Math.Lemmas.small_div",
"Prims.op_Subtraction",
"Prims.op_Addition",
"FStar.Pervasives.assert_norm",
"Prims.op_LessThanOrEqual",
"P... | [] | false | false | true | false | false | let lemma_check_overflow b =
| let overflow = (b + (pow2 256 - S.q)) / pow2 256 in
if b < S.q
then
(assert (pow2 256 + b - S.q < pow2 256);
assert (pow2 256 - S.q <= pow2 256 + b - S.q);
assert_norm (0 < pow2 256 - S.q);
Math.Lemmas.small_div (pow2 256 + b - S.q) (pow2 256);
assert (overflow = 0))
else
(assert (pow2 256 <= pow2 2... | false |
Target.fsti | Target.subst | val subst : Type0 | let subst = list (A.ident' & expr) | {
"file_name": "src/3d/Target.fsti",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 34,
"end_line": 64,
"start_col": 0,
"start_line": 64
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.List.fst.checked",
"FStar.All.fst.checked",
"Binding.fsti.checked",
"Ast.fst.checked"
],
"interface_file": fa... | [
{
"abbrev": false,
"full_module": "Binding",
"short_module": null
},
{
"abbrev": true,
"full_module": "Ast",
"short_module": "A"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"Prims.list",
"FStar.Pervasives.Native.tuple2",
"Ast.ident'",
"Target.expr"
] | [] | false | false | false | true | true | let subst =
| list (A.ident' & expr) | false | |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.update_state_mods_to1 | val update_state_mods_to1 (mods: mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires mods_contains1 mods m0 \/ state_mod_eq m0 s s')
(ensures state_mod_eq m0 s' (update_state_mods mods s' s)) | val update_state_mods_to1 (mods: mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires mods_contains1 mods m0 \/ state_mod_eq m0 s s')
(ensures state_mod_eq m0 s' (update_state_mods mods s' s)) | let rec update_state_mods_to1 (mods:mods_t) (s' s:state) (m0:mod_t) : Lemma
(requires mods_contains1 mods m0 \/ state_mod_eq m0 s s')
(ensures state_mod_eq m0 s' (update_state_mods mods s' s))
=
match mods with
| [] -> ()
| r::mods' ->
let b = r =!= m0 \/ state_mod_eq m0 s s' in
let goal (_:squa... | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 50,
"end_line": 67,
"start_col": 0,
"start_line": 56
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
mods: Vale.PPC64LE.QuickCode.mods_t ->
s': Vale.PPC64LE.State.state ->
s: Vale.PPC64LE.State.state ->
m0: Vale.PPC64LE.QuickCode.mod_t
-> FStar.Pervasives.Lemma
(requires
Vale.PPC64LE.QuickCodes.mods_contains1 mods m0 \/
Vale.PPC64LE.QuickCodes.state_mod_eq m0 s s')
(ensur... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"Vale.PPC64LE.QuickCode.mod_t",
"Prims.list",
"FStar.Classical.or_elim",
"Prims.l_not",
"Prims.squash",
"Prims.unit",
"Prims.l_True",
"Prims.Nil",
"FStar.Pervasives.pattern",
"Vale.PPC64LE.QuickCodes.update_state_mods_to1",
"Prims.... | [
"recursion"
] | false | false | true | false | false | let rec update_state_mods_to1 (mods: mods_t) (s' s: state) (m0: mod_t)
: Lemma (requires mods_contains1 mods m0 \/ state_mod_eq m0 s s')
(ensures state_mod_eq m0 s' (update_state_mods mods s' s)) =
| match mods with
| [] -> ()
| r :: mods' ->
let b = r =!= m0 \/ state_mod_eq m0 s s' in
let goal (_: squash (b \/ ~b)) : Type0 = state_mod_eq m0 s' (update_state_mods mods s' s) in
let l1 (_: squash b) : Lemma (goal ()) = update_state_mods_to1 mods' s' s m0 in
let l2 (_: squash (~b)) : Lemma (goal ()) = () in
... | false |
Target.fsti | Target.field_typ | val field_typ : Type0 | let field_typ = typ | {
"file_name": "src/3d/Target.fsti",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 19,
"end_line": 110,
"start_col": 0,
"start_line": 110
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.List.fst.checked",
"FStar.All.fst.checked",
"Binding.fsti.checked",
"Ast.fst.checked"
],
"interface_file": fa... | [
{
"abbrev": false,
"full_module": "Binding",
"short_module": null
},
{
"abbrev": true,
"full_module": "Ast",
"short_module": "A"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "Binding",
"short_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"Target.typ"
] | [] | false | false | false | true | true | let field_typ =
| typ | false | |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.wp_sound_code | val wp_sound_code (#a:Type0) (c:code) (qc:quickCode a c) (k:va_state -> a -> Type0) (s0:va_state) :
Ghost (va_state & fuel & a)
(requires t_require s0 /\ QProc?.wp qc s0 k)
(ensures fun (sN, fN, gN) -> eval_code c s0 fN sN /\ update_state_mods qc.mods sN s0 == sN /\ state_inv sN /\ k sN gN) | val wp_sound_code (#a:Type0) (c:code) (qc:quickCode a c) (k:va_state -> a -> Type0) (s0:va_state) :
Ghost (va_state & fuel & a)
(requires t_require s0 /\ QProc?.wp qc s0 k)
(ensures fun (sN, fN, gN) -> eval_code c s0 fN sN /\ update_state_mods qc.mods sN s0 == sN /\ state_inv sN /\ k sN gN) | let wp_sound_code #a c qc k s0 =
let QProc c _ wp proof = qc in
proof s0 k | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 12,
"end_line": 329,
"start_col": 0,
"start_line": 327
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
c: Vale.PPC64LE.QuickCodes.code ->
qc: Vale.PPC64LE.QuickCode.quickCode a c ->
k: (_: Vale.PPC64LE.Decls.va_state -> _: a -> Type0) ->
s0: Vale.PPC64LE.Decls.va_state
-> Prims.Ghost ((Vale.PPC64LE.Decls.va_state * Vale.PPC64LE.QuickCodes.fuel) * a) | Prims.Ghost | [] | [] | [
"Vale.PPC64LE.QuickCodes.code",
"Vale.PPC64LE.QuickCode.quickCode",
"Vale.PPC64LE.Decls.va_state",
"Vale.PPC64LE.Decls.va_code",
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.QuickCode.quickProc_wp",
"Vale.PPC64LE.QuickCode.t_proof",
"FStar.Pervasives.Native.tuple3",
"Vale.PPC64LE.QuickCodes.fuel"
... | [] | false | false | false | false | false | let wp_sound_code #a c qc k s0 =
| let QProc c _ wp proof = qc in
proof s0 k | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.qInlineIf_proof | val qInlineIf_proof (#a:Type) (#c1:code) (#c2:code) (b:bool) (qc1:quickCode a c1) (qc2:quickCode a c2) (mods:mods_t) (s0:va_state) (k:va_state -> a -> Type0)
: Ghost (va_state & va_fuel & a)
(requires t_require s0 /\ wp_InlineIf b qc1 qc2 mods s0 k)
(ensures fun (sM, f0, g) ->
eval_code (if_code b c1 c2) s0 f... | val qInlineIf_proof (#a:Type) (#c1:code) (#c2:code) (b:bool) (qc1:quickCode a c1) (qc2:quickCode a c2) (mods:mods_t) (s0:va_state) (k:va_state -> a -> Type0)
: Ghost (va_state & va_fuel & a)
(requires t_require s0 /\ wp_InlineIf b qc1 qc2 mods s0 k)
(ensures fun (sM, f0, g) ->
eval_code (if_code b c1 c2) s0 f... | let qInlineIf_proof #a #c1 #c2 b qc1 qc2 mods s0 k =
if b then
(
let (sM, f0, g) = QProc?.proof qc1 s0 k in
update_state_mods_weaken qc1.mods mods sM s0;
(sM, f0, g)
)
else
(
let (sM, f0, g) = QProc?.proof qc2 s0 k in
update_state_mods_weaken qc2.mods mods sM s0;
(sM, f0, g)
) | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 248,
"start_col": 0,
"start_line": 236
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b: Prims.bool ->
qc1: Vale.PPC64LE.QuickCode.quickCode a c1 ->
qc2: Vale.PPC64LE.QuickCode.quickCode a c2 ->
mods: Vale.PPC64LE.QuickCode.mods_t ->
s0: Vale.PPC64LE.Decls.va_state ->
k: (_: Vale.PPC64LE.Decls.va_state -> _: a -> Type0)
-> Prims.Ghost ((Vale.PPC64LE.Decls.va_state * Vale.PPC64... | Prims.Ghost | [] | [] | [
"Vale.PPC64LE.QuickCodes.code",
"Prims.bool",
"Vale.PPC64LE.QuickCode.quickCode",
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.Decls.va_state",
"Vale.PPC64LE.State.state",
"Vale.PPC64LE.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Prims.unit",
"Vale.PPC64LE.QuickCodes.update_state_mods_w... | [] | false | false | false | false | false | let qInlineIf_proof #a #c1 #c2 b qc1 qc2 mods s0 k =
| if b
then
(let sM, f0, g = QProc?.proof qc1 s0 k in
update_state_mods_weaken qc1.mods mods sM s0;
(sM, f0, g))
else
(let sM, f0, g = QProc?.proof qc2 s0 k in
update_state_mods_weaken qc2.mods mods sM s0;
(sM, f0, g)) | false |
Target.fsti | Target.assumption | val assumption : Type0 | let assumption = A.ident * typ | {
"file_name": "src/3d/Target.fsti",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 30,
"end_line": 222,
"start_col": 0,
"start_line": 222
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.List.fst.checked",
"FStar.All.fst.checked",
"Binding.fsti.checked",
"Ast.fst.checked"
],
"interface_file": fa... | [
{
"abbrev": false,
"full_module": "Binding",
"short_module": null
},
{
"abbrev": true,
"full_module": "Ast",
"short_module": "A"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "Binding",
"short_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.tuple2",
"Ast.ident",
"Target.typ"
] | [] | false | false | false | true | true | let assumption =
| A.ident * typ | false | |
Hacl.Spec.K256.Scalar.Lemmas.fst | Hacl.Spec.K256.Scalar.Lemmas.is_qelem_lt_pow2_128_vartime4_lemma | val is_qelem_lt_pow2_128_vartime4_lemma: f:qelem4 ->
Lemma (is_qelem_lt_pow2_128_vartime4 f == (qas_nat4 f < pow2 128)) | val is_qelem_lt_pow2_128_vartime4_lemma: f:qelem4 ->
Lemma (is_qelem_lt_pow2_128_vartime4 f == (qas_nat4 f < pow2 128)) | let is_qelem_lt_pow2_128_vartime4_lemma f =
let (f0, f1, f2, f3) = f in
assert (qas_nat4 f == v f0 + v f1 * pow2 64 + v f2 * pow2 128 + v f3 * pow2 192);
assert (v f0 + v f1 * pow2 64 < pow2 128);
if v f2 = 0 && v f3 = 0 then ()
else begin
Math.Lemmas.pow2_lt_compat 192 128;
assert (pow2 128 <= qas_na... | {
"file_name": "code/k256/Hacl.Spec.K256.Scalar.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 80,
"start_col": 0,
"start_line": 73
} | module Hacl.Spec.K256.Scalar.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Hacl.Spec.K256.Scalar
module S = Spec.K256
module SD = Hacl.Spec.Bignum.Definitions
module SB = Hacl.Spec.Bignum
module BB = Hacl.Spec.Bignum.Base
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fs... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Hacl.Spec.K256.Scalar.qelem4
-> FStar.Pervasives.Lemma
(ensures
Hacl.Spec.K256.Scalar.is_qelem_lt_pow2_128_vartime4 f ==
(Hacl.Spec.K256.Scalar.qas_nat4 f < Prims.pow2 128)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.K256.Scalar.qelem4",
"Lib.IntTypes.uint64",
"Prims.op_AmpAmp",
"Prims.op_Equality",
"Prims.int",
"Lib.IntTypes.v",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Prims.bool",
"Prims._assert",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.pow2",
"Hacl.Spec.K256.Scalar.qas_nat4",
"P... | [] | false | false | true | false | false | let is_qelem_lt_pow2_128_vartime4_lemma f =
| let f0, f1, f2, f3 = f in
assert (qas_nat4 f == v f0 + v f1 * pow2 64 + v f2 * pow2 128 + v f3 * pow2 192);
assert (v f0 + v f1 * pow2 64 < pow2 128);
if v f2 = 0 && v f3 = 0
then ()
else
(Math.Lemmas.pow2_lt_compat 192 128;
assert (pow2 128 <= qas_nat4 f)) | false |
Hacl.Spec.Curve25519.Finv.fst | Hacl.Spec.Curve25519.Finv.pow | val pow : x: Spec.Curve25519.elem -> b: Prims.nat -> Spec.Curve25519.elem | let pow = fpow | {
"file_name": "code/curve25519/Hacl.Spec.Curve25519.Finv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 14,
"end_line": 11,
"start_col": 0,
"start_line": 11
} | module Hacl.Spec.Curve25519.Finv
open FStar.Mul
open Spec.Curve25519
module M = Lib.NatMod
module LE = Lib.Exponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" | {
"checked_file": "/",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.NatMod.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checke... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Lib.NatMod",
"short_module": "M"
},
{
"abbrev": false,
"full_module": "Spec.Curve25519",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Spec.Curve25519.elem -> b: Prims.nat -> Spec.Curve25519.elem | Prims.Tot | [
"total"
] | [] | [
"Spec.Curve25519.fpow"
] | [] | false | false | false | true | false | let pow =
| fpow | false | |
Hacl.Spec.K256.Scalar.Lemmas.fst | Hacl.Spec.K256.Scalar.Lemmas.is_qelem_eq_vartime4_lemma | val is_qelem_eq_vartime4_lemma: f1:qelem4 -> f2:qelem4 ->
Lemma (is_qelem_eq_vartime4 f1 f2 == (qas_nat4 f1 = qas_nat4 f2)) | val is_qelem_eq_vartime4_lemma: f1:qelem4 -> f2:qelem4 ->
Lemma (is_qelem_eq_vartime4 f1 f2 == (qas_nat4 f1 = qas_nat4 f2)) | let is_qelem_eq_vartime4_lemma f1 f2 =
if qas_nat4 f1 = qas_nat4 f2 then qas_nat4_inj f1 f2 | {
"file_name": "code/k256/Hacl.Spec.K256.Scalar.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 54,
"end_line": 66,
"start_col": 0,
"start_line": 65
} | module Hacl.Spec.K256.Scalar.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Hacl.Spec.K256.Scalar
module S = Spec.K256
module SD = Hacl.Spec.Bignum.Definitions
module SB = Hacl.Spec.Bignum
module BB = Hacl.Spec.Bignum.Base
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fs... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f1: Hacl.Spec.K256.Scalar.qelem4 -> f2: Hacl.Spec.K256.Scalar.qelem4
-> FStar.Pervasives.Lemma
(ensures
Hacl.Spec.K256.Scalar.is_qelem_eq_vartime4 f1 f2 ==
(Hacl.Spec.K256.Scalar.qas_nat4 f1 = Hacl.Spec.K256.Scalar.qas_nat4 f2)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.K256.Scalar.qelem4",
"Prims.op_Equality",
"Prims.int",
"Hacl.Spec.K256.Scalar.qas_nat4",
"Hacl.Spec.K256.Scalar.Lemmas.qas_nat4_inj",
"Prims.bool",
"Prims.unit"
] | [] | false | false | true | false | false | let is_qelem_eq_vartime4_lemma f1 f2 =
| if qas_nat4 f1 = qas_nat4 f2 then qas_nat4_inj f1 f2 | false |
Hacl.Spec.Curve25519.Finv.fst | Hacl.Spec.Curve25519.Finv.cm_prime | val cm_prime : Lib.Exponentiation.Definition.comm_monoid (Lib.NatMod.nat_mod Spec.Curve25519.prime) | let cm_prime = M.mk_nat_mod_comm_monoid prime | {
"file_name": "code/curve25519/Hacl.Spec.Curve25519.Finv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 45,
"end_line": 12,
"start_col": 0,
"start_line": 12
} | module Hacl.Spec.Curve25519.Finv
open FStar.Mul
open Spec.Curve25519
module M = Lib.NatMod
module LE = Lib.Exponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
let fsqr x = fmul x x | {
"checked_file": "/",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.NatMod.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checke... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Lib.NatMod",
"short_module": "M"
},
{
"abbrev": false,
"full_module": "Spec.Curve25519",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Lib.Exponentiation.Definition.comm_monoid (Lib.NatMod.nat_mod Spec.Curve25519.prime) | Prims.Tot | [
"total"
] | [] | [
"Lib.NatMod.mk_nat_mod_comm_monoid",
"Spec.Curve25519.prime"
] | [] | false | false | false | true | false | let cm_prime =
| M.mk_nat_mod_comm_monoid prime | false | |
Hacl.Spec.Curve25519.Finv.fst | Hacl.Spec.Curve25519.Finv.fsqr | val fsqr : x: Spec.Curve25519.elem -> Spec.Curve25519.elem | let fsqr x = fmul x x | {
"file_name": "code/curve25519/Hacl.Spec.Curve25519.Finv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 21,
"end_line": 10,
"start_col": 0,
"start_line": 10
} | module Hacl.Spec.Curve25519.Finv
open FStar.Mul
open Spec.Curve25519
module M = Lib.NatMod
module LE = Lib.Exponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0" | {
"checked_file": "/",
"dependencies": [
"Spec.Curve25519.fst.checked",
"prims.fst.checked",
"Lib.NatMod.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checke... | [
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Lib.NatMod",
"short_module": "M"
},
{
"abbrev": false,
"full_module": "Spec.Curve25519",
"short_module": null
},
{
"abbrev": false,
"full_module": ... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: Spec.Curve25519.elem -> Spec.Curve25519.elem | Prims.Tot | [
"total"
] | [] | [
"Spec.Curve25519.elem",
"Spec.Curve25519.fmul"
] | [] | false | false | false | true | false | let fsqr x =
| fmul x x | false | |
Hacl.Spec.K256.Scalar.Lemmas.fst | Hacl.Spec.K256.Scalar.Lemmas.is_qelem_lt_q_vartime4_lemma | val is_qelem_lt_q_vartime4_lemma: f:qelem4 ->
Lemma (is_qelem_lt_q_vartime4 f == (qas_nat4 f < S.q)) | val is_qelem_lt_q_vartime4_lemma: f:qelem4 ->
Lemma (is_qelem_lt_q_vartime4 f == (qas_nat4 f < S.q)) | let is_qelem_lt_q_vartime4_lemma f =
assert_norm (0xbfd25e8cd0364141 + 0xbaaedce6af48a03b * pow2 64 +
0xfffffffffffffffe * pow2 128 + 0xffffffffffffffff * pow2 192 = S.q) | {
"file_name": "code/k256/Hacl.Spec.K256.Scalar.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 72,
"end_line": 55,
"start_col": 0,
"start_line": 53
} | module Hacl.Spec.K256.Scalar.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Hacl.Spec.K256.Scalar
module S = Spec.K256
module SD = Hacl.Spec.Bignum.Definitions
module SB = Hacl.Spec.Bignum
module BB = Hacl.Spec.Bignum.Base
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fs... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | f: Hacl.Spec.K256.Scalar.qelem4
-> FStar.Pervasives.Lemma
(ensures
Hacl.Spec.K256.Scalar.is_qelem_lt_q_vartime4 f ==
(Hacl.Spec.K256.Scalar.qas_nat4 f < Spec.K256.PointOps.q)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.K256.Scalar.qelem4",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Prims.pow2",
"Spec.K256.PointOps.q",
"Prims.unit"
] | [] | true | false | true | false | false | let is_qelem_lt_q_vartime4_lemma f =
| assert_norm (0xbfd25e8cd0364141 + 0xbaaedce6af48a03b * pow2 64 + 0xfffffffffffffffe * pow2 128 +
0xffffffffffffffff * pow2 192 =
S.q) | false |
Target.fsti | Target.definition | val definition : Type0 | let definition = A.ident * list param * typ * expr | {
"file_name": "src/3d/Target.fsti",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 50,
"end_line": 220,
"start_col": 0,
"start_line": 220
} | (*
Copyright 2019 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.List.fst.checked",
"FStar.All.fst.checked",
"Binding.fsti.checked",
"Ast.fst.checked"
],
"interface_file": fa... | [
{
"abbrev": false,
"full_module": "Binding",
"short_module": null
},
{
"abbrev": true,
"full_module": "Ast",
"short_module": "A"
},
{
"abbrev": false,
"full_module": "FStar.All",
"short_module": null
},
{
"abbrev": false,
"full_module": "Binding",
"short_m... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.tuple4",
"Ast.ident",
"Prims.list",
"Target.param",
"Target.typ",
"Target.expr"
] | [] | false | false | false | true | true | let definition =
| ((A.ident * list param) * typ) * expr | false | |
Hacl.Spec.K256.Scalar.Lemmas.fst | Hacl.Spec.K256.Scalar.Lemmas.mul_pow2_256_minus_q_lt_lemma | val mul_pow2_256_minus_q_lt_lemma: p:nat -> a:nat{a < pow2 p} ->
Lemma (a * (pow2 256 - S.q) < pow2 (p + 129)) | val mul_pow2_256_minus_q_lt_lemma: p:nat -> a:nat{a < pow2 p} ->
Lemma (a * (pow2 256 - S.q) < pow2 (p + 129)) | let mul_pow2_256_minus_q_lt_lemma p a =
Math.Lemmas.lemma_mult_lt_right (pow2 256 - S.q) a (pow2 p);
assert_norm (pow2 256 - S.q < pow2 129);
Math.Lemmas.lemma_mult_lt_left (pow2 p) (pow2 256 - S.q) (pow2 129);
Math.Lemmas.pow2_plus p 129 | {
"file_name": "code/k256/Hacl.Spec.K256.Scalar.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 29,
"end_line": 203,
"start_col": 0,
"start_line": 199
} | module Hacl.Spec.K256.Scalar.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Hacl.Spec.K256.Scalar
module S = Spec.K256
module SD = Hacl.Spec.Bignum.Definitions
module SB = Hacl.Spec.Bignum
module BB = Hacl.Spec.Bignum.Base
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fs... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | p: Prims.nat -> a: Prims.nat{a < Prims.pow2 p}
-> FStar.Pervasives.Lemma
(ensures a * (Prims.pow2 256 - Spec.K256.PointOps.q) < Prims.pow2 (p + 129)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims.nat",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"FStar.Math.Lemmas.pow2_plus",
"Prims.unit",
"FStar.Math.Lemmas.lemma_mult_lt_left",
"Prims.op_Subtraction",
"Spec.K256.PointOps.q",
"FStar.Pervasives.assert_norm",
"FStar.Math.Lemmas.lemma_mult_lt_right"
] | [] | true | false | true | false | false | let mul_pow2_256_minus_q_lt_lemma p a =
| Math.Lemmas.lemma_mult_lt_right (pow2 256 - S.q) a (pow2 p);
assert_norm (pow2 256 - S.q < pow2 129);
Math.Lemmas.lemma_mult_lt_left (pow2 p) (pow2 256 - S.q) (pow2 129);
Math.Lemmas.pow2_plus p 129 | false |
Hacl.Spec.Chacha20.Equiv.fst | Hacl.Spec.Chacha20.Equiv.encrypt_block_lemma_bs_i | val encrypt_block_lemma_bs_i:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter{c0 + w <= max_size_t}
-> c:counter{w * c <= max_size_t}
-> b_v:blocks w
-> j:nat{j < w * blocksize} ->
Lemma
(let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
Math.Lemmas.cancel_mul_div w bl... | val encrypt_block_lemma_bs_i:
#w:lanes
-> k:key
-> n:nonce
-> c0:counter{c0 + w <= max_size_t}
-> c:counter{w * c <= max_size_t}
-> b_v:blocks w
-> j:nat{j < w * blocksize} ->
Lemma
(let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
Math.Lemmas.cancel_mul_div w bl... | let encrypt_block_lemma_bs_i #w k n c0 c b_v j =
let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
Math.Lemmas.cancel_mul_div w blocksize;
let b = SeqLemmas.get_block_s #uint8 #(w * blocksize) blocksize b_v j in
encrypt_block_lemma_st0_i #w st_v0 c b_v j;
div_mul_lt blocksize j... | {
"file_name": "code/chacha20/Hacl.Spec.Chacha20.Equiv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 60,
"end_line": 548,
"start_col": 0,
"start_line": 541
} | module Hacl.Spec.Chacha20.Equiv
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Lib.IntVector
module Scalar = Spec.Chacha20
module Lemmas = Hacl.Spec.Chacha20.Lemmas
module VecLemmas = Lib.Vec.Lemmas
module SeqLemmas = Lib.Sequence.Lemmas
open Hacl.Spec.Chacha20.Vec
#reset-options "--... | {
"checked_file": "/",
"dependencies": [
"Spec.Chacha20.fst.checked",
"prims.fst.checked",
"Lib.Vec.Lemmas.fsti.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntVector.fsti.checked",
"Lib.IntTypes.fsti.checked",
... | [
{
"abbrev": false,
"full_module": "Hacl.Spec.Chacha20.Vec",
"short_module": null
},
{
"abbrev": true,
"full_module": "Lib.Sequence.Lemmas",
"short_module": "SeqLemmas"
},
{
"abbrev": true,
"full_module": "Lib.Vec.Lemmas",
"short_module": "VecLemmas"
},
{
"abbrev":... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
k: Hacl.Spec.Chacha20.Vec.key ->
n: Hacl.Spec.Chacha20.Vec.nonce ->
c0: Hacl.Spec.Chacha20.Vec.counter{c0 + w <= Lib.IntTypes.max_size_t} ->
c: Hacl.Spec.Chacha20.Vec.counter{w * c <= Lib.IntTypes.max_size_t} ->
b_v: Hacl.Spec.Chacha20.Vec.blocks w ->
j: Prims.nat{j < w * Hacl.Spec.Chacha20.Equ... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Chacha20.Vec.lanes",
"Hacl.Spec.Chacha20.Vec.key",
"Hacl.Spec.Chacha20.Vec.nonce",
"Hacl.Spec.Chacha20.Vec.counter",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Lib.IntTypes.max_size_t",
"FStar.Mul.op_Star",
"Hacl.Spec.Chacha20.Vec.blocks",
"Prims.nat",
"Prims.op_... | [] | true | false | true | false | false | let encrypt_block_lemma_bs_i #w k n c0 c b_v j =
| let st_v0 = chacha20_init #w k n c0 in
let st0 = Scalar.chacha20_init k n c0 in
Math.Lemmas.cancel_mul_div w blocksize;
let b = SeqLemmas.get_block_s #uint8 #(w * blocksize) blocksize b_v j in
encrypt_block_lemma_st0_i #w st_v0 c b_v j;
div_mul_lt blocksize j w;
encrypt_block_scalar_lemma_i #w k n c0 c b (j / blocksize... | false |
Vale.PPC64LE.QuickCodes.fst | Vale.PPC64LE.QuickCodes.qWhile_proof_rec | val qWhile_proof_rec
(#a #d: Type)
(#c: code)
(b: cmp)
(qc: (a -> quickCode a c))
(mods: mods_t)
(inv: (state -> a -> Type0))
(dec: (state -> a -> d))
(s0 s1: state)
(g1: a)
(f1: fuel)
(k: (state -> a -> Type0))
: Ghost (state & va_fuel & a)
(r... | val qWhile_proof_rec
(#a #d: Type)
(#c: code)
(b: cmp)
(qc: (a -> quickCode a c))
(mods: mods_t)
(inv: (state -> a -> Type0))
(dec: (state -> a -> d))
(s0 s1: state)
(g1: a)
(f1: fuel)
(k: (state -> a -> Type0))
: Ghost (state & va_fuel & a)
(r... | let rec qWhile_proof_rec
(#a #d:Type) (#c:code) (b:cmp) (qc:a -> quickCode a c) (mods:mods_t) (inv:state -> a -> Type0)
(dec:state -> a -> d) (s0 s1:state) (g1:a) (f1:fuel) (k:state -> a -> Type0)
: Ghost (state & va_fuel & a)
(requires
state_inv s1 /\
wp_While b qc mods inv dec g1 s1 k /\
eval_... | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.QuickCodes.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 312,
"start_col": 0,
"start_line": 278
} | module Vale.PPC64LE.QuickCodes
open FStar.Mul
open FStar.Range
open Vale.Arch.HeapImpl
module Map16 = Vale.Lib.Map16
friend Vale.PPC64LE.Stack_Sems
#reset-options "--initial_ifuel 1 --z3rlimit 30"
let lemma_label_Type0 (r:range) (msg:string) (p:Type0) : Lemma
(requires True) (ensures label r msg p ==> p)
= ()
le... | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Stack_Sems.fst.checked",
"Vale.Lib.Map16.fsti.checked",
"Vale.Arch.HeapImpl.fsti.checked",
"prims.fst.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.ch... | [
{
"abbrev": false,
"full_module": "FStar.Monotonic.Pure",
"short_module": null
},
{
"abbrev": true,
"full_module": "Vale.Lib.Map16",
"short_module": "Map16"
},
{
"abbrev": false,
"full_module": "Vale.Arch.HeapImpl",
"short_module": null
},
{
"abbrev": false,
"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b: Vale.PPC64LE.QuickCodes.cmp ->
qc: (_: a -> Vale.PPC64LE.QuickCode.quickCode a c) ->
mods: Vale.PPC64LE.QuickCode.mods_t ->
inv: (_: Vale.PPC64LE.State.state -> _: a -> Type0) ->
dec: (_: Vale.PPC64LE.State.state -> _: a -> d) ->
s0: Vale.PPC64LE.State.state ->
s1: Vale.PPC64LE.State.sta... | Prims.Ghost | [
""
] | [] | [
"Vale.PPC64LE.QuickCodes.code",
"Vale.PPC64LE.QuickCodes.cmp",
"Vale.PPC64LE.QuickCode.quickCode",
"Vale.PPC64LE.QuickCode.mods_t",
"Vale.PPC64LE.State.state",
"Vale.PPC64LE.QuickCodes.fuel",
"Vale.PPC64LE.QuickCodes.eval_cmp",
"Vale.PPC64LE.Decls.va_state",
"Vale.PPC64LE.Decls.va_fuel",
"Vale.PPC... | [
"recursion"
] | false | false | false | false | false | let rec qWhile_proof_rec
(#a #d: Type)
(#c: code)
(b: cmp)
(qc: (a -> quickCode a c))
(mods: mods_t)
(inv: (state -> a -> Type0))
(dec: (state -> a -> d))
(s0 s1: state)
(g1: a)
(f1: fuel)
(k: (state -> a -> Type0))
: Ghost (state & va_fuel & a)
... | let ob = cmp_to_ocmp b in
let s1' = { s1 with cr0 = eval_cmp_cr0 s1 (cmp_to_ocmp b) } in
update_state_mods_to mods s1' s1;
update_state_mods_trans mods s0 s1 s1';
if eval_cmp s1 b
then
(let inv2 = wp_While_inv qc mods inv dec s1 g1 in
let wp = QProc?.wp (qc g1) in
let s2, f2 = va_lemma_whileTrue_total ob c s0... | false |
Hacl.Spec.K256.Scalar.Lemmas.fst | Hacl.Spec.K256.Scalar.Lemmas.mod_short_lseq_lemma_aux | val mod_short_lseq_lemma_aux: a:qelem_lseq -> out:qelem_lseq -> c:BB.carry U64 -> Lemma
(requires v c * pow2 256 + SD.bn_v out = SD.bn_v a + pow2 256 - S.q)
(ensures SD.bn_v (map2 (BB.mask_select (u64 0 -. c)) out a) == SD.bn_v a % S.q) | val mod_short_lseq_lemma_aux: a:qelem_lseq -> out:qelem_lseq -> c:BB.carry U64 -> Lemma
(requires v c * pow2 256 + SD.bn_v out = SD.bn_v a + pow2 256 - S.q)
(ensures SD.bn_v (map2 (BB.mask_select (u64 0 -. c)) out a) == SD.bn_v a % S.q) | let mod_short_lseq_lemma_aux a out c =
assert_norm (pow2 256 - S.q < S.q);
let mask = u64 0 -. c in
let out1 = map2 (BB.mask_select mask) out a in
assert (v mask = (if v c = 0 then 0 else ones_v U64));
BB.lseq_mask_select_lemma out a mask;
assert (out1 == (if v c = 0 then a else out));
SD.bn_eval_bound ... | {
"file_name": "code/k256/Hacl.Spec.K256.Scalar.Lemmas.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 48,
"end_line": 142,
"start_col": 0,
"start_line": 120
} | module Hacl.Spec.K256.Scalar.Lemmas
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Lib.ByteSequence
open Hacl.Spec.K256.Scalar
module S = Spec.K256
module SD = Hacl.Spec.Bignum.Definitions
module SB = Hacl.Spec.Bignum
module BB = Hacl.Spec.Bignum.Base
#set-options "--z3rlimit 50 --fuel 0 --ifuel 0"
val ... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.K256.Scalar.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.Base.fs... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Base",
"short_module": "BB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SB"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
a: Hacl.Spec.K256.Scalar.qelem_lseq ->
out: Hacl.Spec.K256.Scalar.qelem_lseq ->
c: Hacl.Spec.Bignum.Base.carry Lib.IntTypes.U64
-> FStar.Pervasives.Lemma
(requires
Lib.IntTypes.v c * Prims.pow2 256 + Hacl.Spec.Bignum.Definitions.bn_v out =
Hacl.Spec.Bignum.Definitions.bn_v a + Prims... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.K256.Scalar.qelem_lseq",
"Hacl.Spec.Bignum.Base.carry",
"Lib.IntTypes.U64",
"Prims.op_LessThan",
"Hacl.Spec.Bignum.Definitions.bn_v",
"Spec.K256.PointOps.q",
"FStar.Math.Lemmas.small_mod",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Prims.nat",
"Prims.bool",
"Prims.int",
"Prims... | [] | false | false | true | false | false | let mod_short_lseq_lemma_aux a out c =
| assert_norm (pow2 256 - S.q < S.q);
let mask = u64 0 -. c in
let out1 = map2 (BB.mask_select mask) out a in
assert (v mask = (if v c = 0 then 0 else ones_v U64));
BB.lseq_mask_select_lemma out a mask;
assert (out1 == (if v c = 0 then a else out));
SD.bn_eval_bound a 4;
SD.bn_eval_bound out 4;
lemma_check_overflow (SD.b... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.