mirror of
https://github.com/luxfi/lens.git
synced 2026-10-30 16:21:16 +00:00
Lens is the curve-based threshold signing kernel for Lux. It is the classical analogue of Pulsar (the lattice kernel at github.com/luxfi/pulsar). Both kernels share the same lifecycle shape — Bootstrap → Reshare* → Reanchor — and the same activation circuit-breaker contract. They differ only in the math field: Pulsar over R_q (Module-LWE), Lens over a prime-order curve group (discrete log). Curves shipped: Ed25519, secp256k1, Ristretto255. Each has a deterministically-derived secondary Pedersen generator H from a Lens-specific nothing-up-my-sleeve tag. Sign math: FROST 2-round Schnorr threshold signing per RFC 9591 (Komlo-Goldberg 2020). Verifier checks z·G ?= R + c·X under the unchanged group public key. Reshare math: HJKY97 zero-poly Refresh + Desmedt-Jajodia ReshareToNewSet over the curve scalar field. Master secret s is preserved; only the share distribution rotates per epoch. Activation cert message format: QUASAR-LENS-ACTIVATE-v1, byte-equivalent shape to QUASAR-PULSAR-ACTIVATE-v1. Hash suite: HashSuite interface with Lens-SHA3 (production, cSHAKE256 / KMAC256 / TupleHash256) and Lens-BLAKE3 (legacy) profiles. DKG: distributed FROST DKG with Feldman commitments. No trusted dealer required at genesis if the chain prefers proper distributed DKG. KAT oracles: cmd/reshare_oracle and cmd/dkg_oracle emit deterministic JSON vectors for cross-language byte-equality validation against a future luxcpp/crypto/lens/ port. Tests: full unit + integration coverage on every shipped curve. 60 unique tests, 0 failures.
35 lines
1.3 KiB
JSON
35 lines
1.3 KiB
JSON
{
|
|
"curve": "ristretto255",
|
|
"n": 7,
|
|
"t": 5,
|
|
"seed": "lens.dkg.kat.v1",
|
|
"group_key_hex": "a2488d5094ad01297cbc5fbb4c25a5f2c1d6990218f3373da9d1a025e3bb2711",
|
|
"shares_hex": {
|
|
"1": "8ab4642b27d86f1a85a95b64cc5629a570ac9b3b14e4833de31c2c5ddb311203",
|
|
"2": "fd66fe28582b760546cbefb09295600455518ed9b7b4bae0fde25e1daf0fbb02",
|
|
"3": "82482d407032ae6e0cde525401ce15b460089e25f49750d8e61926f5298d5507",
|
|
"4": "192654668242bd18389861c8c06877487bcaae498dcefcd7185bce801c6d440b",
|
|
"5": "541b99107e32488443295af915b8cb861bfda0999c9ff13c8ef7f0aeac39d408",
|
|
"6": "4466db9049be05489ad6d3e8c0f14f7a477251939058dc0dc1f773c055443b0a",
|
|
"7": "9fbfc75b8dc09960ecc1cf673f3b7a4a946899de2c4de5faaa1b8a48e8a59909"
|
|
},
|
|
"verification_shares_hex": {
|
|
"1": "5cf85a5ab649c305950ab7191db48882695415ed772d049481381765045b0d0e",
|
|
"2": "d66bb58b75377d9c7f785750c9c6268226d7b1ce70b41566dd4320725e5e2d1a",
|
|
"3": "924e600c4582d5b79f374719f1710d420a15eebc556eff09fe96b2cb3ecf9610",
|
|
"4": "da5bb93621220586a6abc093e47b0be3c745b8bc7f1e3476a94021c8866cbf07",
|
|
"5": "70c67a84c8f1be348bc179d7e7f0d8c0a3a08003489ef78492df0a2e2e8aa175",
|
|
"6": "8c454fd56d1afff46ad162255b09b2337b10211165985d341e2cea5896fa9e44",
|
|
"7": "a48d560ba71e3a0defb9f968c782a99ad2890e7fe0e215ccb8544a94a7151177"
|
|
},
|
|
"party_order": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7
|
|
]
|
|
}
|