SlideShare a Scribd company logo
Lecture 5 Overview
Does DES Work?
• Differential Cryptanalysis Idea
– Use two plaintext that barely differ
– Study the difference in the corresponding cipher
text
– Collect the keys that could accomplish the change
– Repeat
2CS 450/650 – Lecture 5: DES
Cracking DES
• Diffie and Hellman then outlined a "brute
force" attack on DES
– By "brute force" is meant that you try as many of
the 256
possible keys as you have to before
decrypting the ciphertext into a sensible plaintext
message
– They proposed a special purpose "parallel
computer using one million chips to try one
million keys each" per second
3CS 450/650 – Lecture 5: DES
Cracking DES (cont.)
• In 1998, Electronic Frontier Foundation spent
$220K and built a machine that could go
through the entire 56-bit DES key space in an
average of 4.5 days
– On July 17, 1998, they announced they had
cracked a 56-bit key in 56 hours
– The computer, called Deep Crack
• used 27 boards each containing 64 chips
• was capable of testing 90 billion keys a second
4CS 450/650 – Lecture 5: DES
Cracking DES (cont.)
• In early 1999, Distributed. Net used the DES Cracker
and a worldwide network of nearly 100K PCs to
break DES in 22 hours
– combined they were testing 245 billion keys per second
• This just serves to illustrate that any organization
with moderate resources can break through DES with
very little effort these days
5CS 450/650 – Lecture 5: DES
Double DES
• E(k1, E(k2, M) )
– As strong as 57-bit key !
– Given message M and ciphertext c
– Encrypt M with all possible keys
• 256
steps
– Decrypt c with all possible keys and match Ms
• 256
steps
CS 450/650 Fundamentals of Integrated Computer Security 6
Triple DES – Two keys
• E(k1, D(k2, E(k1, M) ) )
• The first key is used to DES-encrypt the message
• The second key is used to DES-decrypt the encrypted
message
– Since the second key is not the right key, this decryption
just scrambles the data further
• The twice-scrambled message is then encrypted
again with the first key to yield the final ciphertext
• As strong as 80-bit key !
7CS 450/650 – Lecture 5: DES
Triple DES – Three keys
• E(k3, D(k2, E(k1, M) ) )
• The first key is used to DES-encrypt the message
• The second key is used to DES-decrypt the encrypted
message
– Since the second key is not the right key, this decryption
just scrambles the data further
• The twice-scrambled message is then encrypted with
the third key to yield the final ciphertext
• As strong as 112-bit key !
8CS 450/650 – Lecture 5: DES
Analysis of Algorithms
• Algorithms
– Time Complexity
– Space Complexity
• An algorithm whose time complexity is
bounded by a polynomial is called a
polynomial-time algorithm
– An algorithm is considered to be efficient if it runs
in polynomial time.
CS 450/650 Lecture 5: Algorithm Background 9
Growth Rate
 T(n) = O(f(n)): T is bounded above by f
The growth rate of T(n) <= growth rate of f(n)
 T(n) = Ω (g(n)): T is bounded below by g
The growth rate of T(n) >= growth rate of g(n)
 T(n) = Θ(h(n)): T is bounded both above and below by h
The growth rate of T(n) = growth rate of h(n)
 T(n) = o(p(n)): T is dominated by p
