Hanzo AI
|
84c1e8e1d7
|
feat(keygen): real deterministic NewKeyGeneratorFromSeed (v1.8.0)
Replace the stub implementation with a real HKDF-SHA256 derivation that
seeds blake2b KeyedPRNG streams driving ring.NewSampler over the secret
distribution Xs. Same seed -> byte-identical secret keys, the consensus
invariant validators rely on.
Pipeline:
prk = HKDF-Extract(SHA-256, salt="LUX_FHE_KEYGEN_v1", ikm=seed)
keyLWE = HKDF-Expand(prk, "LUX_FHE_KEYGEN_v1:LWE", 32)
keyBR = HKDF-Expand(prk, "LUX_FHE_KEYGEN_v1:BR", 32)
Tests:
- Deterministic (same seed -> same SK bytes)
- DifferentSeeds (distinct seeds -> distinct SKs)
- GoldenVector (sha256(SKBR) pinned for PN10QP27)
- EmptySeed (rejected)
Unblocks luxfi/precompile fhe/fhe_ops.go:49 which calls this symbol.
|
2026-04-28 02:26:15 -07:00 |
|