Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
Tightly Integrate Networking with Tor/Yggdrasil/Pkarr
Open lorenz opened 11 months ago crate=radicle-node p=low

(Note that “key” below refers to the public key of an Ed25519 key pair.)

Address Scheme

This means, that every Radicle Node ID already implicitly maps to an address in the Tor/Yggdrasil/Pkarr networks/schemes.

While it is possible as of now to connect Radicle nodes to the Tor/Yggdrasil network by means of SOCKS or tun/tap devices, there is no tighter integration. Even if a node is reachable on an onion address derived from the node’s key, or the node is bound to an Yggdrasil interface with an IPv6 address derived from the node’s key, users would have to still explicitly specify these addresses:

So, establishing a connection collapses to:

rad node connect {nid}@{onion(nid)}:<port>
rad node connect {nid}@{ygg-addr(nid)}:<port>  # ygg-addr ∷ nid → ipv6
rad node connect {nid}@{ygg-name(nid)}:<port>  # ygg-name ∷ nid → "….pk.ygg"

If we now assume a standard port, such as 8776, the address information is entirely derivable from the Node ID.

In the case of Tor, we may omit either the Radicle Node ID or the onion address. These could both work

rad node connect {onion(nid)}
rad node connect {nid}          # would attempt to connect via onion(nid)

In the case of ygg, we could omit the IPv6 address:

rad node connect {nid}          # would attempt to connect via ygg(nid) or ygg-name(nid).pkg.ygg

Transport Encryption

Both Tor and Yggdrasil provide transport encryption. Currently, Radicle Node is “ignoring the fact” and encrypts all data before passing it on to Tor/Yggdrasil. This is inefficient. For Tor/Yggdrasil connections, Radicle could disable encryption.

Low Hanging Fruit

It would be rather straightforward to implement a tool like

rad tor # would generate configuration for an onion service rad ygg # would generate configuration for an ygg address

Which would generate configurations for the respective services.

[pkarr][https://github.com/pubky/pkarr/blob/0f10cd813c600d039cc85e8867b698b42bdd6fac/design/base.md]