|
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 } |
| enum | AlgFlags { F_CIPHER = (1 << 0) , F_DIGEST = (1 << 1) , F_ALLOW_DC = (1 << 2) } |
| 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 104 of file cryptoalgs.hpp.
| Enumerator | |
|---|---|
| F_CIPHER | |
| F_DIGEST | |
| F_ALLOW_DC | |
Definition at line 95 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 | |
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 299 of file cryptoalgs.hpp.
|
inline |
Definition at line 337 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 355 of file cryptoalgs.hpp.
|
inline |
Definition at line 321 of file cryptoalgs.hpp.
Definition at line 329 of file cryptoalgs.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 305 of file cryptoalgs.hpp.
Definition at line 313 of file cryptoalgs.hpp.
|
inline |
|
inline |
|
inline |
Definition at line 261 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 398 of file cryptoalgs.hpp.
|
inline |
Definition at line 195 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 193 of file cryptoalgs.hpp.