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?
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?
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.
The entry node doesn't care who the client is
What if a MITM act as the client? I know the MITM cannot decrypt the data. However, can the MITM know the identity (e.g. IP address) of the client when the entry node sends data back to the client? Wouldn't that decrease anonymity in Tor?
– Gaai Chia
Mar 23 '22 at 07:17