3

I often use public wifi hotspots to connect to the Internet. Is my data encrypted right before it leaves my system and so protected from network observers/snooping if I use tor?

Henok Yemane
  • 39
  • 1
  • 1
  • 3
  • 1
    where else do you think it would be encrypted? would not have much use if it was encrypted after it left the machine. – TheHidden Feb 22 '18 at 10:50
  • If a post below answered your question, please [mark it as accepted](https://security.stackexchange.com/help/someone-answers). – forest Mar 17 '18 at 06:15

2 Answers2

5

Yes, it is encrypted before it leaves the system. The Tor client on your computer encrypts the data three times. The first key is shared with the guard node, the second with the middle node, and the third with the exit node. Each node strips off a single layer of encryption before passing it along. The exit node strips off the last layer of encryption and sends it off to its destination. This is called onion routing. All the public WiFi can see is opaque, triple-encrypted data being sent to a Tor guard node.

Tor has hardcoded in it a list of fingerprints which it uses to verify the authenticity of the Directory Authorities (DAs). Once it has verified the authenticity of the DAs, the DAs send the Tor client a list of Tor nodes along with their own fingerprints. Your Tor client will pick a guard from that list, verify its identity through the fingerprint provided by the DA, and then connect to it. As long as your Tor client is genuine, it will be impossible for any MITM attack to occur between you and the guard.

Tor uses three layers of AES128 in CTR mode for encryption. The HMAC used to protect integrity uses SHA256. Key exchange is done with Curve25519, with the related Ed25519 used for fingerprints. More technical information is available in Tor's NTor handshake protocol specifications.

Be aware that Tor is only a tool designed to help you stay safe, not a panacea. It will not protect you from your own OPSEC failures or an advanced adversary exploiting your browser with 0days.

Glorfindel
  • 2,235
  • 6
  • 18
  • 30
forest
  • 64,616
  • 20
  • 206
  • 257
0

Yes, using Tor protects you from content inspection by the Wifi provider. However, it does NOT protect you from traffic correlation attacks (e.g. the Wifi provider can usually find out that you're using Tor and he'll know at exactly what times you use Tor and how much data you exchange with the network - this is important information to have if he can also observe the target you visit over Tor - in that case, he'll be able to prove that you're communicating, even if he doesn't know the content of the communication).

Using a bridge can help with hiding Tor from your Wifi provider, but correlation attacks are still possible even when you connect over bridge.

Out of Band
  • 9,150
  • 1
  • 21
  • 30
  • 1
    Do note that some types of bridges can make correlation attacks a bit more difficult, e.g. the obfs4 pluggable transport which mangles traffic at the expense of some overhead. – forest Feb 22 '18 at 11:24