# US 2019/0057228 A1 · Testing resistance of a circuit to a side channel analysis

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0057228 A1
- Document ID: US20190057228A1
- Status: Published application
- Kind: A1
- Application number: 16/105,471
- Filed: 2018-08-20
- Published: 2019-02-21
- Earliest claimed: 2017-08-21
- Assignees: Eshard
- Applicants: Eshard
- Inventors: Benoît Feix; Hugues Thiebeauld de la Crouee
- Web page: https://patentgrep.com/patent/US20190057228A1

## CPC

- G06F 21/75: by inhibiting the analysis of circuitry or operation
- G01R 31/31719: {Security aspects, e.g. preventing unauthorised access during test}
- G06F 7/723: {Modular exponentiation (G06F7/724, G06F7/727, G06F7/728 take precedence)}
- G06F 21/556: {involving covert channels, i.e. data leakage between processes (inhibiting the analysis of circuitry or operation with measures against power attack G06F21/755)}
- G09C 1/00: Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system (cryptographic typewriters G09C3/00)
- H04L 9/002: {Countermeasures against attacks on cryptographic mechanisms (network architectures or network communication protocols for protection against malicious traffic H04L63/1441)}
- H04L 9/003: {for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]}
- H04L 2209/12: Details relating to cryptographic hardware or logic circuitry
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G01R: MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES (indicating correct tuning of resonant circuits H03J3/12)
- G09C: CIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

In a general aspect, a test method can include: acquiring a plurality of value sets, each comprising values of a physical quantity or of logic signals, linked to the activity of a circuit to be tested when executing distinct cryptographic operations applied to a same secret data, for each value set, counting occurrence numbers of the values of the set, for each operation and each of the possible values of a part of the secret data, computing a partial result of operation, computing sums of occurrence numbers, each sum being obtained by adding the occurrence numbers corresponding to the operations which when applied to a same possible value of the part of the secret data, provide a partial operation result having a same value, and analyzing the sums of occurrence numbers to determine the part of the secret data.

## Claims

### Claim 1

A test method comprising:
acquiring a plurality of value sets, each value set comprising values of a physical quantity, or of logic signals linked to activity of a circuit to be tested when the circuit executes an operation of an operation set of distinct cryptographic operations applied to a same data to be discovered;
for each value set, counting, by a processing unit, occurrence numbers of values transformed by a first surjective function applied to values of the value set, to form an occurrence number set for the value set;
for each operation of the operation set, and each possible value of a part of the data to be discovered, computing, by the processing unit, results of at least two distinct partial operations;
computing, by the processing unit, for each partial operation result, cumulative occurrence number sets, each cumulative occurrence number set being obtained by adding together the occurrence number sets corresponding to the operations of the operation set, which, when applied to a same value or equivalent value of the possible values of the part of the data to be discovered, provide a partial operation result having a same transformed value resulting from application of a second surjective function;
combining together the cumulative occurrence number sets corresponding to each partial operation result to obtain combined cumulative occurrence number sets, the combination of the cumulative occurrence number sets being performed as a function of partial operations corresponding to the partial operation results; and
analyzing, by the processing unit, the combined cumulative occurrence number sets to determine the part of the data to be discovered, wherein if the data to be discovered has leaked into the value sets, it is found in the cumulative occurrence number sets corresponding to a value of the part of the data to be discovered.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising selecting values in each value set, the counting of occurrence numbers being performed on the selected values.

### Claim 3 (depends on 1)

The method according to claim 1, further comprising:
transmitting, to the circuit, a plurality of distinct commands, each command triggering the execution, by the circuit, of one of the operations of the operation set, applied to the data to be discovered, and
during the execution, by the circuit, of one of the operations of the operation set, collecting by a measuring device, the values of one of the value sets.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the value sets include at least one of:
measurements of current consumption of the circuit;
measurements of electromagnetic radiation emitted by the circuit;
measurements of absorption of magnetic field present around the circuit; or
logic signals or digital values collected in the circuit.

