X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fjpake%2Fjpake.c;h=c8bbe40a65aaea7e073a81f9bf70c1fac8df13fd;hp=f2489a4eef97de5295675b990f944e19df16e0df;hb=c695ebe2a09cb7f9aaec3c435ab94d36a6d6aece;hpb=2a49fef28e7776fb58f36487cae4c5f2546a3d15 diff --git a/crypto/jpake/jpake.c b/crypto/jpake/jpake.c index f2489a4eef..c8bbe40a65 100644 --- a/crypto/jpake/jpake.c +++ b/crypto/jpake/jpake.c @@ -191,7 +191,7 @@ static void generate_zkp(JPAKE_STEP_PART *p, const BIGNUM *x, BIGNUM *h = BN_new(); BIGNUM *t = BN_new(); - /* + /*- * r in [0,q) * XXX: Java chooses r in [0, 2^160) - i.e. distribution not uniform */ @@ -348,7 +348,7 @@ int JPAKE_STEP2_generate(JPAKE_STEP2 *send, JPAKE_CTX *ctx) BIGNUM *t1 = BN_new(); BIGNUM *t2 = BN_new(); - /* + /*- * X = g^{(xa + xc + xd) * xb * s} * t1 = g^xa */ @@ -360,7 +360,7 @@ int JPAKE_STEP2_generate(JPAKE_STEP2 *send, JPAKE_CTX *ctx) /* t2 = xb * s */ BN_mod_mul(t2, ctx->xb, ctx->secret, ctx->p.q, ctx->ctx); - /* + /*- * ZKP(xb * s) * XXX: this is kinda funky, because we're using * @@ -385,7 +385,7 @@ static int compute_key(JPAKE_CTX *ctx, const BIGNUM *gx) BIGNUM *t2 = BN_new(); BIGNUM *t3 = BN_new(); - /* + /*- * K = (gx/g^{xb * xd * s})^{xb} * = (g^{(xc + xa + xb) * xd * s - xb * xd *s})^{xb} * = (g^{(xa + xc) * xd * s})^{xb} @@ -418,7 +418,7 @@ int JPAKE_STEP2_process(JPAKE_CTX *ctx, const JPAKE_STEP2 *received) BIGNUM *t2 = BN_new(); int ret = 0; - /* + /*- * g' = g^{xc + xa + xb} [from our POV] * t1 = xa + xb */