Lines Matching defs:g_x

69     int hash_alg, const BIGNUM *g_v, const BIGNUM *g_x,
90 buffer_put_bignum2(&b, g_x);
130 int hash_alg, const BIGNUM *x, const BIGNUM *g_x,
138 SCHNORR_DEBUG_BN((g_x, "%s: g_x = ", __func__));
141 if (BN_cmp(g_x, BN_value_one()) <= 0) {
142 error("%s: g_x < 1", __func__);
145 if (BN_cmp(g_x, grp_p) >= 0) {
146 error("%s: g_x > g", __func__);
180 if ((h = schnorr_hash(grp_p, grp_q, grp_g, hash_alg, g_v, g_x,
224 const BIGNUM *x, const BIGNUM *g_x, const u_char *id, u_int idlen,
231 x, g_x, id, idlen, &r, &e) != 0)
254 * public exponent g_x (g^x) under group defined by 'grp_p', 'grp_q' and
261 int hash_alg, const BIGNUM *g_x, const u_char *id, u_int idlen,
269 SCHNORR_DEBUG_BN((g_x, "%s: g_x = ", __func__));
272 if (BN_cmp(g_x, BN_value_one()) <= 0) {
273 error("%s: g_x <= 1", __func__);
276 if (BN_cmp(g_x, grp_p) >= 0) {
277 error("%s: g_x >= p", __func__);
298 if (BN_mod_exp(gx_q, g_x, grp_q, grp_p, bn_ctx) == -1) {
299 error("%s: BN_mod_exp (g_x^q mod p)", __func__);
309 if ((h = schnorr_hash(grp_p, grp_q, grp_g, hash_alg, e, g_x,
316 if (BN_mod_exp(g_xh, g_x, h, grp_p, bn_ctx) == -1) {
317 error("%s: BN_mod_exp (g_x^h mod p)", __func__);
324 error("%s: BN_mod_exp (g_x^h mod p)", __func__);
355 * g_x (g^x) under group defined by 'grp_p', 'grp_q' and 'grp_g' using a
363 const BIGNUM *g_x, const u_char *id, u_int idlen,
393 g_x, id, idlen, r, e);
580 BIGNUM *g_x;
587 if ((g_x = BN_new()) == NULL)
590 if (BN_mod_exp(g_x, grp_g, x, grp_p, bn_ctx) == -1)
591 fatal("%s: g_x", __func__);
592 if (schnorr_sign_buf(grp_p, grp_q, grp_g, x, g_x, "junk", 4,
595 if (schnorr_verify_buf(grp_p, grp_q, grp_g, g_x, "junk", 4,
598 if (schnorr_verify_buf(grp_p, grp_q, grp_g, g_x, "JUNK", 4,
602 if (schnorr_verify_buf(grp_p, grp_q, grp_g, g_x, "junk", 4,
606 BN_free(g_x);