Native generation of complete GSW decryption circuits #
Unary dimension and word width generate the full code of the actual raw-input decryptor, without an assumed generator or runtime certificate. All matrix selectors and arithmetic circuits are charged, even on inputs outside key-generation or encryption support.
Main results #
Cslib.Crypto.Homomorphic.GSW.DecryptionCircuit.code_eq_code: exact generated code.Cslib.Crypto.Homomorphic.GSW.DecryptionCircuit.computableInPolyTime_code: public generator.
One native polynomial-time algorithm generates the full decryptor from unary parameters.
theorem Cslib.Crypto.Homomorphic.GSW.DecryptionCircuit.computableInPolyTime_circuit :
Turing.MultiTapeTM.ComputableInPolyTime (fun (p : ℕ × ℕ) => ⟨inputWidth p.1 p.2, circuit p.1 p.2⟩)
(Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (Circuits.Boolean.encCircuit 1)
Generate the actual circuit together with its unary input arity in native polynomial time.
theorem Cslib.Crypto.Homomorphic.GSW.DecryptionCircuit.computableInPolyTime_layeredAugment :
Turing.MultiTapeTM.ComputableInPolyTime
(fun (p : ℕ × ℕ) =>
Circuits.Boolean.Layered.compile (inputWidth p.1 p.2 + inputWidth p.1 p.2) (augmentNand (circuit p.1 p.2)).code)
(Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary)
Circuits.Boolean.Layered.encCompiled
Generate the complete layered NAND augmentation, including its schedule and selectors.