Menu

#110 Exported private key from 4096 bit SSH key is wrong

1.4.1
closed-fixed
None
5
2018-03-04
2016-01-29
Trel
No

I did the following

  1. Generated a key pair with ssh-keygen -b 4096 (no password)
  2. Imported the key into XCA.
  3. Exported the PEM Private key

The resulting Private key was NOT the same key I imported.
Further, when I tried to then import it into puttykeygen, it told me that file was not even a valid format.

Discussion

  • Trel

    Trel - 2016-02-03

    I have some more information.

    Export -> File -> PEM Private = Produces the same text as the original
    Export -> Clipboard -> PEM Private = Produces something different

    (This is on Windows if this makes a difference)

     
  • Christian Hohnstaedt

    • status: open --> accepted
    • Group: v1.0_(example) --> 1.4.1
     
  • Christian Hohnstaedt

    Export -> File -> PEM Private exports a PKCS#1 key
    Export -> Clipboard -> PEM Private exports a PKCS#8 structure

    puttykeygen apparently can't handle the PKCS#8 structure.

     
  • Christian Hohnstaedt

    • status: accepted --> closed-fixed
     
  • Christian Hohnstaedt

    Fixed in XCA 1.4.1 with:

    commit eaabb2a28dc809149588e2eb34af4995d8355722
    Author: Christian Hohnstaedt christian@hohnstaedt.de
    Date: Sat Jan 6 21:18:31 2018 +0100

    SF Bug #110 Exported private key from 4096 bit SSH key is wrong
    
    Actually, it just differs. It is PKCS#8 instead of PKCS#1