Knapsack Cipher. 0-1 knapsack problem Given a positive integer C and a vector A=(a 1,...,a n ) of positive integers, find a subset of the elements of.

Slides:



Advertisements
Similar presentations
Boneh-Franklin Identity-based Encryption. 2 Symmetric bilinear groups G = ágñ, g p = 1 e: G G G t Bilinear i.e. e(u a, v b ) = e(u, v) ab Non-degenerate:
Advertisements

ONE WAY FUNCTIONS SECURITY PROTOCOLS CLASS PRESENTATION.
1 Complexity ©D.Moshkovitz Cryptography Where Complexity Finally Comes In Handy…
Cryptology  Terminology  plaintext - text that is not encrypted.  ciphertext - the output of the encryption process.  key - the information required.
Vector Spaces & Subspaces Kristi Schmit. Definitions A subset W of vector space V is called a subspace of V iff a.The zero vector of V is in W. b.W is.
Session 4 Asymmetric ciphers.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Public Key Algorithms …….. RAIT M. Chatterjee.
Abdullah Sheneamer CS591-F2010 Project of semester Presentation University of Colorado, Colorado Springs Dr. Edward RSA Problem and Inside PK Cryptography.
RSA ( Rivest, Shamir, Adleman) Public Key Cryptosystem
Introduction to Modern Cryptography, Lecture ?, 2005 Broadcast Encryption, Traitor Tracing, Watermarking.
Introduction to Modern Cryptography Lecture 7 1.RSA Public Key CryptoSystem 2.One way Trapdoor Functions.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Chapter 3 Encryption Algorithms & Systems (Part B)
Introduction to Computer and Network Security Iliano Cervesato 26 August 2008 – Modern Cryptography.
Chapter 9 – Public Key Cryptography and RSA Private-Key Cryptography  traditional private/secret/single key cryptography uses one key  shared by both.
Introduction to Computer and Network Security Iliano Cervesato 2 September 2008 – Public-key Encryption.
Public Key Cryptography Bryan Pearsaul. Outline What is Cryptology? Symmetric Ciphers Asymmetric Ciphers Diffie-Hellman RSA (Rivest/Shamir/Adleman) Moral.
Public Key Model 8. Cryptography part 2.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
David Froot.  How do we transmit information and data, especially over the internet, in a way that is secure and unreadable by anyone but the sender.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
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.
Merkle-Hellman Knapsack Cryptosystem Merkle offered $100 award for breaking singly - iterated knapsack Singly-iterated Merkle - Hellman KC was broken by.
Introduction to Algorithms Second Edition by Cormen, Leiserson, Rivest & Stein Chapter 31.
Quantum Factoring Michele Mosca The Fifth Canadian Summer School on Quantum Information August 3, 2005.
Section 4.4: The RSA Cryptosystem Practice HW Handwritten and Maple Exercises p at end of class notes.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
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:
1 Hash Functions. 2 A hash function h takes as input a message of arbitrary length and produces as output a message digest of fixed length
Data Encryption Standard CS-471/971. Category of Standard: Computer Security. Explanation: The Data Encryption Standard (DES) specifies a FIPS approved.
Merkle-Hellman Knapsack Cryptosystem
Complexity 20-1 Complexity Andrei Bulatov Parallel Arithmetic.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
MSU/CSE 260 Fall Functions Read Section 1.8.
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.
1 Network and Computer Security (CS 475) Modular Arithmetic and the RSA Public Key Cryptosystem Jeremy R. Johnson.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
NEW DIRECTIONS IN CRYPTOGRAPHY Made Harta Dwijaksara, Yi Jae Park.
Hard Problems Some problems are hard to solve.  No polynomial time algorithm is known.  E.g., NP-hard problems such as machine scheduling, bin packing,
The First Ten Years of Public-Key Cryptography Paper by: Whitfield Diffie Presentation by Taotao Zhao.
1 Security through complexity Ana Nora Sovarel. 2 Projects Please fill one slot on the signup sheet. One meeting for each group. All members must agree.
Computer Security Lecture 5 Ch.9 Public-Key Cryptography And RSA Prepared by Dr. Lamiaa Elshenawy.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Lecture 3 (Chapter 9) Public-Key Cryptography and RSA Prepared by Dr. Lamiaa M. Elshenawy 1.
Encryption and Encryption and Decryption Speaker:Tsung Ray Wang Advisor:Prof.Li-Chun Wang.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
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.
1 Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors. Review Matrices.
1 Message Authentication using Message Digests and the MD5 Algorithm Message authentication is important where undetected manipulation of messages can.
Data Integrity / Data Authentication. Definition Authentication (Signature) algorithm - A Verification algorithm - V Authentication key – k Verification.
Hard Problems Some problems are hard to solve.  No polynomial time algorithm is known.  E.g., NP-hard problems such as machine scheduling, bin packing,
KNAPSACK公開金鑰密碼學 Algorithms FINITE DEFINITENESS INPUT/OUTPUT GENERALITY
Public Key Encryption.
Public Key Cryptosystem
EMIS 8373: Integer Programming
PUBLIC-KEY ENCRYPTION Focusing on RSA
Knapsack Cryptosystems
Knapsack Cryptosystems
Digital Signature Schemes and the Random Oracle Model
Input: A={a1, a2, … an} – public key, S - ciphertext
Nikhil Bansal, Shashwat Garg, Jesper Nederlof, Nikhil Vyas
Poking Holes in Knapsack Cryptosystems
Where Complexity Finally Comes In Handy…
Hard Problems Some problems are hard to solve.
Where Complexity Finally Comes In Handy…
Where Complexity Finally Comes In Handy…
Presentation transcript:

