Home | History | Annotate | Download | only in jpake

Lines Matching refs:t1

218     BIGNUM *t1 = BN_new();
225 /* t1 = g^b */
226 BN_mod_exp(t1, zkpg, p->zkpx.b, ctx->p.p, ctx->ctx);
229 /* t3 = t1 * t2 = g^{hx} * g^b = g^{hx+b} = g^r (allegedly) */
230 BN_mod_mul(t3, t1, t2, ctx->p.p, ctx->ctx);
241 BN_free(t1);
347 BIGNUM *t1 = BN_new();
352 * t1 = g^xa
354 BN_mod_exp(t1, ctx->p.g, ctx->xa, ctx->p.p, ctx->ctx);
355 /* t2 = t1 * g^{xc} = g^{xa} * g^{xc} = g^{xa + xc} */
356 BN_mod_mul(t2, t1, ctx->p.gxc, ctx->p.p, ctx->ctx);
357 /* t1 = t2 * g^{xd} = g^{xa + xc + xd} */
358 BN_mod_mul(t1, t2, ctx->p.gxd, ctx->p.p, ctx->ctx);
369 * X = t1^{t2} = t1^{xb * s} = g^{(xa + xc + xd) * xb * s}
371 generate_step_part(send, t2, t1, ctx);
374 BN_free(t1);
383 BIGNUM *t1 = BN_new();
395 /* t1 = (g^{xd})^{xb} = g^{xb * xd} */
396 BN_mod_exp(t1, ctx->p.gxd, ctx->xb, ctx->p.p, ctx->ctx);
399 /* t3 = t1^t2 = g^{-xb * xd * s} */
400 BN_mod_exp(t3, t1, t2, ctx->p.p, ctx->ctx);
401 /* t1 = gx * t3 = X/g^{xb * xd * s} */
402 BN_mod_mul(t1, gx, t3, ctx->p.p, ctx->ctx);
403 /* K = t1^{xb} */
404 BN_mod_exp(ctx->key, t1, ctx->xb, ctx->p.p, ctx->ctx);
409 BN_free(t1);
416 BIGNUM *t1 = BN_new();
422 * t1 = xa + xb
424 BN_mod_add(t1, ctx->xa, ctx->xb, ctx->p.q, ctx->ctx);
425 /* t2 = g^{t1} = g^{xa+xb} */
426 BN_mod_exp(t2, ctx->p.g, t1, ctx->p.p, ctx->ctx);
427 /* t1 = g^{xc} * t2 = g^{xc + xa + xb} */
428 BN_mod_mul(t1, ctx->p.gxc, t2, ctx->p.p, ctx->ctx);
430 if(verify_zkp(received, t1, ctx))
439 BN_free(t1);