Prime Number Generation Protection Against Side-Channel Attacks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Electronic circuits generating RSA keys in unsecured environments are vulnerable to side-channel attacks and fault injection, compromising the security of prime numbers used in RSA algorithms, which can lead to factorization of the encryption modulus and weakening of the RSA algorithm's security.

Innovation Solution

A method for protecting the generation of prime numbers by performing primality tests using modular exponentiation calculations and consistency tests, involving the use of a sieve table and witness numbers, to ensure the integrity and security of the prime numbers generated within the electronic circuit.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If prime numbers are generated by the electronic circuit in an unsecured environment, then key regeneration and adaptability are improved, but vulnerability to side-channel attacks and fault injection increases

Engineering Contradiction:
Improvekey regeneration capabilityVSAvoidvulnerability to side-channel attacks
Core Design Contradiction:
Adaptability or versatilityVSObject-affected harmful factors

Solution Approach 1:

The patent applies preliminary anti-action by pre-computing and storing values in lookup tables that will be needed during primality testing. This preparation allows the circuit to perform constant-time operations during actual prime generation, preventing side-channel attacks by ensuring that operation timing and power consumption patterns do not leak information about the prime numbers being generated.

Inventive Principle:
Principle #9Preliminary anti-action

Solution Approach 2:

The patent implements preliminary action by pre-computing modular exponentiation results and storing them in lookup tables before the actual prime generation process. This allows the circuit to retrieve pre-computed values during primality testing rather than performing real-time calculations, thereby masking the actual computational steps and protecting against fault injection and side-channel attacks.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If prime numbers are generated outside the electronic circuit in a secure environment, then security against fault injection is improved, but adaptability for key regeneration deteriorates

Engineering Contradiction:
Improvesecurity against fault injectionVSAvoidkey regeneration capability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent applies segmentation by dividing the prime generation process into distinct phases: a secure initialization phase where lookup tables are pre-computed offline, and a runtime phase where primes are generated using the pre-computed data. This segmentation allows the circuit to achieve both security (through the initial secure setup) and adaptability (through runtime key regeneration using the lookup tables).

Inventive Principle:
Principle #1Segmentation

3Reliability

If primality tests are performed using modular exponentiation calculations, then prime number security is improved, but susceptibility to side-channel attacks increases

Engineering Contradiction:
Improveprime number securityVSAvoidside-channel attack vulnerability
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent implements copying by pre-computing and storing copies of modular exponentiation results in lookup tables. During primality testing, the circuit retrieves these pre-computed copies rather than performing new exponentiation calculations. This copying approach maintains the security benefits of modular exponentiation while eliminating the side-channel vulnerabilities associated with real-time computation of these operations.

Inventive Principle:
Principle #26Copying

Data Source

PatentEP2256987B1Protection of a generation of prime numbers for the RSA algorithm
Publication Date: 2014.12.03 PROTON WORLD INT
  • EP2256987B1 patent drawingFigure 1~2B
  • EP2256987B1 patent drawingFigure 3~4
  • EP2256987B1 patent drawingFigure 5

AI summary

The invention relates to a method of protecting a generation, by an electronic circuit, of at least one prime number (p) by testing the primeness of successive candidate numbers (a), comprising: for each candidate number: the calculation (41, 46) of a witness number (w) involving at least one first random number (r2), and at least one primality test (38) based on modular exponentiation calculations; and for a candidate number having satisfied said primality test: a consistency test (44) between the candidate number and its witness number.