CS 413, Computer and Data Security

advertisement
1
CS 413, Assignment 3
1. The background for this problem is given in the posted document
cs413secretkey.doc. Your task is to encode the words “goat” and “gnat” using the
key word “is” under an encryption algorithm modified from the one given in the
posted document. The change in the encryption algorithm is that the new left
hand side is shifted cyclically to the right by two. The clearest way of presenting
this change was by modifying the diagrams for the algorithm. This is shown on
page two of this assignment sheet. After you have successfully encoded both
words under the new scheme, compare the differences between them with the
differences between the encryptions obtained in the original handout using the
original encryption scheme.
Round 1.
Left Hand Side
Right Hand Side
Key
Permutation 1
Shift Right 2
Permutation A
Shift Right 2
New LHS
New RHS
2
Round 2.
Left Hand Side
Right Hand Side
Key
Permutation 2
Shift Right 2
Permutation B
Shift Right 2
Final LHS
Final RHS
2. The components of a knapsack problem are shown. Give the mathematical expression
(equation) showing their relationship, assuming that the vector v is a solution.
(v1, v2, …, vn), vi an element of {0, 1}
(a1, a2, …, an), ai an element of {the positive integers)
T, a positive integer
3. Define the term superincreasing or simple with respect to knapsack contents.
4. Can the elements of this vector be used to form a simple knapsack? If so, what would
it be?
(1, 6, 10, 4, 16)
5. Is the knapsack shown a simple knapsack? Does it have unique solutions for all
possible target values?
(1, 2, 3, 5, 8)
3
6. Given the knapsack and target shown, find the solution to this knapsack problem if
there is one.
a = (1, 2, 6, 11, 22)
T = 20
7. If a knapsack is not superincreasing, which of the following outcomes is possible for
an arbitrary target value: no solutions, one solution, or many solutions?
8. In Merkle-Hellman encryption is the hard knapsack or the simple knapsack part of the
public key?
9. In Merkle-Hellman encryption: a) Does the encrypter need any information besides
the correct knapsack in order to do encryption? If so, what? b) Does the (authorized)
decrypter need any information besides the correct knapsack in order to do decryption?
If so, what?
10. Given the following simple knapsack and values for parameters w and n, convert it to
the corresponding hard knapsack using the Merkle-Hellman technique.
a = (1, 4, 7, 14)
w = 4 and n = 15
2. T =

n
i 1
aivi
3. The elements of the array are ordered from smallest to largest and every element in the
knapsack is greater than the sum of the preceding elements.
ak  i 1 ai
k 1
4. No. Even sorted in increasing order they won’t be superincreasing.
5. It is not simple and non-unique solutions are possible.
6. 11110
7. All 3 are possible.
8. The hard knapsack.
9. a) no, b) you need w and n, or more specifically, w-1 and n.
10. (4, 1, 13, 11)
Download