Knapsack Cipher

0-1 knapsack problem Given a positive integer C and a vector A=(a 1,...,a n ) of positive integers, find a subset of the elements of A that sum to C; that is, find a binary vector M=(m 1,...,m n ) such that C=AM, or

Example of 0-1 knapsack problem Let n=5, C =14, and A=(1,10,5,22,3). Then M=(1,1,0,0,1) is a solution. The knapsack problem is an NP- complete problem. The best known algorithms for solving arbitrary instances of size n required O(2 n/2 ) time and O(2 n/4 ) space.

Special class of knapsack problem a special class of knapsack problems, referred to as simple knapsack, that can be solved in linear time. In a simple knapsack, the elements a i (i=1,...,n) are super increasing so that This implies that

Example of simple knapsack problem A’=(1,3,5,10,22) A’ is a simple vector snap(14, A’) gives the solution (1,1,0,1,0).

Algorithm for simple knapsack

Introduction Merkle and Hellman proposed a scheme whose security depends on the difficulty of solving the 0-1 knapsack problem. Merkle and Hellman show how to convert a simple knapsack into a trapdoor knapsack that is hard to solve without additional information.

Algorithm First, a simple knapsack vector A’=(a 1 ’,...a n ’) is selected. This allows an easy solution to a problem C’=A’M. Next, an integer u is chosen such that

Algorithm Then an integer w is chosen such that gcd(u,w)=1, and the inverse w -1 of w mod u is computed using w -1 =inv(w,u). Finally, the vector A’ is transformed into a hard knapsack vector A=wA’ mod u; that is a 1 =w*a i ’ mod u. Now, solving C=AM is difficult.

Algorithm With the knowledge of the trapdoor information w-1 and u, the problem can be transformed into the easy problem: C’=w -1 C mod u = w -1 AM mod u = w -1 (wA)M mod u =A’ M’ mod u = A’ M.

Public-Key system public-key: A secret-key: A’ trapdoor information u and w -1 A’=w -1 A mod u E A, D A denote the enciphering and deciphering; C=E A (M)=AM D A (C)=snap(w -1 C mod u, A’)=M.

Example Let A’=(1,3,5,10), u=20, and w=7. Then w -1 =3. The simple vector A’ is transformed into the “hard” vector A=(7*1 mod 20, 7*3 mod 20, 7*5 mod 20, 7*10 mod 20)=(7,1,15,10) Let M=13, which is the binary vector (1,1,0,1) (二進位表示法) Then C=E A (M)=7+1+10=18 D A (C)=D A (18)=snap(3*18 mod 20, A’) =snap(14, A’)=(1,1,0,1)=13.

length of N Merkle and Hellman originally suggested that using n=100 or more. The best known algorithms for solving arbitrary instances of size n required O(2 n/2 ) time and O(2 n/4 ) space. For n=100, 2 50 =10 15 For n=200, =10 30

Example of

Graham-Shamir Knapsacks Graham and Shamir independently discovered a way of obscuring the super increasing property of trapdoor knapsacks. A Graham-Shamir trapdoor knapsack vector A’(a1’,...,an’) has the property that each aji has the following binary representation: aj’=(R j, I j, S j ) where Rj and Sj are long random bit strings, I j is a bit string of length n such that the jth high- order bits is 1 and the remaining n-1 bits are 0.

Graham-Shamir Knapsacks Each random bit string S j has log 2 n 0’s in its high-order bit position so that summing does not cause them to overflow into the area of the I j ’s. Thus, a sum C’=A’M has the binary representation: C’ =(R, M, S),where Notice that the vector of bit strings(( I n, S n ),...,(I 1,S 1 ))

Example of Graham-Shamir

Graham-Shamir A trapdoor knapsack vector A’ is converted to a hard knapsack vector A as in the MerKle-Hellamn scheme;(by picking u and w and computing A=wA’ mod u). A message M is enciphered by computing C’=E A (M)=AM. C is deciphered by computing C’= w -1 C mod u and extracting from C’ the bits representing M.