diff options
author | Legrandin <gooksankoo@hoiptorrow.mailexpire.com> | 2011-01-16 21:37:37 +0100 |
---|---|---|
committer | Legrandin <gooksankoo@hoiptorrow.mailexpire.com> | 2011-01-16 21:37:37 +0100 |
commit | 9851d2a6952c9030bc70a141d240bf4d52a260c0 (patch) | |
tree | 23e34e2375a15c4609a29ad83dba582616120fb8 /src/_fastmath.c | |
parent | e74df2ad6a342c0642cd8cb5a185a769b702299d (diff) | |
download | pycrypto-9851d2a6952c9030bc70a141d240bf4d52a260c0.tar.gz |
Fix comments in rsaDecrypt(), to match what the code really does.
Diffstat (limited to 'src/_fastmath.c')
-rwxr-xr-x | src/_fastmath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/_fastmath.c b/src/_fastmath.c index 67c3cc5..331832b 100755 --- a/src/_fastmath.c +++ b/src/_fastmath.c @@ -221,13 +221,13 @@ rsaDecrypt (rsaKey * key, mpz_t v) mpz_sub_ui(h, key->q, 1); mpz_fdiv_r(h, key->d, h); mpz_powm(m2, v, h, key->q); - /* h = u * ( m2 - m1 ) mod q */ + /* h = u * ( m2 - m1 + q) mod q */ mpz_sub(h, m2, m1); if (mpz_sgn(h)==-1) mpz_add(h, h, key->q); mpz_mul(h, key->u, h); mpz_mod(h, h, key->q); - /* m = m2 + h * p */ + /* m = m1 + h * p */ mpz_mul(h, h, key->p); mpz_add(v, m1, h); /* ready */ |