-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Feature]: signatures on WSTS packets need to be verified before feeding them into the state machines #578
Comments
I think that this is a duplicate of #296. |
I don’t think so. 296 is about signing bitcoin transactions AFAICT. |
Oh yeah you are right. It is not a duplicate. |
Oh man, we do here sbtc/signer/src/transaction_signer.rs Lines 219 to 223 in 53d43bb
sbtc/signer/src/transaction_coordinator.rs Lines 332 to 377 in c8fa6c5
Okay, that fell through the cracks. I think the best place to do this is here: sbtc/signer/src/network/mod.rs Lines 95 to 113 in 53d43bb
That way we won't need to track everything down all the time. Hmmm, this might be straightforward. Edit: Oh maybe not. We also need to validate the public key against the list of accepted public keys. I wonder if we can skip this entirely, since the networking layer also does this. |
It does not at present -- that's where I raised the Q about which messages should be guarded and not (since a pending/joining node may still need to be able to communicate with the network in some capacity). Right now we assume every message is a We could also just implement it for wsts messages in the networking layer (for now). |
I've been looking over this, and while we can verify messages at the network layer, it won't solve the problem this issue was created to solve.
But The So it probably makes more sense for the purposes of this issue to do the checks inside |
Actually, it looks like |
Here's a draft PR which does this for public and private shares: #723 |
Feature - Verify WSTS packet signatures
1. Description
Applications which use wsts state machines must verify the signatures on the packets before processing them.
1.1 Context & Purpose
All wsts network packets are signed, to guarantee that they come from the purported source, and have not been tampered with. So they must be verified before processing.
But wsts applications typically run both coordinator and signer state machines, so it’s better to verify them outside the state machines themselves. Also, coordinator selection is external to the state machines.
2. Technical Details:
Call
Packet::verify
with the current signer and coordinator public keys after receiving packets, before feeding them into the machines. Bad packets should be dropped.2.1 Acceptance Criteria:
3. Related Issues and Pull Requests (optional):
The text was updated successfully, but these errors were encountered: