8

I am a bit confused about packet decryption of Tor on the client.

I understand that if a client sends a request to a web server by using Tor, the request will be encrypted a couple of times, and sent to a Tor relay. The relay will decrypt a layer by using its private key, and when the request reaches to the exit node, eventually, it will be completely decrypted.

But the problem is, on the return path, answer to this question says that the same encryption way (I am also adding the image showing the concept below) is also used for the return path; So, when the packets reach to the client they will be encrypted. Without knowing the private keys of the relays, how will the client be able to decrypt received packets from the server?

Image showing the Tor concept

8

There is no need to know the key of the relays to decrypt the data they send back. TOR works the in the same way as SSL/TLS does: when you connect via HTTPS (HTTP over SSL/TLS) to a web server, you don't need to know the key of the server to decrypt the data you receive from it, this because during the SSL handshake phase, your browser and the server agreed on a symmetric encryption key that will subsequently be used with a symmetric-key cipher (e.g., AES). TOR works with the same principle, in some way it is like having three SSL connections one inside the other (although it is not exactly that...).

  • When the request is sent to the server, relays also use their TLS keys then, to decrypt their layer? – sha1 Oct 12 '14 at 8:28
  • 1
    The TLS protocol used by TOR implements perfect forward secrecy using ephemeral keys. The long-term key is used to sign the ephemeral keys so they can be verified for authenticity, however it is not used when agreeing upon a symmetric key. This means that if the long-term key is compromised (e.g., the server on which the TOR node runs has been seized), any past traffic that would have been recorded can't be decrypted anyway. – Ale Oct 12 '14 at 9:27

Your Answer

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

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