Commit Graph

10 Commits

Author SHA1 Message Date
Christian Decker c44836ee2f sphinx: Use test vector hop_data
The test vector no longer simply fills the hop_data with 'A', instead
we actually fill in the struct.
2017-05-02 11:47:19 +02:00
Christian Decker 83e89f0fe5 sphinx: Using hop_data to serialize per-hop information into onion
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2017-05-02 11:47:19 +02:00
Christian Decker 752f884c23 sphinx: Removed per-hop payloads, will be replaced by hop_data
This is in preparation for the migration to `hop_data` which contains
all fields, and uses the `short_channel_id` instead of the pubkey.
2017-05-02 11:47:19 +02:00
Christian Decker cca0e561d6 sphinx: Added unit-testing mode to test_sphinx
Currently hidden behind the `--unit` flag. Tests the onion reply
against the test vectors.
2017-04-28 13:40:43 +09:30
Christian Decker e603dba14a sphinx: Fixing makefile for test_sphinx and using lightningd version 2017-04-28 13:40:43 +09:30
Rusty Russell 8146b838e8 daemon/sphinx: split handling.
We want to use HSM to do the ECDH part, so split that out.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-04-01 23:59:46 +10:30
Christian Decker cae283087d sphinx: Committing the onion packet to the payment-hash
The sphinx onion packet now commits to the HTLC payment-hash it is
associated with. This prevents replay attacks with the same onion.
2017-01-16 11:14:30 +10:30
Christian Decker 91b17d45d8 sphinx: Removing last vestiges of the end-to-end payload
So far this was simply set to a zero-length end-to-end payload. We
don't have any plans of re-adding it for the moment, so let's get rid
of the unused code.
2017-01-16 11:14:15 +10:30
Rusty Russell a4fdaab5b3 Use global secp256k1_ctx instead of passing it around.
If I'd known how large this patch would be (though trivial), I'd
have done it in parts.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-12-02 18:12:58 +10:30
Christian Decker 7bb5c279a8 sphinx: Implemented sphinx onion routing
Implements a spec-compliant sphinx onion routing format. The format has
been cross-checked with the go implementation
cdecker/lightning-onion@b9e117e.
2016-10-16 16:40:43 +02:00