# Side Channel Leakages Against Financial IC Card of the Republic of Korea +
## 3 Evaluation Methodology for the Financial IC Card Protocol
### Security Evaluation Methodology of Side Channel Analysis Under Black Box Model
#### 3.2.3 Recovering the Master Key via Some Round Keys  
The brute force attack for recovery of the master key after retrieving two round keys via side channel analysis is introduced here. [PERSON] et al. [35] explains how to recover the master key when 1 round and 16 round keys are already known. In the current study, this suggestion is not sufficient, since only 1 and 2 round keys are retrieved via side channel analysis. Therefore, it is necessary to properly apply the suggestion presented in [35] to the current context. Moreover, the recovery scheme of the master key is represented at the appropriate algorithmic level. Note that notation of all variables used in Algorithm 1 is given in [21; 35]. The size of all variables is 32 bits, with the exception of the variable \(MK\). \(X^{(n)}\) indicates the \(n\)-th significant byte of 32-bit \(X\). \(X^{(n-m)}\) means from the \(n\)-th significant byte to the \(m\)-th significant byte. Additionally, \(G^{-1}\) is the inverse of the G-function. ```
1:1 round key \(K_{1,0}\) and \(K_{1,1}\), and 2 round key \(K_{2,0}\) and \(K_{2,1}\)
2:Catalides for a master key \(MK\)
3:\(\triangleright\) Calculating the inverse of G-function and constant value \(KC_{0}\), \(KC_{1}\)
4:\(TK_{1,0}\gets G^{-1}[K_{1,0}]+KC_{0}\)
5:\(TK_{1,1}\gets G^{-1}[K_{1,1}]-KC_{0}\)
6:\(TK_{2,0}\gets G^{-1}[K_{2,0}]+KC_{1}\)
7:\(TK_{2,1}\gets G^{-1}[K_{2,1}]-KC_{1}\)
```  
\(\triangleright\) Guessing a part of A and B for master key
8:for\(TC=0\) to \(2^{32}-1\)do
9:\(TA0\gets TK_{1,0}-TC\)
10:\(TA1\gets TK_{2,0}-TC\)
11:if\(TA0^{(3-1)}=TA1^{(2-0)}\)then
12: Storing a pair \((TA0,TA1)\)
13:endif
14:endfor
15:for
16:for\(TD=0\) to \(2^{32}-1\)do
17:\(TB0\gets TK_{1,1}+TD\)
18:\(TB1\gets TK_{2,1}+TD\)
19:if\(TB0^{(3-1)}=TB1^{(2-0)}\)then
20: Storing a pair \((TB0,TB1)\)
21:endif
22:endfor ```
\(\triangleright\) Filtering temporary keys
23:if\(TA0^{(0)}=TB1^{(3)}\)then
24:if\(TB0^{(0)}=TA1^{(3)}\)then
25:\(MK\leftarrow(TA0)||(TB0)||(TK_{1,0}-TA0)||(TK_{1,1}+TB0)\)
26: Storing candidate \(MK\)
27:endif
28:return Candidate \(MK\)
```

**Algorithm 1** Recovery of the master key under two round keys \(K_{1}\), \(K_{2}\)

The procedures are divided into three steps in Algorithm 1. In addition, the recovery algorithm can be performed in reverse order of generation for the round key. In particular, the first step is directly related to its reverse order, allowing it to be easily computed. Subsequently, the second step is that a part of A and B for the master key can be guessed. Moreover, \(TA0^{(3-1)}\) and \(TB0^{(3-1)}\) are identical to \(TA1^{(2-0)}\) and \(TB1^{(2-0)}\), respectively, because the 2 round key is derived from the rotation of 1 round key. There are 256 candidates until the second step, since \(TA0\) and \(TB0\) depend on the size of a single byte. In the third step, a part of \(TA0\) is equal to part of \(TB1\), due to the rotation in the generation of a round key. Finally, the number of candidates for the master key is less than 256. In order to acquire only one master key, a correct single pair (\(R_{C}\), \(R_{T}\), \(UP_{U}^{*}\), \(CT_{C}^{*}\)) in the financial IC card protocol is required. Then, the master key can be determined by proceeding with an exhaustive attack. ## 4 Experimental Results

The security strength against side channel analysis was evaluated to protect against the leakage of private information. Based on Section 3, the security can be evaluated for a specific IC card. For this, a recent IC card issued in the Republic of Korea was used. The expiration date of this specific IC card was 2023, because the issuance date was 2018. In other words, the master key dedicated to the IC chip should not be able to be revealed by any attacks, according to ChapterI.8 of [20]. As previously stated, the public information in the collected traces was first identified, and then the pre-processing information was stored. Afterwards, security evaluation was conducted against the novel side channel analysis for the defined enumeration in Section 3.2.1.