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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Hacl.SHA2.Scalar32.fst | Hacl.SHA2.Scalar32.sha224_update_nblocks | val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 | val sha224_update_nblocks: update_nblocks_vec_t' SHA2_224 M32 | let sha224_update_nblocks len b st =
let h0 = ST.get () in
Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len (as_seq_multi h0 b) (as_seq h0 st);
sha256_update_nblocks len b st | {
"file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 46,
"start_col": 0,
"start_line": 43
} | module Hacl.SHA2.Scalar32
open FStar.HyperStack.ST
module ST = FStar.HyperStack.ST
open Lib.IntTypes
open Lib.NTuple
open Lib.Buffer
open Lib.MultiBuffer
open Spec.Hash.Definitions
open Spec.Agile.Hash
open Hacl.Spec.SHA2.Vec
module SpecVec = Hacl.Spec.SHA2.Vec
open Hacl.Impl.SHA2.Generic
// This module only conta... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NTuple.fsti.checked",
"Lib.MultiBuffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.... | [
{
"abbrev": false,
"full_module": "Hacl.Impl.SHA2.Generic",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": "SpecVec"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": null
},
{
"abbrev": fals... | {
"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 | Hacl.Impl.SHA2.Generic.update_nblocks_vec_t' Spec.Hash.Definitions.SHA2_224 Hacl.Spec.SHA2.Vec.M32 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Lib.MultiBuffer.multibuf",
"Hacl.Spec.SHA2.Vec.lanes",
"Spec.Hash.Definitions.SHA2_224",
"Hacl.Spec.SHA2.Vec.M32",
"Hacl.Impl.SHA2.Core.state_t",
"Hacl.SHA2.Scalar32.sha256_update_nblocks",
"Prims.unit",
"Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256",
"Li... | [] | false | false | false | true | false | let sha224_update_nblocks len b st =
| let h0 = ST.get () in
Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_224_256 len
(as_seq_multi h0 b)
(as_seq h0 st);
sha256_update_nblocks len b st | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.skey_len_pre | val skey_len_pre : t: Hacl.Spec.Bignum.Definitions.limb_t ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat
-> Prims.logical | let skey_len_pre (t:limb_t) (modBits:size_nat) (eBits:size_nat) (dBits:size_nat) =
let bits = bits t in
pkey_len_pre t modBits eBits /\
0 < dBits /\ bits * blocks dBits bits <= max_size_t /\
2 * blocks modBits bits + blocks eBits bits + blocks dBits bits <= max_size_t | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 79,
"end_line": 107,
"start_col": 0,
"start_line": 103
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
t: Hacl.Spec.Bignum.Definitions.limb_t ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat
-> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Prims.l_and",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.op_LessThanOrEqual",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.max_size_t",
"Prims.op_Addition",
"Prims.int",... | [] | false | false | false | true | true | let skey_len_pre (t: limb_t) (modBits eBits dBits: size_nat) =
| let bits = bits t in
pkey_len_pre t modBits eBits /\ 0 < dBits /\ bits * blocks dBits bits <= max_size_t /\
2 * blocks modBits bits + blocks eBits bits + blocks dBits bits <= max_size_t | false | |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.bn_lt_pow2 | val bn_lt_pow2: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> bool | val bn_lt_pow2: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> bool | let bn_lt_pow2 #t modBits m =
if (modBits - 1) % 8 <> 0 then true
else BB.unsafe_bool_of_limb0 (bn_get_ith_bit m (modBits - 1)) | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 63,
"end_line": 33,
"start_col": 0,
"start_line": 31
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_pos{1 < modBits} ->
m:
Hacl.Spec.Bignum.Definitions.lbignum t
(Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t))
-> Prims.bool | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_pos",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"Prims.op_disEquality",
"Prims.int",
"Prims.op_Modulus",
"Prims.op_Subtraction",
"Prims.bool",
... | [] | false | false | false | false | false | let bn_lt_pow2 #t modBits m =
| if (modBits - 1) % 8 <> 0 then true else BB.unsafe_bool_of_limb0 (bn_get_ith_bit m (modBits - 1)) | false |
Hacl.SHA2.Scalar32.fst | Hacl.SHA2.Scalar32.sha384_update_nblocks | val sha384_update_nblocks: update_nblocks_vec_t' SHA2_384 M32 | val sha384_update_nblocks: update_nblocks_vec_t' SHA2_384 M32 | let sha384_update_nblocks len b st =
let h0 = ST.get () in
Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_384_512 len (as_seq_multi h0 b) (as_seq h0 st);
sha512_update_nblocks len b st | {
"file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 85,
"start_col": 0,
"start_line": 82
} | module Hacl.SHA2.Scalar32
open FStar.HyperStack.ST
module ST = FStar.HyperStack.ST
open Lib.IntTypes
open Lib.NTuple
open Lib.Buffer
open Lib.MultiBuffer
open Spec.Hash.Definitions
open Spec.Agile.Hash
open Hacl.Spec.SHA2.Vec
module SpecVec = Hacl.Spec.SHA2.Vec
open Hacl.Impl.SHA2.Generic
// This module only conta... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NTuple.fsti.checked",
"Lib.MultiBuffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.... | [
{
"abbrev": false,
"full_module": "Hacl.Impl.SHA2.Generic",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": "SpecVec"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": null
},
{
"abbrev": fals... | {
"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 | Hacl.Impl.SHA2.Generic.update_nblocks_vec_t' Spec.Hash.Definitions.SHA2_384 Hacl.Spec.SHA2.Vec.M32 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_t",
"Lib.MultiBuffer.multibuf",
"Hacl.Spec.SHA2.Vec.lanes",
"Spec.Hash.Definitions.SHA2_384",
"Hacl.Spec.SHA2.Vec.M32",
"Hacl.Impl.SHA2.Core.state_t",
"Hacl.SHA2.Scalar32.sha512_update_nblocks",
"Prims.unit",
"Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_384_512",
"Li... | [] | false | false | false | true | false | let sha384_update_nblocks len b st =
| let h0 = ST.get () in
Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_nblocks_vec_384_512 len
(as_seq_multi h0 b)
(as_seq h0 st);
sha512_update_nblocks len b st | false |
Hacl.SHA2.Scalar32.fst | Hacl.SHA2.Scalar32.finish | val finish: #a:sha2_alg -> finish_vec_t a Hacl.Spec.SHA2.Vec.M32 | val finish: #a:sha2_alg -> finish_vec_t a Hacl.Spec.SHA2.Vec.M32 | let finish #a =
match a with
| SHA2_224 -> coerce sha224_finish
| SHA2_256 -> coerce sha256_finish
| SHA2_384 -> coerce sha384_finish
| SHA2_512 -> coerce sha512_finish | {
"file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 138,
"start_col": 0,
"start_line": 133
} | module Hacl.SHA2.Scalar32
open FStar.HyperStack.ST
module ST = FStar.HyperStack.ST
open Lib.IntTypes
open Lib.NTuple
open Lib.Buffer
open Lib.MultiBuffer
open Spec.Hash.Definitions
open Spec.Agile.Hash
open Hacl.Spec.SHA2.Vec
module SpecVec = Hacl.Spec.SHA2.Vec
open Hacl.Impl.SHA2.Generic
// This module only conta... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NTuple.fsti.checked",
"Lib.MultiBuffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.... | [
{
"abbrev": false,
"full_module": "Hacl.Impl.SHA2.Generic",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": "SpecVec"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": null
},
{
"abbrev": fals... | {
"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 | Hacl.Impl.SHA2.Generic.finish_vec_t a Hacl.Spec.SHA2.Vec.M32 | Prims.Tot | [
"total"
] | [] | [
"Spec.Hash.Definitions.sha2_alg",
"Hacl.SHA2.Scalar32.coerce",
"Hacl.Impl.SHA2.Generic.finish_vec_t",
"Hacl.Spec.SHA2.Vec.M32",
"Spec.Hash.Definitions.SHA2_224",
"Hacl.SHA2.Scalar32.sha224_finish",
"Spec.Hash.Definitions.SHA2_256",
"Hacl.SHA2.Scalar32.sha256_finish",
"Spec.Hash.Definitions.SHA2_384"... | [] | false | false | false | false | false | let finish #a =
| match a with
| SHA2_224 -> coerce sha224_finish
| SHA2_256 -> coerce sha256_finish
| SHA2_384 -> coerce sha384_finish
| SHA2_512 -> coerce sha512_finish | false |
Hacl.SHA2.Scalar32.fst | Hacl.SHA2.Scalar32.update_last | val update_last: #a:sha2_alg -> update_last_vec_t' a Hacl.Spec.SHA2.Vec.M32 | val update_last: #a:sha2_alg -> update_last_vec_t' a Hacl.Spec.SHA2.Vec.M32 | let update_last #a =
match a with
| SHA2_224 -> coerce sha224_update_last
| SHA2_256 -> coerce sha256_update_last
| SHA2_384 -> coerce sha384_update_last
| SHA2_512 -> coerce sha512_update_last | {
"file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 41,
"end_line": 129,
"start_col": 0,
"start_line": 124
} | module Hacl.SHA2.Scalar32
open FStar.HyperStack.ST
module ST = FStar.HyperStack.ST
open Lib.IntTypes
open Lib.NTuple
open Lib.Buffer
open Lib.MultiBuffer
open Spec.Hash.Definitions
open Spec.Agile.Hash
open Hacl.Spec.SHA2.Vec
module SpecVec = Hacl.Spec.SHA2.Vec
open Hacl.Impl.SHA2.Generic
// This module only conta... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NTuple.fsti.checked",
"Lib.MultiBuffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.... | [
{
"abbrev": false,
"full_module": "Hacl.Impl.SHA2.Generic",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": "SpecVec"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": null
},
{
"abbrev": fals... | {
"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 | Hacl.Impl.SHA2.Generic.update_last_vec_t' a Hacl.Spec.SHA2.Vec.M32 | Prims.Tot | [
"total"
] | [] | [
"Spec.Hash.Definitions.sha2_alg",
"Hacl.SHA2.Scalar32.coerce",
"Hacl.Impl.SHA2.Generic.update_last_vec_t'",
"Hacl.Spec.SHA2.Vec.M32",
"Spec.Hash.Definitions.SHA2_224",
"Hacl.SHA2.Scalar32.sha224_update_last",
"Spec.Hash.Definitions.SHA2_256",
"Hacl.SHA2.Scalar32.sha256_update_last",
"Spec.Hash.Defin... | [] | false | false | false | false | false | let update_last #a =
| match a with
| SHA2_224 -> coerce sha224_update_last
| SHA2_256 -> coerce sha256_update_last
| SHA2_384 -> coerce sha384_update_last
| SHA2_512 -> coerce sha512_update_last | false |
Hacl.SHA2.Scalar32.fst | Hacl.SHA2.Scalar32.sha384_update | val sha384_update: update_vec_t SHA2_384 M32 | val sha384_update: update_vec_t SHA2_384 M32 | let sha384_update b st =
let open Hacl.SHA2.Scalar32.Lemmas in
let h0 = ST.get () in
Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_384_512 (as_seq_multi h0 b) (as_seq h0 st);
sha512_update b st | {
"file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 20,
"end_line": 78,
"start_col": 0,
"start_line": 74
} | module Hacl.SHA2.Scalar32
open FStar.HyperStack.ST
module ST = FStar.HyperStack.ST
open Lib.IntTypes
open Lib.NTuple
open Lib.Buffer
open Lib.MultiBuffer
open Spec.Hash.Definitions
open Spec.Agile.Hash
open Hacl.Spec.SHA2.Vec
module SpecVec = Hacl.Spec.SHA2.Vec
open Hacl.Impl.SHA2.Generic
// This module only conta... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NTuple.fsti.checked",
"Lib.MultiBuffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.... | [
{
"abbrev": false,
"full_module": "Hacl.Impl.SHA2.Generic",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": "SpecVec"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": null
},
{
"abbrev": fals... | {
"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 | Hacl.Impl.SHA2.Generic.update_vec_t Spec.Hash.Definitions.SHA2_384 Hacl.Spec.SHA2.Vec.M32 | Prims.Tot | [
"total"
] | [] | [
"Lib.MultiBuffer.multibuf",
"Hacl.Spec.SHA2.Vec.lanes",
"Spec.Hash.Definitions.SHA2_384",
"Hacl.Spec.SHA2.Vec.M32",
"Hacl.Hash.Definitions.block_len",
"Hacl.Impl.SHA2.Core.state_t",
"Hacl.SHA2.Scalar32.sha512_update",
"Prims.unit",
"Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_384_512",
"Lib.Mu... | [] | false | false | false | true | false | let sha384_update b st =
| let open Hacl.SHA2.Scalar32.Lemmas in
let h0 = ST.get () in
Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_vec_384_512 (as_seq_multi h0 b) (as_seq h0 st);
sha512_update b st | false |
Hacl.SHA2.Scalar32.fst | Hacl.SHA2.Scalar32.sha384_update_last | val sha384_update_last: update_last_vec_t' SHA2_384 M32 | val sha384_update_last: update_last_vec_t' SHA2_384 M32 | let sha384_update_last totlen len b st =
let open Lib.Sequence in
let h0 = ST.get () in
Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_384_512
totlen len (as_seq_multi h0 b) (as_seq h0 st);
sha512_update_last totlen len b st | {
"file_name": "code/sha2-mb/Hacl.SHA2.Scalar32.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 94,
"start_col": 0,
"start_line": 89
} | module Hacl.SHA2.Scalar32
open FStar.HyperStack.ST
module ST = FStar.HyperStack.ST
open Lib.IntTypes
open Lib.NTuple
open Lib.Buffer
open Lib.MultiBuffer
open Spec.Hash.Definitions
open Spec.Agile.Hash
open Hacl.Spec.SHA2.Vec
module SpecVec = Hacl.Spec.SHA2.Vec
open Hacl.Impl.SHA2.Generic
// This module only conta... | {
"checked_file": "/",
"dependencies": [
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NTuple.fsti.checked",
"Lib.MultiBuffer.fst.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.... | [
{
"abbrev": false,
"full_module": "Hacl.Impl.SHA2.Generic",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": "SpecVec"
},
{
"abbrev": false,
"full_module": "Hacl.Spec.SHA2.Vec",
"short_module": null
},
{
"abbrev": fals... | {
"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 | Hacl.Impl.SHA2.Generic.update_last_vec_t' Spec.Hash.Definitions.SHA2_384 Hacl.Spec.SHA2.Vec.M32 | Prims.Tot | [
"total"
] | [] | [
"Spec.Hash.Definitions.len_t",
"Spec.Hash.Definitions.SHA2_384",
"Lib.IntTypes.size_t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Spec.Hash.Definitions.block_length",
"Lib.MultiBuffer.multibuf",
"Hacl.Spec.SHA2.Vec.lanes",
"Hacl.Spec.SH... | [] | false | false | false | true | false | let sha384_update_last totlen len b st =
| let open Lib.Sequence in
let h0 = ST.get () in
Hacl.SHA2.Scalar32.Lemmas.lemma_spec_update_last_vec_384_512 totlen
len
(as_seq_multi h0 b)
(as_seq h0 st);
sha512_update_last totlen len b st | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.bn_eval_sub | val bn_eval_sub: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> Lemma
(requires bn_v m < pow2 (8 * blocks (modBits - 1) 8))
(ensures bn_v m == bn_v (sub m 0 (blocks (blocks (modBits - 1) 8) (numbytes t)))) | val bn_eval_sub: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> Lemma
(requires bn_v m < pow2 (8 * blocks (modBits - 1) 8))
(ensures bn_v m == bn_v (sub m 0 (blocks (blocks (modBits - 1) 8) (numbytes t)))) | let bn_eval_sub #t modBits m =
let emLen = blocks (modBits - 1) 8 in
let mLen = blocks emLen (numbytes t) in
let nLen = blocks modBits (bits t) in
assert (bn_v m < pow2 (8 * emLen));
let m1 = sub m 0 mLen in
bn_eval_split_i m mLen;
assert (bn_v m == bn_v m1 + pow2 (bits t * mLen) * bn_v (slice m mLen nLen... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 92,
"start_col": 0,
"start_line": 82
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_pos{1 < modBits} ->
m:
Hacl.Spec.Bignum.Definitions.lbignum t
(Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t))
-> FStar.Pervasives.Lemma
(requires
Hacl.Spec.Bignum.Definitions.bn_v m <
Prims.pow2 (8 * Hacl.Spec.Bignum.Definitio... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_pos",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"FStar.Math.Lemmas.pow2_le_compat",
"FStar.Mul.op_Star",
"Prims.unit",
"Prims._assert",
"Hacl.Sp... | [] | true | false | true | false | false | let bn_eval_sub #t modBits m =
| let emLen = blocks (modBits - 1) 8 in
let mLen = blocks emLen (numbytes t) in
let nLen = blocks modBits (bits t) in
assert (bn_v m < pow2 (8 * emLen));
let m1 = sub m 0 mLen in
bn_eval_split_i m mLen;
assert (bn_v m == bn_v m1 + pow2 (bits t * mLen) * bn_v (slice m mLen nLen));
bn_eval_bound m1 mLen;
assert (bn_v m1 < ... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_verify_pre | val rsapss_verify_pre:
a:Hash.hash_alg{S.hash_is_supported a}
-> sLen:size_nat //saltLen
-> msgLen:nat
-> msg:seq uint8{length msg == msgLen} -> Type0 | val rsapss_verify_pre:
a:Hash.hash_alg{S.hash_is_supported a}
-> sLen:size_nat //saltLen
-> msgLen:nat
-> msg:seq uint8{length msg == msgLen} -> Type0 | let rsapss_verify_pre a sLen msgLen msg =
sLen + Hash.hash_length a + 8 <= max_size_t /\
(sLen + Hash.hash_length a + 8) `less_than_max_input_length` a /\
msgLen `less_than_max_input_length` a | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 238,
"start_col": 0,
"start_line": 235
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
sLen: Lib.IntTypes.size_nat ->
msgLen: Prims.nat ->
msg: Lib.Sequence.seq Lib.IntTypes.uint8 {Lib.Sequence.length msg == msgLen}
-> Type0 | Prims.Tot | [
"total"
] | [] | [
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Prims.nat",
"Lib.Sequence.seq",
"Lib.IntTypes.uint8",
"Prims.eq2",
"Lib.Sequence.length",
"Prims.l_and",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"Spec.Hash.Definitions.hash_leng... | [] | false | false | false | false | true | let rsapss_verify_pre a sLen msgLen msg =
| sLen + Hash.hash_length a + 8 <= max_size_t /\
(sLen + Hash.hash_length a + 8) `less_than_max_input_length` a /\
msgLen `less_than_max_input_length` a | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_verify_post | val rsapss_verify_post:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sLen:size_nat //saltLen
-> sgnt:lseq uint8 (blocks modBits 8)
-> msgLen:nat
-> ms... | val rsapss_verify_post:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sLen:size_nat //saltLen
-> sgnt:lseq uint8 (blocks modBits 8)
-> msgLen:nat
-> ms... | let rsapss_verify_post #t a modBits eBits pkey sLen sgnt msgLen msg verify =
rsapss_verify_pre a sLen msgLen msg /\
rsapss_pkey_pre modBits eBits pkey /\
(let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = bn_v (sub pkey 0 nLen) in
let e = bn_v (sub pkey (nLen +... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 66,
"end_line": 263,
"start_col": 0,
"start_line": 253
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
pkey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntType... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
... | [] | false | false | false | false | true | let rsapss_verify_post #t a modBits eBits pkey sLen sgnt msgLen msg verify =
| rsapss_verify_pre a sLen msgLen msg /\ rsapss_pkey_pre modBits eBits pkey /\
(let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = bn_v (sub pkey 0 nLen) in
let e = bn_v (sub pkey (nLen + nLen) eLen) in
let pkeys:S.rsapss_pkey modBits = S.Mk_rsapss_pkey n e in
verif... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_verify_post1 | val rsapss_verify_post1:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sLen:size_nat //saltLen
-> k:size_nat
-> sgnt:lseq uint8 k
-> msgLen:nat
-> ms... | val rsapss_verify_post1:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sLen:size_nat //saltLen
-> k:size_nat
-> sgnt:lseq uint8 k
-> msgLen:nat
-> ms... | let rsapss_verify_post1 #t a modBits eBits pkey sLen k sgnt msgLen msg verify =
rsapss_pkey_pre modBits eBits pkey /\
(let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = bn_v (sub pkey 0 nLen) in
let e = bn_v (sub pkey (nLen + nLen) eLen) in
let pkeys : S.rsapss... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 67,
"end_line": 288,
"start_col": 0,
"start_line": 279
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
pkey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntType... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
... | [] | false | false | false | false | true | let rsapss_verify_post1 #t a modBits eBits pkey sLen k sgnt msgLen msg verify =
| rsapss_pkey_pre modBits eBits pkey /\
(let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = bn_v (sub pkey 0 nLen) in
let e = bn_v (sub pkey (nLen + nLen) eLen) in
let pkeys:S.rsapss_pkey modBits = S.Mk_rsapss_pkey n e in
verify == S.rsapss_verify a modBits pkeys sL... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_sign_post1 | val rsapss_sign_post1:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> sLen:size_nat
-> salt:lseq uint8 sLe... | val rsapss_sign_post1:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> sLen:size_nat
-> salt:lseq uint8 sLe... | let rsapss_sign_post1 #t a modBits eBits dBits skey sLen salt msgLen msg eq_m sgnt =
rsapss_skey_pre modBits eBits dBits skey /\
(let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let n = bn_v (sub skey 0 nLen) in
let e = bn_v (sub skey ... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 72,
"end_line": 226,
"start_col": 0,
"start_line": 213
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
skey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bign... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
... | [] | false | false | false | false | true | let rsapss_sign_post1 #t a modBits eBits dBits skey sLen salt msgLen msg eq_m sgnt =
| rsapss_skey_pre modBits eBits dBits skey /\
(let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let n = bn_v (sub skey 0 nLen) in
let e = bn_v (sub skey (nLen + nLen) eLen) in
let d = bn_v (sub skey (nLen + nLen + eLen) dLen) in
let pkeys... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.bn_lt_pow2_lemma | val bn_lt_pow2_lemma: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> Lemma
(requires bn_v m < pow2 modBits)
(ensures bn_lt_pow2 modBits m == (bn_v m < pow2 (8 * blocks (modBits - 1) 8))) | val bn_lt_pow2_lemma: #t:limb_t -> modBits:size_pos{1 < modBits} -> m:lbignum t (blocks modBits (bits t)) -> Lemma
(requires bn_v m < pow2 modBits)
(ensures bn_lt_pow2 modBits m == (bn_v m < pow2 (8 * blocks (modBits - 1) 8))) | let bn_lt_pow2_lemma #t modBits m =
let k = blocks modBits 8 in
let emLen = blocks (modBits - 1) 8 in
let nLen = blocks k (numbytes t) in
assert (nLen == blocks modBits (bits t));
if (modBits - 1) % 8 <> 0 then Math.Lemmas.pow2_le_compat (8 * emLen) modBits
else begin
assert (k == emLen + 1);
bn_ev... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 44,
"end_line": 75,
"start_col": 0,
"start_line": 61
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_pos{1 < modBits} ->
m:
Hacl.Spec.Bignum.Definitions.lbignum t
(Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t))
-> FStar.Pervasives.Lemma (requires Hacl.Spec.Bignum.Definitions.bn_v m < Prims.pow2 modBits)
(ensures
Hacl.Spec.RSAPSS.bn_l... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_pos",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"Prims.op_disEquality",
"Prims.int",
"Prims.op_Modulus",
"Prims.op_Subtraction",
"FStar.Math.Lem... | [] | false | false | true | false | false | let bn_lt_pow2_lemma #t modBits m =
| let k = blocks modBits 8 in
let emLen = blocks (modBits - 1) 8 in
let nLen = blocks k (numbytes t) in
assert (nLen == blocks modBits (bits t));
if (modBits - 1) % 8 <> 0
then Math.Lemmas.pow2_le_compat (8 * emLen) modBits
else
(assert (k == emLen + 1);
bn_eval_unfold_i m nLen;
assert (8 * k == modBits + 7);
... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_pkey_pre | val rsapss_pkey_pre:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t)) -> Type0 | val rsapss_pkey_pre:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t)) -> Type0 | let rsapss_pkey_pre #t modBits eBits pkey =
let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = sub pkey 0 nLen in
let r2 = sub pkey nLen nLen in
let e = sub pkey (nLen + nLen) eLen in
r2 == SM.bn_precomp_r2_mod_n (modBits - 1) n /\
bn_v n % 2 = 1 /\
pow2 (... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 35,
"end_line": 127,
"start_col": 0,
"start_line": 116
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
pkey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t) +
Hacl.Spec.Bignum.Definitions.blocks eBits (Lib.IntTy... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"Prims.l_and",
"Prims.eq2",
"Lib.Sequence.lseq",
"Hacl.... | [] | false | false | false | false | true | let rsapss_pkey_pre #t modBits eBits pkey =
| let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = sub pkey 0 nLen in
let r2 = sub pkey nLen nLen in
let e = sub pkey (nLen + nLen) eLen in
r2 == SM.bn_precomp_r2_mod_n (modBits - 1) n /\ bn_v n % 2 = 1 /\ pow2 (modBits - 1) < bn_v n /\
bn_v n < pow2 modBits /\ 0 < bn_v e /\ ... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.bn_eval_lt_pow2_modBits | val bn_eval_lt_pow2_modBits:
#t:limb_t
-> modBits:size_pos{1 < modBits}
-> m:lbignum t (blocks modBits (bits t)) -> Lemma
(requires bn_v m < pow2 modBits)
(ensures bn_v m == (bn_v m / pow2 (modBits - 1) % 2) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1)) | val bn_eval_lt_pow2_modBits:
#t:limb_t
-> modBits:size_pos{1 < modBits}
-> m:lbignum t (blocks modBits (bits t)) -> Lemma
(requires bn_v m < pow2 modBits)
(ensures bn_v m == (bn_v m / pow2 (modBits - 1) % 2) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1)) | let bn_eval_lt_pow2_modBits #t modBits m =
calc (==) {
bn_v m;
(==) { Math.Lemmas.euclidean_division_definition (bn_v m) (pow2 (modBits - 1)) }
bn_v m / pow2 (modBits - 1) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1);
(==) { Math.Lemmas.euclidean_division_definition (bn_v m / pow2 (modBits - 1))... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 5,
"end_line": 54,
"start_col": 0,
"start_line": 43
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_pos{1 < modBits} ->
m:
Hacl.Spec.Bignum.Definitions.lbignum t
(Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t))
-> FStar.Pervasives.Lemma (requires Hacl.Spec.Bignum.Definitions.bn_v m < Prims.pow2 modBits)
(ensures
Hacl.Spec.Bignum.Defi... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_pos",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"FStar.Calc.calc_finish",
"Prims.nat",
"Prims.eq2",
"Hacl.Spec.Bignum.Definitions.bn_v",
"Prims.... | [] | false | false | true | false | false | let bn_eval_lt_pow2_modBits #t modBits m =
| calc ( == ) {
bn_v m;
( == ) { Math.Lemmas.euclidean_division_definition (bn_v m) (pow2 (modBits - 1)) }
(bn_v m / pow2 (modBits - 1)) * pow2 (modBits - 1) + bn_v m % pow2 (modBits - 1);
( == ) { Math.Lemmas.euclidean_division_definition (bn_v m / pow2 (modBits - 1)) 2 }
((bn_v m / pow2 (modBits - 1) / 2) * 2... | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.igsub_inj | val igsub_inj : b1:
LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable_preorder a) ->
b2:
LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable... | let igsub_inj (#a:Type0) = mgsub_inj #a #(immutable_preorder a) #(immutable_preorder a) (immutable_preorder a) (immutable_preorder a) | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 140,
"end_line": 36,
"start_col": 7,
"start_line": 36
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b1:
LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable_preorder a) ->
b2:
LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable_preorder a... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowStar.Monotonic.Buffer.mgsub_inj",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.Monotonic.Buffer.mbuffer",
"FStar.UInt32.t",
"Prims.unit",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"FStar.UInt32.v",
"LowStar.Monotonic.Buffer.length",
"Prims.op_Eq... | [] | true | false | true | false | false | let igsub_inj (#a: Type0) =
| mgsub_inj #a
#(immutable_preorder a)
#(immutable_preorder a)
(immutable_preorder a)
(immutable_preorder a) | false | |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_sign_post | val rsapss_sign_post:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> sLen:size_nat
-> salt:lseq uint8 sLen... | val rsapss_sign_post:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> sLen:size_nat
-> salt:lseq uint8 sLen... | let rsapss_sign_post #t a modBits eBits dBits skey sLen salt msgLen msg eq_m sgnt =
rsapss_sign_pre a modBits sLen salt msgLen msg /\
rsapss_skey_pre modBits eBits dBits skey /\
(let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let n = ... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 35,
"end_line": 196,
"start_col": 0,
"start_line": 182
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
skey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bign... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
... | [] | false | false | false | false | true | let rsapss_sign_post #t a modBits eBits dBits skey sLen salt msgLen msg eq_m sgnt =
| rsapss_sign_pre a modBits sLen salt msgLen msg /\ rsapss_skey_pre modBits eBits dBits skey /\
(let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let n = bn_v (sub skey 0 nLen) in
let e = bn_v (sub skey (nLen + nLen) eLen) in
let d = bn_v (... | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.inull | val inull (#a: Type0) : ibuffer a | val inull (#a: Type0) : ibuffer a | let inull (#a:Type0) :ibuffer a = mnull #a #(immutable_preorder a) #(immutable_preorder a) | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 97,
"end_line": 32,
"start_col": 7,
"start_line": 32
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | LowStar.ImmutableBuffer.ibuffer a | Prims.Tot | [
"total"
] | [] | [
"LowStar.Monotonic.Buffer.mnull",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.ImmutableBuffer.ibuffer"
] | [] | false | false | false | true | false | let inull (#a: Type0) : ibuffer a =
| mnull #a #(immutable_preorder a) #(immutable_preorder a) | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.igsub | val igsub : b:
LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable_preorder a) ->
i: FStar.UInt32.t ->
len: FStar.UInt32.t
-> Prims.Ghost
(LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_pr... | let igsub (#a:Type0) = mgsub #a #(immutable_preorder a) #(immutable_preorder a) (immutable_preorder a) | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 109,
"end_line": 34,
"start_col": 7,
"start_line": 34
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b:
LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable_preorder a) ->
i: FStar.UInt32.t ->
len: FStar.UInt32.t
-> Prims.Ghost
(LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder ... | Prims.Ghost | [] | [] | [
"LowStar.Monotonic.Buffer.mgsub",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.Monotonic.Buffer.mbuffer",
"FStar.UInt32.t",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"FStar.UInt32.v",
"LowStar.Monotonic.Buffer.length",
"Prims.l_True"
] | [] | false | false | false | false | false | let igsub (#a: Type0) =
| mgsub #a #(immutable_preorder a) #(immutable_preorder a) (immutable_preorder a) | false | |
Steel.ST.MonotonicReference.fst | Steel.ST.MonotonicReference.ref | val ref (a:Type u#0) (p:Preorder.preorder a)
: Type u#0 | val ref (a:Type u#0) (p:Preorder.preorder a)
: Type u#0 | let ref (a:Type u#0) (p:Preorder.preorder a)
: Type u#0
= MR.ref a p | {
"file_name": "lib/steel/Steel.ST.MonotonicReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 14,
"end_line": 26,
"start_col": 0,
"start_line": 24
} | (*
Copyright 2020 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Coercions.fsti.checked",
"Steel.MonotonicReference.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"prims.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti... | [
{
"abbrev": true,
"full_module": "Steel.MonotonicReference",
"short_module": "MR"
},
{
"abbrev": true,
"full_module": "FStar.Preorder",
"short_module": "Preorder"
},
{
"abbrev": false,
"full_module": "Steel.ST.Coercions",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Type0 -> p: FStar.Preorder.preorder a -> Type0 | Prims.Tot | [
"total"
] | [] | [
"FStar.Preorder.preorder",
"Steel.MonotonicReference.ref"
] | [] | false | false | false | true | true | let ref (a: Type u#0) (p: Preorder.preorder a) : Type u#0 =
| MR.ref a p | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.isub | val isub : b:
LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable_preorder a) ->
i: FStar.UInt32.t ->
len: FStar.Ghost.erased FStar.UInt32.t
-> FStar.HyperStack.ST.Stack
(LowStar.Monotonic.Buffer.mbuffer a
(LowS... | let isub (#a:Type0) = msub #a #(immutable_preorder a) #(immutable_preorder a) (immutable_preorder a) | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 122,
"end_line": 44,
"start_col": 22,
"start_line": 44
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b:
LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable_preorder a) ->
i: FStar.UInt32.t ->
len: FStar.Ghost.erased FStar.UInt32.t
-> FStar.HyperStack.ST.Stack
(LowStar.Monotonic.Buffer.mbuffer a
(LowStar.Im... | FStar.HyperStack.ST.Stack | [] | [] | [
"LowStar.Monotonic.Buffer.msub",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.Monotonic.Buffer.mbuffer",
"FStar.UInt32.t",
"FStar.Ghost.erased",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"Prims.op_Addition",
"FStar.UInt32.v",
"FStar.Gho... | [] | false | true | false | false | false | let isub (#a: Type0) =
| msub #a #(immutable_preorder a) #(immutable_preorder a) (immutable_preorder a) | false | |
Steel.ST.MonotonicReference.fst | Steel.ST.MonotonicReference.witnessed | val witnessed (#a:Type u#0) (#p:Preorder.preorder a) (r:ref a p) (fact:property a)
: Type0 | val witnessed (#a:Type u#0) (#p:Preorder.preorder a) (r:ref a p) (fact:property a)
: Type0 | let witnessed (#a:Type u#0)
(#p:Preorder.preorder a)
(r:ref a p)
(fact:property a)
: Type0
= MR.witnessed r fact | {
"file_name": "lib/steel/Steel.ST.MonotonicReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 23,
"end_line": 55,
"start_col": 0,
"start_line": 50
} | (*
Copyright 2020 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Coercions.fsti.checked",
"Steel.MonotonicReference.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"prims.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti... | [
{
"abbrev": true,
"full_module": "Steel.MonotonicReference",
"short_module": "MR"
},
{
"abbrev": true,
"full_module": "FStar.Preorder",
"short_module": "Preorder"
},
{
"abbrev": false,
"full_module": "Steel.ST.Coercions",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.ST.MonotonicReference.ref a p -> fact: Steel.ST.MonotonicReference.property a -> Type0 | Prims.Tot | [
"total"
] | [] | [
"FStar.Preorder.preorder",
"Steel.ST.MonotonicReference.ref",
"Steel.ST.MonotonicReference.property",
"Steel.MonotonicReference.witnessed"
] | [] | false | false | false | false | true | let witnessed (#a: Type u#0) (#p: Preorder.preorder a) (r: ref a p) (fact: property a) : Type0 =
| MR.witnessed r fact | false |
Steel.ST.MonotonicReference.fst | Steel.ST.MonotonicReference.pts_to | val pts_to (#a:Type)
(#p:Preorder.preorder a)
(r:ref a p)
([@@@smt_fallback]f:perm)
([@@@smt_fallback]v:a)
: vprop | val pts_to (#a:Type)
(#p:Preorder.preorder a)
(r:ref a p)
([@@@smt_fallback]f:perm)
([@@@smt_fallback]v:a)
: vprop | let pts_to (#a:Type)
(#p:Preorder.preorder a)
(r:ref a p)
([@@@smt_fallback]f:perm)
([@@@smt_fallback]v:a)
: vprop
= MR.pts_to #a #p r f v | {
"file_name": "lib/steel/Steel.ST.MonotonicReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 26,
"end_line": 34,
"start_col": 0,
"start_line": 28
} | (*
Copyright 2020 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Coercions.fsti.checked",
"Steel.MonotonicReference.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"prims.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti... | [
{
"abbrev": true,
"full_module": "Steel.MonotonicReference",
"short_module": "MR"
},
{
"abbrev": true,
"full_module": "FStar.Preorder",
"short_module": "Preorder"
},
{
"abbrev": false,
"full_module": "Steel.ST.Coercions",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.ST.MonotonicReference.ref a p -> f: Steel.FractionalPermission.perm -> v: a
-> Steel.Effect.Common.vprop | Prims.Tot | [
"total"
] | [] | [
"FStar.Preorder.preorder",
"Steel.ST.MonotonicReference.ref",
"Steel.FractionalPermission.perm",
"Steel.MonotonicReference.pts_to",
"Steel.Effect.Common.vprop"
] | [] | false | false | false | false | false | let pts_to
(#a: Type)
(#p: Preorder.preorder a)
(r: ref a p)
([@@@ smt_fallback]f: perm)
([@@@ smt_fallback]v: a)
: vprop =
| MR.pts_to #a #p r f v | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.ioffset | val ioffset : b:
LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable_preorder a) ->
i: FStar.UInt32.t
-> FStar.HyperStack.ST.Stack
(LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
... | let ioffset (#a:Type0) = moffset #a #(immutable_preorder a) #(immutable_preorder a) (immutable_preorder a) | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 128,
"end_line": 46,
"start_col": 22,
"start_line": 46
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b:
LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable_preorder a) ->
i: FStar.UInt32.t
-> FStar.HyperStack.ST.Stack
(LowStar.Monotonic.Buffer.mbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(L... | FStar.HyperStack.ST.Stack | [] | [] | [
"LowStar.Monotonic.Buffer.moffset",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.Monotonic.Buffer.mbuffer",
"FStar.UInt32.t",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.b2t",
"Prims.op_LessThanOrEqual",
"FStar.UInt32.v",
"LowStar.Monotonic.Buffer.length",
"Prims.l_Forall",... | [] | false | true | false | false | false | let ioffset (#a: Type0) =
| moffset #a #(immutable_preorder a) #(immutable_preorder a) (immutable_preorder a) | false | |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_check_exponent | val rsapss_check_exponent: #t:limb_t -> eBits:size_pos -> e:lbignum t (blocks eBits (bits t)) ->
res:limb t{v res == (if (0 < bn_v e && bn_v e < pow2 eBits) then v (ones t SEC) else v (zeros t SEC))} | val rsapss_check_exponent: #t:limb_t -> eBits:size_pos -> e:lbignum t (blocks eBits (bits t)) ->
res:limb t{v res == (if (0 < bn_v e && bn_v e < pow2 eBits) then v (ones t SEC) else v (zeros t SEC))} | let rsapss_check_exponent #t eBits e =
let m0 = bn_is_zero_mask e in
bn_is_zero_mask_lemma e;
let m1 = bn_check_num_bits eBits e in
let m = (lognot m0) &. m1 in
lognot_lemma m0;
logand_lemma (lognot m0) m1;
m | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 780,
"start_col": 0,
"start_line": 773
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
eBits: Lib.IntTypes.size_pos ->
e:
Hacl.Spec.Bignum.Definitions.lbignum t
(Hacl.Spec.Bignum.Definitions.blocks eBits (Lib.IntTypes.bits t))
-> res:
Hacl.Spec.Bignum.Definitions.limb t
{ Lib.IntTypes.v res ==
(match
0 < Hacl.Spec.Bignum.Definitions.bn_v e &&
... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_pos",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"Prims.unit",
"Lib.IntTypes.logand_lemma",
"Lib.IntTypes.SEC",
"Lib.IntTypes.lognot",
"Lib.IntTypes.lognot_lemma",
"Lib.IntTypes.int... | [] | false | false | false | false | false | let rsapss_check_exponent #t eBits e =
| let m0 = bn_is_zero_mask e in
bn_is_zero_mask_lemma e;
let m1 = bn_check_num_bits eBits e in
let m = (lognot m0) &. m1 in
lognot_lemma m0;
logand_lemma (lognot m0) m1;
m | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.seq_eq | val seq_eq (s: Ghost.erased (Seq.seq 'a)) : spred 'a | val seq_eq (s: Ghost.erased (Seq.seq 'a)) : spred 'a | let seq_eq (s:Ghost.erased (Seq.seq 'a)) : spred 'a =
fun s' -> s' `Seq.equal` Ghost.reveal s | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 41,
"end_line": 58,
"start_col": 0,
"start_line": 57
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s: FStar.Ghost.erased (FStar.Seq.Base.seq 'a) -> LowStar.Monotonic.Buffer.spred 'a | Prims.Tot | [
"total"
] | [] | [
"FStar.Ghost.erased",
"FStar.Seq.Base.seq",
"FStar.Seq.Base.equal",
"FStar.Ghost.reveal",
"LowStar.Monotonic.Buffer.spred"
] | [] | false | false | false | true | false | let seq_eq (s: Ghost.erased (Seq.seq 'a)) : spred 'a =
| fun s' -> s' `Seq.equal` (Ghost.reveal s) | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_verify_compute_msg | val rsapss_verify_compute_msg:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sgnt:lseq uint8 (blocks modBits 8) ->
Pure (tuple2 bool (lbignum t (blocks modBits (bits t))))
(requires rsapss_pkey_pre... | val rsapss_verify_compute_msg:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sgnt:lseq uint8 (blocks modBits 8) ->
Pure (tuple2 bool (lbignum t (blocks modBits (bits t))))
(requires rsapss_pkey_pre... | let rsapss_verify_compute_msg #t modBits eBits pkey sgnt =
let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let k = blocks modBits 8 in
blocks_bits_lemma t modBits;
blocks_numb_lemma t modBits;
assert (blocks k numb == nLen);
assert (numb * blocks k numb <= max_size_t);
... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 48,
"end_line": 606,
"start_col": 0,
"start_line": 593
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
pkey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t) +
Hacl.Spec.Bignum.Definitions.blocks eBits (Lib.IntTy... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Hacl.Spec.RSA... | [] | false | false | false | false | false | let rsapss_verify_compute_msg #t modBits eBits pkey sgnt =
| let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let k = blocks modBits 8 in
blocks_bits_lemma t modBits;
blocks_numb_lemma t modBits;
assert (blocks k numb == nLen);
assert (numb * blocks k numb <= max_size_t);
let s = bn_from_bytes_be k sgnt in
let m_def = create nLen (uint #t 0) in
rsa... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.bn_check_num_bits | val bn_check_num_bits: #t:limb_t -> bs:size_pos -> b:lbignum t (blocks bs (bits t)) ->
res:limb t{v res == (if bn_v b < pow2 bs then v (ones t SEC) else v (zeros t SEC))} | val bn_check_num_bits: #t:limb_t -> bs:size_pos -> b:lbignum t (blocks bs (bits t)) ->
res:limb t{v res == (if bn_v b < pow2 bs then v (ones t SEC) else v (zeros t SEC))} | let bn_check_num_bits #t bs b =
let bLen = blocks bs (bits t) in
assert (bs <= bits t * bLen);
let m : limb t = if bs = bits t * bLen then ones t SEC else bn_lt_pow2_mask b bs in
(if bs = bits t * bLen then begin
bn_eval_bound b bLen;
Math.Lemmas.pow2_le_compat (bits t * bLen) bs end
else
bn_lt_po... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 748,
"start_col": 0,
"start_line": 738
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
bs: Lib.IntTypes.size_pos ->
b:
Hacl.Spec.Bignum.Definitions.lbignum t
(Hacl.Spec.Bignum.Definitions.blocks bs (Lib.IntTypes.bits t))
-> res:
Hacl.Spec.Bignum.Definitions.limb t
{ Lib.IntTypes.v res ==
(match Hacl.Spec.Bignum.Definitions.bn_v b < Prims.pow2 bs with
|... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_pos",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"Prims.unit",
"Prims._assert",
"Prims.eq2",
"Lib.IntTypes.range_t",
"Lib.IntTypes.v",
"Lib.IntTypes.SEC",
"Prims.op_LessThan",
"... | [] | false | false | false | false | false | let bn_check_num_bits #t bs b =
| let bLen = blocks bs (bits t) in
assert (bs <= bits t * bLen);
let m:limb t = if bs = bits t * bLen then ones t SEC else bn_lt_pow2_mask b bs in
(if bs = bits t * bLen
then
(bn_eval_bound b bLen;
Math.Lemmas.pow2_le_compat (bits t * bLen) bs)
else bn_lt_pow2_mask_lemma b bs);
assert (v m == (if bn_v b < p... | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.cpred | val cpred (#a: Type0) (s: Seq.seq a) : spred a | val cpred (#a: Type0) (s: Seq.seq a) : spred a | let cpred (#a:Type0) (s:Seq.seq a) :spred a = fun s1 -> Seq.equal s s1 | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 70,
"end_line": 55,
"start_col": 0,
"start_line": 55
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | s: FStar.Seq.Base.seq a -> LowStar.Monotonic.Buffer.spred a | Prims.Tot | [
"total"
] | [] | [
"FStar.Seq.Base.seq",
"FStar.Seq.Base.equal",
"LowStar.Monotonic.Buffer.spred"
] | [] | false | false | false | true | false | let cpred (#a: Type0) (s: Seq.seq a) : spred a =
| fun s1 -> Seq.equal s s1 | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_skey_pre | val rsapss_skey_pre:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t)) -> Type0 | val rsapss_skey_pre:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t)) -> Type0 | let rsapss_skey_pre #t modBits eBits dBits skey =
let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let pkeyLen = nLen + nLen + eLen in
let pkey = sub skey 0 pkeyLen in
let d = sub skey pkeyLen dLen in
rsapss_pkey_pre modBits eBits... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 35,
"end_line": 147,
"start_col": 0,
"start_line": 137
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
skey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t) +
Hacl.Spec.... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"Prims.l_and",
"Hacl.Spec.RSAPSS.rsapss_pkey_pre",
"Prims... | [] | false | false | false | false | true | let rsapss_skey_pre #t modBits eBits dBits skey =
| let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let pkeyLen = nLen + nLen + eLen in
let pkey = sub skey 0 pkeyLen in
let d = sub skey pkeyLen dLen in
rsapss_pkey_pre modBits eBits pkey /\ 0 < bn_v d /\ bn_v d < pow2 dBits | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.value_is | val value_is : b: LowStar.ImmutableBuffer.ibuffer a -> s: FStar.Ghost.erased (FStar.Seq.Base.seq a) -> Type0 | let value_is #a (b:ibuffer a) (s:Ghost.erased (Seq.seq a)) =
witnessed b (seq_eq s) | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 24,
"end_line": 61,
"start_col": 0,
"start_line": 60
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: LowStar.ImmutableBuffer.ibuffer a -> s: FStar.Ghost.erased (FStar.Seq.Base.seq a) -> Type0 | Prims.Tot | [
"total"
] | [] | [
"LowStar.ImmutableBuffer.ibuffer",
"FStar.Ghost.erased",
"FStar.Seq.Base.seq",
"LowStar.Monotonic.Buffer.witnessed",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.ImmutableBuffer.seq_eq"
] | [] | false | false | false | true | true | let value_is #a (b: ibuffer a) (s: Ghost.erased (Seq.seq a)) =
| witnessed b (seq_eq s) | false | |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_verify_ | val rsapss_verify_:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sLen:size_nat //saltLen
-> sgnt:lseq uint8 (blocks modBits 8)
-> msgLen:nat
-> msg:se... | val rsapss_verify_:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sLen:size_nat //saltLen
-> sgnt:lseq uint8 (blocks modBits 8)
-> msgLen:nat
-> msg:se... | let rsapss_verify_ #t a modBits eBits pkey sLen sgnt msgLen msg =
let (b, m) = rsapss_verify_compute_msg #t modBits eBits pkey sgnt in
if b then
rsapss_verify_bn_to_msg a modBits sLen msgLen msg m
else
false | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 9,
"end_line": 630,
"start_col": 0,
"start_line": 625
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
pkey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntType... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
... | [] | false | false | false | false | false | let rsapss_verify_ #t a modBits eBits pkey sLen sgnt msgLen msg =
| let b, m = rsapss_verify_compute_msg #t modBits eBits pkey sgnt in
if b then rsapss_verify_bn_to_msg a modBits sLen msgLen msg m else false | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.libuffer | val libuffer : a: Type0 -> len: Prims.nat -> s: FStar.Seq.Base.seq a -> Type0 | let libuffer (a:Type0) (len:nat) (s:Seq.seq a) =
b:lmbuffer a (immutable_preorder a) (immutable_preorder a) len{witnessed b (cpred s)} | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 87,
"end_line": 76,
"start_col": 7,
"start_line": 75
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Type0 -> len: Prims.nat -> s: FStar.Seq.Base.seq a -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.Seq.Base.seq",
"LowStar.Monotonic.Buffer.lmbuffer",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.Monotonic.Buffer.witnessed",
"LowStar.ImmutableBuffer.cpred"
] | [] | false | false | false | true | true | let libuffer (a: Type0) (len: nat) (s: Seq.seq a) =
| b: lmbuffer a (immutable_preorder a) (immutable_preorder a) len {witnessed b (cpred s)} | false | |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.libuffer_or_null | val libuffer_or_null : a: Type0 -> len: Prims.nat -> r: FStar.Monotonic.HyperHeap.rid -> s: FStar.Seq.Base.seq a -> Type0 | let libuffer_or_null (a:Type0) (len:nat) (r:HS.rid) (s:Seq.seq a) =
b:lmbuffer_or_null a (immutable_preorder a) (immutable_preorder a) len r{(not (g_is_null b)) ==>
witnessed b (cpred s)} | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 97,
"end_line": 80,
"start_col": 7,
"start_line": 78
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Type0 -> len: Prims.nat -> r: FStar.Monotonic.HyperHeap.rid -> s: FStar.Seq.Base.seq a -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Prims.nat",
"FStar.Monotonic.HyperHeap.rid",
"FStar.Seq.Base.seq",
"LowStar.Monotonic.Buffer.lmbuffer_or_null",
"LowStar.ImmutableBuffer.immutable_preorder",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_Negation",
"LowStar.Monotonic.Buffer.g_is_null",
"LowStar.Monotonic.Buffer.witnessed",
"LowStar.Imm... | [] | false | false | false | true | true | let libuffer_or_null (a: Type0) (len: nat) (r: HS.rid) (s: Seq.seq a) =
| b:
lmbuffer_or_null a (immutable_preorder a) (immutable_preorder a) len r
{(not (g_is_null b)) ==> witnessed b (cpred s)} | false | |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_verify_bn_to_msg | val rsapss_verify_bn_to_msg:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat{1 < modBits}
-> sLen:size_nat //saltLen
-> msgLen:nat
-> msg:seq uint8{length msg == msgLen}
-> m:lbignum t (blocks modBits (bits t)) ->
Pure bool
(requires rsapss_verify_pre a sLen msgLen msg)
(en... | val rsapss_verify_bn_to_msg:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat{1 < modBits}
-> sLen:size_nat //saltLen
-> msgLen:nat
-> msg:seq uint8{length msg == msgLen}
-> m:lbignum t (blocks modBits (bits t)) ->
Pure bool
(requires rsapss_verify_pre a sLen msgLen msg)
(en... | let rsapss_verify_bn_to_msg #t a modBits sLen msgLen msg m =
let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let emBits = modBits - 1 in
let emLen = blocks emBits 8 in
blocks_bits_lemma t emBits;
blocks_numb_lemma t emBits;
assert (blocks emLen numb == blocks emBits bit... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 42,
"end_line": 580,
"start_col": 0,
"start_line": 565
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat{1 < modBits} ->
sLen: Lib.IntTypes.size_nat ->
msgLen: Prims.nat ->
msg: Lib.Sequence.seq Lib.IntTypes.uint8 {Lib.Sequence.length msg == msgLen} ->
m:
Hacl.Spec.Bignum.Definitions.lbignum ... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"Prims.nat",
"Lib.Sequence.seq",
"Lib.IntTypes.uint8",
"Prims.eq2",
"Lib.Sequence.length",
"Hacl.Spec.Bignum.Definitions.lbignum"... | [] | false | false | false | false | false | let rsapss_verify_bn_to_msg #t a modBits sLen msgLen msg m =
| let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let emBits = modBits - 1 in
let emLen = blocks emBits 8 in
blocks_bits_lemma t emBits;
blocks_numb_lemma t emBits;
assert (blocks emLen numb == blocks emBits bits);
assert (numb * blocks emLen numb <= max_size_t);
let m1 = sub m 0 (blocks e... | false |
Steel.ST.GenElim1.fst | Steel.ST.GenElim1.compute_gen_elim_nondep_correct5 | val compute_gen_elim_nondep_correct5 (i0: gen_elim_i) (t1 t2 t3 t4 t5: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5]) | val compute_gen_elim_nondep_correct5 (i0: gen_elim_i) (t1 t2 t3 t4 t5: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5]) | let compute_gen_elim_nondep_correct5
(i0: gen_elim_i)
(t1 t2 t3 t4 t5: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5])
= fun q post intro _ ->
intro _;
rewrite_with_trefl (gen_elim_nondep_p _ _ _) (exists_ (fun x1 -> exists_ (fun x2 -> exists_ (fun x3 -> exists_ (fun x4 -> exists_ (f... | {
"file_name": "lib/steel/Steel.ST.GenElim1.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 7,
"end_line": 559,
"start_col": 0,
"start_line": 544
} | module Steel.ST.GenElim1
let gen_elim_f
(p: vprop)
(a: Type)
(q: (a -> vprop))
(post: (a -> prop))
: Tot Type
= ((opened: inames) -> STGhost a opened p q True post)
module U = FStar.Universe
let gen_unit_elim_t (i: gen_unit_elim_i) : Tot Type =
gen_elim_f (compute_gen_unit_elim_p i) (U.raise_t u#_ u#1 unit... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"FStar.Universe.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti.checked",
"FStar.Classical.fsti.checked"
],
"interface_file": true,
"source_file": "Steel.ST.GenElim1.f... | [
{
"abbrev": true,
"full_module": "FStar.Universe",
"short_module": "U"
},
{
"abbrev": true,
"full_module": "FStar.Tactics",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Steel.ST.GenElim1.Base",
"short_module": null
},
{
"abbrev": false,
"full_modu... | {
"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 | i0: Steel.ST.GenElim1.Base.gen_elim_i -> t1: Type -> t2: Type -> t3: Type -> t4: Type -> t5: Type
-> Steel.ST.GenElim1.compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5] | Prims.Tot | [
"total"
] | [] | [
"Steel.ST.GenElim1.Base.gen_elim_i",
"Steel.ST.GenElim1.Base.curried_function_type",
"Prims.Cons",
"Prims.Nil",
"FStar.Universe.raise_t",
"Prims.unit",
"Steel.Effect.Common.vprop",
"Prims.prop",
"Steel.ST.GenElim1.vprop_rewrite",
"Steel.ST.GenElim1.Base.compute_gen_elim_p",
"Steel.ST.GenElim1.ge... | [] | false | false | false | false | false | let compute_gen_elim_nondep_correct5 (i0: gen_elim_i) (t1 t2 t3 t4 t5: Type)
: Tot (compute_gen_elim_nondep_correct_t i0 [t1; t2; t3; t4; t5]) =
| fun q post intro _ ->
intro _;
rewrite_with_trefl (gen_elim_nondep_p _ _ _)
(exists_ (fun x1 ->
exists_ (fun x2 ->
exists_ (fun x3 ->
exists_ (fun x4 ->
exists_ (fun x5 ->
(q x1 x2 x3 x4 x5 (U... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_verify | val rsapss_verify:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sLen:size_nat //saltLen
-> k:size_nat
-> sgnt:lseq uint8 k
-> msgLen:nat
-> msg:seq ... | val rsapss_verify:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sLen:size_nat //saltLen
-> k:size_nat
-> sgnt:lseq uint8 k
-> msgLen:nat
-> msg:seq ... | let rsapss_verify #t a modBits eBits pkey sLen k sgnt msgLen msg =
let hLen = Hash.hash_length a in
Math.Lemmas.pow2_lt_compat 61 32;
Math.Lemmas.pow2_lt_compat 125 32;
//assert (max_size_t < Hash.max_input_length a);
assert (hLen + 8 < max_size_t);
let b =
sLen <= v (0xfffffffful) - hLen - 8 &&
ms... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 9,
"end_line": 731,
"start_col": 0,
"start_line": 715
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
pkey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntType... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
... | [] | false | false | false | false | false | let rsapss_verify #t a modBits eBits pkey sLen k sgnt msgLen msg =
| let hLen = Hash.hash_length a in
Math.Lemmas.pow2_lt_compat 61 32;
Math.Lemmas.pow2_lt_compat 125 32;
assert (hLen + 8 < max_size_t);
let b =
sLen <= v (0xfffffffful) - hLen - 8 && msgLen `less_than_max_input_length` a &&
k = blocks modBits 8
in
if b
then
(rsapss_verify_lemma a modBits eBits pkey sLen sgnt msgLen... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_sign | val rsapss_sign:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> sLen:size_nat
-> salt:lseq uint8 sLen
->... | val rsapss_sign:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> sLen:size_nat
-> salt:lseq uint8 sLen
->... | let rsapss_sign #t a modBits eBits dBits skey sLen salt msgLen msg sgnt =
let hLen = Hash.hash_length a in
Math.Lemmas.pow2_lt_compat 61 32;
Math.Lemmas.pow2_lt_compat 125 32;
let b =
sLen <= v (0xfffffffful) - hLen - 8 &&
msgLen `less_than_max_input_length` a &&
sLen + hLen + 2 <= blocks (modBits ... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 516,
"start_col": 0,
"start_line": 502
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
skey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bign... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
... | [] | false | false | false | false | false | let rsapss_sign #t a modBits eBits dBits skey sLen salt msgLen msg sgnt =
| let hLen = Hash.hash_length a in
Math.Lemmas.pow2_lt_compat 61 32;
Math.Lemmas.pow2_lt_compat 125 32;
let b =
sLen <= v (0xfffffffful) - hLen - 8 && msgLen `less_than_max_input_length` a &&
sLen + hLen + 2 <= blocks (modBits - 1) 8
in
if b
then
(rsapss_sign_lemma a modBits eBits dBits skey sLen salt msgLen msg;
... | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.immutable_preorder | val immutable_preorder (a: Type0) : srel a | val immutable_preorder (a: Type0) : srel a | let immutable_preorder (a:Type0) :srel a = fun s1 s2 -> Seq.equal s1 s2 | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 71,
"end_line": 28,
"start_col": 0,
"start_line": 28
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Type0 -> LowStar.Monotonic.Buffer.srel a | Prims.Tot | [
"total"
] | [] | [
"FStar.Seq.Base.seq",
"FStar.Seq.Base.equal",
"Prims.prop",
"LowStar.Monotonic.Buffer.srel"
] | [] | false | false | false | true | false | let immutable_preorder (a: Type0) : srel a =
| fun s1 s2 -> Seq.equal s1 s2 | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_load_pkey_post | val rsapss_load_pkey_post:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t)) -> Type0 | val rsapss_load_pkey_post:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t)) -> Type0 | let rsapss_load_pkey_post #t modBits eBits nb eb pkey =
let bits = bits t in
let pkey_s = S.rsapss_load_pkey modBits eBits nb eb in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = sub pkey 0 nLen in
let e = sub pkey (nLen + nLen) eLen in
rsapss_pkey_pre modBits eBits pkey /\... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 48,
"end_line": 804,
"start_col": 0,
"start_line": 791
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
nb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks modBits 8) ->
eb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks eBits 8) ->
pkey... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Hacl.Spec.Bignum.Definitions.blocks",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Prims.l_and",... | [] | false | false | false | false | true | let rsapss_load_pkey_post #t modBits eBits nb eb pkey =
| let bits = bits t in
let pkey_s = S.rsapss_load_pkey modBits eBits nb eb in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = sub pkey 0 nLen in
let e = sub pkey (nLen + nLen) eLen in
rsapss_pkey_pre modBits eBits pkey /\ Some? pkey_s /\ bn_v n == S.Mk_rsapss_pkey?.n (Some?.v pkey_s) /\
bn_v e =... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_check_modulus | val rsapss_check_modulus: #t:limb_t -> modBits:size_pos -> n:lbignum t (blocks modBits (bits t)) ->
res:limb t{v res == (if (bn_v n % 2 = 1 && pow2 (modBits - 1) < bn_v n && bn_v n < pow2 modBits) then v (ones t SEC) else v (zeros t SEC))} | val rsapss_check_modulus: #t:limb_t -> modBits:size_pos -> n:lbignum t (blocks modBits (bits t)) ->
res:limb t{v res == (if (bn_v n % 2 = 1 && pow2 (modBits - 1) < bn_v n && bn_v n < pow2 modBits) then v (ones t SEC) else v (zeros t SEC))} | let rsapss_check_modulus #t modBits n =
let bit0 = bn_is_odd n in
bn_is_odd_lemma n;
assert (v bit0 == bn_v n % 2);
let m0 = uint #t 0 -. bit0 in
let m1 = bn_gt_pow2_mask n (modBits - 1) in
bn_gt_pow2_mask_lemma n (modBits - 1);
let m2 = bn_check_num_bits modBits n in
let m = m0 &. (m1 &. m2) in
log... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 767,
"start_col": 0,
"start_line": 754
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_pos ->
n:
Hacl.Spec.Bignum.Definitions.lbignum t
(Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t))
-> res:
Hacl.Spec.Bignum.Definitions.limb t
{ Lib.IntTypes.v res ==
(match
Hacl.Spec.Bignum.Definitions.bn_v n % 2 = 1 &&... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_pos",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"Prims.unit",
"Lib.IntTypes.logand_lemma",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Amp_Dot",
"Lib.IntTypes.int_t",
"Hacl.Spec.Bignum.De... | [] | false | false | false | false | false | let rsapss_check_modulus #t modBits n =
| let bit0 = bn_is_odd n in
bn_is_odd_lemma n;
assert (v bit0 == bn_v n % 2);
let m0 = uint #t 0 -. bit0 in
let m1 = bn_gt_pow2_mask n (modBits - 1) in
bn_gt_pow2_mask_lemma n (modBits - 1);
let m2 = bn_check_num_bits modBits n in
let m = m0 &. (m1 &. m2) in
logand_lemma m0 (m1 &. m2);
logand_lemma m1 m2;
m | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_sign_ | val rsapss_sign_:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> sLen:size_nat
-> salt:lseq uint8 sLen
-... | val rsapss_sign_:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> sLen:size_nat
-> salt:lseq uint8 sLen
-... | let rsapss_sign_ #t a modBits eBits dBits skey sLen salt msgLen msg =
let m = rsapss_sign_msg_to_bn #t a modBits sLen salt msgLen msg in
rsapss_sign_compute_sgnt #t modBits eBits dBits skey m | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 412,
"start_col": 0,
"start_line": 410
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
skey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bign... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
... | [] | false | false | false | false | false | let rsapss_sign_ #t a modBits eBits dBits skey sLen salt msgLen msg =
| let m = rsapss_sign_msg_to_bn #t a modBits sLen salt msgLen msg in
rsapss_sign_compute_sgnt #t modBits eBits dBits skey m | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_sign_msg_to_bn | val rsapss_sign_msg_to_bn:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat{1 < modBits}
-> sLen:size_nat
-> salt:lseq uint8 sLen
-> msgLen:nat
-> msg:seq uint8{length msg == msgLen} ->
Pure (lbignum t (blocks modBits (bits t)))
(requires rsapss_sign_pre a modBits sLen salt ms... | val rsapss_sign_msg_to_bn:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat{1 < modBits}
-> sLen:size_nat
-> salt:lseq uint8 sLen
-> msgLen:nat
-> msg:seq uint8{length msg == msgLen} ->
Pure (lbignum t (blocks modBits (bits t)))
(requires rsapss_sign_pre a modBits sLen salt ms... | let rsapss_sign_msg_to_bn #t a modBits sLen salt msgLen msg =
let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let emBits = modBits - 1 in
let emLen = blocks emBits 8 in
let em = S.pss_encode a sLen salt msgLen msg emBits in
blocks_bits_lemma t emBits;
blocks_numb_lemma ... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 3,
"end_line": 359,
"start_col": 0,
"start_line": 339
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat{1 < modBits} ->
sLen: Lib.IntTypes.size_nat ->
salt: Lib.Sequence.lseq Lib.IntTypes.uint8 sLen ->
msgLen: Prims.nat ->
msg: Lib.Sequence.seq Lib.IntTypes.uint8 {Lib.Sequence.length msg == msgLen... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Prims.op_LessThan",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Prims.nat",
"Lib.Sequence.seq",
"Prims.eq2",
"Lib.Sequence.length",
"Prims.unit",
... | [] | false | false | false | false | false | let rsapss_sign_msg_to_bn #t a modBits sLen salt msgLen msg =
| let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let emBits = modBits - 1 in
let emLen = blocks emBits 8 in
let em = S.pss_encode a sLen salt msgLen msg emBits in
blocks_bits_lemma t emBits;
blocks_numb_lemma t emBits;
assert (blocks emLen numb == blocks emBits bits);
assert (numb * block... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_load_skey | val rsapss_load_skey:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> db:lseq uint8 (blocks dBits 8) ->
tuple2 bool (lbignum t (2 * blocks modBits (bits t) + blocks eBits (bit... | val rsapss_load_skey:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> db:lseq uint8 (blocks dBits 8) ->
tuple2 bool (lbignum t (2 * blocks modBits (bits t) + blocks eBits (bit... | let rsapss_load_skey #t modBits eBits dBits nb eb db =
let b, pkey = rsapss_load_pkey modBits eBits nb eb in
let d = bn_from_bytes_be #t (blocks dBits 8) db in
let skey = pkey @| d in
let m0 = rsapss_check_exponent dBits d in
let b1 = b && BB.unsafe_bool_of_limb m0 in
b1, skey | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 10,
"end_line": 911,
"start_col": 0,
"start_line": 904
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
nb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks modBits 8) ->
eb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bign... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Hacl.Spec.Bignum.Definitions.blocks",
"Prims.bool",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
... | [] | false | false | false | false | false | let rsapss_load_skey #t modBits eBits dBits nb eb db =
| let b, pkey = rsapss_load_pkey modBits eBits nb eb in
let d = bn_from_bytes_be #t (blocks dBits 8) db in
let skey = pkey @| d in
let m0 = rsapss_check_exponent dBits d in
let b1 = b && BB.unsafe_bool_of_limb m0 in
b1, skey | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_verify_bn | val rsapss_verify_bn:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> m_def:lbignum t (blocks modBits (bits t))
-> s:lbignum t (blocks modBits (bits t)) ->
Pure (tuple2 bool (lbignum t (blocks modBit... | val rsapss_verify_bn:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> m_def:lbignum t (blocks modBits (bits t))
-> s:lbignum t (blocks modBits (bits t)) ->
Pure (tuple2 bool (lbignum t (blocks modBit... | let rsapss_verify_bn #t modBits eBits pkey m_def s =
let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = sub pkey 0 nLen in
let r2 = sub pkey nLen nLen in
let e = sub pkey (nLen + nLen) eLen in
let mask = bn_lt_mask s n in
bn_lt_m... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 19,
"end_line": 550,
"start_col": 0,
"start_line": 530
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
pkey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t) +
Hacl.Spec.Bignum.Definitions.blocks eBits (Lib.IntTy... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"Hacl.Spec.Bignum.Base.unsafe_bool_of_limb",
"Hacl.Spec.RSA... | [] | false | false | false | false | false | let rsapss_verify_bn #t modBits eBits pkey m_def s =
| let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = sub pkey 0 nLen in
let r2 = sub pkey nLen nLen in
let e = sub pkey (nLen + nLen) eLen in
let mask = bn_lt_mask s n in
bn_lt_mask_lemma s n;
if BB.unsafe_bool_of_limb mask
then
(Math.Lemmas.pow2_le_c... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_sign_compute_sgnt | val rsapss_sign_compute_sgnt:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> m:lbignum t (blocks modBits (bits t)) ->
Pure (tuple2 bool (lseq uint8 (b... | val rsapss_sign_compute_sgnt:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> m:lbignum t (blocks modBits (bits t)) ->
Pure (tuple2 bool (lseq uint8 (b... | let rsapss_sign_compute_sgnt #t modBits eBits dBits skey m =
let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let k = blocks modBits 8 in
let eq_b, s = rsapss_sign_bn #t modBits eBits dBits skey m in
blocks_bits_lemma t modBits;
blocks_numb_lemma t modBits;
assert (blocks... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 12,
"end_line": 389,
"start_col": 0,
"start_line": 377
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
skey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t) +
Hacl.Spec.... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"Prims.bool",
"FStar.Pervasives.Native.Mktuple2",
"Lib.Se... | [] | false | false | false | false | false | let rsapss_sign_compute_sgnt #t modBits eBits dBits skey m =
| let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let k = blocks modBits 8 in
let eq_b, s = rsapss_sign_bn #t modBits eBits dBits skey m in
blocks_bits_lemma t modBits;
blocks_numb_lemma t modBits;
assert (blocks k numb == nLen);
assert (numb * blocks k numb <= max_size_t);
let sgnt = bn_t... | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.sub_ptr_value_is | val sub_ptr_value_is (#a: _) (b0 b1: ibuffer a) (h: HS.mem) (i len: U32.t) (v: Seq.seq a)
: Lemma
(requires
U32.v i + U32.v len <= length b1 /\ b0 == mgsub (immutable_preorder a) b1 i len /\
value_is b1 v /\ Seq.length v == length b1)
(ensures value_is b0 (Seq.slice v (U32.v i) (U32.v i ... | val sub_ptr_value_is (#a: _) (b0 b1: ibuffer a) (h: HS.mem) (i len: U32.t) (v: Seq.seq a)
: Lemma
(requires
U32.v i + U32.v len <= length b1 /\ b0 == mgsub (immutable_preorder a) b1 i len /\
value_is b1 v /\ Seq.length v == length b1)
(ensures value_is b0 (Seq.slice v (U32.v i) (U32.v i ... | let sub_ptr_value_is (#a:_) (b0 b1:ibuffer a) (h:HS.mem) (i len:U32.t) (v:Seq.seq a)
: Lemma
(requires
U32.v i + U32.v len <= length b1 /\
b0 == mgsub (immutable_preorder a) b1 i len /\
value_is b1 v /\
Seq.length v == length b1)
(ensures
value_is b0 (Seq.slice v (U32.v i) (U32.v... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 87,
"end_line": 73,
"start_col": 0,
"start_line": 63
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b0: LowStar.ImmutableBuffer.ibuffer a ->
b1: LowStar.ImmutableBuffer.ibuffer a ->
h: FStar.Monotonic.HyperStack.mem ->
i: FStar.UInt32.t ->
len: FStar.UInt32.t ->
v: FStar.Seq.Base.seq a
-> FStar.Pervasives.Lemma
(requires
FStar.UInt32.v i + FStar.UInt32.v len <= LowStar.Monoton... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowStar.ImmutableBuffer.ibuffer",
"FStar.Monotonic.HyperStack.mem",
"FStar.UInt32.t",
"FStar.Seq.Base.seq",
"LowStar.Monotonic.Buffer.witnessed_functorial",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.ImmutableBuffer.seq_eq",
"FStar.Ghost.hide",
"FStar.Seq.Base.slice",
"FStar.UInt32.v"... | [] | true | false | true | false | false | let sub_ptr_value_is (#a: _) (b0 b1: ibuffer a) (h: HS.mem) (i len: U32.t) (v: Seq.seq a)
: Lemma
(requires
U32.v i + U32.v len <= length b1 /\ b0 == mgsub (immutable_preorder a) b1 i len /\
value_is b1 v /\ Seq.length v == length b1)
(ensures value_is b0 (Seq.slice v (U32.v i) (U32.v i ... | let sub_v = Seq.slice v (U32.v i) (U32.v i + U32.v len) in
witnessed_functorial b1 b0 i len (seq_eq (Ghost.hide v)) (seq_eq (Ghost.hide sub_v)) | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.ialloca | val ialloca (#a: Type0) (init: a) (len: U32.t)
: HST.StackInline (libuffer a (U32.v len) (Seq.create (U32.v len) init))
(requires (fun _ -> alloca_pre len))
(ensures
(fun h0 b h1 ->
alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init) /\
frameOf b == HS.get_tip h0)... | val ialloca (#a: Type0) (init: a) (len: U32.t)
: HST.StackInline (libuffer a (U32.v len) (Seq.create (U32.v len) init))
(requires (fun _ -> alloca_pre len))
(ensures
(fun h0 b h1 ->
alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init) /\
frameOf b == HS.get_tip h0)... | let ialloca (#a:Type0) (init:a) (len:U32.t)
:HST.StackInline (libuffer a (U32.v len) (Seq.create (U32.v len) init))
(requires (fun _ -> alloca_pre len))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init) /\
fram... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 155,
"start_col": 0,
"start_line": 148
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | init: a -> len: FStar.UInt32.t
-> FStar.HyperStack.ST.StackInline
(LowStar.ImmutableBuffer.libuffer a
(FStar.UInt32.v len)
(FStar.Seq.Base.create (FStar.UInt32.v len) init)) | FStar.HyperStack.ST.StackInline | [] | [] | [
"FStar.UInt32.t",
"LowStar.ImmutableBuffer.libuffer",
"FStar.UInt32.v",
"FStar.Seq.Base.create",
"Prims.unit",
"LowStar.Monotonic.Buffer.witness_p",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.ImmutableBuffer.cpred",
"LowStar.Monotonic.Buffer.mbuffer",
"Prims.l_and",
"Prims.eq2",
"P... | [] | false | true | false | false | false | let ialloca (#a: Type0) (init: a) (len: U32.t)
: HST.StackInline (libuffer a (U32.v len) (Seq.create (U32.v len) init))
(requires (fun _ -> alloca_pre len))
(ensures
(fun h0 b h1 ->
alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init) /\
frameOf b == HS.get_tip h0)... | let b = malloca init len in
witness_p b (cpred (Seq.create (U32.v len) init));
b | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.igcmalloc | val igcmalloc (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST
(b: libuffer a (U32.v len) (Seq.create (U32.v len) init) {frameOf b == r /\ recallable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init))) | val igcmalloc (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST
(b: libuffer a (U32.v len) (Seq.create (U32.v len) init) {frameOf b == r /\ recallable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init))) | let igcmalloc (#a:Type0) (r:HS.rid) (init:a) (len:U32.t)
:HST.ST (b:libuffer a (U32.v len) (Seq.create (U32.v len) init){frameOf b == r /\ recallable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init)))
= let b =... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 88,
"start_col": 0,
"start_line": 82
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: FStar.Monotonic.HyperHeap.rid -> init: a -> len: FStar.UInt32.t
-> FStar.HyperStack.ST.ST
(b:
LowStar.ImmutableBuffer.libuffer a
(FStar.UInt32.v len)
(FStar.Seq.Base.create (FStar.UInt32.v len) init)
{LowStar.Monotonic.Buffer.frameOf b == r /\ LowStar.Monotonic.Buffer.recallable b... | FStar.HyperStack.ST.ST | [] | [] | [
"FStar.Monotonic.HyperHeap.rid",
"FStar.UInt32.t",
"LowStar.ImmutableBuffer.libuffer",
"FStar.UInt32.v",
"FStar.Seq.Base.create",
"Prims.l_and",
"Prims.eq2",
"LowStar.Monotonic.Buffer.frameOf",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.Monotonic.Buffer.recallable",
"Prims.unit",
"... | [] | false | true | false | false | false | let igcmalloc (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST
(b: libuffer a (U32.v len) (Seq.create (U32.v len) init) {frameOf b == r /\ recallable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init))) =
| let b = mgcmalloc r init len in
witness_p b (cpred (Seq.create (U32.v len) init));
b | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.igcmalloc_partial | val igcmalloc_partial (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST (b: libuffer_or_null a (U32.v len) r (Seq.create (U32.v len) init) {recallable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_common b h0 h1 (Seq.create (U32.v len) init))) | val igcmalloc_partial (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST (b: libuffer_or_null a (U32.v len) r (Seq.create (U32.v len) init) {recallable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_common b h0 h1 (Seq.create (U32.v len) init))) | let igcmalloc_partial (#a:Type0) (r:HS.rid) (init:a) (len:U32.t)
:HST.ST (b:libuffer_or_null a (U32.v len) r (Seq.create (U32.v len) init){recallable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_common b h0 h1 (Seq.create (U32.v len) init)))
=... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 24,
"end_line": 116,
"start_col": 0,
"start_line": 112
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: FStar.Monotonic.HyperHeap.rid -> init: a -> len: FStar.UInt32.t
-> FStar.HyperStack.ST.ST
(b:
LowStar.ImmutableBuffer.libuffer_or_null a
(FStar.UInt32.v len)
r
(FStar.Seq.Base.create (FStar.UInt32.v len) init) {LowStar.Monotonic.Buffer.recallable b}) | FStar.HyperStack.ST.ST | [] | [] | [
"FStar.Monotonic.HyperHeap.rid",
"FStar.UInt32.t",
"LowStar.ImmutableBuffer.igcmalloc",
"LowStar.ImmutableBuffer.libuffer",
"FStar.UInt32.v",
"FStar.Seq.Base.create",
"Prims.l_and",
"Prims.eq2",
"LowStar.Monotonic.Buffer.frameOf",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.Monotonic.... | [] | false | true | false | false | false | let igcmalloc_partial (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST (b: libuffer_or_null a (U32.v len) r (Seq.create (U32.v len) init) {recallable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_common b h0 h1 (Seq.create (U32.v len) init))) =
| igcmalloc r init len | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_load_pkey | val rsapss_load_pkey:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8) ->
tuple2 bool (lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))) | val rsapss_load_pkey:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8) ->
tuple2 bool (lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))) | let rsapss_load_pkey #t modBits eBits nb eb =
let n = bn_from_bytes_be (blocks modBits 8) nb in
let r2 = SM.bn_precomp_r2_mod_n (modBits - 1) n in
let e = bn_from_bytes_be (blocks eBits 8) eb in
let pkey = (n @| r2) @| e in
let m0 = rsapss_check_modulus modBits n in
let m1 = rsapss_check_exponent eBits e... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 854,
"start_col": 0,
"start_line": 845
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
nb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks modBits 8) ->
eb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks eBits 8)
-> Prims.... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Hacl.Spec.Bignum.Definitions.blocks",
"FStar.Pervasives.Native.Mktuple2",
"Prims.bool",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar... | [] | false | false | false | false | false | let rsapss_load_pkey #t modBits eBits nb eb =
| let n = bn_from_bytes_be (blocks modBits 8) nb in
let r2 = SM.bn_precomp_r2_mod_n (modBits - 1) n in
let e = bn_from_bytes_be (blocks eBits 8) eb in
let pkey = (n @| r2) @| e in
let m0 = rsapss_check_modulus modBits n in
let m1 = rsapss_check_exponent eBits e in
let m = m0 &. m1 in
BB.unsafe_bool_of_limb m, pkey | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_skey_sign | val rsapss_skey_sign:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> db:lseq uint8 (blocks dBits 8)
-> sLen:size_nat
-> salt:lse... | val rsapss_skey_sign:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> db:lseq uint8 (blocks dBits 8)
-> sLen:size_nat
-> salt:lse... | let rsapss_skey_sign #t a modBits eBits dBits nb eb db sLen salt msgLen msg sgnt =
let b, skey = rsapss_load_skey #t modBits eBits dBits nb eb db in
rsapss_load_skey_lemma #t modBits eBits dBits nb eb db;
if b then
rsapss_sign a modBits eBits dBits skey sLen salt msgLen msg sgnt
else
false, sgnt | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 975,
"start_col": 0,
"start_line": 968
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
nb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks ... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Hacl.Spec.Bignum.Definitions.blocks",
"Prims.nat",
"Lib.Sequence.seq",
"P... | [] | false | false | false | false | false | let rsapss_skey_sign #t a modBits eBits dBits nb eb db sLen salt msgLen msg sgnt =
| let b, skey = rsapss_load_skey #t modBits eBits dBits nb eb db in
rsapss_load_skey_lemma #t modBits eBits dBits nb eb db;
if b then rsapss_sign a modBits eBits dBits skey sLen salt msgLen msg sgnt else false, sgnt | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.imalloc | val imalloc (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST
(b: libuffer a (U32.v len) (Seq.create (U32.v len) init) {frameOf b == r /\ freeable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init))) | val imalloc (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST
(b: libuffer a (U32.v len) (Seq.create (U32.v len) init) {frameOf b == r /\ freeable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init))) | let imalloc (#a:Type0) (r:HS.rid) (init:a) (len:U32.t)
:HST.ST (b:libuffer a (U32.v len) (Seq.create (U32.v len) init){frameOf b == r /\ freeable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init)))
= let b = mma... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 124,
"start_col": 0,
"start_line": 118
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: FStar.Monotonic.HyperHeap.rid -> init: a -> len: FStar.UInt32.t
-> FStar.HyperStack.ST.ST
(b:
LowStar.ImmutableBuffer.libuffer a
(FStar.UInt32.v len)
(FStar.Seq.Base.create (FStar.UInt32.v len) init)
{LowStar.Monotonic.Buffer.frameOf b == r /\ LowStar.Monotonic.Buffer.freeable b}) | FStar.HyperStack.ST.ST | [] | [] | [
"FStar.Monotonic.HyperHeap.rid",
"FStar.UInt32.t",
"LowStar.ImmutableBuffer.libuffer",
"FStar.UInt32.v",
"FStar.Seq.Base.create",
"Prims.l_and",
"Prims.eq2",
"LowStar.Monotonic.Buffer.frameOf",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.Monotonic.Buffer.freeable",
"Prims.unit",
"Lo... | [] | false | true | false | false | false | let imalloc (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST
(b: libuffer a (U32.v len) (Seq.create (U32.v len) init) {frameOf b == r /\ freeable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.create (U32.v len) init))) =
| let b = mmalloc r init len in
witness_p b (cpred (Seq.create (U32.v len) init));
b | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_pkey_verify | val rsapss_pkey_verify:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> sLen:size_nat //saltLen
-> k:size_nat
-> sgnt:lseq uint8 k
-> msgLen:nat
-> msg... | val rsapss_pkey_verify:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> sLen:size_nat //saltLen
-> k:size_nat
-> sgnt:lseq uint8 k
-> msgLen:nat
-> msg... | let rsapss_pkey_verify #t a modBits eBits nb eb sLen k sgnt msgLen msg =
let b, pkey = rsapss_load_pkey #t modBits eBits nb eb in
rsapss_load_pkey_lemma #t modBits eBits nb eb;
if b then
rsapss_verify a modBits eBits pkey sLen k sgnt msgLen msg
else
false | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 9,
"end_line": 1002,
"start_col": 0,
"start_line": 995
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
nb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks modBits 8) ->
eb: Lib.Sequence.lseq Li... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Hacl.Spec.Bignum.Definitions.blocks",
"Prims.nat",
"Lib.Sequence.seq",
"P... | [] | false | false | false | false | false | let rsapss_pkey_verify #t a modBits eBits nb eb sLen k sgnt msgLen msg =
| let b, pkey = rsapss_load_pkey #t modBits eBits nb eb in
rsapss_load_pkey_lemma #t modBits eBits nb eb;
if b then rsapss_verify a modBits eBits pkey sLen k sgnt msgLen msg else false | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.igcmalloc_and_blit | val igcmalloc_and_blit
(#a: Type0)
(r: HS.rid)
(#rrel1 #rel1: srel a)
(src: mbuffer a rrel1 rel1)
(id_src len: U32.t)
: HST.ST
(b: lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len) {frameOf b == r})
(requires fun h0 -> malloc_pre r len /\ live h0 src /\ U... | val igcmalloc_and_blit
(#a: Type0)
(r: HS.rid)
(#rrel1 #rel1: srel a)
(src: mbuffer a rrel1 rel1)
(id_src len: U32.t)
: HST.ST
(b: lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len) {frameOf b == r})
(requires fun h0 -> malloc_pre r len /\ live h0 src /\ U... | let igcmalloc_and_blit (#a:Type0) (r:HS.rid)
(#rrel1 #rel1:srel a) (src:mbuffer a rrel1 rel1) (id_src:U32.t) (len:U32.t)
: HST.ST (b:lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len){frameOf b == r})
(requires fun h0 ->
malloc_pre r len /\
live h0 src /\ U32.v id_src + U32.v len <... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 109,
"start_col": 0,
"start_line": 96
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
r: FStar.Monotonic.HyperHeap.rid ->
src: LowStar.Monotonic.Buffer.mbuffer a rrel1 rel1 ->
id_src: FStar.UInt32.t ->
len: FStar.UInt32.t
-> FStar.HyperStack.ST.ST
(b:
LowStar.Monotonic.Buffer.lmbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.i... | FStar.HyperStack.ST.ST | [] | [] | [
"FStar.Monotonic.HyperHeap.rid",
"LowStar.Monotonic.Buffer.srel",
"LowStar.Monotonic.Buffer.mbuffer",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.lmbuffer",
"LowStar.ImmutableBuffer.immutable_preorder",
"FStar.UInt32.v",
"Prims.eq2",
"LowStar.Monotonic.Buffer.frameOf",
"Prims.unit",
"LowStar.Mon... | [] | false | true | false | false | false | let igcmalloc_and_blit
(#a: Type0)
(r: HS.rid)
(#rrel1 #rel1: srel a)
(src: mbuffer a rrel1 rel1)
(id_src len: U32.t)
: HST.ST
(b: lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len) {frameOf b == r})
(requires fun h0 -> malloc_pre r len /\ live h0 src /\ U... | let b = mgcmalloc_and_blit r src id_src len in
let h0 = HST.get () in
witness_p b (seq_eq (G.hide (Seq.slice (as_seq h0 src) (U32.v id_src) (U32.v id_src + U32.v len))));
b | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.ialloca_of_list | val ialloca_of_list (#a: Type0) (init: list a)
: HST.StackInline (libuffer a (normalize_term (List.Tot.length init)) (Seq.seq_of_list init))
(requires (fun _ -> alloca_of_list_pre init))
(ensures
(fun h0 b h1 ->
alloc_post_mem_common b h0 h1 (Seq.seq_of_list init) /\ frameOf b == HS.... | val ialloca_of_list (#a: Type0) (init: list a)
: HST.StackInline (libuffer a (normalize_term (List.Tot.length init)) (Seq.seq_of_list init))
(requires (fun _ -> alloca_of_list_pre init))
(ensures
(fun h0 b h1 ->
alloc_post_mem_common b h0 h1 (Seq.seq_of_list init) /\ frameOf b == HS.... | let ialloca_of_list (#a:Type0) (init: list a)
:HST.StackInline (libuffer a (normalize_term (List.Tot.length init)) (Seq.seq_of_list init))
(requires (fun _ -> alloca_of_list_pre init))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.seq_of_list init) /\
... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 180,
"start_col": 0,
"start_line": 173
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | init: Prims.list a
-> FStar.HyperStack.ST.StackInline
(LowStar.ImmutableBuffer.libuffer a
(FStar.Pervasives.normalize_term (FStar.List.Tot.Base.length init))
(FStar.Seq.Base.seq_of_list init)) | FStar.HyperStack.ST.StackInline | [] | [] | [
"Prims.list",
"LowStar.ImmutableBuffer.libuffer",
"FStar.Pervasives.normalize_term",
"Prims.nat",
"FStar.List.Tot.Base.length",
"FStar.Seq.Base.seq_of_list",
"Prims.unit",
"LowStar.Monotonic.Buffer.witness_p",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.ImmutableBuffer.cpred",
"LowSta... | [] | false | true | false | false | false | let ialloca_of_list (#a: Type0) (init: list a)
: HST.StackInline (libuffer a (normalize_term (List.Tot.length init)) (Seq.seq_of_list init))
(requires (fun _ -> alloca_of_list_pre init))
(ensures
(fun h0 b h1 ->
alloc_post_mem_common b h0 h1 (Seq.seq_of_list init) /\ frameOf b == HS.... | let b = malloca_of_list init in
witness_p b (cpred (Seq.seq_of_list init));
b | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.imalloc_and_blit | val imalloc_and_blit
(#a: Type0)
(r: HS.rid)
(#rrel1 #rel1: srel a)
(src: mbuffer a rrel1 rel1)
(id_src len: U32.t)
: HST.ST
(b:
lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len)
{frameOf b == r /\ freeable b})
(requires fun h0 -> malloc... | val imalloc_and_blit
(#a: Type0)
(r: HS.rid)
(#rrel1 #rel1: srel a)
(src: mbuffer a rrel1 rel1)
(id_src len: U32.t)
: HST.ST
(b:
lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len)
{frameOf b == r /\ freeable b})
(requires fun h0 -> malloc... | let imalloc_and_blit (#a:Type0) (r:HS.rid)
(#rrel1 #rel1:srel a) (src:mbuffer a rrel1 rel1) (id_src:U32.t) (len:U32.t)
: HST.ST (b:lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len){frameOf b == r /\ freeable b})
(requires fun h0 ->
malloc_pre r len /\
live h0 src /\ U32.v id_src +... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 139,
"start_col": 0,
"start_line": 126
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
r: FStar.Monotonic.HyperHeap.rid ->
src: LowStar.Monotonic.Buffer.mbuffer a rrel1 rel1 ->
id_src: FStar.UInt32.t ->
len: FStar.UInt32.t
-> FStar.HyperStack.ST.ST
(b:
LowStar.Monotonic.Buffer.lmbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.i... | FStar.HyperStack.ST.ST | [] | [] | [
"FStar.Monotonic.HyperHeap.rid",
"LowStar.Monotonic.Buffer.srel",
"LowStar.Monotonic.Buffer.mbuffer",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.lmbuffer",
"LowStar.ImmutableBuffer.immutable_preorder",
"FStar.UInt32.v",
"Prims.l_and",
"Prims.eq2",
"LowStar.Monotonic.Buffer.frameOf",
"LowStar.Mo... | [] | false | true | false | false | false | let imalloc_and_blit
(#a: Type0)
(r: HS.rid)
(#rrel1 #rel1: srel a)
(src: mbuffer a rrel1 rel1)
(id_src len: U32.t)
: HST.ST
(b:
lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len)
{frameOf b == r /\ freeable b})
(requires fun h0 -> malloc... | let b = mmalloc_and_blit r src id_src len in
let h0 = HST.get () in
witness_p b (seq_eq (G.hide (Seq.slice (as_seq h0 src) (U32.v id_src) (U32.v id_src + U32.v len))));
b | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.inhabited_immutable_buffer_is_distinct_from_buffer | val inhabited_immutable_buffer_is_distinct_from_buffer
(#a: Type0)
(x: a)
(ib: ibuffer a)
(b: LowStar.Buffer.buffer a)
: Lemma (~(ib === b)) | val inhabited_immutable_buffer_is_distinct_from_buffer
(#a: Type0)
(x: a)
(ib: ibuffer a)
(b: LowStar.Buffer.buffer a)
: Lemma (~(ib === b)) | let inhabited_immutable_buffer_is_distinct_from_buffer (#a:Type0) (x:a) (ib:ibuffer a) (b:LowStar.Buffer.buffer a)
: Lemma (~ (ib === b))
= let aux () : Lemma (requires (ib === b)) (ensures False)
= //use injectivity to prove that all sequences of type a are equal
mbuffer_injectivity_in_first_preorder... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 36,
"end_line": 243,
"start_col": 0,
"start_line": 226
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | x: a -> ib: LowStar.ImmutableBuffer.ibuffer a -> b: LowStar.Buffer.buffer a
-> FStar.Pervasives.Lemma (ensures ~(ib === b)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowStar.ImmutableBuffer.ibuffer",
"LowStar.Buffer.buffer",
"FStar.Classical.move_requires",
"Prims.unit",
"Prims.op_Equals_Equals_Equals",
"Prims.l_False",
"Prims.squash",
"Prims.Nil",
"FStar.Pervasives.pattern",
"Prims._assert",
"Prims.eq2",
"Prims.nat",
"FStar.Seq.Base.length",
"FStar.S... | [] | false | false | true | false | false | let inhabited_immutable_buffer_is_distinct_from_buffer
(#a: Type0)
(x: a)
(ib: ibuffer a)
(b: LowStar.Buffer.buffer a)
: Lemma (~(ib === b)) =
| let aux () : Lemma (requires (ib === b)) (ensures False) =
mbuffer_injectivity_in_first_preorder ();
assert (immutable_preorder a == LowStar.Buffer.trivial_preorder a);
assert (forall (s1: Seq.seq a) (s2: Seq.seq a).
(immutable_preorder a) s1 s2 == (LowStar.Buffer.trivial_preorder a) s1 s2);
assert (for... | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.witness_contents | val witness_contents (#a: Type0) (b: ibuffer a) (s: Seq.seq a)
: HST.ST unit
(requires (fun h0 -> Seq.equal (as_seq h0 b) s))
(ensures (fun h0 _ h1 -> h0 == h1 /\ witnessed b (cpred s))) | val witness_contents (#a: Type0) (b: ibuffer a) (s: Seq.seq a)
: HST.ST unit
(requires (fun h0 -> Seq.equal (as_seq h0 b) s))
(ensures (fun h0 _ h1 -> h0 == h1 /\ witnessed b (cpred s))) | let witness_contents (#a:Type0) (b:ibuffer a) (s:Seq.seq a)
:HST.ST unit (requires (fun h0 -> Seq.equal (as_seq h0 b) s))
(ensures (fun h0 _ h1 -> h0 == h1 /\ witnessed b (cpred s)))
= witness_p b (cpred s) | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 25,
"end_line": 200,
"start_col": 0,
"start_line": 197
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: LowStar.ImmutableBuffer.ibuffer a -> s: FStar.Seq.Base.seq a -> FStar.HyperStack.ST.ST Prims.unit | FStar.HyperStack.ST.ST | [] | [] | [
"LowStar.ImmutableBuffer.ibuffer",
"FStar.Seq.Base.seq",
"LowStar.Monotonic.Buffer.witness_p",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.ImmutableBuffer.cpred",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"FStar.Seq.Base.equal",
"LowStar.Monotonic.Buffer.as_seq",
"Prims.l_and",
... | [] | false | true | false | false | false | let witness_contents (#a: Type0) (b: ibuffer a) (s: Seq.seq a)
: HST.ST unit
(requires (fun h0 -> Seq.equal (as_seq h0 b) s))
(ensures (fun h0 _ h1 -> h0 == h1 /\ witnessed b (cpred s))) =
| witness_p b (cpred s) | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.recall_contents | val recall_contents (#a: Type0) (b: ibuffer a) (s: Seq.seq a)
: HST.ST unit
(requires (fun h0 -> (recallable b \/ live h0 b) /\ witnessed b (cpred s)))
(ensures (fun h0 _ h1 -> h0 == h1 /\ live h0 b /\ as_seq h0 b == s)) | val recall_contents (#a: Type0) (b: ibuffer a) (s: Seq.seq a)
: HST.ST unit
(requires (fun h0 -> (recallable b \/ live h0 b) /\ witnessed b (cpred s)))
(ensures (fun h0 _ h1 -> h0 == h1 /\ live h0 b /\ as_seq h0 b == s)) | let recall_contents (#a:Type0) (b:ibuffer a) (s:Seq.seq a)
:HST.ST unit (requires (fun h0 -> (recallable b \/ live h0 b) /\ witnessed b (cpred s)))
(ensures (fun h0 _ h1 -> h0 == h1 /\ live h0 b /\ as_seq h0 b == s))
= recall_p b (cpred s) | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 24,
"end_line": 205,
"start_col": 0,
"start_line": 202
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: LowStar.ImmutableBuffer.ibuffer a -> s: FStar.Seq.Base.seq a -> FStar.HyperStack.ST.ST Prims.unit | FStar.HyperStack.ST.ST | [] | [] | [
"LowStar.ImmutableBuffer.ibuffer",
"FStar.Seq.Base.seq",
"LowStar.Monotonic.Buffer.recall_p",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.ImmutableBuffer.cpred",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.l_or",
"LowStar.Monotonic.Buffer.recallable",
"LowSta... | [] | false | true | false | false | false | let recall_contents (#a: Type0) (b: ibuffer a) (s: Seq.seq a)
: HST.ST unit
(requires (fun h0 -> (recallable b \/ live h0 b) /\ witnessed b (cpred s)))
(ensures (fun h0 _ h1 -> h0 == h1 /\ live h0 b /\ as_seq h0 b == s)) =
| recall_p b (cpred s) | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.igcmalloc_of_list | val igcmalloc_of_list (#a: Type0) (r: HS.rid) (init: list a)
: HST.ST
(b:
libuffer a (normalize_term (List.Tot.length init)) (Seq.seq_of_list init)
{frameOf b == r /\ recallable b})
(requires (fun _ -> gcmalloc_of_list_pre r init))
(ensures (fun h0 b h1 -> alloc_post_mem_common b... | val igcmalloc_of_list (#a: Type0) (r: HS.rid) (init: list a)
: HST.ST
(b:
libuffer a (normalize_term (List.Tot.length init)) (Seq.seq_of_list init)
{frameOf b == r /\ recallable b})
(requires (fun _ -> gcmalloc_of_list_pre r init))
(ensures (fun h0 b h1 -> alloc_post_mem_common b... | let igcmalloc_of_list (#a:Type0) (r:HS.rid) (init:list a)
:HST.ST (b:libuffer a (normalize_term (List.Tot.length init)) (Seq.seq_of_list init){frameOf b == r /\ recallable b})
(requires (fun _ -> gcmalloc_of_list_pre r init))
(ensures (fun h0 b h1 -> alloc_post_mem_common b h0 h1 (Seq.seq_o... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 188,
"start_col": 0,
"start_line": 182
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: FStar.Monotonic.HyperHeap.rid -> init: Prims.list a
-> FStar.HyperStack.ST.ST
(b:
LowStar.ImmutableBuffer.libuffer a
(FStar.Pervasives.normalize_term (FStar.List.Tot.Base.length init))
(FStar.Seq.Base.seq_of_list init)
{LowStar.Monotonic.Buffer.frameOf b == r /\ LowStar.Monotonic.... | FStar.HyperStack.ST.ST | [] | [] | [
"FStar.Monotonic.HyperHeap.rid",
"Prims.list",
"LowStar.ImmutableBuffer.libuffer",
"FStar.Pervasives.normalize_term",
"Prims.nat",
"FStar.List.Tot.Base.length",
"FStar.Seq.Base.seq_of_list",
"Prims.l_and",
"Prims.eq2",
"LowStar.Monotonic.Buffer.frameOf",
"LowStar.ImmutableBuffer.immutable_preord... | [] | false | true | false | false | false | let igcmalloc_of_list (#a: Type0) (r: HS.rid) (init: list a)
: HST.ST
(b:
libuffer a (normalize_term (List.Tot.length init)) (Seq.seq_of_list init)
{frameOf b == r /\ recallable b})
(requires (fun _ -> gcmalloc_of_list_pre r init))
(ensures (fun h0 b h1 -> alloc_post_mem_common b... | let b = mgcmalloc_of_list r init in
witness_p b (cpred (Seq.seq_of_list init));
b | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.imalloc_partial | val imalloc_partial (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST
(b:
libuffer_or_null a (U32.v len) r (Seq.create (U32.v len) init)
{(not (g_is_null b)) ==> freeable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_common b h0 ... | val imalloc_partial (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST
(b:
libuffer_or_null a (U32.v len) r (Seq.create (U32.v len) init)
{(not (g_is_null b)) ==> freeable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_common b h0 ... | let imalloc_partial (#a:Type0) (r:HS.rid) (init:a) (len:U32.t)
:HST.ST (b:libuffer_or_null a (U32.v len) r (Seq.create (U32.v len) init){(not (g_is_null b)) ==> freeable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_common b h0 h1 (Seq.create (U3... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 22,
"end_line": 146,
"start_col": 0,
"start_line": 142
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: FStar.Monotonic.HyperHeap.rid -> init: a -> len: FStar.UInt32.t
-> FStar.HyperStack.ST.ST
(b:
LowStar.ImmutableBuffer.libuffer_or_null a
(FStar.UInt32.v len)
r
(FStar.Seq.Base.create (FStar.UInt32.v len) init)
{ Prims.op_Negation (LowStar.Monotonic.Buffer.g_is_null b) ==>
... | FStar.HyperStack.ST.ST | [] | [] | [
"FStar.Monotonic.HyperHeap.rid",
"FStar.UInt32.t",
"LowStar.ImmutableBuffer.imalloc",
"LowStar.ImmutableBuffer.libuffer",
"FStar.UInt32.v",
"FStar.Seq.Base.create",
"Prims.l_and",
"Prims.eq2",
"LowStar.Monotonic.Buffer.frameOf",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.Monotonic.Bu... | [] | false | true | false | false | false | let imalloc_partial (#a: Type0) (r: HS.rid) (init: a) (len: U32.t)
: HST.ST
(b:
libuffer_or_null a (U32.v len) r (Seq.create (U32.v len) init)
{(not (g_is_null b)) ==> freeable b})
(requires (fun _ -> malloc_pre r len))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_common b h0 ... | imalloc r init len | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.witness_value | val witness_value (#a: Type0) (b: ibuffer a)
: HST.ST unit
(requires (fun h0 -> True))
(ensures (fun h0 _ h1 -> h0 == h1 /\ b `value_is` (Ghost.hide (as_seq h1 b)))) | val witness_value (#a: Type0) (b: ibuffer a)
: HST.ST unit
(requires (fun h0 -> True))
(ensures (fun h0 _ h1 -> h0 == h1 /\ b `value_is` (Ghost.hide (as_seq h1 b)))) | let witness_value (#a:Type0) (b:ibuffer a)
:HST.ST unit (requires (fun h0 -> True))
(ensures (fun h0 _ h1 -> h0 == h1 /\ b `value_is` (Ghost.hide (as_seq h1 b))))
= let h = HST.get () in
let s = Ghost.hide (as_seq h b) in
witness_p b (seq_eq s) | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 26,
"end_line": 212,
"start_col": 0,
"start_line": 207
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: LowStar.ImmutableBuffer.ibuffer a -> FStar.HyperStack.ST.ST Prims.unit | FStar.HyperStack.ST.ST | [] | [] | [
"LowStar.ImmutableBuffer.ibuffer",
"LowStar.Monotonic.Buffer.witness_p",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.ImmutableBuffer.seq_eq",
"Prims.unit",
"FStar.Ghost.erased",
"FStar.Seq.Base.seq",
"FStar.Ghost.hide",
"LowStar.Monotonic.Buffer.as_seq",
"FStar.Monotonic.HyperStack.mem"... | [] | false | true | false | false | false | let witness_value (#a: Type0) (b: ibuffer a)
: HST.ST unit
(requires (fun h0 -> True))
(ensures (fun h0 _ h1 -> h0 == h1 /\ b `value_is` (Ghost.hide (as_seq h1 b)))) =
| let h = HST.get () in
let s = Ghost.hide (as_seq h b) in
witness_p b (seq_eq s) | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.igcmalloc_of_list_partial | val igcmalloc_of_list_partial (#a: Type0) (r: HS.rid) (init: list a)
: HST.ST
(b:
libuffer_or_null a (normalize_term (List.Tot.length init)) r (Seq.seq_of_list init)
{recallable b})
(requires (fun _ -> gcmalloc_of_list_pre r init))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_... | val igcmalloc_of_list_partial (#a: Type0) (r: HS.rid) (init: list a)
: HST.ST
(b:
libuffer_or_null a (normalize_term (List.Tot.length init)) r (Seq.seq_of_list init)
{recallable b})
(requires (fun _ -> gcmalloc_of_list_pre r init))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_... | let igcmalloc_of_list_partial (#a:Type0) (r:HS.rid) (init:list a)
:HST.ST (b:libuffer_or_null a (normalize_term (List.Tot.length init)) r (Seq.seq_of_list init){recallable b})
(requires (fun _ -> gcmalloc_of_list_pre r init))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_common b h0 h1 (S... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 28,
"end_line": 195,
"start_col": 0,
"start_line": 191
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: FStar.Monotonic.HyperHeap.rid -> init: Prims.list a
-> FStar.HyperStack.ST.ST
(b:
LowStar.ImmutableBuffer.libuffer_or_null a
(FStar.Pervasives.normalize_term (FStar.List.Tot.Base.length init))
r
(FStar.Seq.Base.seq_of_list init) {LowStar.Monotonic.Buffer.recallable b}) | FStar.HyperStack.ST.ST | [] | [] | [
"FStar.Monotonic.HyperHeap.rid",
"Prims.list",
"LowStar.ImmutableBuffer.igcmalloc_of_list",
"LowStar.ImmutableBuffer.libuffer",
"FStar.Pervasives.normalize_term",
"Prims.nat",
"FStar.List.Tot.Base.length",
"FStar.Seq.Base.seq_of_list",
"Prims.l_and",
"Prims.eq2",
"LowStar.Monotonic.Buffer.frameO... | [] | false | true | false | false | false | let igcmalloc_of_list_partial (#a: Type0) (r: HS.rid) (init: list a)
: HST.ST
(b:
libuffer_or_null a (normalize_term (List.Tot.length init)) r (Seq.seq_of_list init)
{recallable b})
(requires (fun _ -> gcmalloc_of_list_pre r init))
(ensures (fun h0 b h1 -> alloc_partial_post_mem_... | igcmalloc_of_list r init | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.ialloca_and_blit | val ialloca_and_blit
(#a: Type0)
(#rrel1 #rel1: srel a)
(src: mbuffer a rrel1 rel1)
(id_src len: U32.t)
: HST.StackInline (lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len))
(requires fun h0 -> alloca_pre len /\ live h0 src /\ U32.v id_src + U32.v len <= length src)
... | val ialloca_and_blit
(#a: Type0)
(#rrel1 #rel1: srel a)
(src: mbuffer a rrel1 rel1)
(id_src len: U32.t)
: HST.StackInline (lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len))
(requires fun h0 -> alloca_pre len /\ live h0 src /\ U32.v id_src + U32.v len <= length src)
... | let ialloca_and_blit (#a:Type0)
(#rrel1 #rel1:srel a) (src:mbuffer a rrel1 rel1) (id_src:U32.t) (len:U32.t)
: HST.StackInline (lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len))
(requires fun h0 ->
alloca_pre len /\
live h0 src /\ U32.v id_src + U32.v len <= length src)
(ensur... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 171,
"start_col": 0,
"start_line": 157
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | src: LowStar.Monotonic.Buffer.mbuffer a rrel1 rel1 -> id_src: FStar.UInt32.t -> len: FStar.UInt32.t
-> FStar.HyperStack.ST.StackInline
(LowStar.Monotonic.Buffer.lmbuffer a
(LowStar.ImmutableBuffer.immutable_preorder a)
(LowStar.ImmutableBuffer.immutable_preorder a)
(FStar.UInt32.v len)) | FStar.HyperStack.ST.StackInline | [] | [] | [
"LowStar.Monotonic.Buffer.srel",
"LowStar.Monotonic.Buffer.mbuffer",
"FStar.UInt32.t",
"LowStar.Monotonic.Buffer.lmbuffer",
"LowStar.ImmutableBuffer.immutable_preorder",
"FStar.UInt32.v",
"Prims.unit",
"LowStar.Monotonic.Buffer.witness_p",
"LowStar.ImmutableBuffer.seq_eq",
"FStar.Ghost.hide",
"F... | [] | false | true | false | false | false | let ialloca_and_blit
(#a: Type0)
(#rrel1 #rel1: srel a)
(src: mbuffer a rrel1 rel1)
(id_src len: U32.t)
: HST.StackInline (lmbuffer a (immutable_preorder a) (immutable_preorder a) (U32.v len))
(requires fun h0 -> alloca_pre len /\ live h0 src /\ U32.v id_src + U32.v len <= length src)
... | let b = malloca_and_blit src id_src len in
let h0 = HST.get () in
witness_p b (seq_eq (G.hide (Seq.slice (as_seq h0 src) (U32.v id_src) (U32.v id_src + U32.v len))));
b | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_load_skey_post | val rsapss_load_skey_post:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> db:lseq uint8 (blocks dBits 8)
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t... | val rsapss_load_skey_post:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> db:lseq uint8 (blocks dBits 8)
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t... | let rsapss_load_skey_post #t modBits eBits dBits nb eb db skey =
let bits = bits t in
let skey_s = S.rsapss_load_skey modBits eBits dBits nb eb db in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let n = sub skey 0 nLen in
let e = sub skey (nLen + nL... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 49,
"end_line": 834,
"start_col": 0,
"start_line": 818
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
nb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks modBits 8) ->
eb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bign... | Prims.Tot | [
"total"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Hacl.Spec.Bignum.Definitions.blocks",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"Prims.l_and",... | [] | false | false | false | false | true | let rsapss_load_skey_post #t modBits eBits dBits nb eb db skey =
| let bits = bits t in
let skey_s = S.rsapss_load_skey modBits eBits dBits nb eb db in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let n = sub skey 0 nLen in
let e = sub skey (nLen + nLen) eLen in
let d = sub skey (nLen + nLen + eLen) dLen in
rsapss_skey_pre modBits e... | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.buffer_immutable_buffer_disjoint | val buffer_immutable_buffer_disjoint
(#t #ti: Type)
(b: LowStar.Buffer.buffer t)
(bi: ibuffer ti)
(h: HS.mem)
: Lemma (requires (live h b /\ live h bi)) (ensures (disjoint b bi)) | val buffer_immutable_buffer_disjoint
(#t #ti: Type)
(b: LowStar.Buffer.buffer t)
(bi: ibuffer ti)
(h: HS.mem)
: Lemma (requires (live h b /\ live h bi)) (ensures (disjoint b bi)) | let buffer_immutable_buffer_disjoint
(#t: Type) (#ti: Type)
(b: LowStar.Buffer.buffer t)
(bi: ibuffer ti)
(h: HS.mem)
: Lemma
(requires (
live h b /\ live h bi
))
(ensures (
disjoint b bi
))
= if length b = 0
then empty_disjoint b bi
else if length bi = 0
then empty_disjoint bi b
else be... | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 5,
"end_line": 265,
"start_col": 0,
"start_line": 245
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
b: LowStar.Buffer.buffer t ->
bi: LowStar.ImmutableBuffer.ibuffer ti ->
h: FStar.Monotonic.HyperStack.mem
-> FStar.Pervasives.Lemma
(requires LowStar.Monotonic.Buffer.live h b /\ LowStar.Monotonic.Buffer.live h bi)
(ensures LowStar.Monotonic.Buffer.disjoint b bi) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowStar.Buffer.buffer",
"LowStar.ImmutableBuffer.ibuffer",
"FStar.Monotonic.HyperStack.mem",
"Prims.op_Equality",
"Prims.int",
"LowStar.Monotonic.Buffer.length",
"LowStar.Buffer.trivial_preorder",
"LowStar.Monotonic.Buffer.empty_disjoint",
"LowStar.ImmutableBuffer.immutable_preorder",
"Prims.bool... | [] | false | false | true | false | false | let buffer_immutable_buffer_disjoint
(#t #ti: Type)
(b: LowStar.Buffer.buffer t)
(bi: ibuffer ti)
(h: HS.mem)
: Lemma (requires (live h b /\ live h bi)) (ensures (disjoint b bi)) =
| if length b = 0
then empty_disjoint b bi
else
if length bi = 0
then empty_disjoint bi b
else
let s = as_seq h b in
assert (~(LowStar.Buffer.trivial_preorder _ Seq.empty s <==> immutable_preorder _ Seq.empty s));
live_same_addresses_equal_types_and_preorders b bi h | false |
LowStar.ImmutableBuffer.fst | LowStar.ImmutableBuffer.recall_value | val recall_value (#a: Type0) (b: ibuffer a) (s: Ghost.erased (Seq.seq a))
: HST.ST unit
(requires (fun h0 -> (recallable b \/ live h0 b) /\ b `value_is` s))
(ensures (fun h0 _ h1 -> h0 == h1 /\ live h1 b /\ as_seq h1 b == Ghost.reveal s)) | val recall_value (#a: Type0) (b: ibuffer a) (s: Ghost.erased (Seq.seq a))
: HST.ST unit
(requires (fun h0 -> (recallable b \/ live h0 b) /\ b `value_is` s))
(ensures (fun h0 _ h1 -> h0 == h1 /\ live h1 b /\ as_seq h1 b == Ghost.reveal s)) | let recall_value (#a:Type0) (b:ibuffer a) (s:Ghost.erased (Seq.seq a))
:HST.ST unit (requires (fun h0 -> (recallable b \/ live h0 b) /\ b `value_is` s))
(ensures (fun h0 _ h1 -> h0 == h1 /\ live h1 b /\ as_seq h1 b == Ghost.reveal s))
= recall_p b (seq_eq s) | {
"file_name": "ulib/LowStar.ImmutableBuffer.fst",
"git_rev": "10183ea187da8e8c426b799df6c825e24c0767d3",
"git_url": "https://github.com/FStarLang/FStar.git",
"project_name": "FStar"
} | {
"end_col": 25,
"end_line": 217,
"start_col": 0,
"start_line": 214
} | (*
Copyright 2008-2018 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowStar.Monotonic.Buffer.fsti.checked",
"LowStar.Buffer.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "Seq"
},
{
"abbrev": true,
"full_module"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | b: LowStar.ImmutableBuffer.ibuffer a -> s: FStar.Ghost.erased (FStar.Seq.Base.seq a)
-> FStar.HyperStack.ST.ST Prims.unit | FStar.HyperStack.ST.ST | [] | [] | [
"LowStar.ImmutableBuffer.ibuffer",
"FStar.Ghost.erased",
"FStar.Seq.Base.seq",
"LowStar.Monotonic.Buffer.recall_p",
"LowStar.ImmutableBuffer.immutable_preorder",
"LowStar.ImmutableBuffer.seq_eq",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Prims.l_or",
"LowStar.Monotonic.Buff... | [] | false | true | false | false | false | let recall_value (#a: Type0) (b: ibuffer a) (s: Ghost.erased (Seq.seq a))
: HST.ST unit
(requires (fun h0 -> (recallable b \/ live h0 b) /\ b `value_is` s))
(ensures (fun h0 _ h1 -> h0 == h1 /\ live h1 b /\ as_seq h1 b == Ghost.reveal s)) =
| recall_p b (seq_eq s) | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_load_pkey_lemma | val rsapss_load_pkey_lemma:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8) ->
Lemma
(let b, pkey = rsapss_load_pkey #t modBits eBits nb eb in
let pkey_s = S.rsapss_load_pkey modBits eBits nb eb in
... | val rsapss_load_pkey_lemma:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8) ->
Lemma
(let b, pkey = rsapss_load_pkey #t modBits eBits nb eb in
let pkey_s = S.rsapss_load_pkey modBits eBits nb eb in
... | let rsapss_load_pkey_lemma #t modBits eBits nb eb =
let bits = bits t in
let nbLen = blocks modBits 8 in
let ebLen = blocks eBits 8 in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = bn_from_bytes_be #t nbLen nb in
bn_from_bytes_be_lemma #t nbLen nb;
let r2 = SM.bn_precomp_r... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 20,
"end_line": 891,
"start_col": 0,
"start_line": 868
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
nb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks modBits 8) ->
eb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks eBits 8)
-> FStar.... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.logand_lemma",
"Lib.IntTypes.SEC",
"Lib.IntTypes.int_t",
"Lib.IntTypes.op_Amp_Dot",
"Hacl.Spec.Bignum.D... | [] | true | false | true | false | false | let rsapss_load_pkey_lemma #t modBits eBits nb eb =
| let bits = bits t in
let nbLen = blocks modBits 8 in
let ebLen = blocks eBits 8 in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = bn_from_bytes_be #t nbLen nb in
bn_from_bytes_be_lemma #t nbLen nb;
let r2 = SM.bn_precomp_r2_mod_n (modBits - 1) n in
let e = bn_from_bytes_be #t ebLen eb in
bn_f... | false |
Steel.ST.MonotonicReference.fst | Steel.ST.MonotonicReference.recall | val recall (#inames: _)
(#a:Type u#0)
(#q:perm)
(#p:Preorder.preorder a)
(fact:property a)
(r:erased (ref a p))
(v:erased a)
(w:witnessed r fact)
: STAtomicU unit inames
(pts_to r q v)
(fun _ -> pts_to r q v)
(requires True... | val recall (#inames: _)
(#a:Type u#0)
(#q:perm)
(#p:Preorder.preorder a)
(fact:property a)
(r:erased (ref a p))
(v:erased a)
(w:witnessed r fact)
: STAtomicU unit inames
(pts_to r q v)
(fun _ -> pts_to r q v)
(requires True... | let recall (#inames: _)
(#a:Type u#0)
(#q:perm)
(#p:Preorder.preorder a)
(fact:property a)
(r:erased (ref a p))
(v:erased a)
(w:witnessed r fact)
= coerce_atomic (fun _ -> MR.recall #inames #a #q #p fact r v w) | {
"file_name": "lib/steel/Steel.ST.MonotonicReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 66,
"end_line": 89,
"start_col": 0,
"start_line": 81
} | (*
Copyright 2020 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Coercions.fsti.checked",
"Steel.MonotonicReference.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"prims.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti... | [
{
"abbrev": true,
"full_module": "Steel.MonotonicReference",
"short_module": "MR"
},
{
"abbrev": true,
"full_module": "FStar.Preorder",
"short_module": "Preorder"
},
{
"abbrev": false,
"full_module": "Steel.ST.Coercions",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
fact: Steel.ST.MonotonicReference.property a ->
r: FStar.Ghost.erased (Steel.ST.MonotonicReference.ref a p) ->
v: FStar.Ghost.erased a ->
w: Steel.ST.MonotonicReference.witnessed (FStar.Ghost.reveal r) fact
-> Steel.ST.Effect.Atomic.STAtomicU Prims.unit | Steel.ST.Effect.Atomic.STAtomicU | [] | [] | [
"Steel.Memory.inames",
"Steel.FractionalPermission.perm",
"FStar.Preorder.preorder",
"Steel.ST.MonotonicReference.property",
"FStar.Ghost.erased",
"Steel.ST.MonotonicReference.ref",
"Steel.ST.MonotonicReference.witnessed",
"FStar.Ghost.reveal",
"Steel.ST.Coercions.coerce_atomic",
"Prims.unit",
"... | [] | false | true | false | false | false | let recall
(#inames: _)
(#a: Type u#0)
(#q: perm)
(#p: Preorder.preorder a)
(fact: property a)
(r: erased (ref a p))
(v: erased a)
(w: witnessed r fact)
=
| coerce_atomic (fun _ -> MR.recall #inames #a #q #p fact r v w) | false |
Steel.ST.MonotonicReference.fst | Steel.ST.MonotonicReference.witness | val witness (#inames: _)
(#a:Type)
(#q:perm)
(#p:Preorder.preorder a)
(r:erased (ref a p))
(fact:stable_property p)
(v:erased a)
(_:squash (fact v))
: STAtomicUT (witnessed r fact) inames
(pts_to r q v)
(fun _ -> pts_to r ... | val witness (#inames: _)
(#a:Type)
(#q:perm)
(#p:Preorder.preorder a)
(r:erased (ref a p))
(fact:stable_property p)
(v:erased a)
(_:squash (fact v))
: STAtomicUT (witnessed r fact) inames
(pts_to r q v)
(fun _ -> pts_to r ... | let witness (#inames: _)
(#a:Type)
(#q:perm)
(#p:Preorder.preorder a)
(r:erased (ref a p))
(fact:stable_property p)
(v:erased a)
(pf:squash (fact v))
= coerce_atomic (witness' r fact v pf) | {
"file_name": "lib/steel/Steel.ST.MonotonicReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 40,
"end_line": 79,
"start_col": 0,
"start_line": 71
} | (*
Copyright 2020 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Coercions.fsti.checked",
"Steel.MonotonicReference.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"prims.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti... | [
{
"abbrev": true,
"full_module": "Steel.MonotonicReference",
"short_module": "MR"
},
{
"abbrev": true,
"full_module": "FStar.Preorder",
"short_module": "Preorder"
},
{
"abbrev": false,
"full_module": "Steel.ST.Coercions",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
r: FStar.Ghost.erased (Steel.ST.MonotonicReference.ref a p) ->
fact: Steel.ST.MonotonicReference.stable_property p ->
v: FStar.Ghost.erased a ->
pf: Prims.squash (fact (FStar.Ghost.reveal v))
-> Steel.ST.Effect.Atomic.STAtomicUT
(Steel.ST.MonotonicReference.witnessed (FStar.Ghost.reveal r) fact) | Steel.ST.Effect.Atomic.STAtomicUT | [] | [] | [
"Steel.Memory.inames",
"Steel.FractionalPermission.perm",
"FStar.Preorder.preorder",
"FStar.Ghost.erased",
"Steel.ST.MonotonicReference.ref",
"Steel.ST.MonotonicReference.stable_property",
"Prims.squash",
"FStar.Ghost.reveal",
"Steel.ST.Coercions.coerce_atomic",
"Steel.ST.MonotonicReference.witnes... | [] | false | true | false | false | false | let witness
(#inames: _)
(#a: Type)
(#q: perm)
(#p: Preorder.preorder a)
(r: erased (ref a p))
(fact: stable_property p)
(v: erased a)
(pf: squash (fact v))
=
| coerce_atomic (witness' r fact v pf) | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_sign_bn | val rsapss_sign_bn:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> m:lbignum t (blocks modBits (bits t)) ->
Pure (tuple2 bool (lbignum t (blocks modBi... | val rsapss_sign_bn:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> m:lbignum t (blocks modBits (bits t)) ->
Pure (tuple2 bool (lbignum t (blocks modBi... | let rsapss_sign_bn #t modBits eBits dBits skey m =
let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let n = sub skey 0 nLen in
let r2 = sub skey nLen nLen in
let e = sub skey (nLen + nLen) eLen in
let d = sub skey (nLen + nLen + e... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 324,
"start_col": 0,
"start_line": 306
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
skey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntTypes.bits t) +
Hacl.Spec.... | Prims.Pure | [] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
"Lib.IntTypes.bits",
"FStar.Pervasives.Native.Mktuple2",
"Prims.bool",
"Hacl.S... | [] | false | false | false | false | false | let rsapss_sign_bn #t modBits eBits dBits skey m =
| let bits = bits t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let n = sub skey 0 nLen in
let r2 = sub skey nLen nLen in
let e = sub skey (nLen + nLen) eLen in
let d = sub skey (nLen + nLen + eLen) dLen in
let k = blocks modBits 8 in
Math.Lemmas.pow2_le_compat (bi... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_verify_lemma | val rsapss_verify_lemma:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sLen:size_nat //saltLen
-> sgnt:lseq uint8 (blocks modBits 8)
-> msgLen:nat
-> m... | val rsapss_verify_lemma:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat{pkey_len_pre t modBits eBits}
-> pkey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t))
-> sLen:size_nat //saltLen
-> sgnt:lseq uint8 (blocks modBits 8)
-> msgLen:nat
-> m... | let rsapss_verify_lemma #t a modBits eBits pkey sLen sgnt msgLen msg =
let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = sub pkey 0 nLen in
let r2 = sub pkey nLen nLen in
let e = sub pkey (nLen + nLen) eLen in
let k = blocks modBi... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 4,
"end_line": 697,
"start_col": 0,
"start_line": 650
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.pkey_len_pre t modBits eBits} ->
pkey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bignum.Definitions.blocks modBits (Lib.IntType... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.pkey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
... | [] | false | false | true | false | false | let rsapss_verify_lemma #t a modBits eBits pkey sLen sgnt msgLen msg =
| let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let n = sub pkey 0 nLen in
let r2 = sub pkey nLen nLen in
let e = sub pkey (nLen + nLen) eLen in
let k = blocks modBits 8 in
let emBits = modBits - 1 in
let emLen = blocks emBits 8 in
blocks_bits_lemma t modB... | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_load_skey_lemma | val rsapss_load_skey_lemma:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> db:lseq uint8 (blocks dBits 8) ->
Lemma
(let b, skey = rsapss_load_skey #t modBits eBits dBits nb... | val rsapss_load_skey_lemma:
#t:limb_t
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> nb:lseq uint8 (blocks modBits 8)
-> eb:lseq uint8 (blocks eBits 8)
-> db:lseq uint8 (blocks dBits 8) ->
Lemma
(let b, skey = rsapss_load_skey #t modBits eBits dBits nb... | let rsapss_load_skey_lemma #t modBits eBits dBits nb eb db =
let bits = bits t in
let nbLen = blocks modBits 8 in
let ebLen = blocks eBits 8 in
let dbLen = blocks dBits 8 in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let b, pkey = rsapss_load_pkey... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 49,
"end_line": 945,
"start_col": 0,
"start_line": 927
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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 |
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
nb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bignum.Definitions.blocks modBits 8) ->
eb: Lib.Sequence.lseq Lib.IntTypes.uint8 (Hacl.Spec.Bign... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Lib.Sequence.lseq",
"Lib.IntTypes.uint8",
"Hacl.Spec.Bignum.Definitions.blocks",
"Prims.bool",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
... | [] | false | false | true | false | false | let rsapss_load_skey_lemma #t modBits eBits dBits nb eb db =
| let bits = bits t in
let nbLen = blocks modBits 8 in
let ebLen = blocks eBits 8 in
let dbLen = blocks dBits 8 in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let b, pkey = rsapss_load_pkey #t modBits eBits nb eb in
rsapss_load_pkey_lemma #t modBits eBits nb eb;
let d... | false |
Steel.ST.MonotonicReference.fst | Steel.ST.MonotonicReference.write | val write (#a:Type) (#p:Preorder.preorder a) (#v:erased a)
(r:ref a p) (x:a)
: ST unit
(pts_to r full_perm v)
(fun v -> pts_to r full_perm x)
(requires p v x)
(ensures fun _ -> True) | val write (#a:Type) (#p:Preorder.preorder a) (#v:erased a)
(r:ref a p) (x:a)
: ST unit
(pts_to r full_perm v)
(fun v -> pts_to r full_perm x)
(requires p v x)
(ensures fun _ -> True) | let write (#a:Type) (#p:Preorder.preorder a) (#v:erased a)
(r:ref a p) (x:a)
: ST unit
(pts_to r full_perm v)
(fun v -> pts_to r full_perm x)
(requires p v x)
(ensures fun _ -> True)
= coerce_steel (fun _ -> MR.write r x) | {
"file_name": "lib/steel/Steel.ST.MonotonicReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 40,
"end_line": 48,
"start_col": 0,
"start_line": 41
} | (*
Copyright 2020 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Coercions.fsti.checked",
"Steel.MonotonicReference.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"prims.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti... | [
{
"abbrev": true,
"full_module": "Steel.MonotonicReference",
"short_module": "MR"
},
{
"abbrev": true,
"full_module": "FStar.Preorder",
"short_module": "Preorder"
},
{
"abbrev": false,
"full_module": "Steel.ST.Coercions",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | r: Steel.ST.MonotonicReference.ref a p -> x: a -> Steel.ST.Effect.ST Prims.unit | Steel.ST.Effect.ST | [] | [] | [
"FStar.Preorder.preorder",
"FStar.Ghost.erased",
"Steel.ST.MonotonicReference.ref",
"Steel.ST.Coercions.coerce_steel",
"Prims.unit",
"Steel.Effect.Common.VUnit",
"Steel.Effect.Common.to_vprop'",
"Steel.MonotonicReference.pts_to_sl",
"Steel.FractionalPermission.full_perm",
"FStar.Ghost.reveal",
"... | [] | false | true | false | false | false | let write (#a: Type) (#p: Preorder.preorder a) (#v: erased a) (r: ref a p) (x: a)
: ST unit
(pts_to r full_perm v)
(fun v -> pts_to r full_perm x)
(requires p v x)
(ensures fun _ -> True) =
| coerce_steel (fun _ -> MR.write r x) | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.validate_bitsum_cases_t | val validate_bitsum_cases_t
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(#from: nat)
(b: bitsum' cl from)
: Tot (Type u#(r + 1)) | val validate_bitsum_cases_t
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(#from: nat)
(b: bitsum' cl from)
: Tot (Type u#(r + 1)) | let validate_bitsum_cases_t
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(#from: nat)
(b: bitsum' cl from)
: Tot (Type u#(r+1))
= (u: (bitsum'_key_type b -> Tot (Type u#r))) ->
(f: ((x: bitsum'_key_type b) -> Tot (k: parser_kind & parser k (u x)))) ->
(v: ((x: bitsum'_key_type b) -> Tot (validator (dsnd (... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 69,
"end_line": 47,
"start_col": 0,
"start_line": 36
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_mod... | {
"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 | b: LowParse.Spec.BitSum.bitsum' cl from -> Type | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"Prims.nat",
"LowParse.Spec.BitSum.bitsum'",
"LowParse.Spec.BitSum.bitsum'_key_type",
"Prims.dtuple2",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Low.Base.validator",
"Prims.__proj__Mkdtuple2__item___1",
"F... | [] | false | false | false | false | true | let validate_bitsum_cases_t
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(#from: nat)
(b: bitsum' cl from)
: Tot (Type u#(r + 1)) =
|
u: (bitsum'_key_type b -> Tot (Type u#r)) ->
f: (x: bitsum'_key_type b -> Tot (k: parser_kind & parser k (u x))) ->
v: (x: bitsum'_key_type b -> Tot (validator (dsnd (f x)))) ->
x: parse_filter_refine (filter_bitsum' b)
-> Tot (validator (dsnd (f (bitsum'_key_of_t b (synth_bitsum' b x))))) | false |
Vale.PPC64LE.Regs.fst | Vale.PPC64LE.Regs.equal | val equal (regs1:t) (regs2:t) : prop0 | val equal (regs1:t) (regs2:t) : prop0 | let equal regs1 regs2 = feq regs1 regs2 | {
"file_name": "vale/code/arch/ppc64le/Vale.PPC64LE.Regs.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 39,
"end_line": 5,
"start_col": 0,
"start_line": 5
} | module Vale.PPC64LE.Regs
open Vale.PPC64LE.Machine_s
open FStar.FunctionalExtensionality | {
"checked_file": "/",
"dependencies": [
"Vale.PPC64LE.Machine_s.fst.checked",
"prims.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.FunctionalExtensionality.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.PPC64LE.Regs.fst"
} | [
{
"abbrev": false,
"full_module": "FStar.FunctionalExtensionality",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.PPC64LE.Machine_s",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.FunctionalExtensionality",
"short_module": "F"
},
{
... | {
"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 | regs1: Vale.PPC64LE.Regs.t -> regs2: Vale.PPC64LE.Regs.t -> Vale.Def.Prop_s.prop0 | Prims.Tot | [
"total"
] | [] | [
"Vale.PPC64LE.Regs.t",
"FStar.FunctionalExtensionality.feq",
"Vale.PPC64LE.Machine_s.reg",
"Vale.PPC64LE.Machine_s.nat64",
"Vale.Def.Prop_s.prop0"
] | [] | false | false | false | true | false | let equal regs1 regs2 =
| feq regs1 regs2 | false |
Steel.ST.MonotonicReference.fst | Steel.ST.MonotonicReference.share | val share (#inames:_)
(#a:Type)
(#p:Preorder.preorder a)
(r:ref a p)
(f:perm)
(v:Ghost.erased a)
: STGhostT unit inames
(pts_to r f v)
(fun _ -> pts_to r (half_perm f) v `star` pts_to r (half_perm f) v) | val share (#inames:_)
(#a:Type)
(#p:Preorder.preorder a)
(r:ref a p)
(f:perm)
(v:Ghost.erased a)
: STGhostT unit inames
(pts_to r f v)
(fun _ -> pts_to r (half_perm f) v `star` pts_to r (half_perm f) v) | let share (#inames:_)
(#a:Type)
(#p:Preorder.preorder a)
(r:ref a p)
(f:perm)
(v:Ghost.erased a)
: STGhostT unit inames
(pts_to r f v)
(fun _ -> pts_to r (half_perm f) v `star` pts_to r (half_perm f) v)
= coerce_ghost (fun _ -> MR.share r f v) | {
"file_name": "lib/steel/Steel.ST.MonotonicReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 42,
"end_line": 100,
"start_col": 0,
"start_line": 91
} | (*
Copyright 2020 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Coercions.fsti.checked",
"Steel.MonotonicReference.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"prims.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti... | [
{
"abbrev": true,
"full_module": "Steel.MonotonicReference",
"short_module": "MR"
},
{
"abbrev": true,
"full_module": "FStar.Preorder",
"short_module": "Preorder"
},
{
"abbrev": false,
"full_module": "Steel.ST.Coercions",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
r: Steel.ST.MonotonicReference.ref a p ->
f: Steel.FractionalPermission.perm ->
v: FStar.Ghost.erased a
-> Steel.ST.Effect.Ghost.STGhostT Prims.unit | Steel.ST.Effect.Ghost.STGhostT | [] | [] | [
"Steel.Memory.inames",
"FStar.Preorder.preorder",
"Steel.ST.MonotonicReference.ref",
"Steel.FractionalPermission.perm",
"FStar.Ghost.erased",
"Steel.ST.Coercions.coerce_ghost",
"Prims.unit",
"Steel.Effect.Common.VUnit",
"Steel.Effect.Common.to_vprop'",
"Steel.MonotonicReference.pts_to_sl",
"FSta... | [] | false | true | false | false | false | let share
(#inames: _)
(#a: Type)
(#p: Preorder.preorder a)
(r: ref a p)
(f: perm)
(v: Ghost.erased a)
: STGhostT unit
inames
(pts_to r f v)
(fun _ -> (pts_to r (half_perm f) v) `star` (pts_to r (half_perm f) v)) =
| coerce_ghost (fun _ -> MR.share r f v) | false |
Steel.ST.MonotonicReference.fst | Steel.ST.MonotonicReference.gather | val gather (#inames:_)
(#a:Type)
(#p:Preorder.preorder a)
(r:ref a p)
(f g:perm)
(v:Ghost.erased a)
: STGhostT unit inames
(pts_to r f v `star` pts_to r g v)
(fun _ -> pts_to r (sum_perm f g) v) | val gather (#inames:_)
(#a:Type)
(#p:Preorder.preorder a)
(r:ref a p)
(f g:perm)
(v:Ghost.erased a)
: STGhostT unit inames
(pts_to r f v `star` pts_to r g v)
(fun _ -> pts_to r (sum_perm f g) v) | let gather (#inames:_)
(#a:Type)
(#p:Preorder.preorder a)
(r:ref a p)
(f g:perm)
(v:Ghost.erased a)
: STGhostT unit inames
(pts_to r f v `star` pts_to r g v)
(fun _ -> pts_to r (sum_perm f g) v)
= coerce_ghost (fun _ -> MR.gather #inames #a #p r f g v) | {
"file_name": "lib/steel/Steel.ST.MonotonicReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 59,
"end_line": 111,
"start_col": 0,
"start_line": 102
} | (*
Copyright 2020 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Coercions.fsti.checked",
"Steel.MonotonicReference.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"prims.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti... | [
{
"abbrev": true,
"full_module": "Steel.MonotonicReference",
"short_module": "MR"
},
{
"abbrev": true,
"full_module": "FStar.Preorder",
"short_module": "Preorder"
},
{
"abbrev": false,
"full_module": "Steel.ST.Coercions",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
r: Steel.ST.MonotonicReference.ref a p ->
f: Steel.FractionalPermission.perm ->
g: Steel.FractionalPermission.perm ->
v: FStar.Ghost.erased a
-> Steel.ST.Effect.Ghost.STGhostT Prims.unit | Steel.ST.Effect.Ghost.STGhostT | [] | [] | [
"Steel.Memory.inames",
"FStar.Preorder.preorder",
"Steel.ST.MonotonicReference.ref",
"Steel.FractionalPermission.perm",
"FStar.Ghost.erased",
"Steel.ST.Coercions.coerce_ghost",
"Prims.unit",
"Steel.Effect.Common.star",
"Steel.Effect.Common.VUnit",
"Steel.Effect.Common.to_vprop'",
"Steel.Monotoni... | [] | false | true | false | false | false | let gather
(#inames: _)
(#a: Type)
(#p: Preorder.preorder a)
(r: ref a p)
(f g: perm)
(v: Ghost.erased a)
: STGhostT unit
inames
((pts_to r f v) `star` (pts_to r g v))
(fun _ -> pts_to r (sum_perm f g) v) =
| coerce_ghost (fun _ -> MR.gather #inames #a #p r f g v) | false |
Hacl.Spec.RSAPSS.fst | Hacl.Spec.RSAPSS.rsapss_sign_lemma | val rsapss_sign_lemma:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> sLen:size_nat
-> salt:lseq uint8 sLe... | val rsapss_sign_lemma:
#t:limb_t
-> a:Hash.hash_alg{S.hash_is_supported a}
-> modBits:size_nat
-> eBits:size_nat
-> dBits:size_nat{skey_len_pre t modBits eBits dBits}
-> skey:lbignum t (2 * blocks modBits (bits t) + blocks eBits (bits t) + blocks dBits (bits t))
-> sLen:size_nat
-> salt:lseq uint8 sLe... | let rsapss_sign_lemma #t a modBits eBits dBits skey sLen salt msgLen msg =
let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let n = sub skey 0 nLen in
let r2 = sub skey nLen nLen in
let e = sub skey (nLen +... | {
"file_name": "code/rsapss/Hacl.Spec.RSAPSS.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 482,
"start_col": 0,
"start_line": 433
} | module Hacl.Spec.RSAPSS
open FStar.Mul
open Lib.IntTypes
open Lib.Sequence
open Hacl.Spec.Bignum.Definitions
open Hacl.Spec.Bignum
open Hacl.Spec.Bignum.Exponentiation
module S = Spec.RSAPSS
module BB = Hacl.Spec.Bignum.Base
module SM = Hacl.Spec.Bignum.Montgomery
module BSeq = Lib.ByteSequence
module Hash = Spec.A... | {
"checked_file": "/",
"dependencies": [
"Spec.RSAPSS.fst.checked",
"Spec.Hash.Definitions.fst.checked",
"Spec.Agile.Hash.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.c... | [
{
"abbrev": true,
"full_module": "Spec.Agile.Hash",
"short_module": "Hash"
},
{
"abbrev": true,
"full_module": "Lib.ByteSequence",
"short_module": "BSeq"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"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: Spec.Hash.Definitions.hash_alg{Spec.RSAPSS.hash_is_supported a} ->
modBits: Lib.IntTypes.size_nat ->
eBits: Lib.IntTypes.size_nat ->
dBits: Lib.IntTypes.size_nat{Hacl.Spec.RSAPSS.skey_len_pre t modBits eBits dBits} ->
skey:
Hacl.Spec.Bignum.Definitions.lbignum t
(2 * Hacl.Spec.Bign... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Hacl.Spec.Bignum.Definitions.limb_t",
"Spec.Hash.Definitions.hash_alg",
"Prims.b2t",
"Spec.RSAPSS.hash_is_supported",
"Lib.IntTypes.size_nat",
"Hacl.Spec.RSAPSS.skey_len_pre",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.Bignum.Definitions.blocks",
... | [] | true | false | true | false | false | let rsapss_sign_lemma #t a modBits eBits dBits skey sLen salt msgLen msg =
| let bits = bits t in
let numb = numbytes t in
let nLen = blocks modBits bits in
let eLen = blocks eBits bits in
let dLen = blocks dBits bits in
let n = sub skey 0 nLen in
let r2 = sub skey nLen nLen in
let e = sub skey (nLen + nLen) eLen in
let d = sub skey (nLen + nLen + eLen) dLen in
let k = blocks modBits 8 in
let e... | false |
Steel.ST.MonotonicReference.fst | Steel.ST.MonotonicReference.witness' | val witness':
#inames: _ ->
#a: Type ->
#q: perm ->
#p: Preorder.preorder a ->
r: erased (ref a p) ->
fact: stable_property p ->
v: erased a ->
pf: squash (fact v) ->
unit
-> Steel.Effect.Atomic.SteelAtomicUT (witnessed r fact)
inames
(pts_to r q v)
(fun _ -> pts_... | val witness':
#inames: _ ->
#a: Type ->
#q: perm ->
#p: Preorder.preorder a ->
r: erased (ref a p) ->
fact: stable_property p ->
v: erased a ->
pf: squash (fact v) ->
unit
-> Steel.Effect.Atomic.SteelAtomicUT (witnessed r fact)
inames
(pts_to r q v)
(fun _ -> pts_... | let witness' (#inames: _)
(#a:Type)
(#q:perm)
(#p:Preorder.preorder a)
(r:erased (ref a p))
(fact:stable_property p)
(v:erased a)
(pf:squash (fact v))
(_:unit)
: Steel.Effect.Atomic.SteelAtomicUT (witnessed r fact) inames
... | {
"file_name": "lib/steel/Steel.ST.MonotonicReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 43,
"end_line": 69,
"start_col": 0,
"start_line": 57
} | (*
Copyright 2020 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Coercions.fsti.checked",
"Steel.MonotonicReference.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"prims.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti... | [
{
"abbrev": true,
"full_module": "Steel.MonotonicReference",
"short_module": "MR"
},
{
"abbrev": true,
"full_module": "FStar.Preorder",
"short_module": "Preorder"
},
{
"abbrev": false,
"full_module": "Steel.ST.Coercions",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
r: FStar.Ghost.erased (Steel.ST.MonotonicReference.ref a p) ->
fact: Steel.ST.MonotonicReference.stable_property p ->
v: FStar.Ghost.erased a ->
pf: Prims.squash (fact (FStar.Ghost.reveal v)) ->
_: Prims.unit
-> Steel.Effect.Atomic.SteelAtomicUT
(Steel.ST.MonotonicReference.witnessed (FStar.G... | Steel.Effect.Atomic.SteelAtomicUT | [] | [] | [
"Steel.Memory.inames",
"Steel.FractionalPermission.perm",
"FStar.Preorder.preorder",
"FStar.Ghost.erased",
"Steel.ST.MonotonicReference.ref",
"Steel.ST.MonotonicReference.stable_property",
"Prims.squash",
"FStar.Ghost.reveal",
"Prims.unit",
"Steel.MonotonicReference.witness",
"Steel.MonotonicRef... | [] | false | true | false | false | false | let witness'
(#inames: _)
(#a: Type)
(#q: perm)
(#p: Preorder.preorder a)
(r: erased (ref a p))
(fact: stable_property p)
(v: erased a)
(pf: squash (fact v))
(_: unit)
: Steel.Effect.Atomic.SteelAtomicUT (witnessed r fact)
inames
(pts_to r q v)
... | MR.witness #inames #a #q #p r fact v pf | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.validate_bitsum_cases_bitstop | val validate_bitsum_cases_bitstop (#tot: pos) (#t: eqtype) (cl: uint_t tot t)
: Tot (validate_bitsum_cases_t u#r #tot #t #cl #0 (BitStop ())) | val validate_bitsum_cases_bitstop (#tot: pos) (#t: eqtype) (cl: uint_t tot t)
: Tot (validate_bitsum_cases_t u#r #tot #t #cl #0 (BitStop ())) | let validate_bitsum_cases_bitstop
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
: Tot (validate_bitsum_cases_t u#r #tot #t #cl #0 (BitStop ()))
= fun u f v x #rrel #rel sl pos ->
v () sl pos | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 13,
"end_line": 56,
"start_col": 0,
"start_line": 50
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | cl: LowParse.BitFields.uint_t tot t
-> LowParse.Low.BitSum.validate_bitsum_cases_t (LowParse.Spec.BitSum.BitStop ()) | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"LowParse.Spec.BitSum.bitsum'_key_type",
"LowParse.Spec.BitSum.BitStop",
"Prims.dtuple2",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Low.Base.validator",
"Prims.__proj__Mkdtuple2__item___1",
"FStar.Pervasives... | [] | false | false | false | false | false | let validate_bitsum_cases_bitstop (#tot: pos) (#t: eqtype) (cl: uint_t tot t)
: Tot (validate_bitsum_cases_t u#r #tot #t #cl #0 (BitStop ())) =
| fun u f v x #rrel #rel sl pos -> v () sl pos | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.validate_bitsum_cases_bitfield | val validate_bitsum_cases_bitfield
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(sz: nat{sz > 0 /\ sz <= bitsum'_size /\ bitsum'_size <= tot})
(rest: bitsum' cl (bitsum'_size - sz))
(phi: validate_bitsum_cases_t u#r rest)
: Tot (validate_bitsum_cases_t u#... | val validate_bitsum_cases_bitfield
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(sz: nat{sz > 0 /\ sz <= bitsum'_size /\ bitsum'_size <= tot})
(rest: bitsum' cl (bitsum'_size - sz))
(phi: validate_bitsum_cases_t u#r rest)
: Tot (validate_bitsum_cases_t u#... | let validate_bitsum_cases_bitfield
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(sz: nat { sz > 0 /\ sz <= bitsum'_size /\ bitsum'_size <= tot })
(rest: bitsum' cl (bitsum'_size - sz))
(phi: validate_bitsum_cases_t u#r rest)
: Tot (validate_bitsum_cases_t u#r (BitField sz rest))
= fun u... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 7,
"end_line": 75,
"start_col": 0,
"start_line": 59
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
cl: LowParse.BitFields.uint_t tot t ->
bitsum'_size: Prims.nat ->
sz: Prims.nat{sz > 0 /\ sz <= bitsum'_size /\ bitsum'_size <= tot} ->
rest: LowParse.Spec.BitSum.bitsum' cl (bitsum'_size - sz) ->
phi: LowParse.Low.BitSum.validate_bitsum_cases_t rest
-> LowParse.Low.BitSum.validate_bitsum_cases_t... | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.BitSum.bitsum'",
"Prims.op_Subtraction",
"LowParse.Low.BitSum.validate_bitsum_cases_t",
"LowParse.Spec.BitSum.bitsum'_key_type",... | [] | false | false | false | false | false | let validate_bitsum_cases_bitfield
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(sz: nat{sz > 0 /\ sz <= bitsum'_size /\ bitsum'_size <= tot})
(rest: bitsum' cl (bitsum'_size - sz))
(phi: validate_bitsum_cases_t u#r rest)
: Tot (validate_bitsum_cases_t u#... | fun u f v x #rrel #rel sl pos ->
phi (fun x -> u (coerce (bitsum'_key_type (BitField sz rest)) x))
(fun x -> f (coerce (bitsum'_key_type (BitField sz rest)) x))
(fun x -> v (coerce (bitsum'_key_type (BitField sz rest)) x))
x
sl
pos | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.validate_bitsum' | val validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: parser k t)
(v: validator p)
(r: leaf_reader p)
(phi: filter_bitsum'_t b)
: Tot (validator (parse_bitsum' b p)) | val validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: parser k t)
(v: validator p)
(r: leaf_reader p)
(phi: filter_bitsum'_t b)
: Tot (validator (parse_bitsum' b p)) | let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: parser k t)
(v: validator p)
(r: leaf_reader p)
(phi: filter_bitsum'_t b)
: Tot (validator (parse_bitsum' b p))
= synth_bitsum'_injective b;
validate_synth
(validate_filter
v
... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 6,
"end_line": 30,
"start_col": 0,
"start_line": 11
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16" | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_module": "LowParse.Spec.BitSum",
"short_module": null
},
{
"abbrev": false,
"full_mo... | {
"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 |
b: LowParse.Spec.BitSum.bitsum' cl tot ->
v: LowParse.Low.Base.validator p ->
r: LowParse.Low.Base.leaf_reader p ->
phi: LowParse.Spec.BitSum.filter_bitsum'_t b
-> LowParse.Low.Base.validator (LowParse.Spec.BitSum.parse_bitsum' b p) | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"LowParse.Spec.BitSum.bitsum'",
"LowParse.Spec.Base.parser_kind",
"LowParse.Spec.Base.parser",
"LowParse.Low.Base.validator",
"LowParse.Low.Base.leaf_reader",
"LowParse.Spec.BitSum.filter_bitsum'_t",
"LowParse.Low.Combinators.validate_synth... | [] | false | false | false | false | false | let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: parser k t)
(v: validator p)
(r: leaf_reader p)
(phi: filter_bitsum'_t b)
: Tot (validator (parse_bitsum' b p)) =
| synth_bitsum'_injective b;
validate_synth (validate_filter v r (filter_bitsum' b) (fun x -> phi x)) (synth_bitsum' b) () | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.validate_bitsum_cases_bitsum'_t | val validate_bitsum_cases_bitsum'_t
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' cl... | val validate_bitsum_cases_bitsum'_t
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' cl... | let validate_bitsum_cases_bitsum'_t
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat { key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot })
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' cl (bitsum'_size - key_size))))... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 131,
"end_line": 123,
"start_col": 0,
"start_line": 106
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_modu... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
cl: LowParse.BitFields.uint_t tot t ->
bitsum'_size: Prims.nat ->
key: Prims.eqtype ->
key_size: Prims.nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot} ->
e: LowParse.Spec.Enum.enum key (LowParse.BitFields.bitfield cl key_size) ->
payload:
(_: LowParse.Spec.Enum.enum_k... | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Enum.enum",
"LowParse.BitFields.bitfield",
"LowParse.Spec.Enum.enum_key",
"LowParse.Spec.BitSum.bitsum'",
"Prims.op_Subtractio... | [] | false | false | false | false | true | let validate_bitsum_cases_bitsum'_t
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' cl... |
u: (bitsum'_key_type (BitSum' key key_size e payload) -> Tot (Type u#r)) ->
f:
(x: bitsum'_key_type (BitSum' key key_size e payload) -> Tot (k: parser_kind & parser k (u x))
) ->
v: (x: bitsum'_key_type (BitSum' key key_size e payload) -> Tot (validator (dsnd (f x)))) ->
x:
parse_filt... | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.validate_bitsum_cases_bitsum'_intro | val validate_bitsum_cases_bitsum'_intro
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum... | val validate_bitsum_cases_bitsum'_intro
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum... | let validate_bitsum_cases_bitsum'_intro
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat { key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot })
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' cl (bitsum'_size - key_size... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 25,
"end_line": 139,
"start_col": 0,
"start_line": 126
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_modu... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
cl: LowParse.BitFields.uint_t tot t ->
bitsum'_size: Prims.nat ->
key: Prims.eqtype ->
key_size: Prims.nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot} ->
e: LowParse.Spec.Enum.enum key (LowParse.BitFields.bitfield cl key_size) ->
payload:
(_: LowParse.Spec.Enum.enum_k... | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Enum.enum",
"LowParse.BitFields.bitfield",
"LowParse.Spec.Enum.enum_key",
"LowParse.Spec.BitSum.bitsum'",
"Prims.op_Subtractio... | [] | false | false | false | false | false | let validate_bitsum_cases_bitsum'_intro
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum... | fun u f v x #rrel #rel sl pos ->
let xr = cl.bitfield_eq_lhs x (bitsum'_size - key_size) bitsum'_size in
phi u f v x xr sl pos | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.validate_bitsum_cases_bitsum'_nil | val validate_bitsum_cases_bitsum'_nil
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' ... | val validate_bitsum_cases_bitsum'_nil
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' ... | let validate_bitsum_cases_bitsum'_nil
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat { key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot })
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' cl (bitsum'_size - key_size))... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 40,
"end_line": 155,
"start_col": 0,
"start_line": 142
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_modu... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
cl: LowParse.BitFields.uint_t tot t ->
bitsum'_size: Prims.nat ->
key: Prims.eqtype ->
key_size: Prims.nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot} ->
e: LowParse.Spec.Enum.enum key (LowParse.BitFields.bitfield cl key_size) ->
payload:
(_: LowParse.Spec.Enum.enum_k... | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Enum.enum",
"LowParse.BitFields.bitfield",
"LowParse.Spec.Enum.enum_key",
"LowParse.Spec.BitSum.bitsum'",
"Prims.op_Subtractio... | [] | false | false | false | false | false | let validate_bitsum_cases_bitsum'_nil
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' ... | (fun u f v x xr #rrel #rel sl pos ->
assert False;
validator_error_generic) | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.mk_validate_bitsum_cases_t' | val mk_validate_bitsum_cases_t'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(#bitsum'_size: nat)
(b: bitsum' cl bitsum'_size)
: Tot (validate_bitsum_cases_t u#r b) (decreases b) | val mk_validate_bitsum_cases_t'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(#bitsum'_size: nat)
(b: bitsum' cl bitsum'_size)
: Tot (validate_bitsum_cases_t u#r b) (decreases b) | let rec mk_validate_bitsum_cases_t'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(#bitsum'_size: nat)
(b: bitsum' cl bitsum'_size)
: Tot (validate_bitsum_cases_t u#r b)
(decreases b)
= match b with
| BitStop _ -> validate_bitsum_cases_bitstop cl
| BitField sz rest -> validate_bitsum_cases_bitfield cl bi... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 229,
"end_line": 258,
"start_col": 0,
"start_line": 246
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_modu... | {
"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 | b: LowParse.Spec.BitSum.bitsum' cl bitsum'_size
-> Prims.Tot (LowParse.Low.BitSum.validate_bitsum_cases_t b) | Prims.Tot | [
"total",
""
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"Prims.nat",
"LowParse.Spec.BitSum.bitsum'",
"Prims.squash",
"Prims.eq2",
"Prims.int",
"LowParse.Low.BitSum.validate_bitsum_cases_bitstop",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.op_LessThanOrEqual",
"Prims.op_Su... | [
"recursion"
] | false | false | false | false | false | let rec mk_validate_bitsum_cases_t'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(#bitsum'_size: nat)
(b: bitsum' cl bitsum'_size)
: Tot (validate_bitsum_cases_t u#r b) (decreases b) =
| match b with
| BitStop _ -> validate_bitsum_cases_bitstop cl
| BitField sz rest ->
validate_bitsum_cases_bitfield cl bitsum'_size sz rest (mk_validate_bitsum_cases_t' rest)
| BitSum' key key_size e payload ->
validate_bitsum_cases_bitsum'_intro cl
bitsum'_size
key
key_size
e
payload
(mk_vali... | false |
Steel.ST.MonotonicReference.fst | Steel.ST.MonotonicReference.alloc | val alloc (#a:Type) (p:Preorder.preorder a) (v:a)
: STT (ref a p) emp (fun r -> pts_to r full_perm v) | val alloc (#a:Type) (p:Preorder.preorder a) (v:a)
: STT (ref a p) emp (fun r -> pts_to r full_perm v) | let alloc (#a:Type) (p:Preorder.preorder a) (v:a)
: STT (ref a p) emp (fun r -> pts_to r full_perm v)
= let x = coerce_steel (fun _ -> MR.alloc p v) in
return x | {
"file_name": "lib/steel/Steel.ST.MonotonicReference.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 12,
"end_line": 39,
"start_col": 0,
"start_line": 36
} | (*
Copyright 2020 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": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Coercions.fsti.checked",
"Steel.MonotonicReference.fsti.checked",
"Steel.Effect.Atomic.fsti.checked",
"prims.fst.checked",
"FStar.Preorder.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Ghost.fsti... | [
{
"abbrev": true,
"full_module": "Steel.MonotonicReference",
"short_module": "MR"
},
{
"abbrev": true,
"full_module": "FStar.Preorder",
"short_module": "Preorder"
},
{
"abbrev": false,
"full_module": "Steel.ST.Coercions",
"short_module": null
},
{
"abbrev": false,... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | p: FStar.Preorder.preorder a -> v: a -> Steel.ST.Effect.STT (Steel.ST.MonotonicReference.ref a p) | Steel.ST.Effect.STT | [] | [] | [
"FStar.Preorder.preorder",
"Steel.ST.Util.return",
"Steel.ST.MonotonicReference.ref",
"FStar.Ghost.hide",
"FStar.Set.set",
"Steel.Memory.iname",
"FStar.Set.empty",
"Steel.ST.MonotonicReference.pts_to",
"Steel.FractionalPermission.full_perm",
"Steel.Effect.Common.vprop",
"Steel.MonotonicReference... | [] | false | true | false | false | false | let alloc (#a: Type) (p: Preorder.preorder a) (v: a)
: STT (ref a p) emp (fun r -> pts_to r full_perm v) =
| let x = coerce_steel (fun _ -> MR.alloc p v) in
return x | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.mk_validate_bitsum_cases_bitsum'_t' | val mk_validate_bitsum_cases_bitsum'_t'
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum... | val mk_validate_bitsum_cases_bitsum'_t'
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum... | let rec mk_validate_bitsum_cases_bitsum'_t'
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat { key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot })
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' cl (bitsum'_size - key_... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 137,
"end_line": 242,
"start_col": 0,
"start_line": 208
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_modu... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
cl: LowParse.BitFields.uint_t tot t ->
bitsum'_size: Prims.nat ->
key: Prims.eqtype ->
key_size: Prims.nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot} ->
e: LowParse.Spec.Enum.enum key (LowParse.BitFields.bitfield cl key_size) ->
payload:
(_: LowParse.Spec.Enum.enum_k... | Prims.Tot | [
"total",
""
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Enum.enum",
"LowParse.BitFields.bitfield",
"LowParse.Spec.Enum.enum_key",
"LowParse.Spec.BitSum.bitsum'",
"Prims.op_Subtractio... | [
"recursion"
] | false | false | false | false | false | let rec mk_validate_bitsum_cases_bitsum'_t'
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bi... | bitsum_wellfoundedness (BitSum' key key_size e payload);
match l2 with
| [] ->
[@@ inline_let ]let _ = L.append_l_nil l1 in
validate_bitsum_cases_bitsum'_nil cl bitsum'_size key key_size e payload ()
| (k, r) :: q ->
[@@ inline_let ]let _ =
enum_repr_of_key_append_cons e l1 (k, r) q;
L.append_assoc l1 [(k... | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.validate_bitsum_cases_bitsum_gen | val validate_bitsum_cases_bitsum_gen
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(key_of: (x: enum_repr e -> Tot (y: enu... | val validate_bitsum_cases_bitsum_gen
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(key_of: (x: enum_repr e -> Tot (y: enu... | let validate_bitsum_cases_bitsum_gen
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat { key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot })
(e: enum key (bitfield cl key_size))
(key_of: ((x: enum_repr e) -> Tot (y: enum_key e { y == enum_key_of_... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 17,
"end_line": 100,
"start_col": 0,
"start_line": 78
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": false,
"full_mod... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
cl: LowParse.BitFields.uint_t tot t ->
bitsum'_size: Prims.nat ->
key: Prims.eqtype ->
key_size: Prims.nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot} ->
e: LowParse.Spec.Enum.enum key (LowParse.BitFields.bitfield cl key_size) ->
key_of:
(x: LowParse.Spec.Enum.enum_re... | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Enum.enum",
"LowParse.BitFields.bitfield",
"LowParse.Spec.Enum.enum_repr",
"LowParse.Spec.Enum.enum_key",
"Prims.eq2",
"LowP... | [] | false | false | false | false | false | let validate_bitsum_cases_bitsum_gen
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(key_of: (x: enum_repr e -> Tot (y: enu... | fun u f v x_ #rrel #rel sl pos ->
[@@ inline_let ]let r = cl.get_bitfield x_ (bitsum'_size - key_size) bitsum'_size in
[@@ inline_let ]let k = key_of r in
destr_payload k
(fun x -> u (bitsum'_key_type_intro_BitSum' cl bitsum'_size key key_size e payload (| k, x |)))
(fun x -> f (bitsum'_key_type_intro_Bit... | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.valid_bitsum_elim | val valid_bitsum_elim
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_of... | val valid_bitsum_elim
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_of... | let valid_bitsum_elim
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_of_tag)
(p: parser kt t)
(f: (x: b... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 43,
"end_line": 442,
"start_col": 0,
"start_line": 392
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_modu... | {
"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 |
b: LowParse.Spec.BitSum.bitsum' cl tot ->
tag_of_data: (_: data -> LowParse.Spec.BitSum.bitsum'_type b) ->
type_of_tag: (_: LowParse.Spec.BitSum.bitsum'_key_type b -> Type) ->
synth_case: LowParse.Spec.BitSum.synth_case_t b data tag_of_data type_of_tag ->
p: LowParse.Spec.Base.parser kt t ->
f:... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"LowParse.Spec.BitSum.bitsum'",
"LowParse.Spec.BitSum.bitsum'_type",
"LowParse.Spec.BitSum.bitsum'_key_type",
"LowParse.Spec.BitSum.synth_case_t",
"LowParse.Spec.Base.parser",
"Prims.dtuple2",
"FStar.Mono... | [] | false | false | true | false | false | let valid_bitsum_elim
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_of... | valid_bitsum_elim' b tag_of_data type_of_tag synth_case p f h sl pos;
synth_bitsum'_injective b;
assert (valid ((p `parse_filter` (filter_bitsum' b)) `parse_synth` (synth_bitsum' b)) h sl pos);
valid_synth h (p `parse_filter` (filter_bitsum' b)) (synth_bitsum' b) sl pos;
valid_filter h p (filter_bitsum' b) sl pos;
let ... | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.valid_bitsum_elim' | val valid_bitsum_elim'
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_o... | val valid_bitsum_elim'
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_o... | let valid_bitsum_elim'
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_of_tag)
(p: parser kt t)
(f: (x: ... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 70,
"end_line": 390,
"start_col": 0,
"start_line": 353
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_modu... | {
"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 |
b: LowParse.Spec.BitSum.bitsum' cl tot ->
tag_of_data: (_: data -> LowParse.Spec.BitSum.bitsum'_type b) ->
type_of_tag: (_: LowParse.Spec.BitSum.bitsum'_key_type b -> Type) ->
synth_case: LowParse.Spec.BitSum.synth_case_t b data tag_of_data type_of_tag ->
p: LowParse.Spec.Base.parser kt t ->
f:... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"LowParse.Spec.BitSum.bitsum'",
"LowParse.Spec.BitSum.bitsum'_type",
"LowParse.Spec.BitSum.bitsum'_key_type",
"LowParse.Spec.BitSum.synth_case_t",
"LowParse.Spec.Base.parser",
"Prims.dtuple2",
"FStar.Mono... | [] | false | false | true | false | false | let valid_bitsum_elim'
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_o... | valid_facts (parse_bitsum b tag_of_data type_of_tag synth_case p f) h sl pos;
parse_bitsum_eq b tag_of_data type_of_tag synth_case p f (bytes_of_slice_from h sl pos);
valid_facts (parse_bitsum' b p) h sl pos;
let tg = contents (parse_bitsum' b p) h sl pos in
let k = bitsum'_key_of_t b tg in
let pos1 = get_valid_pos (pa... | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.valid_bitsum_intro | val valid_bitsum_intro
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_o... | val valid_bitsum_intro
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_o... | let valid_bitsum_intro
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_of_tag)
(p: parser kt t)
(f: (x: ... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 36,
"end_line": 349,
"start_col": 0,
"start_line": 312
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_modu... | {
"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 |
b: LowParse.Spec.BitSum.bitsum' cl tot ->
tag_of_data: (_: data -> LowParse.Spec.BitSum.bitsum'_type b) ->
type_of_tag: (_: LowParse.Spec.BitSum.bitsum'_key_type b -> Type) ->
synth_case: LowParse.Spec.BitSum.synth_case_t b data tag_of_data type_of_tag ->
p: LowParse.Spec.Base.parser kt t ->
f:... | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"LowParse.Spec.Base.parser_kind",
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"LowParse.Spec.BitSum.bitsum'",
"LowParse.Spec.BitSum.bitsum'_type",
"LowParse.Spec.BitSum.bitsum'_key_type",
"LowParse.Spec.BitSum.synth_case_t",
"LowParse.Spec.Base.parser",
"Prims.dtuple2",
"FStar.Mono... | [] | false | false | true | false | false | let valid_bitsum_intro
(#kt: parser_kind)
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#data: Type)
(tag_of_data: (data -> Tot (bitsum'_type b)))
(type_of_tag: (bitsum'_key_type b -> Tot Type))
(synth_case: synth_case_t b data tag_of_data type_o... | valid_facts (parse_bitsum b tag_of_data type_of_tag synth_case p f) h sl pos;
parse_bitsum_eq b tag_of_data type_of_tag synth_case p f (bytes_of_slice_from h sl pos);
valid_facts (parse_bitsum' b p) h sl pos;
let tg = contents (parse_bitsum' b p) h sl pos in
let k = bitsum'_key_of_t b tg in
let pos1 = get_valid_pos (pa... | false |
Hacl.Impl.K256.Qinv.fst | Hacl.Impl.K256.Qinv.linv_ctx | val linv_ctx (a: LSeq.lseq uint64 0) : Type0 | val linv_ctx (a: LSeq.lseq uint64 0) : Type0 | let linv_ctx (a:LSeq.lseq uint64 0) : Type0 = True | {
"file_name": "code/k256/Hacl.Impl.K256.Qinv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 50,
"end_line": 25,
"start_col": 0,
"start_line": 25
} | module Hacl.Impl.K256.Qinv
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.K256.Scalar
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module SI = Hacl.Spec.K256.Qinv
module SE = Spec.Exponentiation
module BE = Hacl.Impl.Exp... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"Spec.Exponentiation.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Qinv.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Spec.Exponentiation",
"short_module": "SE"
},
{
"abbrev"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | a: Lib.Sequence.lseq Lib.IntTypes.uint64 0 -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.Sequence.lseq",
"Lib.IntTypes.uint64",
"Prims.l_True"
] | [] | false | false | false | false | true | let linv_ctx (a: LSeq.lseq uint64 0) : Type0 =
| True | false |
LowParse.Low.BitSum.fst | LowParse.Low.BitSum.validate_bitsum_cases_bitsum'_cons | val validate_bitsum_cases_bitsum'_cons
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum'... | val validate_bitsum_cases_bitsum'_cons
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum'... | let validate_bitsum_cases_bitsum'_cons
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat { key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot })
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum' cl (bitsum'_size - key_size)... | {
"file_name": "src/lowparse/LowParse.Low.BitSum.fst",
"git_rev": "00217c4a89f5ba56002ba9aa5b4a9d5903bfe9fa",
"git_url": "https://github.com/project-everest/everparse.git",
"project_name": "everparse"
} | {
"end_col": 41,
"end_line": 204,
"start_col": 0,
"start_line": 160
} | module LowParse.Low.BitSum
include LowParse.Low.Combinators
include LowParse.Spec.BitSum
module U32 = FStar.UInt32
module HS = FStar.HyperStack
#push-options "--z3rlimit 16"
inline_for_extraction
let validate_bitsum'
(#tot: pos)
(#t: eqtype)
(#cl: uint_t tot t)
(b: bitsum' cl tot)
(#k: parser_kind)
(#p: ... | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"LowParse.Spec.BitSum.fst.checked",
"LowParse.Low.Combinators.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.HyperSt... | [
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": true,
"full_modu... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false |
cl: LowParse.BitFields.uint_t tot t ->
bitsum'_size: Prims.nat ->
key: Prims.eqtype ->
key_size: Prims.nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot} ->
e: LowParse.Spec.Enum.enum key (LowParse.BitFields.bitfield cl key_size) ->
payload:
(_: LowParse.Spec.Enum.enum_k... | Prims.Tot | [
"total"
] | [] | [
"Prims.pos",
"Prims.eqtype",
"LowParse.BitFields.uint_t",
"Prims.nat",
"Prims.l_and",
"Prims.b2t",
"Prims.op_GreaterThan",
"Prims.op_LessThanOrEqual",
"LowParse.Spec.Enum.enum",
"LowParse.BitFields.bitfield",
"LowParse.Spec.Enum.enum_key",
"LowParse.Spec.BitSum.bitsum'",
"Prims.op_Subtractio... | [] | false | false | false | false | false | let validate_bitsum_cases_bitsum'_cons
(#tot: pos)
(#t: eqtype)
(cl: uint_t tot t)
(bitsum'_size: nat)
(key: eqtype)
(key_size: nat{key_size > 0 /\ key_size <= bitsum'_size /\ bitsum'_size <= tot})
(e: enum key (bitfield cl key_size))
(payload: (enum_key e -> Tot (bitsum'... | fun u f v x xr #rrel #rel sl pos ->
let _ = enum_repr_of_key_append_cons e l1 (k, r) l2 in
[@@ inline_let ]let yr = cl.bitfield_eq_rhs x (bitsum'_size - key_size) bitsum'_size r in
[@@ inline_let ]let cond = (xr <: t) = yr in
[@@ inline_let ]let _ =
assert (cond == true <==>
(cl.get_bitfield x (bits... | false |
Hacl.Impl.K256.Qinv.fst | Hacl.Impl.K256.Qinv.mk_to_k256_scalar_comm_monoid | val mk_to_k256_scalar_comm_monoid:BE.to_comm_monoid U64 4ul 0ul | val mk_to_k256_scalar_comm_monoid:BE.to_comm_monoid U64 4ul 0ul | let mk_to_k256_scalar_comm_monoid : BE.to_comm_monoid U64 4ul 0ul = {
BE.a_spec = S.qelem;
BE.comm_monoid = SI.nat_mod_comm_monoid;
BE.linv_ctx = linv_ctx;
BE.linv = linv;
BE.refl = refl;
} | {
"file_name": "code/k256/Hacl.Impl.K256.Qinv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 1,
"end_line": 42,
"start_col": 0,
"start_line": 36
} | module Hacl.Impl.K256.Qinv
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.K256.Scalar
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module SI = Hacl.Spec.K256.Qinv
module SE = Spec.Exponentiation
module BE = Hacl.Impl.Exp... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"Spec.Exponentiation.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Qinv.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Spec.Exponentiation",
"short_module": "SE"
},
{
"abbrev"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Hacl.Impl.Exponentiation.Definitions.to_comm_monoid Lib.IntTypes.U64
(4ul <: FStar.UInt32.t)
(0ul <: FStar.UInt32.t) | Prims.Tot | [
"total"
] | [] | [
"Hacl.Impl.Exponentiation.Definitions.Mkto_comm_monoid",
"Lib.IntTypes.U64",
"FStar.UInt32.uint_to_t",
"Spec.K256.PointOps.qelem",
"Hacl.Spec.K256.Qinv.nat_mod_comm_monoid",
"Hacl.Impl.K256.Qinv.linv_ctx",
"Hacl.Impl.K256.Qinv.linv",
"Hacl.Impl.K256.Qinv.refl"
] | [] | false | false | false | false | false | let mk_to_k256_scalar_comm_monoid:BE.to_comm_monoid U64 4ul 0ul =
| {
BE.a_spec = S.qelem;
BE.comm_monoid = SI.nat_mod_comm_monoid;
BE.linv_ctx = linv_ctx;
BE.linv = linv;
BE.refl = refl
} | false |
Hacl.Impl.K256.Qinv.fst | Hacl.Impl.K256.Qinv.one_mod | val one_mod : BE.lone_st U64 4ul 0ul mk_to_k256_scalar_comm_monoid | val one_mod : BE.lone_st U64 4ul 0ul mk_to_k256_scalar_comm_monoid | let one_mod ctx one = make_u64_4 one (u64 1, u64 0, u64 0, u64 0) | {
"file_name": "code/k256/Hacl.Impl.K256.Qinv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 65,
"end_line": 47,
"start_col": 0,
"start_line": 47
} | module Hacl.Impl.K256.Qinv
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.K256.Scalar
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module SI = Hacl.Spec.K256.Qinv
module SE = Spec.Exponentiation
module BE = Hacl.Impl.Exp... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"Spec.Exponentiation.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Qinv.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Spec.Exponentiation",
"short_module": "SE"
},
{
"abbrev"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Hacl.Impl.Exponentiation.Definitions.lone_st Lib.IntTypes.U64
4ul
0ul
Hacl.Impl.K256.Qinv.mk_to_k256_scalar_comm_monoid | Prims.Tot | [
"total"
] | [] | [
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"FStar.UInt32.__uint_to_t",
"Hacl.K256.Scalar.make_u64_4",
"FStar.Pervasives.Native.Mktuple4",
"Lib.IntTypes.uint64",
"Lib.IntTypes.u64",
"Prims.unit"
] | [] | false | false | false | false | false | let one_mod ctx one =
| make_u64_4 one (u64 1, u64 0, u64 0, u64 0) | false |
Hacl.Impl.K256.Qinv.fst | Hacl.Impl.K256.Qinv.mk_k256_scalar_concrete_ops | val mk_k256_scalar_concrete_ops:BE.concrete_ops U64 4ul 0ul | val mk_k256_scalar_concrete_ops:BE.concrete_ops U64 4ul 0ul | let mk_k256_scalar_concrete_ops : BE.concrete_ops U64 4ul 0ul = {
BE.to = mk_to_k256_scalar_comm_monoid;
BE.lone = one_mod;
BE.lmul = mul_mod;
BE.lsqr = sqr_mod;
} | {
"file_name": "code/k256/Hacl.Impl.K256.Qinv.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 1,
"end_line": 66,
"start_col": 0,
"start_line": 61
} | module Hacl.Impl.K256.Qinv
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.K256.Scalar
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module S = Spec.K256
module SI = Hacl.Spec.K256.Qinv
module SE = Spec.Exponentiation
module BE = Hacl.Impl.Exp... | {
"checked_file": "/",
"dependencies": [
"Spec.K256.fst.checked",
"Spec.Exponentiation.fsti.checked",
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.K256.Qinv.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked... | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "SD"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Spec.Exponentiation",
"short_module": "SE"
},
{
"abbrev"... | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_el... | false | Hacl.Impl.Exponentiation.Definitions.concrete_ops Lib.IntTypes.U64
(4ul <: FStar.UInt32.t)
(0ul <: FStar.UInt32.t) | Prims.Tot | [
"total"
] | [] | [
"Hacl.Impl.Exponentiation.Definitions.Mkconcrete_ops",
"Lib.IntTypes.U64",
"FStar.UInt32.uint_to_t",
"FStar.Ghost.hide",
"Hacl.Impl.Exponentiation.Definitions.to_comm_monoid",
"Hacl.Impl.K256.Qinv.mk_to_k256_scalar_comm_monoid",
"Hacl.Impl.K256.Qinv.one_mod",
"Hacl.Impl.K256.Qinv.mul_mod",
"Hacl.Imp... | [] | false | false | false | false | false | let mk_k256_scalar_concrete_ops:BE.concrete_ops U64 4ul 0ul =
| { BE.to = mk_to_k256_scalar_comm_monoid; BE.lone = one_mod; BE.lmul = mul_mod; BE.lsqr = sqr_mod } | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.