#32 Import of DER-encoded RSA private key failed

None
closed
None
5
2015-06-08
2010-11-17
YV
No

FileSource fs("private.der",true);
InvertibleRSAFunction prv_key;
prv_key.BERDecode(fs);
...
Produces BER decode error.
Import for public key (same pair) works flawlessly.
Keypair was processed by OpenSSL. The key file is valid DER-encoded RSA private key.

> openssl rsa -in private.der -inform DER -text
Private-Key: (2048 bit)
modulus:
...
publicExponent: 65537 (0x10001)
privateExponent:
...
prime1:
...
prime2:
...
exponent1:
...
exponent2:
...
coefficient:
...
writing RSA key
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----

Discussion

  • YV

    YV - 2010-11-18

    Test private key

     
  • YV

    YV - 2010-11-18

    Test public key (if needed; not to waste time regenerating it from private)

     
  • YV

    YV - 2010-11-18

    Uploaded the test keypair files
    Crupto++ version 5.61

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-12-22
     
    Last edit: Anonymous 2016-01-11
  • Jeffrey Walton

    Jeffrey Walton - 2015-06-08
    • status: open --> closed
    • assigned_to: Jeffrey Walton
    • Group: -->
     
  • Jeffrey Walton

    Jeffrey Walton - 2015-06-08

    I'm fairly certain this issue is not really an issue. Please file another bug if it still remains.