Module crypto

Module crypto 

Source
Expand description

Crypto provider interface.

Modules§

aws_lc_rsaws-lc-rs
aws-lc-rs-based CryptoProvider.
cipher
TLS message encryption/decryption interfaces.
hash
Hashing interfaces.
hmac
HMAC interfaces.
hpke
Hybrid public key encryption (RFC 9180).
ringring
ring based CryptoProvider.
tls12
Cryptography specific to TLS1.2.
tls13
Cryptography specific to TLS1.3.

Structs§

CertificateIdentity
Data required to verify the peer’s identity.
CipherSuiteCommon
Common state for cipher suites (both for TLS 1.2 and TLS 1.3)
CompletedKeyExchange
The result from SupportedKxGroup::start_and_complete().
Credentials
A packaged-together certificate chain, matching SigningKey and optional stapled OCSP response.
CryptoProvider
Controls core cryptography used by rustls.
GetRandomFailed
Random material generation failed.
SelectedCredential
A packaged-together certificate chain and one-time-use signer.
SharedSecret
The result from ActiveKeyExchange::complete() or HybridKeyExchange::complete_component().
SingleCredential
Server certificate resolver which always resolves to the same identity and key.
WebPkiSupportedAlgorithms
Describes which webpki signature verification algorithms are supported and how they map to TLS SignatureSchemes.

Enums§

Identity
A peer’s identity, depending on the negotiated certificate type.
KeyExchangeAlgorithm
Describes supported key exchange mechanisms.
StartedKeyExchange
Return value from SupportedKxGroup::start().

Traits§

ActiveKeyExchange
An in-progress key exchange originating from a SupportedKxGroup.
HybridKeyExchange
An in-progress hybrid key exchange originating from a SupportedKxGroup.
KeyProvider
A mechanism for loading private SigningKeys from [PrivateKeyDer].
SecureRandom
A source of cryptographically secure randomness.
Signer
A thing that can sign a message.
SigningKey
An abstract signing key.
SupportedKxGroup
A supported key exchange group.

Functions§

default_fips_providerfips
This function returns a CryptoProvider that uses FIPS140-3-approved cryptography.
public_key_to_spki
Convert a public key and algorithm identifier into [SubjectPublicKeyInfoDer].
verify_tls12_signature
Verify a message signature using the cert public key and any supported scheme.
verify_tls13_signature
Verify a message signature using the cert public key and the first TLS 1.3 compatible supported scheme.