Botan 3.6.1
Crypto and TLS for C&
|
#include <tls_record.h>
Public Member Functions | |
AEAD_Mode & | aead () |
std::vector< uint8_t > | aead_nonce (const uint8_t record[], size_t record_len, uint64_t seq) |
std::vector< uint8_t > | aead_nonce (uint64_t seq, RandomNumberGenerator &rng) |
Connection_Cipher_State (Protocol_Version version, Connection_Side which_side, bool is_our_side, const Ciphersuite &suite, const Session_Keys &keys, bool uses_encrypt_then_mac) | |
std::vector< uint8_t > | format_ad (uint64_t seq, Record_Type type, Protocol_Version version, uint16_t ptext_length) |
size_t | nonce_bytes_from_handshake () const |
size_t | nonce_bytes_from_record () const |
Nonce_Format | nonce_format () const |
TLS Cipher State
Definition at line 32 of file tls_record.h.
Botan::TLS::Connection_Cipher_State::Connection_Cipher_State | ( | Protocol_Version | version, |
Connection_Side | which_side, | ||
bool | is_our_side, | ||
const Ciphersuite & | suite, | ||
const Session_Keys & | keys, | ||
bool | uses_encrypt_then_mac ) |
Initialize a new cipher state
Definition at line 28 of file tls_record.cpp.
References Botan::TLS::Session_Keys::aead_key(), BOTAN_ASSERT_NOMSG, BOTAN_UNUSED, Botan::TLS::CBC_MODE, Botan::TLS::Ciphersuite::cipher_algo(), Botan::TLS::Ciphersuite::cipher_keylen(), Botan::AEAD_Mode::create_or_throw(), Botan::BlockCipher::create_or_throw(), Botan::MessageAuthenticationCode::create_or_throw(), Botan::Decryption, Botan::Encryption, Botan::TLS::Ciphersuite::mac_algo(), Botan::TLS::Ciphersuite::mac_keylen(), Botan::TLS::Session_Keys::nonce(), Botan::TLS::Ciphersuite::nonce_bytes_from_handshake(), Botan::TLS::Ciphersuite::nonce_bytes_from_record(), Botan::TLS::Ciphersuite::nonce_format(), and nonce_format().
|
inline |
Definition at line 44 of file tls_record.h.
References BOTAN_ASSERT_NONNULL.
Referenced by Botan::TLS::write_record().
std::vector< uint8_t > Botan::TLS::Connection_Cipher_State::aead_nonce | ( | const uint8_t | record[], |
size_t | record_len, | ||
uint64_t | seq ) |
Definition at line 107 of file tls_record.cpp.
References Botan::TLS::AEAD_IMPLICIT_4, Botan::TLS::AEAD_XOR_12, BOTAN_ASSERT_NOMSG, Botan::TLS::CBC_MODE, Botan::copy_mem(), nonce_bytes_from_handshake(), nonce_bytes_from_record(), Botan::store_be(), and Botan::xor_buf().
std::vector< uint8_t > Botan::TLS::Connection_Cipher_State::aead_nonce | ( | uint64_t | seq, |
RandomNumberGenerator & | rng ) |
Definition at line 77 of file tls_record.cpp.
References Botan::TLS::AEAD_IMPLICIT_4, Botan::TLS::AEAD_XOR_12, BOTAN_ASSERT_NOMSG, Botan::TLS::CBC_MODE, Botan::copy_mem(), nonce_bytes_from_handshake(), nonce_bytes_from_record(), Botan::RandomNumberGenerator::randomize(), Botan::store_be(), and Botan::xor_buf().
Referenced by Botan::TLS::write_record().
std::vector< uint8_t > Botan::TLS::Connection_Cipher_State::format_ad | ( | uint64_t | seq, |
Record_Type | type, | ||
Protocol_Version | version, | ||
uint16_t | ptext_length ) |
Definition at line 142 of file tls_record.cpp.
References Botan::get_byte(), Botan::TLS::Protocol_Version::major_version(), Botan::TLS::Protocol_Version::minor_version(), and Botan::store_be().
Referenced by Botan::TLS::write_record().
|
inline |
Definition at line 55 of file tls_record.h.
Referenced by aead_nonce(), aead_nonce(), and Botan::TLS::write_record().
|
inline |
Definition at line 57 of file tls_record.h.
Referenced by aead_nonce(), aead_nonce(), and Botan::TLS::write_record().
|
inline |
Definition at line 59 of file tls_record.h.
Referenced by Connection_Cipher_State(), and Botan::TLS::write_record().