Server -> Exit Node -> Middle Node -> Entry Node -> Client
Entry Node -> Client, how does the entry node authenticate that the receiver is a real client but not a MITM?
Information Security Stack Exchange is a question and answer site for information security professionals. It only takes a minute to sign up.Sign up to join this community
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.