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

bolt07: Simplify signature scheme for channel_announcement #96

Merged
merged 1 commit into from
Feb 1, 2017

Conversation

cdecker
Copy link
Collaborator

@cdecker cdecker commented Jan 31, 2017

Reorders the channel-id and bitcoin-signature-x fields so that the
signed part of the message is contiguous. Simplifies the signing logic
not to just simple signatures of a contiguous region of the message,
no need to sign signatures, they all commit to the same payload. This
also removes the chicken and egg problem @pm47 reported in #92.
Furthermore it specifies that the signed payload also includes any
future appended fields.

Reorders the `channel-id` and `bitcoin-signature-x` fields so that the
signed part of the message is contiguous. Simplifies the signing logic
not to just simple signatures of a contiguous region of the message,
no need to sign signatures, they all commit to the same payload. This
also removes the chicken and egg problem @pm47 reported in lightning#92.
Furthermore it specifies that the signed payload also includes any
future appended fields.
@cdecker cdecker requested review from Roasbeef and pm47 January 31, 2017 13:30
@cdecker
Copy link
Collaborator Author

cdecker commented Jan 31, 2017

Adding @Roasbeef as reviewer to have a confirmation that signing the signatures is not needed if all signatures commit to the same message. This may also remove a few cases in which the signature could be reused out of context.

Copy link
Collaborator

@pm47 pm47 left a comment

Choose a reason for hiding this comment

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

Should we add the low S constraint on the signatures like @Roasbeef suggested? Apart from that it LGTM

@cdecker
Copy link
Collaborator Author

cdecker commented Jan 31, 2017

@rustyrussell was proposing that we segregate the witness. In this case we'd compare the channel_announcements only starting from offset 256 to find what needs to be synced. After all the signature is only there to authenticate and prove integrity of the actual state, and is not part of the state itself.

@rustyrussell rustyrussell merged commit 860990f into lightning:master Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants