Knapsack Cryptosystems

Slides:



Advertisements
Similar presentations
RSA.
Advertisements

Great Theoretical Ideas in Computer Science.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
RSA ( Rivest, Shamir, Adleman) Public Key Cryptosystem
1 Lecture #10 Public Key Algorithms HAIT Summer 2005 Shimrit Tzur-David.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Chapter 3 Encryption Algorithms & Systems (Part B)
Public Key Algorithms 4/17/2017 M. Chatterjee.
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.
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.
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
CSCI 398 Research Topics in Computer Science Yana Kortsarts Computer Science Department Widener University Chester, PA.
Diophantine Approximation and Basis Reduction
Merkle-Hellman Knapsack Cryptosystem Merkle offered $100 award for breaking singly - iterated knapsack Singly-iterated Merkle - Hellman KC was broken by.
Great Theoretical Ideas in Computer Science.
RSA Ramki Thurimella.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
Introduction to Algorithms Second Edition by Cormen, Leiserson, Rivest & Stein Chapter 31.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
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.
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:
Merkle-Hellman Knapsack Cryptosystem
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.
Lecture 8 Overview. Analysis of Algorithms Algorithms – Time Complexity – Space Complexity An algorithm whose time complexity is bounded by a polynomial.
1 Network and Computer Security (CS 475) Modular Arithmetic and the RSA Public Key Cryptosystem Jeremy R. Johnson.
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.
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.
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.
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.
Key Exchange in Systems VPN usually has two phases –Handshake protocol: key exchange between parties sets symmetric keys –Traffic protocol: communication.
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,
Revision. Cryptography depends on some properties of prime numbers. One of these is that it is rather easy to generate large prime numbers, but much harder.
Public Key Cryptography
Public Key Encryption Major topics The RSA scheme was devised in 1978
Asymmetric-Key Cryptography
Public Key Encryption.
Attacks on Public Key Encryption Algorithms
Public Key Cryptosystem
Asymmetric-Key Cryptography
Advanced Information Security 5 ECC Cryptography
PUBLIC-KEY ENCRYPTION Focusing on RSA
RSA and El Gamal Cryptosystems
Public-key Cryptography
Taehyung Kim HPC Lab. POSTECH
Knapsack Cryptosystems
Background: Lattices and the Learning-with-Errors problem
Topic 25: Discrete LOG, DDH + Attacks on Plain RSA
Input: A={a1, a2, … an} – public key, S - ciphertext
PART VII Security.
Analysis of the RSA Encryption Algorithm
Poking Holes in Knapsack Cryptosystems
Systems Architecture I
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Lattices. Svp & cvp. lll algorithm. application in cryptography
Introduction to Elliptic Curve Cryptography
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
Hard Problems Some problems are hard to solve.
PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9
Introduction to Algorithms Second Edition by
Introduction to Cryptography
Oblivious Transfer.
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Presentation transcript:

Knapsack Cryptosystems 1 Dinara Barshevich JASS’05 St. Petersburg 9/22/2018 Knapsack Cryptosystems

Brief historical background 1976, Diffie & Hellman – Public Key Cryptosystem 1977 RSA – the first incarnation of such system 1978 Merkle – Hellman Cryptosystem 1980s years: attacks to MH 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems Agenda Idea of Public-Key Cryptosystems Knapsack problem: setting, comlexity and basic analyses Knapsack Public-Key Cryptosystems Algorithm of Merkle – Hellman Attacks to Merkle – Hellman Cryptosystem What next? 9/22/2018 Knapsack Cryptosystems

Public key cryptosystems M - plaintext Receiver Encryption: sender Key generation E(M, K1) = C - cyphertext C - ciphertext Public key - K1 Private key - K2 Decryption: receiver D(C, K2) = M - original M - plaintext 9/22/2018 Knapsack Cryptosystems

The Knapsack problem – closely related to subset-sum problem. 9/22/2018 Knapsack Cryptosystems

Some observations on Knapsack The general knapsack problem is known to be NP-complete Efficient algorithm of the feasibility form of the problem helps to find such a solution easily. Assuming that {ai } are not too large, the trivial algorithm for solving knapsack needs O(2ⁿ) steps 9/22/2018 Knapsack Cryptosystems

A better algorithm for Knapsack Compute: Sort them, and scan for a common member: using O(n2^(n/2)) time+ O(2^(n/2)) storage space. It’s the fastest algorithm! 9/22/2018 Knapsack Cryptosystems

Easy-solvable knapsacks: 9/22/2018 Knapsack Cryptosystems

Knapsacks with super-increasing sequence A sequence {ai} is called a super-increasing sequence if O(n) - algorithm for Knapsack with super-increasing weights: for j = n downto 1 { If s  ai then { xi = 1; s = s - ai; } else xi = 0; } return (x1, x2,..., xn). Solution if exists is unique! 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems Basic idea: Public key Private {A1,.An} {B1,.,Bn} Alice Alice Bob Public Private Bob:encoding Alice:decoding X1,..Xn C=∑BiXi Alice X1,..Xn S=∑AiXi Charlie Hard knapsack Easy knapsack 9/22/2018 Knapsack Cryptosystems

MH system: key generation Start with a super-increasing knapsack {b1,…, bn} such that: Choose M and W such that: 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems MH system (cont.) Compute 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems MH system: encryption 9/22/2018 Knapsack Cryptosystems

The {b1,…, bn} are super-increasing  Easy to solve MH system: decryption The {b1,…, bn} are super-increasing  Easy to solve 9/22/2018 Knapsack Cryptosystems

Two variants of Merkle-Hellman cryptosystem singly-iterated Merkle-Hellman cryptosystem multiply-iterated Merkle-Hellman cryptosystem 9/22/2018 Knapsack Cryptosystems

Multiply-iterated MH cryptosystem 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems MH vs. RSA MH is about 100 times faster than RSA (MH: n ~ 100, RSA: m ~ 500bits) MH : n bits are encoded in 2n bits, RSA: n bits are encoded in n bits MH’s public key is of size 2n² ~ 20,000 for n ~ 100 and RSA’s is 2m ~ 1000 for m ~ 500bits MH assumes P <> NP, while RSA assumes factorization is in NP (<> P) 9/22/2018 Knapsack Cryptosystems

Security of MH cryptosystem:general doubts. What if P = NP? What if most instances of knapsack used by MH are easy to solve? What if one can deduce from the public Knapsack what the construction method is? 9/22/2018 Knapsack Cryptosystems

Security of MH cryptosystem:special doubts. Result of Brassard: if breaking a cryptosystem is NP-hard, then NP = Co-NP. If NP <> Co-NP, then breaking the MH cannot be NP-hard! Linearity of MH equation: e.g. provides a single bit of information about plaintext (as we may assume:not all the ai are even) 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems Parameters choice If some bj is large we get inefficient knapsack If, say, b1 = 1 then aj = W for some j One can try all aj as a candidate for W 9/22/2018 Knapsack Cryptosystems

Parameters choice – cont’d 9/22/2018 Knapsack Cryptosystems

Attacks on MH Cryptosystem modular multiplication does not disguise enough the easy knapsack using Private Key Attack method B1,…Bn Easy A1,…An General C1,…Cn Easy Alice Charlie 9/22/2018 Knapsack Cryptosystems

Attacks on MH Cryptosystem try to solve the general knapsack problem, when the ai are large enough using Private Key A1,…An General but large enough B1,…Bn Easy Alice 9/22/2018 Knapsack Cryptosystems

Attacks on MH knapsack cryptosystem Rely on the fact that the modular multiplication does not disguise enough the easy knapsack: 1. Shamir’s polynomial algorithm for the singly-iterated Merkle-Hellman, 1982 2. Brickell’s attack on the multiply-iterated Merkle-Hellman, 1985 9/22/2018 Knapsack Cryptosystems

