From aj at erisian.com.au Mon Oct 5 15:02:10 2015 From: aj at erisian.com.au (Anthony Towns) Date: Tue, 6 Oct 2015 01:02:10 +1000 Subject: [Lightning-dev] Onion routing strawman proposal In-Reply-To: <20151004055717.GA14108@navy> References: <877fn5om6g.fsf@rustcorp.com.au> <20151003163855.GA22873@navy> <20151004055717.GA14108@navy> Message-ID: <20151005150210.GA27201@navy> On Sun, Oct 04, 2015 at 03:57:17PM +1000, Anthony Towns wrote: > On Sun, Oct 04, 2015 at 02:38:56AM +1000, Anthony Towns wrote: > > Sigh. I've had a go at reimplementing it in python, but ... > But nothing! The decoding/forwarding is successfully working in python > with pyelliptic. (I'm running the HMAC twice rather than actually working > out y) > $ test/test_onion 15 > TEST.OUT > $ python test/test_onion.py < TEST.OUT > Message to 0 > Message to 1 Okay, and now the python version does creation as well, though I haven't checked if the C version can decode it: $ ./test/test_onion 3 | python test/test_onion.py Message to 0 Message to 1 Message to 2 done $ python test/test_onion.py generate 3 | python test/test_onion.py Howzit 0... Howzit 1... Howzit 2... done $ wc test/test_onion.{c,py} -l 684 test/test_onion.c 329 test/test_onion.py (though about 1/3 of the python lines are just implementing "determine y given x" and "ecdh with y as well as x", bleh. It also doesn't have the "export-friendly encryption" mode implemented ;) > Eh, I made it a pull request; those are fun right? > https://github.com/ElementsProject/lightning/pull/8 (This is updated correspondingly) Cheers, aj