In Merkle–Hellman, decrypting a message requires solving an apparently "hard" knapsack problem. The private key contains a superincreasing list of numbers W, and the public key contains a non-superincreasing list of numbers B, which is actually a "disguised" version of W. The private key also contains some "trapdoor" information that can be used to transform a hard knapsack problem using B into an easy knapsack problem using W.
