-
Notifications
You must be signed in to change notification settings - Fork 939
Signmessage #8226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Signmessage #8226
Conversation
There is a variety of signature schemes in the market. Therefore I implemented Electrum's signature scheme:
I checked against sparrow wallet and the verification succeeds.
|
In the future if it becomes necessary one could add a flag to select the signature scheme of choice. Also for reviewers: I was tempted to make hsmd sign any message fromwire, adding more flexibility in |
d291224
to
0a82edd
Compare
Electrum-style is probably the worst of the options accepted by OCEAN fwiw BIP 322 will be required if you need to support Taproot in the future. BIP 137 would be probably trivial to add here (just a version byte change) |
ec989c7
to
0024b60
Compare
with custom keys. Changelog-Added: HSMD: add new wire api to sign messages with bitcoin wallet keys. Signed-off-by: Lagrang3 <[email protected]>
To validate BIP137 signatures produced by core-lightning in tests. Changelog-None. Signed-off-by: Lagrang3 <[email protected]>
signmessagewithkey: allows to sign a message with a key associated with one bitcoin address in our wallet. Changelog-Added: add a new rpc command signmessagewithkey to sign input messages with keys from our wallet. Signed-off-by: Lagrang3 <[email protected]>
Add a new rpc called
signmessagewithkey
that can be used to sign messages using any keyfrom our wallet. You cannot directly select the key to use, but instead you provide a bitcoin address
and the wallet will figure out which of our keys corresponds to that bitcoin address.
Solves issue #8199
TODO: