I'm implementing a
TLS-like system, and I'd like to set up a
Finished message, to prevent the replay attacks.
As far as I understand
TLS, it contains a hash on the previous handshake messages, encrypted and signed with the chosen algorithm.
The server first builds his
Finished frame, with a hash of all the previous messages. Then it's sent to the client.
Does the client have to take the server's
Finished message as a "previous message" ? (to compute a hash)
Because if not, the contents to hash are just the same as the server, but in a different order (which will produce a completely different hash).
They say this in the chapter on the Finished message :
All of the data from all messages in this handshake (not including any HelloRequest messages) up to, but not including, this message.
In my opinion, the client indeed has to take the received
Finished message (from the server) along other handshake messages.