CSE331: Introduction to Networks and Security Lecture 20 Fall 2002.

Slides:



Advertisements
Similar presentations
RSA.
Advertisements

CSE331: Introduction to Networks and Security Lecture 19 Fall 2002.
Data encryption with big prime numbers
22C:19 Discrete Structures Integers and Modular Arithmetic
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Lecture 3.3: Public Key Cryptography III CS 436/636/736 Spring 2012 Nitesh Saxena.
7. Asymmetric encryption-
Great Theoretical Ideas in Computer Science.
Session 4 Asymmetric ciphers.
Foundations of Network and Computer Security J J ohn Black Lecture #10 Sep 18 th 2009 CSCI 6268/TLEN 5550, Fall 2009.
CNS2010handout 8 :: introduction to number theory1 computer and network security matt barrie.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CSE331: Introduction to Networks and Security Lecture 21 Fall 2002.
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
Dr. Lo’ai Tawalbeh Fall 2005 Chapter 10 – Key Management; Other Public Key Cryptosystems Dr. Lo’ai Tawalbeh Computer Engineering Department Jordan University.
1 Lecture #10 Public Key Algorithms HAIT Summer 2005 Shimrit Tzur-David.
CS470, A.SelcukPublic Key Cryptography1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
Csci5233 Computer Security & Integrity 1 Cryptography: Basics (2)
Cryptography & Number Theory
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
The School of Electrical Engineering and Computer Science (EECS) CS/ECE Network Security Dr. Attila Altay Yavuz Topic 5 Essential Public Key Crypto Methods.
Dr.Saleem Al_Zoubi1 Cryptography and Network Security Third Edition by William Stallings Public Key Cryptography and RSA.
Public Key Algorithms 4/17/2017 M. Chatterjee.
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
Diffie-Hellman Key Exchange
ASYMMETRIC CIPHERS.
Lecture 6: Public Key Cryptography
Public Key Model 8. Cryptography part 2.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Network and Communications Network Security Department of Computer Science Virginia Commonwealth University.
Lecture 7b: The Diffie-Hellman Secret Sharing Scheme Wayne Patterson SYCS 653 Fall 2009.
J. Wang. Computer Network Security Theory and Practice. Springer 2008 Chapter 3 Public-Key Cryptography and Key Management.
Great Theoretical Ideas in Computer Science.
HW6 due tomorrow Teams T will get to pick their presentation day in the order Teams T will get to pick their presentation day in the order Teams mostly.
Cryptography Dec 29. This Lecture In this last lecture for number theory, we will see probably the most important application of number theory in computer.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Midterm Review Cryptography & Network Security
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Public-Key Cryptography and Message Authentication.
RSA Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
MA/CSSE 473 Day 10 Primality testing summary Data Encryption RSA.
Discrete Logarithm(s) (DLs) Fix a prime p. Let a, b be nonzero integers (mod p). The problem of finding x such that a x ≡ b (mod p) is called the discrete.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
1 Network and Computer Security (CS 475) Modular Arithmetic and the RSA Public Key Cryptosystem Jeremy R. Johnson.
Public Key Cryptosystems RSA Diffie-Hellman Department of Computer Engineering Sharif University of Technology 3/8/2006.
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Diffie-Hellman Key Exchange Color Mixing Example Rick Stroud 21 September 2015 CSCE 522.
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
Ch1 - Algorithms with numbers Basic arithmetic Basic arithmetic Addition Addition Multiplication Multiplication Division Division Modular arithmetic Modular.
Key Management Network Systems Security Mort Anvari.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Great Theoretical Ideas in Computer Science.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Data encryption with big prime numbers DANIEL FREEMAN, SLU.
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
Foundations of Network and Computer Security J J ohn Black CSCI 6268/TLEN 5550, Spring 2014.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Number Theory and Euclidean Algorithm
Systems Architecture I
Discrete Math for CS CMPSC 360 LECTURE 14 Last time:
Presentation transcript:

CSE331: Introduction to Networks and Security Lecture 20 Fall 2002

CSE331 Fall Announcements Reminder: Project 2 is due Monday, Oct. 28 th Final Exam: Tuesday, Dec. 17 – 8:30-10:30am –Room to be determined

CSE331 Fall Recap RSA Today: –Finish up RSA –Basic Security Protocols

CSE331 Fall Fermat’s Little Theorem Generalized by Euler. Theorem: If gcd(a,n) = 1 then a  (n) mod n = 1. Easy to compute a -1 mod n –a -1 mod n = a  (n)-1 mod n –Why? a * a  (n)-1 mod n = a  (n)-1+1 mod n = a  (n) mod n = 1

