#include <subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_key_derivation.h>
Perform a key agreement operation.
- Parameters
-
| [in] | attributes | Key attributes for the private key. |
| [in] | priv_key | Private key material. |
| [in] | priv_key_size | Size of the private key in bytes. |
| [in] | publ_key | Public key material. |
| [in] | publ_key_size | Size of the public key in bytes. |
| [out] | output | Buffer to store the shared secret. |
| [in] | output_size | Size of the output buffer in bytes. |
| [out] | output_length | Length of the generated shared secret in bytes. |
| [in] | alg | Key agreement algorithm. |
- Return values
-
| PSA_SUCCESS | The operation completed successfully. |
| PSA_ERROR_INVALID_HANDLE | The key handle is invalid. |
| PSA_ERROR_NOT_SUPPORTED | The algorithm is not supported. |
| PSA_ERROR_BUFFER_TOO_SMALL | The output buffer is too small. |