this post was submitted on 04 Jun 2024
19 points (95.2% liked)

Programming

17313 readers
40 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 5 months ago (1 children)

Each node sends its information, like its name, public keys, etc via IPv6 link local multicast packets. I'll call these packets advertisements. I choose IPv6 link local because no manual IP address configuration is required. The kernel automatically assigns IPv6 link local addresses for each network interface.

When another node (B) receives the multicast packets, it knows that it can receive packets from the former node (A), but what about the other way round? For that, node B then establishes a TCP connection to node A. If node B can connect to node A, we can conclude that a bidirectional communication is possible between node A and node B.

Let's say that you have 3 nodes, A, B, and C.

What happens if Node C sends Node A an advertisement for Node B's name with Node C's public key?

When A tries to talk to to B's name, it connects to C using C's key. C connects to B using B's public key, proxying the connection, and performing a man in the middle attack.

[–] akash_rawal 1 points 5 months ago

That advertisement would be interpreted as Node C's advertisement.

The plan is to treat public keys as node's identity and trust mechanism similar to OpenPGP (e.g. include any node key signed by a master key as a cluster member)

Right now, none of the encryption part is done and it is not a priority right now. I need to first implement transitive node detection, actually forward packets between nodes, some way to store and manage routes, and then trust and encryption mechanisms before I'd dare to test this stuff on a real network.

[–] breadsmasher 1 points 5 months ago (1 children)

Is this your blog? If so, can you sort out word wrap?

[–] akash_rawal 1 points 5 months ago

The UI is desktop only for now, I'll make the mobile UI some day.