diff options
Diffstat (limited to 'lib/sec_library/include/ecdh.h')
-rw-r--r-- | lib/sec_library/include/ecdh.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/sec_library/include/ecdh.h b/lib/sec_library/include/ecdh.h new file mode 100644 index 00000000..06258ca1 --- /dev/null +++ b/lib/sec_library/include/ecdh.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2017-2022 Alibaba Group Holding Limited + */ + +/****************************************************************************** + * @file drv/ecdh.h + * @brief Header File for ECDH Driver + * @version V3.3 + * @date 10.June 2022 + * @model ECC + ******************************************************************************/ + +#ifndef _DRV_ECDH_H_ +#define _DRV_ECDH_H_ + +#include <stdint.h> +#include "common.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + \brief ecdh cacl share secret + \param[in] ecc ecc handle to operate. + \param[in] pubkey Pointer to the A public key. + \param[in] privkey Pointer to the B private key. + \param[out] shareKey Pointer to the share secret. + \param[out] len length of the share secret. + \return \ref uint32_t +*/ +csi_error_t csi_ecdh_calc_secret(csi_ecc_t *ecc, uint8_t privkey[32], + uint8_t pubkey[65], uint8_t shareKey[32], + uint32_t *len); + +#ifdef __cplusplus +extern "C" { +#endif + +#endif
\ No newline at end of file |