OpenVPN 3 Core Library
|
#include <aead_usage_limit.hpp>
Public Member Functions | |
AEADUsageLimit ()=default | |
AEADUsageLimit (openvpn::CryptoAlgs::Type type) | |
void | update (const std::size_t outlen) |
bool | usage_limit_reached () const |
bool | usage_limit_warn () const |
Static Public Attributes | |
static constexpr size_t | aead_blocksize = 16 |
Private Attributes | |
uint64_t | invocations = 0 |
uint64_t | plaintext_blocks = 0 |
uint64_t | limit = openvpn::CryptoAlgs::gcm_limit |
Counts the number of plaintext blocks and cipher invocations to determine the limit for an AEAD cipher like GCM For more details see the OpenVPN RFC and the related documents
Definition at line 22 of file aead_usage_limit.hpp.
|
default |
|
inline |
Definition at line 32 of file aead_usage_limit.hpp.
|
inline |
Update the limit calculation with the amount of data encrypted
Definition at line 43 of file aead_usage_limit.hpp.
|
inline |
Returns true if the limit that is considered for the usage of the AEAD ciphers has been reached
Definition at line 52 of file aead_usage_limit.hpp.
|
inline |
Returns true if we are 7/8 of the usage limit. We use this limit to trigger a renegotiation
Definition at line 61 of file aead_usage_limit.hpp.
|
staticconstexpr |
Definition at line 40 of file aead_usage_limit.hpp.
|
private |
Definition at line 24 of file aead_usage_limit.hpp.
|
private |
Usage limit of plaintext_block + invocations, initialise with AES-GCM limit to be on safe side
Definition at line 27 of file aead_usage_limit.hpp.
|
private |
Definition at line 25 of file aead_usage_limit.hpp.