![]() |
nrfxlib API 3.3.99
|
| int ocrypto_ecdh_p256k1_common_secret | ( | uint8_t | r[32], |
| const uint8_t | sk[32], | ||
| const uint8_t | pk[64] ) |
#include <crypto/nrf_oberon/include/ocrypto_ecdh_p256k1.h>
ECDH secp256k1 common secret.
The common secret is computed from both the client's public key pk and the server's secret key sk and put into r.
| [out] | r | Generated common secret. |
| sk | Server private key. | |
| pk | Client public key. |
| 0 | If sk is a valid secret key and pk is a valid public key. |
| -1 | Otherwise. |
r may be same as sk or pk.