1
$\begingroup$

Is there any tool / way to decrypt raw bytes of a TLS 1.2 session, when the master key is known, even if forward secrecy is used?

The closest I found is this.

I know its possible using Wireshark, but I am intrested in decrypting raw TLS bytes (without the underlying protocols) as described here.

An example input (without the master key) is this.

$\endgroup$
4
  • 1
    $\begingroup$ Although this should definitely be possible, please understand that TLS is considered a single layer. So having it partially altered by only decrypting seems a bit strange. Replacing just the ciphertext with the received plaintext seems most logical (although you'd probably loose some of the MAC authentication tag for the CBC based cipher suites). $\endgroup$
    – Maarten Bodewes
    May 21 '21 at 9:25
  • $\begingroup$ @MaartenBodewes I have been looking into the internals of TLS and it does look possible indeed, after parsing client / server hellos and extracting session keys from the master key. Yet to find a tool though. I will code it and maybe post it here too $\endgroup$
    – oxynoia
    May 21 '21 at 18:36
  • $\begingroup$ One little issue, with CBC the size of the plaintext may be hidden up to the size of the block size of the underlying block cipher (16 bytes for AES). $\endgroup$
    – Maarten Bodewes
    May 21 '21 at 19:17
  • $\begingroup$ I'm extremly interested in the answer to this, and/but/therefore think it might be a better fit for Security.SE -- Could it be migrated? $\endgroup$ May 24 '21 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.