Overview

On this page, we collect resources about some basic cryptography, the mathematics of encrypting and decrypting (hopefully) secret messages, including some basic modular arithmetic.

Important

The basic and advanced learning objectives listed below are meant to give you an idea of the material you should learn about this section. These are mainly intended to be used in a course which uses an Active Learning approach, where students are required to “read ahead” before each class - but can equally be used in a more traditional course setting.

Unless your teacher gives you specific instructions, it is up to you to decide how much of the listed resources you need to read or watch - you probably do not need to go through all of it. You might also want to look at the General Study Tips & Tricks page for some recommendations on how to effectively study with a math textbook and videos.

Basic learning objectives

These are the tasks you should be able to perform with reasonable fluency when you arrive at your next class meeting. Important new vocabulary words are indicated in italics.

  • Encrypt and decrypt messages using a Caesar cipher (using a known shift).
  • Decrypt a message which was encrypted with an unknown shift using a Caesar cipher, using frequency analysis and/or educated guessing.
  • Do some basic arithmetic in \(\mathbb{Z}_{26}\), i.e. modulo \(26\).
  • Encrypt messages using a \(2\times 2\) Hill cipher over \(\mathbb{Z}_{26}\)

Advanced learning objectives

In addition to mastering the basic objectives, here are the tasks you should be able to perform after class, with practice:

  • Determine the invertability of a given matrix over \(\mathbb{Z}_{26}\)
  • Find the inverse of a given matrix over \(\mathbb{Z}_{26}\)
  • Decrypt a message which was encrypted using a Hill cipher with given encryption matrix.
  • Encrypt/decrypt messages using a Hill cipher with \(2\times 2\) or \(3\times 3\) matrices, using various modular bases, e.g. \(27\), \(29\), or \(36\).

To prepare for class

  • Watch this short video which gives a quick introduction of the motivation and basic idea of cryptography:

Caesar Cipher & other substitution ciphers

  • Watch this short video which gives a quick explanation of the Casear cipher, including its history and its vulnerability to frequency attacks:

  • Watch this short video which gives a more detailed example of encrypting and decrypting messages using the Casear cipher:

  • Read this short and informative Wikipedia page for more information: https://en.wikipedia.org/wiki/Caesar_cipher

Modular Arithmetic

  • Watch the following videos which teach the basics of modular arithmetic:

  • Read (and keep for reference) the following document which summarizes a few important modular multiplication & inverses tables, to be used in particular with Hill ciphers:

    Cryptography Character and Multiplication Tables

Hill cipher

  • Read this short Wikipedia page: https://en.wikipedia.org/wiki/Hill_cipher
  • Watch this video which explains a \(2\times 2\) Hill cipher over \(\mathbb{Z}_{26}\), and also gives an example of a “known-plaintext attack”:

  • Watch this video which shows an example of a \(2\times 2\) Hill cipher over \(\mathbb{Z}_{36}\) (using the codes 0-26 for the letters A-Z and the codes 27-36 for the digits 0-9):


Author

Gabriel Indurskis Avatar Gabriel Indurskis

Published

Category

linearalgebra

Tags

Feedback

Please click here if you find a mistake or broken link/video, or if you have any other suggestions to improve this page!