package octez-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-libs.crypto-dal/Tezos_crypto_dal/Cryptobox/Internal_for_tests/index.html
Module Cryptobox.Internal_for_tests
Source
The initialisation parameters can be too large for testing purposes. This function creates an unsafe initialisation parameters using default parameters designed to handle test cases.
This function creates an unsafe initialisation parameters for the verifier using default parameters designed to handle test cases.
This function loads in memory the default verifier SRS. The difference with init_verifier_dal
is that the latter loads a SRS that should be only used for tests.
Returns a randomized valid sequence of shards using the random state state
for the given parameters.
polynomials_equal p1 p2
returns true if and only if p1
and p2
represent the same polynomial.
page_proof_equal proof1 proof2
returns true if and only if proof1
and proof2
represent the same proof.
alter_page_proof page_proof
returns a different page proof than the input.
alter_shard_proof shard_proof
returns a different shard proof than the input.
alter_commitment_proof commitment_proof
returns a different commitment proof than the input.
minimum_number_of_shards_to_reconstruct_slot t
returns the minimum number of shards to reconstruct a slot using polynomial_from_shards
.
select_fft_domain domain_size
selects a suitable domain for the FFT.
The domain size domain_size
is expected to be strictly positive. Return (size, power_of_two, remainder)
such that: * If domain_size > 1
, then size
is the smallest integer greater or equal to domain_size
and is of the form 2^a * 3^b * 11^c * 19^d, where:
a ∈ ⟦0, 32⟧, b ∈ {0, 1}, c ∈ {0, 1}, d ∈ {0, 1}
* If domain_size = 1
, then size = 2
. * size = power_of_two * remainder
, power_of_two
is a power of two, and remainder
is not divisible by 2.
val precomputation_equal :
shards_proofs_precomputation ->
shards_proofs_precomputation ->
bool
ensure_validity parameters
returns true if the parameters
are valid. See implementation file for details.
Same as ensure_validity parameters
, except that it returns an error if the parameters
aren't valid and doesn't check the SRS.