0
$\begingroup$

From RFC8446:

For concreteness, the transcript hash is always taken from the following sequence of handshake messages, starting at the first ClientHello and including only those messages that were sent: ClientHello, HelloRetryRequest, ClientHello, ServerHello, EncryptedExtensions, server CertificateRequest, server Certificate, server CertificateVerify, server Finished, EndOfEarlyData, client Certificate, client CertificateVerify, client Finished.

Messaages starting with Encrypted Extensions and after are encrypted. When calculating the hash (ex. SHA256), it is done over the encrypted form as they arrived, of over the decrypted text ?

Thank you.

$\endgroup$
4
  • $\begingroup$ Did you read the 4.1 completely? $\endgroup$
    – kelalaka
    May 14, 2021 at 19:30
  • $\begingroup$ Yes. Could you please be more specific ? $\endgroup$
    – engine32
    May 14, 2021 at 20:07
  • $\begingroup$ Aren't the first paragraph gives the answer to your question? $\endgroup$
    – kelalaka
    May 14, 2021 at 20:10
  • $\begingroup$ No, I don't see any connection to my question. $\endgroup$
    – engine32
    May 15, 2021 at 0:40

1 Answer 1

0
$\begingroup$

The computation is done on the clear text. The reason being encryption and decryption of messages is done at the record level, not the handshake one. If the transcription-hash was computed based on the encrypted text then it would be trivial for an attacker in a mitm situation to determine it, inject its own messages and transmit the resulting hash inside the Finish handshake.

$\endgroup$
1
  • 1
    $\begingroup$ The comment about mitm attacks is quite inaccurate. The finish message doesn't simply send a hash but a MAC over the transcript hash. So a mitm can't do much unless the attacker also has knownledge of the session key. $\endgroup$ Sep 23, 2023 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.