Table 2 Illustration of preparation of encrypted secrets for two participants.

From: Secure dynamic multiparty quantum private comparison

The private information

X = {001100110010}

Y = {011100110010}

Random keys

\({{\rm{K}}}_{rand}^{TP1}=\{010110010110\}\), \({{\rm{K}}}_{rand}^{TP2}=\{111111010010\}\)

\({K}_{rand}={{\rm{K}}}_{rand}^{TP1}\oplus {{\rm{K}}}_{rand}^{TP2}=\{101001000100\}\), \({K}_{rand}^{1}=\{101001\}\), \({K}_{rand}^{2}=\{000100\}\)

Validity check

Length check for equality

X_length = Y_length = 12

Length check for 2 blocks

\(\frac{12}{2}=6\)

Initial preparation

Xpart_1 = {001100}, Xpart_2 = {110010}, \({K}_{rand}^{1}=\{101001\}\), \({K}_{rand}^{2}=\{000100\}\).

Ypart_1 = {011100}, Ypart_2 = {110010}, \({K}_{rand}^{1}=\{101001\}\), \({K}_{rand}^{2}=\{000100\}\).

Encryption

\({X}_{1}={K}_{rand}^{1}\oplus {X}_{part\_1}\), \({X}_{2}={K}_{rand}^{2}\oplus {X}_{part\_2}\), X1 = {100101}, X2 = {110110}

\({Y}_{1}={K}_{rand}^{1}\oplus {Y}_{part\_1}\), \({Y}_{2}={K}_{rand}^{2}\oplus {Y}_{part\_2}\), Y1 = {110101}, Y2 = {110110}.

Encoding

If \({X}_{1}={X}_{12}=0\,({X}_{1}={X}_{12}=1)\) then \(\,{X}_{1}^{\text{'}}={X}_{12}^{\text{'}}=1\,({X}_{1}^{\text{'}}={X}_{12}^{\text{'}}=0)\). Else, \({X}_{1}^{\text{'}}={X}_{1}\) & \({X}_{12}^{\text{'}}={X}_{12}\)

The same process for Y

\({X}_{1}=100101\), \({X}_{1}^{\text{'}}=101100\), \({X}_{12}=010011\).

\({Y}_{1}=110101\), \({Y}_{1}^{\text{'}}=111100\), \({Y}_{12}=000011\).

Compute \({C}_{a1}={X}_{1}\oplus {X}_{1}^{\text{'}}\), \({X}_{12}={X}_{1}\oplus {X}_{2}\), & \({C}_{b1}={Y}_{1}\oplus {Y}_{1}^{\text{'}}\), \({Y}_{12}={Y}_{1}\oplus {Y}_{2}\).

\({C}_{a1}=\{001001\}\), \({X}_{12}=\{010011\}\).

\({C}_{b1}=\{001001\}\), \({Y}_{12}=\{000011\}\).