COSI 171a Assignments
All assignments should be submitted on paper, so that the TA's can
conveniently provide feedback.
 Programming assignment source code should be submitted also to
cs171a as Email enclosures.
 The subject line should read "HWn", where n is the number of the
assignment.
 Source code should be packed and zipped to preserve the directory
structure of its contents.
 Standard libraries (stdio.h, math.h etc.) should not be enclosed, only
your own files.
 All source code must be well documented. On a trial
basis, we will now accept perl and python.
Assignments are due BEFORE class begins; late arrivals
lose credit.

Assignment 1, Friday, 30 August 2004
 Due Friday, 3 September 2004
Read Section 1.1
 Due Friday, 10 September
 Read Sections 1.2, 1.3
 Program the shift cipher and the Viginere cipher for English. Your
programs should first delete spaces,
numerals, and punctuation, and
should change all characters to upper case.
 Program a binary stream cipher, using LFSR's (linear
feedback shift registers.)
A list of (some) primitive polynomials
for LFSR's is among the links on the homepage.
This binary
stream cipher is NOT secure, but will quickly scramble
your files to confound your roommates and relatives.
The programs should take the key as a commandline argument;
input files can be commandline arguments or redirections.
Solutions (text)

Assignment 2, Friday 10 September 2004
 Due Tuesday, 14 September 2004
Read Sections 2.1, 2.2, 2.3, 2.4.
 Due Tuesday, 21 September 2004
Using your programs, do Exercises 1.21, 1.29.
To save you the labor of transcription, here are the
ciphertexts.
Solutions

Assignment 3, Tuesday, 21 September 2004
 Due Friday, 24 September 2004
Read Sections 3.1, 3.2, 3.5, 3.6; don't memorize them!
 Due Tuesday, 28 September 2004
Do Exercises 3.2, 3.3. Read Exercises 3.4 and 3.8; we will discuss
them in class.
Show that a oneround DES encryption plus a left/right swap is self
decrypting.
Solutions

Assignment 4, Tuesday, 28 September 2004
 Due Friday, 1 October 2004
Read the Rivest article listed under "Useful Links"
 Tuesday, 28 September 2004
Quiz in class.
Solutions

Assignment 5, Tuesday, 5 October 2004
 Due Friday, 8 October 2004
Read Sections 4.0, 4.1, 4.2
 Due Tuesday, 12 October 2004
Stinson 4.1 (TYPO: "2N" should be "2S"), 4.2, 4.5.
Solutions
Extra credit: In the Birthday Paradox,
find the expected number of people to achieve the first collision.
What's known.

Assignment 6, Tuesday, 12 October 2004
 Due Friday, 15 October 2004
Read Sections 5.1, 5.2, 5.3
 Due Tuesday, 19 October 2004
Do Stinson 5.1; read 5.2, it was done in class; 5.3, 5.4, 5.5, 5.6
(using your programs); 5.8

Assignment 7, Tuesday, 19 October 2004
 Due Friday, 22 October 2004
Read Sections 5.4, 5.5; read
Schneier's blog on DES
 Due Tuesday, 26 October 2004
Read Stinson 5.6
Do Stinson Exercises 5.9, 5.10, 5.11, 5.13.
Solutions.

Assignment 8, Friday, 29 October 2004
 Due Tuesday, 2 November 2004
Read Sections 5.7, 5.9
 Due Friday, 5 November 2004
Do Stinson Exercises 5.14, 5.15, 5.16, 5.17, 5.18;
Read Exercise
5.22, completing the proof of SolvayStrassen's efficiency.
Solutions
 A quiz is planned for 9 November:
Solutions
Statistics will be published when my spreadsheet is fixed.

Assignment 9, Friday, 5 November 2004
 Due Friday, 12 November 2004
Read Stinson Section 6.1, 6.2.1, 6.2.2, 6.2.3
Do Exercises 6.1, 6.2 without the proof.

Assignment 10, Friday, 12 November 2004
 Due Friday, 19 November 2004
Read Stinson Section 6.6, 6.7
Do Exercises 6.3, 6.4 except for part d.
Solutions

Assignment 11, Friday, 19 November 2004
 Due Tuesday, 23 November 2004
Read pages 397 to 394 in the handout from Stinson First Edition.

Assignment 12, Friday, 3 December 2004
 Due Friday, 10 December 2004
Do Exercises 13.1, 13.2 in the handout from Stinson First Edition.
The final exam takes place Tuesday, 14
December. It will be two hours long,
with onehalf hour dedicated to
questions from previous exams.
Watch this space for
Solutions.ps