13 #include "mbedtls/rsa.h" 35 bool Generate(
unsigned a_KeySizeBits = 1024);
43 int Decrypt(
const Byte * a_EncryptedData,
size_t a_EncryptedLength,
Byte * a_DecryptedData,
size_t a_DecryptedMaxLength);
48 int Encrypt(
const Byte * a_PlainData,
size_t a_PlainLength,
Byte * a_EncryptedData,
size_t a_EncryptedMaxLength);
mbedtls_rsa_context m_Rsa
The mbedTLS key context.
int Decrypt(const Byte *a_EncryptedData, size_t a_EncryptedLength, Byte *a_DecryptedData, size_t a_DecryptedMaxLength)
Decrypts the data using RSAES-PKCS#1 algorithm.
AString GetPubKeyDER(void)
Returns the public key part encoded in ASN1 DER encoding.
int Encrypt(const Byte *a_PlainData, size_t a_PlainLength, Byte *a_EncryptedData, size_t a_EncryptedMaxLength)
Encrypts the data using RSAES-PKCS#1 algorithm.
cRsaPrivateKey(void)
Creates a new empty object, the key is not assigned.
mbedtls_rsa_context * GetInternal(void)
Returns the internal context ptr.
std::shared_ptr< cRsaPrivateKey > cRsaPrivateKeyPtr
cCtrDrbgContext m_CtrDrbg
The random generator used for generating the key and encryption / decryption.
Encapsulates an RSA private key used in PKI cryptography.
bool Generate(unsigned a_KeySizeBits=1024)
Generates a new key within this object, with the specified size in bits.