SlideShare a Scribd company logo
1 of 44
Security Attacks
On RSA
A Computational Number Theoretic Approach
Shahidul Islam Jahid
202324090107
Adi Shamir,
Ron Rivest ,
Len Adleman
in 1977
Dan Boneh
Cryptography Professor,
Professor of Electrical Engineering and Senior Fellow at
the Freeman Spogli Institute for International Studies
Research Paper : Boneh, Dan. (2002). Twenty Years of
Attacks on the RSA Cryptosystem
TABLE OF CONTENTS
01
Introduction
02
Factoring Attacks
03
Elementary
Attacks
CONTENTS
๏ถ Introduction
๏ƒ˜ Introduction to RSA Cryptosystem
๏ƒ˜ Basic Idea Of Attack On RSA
๏ถ Factoring Attacks
๏ƒ˜ factoring the modulus N
๏ƒ˜ Fact & Proof
๏ƒ˜ Open Problem
๏ƒ˜ Chosen Ciphertext Attack
๏ถ Elementary Attacks
๏ƒ˜ Common Modulus Attack
๏ƒ˜ Blinding Attack
Introduction
01
The Math Behind RSA
๏ฑ p and q are two distinct large prime numbers
๐‘ต = ๐’‘๐’’ ๐’‚๐’๐’… ๐‹ (๐‘ต) = (๐’‘ โˆ’ ๐Ÿ) ๐’™ (๐’’ โˆ’ ๐Ÿ)
๏ฑ Choose a large random number ๐’… > ๐Ÿ such that
๐’ˆ๐’„๐’…(๐’…, ๐‹ (๐‘ต)) = ๐Ÿ and compute the number e, ๐Ÿ < ๐’† < ๐‹ (๐‘ต)
satisfying the congruence
๐’†๐’… โ‰ก ๐Ÿ ๐’Ž๐’๐’… ๐‹ (๐‘ต)
๏ฑ The numbers ๐‘ต, ๐’†, ๐’… are referred to as the modulus, encryption
exponent and decryption exponent respectively.
๏ฑ The public key is the pair (๐‘ต, ๐’†) and the secret trapdoor is ๐’….
Basic Idea Of Attack On RSA
๏ƒ˜ In this study, we exploring the challenge of reversing the RSA encryption function without having
the secret "trapdoor" information (represented by the variable d ). This process is commonly
known as "breaking RSA."
๏ƒ˜ Specifically, When given Triple (N,e,C) we're interested in understanding the complexity involved
in computing the eth root of C modulo N = pq, where the factorization of N is unknown.
๏ƒ˜ One way to approach this problem is by systematically checking all possible numbers in the finite
set ๐’๐‘ต until we find the original message M.
๏ƒ˜ However, this method has a significant drawback. Its running time is on the order of N, which
means it grows exponentially with the size of its input.
๏ƒ˜ For instance, if N is 1024 bits long, the running time becomes impractical, being on the order of
๐Ÿ๐Ÿ๐ŸŽ๐Ÿ๐Ÿ’
. This immense number makes the computation infeasible.
Basic Idea Of Attack On RSA
๏ƒ˜ But there could be some algorithms to factor large integers. Currently, the
General Number Field Sieve (GNFS) stands as the fastest method for
factoring large integers, ensuring the security of encryption systems.
๏ƒ˜ Our focus lies on highly efficient algorithms with runtime proportional to ๐’๐’„
,
where n = ๐’๐’๐’ˆ๐ŸN and c is a small constant (typically < 5).
๏ƒ˜ These algorithms demonstrate practical effectiveness for specific inputs.
๏ƒ˜ In our study, we explore the RSA function's inversion difficulty, making it
challenging for an attacker to recover plaintext M from random inputs. While
basic inversion is difficult, a robust cryptosystem, ensuring semantic security,
must resist subtle attacks, making it infeasible to extract any information about
M even with (N,e,C).
Think of your message as a secret locked box. Semantic security
ensures that even if someone sees this locked box, they have no
idea what's inside. It's like having a secret code that not only hides
the message but also keeps any hints about the message
completely hidden. So, even if a hacker has some clues about the
message, they can't decipher it, ensuring the information remains
safe and private. This is crucial for secure communication online.
Semantic Security
Factoring Attacks
02
Factoring Large Integers
๏ƒ˜ The first attack on an RSA public key (N, e) to consider is factoring the modulus N.
๏ƒ˜ If an attacker has the factorization of N, they can easily construct ฯ†(N) (Euler's
totient function), from which the decryption exponent d = ๐’†โˆ’๐Ÿ
mod ฯ†(N) can be
determined.
๏ƒ˜ Factoring the modulus is essentially a brute-force attack on RSA.
๏ƒ˜ Despite the continuous improvement in factoring algorithms, the current state-of-
the-art methods still do not pose a significant threat to the security of properly
implemented RSA.
๏ƒ˜ Factoring large integers remains a captivating problem in computational
mathematics.
Factoring Large Integers
๏ƒ˜ For reference, the fastest factoring algorithm currently available is the General
Number Field Sieve, which determines the running time on n-bit integers. Its
running time on n-bit integers
exp
๐Ÿ‘ ๐Ÿ”๐Ÿ’
๐Ÿ—
(๐’๐’๐’ˆ๐‘ต)
๐Ÿ
๐Ÿ‘(๐’๐’๐’ˆ๐’๐’๐’ˆ๐‘ต)
๐Ÿ
๐Ÿ‘
๏ƒ˜ for some c < 2. Attacks on RSA that take longer than this time bound are not
interesting. These include attacks such as exhaustive search for M and some older
attacks published right after the initial publication of RSA
Exhaustive search is a simple but time-consuming method used in
computer science and cryptography. In this approach, every
possible solution is tried systematically until the correct one is
found. It's like trying all the keys in a huge keychain until one fits the
lock. While exhaustive search guarantees finding the right answer
eventually, it can be very slow, especially for complex problems or
large datasets, making it impractical for many real-world situations.
Exhaustive search
Factoring Large Integers
๏ƒ˜ Our objective is to explore attacks on RSA that decrypt messages without directly
factoring the RSA modulus N.
๏ƒ˜ It's important to note that some specific sets of RSA moduli, where N = pq, can be
easily factored.
๏ƒ˜ For example, if pโˆ’1 is a product of prime factors smaller than B, then N can be
factored in less than ๐‘ฉ๐Ÿ‘
time. Some implementations actively avoid using primes p
that have pโˆ’1 as a product of small primes.
๏ƒ˜ As previously mentioned, if an efficient factoring algorithm exists, RSA is
considered insecure. However, there is a significant open question: is it necessary
to factor N to efficiently compute eth roots modulo N,
๏ƒ˜ essentially asking whether breaking RSA is as hard as factoring N?
Fact
๏ฑ Fact 1:
๏ƒ˜ Given an RSA public key (๐‘ต, ๐’†) and its corresponding private key ๐’…, the following holds:
๏ƒ˜ If you have the private key ๐’…, you can efficiently find the prime factors ( p and q ) of the
modulus ๐‘ต = ๐’‘๐’’.
๏ƒ˜ Conversely, if you know the prime factors ( p and q ) of ๐‘ต, you can efficiently compute the
private key ๐’….
We will show that exposing the private key d and factoring ๐‘ต are equivalent. Hence there is no
point in hiding the factorization of ๐‘ต from any party who knows ๐’…
Proof with Explanation
๏ฑFact :Let (๐‘, ๐‘’) be an RSA public key. Given the private key ๐‘‘, one can efficiently factor the modulus
๐‘ = ๐‘๐‘ž. Conversely, given the factorization of ๐‘ , one can efficiently recover ๐‘‘.
๏ฑ Starting Point:
๏ƒ˜ Given RSA secret key ๐’…, aim to find prime numbers ๐’‘ ๐’‚๐’๐’… ๐’’ that compose ๐‘ต.
๏ฑ Calculating k:
๏ƒ˜ Why? k aids crucial calculations.
๏ƒ˜ Explanation: Use ๐’… and public exponent ๐’† to compute ๐’Œ = ๐’…๐’† โˆ’ ๐Ÿ, revealing patterns in modular arithmetic.
๏ฑ Chinese Remainder Theorem (CRT):
๏ƒ˜ Why? CRT unveils key numbers related to ๐‘ต.
๏ƒ˜ Explanation: CRT yields ๐’™๐Ÿ, ๐’™๐Ÿ, ๐’™๐Ÿโ€ฒ, ๐’™๐Ÿโ€ฒ, crucial in identifying ๐’‘ and ๐’’ through diverse cases.
๏ฑ Finding x1 and x2:
๏ƒ˜ Why? Right pair (๐’™๐Ÿ, ๐’™๐Ÿ) discloses ๐’‘ and ๐’’.
๏ƒ˜ Explanation: Correct ๐’™๐Ÿ, ๐’™๐Ÿ help compute ๐’‘ and ๐’’ from ๐‘ต properties.
Proof with Explanation
๏ฑFact :Let (๐‘, ๐‘’) be an RSA public key. Given the private key ๐‘‘, one can efficiently factor the modulus
๐‘ = ๐‘๐‘ž. Conversely, given the factorization of ๐‘ , one can efficiently recover ๐‘‘.
๏ฑ GCD Reveals p and q:
๏ƒ˜ Why? ๐‘ฎ๐‘ช๐‘ซ identifies common factors, crucial for ๐’‘ ๐’‚๐’๐’… ๐’’.
๏ƒ˜ Explanation: Compute gcd(๐’™ โˆ’ ๐Ÿ, ๐‘ต) for candidates; result reveals prime factors.
๏ฑ Probability and Efficiency:
๏ƒ˜ Why? Random number selection ensures comprehensive exploration.
๏ƒ˜ Explanation: Iterative steps with different random numbers (๐’ˆ) ensure unbiased, efficient exploration.
๏ฑ Conclusion:
๏ƒ˜ Result: Systematic approach efficiently finds ๐’‘ ๐’‚๐’๐’… ๐’’.
๏ƒ˜ Security Assurance: RSA security upheld due to complex, non-reversible nature of these calculations.
๏ƒ˜ Summary: Intricate math, strategic number choice, and specific computations ensure efficient
discovery of ๐’‘ ๐’‚๐’๐’… ๐’’ in RSA encryption, preserving its security.
Proof with Example
Let ๐‘ต = ๐Ÿ๐Ÿ–๐Ÿ• ๐’‚๐’๐’… = ๐Ÿ๐Ÿ‘๐’… = ๐Ÿ๐Ÿ‘.
1. Calculating ๐’Œ: ๐’Œ = ๐’…๐’† โˆ’ ๐Ÿ = ๐Ÿ๐Ÿ‘ ร— ๐Ÿ๐Ÿ–๐Ÿ• โˆ’ ๐Ÿ = ๐Ÿ“๐Ÿ๐Ÿ—๐Ÿ—
2. Using Chinese Remainder Theorem (CRT):
The CRT gives us four numbers: โˆ’๐Ÿ, โˆ’๐’™๐Ÿโ€‹
, โˆ’๐’™๐Ÿโ€‹
, ๐’™๐Ÿโ€‹
๐’™๐Ÿโ€‹
.
3. Finding the Right ๐’™๐Ÿโ€‹๐’‚๐’๐’… ๐’™๐Ÿโ€‹:
Let's explore different combinations of ๐’™๐Ÿโ€‹๐’‚๐’๐’… ๐’™๐Ÿโ€‹to find the pair that helps us discover ๐’‘ ๐’‚๐’๐’… ๐’’.
๏ƒ˜ Combination 1: ๐’™๐Ÿโ€‹= ๐Ÿ, ๐’™๐Ÿโ€‹= ๐Ÿ‘
๐’ˆ๐’„๐’… ๐Ÿ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ, ๐’ˆ๐’„๐’…( ๐Ÿ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ
This combination doesn't reveal ๐’‘ ๐’‚๐’๐’… ๐’’.
๏ƒ˜ Combination 2: ๐’™๐Ÿโ€‹= ๐Ÿ“, ๐’™๐Ÿโ€‹= ๐Ÿ•
๐’ˆ๐’„๐’… ๐Ÿ’, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ, ๐’ˆ๐’„๐’…(๐Ÿ”, ๐Ÿ๐Ÿ–๐Ÿ•) = ๐Ÿ,
This combination also doesn't reveal ๐’‘ ๐’‚๐’๐’… ๐’’.
๏ƒ˜ Combination 3: ๐’™๐Ÿโ€‹= ๐Ÿ๐ŸŽ, ๐’™๐Ÿโ€‹= ๐Ÿ๐Ÿ‘
๐’ˆ๐’„ ๐’… ๐Ÿ—, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ, ๐’ˆ๐’„๐’…( ๐Ÿ๐Ÿ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ
Still, no luck in finding ๐’‘ ๐’‚๐’๐’… ๐’’.
Proof with Example
4. Trying Different Random Numbers g:
๏ƒ˜ Random Number 1: ๐’ˆ = ๐Ÿ‘ , ๐’ˆ๐’„๐’… ๐Ÿ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ This doesn't help in finding ๐’‘ ๐’‚๐’๐’… ๐’’.
๏ƒ˜ Random Number 2:๐’ˆ = ๐Ÿ“, ๐’ˆ๐’„๐’… ๐Ÿ’, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ Still no success.
๏ƒ˜ Random Number 3:๐’ˆ = ๐Ÿ•, ๐’ˆ๐’„๐’…(๐Ÿ”, ๐Ÿ๐Ÿ–๐Ÿ•) = ๐Ÿ We are still searching for the right combination
๏ƒ˜ Random Number 4: ๐’ˆ = ๐Ÿ๐Ÿ , ๐’ˆ๐’„๐’… ๐Ÿ๐ŸŽ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ The search continues.
๏ƒ˜ Random Number 5:๐’ˆ = ๐Ÿ๐Ÿ‘, ๐’ˆ๐’„๐’… ๐Ÿ๐Ÿ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ We are still exploring possibilities.
๏ƒ˜ Random Number 6:๐’ˆ = ๐Ÿ๐Ÿ•, ๐’ˆ๐’„๐’…(๐Ÿ๐Ÿ”, ๐Ÿ๐Ÿ–๐Ÿ•) = ๐Ÿ This doesn't help in finding ๐’‘ ๐’‚๐’๐’… ๐’’
๏ƒ˜ Random Number 7: ๐’ˆ = ๐Ÿ๐Ÿ—, ๐’ˆ๐’„๐’… ๐Ÿ๐Ÿ–, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ๐Ÿ
Finally, we found a pair that reveals a common factor (๐Ÿ๐Ÿ) with ๐‘ต = ๐Ÿ๐Ÿ–๐Ÿ•
๏ƒ˜ So, after trying several combinations and random numbers, we found that when ๐’ˆ = ๐Ÿ๐Ÿ—, the GCD operation
revealed a common factor ๐Ÿ๐Ÿ. This means that ๐Ÿ๐Ÿ is one of the prime factors of ๐‘ต.
๏ƒ˜ To find the other prime factor, divide ๐‘ต by 11: ๐ช =
๐‘ต
๐‘ท
=
๐Ÿ๐Ÿ–๐Ÿ•
๐Ÿ๐Ÿ
= ๐Ÿ๐Ÿ•
๏ƒ˜ Therefore, the prime factors of ๐‘ต = ๐Ÿ๐Ÿ–๐Ÿ• are ๐’‘ = ๐Ÿ๐Ÿ and ๐’’ = ๐Ÿ๐Ÿ•.
Open Problem
๏ฑ Problem Description:
Given two integers ๐‘ต and ๐’† satisfying ๐’ˆ๐’„๐’…(๐’†, ๐‹(๐‘ต)) = ๐Ÿ, where ๐‹(๐‘ต) is Euler's totient
function, define a function ๐’‡๐’†,๐‘ต as follows: ๐’‡๐’†,๐‘ต ๐’™ = ๐’™
๐Ÿ
๐’† ๐’Ž๐’๐’… ๐‘ต. The question is whether there
exists a polynomial-time algorithm A that can factorize the number ๐‘ต given ๐‘ต and access to
an "oracle" ๐’‡๐’†,๐‘ต ๐’™ for some ๐’†.
๏ฑ Problem Inquiry:
๏ƒ˜ The question asks whether, given the capability to efficiently compute ๐’‡๐’†,๐‘ต ๐’™ for some
specific ๐’†, is there exists an algorithm A that can efficiently find the prime factors of ?
๏ƒ˜ In simpler terms, if you can quickly calculate the ๐’†๐’•๐’‰ ๐’“๐’๐’๐’•๐’” ๐’Ž๐’๐’…๐’–๐’๐’ ๐‘ต, can you also
quickly find the prime factors of ๐‘ต?
Open Problem
๏ฑ Research and Implications :
๏ƒ˜ Boneh and Venkatesan conducted research indicating that for small values of ๐’†,
finding a solution might be challenging means answer to the problem may be No .
๏ƒ˜ In other words, for small e there may not exist a polynomial-time reduction from
factoring to breaking RSA
๏ƒ˜ A positive solution for small ๐’† could lead to an efficient factoring algorithm,
potentially compromising RSA encryption.
๏ƒ˜ A positive solution would also enable a โ€œChosen Ciphertext Attack" a severe
vulnerability in RSA encryption.
๏ƒ˜ Therefore, a negative answer may be welcome .
Chosen Ciphertext Attack
๏ฑ Normal Operation:
๏ƒ˜ Alice sends a message to Bob.
๏ƒ˜ The message is encrypted using a strong encryption algorithm and sent to Bob.
๏ƒ˜ Bob receives the encrypted message and decrypts it using the corresponding decryption key.
๏ฑ Chosen Ciphertext Attack Scenario:
๏ƒ˜ An attacker, Eve, intercepts the ciphertext sent from Alice to Bob.
๏ƒ˜ Eve wants to learn the content of Alice's message.
In a chosen ciphertext attack, Eve has the ability to interact with the decryption process. There are two
main types of chosen ciphertext attacks:
๏ƒ˜ CCA1 (Adaptive Chosen Ciphertext Attack)
๏ƒ˜ CCA2 (Non-Adaptive Chosen Ciphertext Attack)
CCA1 (Adaptive Chosen Ciphertext Attack)
๏ƒ˜ Bob sends a message to Alice
๏ƒ˜ An attacker, Eve, intercepts the ciphertext sent from Bob to
Alice
๏ƒ˜ Eve sends the intercepted ciphertext to Bob, pretending to be
Alice.
๏ƒ˜ Bob, believing this is a message from Alice, decrypts it and
sends the plaintext back to Eve.
๏ƒ˜ Based on the decrypted content, Eve may craft another
ciphertext that exploits vulnerabilities in the decryption
process or the encryption scheme itself.
๏ƒ˜ She can repeat this process, adapting her queries and
ciphertexts based on the information she gains from previous
responses.
CCA1 (Adaptive Chosen Ciphertext Attack)
๏ฑ First Eve listens for a cipher that she want to crack:
๐‘ช = ๐‘ด๐’†
( ๐’Ž๐’๐’…๐‘ต )
๏ฑ Next she takes this cipher and gets Bob to decrypt it (and
also multiplying by a random value to the power of Bob's e
value):
๐‘ชโ€ฒ
= ๐‘ช ร— ๐’“๐’†
( ๐’Ž๐’๐’…๐‘ต )
๏ฑ If Eve can determine the decrypted value for this cipher, she
can determine the message as:
(๐‘ชโ€ฒ
)๐’…
= (๐‘ช ร— ๐’“๐’†
)๐’…
= (๐‘ด๐’†
ร— ๐’“๐’†
)๐’…
= ๐‘ด๐’†ร—๐’…
ร— ๐’“๐’†ร—๐’…
=M ร— ๐ซ
as (๐‘ด๐’†
)๐’…
( ๐’Ž๐’๐’…๐‘ต ) must equal ๐‘ด๐Ÿ
( ๐’Ž๐’๐’…๐‘ต ) )
So Eve just takes the original cipher, and divides it by the random
value ( ๐’“)
CCA2 (Non-Adaptive Chosen Ciphertext Attack)
๏ƒ˜ Eve collects several ciphertexts, including the one she
intercepted earlier, without decrypting them.
๏ƒ˜ She sends all these ciphertexts to Bob at once, pretending to be
Alice.
๏ƒ˜ Bob decrypts all the ciphertexts and sends back the
corresponding plaintexts.
๏ƒ˜ Eve can analyze the decrypted plaintexts collectively to look for
patterns, vulnerabilities, or weaknesses in the encryption scheme.
1. Threat Overview:
Chosen Ciphertext Attacks (CCA) can compromise RSA encryption without proper padding schemes.
1. Secure Padding Solutions:
๏ƒ˜ Randomization with OAEP: Padding methods like OAEP add randomness, making it hard to predict
encrypted messages.
๏ƒ˜ Mathematical Complexity: RSA's math tricks and big numbers make it super tricky to decrypt without the
right key.
๏ƒ˜ Multiplicative Property: Multiplying RSA numbers is so complicated that bad guys can't figure out the
original messages easily.
Using techniques like OAEP fortifies RSA encryption, rendering it highly resilient against chosen ciphertext
attacks.
Chosen Ciphertext Attack
Elementary Attacks
03
Common modulus attack happens when two different
messages are encrypted using the same RSA modulus. By
analyzing the encrypted messages, an attacker can
calculate the original messages without the private key. To
prevent this, it's important to use different moduli for
different encryption keys.
Common Modulus attack
Common Modulus attack
๐‘1 = ๐‘š๐’†๐Ÿ
๐‘2 = ๐‘š๐’†๐Ÿ
๐’†๐Ÿ
๐’†๐Ÿ
M
Consider a scenario where a person encrypts same plain text, 2 different times, which he sends to 2 different people.
Suppose you eavesdropped on the communication and got both the cipher texts (c1, c2) and the exponents(e1, e2) he
used. You already know his Modulus N which is public.
So is there a way you can decipher this ?
Well the answer is yes.
Common Modulus attack
๐‘1 = ๐‘š๐’†๐Ÿ
๐‘2 = ๐‘š๐’†๐Ÿ
๐’†๐Ÿ
๐’†๐Ÿ
M
In order to decrypt it, we use an algorithm called extended euclidean which makes our
tasks much easier. But another condition we need to decrypt this is that the
GCD (e1, e2) = 1
๐’‚๐Ÿ ๐’†๐Ÿ + ๐’‚๐Ÿ ๐’†๐Ÿ = 1
๏ฑ Decryption Equation :
M = ( (๐‘ด๐’†๐Ÿ)๐’‚๐Ÿ ร— (๐‘ด๐’†๐Ÿ)๐’‚๐Ÿ) mod N
= ( ๐‘ด๐’†๐Ÿ๐’‚๐Ÿ ร— ๐‘ด๐’†๐Ÿ๐’‚๐Ÿ) mod N
= ( ๐‘ด๐’†๐Ÿ๐’‚๐Ÿ+๐’†๐Ÿ๐’‚๐Ÿ) mod N
= ( ๐‘ด๐Ÿ
) mod N [ ๐’‚๐Ÿ ๐’†๐Ÿ + ๐’‚๐Ÿ ๐’†๐Ÿ = 1 ]
= M
Common Modulus attack
Common Modulus attack EXAMPLE
๏ฑ Scenario:
๏ƒ˜ Modulus (N): 143
๏ƒ˜ Public Exponents: e1 = 7, e2 = 17
๏ƒ˜ Cipher Texts: c1 = 42, c2 = 9 [ Plain_Text = 3 ]
Common Modulus attack EXAMPLE
Q ๐’“๐Ÿ ๐’“๐Ÿ r ๐’•๐Ÿ ๐’•๐Ÿ t
t= ๐’•๐Ÿ โˆ’q๐’•๐Ÿ
2 17 7 3 0 1 -2
2 7 3 1 1 -2 5
3 3 1 0 -2 5 -17
1 0 5 -17
๏ฑ Letโ€™s find GCD of 7,17 by Extended Euclidean method to get ๐’‚๐Ÿ , ๐’‚๐Ÿ
๏ฑ We Found ๐’‚๐Ÿ , ๐’‚๐Ÿ . Here ๐’‚๐Ÿ = 5 And ๐’‚๐Ÿ = -2
Common Modulus attack EXAMPLE
๏ฑ Decryption Calculation:
M= (๐’„๐Ÿ
๐’‚๐Ÿ ร— ๐’„๐Ÿ
๐’‚๐Ÿ) Mod N
= ๐Ÿ’๐Ÿ๐Ÿ“
ร— (๐Ÿ—)โˆ’๐Ÿ
Mod N
= ๐Ÿ’๐Ÿ๐Ÿ“
ร— (๐Ÿ—โˆ’๐Ÿ
)
๐Ÿ
Mod N
= ๐Ÿ’๐Ÿ๐Ÿ“ ร— ๐Ÿ๐Ÿ” Mod N
= 3 Plain_text
๏ฑ Each user should have a unique modulus (N). Sharing the same N
among multiple users allows potential attackers to exploit the shared
structure, undermining the security of the RSA encryption system.
๏ฑ This observation emphasizes the importance of using a unique
modulus for each user in RSA encryption to maintain the security and
privacy of the communication system.
Common Modulus attack
A blinding attack in RSA encryption manipulates ciphertext
using a blinding factor, deceiving the recipient into
decrypting a modified message. This allows attackers to
gather sensitive information or perform unauthorized actions.
Blinding attack
Blinding attack
๏ฑ Eve has the message (M - "Pay Eve $1 million")
and creates another message:
๐‘ดโ€ฒ
= ๐’“๐’†
M mod N
๏ฑ where e is Bob's encryption key exponent and r is a
random number. Eve gets Bob to sign for this. The
signature is then:
๐‘บโ€ฒ
= (๐‘ดโ€ฒ
)๐’…
mod N
๏ฑ Bob gives S' to Eve, and she just divides by r to get the
signature for the original message:
๐‘บโ€ฒ
๐’“
=
(M ร— ๐’“๐’†)๐’…
๐’“
=
(๐‘ด๐’… ร— ๐’“๐’†๐’…)
๐’“
=
(๐‘ด๐’… ร— ๐’“๐Ÿ)
๐’“
= ๐‘ด๐’…
mod (N)
Blinding attack
๏ฑ Eve takes Bob signature and adds it to the original
message that Bob wouldn't sign, and she can prove that
Bob signed it. If she is sending to Alice the Banker, she
would take the message:
"๐‘ท๐’‚๐’š ๐‘ฌ๐’—๐’† $๐Ÿ ๐’Ž๐’Š๐’๐’๐’Š๐’๐’"
๏ฑ and add Bob signature for the message
๐‘บโ€ฒ
๐’“
= ๐‘ด๐’…
mod (N),
and then encrypt everything with Alice the Banker's public
key. Alice will get the encrypted message and decrypts with
her private key, and reads the message:
"๐‘ท๐’‚๐’š ๐‘ฌ๐’—๐’† $๐Ÿ ๐’Ž๐’Š๐’๐’๐’Š๐’๐’"
๏ฑ and she then looks at the signature, and gets Bob's public
key and checks the signature. It will match, so she will pays
Eve one million dollars from Bob's account.
Blinding attack EXAMPLE
๏ฑ RSA Parameters:
๏ƒ˜ Public Key (e, N): e = 79, N = 3337
๏ƒ˜ Private Key (d): d = 1019
๏ƒ˜ Message to be Signed: "Pay Eve $1 million"
๏ƒ˜ Blinding Factor: r = 21
# Import necessary libraries
import sys
import os
import hashlib
import libnum
# Initialize RSA parameters and
message
e = 79
d = 1019
N = 3337
r = 21
Message = 'Pay Eve $1 million'
# Print initial values for
reference
print('== Initial values ==')
print('e =', e, 'd =', d, 'N =', N)
print('Message =', Message, 'r =', r)
print('n=============โ€˜)
# Generate a random MD5 hash
and reduce it modulo N
array = os.urandom(1 << 20)
md5 = hashlib.md5()
md5.update(array)
digest = md5.hexdigest()
M = int(digest, 16) % N
# Print the MD5 hash (mod N)
print('MD5 hash (mod N):', M)
# Bob signs the message using
his private key d
signed = pow(M, d, N)
print('Bob signs the message:', signed)
# Eve blinds the signed message
and sends it to Alice
val_sent_by_eve = (M * pow(r, e, N)) %
N
signed_dash = pow(val_sent_by_eve,
d, N)
print('Eve sends blinded signature to
Alice:', signed_dash)
# Alice receives the blinded
signature and unblinds it
result = (signed_dash *
libnum.invmod(r, N)) % N
print('Alice receives unblinded
signature:', result)
print('n=== Check ==')
# Alice verifies the signature
using Bob's public key e
unsigned = pow(result, e, N)
print('Unsigned value is:', unsigned)
# If the unsigned value matches
the original message M, the
signature is valid
if unsigned == M:
print('Success. The signature is
valid.')
else:
print('Signatures do not compute')
Blinding attack EXAMPLE
๏ƒผ Signatures schemes often employ a "one-way hash" function to
secure the message (M) before signing, ensuring message integrity
and authenticity.
๏ƒผ This approach mitigates the risk of message manipulation, making it
computationally challenging for attackers to tamper with the signed
content during transmission.
๏ƒผ Although blinding was presented as an attack, it is, in fact, a
fundamental property of RSA Properly implemented, it is not a
security threat.
Blinding attack
THANKS!
Security_Attacks_On_RSA~ A Computational Number Theoretic Approach.pptx

More Related Content

Similar to Security_Attacks_On_RSA~ A Computational Number Theoretic Approach.pptx

Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...CSCJournals
ย 
I1803014852
I1803014852I1803014852
I1803014852IOSR Journals
ย 
CRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfCRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfBhuvanaR13
ย 
An Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent eAn Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent eDharmalingam Ganesan
ย 
Research on RSA
Research on RSAResearch on RSA
Research on RSAfaizmajeed
ย 
RSA Algorithem and information about rsa
RSA Algorithem and information about rsaRSA Algorithem and information about rsa
RSA Algorithem and information about rsaMohsin Ali
ย 
RSA Algorithm report
RSA Algorithm reportRSA Algorithm report
RSA Algorithm reportMohamed Ramadan
ย 
Cyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionCyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionDharmalingam Ganesan
ย 
Security of RSA and Integer Factorization
Security of RSA and Integer FactorizationSecurity of RSA and Integer Factorization
Security of RSA and Integer FactorizationDharmalingam Ganesan
ย 

Similar to Security_Attacks_On_RSA~ A Computational Number Theoretic Approach.pptx (20)

Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
Implementation of RSA Algorithm with Chinese Remainder Theorem for Modulus N ...
ย 
rsa-1
rsa-1rsa-1
rsa-1
ย 
rsa-1
rsa-1rsa-1
rsa-1
ย 
rsa-1
rsa-1rsa-1
rsa-1
ย 
I1803014852
I1803014852I1803014852
I1803014852
ย 
CRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfCRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdf
ย 
An Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent eAn Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent e
ย 
Research on RSA
Research on RSAResearch on RSA
Research on RSA
ย 
Factorization Hack of RSA Secret Numbers
Factorization Hack of RSA Secret NumbersFactorization Hack of RSA Secret Numbers
Factorization Hack of RSA Secret Numbers
ย 
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
ย 
PETERSON BERGE
PETERSON BERGEPETERSON BERGE
PETERSON BERGE
ย 
DDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDD
ย 
Data security using rsa
Data security using rsaData security using rsa
Data security using rsa
ย 
RSA Algorithem and information about rsa
RSA Algorithem and information about rsaRSA Algorithem and information about rsa
RSA Algorithem and information about rsa
ย 
Ch09
Ch09Ch09
Ch09
ย 
RSA Algorithm report
RSA Algorithm reportRSA Algorithm report
RSA Algorithm report
ย 
RSA cracking puzzle
RSA cracking puzzleRSA cracking puzzle
RSA cracking puzzle
ย 
Rsa
RsaRsa
Rsa
ย 
Cyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionCyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor Function
ย 
Security of RSA and Integer Factorization
Security of RSA and Integer FactorizationSecurity of RSA and Integer Factorization
Security of RSA and Integer Factorization
ย 

Recently uploaded

(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
ย 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
ย 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
ย 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
ย 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
ย 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
ย 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxnull - The Open Security Community
ย 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
ย 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
ย 
Model Call Girl in Narela Delhi reach out to us at ๐Ÿ”8264348440๐Ÿ”
Model Call Girl in Narela Delhi reach out to us at ๐Ÿ”8264348440๐Ÿ”Model Call Girl in Narela Delhi reach out to us at ๐Ÿ”8264348440๐Ÿ”
Model Call Girl in Narela Delhi reach out to us at ๐Ÿ”8264348440๐Ÿ”soniya singh
ย 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
ย 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
ย 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
ย 
Study on Air-Water & Water-Water Heat Exchange in a Finned ๏ปฟTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ๏ปฟTube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned ๏ปฟTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ๏ปฟTube ExchangerAnamika Sarkar
ย 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
ย 
Gurgaon โœก๏ธ9711147426โœจCall In girls Gurgaon Sector 51 escort service
Gurgaon โœก๏ธ9711147426โœจCall In girls Gurgaon Sector 51 escort serviceGurgaon โœก๏ธ9711147426โœจCall In girls Gurgaon Sector 51 escort service
Gurgaon โœก๏ธ9711147426โœจCall In girls Gurgaon Sector 51 escort servicejennyeacort
ย 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
ย 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
ย 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
ย 

Recently uploaded (20)

(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
ย 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
ย 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
ย 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
ย 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
ย 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
ย 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
ย 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
ย 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
ย 
Model Call Girl in Narela Delhi reach out to us at ๐Ÿ”8264348440๐Ÿ”
Model Call Girl in Narela Delhi reach out to us at ๐Ÿ”8264348440๐Ÿ”Model Call Girl in Narela Delhi reach out to us at ๐Ÿ”8264348440๐Ÿ”
Model Call Girl in Narela Delhi reach out to us at ๐Ÿ”8264348440๐Ÿ”
ย 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
ย 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
ย 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
ย 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
ย 
Study on Air-Water & Water-Water Heat Exchange in a Finned ๏ปฟTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ๏ปฟTube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned ๏ปฟTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ๏ปฟTube Exchanger
ย 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
ย 
Gurgaon โœก๏ธ9711147426โœจCall In girls Gurgaon Sector 51 escort service
Gurgaon โœก๏ธ9711147426โœจCall In girls Gurgaon Sector 51 escort serviceGurgaon โœก๏ธ9711147426โœจCall In girls Gurgaon Sector 51 escort service
Gurgaon โœก๏ธ9711147426โœจCall In girls Gurgaon Sector 51 escort service
ย 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
ย 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
ย 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
ย 

Security_Attacks_On_RSA~ A Computational Number Theoretic Approach.pptx

  • 1. Security Attacks On RSA A Computational Number Theoretic Approach Shahidul Islam Jahid 202324090107
  • 2. Adi Shamir, Ron Rivest , Len Adleman in 1977
  • 3. Dan Boneh Cryptography Professor, Professor of Electrical Engineering and Senior Fellow at the Freeman Spogli Institute for International Studies Research Paper : Boneh, Dan. (2002). Twenty Years of Attacks on the RSA Cryptosystem
  • 4. TABLE OF CONTENTS 01 Introduction 02 Factoring Attacks 03 Elementary Attacks
  • 5. CONTENTS ๏ถ Introduction ๏ƒ˜ Introduction to RSA Cryptosystem ๏ƒ˜ Basic Idea Of Attack On RSA ๏ถ Factoring Attacks ๏ƒ˜ factoring the modulus N ๏ƒ˜ Fact & Proof ๏ƒ˜ Open Problem ๏ƒ˜ Chosen Ciphertext Attack ๏ถ Elementary Attacks ๏ƒ˜ Common Modulus Attack ๏ƒ˜ Blinding Attack
  • 7. The Math Behind RSA ๏ฑ p and q are two distinct large prime numbers ๐‘ต = ๐’‘๐’’ ๐’‚๐’๐’… ๐‹ (๐‘ต) = (๐’‘ โˆ’ ๐Ÿ) ๐’™ (๐’’ โˆ’ ๐Ÿ) ๏ฑ Choose a large random number ๐’… > ๐Ÿ such that ๐’ˆ๐’„๐’…(๐’…, ๐‹ (๐‘ต)) = ๐Ÿ and compute the number e, ๐Ÿ < ๐’† < ๐‹ (๐‘ต) satisfying the congruence ๐’†๐’… โ‰ก ๐Ÿ ๐’Ž๐’๐’… ๐‹ (๐‘ต) ๏ฑ The numbers ๐‘ต, ๐’†, ๐’… are referred to as the modulus, encryption exponent and decryption exponent respectively. ๏ฑ The public key is the pair (๐‘ต, ๐’†) and the secret trapdoor is ๐’….
  • 8. Basic Idea Of Attack On RSA ๏ƒ˜ In this study, we exploring the challenge of reversing the RSA encryption function without having the secret "trapdoor" information (represented by the variable d ). This process is commonly known as "breaking RSA." ๏ƒ˜ Specifically, When given Triple (N,e,C) we're interested in understanding the complexity involved in computing the eth root of C modulo N = pq, where the factorization of N is unknown. ๏ƒ˜ One way to approach this problem is by systematically checking all possible numbers in the finite set ๐’๐‘ต until we find the original message M. ๏ƒ˜ However, this method has a significant drawback. Its running time is on the order of N, which means it grows exponentially with the size of its input. ๏ƒ˜ For instance, if N is 1024 bits long, the running time becomes impractical, being on the order of ๐Ÿ๐Ÿ๐ŸŽ๐Ÿ๐Ÿ’ . This immense number makes the computation infeasible.
  • 9. Basic Idea Of Attack On RSA ๏ƒ˜ But there could be some algorithms to factor large integers. Currently, the General Number Field Sieve (GNFS) stands as the fastest method for factoring large integers, ensuring the security of encryption systems. ๏ƒ˜ Our focus lies on highly efficient algorithms with runtime proportional to ๐’๐’„ , where n = ๐’๐’๐’ˆ๐ŸN and c is a small constant (typically < 5). ๏ƒ˜ These algorithms demonstrate practical effectiveness for specific inputs. ๏ƒ˜ In our study, we explore the RSA function's inversion difficulty, making it challenging for an attacker to recover plaintext M from random inputs. While basic inversion is difficult, a robust cryptosystem, ensuring semantic security, must resist subtle attacks, making it infeasible to extract any information about M even with (N,e,C).
  • 10. Think of your message as a secret locked box. Semantic security ensures that even if someone sees this locked box, they have no idea what's inside. It's like having a secret code that not only hides the message but also keeps any hints about the message completely hidden. So, even if a hacker has some clues about the message, they can't decipher it, ensuring the information remains safe and private. This is crucial for secure communication online. Semantic Security
  • 12. Factoring Large Integers ๏ƒ˜ The first attack on an RSA public key (N, e) to consider is factoring the modulus N. ๏ƒ˜ If an attacker has the factorization of N, they can easily construct ฯ†(N) (Euler's totient function), from which the decryption exponent d = ๐’†โˆ’๐Ÿ mod ฯ†(N) can be determined. ๏ƒ˜ Factoring the modulus is essentially a brute-force attack on RSA. ๏ƒ˜ Despite the continuous improvement in factoring algorithms, the current state-of- the-art methods still do not pose a significant threat to the security of properly implemented RSA. ๏ƒ˜ Factoring large integers remains a captivating problem in computational mathematics.
  • 13. Factoring Large Integers ๏ƒ˜ For reference, the fastest factoring algorithm currently available is the General Number Field Sieve, which determines the running time on n-bit integers. Its running time on n-bit integers exp ๐Ÿ‘ ๐Ÿ”๐Ÿ’ ๐Ÿ— (๐’๐’๐’ˆ๐‘ต) ๐Ÿ ๐Ÿ‘(๐’๐’๐’ˆ๐’๐’๐’ˆ๐‘ต) ๐Ÿ ๐Ÿ‘ ๏ƒ˜ for some c < 2. Attacks on RSA that take longer than this time bound are not interesting. These include attacks such as exhaustive search for M and some older attacks published right after the initial publication of RSA
  • 14. Exhaustive search is a simple but time-consuming method used in computer science and cryptography. In this approach, every possible solution is tried systematically until the correct one is found. It's like trying all the keys in a huge keychain until one fits the lock. While exhaustive search guarantees finding the right answer eventually, it can be very slow, especially for complex problems or large datasets, making it impractical for many real-world situations. Exhaustive search
  • 15. Factoring Large Integers ๏ƒ˜ Our objective is to explore attacks on RSA that decrypt messages without directly factoring the RSA modulus N. ๏ƒ˜ It's important to note that some specific sets of RSA moduli, where N = pq, can be easily factored. ๏ƒ˜ For example, if pโˆ’1 is a product of prime factors smaller than B, then N can be factored in less than ๐‘ฉ๐Ÿ‘ time. Some implementations actively avoid using primes p that have pโˆ’1 as a product of small primes. ๏ƒ˜ As previously mentioned, if an efficient factoring algorithm exists, RSA is considered insecure. However, there is a significant open question: is it necessary to factor N to efficiently compute eth roots modulo N, ๏ƒ˜ essentially asking whether breaking RSA is as hard as factoring N?
  • 16. Fact ๏ฑ Fact 1: ๏ƒ˜ Given an RSA public key (๐‘ต, ๐’†) and its corresponding private key ๐’…, the following holds: ๏ƒ˜ If you have the private key ๐’…, you can efficiently find the prime factors ( p and q ) of the modulus ๐‘ต = ๐’‘๐’’. ๏ƒ˜ Conversely, if you know the prime factors ( p and q ) of ๐‘ต, you can efficiently compute the private key ๐’…. We will show that exposing the private key d and factoring ๐‘ต are equivalent. Hence there is no point in hiding the factorization of ๐‘ต from any party who knows ๐’…
  • 17. Proof with Explanation ๏ฑFact :Let (๐‘, ๐‘’) be an RSA public key. Given the private key ๐‘‘, one can efficiently factor the modulus ๐‘ = ๐‘๐‘ž. Conversely, given the factorization of ๐‘ , one can efficiently recover ๐‘‘. ๏ฑ Starting Point: ๏ƒ˜ Given RSA secret key ๐’…, aim to find prime numbers ๐’‘ ๐’‚๐’๐’… ๐’’ that compose ๐‘ต. ๏ฑ Calculating k: ๏ƒ˜ Why? k aids crucial calculations. ๏ƒ˜ Explanation: Use ๐’… and public exponent ๐’† to compute ๐’Œ = ๐’…๐’† โˆ’ ๐Ÿ, revealing patterns in modular arithmetic. ๏ฑ Chinese Remainder Theorem (CRT): ๏ƒ˜ Why? CRT unveils key numbers related to ๐‘ต. ๏ƒ˜ Explanation: CRT yields ๐’™๐Ÿ, ๐’™๐Ÿ, ๐’™๐Ÿโ€ฒ, ๐’™๐Ÿโ€ฒ, crucial in identifying ๐’‘ and ๐’’ through diverse cases. ๏ฑ Finding x1 and x2: ๏ƒ˜ Why? Right pair (๐’™๐Ÿ, ๐’™๐Ÿ) discloses ๐’‘ and ๐’’. ๏ƒ˜ Explanation: Correct ๐’™๐Ÿ, ๐’™๐Ÿ help compute ๐’‘ and ๐’’ from ๐‘ต properties.
  • 18. Proof with Explanation ๏ฑFact :Let (๐‘, ๐‘’) be an RSA public key. Given the private key ๐‘‘, one can efficiently factor the modulus ๐‘ = ๐‘๐‘ž. Conversely, given the factorization of ๐‘ , one can efficiently recover ๐‘‘. ๏ฑ GCD Reveals p and q: ๏ƒ˜ Why? ๐‘ฎ๐‘ช๐‘ซ identifies common factors, crucial for ๐’‘ ๐’‚๐’๐’… ๐’’. ๏ƒ˜ Explanation: Compute gcd(๐’™ โˆ’ ๐Ÿ, ๐‘ต) for candidates; result reveals prime factors. ๏ฑ Probability and Efficiency: ๏ƒ˜ Why? Random number selection ensures comprehensive exploration. ๏ƒ˜ Explanation: Iterative steps with different random numbers (๐’ˆ) ensure unbiased, efficient exploration. ๏ฑ Conclusion: ๏ƒ˜ Result: Systematic approach efficiently finds ๐’‘ ๐’‚๐’๐’… ๐’’. ๏ƒ˜ Security Assurance: RSA security upheld due to complex, non-reversible nature of these calculations. ๏ƒ˜ Summary: Intricate math, strategic number choice, and specific computations ensure efficient discovery of ๐’‘ ๐’‚๐’๐’… ๐’’ in RSA encryption, preserving its security.
  • 19. Proof with Example Let ๐‘ต = ๐Ÿ๐Ÿ–๐Ÿ• ๐’‚๐’๐’… = ๐Ÿ๐Ÿ‘๐’… = ๐Ÿ๐Ÿ‘. 1. Calculating ๐’Œ: ๐’Œ = ๐’…๐’† โˆ’ ๐Ÿ = ๐Ÿ๐Ÿ‘ ร— ๐Ÿ๐Ÿ–๐Ÿ• โˆ’ ๐Ÿ = ๐Ÿ“๐Ÿ๐Ÿ—๐Ÿ— 2. Using Chinese Remainder Theorem (CRT): The CRT gives us four numbers: โˆ’๐Ÿ, โˆ’๐’™๐Ÿโ€‹ , โˆ’๐’™๐Ÿโ€‹ , ๐’™๐Ÿโ€‹ ๐’™๐Ÿโ€‹ . 3. Finding the Right ๐’™๐Ÿโ€‹๐’‚๐’๐’… ๐’™๐Ÿโ€‹: Let's explore different combinations of ๐’™๐Ÿโ€‹๐’‚๐’๐’… ๐’™๐Ÿโ€‹to find the pair that helps us discover ๐’‘ ๐’‚๐’๐’… ๐’’. ๏ƒ˜ Combination 1: ๐’™๐Ÿโ€‹= ๐Ÿ, ๐’™๐Ÿโ€‹= ๐Ÿ‘ ๐’ˆ๐’„๐’… ๐Ÿ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ, ๐’ˆ๐’„๐’…( ๐Ÿ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ This combination doesn't reveal ๐’‘ ๐’‚๐’๐’… ๐’’. ๏ƒ˜ Combination 2: ๐’™๐Ÿโ€‹= ๐Ÿ“, ๐’™๐Ÿโ€‹= ๐Ÿ• ๐’ˆ๐’„๐’… ๐Ÿ’, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ, ๐’ˆ๐’„๐’…(๐Ÿ”, ๐Ÿ๐Ÿ–๐Ÿ•) = ๐Ÿ, This combination also doesn't reveal ๐’‘ ๐’‚๐’๐’… ๐’’. ๏ƒ˜ Combination 3: ๐’™๐Ÿโ€‹= ๐Ÿ๐ŸŽ, ๐’™๐Ÿโ€‹= ๐Ÿ๐Ÿ‘ ๐’ˆ๐’„ ๐’… ๐Ÿ—, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ, ๐’ˆ๐’„๐’…( ๐Ÿ๐Ÿ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ Still, no luck in finding ๐’‘ ๐’‚๐’๐’… ๐’’.
  • 20. Proof with Example 4. Trying Different Random Numbers g: ๏ƒ˜ Random Number 1: ๐’ˆ = ๐Ÿ‘ , ๐’ˆ๐’„๐’… ๐Ÿ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ This doesn't help in finding ๐’‘ ๐’‚๐’๐’… ๐’’. ๏ƒ˜ Random Number 2:๐’ˆ = ๐Ÿ“, ๐’ˆ๐’„๐’… ๐Ÿ’, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ Still no success. ๏ƒ˜ Random Number 3:๐’ˆ = ๐Ÿ•, ๐’ˆ๐’„๐’…(๐Ÿ”, ๐Ÿ๐Ÿ–๐Ÿ•) = ๐Ÿ We are still searching for the right combination ๏ƒ˜ Random Number 4: ๐’ˆ = ๐Ÿ๐Ÿ , ๐’ˆ๐’„๐’… ๐Ÿ๐ŸŽ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ The search continues. ๏ƒ˜ Random Number 5:๐’ˆ = ๐Ÿ๐Ÿ‘, ๐’ˆ๐’„๐’… ๐Ÿ๐Ÿ, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ We are still exploring possibilities. ๏ƒ˜ Random Number 6:๐’ˆ = ๐Ÿ๐Ÿ•, ๐’ˆ๐’„๐’…(๐Ÿ๐Ÿ”, ๐Ÿ๐Ÿ–๐Ÿ•) = ๐Ÿ This doesn't help in finding ๐’‘ ๐’‚๐’๐’… ๐’’ ๏ƒ˜ Random Number 7: ๐’ˆ = ๐Ÿ๐Ÿ—, ๐’ˆ๐’„๐’… ๐Ÿ๐Ÿ–, ๐Ÿ๐Ÿ–๐Ÿ• = ๐Ÿ๐Ÿ Finally, we found a pair that reveals a common factor (๐Ÿ๐Ÿ) with ๐‘ต = ๐Ÿ๐Ÿ–๐Ÿ• ๏ƒ˜ So, after trying several combinations and random numbers, we found that when ๐’ˆ = ๐Ÿ๐Ÿ—, the GCD operation revealed a common factor ๐Ÿ๐Ÿ. This means that ๐Ÿ๐Ÿ is one of the prime factors of ๐‘ต. ๏ƒ˜ To find the other prime factor, divide ๐‘ต by 11: ๐ช = ๐‘ต ๐‘ท = ๐Ÿ๐Ÿ–๐Ÿ• ๐Ÿ๐Ÿ = ๐Ÿ๐Ÿ• ๏ƒ˜ Therefore, the prime factors of ๐‘ต = ๐Ÿ๐Ÿ–๐Ÿ• are ๐’‘ = ๐Ÿ๐Ÿ and ๐’’ = ๐Ÿ๐Ÿ•.
  • 21. Open Problem ๏ฑ Problem Description: Given two integers ๐‘ต and ๐’† satisfying ๐’ˆ๐’„๐’…(๐’†, ๐‹(๐‘ต)) = ๐Ÿ, where ๐‹(๐‘ต) is Euler's totient function, define a function ๐’‡๐’†,๐‘ต as follows: ๐’‡๐’†,๐‘ต ๐’™ = ๐’™ ๐Ÿ ๐’† ๐’Ž๐’๐’… ๐‘ต. The question is whether there exists a polynomial-time algorithm A that can factorize the number ๐‘ต given ๐‘ต and access to an "oracle" ๐’‡๐’†,๐‘ต ๐’™ for some ๐’†. ๏ฑ Problem Inquiry: ๏ƒ˜ The question asks whether, given the capability to efficiently compute ๐’‡๐’†,๐‘ต ๐’™ for some specific ๐’†, is there exists an algorithm A that can efficiently find the prime factors of ? ๏ƒ˜ In simpler terms, if you can quickly calculate the ๐’†๐’•๐’‰ ๐’“๐’๐’๐’•๐’” ๐’Ž๐’๐’…๐’–๐’๐’ ๐‘ต, can you also quickly find the prime factors of ๐‘ต?
  • 22. Open Problem ๏ฑ Research and Implications : ๏ƒ˜ Boneh and Venkatesan conducted research indicating that for small values of ๐’†, finding a solution might be challenging means answer to the problem may be No . ๏ƒ˜ In other words, for small e there may not exist a polynomial-time reduction from factoring to breaking RSA ๏ƒ˜ A positive solution for small ๐’† could lead to an efficient factoring algorithm, potentially compromising RSA encryption. ๏ƒ˜ A positive solution would also enable a โ€œChosen Ciphertext Attack" a severe vulnerability in RSA encryption. ๏ƒ˜ Therefore, a negative answer may be welcome .
  • 23. Chosen Ciphertext Attack ๏ฑ Normal Operation: ๏ƒ˜ Alice sends a message to Bob. ๏ƒ˜ The message is encrypted using a strong encryption algorithm and sent to Bob. ๏ƒ˜ Bob receives the encrypted message and decrypts it using the corresponding decryption key. ๏ฑ Chosen Ciphertext Attack Scenario: ๏ƒ˜ An attacker, Eve, intercepts the ciphertext sent from Alice to Bob. ๏ƒ˜ Eve wants to learn the content of Alice's message. In a chosen ciphertext attack, Eve has the ability to interact with the decryption process. There are two main types of chosen ciphertext attacks: ๏ƒ˜ CCA1 (Adaptive Chosen Ciphertext Attack) ๏ƒ˜ CCA2 (Non-Adaptive Chosen Ciphertext Attack)
  • 24. CCA1 (Adaptive Chosen Ciphertext Attack) ๏ƒ˜ Bob sends a message to Alice ๏ƒ˜ An attacker, Eve, intercepts the ciphertext sent from Bob to Alice ๏ƒ˜ Eve sends the intercepted ciphertext to Bob, pretending to be Alice. ๏ƒ˜ Bob, believing this is a message from Alice, decrypts it and sends the plaintext back to Eve. ๏ƒ˜ Based on the decrypted content, Eve may craft another ciphertext that exploits vulnerabilities in the decryption process or the encryption scheme itself. ๏ƒ˜ She can repeat this process, adapting her queries and ciphertexts based on the information she gains from previous responses.
  • 25. CCA1 (Adaptive Chosen Ciphertext Attack) ๏ฑ First Eve listens for a cipher that she want to crack: ๐‘ช = ๐‘ด๐’† ( ๐’Ž๐’๐’…๐‘ต ) ๏ฑ Next she takes this cipher and gets Bob to decrypt it (and also multiplying by a random value to the power of Bob's e value): ๐‘ชโ€ฒ = ๐‘ช ร— ๐’“๐’† ( ๐’Ž๐’๐’…๐‘ต ) ๏ฑ If Eve can determine the decrypted value for this cipher, she can determine the message as: (๐‘ชโ€ฒ )๐’… = (๐‘ช ร— ๐’“๐’† )๐’… = (๐‘ด๐’† ร— ๐’“๐’† )๐’… = ๐‘ด๐’†ร—๐’… ร— ๐’“๐’†ร—๐’… =M ร— ๐ซ as (๐‘ด๐’† )๐’… ( ๐’Ž๐’๐’…๐‘ต ) must equal ๐‘ด๐Ÿ ( ๐’Ž๐’๐’…๐‘ต ) ) So Eve just takes the original cipher, and divides it by the random value ( ๐’“)
  • 26. CCA2 (Non-Adaptive Chosen Ciphertext Attack) ๏ƒ˜ Eve collects several ciphertexts, including the one she intercepted earlier, without decrypting them. ๏ƒ˜ She sends all these ciphertexts to Bob at once, pretending to be Alice. ๏ƒ˜ Bob decrypts all the ciphertexts and sends back the corresponding plaintexts. ๏ƒ˜ Eve can analyze the decrypted plaintexts collectively to look for patterns, vulnerabilities, or weaknesses in the encryption scheme.
  • 27. 1. Threat Overview: Chosen Ciphertext Attacks (CCA) can compromise RSA encryption without proper padding schemes. 1. Secure Padding Solutions: ๏ƒ˜ Randomization with OAEP: Padding methods like OAEP add randomness, making it hard to predict encrypted messages. ๏ƒ˜ Mathematical Complexity: RSA's math tricks and big numbers make it super tricky to decrypt without the right key. ๏ƒ˜ Multiplicative Property: Multiplying RSA numbers is so complicated that bad guys can't figure out the original messages easily. Using techniques like OAEP fortifies RSA encryption, rendering it highly resilient against chosen ciphertext attacks. Chosen Ciphertext Attack
  • 29. Common modulus attack happens when two different messages are encrypted using the same RSA modulus. By analyzing the encrypted messages, an attacker can calculate the original messages without the private key. To prevent this, it's important to use different moduli for different encryption keys. Common Modulus attack
  • 30. Common Modulus attack ๐‘1 = ๐‘š๐’†๐Ÿ ๐‘2 = ๐‘š๐’†๐Ÿ ๐’†๐Ÿ ๐’†๐Ÿ M Consider a scenario where a person encrypts same plain text, 2 different times, which he sends to 2 different people. Suppose you eavesdropped on the communication and got both the cipher texts (c1, c2) and the exponents(e1, e2) he used. You already know his Modulus N which is public. So is there a way you can decipher this ? Well the answer is yes.
  • 31. Common Modulus attack ๐‘1 = ๐‘š๐’†๐Ÿ ๐‘2 = ๐‘š๐’†๐Ÿ ๐’†๐Ÿ ๐’†๐Ÿ M In order to decrypt it, we use an algorithm called extended euclidean which makes our tasks much easier. But another condition we need to decrypt this is that the GCD (e1, e2) = 1 ๐’‚๐Ÿ ๐’†๐Ÿ + ๐’‚๐Ÿ ๐’†๐Ÿ = 1
  • 32. ๏ฑ Decryption Equation : M = ( (๐‘ด๐’†๐Ÿ)๐’‚๐Ÿ ร— (๐‘ด๐’†๐Ÿ)๐’‚๐Ÿ) mod N = ( ๐‘ด๐’†๐Ÿ๐’‚๐Ÿ ร— ๐‘ด๐’†๐Ÿ๐’‚๐Ÿ) mod N = ( ๐‘ด๐’†๐Ÿ๐’‚๐Ÿ+๐’†๐Ÿ๐’‚๐Ÿ) mod N = ( ๐‘ด๐Ÿ ) mod N [ ๐’‚๐Ÿ ๐’†๐Ÿ + ๐’‚๐Ÿ ๐’†๐Ÿ = 1 ] = M Common Modulus attack
  • 33. Common Modulus attack EXAMPLE ๏ฑ Scenario: ๏ƒ˜ Modulus (N): 143 ๏ƒ˜ Public Exponents: e1 = 7, e2 = 17 ๏ƒ˜ Cipher Texts: c1 = 42, c2 = 9 [ Plain_Text = 3 ]
  • 34. Common Modulus attack EXAMPLE Q ๐’“๐Ÿ ๐’“๐Ÿ r ๐’•๐Ÿ ๐’•๐Ÿ t t= ๐’•๐Ÿ โˆ’q๐’•๐Ÿ 2 17 7 3 0 1 -2 2 7 3 1 1 -2 5 3 3 1 0 -2 5 -17 1 0 5 -17 ๏ฑ Letโ€™s find GCD of 7,17 by Extended Euclidean method to get ๐’‚๐Ÿ , ๐’‚๐Ÿ ๏ฑ We Found ๐’‚๐Ÿ , ๐’‚๐Ÿ . Here ๐’‚๐Ÿ = 5 And ๐’‚๐Ÿ = -2
  • 35. Common Modulus attack EXAMPLE ๏ฑ Decryption Calculation: M= (๐’„๐Ÿ ๐’‚๐Ÿ ร— ๐’„๐Ÿ ๐’‚๐Ÿ) Mod N = ๐Ÿ’๐Ÿ๐Ÿ“ ร— (๐Ÿ—)โˆ’๐Ÿ Mod N = ๐Ÿ’๐Ÿ๐Ÿ“ ร— (๐Ÿ—โˆ’๐Ÿ ) ๐Ÿ Mod N = ๐Ÿ’๐Ÿ๐Ÿ“ ร— ๐Ÿ๐Ÿ” Mod N = 3 Plain_text
  • 36. ๏ฑ Each user should have a unique modulus (N). Sharing the same N among multiple users allows potential attackers to exploit the shared structure, undermining the security of the RSA encryption system. ๏ฑ This observation emphasizes the importance of using a unique modulus for each user in RSA encryption to maintain the security and privacy of the communication system. Common Modulus attack
  • 37. A blinding attack in RSA encryption manipulates ciphertext using a blinding factor, deceiving the recipient into decrypting a modified message. This allows attackers to gather sensitive information or perform unauthorized actions. Blinding attack
  • 38. Blinding attack ๏ฑ Eve has the message (M - "Pay Eve $1 million") and creates another message: ๐‘ดโ€ฒ = ๐’“๐’† M mod N ๏ฑ where e is Bob's encryption key exponent and r is a random number. Eve gets Bob to sign for this. The signature is then: ๐‘บโ€ฒ = (๐‘ดโ€ฒ )๐’… mod N ๏ฑ Bob gives S' to Eve, and she just divides by r to get the signature for the original message: ๐‘บโ€ฒ ๐’“ = (M ร— ๐’“๐’†)๐’… ๐’“ = (๐‘ด๐’… ร— ๐’“๐’†๐’…) ๐’“ = (๐‘ด๐’… ร— ๐’“๐Ÿ) ๐’“ = ๐‘ด๐’… mod (N)
  • 39. Blinding attack ๏ฑ Eve takes Bob signature and adds it to the original message that Bob wouldn't sign, and she can prove that Bob signed it. If she is sending to Alice the Banker, she would take the message: "๐‘ท๐’‚๐’š ๐‘ฌ๐’—๐’† $๐Ÿ ๐’Ž๐’Š๐’๐’๐’Š๐’๐’" ๏ฑ and add Bob signature for the message ๐‘บโ€ฒ ๐’“ = ๐‘ด๐’… mod (N), and then encrypt everything with Alice the Banker's public key. Alice will get the encrypted message and decrypts with her private key, and reads the message: "๐‘ท๐’‚๐’š ๐‘ฌ๐’—๐’† $๐Ÿ ๐’Ž๐’Š๐’๐’๐’Š๐’๐’" ๏ฑ and she then looks at the signature, and gets Bob's public key and checks the signature. It will match, so she will pays Eve one million dollars from Bob's account.
  • 40. Blinding attack EXAMPLE ๏ฑ RSA Parameters: ๏ƒ˜ Public Key (e, N): e = 79, N = 3337 ๏ƒ˜ Private Key (d): d = 1019 ๏ƒ˜ Message to be Signed: "Pay Eve $1 million" ๏ƒ˜ Blinding Factor: r = 21
  • 41. # Import necessary libraries import sys import os import hashlib import libnum # Initialize RSA parameters and message e = 79 d = 1019 N = 3337 r = 21 Message = 'Pay Eve $1 million' # Print initial values for reference print('== Initial values ==') print('e =', e, 'd =', d, 'N =', N) print('Message =', Message, 'r =', r) print('n=============โ€˜) # Generate a random MD5 hash and reduce it modulo N array = os.urandom(1 << 20) md5 = hashlib.md5() md5.update(array) digest = md5.hexdigest() M = int(digest, 16) % N # Print the MD5 hash (mod N) print('MD5 hash (mod N):', M) # Bob signs the message using his private key d signed = pow(M, d, N) print('Bob signs the message:', signed) # Eve blinds the signed message and sends it to Alice val_sent_by_eve = (M * pow(r, e, N)) % N signed_dash = pow(val_sent_by_eve, d, N) print('Eve sends blinded signature to Alice:', signed_dash) # Alice receives the blinded signature and unblinds it result = (signed_dash * libnum.invmod(r, N)) % N print('Alice receives unblinded signature:', result) print('n=== Check ==') # Alice verifies the signature using Bob's public key e unsigned = pow(result, e, N) print('Unsigned value is:', unsigned) # If the unsigned value matches the original message M, the signature is valid if unsigned == M: print('Success. The signature is valid.') else: print('Signatures do not compute') Blinding attack EXAMPLE
  • 42. ๏ƒผ Signatures schemes often employ a "one-way hash" function to secure the message (M) before signing, ensuring message integrity and authenticity. ๏ƒผ This approach mitigates the risk of message manipulation, making it computationally challenging for attackers to tamper with the signed content during transmission. ๏ƒผ Although blinding was presented as an attack, it is, in fact, a fundamental property of RSA Properly implemented, it is not a security threat. Blinding attack