Information Security -- Part II Asymmetric Ciphers Frank Yeong-Sung Lin Information Management Department National Taiwan University.

Slides:



Advertisements
Similar presentations
Public Key Algorithms …….. RAIT M. Chatterjee.
Advertisements

Dr. Lo’ai Tawalbeh Summer 2007 Chapter 9 – Public Key Cryptography and RSA Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus INCS.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
Cryptography and Network Security Chapter 9. Chapter 9 – Public Key Cryptography and RSA Every Egyptian received two names, which were known respectively.
Public Key Cryptography and the RSA Algorithm
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Theory I Algorithm Design and Analysis (9 – Randomized algorithms) Prof. Dr. Th. Ottmann.
Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender and receiver if this key is disclosed communications.
Chapter3 Public-Key Cryptography and Message Authentication.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
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.
1 Pertemuan 08 Public Key Cryptography Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Public Key Cryptography RSA Diffie Hellman Key Management Based on slides by Dr. Lawrie Brown of the Australian Defence Force Academy, University College,
The RSA Algorithm JooSeok Song Tue.
ASYMMETRIC CIPHERS.
Introduction to Public Key Cryptography
Public Key Model 8. Cryptography part 2.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
1 Public-Key Cryptography and Message Authentication Ola Flygt Växjö University, Sweden
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 21 “Public-Key Cryptography.
Prime Numbers Prime numbers only have divisors of 1 and self
Cryptography A little number theory Public/private key cryptography –Based on slides of William Stallings and Lawrie Brown.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
Network and Communications Network Security Department of Computer Science Virginia Commonwealth University.
J. Wang. Computer Network Security Theory and Practice. Springer 2008 Chapter 3 Public-Key Cryptography and Key Management.
Applied Cryptography (Public Key) RSA. Public Key Cryptography Every Egyptian received two names, which were known respectively as the true name and the.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
1 Information Security Frank Yeong-Sung Lin Department of Information Management National Taiwan University EMBA 2009 – Information Systems and Applications.
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.
BASIC CRYPTOGRAPHIC CONCEPTS. Public Key Cryptography  Uses two keys for every simplex logical communication link.  Public key  Private key  The use.
Chapter 21 Public-Key Cryptography and Message Authentication.
Information Security -- Part II Public-Key Encryption and Hash Functions Frank Yeong-Sung Lin Information Management Department National Taiwan University.
Private-Key Cryptography  traditional private/secret/single key cryptography uses one key  shared by both sender and receiver  if this key is disclosed.
Public-Key Encryption
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
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.
Computer and Network Security Rabie A. Ramadan Lecture 6.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
YSLInformation Security -- Public-Key Cryptography1 Prime and Relatively Prime Numbers Divisors: We say that b  0 divides a if a = mb for some m, where.
1 Network Security Frank Yeong-Sung Lin Department of Information Management National Taiwan University.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Cryptography and Network Security Public Key Cryptography and RSA.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
Information Security -- Part II Public-Key Encryption and Hash Functions Frank Yeong-Sung Lin Information Management Department National Taiwan University.
Public Key Cryptosystems RSA Diffie-Hellman Department of Computer Engineering Sharif University of Technology 3/8/2006.
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
Fall 2002CS 395: Computer Security1 Chapter 9: Public Key Cryptography.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9 PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9 Principles Applications Requirements RSA Algorithm Description.
Key Management Network Systems Security Mort Anvari.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Computer Security Lecture 5 Ch.9 Public-Key Cryptography And RSA Prepared by Dr. Lamiaa Elshenawy.
Lecture 3 (Chapter 9) Public-Key Cryptography and RSA Prepared by Dr. Lamiaa M. Elshenawy 1.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
ECE454/599 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2012.
Chapter 9 – Public Key Cryptography and RSA Every Egyptian received two names, which were known respectively as the true name and the good name, or the.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
CSEN 1001 Computer and Network Security Amr El Mougy Mouaz ElAbsawi.
CPIS 312 Chapter Four: PUBLIC KEY CRYPTO. Index 2 A.Introduction A.1 Asymmetric Key Cryptography- Introduction A.2 General ideas about the Public Key.
@Yuan Xue CS 285 Network Security Public-Key Cryptography Yuan Xue Fall 2012.
Public Key Encryption Major topics The RSA scheme was devised in 1978
Private-Key Cryptography
Frank Yeong-Sung Lin Information Management Department
PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9
Introduction to Cryptography
Presentation transcript:

