Prepare and Measure Quantum Digital Signature: Difference between revisions

Jump to navigation Jump to search
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)  
<u>'''Stage 1'''</u> Distribution
  '''function''' key distribution(n,L)  
   '''For''' k = 0 to 2^n
   '''For''' k = 0 to 2^n
   '''function''' key generation (L)
   '''function''' key_generation (L)
     '''For l=1 to L
     '''For l=1 to L
     <math>\beta_k^l=</math>Seller.choose<math>_R(\{0,1,+,-\})</math> //random classical bits
     <math>\beta_k^l=</math>choose<math>_R(\{0,1,+,-\})</math> //random classical bits
     Seller.generate(|\beta_k^l\rangle) //a quantum state generation
     '''qubit''' |\beta_k^l\rangle= create(\beta_k^l) //a quantum state generation with classical input
     '''end for'''
     '''end for''' l
     <math>|\psi^k\rangle=\bigotimes^L_{l=1}|\beta^k_l\rangle</math> //quantum string
     <math>|\psi_k\rangle=\bigotimes^L_{l=1}|\beta^k_l\rangle</math> //quantum public key
    <math>P_k=|\psi^k\rangle</math> //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''' (P_k,s_k)
     '''return''' (<math>|\psi_k\rangle,s_k</math>)
   '''end function''' key generation
   '''end function''' key_generation
   Seller.send(Buyer, (k,P_k)
  <math>|\psi_{Bk}\rangle=|\psi_k\rangle</math>
   Seller.send(Verifier (k,P_k)
  <math>|\psi_{Vk}\rangle=|\psi_k\rangle</math>
   '''end for'''</br>
   Seller<math>\xrightarrow[]{(k,|\psi_{Bk}\rangle))}</math>Buyer
  '''end function''' key distribution
   Seller<math>\xrightarrow[]{(Verifier,(k,<math>|\psi_{Vk}\rangle</math>))}</math>Verifier
 
   '''end for''' k
**'''State Elimination:'''  
'''end function''' key_distribution</br>
#For k = 0,1
  '''function''' state_elimination(A,(<math>|\psi_k\rangle</math>,L))
##For l = 1,2,...,L
  '''For''' l = 1,2,...,L
### Buyer chooses <math>b^k_l \epsilon_R {0,1}</math>  
  <math>b_k^l=</math>Choose<math>_R(\{X,Z\})</math> //randomly chosen measurement basis
###If <math>b^k_l=0</math>, Buyer measures his qubit in X basis <math>\{|+\rangle,|-\rangle\}</math>
  '''if''' <math>b_k^l=</math>Z '''then'''
###If <math>b^k_l=0</math>, Buyer measures his qubit in Z basis <math>\{|0\rangle,|1\rangle\}</math>
    M= Measure<math>_{\{0,1\}}(\beta_k^l)</math>
###'''return''' <math>m_{b^k_l}</math>
    '''if''' M=1 '''then''' esign<math>_k^l= 1</math>
###<math>B^k_l=1-m_{b^k_l}</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))


**Verifier repeats steps 2(a)-2(b) with randomly chosen basis <math>v^k_l</math> to get his eliminated signature elements <math>V^k_l</math>


  '''function''' Symmetrisation
  '''function''' Symmetrisation
Write, autoreview, editor, reviewer
3,125

edits

Navigation menu