Re: RSA 1024 in certificate
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


sci.crypt archive

Re: RSA 1024 in certificate

From: Tom St Denis <tomstdenis@gmail.com>
Date: Mon Feb 06 2006 - 18:34:12 CET

MajorSoul wrote:
> why does the DER encoding of public key modulus begins with
> 02 81 81 00 and not with 02 81 80 ??

The length is clearly 0x81 bytes. The first 0x81 means "length of
length is 0x81 & 0x7F bytes" in this case "1" and the second 0x81 is
the length byte(s).

In this case the modulus has the 1023rd bit set to 1 which in ASN.1
case means you have to 00 pad it since a leading msb of 1 means
negative.

Tom
Received on Tue Feb 7 21:00:06 2006