Data Security Homework - 1997

All homework is due by the time class begins on the day specified.
AssignmentDue date
A message to decodeWednesday, August 27
A periodic substitution to decode Friday, August 29
All keys and texts are hexadecimal in this problem.
Encipher the text abcdefabcdefabcd under DES using each of the following keys:
0123456789abcdef
0223456789abcdef
0126456789abcdef
0123466789abcdef
0123456489abcdef
0123456789abcdec
Note that each key after the first differs in one bit from the first key.
Find the Hamming distance between the ciphertext resulting from the encryption under the first key and the ciphertext for each remaining key.
Monday, September 8
All keys and texts are hexadecimal in this problem. Using the key 0123456789abcdef, encipher each of the following texts.
abcdefabcdefabcd
8bcdefabcdefabcd
a9cdefabcdefabcd
abddefabcdefabcd
Find the Hamming distance between the result of the first encryption and each of the others.
Monday, September 8
Exercises 3,4,8 page 98 Wednesday, September 10
A number theory exercise Friday, September 12
Second number theory exercise Monday, September 15
Third number theory exercise Friday, September 19
IDEA homework Monday, September 22
Exercises 12 and 14, page 98 Friday, September 26
Exam is... Wednesday, October 1
Exercises 11 and 18, page 126 Friday, October 3
Write a program
digest file
which will do an md5 digest of the file requested on the command line. For your convenience, the documentation for md5 provided with ssleay is available here. The answer should be output to stdout in hexadecimal notation. I will tell you that my answer for the file /usr/local/bin/zcat on scott, a 313904 byte file, was
b4b04b1f1103c0ad70200753ca3b2845, and that I did it with exactly one call to the function MD5. You all don't have to do it in one call, but you might enjoy the challenge.
Monday, October 6
Write a Mathematica function pick[ndigits_, ntrials_] that will pick a probably prime integer of size at least ndigits many digits. It should work by picking a random integer of the appropriate size, and then trying 2a+1, 4a+1, 6a+1, ... until we find a probable prime. The argument ntrials is the number of of trials to request of probablyprime. Write it so that both probablyprime and pick tell you what they are doing, e.g.,
pick[4,3]
Testing whether 18551 is probably prime
Trying 17567
Testing whether 37101 is probably prime
Trying 18305
Testing whether 55651 is probably prime
Trying 5197
Testing whether 74201 is probably prime
Trying 39904
Trying 73334
Trying 54560

74201
Friday, October 10
An RSA exercise Monday, October 13
Class project (Draganjac - leader)
Obtain PGP for Windows 95 from here, see that it gets installed on our network, and try it out. Report progress...
Monday, October 20
The primes p=224467 and q=242867 are each congruent to -1 (mod 4). If Alice used them in the coin toss protocol, suppose Bob squared x=11255611437(mod n), where n=pq, and sent the square a to Alice. What are the four square roots of a, and which ones would allow Bob to factor n if he knew them? Monday, October 27
What is it? Wednesday, October 29
Exercises 1 and 6, page 396 Wednesday, November 5
PGP uses CFB with IDEA, but most encryption applications would use CBC. Recall that CBC is
Encryption: Ci=EK(Ci-1 xor Mi)
Decryption: Mi=Ci-1 xor DK(Ci)
and CFB is
Encryption: Ci=Mi xor EK(Ci-1)
Decryption: Mi=Ci xor EK(Ci-1)
Is there a reason to use CFB rather than CBC?
Wednesday, November 12
Page 262, exercises 2, 5, 6, 12 Monday, December 1