Hi, On Mon, Sep 07, 2009 at 06:31:41PM +0200, Gal?t Bence wrote:
> data as hexa. I compared that with the > 'openssl rsa -in mykey.key -text' command output and I found some > additional (info marked with unknown tag) data. I need to know what > these unknown fields means, how the length of each field is stored, to > read any private key params back from a PEM file. it's the ASN.1 encoding of the RSA key data. The PEM file contains an ASN.1 structure that describes the key. The structure is base64 encoded and has the BEGIN END lines attached. The .der format of the key contains just the structure. See the example key below. Best regards, Martin kai...@blabla:/home/kaiser/tmp > dumpasn1 -h a.der <30 82 01 3A> 0 314: SEQUENCE { <02 01> 4 1: INTEGER 0 <02 41> 7 65: INTEGER : 00 A5 54 25 70 32 B5 C4 9D 0D 78 22 3D 72 71 9B ... : B3 <02 03> 74 3: INTEGER 65537 <02 40> 79 64: INTEGER : 0A AF A1 AB DA DB 3C D6 19 E4 C5 F1 CA CF E5 0B ... <02 21> 145 33: INTEGER : 00 D1 51 75 0C 05 A9 3C D8 52 43 00 BF 0D B9 67 ... <02 21> 180 33: INTEGER : 00 CA 33 35 A2 16 19 1F E9 F4 5B 8F AE BC 54 1D ... <02 20> 215 32: INTEGER : 1D 5E FC B9 8F 21 CC 33 DE 77 20 67 AE 99 51 7F : EA F9 C0 EC 64 55 6C B9 9B 6B 2E 2A 4E 0F 2B B1 <02 21> 249 33: INTEGER : 00 C3 29 9A 62 D0 21 80 04 38 AF 07 88 08 8E C8 ... <02 20> 284 32: INTEGER : 21 49 F9 B4 A5 A0 1D 0C 71 25 B3 08 6A 30 EF 47 : 32 65 DA 12 02 61 C5 9D 11 8C 95 31 D8 34 AD E6 : } ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org