On 11/01/2011 06:48 PM, nilesh wrote:
Hi,

I am a newbie in the cryptography area and learning by writing some test code.
I have setup the apache server and capturing packets using wireshark.
I have a query specific to RC4. With the given server private key, I am able to generate master secret and key block correctly. My test code output matches with Wireshark debug logs (i.e. the master secret generated and key block generated using pseudo-random function).

However, I am unable to understand how to use the RC4_set_key() and RC4() APIs.
What exact part of key_block should I feed to RC4_set_key()?
key_block[0..15] - client MAC
key_block[16..31] - server MAC
key_block[32..48] - client Write key
For SSL/TLS protocol,

set by client as encryption key, set by server as decryption key
key_block[49..64] - server Write key
set by server as encryption key, set by client as decryption key


Please see the test code attached (please pardon the code formatting).


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to