### Claim 5 (depends on 1)

The method according to claim 1, wherein each of the first surjective function and the second surjective function are one of the following functions:
an identity function;
a function providing a resultant value which is then reduced to a value corresponding to a Hamming weight;
a function providing the Hamming weight of the value to which the function is applied; or
a function providing a Hamming distance between a value and a preceding value to which the function is applied.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising rejecting the circuit, or a program executed by the circuit, if the analyzing determines the part of the data to be discovered.

### Claim 7 (depends on 1)

The method according to claim 1, further comprising, for a previously determined part of the data to be discovered and another part of the data to be discovered:
computing an operation result for each of the possible values of a part of the data to be discovered;
computing the cumulative occurrence number sets;
combining the cumulative occurrence number sets; and
analyzing the combined cumulative occurrence number sets.

### Claim 8 (depends on 2)

The method according to claim 2, wherein the selected values in each value set include at least one of:
consecutive values of the value set;
non-consecutive values of the value set;
local extremum values of the value set; or
all the values of the value set.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the operations of the operation set include applying a single operation to the data to be discovered and to an input data of a set of input data.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the partial operations include at least a part of one of the following operations:
a symmetrical or asymmetrical encryption or decryption operation;
a signature operation;
an authentication operation;
a modular or non-modular multiplication by the data to be discovered;
a logic Exclusive OR operation with the data to be discovered;
a modular exponentiation operation, the data to be discovered being used as exponent;
a scalar multiplication operation of a secret data by a point on an elliptic curve;
a modular reduction operation, the data to be discovered being used as modulus;
a substitution operation by a value selected in a substitution table using an input value;
an arithmetic operation applied to the data to be discovered;
a partial operation performed within an AES or DES round; or
an operation combining a logic Exclusive OR operation with the data to be discovered and a substitution operation replacing the result of the logic operation with a value selected in a substitution table using the result of the logic operation.

### Claim 11 (depends on 1)

The method according to claim 1, wherein the analyzing the combined cumulative occurrence number sets includes:
for each combined cumulative occurrence number set, computing a normalized cumulative occurrence number by dividing the combined cumulative occurrence number by a corresponding total number of occurrence numbers accumulated in the combined cumulative occurrence number set;
for each possible value of the part of the data to be discovered and each transformed value of the partial operation results, computing a sum of squared differences between each normalized cumulative occurrence number corresponding to the possible value of the part of the data to be discovered and the transformed value of the partial operation results, and an average value of the cumulative occurrence numbers;
for each possible value of the part of the data to be discovered, computing a cumulative total of difference sums corresponding to the transformed values of the partial operation results; and
comparing, with each other, the cumulative totals of difference sums, and detecting whether one of the cumulative totals of difference sums for a possible value of the part of the data to be discovered is greater than other cumulative totals of difference sums.

### Claim 12 (depends on 1)

The method according to claim 1, wherein the analyzing the combined cumulative occurrence number sets includes:
for each possible value of the part of the data to be discovered and each transformed value of the partial operation results, computing a cumulative total of the cumulative occurrence numbers;
for each occurrence number in the combined cumulative occurrence number sets, computing a normalized cumulative total by dividing the combined cumulative occurrence numbers by a corresponding cumulative total, and computing a product of the normalized cumulative total by a logarithm of the normalized cumulative total;
for each possible value of the part of the data to be discovered and each transformed value of the partial operation results, computing a sum of products corresponding to the possible value of the part of the data to be discovered and the transformed value of the partial operation results;
for each possible value of the part of the data to be discovered, computing a cumulative total of the product sums corresponding to the transformed values of the partial operation results, each product sum being multiplied by an average value of the cumulative total corresponding to the possible values of the part of the data to be discovered and the transformed value of the partial operation results; and
comparing, with each other, the cumulative totals of product sums, and detecting whether one of the cumulative totals of product sums for a possible value of the part of the data to be discovered is greater than other cumulative totals of product sums.