The growth rate of T(n) < growth rate of p(n)
10CS 450/650 Lecture 5: Algorithm Background
Time Complexity
 C
 O(n)
 O(log n)
 O(nlogn)
 O(n2
)
 …
 O(nk
)
 O(2n
)
 O(kn
)
 O(nn
)
11CS 450/650 Lecture 5: Algorithm Background
Polynomial
Exponential
P, NP, NP-hard, NP-complete
• A problem belongs to the class P if the problem can be
solved by a polynomial-time algorithm
• A problem belongs to the class NP if the correctness of
the problem’s solution can be verified by a polynomial-
time algorithm
• A problem is NP-hard if it is as hard as any problem in NP
– Existence of a polynomial-time algorithm for an NP-hard
problem implies the existence of polynomial solutions for every
problem in NP
• NP-complete problems are the NP-hard problems that
are also in NP
12CS 450/650 Lecture 5: Algorithm Background
Relationships between different classes
NP
P
NP-complete
NP-hard
13CS 450/650 Lecture 5: Algorithm Background
Partitioning Problem
• Given a set of n integers, partition the integers
into two subsets such that the difference
between the sum of the elements in the two
subsets is minimum
– NP-complete
13, 37, 42, 59, 86, 100
14CS 450/650 Lecture 5: Algorithm Background
Sum 165 172
86 100
42 59
37 13
Bin Packing Problem
• Suppose you are given n items of sizes
s1, s2,..., sn
• All sizes satisfy 0 ≤ si ≤ 1
• The problem is to pack these items in the
fewest number of bins,
– given that each bin has unit capacity
– NP-hard
15CS 450/650 Lecture 5: Algorithm Background
Lecture 6
RSA
CS 450/650
Fundamentals of
Integrated Computer Security
Slides are modified from Hesham El-Rewini
RSA
• Invented by Cocks (GCHQ), independently,
by Rivest, Shamir and Adleman (MIT)
• Two keys e and d used for Encryption and
Decryption
– The keys are interchangeable
• M = D(d, E(e, M) ) = D(e, E(d, M) )
– Public key encryption
• Based on problem of factoring large numbers
– Not in NP-complete
– Best known algorithm is exponential 17CS 450/650 Lecture 6: RSA
RSA
• To encrypt message M compute
– c = Me
mod N
• To decrypt ciphertext c compute
– M = cd
mod N
18CS 450/650 Lecture 6: RSA
• Let p and q be two large prime numbers
• Let N = pq
• Choose e relatively prime to (p−1)(q−1)
– a prime number larger than p-1 and q-1
• Find d such that ed mod (p−1)(q−1) = 1
Key Choice
19CS 450/650 Lecture 6: RSA
RSA
• Recall that e and N are public
• If attacker can factor N, he can use e to easily
find d
– since ed mod (p−1)(q−1) = 1
• Factoring the modulus breaks RSA
• It is not known whether factoring is the only
way to break RSA
20CS 450/650 Lecture 6: RSA
Does RSA Really Work?
• Given c = Me
mod N we must show
– M = cd
mod N = Med
mod N
• We’ll use Euler’s Theorem
– If x is relatively prime to N then xϕ(N)
mod N =1
• ϕ(n): number of positive integers less than n that are
relatively prime to n.
• If p is prime then, ϕ(p) = p-1
21CS 450/650 Lecture 6: RSA
Does RSA Really Work?
• Facts:
– ed mod (p − 1)(q − 1) = 1
– ed = k(p − 1)(q − 1) + 1 by definition of mod
– ϕ(N) = (p − 1)(q − 1)
– Then ed − 1 = k(p − 1)(q − 1) = kϕ(N)
• Med
= M(ed-1)+1
= M⋅Med-1
= M⋅Mkϕ(N)
= M⋅(Mϕ(N)
)k
mod N = M⋅1k
mod N
= M mod N
22CS 450/650 Lecture 6: RSA
Example
• Select primes p=11, q=3.
• N = p* q = 11*3 = 33
• Choose e = 3
• check gcd(e, p-1) = gcd(3, 10) = 1
– i.e. 3 and 10 have no common factors except 1
• check gcd(e, q-1) = gcd(3, 2) = 1
• therefore gcd(e, (p-1)(q-1)) = gcd(3, 20) = 1
23CS 450/650 Lecture 6: RSA
Example (cont.)
• p-1 * q-1 = 10 * 2 = 20
• Compute d such that
e * d mod (p-1)*(q-1) = 1
3 * d mod 20 = 1
d = 7
Public key = (N, e) = (33, 3)
Private key = (N, d) = (33, 7)
24CS 450/650 Lecture 6: RSA
Example (cont.)
• Now say we want to encrypt message m = 7
• c = Me
mod N = 73
mod 33 = 343 mod 33 = 13
– Hence the ciphertext c = 13
• To check decryption, we compute
M' = cd
mod N = 137
mod 33 = 7
25CS 450/650 Lecture 6: RSA
More Efficient RSA
• Modular exponentiation example
– 520
= 95367431640625 = 25 mod 35
• A better way: repeated squaring
– Note that 20 = 2 ⋅ 10, 10 = 2 ⋅ 5, 5 = 2 ⋅ 2 + 1, 2 = 1⋅ 2
– 51
= 5 mod 35
– 52
= (51
)2
= 52
= 25 mod 35
– 55
= (52
)2
⋅ 51
= 252
⋅ 5 = 3125 = 10 mod 35
– 510
= (55
)2
= 102
= 100 = 30 mod 35
– 520
= (510
)2
= 302
= 900 = 25 mod 35
• No huge numbers and it’s efficient!
CS 450/650 Lecture 6: RSA 26
RSA key-length strength
• RSA has challenges for different key-lengths
– RSA-140
• Factored in 1 month using 200 machines in 1999
– RSA-155 (512-bit)
• Factored in 3.7 months using 300 machines in 1999
– RSA-160
• Factored in 20 days in 2003
– RSA-200
• Factored in 18 month in 2005
– RSA-210, RSA-220, RSA-232, … RSA-2048
27CS 450/650 Lecture 6: RSA
Group Work
Find keys d and e for the RSA cryptosystem with
p = 7 and q = 11
Solution
– p*q = 77
– (p-1) * (q-1) = 60
– e = 37
– d = 13
– n = 13 * 37 = 481 = 1 mod 60
28CS 450/650 Lecture 6: RSA

