(An et al., 2018), this countermeasure is no longer
sufficient.
Let us note that article (Lee et al., 2010) from
2010 states that the initialization of t as [r,r,.. .,r]
is not sufficient since an attacker could potentially
do a brute force attack trying all possible choices
for r (that should depend on concrete architecture).
Therefore, they suggest random initialization of t as
[r
1
,r
2
,..., r
N
].
Nevertheless, neither of these countermeasures
mitigates our attack, since it exploits different ham-
ming weights in the ciphertext (not in the target reg-
ister, which starts to be quite random during a normal
computation itself).
6.3 Random Key Rotation
(Wang et al., 2017) argues that a combination of ran-
dom initialization of t with a new protection called
random key rotation is secure against the first-order
power analysis.
The idea behind random key rotation is the follow-
ing: instead of straightforwardly multiplying cipher-
text with secret key e f (mod q), we choose random
i ∈ {0,.. .,N − 1}, then we compute f x
i
and ex
N−i
,
and finally, we multiply them getting the intended cor-
rect result ex
N−i
f x
i
= e f (mod q).
Random key rotation helps against statistical anal-
ysis methods, but it does not provide protection
against single-trace power analysis. Since our attack
on ChipWhisperer platform gave us around 90% ac-
curacy with just one trace, this mitigation is therefore
questionable, even so, if real-world cryptography will
use NTRU only in ephemeral usage.
6.4 Blinding Ciphertext
A possible countermeasure, originally against corre-
lation power analysis (CPA), is blinding the cipher-
text. It appeared to be also effective against simple
power analysis.
We can blind the ciphertext with an array [r, .. .,r],
or with [r
1
,..., r
N
] := R as described in (Lee et al.,
2010). Then we compute (e + R) f − R f . This coun-
termeasure would provide the same protection against
our attack as we would hypothetically get by limiting
the enemy to a ciphertext known model since in that
case the ciphertext can be assumed to be random. Re-
sults of carrying out the attack on random ciphertext
are shown in table 2.
Needless to say that this countermeasure is quite
expensive since it doubles the computational cost.
Table 2: Second Experiment: statistical results for 2000
keys with random ciphertext described in relative frequen-
cies of 0, 1, 2 or more than 2 wrong coefficients.
# of wrong coeff. 0 1 2 ≥3
1 trace 61.1% 28.6% 8.6% 1.7%
avg of 2 traces 97.9% 2.1% 0% 0%
avg of 3 traces 99.8% 0.2% 0% 0%
6.5 Randomization of Private Key B
A promising and low-cost countermeasure that had
the potential to affect our attack was the randomiza-
tion of b from (Lee et al., 2010). The implementation
stores the private key so that the elements of b are
in increasing order (separated in two halves). This is
not necessary. In fact, we can randomly permute the
first and the second half of the coefficients separately,
and the result would be the same. This can be done
before every decryption and it would make any sta-
tistical method significantly more difficult, e.g. cor-
relation power analysis or differential power analysis.
Although the paper (Lee et al., 2010) states that it is
not clear how much resistance it provides against sim-
ple power analysis.
We simulated this countermeasure to protect our
target implementation, but we concluded that it is still
vulnerable to our attack with modification. The im-
portant observation is that we can actually find the
original b that has increasing coefficients by exploit-
ing all the iterations of the outer for-cycle at once.
Randomization of b means just reordering of the rows
in Fig. 6.
7 CONCLUSION
We have closely studied one implementation of
NTRU that was supposed to provide protection
against simple power analysis by (An et al., 2018).
Unfortunately, their proposed implementation had
several bugs, so we needed to address them first.
Then, we theoretically explained an attack that re-
covers the secret key using few traces of decrypting
ciphertext that contains zero on target that complies
with hamming weight or hamming distance model.
We first simulated our theoretical attack on a model
in Python language for convenience. Then, we did
first practical experiment on 8-bit microcontroller of
the Microchip AVR family, namely ATmega32A, as
a proof of concept. Then we did a more profound
statistical analysis with 32-bit microcontroller ARM
Cortex-M0 as the target. This analysis showed that
with probability of 91% our attack is successful just
with a single trace assuming the attacker is able to
ICISSP 2023 - 9th International Conference on Information Systems Security and Privacy
142