In this section, we propose for the first time a side-channel attack on HyMES exploiting the joint distributions of the leakages. First, we present an outline of the proposed attack. Then, we describe the two steps used to recover the secret key .
3.1. Outline of the Proposed Attack
Our attack targets the leakage obtained during the computation of
. Note that
is required for syndrome operation
in step 1 of Algorithm 5. The implementation of HyMES proposed in Reference [
6] includes the process of calculating the column vectors
of
in the key generation algorithm. The implementation precomputes the values
and stores the result as a secret key. Since these values are required to compute the syndrome, they can also be directly calculated in the decryption process if they are not precomputed. Therefore, without loss of generality, we may assume that the
is calculated in the same way as described in Algorithm 7.
Algorithm 7 computes the
using the secret key
which is substituted with the permutation matrix
. The
with length
-bit can be expressed as a polynomial of degree
degree polynomial over
, as shown in Equation (
5).
Algorithm 7 HyMES Implementation: Computation of [6] |
Input |
Output the column vectors |
- 1:
for - 2:
- 3:
for - 4:
- 5:
end - 6:
- 7:
for - 8:
- 9:
end - 10:
end - 11:
return
|
To recover the secret key
, the proposed attack is divided into two stages. The first stage of the attack identifies the Goppa polynomial
based on the joint distributions of leakages. The second stage finds the remaining secret key
through the horizontal correlation analysis by using
obtained in the first stage. In
Section 3.2 and
Section 3.3, we explain how to determine
and
, respectively.
3.2. Recovering
The multiplication and division involved in Algorithm 7 are computed over the field
. In general, the multiplication and division on
are implemented using the exponentiation-table and the log-table for the purpose of speed efficiency. For the root
of the primitive polynomial
that constitutes
, the exponentiation-table takes the positive integer
i as input and returns
. The log-table is constructed to return
i by taking the element
of
as an input. In Reference [
6], the multiplication and division are computed by addition, subtraction, and modulus operations using the pre-computed log-table and exponentiation-table. Note that using the tables is more efficient than directly computing the exponentiations and logarithm values. The implementations of multiplication and division over
are as shown in Algorithms 8 and 9, respectively.
Algorithm 8 HyMES implementation: Multiplication over [6] |
Input |
Output the column vectors |
- 1:
if a or - 2:
- 3:
else - 4:
- 5:
end - 6:
return
|
Algorithm 9 HyMES implementation: Division over [6] |
Input |
Output the column vectors |
- 1:
if - 2:
- 3:
else - 4:
- 5:
end - 6:
return
|
Now that the basic field operations have been explained, we present the method to recover . To find , we must find the coefficients of all the orders of . In this section, we only explain how to find , since the other coefficients are found with the same methods used for . The full recovery of using the joint distributions of leakages is described in Algorithm 10.
Function is a function that returns by taking the elements k and a of , while function takes v as input and returns the Hamming weight of v. The value of and are the estimated Hamming weights of the input a and output b of the function , respectively.
When
in the step 3 loop of Algorithm 7, the operation process can be described as follows for
.
The multiplication operation
over
in Equation (
6) is performed by using the pre-computation table as shown in Equation (
7).
Algorithm 10 Analysis for |
Input Power consumption trace P for HyMES key generation, A table log[], exp[] created with the primitive polynomial p(x) |
Output the column vectors |
- 1:
- 2:
for - 3:
for - 4:
- 5:
for - 6:
- 7:
end - 8:
end - 9:
for - 10:
Find POI - 11:
end - 12:
Estimate data Hamming weight using slice method - 13:
for - 14:
- 15:
end - 16:
- 17:
for - 18:
if - 19:
- 20:
end - 21:
end - 22:
end - 23:
return
|
To find
, we use
in the second log table operation of Equation (
7). First, we set the Hamming weights of
and
as random variables, and then construct the theoretical joint distribution tables for
key candidates
. The range of Hamming weights is 0-m since
and
are elements in
. Therefore, the size of the joint distribution table
is
. Next, we find the point at which
and
are processed from the power consumption trace of Algorithm 7. In this paper, the power consumption model follows the Hamming weight model shown in Equation (
8), under the assumption that
and
are the same at all time points.
The estimated joint distribution table can be constructed by guessing the Hamming weight of and from the power consumption value and , respectively. The Hamming weight of and can be estimated using Linge’s slice method. This slice method uses the correlation between the Hamming weight and the power consumption value. For example, the number of data points with Hamming weight p is about among N-bit data M with uniform distribution. By sorting the power consumption values for the M data in ascending order, it is possible to guess the Hamming weight of the corresponding data. The performance of the slice method increases when the values of the actually used data are uniformly distributed, so it is necessary to use a sufficient amount of data. Finally, when the similarity between the theoretical joint distribution and the estimated joint distribution is compared, with the highest similarity is selected as the real key . In this paper, we use the Harmonic Mean Distance, Inner Product Distance, and -square Pearson Distance as the comparison method of distribution similarity. The definitions of the three similarity comparison methods are the same as Definition 5–7.
Definition 5. Harmonic Mean Distance (HMD) is as follows.
Definition 6. Inner Product Distance is as follows.
Definition 7. χ-square Pearson Distance is as follows.
3.3. Recovering
In this section, we explain how to find the remaining secret key
using
g(z) obtained in
Section 3.2. The process of finding
is described in Algorithm 11. We explain the process of finding
by recovering the first support value
as a concrete example. The other support values can be analyzed using the same logic used to find
. When
in Algorithm 7, the operation process can be expressed by Equation (
12). To find
, we perform the horizontal correlation power analysis between the actual power consumption values that occur when values dependent on
are processed and the Hamming weights of the values, which are calculated by guessing the value of
in Equation (
12). The number of equations containing
in Equation (
12) is
. Therefore, the number of data available for the horizontal correlation power analysis is
. Generally, HyMES with 88-bit security uses the parameter
. Therefore, 64 data points are available for the horizontal correlation power analysis using these parameters, which is a little data for the actual analysis. This can be resolved by using
-dependent values. By using all the
-dependent values used in the multiplication and division operations in steps 2–21 of Algorithm 11,
data can ultimately be used for the analysis. When the correlation coefficients between actual power consumption values and
power consumption models, which are estimated from 0 to
, are obtained, the estimated value with the highest correlation coefficient can be considered as the correct
.
Algorithm 11 Analysis for |
Input Power consumption values of POI of HyMES P ∈ Mat1 × 8t, A table log[], exp[] created with the primitive polynomial p(x), Goppa polynomial |
Output |
- 1:
for - 2:
for - 3:
- 4:
- 5:
- 6:
- 7:
- 8:
for - 9:
- 10:
- 11:
- 12:
- 13:
- 14:
end - 15:
for - 16:
- 17:
- 18:
- 19:
end - 20:
- 21:
end - 22:
- 23:
end - 24:
return
|