Hmm, after playing for a while I think I may be going about this the
completely wrong way! Has anyone used DH key exchange with crypto++ over
a network before (e.g. with socket applications)?

whats the point of 

memcmp (val1.begin(), val2.begin(), db.AgreedValueLength ())

line 207 in validat2.cpp?

I'm happy to post code but don't want to clutter the mailing list!

Regards

Jim

On Wed, 2004-02-18 at 15:24, James Vanns wrote:
> Not really. I just want to encrypt the traffic and don't need server or
> client authentication. I just want to use public-key crypto. I think
> I've actually done it now (the key exchange). I wonder though once the
> two parties have Agree()'d on a key how to I encrypt some data with
> these keys? Anyone give me a quick example? I have these variables now:
> 
> machine 1:
> SecByteBlock val (dh.AgreedValueLength ());
> SecByteBlock local_public_key (dh.PublicKeyLength ());
> SecByteBlock foreign_public_key (dh.PublicKeyLength ());
> SecByteBlock local_private_key (dh.PrivateKeyLength ());
> 
> machine 2:
> SecByteBlock val (dh.AgreedValueLength ());
> SecByteBlock local_public_key (dh.PublicKeyLength ());
> SecByteBlock foreign_public_key (dh.PublicKeyLength ());
> SecByteBlock local_private_key (dh.PrivateKeyLength ());
> 
> and they have successfully swapped public keys and Agree()'d (I've based
> this on validat2.cpp DH code.
> 
> Where do I go from here?
> 
> Cheers
> 
> Jim
> 
> On Wed, 2004-02-18 at 15:11, David C. Partridge wrote:
> > Rather than sending a public key, shouldn't you be sending a certificate?
> > 
> > Dave
-- 
James Vanns BSc (Hons) MCP
Linux Systems Administrator
Senior Software Engineer (Linux / C & C++)
Canterbury Christ Church University College
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x24045370

Reply via email to