Mining/pkg/node
snider a5ed7ebee6 feat: Implement challenge-response authentication for P2P (P2P-CRIT-4)
- Add GenerateChallenge() for random 32-byte challenge generation
- Add SignChallenge() using HMAC-SHA256 with shared secret
- Add VerifyChallenge() with constant-time comparison
- Update performHandshake() to send challenge and verify response
- Update handleWSUpgrade() to sign incoming challenges
- Add comprehensive tests for challenge-response flow

The challenge-response authentication proves the peer has the matching
private key for their public key by signing a random challenge with
the ECDH-derived shared secret. This prevents impersonation attacks.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 15:16:00 +00:00
..
bundle.go refactor: Remove unused code and fix nil dereference issues 2025-12-31 09:24:12 +00:00
bundle_test.go fix: Comprehensive code hardening from 4-domain Opus review 2025-12-31 14:33:30 +00:00
controller.go fix: Comprehensive code hardening from 4-domain Opus review 2025-12-31 14:33:30 +00:00
identity.go feat: Implement challenge-response authentication for P2P (P2P-CRIT-4) 2025-12-31 15:16:00 +00:00
identity_test.go feat: Implement challenge-response authentication for P2P (P2P-CRIT-4) 2025-12-31 15:16:00 +00:00
message.go fix: Comprehensive code hardening from 4-domain Opus review 2025-12-31 14:33:30 +00:00
message_test.go refactor: Add reliability fixes and architecture improvements 2025-12-31 12:43:46 +00:00
peer.go feat: Implement peer allowlist for P2P security (P2P-CRIT-1) 2025-12-31 15:06:52 +00:00
peer_test.go refactor: Remove unused code and fix nil dereference issues 2025-12-31 09:24:12 +00:00
protocol.go refactor: Add reliability fixes and architecture improvements 2025-12-31 12:43:46 +00:00
protocol_test.go refactor: Add reliability fixes and architecture improvements 2025-12-31 12:43:46 +00:00
transport.go feat: Implement challenge-response authentication for P2P (P2P-CRIT-4) 2025-12-31 15:16:00 +00:00
worker.go refactor: Add reliability fixes and architecture improvements 2025-12-31 12:43:46 +00:00
worker_test.go refactor: Add reliability fixes and architecture improvements 2025-12-31 12:43:46 +00:00