Caesar Cipherer
Here are Encryption and Decryption tools. Change the “key”, which is the number of alphabet letters to shift by.
Encryption
Decryption
Learn the Sage Commands
Here we define an alphabet:
Here we ‘encode’ our message in the alphabet:
Now we define the Shift Cryptosystem (i.e. Caesar cipher):
Now we can create a ciphertext out of our plaintext and a key. Here we use key=1, i.e. a shift by 1 character:
Now we can decipher using the same key:
Here’s a sandbox for you to play with: