[Lightning-dev] [BOLT Draft] Onion Routing Spec
decker.christian at gmail.com
Mon Jul 25 16:23:15 UTC 2016
I took the liberty of taking apart Olaoluwa's Sphinx implementation and I
came up with a spec draft that I'd like to propose . It should roughly
be Sphinx, pinning down the various key-generation and stream generation
algorithms, and adding a per-hop payload.
The per-hop payload is used to give instructions to individual hops, i.e.,
how many coins to forward to the next hop. This means that the end-to-end
payload, i.e., the message in the Sphinx protocol, is currently unused and
could be omitted.
The payloads are currently fixed size (20 bytes per-hop and 1024 bytes for
end-to-end payload) to avoid making messages collatable by their size.
However, they could easily be made variable should we decide that sending
mostly empty messages is wasteful.
The spec is implemented in Go  and in C . The Go version is an
adaptation of Olaoluwa's implementation, with some minor speedups, removing
some duplicate information, stripping the header, and switching to ChaCha20
for stream generation and encryption. I also added a small commandline tool
that allows you to write packets to stdout so that we can feed an onion
generated by the C version to the Go implementation and vice-versa :-)
Feedback is very welcome. If people like the draft I'll create
pull-requests for the spec and the implementations, but I'd like to keep
the discussion on the mailing list :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lightning-dev