package tezos-protocol-003-PsddFKi3
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a
doc/tezos_raw_protocol_003_PsddFKi3/Tezos_raw_protocol_003_PsddFKi3/Seed_repr/index.html
Module Tezos_raw_protocol_003_PsddFKi3.Seed_reprSource
Tezos Protocol Implementation - Random number generation
This is not expected to be a good cryptographic random number generator. In particular this is supposed to be used in situations where the seed is a globaly known information.
The only expected property is: It should be difficult to find a seed such that the generated sequence is a given one.
Random Generation
***************************************************
The state of the random number generator
A random seed, to derive random sequences from
A random sequence, to derive random values from
initialize_new state ident returns a new generator
Generates the next random value in the sequence
Generates the next random value as a bounded int32
Predefined seeds
****************************************************
Returns a new seed by hashing the one passed with a constant.
intial_seeds n generates the first n seeds for which there are no nonces. The first seed is a constant value. The kth seed is the hash of seed (k-1) concatenated with a constant.
Entropy
*************************************************************
A nonce for adding entropy to the generator
val make_nonce :
Tezos_protocol_environment_003_PsddFKi3.MBytes.t ->
nonce Tezos_protocol_environment_003_PsddFKi3.Error_monad.tzresultUse a byte sequence as a nonce
Compute the has of a nonce
check_hash nonce hash is true if the nonce correspond to the hash
For using nonce hashes as keys in the hierarchical database
Predefined nonce
****************************************************
Serializers
*********************************************************