nrfxlib API 3.3.99
Loading...
Searching...
No Matches

RSA encryption/decryption and sign/verify algorithms. More...

Files

file  ocrypto_rsa_operations.h
 RSA encryption/decryption and sign/verify algorithms.
 

RSA operations

This group of functions is used for RSA with padding.

int ocrypto_rsa_pkcs1_v15_encrypt (uint8_t *c, size_t c_len, const uint8_t *m, size_t m_len, const uint8_t *seed, size_t s_len, const ocrypto_rsa_pub_key *pk, uint32_t *mem)
 
int ocrypto_rsa_pkcs1_v15_decrypt (uint8_t *m, size_t m_len, const uint8_t *c, size_t c_len, const ocrypto_rsa_key *key, uint32_t *mem)
 
int ocrypto_rsa_pkcs1_v15_crt_decrypt (uint8_t *m, size_t m_len, const uint8_t *c, size_t c_len, const ocrypto_rsa_crt_key *key, uint32_t *mem)
 
int ocrypto_rsa_oaep_sha256_encrypt (uint8_t *c, size_t c_len, const uint8_t *m, size_t m_len, const uint8_t *label, size_t l_len, const uint8_t seed[32], const ocrypto_rsa_pub_key *pk, uint32_t *mem)
 
int ocrypto_rsa_oaep_sha256_decrypt (uint8_t *m, size_t m_len, const uint8_t *c, size_t c_len, const uint8_t *label, size_t l_len, const ocrypto_rsa_key *key, uint32_t *mem)
 
int ocrypto_rsa_oaep_sha256_crt_decrypt (uint8_t *m, size_t m_len, const uint8_t *c, size_t c_len, const uint8_t *label, size_t l_len, const ocrypto_rsa_crt_key *key, uint32_t *mem)
 
int ocrypto_rsa_pkcs1_v15_sha256_sign (uint8_t *s, size_t s_len, const uint8_t *m, size_t m_len, const ocrypto_rsa_key *key, uint32_t *mem)
 
int ocrypto_rsa_pkcs1_v15_sha256_crt_sign (uint8_t *s, size_t s_len, const uint8_t *m, size_t m_len, const ocrypto_rsa_crt_key *key, uint32_t *mem)
 
int ocrypto_rsa_pkcs1_v15_sha256_verify (const uint8_t *s, size_t s_len, const uint8_t *m, size_t m_len, const ocrypto_rsa_pub_key *pk, uint32_t *mem)
 
int ocrypto_rsa_pss_sha256_sign (uint8_t *s, size_t s_len, const uint8_t *m, size_t m_len, const uint8_t *salt, size_t salt_len, const ocrypto_rsa_key *key, uint32_t *mem)
 
int ocrypto_rsa_pss_sha256_crt_sign (uint8_t *s, size_t s_len, const uint8_t *m, size_t m_len, const uint8_t *salt, size_t salt_len, const ocrypto_rsa_crt_key *key, uint32_t *mem)
 
int ocrypto_rsa_pss_sha256_verify (const uint8_t *s, size_t s_len, const uint8_t *m, size_t m_len, size_t salt_len, const ocrypto_rsa_pub_key *pk, uint32_t *mem)
 

Detailed Description

RSA encryption/decryption and sign/verify algorithms.

These functions support RSA encryption and signatures with PKCS1 v1.5, OAEP and PSS padding.

Supported key sizes (in bits) are: 1024, 2048, 3072, 4096, ...

Remarks
1024 bit keys are no longer considered secure; use of at least 2048 bit keys is recommended.
See also
RFC - PKCS #1: RSA Cryptography Specifications Version 2.2