# How does Tor's second node know the key to decrypt the second layer?

I was watching this video explaining how tor works: https://youtu.be/QRYzre4bf7I

It explains it with the example of 3 intermediate nodes between client and server. It says that each of the nodes can only decrypt one layer and therefore only the last node can see the message. Each node has only one key to decrypt the corresponding layer. My question is: how is that possible?

How can node 2 know key2 unless it's given to it by node 1? But if node 1 sends key then it means that node one can also decrypt the second layer.

• Apr 4 at 21:11
• Better source: blog post w/images Apr 4 at 21:18
• @belkarx I think I understand the basics, thank you. What I still don't understand is how it applies to Tor nodes. In particular I don't understand what is the piece of information the node 2 has that node 1 hasn't. In the Wikipedia example Bob and Alice agree to use a modulus and a base, are this somehow only known to node 3? I'll try to read the more advanced parts as an example but I'm not really an expert and might misunderstand them Apr 5 at 9:59
• @belkarx I read the section "operation with more than 2 parties" I'd like a confirmation from you that I understood correctly. Tor does what is explained in that section with Alice =client, Bob=node1 and Carol=Node2. The only difference is that in Tor we stop the process at the point 8. In this way, skipping the points > 8, the node 1 is not able to decrypt the second layer while node 2 has been able to decrypt it Apr 5 at 10:07