**Mathematics of Information Security**

Computer Lab 1. M360. Friday 9/3/2004

** Guidelines:**

Please act responsibly in the computer lab and help each other out.
Here are some important points from Zube:

Always log out when you leave (Start -> Shutdown -> Close all programs and log on as a different user).
There is also a 30 minute inactivity logout.

If you discover a problem in the lab, please tell the instructor, the proctor or mail lab@math.colostate.edu.

Any abuse of the resources (cracking/hacking, excessive and non-related printing, offensive material, etc.)
makes life miserable for everyone, so please don't do it.

Please don't steal anything, not even a mouse pad. Anything that we have to replace comes out of some pocket
leaving that much less for other things.

This lab is for math and stat people only and for mathematics and statistics work only.
No, we won't kick you out for an occasional game of Minesweeper nor for your daily tromp over to www.cnn.com;
however, the lab is meant for classwork, labs, assignments and research, not web chat, resumes and Half Life.

Please do not give the class password to anyone and do not be careless with it.
If I find a password written down somewhere in public (on a
whiteboard, on a piece of paper I find in the hall, etc.), I'll have no
choice but to change the password. I do this roughly five times a semester
and is a grand bother for all involved.

More information about the computer lab

** Opening the program:**

1) Open (My computer -> Math on Pop G: -> m360).

2) Open (My computer -> local disk c -> temp).

3) Move the file "crypto.mws" from 1) to 2) (Zube wants it done this way).

4a) Either double click on "crypto.mws" or do 4b).

4b) Open Maple 9.5 and open the file "crypto.mws" from c:temp.

5) Press "return" somewhere in the midst of the file and ignore the warning signs.

Notes:
i) You can also get "crypto.mws" from http://www.prenhall.com/washington

ii) If you open a new page, the commands from "crypto.mws" may not work.

** Experimenting:**

Maple is a powerful and versatile computer program for mathematics (of course, outside math no one's ever heard of it).

Try it out! Compute something. Encrypt something. Make a mistake. Check out the HELP directory.

If you really can't think of a question, type in some of those from Appendix B.3 #1-3 and B.4 #1-6.

Notes:
i) Put a semi-colon at the end of every line.

ii) Use * for every multiplication and ^ for exponents.

** Goals for today:**

Decryption problems: 2.14 #1-4.

Number theory problems: 3.12 #1-4

Notes: i) do not use quotation marks in order for maple to decrypt the whole phrase.

ii) Parts of 2.14 #3 may be easier to do by hand.

** If you finish way too soon:**

1) Pick m and a and calculate powers a, a^2, a^3, ... mod m.

Try varying m and a and generate some tables of data.

What kind of patterns do you notice?

2) Do 3.13 #5.

3) Experiment with the 3n+1 algorithm which generates a sequence of numbers:

Start with any number a.
If a is even, let the next number be a/2.
If a is odd, let the next number be 3n+1.

For example, if we start with a=5 then we get the list of numbers
5,16,8,4,2,1,4,2,1,4,2,1....
We say that the algorithm terminates if the list starts to repeat itself.
For example, when a=5, the algorithm terminates and we say that it has length L(5)=6 and terminating value T(5)=1.

Write a computer program to implement the 3n+1 algorithm.
Find L(a) and T(a) for all 1 < a < 100.
Does this algorithm always terminate?

** Printing:**

Do not print your whole document. It is too long. Open a new file and copy problems 2.14 #3-4, 3.12 #2-3.

Or...
on your original document, you can cut all the "crypto.mws" commands from the top, cut all the mistakes,
(do not press "enter" again!) and then print.