Skip to content
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

signrpc: add Schnorr signatures to sign and verify message #6722

Merged
merged 3 commits into from
Jul 14, 2022

Conversation

guggero
Copy link
Collaborator

@guggero guggero commented Jul 12, 2022

Replaces #6663.

Fixes #6656.

Thank you @ErikEk for starting this, needed to add an additional feature (Taproot key tweak), so I took over the PR.
All commits are still properly attributed to the original author.

@guggero guggero added rpc Related to the RPC interface signrpc schnorr labels Jul 12, 2022
@guggero guggero added this to the v0.15.1 milestone Jul 12, 2022
@ErikEk
Copy link
Contributor

ErikEk commented Jul 12, 2022

@guggero Great. Will test the code when it's done.

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍋

Straight forward diff, also super useful!

Only one stray question left as a comment

lnrpc/signrpc/signer.proto Show resolved Hide resolved
lnrpc/signrpc/signer_server.go Show resolved Hide resolved
"signature: %v", err)
}

digest := chainhash.HashB(in.Msg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this need to conditionally double hash based on the msg expectation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's necessary. The double hashing is only needed by the remote signing setup (for signing a channel or node announcement) but we seem to be verifying it in a different way (not through the signer interface).

Copy link
Collaborator

@bhandras bhandras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@guggero guggero merged commit af97b8f into lightningnetwork:master Jul 14, 2022
@guggero guggero deleted the sign-schnorr-tweaked branch July 14, 2022 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rpc Related to the RPC interface signrpc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lnrpc/signrpc: add schnorr option for SignMessage RPC
4 participants