CSCI 391: Practical Cryptology Fall 2012
Course Material, Lecture Activities, Homework and Labs
Final Project
Final Project
Reading: Chapter 1: 1.1, 1.2
Reading: Chapter 2: 2.1, 2.2
Affine Cipher Web Resources by Marc Renault
Programming Lab Assignment
- In this lab you will design a programming implementation for one of the Substitution Monoalphabetic
Ciphers.
- You can use C, Java or Python programming languages in the UNIX/LINUX or Windows environment.
Schedule:
- Start day: Wed, August 29, in class
- Due Day: Wed, Sept 5, in lcass
- The demonstration of the programming solution and the correctness check will be done in class
on Wed, Sept 5.
- You would need to send me your source file by e-mail to CSCI391@gmail.com by 4:00 PM, Wed, Sept 5
Affine Cipher Lab Assessment will consist of two grades
- First grade will be for answering the following questions. Due Day: Wed Sept 5 by e-mail to
CSCI391@gmail.com by 4:00 PM
- Second grade will be for
programming lab and will consist of the following:
- Correctness of the programming solution and in class
demonstration (90%)
- Programming style, code appearance, and efficiency of the code
(10%)
Good programming style includes well written comments,
indentation, meaningful variable and function names, output
expalanation, and more. See links below for more details.
- If you missed the due day class you have to demonstrate the correctness of the program during the course office hours within ONE
week of the due day to be qualified for the full credit.
- If you fail to demonstrate the correctness of the program within ONE week of the due day, each late day will result in reduction
of
the full credit by 25 points.
For Lab Description see here
Affine Cipher Lab Comments:
- A= 1 is a valid key - Shift Cipher
- B = 0 , B = 25 ARE VALID KEYS!!
- To check validity of the input:
- Valid A: GCD (A, 26)=1
- To find GCD it is better to use Euclidean algorithm:
- GCD(a,b) = b, if a%b = 0
- GCD(a,b)= GCD(b, a%b), otherwise
- To find mod of negative number (Python does it without special treatment) it is better to use general definition.
Some of
you just added 26 in case of negative value
- Incorporate functions. Some of you wrote everything in main
- But at the same time, don't exaggerate - I will explain this part in class.
- Confusion between programming structures and data structures.
- Examples of the programming structures: loops, if-else statements,
functions, etc. (INT (integer) - variable type)
- Data structure is a particular way of storing and organizing
data in a
computer so that it can be used efficiently. Examples: arrays, linked
lists, stacks and queues, trees, etc.
Lecture: Cryptanalysis of Affine Cipher
Cryptanalysis of Affine Cipher Part I
Cryptanalysis of Affine Cipher Part II
Wolfram|Alpha: Computational Knowledge
Engine
Affine Cipher Cryptanalysis Graded Lab
- Problem 1: Question 4 page 55 from your textbook
- Problem 2: Question 5 page 55 from your textbook
- Problem 3: The ciphertex
EUJPE HUNKL NPOJK VNKSJ FKTBO LCHBU PBOMM NPKBK HPBOM BMAHU PNKLN POJKV
NKSJF KRJTC JUKPB OMSJE HP
is the result if an affine cipher encipherment. Hint: Three
most frequent letters in the ciphertext correspond to the plaintext
letters O, S, and T not necessarily in that order
- Bonus (20 points):Write a program that accepts ciphertext only.
Find the keys and decipher the message. Use letter frequency analysis and
apply known plaintext attack after making assumption on possible plaintext
letters. Use your program to solve Problem 3 from the list.
Test Inputs for Bonus Program
- Ciphertext 1: SJEFWLUQGGWJUYQEUDFQJRUORFCAJOUNIHJOFFWJU
- Ciphertext 2: VFFNJBSDRVYTXFVGJYTVMFSVJGTAIATHVWBYTVYOFVJBSZFJINJBSDJVYETABTWAFARIFAFVVJGV
- Ciphertext 3: ACCKHUQFCOMPCIQVCMOBFJQVMZYPOLOHOBICFTCOHJTUHQZCMJUHC
- For
each problem you have to write detailed solution and explain each
step.
- You have to write a program that finds keys using an
algorithm
that was explained in the lecture. The input for the program is four
characters ( two plaintext letters and two ciphertext
letters). The output for the program: affine cipher keys A and B.
- You will use the above program to perform calculations.
- Submit
source file and detailed solution.
- Due Day: Friday, 14 by the end of the class time
Important! If you will struggle with the programmin part, this assignment could
be done without programming for the maximal grade of 89.
Vigenere Cipher
Web Resources: Sharky's Vigenere
Cipher
Vigenere Cipher
Vigenere Cryptanalysis Part I
Vigenere
Cryptanalysis Part II
Vigenere Python Program
Vigenere Graded
Lab
Computer Ethics Component
- You will work in class on Computer Ethics Component on Monday and Wed this week. There is no class on Friday,
October 5.
- You have to choose your implementation and team option by the end of the class on Monday and send me an e-mail
indicating your choice.
- Due Day and Presentations Day: Monday, October 8
- Computer Ethics Component Description
Hill Cipher
Hill Cipher
Quiz 2 Preparation and Info
Quiz 2 Prep
Java Applet
to find modular multiplicative inverse - written by Andrew Burns
QUIZ 2
HILL CIPHER CRYPTANALYSIS
Example and Theory
In Class Practice
Problem 1: The ciphertext ZWSENIUSPLJVEU was obtained by Hill
Cipher
using 2x2
matrix. You know that the block ZW corresponds to the plain text HO and
the block PL corresponds to the plain text UT. Determine the key matrix
and then use it to decipher the rest of the message.
Problem 2:The
following plaintext THE GOLD IS BURIED IN ORONO was encrypted by Hill
Cipher with 2X2 key matrix and the correspondent ciphertext is
GZSCXNVCDJZXEOVCRCLSRC.
Find a key matrix.
HILL CIPHER CRYPTANALYSIS PROGRAMMING LAB -
Due Day Friday, October 26 by 11 AM - beginning of the class time!
Graded Lab
To test your program use the following quiz questions - you must
submit the answers for the quiz questions by the end of the class on
Friday, October 26, 11:50 AM