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).
kx
Key exchange interfaces.
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)
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.
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§

CipherSuite
The CipherSuite TLS protocol enum. Values in this enum are taken from the various RFCs covering TLS, and are listed by IANA. The Unknown item is used when processing unrecognized ordinals.
HashAlgorithm
The HashAlgorithm TLS protocol enum. Values in this enum are taken from the various RFCs covering TLS, and are listed by IANA. The Unknown item is used when processing unrecognized ordinals.
Identity
A peer’s identity, depending on the negotiated certificate type.
InconsistentKeys
Specific failure cases from Credentials::new() or a crate::crypto::SigningKey that cannot produce a corresponding public key.
SignatureAlgorithm
The SignatureAlgorithm TLS protocol enum. Values in this enum are taken from the various RFCs covering TLS, and are listed by IANA. The Unknown item is used when processing unrecognized ordinals.
SignatureScheme
The SignatureScheme TLS protocol enum. Values in this enum are taken from the various RFCs covering TLS, and are listed by IANA. The Unknown item is used when processing unrecognized ordinals.

Traits§

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.
TicketProducer
A trait for the ability to encrypt and decrypt tickets.
TicketerFactory
A factory that builds TicketProducers.

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.