Prime Number Generation Protection Against Side-Channel Attacks
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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).
3Reliability
If primality tests are performed using modular exponentiation calculations, then prime number security is improved, but susceptibility to side-channel attacks increases
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.
Data Source
Figure 1~2B
Figure 3~4
Figure 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.