SlideShare a Scribd company logo
1 of 30
Network Security
CS-7 (CH13-14)
By: Prof. Ganesh Ingle
Session 2 objective
CS-6 Revision Previous Session revision
CS -7 Model of Asymmetric Key Cryptography
CS – 7 Factorization and other methods for Public Key
Cryptography
CS -7 RSA and OAEP
CS-7 Diffe-Hellman Key Exchange and its Security Aspects
SUMMARY
CS -7 Message authentication & types
Model of Asymmetric Key Cryptography
CS -7 Message authentication & types
Model of Asymmetric Key Cryptography
Factors
 Factors are the numbers you multiply together to get a
product.
 For example, the product 24 has several factors.
 24 = 1 x 24
 24 = 2 x 12
 24 = 3 x 8
 24 = 4 x 6
 SO, the factors are 1, 2, 3, 4, 6, 8, 12, 24
CS -7 Factorization & other methods for PK Cryptography
Finding Factors
 Start with 1 times the number.
 Try 2, 3, 4, etc.
 When you repeat your factors, cross out the repeat -
you’re done at this point.
 If you get doubles (such as 4 x 4), then you’re done.
Repeats or doubles let you know you’re done.
CS -7 Factorization & other methods for PK Cryptography
What are the factors of 16?
1 x 16
2 x 8
3 x ?? 3 is not a factor, so cross it out
4 x 4 doubles = done
The factors of 16 are
1,2,4,8,16
CS -7 Factorization & other methods for PK Cryptography
Prime and Composite Numbers
Prime numbers are
numbers that only have
two factors: one, and the
number itself.
EXAMPLES:
3, 5, 7, 11, 31
Composite numbers
have more than two
factors.
EXAMPLES:
6, 15, 18, 30, 100
CS -7 Factorization & other methods for PK Cryptography
Example: Prime Factorization of 100.
100
2 X 50
100 ÷ 2 = 50. Two is
the first prime number
that goes into 100.
2 is a prime
number, so we are
done with it.
Now we deal with the
50. Divide it by 2 to get
the next factors.
2 X 25
25 is not divisible by
the first prime, 2. The
next prime, 3, does not
work either. We must
divide by 5 to get a
factor.
5 x 5
Both numbers are prime,
leaving us with all primes.
CS -7 Factorization & other methods for PK Cryptography
CS -7 RSA and OAEP
CS-7 Diffe-Hellman Key Exchange and its Security Aspects
The RSA cryptosystem
 First published:
 Scientific American, Aug. 1977.
(after some censorship entanglements)
 Currently the “work horse” of Internet security:
 Most Public Key Infrastructure (PKI) products.
 SSL/TLS: Certificates and key-exchange.
 Secure e-mail: PGP, Outlook, …
Page
12
CS -7 RSA and OAEP
The RSA trapdoor 1-to-1 function
 Parameters: N=pq. N 1024 bits. p,q 512 bits.
e – encryption exponent. gcd(e, (N) ) = 1 .
 1-to-1 function: RSA(M) = Me
(mod N) where MZN
*
Page
13
 Trapdoor: d – decryption exponent.
Where ed = 1 (mod (N) )
 Inversion: RSA(M)d
= Med
= Mk(N)+1
= M (mod N)
 (n,e,t,)-RSA Assumption: For any t-time alg. A:
Pr[ A(N,e,x) = x
1/e
(N) : ]< 
p,q  n-bit primes,
Npq, xZN
*
R
R
CS -7 RSA and OAEP
Textbook RSA is insecure
 Textbook RSA encryption:
 public key: (N,e) Encrypt: C = M
e
(mod N)
 private key: d Decrypt: Cd
= M (mod N)
(M  ZN
* )
 Completely insecure cryptosystem:
 Does not satisfy basic definitions of security.
 Many attacks exist.
 The RSA trapdoor permutation is not a cryptosystem !
Page
14
CS -7 RSA and OAEP
A simple attack on textbook RSA
 Session-key K is 64 bits. View K  {0,…,264} Eavesdropper sees:
