nrfxlib API 3.3.99
Loading...
Searching...
No Matches
cc3xx_ecdh_util.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021, Arm Limited. All rights reserved.
3 * Copyright (c) 2026 Nordic Semiconductor ASA.
4 *
5 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
6 *
7 */
8
16#ifndef CC3XX_ECDH_UTIL_H
17#define CC3XX_ECDH_UTIL_H
18
19#include "psa/crypto.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
43 psa_ecc_family_t curve,
44 psa_key_bits_t key_bits,
45 const uint8_t *priv_key, size_t priv_key_size,
46 const uint8_t *publ_key, size_t publ_key_size,
47 uint8_t *secret, size_t secret_size, size_t *secret_length);
48
64 const uint8_t *priv_key, size_t priv_key_size,
65 const uint8_t *publ_key, size_t publ_key_size,
66 uint8_t *secret, size_t *secret_size);
67
68#ifdef __cplusplus
69}
70#endif
71#endif /* CC3XX_ECDH_UTIL_H */
psa_status_t cc3xx_ecdh_calc_secret_mont(const uint8_t *priv_key, size_t priv_key_size, const uint8_t *publ_key, size_t publ_key_size, uint8_t *secret, size_t *secret_size)
Calculate a shared secret value (Montgomery)
psa_status_t cc3xx_ecdh_calc_secret_wrst(psa_ecc_family_t curve, psa_key_bits_t key_bits, const uint8_t *priv_key, size_t priv_key_size, const uint8_t *publ_key, size_t publ_key_size, uint8_t *secret, size_t secret_size, size_t *secret_length)
Calculate a shared secret value (Short Weierstrass)