# Key Bit-Dependent Side-Channel Attacks on Protected Binary Scalar Multiplication +
## 5 Experimental Results
### Key Bit-Dependent Power/Electromagnetic Attack on Software Implementation  
In this section, we focus on the key bit identification function of mbedTLS (polarSSL) as shown in Figure 10, which is an extensively used embedded transmission security TLS/SSL public encryption library. It should be noted that to capture an entire binary scalar multiplication trace using the CW-Lite main board is impossible; thus, we used the modified algorithm shown in Figure 11 based on the function in Figure 10 to identify how much information exists. In Appendix B, we describe the key bit identification function of OpenSSL as shown in Figure A1. We also show the experimental results of when we used it. For attack algorithms operating on the second experimental platform, we focused on Properties 2 and 4 described in Sections 3.1.1 and 3.1.2, respectively. * Preprocessing We uniformly divided trace \(T\) into \(\lambda\) subtraces, \(O_{i}\), and aligned them \((0\leq i\leq\lambda-1)\). Figure 12 (top) shows one of the subtraces. * Select Points of Interest In software implementation, operations are sequentially executed. Hence, differing from hardware implementations, we targeted two positions. The first came immediately after the & 0x01 operation was performed, as shown in Figure 10. The second was where the register was referred to. The register addresses to be referenced were determined according to secret scalar bit \(d_{i}\), so there was information associated with \(d_{i}\). Thus, we targeted where the register LOAD operation was performed for a long integer operation. Points with high SOST values are located where the key bit identification function is performed (see Figure 12). The second target points were located behind the key bit identification function. Here, we chose points with high SOST values as PoIs. When we calculated SOST values, we classified PoIs of subtraces \(p_{i}\) into two groups according to Property 2 (or 4). \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Power Consumption (Figure 3)**} & \multicolumn{3}{c}{**Electromagnetic (Figure 4)**} \\ \cline{2-9}
**Hardware** & \multicolumn{3}{c}{**None**} & \multicolumn{3}{c}{**Low-Pass Filter**} & \multicolumn{3}{c}{**None**} & \multicolumn{3}{c}{**Low-Pass Filter**} \\ \cline{2-9}  & **diff** & **k-means** & **diff** & **k-means** & **diff** & **k-means** & **diff** & **k-means** \\ \hline Property 1 & 96.75\% & 96.74\% & 96.75\% & 97.71\% & 100\% & 100\% & 100\% & 100\% \\ \hline Property 3 & 100\% & 100\% & 100\% & 100\% & 100\% & 100\% & 100\% & 100\% \\ \hline \hline \end{tabular}  
* diff: clustering based on the difference from an average trace; k-means: clustering using the k-means clustering algorithm.  
\end{table} 
Table 1: Experimental results: hardware implementations. Figure 10: Key bit identification function of mbedTLS. * Classify into Two Groups and Extract Secret Scalar Bits **(1)** When we targeted _Case Study 1_ and exploited the power-consumption trace, we could not clearly split it into two groups via SPA-VI, because the two distributions overlapped as shown in Figure 5a, so we applied the k-means clustering algorithm to classify \(p_{i}\) into two groups (\(0\leq i\leq\lambda-1\)). Approximately 97.60% of the secret scalar bits \(d_{i}\) could be extracted, as shown in Table 2. There are misclassified bits, but the number of error bits is sufficiently small. Hence, it is possible to recover whole secret scalar bits with a brute-force attack. Consequently, we confirmed that the key bit-dependent leakage based on Property 2 was sufficiently large to recover the secret scalar bits. **(2)** By using the low-pass filter to increase the signal-to-noise ratio, success rate was slightly improved to 98.24% when we applied the k-means clustering algorithm. It could not be classified into two groups through SPA-VI because the distribution overlapped, as shown in Figure 5c. **(3, 4)** We investigated leakage associated with referred register addresses determined according to \(d_{i}\) in _Case Study 2_.