C = Ke
(mod N) .
 Suppose K = K1K2 where K1, K2 < 234 . (prob. 20%) Then: C/K1
e
=
K2
e
(mod N)
 Build table: C/1e, C/2e, C/3e, …, C/234e . time: 234
For K2 = 0,…, 234 test if K2
e
is in table. time: 23434
 Attack time: 240 << 264
Page
15
Web
Browser
Web
Server
CLIENT HELLO
SERVER HELLO (e,N) d
C=RSA(K)
Rando
m
session-
key K
CS -7 RSA and OAEP
Common RSA encryption
 Never use textbook RSA.
 RSA in practice:
 Main question:
 How should the preprocessing be done?
 Can we argue about security of resulting system?
Page
16
msg
Preprocessing
ciphertext
RSA
CS -7 RSA and OAEP
PKCS1 V1.5
 PKCS1 mode 2: (encryption)
 Resulting value is RSA encrypted.
 Widely deployed in web servers and browsers.
 No security analysis !!
Page
17
02 random pad FF msg
1024 bits
16 bits
CS -7 RSA and OAEP
Attack on PKCS1
 Bleichenbacher 98. Chosen-ciphertext attack.
 PKCS1 used in SSL:
 attacker can test if 16 MSBs of plaintext = ’02’.
 Attack: to decrypt a given ciphertext C do:
 Pick r  ZN. Compute C’ = reC = (r  PKCS1(M))
e
.
 Send C’ to web server and use response.
AttackerWeb
Server
dIs this
PKCS1?
ciphertextC=
C
Yes: continue
No: error02
CS -7 RSA and OAEP
Chosen ciphertext security (CCS)
 No efficient attacker can win the following game:
 (with non-negligible advantage)
Page
19
AttackerChallenger
M0, M1
b’{0,1}
Attacker wins if b=b’
C=E(Mb) bR{0,1}
Challenge
Decryptio
n oracle
C
CS -7 RSA and OAEP
PKCS1 V2.0 - OAEP
 New preprocessing function: OAEP (BR94).
 Thm: RSA is trap-door permutation  OAEP is CCS
when H,G are “random oracles”.
 In practice: use SHA-1 or MD5 for H and G.
Page
20
H+
G +
Plaintext to encrypt with RSA
rand.M 01 00..0
Check pad
on decryption.
Reject CT if invalid.
{0,1}n-1
CS -7 RSA and OAEP
OAEP Improvements
 OAEP+: (Shoup’01)
 trap-door permutation F
F-OAEP+ is CCS when
H,G,W are “random oracles”.
 SAEP+: (B’01)
RSA trap-door perm 
RSA-SAEP+ is CCS when
H,W are “random oracle”.
Page
21
R
H+
G +
M W(M,R)
R
H+
M W(M,R)
CS -7 RSA and OAEP
Subtleties in implementing OAEP [M ’00]
OAEP-decrypt(C) {
error = 0;
if ( RSA-1
(C) > 2n-1
)
{ error =1; goto exit; }
if ( pad(OAEP-1
(RSA-1
(C))) != “01000” )
{ error = 1; goto exit; }
Page
22
}
 Problem: timing information leaks type of error.
 Attacker can decrypt any ciphertext C.
 Lesson: Don’t implement RSA-OAEP yourself …
CS -7 RSA and OAEP
Is RSA a one-way permutation?
 To invert the RSA one-way function (without d) attacker must compute:
M from C = Me
(mod N).
 How hard is computing e’th roots modulo N ??
 Best known algorithm:
 Step 1: factor N. (hard)
 Step 2: Find e’th roots modulo p and q. (easy)
Page
23
CS -7 RSA and OAEP
Shortcuts?
 Must one factor N in order to compute e’th roots?
Exists shortcut for breaking RSA without factoring?
 To prove no shortcut exists show a reduction:
 Efficient algorithm for e’th roots mod N
 efficient algorithm for factoring N.
 Oldest problem in public key cryptography.
 Evidence no reduction exists: (BV’98)
 “Algebraic” reduction  factoring is easy.
 Unlike Diffie-Hellman (Maurer’94).
