Module iota_types::crypto
source · Modules§
Structs§
- Defines the compressed version of the public key that we pass around in Iota
- Represents at least a quorum (could be more) of authority signatures. STRONG_THRESHOLD indicates whether to use the quorum threshold for quorum check. When STRONG_THRESHOLD is true, the quorum is valid when the total stake is at least the quorum threshold (2f+1) of the committee; when STRONG_THRESHOLD is false, the quorum is valid when the total stake is at least the validity threshold (f+1) of the committee.
- A wrapper around AuthorityPublicKeyBytes but owns it.
- A wrapper around AuthorityPublicKeyBytes that provides a concise Debug impl.
- Round number of generated randomness.
- A wrapper struct to retrofit in [enum PublicKey] for zkLogin. Useful to construct [struct MultiSigPublicKey].
Enums§
- Unlike [enum Signature], [enum CompressedSignature] does not contain public key.
- Account Keys
Constants§
Traits§
- Trait impl’d by aggregated signatures in asymmetric cryptography.
- Trait impl’d by signatures in asymmetric cryptography.
- AuthoritySignInfoTrait is a trait used specifically for a few structs in messages.rs to template on whether the struct is signed by an authority. We want to limit how those structs can be instantiated on, hence the sealed trait. TODO: We could also add the aggregated signature as another impl of the trait. This will make CertifiedTransaction also an instance of the same struct.
- Cryptographic material with an immediate conversion to/from Base64 strings.
- Trait impl’d by a public / private key pair in asymmetric cryptography.
- Something that we know how to hash and sign.
- Trait impl’d by a key/keypair that can create signatures.
- Trait impl’d by private (secret) keys in asymmetric cryptography.
- Trait impl’d by concrete types that represent digital cryptographic material (keys).
- Trait impl’d by public keys in asymmetric cryptography.
Functions§
- Creates a proof of that the authority account address is owned by the holder of authority key, and also ensures that the authority public key exists. A proof of possession is an authority signature committed over the intent message
intent || message || epoch
(See more at [struct IntentMessage] and [struct Intent]) where the message is constructed asauthority_pubkey_bytes || authority_account_address
. - Generate a keypair from the specified RNG (useful for testing with seedable rngs).
- Generate a random committee key pairs with a given committee size
- Verify proof of possession against the expected intent message, consisting of the authority pubkey and the authority account address.
Type Aliases§
- Type aliases selecting the signature algorithm for the code base.
Attribute Macros§
- Annotating a trait or enum definition with an
#[enum_dispatch]
attribute will register it with the enum_dispatch library, allowing it to be used to generate impl blocks elsewhere.