OpenVPN 3 Core Library
|
Classes | |
class | Alg |
Enumerations | |
enum class | KeyDerivation { UNDEFINED , OPENVPN_PRF , TLS_EKM } |
enum | Type { NONE = 0 , AES_128_CBC , AES_192_CBC , AES_256_CBC , DES_CBC , DES_EDE3_CBC , BF_CBC , AES_256_CTR , AES_128_GCM , AES_192_GCM , AES_256_GCM , CHACHA20_POLY1305 , MD4 , MD5 , SHA1 , SHA224 , SHA256 , SHA384 , SHA512 , SIZE } |
enum | Mode { MODE_UNDEF = 0 , CBC_HMAC , AEAD , MODE_MASK = 0x03 } |
enum | AlgFlags { F_CIPHER = (1 << 2) , F_DIGEST = (1 << 3) , F_ALLOW_DC = (1 << 4) } |
enum | { AEAD_NONCE_TAIL_SIZE = 8 } |
Functions | |
OPENVPN_EXCEPTION (crypto_alg) | |
OPENVPN_SIMPLE_EXCEPTION (crypto_alg_index) | |
const char * | name (const KeyDerivation kd) |
bool | defined (const Type type) |
const Alg & | get_index (const size_t i) |
const Alg * | get_ptr (const Type type) |
const Alg & | get (const Type type) |
std::size_t | for_each (std::function< bool(Type, const Alg &)> fn) |
Type | lookup (const std::string &name) |
const char * | name (const Type type, const char *default_name=nullptr) |
size_t | size (const Type type) |
size_t | key_length (const Type type) |
size_t | iv_length (const Type type) |
size_t | block_size (const Type type) |
Mode | mode (const Type type) |
uint64_t | aead_usage_limit (const Type type) |
Type | legal_dc_cipher (const Type type) |
Type | legal_dc_digest (const Type type) |
Type | dc_cbc_cipher (const Type type) |
Type | dc_cbc_hash (const Type type) |
void | allow_dc_algs (const std::list< Type > types) |
template<typename CRYPTO_API > | |
void | allow_default_dc_algs (SSLLib::Ctx libctx, bool preferred=false, bool legacy=false) |
bool | use_cipher_digest (const Type type) |
Variables | |
static constexpr uint64_t | gcm_limit = (1ull << 36) - 1 |
std::array< Alg, Type::SIZE > | algs |
anonymous enum |
Enumerator | |
---|---|
AEAD_NONCE_TAIL_SIZE |
Definition at line 105 of file cryptoalgs.hpp.
Enumerator | |
---|---|
F_CIPHER | |
F_DIGEST | |
F_ALLOW_DC |
Definition at line 96 of file cryptoalgs.hpp.
|
strong |
Enumerator | |
---|---|
UNDEFINED | |
OPENVPN_PRF | |
TLS_EKM |
Definition at line 33 of file cryptoalgs.hpp.
Enumerator | |
---|---|
MODE_UNDEF | |
CBC_HMAC | |
AEAD | |
MODE_MASK |
Definition at line 88 of file cryptoalgs.hpp.
Enumerator | |
---|---|
NONE | |
AES_128_CBC | |
AES_192_CBC | |
AES_256_CBC | |
DES_CBC | |
DES_EDE3_CBC | |
BF_CBC | |
AES_256_CTR | |
AES_128_GCM | |
AES_192_GCM | |
AES_256_GCM | |
CHACHA20_POLY1305 | |
MD4 | |
MD5 | |
SHA1 | |
SHA224 | |
SHA256 | |
SHA384 | |
SHA512 | |
SIZE |
Definition at line 55 of file cryptoalgs.hpp.
|
inline |
Definition at line 297 of file cryptoalgs.hpp.
|
inline |
Definition at line 335 of file cryptoalgs.hpp.
|
inline |
Allows the default algorithms but only those which are available with the library context.
libctx | Library context to use |
preferred | Allow only the preferred algorithms, also disabling legacy (only AEAD) |
legacy | Allow also legacy algorithm that are vulnerable to SWEET32 no effect if preferred is true |
Definition at line 353 of file cryptoalgs.hpp.
|
inline |
Definition at line 319 of file cryptoalgs.hpp.
Definition at line 327 of file cryptoalgs.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 303 of file cryptoalgs.hpp.
Definition at line 311 of file cryptoalgs.hpp.
|
inline |
|
inline |
|
inline |
Definition at line 259 of file cryptoalgs.hpp.
openvpn::CryptoAlgs::OPENVPN_EXCEPTION | ( | crypto_alg | ) |
openvpn::CryptoAlgs::OPENVPN_SIMPLE_EXCEPTION | ( | crypto_alg_index | ) |
|
inline |
|
inline |
Check if a specific algorithm depends on an additional digest or not
type | CryptoAlgs::Type to check |
Definition at line 396 of file cryptoalgs.hpp.
|
inline |
Definition at line 193 of file cryptoalgs.hpp.
|
staticconstexpr |
The limit for AES-GCM ciphers according to https://datatracker.ietf.org/doc/draft-irtf-cfrg-aead-limits/
Definition at line 191 of file cryptoalgs.hpp.