Page
24
CS -7 RSA and OAEP
Improving RSA’s performance
 To speed up RSA decryption use
small private key d. C
d
= M (mod N)
 Wiener87: if d < N0.25 then RSA is insecure.
 BD’98: if d < N0.292 then RSA is insecure
(open: d < N0.5
)
 Insecure: priv. key d can be found from (N,e).
 Small d should never be used.
Page
25
CS -7 RSA and OAEP
Wiener’s attack
 Recall: ed = 1 (mod (N) )
  kZ : ed = k(N) + 1

(N) = N-p-q+1  |N- (N)|  p+q  3N
d  N0.25/3 
Continued fraction expansion of e/N gives k/d.
ed = 1 (mod k)  gcd(d,k)=1
Page
26
e
(N)
k
d
- 
1
d(N)
e
N
k
d
- 
1
2d2
CS -7 RSA and OAEP
RSA With Low public exponent
 To speed up RSA encryption (and sig. verify)
use a small e. C = Me (mod N)
 Minimal value: e=3 ( gcd(e, (N) ) = 1)
 Recommended value: e=65537=216+1
Encryption: 17 mod. multiplies.
 Several weak attacks. Non known on RSA-OAEP.
 Asymmetry of RSA: fast enc. / slow dec.
 ElGamal: approx. same time for both.
Page
27
CS -7 RSA and OAEP
Implementation attacks
 Attack the implementation of RSA.
 Timing attack: (Kocher 97)
The time it takes to compute C
d
(mod N)
can expose d.
 Power attack: (Kocher 99)
The power consumption of a smartcard while
it is computing C
d
(mod N) can expose d.
 Faults attack: (BDL 97)
A computer error during Cd
(mod N)
can expose d.
Page
28OpenSSL defense: check output. 5% slowdown.
CS -7 RSA and OAEP
Key lengths
 Security of public key system should be comparable to security of
block cipher.
NIST:
Cipher key-size Modulus size
 64 bits 512 bits.
80 bits 1024 bits
128 bits 3072 bits.
256 bits (AES) 15360 bits
 High security  very large moduli.
Not necessary with Elliptic Curve Cryptography.
Page
29
CS -7 RSA and OAEP
Thank you
Image Source
searchenterpriseai.techtarget.com
wikipedia

More Related Content

What's hot

What's hot (20)

Presentation about RSA
Presentation about RSAPresentation about RSA
Presentation about RSA
 
Al-Gamal-W6(al gamal)-d1-d2
Al-Gamal-W6(al gamal)-d1-d2Al-Gamal-W6(al gamal)-d1-d2
Al-Gamal-W6(al gamal)-d1-d2
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
RSA
RSARSA
RSA
 
RSA algorithm
RSA algorithmRSA algorithm
RSA algorithm
 
Public Key Algorithms
Public Key AlgorithmsPublic Key Algorithms
Public Key Algorithms
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
RSA Algorithm
RSA AlgorithmRSA Algorithm
RSA Algorithm
 
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
RSA AlgorithmRSA Algorithm
RSA Algorithm
 
Rsa
RsaRsa
Rsa
 
RSA Algorithm report
RSA Algorithm reportRSA Algorithm report
RSA Algorithm report
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
Rsa
RsaRsa
Rsa
 
Information and Network Security
Information and Network SecurityInformation and Network Security
Information and Network Security
 
RSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key CryptographyRSA Algorithm - Public Key Cryptography
RSA Algorithm - Public Key Cryptography
 
Lattice Cryptography
Lattice CryptographyLattice Cryptography
Lattice Cryptography
 
Rsa cryptosystem
Rsa cryptosystemRsa cryptosystem
Rsa cryptosystem
 
Cs8792 cns - Public key cryptosystem (Unit III)
Cs8792   cns - Public key cryptosystem (Unit III)Cs8792   cns - Public key cryptosystem (Unit III)
Cs8792 cns - Public key cryptosystem (Unit III)
 

Similar to Ntewrok secuirty cs7

