Cryptography support.
Namespaces | |
namespace | algorithm |
Miscellaneous cryptographic routines. | |
namespace | base64 |
Cryptographic hashing. | |
namespace | hash |
Cryptographic hashing. | |
Classes | |
class | Certificate |
class | CmsSigner |
class | CmsVerifier |
class | CryptoException |
Base exception. More... | |
class | DsaSigner |
Generic signer for asymmetric cryptography. More... | |
class | DsaVerifier |
Generic verifier for asymmetric cryptography. More... | |
class | HmacShaSigner |
HMAC-SHA signer. More... | |
class | HmacShaVerifier |
HMAC-SHA verifier. More... | |
class | KeyParseError |
Signing key parse error. More... | |
class | NamedAlgo |
Base class for a crypto algorithm implementation. More... | |
class | Openssl |
Class to initialize OpenSSL with mutexes. More... | |
class | PrivateKey |
class | PublicKey |
class | SerializationError |
Serialization error. More... | |
class | Signer |
Base signer class. More... | |
class | SignerNone |
"none" algorithm signer More... | |
class | SignError |
Signature generation error. More... | |
class | VerificationError |
Signature verification error. More... | |
class | Verifier |
Base verifier class. More... | |
class | VerifierNone |
"none" algorithm verifier More... | |
Typedefs | |
Outputs HMAC SHA MAC. | |
using | SignerHs1 = HmacShaSigner<DigestSize::k160> |
using | SignerHs256 = HmacShaSigner<DigestSize::k256> |
using | SignerHs384 = HmacShaSigner<DigestSize::k384> |
using | SignerHs512 = HmacShaSigner<DigestSize::k512> |
Outputs RSASSA signature using SHA-2 and PKCS1 padding. | |
using | SignerRs256 = DsaSigner<DsaType::kRsa, DigestSize::k256> |
using | SignerRs384 = DsaSigner<DsaType::kRsa, DigestSize::k384> |
using | SignerRs512 = DsaSigner<DsaType::kRsa, DigestSize::k512> |
Outputs ECDSA as per RFC7518. | |
OpenSSL generates ECDSA signatures in ASN.1/DER format, RFC7518 specifies signature as a concatenation of zero-padded big-endian | |
using | SignerEs256 = DsaSigner<DsaType::kEc, DigestSize::k256> |
using | SignerEs384 = DsaSigner<DsaType::kEc, DigestSize::k384> |
using | SignerEs512 = DsaSigner<DsaType::kEc, DigestSize::k512> |
Outputs RSASSA signature using SHA-2 and PSS padding as per RFC7518. | |
JWA specifications require using MGF1 function with the same hash function as for the digest and salt length to be the same size as the hash output. | |
using | SignerPs256 = DsaSigner<DsaType::kRsaPss, DigestSize::k256> |
using | SignerPs384 = DsaSigner<DsaType::kRsaPss, DigestSize::k384> |
using | SignerPs512 = DsaSigner<DsaType::kRsaPss, DigestSize::k512> |
Verifies HMAC SHA MAC. | |
using | VerifierHs1 = HmacShaVerifier<DigestSize::k160> |
using | VerifierHs256 = HmacShaVerifier<DigestSize::k256> |
using | VerifierHs384 = HmacShaVerifier<DigestSize::k384> |
using | VerifierHs512 = HmacShaVerifier<DigestSize::k512> |
Verifies RSASSA signature using SHA-2 and PKCS1 padding. | |
using | VerifierRs256 = DsaVerifier<DsaType::kRsa, DigestSize::k256> |
using | VerifierRs384 = DsaVerifier<DsaType::kRsa, DigestSize::k384> |
using | VerifierRs512 = DsaVerifier<DsaType::kRsa, DigestSize::k512> |
Verifies ECDSA as per RFC7518. | |
OpenSSL generates ECDSA signatures in ASN.1/DER format, RFC7518 specifies signature as a concatenation of zero-padded big-endian | |
using | VerifierEs256 = DsaVerifier<DsaType::kEc, DigestSize::k256> |
using | VerifierEs384 = DsaVerifier<DsaType::kEc, DigestSize::k384> |
using | VerifierEs512 = DsaVerifier<DsaType::kEc, DigestSize::k512> |
Verifies RSASSA signature using SHA-2 and PSS padding as per RFC7518. | |
JWA specifications require using MGF1 function with the same hash function as for the digest and salt length to be the same size as the hash output. | |
using | VerifierPs256 = DsaVerifier<DsaType::kRsaPss, DigestSize::k256> |
using | VerifierPs384 = DsaVerifier<DsaType::kRsaPss, DigestSize::k384> |
using | VerifierPs512 = DsaVerifier<DsaType::kRsaPss, DigestSize::k512> |
Enumerations | |
enum class | DigestSize { k160 , k256 , k384 , k512 } |
SHA digest size in bits. More... | |
enum class | DsaType { kRsa , kEc , kRsaPss } |
Digital signature type. More... | |
Functions | |
void | GenerateRandomBlock (utils::span< char > buffer) |
Generate a block of randomness using a cryptographically secure RNG. | |
template<typename T > | |
void | GenerateRandomBlock (utils::span< T > buffer) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
std::string | GenerateRandomBlock (std::size_t size) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
using crypto::SignerEs256 = DsaSigner<DsaType::kEc, DigestSize::k256> |
Definition at line 96 of file signers.hpp.
using crypto::SignerEs384 = DsaSigner<DsaType::kEc, DigestSize::k384> |
Definition at line 97 of file signers.hpp.
using crypto::SignerEs512 = DsaSigner<DsaType::kEc, DigestSize::k512> |
Definition at line 98 of file signers.hpp.
using crypto::SignerHs1 = HmacShaSigner<DigestSize::k160> |
Definition at line 59 of file signers.hpp.
using crypto::SignerHs256 = HmacShaSigner<DigestSize::k256> |
Definition at line 60 of file signers.hpp.
using crypto::SignerHs384 = HmacShaSigner<DigestSize::k384> |
Definition at line 61 of file signers.hpp.
using crypto::SignerHs512 = HmacShaSigner<DigestSize::k512> |
Definition at line 62 of file signers.hpp.
using crypto::SignerPs256 = DsaSigner<DsaType::kRsaPss, DigestSize::k256> |
Definition at line 106 of file signers.hpp.
using crypto::SignerPs384 = DsaSigner<DsaType::kRsaPss, DigestSize::k384> |
Definition at line 107 of file signers.hpp.
using crypto::SignerPs512 = DsaSigner<DsaType::kRsaPss, DigestSize::k512> |
Definition at line 108 of file signers.hpp.
using crypto::SignerRs256 = DsaSigner<DsaType::kRsa, DigestSize::k256> |
Definition at line 86 of file signers.hpp.
using crypto::SignerRs384 = DsaSigner<DsaType::kRsa, DigestSize::k384> |
Definition at line 87 of file signers.hpp.
using crypto::SignerRs512 = DsaSigner<DsaType::kRsa, DigestSize::k512> |
Definition at line 88 of file signers.hpp.
using crypto::VerifierEs256 = DsaVerifier<DsaType::kEc, DigestSize::k256> |
Definition at line 99 of file verifiers.hpp.
using crypto::VerifierEs384 = DsaVerifier<DsaType::kEc, DigestSize::k384> |
Definition at line 100 of file verifiers.hpp.
using crypto::VerifierEs512 = DsaVerifier<DsaType::kEc, DigestSize::k512> |
Definition at line 101 of file verifiers.hpp.
using crypto::VerifierHs1 = HmacShaVerifier<DigestSize::k160> |
Definition at line 58 of file verifiers.hpp.
using crypto::VerifierHs256 = HmacShaVerifier<DigestSize::k256> |
Definition at line 59 of file verifiers.hpp.
using crypto::VerifierHs384 = HmacShaVerifier<DigestSize::k384> |
Definition at line 60 of file verifiers.hpp.
using crypto::VerifierHs512 = HmacShaVerifier<DigestSize::k512> |
Definition at line 61 of file verifiers.hpp.
using crypto::VerifierPs256 = DsaVerifier<DsaType::kRsaPss, DigestSize::k256> |
Definition at line 109 of file verifiers.hpp.
using crypto::VerifierPs384 = DsaVerifier<DsaType::kRsaPss, DigestSize::k384> |
Definition at line 110 of file verifiers.hpp.
using crypto::VerifierPs512 = DsaVerifier<DsaType::kRsaPss, DigestSize::k512> |
Definition at line 111 of file verifiers.hpp.
using crypto::VerifierRs256 = DsaVerifier<DsaType::kRsa, DigestSize::k256> |
Definition at line 89 of file verifiers.hpp.
using crypto::VerifierRs384 = DsaVerifier<DsaType::kRsa, DigestSize::k384> |
Definition at line 90 of file verifiers.hpp.
using crypto::VerifierRs512 = DsaVerifier<DsaType::kRsa, DigestSize::k512> |
Definition at line 91 of file verifiers.hpp.
|
strong |
SHA digest size in bits.
Definition at line 25 of file basic_types.hpp.
|
strong |
Digital signature type.
Definition at line 28 of file basic_types.hpp.
void crypto::GenerateRandomBlock | ( | utils::span< char > | buffer | ) |
Generate a block of randomness using a cryptographically secure RNG.
Uses a thread-local CryptoPP::AutoSeededRandomPool.
void crypto::GenerateRandomBlock | ( | utils::span< T > | buffer | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 29 of file random.hpp.