>From what I remember offhand, the former: 03 81 81 00 is
03 Bit string 81 Length of contents = 1 byte; the top-bit is set to signify that there are more than 127 octets of content 81 the bit string uses 0x81 octets - 129 - corresponds to a 1024 bit key extended to 129 octets to stop number being negative (I would have to assume that the most significant octet would be >= 0x80, which would be negative) 00 There are 0 unused bits in the bit-string and 03 82 01 01 00 03 Bit string 82 There are 2 following bytes to describe length; content greater than 127 octets 01 01 0x0101 = 257 - corresponds to a 2048-bit key extended to 257 octets (so not negative) 00 There are 0 unused bits in the bit-string It's been a long time since I played with ASN.1 directly, but there's plenty of references available via Google (or any other search engines) Carl ________________________________ From: owner-openssl-us...@openssl.org [owner-openssl-us...@openssl.org] on behalf of Mithun Kumar [mithunsi...@gmail.com] Sent: 14 March 2014 12:48 To: openssl-users@openssl.org Subject: Need understanding on certutil output. What is the difference between these two formats Below is the ASN output using certuil tool. Cert1:- 0618: 30 0d ; SEQUENCE (d Bytes) 061a: | 06 09 ; OBJECT_ID (9 Bytes) 061c: | | 2a 86 48 86 f7 0d 01 01 05 | | ; 1.2.840.113549.1.1.5 sha1RSA 0625: | 05 00 ; NULL (0 Bytes) 0627: 03 81 81 ; BIT_STRING (81 Bytes) 062a: 00 Cert2:- 0780: 30 0d ; SEQUENCE (d Bytes) 0782: | 06 09 ; OBJECT_ID (9 Bytes) 0784: | | 2a 86 48 86 f7 0d 01 01 05 | | ; 1.2.840.113549.1.1.5 sha1RSA 078d: | 05 00 ; NULL (0 Bytes) 078f: 03 82 01 01 ; BIT_STRING (101 Bytes) 0793: 00 What does the highlighted values indicate? Any idea? -mithun