I'll explain you the situation.I'm developping a module of SRTP and I'm using
the openssl library inside my C code.
I need to generate a shared secret which sizes 16 byte. I exchange public DH
parameters with the client using the DH function. I don't know how to set DH
parameters into a
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 use a
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:
I would suggest that you examine RFC 2631 (section 2.1.1) or Secure
Programming Cookbook by Viega Messier (Section 8.17) for information
on this topic.
Typically with DH, two parties (A and B) wish to compute a shared
secret. Each computes a private public key pair, exchange public keys
and
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 =
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 'BIGNUM *',