RSA криптосистем
RSA криптосистемRSA криптосистем
RSA криптосистемsodhero
 
TLS/SSL Internet Security Talk
TLS/SSL Internet Security TalkTLS/SSL Internet Security Talk
TLS/SSL Internet Security TalkNisheed KM
 
RSA & MD5 algorithm
RSA & MD5 algorithmRSA & MD5 algorithm
RSA & MD5 algorithmSiva Rushi
 
Chapter 06 rsa cryptosystem
Chapter 06   rsa cryptosystemChapter 06   rsa cryptosystem
Chapter 06 rsa cryptosystemAnkur Choudhary
 
Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Codemotion
 
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptxRivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptxwerip98386
 
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
 
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docxHW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docxwellesleyterresa
 
Research on RSA
Research on RSAResearch on RSA
Research on RSAfaizmajeed
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemcsandit
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemcsandit
 

Similar to Ntewrok secuirty cs7 (20)

rsa.ppt
rsa.pptrsa.ppt
rsa.ppt
 
rsa.ppt
rsa.pptrsa.ppt
rsa.ppt
 
RSA криптосистем
RSA криптосистемRSA криптосистем
RSA криптосистем
 
TLS/SSL Internet Security Talk
TLS/SSL Internet Security TalkTLS/SSL Internet Security Talk
TLS/SSL Internet Security Talk
 
Elliptic curvecryptography Shane Almeida Saqib Awan Dan Palacio
Elliptic curvecryptography Shane Almeida Saqib Awan Dan PalacioElliptic curvecryptography Shane Almeida Saqib Awan Dan Palacio
Elliptic curvecryptography Shane Almeida Saqib Awan Dan Palacio
 
rsa-1
rsa-1rsa-1
rsa-1
 
rsa-1
rsa-1rsa-1
rsa-1
 
rsa-1
rsa-1rsa-1
rsa-1
 
RSA & MD5 algorithm
RSA & MD5 algorithmRSA & MD5 algorithm
RSA & MD5 algorithm
 
Chapter 06 rsa cryptosystem
Chapter 06   rsa cryptosystemChapter 06   rsa cryptosystem
Chapter 06 rsa cryptosystem
 
Introduction to cryptography
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptography
 
Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...
 
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptxRivest Shamir Adleman Algorithm and its variant : DRSA.pptx
Rivest Shamir Adleman Algorithm and its variant : DRSA.pptx
 
Kleptography
KleptographyKleptography
Kleptography
 
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 ...
 
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docxHW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docx
 
Research on RSA
Research on RSAResearch on RSA
Research on RSA
 
Data security using rsa
Data security using rsaData security using rsa
Data security using rsa
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystem
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystem
 

More from Infinity Tech Solutions

Database Management System-session 3-4-5
Database Management System-session 3-4-5Database Management System-session 3-4-5
Database Management System-session 3-4-5Infinity Tech Solutions
 
Main topic 3 problem solving and office automation
Main topic 3 problem solving and office automationMain topic 3 problem solving and office automation
Main topic 3 problem solving and office automationInfinity Tech Solutions
 
Computer memory, Types of programming languages
Computer memory, Types of programming languagesComputer memory, Types of programming languages
Computer memory, Types of programming languagesInfinity Tech Solutions
 
AI/ML/DL/BCT A Revolution in Maritime Sector
AI/ML/DL/BCT A Revolution in Maritime SectorAI/ML/DL/BCT A Revolution in Maritime Sector
AI/ML/DL/BCT A Revolution in Maritime SectorInfinity Tech Solutions
 
Programming with matlab session 5 looping
Programming with matlab session 5 loopingProgramming with matlab session 5 looping
Programming with matlab session 5 loopingInfinity Tech Solutions
 

More from Infinity Tech Solutions (20)

Database management system session 6
Database management system session 6Database management system session 6
Database management system session 6
 
Database management system session 5
Database management system session 5Database management system session 5
Database management system session 5
 
Database Management System-session 3-4-5
Database Management System-session 3-4-5Database Management System-session 3-4-5
Database Management System-session 3-4-5
 
