# [PERSON] on Korean Block Ciphers
## 3 Proposed Method
### Hight
#### 3.1.2 Round Function
```
1:\(X[i]\)
2:\(X_{new}[i]\)
3:\(\text{CNOT}(X[i][4],X[i][5])\), \(\text{CNOT}(X[i][3],X[i][4])\)
4:\(\text{CNOT}(X[i][2],X[i][3])\), \(\text{CNOT}(X[i][2],X[i][0])\)
5:\(\text{CNOT}(X[i][4],X[i][2])\), \(\text{CNOT}(X[i][5],X[i][2])\)
6:\(X_{new}[i][4]\gets X[i][2]\)
7:\(\text{CNOT}(X[i][7],X[i][5])\)
8:\(X_{new}[i][6]\gets X[i][5]\)
9:\(\text{CNOT}(X[i][6],X[i][4])\)
10:\(X_{new}[i][5]\gets X[i][4]\)
11:\(\text{CNOT}(X[i][0],X[i][3])\), \(\text{CNOT}(X[i][1],X[i][3])\)
12:\(X_{new}[i][2]\gets X[i][3]\)
13:\(\text{CNOT}(X[i][6],X[i][1])\), \(\text{CNOT}(X[i][7],X[i][1])\)
14:\(X_{new}[i][0]\gets X[i][1]\)
15:\(\text{CNOT}(X[i][7],X[i][0])\)
16:\(X_{new}[i][1]\gets X[i][0]\)
17:\(\text{CNOT}(X[i][5],X[i][6])\), \(\text{CNOT}(X[i][4],X[i][6])\)
18:\(\text{CNOT}(X[i][3],X[i][6])\), \(\text{CNOT}(X[i][1],X[i][6])\)
19:\(X_{new}[i][7]\gets X[i][6]\)
20:\(\text{CNOT}(X[i][6],X[i][7])\), \(\text{CNOT}(X[i][5],X[i][7])\)
21:\(\text{CNOT}(X[i][1],X[i][7])\), \(\text{CNOT}(X[i][0],X[i][7])\)
22:\(X_{new}[i][3]\gets X[i][7]\)
23:return\(X_{new}=\{X_{new}[0],X_{new}[1],\ldots,X_{new}[7]\}\)
```  
**Algorithm 5**\(F_{0}(X[i])\) of HIGHT. In the round function, after using \(F_{0}\) and \(F_{1}\), it should be returned to the original input value. For this, the \(F_{0}\)_reverse and \(F_{1}\)_reverse functions should be executed in reverse order of calculation of the \(F_{0}\) and \(F_{1}\) functions. ```
0:\(X\)
0:\(X_{new}\)
1:\(\text{CNOT}(X[3],X[4])\), \(\text{CNOT}(X[1],X[4])\)
2:\(X_{new}[7]\gets X[4]\)
3:\(\text{CNOT}(X[2],X[3])\), \(\text{CNOT}(X[0],X[3])\)
4:\(X_{new}[6]\gets X[3]\)
5:\(\text{CNOT}(X[1],X[2])\), \(\text{CNOT}(X[7],X[2])\)
6:\(X_{new}[5]\gets X[2]\)
7:\(\text{CNOT}(X[0],X[1])\), \(\text{CNOT}(X[6],X[1])\)
8:\(X_{new}[4]\gets X[1]\)
9:\(\text{CNOT}(X[7],X[0])\), \(\text{CNOT}(X[5],X[0])\)
10:\(X_{new}[3]\gets X[0]\)
11:\(\text{CNOT}(X[6],X[7])\), \(\text{CNOT}(X[4],X[7])\)
12:\(\text{CNOT}(X[3],X[7])\), \(\text{CNOT}(X[2],X[7])\)
13:\(\text{CNOT}(X[0],X[7])\), \(\text{CNOT}(X[5],X[7])\)
14:\(X_{new}[2]\gets X[7]\)
15:\(\text{CNOT}(X[0],X[6])\), \(\text{CNOT}(X[7],X[6])\)
16:\(\text{CNOT}(X[4],X[6])\), \(\text{CNOT}(X[1],X[6])\)
17:\(X_{new}[1]\gets X[6]\)
18:\(\text{CNOT}(X[7],X[5])\), \(\text{CNOT}(X[6],X[5])\)
19:\(\text{CNOT}(X[3],X[5])\), \(\text{CNOT}(X[0],X[5])\)
20:\(X_{new}[0]\gets X[5]\)
21:return\(X_{new}=\{X_{new}[0],X_{new}[1],\ldots,X_{new}[7]\}\)
```  
**Algorithm 6**\(F_{1}(X)\) of HIGHT. In the last 32 nd round, the round function from Equation (7) is performed. Compared to the previous round functions, shown in Algorithm 4, the biggest difference is that the last round uses auxiliary function, \(F_{1}\), while calculating. Therefore, we have omitted the quantum circuit design for the last round since the overall structure is almost identical. After all the round functions have been performed, the final conversion from Equation (8) gets performed and encryption gets completed. The quantum circuit design for final conversion is also omitted because it is almost identical to the initial conversion from Algorithm 3. The overall quantum circuit for HIGHT is shown in Figure 11.  
Figure 11: Quantum circuit for HIGHT.