Im working on TLS1.2 on cipher suite ECDHE_ECDSA_AES_128_CBC_SHA256. Im currently at the stage of client encrypted message where I always got error on wireshark from the server saying that Fatal, Description : Handshake Failure. So from what I have done my research, the contain for this client finish message suppose to go through these steps :
- 1 byte of handshake type : finish = 0x14
- 3 bytes of data_verify_length = 12
- 12 bytes of verify_data
- These 16 bytes from steps 1),2) and 3) are passed through hmac_sha256 and gives and produces 32 hash bytes. Can someone confirm me the inputs? 5)The 32 bytes are preceded with 16 bytes from steps 1),2) and 3) and gives a total of 48 bytes before padding
- We added 1 byte length of padding and 15 bytes of padding of 0x0F and gives a total of 64 bytes
- The 64 bytes are then encrypted with client IV and client encryption key
- The 64 bytes are preceded with 16 bytes of IV before sending to server
Could someone verify all the steps and corrected me if I'm wrong because I kept getting handshake failure at this point.
Thank you in advance!