Lines Matching full:curve
18 const struct ecc_curve *curve; member
27 const struct ecc_curve *curve; member
74 sig->curve->g.ndigits); in ecdsa_get_signature_r()
83 sig->curve->g.ndigits); in ecdsa_get_signature_s()
88 const struct ecc_curve *curve = ctx->curve; in _ecdsa_verify() local
89 unsigned int ndigits = curve->g.ndigits; in _ecdsa_verify()
98 if (vli_is_zero(r, ndigits) || vli_cmp(r, curve->n, ndigits) >= 0 || in _ecdsa_verify()
99 vli_is_zero(s, ndigits) || vli_cmp(s, curve->n, ndigits) >= 0) in _ecdsa_verify()
107 vli_mod_inv(s1, s, curve->n, ndigits); in _ecdsa_verify()
109 vli_mod_mult_slow(u1, hash, s1, curve->n, ndigits); in _ecdsa_verify()
111 vli_mod_mult_slow(u2, r, s1, curve->n, ndigits); in _ecdsa_verify()
113 ecc_point_mult_shamir(&res, u1, &curve->g, u2, &ctx->pub_key, curve); in _ecdsa_verify()
116 if (unlikely(vli_cmp(res.x, curve->n, ndigits) == 1)) in _ecdsa_verify()
118 vli_sub(res.x, res.x, curve->n, ndigits); in _ecdsa_verify()
133 size_t bufsize = ctx->curve->g.ndigits * sizeof(u64); in ecdsa_verify()
135 .curve = ctx->curve, in ecdsa_verify()
161 hash, ctx->curve->g.ndigits); in ecdsa_verify()
174 ctx->curve = ecc_get_curve(curve_id); in ecdsa_ecc_ctx_init()
175 if (!ctx->curve) in ecdsa_ecc_ctx_init()
196 ctx->curve->g.ndigits); in ecdsa_ecc_ctx_reset()
225 if (ndigits != ctx->curve->g.ndigits) in ecdsa_set_pub_key()
233 ret = ecc_is_pubkey_valid_full(ctx->curve, &ctx->pub_key); in ecdsa_set_pub_key()
251 return DIV_ROUND_UP(ctx->curve->nbits, 8); in ecdsa_max_size()