23 lines
468 B
C
23 lines
468 B
C
#ifndef __ECURVE_H__
|
|
#define __ECURVE_H__
|
|
|
|
#include <stdbool.h>
|
|
#include "miracl.h"
|
|
#include "mirdef.h"
|
|
|
|
typedef struct ecc_params
|
|
{
|
|
big a; // 椭圆曲线方程系数a
|
|
big b; // 椭圆曲线方程系数b
|
|
big q; // 模
|
|
big p; // 阶
|
|
big P_x; // 基点横坐标
|
|
big P_y; // 基点纵坐标
|
|
epoint *P; // 基点
|
|
} ECC_PARAMS;
|
|
|
|
bool setupEcurve(ECC_PARAMS *params);
|
|
|
|
void freeEcurve(ECC_PARAMS *params);
|
|
|
|
#endif // ecurve.h
|