Module cipher

Module cipher 

Source
Expand description

TLS message encryption/decryption interfaces.

Structs§

AeadKey
A key for an AEAD algorithm.
EncodedMessage
A TLS message with encoded (but not necessarily encrypted) payload.
InboundOpaque
A borrowed payload buffer.
Iv
A write or read IV.
KeyBlockShape
How a TLS1.2 key_block is partitioned.
Nonce
A nonce. This is unique for all messages on a connection.
OutboundOpaque
A payload buffer with space reserved at the front for a TLS message header.
UnsupportedOperationError
An error indicating that the AEAD algorithm does not support the requested operation.

Enums§

MessageError
Errors from trying to parse a TLS message.
OutboundPlain
A collection of borrowed plaintext slices.
Payload
An externally length’d payload

Constants§

NONCE_LEN
Size of TLS nonces (incorrectly termed “IV” in standard) for all supported ciphersuites (AES-GCM, Chacha20Poly1305)

Traits§

MessageDecrypter
Objects with this trait can decrypt TLS messages.
MessageEncrypter
Objects with this trait can encrypt TLS messages.
Tls12AeadAlgorithm
Factory trait for building MessageEncrypter and MessageDecrypter for a TLS1.2 cipher suite.
Tls13AeadAlgorithm
Factory trait for building MessageEncrypter and MessageDecrypter for a TLS1.3 cipher suite.

Functions§

make_tls12_aad
Returns a TLS1.2 additional_data encoding.
make_tls13_aad
Returns a TLS1.3 additional_data encoding.