API参考
载入中...
搜索中...
未找到
sm9_ecp2.h
1/*
2 * This file is part of the openHiTLS project.
3 *
4 * openHiTLS is licensed under the Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 *
8 * http://license.coscl.org.cn/MulanPSL2
9 *
10 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13 * See the Mulan PSL v2 for more details.
14 */
15
16#ifndef __HEADER_SM9_Fp2_ECP_H__
17#define __HEADER_SM9_Fp2_ECP_H__
18
19#include "hitls_build.h"
20#ifdef HITLS_CRYPTO_SM9
21
22#include "sm9_fp2.h"
23
24#include "sm9_curve.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30void SM9_Ecp2_A_ReadBytes(SM9_ECP2_A *dst, const uint8_t *src);
31void SM9_Ecp2_A_WriteBytes(uint8_t *dst, SM9_ECP2_A *src);
32
33void SM9_Ecp2_A_Reset(SM9_ECP2_A *pEcp2_A);
34void SM9_Ecp2_J_Reset(SM9_ECP2_J *pEcp2_J);
35
36void SM9_Ecp2_A_Assign(SM9_ECP2_A *pPointA, SM9_ECP2_A *pPointB);
37void SM9_Ecp2_J_Assign(SM9_ECP2_J *pPointA, SM9_ECP2_J *pPointB);
38
39void SM9_Ecp2_A_ToJ(SM9_ECP2_J *pJ_Point, SM9_ECP2_A *pA_Point);
40void SM9_Ecp2_J_ToA(SM9_ECP2_A *pA_Point, SM9_ECP2_J *pJ_Point);
41
42void SM9_Ecp2_J_AddA(SM9_ECP2_J *pJ_Sum, SM9_ECP2_J *pJp, SM9_ECP2_A *pAp);
43void SM9_Ecp2_J_DoubleJ(SM9_ECP2_J *pJp_Result, SM9_ECP2_J *pJp);
44
45void SM9_Ecp2_KP(SM9_ECP2_A *pKP, SM9_ECP2_A *pAp, uint32_t *pwK);
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif // HITLS_CRYPTO_SM9
52
53#endif
54