nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ ocrypto_ecdh_p384_public_key()

int ocrypto_ecdh_p384_public_key ( uint8_t  pk[96],
const uint8_t  sk[48] 
)

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

ECDH P-384 public key generation.

Given a secret key sk the corresponding public key is computed and put into pk.

Parameters
[out]pkGenerated public key.
skSecret key. Must be pre-filled with random data.
Return values
0If sk is a valid secret key.
-1Otherwise.
Remarks
pk may be same as sk.
To generate a valid key pair use the following code pattern:
do get_random(sk); while (ocrypto_ecdh_p384_public_key(pk, sk));
int ocrypto_ecdh_p384_public_key(uint8_t pk[96], const uint8_t sk[48])