Differences between revisions 14 and 15
Revision 14 as of 2019-08-07 21:42:08
Size: 5740
Editor: amy
Comment:
Revision 15 as of 2019-08-07 21:47:32
Size: 5748
Editor: amy
Comment:
Deletions are marked like this. Additions are marked like this.
Line 69: Line 69:
def affine_cipher(message = input_box(default='"secrets"', width = 50), a=[1,3,4..12,14,15..25], b =[0..25]): def affine_cipher(message = input_box(default='"secrets"', width = 50), a=[1,3,5,7,9,11,15,17,19,21,23], b =[0..25]):

Sage Interactions - Cryptography - Under Construction

This page was be created at Sage Days 103, 7-10 August 2019 by Sarah Arpin, Catalina Camacho-Navarro, Holly Paige Chaos, Amy Feaver, Eva Goedhart, Rebecca Lauren Miller, Alexis Newton, and Nandita Sahajpal.

We would also like to acknowledge Katherine Stange, who allowed us to use some of the code from her cryptography course as a starting point for many of these interacts.

If you have cryptography-related interactions that you are interested in adding to this page, please do so. You can also contact Amy Feaver at [email protected]

goto interact main page

Shift Cipher

by Sarah Arpin, Alexis Newton

The shift cipher is a classical cryptosystem that takes plaintext and shifts it through the alphabet by a given number of letters. -EG

Shift Cipher Encryption

Shift Cipher Decryption

If you know that your message was encrypted using a shift cipher, you can use the known shift value to decrypt. If this is not known, brute force can be used to get 26 possible decrypted messages.

Affine Cipher

by Sarah Arpin, Alexis Newton

Substitution Cipher

by Catalina Camacho-Navarro

A simple cipher to encrypt messages in which each letter is assigned to another letter. Brute force or frequency analysis can be used to decrypt. -EG

Playfair Cipher

A special type of substitution cipher in which the plaintext is broken up into two-letter digraphs with some restrictions. Those digraphs are encrypted using a Polybius square, (i.e. a 5x5 grid in which each letter of the alphabet is its own entry with the exception of ij which are placed together). The positions of the letters in the digraph determine how the digraph is encrypted.

Frequency Analysis Decryption Tool

Vigenère Cipher

by Holly Paige Chaos, Rebecca Lauren Miller, and Kate Stange

Using a secret code word, encrypt each letter by shifting it the corresponding letter in the code word. -EG

Vigenère Cipher Encryption

Vigenère Cipher Decryption

Hill Cipher

by Holly Paige Chaos and Rebecca Lauren Miller

RSA

Named for the authors Rivest, Shamir, Aldeman, RSA uses exponentiation and modular arithmetic to encrypt and decrypt messages between two parties. Each of those parties has their own secret and public key. To see how it works, following along while Alicia and Bernadette share a message. -EG

Diffe-Hellman Key Exchange

One-time Pad

interact/cryptography (last edited 2019-11-14 19:53:51 by chapoton)