Skip to main content

Module crypto

Module crypto 

Source
Expand description

Re-export the rs-matter crate Cryptographic abstractions and backend.

Modules§

backend
Cryptographic backends.

Structs§

CryptoSensitive
A cryptographic material represented in a cross-platform way, as a fixed-length array in a well-defined format.
CryptoSensitiveRef
A reference to cryptographic material. The non-owned equivalent of CryptoSensitive<N>.
SharedRand
A utility wrapping a random number generator in a mutex for shared access.
WeakTestOnlyRand
A weak random number generator intended for use in tests only.

Constants§

AEAD_CANON_KEY_LEN
Length of the canonical representation of an AEAD key in bytes.
AEAD_KEY_ZEROED
Zeroed $name.
AEAD_NONCE_LEN
Length of the nonce used in AEAD operations in bytes.
AEAD_NONCE_ZEROED
Zeroed $name.
AEAD_TAG_LEN
Length of the tag produced by AEAD operations in bytes.
AEAD_TAG_ZEROED
Zeroed $name.
EC_CANON_POINT_LEN
Length of the canonical representation of an EC point in bytes.
EC_CANON_SCALAR_LEN
Length of the canonical representation of an EC scalar in bytes.
EC_POINT_ZEROED
Zeroed $name.
EC_SCALAR_ZEROED
Zeroed $name.
HASH_LEN
Length of the hash returned by the hasher (Crypto::hash) in bytes.
HASH_ZEROED
Zeroed $name.
HMAC_HASH_LEN
Length of the HMAC hash returned by the HMAC hasher (Crypto::hmac) in bytes.
HMAC_HASH_ZEROED
Zeroed $name.
PKC_CANON_PUBLIC_KEY_LEN
Length of the canonical representation of a public key in bytes.
PKC_CANON_SECRET_KEY_LEN
Length of the canonical representation of a secret key in bytes.
PKC_PUBLIC_KEY_ZEROED
Zeroed $name.
PKC_SECRET_KEY_ZEROED
Zeroed $name.
PKC_SHARED_SECRET_LEN
Length of the canonical representation of a shared secret in bytes.
PKC_SHARED_SECRET_ZEROED
Zeroed $name.
PKC_SIGNATURE_LEN
Length of the canonical representation of a signature in bytes.
PKC_SIGNATURE_ZEROED
Zeroed $name.
SHA1_HASH_LEN
Length of the SHA-1 hash returned by Crypto::hash1 in bytes.
UINT320_CANON_LEN
Length of the canonical representation of a 320-bit unsigned integer in bytes.
UINT320_ZEROED
Zeroed $name.

Traits§

Aead
Trait representing an Authenticated Encryption with Associated Data (AEAD) algorithm.
Crypto
Trait representing a cryptographic backend.
CryptoRng
A marker trait used to indicate that an RngCore or BlockRngCore implementation is supposed to be cryptographically secure.
CryptoRngCore
An extension trait that is automatically implemented for any type implementing RngCore and CryptoRng.
Digest
Trait representing a generic digest (hash) algorithm.
EcPoint
Trait representing an Elliptic Curve (EC) point.
EcScalar
Trait representing an Elliptic Curve (EC) scalar value.
Kdf
Trait representing a Key Derivation Function (KDF).
PbKdf
Trait representing a Password-Based Key Derivation Function (PBKDF).
PublicKey
Trait representing a public key.
RngCore
The core of a random number generator.
SecretKey
Trait representing a secret key.
SigningSecretKey
Trait representing a signing secret key.

Functions§

default_crypto
test_only_crypto

Type Aliases§

AeadNonce
Canonical representation of a $name.
AeadNonceRef
Reference to a canonical $name.
AeadTag
Canonical representation of a $name.
AeadTagRef
Reference to a canonical $name.
CanonAeadKey
Canonical representation of a $name.
CanonAeadKeyRef
Reference to a canonical $name.
CanonEcPoint
Canonical representation of a $name.
CanonEcPointRef
Reference to a canonical $name.
CanonEcScalar
Canonical representation of a $name.
CanonEcScalarRef
Reference to a canonical $name.
CanonPkcPublicKey
Canonical representation of a $name.
CanonPkcPublicKeyRef
Reference to a canonical $name.
CanonPkcSecretKey
Canonical representation of a $name.
CanonPkcSecretKeyRef
Reference to a canonical $name.
CanonPkcSharedSecret
Canonical representation of a $name.
CanonPkcSharedSecretRef
Reference to a canonical $name.
CanonPkcSignature
Canonical representation of a $name.
CanonPkcSignatureRef
Reference to a canonical $name.
CanonUint320
Canonical representation of a $name.
CanonUint320Ref
Reference to a canonical $name.
Hash
Canonical representation of a $name.
HashRef
Reference to a canonical $name.
HmacHash
Canonical representation of a $name.
HmacHashRef
Reference to a canonical $name.