Module crypto_helper

Source
Expand description

Tools and types to abstract the use of the Mithril STM library

Re-exports§

pub use cardano::ColdKeyGenerator;

Modules§

ed25519
Ed25519 cryptographic helpers
tests_setup
Test data builders for Mithril STM types, for testing purpose.

Structs§

CodecError
Error raised when the encoding or decoding fails
MKMap
A map, where the keys and values are merkelized and provable
MKMapProof
A MKMapProof that proves membership of an entry in the merkelized map
MKProof
A Merkle proof
MKTree
A Merkle tree
MKTreeNode
A node of a Merkle tree
MKTreeStoreInMemory
A Merkle tree store in memory
OpCert
Parsed Operational Certificate
ProtocolKey
A ProtocolKey is a wrapped that add Serialization capabilities.
Sum6KesBytes
We need to create this struct because the design of Sum6Kes takes a reference to a mutable pointer. It is therefore not possible to implement Ser/Deser using serde.

Enums§

MKMapNode
A merkelized map node that is used to represent multi layered merkelized map The MKMapNode can be either a MKMap (Merkle map), a MKTree (full Merkle tree) or a MKTreeNode (Merkle tree node, e.g the root of a Merkle tree) Both MKMap and MKTree can generate proofs of membership for elements that they contain, which allows for recursive proof generation for the multiple layers
ProtocolInitializerErrorWrapper
New initializer error
ProtocolRegistrationErrorWrapper
New registration error

Constants§

PROTOCOL_VERSION
The current protocol version

Traits§

MKMapKey
The trait implemented by the keys of a MKMap
MKMapValue
The trait implemented by the values of a MKMap
MKTreeLeafIndexer
The Merkle tree leaves indexer trait
MKTreeStorer
The Merkle tree storer trait
ProtocolKeyCodec
The codec used to serialize/deserialize a ProtocolKey.
SerDeShelleyFileFormat
Trait that allows any structure that implements Serialize and DeserializeOwned to be serialized and deserialized following the Shelly json format.

Functions§

encode_bech32
Encode to bech32 given Human Readable Part (hrp) and data
key_decode_hex
Decode key from hex helper
key_encode_hex
Encode key to hex helper

Type Aliases§

Bytes
Alias for a byte
EraMarkersSigner
A cryptographic signer that is responsible for signing the EraMarkers
EraMarkersVerifier
An era markers verifier that checks the authenticity of era markers stored on the chain
EraMarkersVerifierError
EraMarkersSigner and EraMarkersVerifier related errors.
EraMarkersVerifierSecretKey
Era markers verifier secret key
EraMarkersVerifierSignature
Era markers verifier signature
EraMarkersVerifierVerificationKey
Era markers verifier verification key
KESPeriod
The KES period that is used to check if the KES keys is expired
MKTreeLeafPosition
Alias for a Merkle tree leaf position
ManifestSignature
Manifest signature
ManifestSigner
A cryptographic signer that is responsible for signing the Manifest
ManifestVerifier
A manifest verifier that checks the authenticity of a manifest
ManifestVerifierError
ManifestSigner and ManifestVerifier related errors.
ManifestVerifierSecretKey
Manifest verifier secret key
ManifestVerifierVerificationKey
Manifest verifier verification key
ProtocolAggregateVerificationKey
Wrapper of MithrilStm:StmAggrVerificationKey.
ProtocolAggregationError
Alias of MithrilStm:AggregationError.
ProtocolClerk
Alias of MithrilStm:StmClerk.
ProtocolClosedKeyRegistration
Alias of a wrapper of MithrilStm:ClosedKeyReg.
ProtocolGenesisError
ProtocolGenesisSigner and ProtocolGenesisVerifier related errors.
ProtocolGenesisSecretKey
A protocol Genesis verifier secret key
ProtocolGenesisSignature
A protocol Genesis signature
ProtocolGenesisSigner
A protocol Genesis Signer that is responsible for signing the Genesis Certificate
ProtocolGenesisVerificationKey
A protocol Genesis verification key
ProtocolGenesisVerifier
A protocol Genesis Verifier that is responsible for verifying the Genesis Certificate
ProtocolInitializer
Alias of a wrapper of MithrilStm:StmInitializer.
ProtocolInitializerError
Alias of a wrapper of MithrilCommon:ProtocolInitializerErrorWrapper.
ProtocolKeyRegistration
Alias of a wrapper of MithrilStm:KeyReg.
ProtocolLotteryIndex
Alias of MithrilStm::Index.
ProtocolMkProof
Wrapper of MKProof to add serialization utilities.
ProtocolMultiSignature
Wrapper of MithrilStm:StmAggrSig to add serialization utilities.
ProtocolOpCert
Wrapper of OpCert to add serialization utilities.
ProtocolParameters
Alias of MithrilStm::StmParameters.
ProtocolPartyId
The id of a mithril party.
ProtocolRegistrationError
Alias of a wrapper of MithrilCommon:ProtocolRegistrationErrorWrapper.
ProtocolSigner
Alias of MithrilStm:StmSigner.
ProtocolSignerVerificationKey
Wrapper of MithrilStm:StmVerificationKeyPoP to add serialization utilities.
ProtocolSignerVerificationKeySignature
Wrapper of KES:Sum6KesSig to add serialization utilities.
ProtocolSingleSignature
Wrapper of MithrilStm:StmSig to add serialization utilities.
ProtocolStake
Alias of MithrilStm:Stake.
ProtocolStakeDistribution
A list of Party Id associated with its Stake.
ProtocolVersion
A protocol version