### Claim 13

A system for testing a circuit, the system comprising:
a measuring device configured to acquire a plurality of value sets, each value set including values of a physical quantity, or of logic signals linked to activity of a circuit to be tested during execution, by the circuit, of an operation of an operation set of distinct cryptographic operations applied to a same data to be discovered, and
a processing unit configured to:
receive the plurality of value sets;
for each value set, count occurrence numbers of values transformed by a first surjective function applied to values of the value set, to form an occurrence number set for the value set;
for each operation of the operation set, and each of the possible values of a part of the data to be discovered, compute results of at least two distinct partial operations;
compute, for each partial operation result, cumulative occurrence number sets, each cumulative occurrence number set being obtained by adding together the occurrence number sets corresponding to the operations of the operation set, which, when applied to a same value or equivalent value of the possible values of the part of the data to be discovered, provide a partial operation result having a same transformed value resulting from application of a second surjective function;
combine together the cumulative occurrence number sets corresponding to each partial operation result to obtain combined cumulative occurrence number sets, the combination of the cumulative occurrence number sets being performed as a function of partial operations corresponding to the partial operation results; and
analyze the combined cumulative occurrence number sets to determine the part of the data to be discovered, wherein if the data to be discovered has leaked into the value sets, it is found in the cumulative occurrence number sets corresponding to a value of the part of the data to be discovered.

### Claim 14 (depends on 13)

The system according to claim 13, further comprising a measuring probe coupled to the measuring device, the measuring probe being configured to acquire signal traces linked to the activity of the circuit.

### Claim 15

A computer program product comprising code portions which, when executed by a computer, cause the computer to:
acquire a plurality of value sets, each value set comprising values of a physical quantity, or of logic signals linked to the activity of a circuit to be tested when the circuit executes an operation of an operation set of distinct cryptographic operations applied to a same data to be discovered;
for each value set, count occurrence numbers of values transformed by a first surjective function applied to values of the value set, to form an occurrence number set for the value set;
for each operation of the operation set, and each of possible value of a part of the data to be discovered, compute results of at least two distinct partial operations;
computing, by the processing unit for each partial operation result, cumulative occurrence number sets, each cumulative occurrence number set being obtained by adding together the occurrence number sets corresponding to the operations of the operation set, which, when applied to a same value or equivalent value of the possible values of the part of the data to be discovered, provide a partial operation result having a same transformed value resulting from application of a second surjective function;
combining together the cumulative occurrence number sets corresponding to each partial operation result to obtain combined cumulative occurrence number sets, the combination of the cumulative occurrence number sets being performed as a function of partial operations corresponding to the partial operation results; and
analyzing by the processing unit the combined cumulative occurrence number sets to determine the part of the data to be discovered, wherein if the data to be discovered has leaked into the value sets, it is found in the cumulative occurrence number sets corresponding to the value of the part of the data to be discovered.

### Claim 16 (depends on 13)

The system according to claim 13, wherein the processing unit is further configured to select values in each value set, the counting of occurrence numbers being performed on the selected values.

### Claim 17 (depends on 16)

The system according to claim 16, wherein the selected values in each value set include at least one of:
consecutive values of the value set;
non-consecutive values of the value set;
local extremum values of the value set; or
all the values of the value set.

### Claim 18 (depends on 13)

The system according to claim 13, configured to:
transmit, to the circuit, a plurality of distinct commands, each command triggering execution, by the circuit, of one of the operations of the operation set, applied to the data to be discovered, and
during the execution by the circuit of one of the operations of the operation set, collect, by a measuring device, the values of one of the value sets.

### Claim 19 (depends on 13)

The system according to claim 13, wherein the value sets include at least one of:
measurements of current consumption of the circuit;
measurements of electromagnetic radiation emitted by the circuit;
measurements of absorption of magnetic field present around the circuit; or
logic signals or digital values collected in the circuit.

