|
cx_err_t | cx_rsa_init_public_key_no_throw (const uint8_t *exponent, size_t exponent_len, const uint8_t *modulus, size_t modulus_len, cx_rsa_public_key_t *key) |
| Initializes a RSA public key. More...
|
static int | cx_rsa_init_public_key (const unsigned char *exponent, unsigned int exponent_len, const unsigned char *modulus, unsigned int modulus_len, cx_rsa_public_key_t *key) |
| Initializes a RSA public key. More...
|
cx_err_t | cx_rsa_init_private_key_no_throw (const uint8_t *exponent, size_t exponent_len, const uint8_t *modulus, size_t modulus_len, cx_rsa_private_key_t *key) |
| Initializes a RSA private key. More...
|
static int | cx_rsa_init_private_key (const unsigned char *exponent, unsigned int exponent_len, const unsigned char *modulus, unsigned int modulus_len, cx_rsa_private_key_t *key) |
| Initializes a RSA private key. More...
|
cx_err_t | cx_rsa_generate_pair_no_throw (size_t modulus_len, cx_rsa_public_key_t *public_key, cx_rsa_private_key_t *private_key, const uint8_t *pub_exponent, size_t exponent_len, const uint8_t *externalPQ) |
| Generates a RSA key pair. More...
|
static int | cx_rsa_generate_pair (unsigned int modulus_len, cx_rsa_public_key_t *public_key, cx_rsa_private_key_t *private_key, const unsigned char *pub_exponent, unsigned int exponent_len, const unsigned char *externalPQ) |
| Generates a RSA key pair. More...
|
cx_err_t | cx_rsa_sign_with_salt_len (const cx_rsa_private_key_t *key, uint32_t mode, cx_md_t hashID, const uint8_t *hash, size_t hash_len, uint8_t *sig, size_t sig_len, size_t salt_len) |
| Computes a message digest signature according to RSA specification. More...
|
cx_err_t | cx_rsa_sign_no_throw (const cx_rsa_private_key_t *key, uint32_t mode, cx_md_t hashID, const uint8_t *hash, size_t hash_len, uint8_t *sig, size_t sig_len) |
| Computes a message digest signature according to RSA specification. More...
|
static int | cx_rsa_sign (const cx_rsa_private_key_t *key, int mode, cx_md_t hashID, const unsigned char *hash, unsigned int hash_len, unsigned char *sig, unsigned int sig_len) |
| Computes a message digest signature according to RSA specification. More...
|
bool | cx_rsa_verify_with_salt_len (const cx_rsa_public_key_t *key, uint32_t mode, cx_md_t hashID, const uint8_t *hash, size_t hash_len, uint8_t *sig, size_t sig_len, size_t salt_len) |
| Verifies a message digest signature. More...
|
bool | cx_rsa_verify (const cx_rsa_public_key_t *key, uint32_t mode, cx_md_t hashID, const uint8_t *hash, size_t hash_len, uint8_t *sig, size_t sig_len) |
| Verifies a message digest signature. More...
|
cx_err_t | cx_rsa_encrypt_no_throw (const cx_rsa_public_key_t *key, uint32_t mode, cx_md_t hashID, const uint8_t *mesg, size_t mesg_len, uint8_t *enc, size_t enc_len) |
| Encrypts a message according to RSA specification. More...
|
static int | cx_rsa_encrypt (const cx_rsa_public_key_t *key, int mode, cx_md_t hashID, const unsigned char *mesg, unsigned int mesg_len, unsigned char *enc, unsigned int enc_len) |
| Encrypts a message according to RSA specification. More...
|
cx_err_t | cx_rsa_decrypt_no_throw (const cx_rsa_private_key_t *key, uint32_t mode, cx_md_t hashID, const uint8_t *mesg, size_t mesg_len, uint8_t *dec, size_t *dec_len) |
| Decrypts a message according to RSA specification. More...
|
static int | cx_rsa_decrypt (const cx_rsa_private_key_t *key, int mode, cx_md_t hashID, const unsigned char *mesg, unsigned int mesg_len, unsigned char *dec, unsigned int dec_len) |
| Decrypts a message according to RSA specification. More...
|
RSA algorithm.
RSA is a public key cryptosystem that can be used for encryption and signature schemes.