Homomorphic evaluation of ordinary Boolean circuits #
Compile the shared De Morgan circuit, execute its layers, and select the designated outputs without another key transition. There are twice the circuit's designated-output depth many transitions. Unused gates do not increase this count, and depth-zero wiring uses the input key.
The final key here depends on actual circuit depth. Homomorphic.Leveled.Basic constructs a
depth-budgeted scheme, and Homomorphic.Leveled.Correctness proves normalization to a common
final key. Security reductions remain separate obligations.
Main definitions #
Cslib.Crypto.Homomorphic.Scheme.evaluateCircuit: the actual compiler and encrypted evaluator.
Main results #
Cslib.Crypto.Homomorphic.Scheme.encryptedWires_evaluateCircuit: evaluation along any valid supported key list, including repeated keys and inputs from previous evaluations.Cslib.Crypto.Homomorphic.Scheme.encryptedWires_evaluateCircuit_of_generatedChain: every supported execution evaluates the original circuit and retains the base ciphertext width.
References #
Compile and evaluate raw circuit code, then select its outputs with no further key change. The algorithm is total on raw codes; semantic correctness is for typed circuit codes.
Instances For
Every supported evaluation preserves the ordered plaintext vector and exact ciphertext width. Keys and encrypted links may repeat; inputs need only have the right width and decryption, so outputs of previous evaluations are permitted.
Every supported evaluation of an ordinary circuit decrypts to its ordered output vector. The generated chain uses two key transitions per original depth, and no transition for output selection. Input ciphertexts are fresh under the first key; the final widths are unchanged.