In this example protocol, Quantum Fully Homomorphic Encryption (link) protocol is implemented with the additional property of verification, where it is checked if the final ciphertext produces by the server matches the results of a particular computation. QFHE is a protocol where any arbitrary computations can be carried out by the server on the client's encrypted data while hiding all inputs and outputs of the client. In the classical version of this protocol, verification was carried by creating copies at every stage, which is not possible in the quantum version due to the no-cloning theorem(link). Hence in this protocol, verification is carried out by a technique where the server generates classical computational logs through which the underlying encryptions becomes authenticated. These computational logs are used to certify to the client that a particular homomorphic quantum computation was performed on a classical computer.
Tags: Two Party,Universal Task, Secure Delegated Quantum Computation, Quantum Offline Communication, Classical Offline Communication, Quantum Gadgets, Prepare and Send Quantum Fully Homomorphic Encryption, Classical Fully Homomorphic Encryption for Quantum Circuits.
Outline
This protocol consists mainly of four stages: Key Generation, Encryption, Homomorphic evaluation and Verified decryption. For verification, the major changes from the standard Prepare and Send Quantum Fully Homomorphic Encryption is in stage 2, evaluation where a computational log is provided as an extra output and in stage 4, Verified decryption which accepts computational log and performs the verification. The verification performed in this protocol is mainly classical in nature
- Key Generation and Encryption
- This procedure requires the generation of single-qubit and two-qubit states from a small fixed set, performing Bell measurements and Pauli gates, and executing the encoding procedure of a quantum error-correcting code on which the trap code is based.
- In this step, using the classical fully homomorphic encryption scheme, public key, the secret keys and the evaluation function key for the encryption are generated. A message authenticating system (MAC) is used to authenticate this process. Using MAC, a key is also generated.
- Majority of the single-qubit and two qubit quantum states are encrypted using the global permutation , but all the qubits in the error correcting gadget are encrypted using independent permutation. The encryption occurs through CSS where equal amounts of traps gates ( and ) are added and permuted using the global permutation, after which the overall state is encrypted by using Quantum one time pad. The final state formed of the single-qubit or two qubit quantum used initially is known as the magic state.
- The keys for the quantum one-time pad are selected during the encryption stage, For the gate, error correcting gadgets are prepared from garden-hose gadgets(Link here).
- Then the evaluation key is formed, using the auxiliary states mentioned, which includes the magic states too.
- Evaluation: Evaluation of a circuit is done gate by gate. Throughout this procedure, apart from the outputs, a complete computational log is made of all randomness used, all computation steps, all intermediate results and all the classical FHE computations. To measure a qubit, we measure all ciphertext qubits and place the outcomes in the log.
- Measurements: In computational basis measurement, logical measurement is performed by measurement of all physical qubits of the ciphertext and also checks the traps. This is followed by using the encryption function of classical homomorphic encryption on the result. In Hadamard basis measurement, because of the Hadamard gate property of Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle H|0\rangle = |+\rangle}
and , all computational traps are swapped with the Hadamard traps. . A transversal application of to all relevant physical qubits precedes the evaluation procedure for the computational basis measurement.
- Pauli gates: Applying a logical Pauli is done by applying the same Pauli to all physical qubits. The application of Pauli gates ( and/or ) to a state encrypted with a quantum one-time pad can be achieved without touching the actual state, by updating the keys to QOTP in the appropriate way. The logical Pauli-X is performed by (homomorphically) flipping the X-key bits of the QOTP and Pauli-Y works in the same manner for Z-key bits. Hence, this is a classical task.
- CNOT gate: The effect of applying CNOT to the encrypted qubits, without the quantum one-time padding is that logical CNOT is applied to the physical data qubits in the permutation and the remaining traps are unchanged due to its action. Hence in the quantum one-time pad, the secret key bits are homomorphically updated during evaluation while applying CNOT.
- Phase gates: Performing this gate requires homomorphic evaluation of all the above gates: (classically controlled) Paulis, CNOTs, and measurements. Here the corresponding encrypted magic state is also used. The below circuit is used to apply this gate
- Hadamard gate: The Hadamard gate can be applied using the same method used in the Phase gate.
- T gate: Applying T requires a magic state and an encrypted garden-hose gadget (because the T-gate magic state circuit applies a P-gate conditioned on a measurement outcome). The evaluation of that circuit is complicated and hence that specific error correcting gadget is used.
- Verified decryption
- Here the correctness and consistency of the classical FHE transcript, the measurement outcomes, and the claimed circuit are checked. The result of this computation is a set of keys for the trap code, which are correct provided that Eval was performed honestly. In this step, decryption takes place using these keys and the output is either plaintext or reject. In terms of quantum capabilities, decryption requires executing the decoding procedure of the error-correcting code, computational-basis and Hadamard-basis measurements, and Paulis.
- This procedure consists of two parts. Several classical checks are performed at first, where MAC-verification of all classically authenticated messages takes places. It also includes checking if the gates listing in the computational log match the circuit description. The portion of the log which specifies the purely classical, FHE steps taking during classical homomorphic encryption are also checked. Next, all the unmeasured traps are checked and the remaining qubits are decoded. If the logs don't match or if any of the traps are triggered, then the entire process is rejected.
Hardware Requirements
- Classical HE scheme is required here. The communication can be performed over a classical network with only one quantum node (in case of classical input and output).
Properties
- Compactness: This protocol is compact if verified decryption is divisible into a classical verification procedure Verification (outputting only an accept/reject flag), followed by a quantum decryption procedure Decryption. The running time of Verification is allowed to depend on the circuit size, but the running time of Decryption is not when it is compact.
- Semantic Security: A QPT adversary with access to the ciphertext can be simulated by a simulator that only has access to an ideal functionality that simply applies the claimed circuit. (Explain when this protocol is semantically secure)
- Indistinguishability: For a defined security game, if the success probability for an QPT adversary is at-most , then this protocol is indistinguishable. The security game is based on the QPT adversary determining the outcome of a hidden coin flip.
- Fully Homomorphic: This protocol is fully homomorphic i.e. Server can operate any quantum circuit using this protocol.
- Privacy: this scheme is private if its ciphertexts are indistinguishable under chosen plaintext attack.
- Computational logs are generally classical in nature.
Notation
- : Security parameter.
- : Upper bound on T gate.
- : Upper bound on P gate.
- : Upper bound on H gate.
- : All keys
- : Global permutation which are used to encrypt the states.
- MAC: Message authentication code, MAC = (Tag, Ver)
- : homomorphic key set generated from HE.KeyGen(). Public key for encryption, secret key for decryption, evaluation function key, respectively for given k, the security parameter.
- :
- :
- : ciphertext
Pseudo Code
Stage 1: Key generation and encryption
Function 1: TrapTP.KeyGen()
- MAC.KeyGen
- for
- HE.KeyGen
- for
- TrapTP.ENC
- for
- TrapTP.ENC
- for
- TrapTP.ENC
- for
- TrapTP.GadgetGen
- MAC.Sign(HE.ENC TrapTP.ENC TrapTP.Enc
- MAC.Sign HE.Enc
- return
Function 2: TrapTP.GadgetGen()
- generate states depending on
- return ()
Function 3: TrapTP.Enc((), )
- (TC.Enc MAC.Sign
- return
Function 4: TrapTP.EvalMeasure()
- measure qubits of in the computational basis
- HE.Enc
- \xleftarrow[]{} HE.Eval
- return ()
Function 5: TrapTP.EvalX()
- HE.Eval
- HE.Eval HE.Enc
- HE.Eval
- return ()
Function 6: TrapTP.EvalCondX()
- HE.Eval
- HE.Eval
- HE.Eval
- HE.Eval
- return ()
Function 7: TrapTP.EvalCNOT()
- apply on all physical qubit pairs of
- HE.Eval
- return
Function 8: TrapTP.EvalT()
- Trap.TP.EvalCNOT()
- TrapTP.EvalMeasure(
- recrypt all classically encrypted information (except ) from key set into key set .
- TrapTP.EvalCondP
- return
Function 9: TrapTP.EvalCondP()
- evaluate Bell measurement between and
- evaluate Bell measurement in as dictated by the ciphertext and the garden-hose protocol for HE.Dec
- HE.Eval
- return
Function 10: TrapTP.VerDec()
- Verify classically authenticated messages (in ) using (contained in ). If one of these verifications rejects, reject.
- Check whether all claimed gates in log match the structure of c. If not, return ().
- ← TrapTP.CheckLog() If flag = rej, return ().
- Check whether the claimed final QOTP keys in the log match and . If not, return ().
- for all gates G of c do
- if G is a measurement then
- encrypted QOTP keys right before measurement (listed in )
- encrypted measurement outcomes (listed in )
- HE.Dec
- Execute TC.VerDecMeasurement where basis is the appropriate basis for the measurement, and store the (classical) outcome.
- if a trap is triggered then
- return ()
- for all unmeasured qubits in do
- HE.Dec
- TC.VerDec If TC.VerDec rejects, return
- the list of decrypted qubits (and measurement outcomes) that are part of the output of c
- return ()
Further Information
*contributed by Rhea Parekh