More Related Content

What's hot

RSA Algorithm
RSA AlgorithmRSA Algorithm
RSA Algorithm
Joon Young Park
 
Codes and Isogenies
Codes and IsogeniesCodes and Isogenies
Codes and Isogenies
Priyanka Aash
 
RSA-W7(rsa) d1-d2
RSA-W7(rsa) d1-d2RSA-W7(rsa) d1-d2
RSA-W7(rsa) d1-d2
Fahad Layth
 
Computer security
Computer security Computer security
Computer security
Harry Potter
 
Presentation about RSA
Presentation about RSAPresentation about RSA
Presentation about RSA
Srilal Buddika
 
RSA
RSARSA
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
Komal Singh
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
Sathish Kumar
 
Broadcasting and low exponent rsa attack
Broadcasting and low exponent rsa attackBroadcasting and low exponent rsa attack
Broadcasting and low exponent rsa attack
Ankita Kapratwar
 
Implementation of RSA Algorithm for Speech Data Encryption and Decryption
Implementation of RSA Algorithm for Speech Data Encryption and DecryptionImplementation of RSA Algorithm for Speech Data Encryption and Decryption
Implementation of RSA Algorithm for Speech Data Encryption and Decryption
Md. Ariful Hoque
 
RSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key CryptographyRSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key Cryptography
Md. Shafiul Alam Sagor
 
On the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysOn the Secrecy of RSA Private Keys
On the Secrecy of RSA Private Keys
Dharmalingam Ganesan
 
Rsa rivest shamir adleman
Rsa rivest shamir adlemanRsa rivest shamir adleman
Rsa rivest shamir adleman
Hossain Md Shakhawat
 
Security Attacks on RSA
Security Attacks on RSASecurity Attacks on RSA
Security Attacks on RSA
Pratik Poddar
 
RSA Algorithm report
RSA Algorithm reportRSA Algorithm report
RSA Algorithm report
Mohamed Ramadan
 

What's hot (15)

RSA Algorithm
RSA AlgorithmRSA Algorithm
RSA Algorithm
 
Codes and Isogenies
Codes and IsogeniesCodes and Isogenies
Codes and Isogenies
 
RSA-W7(rsa) d1-d2
RSA-W7(rsa) d1-d2RSA-W7(rsa) d1-d2
RSA-W7(rsa) d1-d2
 
Computer security
Computer security Computer security
Computer security
 
Presentation about RSA
Presentation about RSAPresentation about RSA
Presentation about RSA
 
RSA
RSARSA
RSA
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
Broadcasting and low exponent rsa attack
Broadcasting and low exponent rsa attackBroadcasting and low exponent rsa attack
Broadcasting and low exponent rsa attack
 
Implementation of RSA Algorithm for Speech Data Encryption and Decryption
Implementation of RSA Algorithm for Speech Data Encryption and DecryptionImplementation of RSA Algorithm for Speech Data Encryption and Decryption
Implementation of RSA Algorithm for Speech Data Encryption and Decryption
 
RSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key CryptographyRSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key Cryptography
 
On the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysOn the Secrecy of RSA Private Keys
On the Secrecy of RSA Private Keys
 
Rsa rivest shamir adleman
Rsa rivest shamir adlemanRsa rivest shamir adleman
Rsa rivest shamir adleman
 
Security Attacks on RSA
Security Attacks on RSASecurity Attacks on RSA
Security Attacks on RSA
 
RSA Algorithm report
RSA Algorithm reportRSA Algorithm report
RSA Algorithm report
 

Similar to Lecture6 rsa

Class3
Class3Class3
Information and network security 33 rsa algorithm
Information and network security 33 rsa algorithmInformation and network security 33 rsa algorithm
Information and network security 33 rsa algorithm
Vaibhav Khanna
 
