20.0k views
3 votes
1. Encrypt this binary string into cipher text: 110000. Include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x N mod (m) = Y

2. Decrypt this cipher text into a binary string: 106

For fun, consider trying other codes or other combinations of "weights" (as long as they stay superincreasing!), multipliers, and modulates. While this form of encryption is relatively weak, it shows you how the general process works. For a knapsack code to be reasonably secure, it would need well over 200 terms each of length 200 bits!​

2 Answers

2 votes

Final answer:

To encrypt a binary string into cipher text, use a knapsack code with a superincreasing sequence of weights. To decrypt cipher text into a binary string, use the formula (cipher text) x N mod (m) = Y.

Step-by-step explanation:

To encrypt the binary string 110000 into cipher text, we can use a knapsack code. In this code, the weights in the knapsack are a superincreasing sequence, meaning that each weight is larger than the sum of all the previous weights. To encrypt, we multiply each binary digit by the corresponding weight and sum them up. Using the weights 1, 2, 4, 8, 17, and 34, the cipher text would be:

1 * 1 + 1 * 2 + 0 * 4 + 0 * 8 + 0 * 17 + 0 * 34 = 3.

To decrypt the cipher text into a binary string, we use the formula (cipher text) x N mod (m) = Y, where N is the modular multiplicative inverse of the multiplier used in the encryption, and m is the modulus. Using the same weights and a multiplier of 41, we can calculate the modular multiplicative inverse of 41 mod 85 as summar

User Das Kinder
by
6.0k points
1 vote

Answer:

Step-by-step explanation:

the answer spells reach for the stars i used a binary encryptor btw your welcome

User Sapbucket
by
4.8k points