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

check that wsts messages are signed by the specified signer_id #787

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xoloki
Copy link
Contributor

@xoloki xoloki commented Nov 7, 2024

Description

sBTC messages contain a signature and a public key, in addition to the payload. Verifying the message shows that it has not been tampered with.

WSTS message payloads either contain a signer_id, or are coordinator messages. So in addition to verifying the signature, we also need to show that the public key used to sign was the correct public key for that signer (or the coordinator).

Closes: #578

Changes

Call verify on the sBTC message, then check that the message was signed by the correct public key.

Testing Information

All unit and integration tests still pass.

Checklist:

  • [ x] I have performed a self-review of my code
  • [ x] My changes generate no new warnings
  • [ x] New and existing unit tests pass locally with my changes
  • [ x] Any dependent changes have been merged and published in downstream modules

@djordon
Copy link
Contributor

djordon commented Nov 12, 2024

Since the other one is up to date, might as well close this one.

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.

[Feature]: signatures on WSTS packets need to be verified before feeding them into the state machines
2 participants