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


Programming Lab Assignment

Lab Descripton

LAB 1 Pre-test

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


Vigenere Cipher


Web Resources: Vigenere Cipher
program to find estimate key length


Quiz 1 Prep


Quiz 1


Vigenere Cipher


Vigenere Cryptanalysis Part I


Vigenere Cryptanalysis Part II


Vigenere Graded Lab

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 PROGRAMMING LAB

Graded Lab, Due Day Feb 27 (Part 1), March 11 (Part 2)

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 Wed, March 11

HILL CIPHER CRYPTANALYSIS Quiz - the file will be posted by Friday end of the day



Hill Cipher Part I Testing and Short Hill Cryptanalysis Quiz - Friday Feb 27



Public Key Cryptology


Knapsack Cryptosystem