hsmtools: add a tool to recover a to_remote output from peer unilateral close#3217
Closed
darosior wants to merge 7 commits into
Closed
hsmtools: add a tool to recover a to_remote output from peer unilateral close#3217darosior wants to merge 7 commits into
to_remote output from peer unilateral close#3217darosior wants to merge 7 commits into
Conversation
A general one, for all things hsm_secret.
And tell about decryption with hsmtools
This takes a dbid, a "depth" (how many commits to dump), the hsm_secret path, and a potential password to dump informations about all commitments until the depth. Co-Authored-By: Sjors Provoost <sjors@sprovoost.nl>
In case of a loss of data, namely the dbid of a given channel, we might not be able to recover the payment private key corresponding to the `to_remote` output of the commitment transaction of the peer. This adds a tool which compares the pubkeyhash in the output witness program to the hash of payment keys derived until a specified depth and a seed derived for every dbid..
02a1934 to
e62a80d
Compare
Contributor
Author
|
Closing this, since it doesn't make sense without |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This builds upon #3186 (starts at 02a1934).
I suffered a power outage some weeks ago and lost the
dbidof many channels from the database, the remote peer has then unilaterally closed the channel : I was not able to recover the private key from theto_remoteoutput of its commitment transaction without thedbid. Since I've seen others in the same situation (this has been in the news, too...), here is a tool which derivesnpayment keys for everydbidand compares it to the pubkeyhash output in the witness program (we just take a bech32 P2WPKH address and derive the goal hash from it).