Write, autoreview, editor, reviewer
3,129
edits
Line 92: | Line 92: | ||
# If <math>S_v < s_vL/2</math>, Verifier accepts m else he aborts | # If <math>S_v < s_vL/2</math>, Verifier accepts m else he aborts | ||
==Pseudo Code 2== | ==Pseudo Code 2== | ||
'''function''' key_distribution(n,L) | |||
'''function''' | |||
'''For''' k = 0 to 2^n | '''For''' k = 0 to 2^n | ||
'''function''' | '''function''' key_generation (L) | ||
'''For l=1 to L | '''For l=1 to L | ||
<math>\beta_k^l=</math> | <math>\beta_k^l=</math>choose<math>_R(\{0,1,+,-\})</math> //random classical bits | ||
'''qubit''' |\beta_k^l\rangle= create(\beta_k^l) //a quantum state generation with classical input | |||
'''end for''' | '''end for''' l | ||
<math>|\ | <math>|\psi_k\rangle=\bigotimes^L_{l=1}|\beta^k_l\rangle</math> //quantum public key | ||
<math>s_k=\{\beta_k^0,....\beta_k^L\}</math> //secret key | <math>s_k=\{\beta_k^0,....\beta_k^L\}</math> //secret key | ||
'''return''' ( | '''return''' (<math>|\psi_k\rangle,s_k</math>) | ||
'''end function''' | '''end function''' key_generation | ||
Seller | <math>|\psi_{Bk}\rangle=|\psi_k\rangle</math> | ||
Seller | <math>|\psi_{Vk}\rangle=|\psi_k\rangle</math> | ||
'''end for'''</br> | Seller<math>\xrightarrow[]{(k,|\psi_{Bk}\rangle))}</math>Buyer | ||
''' | Seller<math>\xrightarrow[]{(Verifier,(k,<math>|\psi_{Vk}\rangle</math>))}</math>Verifier | ||
'''end for''' k | |||
'''end function''' key_distribution</br> | |||
'''function''' state_elimination(A,(<math>|\psi_k\rangle</math>,L)) | |||
'''For''' l = 1,2,...,L | |||
<math>b_k^l=</math>Choose<math>_R(\{X,Z\})</math> //randomly chosen measurement basis | |||
'''if''' <math>b_k^l=</math>Z '''then''' | |||
M= Measure<math>_{\{0,1\}}(\beta_k^l)</math> | |||
'''if''' M=1 '''then''' esign<math>_k^l= 1</math> | |||
'''if''' M=-1 '''then''' esign<math>_k^l= 0</math> | |||
'''end if''' | |||
'''if''' b_k^l=X '''then''' | |||
M= Measure<math>_{\pm}(\beta_k^l) </math> | |||
'''if''' M=1 '''then''' esign<math>_k^l= +</math> | |||
'''if''' M=-1 '''then''' esign<math>_k^l= -</math> | |||
'''end if''' | |||
'''end if''' | |||
'''end for''' l | |||
'''return''' esign<math>_k</math> | |||
'''end function''' state_elimination | |||
//Buyer's elimnated signatures | |||
esign<math>_{B0}</math>= Buyer.state_elimination(<math>|\psi_{B0}\rangle</math>,L) | |||
esign<math>_{B1}</math>= Buyer.state_elimination(<math>|\psi_{B1}\rangle</math>,L) | |||
//Verifier's elimnated signatures | |||
esign<math>_{V0}</math>= Verifier.state_elimination(Verifier,(<math>|\psi_{V0}\rangle</math>,L)) | |||
esign<math>_{V1}</math>= Verifier.state_elimination(Verifier,(<math>|\psi_{V1}\rangle</math>,L)) | |||
'''function''' Symmetrisation | '''function''' Symmetrisation |