RE: Doubt about the use and initialization of DH struct

2007-12-16 Thread David Schwartz
> Thank you for your reply!!! > I have another question about this topic. I need to generate a shared > secret which size 16 byte, using a DH_compute_key() function. How can > i manage that size Produce a much larger shared secret and then reduce it securely to 16 bytes. > Should I u

RE: Doubt about the use and initialization of DH struct

2007-12-16 Thread Agustin Cozzetti
[mailto:[EMAIL PROTECTED] On Behalf Of Agustin CozzettiSent: December 15, 2007 12:15 PMTo: [EMAIL PROTECTED]: RE: Doubt about the use and initialization of DH struct Thank you for your reply!!!I have another question about this topic. I need to generate a shared secret which size 16 byte, using

RE: Doubt about the use and initialization of DH struct

2007-12-15 Thread Bill Colvin
Bill From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Agustin Cozzetti Sent: December 15, 2007 12:15 PM To: openssl-users@openssl.org Subject: RE: Doubt about the use and initialization of DH struct Thank you for your reply!!! I have another question about this topic. I need to ge

RE: Doubt about the use and initialization of DH struct

2007-12-15 Thread Agustin Cozzetti
Thank you for your reply!!! I have another question about this topic. I need to generate a shared secret which size 16 byte, using a DH_compute_key() function. How can i manage that size Should I use a 16 byte dh->p Thank you for your help, Hector Agustin Cozzetti Subject: RE: Doub

RE: Doubt about the use and initialization of DH struct

2007-12-14 Thread Bill Colvin
First, if you pasted your original code into the email, then you have several typos. Second, two of the lines generate warnings on compilation about incompatible pointer types - these are significant. The lines are: num_byte = BN_dec2bn(dh_struct->p,str_p); num_byte = BN_dec2bn(dh_struct->g,

RE: Doubt about the use and initialization of DH struct

2007-12-14 Thread David Schwartz
> dh_struct = DH_new(); > dh_struct->p = BN_new(); > dh_struct->g = BN_new(); > dh_struct->priv_key = BN_new(); > dh_struct->pub_key = BN_new(); > num_byte = BN_dec2bn(dh_struct->p,str_p); // Here it seems that not execute anything about Something is very wrong in your code. BN_new returns a '