X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=rsa.c;h=fed468dc3ef46f67d9d54dbfa608805cbc8962e4;hb=104e8e74fd858a4efff3d8e186406adc431465fa;hp=0bd106ff3526935734641b239cdb3ec91649de2b;hpb=39a6b1e27fba043e9f988fa10f76ea68b796cbfd;p=secnet.git diff --git a/rsa.c b/rsa.c index 0bd106f..fed468d 100644 --- a/rsa.c +++ b/rsa.c @@ -430,8 +430,9 @@ static list_t *rsapriv_apply(closure_t *self, struct cloc loc, dict_t *context, /* * Verify that d*e is congruent to 1 mod (p-1), and mod * (q-1). This is equivalent to it being congruent to 1 mod - * lcm(p-1,q-1), i.e. congruent to 1 mod phi(n). Note that - * phi(n) is _not_ simply (p-1)*(q-1). + * lambda(n) = lcm(p-1,q-1). The usual `textbook' condition, + * that d e == 1 (mod (p-1)(q-1)) is sufficient, but not + * actually necessary. */ mpz_mul(&tmp, &d, &e); mpz_sub_ui(&tmp2, &st->p, 1);