CSE331 Fall RSA Key Generation Choose large primes p and q. –Should be roughly equal length (in bits) Let n = p*q Choose a random encryption exponent e –With requirement: e and (p-1)*(q-1) are relatively prime. Derive the decryption exponent d –d = e -1 mod ((p-1)*(q-1)) –d is e’s inverse mod ((p-1)*(q-1)) Public key: K = (e,n) pair of e and n Private key: k = (d,n) Discard primes p and q (they’re not needed anymore)

CSE331 Fall RSA Encryption and Decryption Message: m Assume m < n –If not, break up message into smaller chunks –Good choice: largest power of 2 smaller than n Encryption: E((e,n), m) = m e mod n Decryption: D((d,n), c) = c d mod n

CSE331 Fall Proof that D inverts E c d mod n = (m e ) d mod n(definition of c) = m ed mod n(arithmetic) = m k*(p-1)*(q-1) + 1 mod n(d inverts e) = m*m k*(p-1)*(q-1) mod n(arithmetic) = m*1 mod n(Fermat) = m (m < n)

CSE331 Fall Chinese Remainder Theorem Suppose: –p and q are relatively prime –a  b (mod p) –a  b (mod q) Then: a  b (mod p*q) Proof: –p divides (a-b) (because a mod p = b mod p) –q divides (a-b) –Since p, q are relatively prime, p*q divides (a-b) –But that is the same as: a  b (mod p*q)

CSE331 Fall Finished Proof Note: m p-1  1 mod p (if p doesn’t divide m) Implies: m k*  (n)+1  m mod p –Also holds for m = a*p Same argument yields: m k*  (n)+1  m mod q Chinese Remainder Theorem implies: m k*  (n)+1  m mod n

CSE331 Fall Cryptographic Protocols Consider communication over a network… What is the threat model? –What are the vulnerabilities? SR T SenderTransmission MediumReceiver O Interceptor

CSE331 Fall What Can the Observer Do? Intercept them (confidentiality) Modify them (integrity) Fabricate other messages (integrity) Replay them (integrity) Block the messages (availability) Delay the messages (availability) Cut the wire (availability) Flood the network (availability)

CSE331 Fall Diffie-Hellman Key Exchange Problem with shared-key systems: Distributing the shared key Suppose that Alice and Bart want to agree on a secret (i.e. a key) –Communication link is public –They don’t already share any secrets

CSE331 Fall Diffie-Hellman by Analogy: Paint AliceBart “Let’s use yellow” “OK, yellow.” 1.Alice & Bart decide on a public color, and mix one liter of that color. 2.They each choose a random secret color, and mix two liters of their secret color. 3.They keep one liter of their secret color, and mix the other with the public color. 2.They each choose a random secret color, and mix two liters of their secret color. 3.They keep one liter of their secret color, and mix the other with the public color. 2.They each choose a random secret color, and mix two liters of their secret color.

CSE331 Fall Diffie-Hellman by Analogy: Paint AliceBart 4. They exchange the mixtures over the public channel. 5.When they get the other person’s mixture, they combine it with their retained secret color. 6. The secret is the resulting color: Public + Alice’s + Bart’s

CSE331 Fall Diffie-Hellman Key Exchange Choose a prime p (publicly known) –Should be about 512 bits or more Pick g < p (also public) –g must be a primitive root of p. –A primitive root generates the finite field p. –Every n in {1, 2, …, p-1} can be written as g k mod p –Example: 2 is a primitive root of 5 –2 0 = = = = 4 (mod 5) –Intuitively means that it’s hard to take logarithms base g because there are many candidates.

CSE331 Fall Diffie-Hellman AliceBart 1.Alice & Bart decide on a public prime p and primitive root g. “Let’s use (p, g)” “OK” 2.Alice chooses secret number A. Bart chooses secret number B 3.Alice sends Bart g A mod p. g A mod p g B mod p 4.The shared secret is g AB mod p.

CSE331 Fall Details of Diffie-Hellman Alice computes g AB mod p because she knows A: –g AB mod p = (g B mod p) A mod p An eavesdropper gets g A mod p and g B mod p –They can easily calculate g A+B mod p but that doesn’t help. –The problem of computing discrete logarithms (to recover A from g A mod p is hard.

CSE331 Fall Example Alice and Bart agree that q=71 and g=7. Alice selects a private key A=5 and calculates a public key g A  7 5  51 (mod 71). She sends this to Bart. Bart selects a private key B=12 and calculates a public key g B  7 12  4 (mod 71). He sends this to Alice. Alice calculates the shared secret: S  (g B ) A  4 5  30 (mod 71) Bart calculates the shared secret S  (g A ) B   30 (mod 71)

CSE331 Fall Why Does it Work? Security is provided by the difficulty of calculating discrete logarithms. Feasibility is provided by –The ability to find large primes. –The ability to find primitive roots for large primes. –The ability to do efficient modular arithmetic. Correctness is an immediate consequence of basic facts about modular arithmetic.