Chapter 3 Encryption Algorithms & Systems (Part B)

Slides:



Advertisements
Similar presentations
RSA COSC 201 ST. MARY’S COLLEGE OF MARYLAND FALL 2012 RSA.
Advertisements

Data Security 1 El_Gamal Cryptography. Data Security2 Introduction El_Gamal is a public-key cryptosystem technique El_Gamal is a public-key cryptosystem.
1 The RSA Algorithm Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
RSA ( Rivest, Shamir, Adleman) Public Key Cryptosystem
COMP 170 L2 Page 1 Part 2 of Course Chapter 2 of Textbook.
Public Key Cryptography
Csci5233 Computer Security & Integrity 1 Cryptography: Basics (2)
Public Encryption: RSA
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
Chapter 3 Encryption Algorithms & Systems (Part C)
Dr.Saleem Al_Zoubi1 Cryptography and Network Security Third Edition by William Stallings Public Key Cryptography and RSA.
Public Key Cryptography Bryan Pearsaul. Outline What is Cryptology? Symmetric Ciphers Asymmetric Ciphers Diffie-Hellman RSA (Rivest/Shamir/Adleman) Moral.
“RSA”. RSA  by Rivest, Shamir & Adleman of MIT in 1977  best known & widely used public-key scheme  RSA is a block cipher, plain & cipher text are.
Public Key Model 8. Cryptography part 2.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
Lecture 5 Overview Does DES Work? Differential Cryptanalysis Idea – Use two plaintext that barely differ – Study the difference in the corresponding.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
CSCI 398 Research Topics in Computer Science Yana Kortsarts Computer Science Department Widener University Chester, PA.
Rachana Y. Patil 1 1.
©Brooks/Cole, 2003 Chapter 16 Security. ©Brooks/Cole, 2003 Define four aspects of security in a network: privacy, authentication, integrity, and nonrepudiation.
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
10.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 10 Symmetric-Key Cryptography.
Computer System Security CSE 5339/7339
Merkle-Hellman Knapsack Cryptosystem Merkle offered $100 award for breaking singly - iterated knapsack Singly-iterated Merkle - Hellman KC was broken by.
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.
RSA Ramki Thurimella.
T TT The Cryptography Istituto Tecnico Industriale “E.Divini” San Severino Marche.
Cryptography: RSA & DES Marcia Noel Ken Roe Jaime Buccheri.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Public-Key Cryptography CS110 Fall Conventional Encryption.
Public Key Encryption CS432 – Security in Computing Copyright © 2005, 2008 by Scott Orr and the Trustees of Indiana University.
Day 37 8: Network Security8-1. 8: Network Security8-2 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key:
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
A Method for Obtaining Digital Signatures and Public-key Cryptosystems
Section 4.4: The RSA Cryptosystem Practice HW Handwritten and Maple Exercises p at end of class notes.
Darci Miyashiro Math 480 April 29, 2013
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
8.6. Knapsack Ciphers. The Concept At the core of the Knapsack cipher is the Knapsack problem: At the core of the Knapsack cipher is the Knapsack problem:
Chapter 3 Encryption Algorithms & Systems. csci5233 computer security & integrity (Chap. 3) 2 Outline NP-completeness & Encryption Symmetric (secret key)
Merkle-Hellman Knapsack Cryptosystem
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Public Key Systems 1 Merkle-Hellman Knapsack Public Key Systems 2 Merkle-Hellman Knapsack  One of first public key systems  Based on NP-complete problem.
Cryptography & Network Security : Topic Seminar Description & Analysis Madhava.N 1RV06SCN05 2 nd Semester M.Tech CNE RVCE RSA ALGORITHM.
24-Nov-15Security Cryptography Cryptography is the science and art of transforming messages to make them secure and immune to attacks. It involves plaintext,
Network Security Lecture 18 Presented by: Dr. Munam Ali Shah.
Chapter 3 Encryption Algorithms & Systems (Part D)
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.
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
Public Key Cryptosystem Introduced in 1976 by Diffie and Hellman [2] In PKC different keys are used for encryption and decryption 1978: First Two Implementations.
Computer Security Lecture 5 Ch.9 Public-Key Cryptography And RSA Prepared by Dr. Lamiaa Elshenawy.
Introduction to Elliptic Curves CSCI 5857: Encoding and Encryption.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
Public Key Cryptosystem In Symmetric or Private Key cryptosystems the encryption and decryption keys are either the same or can be easily found from each.
Lecture 6. RSA Use in Encryption to encrypt a message M the sender: – obtains public key of recipient PU={e,n} – computes: C = M e mod n, where 0≤M
Public Key Encryption.
Public Key Cryptosystem
Network Security Design Fundamentals Lecture-13
Input: A={a1, a2, … an} – public key, S - ciphertext
Poking Holes in Knapsack Cryptosystems
Cryptography: Basics (2)
Cryptology Design Fundamentals
Network Security Design Fundamentals Lecture-13
Presentation transcript:

Chapter 3 Encryption Algorithms & Systems (Part B)

csci5233 computer security & integrity (Chap. 3) 2 Outline

csci5233 computer security & integrity (Chap. 3) 3 Merkle-Hellman Knapsacks A public key cryptosystem The public key is the set of integers of a knapsack problem (the general knapsack); the private key is a corresponding superincreasing knapsack (or simple knapsack). A sample general knapsack: (17, 38, 73, 4, 11, 1) A sample superincreasing knapsack: (1, 4, 11, 17, 38, 73), where each item a k is greater than the sum of all the previous items. Merkle and Hellman provided an algorithm for the receiver to use a superincreasing knapsack (the private key) to decrypt the ciphertext.

csci5233 computer security & integrity (Chap. 3) 4 Merkle-Hellman Knapsacks Basic idea: To encode a binary message as a solution to a knapsack problem, reducing the ciphertext to the target sum obtained by adding terms corresponding to the 1s in the plaintext. Example: Fig. 3-5, p.84 Two kinds of knapsacks: Simple (superincreasing) knapsack Hard (general) knapsack

csci5233 computer security & integrity (Chap. 3) 5 Solving a simple knapsack problem Given a superincreasing knapsack S = (S 1, S 2, …, S n ) and a target sum T, find combination of S i that equals to T. Hint: No combination of terms less than a particular term can yield a sum as large as the term. That is, S i > S 1 + … + S i-1. Example: Given S = (1, 4, 11, 17, 38, 73) and T = 96, determine which terms in S correspond to the 1s of the plaintext. Solution: 1, 4, 17, 73 (See Fig. 3-6, p.85). That is, the plaintext was Exercise: S = (1, 2, 5, 9, 20, 43), T = 49.

csci5233 computer security & integrity (Chap. 3) 6 Deriving a Hard Knapsack from a Simple Knapsack An example on pages Choose the number (M) of items in a knapsack. Example: M = 4 2. Create a simple knapsack (S) with M items. Example: S = (1, 2, 4, 9). 3. Choose a multiplier w and a modulus n, where n > S 1 + … + S M and w is relprime to n. Note: Usually n is a prime, which is relprime to any number < n. Example: w = 15 and n = Replace every item in the simple knapsack with the term h i = w * s i mod n. Then H = (h 1, h 2, …, h M ) is the hard knapsack. Example: H = (15, 13, 9, 16).

csci5233 computer security & integrity (Chap. 3) 7 Encryption using Merkle-Hallman Knapsacks The plaintext is encrypted using the hard knapsack (the public key), while the simple knapsack, as well as w and n, are used as the private key. Example: Encrypt the plaintext ‘ ’ using the sample hard knapsack H = (15, 13, 9, 16). Ans: C 1 = 0100 * H = 13. C 2 = 1011 * H = = 40. C 3 = 1010 * H = = 24. C 4 = 0101 * H = = 29. So, ciphertext = (13, 40, 24, 29)

csci5233 computer security & integrity (Chap. 3) 8 The receiver of the ciphertext uses w and n to calculate the multiplicative inverse of w, w -1. w * w -1 mod n = 1. Example: w -1 = mod 17 = 8 (use algorithm on p.81 or the inverse.java program)inverse.java To decipher the ciphertext (C): Multiply each of the numbers in C by w -1. (w -1 * C = w -1 * H * P = w -1 * w * S * P = S* P )mod n Exercise: Decrypt the ciphertext from the previous exercise, i.e., 13, 40, 24, 29, by using the simple knapsack S = (1, 2, 4, 9). The answer: next slide Decryption using Merkle-Hallman Knapsacks

csci5233 computer security & integrity (Chap. 3) 9 Given: H = (19, 28, 76, 171, 293, 46, 130, 150). C = 13, 40, 24, 29 S = (1, 2, 4, 9) n = 17, w = 15, w -1 = To get the target T i : Multiply each C i by w -1 : T1 = (w -1 * C 1 ) mod n = 8 * 13 mod 17 = 2 T2 = (w -1 * C 1 ) mod n = 8 * 40 mod 17 = 14 T3 = (w -1 * C 1 ) mod n = 8 * 24 mod 17 = 5 T4 = (w -1 * C 1 ) mod n = 8 * 29 mod 17 = Given the target sum T i and the simple knapsack S, find the combination of items in S that produces T. e.g., The answer for T 1 is Decryption using Merkle-Hallman Knapsacks

csci5233 computer security & integrity (Chap. 3) 10 Another Example Step 1: Derive a Hard Knapsack from a Simple Knapsack 1. Choose the number (M) of items in a knapsack. Example: M can be 8 when the plaintext is in ascii. 2. Create a simple knapsack (S) with M items. Example: S = (1, 2, 4, 9, 17, 34, 70, 150). 3. Choose a multiplier w and a modulus n, where n > S 1 + … + S M and w is relprime to n. Note: Usually n is a prime, which is relprime to any number < n. Example: w = 19 and n = Replace every item in the simple knapsack with the term h i = w * s i mod n. Then H = (h 1, h 2, …, h M ) is the hard knapsack. Example: H = (19, 38, 76, 171, 20, 40, 118, 123).

csci5233 computer security & integrity (Chap. 3) 11 Another Example Step 2: Encrypt a plaintext using the hard knapsack Encrypt the plaintext ‘PEACE’ using the sample hard knapsack H, H = (19, 38, 76, 171, 20, 40, 118, 123). ‘P’ = 50 h ‘E’ = 45 h ‘A’ = 41 h ‘C’ = 43 h Ans: C 1 = 50 h * H = * H = = 209. C 2 = 45 h * H = * H = = 201. C 3 = 41 h * H = * H = = 161. C 4 = 43 h * H = * H = = 279. C 5 = C 2 = 228. So, ciphertext (‘PEACE’) =

csci5233 computer security & integrity (Chap. 3) 12 Step 3: Decrypt using C, w, n and S The receiver of the ciphertext uses w and n to calculate the multiplicative inverse of w, w -1. w * w -1 mod n = 1. Example: w -1 = mod 303 = 16 (use algorithm on p.81 or the inverse.java program)inverse.java To decipher the ciphertext (C): Multiply each of the numbers in C by w -1. (w -1 * C = w -1 * H * P = w -1 * w * S * P = S* P )mod n Exercise: Decrypt the ciphertext from the previous exercise, i.e., , by using the simple knapsack S = (1, 2, 4, 9, 17, 34, 70, 150). The answer: next slide Another Example

csci5233 computer security & integrity (Chap. 3) 13 Given: H = (19, 28, 76, 171, 293, 46, 130, 150). C = , n = 303, w = 19, w -1 = 16. S = (1, 2, 4, 9, 17, 34, 70, 150). 1. To get the target T i : Multiply each C i by w -1 T1 = (w -1 * C 1 ) mod n = 16 * 209 mod 303 = 11 T2 = (w -1 * C 1 ) mod n = 16 * 201 mod 303 = 186 T3 = (w -1 * C 1 ) mod n = 16 * 161 mod 303 = 152 T4 = (w -1 * C 1 ) mod n = 16 * 279 mod 303 = Given the target sum T i and the simple knapsack S, find the combination of items in S that produces T. The answer for T 1 is , which is 11. S = (1, 2, 4, 9, 17, 34, 70, 150) Ans. for T 1 = ( )  50 h Another Example

csci5233 computer security & integrity (Chap. 3) 14 p.90 The modulus n can be guessed. S, the secret key, and the multiplier, w, are then exposed. 1980: Shamir found that if the value of the modulus n is known, it may be possible to determine the simple knapsack S. 1982: Shamir came up with an approach to deduce w and n from H, the hard knapsack, alone. Weakness of the Merkle-Hellman Algorithm

csci5233 computer security & integrity (Chap. 3) 15 Summary Merkle-Hellman is a public-key cryptosystem based on the knapsack problem. The encryption can be broken, mainly due to its use of simple knapsacks as the secret keys. Next: –RSA Encryption –El Gamal Algorithms –DES –Hashing Algorithms –Key Escrow & Clipper