mirror of
https://github.com/luxfi/relay.git
synced 2026-10-30 15:20:05 +00:00
Adds pkg/profile โ the single function `profile.Verify(policy, scheme, pub, msg, sig)` that gates every intra-Lux operator-receipt signature. ML-DSA-65 (FIPS 204, NIST Level 3) is the default scheme; Ed25519 is opt-in only via Policy.LegacyClassicalEnabled and refused otherwise with ErrClassicalRefused before any classical math runs. Domain-separation context "luxfi.relay.v1" is bound into every signature (FIPS 204 ยง5.2 ctx for ML-DSA-65; prepended bytes for Ed25519) so a relay receipt cannot be replayed as an oracle observation (which uses "luxfi.oracle.v1") or any other Lux artifact. 5 tests cover happy path, strict-PQ classical refusal, legacy opt-in, tampered-sig rejection, and unknown-scheme rejection. External-chain interactions (Bitcoin / Ethereum / OP_NET RPC, FROST/Taproot handoff to luxfi/mpc) are NOT in this package's scope and continue using each chain's native primitive.