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