Files
casino/pkg/pqid/export_test.go
drjones 5210266fd6 feat(pqid): hybrid post-quantum identity, AGPL-3.0 license
Player identity is now Ed25519 and ML-DSA-65 (NIST FIPS 204) together,
both signatures required. An attacker must break lattice assumptions and
elliptic curves, not either one — which covers both the quantum threat to
Ed25519 and the possibility that a 2024 lattice standard does not hold.

Signatures are domain-separated to this application so one captured from
another ML-DSA protocol cannot be replayed.

Licensed AGPL-3.0: a fork stood up as a service must publish its changes,
which is what keeps a provably-fair platform honest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 22:17:54 +00:00

13 lines
412 B
Go

package pqid_test
import (
"github.com/cloudflare/circl/sign/mldsa/mldsa65"
"github.com/drjones/quantum-arcade/pkg/pqid"
)
// signWithContext produces an ML-DSA signature under an arbitrary context, so
// the domain-separation test can prove the production context is enforced.
func signWithContext(priv *pqid.PrivateKey, msg, ctx, out []byte) error {
return mldsa65.SignTo(priv.PQ, msg, ctx, false, out)
}