## 2 Related Work
They give the attackers only one trace of ECSM to distinguish the key bits (it consists of between 200 and 300 iterations, based on the length of the scalar or the blinding/splitting method used). Furthermore, the attacker should not have access to other traces with known scalar, captured on the same system; hence, single-trace, non-profiled attacks. We were only interested in the usage of ML methods in such a limited scenario. Since the non-profiled SCA attacks provide no key for training, the natural choice comprises the unsupervised learning methods. In 2010, [PERSON] et al. [36] used Principal Component Analysis (PCA) on the power trace of an FPGA implementation of the Edwards curve with a random-order-execution countermeasure in place. The visualization of the absolute average value of principal components allowed the authors to distinguish ECSM iterations involving the processing of key bit \"zero\" from key bit \"one\". Although it was later shown that this countermeasure can be broken with a simple SPA attack and the difference to the mean attack ([PERSON] et al., 2017), this was the first use of PCA in the context of non-profiled SCA. Another example of unsupervised learning was the usage of clustering algorithm k-means by [PERSON] et al. (2017). The authors took measurements of current flow and electromagnetic emanation and used them both to divide ECSM iterations into two clusters--\"zeroes\" and \"ones\"--in a fully unsupervised manner. The EM traces were measured on different places of the chip. Despite the fact that the implementation was protected using the randomized projective coordinates, the leakage was based on conditional register access, depending on the key bit processed. Later, [PERSON] et al. (2017) improved the idea and used PCA as preprocessing step for clustering analysis and reduced the algorithmic complexity of the attack, especially when using multiple parallel side channels, although they experimentally showed that including more side channels did not improve the non-profiled attack. The chosen clustering algorithm was expectation maximization instead of the k-means algorithm. An interesting remark regarding the PCA was that the exploitable leakage was not present in the first few components, but was particularly present in the fourth component. The same component was chosen for visualization by [PERSON] et al. in their already-mentioned work ([PERSON] et al., 2017). In ([PERSON] et al., 2017), [PERSON] et al. used k-means to cluster a hardware implementation of ECSM and PCA, but not as a preprocessing step; rather, they used it as a distinguisher method. They used PCA on an entire ECSM, treating clock cycles representing a single ECSM iteration as one feature vector. Later, they classified points (iterations) based only on the first principal component. All points with a first principal component smaller than zero were assumed to process different scalar bits than those with a first component higher than zero. They also observed that the leakage was not present in the first principal component, and, therefore, k-means clustering outperformed PCA. Another advantage of k-means was presented in our own work ([PERSON] et al., 2017), where we showed that in the case of an unbalanced scalar (where the number of ones is different from the number of zeros), the k-means method provides robust results that are invariant to the imbalance. The comparison was made with a state-of-the-art statistical method, the difference to the mean, which performs well only in a balanced scenario. All of the described attacks aimed at FPGA implementations of cryptographic operations; however, in 2017, [PERSON] et al. (2017) attacked a software implementation of an NIST P-256 curve with the \(\omega\)-NAF method with precomputations on point P. The target platform was an 8-bit microprocessor. This time, the k-means clustering was used not to distinguish ECSM iterations but rather to cluster the power traces of partial multiplications.