PuTTY bug rsa-import-primeorder

This is a mirror. The primary PuTTY web site can be found here.

Home | Licence | FAQ | Docs | Download | Keys | Links
Mirrors | Updates | Feedback | Changes | Wishlist | Team

summary: PuTTYgen shouldn't insist that p > q in imported OpenSSH RSA private keys
class: bug: This is clearly an actual problem we want fixed.
difficulty: tricky: Needs many tuits.
priority: medium: This should be fixed one day.
present-in: 0.58
fixed-in: r8202 2008-10-09

OpenSSH-format RSA private keys (also known as PEM format) contain a base64-encoded PKCS#1 RSAPrivateKey. When generated by OpenSSL, these always have p > q, but this isn't actually required by PKCS#1; there is a report that VanDyke SecureCRT generates them in a random order, for instance. At present, PuTTYgen will reject keys where p < q, but it should accept them and make whatever changes are necessary to have them work with PuTTY's RSA code.

This is not quite trivial to do in the current PuTTY code organisation, since the OpenSSH import code does not actually convert the input key to bignum format; it just massages it into one of the other private key blob formats and feeds that to an import function in sshrsa.c. In order to reverse the order of the primes, it would have to compute the new iqmp value, which would involve a conversion to bignums and back. Still not impossible by any means, but I'd guess more like a thirty-line job than three.

Audit trail for this bug.


If you want to comment on this web site, see the Feedback page.
(last revision of this bug record was at 2008-10-09 19:59:50 +0100)