Course Level
CS1
Knowledge Unit
Fundamental Programming Concepts
Collection Item Type
Assignment
Synopsis

In this assignment students work either individually or in pairs to implement and crack a simple version of RSA. As subproblems in generating RSA keys, students must generate random primes, calculate Euler's totient, and find the greatest common divisor of two numbers using Euclid's algorithm. They must then encrypt/decrypt messages using these keys and use brute force as an attack against encryption. In addition to reviewing brute force and recursive algorithms, this assignment requires students to write a program with multiple helper functions.

Recommendations

Add checkpoints throughout the activity where students can discuss the main functions of the program and test out their programs with one another to increase Student-Student Interaction. Integrate pair programming when it is appropriate for students to collaborate on a lab, assignment, or project. Have the “driver” controls the mouse and the keyboard, while the “navigator” makes suggestions, points out errors, and asks questions. Partners routinely switch roles to gain the benefits of each role.

Engagement Highlights

Gives an example of how CS topics are used in the real world encryption/decryption scenario to Employ Meaningful and Relevant Content. Incorporates Student Choice by permitting the implementation of additional features for extra-credit.

Materials and Links

Computer Science Details

Programming Language
Python

Material Format and Licensing Information

Creative Commons License
CC BY-NC