Re: ASN.1 "INTEGER"?
From: Bruce Stephens (bruce+usenet_at_cenderis.demon.co.uk)
Date: 07/28/04
- Next message: David Wagner: "Re: White-Box Cryptography"
- Previous message: Paul Rubin: "Re: Erasing an OTP file on a SD card."
- In reply to: Tom St Denis: "ASN.1 "INTEGER"?"
- Next in thread: Francois Grieu: "Re: ASN.1 "INTEGER"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 28 Jul 2004 19:03:38 +0100
Tom St Denis <tomstdenis@iahu.ca> writes:
[...]
> What I am having a problem with is figuring out ASN.1's "INTEGER"
> type. I looked up section 18.4 of one of the freely available ITU
> documents and it only specifies the grammar for writing ASN.1
> syntax.
>
> So in PKCS #1 when it specifies that a private key has "n INTEGER"
> how is that actually stored in memory? I assume you use OS2IP but
> how does the interpretter know how large the modulus is [and
> therefore how much to read in per int?].
The ASN.1 syntax on its own doesn't tell you what the bytes are going
to be, you also need to know the encoding rules. In this case, you
want DER (although BER might also work, if you're lucky---DER is
safer, though).
This page probably has enough details:
<http://luca.ntop.org/Teaching/Appunti/asn1.html>
You could also look at code which does stuff, like dumpasn1, snacc (or
its libraries), or openssl.
Doubtless there's Java code out there, too.
- Next message: David Wagner: "Re: White-Box Cryptography"
- Previous message: Paul Rubin: "Re: Erasing an OTP file on a SD card."
- In reply to: Tom St Denis: "ASN.1 "INTEGER"?"
- Next in thread: Francois Grieu: "Re: ASN.1 "INTEGER"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|