This article describes the conditions for using the RSA public key cryptographic algorithm , simplifying cryptanalytic attacks [1] , and methods for eliminating such conditions.
Content
Introduction
For 2009, an RSA-based encryption system is considered reliable, starting with in 1024 bits.
A group of scientists from Switzerland, Japan, France, the Netherlands, Germany and the United States were able to successfully calculate data encrypted using a 768-bit RSA standard cryptographic key. [2] According to the researchers, after their work, only RSA-keys with a length of 1024 bits or more can be considered as a reliable encryption system. Moreover, encryption with a key with a length of 1024 bits should be abandoned in the next three to four years. [3]
As follows from the description of the work, the calculation of key values was carried out by the general method of numerical field sieve .
The first step (the choice of a pair of polynomials of degree 6 and 1) spent about six months computing on 80 processors, which was about 3% of the time spent on the main stage of the algorithm (sifting), which was performed on hundreds of computers for almost two years. If you interpolate this time for the operation of a single AMD Opteron 2.2 GHz processor with 2 GB of memory, you would get about 1500 years. Data processing after sifting for the next resource-intensive step (linear algebra) took several weeks on a small number of processors. The final step after finding non-trivial OSL solutions took no more than 12 hours.
The OSLU solution was carried out using the Wiedemann method on several separate clusters and lasted just under 4 months. The size of the sparse matrix was 192,796,550x192,795,550 with 27,795,115 920 non-zero elements (that is, an average of 144 non-zero elements per line). To store the matrix on the hard disk took about 105 gigabytes. At the same time, it took about 5 terabytes of compressed data to build this matrix.
As a result, the group was able to calculate the 232-digital key, which opens access to the encrypted data.
Researchers are confident that using their factorization method, a 1024-bit RSA key will be possible to crack within the next decade.
Knowing the decomposition of the module on the product of two prime numbers, the enemy can easily find the secret exponent and thereby hack rsa. However, today the fastest factorization algorithm is the General Number Field Sieve sieve of the generalized number field, whose speed for a k-bit integer is
for some ,
does not allow decomposing a large integer in a reasonable time. We will consider possible attacks on RSA, which allow hacking this system without using direct decomposition of the module n into the product of two prime numbers.
Elementary attacks
Consider several attacks associated with improper use of the RSA algorithm.
Generating prime numbers
To random primes and the following additional constraint is imposed:
- and should not be too close to each other, otherwise it will be possible to find them using the Fermat factorization method . However, if both are prime and were generated independently, then this limitation is very likely to be automatically satisfied.
Diagram with a common module n
Initial data: To avoid generating different modules for each user, the secure server uses a single n to encrypt all messages. Side uses this server to receive a message
Task: the opponent wants to decrypt the message side .
It would seem ciphertext sent to the side can not be decoded by if she does not have a secret key . However side can use your exhibitors to decompose the module and after that, knowing , calculate the secret exponent .
Protection: for each user must use its own module .
Attack on RSA signature in notary scheme
Initial data: - public key of the notary. Opponent gets a refusal when trying to sign a message by a notary
Task: the enemy wants to get the notary's signature on the message .
Opponent chooses arbitrary calculates and sends this message to the notary for signature.
If the notary signs this message:
then the opponent by calculating receives the signature of the message .
Really,
Protection: when signing, add a random number to the message (for example, time).
Small secret exponent values
Initial data: To increase the speed of decryption (or creating a digital signature), the number of non-zero bits of the binary representation of the secret exponent was reduced. (see the speed of the RSA algorithm ).
Task: calculate the secret exponent .
In 1990, Michael Wiener (Michael J. Wiener) showed that in the case of small values possible hacking of the RSA system, namely:
Wiener's theorem:
Let be
n = p q {\ displaystyle n = pq} whereq < p < 2 q {\ displaystyle q <p <2q} d < one 3 n one four {\ displaystyle d <{\ frac {1} {3}} n ^ {\ frac {1} {4}}}
Then, if known( n , e ) {\ displaystyle (n, e)} wheree d = one mod φ ( n ) {\ displaystyle ed = 1 \ mod \ varphi (n)} ,
then there is an efficient way to calculated {\ displaystyle d} .Protection: So if has a size of 1024 bits, it is necessary that was at least 256 bits long.
Small values of the open exponent
To increase the speed of encryption and verification of digital signatures , use small values of the open exponent . The smallest of them . However, in order to increase the cryptostability of the RSA algorithm, it is recommended to use
.
Attack of Hastada
Initial conditions: Party sends an encrypted message users . Each user has his own public key. , and . Side encrypts the message using each user's alternately public key and sends it to the appropriate recipient. Opponent listens to the transmission channel and collects transmitted ciphertexts.
Task: the opponent wants to restore the message .
Set then the enemy can recover if a .
Indeed, if the enemy received where
We assume that are mutually simple, otherwise the greatest common divisor other than one means that the divisor of one of . Applying the Chinese remainder theorem to get ,
Insofar as then and
Ie the adversary can recover the message calculating the cubic root of .
In general, if all open exponents are equal , the enemy can recover at .
Consider the simplest defense against this attack. Let the message for each user is some fixed permutation of the original message .For example
- - message for i-th user.
Hustad (Johan Hastad) showed that even in this case, the enemy can recover the message with enough users.
Protection: This attack is possible only with a small value of the open exponent. In this case, the cryptographic strength of the RSA system can be achieved using an arbitrary permutation, rather than a fixed one, an example of which was given above.
Franklin-Reiter Attack
Initial conditions :
There are two messages. , and
- Where some open polynomial.
Side with public key receives these messages from the side which simply encrypts messages and passes the received ciphertexts .
Task: Opponent, knowing , wants to recover .
Matthew K. Franklin and Michael K. Reiter proved the following statement:
Let be
one) ( n , e ) {\ displaystyle (n, e)} - the public key of the RSA system, ande = 3 {\ displaystyle e = 3}
2)M one ≠ M 2 ∈ Z n {\ displaystyle M_ {1} \ neq M_ {2} \ in \ mathbb {Z} _ {n}} andM one = f ( M 2 ) mod N {\ displaystyle M_ {1} = f (M_ {2}) \ mod N} ,
for some linear polynomialf = a x + b ∈ Z n [ x ] {\ displaystyle f = ax + b \ in \ mathbb {Z} _ {n} [x]} ,b ≠ 0 {\ displaystyle b \ neq 0}
Then knowing( n , e , C one , C 2 , f ) {\ displaystyle (n, e, C_ {1}, C_ {2}, f)} , the enemy can recoverM one , M 2 {\ displaystyle M_ {1}, M_ {2}} Indeed, for arbitrary :
, is the root of a polynomial
but, is also the root of a polynomial
- .
In this way divides both polynomials. And the adversary can use the Euclidean algorithm to calculate the gcd . If the result is a linear polynomial, then will be found.
When NOD is a linear polynomial, and therefore the adversary can effectively compute messages .
Protection: when RSA hacking time is proportional Therefore, this attack can be used only for small values of the open exponent.
Attack by partially known secret exponent
Initial conditions :
The adversary knows part of the binary representation of the secret exponent. .
Task: recover .
It turns out that:
- Let be - the secret key of the RSA system, where has a size bits.
- Then knowing low bits of the number , the enemy can recover in time proportional
The possibility of breaking the RSA system in the case when an open exhibitor small, is also evident from the following reasoning:
- from the definition and :
- Insofar as then obvious .
- With a given the enemy can easily calculate
- Then at
- In this way, is a good approximation when .
- Since only possible different meanings an adversary can build a row containing members for which the binary representation of one of its elements coincides with the upper half of the binary representation of the secret exponent .
Protection: increase in open exhibitors .
Quantum Computer Attack
Using a quantum computer , if it is built, it will be possible to crack RSA, since Shore’s quantum algorithm allows factorizing large numbers in a fairly short time. By decomposing the module n into prime factors (this can be done in time using O (log n ) logical Q-bits ), it will be possible to calculate the secret exponent d.
Attacks related to the implementation of the RSA system
Runtime Attack
Initial conditions:
Consider a smart card whose microprocessor signs messages using the built-in RSA secret key.
Task: the enemy wants to get a secret exhibitor .
Paul Kocher, suggested an attack based on high-precision measurements of the execution time of the smart card by the encoder . Consider this attack on the example of the RSA system, using the algorithm of rapid exponentiation :
Opponent receives smart card signatures for a large number of random messages. and measures the generation time of their signatures. .
During the attack the value of the secret exponent recovered bitwise, starting with the least significant bit:
- odd, therefore .
- if a then the smart card microprocessor needs to perform three multiplications modulo as opposed to the two needed when (see algorithm of rapid exponentiation ). We denote - CPU time for reporting .
- Kocher testified that when two ensembles and correlate. however in the case they are independent. Thus, by resorting to correlation analysis , the adversary can determine .
- similarly, you can define .
Note that in the case of a small open exponent an attack on a partially open secret exponent can be applied. In this case, it is sufficient to recover half of the bits of the secret exponent .
Protection: it is necessary to add the appropriate delay so that each step of the fast exponentiation algorithm takes a fixed period of time.
Attack on a failed RSA hardware implementation
Initial conditions:
Consider a smart card whose microprocessor signs messages using the built-in RSA secret key. The card microprocessor uses the Chinese theorem on residuals in order to speed up the signature procedure. The adversary is trying to cause a failure in the microprocessor calculations.
Task: the opponent wants to calculate the module .
The use of the Chinese remainder theorem increases the speed of creating a digital signature.
- Indeed, calculating
- where
- where
- where
- can get a signature
- where
- where
- Obviously computing much faster exponentiation modulo .
Let the actions of the enemy caused a failure, which caused the defect of one bit of the signature. Then at least one of or calculated incorrectly. We put the defect contained in .
In this case
but
Thus, the enemy can find decomposition as search result .
Protection:
- when signing, add a random number to the message (for example, time).
- check the signature before sending it.
Notes
- ↑ Yan S. Y. RSA Cryptanalysis. - M.-Izhevsk: SRC "Regular and chaotic dynamics", Izhevsk Institute of Computer Research, 2011. - 312 p.
- ↑ Announcement of factoring RSA-768 (English)
- ↑ Factoring RSA-768 (English)