#define CIPHER_CHECK_WORD
Definition crypto_security.h:111
td_s32 ed_mul_sub(const drv_pke_ecc_curve *ecc, const drv_pke_data *s, const drv_pke_data *h, const drv_pke_ecc_point *a, const drv_pke_ecc_point *r)
calculate sB - hA for ed verify. the result is in ed_addr_cx, ed_addr_cy and ed_addr_cz,...
td_s32 secret_expand(const td_u8 *secret, td_u8 *a, td_u8 *prefix, const td_u32 len)
private key expand function. from 32 byte private key get 64 byte output. (a, prefix) = sha512(secret...
td_s32 point_decompress(const drv_pke_data *enc_pkey, const drv_pke_data *p, const drv_pke_ecc_point *pkey)
point decompress, from little endian data get real point by curve equation.
td_s32 sha512_modq(const drv_pke_data *q, const drv_pke_data *in1, const drv_pke_data *in2, const drv_pke_data *in3, const drv_pke_data *out)
calculate the sha512 result of three segment buffer and modulo the result by q.
td_s32 point_mul_compress(const drv_pke_data *k, const drv_pke_ecc_point *u, const drv_pke_data *p, const drv_pke_ecc_point *r)
R = k * u, point multiplication with point compress.
td_s32 ed_ecfp_mul_naf(const drv_pke_ecc_curve *ecc, const drv_pke_data *k, const drv_pke_ecc_point *p, const drv_pke_ecc_point *r CIPHER_CHECK_WORD)
R = k * G, point multiplication.
td_s32 ed_ecfp_mul_naf_cal(td_u32 work_len, const drv_pke_data *k)
R = k * G, point multiplication. ed inner function, while the G is the default point G(gx,...
td_s32 ed_ecfn_sign_s(const drv_pke_data *sk, const drv_pke_data *r, const drv_pke_data *h, const drv_pke_data *n, const drv_pke_data *s)
multi-multiplication to calculate the signature s. s = (r + h * sk) mod n.
td_s32 ed_secret_to_public(const drv_pke_ecc_curve *ecc, const drv_pke_data *priv_key, const drv_pke_ecc_point *pub_key)
Qu = d * G, get public key from private key.
Definition crypto_pke_struct.h:74
Definition crypto_pke_struct.h:96
Definition crypto_pke_struct.h:80
unsigned char td_u8
Definition td_type.h:36
unsigned int td_u32
Definition td_type.h:38
int td_s32
Definition td_type.h:44