Provides elliptic curve cryptography functions for Diffie-Hellman shared secret exchange.
More...
|
typedef uint8_t | nrf_crypto_ecdh_shared_secret_t [NRF_CRYPTO_BACKEND_ECC_RAW_PRIVATE_KEY_MAX_SIZE] |
| Array type of a shared secret for any of the enabled curves.
|
|
Provides elliptic curve cryptography functions for Diffie-Hellman shared secret exchange.
Computes shared secret using ECC Diffie-Hellman.
- Parameters
-
[in] | p_context | Pointer to temporary structure holding context information. If it is NULL, necessary data will be allocated with NRF_CRYPTO_ALLOC and freed at the end of the function. |
[in] | p_private_key | Pointer to structure holding a private key. |
[in] | p_public_key | Pointer to structure holding a public key received from the other party. |
[out] | p_shared_secret | Pointer to buffer where shared secret will be put. |
[in,out] | p_shared_secret_size | Maximum number of bytes that p_shared_secret buffer can hold on input and the actual number of bytes used by the data on output. Actual size for selected curve is defined by the preprocessor definitions, e.g. NRF_CRYPTO_ECDH_SECP256R1_SHARED_SECRET_SIZE. |