Diagram: Server -> Exit Node -> Middle Node -> Entry Node -> Client

In Entry Node -> Client, how does the entry node authenticate that the receiver is a real client but not a MITM?

  • is the traffic not encrypted by all three nodes in accordance with the circuit setup? so only the client can decrypt it?
    – user253751
    Mar 22 at 13:06

1 Answer 1


The connection from the client to the entry node is over TLS (see https://gitweb.torproject.org/torspec.git/tree/tor-spec.txt section 2).

As with any TLS connection between a client and a server, the security of the connection depends on one party being able to positively authenticate the certificate of the other party. Normally, it is the client that authenticates the server's certificate, but the reverse is also possible.

In the context of a connection from a Tor client to a Tor entry node, this authentication takes place as discussed here.

In any TLS connection - assuming one party is able to positively authenticate the certificate of the other party (in order to prevent a MITM attack) - then the secrecy and the integrity of the packets in both directions is protected. See Can a HTTPS MITM decypher server response packets? for more info.

  • In the case that an entry node sends data back to the client, does the entry node authenticate the client using Session key because the client itself does not have a certificate?
    – Gaai Chia
    Mar 22 at 15:40
  • 1
    That's basically correct. I wouldn't say that the entry node authenticates the client when it sends the response back to the client. But, if a client negotiates a TLS connection with the server, then sends a request to the server, then an attacker tries to intercept the response from the server back to the client - the attacker would be unable to decrypt the response. This is because only the true client (that negotiated the TLS session and sent the initial request), and not the attacker, would know the session key that the response is encrypted with.
    – mti2935
    Mar 22 at 15:56
  • If the entry node does not authenticates the client when it sends the response back to the client, then what kind of thing does the job of authentication?
    – Gaai Chia
    Mar 22 at 16:25
  • 1
    Any client can connect to an entry node, without authenticating. The entry node doesn't care who the client is - it will accept requests from any client, and respond to those requests. What's important is: when a client negotiates a TLS connection with the entry node, then sends a request to the entry node, then the entry node sends a response back to the client - only that same client (and not an attacker) can decrypt the response. TLS ensures this.
    – mti2935
    Mar 22 at 16:48
  • 2
    Any router between the client and the entry node (e.g. a router at the client's ISP) can see the IP address of the client, and the fact that the client is connecting to a Tor entry node. The router does not even have to MITM the connection to do that - just passive observation of the packets is enough. So, the router can see that the client is using Tor, but the router cannot see which servers that client is connecting to.
    – mti2935
    Mar 23 at 9:57

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.