nrfxlib API 2.7.99
Loading...
Searching...
No Matches

◆ ocrypto_rsa1024_init_crt_key()

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 
)

#include <crypto/nrf_oberon/include/ocrypto_rsa_key.h>

1024-bit RSA secret key setup with CRT coefficients.

Parameters
[out]skThe initialized secret key.
pThe 1. RSA prime. Must be exactly 512 bits.
p_lenLength of p.
qThe 2. RSA prime. Must be exactly 512 bits.
q_lenLength of q.
dpThe 1. CRT exponent. dp = d mod (p-1).
dp_lenLength of dp.
dqThe 2. CRT exponent. dq = d mod (q-1).
dq_lenLength of dq.
qinvThe CRT coefficient. qinv = 1/q mod p.
qi_lenLength of qinv.
Return values
-1If the input length is invalid.
0On success.