On Fri, 31 Aug 2001, Mark Kilfoil wrote:
> Someone had this exact question a month ago, and I find myself with
> the same problem.. There were no responses, so I'm hoping it just
> got lost in the shuffle.
>
> The original message was:
>
> > I am attempting to have a C++ client do a Diffie Hellman key exchange
> > with a server written in java. I generate the keys using openssl's
> > DH_generate_key function and need to send the public key across the
> > wire to my java server.
> >
> > My java server needs this key to be X.509 encoded so I can pass the
> > byte stream into a X509EncodedKeySpec constructor. What is the best way
> > to perform this encoding?
"X.509 encoding" applies to certificate, not for DH public key.
The latter is actually one (big) number and this may be the reason
nobody bothers to design an ASN.1 encoding.
> Anyone have an answer? (I need this rather urgently, so I would
> appreciate any help..)
One could figure out how exactly the other end want to get DH public key.
Well, given DH parameters were choosen or negotiated already.
Regards,
Vadim
> Thanks!
>
> MK
> --
> Mark Kilfoil, Senior Programmer/Analyst
> ASG Technologies (506) 460-5400 ext 212
> <[EMAIL PROTECTED]>
>
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> User Support Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
>
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]