14-applications-of-number-theory.ppt
14-applications-of-number-theory.ppt14-applications-of-number-theory.ppt
14-applications-of-number-theory.ppt
IdcIdk1
 
Simple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Simple Overview Caesar and RSA Encryption_by_Tarek_GaberSimple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Simple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Tarek Gaber
 
CNIT 141: 10. RSA
CNIT 141: 10. RSACNIT 141: 10. RSA
CNIT 141: 10. RSA
Sam Bowne
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
alagumani1984
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
Marwa Hashem elsherif
 
Overview on Cryptography and Network Security
Overview on Cryptography and Network SecurityOverview on Cryptography and Network Security
Overview on Cryptography and Network Security
Dr. Rupa Ch
 
CNIT 141 10. RSA
CNIT 141 10. RSACNIT 141 10. RSA
CNIT 141 10. RSA
Sam Bowne
 
10 RSA
10 RSA10 RSA
10 RSA
Sam Bowne
 
Unit --3.ppt
Unit --3.pptUnit --3.ppt
Unit --3.ppt
DHANABALSUBRAMANIAN
 
PKC&RSA
PKC&RSAPKC&RSA
PKC&RSA
Anver S R
 
Cryptography and applications
Cryptography and applicationsCryptography and applications
Cryptography and applications
thai
 
Cryptography
CryptographyCryptography
Cryptography
Mrinalini Sharma
 
3 pkc+rsa
3 pkc+rsa3 pkc+rsa
3 pkc+rsa
Shashank Mishra
 
CNS.ppt
CNS.pptCNS.ppt
Common Crypto Pitfalls
Common Crypto PitfallsCommon Crypto Pitfalls
Common Crypto Pitfalls
Amirali Sanatinia
 
Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystem
Samdish Arora
 
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
 
ch09_rsa_nemo.ppt
ch09_rsa_nemo.pptch09_rsa_nemo.ppt
ch09_rsa_nemo.ppt
ChandraB15
 

Similar to Lecture6 rsa (20)

Class3
Class3Class3
Class3
 
Information and network security 33 rsa algorithm
Information and network security 33 rsa algorithmInformation and network security 33 rsa algorithm
Information and network security 33 rsa algorithm
 
14-applications-of-number-theory.ppt
14-applications-of-number-theory.ppt14-applications-of-number-theory.ppt
14-applications-of-number-theory.ppt
 
Simple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Simple Overview Caesar and RSA Encryption_by_Tarek_GaberSimple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Simple Overview Caesar and RSA Encryption_by_Tarek_Gaber
 
CNIT 141: 10. RSA
CNIT 141: 10. RSACNIT 141: 10. RSA
CNIT 141: 10. RSA
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
Overview on Cryptography and Network Security
Overview on Cryptography and Network SecurityOverview on Cryptography and Network Security
Overview on Cryptography and Network Security
 
CNIT 141 10. RSA
CNIT 141 10. RSACNIT 141 10. RSA
CNIT 141 10. RSA
 
10 RSA
10 RSA10 RSA
10 RSA
 
Unit --3.ppt
Unit --3.pptUnit --3.ppt
Unit --3.ppt
 
PKC&RSA
PKC&RSAPKC&RSA
PKC&RSA
 
Cryptography and applications
Cryptography and applicationsCryptography and applications
Cryptography and applications
 
Cryptography
CryptographyCryptography
Cryptography
 
3 pkc+rsa
3 pkc+rsa3 pkc+rsa
3 pkc+rsa
 
CNS.ppt
CNS.pptCNS.ppt
CNS.ppt
 
Common Crypto Pitfalls
Common Crypto PitfallsCommon Crypto Pitfalls
Common Crypto Pitfalls
 
Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystem
 
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 ...
 
ch09_rsa_nemo.ppt
ch09_rsa_nemo.pptch09_rsa_nemo.ppt
ch09_rsa_nemo.ppt
 

Recently uploaded

Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 

Recently uploaded (20)

Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 

