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.4 KiB
JSON
35 lines
1.4 KiB
JSON
{
|
|
"curve": "secp256k1",
|
|
"n": 7,
|
|
"t": 5,
|
|
"seed": "lens.dkg.kat.v1",
|
|
"group_key_hex": "02d44513aaa13b3a7ffc3237b261fd1f90d9d47cec959219b6155777cdf28f929c",
|
|
"shares_hex": {
|
|
"1": "14492254abc5af31502bfbc9152332d76775064d2687ee8a394fd7009d65c6b8",
|
|
"2": "fe23cb3be8f8bfb7bb62231d234bcf43dcf98d18fa36e28728a2d6cdd35eeeed",
|
|
"3": "5157288272acce9073f7f72cadf4c02157e15edc298a012651bdc9bb49526f0b",
|
|
"4": "437c99a210a9cc72681c683537fa3d12409dcefc7b33fa3ea55b8a40c10c7a1d",
|
|
"5": "9b4da0daba241452d2242cc9a19f9f981a43f741126e8451ef8a8793b27dcb1b",
|
|
"6": "b0a3e33295bc6b653889c1d2288f6310f7ea719fcd8b9d04575182c0ec28276c",
|
|
"7": "6c792875f980011b6ded6a8c67db24b637583523f53e29581e81ed396354a027"
|
|
},
|
|
"verification_shares_hex": {
|
|
"1": "03f3fa839849603c29c9a2d5e8d9aecbf3a8d25486250899773a5dd3a8854e1f85",
|
|
"2": "0253f42b64d6b3e6973aae1eb55ade81a45466af7baeb91f535bad767129336163",
|
|
"3": "02710e99500fd7bf436e74487ead3b5ab220f0fc27d4d365566182b1f9425c462b",
|
|
"4": "03b83e2831c4afb87c91091abd21968c1b1a56f56c1702fa0d8fd56cc2f31d3470",
|
|
"5": "03e54dfc08a2004414f1a8c40afd593470a7ff7dcc3596dbaf8f54d14d05c3f232",
|
|
"6": "02fdc9c19d9050a7764039b9abf10d4049980ce1e834d8b36f83b24129bb02940e",
|
|
"7": "02c03a84478be790eb0b1a31019df1c2a52ab54b3109c028d3f413b8f49c5ce218"
|
|
},
|
|
"party_order": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7
|
|
]
|
|
}
|