CSCI 391: Practical Cryptology
Course Material, Lecture Activities, Homework and Labs
Homework/In Class Presentations - Due Day Friday August 30
Homework/In Class Presentations Assignment Details
Wolfram|Alpha: Computational
Knowledge Engine
Reference Materials: Problem Solving in C and Python:
Programming Exercises and
Solutions, Part 1
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: Wed, Sept 18. Your program must be ready for testing at 3 PM when class
starts.
- 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 by the
end of the class (4:00 PM) on Wed, Sept 18.
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.
Quiz 1 - Friday, Sept 13
- quiz 1 preparation
- Material: modular arithmetic, Affine Cipher, Shift Cipher (with Brute
Force cryptanalysis),
Caesar Cipher
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
Lecture Practice
- Suppose you are using Affine Cipher, and you know that plaintext letter J
corresponds
to cipherletter X and you know that keyA = 7. Find keyB.
- Suppose you are using Affince Cipher, and you know that plaintext letter B
corresponds to letter Y and you know keyB = 13. Find keyA.
- Ciphertext WHKCJILXI was encrypted by affine cipher C = A*P + 8
(mod 26), where parameter A is uknown. You have a following additional
information: plaintext letter L was encrypted by letter H. Find A and
decrypt the message. You can use applet for decryption.
For your convinience, below are numeric values of ENGLISH letters:
A=0 B=1 C=2 D=3 E=4 F=5 G=6 H=7 I=8 J=9 K=10 L=11
M=12 N=13 O=14 P=15 Q=16 R=17 S=18 T=19 U=20 V=21
W=22 X=23 Y=24 Z=25
Web Resources: Vigenere
Cipher
Quiz 2 Prep
Quiz 2 Prep Part II
Vigenere Cipher
Vigenere Cryptanalysis Part I
Vigenere
Cryptanalysis Part II
Hill Cipher
Hill Cipher
Quiz 3 Preparation and Info, QUIZ 3 on Wed Oct 16
Quiz 3 Prep
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 Wed, Oct 23
HILL CIPHER CRYPTANALYSIS PROGRAMMING LAB
Graded Lab, Due Day Wed Oct 30
To test your program use the following test file (q1,q2,and q3)
HILL
CIPHER CRYPTANALYSIS INPUT/OUTPUT TEST
Important Dates:
Knapsack Quiz Preparation
Knapsack Quiz Preparation