17 Commits
Author SHA1 Message Date
zeekay 811d498e03 cmd: rename mpc-cli → mpc (pairs with mpcd daemon)
Matches the sshd/ssh, httpd/http unix pattern. Single Docker image
now ships both binaries: ENTRYPOINT is mpcd (the daemon); override
with 'mpc <subcommand>' for CLI ops (peers, identity, recover, etc).

Also aligns with lux/kms (single binary with subcommands) — operators
get the same shape across all Base-family daemons.
2025-12-28 06:31:18 -08:00
zeekay 6f42074e06 Merge hanzo/mpc additions: ConsensusKV, HSM providers, policy engine, rename CLI to mpc-cli
- pkg/infra: Add abstract KV interface, ConsensusKV (dual-cert BFT with
  Ed25519 + ML-DSA-65), NatsKV, ConsulKVAdapter, HybridKV, SQLiteMeta
  with full test coverage
- pkg/hsm: Add Provider interface and implementations for AWS KMS,
  GCP Cloud KMS, Azure Key Vault, Zymbit HSM, Hanzo KMS, and file-based
  providers with registry and tests. Rename existing FileProvider to
  FilePasswordProvider to avoid collision with new Provider interface
- pkg/policy: Add transaction governance engine with signers, roles,
  spending limits, whitelist/blacklist, time windows, rate limiting,
  approval workflow, audit log, and FHE private policy evaluation
- contracts: Add ThresholdPolicy.sol for on-chain policy enforcement
- cmd: Rename lux-mpc-cli to mpc-cli
- Makefile: Update build targets for mpc-cli
2025-12-28 03:12:38 -08:00
zeekay e160a5a526 feat: Base framework + consensus default + minimal ops
- Mount chi handlers on Hanzo Base (lifecycle, health, auth framework)
- Default mode: consensus (ZAP p2p) — NATS/Consul deprecated
- compose.yml: 2 services (api + dashboard), SQLite, no external DB
- config.yaml: consensus mode, SQLite-first
- Makefile: simplified build targets, docker compose format
- K8s: kustomization.yaml for idempotent deploys
- Removed listenAddr from NewServer (Base handles listening)
- Legacy NATS/Consul preserved but not default
2025-12-28 02:32:54 -08:00
zeekay 3dece63ca2 security: fix 15 custody audit findings, add regression + fuzz tests
Fixes all findings from the Blue Team defensive security review of the
 →  custody architecture transition.

HIGH:
- S-1: Implement P-256 ECDH + AES-256-GCM encryption of passkey backup shards
- W-2: Reject unparseable WebAuthn public keys (was silently skipping verification)
- O-1: Add Ed25519 binary signature verification package (pkg/integrity)

MEDIUM:
- W-1: Validate attestation is a real P-256 curve point, not raw attestation object
- W-3: Add origin validation to all WebAuthn flows (register, verify, trade approve)
- N-2: Remove plaintext TCP fallback from MPC node transport (TLS mandatory)
- K-1: Fail-closed on empty/whitespace orgID (prevents cross-tenant key leakage)
- A-1: Make AuditEntry immutable (Update/Delete return error)
- A-2: Add MPC-level signing audit log (wallet, message hash, intent, trigger)
- O-3: Invalidate backup shards after key reshare (stale shares are useless)
- O-2: Reject env/file password providers in production (require cloud HSM)

LOW:
- T-1: Add error handling + MarkSignFailed to signing goroutine
- T-2: Verify caller authorization in handleTradeSubmit
- K-2: Secret erasure stub now calls runtime.GC() instead of no-op
- N-1: Add VerifyConnection callback to reject peers without TLS certs

Tests: 69 unit + 7 fuzz targets, ~900K fuzz executions, 19/19 packages green.
Makefile: add -tags json1 for SQLite JSON function support in ORM tests.
2025-12-28 01:00:12 -08:00
zeekay 7eaffc4394 feat: enable Go 1.26 runtime/secret for forward secrecy of key shares
Add GOEXPERIMENT=runtimesecret to Makefile, CI, and Dockerfile builds.
Wrap key share loading in all 5 signing session types with
withSecretErasure() so stack/register state containing raw share bytes
is zeroed after parsing. Build-tagged stub ensures everything compiles
without the experiment flag.
2025-12-27 23:20:52 -08:00
zeekay 92c63dc546 Update Makefile 2025-08-02 15:28:50 -05:00
zeekay 4ec50522c9 Add benchmarks, tests, updated docs 2025-08-02 15:27:50 -05:00
CodyandGitHub c6e2c3c06f Add integration, unit testing CI pipelines (#48)
* Add comprehensive tests for multiple pkg

* Add db_path to config

* Add e2e testing pipeline

* Add github workflow

* Remove config.test.yaml

* Fix lint issue

* Increase timeout

* Add e2e testing for signing

* Skip signing if node is not in participant list

* Code cleanup

* Add e2e testing for signing and resharing

* Increase timeout

* Add test instructions

* Update github workflow branching

* Add vulnerabilties check in CI

* Fix ci
2025-07-06 14:26:03 +07:00
anhthii 3f1a7e3a68 Refactor clis to use requestPassword util 2025-04-30 21:26:10 +07:00
anhthii 6928367006 Update makefile 2025-04-30 21:27:31 +07:00
anhthii 9017bc8df6 Minor fix on make file 2024-09-22 20:49:53 +07:00
anhthii ecee2ee86d Update makefile 2024-09-22 21:50:44 +07:00
anhthii df73108768 Implement connection for prod 2024-09-21 20:52:40 +07:00
anhthii 6a8e14f792 Add deploy script with pm2 2023-12-05 20:37:44 +07:00
anhthii baa4ada319 make waiting all parties work 2023-11-04 20:26:30 +07:00
anhthii 5d0655ff45 implement create keygen session 2023-11-04 20:34:29 +07:00
anhthii cedbef54e9 Implement direct messaging 2023-11-04 21:06:07 +07:00