Lines Matching defs:gx
51 p->gx = BN_new();
58 BN_free(p->gx);
175 hashbn(&sha, p->gx);
183 * Note that p->gx has already been calculated
230 BN_mod_exp(t2, p->gx, h, ctx->p.p, ctx->ctx);
253 BN_mod_exp(p->gx, g, x, ctx->p.p, ctx->ctx);
289 static int is_legal(const BIGNUM *gx, const JPAKE_CTX *ctx)
294 if (BN_is_negative(gx) || BN_is_zero(gx) || BN_cmp(gx, ctx->p.p) >= 0)
298 BN_mod_exp(t, gx, ctx->p.q, ctx->p.p, ctx->ctx);
307 if (!is_legal(received->p1.gx, ctx)) {
313 if (!is_legal(received->p2.gx, ctx)) {
332 if (BN_is_one(received->p2.gx)) {
338 BN_copy(ctx->p.gxc, received->p1.gx);
339 BN_copy(ctx->p.gxd, received->p2.gx);
379 /* gx = g^{xc + xa + xb} * xd * s */
380 static int compute_key(JPAKE_CTX *ctx, const BIGNUM *gx)
387 * K = (gx/g^{xb * xd * s})^{xb}
400 /* t1 = gx * t3 = X/g^{xb * xd * s} */
401 BN_mod_mul(t1, gx, t3, ctx->p.p, ctx->ctx);
434 compute_key(ctx, received->gx);