I can't seem to correctly decrypt a SSL 1.2 Finished message.
I have correctly generated the master key, and therefore I am confident that my PRF implementation is correct.
To generate the keying material:
PRF(master_secret, 'key expansion', seed)
- I take 16 bytes (128 bits) for client_write_MAC_key (MD5)
- I then take 16 bytes (128 bits) for server_write_MAC_key (MD5)
- I then take 5 bytes (40 bits) for client_write_key (RC4-40)
- I then take 5 bytes (40 bits) for server_write_key (RC4-40)
I extract the encrypted handshake from Wireshark and attempt to decrypt it using RC4 with a 5 byte key (EXP-RC4-MD5). The decrypted output is not formatted as expected. The first byte of data I should see is the content type, which should be 14 for the Finished message, I do not see this. Is there anything incorrect about what I have said thus far?