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

[Feature]: Use the bitcoin block height as the DKG ID #1177

Open
3 tasks
djordon opened this issue Dec 20, 2024 · 0 comments
Open
3 tasks

[Feature]: Use the bitcoin block height as the DKG ID #1177

djordon opened this issue Dec 20, 2024 · 0 comments
Labels
breaking-protocol Breaking protocol changes key rotation The functionality to rotate a private key for a signer in sBTC-v1. sbtc signer binary The sBTC Bootstrap Signer. signer communication Communication across sBTC bootstrap signers.

Comments

@djordon
Copy link
Contributor

djordon commented Dec 20, 2024

Feature - Use the bitcoin block height as the DKG ID

1. Description

The DKG ID (the distributed key generation "identifier") is a number used in WSTS to prevent replay attacks during each DKG round. The signers already used signed messages that include the bitcoin chain tip as part of the signed message, but we should take the additional step of using the bitcoin block height as the DKG ID to make replay attacks even harder.

1.1 Context & Purpose

We currently do not support running DKG more than once, but when we do, the most straightforward thing to do is fix the DKG ID to zero for each DKG round. Doing so is probably not problematic, since we use signed messages and we include the bitcoin block hash as part of the message that is signed. The issue is that we do not always reject messages where the block hash is not the canonical one. will help by making it more difficult to do any replay type attacks. We already require that DkgBegin messages originate from the current coordinator, we just need to make sure that the chain tip is canonical and grab the block height of the current chain tip.

2. Technical Details:

We should return the chain tip height as part of the MsgChainTipReport and use that height when creating a new SignerStateMachine whenever the signers receive a DkgBegin message from the coordinator.

2.1 Acceptance Criteria:

  • Ensure that the DKG ID is set to the current bitcoin block height.
  • Use the block hash of the bitcoin chain tip for storing the signer state machine in memory.
  • Remove signer state machines at the end of DKG.

3. Related Issues and Pull Requests (optional):

@djordon djordon added sbtc signer binary The sBTC Bootstrap Signer. signer communication Communication across sBTC bootstrap signers. key rotation The functionality to rotate a private key for a signer in sBTC-v1. breaking-protocol Breaking protocol changes labels Dec 20, 2024
@djordon djordon added this to the sBTC: Key rotation milestone Dec 20, 2024
@djordon djordon added this to sBTC Dec 20, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage in sBTC Dec 20, 2024
@djordon djordon moved this from Needs Triage to Todo in sBTC Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-protocol Breaking protocol changes key rotation The functionality to rotate a private key for a signer in sBTC-v1. sbtc signer binary The sBTC Bootstrap Signer. signer communication Communication across sBTC bootstrap signers.
Projects
Status: Todo
Development

No branches or pull requests

1 participant