Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I used puttygen to generate a DSA private key and then exported that to the OpenSSH format and here's what I got when I ran OpenSSL's asn1parse on it:

    0:d=0  hl=4 l= 443 cons: SEQUENCE
    4:d=1  hl=2 l=   1 prim:  INTEGER           :00
    7:d=1  hl=3 l= 129 prim:  INTEGER           :B9916796B7A3EFFD5CA36368186D0ED
  139:d=1  hl=2 l=  21 prim:  INTEGER           :D832F5B01F075FEC0F162B91982F34D
  162:d=1  hl=3 l= 129 prim:  INTEGER           :9B73F47AEFF8E39584FD10ACF81CCD5
  294:d=1  hl=3 l= 128 prim:  INTEGER           :6BD9267D2D1E4546EE05F6CD087F311
  425:d=1  hl=2 l=  20 prim:  INTEGER           :15295A12325E5F1A6F7243B7BB3BE74

My question is... where is this format described? What does the first 0 integer value mean for example?

I guess I could look in the puttygen source code but is there an RFC describing this format or something?

share|improve this question
This question is not on topic, since private key formats are often implementation specific and not necessarily standardized. The above dump of the der encoding shows that the format is at least not consistent with PKCS#8. –  Henrick Hellström Sep 24 '12 at 13:47
As Henrick pointed out, your question is more about key formats and less about crypto. So it is off topic on our site here. I talked to the moderators at our sister site SuperUser and we feel it might be better off on their site, so I'm moving it there. –  mikeazo Sep 24 '12 at 14:43
What command did you use to export the key to OpenSSH format? –  HeatfanJohn Sep 25 '12 at 16:49
add comment

migrated from crypto.stackexchange.com Sep 24 '12 at 14:43

This question came from our site for software developers, mathematicians and others interested in cryptography.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.