4.5.3 Merkle-Hellman Cryptosystem

In 1976 W. Diffie and M. Hellman introduced the concept of public-key cryptography. Two years later R. Merkle and M. Hellman published a cryptosystem based on the subset sum problem [MH78]. At that time it was the only alternative cryptosystem to the existing RSA-Cryptosystem.

As described in the chapter about subset sum problems there are knapsack vectors such that a problem (A, s) is easily and efficiently solvable, for example superincreasing knapsacks. On the other hand it may be extremely difficult to get a solution for (A, s) if A is not superincreasing.
Merkle and Hellman used this fact to construct a cryptosystem based on the subset sum problem. Starting with a superincreasing knapsack vector A, a second knapsack vector B is built hiding the superincreasing property of A. The knapsack A is part of the private key whereas the knapsack B forms the public key. A message p then is encrypted by computing the sum c = pB = b1p1 + ... + bnpn, with pi representing the i-th bit of p.
Anyone being in possession of the cipher c is faced with the difficult problem (B, c). The owner of the private key however can easily determine the original message p because he knows the secret superincreasing sequence A.

Now the Merkle-Hellman Cryptosystem is explained in detail.

  1. Key creation
  2. Encryption
  3. Decryption
    1. To get the original plaintext p back, do the following two steps:
    2. First compute c' = Uc mod M = W-1c mod M
    3. Now solve (A, c'). Because A is superincreasing, (A, c') is easily solvable. Let X = (x1, ..., xn) be the resulting vector. If no permutation was used, pi = xi and p = (p1, ..., pn) is the plaintext.
      If a permutation was used to construct the public key, reverse the permutation: the plain bits pi are pi = xpi(i)

To be a correct cryptosystem, encryption of a plaintext p followed by decryption must yield p, that is d(e(p)) = p, with d the decryption function and e the encryption function respectively.
Indeed,

c' = Uc mod M = W-1c mod M = W-1(pB) mod M = W-1W(pA) mod M = pA mod M

Because both c' < M as well as SUM (ai) < M, c' = pA = a1p1 + ... + anpn. With solving (A, c') and, if used, reversing the permutation pi the original plaintext p is received.

Start applet

Remarks

  1. For key creation Merkle and Hellman specified as lower bounds for n, M and A
  2. In 1983 A. Shamir published an algorithm breaking the basic Merkle-Hellman Cryptosystem [SH83]. Shamir described a method of finding a so-called trapdoor-pair (M', U'). Using this trapdoor pair together with the public key B, a valid private key might be created, decrypting every messge encrypted with B.
  3. Another attack against the Merkle-Hellman cryptosystem uses a tool called lattice base reduction. With this tool, a given ciphertext c can be decrypted to yield the plaintext p without having the corresponding private key.

 
Low Dense Knapsacks