JoshKaufman / ursa

URSA - RSA public/private key OpenSSL bindings for Node.js
Other
618 stars 135 forks source link

Get components from generated private key #134

Closed tanx closed 8 years ago

tanx commented 8 years ago

Hey. Thanks for your great library. I'm integrating ursa in OpenPGP.js for native RSA under node. I saw that there is a way to create a private key from components:

ursa.createPrivateKeyFromComponents(modulus, exponent, p, q, dp, dq, inverseQ, d)

But is there also the other way around ... to get the components from a generated private key? I need the following components:

https://github.com/openpgpjs/openpgpjs/blob/master/src/crypto/public_key/rsa.js#L198-L204

Thanks!

tanx commented 8 years ago

Ha! Just saw there is already an issue: https://github.com/quartzjer/ursa/issues/121