Shamir’s attack on basic MH system 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems This means that all of the kj /aj are close to U/M In MH: b1,…, bq ~ 2ⁿ: q – small enough Let We obtain Subtracting i=1 term: That implies: 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems kji aj1 is on the order of 2^4n, then the kj,and aj should be of very special structure In most cases the kji ,1≤ i ≤ q are determined uniquely by this equation invoking H. W. Lenstra’s theorem: the integer programming problem in a fixed number of variables can be solved in polynomial time! This yields the kji ,1≤ i ≤ q 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems Now we have the kji ,1≤ i ≤ q we can construct a pair (U´, M´): U´/M´ close to U/M such that: if compute the weights cj by - form a super-increasing sequence when arranged in increasing order The cj can be used to decrypt the message! 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems But how to find j1,…, jq ? As permutation π is secret, we do not have j1,…, jq The solution is easy: the cryptanalyst considers all possible choices of them, and still remains in polynomial time! 9/22/2018 Knapsack Cryptosystems

Difficulties of Shamir’s method The crucial tool in the attack was Lenstra’s result on integer programming in a fixed number of variables Lenstra’s algorithm running time is given by a high degree polynomial – never implemented! Continued fraction can be used instead of Lenstra’s result, but when the bj are large enough, it fails 9/22/2018 Knapsack Cryptosystems

Attacks to low-density general knapsack problems try to solve the general knapsack problem, when the ai are large enough 2 famous attacks: - Lagarias and Odlyzko, 1983 - Brickell low-density attack, 1984 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems On integer lattices An integer lattice is an additive subgroup of Zⁿ that contains n linearly independent vectors over Rⁿ A basis (v1 ,…, vn ) of L is a set of elements of L such that L = {z1 v1 +…+ zn vn : zi – integer} Input: (v1 ,…, vn ) – basis of L - lattice SVL: Find the shortest non-zero vector of L quite hard problem – yet not proved! 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems Lovasz-reduced basis Lovasz’ polynomial-time algorithm: given a basis for a lattice, constructs Lovasz- reduced basis (v1 ,…, vn ): 9/22/2018 Knapsack Cryptosystems

The low-density attack itself Given the ai and s, form the (n+1)-dimensional lattice with basis 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems And the miracle is If {xj | j = 1..n} solve the knapsack problem, then Since the xj are 0 or 1, this vector is very short The basic attack: 1. run the Lovasz lattice basis reduction algorithm on the basis V 2. check if the resulting reduced basis contains a vector that is a solution or not 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems How it works: If {aj} are large: most vectors in the lattice are large. So the vector X corresponding to our solution might be the shortest: If aj ~ 2^(βn) where β>1.54725 then X is the shortest in most lattices So: if we could efficiently solve SVL – we can solve most low-density knapsacks 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems How we solve SVL Proved: we can solve knapsacks with aj ~ 2^(n^2) – extremely large! In practice: much better 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems Summary: MH algorithm itself Attack using revealing an easy knapsack from public Attack using solvability of low-density knapsacks 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems In conclusion: Both of two main fears were borne out. A few knapsack-based Cryptosystems still remain unbroken: e.g. Chor – Rivest 1988 Since 1) high speed 2) factorization and logarithm procedures can turn out efficiently solvable someday 3) elegance of the algorithm search is going on… 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems Example - exercise Make a private key: with n = 6 (2, 3, 6, 13, 27,52) M = 105, W = 31 aj : (62, 93, 81, 88, 102, 37) 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems Encryption Let Mes = 011000110101101110 Shift it: 011000 – 93+81 = 174 110101 – 62+93+88+37 = 280 101110 – 62+81+88 +102 = 333 Cipher = (174, 280, 333) 9/22/2018 Knapsack Cryptosystems

Knapsack Cryptosystems Decryption 9/22/2018 Knapsack Cryptosystems