Skip to content

Remove unused EdDSA and resharing protocols#5

Open
mswilkison wants to merge 1 commit into
codex/bnb-332-tbtc-fixesfrom
codex/remove-unused-protocols
Open

Remove unused EdDSA and resharing protocols#5
mswilkison wants to merge 1 commit into
codex/bnb-332-tbtc-fixesfrom
codex/remove-unused-protocols

Conversation

@mswilkison
Copy link
Copy Markdown

Summary

Stacked on #4. This removes protocol code that tBTC does not use from the hardened fork:

  • remove EdDSA keygen/signing/resharing packages, protobuf inputs, and EdDSA fixtures
  • remove ECDSA resharing package and protobuf input
  • drop Ed25519/Edwards-only dependencies and helpers
  • keep legacy routing fields in the generic message wrapper for wire compatibility
  • update README, BNB hardening notes, and proto generation targets for the remaining ECDSA keygen/signing scope

The downstream audit showed keep-core-security imports only ECDSA keygen/signing plus shared common/crypto/tss packages.

Validation

  • go list ./...
  • go test -count=1 -timeout 60m ./...
  • go vet ./...
  • go test -mod=mod -modfile=/private/tmp/keep-core-security-cleanup.mod ./pkg/tecdsa/dkg ./pkg/tecdsa/signing
  • git diff --check

@mswilkison mswilkison force-pushed the codex/remove-unused-protocols branch from b366e27 to 3284c6b Compare May 21, 2026 17:10
mswilkison added a commit that referenced this pull request May 21, 2026
Doc + small defensive-code follow-ups to the PR #2/#4/#5 review thread.
None of these are security-blocking; they close out the cosmetic and
pre-existing items that did not warrant their own PR earlier.

- common/hash_utils.go: strengthen RejectionSample doc so the name does
  not mislead future readers — the function is modular reduction, not
  true rejection sampling, and the bias bound depends on q vs the hash
  width.
- crypto/paillier/factor_proof.go: document that the tagged and legacy
  FactorChallenge paths emit different challenge distributions
  (positive-only vs signed), and note that FactorVerify's CmpAbs bounds
  exist to accommodate the legacy signed encoding.
- tss/params.go: expand SetSessionNonceBytes docstring with the
  collision/uniqueness/entropy guidance reviewers asked for.
- ecdsa/{keygen,signing}/rounds.go: document the round-1-capture
  invariant for getSSID so future refactors do not silently drift the
  hashed round.number domain separator.
- crypto/ecpoint.go: flag SetCurve's in-place mutation in the doc
  comment; the chained-call style is a footgun on shared points.
- crypto/vss/feldman_vss.go: reject nil shares, nil/zero share IDs, and
  duplicate IDs in ReConstruct before the Lagrange loop, so malformed
  inputs return an error instead of panicking through ModInverse(0).
  Add focused test coverage for each rejection path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.

1 participant