Practical Cryptology

CSCI 391: Practical Cryptology

Course Material, Lecture Activities, Homework and Labs


Lecture: Introduction to Cryptology


Lecture: Substitution Monoalphabetic Ciphers - Caesar, Shift and Affine Ciphers

Affine Cipher Web Resources

Letters Mapping PDF File


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


LAB 1 Pre-test




Quiz 1 - Friday, Sept 13

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:
    1. GCD(a,b) = b, if a%b = 0
    2. 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



Affine Cipher Cryptanalysis Graded Activity Preparation for Monday Sept 23

Affine Cipher Cryptanalysis Programming Graded Lab - Due Day Wed Oct 2



Vigenere Cipher


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