Expand description
Cryptographic utilities.
Re-exports§
pub use crate::crypto_bytes::CryptoBytes;
pub use crate::crypto_bytes::PublicBytes;
pub use crate::crypto_bytes::SignatureBytes;
Modules§
- Known key types; this also functions as a global registry of key types for projects wishing to avoid collisions with each other.
Structs§
- An opaque 32-byte cryptographic identifier.
- A container for results of parsing the address uri string.
- An identifier for a specific cryptographic algorithm used by a key pair
- An identifier for a type of cryptographic key.
- A secret uri (
SURI
) that can be used to generate a key pair. - A custom address format. See also
Ss58AddressFormatRegistry
Enums§
- Errors that are possible during parsing the address URI.
- An error when deriving a key.
- A since derivation junction description. It is the single parameter used when creating a new secret key from an existing secret key and, in the case of
SoftRaw
andSoftIndex
a new public key from an existing public key. - An error type for SS58 decoding.
- An error with the interpretation of a secret.
- A known address (sub)format/network ID for SS58.
Constants§
- The address of the associated root phrase for our publicly known keys.
- The root phrase for our publicly known keys.
- The length of the junction identifier. Note that this is also referred to as the
CHAIN_CODE_LENGTH
in the context of Schnorrkel.
Traits§
- Trait used for types that are really just a fixed-length array.
- Type which has a particular kind of crypto associated with it.
- Derivable key trait.
- Expose a reference to an inner secret
- Create random values of
Self
given a stream of entropy. - One type is wrapped by another.
- Trait suitable for typical cryptographic PKI key pair type.
- Trait suitable for cryptographic public keys.
- Trait suitable for cryptographic signatures.
- Key that can be encoded to/from SS58.
- Similar to
From
, except that the onus is on the part of the caller to ensure that data passed in makes sense. Basically, you’re not guaranteed to get anything sensible out. - The counterpart to
UncheckedFrom
. - Trait grouping types shared by a VRF signer and verifiers.
- VRF Public Key.
- VRF Secret Key.
- Opposite of
IsWrappedBy
- denotes a type which is a simple wrapper around another type. - Trait to zeroize a memory buffer. Trait for securely erasing values from memory.
Functions§
- Returns default SS58 format used by the current active process.
- const function to convert
Ss58AddressFormat
to u16 - Interprets the string
s
in order to generate a public key without password. - Set the default SS58 “version”.
- Returns either the input address format or the default.
Type Aliases§
- Dummy cryptography. Doesn’t do anything.
- Secret strings
Derive Macros§
- Trait to zeroize a memory buffer. Derive the
Zeroize
trait.