Questions tagged [knapsack]

Knapsack is the problem of determining which numbers from a given collection of numbers have been added together to yield a specific sum: used in cryptography to encipher (and sometimes decipher) messages.

The knapsack problem is a NP-hard problem, which has led to attempts to use it as the basis for public-key encryption systems. Several such attempts failed because the knapsack problem instances they produced were in fact solvable by polynomial-time algorithms.

18 questions
3
votes
1 answer

Cryptography systems based on NP complete problems

There is any cryptography system that have a good reputation based on NP complete problem? I read about the knapsack, but it was cracked.
Marco
  • 131
  • 2
3
votes
1 answer

Solving subset sum via the LLL algorithm

I wrote code that solves the subset sum problem via the LLL algorithm, as given in chapter three of the Handbook of Applied Cryptography https://cacr.uwaterloo.ca/hac/ I ran the code on ten random sets, each with positive integers from one to $2^n$,…
Craig Feinstein
  • 227
  • 1
  • 4
2
votes
1 answer

Knapsack and block size clarification

I am a bit confused about the knapsack implementation regarding the bits and block size for encryption. In the example from this link (https://nrich.maths.org/2199), the knapsack size is 6 and the String that they encrypt has only 6-bits in 3…
bobH
  • 21
  • 1
2
votes
1 answer

Decrypt Merkle-Hellman Knapsack Cryptosystem without public key

I am reading the Lightweight Introduction to Lattices and it is a problem Challenge 8 that makes me quite struggle. Basically, the problem give us an encrypted version of a message using Merkle-Hellman Knapsack Cryptosystem. Each letter, before…
1
vote
1 answer

Knapsack Public to Private (Superincreasing knapsack)

I need to convert a hard knapsack to a superincreasing knapsack. I have these superincreasing values (3,6,11,22,43,87). I also have w = 7 and n = 173. I converted the superincreasing values to hard one (21,42,77,154,128,90) by computing $a_i = x_i…