Database Management System-session1-2
Database Management System-session1-2Database Management System-session1-2
Database Management System-session1-2
 
Main topic 3 problem solving and office automation
Main topic 3 problem solving and office automationMain topic 3 problem solving and office automation
Main topic 3 problem solving and office automation
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
E commerce
E commerce E commerce
E commerce
 
E commerce
E commerceE commerce
E commerce
 
Bds session 13 14
Bds session 13 14Bds session 13 14
Bds session 13 14
 
Computer memory, Types of programming languages
Computer memory, Types of programming languagesComputer memory, Types of programming languages
Computer memory, Types of programming languages
 
Basic hardware familiarization
Basic hardware familiarizationBasic hardware familiarization
Basic hardware familiarization
 
User defined functions in matlab
User defined functions in  matlabUser defined functions in  matlab
User defined functions in matlab
 
Programming with matlab session 6
Programming with matlab session 6Programming with matlab session 6
Programming with matlab session 6
 
Programming with matlab session 3 notes
Programming with matlab session 3 notesProgramming with matlab session 3 notes
Programming with matlab session 3 notes
 
AI/ML/DL/BCT A Revolution in Maritime Sector
AI/ML/DL/BCT A Revolution in Maritime SectorAI/ML/DL/BCT A Revolution in Maritime Sector
AI/ML/DL/BCT A Revolution in Maritime Sector
 
Programming with matlab session 5 looping
Programming with matlab session 5 loopingProgramming with matlab session 5 looping
Programming with matlab session 5 looping
 
BIG DATA Session 7 8
BIG DATA Session 7 8BIG DATA Session 7 8
BIG DATA Session 7 8
 
BIG DATA Session 6
BIG DATA Session 6BIG DATA Session 6
BIG DATA Session 6
 
MS word
MS word MS word
MS word
 
DBMS CS 4-5
DBMS CS 4-5DBMS CS 4-5
DBMS CS 4-5
 

