mirror of
https://github.com/luxfi/corona.git
synced 2026-09-24 00:25:54 +00:00
Corona signatures are Ring-LWE (C, Z, Delta) ring-polynomial triples, not FIPS 204 byte-equal (that's Pulsar's Module-LWE sibling). Single Verify is the only place this package touches the sign.Verify predicate; VerifyBatch composes it across N (groupKey, message, signature) tuples in parallel via a GOMAXPROCS-bounded worker pool. Public surface added: - VerifyBatch(gks, msgs, sigs) -> ([]bool, error) - VerifyBatchAll(gks, msgs, sigs) -> (bool, error) - ErrBatchSizeMismatch Pure Go: NO CGO / accel dep. A future Metal/CUDA NTT-batch kernel over the polynomial-arithmetic hotspot would live in luxfi/accel behind the same byte interface; consumers wanting GPU dispatch call accel directly against the wire bytes. This file is the portable fallback everyone gets for free. Tests (GOWORK=off go test ./threshold/ -run TestVerifyBatch): TestVerifyBatch_AllValid (n=4, all valid) PASS TestVerifyBatch_OneCorrupt (message swap @1) PASS TestVerifyBatch_StructuralMismatch (slice len mismatch) PASS TestVerifyBatch_Empty PASS Full ./threshold suite: ok 2.068s.