Open Educational Resources

Document Type

Activity or Lab

Publication Date

Spring 2-2-2019


Cryptography module

This archive contains a series of lessons on cryptography suitable for use in a CS0 course. The only requirement is familiarity with Python, particularly dictionaries, lists, and file IO. It is also assumed that students know how to create stand-alone Python programs and interact with them through the terminal. Most of the work is done in Jupyter notebooks.

The material found in the notebooks is a combination of reading material, exercises, activities and assignments. Below are descriptions of each lesson or assignment and links to notebooks on Cocalc. The same files are available for batch download in this archive.

Substitution cipher:

These notebooks introduce the general substitution cipher by way of the Caesar cipher:

Cracking the substitution cipher:

This is a homework assignment in which students use n-gram frequency analysis to attempt to crack a general substitution cipher.

Using AES:

This project investigates the use of AES in Python code using the pycrypto module. This is one of two major projects for the semester. Students ultimately produce a password manager which stores the password database as encrypted JSON.

Reflecting on cryptography in society:

We prepared this for a classroom discussion of the ethics and societal implications of cryptography.

An essay on cryptography and ethics

Students are asked to write a short essay stating their position on the proper role of cryptography in society.

This OER material was produced as a result of the CS04ALL CUNY OER project


This OER material was produced as a result of the CS04ALL CUNY OER project

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 License.