How does an onion routing node *only* know what node is before it and what node is after it?



This video 3:05 to 3:10

> What’s clever about onion routing is that no one in this network knows anything about the whole connection. They just know what’s before them, and what’s after them. Right…

Mind blown. This bit I just cannot work out how this would even be possible.

So, I’m trying to understand it using a pen and paper analogy.

I’m imagining:

* Me in my physical house – Home – HM
* Node 1 – House 1 – H1
* Node 2 – House 2 – H2
* (Exit) Node 3 – House 3 – H3

* I have pen and paper. (And I do all encryption by hand for the purposes of this thought experiment.) (And BTW my grasp of encryption keys is pretty shaky too, sorry…)

* All communication is by mail.

* I have a message – “”

So I’m trying to visualize what I would write on the paper at HM. I’m trying to visualize myself as the occupant of H1, and what I would receive and what I would do with the letter. Same for H2. Same for H3.

First thing I’m stuck with is how do I even know the address for H1, H2 and H3? Is there some kind of “phone book” with the address of every node in the world on it, and I pick 3 at random? I’m assuming yes, and I at HM get to choose the 3 addresses. Is this correct?

And then, I’ve spent about 2 hours moving paper around my desk trying to work out how to encrypt or decrypt things and I just can’t make it work.

Can someone this in pen and paper terms? What do I write on the paper before I send it off?

Thank you!

In: Technology

I know next to nothing about onion routing, but do understand networks and encryption and since you don’t have any comments I’ll try to help out.

First question: how does a node only know what node is before and after it? I think there is maybe a bit of confusion here. I would assume that nodes know some generals of the network as a whole, like available nodes it can connect to. What the video is saying, and maybe not so clearly, is that while a node knows who to expect traffic from and who to send it to, it does not know its place in the chain–except the exit node. So a node does not know if the message it has received is from the original sender or how many more nodes it has left before the message ends up at an exit node.

Next, encryption. Each node after the origin is assigned its own way to decrypt the messages. The origin sends a message to node 1 and settles on encryption that only node 1 and the origin can understand. (Assumption coming cause I don’t know much about onion routing) Then the origin uses the encryption that it settled on with node 1 to encrypt a message that contains another layer of encryption that node 1 cannot decrypt, so node 1 forwards the message to a new node. So node 2 now becomes the second node in the chain and is able to decrypt the second layer of encryption. This continues until the specified amount of layers from the origin is decrypted and a message that makes sense is read.

How does this look on pen and paper? You have 3 other friends you want to create an onion network with. You tell friend 3 that I’m going to replace all of my e’s with f’s. You tell friend 2 I’m going to replace all my m’s with n’s. You tell friend 1 I going to replace all my l’s with m’s.

You original letter says: “Tell Jim: Meet me at 7pm for bowling”. But you told 3 people you’re going to encrypt the letter, so you encrypt it 3 times:

After the 1st time: “Tfll Jim: Mfft mf at 7pm for bowling. ”
After the second time: “Tfll Jin: Nfft nf at 7np for bowling.”

After the third time: “Tfmm Jin: Nfft nf at 7np for bowming.”

You’re done encrypting the message so it’s time to send it. You send it to friend 1. Friend one looks at the message and knows how to decrypt it: replace m’s with l’s. The message becomes: Tfll Jin: Nfft nf at 7np for bowling.” Your friend can’t make sense of it so they send it off to friend 2.

Friend 2 receives it and knows to replace n’s for m’s. The message reads Tfll Jim: Mfft mf at 7pm for bowling.” It’s gibberish, better send it to friend 3.

Friend 3 receives it and knows to replace f’s with e’s. The decrypted message reads “Tell Jim: Meet me at 7pm for bowling.” Oh, I can do that! So friend 3 relays the message to Jim.