Recently uploaded

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
 
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
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
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
 
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
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
(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
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 

Recently uploaded (20)

🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
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...
 
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🔝
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
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
 
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
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
(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...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
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
 

Ntewrok secuirty cs7

  • 2. Session 2 objective CS-6 Revision Previous Session revision CS -7 Model of Asymmetric Key Cryptography CS – 7 Factorization and other methods for Public Key Cryptography CS -7 RSA and OAEP CS-7 Diffe-Hellman Key Exchange and its Security Aspects SUMMARY
  • 3. CS -7 Message authentication & types Model of Asymmetric Key Cryptography
  • 4. CS -7 Message authentication & types Model of Asymmetric Key Cryptography
  • 5. Factors  Factors are the numbers you multiply together to get a product.  For example, the product 24 has several factors.  24 = 1 x 24  24 = 2 x 12  24 = 3 x 8  24 = 4 x 6  SO, the factors are 1, 2, 3, 4, 6, 8, 12, 24 CS -7 Factorization & other methods for PK Cryptography
  • 6. Finding Factors  Start with 1 times the number.  Try 2, 3, 4, etc.  When you repeat your factors, cross out the repeat - you’re done at this point.  If you get doubles (such as 4 x 4), then you’re done. Repeats or doubles let you know you’re done. CS -7 Factorization & other methods for PK Cryptography
  • 7. What are the factors of 16? 1 x 16 2 x 8 3 x ?? 3 is not a factor, so cross it out 4 x 4 doubles = done The factors of 16 are 1,2,4,8,16 CS -7 Factorization & other methods for PK Cryptography
  • 8. Prime and Composite Numbers Prime numbers are numbers that only have two factors: one, and the number itself. EXAMPLES: 3, 5, 7, 11, 31 Composite numbers have more than two factors. EXAMPLES: 6, 15, 18, 30, 100 CS -7 Factorization & other methods for PK Cryptography
  • 9. Example: Prime Factorization of 100. 100 2 X 50 100 ÷ 2 = 50. Two is the first prime number that goes into 100. 2 is a prime number, so we are done with it. Now we deal with the 50. Divide it by 2 to get the next factors. 2 X 25 25 is not divisible by the first prime, 2. The next prime, 3, does not work either. We must divide by 5 to get a factor. 5 x 5 Both numbers are prime, leaving us with all primes. CS -7 Factorization & other methods for PK Cryptography
  • 10. CS -7 RSA and OAEP
  • 11. CS-7 Diffe-Hellman Key Exchange and its Security Aspects
  • 12. The RSA cryptosystem  First published:  Scientific American, Aug. 1977. (after some censorship entanglements)  Currently the “work horse” of Internet security:  Most Public Key Infrastructure (PKI) products.  SSL/TLS: Certificates and key-exchange.  Secure e-mail: PGP, Outlook, … Page 12 CS -7 RSA and OAEP
  • 13. The RSA trapdoor 1-to-1 function  Parameters: N=pq. N 1024 bits. p,q 512 bits. e – encryption exponent. gcd(e, (N) ) = 1 .  1-to-1 function: RSA(M) = Me (mod N) where MZN * Page 13  Trapdoor: d – decryption exponent. Where ed = 1 (mod (N) )  Inversion: RSA(M)d = Med = Mk(N)+1 = M (mod N)  (n,e,t,)-RSA Assumption: For any t-time alg. A: Pr[ A(N,e,x) = x 1/e (N) : ]<  p,q  n-bit primes, Npq, xZN * R R CS -7 RSA and OAEP
  • 14. Textbook RSA is insecure  Textbook RSA encryption:  public key: (N,e) Encrypt: C = M e (mod N)  private key: d Decrypt: Cd = M (mod N) (M  ZN * )  Completely insecure cryptosystem:  Does not satisfy basic definitions of security.  Many attacks exist.  The RSA trapdoor permutation is not a cryptosystem ! Page 14 CS -7 RSA and OAEP
  • 15. A simple attack on textbook RSA  Session-key K is 64 bits. View K  {0,…,264} Eavesdropper sees: C = Ke (mod N) .  Suppose K = K1K2 where K1, K2 < 234 . (prob. 20%) Then: C/K1 e = K2 e (mod N)  Build table: C/1e, C/2e, C/3e, …, C/234e . time: 234 For K2 = 0,…, 234 test if K2 e is in table. time: 23434  Attack time: 240 << 264 Page 15 Web Browser Web Server CLIENT HELLO SERVER HELLO (e,N) d C=RSA(K) Rando m session- key K CS -7 RSA and OAEP
  • 16. Common RSA encryption  Never use textbook RSA.  RSA in practice:  Main question:  How should the preprocessing be done?  Can we argue about security of resulting system? Page 16 msg Preprocessing ciphertext RSA CS -7 RSA and OAEP
  • 17. PKCS1 V1.5  PKCS1 mode 2: (encryption)  Resulting value is RSA encrypted.  Widely deployed in web servers and browsers.  No security analysis !! Page 17 02 random pad FF msg 1024 bits 16 bits CS -7 RSA and OAEP
  • 18. Attack on PKCS1  Bleichenbacher 98. Chosen-ciphertext attack.  PKCS1 used in SSL:  attacker can test if 16 MSBs of plaintext = ’02’.  Attack: to decrypt a given ciphertext C do:  Pick r  ZN. Compute C’ = reC = (r  PKCS1(M)) e .  Send C’ to web server and use response. AttackerWeb Server dIs this PKCS1? ciphertextC= C Yes: continue No: error02 CS -7 RSA and OAEP
  • 19. Chosen ciphertext security (CCS)  No efficient attacker can win the following game:  (with non-negligible advantage) Page 19 AttackerChallenger M0, M1 b’{0,1} Attacker wins if b=b’ C=E(Mb) bR{0,1} Challenge Decryptio n oracle C CS -7 RSA and OAEP
  • 20. PKCS1 V2.0 - OAEP  New preprocessing function: OAEP (BR94).  Thm: RSA is trap-door permutation  OAEP is CCS when H,G are “random oracles”.  In practice: use SHA-1 or MD5 for H and G. Page 20 H+ G + Plaintext to encrypt with RSA rand.M 01 00..0 Check pad on decryption. Reject CT if invalid. {0,1}n-1 CS -7 RSA and OAEP
  • 21. OAEP Improvements  OAEP+: (Shoup’01)  trap-door permutation F F-OAEP+ is CCS when H,G,W are “random oracles”.  SAEP+: (B’01) RSA trap-door perm  RSA-SAEP+ is CCS when H,W are “random oracle”. Page 21 R H+ G + M W(M,R) R H+ M W(M,R) CS -7 RSA and OAEP
  • 22. Subtleties in implementing OAEP [M ’00] OAEP-decrypt(C) { error = 0; if ( RSA-1 (C) > 2n-1 ) { error =1; goto exit; } if ( pad(OAEP-1 (RSA-1 (C))) != “01000” ) { error = 1; goto exit; } Page 22 }  Problem: timing information leaks type of error.  Attacker can decrypt any ciphertext C.  Lesson: Don’t implement RSA-OAEP yourself … CS -7 RSA and OAEP
  • 23. Is RSA a one-way permutation?  To invert the RSA one-way function (without d) attacker must compute: M from C = Me (mod N).  How hard is computing e’th roots modulo N ??  Best known algorithm:  Step 1: factor N. (hard)  Step 2: Find e’th roots modulo p and q. (easy) Page 23 CS -7 RSA and OAEP
  • 24. Shortcuts?  Must one factor N in order to compute e’th roots? Exists shortcut for breaking RSA without factoring?  To prove no shortcut exists show a reduction:  Efficient algorithm for e’th roots mod N  efficient algorithm for factoring N.  Oldest problem in public key cryptography.  Evidence no reduction exists: (BV’98)  “Algebraic” reduction  factoring is easy.  Unlike Diffie-Hellman (Maurer’94). Page 24 CS -7 RSA and OAEP
  • 25. Improving RSA’s performance  To speed up RSA decryption use small private key d. C d = M (mod N)  Wiener87: if d < N0.25 then RSA is insecure.  BD’98: if d < N0.292 then RSA is insecure (open: d < N0.5 )  Insecure: priv. key d can be found from (N,e).  Small d should never be used. Page 25 CS -7 RSA and OAEP
  • 26. Wiener’s attack  Recall: ed = 1 (mod (N) )   kZ : ed = k(N) + 1  (N) = N-p-q+1  |N- (N)|  p+q  3N d  N0.25/3  Continued fraction expansion of e/N gives k/d. ed = 1 (mod k)  gcd(d,k)=1 Page 26 e (N) k d -  1 d(N) e N k d -  1 2d2 CS -7 RSA and OAEP
  • 27. RSA With Low public exponent  To speed up RSA encryption (and sig. verify) use a small e. C = Me (mod N)  Minimal value: e=3 ( gcd(e, (N) ) = 1)  Recommended value: e=65537=216+1 Encryption: 17 mod. multiplies.  Several weak attacks. Non known on RSA-OAEP.  Asymmetry of RSA: fast enc. / slow dec.  ElGamal: approx. same time for both. Page 27 CS -7 RSA and OAEP
  • 28. Implementation attacks  Attack the implementation of RSA.  Timing attack: (Kocher 97) The time it takes to compute C d (mod N) can expose d.  Power attack: (Kocher 99) The power consumption of a smartcard while it is computing C d (mod N) can expose d.  Faults attack: (BDL 97) A computer error during Cd (mod N) can expose d. Page 28OpenSSL defense: check output. 5% slowdown. CS -7 RSA and OAEP
  • 29. Key lengths  Security of public key system should be comparable to security of block cipher. NIST: Cipher key-size Modulus size  64 bits 512 bits. 80 bits 1024 bits 128 bits 3072 bits. 256 bits (AES) 15360 bits  High security  very large moduli. Not necessary with Elliptic Curve Cryptography. Page 29 CS -7 RSA and OAEP