Commit graph

6 commits

Author SHA1 Message Date
Claude
b70cdc48c6 fix(security): Address critical security and performance issues in ZK proofs
Security Fixes:
- CRITICAL: Add zeroize on drop for FinancialProver to prevent memory extraction
- HIGH: Fix WASM type import (ProdVerificationResult -> VerificationResult)
- MEDIUM: Add input validation for zero rent/multiplier/budget values
- Use checked_mul instead of saturating_mul for overflow detection

Performance Optimizations:
- Reduce generator memory from 16 MB to 8 MB (1-party vs 16-party)
- Add zeroize dependency (1.8) for secure memory clearing

Documentation:
- Add comprehensive ZK performance analysis docs
- Add benchmark suite for criterion testing
- Add optimization quick reference and examples

All 7 production ZK tests pass.
2026-01-01 19:52:44 +00:00
Claude
7d64cf5ae7 feat(zk): Add production-ready Bulletproofs for zero-knowledge financial proofs
- Add production crypto: bulletproofs 5.0, merlin 3.0, subtle 2.5, lazy_static
- Implement zkproofs_prod.rs with real Ristretto255 Pedersen commitments
- Add constant-time operations via subtle crate for side-channel resistance
- Create zk_wasm_prod.rs with WASM bindings for browser-based ZK proofs
- Fix bit size calculation (Bulletproofs requires power-of-2: 8, 16, 32, 64)
- Fix memory leak: use rand crate instead of getrandom for non-wasm

Security improvements:
- Real cryptographic Bulletproofs (not demo hashing)
- Fiat-Shamir transcripts via Merlin for non-interactive proofs
- Constant-time comparison to prevent timing attacks
- Proof expiration and integrity verification

All 7 production ZK tests pass.
2026-01-01 19:31:40 +00:00
rUv
6a47e37264 feat(edge): add WASM bindings and publish @ruvector/edge v0.1.1
WASM Implementation:
- Add wasm.rs with bindings for all core P2P types
- Configure Cargo.toml with wasm/native feature flags
- Gate native-only modules (tokio, transport) behind feature flags
- Convert intelligence.rs and memory.rs to sync (parking_lot::RwLock)
- Fix distributed_learning.rs example for sync API

Exports:
- WasmIdentity, WasmCrypto, WasmHnswIndex
- WasmSemanticMatcher, WasmRaftNode, WasmHybridKeyPair
- WasmSpikingNetwork, WasmQuantizer, WasmAdaptiveCompressor

Build:
- WASM: wasm-pack build --no-default-features --features wasm
- Native: cargo build --features native
- Tests: 60 passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 20:16:15 +00:00
rUv
c85598a978 feat(edge/p2p): add advanced RuVector integrations
- HNSW vector indexing for O(log n) nearest neighbor search
- Hybrid post-quantum signatures (Ed25519 + Dilithium-style)
- Spiking neural networks (LIF neurons with STDP learning)
- Binary/Scalar quantization (4-32x compression)
- Hyperdimensional Computing for pattern matching
- Adaptive compression based on network conditions
- HDC-based semantic task routing

54 tests passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 18:35:37 +00:00
rUv
5293e47370 feat(edge): Production-grade P2P Swarm with Ed25519/X25519 crypto
Implements a production-grade P2P swarm coordination layer with:

Security Features:
- Ed25519 identity keys + X25519 ephemeral keys for ECDH
- AES-256-GCM authenticated encryption
- Canonical JSON serialization (sorted keys) for signatures
- Registry-based identity binding (never trust envelope keys)
- Message replay protection (nonces, counters, timestamps)
- Signed task receipts with full execution binding

Core Modules:
- identity.rs: Ed25519/X25519 key management, member registry
- crypto.rs: AES-256-GCM, canonical JSON, hashing
- envelope.rs: SignedEnvelope, TaskEnvelope, TaskReceipt types
- relay.rs: GUN relay health monitoring and failover
- artifact.rs: Local CID-based storage with LRU eviction
- swarm.rs: P2PSwarmV2 coordinator with heartbeats and task claiming

Additional:
- gun.rs: GUN decentralized database integration for swarm sync
- Examples: local_swarm.rs, distributed_learning.rs

All tests pass. Demo runs successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 18:03:34 +00:00
rUv
4f4e80381d feat(edge): add ruv-swarm-transport integration example
New example: examples/edge/
- Distributed AI swarm communication using ruv-swarm-transport
- WebSocket, SharedMemory, and WASM transport support
- Intelligence sync for distributed Q-learning patterns
- Shared vector memory for collaborative RAG
- LZ4 + quantization tensor compression (up to 12x)
- Protocol with Join, Sync, Task, Election messages
- Agent roles: Coordinator, Worker, Scout, Specialist

Binaries:
- edge-demo: Demo of distributed learning
- edge-agent: CLI agent that joins swarm
- edge-coordinator: Swarm coordinator

Dependencies:
- ruv-swarm-transport v1.0.5
- tokio, serde, lz4_flex, clap
2025-12-31 17:20:51 +00:00