On Tue, Apr 17, 2007 at 08:42:12AM -0700, Edward Chan wrote:

> Thanks for the reply.  So I'm a bit confused as to how different crypto
> packages interoperate.  I've been having a problem with MS CryptoAPI
> doing a DH key exchange with OpenSSL.  There are some quirks such as
> byte order, and a couple other things.  But for the most part, I have it
> working.  But occasionally, I get failures which I suspect is due to the
> BIGNUM format of the pubkey that is exchanged.  Has anybody had success
> getting these 2 libs working together?

You are confusing BIGNUM which is an internal library structure for
performing high precision integer arithmetic, with ASN.1 which is an on
the wire format for serialized data. The protocols that exchange public
keys, ... are not sending BIGNUM structures around, OpenSSL serializes
and de-deserializes BIGNUMs to/from appropriate ASN.1 structures.

For example X.509v3 is an ASN.1 data structure that contains some large
integers, but they are not in any sense BIGNUMs until OpenSSL parses
the ASN.1 and constructs its own (X509 *) structure, in which some of
the fields ultimately contain BIGNUM references. The serialized ASN.1
is standard, the in-memory (X509 *) is OpenSSL specific.

-- 
        Viktor.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to