lightningnetwork / lightning-onion

Onion Routed Micropayments for the Lightning Network
MIT License
396 stars 125 forks source link

router: abstract node key behind ECDH interface #47

Closed guggero closed 4 years ago

guggero commented 4 years ago

As part of the preparatory work for https://github.com/lightningnetwork/lnd/issues/3929, we remove the node's private key from the NewRouter method and replace it with an interface that abstracts away the ECDH operation.

This is only necessary for the long-term node key. All other private keys are just temporary session keys.

Roasbeef commented 4 years ago

cc @joostjager (reviewers thing is messed up on this repo, can't assign ppl easily)

guggero commented 4 years ago

I'm working on a PR that does all this in lnd as well (brontide, htlcswitch, netann and watchtower). You mean that, right @Roasbeef? Or are there further changes that should be done in this repo?

Do you think the naming is OK? I'm going to use the same SingleKeyECDH thing in lnd too.

Roasbeef commented 4 years ago

You mean that, right @Roasbeef? Or are there further changes that should be done in this repo?

Yeah, to propagate these changes into the lnd sphere.

No strong feelings w.r.t naming on my end.