10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
RSAPublicKeyParameters.h
1#ifndef TENDUKE_CRYPTO_RSAPUBLICKEYPARAMETERS_H
2#define TENDUKE_CRYPTO_RSAPUBLICKEYPARAMETERS_H
3
4#include "../../utl/BinaryData.h"
5
6#include <cstddef>
7
8namespace tenduke { namespace crypto {
9
11constexpr std::size_t MIN_RSA_MODULUS_BITS = 2048;
13constexpr std::size_t MAX_RSA_MODULUS_BITS = 16384;
14
21{
23 const unsigned char *modulus;
25 std::size_t modulusLength;
27 std::size_t modulusBits;
29 const unsigned char *exponent;
31 std::size_t exponentLength;
32};
33
45 const tenduke::utl::BinaryData &modulus,
46 const tenduke::utl::BinaryData &exponent
47);
48
49}}
50
51#endif //TENDUKE_CRYPTO_RSAPUBLICKEYPARAMETERS_H
A holder of binary data.
Definition BinaryData.h:14
Cryptography services.
Definition AbstractCiphers.h:18
constexpr std::size_t MIN_RSA_MODULUS_BITS
Smallest accepted RSA modulus, in bits.
Definition RSAPublicKeyParameters.h:11
RSAPublicKeyParameters checkRSAPublicKeyParameters(const tenduke::utl::BinaryData &modulus, const tenduke::utl::BinaryData &exponent)
Checks that RSA public key parameters are safe to use for verifying signatures.
Definition RSAPublicKeyParameters.cpp:35
constexpr std::size_t MAX_RSA_MODULUS_BITS
Largest accepted RSA modulus, in bits (same as OpenSSL's OPENSSL_RSA_MAX_MODULUS_BITS).
Definition RSAPublicKeyParameters.h:13
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4
RSA public key parameters that have passed checkRSAPublicKeyParameters().
Definition RSAPublicKeyParameters.h:21
const unsigned char * modulus
Modulus (n).
Definition RSAPublicKeyParameters.h:23
std::size_t modulusLength
Length of the modulus in bytes.
Definition RSAPublicKeyParameters.h:25
std::size_t exponentLength
Length of the public exponent in bytes.
Definition RSAPublicKeyParameters.h:31
std::size_t modulusBits
Length of the modulus in bits.
Definition RSAPublicKeyParameters.h:27
const unsigned char * exponent
Public exponent (e).
Definition RSAPublicKeyParameters.h:29