sharplispers / ironclad

A cryptographic toolkit written in Common Lisp
BSD 3-Clause "New" or "Revised" License
166 stars 28 forks source link

Include the prime factors for RSA private keys #32

Closed dnaeon closed 3 years ago

dnaeon commented 3 years ago

I'm intending to use ironclad for generating private/public key pairs, which will then be encoded as OpenSSH private and public keys.

The RSA primes p and q are also part of the binary blob for OpenSSH private keys, so in order to properly encode a private key in OpenSSH format I need to have these as part of the RSA-PRIVATE-KEY class.

This MR adds p and q primes to RSA-PRIVATE-KEY class and also exports their readers -- RSA-KEY-PRIME-P and RSA-KEY-PRIME-Q respectively.

glv2 commented 3 years ago

Thanks.