### Claim 20 (depends on 13)

The system according to claim 13, wherein each of the first surjective function and the second surjective function are one of the following functions:
an identity function;
a function providing a resultant value which is then reduced to a value corresponding to a Hamming weight;
a function providing the Hamming weight of the value to which the function is applied; or
a function providing a Hamming distance between a value and a preceding value to which the function is applied.

### Claim 21 (depends on 13)

The system according to claim 13, configured to reject the circuit, or a program executed by the circuit, if the analyzing determines the part of the data to be discovered.

### Claim 22 (depends on 13)

The system according to claim 13, wherein the processing unit is further configured to, for a previously determined part of the data to be discovered and another part of the data to be discovered:
compute an operation result for each possible value of a part of the data to be discovered;
compute the cumulative occurrence number sets;
combine the cumulative occurrence number sets; and
analyze the combined cumulative occurrence number sets.

### Claim 23 (depends on 13)

The system according to claim 13, wherein the operations of the operation set include a single operation to the data to be discovered and to an input data of a set of input data.

### Claim 24 (depends on 13)

The system according to claim 13, wherein the partial operations include at least a part of one of the following operations:
a symmetrical or asymmetrical encryption or decryption operation;
a signature operation;
an authentication operation;
a modular or non-modular multiplication by the data to be discovered;
a logic Exclusive OR operation with the data to be discovered;
a modular exponentiation operation, the data to be discovered being used as exponent;
a scalar multiplication operation of a secret data by a point on an elliptic curve;
a modular reduction operation, the data to be discovered being used as modulus;
a substitution operation by a value selected in a substitution table using an input value;
an arithmetic operation applied to the data to be discovered;
a partial operation performed within an AES or DES round; or
an operation combining a logic Exclusive OR operation with the data to be discovered and a substitution operation replacing a result of the logic operation with a value selected in a substitution table using the result of the logic operation.

### Claim 25 (depends on 13)

The system according to claim 13, wherein the analyzing the combined cumulative occurrence number sets includes:
for each combined cumulative occurrence number set, computing a normalized cumulative occurrence number by dividing the combined cumulative occurrence number by a corresponding total number of occurrence numbers accumulated in the combined cumulative occurrence number set;
for each possible value of the part of the data to be discovered and each transformed value of the partial operation results, computing a sum of squared differences between each normalized cumulative occurrence number corresponding to the possible value of the part of the data to be discovered and the transformed value of the partial result, and an average value of the cumulative occurrence numbers;
for each possible value of the part of the data to be discovered, computing a cumulative total of difference sums corresponding to the transformed values of the partial operation results; and
comparing, with each other, the cumulative totals of difference sums, and detecting whether one of the cumulative totals of difference sums for a possible value of the part of the data to be discovered is greater than other cumulative totals of difference sums.

### Claim 26 (depends on 13)

The system according to claim 13, wherein the analyzing the combined cumulative occurrence number sets includes:
for each possible value of the part of the data to be discovered and each transformed value of the partial operation results, computing a cumulative total of the cumulative occurrence numbers;
for each occurrence number in the combined cumulative occurrence number sets, computing a normalized cumulative total by dividing the combined cumulative occurrence numbers by a corresponding cumulative total, and computing a product of the normalized cumulative total by a logarithm of the normalized cumulative total;
for each possible value of the part of the data to be discovered and each transformed value of the partial operation results, computing a sum of products corresponding to the possible value of the part of the data to be discovered and the transformed value of the partial operation results;
for each possible value of the part of the data to be discovered, computing a cumulative total of the product sums corresponding to the transformed values of the partial operation results, each product sum being multiplied by an average value of the cumulative total corresponding to the possible values of the part of the data to be discovered and the transformed value of the partial operation results; and
comparing, with each other, the cumulative totals of product sums, and detecting whether one of the cumulative totals of product sums for a possible value of the part of the data to be discovered is greater than other cumulative totals of product sums.
