Kanp-Sack Lecture
Kanp-Sack Lecture
cryptosystem
Merkle-Hellman multiplicative
knapsack cryptosystem
Merkle-Hellman multipy-iterated
knapsack cryptosystem
Advanced knapsack cryptosystems
Additional Research Topics
Data Structures and Algorithms
Dynamic Programming Technique
Bioinformatics Algorithms.
Visualization.
Alice:
Bob
1. Chooses secret (private) key
1. Uses Public Key to encrypt
2. Create and publishes public key
the message
3. Receives ciphertext
2. Sends ciphertext – encrypted
4. Decrypts ciphertext using secret
message to Alice
key to recover the plaintext –
original message
Public Key Cryptosystem
Merkle-Hellman
RSA: Knapsack Cryptosystem [1]
Rivest-Shamir-Adleman [3]
Based on the
Based on integer subset-sum problem,
factorization variant of knapsack problem
Creates Decrypts
Cryptosystem Ciphertext Plaintext:
P=1101
Private Key
A = {1, 2, 4, 8} Public Key
M = 17, W = 7 B ={7, 14, 11, 5} Encryption:
w=5 Using Public Key
1*7 +1* 14 +0*11+1* 5 = 26
Decryption:
5*26 (mod 17) = 11
11 = 1*1 + 1*2 + 0*4 + 1*8 Ciphertext:
26
Plaintext:
1101
Merkle-Hellman Knapsack Cryptosystem
1982: Single iteration Merkle - Hellman Knapsack
Cryptosystem was broken by Adi Shamir [4,5,6]
Alice:
1. Constructs the Knapsack cryptosystem
2. Publishes the public key
3. Receives the ciphertext
4. Decrypts the ciphertext using private key
Bob:
1. Encrypts the plaintext using public key
2. Sends the plaintext to Alice
Alice
Knapsack Cryptosystem Construction
Chooses A = {a1, …an} super-increasing sequence,
A is a private (easy) knapsack
a1+ …+ an = E
Chooses M - the next prime larger than E.
Chooses W that satisfies 2 W < M and (W, M) = 1
Computes Public (hard) knapsack B = {b1, ….bn},
where bi = Wai (mod M), 1 i n
Keeps Private Key: A, W, M
Publishes Public key: B
Bob – Encryption Process
Binary Plaintext P breaks up into sets of n elements
long: P = {P1, …Pk}
n
Public Key:
B={7 mod 17, 14 mod 17, 28 mod 17, 56 mod 17}={7, 14, 11, 5}
Bob Encryption:
Plaintext: 1101
Ciphertext = 7 + 14 + 5 = 26
Alice Decryption:
w = 5 – multiplicative inverse of 7 (mod 17)
5*26 (mod 17) = 11
Plaintext: 1101 (11 = 1*1 + 1*2 +0*4 + 1*8)
Ciphertext Only Cryptanalytic Attack on Merkle-
Hellman Knapsack: Dynamic Programming Algorithm
Q[0][0] TRUE
for j = 1 to C do: Q[0][j] FALSE
for i = 1 to n do:
for j = 0 to C do:
if (j – B[i] < 0): Q[i][j] = Q[i-1][j]
else: i i – 1
Q[i-1][j-B[i]] or Q[i-1][j]
Merkle-Hellman Multiplicative
Knapsack Cryptosystem
Alice:
Chooses set of relatively prime numbers
Tij a j n n n
Ci Tij a j a j Tij Tij
Si b b j 1
b (b ) p j (mod M )
j 1 j 1 j 1
w1 bi1 a i (mod M 1 ), 1 i n, M 1 E
n
w 2 bi2 bi1 (mod M 2 ), 1 i n, M 2 a 1i
i 1
.....
n
w m bim bim 1 (mod M m ), 1 i n, M m a im 1
i 1
Multiply-Iterated Merkle-Hellman
Knapsack Cryptosystem Example
A={1, 2, 4, 8}- super-increasing sequence (easy)
knapsack, m = 3 (number of iterations)
1st iteration: M1 = 17, W1 = 7, w1= 5
B1 ={7 mod 17, 14 mod 17, 28 mod 17, 56 mod 17}={7, 14, 11, 5}
2nd iteration: M2 = 41, W2 = 18, w2= 16
B2 ={126 mod 41, 252 mod 41, 198 mod 41, 90 mod 41}={3, 6, 34, 8}
3rd iteration: M2 = 53, W2 = 25, w2= 17
B3 ={75 mod 53, 150 mod 53, 850 mod 53, 200 mod 53}={22, 44, 2, 41}
Public Key: {22, 44, 2, 41}
REFERENCES
1. R. C. Merkle, M. E. Hellman, Hiding Information and Signatures in Trapdoor
Knapsacks, IEEE Transactions on Information Theory, vol. IT-24, 1978, pp.
525-530.
2. W. Diffie, M. E. Hellman, New Directions in Cryptography, IEEE
Transactions on Information Theory, vol. IT-22, no. 6, November 1976, pp.
644-654.
3. R. L. Rivest, A. Shamir, and L. M. Adleman. A Method for Obtaining Digital
Signatures and Public-Key Cryptosystems. Communications of the ACM, vol.
21, no. 2, 1978, pp. 120-126
4. Adi Shamir. A Polynomial-time Algorithm for Breaking the Basic Merkle-
Hellman Cryptosystem. Proceedings of the IEEE Symposium on Foundations
of Computer Science. IEEE, New York, 1982, pp. 145-152.
5. Adi Shamir. A Polynomial Time Algorithm for Breaking the Basic Merkle-
Hellman Cryptosystem. In David Chaum, Ronald L. Rivest, Alan T. Sherman.
editors, Advances in Cryptology – CRYPTO ’82. Plenum, New York, 1983.
6. Adi Shamir. A Polynomial-time Algorithm for Breaking the Basic Merkle-
Hellman Cryptosystem. IEEE Transactions on Information Theory, vol. IT-30,
no. 5, September 1984, pp. 699-704.
REFERENCES
7. Hendrik W. Lenstra Jr, Integer Programming with a Fixed Number of Variables,
Mathematics and Operations Research, vol. 8, no. 4, 1983, pp. 538-548
8. Ming Kin Lai, Knapsack Cryptosystems: The Past and the Future,
http://www.cecs.uci.edu/~mingl/knapsack.html
9. Ernest F. Brickell, Breaking Iterated Knapsacks. In G. R. Blakley, David C. Chaum,
editors, Advances in Cryptology – CRYPTO ’84, Lecture Notes in Computer Science,
vol. 196. Springer, Berlin, 1985, pp. 342-358.
10. M. Carey and D.S. Johnson, Computers and Intractability: A guide to the Theory of
NP-Completeness, Freeman, 1979
11. Lecture Notes on Cryptography, S. Goldwasser, M. Bellare
12. J. C. Lagarias, Performance Analysis of Shamir’s Attack on the Basic Merkle-Hellman
Knapsack Cryptosystem. Proceedings of the 11th International Colloquium on
Automata, Languages and Programming, Lecture Notes in Computer Science, vol. 172.
Springer, Berlin, 1984.
13. A. M. Odlyzko. The Rise and Fall of Knapsack Cryptosystems. In Carl Pomerance,
editor, Cryptology and Computational Number Theory, Proceedings of Symposia in
Applied Mathematics, vol. 42. American Mathematics Society, Providence, RI, 1990,
pp. 75-88, http://www.dtc.umn.edu/~odlyzko/doc/complete.html
14. A. M. Odlyzko. Cryptanalytic Attacks on the Multiplicative Knapsack Cryptosystem
and on Shamir’s Fast Signature Scheme. IEEE Transactions on Information Theory, IT-
30, 1984, pp. 594-601, http://www.dtc.umn.edu/~odlyzko/doc/complete.html