nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ cracen_key_agreement()

psa_status_t cracen_key_agreement ( const psa_key_attributes_t * attributes,
const uint8_t * priv_key,
size_t priv_key_size,
const uint8_t * publ_key,
size_t publ_key_size,
uint8_t * output,
size_t output_size,
size_t * output_length,
psa_algorithm_t alg )

#include <subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_key_derivation.h>

Perform a key agreement operation.

Parameters
[in]attributesKey attributes for the private key.
[in]priv_keyPrivate key material.
[in]priv_key_sizeSize of the private key in bytes.
[in]publ_keyPublic key material.
[in]publ_key_sizeSize of the public key in bytes.
[out]outputBuffer to store the shared secret.
[in]output_sizeSize of the output buffer in bytes.
[out]output_lengthLength of the generated shared secret in bytes.
[in]algKey agreement algorithm.
Return values
PSA_SUCCESSThe operation completed successfully.
PSA_ERROR_INVALID_HANDLEThe key handle is invalid.
PSA_ERROR_NOT_SUPPORTEDThe algorithm is not supported.
PSA_ERROR_BUFFER_TOO_SMALLThe output buffer is too small.