| CPAN Ratings (Gamma) Crypt-RSA reviews | |
| Home | Search | About | Login |
RSS | Module Info | Add a review of Crypt-RSA
2 out of 2 found this review helpful:
It is possible to use "openssl rsa -in foo.cert.pem -text -noout" to dump the keys. Alternatively, you could probably parse them yourself with Convert::ASN1. It's nontrivial, though, ASN.1 being what it is, I guess. Besides, there is no proper x509v3 reader for Perl. (I have some certs here which Convert::ASN1's x509 example can not read.)
So just use openssl.
The parameters you want are called modulus, private exponent and public exponent. They go by the names N, D and E. Use N and D for privkey and N and E for pubkey.
There is a bug in Crypt::RSA::Key::Private, and this doesn't work:
my $key = Crypt::RSA::Key::Private->new();
$key->n($n); # where $n is "0x12345678", the hexdigits dumped by openssl without space or colons.
You have to do:
$key->n(Math::Pari::_hex_cvt($n))
until it is fixed. Public key accessor methods n() and e() do work, though. I have already reported this issue, but no new version exists as of this date.
Antti Lankila - 2007-04-13 02:19:34
Was this review helpful to you?
Yes
No
Unfortunately doesn't seem to accept keys/certificates in openssl format :(
Johan Almqvist - 2006-01-29 06:14:36
Was this review helpful to you?
Yes
No
There're problems with installation in Windows systems without Cygwin.
Черненко Эдуард Павл - 2004-12-19 05:50:26
Was this review helpful to you?
Yes
No
|
|
|