Re: reading Public key certificates in Firefox
From: Mike Amling (nospam_at_nospam.com)
Date: 11/17/05
- Previous message: Luc The Perverse: "Re: Looking for an encryption program"
- In reply to: James Muir: "reading Public key certificates in Firefox"
- Next in thread: James Muir: "Re: reading Public key certificates in Firefox"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 17 Nov 2005 03:37:47 GMT
James Muir wrote:
> Go to Edit -> Preferences -> Advanced -> Certificates -> Manage
> Certificates and you can view the public key certificates Firefox knows
> about. By doing so, I can look at the details of cert named "RSA
> Security 2048 v3".
>
> When I look at the field "Subject's Public Key" of this cert, you get
>
> 30 82 01 0a 02 82 01 01 00 b7 8f 55 71 d2 80 dd
> 7b 69 79 a7 f0 18 50 32 3c 62 67 f6 0a 95 07 dd
> e6 1b f3 9e d9 d2 41 54 6b ad 9f 7c be 19 cd fb
> 46 ab 41 68 1e 18 ea 55 c8 2f 91 78 89 28 fb 27
> 29 60 ff df 8f 8c 3b c9 49 9b b5 a4 94 ce 01 ea
> 3e b5 63 7b 7f 26 fd 19 dd c0 21 bd 84 d1 2d 4f
> 46 c3 4e dc d8 37 39 3b 28 af cb 9d 1a ea 2b af
> 21 a5 c1 23 22 b8 b8 1b 5a 13 87 57 83 d1 f0 20
> e7 e8 4f 23 42 b0 00 a5 7d 89 e9 e9 61 73 94 98
> 71 26 bc 2d 6a e0 f7 4d f0 f1 b6 2a 38 31 81 0d
> 29 e1 00 c1 51 0f 4c 52 f8 04 5a aa 7d 72 d3 b8
> 87 2a bb 63 10 03 2a b3 a1 4f 0d 5a 5e 46 b7 3d
> 0e f5 74 ec 99 9f f9 3d 24 81 88 a6 dd 60 54 e8
> 95 36 3d c6 09 93 9a a3 12 80 00 55 99 19 47 bd
> d0 a5 7c c3 ba fb 1f f7 f5 0f f8 ac b9 b5 f4 37
> 98 13 18 de 85 5b b7 0c 82 3b 87 6f 95 39 58 30
> da 6e 01 68 17 22 cc c0 0b 02 03 01 00 01
>
> My question is, how do you parse this into a modulus and exponent? The
> three bytes at the end look like they describe the exponent 65537 but I
> suppose the real exponent could be much larger. I know the modulus is
> probably 2048 bits according to the name of the cert, but 2048 isn't
> listed anyplace else in the fields Firefox displays. I count 2160 bits
> above.
>
> Also, does anyone know if Firefox will export its certificates into,
> say, a .PEM or .DER file?
If you're just interested in this particular public key, the 02 in
the first line indicates an integer follows. The 82 indicates the length
field for that integer is two bytes long. The 01 01 is the two-byte
length field. The next 257 bytes are the public modulus. That's followed
in the last line by 02, indicating an integer follows. The 03 in the
last line is the length of the integer, and the 01 00 01 is the public
exponent.
If you're going to be working with many such certificates, you should
get a DER parser.
--Mike Amling
- Previous message: Luc The Perverse: "Re: Looking for an encryption program"
- In reply to: James Muir: "reading Public key certificates in Firefox"
- Next in thread: James Muir: "Re: reading Public key certificates in Firefox"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|