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

RSA key setup, for 1024 and 2048 bit keys. More...

Files

file  ocrypto_rsa_key.h
 RSA key setup, for 1024 and 2048 bit keys.
 

Data Structures

struct  ocrypto_rsa1024_pub_key
 
struct  ocrypto_rsa1024_key
 
struct  ocrypto_rsa1024_crt_key
 
struct  ocrypto_rsa2048_pub_key
 
struct  ocrypto_rsa2048_key
 
struct  ocrypto_rsa2048_crt_key
 

Macros

#define ocrypto_rsa_PUBLIC_EXPONENT   65537
 

1024-bit RSA key setup

This group of functions is used for 1024-bit RSA key setup.

int ocrypto_rsa1024_init_pub_key (ocrypto_rsa1024_pub_key *pk, const uint8_t *n, size_t n_len)
 
int ocrypto_rsa1024_init_key (ocrypto_rsa1024_key *pk, const uint8_t *n, size_t n_len, const uint8_t *d, size_t d_len)
 
int ocrypto_rsa1024_init_crt_key (ocrypto_rsa1024_crt_key *sk, const uint8_t *p, size_t p_len, const uint8_t *q, size_t q_len, const uint8_t *dp, size_t dp_len, const uint8_t *dq, size_t dq_len, const uint8_t *qinv, size_t qi_len)
 

2048-bit RSA key setup

This group of functions is used for 2048-bit RSA key setup.

int ocrypto_rsa2048_init_pub_key (ocrypto_rsa2048_pub_key *pk, const uint8_t *n, size_t n_len)
 
int ocrypto_rsa2048_init_key (ocrypto_rsa2048_key *sk, const uint8_t *n, size_t n_len, const uint8_t *d, size_t d_len)
 
int ocrypto_rsa2048_init_crt_key (ocrypto_rsa2048_crt_key *sk, const uint8_t *p, size_t p_len, const uint8_t *q, size_t q_len, const uint8_t *dp, size_t dp_len, const uint8_t *dq, size_t dq_len, const uint8_t *qinv, size_t qi_len)
 

Detailed Description

RSA key setup, for 1024 and 2048 bit keys.

These functions support the setup of 1024 and 2048 RSA secret and public keys.

Remarks
1024 bit keys are no longer considered secure; use of at least 2048 bit keys is recommended.
This is the original ocrypto API for RSA. See the newer API that supports additional key sizes.
See also
RFC - PKCS #1: RSA Cryptography Specifications Version 2.2