Classical Fully Homomorphic Encryption for Quantum Circuits: Difference between revisions

Jump to navigation Jump to search
m
Line 61: Line 61:
   
   
*Input: <math>evk_i</math>, encrypted pad key elements concatenation (<math>c</math>), one time padded message (<math>l</math>)
*Input: <math>evk_i</math>, encrypted pad key elements concatenation (<math>c</math>), one time padded message (<math>l</math>)
*Output:  Updated encryption of pad key <math>\tilde{a},\tilde{b}</math> (and Quantum One time Padded Output State <math>X^{\tilde {a}}Z^{\tilde{b}}C|\psi\rangle</math> in case of quantum output, where C is the quantum circuit)
*Output:  Updated encryption of pad key <math>\tilde{z},\tilde{x}</math> (and Quantum One time Padded Output State <math>X^{\tilde {x}}Z^{\tilde{z}}C|\psi\rangle</math> in case of quantum output, where C is the quantum circuit)
**'''Circuit Evaluation (FHE.Eval())'''
**'''Circuit Evaluation (FHE.Eval())'''
#Server creates a quantum superposition state for the encrypted classical message.</br> <math>X^aZ^b|\psi\rangle</math> represents quantum superposition state of <math>l</math>,</br> <math>|\psi\rangle</math> represents the quantum state for classical message m,</br> <math>X^aZ^b</math> represents quantum one time pad. </br>
#Server creates a quantum superposition state for the encrypted classical message.</br> <math>Z^zX^x|\psi\rangle</math> represents quantum superposition state of <math>l</math>,</br> <math>|\psi\rangle</math> represents the quantum state for classical message m,</br> <math>Z^zX^x</math> represents quantum one time pad. </br>
# For all i, Server applies gate <math>c_i</math> on qubit l and the <math>l_{th}</math> bits of pad key <math>(\tilde {a}^{[l]},\tilde{b}^{[l]})</math> are updated to <math>(\tilde {a}'^{[l]},\tilde{b}'^{[l]})</math> as follows.  
# For all i, Server applies gate <math>c_i</math> on qubit l and the <math>l_{th}</math> bits of pad key <math>(\tilde {x}^{[l]},\tilde{z}^{[l]})</math> are updated to <math>(\tilde {x}'^{[l]},\tilde{z}'^{[l]})</math> as follows.  
## If <math>c_i=\{P,H,CNOT\}</math>, a Clifford gate then <div class="floatright">//(<math>c_iX^{a^{[l]}}Z^{b^{[l]}}|\psi\rangle=X^{a'^{[l]}}Z^{b'^{[l]}}c_i|\psi\rangle</math>)</div>
## If <math>c_i=\{P,H,CNOT\}</math>, a Clifford gate then <div class="floatright">//(<math>c_iZ^{z^{[l]}}X^{x^{[l]}}|\psi\rangle=Z^{z'^{[l]}}X^{x'^{[l]}}c_i|\psi\rangle</math>)</div>
### if <math>c_i=</math>H then<div class="floatright">//Hadamard Gate</div></br><math>(\tilde {a}^{[l]},\tilde{b}^{[l]})\rightarrow (\tilde{b}^{[l]},\tilde{a}^{[l]})</math><div class="floatright">//Hadamard tranforms X gate into Z and Z into X</div>
### if <math>c_i=</math>H then<div class="floatright">//Hadamard Gate</div></br><math>(\tilde {x}^{[l]},\tilde{z}^{[l]})\rightarrow (\tilde{z}^{[l]},\tilde{x}^{[l]})</math><div class="floatright">//Hadamard tranforms X gate into Z and Z into X</div>
### if <math>c_i=</math>P then <div class="floatright">//Pauli Gate</div></br><math>(\tilde {a}^{[l]},\tilde{b}^{[l]})\rightarrow (\tilde{a}^{[l]},\tilde{a}^{[l]}\oplus\tilde{b}^{[l]})</math>
### if <math>c_i=</math>P then <div class="floatright">//Pauli Gate</div></br><math>(\tilde {x}^{[l]},\tilde{z}^{[l]})\rightarrow (\tilde{x}^{[l]},\tilde{x}^{[l]}\oplus\tilde{z}^{[l]})</math>
### if <math>c_i=</math>CNOT with m as target bit and n as control bit then <div class="floatright">//CNOT</div></br>(<math>\tilde {a}^{[l]},\tilde{b}^{[l]};\tilde {a}^{[n]},\tilde{b}^{[n]})\rightarrow (\tilde {a}^{[l]},\tilde{b}^{[l]}\oplus \tilde {b}^{[n]};\tilde{a}^{[l]}\oplus \tilde {a}^{[n]},\tilde{b}^{[n]})</math>
### if <math>c_i=</math>CNOT with m as target bit and n as control bit then <div class="floatright">//CNOT</div></br>(<math>\tilde {x}^{[l]},\tilde{z}^{[l]};\tilde {x}^{[n]},\tilde{z}^{[n]})\rightarrow (\tilde {x}^{[l]},\tilde{z}^{[l]}\oplus \tilde {z}^{[n]};\tilde{x}^{[l]}\oplus \tilde {x}^{[n]},\tilde{z}^{[n]})</math>
## If <math>c_i=T</math> gate then <div class="floatright">//Toffoli Gate on <math>l_{th}, n_{th}, o_{th}</math> key bits</div>
## If <math>c_i=T</math> gate then <div class="floatright">//Toffoli Gate on <math>l_{th}, n_{th}, o_{th}</math> key bits</div>
###The Toffoli gate is applied to the Pauli one time padded state and the state is reduced to combination of Clifford C and Pauli P corrections as follows:</br><math>TX^{a^{[l]}}Z^{b^{[l]}}X^{a^{[n]}}Z^{b^{[n]}}X^{a^{[o]}}Z^{b^{[o]}}|\psi\rangle</math></br><math>=TX^{a^{[l]}}Z^{b^{[l]}}X^{a^{[n]}}Z^{b^{[n]}}X^{a^{[o]}}Z^{b^{[o]}}T\dagger T|\psi\rangle</math></br><math>=CNOT_{l,o}^{a^{[n]}}CNOT_{n,o}^{a^{[l]}}CZ_{l,n}^{b^{[o]}}X^{a^{[l]}}Z^{b^{[l]}}T|\psi\rangle</math></br><math>=CNOT_{l,o}^{a^{[n]}}CNOT_{n,o}^{a^{[l]}}H_nCNOT_{l,n}^{b^{[o]}}H_{n}X^{a^{[l]}}Z^{b^{[l]}}T|\psi\rangle</math></br><math>=C_{ab}P_{ab}T|\psi\rangle</math>, where <math>C\epsilon \{\text{CNOT,H}\}</math> and <math>P\epsilon\{X,Z\}</math>
###The Toffoli gate is applied to the Pauli one time padded state and the state is reduced to combination of Clifford C and Pauli P corrections as follows:</br><math>TZ^{z^{[l]}}X^{x^{[l]}}Z^{z^{[n]}}X^{x^{[n]}}Z^{z^{[o]}}X^{x^{[o]}}|\psi\rangle</math></br><math>=TZ^{z^{[l]}}X^{x^{[l]}}Z^{z^{[n]}}X^{x^{[n]}}Z^{z^{[o]}}X^{x^{[o]}}T\dagger T|\psi\rangle</math></br><math>=CNOT_{l,o}^{x^{[n]}}CNOT_{n,o}^{x^{[l]}}CZ_{l,n}^{z^{[o]}}Z^{z^{[l]}}X^{x^{[l]}}T|\psi\rangle</math></br><math>=CNOT_{l,o}^{x^{[n]}}CNOT_{n,o}^{x^{[l]}}H_nCNOT_{l,n}^{z^{[o]}}H_{n}Z^{z^{[l]}}X^{x^{[l]}}T|\psi\rangle</math></br><math>=C_{zx}P_{zx}T|\psi\rangle</math>, where <math>C\epsilon \{\text{CNOT,H}\}</math> and <math>P\epsilon\{X,Z\}</math>
###The Pauli key encryptions are homomorphically updated  according to <math>P_{ab}</math>.
###The Pauli key encryptions are homomorphically updated  according to <math>P_{zx}</math>.
### Three encrypted CNOTs are used to correct <math>C^{ab}</math> as follows.
### Three encrypted CNOTs are used to correct <math>C^{zx}</math> as follows.
####The server applies encrypted CNOT operation to the two qubit state <math>Z^zX^x|\psi\rangle</math> using the secret text <math>\hat{c} = </math>HE.Convert<math>(c)</math>.
####The server applies encrypted CNOT operation to the two qubit state <math>Z^zX^x|\psi\rangle</math> using the secret text <math>\hat{c} = </math>HE.Convert<math>(c)</math>.
####Server generates following superposition sampled over random distribution D for the TCF function pairs (<math>f_0=</math>AltHE.Enc<math>_{pk}(),f_1</math>) based on the condition <math>f_0\oplus_H f_1=\hat{c}</math></br><math>\sum_{\mu\in\{0,1\},r} \sqrt{D(\mu,r)}|\mu,r\rangle</math>
####Server generates following superposition sampled over random distribution D for the TCF function pairs (<math>f_0=</math>AltHE.Enc<math>_{pk}(),f_1</math>) based on the condition <math>f_0\oplus_H f_1=\hat{c}</math></br><math>\sum_{\mu\in\{0,1\},r} \sqrt{D(\mu,r)}|\mu,r\rangle</math>
Write, autoreview, editor, reviewer
3,129

edits

Navigation menu