2

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 blocks.

My understanding is a Char can be represented by 7 to 8-bits (UTF-8) and the knapsack size must be at least of size 8 to encrypt one char. Meaning that if I want to use a knapsack for encryption/decryption I must use a knapsack size of 8. Is my understanding correct?

bobH
  • 21
  • 1
  • Asymmetric cryptography based on the knapsack problem has historically been broken for proposed practical parameters, which had to be raised. I have correspondingly never met a practical use. Notice that your source says "we now know that this algorithm is not secure" (which is a simplification: it is insecure for parameters making it even close to competitive with other systems). – fgrieu May 19 '17 at 07:42

1 Answers1

1

The example there is instructional, not for implementation. Also, if you only want 26 characters plus a few punctuation marks, 5 or 6 bits would be enough.

fgrieu
  • 140,762
  • 12
  • 307
  • 587
kodlu
  • 22,423
  • 2
  • 27
  • 57