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

◆ ocrypto_rsa_init_pub_key()

int ocrypto_rsa_init_pub_key ( ocrypto_rsa_pub_key key,
uint32_t *  key_mem,
const uint8_t *  n,
size_t  n_len,
uint32_t  e 
)

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

RSA public key setup.

Parameters
[out]keyThe initialized public key.
[out]key_memKey memory. Length OCRYPTO_RSA_PUB_KEY_SIZE(bits). Must have same lifetime as key.
nThe RSA modulus, unsigned big-endian.
n_lenLength of n.
ePublic exponent.
Return values
-1If the input length is invalid.
0On success.
Remarks
The n value can be read directly from a DER encoded RSAPublicKey or RSAPrivateKey.