mirror of
https://github.com/luxfi/threshold.git
synced 2026-10-30 15:15:53 +00:00
Closes a HIGH-severity production-routing risk identified in the
pulsar/corona audit (2026-05-31).
The file protocols/lss/adapters/corona.go was a paper-grade
demonstrator that named itself "Corona" — colliding with the real
luxfi/corona Ring-LWE primitive. Anyone invoking the LSS factory with
`lss.NewLSS(lss.Corona, ...)` got the toy adapter, not the production
primitive. The toy adapter has:
- A textbook-LWE "DKG" that sums each party's s_i into a combined
master secret at the aggregator. NO Lagrange threshold sharing.
The threshold parameter is decorative.
- Q = 12289 (< 2^14) — far below any meaningful LWE security bound.
- A Box-Muller-from-uniform-mod-Q Gaussian sampler using
floating-point math on secret-dependent inputs. NOT constant-time.
Side-channel leakage is GUARANTEED.
- No matching verifier.
This commit:
- adapters/corona.go +build researchpreview
- adapters/corona_test.go +build researchpreview
- adapters/corona_external_test.go new gated external-test file
- factory_corona_prod.go new — production refuses with a routing
error pointing at
luxfi/threshold/protocols/corona →
luxfi/corona
- factory_corona_research.go new — research-preview returns the toy
Tests and benchmarks in adapters_test.go and full_coverage_test.go
that referenced NewCoronaAdapter / GetRecommendedParams have moved to
corona_external_test.go (gated). Production `go test ./protocols/lss/
adapters/...` passes; research `go test -tags researchpreview` also
passes.
Production users that need PQ threshold signing must route through
luxfi/threshold/protocols/corona (which wraps luxfi/corona): real
Ring-LWE with Pedersen-DKG, canonical wire codec (corona@42838bd), and
dudect-validated CT hot paths.
(cherry picked from commit eedafda56b8e277c483d9c96e67ba40a49052246)
22 lines
862 B
Go
22 lines
862 B
Go
// SPDX-License-Identifier: BSD-3-Clause
|
|
//go:build researchpreview
|
|
// +build researchpreview
|
|
|
|
package lss
|
|
|
|
import "github.com/luxfi/threshold/protocols/lss/adapters"
|
|
|
|
// createCoronaAdapter is the research-preview tag-split helper. Under
|
|
// `-tags=researchpreview` it returns the LSS-side toy Corona adapter
|
|
// (protocols/lss/adapters/corona.go) for paper-grade demonstrators.
|
|
//
|
|
// Production builds get the rejecting variant in factory_corona_prod.go
|
|
// instead, which refuses to instantiate the toy adapter and points the
|
|
// caller at luxfi/threshold/protocols/corona → luxfi/corona (the real
|
|
// Ring-LWE production primitive). See the disclosure block in
|
|
// adapters/corona.go for what makes the LSS-side adapter unsuitable
|
|
// for production.
|
|
func createCoronaAdapter() (adapters.SignerAdapter, error) {
|
|
return adapters.NewCoronaAdapter(128, 100), nil
|
|
}
|