Information Security -- Part II Asymmetric Ciphers Frank Yeong-Sung Lin Information Management Department National Taiwan University

Outline Introduction to information security Introduction to public-key cryptosystems RSA Diffie-Hellman key exchange ECC Mutual trust –Key management –User authentication YSLInformation Security -- Public-Key Cryptography2

3 Areas Considered by Info. Security Secrecy (Confidentiality): keep information unrevealed Authentication: determine the identity of whom you are talking to Nonrepudiation: make sure that someone cannot deny the things he/she had done Integrity control: make sure the message you received has not been modified Availability: make sure the resource be available for authorized personnel when needed YSLInformation Security -- Public-Key Cryptography

4 Essential Concepts for Info. Security Risk management –threats, vulnerabilities, assets, damages and probabilities –balancing acts –all cryptosystems may be compromised (trade-off between overhead and expected time span of protection) Notion of chains (Achilles' heel) Notion of buckets (products, policies, processes and people) Defense in-depth Average vs. worst cases Backup, restoration and contingency plans YSLInformation Security -- Public-Key Cryptography

5 A Number of Interesting Ciphers Chinese poems Clubs and leather stripes Invisible ink (steganography in general) Books Code books Enigma XOR (can be considered as an example of symmetric cryptosystems) Ej/vu3z8h96 Scramblers (physical and application layers) YSLInformation Security -- Public-Key Cryptography

YSLInformation Security -- Public-Key Cryptography6 Principles of Public-Key Cryptosystems

YSLInformation Security -- Public-Key Cryptography7 Principles of Public-Key Cryptosystems (cont’d) Requirements for PKC –easy for B (receiver) to generate KU b and KR b –easy for A (sender) to calculate C = E KUb (M) –easy for B to calculate M = D KRb (C) = D KRb (E KUb (M)) –infeasible for an opponent to calculate KR b from KU b –infeasible for an opponent to calculate M from C and KU b –(useful but not necessary) M = D KRb (E KUb (M)) = E KUb (D KRb (M)) (true for RSA and good for authentication)

YSLInformation Security -- Public-Key Cryptography8 Principles of Public-Key Cryptosystems (cont’d)

YSLInformation Security -- Public-Key Cryptography9 Principles of Public-Key Cryptosystems (cont’d) The idea of PKC was first proposed by Diffie and Hellman in Two keys (public and private) are needed. The difficulty of calculating f -1 is typically facilitated by –factorization of large numbers –resolution of NP-completeness –calculation of discrete logarithms High complexity confines PKC to key management and signature applications

YSLInformation Security -- Public-Key Cryptography10 Principles of Public-Key Cryptosystems (cont’d)

YSLInformation Security -- Public-Key Cryptography11 Principles of Public-Key Cryptosystems (cont’d)

YSLInformation Security -- Public-Key Cryptography12 Principles of Public-Key Cryptosystems (cont’d) Comparison between conventional and public-key encryption

YSLInformation Security -- Public-Key Cryptography13 Principles of Public-Key Cryptosystems (cont’d) Applications for PKC –encryption/decryption –digital signature –key exchange

YSLInformation Security -- Public-Key Cryptography14 Principles of Public-Key Cryptosystems (cont’d)

YSLInformation Security -- Public-Key Cryptography15 Principles of Public-Key Cryptosystems (cont’d)

YSLInformation Security -- Public-Key Cryptography16 Principles of Public-Key Cryptosystems (cont’d)

YSLInformation Security -- Public-Key Cryptography17 The RSA Algorithm Developed by Rivest, Shamir, and Adleman at MIT in 1978 First well accepted and widely adopted PKC algorithm Security based on the difficulty of factoring large numbers Patent expired in 2001

YSLInformation Security -- Public-Key Cryptography18 The RSA Algorithm (cont’d) * 互質,又稱互素。若 N 個整數的最大公因數是 1 ,則稱這 N 個整數互質。 *

YSLInformation Security -- Public-Key Cryptography19 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography20 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography21 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography22 The RSA Algorithm (cont’d) Primes under 2000

YSLInformation Security -- Public-Key Cryptography23 The RSA Algorithm (cont’d) The above statement is referred to as the prime number theorem, which was proven in 1896 by Hadaward and Poussin.

YSLInformation Security -- Public-Key Cryptography24 The RSA Algorithm (cont’d) Whether there exists a simple formula to generate prime numbers? An ancient Chinese mathematician conjectured that if n divides 2 n - 2 then n is prime. For n = 3, 3 divides 6 and n is prime. However, for n = 341 = 11  31, n dives Mersenne suggested that if p is prime then M p = 2 p - 1 is prime. This type of primes are referred to as Mersenne primes*. Unfortunately, for p = 11, M 11 = = 2047 = 23  89.

YSLInformation Security -- Public-Key Cryptography25 The RSA Algorithm (cont’d) *In mathematics, a Mersenne number is a positive integer that is one less than a power of two: M n = 2 n – 1. Some definitions of Mersenne numbers require that the exponent n be prime. A Mersenne prime is a Mersenne number that is prime. As of September 2008, only 46 Mersenne primes are known; the largest known prime number (2 43,112,609 − 1) is a Mersenne prime, and in modern times, the largest known prime has almost always been a Mersenne prime. Like several previously-discovered Mersenne primes, it was discovered by a distributed computing project on the Internet, known as the Great Internet Mersenne Prime Search (GIMPS). It was the first known prime number with more than 10 million digits.

YSLInformation Security -- Public-Key Cryptography26 The RSA Algorithm (cont’d) Fermat conjectured that if F n = 2 2 n + 1, where n is a non-negative integer, then F n is prime. When n is less than or equal to 4, F 0 = 3, F 1 = 5, F 2 = 17, F 3 = 257 and F 4 = are all primes. However, F 5 = = 641  is not a prime number. n n is valid only for n < 80. There are an infinite number of primes of the form 4n + 1 or 4n + 3. There is no simple way so far to gererate prime numbers.

YSLInformation Security -- Public-Key Cryptography27 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography28 The RSA Algorithm (cont’d) Prime gap: displacement between two consecutive prime numbers –0 the smallest –unbounded from above –n!+2 (devisable by 2), n!+3 (devisable by 3, n!+4 (devisable by 4),…, n!+n (devisable by n) are not prime

YSLInformation Security -- Public-Key Cryptography29 The RSA Algorithm (cont’d) Format’s Little Theorem (to be proven later): If p is prime and a is a positive integer not divisible by p, then a p-1  1 mod p. Example: a = 7, p = = 49  11 mod = 121  7 mod = 49  11 mod = 121  7 mod 19 a p-1 = 7 18 =  7  11  1 mod 19

YSLInformation Security -- Public-Key Cryptography30 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography31 The RSA Algorithm (cont’d) A = M+ip for a non-negative integer i. A = M+jq for a non-negative integer j. From the above two equations, ip = jq. Then, i = kq. Consequently, A = M+ip = M+kpq. Q.E.D. (quod erat demonstrandum)

YSLInformation Security -- Public-Key Cryptography32 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography33 The RSA Algorithm (cont’d) Example 1 –Select two prime numbers, p = 7 and q = 17. –Calculate n = p  q = 7  17 = 119. –Calculate Φ(n) = (p-1)(q-1) = 96. –Select e such that e is relatively prime to Φ(n) = 96 and less than Φ ( n); in this case, e = 5. –Determine d such that d  e  1 mod 96 and d < 96.The correct value is d = 77, because 77  5 = 385 = 4  96+1.

YSLInformation Security -- Public-Key Cryptography34 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography35 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography36 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography37 The RSA Algorithm (cont’d) Key generation –determining two large prime numbers, p and q –selecting either e or d and calculating the other Probabilistic algorithm to generate primes –[1] Pick an odd integer n at random. –[2] Pick an integer a < n (a is clearly not divisible by n) at random. –[3] Perform the probabilistic primality test, such as Miller-Rabin. If n fails the test, reject the value n and go to [1]. –[4] If n has passed a sufficient number of tests, accept n; otherwise, go to [2].

YSLInformation Security -- Public-Key Cryptography38 The RSA Algorithm (cont’d) How may trials on the average are required to find a prime? –from the prime number theory, primes near n are spaced on the average one every (ln n) integers –even numbers can be immediately rejected –for a prime on the order of 2 200, about (ln )/2 = 70 trials are required To calculate e, what is the probability that a random number is relatively prime to Φ(n)? About 0.6.

YSLInformation Security -- Public-Key Cryptography39 The RSA Algorithm (cont’d) For fixed length keys, how many primes can be chosen? –for 64-bit keys, 2 64 /ln /ln 2 63  2.05  –for 128- and 256-bit keys, 1.9  and 3.25  10 74, respectively, are available For fixed length keys, what is the probability that a randomly selected odd number a is prime? –for 64-bit keys, 2.05  /(0.5  ( ))  (expectation value: 1/0.044  23) –for 128- and 256-bit keys, and 0.011, respectively

YSLInformation Security -- Public-Key Cryptography40 The RSA Algorithm (cont’d) The security of RSA –brute force: This involves trying all possible private keys. –mathematical attacks: There are several approaches, all equivalent in effect to factoring the product of two primes. –timing attacks: These depend on the running time of the decryption algorithm.

YSLInformation Security -- Public-Key Cryptography41 The RSA Algorithm (cont’d) To avoid brute force attacks, a large key space is required. To make n difficult to factor –p and q should differ in length by only a few digits (both in the range of to ) –both (p-1) and (q-1) should contain a large prime factor –gcd(p-1,q-1) should be small –should avoid e << n and d < n 1/4

YSLInformation Security -- Public-Key Cryptography42 The RSA Algorithm (cont’d) To make n difficult to factor (cont’d) –p and q should best be strong primes, where p is a strong prime if there exist two large primes p 1 and p 2 such that p 1 |p-1 and p 2 |p+1 there exist four large primes r 1, s 1, r 2 and s 2 such that r 1 |p 1 -1, s 1 |p 1 +1, r 2 |p 2 -1 and s 2 |p 2 +1 –e should not be too small, e.g. for e = 3 and C = M 3 mod n, if M 3 < n then M can be easily calculated

YSLInformation Security -- Public-Key Cryptography43 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography44 The RSA Algorithm (cont’d) Major threats –the continuing increase in computing power (100 or even 1000 MIPS machines are easily available) –continuing refinement of factoring algorithms (from QS to GNFS and to SNFS)

YSLInformation Security -- Public-Key Cryptography45 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography46 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography47 The RSA Algorithm (cont’d)

YSLInformation Security -- Public-Key Cryptography48 Diffie-Hellman Key Exchange First public-key algorithm published Limited to key exchange Dependent for its effectiveness on the difficulty of computing discrete logarithm

YSLInformation Security -- Public-Key Cryptography49 Diffie-Hellman Key Exchange (cont’d) Define a primitive root of of a prime number p as one whose powers generate all the integers from 1 to p-1. If a is a primitive root of the prime number p, then the numbers a mod p, a 2 mod p, …, a p-1 mod p are distinct and consist of the integers from 1 to p- 1 in some permutation. Not every number has a primitive root. For example, 2 is a primitive root of 5, but 4 is not.

YSLInformation Security -- Public-Key Cryptography50 Diffie-Hellman Key Exchange (cont’d) For any integer b and a primitive root a of prime number p, one can find a unique exponent i such that b = a i mod p, where 0  i  (p-1). The exponent i is referred to as the discrete logarithm, or index, of b for the base a, mod p. This value is denoted as ind a,p (b) (dlog a,p (b)).

YSLInformation Security -- Public-Key Cryptography51 Diffie-Hellman Key Exchange (cont’d)

YSLInformation Security -- Public-Key Cryptography52 Diffie-Hellman Key Exchange (cont’d) Example: q = 97 and a primitive root a = 5 is selected. X A = 36 and X B = 58 (both < 97). Y A = 5 36 = 50 mod 97 and Y B = 5 58 = 44 mod 97. K = (Y B ) X A mod 97 = mod 97 = 75 mod 97. K = (Y A ) X B mod 97 = mod 97 = 75 mod cannot easily be computed by the opponent.

YSLInformation Security -- Public-Key Cryptography53 Diffie-Hellman Key Exchange (cont’d) How the algorithm works

YSLInformation Security -- Public-Key Cryptography54 Diffie-Hellman Key Exchange (cont’d)

YSLInformation Security -- Public-Key Cryptography55 Diffie-Hellman Key Exchange (cont’d) q, a, Y A and Y B are public. To attack the secrete key of user B, the opponent must compute X B = ind a,q (Y B ). [Y B = a X B mod q.] The effectiveness of this algorithm therefore depends on the difficulty of solving discrete logarithm.

YSLInformation Security -- Public-Key Cryptography56 Diffie-Hellman Key Exchange (cont’d) Bucket brigade (Man-in-the-middle) attack Alice Trudy 3 1  z mod q q, ,  x mod q –(  xz mod q) becomes the secret key between Alice and Trudy, while (  yz mod q) becomes the secret key between Trudy and Bob. Bob 4 2  y mod q q, ,  z mod q Alice picks x Trudy picks z Bob picks y