Can someone please explain Crust vs. CJDNS?

As in the title, can someone (maybe @anon81773980? ) please explain the differences between the SAFE Crust and/or Routing Libraries and other projects like CJDNS? Is Crust a CJDNS replacement?

From : (Setting up a public AP for a SAFE meshnet)

1 Like

Not sidelining, but if the in crust does not explain enough what crust does, then we need to update it. Can you please let us know if it is not clear. I will give one of the crust guys a shout to look at this one in terms of crust being clear and concise.


Hi, Crust developer here :slight_smile:

tl;dr Crust is not a replacement for CJDNS.

Crust has a very clear responsibility - reliable peer-to-peer connections. It’s a generic networking library that essentially tries to connect two nodes/peers/computers directly without an intermediate server. And that’s it, Crust doesn’t know how it will be used. For example one could build another Skype using Crust, or peer-to-peer file sharing app , or Crust could be used in gaming to make peers connect together directly, etc.
Crust solves some generic peer-to-peer problems and It has some clever tricks to do that:

  1. it uses IGD protocol to forward ports in your router so that computers behind NAT/router/firewall would be accessible from the Internet
  2. if IGD is not available, it tries to do hole-punching techniques. Basically these are exploits to forward a port in your router NAT table to expose youself to the Internet via some port.
  3. Crust messages are encrypted, hence secure communication
  4. etc.

BUT, Crust doesn’t have any sense of routing or DHT, etc.
Although, I believe that potentially one could build smth like CJDNS when combined Crust and Routing libraries.

Does that make more sense? :slight_smile:


Yes @dirvine the readme was pretty clear. Thank you @povilasb for further clarification. What had me mixed up was that I got a bit lost when reading through some CJDNS and mesh networking material the other day. It seemed like all of the techniques used in SAFE for data chunks could be applied at a lower level to packets in order to manage a mesh-network far better than what the existing alternatives were doing. I wondered if I had just missed the whole point of Crust+Routing and that implicitly defining a physical mesh network was something it had plans/capabilities for as well…


One key difference between cjdns and crust/SAFE is that cjdns allows one to connect to the internet and SAFE does not. This means that cjdns in one way or another supports traditional server architecture even if it is a mesh network. SAFE however does not use servers at all and connects nodes directly to one another via a DHT using crust. Any devs please correct me if I’m wrong in my assessment.

Yes, but I think internet access is optional.
The purpose of my meander through the cjdns literature was to see what might be required for forking the good parts for a SAFE only implementation (safemesh?). After seeing how they do a few things it started to feel analogous to Crust and Routing. It seems like one could really improve cjdns if SAFE principles involving consensus, node aging and upcoming nodal-chains were ported to the packet level from the start. One interesting trick that the cjdns folks do in order to come up with their own ipv6 address seems analogous to self-authentication.

1 Like

Perhaps more though like routing addresses. For us sefl auth is a client mechanism that maps to real/nick names. Routing nodes though require to generate addresses in a range, but not the ipv6 header as well. We did have some discussions on brute force key gen, it is hard and harder as the network grows. It also can favour the faster computers for attackers to get a range close to somewhere that they can group together. So it is good and bad. Another mechanism is to create a point on the curve that is a new key based on your priv key and some random data for website visits etc. (bit like SQRL). I am not so sure about the ip address based keys though, albeit this is a slightly different take on it.

TL;DR Interesting, need to add this to the research pile and try and get good bits form it for the future. ps check the threads by @mav in the dev forum, very interesting figures on keygean HD keys and more.

1 Like