Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
chanbackup: add new package implementing static channel backups #2370
In this PR, we introduce a new package that implements our current scheme for static channel backups (SCB's). Note that the serialization format will likely change to use a TLV schema rather than a raw packed format. However the serialization is isolated to a single instance and can easily be modified when we decide on the final TLV format. As a result, this PR c an be reviewed as is.
Depends on #2369.
Static Channel Backup Scheme
For encryption, we utilize
For key generation, in order to ensure the user only needs their passphrase and the backup file, we utilize the existing keychain to derive a private key. In order to ensure that at we don't force any hardware signer to be aware of our crypto operations, we instead opt to utilize a public key that will be hashed to derive our private key. The assumption here is that this key will only be exposed to this software, and never derived as a public facing address.
Dec 25, 2018
cfromknecht left a comment
Nice work on this package! Overall looks pretty complete to me, with healthy dose of unit tests :) No major comments on the approach at large. I do think moving to a TLV style format in the future though would be pretty useful, which fortunately is enabled by the versions on both single and multi backups!
Linter and vet ar both failing btw: https://travis-ci.org/lightningnetwork/lnd/jobs/472003458