zeekay
0d7a523c3e
security: add orgID multi-tenancy isolation, rename badger to zapdb
...
Multi-tenancy isolation (addresses Dragonfire review MPC audit):
- Add OrgID field to all event messages (keygen, sign, reshare)
- Scope session dedup keys as orgID-walletID-txID
- Namespace KVStore keys with org prefix (org:<orgID>:<key>)
- Backward-compatible fallback to legacy unscoped keys
- New org_kvstore.go with OrgScopedKey/GetKeyShareWithFallback
Naming cleanup:
- Rename all badger references to zapdb in code, config, tests
- config.yaml: badger_password → zapdb_password
- AppConfig: BadgerPassword → ZapDBPassword
- Fix MPCiumVersion typo → MPCVersion
2025-12-27 22:41:08 -08:00
zeekay
4641ad7c09
feat: BLS threshold + security hardening + ZapDB KMS-backing
...
Security (from red team review):
- Replay protection: request_id + timestamp freshness on sign API
- Ed25519 message auth re-enabled on all protocol messages
- DKG timeout (5min) + signing timeout (30s) with watchdog
- Dedup map TTL cleanup (10min expiry, 2min sweep)
BLS threshold signing:
- KeyTypeBLS + keygen/signing sessions
- TrustedDealer pattern for BLS DKG
- CBOR serialization for BLS config
- 8 tests
ZapDB KMS-backing:
- HSM PasswordProvider wired to ZapDB init
- Supports: AWS KMS, GCP KMS, Azure KV, env, file
- Default env for backward compat
- 19 tests
Also: sr25519 sessions, fixed SignWireMessage build break
2025-12-27 21:54:46 -08:00
zeekay
b143c542e4
feat: sr25519 threshold signing for Polkadot/Substrate
...
MPC daemon now supports sr25519 (Schnorrkel) key generation and
threshold signing using FROST over the ristretto255 group.
New files:
- pkg/mpc/sr25519_keygen_session.go — threshold keygen
- pkg/mpc/sr25519_signing_session.go — threshold signing
- pkg/mpc/sr25519_config_marshal.go — CBOR serialization
- pkg/mpc/ristretto255.go — local curve implementation
- pkg/eventconsumer/signing_handler_sr25519.go — event routing
Wiring:
- KeyTypeSR25519 constant + session type
- Event consumer routes sr25519 keygen/signing events
- API accepts "sr25519" as valid protocol
- DOT/KSM network codes mapped to sr25519 key type
- Signing context configurable (default "substrate")
14 tests passing.
2025-12-27 21:41:32 -08:00
zeekay
33c08f435d
chore: sync dependencies and format code
2025-12-27 09:26:29 -08:00
zeekay
9385abddd2
Sync improvements from hanzoai/mpc
...
Features:
- Add FROST keygen and signing sessions for EdDSA/Taproot
- Add LSS keygen and signing sessions with dynamic resharing
- Add CBOR serialization for FROST and LSS configs (fix JSON corruption)
- Add recovery byte calculation for Ethereum compatibility
- Add FROST signing handler for EdDSA signatures
- Upgrade threshold library to v1.5.2
Security:
- Fix config serialization using CBOR instead of JSON
- Add security audit findings to LLM.md
- Document blockchain support matrix
Files added:
- frost_config_marshal.go, frost_keygen_session.go
- lss_config_marshal.go, keygen_session_lss.go
- signing_session_frost.go, signing_session_lss.go
- recovery.go, signing_handler_frost.go
2025-12-27 09:06:37 -08:00
zeekay
821bd09da5
chore: remove bridge stub, fix all TODOs with real implementations
...
- Remove lux-mpc-bridge command (bridge is in T-Chain, not MPC)
- Remove empty pkg/bridge directory
- Fix sign.go: remove stale TODO (ECDSA/EdDSA already supported)
- Fix pubsub.go: remove obsolete subscription TODO
- Fix benchmark_test.go: implement real protocol benchmarks
- Fix xrpl_test.go: implement full XRPL E2E tests
- Update goreleaser: remove bridge build target
- Update docker-compose: remove bridge-compat services
MPC is now a clean standalone threshold signature tool.
2025-12-25 10:44:16 -08:00
zeekay
721db3ec4a
Fix linting issues
...
- Fix import formatting with goimports
- Remove unnecessary type conversions for syscall.Stdin
- Format imports with correct grouping
2025-08-02 22:27:51 -05:00
zeekay
83969bc35e
feat: Complete migration to luxfi/threshold library
...
Major changes:
- Replaced Binance TSS library with luxfi/threshold (supports CGGMP21 & FROST)
- Added XRPL network support for secp256k1 signatures
- Implemented resharing functionality for both ECDSA and EdDSA
- Fixed protocol adapters for CGGMP21 and FROST
- Updated event consumer to use new node methods
- Fixed all build errors in core packages
Technical improvements:
- Simplified party.ID usage (now string-based)
- Added proper message types and encoding
- Updated session interfaces with required methods
- Fixed test suite to work with new library structure
All core package tests passing. Ready for mainnet deployment.
2025-08-02 20:49:39 -05:00
zeekay
4ec50522c9
Add benchmarks, tests, updated docs
2025-08-02 15:27:50 -05:00
Vo Tuan Thanh and GitHub
8d92c012ed
Fix error message when signing with duplicate tx_id (Issue #60 ) ( #63 )
...
* Fix error message when signing with duplicate tx id
* Update error message for duplicate signing requests to be more concise
2025-07-30 22:35:50 +07:00
anhthii
55fbf8685f
Fix keygen topic
2025-07-13 22:21:32 +07:00
Poseidon-G and anhthii
160603f299
Remove jetstream pubsub change to message broker
2025-07-10 08:46:22 +07:00
anhthii
8912fda251
Fix resharing, only require t+1 participants, add session_id to remove idempotempt issue
2025-07-04 14:13:17 +07:00
anhthii
134ba09ad2
Rename success event -> result event
2025-07-03 21:59:46 +07:00
anhthii
1fdaafa4b9
Include error in keygen and reshare event
2025-07-03 21:52:41 +07:00
anhthii
f2aaedf8f8
Rename to improve consistent naming
2025-07-03 18:08:20 +07:00
vietddude
b59005c8ff
chore: resolve PR review comments
2025-07-02 16:26:15 +07:00
vietddude
95af28f8f1
Add resharing functionality with event handling and session management
2025-07-01 16:03:58 +07:00
anhthii
b95132b06a
Add keygen event
2025-06-28 14:31:29 +07:00
anhthii
b5bb177f80
Use onSuccess callback when sign session succeeds
2025-04-12 21:13:22 +07:00
Luc Nguyen
d9b85f00bc
Persit message, handle failure and timeout sign tx
2025-03-30 18:10:12 +07:00