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

feat: Open channel helper ignores announcement signatures #91

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

vincenzopalazzo
Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo commented Jun 16, 2023

Signature exchanges are signed with the node's private key and verified by the counterpart using the node's ID (which is the public key). The signatures should not be the same because the lightning implementation and lnprototest do not have the same private key, or better yet, lnprototest will fake a different private key.

Unfortunately, we lack the tools to easily create this signature, making lnprototest a painful process. Apologies for the inconvenience!

Therefore, we should have a tool to calculate the signatures at some point. But for now, we are leveraging the lightning specification and skipping the announce signature message.

This significantly simplifies the workflow.

Signature exchanges are signed with the node's private key and verified by
the counterpart using the node's ID (which is the public key). The signatures
should not be the same because lightning implementation and lnprototest do not have the same
private key, or better yet, lnprototest will fake a different private key.

Unfortunately, we lack the necessary tools to easily create this signature,
which makes lnprototest a painful process. Apologies for the inconvenience!

Therefore, at some point, we should have a tool to calculate the signatures.
But for now, we are leveraging the lightning specification and
skipping the announce signature message.

This significantly simplifies the workflow.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
@vincenzopalazzo vincenzopalazzo merged commit cd3c189 into master Jun 16, 2023
4 checks passed
@vincenzopalazzo vincenzopalazzo deleted the macros/lib_improvment branch June 16, 2023 10:31
vincenzopalazzo added a commit that referenced this pull request Jul 14, 2023
Fixes a bug in lnprototest by removing the problematic
code outlined in patch [1].

During our investigation of the cln code, we discovered that
the message verification was not performed correctly as the BOL 7
suggest. This commit includes a patch [2] that fixes the issue and
introduces an integration test to validate that core lightning adheres
to the signature verification guidelines outlined in BOLT7.

[1] #91
[2] ElementsProject/lightning#6384

Reported-by: lnprototest (#91)
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
vincenzopalazzo added a commit that referenced this pull request Jul 14, 2023
Fixes a bug in lnprototest by removing the problematic
code outlined in patch [1].

During our investigation of the cln code, we discovered that
the message verification was not performed correctly as the BOL 7
suggest. This commit includes a patch [2] that fixes the issue and
introduces an integration test to validate that core lightning adheres
to the signature verification guidelines outlined in BOLT7.

[1] #91
[2] ElementsProject/lightning#6384

Reported-by: lnprototest (#91)
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
vincenzopalazzo added a commit that referenced this pull request Jul 15, 2023
Fixes a bug in lnprototest by removing the problematic
code outlined in patch [1].

During our investigation of the cln code, we discovered that
the message verification was not performed correctly as the BOL 7
suggest. This commit includes a patch [2] that fixes the issue and
introduces an integration test to validate that core lightning adheres
to the signature verification guidelines outlined in BOLT7.

[1] #91
[2] ElementsProject/lightning#6384

Reported-by: lnprototest (#91)
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
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

1 participant