Ipsj CSS2024187
Ipsj CSS2024187
Abstract: Kuo and Takayasu (ICISC 2023) proposed a two-step attack on CRYSTALS-Kyber. First,
they recovered some portions of secret keys using correlation power analysis (CPA). Next, they showed
that the remaining secrets can be recovered by solving the learning with errors (LWE) problem. They
used the standard Kannan’s embedding in the second step and concluded that 200 traces in the first step
were sufficient for recovering whole secret keys. Later, they improved their second step in SCIS 2024 and
showed that 100 traces are sufficient for the first step. The core observation is that, in addition to some
portions of secret keys, the first step can recover more portions of noisy secret keys that Kuo and Takayasu
did not use in the second step. In this paper, we combine the improved lattice attack with the prediction
function proposed by Tosun et al., allowing us to carry out the same attack on masked Kyber. Since the
prediction function is an even function, making it impossible to distinguish the sign of each coefficient.
However, our lattice attack requires only 59 or 63 absolute values of coefficients to be recovered through
CPA, which can be achieved with roughly 700 traces. This shows a significant improvement over previous
attacks on the masked version of Kyber. Additionally, we discovered that using a technique called negative
correlation, which reduces the ambiguity of negative coefficients, only 50 traces are necessary to achieve
full-key recovery on unprotected Kyber.
© 2024 Information Processing Society of Japan - 1401 - This paper is work in progress and not peer-reviewed.
multiplication between the secret polynomial s and the ci- Table 1: Summary of state-of-the-art non-profiling SCA
phertext u, in practical applications, we store the secret attacks on implementations of Kyber.
key in its NTT domain ŝ to expedite the process. Work Target Masked Traces (un-/masked)
As the world transitions to PQC, the vulnerability of This work [15, 4] 3 50/700
cryptographic algorithms to side-channel attacks, partic- [29] [15, 4] 3 7/2100
[30] [15] 3 150/7000
ularly power analysis, becomes a critical concern. Power [18] [15] 7 100/7
analysis exploits fluctuations in a device’s power consump- [19] [15] 7 200/7
[23] [15] 7 200/7
tion to gain information about cryptographic operations,
potentially compromising security.
Power analysis attacks, introduced by Kocher [16, 17], power analysis attacks. As a result, there exists some lit-
exploit the fact that the instantaneous power consumption erature on masking lattice-based cryptosystems. There
of a cryptographic device depends on the data it processes are also examples applied on Kyber [4, 5, 13]. CPA on
and on the operation it performs. There exist simple power a masked version of cryptosystems typically requires much
analysis attacks on Kyber that can compromise a message more effort to compromise. For instance, [30] required a
or private key using only one or several traces. In partic- minimum of 7,000 traces and estimated 48.5 days of anal-
ular, Primas et al. [26] and Pessl et al. [25] recover data ysis to recover the first-order protected Kyber using naive
passed through an NTT by templating the multiplications method. However, [29] shows that the central reduction
or other intermediate values within the NTT. Hamburg et techniques widely adopted in lattice-based cryptosystems
al. [12] present a sparse-vector chosen ciphertext attack introduce sources of effectively exploitable SCA leakage.
strategy, which leads to full long-term key recovery. These It is shown that approximately 2100 traces are needed to
attacks are still limited in that they either require exten- perform key recovery on masked implementations of Ky-
sive profiling efforts or they are only applicable in specific ber without the need for profiling. Although the result
scenarios like the encryption of ephemeral keys. is promising, the sign of the recovered coefficients cannot
As opposed to above methods, Mujdei et al. [23] showed be determined due to the nature of their prediction func-
that leakage from the schoolbook polynomial multiplica- tion. Therefore, additional steps need to be taken to fully
tions after the incomplete NTT can be exploited through recover the secret key.
correlation power analysis (CPA) style attacks. The basis
of CPA lies in exploiting the relationship between power 1.2 Our Contribution
consumption and the data being processed within the cryp- In this paper, we improve Kuo and Takayasu’s attack
tographic algorithm. The presented attack required 200 [18] that performs a full-key recovery on CRYSTALS-
power traces to recover all the coefficients, which enables Kyber. We also apply the attack to the SCA-protected
full key recovery. More precisely, they guess two coeffi- implementations of Kyber and show that only about 700
traces are needed to recover a first-order masked imple-
cients at once within the range − 2q , 2q , implying a search
over q 2 combinations. mentation of Kyber.
In ICISC 2023, Kuo and Takayasu [19] proposed an at- We notice that in their CPA attack, positive/negative
tack that combines CPA attack and lattice analysis, which coefficients are the primary cause of false negatives, which
achieves better runtime than that of Mudjei et al. They directly affects the number of traces required to break the
claimed that it requires 200 traces to successfully per- system. For the unprotected version, it is easier to elim-
form a full-key recovery of Kyber. Their attack consists inate the ambiguity by utilizing negative correlation [7].
of two steps. Firstly, by exploiting the correlation be- We can determine the sign of the coefficients because the
tween the Hamming weight of specific intermediates and correlation coefficient of a wrong guess is expected to have
the power consumption during the decryption process in a different sign compared to the correct one.
Kyber, some coefficients of the secret key in the NTT do- For the masked version, it is quite tempting to use the
main ŝ = {ŝ0 , ..., ŝn−1 } are recovered. Secondly, as there same power model as [29]. However, if we use this model
may be ambiguity regarding whether the recovered coeffi- as the prediction function, a hypothesis and its additive
cients are indeed correct, they sample a portion of the re- inverse get the same correlation score due to the nature
covered coefficients and construct a simpler LWE problem, of the absolute value function. Therefore, the coefficients
then solve it using the Kannan’s embedding technique. will be split into three groups, same as in [18]. As a result,
Later in SCIS 2024 [18], they improved the attack by we successfully decrease the number of traces required to
splitting the coefficients into three groups: the confirmed perform a full-key recovery on masked Kyber to around
ones, the positive/negative ones where only their abso- 700 traces. Table 1 formalizes the above discussion and
lute values are known, and the unknown ones. They con- positions our study among the attacks existing in the lit-
structed the lattice using the half-twisted embedding tech- erature.
nique [31], achieving an even better reduction in the num- Organization. In Section 2, we introduce how to imple-
ber of traces required for full-key recovery. ment Kyber with Number Theoretic Transform and per-
Masking is an effective method to protect Kyber from form CPA attack on it. In Section 3, we illustrate how to
6. Conclusion
Fig. 1: Recovered coefficients and threshold for traces gen- In this paper, we present a refined lattice analysis of the
erated by ELMO correlation power analysis attack on CRYSTALS-Kyber,
resulting in a reduction of the required power traces for
successful key recovery. We achieve this by introduc-
Table 3: Experimental results on different acceptance ing a novel coefficient classification algorithm based on
threshold and trace number. adjustable thresholds. This algorithm categorizes coeffi-
Traces nA
cients into confirmed, positive/negative, and unknown cat-
200 59/128
100 55.5/128 egories. Subsequently, we employ this information using
50 53.25/128 the half-twisted embedding method to recover the secret
key.
we need nA + nB to be more than 59/63 to allow us to The experimental results validate the effectiveness of
construct a solvable LWE instance for 20 confirmed co- this refined approach. Through careful adjustment of
efficients. The 20 confirmed coefficients can be obtained threshold values, we successfully recover the secret key us-
by iterating through 219 possibilities (a negative key is also ing only 50 power traces. These advancements promise
accepted). From the graph, it can be seen that around 700 to enhance the understanding of vulnerabilities in crypto-
traces is more than enough to acquire enough coefficients graphic implementations and facilitate the development of
to break the masked version of Kyber. more robust encryption techniques against such attacks.