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

◆ ocrypto_ecdh_p521_secret_key_check()

int ocrypto_ecdh_p521_secret_key_check ( const uint8_t  sk[66])

ECDH P-521 secret key check.

Parameters
skSecret key to check.
Return values
0If sk is a valid secret key.
-1Otherwise.
Remarks
To generate a valid secret key use the following code pattern:
do get_random(sk); while (ocrypto_ecdh_p521_secret_key_check(sk));
int ocrypto_ecdh_p521_secret_key_check(const uint8_t sk[66])