Expand description
This module provides a generic set of traits for dealing with cryptographic primitives.
For examples on how to use these traits, see the implementations of the
ed25519
modules.
Enums§
- Crypto
Material Error - An error type for key and signature validation issues, see
ValidCryptoMaterial
.
Traits§
- Genesis
- A type family with a by-convention notion of genesis private key.
- Length
- The serialized length of the data that enables macro derived serialization and deserialization.
- Private
Key - A type family for key material that should remain secret and has an
associated type of the
PublicKey
family. - Public
Key - A type for key material that can be publicly shared, and in asymmetric
fashion, can be obtained from a
PrivateKey
reference. This convertibility requirement ensures the existence of a deterministic, canonical public key construction from a private key. - Signature
- A type family for signature material that knows which public key type is needed to verify it, and given such a public key, knows how to verify.
- Signing
Key - A type family of valid keys that know how to sign.
- Uniform
- A type family for schemes which know how to generate key material from
a cryptographically-secure
CryptoRng
. - VRFPrivate
Key - Private key for VRF
- VRFProof
- The proof of VRF
- VRFPublic
Key - Public key for VRF
- Valid
Crypto Material - Key or more generally crypto material with a notion of byte validation.
- Valid
Crypto Material String Ext - An extension to to/from Strings for
ValidCryptoMaterial
. - Verifiable
Delay Function - The trait for VDF.
- Verifying
Key - A type family of public keys that are used for signing.
Functions§
- vrf_
number_ with_ nonce - Hash the vrf output and a nonce within the proposer’s voting power to compute a hash value as its priority. This is used in both choosing leaders in a round and electing committees in a term.