X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/9400cf6f5d03ad3d258bfc6b373cbb0b52bf5863..f317611e5572e4292e3ee88f6956a97fcd794089:/sshrsag.c diff --git a/sshrsag.c b/sshrsag.c index 7b1883af..f8e7651b 100644 --- a/sshrsag.c +++ b/sshrsag.c @@ -6,6 +6,7 @@ #define RSA_EXPONENT 37 /* we like this prime */ +#if 0 /* bignum diagnostic function */ static void diagbn(char *prefix, Bignum md) { int i, nibbles, morenibbles; static const char hex[] = "0123456789ABCDEF"; @@ -20,6 +21,7 @@ static void diagbn(char *prefix, Bignum md) { if (prefix) putchar('\n'); } +#endif int rsa_generate(struct RSAKey *key, struct RSAAux *aux, int bits, progfn_t pfn, void *pfnparam) { @@ -61,7 +63,6 @@ int rsa_generate(struct RSAKey *key, struct RSAAux *aux, int bits, * We don't generate e; we just use a standard one always. */ key->exponent = bignum_from_short(RSA_EXPONENT); - diagbn("e = ",key->exponent); /* * Generate p and q: primes with combined length `bits', not @@ -98,17 +99,10 @@ int rsa_generate(struct RSAKey *key, struct RSAAux *aux, int bits, pfn(pfnparam, 3, 3); freebn(pm1); freebn(qm1); - diagbn("p = ", aux->p); - diagbn("q = ", aux->q); - diagbn("e = ", key->exponent); - diagbn("n = ", key->modulus); - diagbn("phi(n) = ", phi_n); key->private_exponent = modinv(key->exponent, phi_n); pfn(pfnparam, 3, 4); - diagbn("d = ", key->private_exponent); aux->iqmp = modinv(aux->q, aux->p); pfn(pfnparam, 3, 5); - diagbn("iqmp = ", aux->iqmp); /* * Clean up temporary numbers.