Botan
2.1.0
Crypto and TLS for C++11
|
#include <tls_record.h>
Public Member Functions | |
AEAD_Mode * | aead () |
std::vector< uint8_t > | aead_nonce (uint64_t seq, RandomNumberGenerator &rng) |
std::vector< uint8_t > | aead_nonce (const uint8_t record[], size_t record_len, uint64_t seq) |
std::chrono::seconds | age () const |
bool | cbc_nonce () const |
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, uint8_t type, Protocol_Version version, uint16_t ptext_length) |
size_t | nonce_bytes_from_handshake () const |
size_t | nonce_bytes_from_record () 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::OctetString::bits_of(), BOTAN_ASSERT, BOTAN_ASSERT_EQUAL, Botan::TLS::Ciphersuite::cipher_algo(), Botan::TLS::Ciphersuite::cipher_keylen(), Botan::TLS::CLIENT, Botan::TLS::Session_Keys::client_cipher_key(), Botan::TLS::Session_Keys::client_iv(), Botan::TLS::Session_Keys::client_mac_key(), Botan::DECRYPTION, Botan::ENCRYPTION, Botan::get_aead(), Botan::OctetString::length(), Botan::TLS::Ciphersuite::mac_algo(), Botan::TLS::Ciphersuite::mac_keylen(), nonce_bytes_from_handshake(), nonce_bytes_from_record(), Botan::TLS::Session_Keys::server_cipher_key(), Botan::TLS::Session_Keys::server_iv(), Botan::TLS::Session_Keys::server_mac_key(), Botan::TLS::Protocol_Version::supports_explicit_cbc_ivs(), and Botan::unlock().
|
inline |
Definition at line 45 of file tls_record.h.
Referenced by Botan::TLS::write_record().
std::vector< uint8_t > Botan::TLS::Connection_Cipher_State::aead_nonce | ( | uint64_t | seq, |
RandomNumberGenerator & | rng | ||
) |
Definition at line 112 of file tls_record.cpp.
References 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::aead_nonce | ( | const uint8_t | record[], |
size_t | record_len, | ||
uint64_t | seq | ||
) |
Definition at line 142 of file tls_record.cpp.
References Botan::copy_mem(), nonce_bytes_from_handshake(), nonce_bytes_from_record(), Botan::store_be(), and Botan::xor_buf().
|
inline |
Definition at line 59 of file tls_record.h.
|
inline |
Definition at line 57 of file tls_record.h.
Referenced by Botan::TLS::write_record().
std::vector< uint8_t > Botan::TLS::Connection_Cipher_State::format_ad | ( | uint64_t | seq, |
uint8_t | type, | ||
Protocol_Version | version, | ||
uint16_t | ptext_length | ||
) |
Definition at line 184 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(), Connection_Cipher_State(), and Botan::TLS::write_record().
|
inline |
Definition at line 56 of file tls_record.h.
Referenced by aead_nonce(), Connection_Cipher_State(), and Botan::TLS::write_record().