CSCI 391: Practical Cryptology
Course Material, Lecture Activities, Homework and Labs
Programming Lab Assignment
Lab Descripton
- 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.
- Due Day: Monday, Sept 18, by 11:50 (end of the class)
- The demonstration of the programming solution and the correctness check will be done in class
- You would need to send me your source file by e-mail to yanako@cs.widener.edu
Affine Cipher Lab Assessment will consist of two grades
- 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.
Affine Cipher Lab Comments:
- A= 1 is a valid key - Shift Cipher
- A must be POSITIVE! A>0
- 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.
General defnition: If n<0, then n%m = m - (-n)%26
- 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.
- Many students didn't end properly Brute Force for Shift cipher
- Some of you confused between encryption and decryption in Shift cipher:
C=(P+K)%m
P=(C-K)%m
Lecture: Cryptanalysis of Affine Cipher
Vigenere Cipher
Web Resources: Vigenere
Cipher
program to find estimate key length
Quiz 2 Prep
Vigenere Cipher
Vigenere Cryptanalysis Part I
Vigenere
Cryptanalysis Part II
Vigenere Graded
Lab - DUE DAY FRIDAY OCT 13
Python Program - finds frequencies and sort in decreasing order of
frequencies
frequencies program
Hill Cipher
Hill Cipher
Quiz 3 Preparation and Info, QUIZ 3 on Wed Oct 11
Quiz 3 Prep
Java Applet
to find modular multiplicative inverse - written by Andrew Burns
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 PROGRAMMING LAB
Graded Lab, Due Day Friday, Oct 20
HILL CIPHER CRYPTANALYSIS PROGRAMMING LAB
Graded Lab, Due Day Friday Oct 27
To test your program use the following test file (q1,q2,and q3)
HILL
CIPHER CRYPTANALYSIS INPUT/OUTPUT TEST
Important Dates:
- Quiz 5 - Wed, Oct 18, Quiz 5
Preparation
- Hill Cipher Encryption/Decryption Due Day will be FRIDAY, OCT 20.
Public Key Cryptology
RSA GRADED LAB TESTING
RSA GRADED LAB TESTING
Knapsack Cryptosystem
Thanksgiving Homework
Thanksgiving Homework Due Day Monday Nov 27 by 11 am - by
email or on paper bring to
class