Homomorphic evaluation of consecutive layers #
Constants are encrypted under the target public key, copies are refreshed, and NANDs use the augmented decryption circuit. Every output is truncated to the base decryption circuit's arity. On valid executions truncation changes nothing; on malformed inputs it still bounds the next layer's wire volume. This unconditional bound is needed for strict polynomial-time evaluation.
Only public keys and encrypted key links are runtime inputs. Secret keys appear in correctness
predicates, never in the evaluator. EncryptedWires pairs every plaintext with a ciphertext of
the required width and decryption, without asserting that intermediate ciphertexts are fresh.
Main definitions #
Cslib.Crypto.Homomorphic.Scheme.EncryptedWires: the invariant between adjacent layers.Cslib.Crypto.Homomorphic.Scheme.evaluateNode: evaluate and bound a single node.Cslib.Crypto.Homomorphic.Scheme.evaluateLayer: traverse a layer with independent calls.Cslib.Crypto.Homomorphic.Scheme.evaluateLayers: the public bounded loop over all layers.
Main results #
Cslib.Crypto.Homomorphic.Scheme.encryptedWires_evaluateLayer: correct evaluation from the preceding key to the target key, including constants, copies and repeated inputs.
References #
Pair the plaintext wires with ciphertexts of the right width and decryption. This includes equality of wire counts, and makes no fresh-encryption assumption.
Instances For
A valid wire lookup preserves both width and decryption.
Selecting valid ciphertext wires preserves their width and plaintexts, with no key change. Output order and repetitions are exactly those of the index list.
Fresh encryptions initialize the stronger invariant used after evaluation.
Truncation at the decryption circuit's input arity leaves every valid ciphertext unchanged. The arity can be read from the generated circuit without computing the width functions.
Evaluate one node under the target public key, then bound its result on every input.
Instances For
Execute each node using the same preceding layer and encrypted secret key.
Instances For
One level of the public loop. The state stores the next level and its current wires. The public-key list starts at the first target key, after the input-encryption key.
Instances For
Evaluate all scheduled layers. Missing public data uses empty defaults; correctness requires a valid chain, while the efficiency certificate covers these malformed inputs as well.
Instances For
A node's output is bounded even with invalid wires, keys, or encrypted key links.
Every execution has the scheduled number of output wires, each bounded by the decryption circuit's arity. No correctness, validity, or key-generation premise is used.
Valid nodes move the invariant to the target key. No intermediate freshness is needed.
Evaluating a valid layer preserves the exact wire count, ciphertext width and plaintext values under the next key.