Module crypto

Source

Modules§

bcs_signable_test

Structs§

AuthorityPublicKeyBytes
Defines the compressed version of the public key that we pass around in IOTA.
AuthorityQuorumSignInfo
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.
AuthoritySignInfo
ConciseAuthorityPublicKeyBytes
A wrapper around AuthorityPublicKeyBytes but owns it.
ConciseAuthorityPublicKeyBytesRef
A wrapper around AuthorityPublicKeyBytes that provides a concise Debug impl.
Ed25519IotaSignature
EmptySignInfo
IotaAuthorityStrongQuorumSignInfo
RandomnessRound
Round number of generated randomness.
Secp256k1IotaSignature
Secp256r1IotaSignature
VerificationObligation
ZkLoginAuthenticatorAsBytes
ZkLoginPublicIdentifier
A wrapper struct to retrofit in [enum PublicKey] for zkLogin. Useful to construct [struct MultiSigPublicKey].

Enums§

CompressedSignature
Unlike [enum Signature], [enum CompressedSignature] does not contain public key.
IotaKeyPair
PublicKey
Signature
SignatureScheme

Constants§

DEFAULT_EPOCH_ID
IOTA_PRIV_KEY_PREFIX

Traits§

AggregateAuthenticator
Trait impl’d by aggregated signatures in asymmetric cryptography.
Authenticator
Trait impl’d by signatures in asymmetric cryptography.
AuthoritySignInfoTrait
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.
EncodeDecodeBase64
Cryptographic material with an immediate conversion to/from Base64 strings.
IotaAuthoritySignature
IotaPublicKey
IotaSignature
IotaSignatureInner
KeypairTraits
Trait impl’d by a public / private key pair in asymmetric cryptography.
Signable
Something that we know how to hash and sign.
SignableBytes
Signer
Trait impl’d by a key/keypair that can create signatures.
SigningKey
Trait impl’d by private (secret) keys in asymmetric cryptography.
ToFromBytes
Trait impl’d by concrete types that represent digital cryptographic material (keys).
VerifyingKey
Trait impl’d by public keys in asymmetric cryptography.

Functions§

default_hash
deterministic_random_account_key
generate_proof_of_possession
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 as authority_pubkey_bytes || authority_account_address.
get_account_key_pair
get_authority_key_pair
get_key_pair
get_key_pair_from_bytes
get_key_pair_from_rng
Generate a keypair from the specified RNG (useful for testing with seedable rngs).
random_committee_key_pairs_of_size
Generate a random committee key pairs with a given committee size
verify_proof_of_possession
Verify proof of possession against the expected intent message, consisting of the authority pubkey and the authority account address.

Type Aliases§

AccountKeyPair
AccountPrivateKey
AccountPublicKey
AggregateAuthoritySignature
AggregateAuthoritySignatureAsBytes
AuthorityKeyPair
AuthorityPrivateKey
AuthorityPublicKey
AuthoritySignature
AuthorityStrongQuorumSignInfo
DefaultHash
NetworkKeyPair
NetworkPrivateKey
NetworkPublicKey
RandomnessPartialSignature
RandomnessPrivateKey
RandomnessSignature

Attribute Macros§

enum_dispatch
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.