SemiDrive SSDK Appication Program Interface PTG3.0
ecdh.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 *
4 *Copyright (c) 2021-2029 Semidrive Incorporated. All rights reserved.
5 *Software License Agreement
6 *
7 ******************************************************************************
8 */
9#ifndef ECDH_H
10#define ECDH_H
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include <eccp_curve.h>
17#include <pke.h>
18
19/*ECDH return code*/
24};
25
26uint32_t ecdh_compute_key(eccp_curve_t *curve, uint8_t *local_prikey,
27 uint8_t *peer_pubkey, uint8_t *key,
28 uint32_t keyByteLen, KDF_FUNC kdf);
29
30#ifdef PKE_SEC
31
32#define ECDH_SEC
33#ifdef ECDH_SEC
34
35enum ECDH_RET_CODE_S { ECDH_SUCCESS_S = 0x8B9BC1E1, ECDH_ERROR_S = 0xCBC192A3 };
36
37uint32_t ecdh_compute_key_s(eccp_curve_t *curve, uint8_t *local_prikey,
38 uint8_t *peer_pubkey, uint8_t *key,
39 uint32_t keyByteLen, KDF_FUNC kdf);
40
41#endif
42#endif
43
44#ifdef __cplusplus
45}
46#endif
47
48#endif
Semidrive CRYPTO eccp_curve header file.
ECDH_RET_CODE
Definition: ecdh.h:20
@ ECDH_POINTOR_NULL
Definition: ecdh.h:22
@ ECDH_SUCCESS
Definition: ecdh.h:21
@ ECDH_INVALID_INPUT
Definition: ecdh.h:23
uint32_t ecdh_compute_key(eccp_curve_t *curve, uint8_t *local_prikey, uint8_t *peer_pubkey, uint8_t *key, uint32_t keyByteLen, KDF_FUNC kdf)
Semidrive CRYPTO pke header file.
@ PKE_SUCCESS
Definition: pke.h:101
void *(* KDF_FUNC)(const void *input, uint32_t bytelen, uint8_t *key, uint32_t keybytelen)
Definition: pke.h:112
Definition: eccp_curve.h:32