# US 2019/0379527 A1 · Protection of an iterative calculation

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

- Number: US 2019/0379527 A1
- Document ID: US20190379527A1
- Status: Published application
- Kind: A1
- Application number: 16/435,307
- Filed: 2019-06-07
- Published: 2019-12-12
- Earliest claimed: 2018-06-08
- Assignees: STMicroelectronics (Rousset) SAS
- Applicants: Stmicroelectronics (Rousset) SAS
- Inventors: Ibrahima DIOP; Yanis LINGE
- Web page: https://patentgrep.com/patent/US20190379527A1

## CPC

- H04L 9/003: {for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]}
- G06F 7/725: {over elliptic curves}
- G06F 21/72: in cryptographic circuits
- 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/004: {for fault attacks}
- G06F 2207/7219: Countermeasures against side channel or fault attacks
- H04L 9/302: {involving the integer factorization problem, e.g. RSA or quadratic sieve [QS] schemes}
- H04L 9/3066: {involving algebraic varieties, e.g. elliptic or hyper-elliptic curves}
- H04L 2209/12: Details relating to cryptographic hardware or logic circuitry
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G09C: CIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY

## Abstract

A calculation is performed on a first number and a second number. For each bit of the second number a first function is performed. The first function inputs include contents of a first register, contents of a second register and the first number. A result of the first function is placed in a third register. For each bit of the second number, a second function is performed which has as inputs contents of the third register and the contents of a selected one of the first and the second register according to a state of a current bit of the second number. A result of the second function is stored in the selected one of the first and second register.

## Claims

### Claim 1

A method, comprising:
performing, using an electronic device, a calculation on a first number and a second number; and
protecting the performing of the calculation, wherein the method includes:
successively for each bit of the second number:
performing a first function, the first function using a first operator and having as inputs: contents of a first register, contents of a second register and the first number, and placing a result of the first function in a third register;
performing a second function, the second function using the first operator and having as inputs:
contents of the third register; and
the contents of a selected one of the first and the second register according to a state of a current bit of the second number; and
placing a result of the second function in the selected one of the first and second register.

### Claim 2 (depends on 1)

The method of claim 1 wherein the second register contains the result of the calculation.

### Claim 3 (depends on 1)

The method of claim 1 wherein the first and second registers are initialized with a neutral element of the first operator.

### Claim 4 (depends on 1)

The method of claim 1 wherein the first and second functions are performed modulo a third number.

### Claim 5 (depends on 1)

The method of claim 1, comprising comparing contents of the third register with a result of a third function performed on the first number and number 2 raised to a power of a number of bits of the second number.

### Claim 6 (depends on 1)

The method of claim 1 wherein the calculation corresponds to a modular exponentiation of the first number by the second number.

### Claim 7 (depends on 5)

The method of claim 5 wherein the third function comprises raising to a power.

### Claim 8 (depends on 1)

The method of claim 1 wherein the first operator is a multiplication.

### Claim 9 (depends on 1)

The method of claim 1 wherein the calculation corresponds to a multiplication of a point of an elliptic curve by a scalar.

### Claim 10 (depends on 5)

The method of claim 5 wherein the third function comprises multiplication.

### Claim 11 (depends on 9)

The method of claim 9 wherein the first operator is addition.

### Claim 12

A device, comprising:
a plurality of registers; and
cryptographic circuitry, which, in operation, performs a calculation on a first number and a second number, wherein the performing the calculation includes:
successively for each bit of the second number:
performing a first function, with the first function using a first operator and having as inputs: contents of a first register, contents of a second register and the first number, and placing a result of the first function in a third register;
performing a second function, the second function using a second operator and having as inputs:
contents of the third register; and
the contents of a selected one of the first and the second register according to a state of a current bit of the second number; and
placing a result of the second function in the selected one of the first and second register.

### Claim 13 (depends on 12)

The device of claim 12 wherein the second register contains the result of the calculation.

### Claim 14 (depends on 12)

The device of claim 12 wherein the first and second registers are initialized with a neutral element of the first operator.

### Claim 15 (depends on 12)

The device of claim 12 wherein the first and second functions are performed modulo a third number.

### Claim 16 (depends on 12)

The device of claim 12 wherein the cryptographic circuitry, in operation, compares a final contents of the third register with a result of a third function performed on the first number and number 2 raised to a power of a number of bits of the second number.

### Claim 17 (depends on 12)

The device of claim 12 wherein the calculation corresponds to a modular exponentiation of the first number by the second number.

### Claim 18 (depends on 16)

The device of claim 16 wherein the third function comprises raising to a power.

### Claim 19 (depends on 12)

The device of claim 12 wherein the calculation corresponds to a multiplication of a point of an elliptic curve by a scalar.

### Claim 20 (depends on 16)

The device of claim 16 wherein the third function comprises multiplication.

### Claim 21

A non-transitory computer-readable medium having contents which configure cryptographic circuitry to perform a calculation on a first number and a second number, the performing the calculation including:
successively for each bit of the second number:
performing a first function, the first function using a first operator and having as inputs: contents of a first register, contents of a second register and the first number, and placing a result of the first function in a third register;
performing a second function, the second function using the first operator and having as inputs:
contents of the third register; and
the contents of a selected one of the first and the second register according to a state of a current bit of the second number; and
placing a result of the second function in the selected one of the first and second register.

### Claim 22 (depends on 21)

The non-transitory computer-readable medium of claim 21 wherein the contents comprise instructions which, when executed, cause the cryptographic circuitry to perform the calculation.

### Claim 23 (depends on 21)

The non-transitory computer-readable medium of claim 21 wherein the first and second functions are performed modulo a third number.