Lecture6 rsa

  • 2. Does DES Work? • Differential Cryptanalysis Idea – Use two plaintext that barely differ – Study the difference in the corresponding cipher text – Collect the keys that could accomplish the change – Repeat 2CS 450/650 – Lecture 5: DES
  • 3. Cracking DES • Diffie and Hellman then outlined a "brute force" attack on DES – By "brute force" is meant that you try as many of the 256 possible keys as you have to before decrypting the ciphertext into a sensible plaintext message – They proposed a special purpose "parallel computer using one million chips to try one million keys each" per second 3CS 450/650 – Lecture 5: DES
  • 4. Cracking DES (cont.) • In 1998, Electronic Frontier Foundation spent $220K and built a machine that could go through the entire 56-bit DES key space in an average of 4.5 days – On July 17, 1998, they announced they had cracked a 56-bit key in 56 hours – The computer, called Deep Crack • used 27 boards each containing 64 chips • was capable of testing 90 billion keys a second 4CS 450/650 – Lecture 5: DES
  • 5. Cracking DES (cont.) • In early 1999, Distributed. Net used the DES Cracker and a worldwide network of nearly 100K PCs to break DES in 22 hours – combined they were testing 245 billion keys per second • This just serves to illustrate that any organization with moderate resources can break through DES with very little effort these days 5CS 450/650 – Lecture 5: DES
  • 6. Double DES • E(k1, E(k2, M) ) – As strong as 57-bit key ! – Given message M and ciphertext c – Encrypt M with all possible keys • 256 steps – Decrypt c with all possible keys and match Ms • 256 steps CS 450/650 Fundamentals of Integrated Computer Security 6
  • 7. Triple DES – Two keys • E(k1, D(k2, E(k1, M) ) ) • The first key is used to DES-encrypt the message • The second key is used to DES-decrypt the encrypted message – Since the second key is not the right key, this decryption just scrambles the data further • The twice-scrambled message is then encrypted again with the first key to yield the final ciphertext • As strong as 80-bit key ! 7CS 450/650 – Lecture 5: DES
  • 8. Triple DES – Three keys • E(k3, D(k2, E(k1, M) ) ) • The first key is used to DES-encrypt the message • The second key is used to DES-decrypt the encrypted message – Since the second key is not the right key, this decryption just scrambles the data further • The twice-scrambled message is then encrypted with the third key to yield the final ciphertext • As strong as 112-bit key ! 8CS 450/650 – Lecture 5: DES
  • 9. Analysis of Algorithms • Algorithms – Time Complexity – Space Complexity • An algorithm whose time complexity is bounded by a polynomial is called a polynomial-time algorithm – An algorithm is considered to be efficient if it runs in polynomial time. CS 450/650 Lecture 5: Algorithm Background 9
  • 10. Growth Rate  T(n) = O(f(n)): T is bounded above by f The growth rate of T(n) <= growth rate of f(n)  T(n) = Ω (g(n)): T is bounded below by g The growth rate of T(n) >= growth rate of g(n)  T(n) = Θ(h(n)): T is bounded both above and below by h The growth rate of T(n) = growth rate of h(n)  T(n) = o(p(n)): T is dominated by p The growth rate of T(n) < growth rate of p(n) 10CS 450/650 Lecture 5: Algorithm Background
  • 11. Time Complexity  C  O(n)  O(log n)  O(nlogn)  O(n2 )  …  O(nk )  O(2n )  O(kn )  O(nn ) 11CS 450/650 Lecture 5: Algorithm Background Polynomial Exponential
  • 12. P, NP, NP-hard, NP-complete • A problem belongs to the class P if the problem can be solved by a polynomial-time algorithm • A problem belongs to the class NP if the correctness of the problem’s solution can be verified by a polynomial- time algorithm • A problem is NP-hard if it is as hard as any problem in NP – Existence of a polynomial-time algorithm for an NP-hard problem implies the existence of polynomial solutions for every problem in NP • NP-complete problems are the NP-hard problems that are also in NP 12CS 450/650 Lecture 5: Algorithm Background
  • 13. Relationships between different classes NP P NP-complete NP-hard 13CS 450/650 Lecture 5: Algorithm Background
  • 14. Partitioning Problem • Given a set of n integers, partition the integers into two subsets such that the difference between the sum of the elements in the two subsets is minimum – NP-complete 13, 37, 42, 59, 86, 100 14CS 450/650 Lecture 5: Algorithm Background Sum 165 172 86 100 42 59 37 13
  • 15. Bin Packing Problem • Suppose you are given n items of sizes s1, s2,..., sn • All sizes satisfy 0 ≤ si ≤ 1 • The problem is to pack these items in the fewest number of bins, – given that each bin has unit capacity – NP-hard 15CS 450/650 Lecture 5: Algorithm Background
  • 16. Lecture 6 RSA CS 450/650 Fundamentals of Integrated Computer Security Slides are modified from Hesham El-Rewini
  • 17. RSA • Invented by Cocks (GCHQ), independently, by Rivest, Shamir and Adleman (MIT) • Two keys e and d used for Encryption and Decryption – The keys are interchangeable • M = D(d, E(e, M) ) = D(e, E(d, M) ) – Public key encryption • Based on problem of factoring large numbers – Not in NP-complete – Best known algorithm is exponential 17CS 450/650 Lecture 6: RSA
  • 18. RSA • To encrypt message M compute – c = Me mod N • To decrypt ciphertext c compute – M = cd mod N 18CS 450/650 Lecture 6: RSA
  • 19. • Let p and q be two large prime numbers • Let N = pq • Choose e relatively prime to (p−1)(q−1) – a prime number larger than p-1 and q-1 • Find d such that ed mod (p−1)(q−1) = 1 Key Choice 19CS 450/650 Lecture 6: RSA
  • 20. RSA • Recall that e and N are public • If attacker can factor N, he can use e to easily find d – since ed mod (p−1)(q−1) = 1 • Factoring the modulus breaks RSA • It is not known whether factoring is the only way to break RSA 20CS 450/650 Lecture 6: RSA
  • 21. Does RSA Really Work? • Given c = Me mod N we must show – M = cd mod N = Med mod N • We’ll use Euler’s Theorem – If x is relatively prime to N then xϕ(N) mod N =1 • ϕ(n): number of positive integers less than n that are relatively prime to n. • If p is prime then, ϕ(p) = p-1 21CS 450/650 Lecture 6: RSA
  • 22. Does RSA Really Work? • Facts: – ed mod (p − 1)(q − 1) = 1 – ed = k(p − 1)(q − 1) + 1 by definition of mod – ϕ(N) = (p − 1)(q − 1) – Then ed − 1 = k(p − 1)(q − 1) = kϕ(N) • Med = M(ed-1)+1 = M⋅Med-1 = M⋅Mkϕ(N) = M⋅(Mϕ(N) )k mod N = M⋅1k mod N = M mod N 22CS 450/650 Lecture 6: RSA
  • 23. Example • Select primes p=11, q=3. • N = p* q = 11*3 = 33 • Choose e = 3 • check gcd(e, p-1) = gcd(3, 10) = 1 – i.e. 3 and 10 have no common factors except 1 • check gcd(e, q-1) = gcd(3, 2) = 1 • therefore gcd(e, (p-1)(q-1)) = gcd(3, 20) = 1 23CS 450/650 Lecture 6: RSA
  • 24. Example (cont.) • p-1 * q-1 = 10 * 2 = 20 • Compute d such that e * d mod (p-1)*(q-1) = 1 3 * d mod 20 = 1 d = 7 Public key = (N, e) = (33, 3) Private key = (N, d) = (33, 7) 24CS 450/650 Lecture 6: RSA
  • 25. Example (cont.) • Now say we want to encrypt message m = 7 • c = Me mod N = 73 mod 33 = 343 mod 33 = 13 – Hence the ciphertext c = 13 • To check decryption, we compute M' = cd mod N = 137 mod 33 = 7 25CS 450/650 Lecture 6: RSA
  • 26. More Efficient RSA • Modular exponentiation example – 520 = 95367431640625 = 25 mod 35 • A better way: repeated squaring – Note that 20 = 2 ⋅ 10, 10 = 2 ⋅ 5, 5 = 2 ⋅ 2 + 1, 2 = 1⋅ 2 – 51 = 5 mod 35 – 52 = (51 )2 = 52 = 25 mod 35 – 55 = (52 )2 ⋅ 51 = 252 ⋅ 5 = 3125 = 10 mod 35 – 510 = (55 )2 = 102 = 100 = 30 mod 35 – 520 = (510 )2 = 302 = 900 = 25 mod 35 • No huge numbers and it’s efficient! CS 450/650 Lecture 6: RSA 26
  • 27. RSA key-length strength • RSA has challenges for different key-lengths – RSA-140 • Factored in 1 month using 200 machines in 1999 – RSA-155 (512-bit) • Factored in 3.7 months using 300 machines in 1999 – RSA-160 • Factored in 20 days in 2003 – RSA-200 • Factored in 18 month in 2005 – RSA-210, RSA-220, RSA-232, … RSA-2048 27CS 450/650 Lecture 6: RSA
  • 28. Group Work Find keys d and e for the RSA cryptosystem with p = 7 and q = 11 Solution – p*q = 77 – (p-1) * (q-1) = 60 – e = 37 – d = 13 – n = 13 * 37 = 481 = 1 mod 60 28CS 450/650 Lecture 6: RSA