A desktop app for learning classical cryptography. Pick a cipher, encrypt and decrypt messages, read how each one works, and build your own.
Built with Python and ttkbootstrap, using a dark theme.
You don't need Python to use CipherLab.
- Go to the Releases page and download
CipherLab.zip. - Unzip the whole folder anywhere.
- Double-click
CipherLab.exe.
Keep the files together. CipherLab.exe needs the other files in its folder, so don't move the exe on its own. A desktop shortcut to it is fine.
Windows may show a warning the first time you run it. The app isn't code-signed, so SmartScreen or your antivirus may say it is unrecognised. Click More info, then Run anyway.
- Lab: encrypt and decrypt messages with the built-in ciphers:
- Caesar (choose a shift from 1 to 25)
- Atbash
- Vigenère (choose a keyword)
- ROT13
- Reverse
- Learn: a lesson for each cipher with an explanation, the formula and a worked example. The Caesar lesson also shows the shifted alphabet.
- Custom ciphers: create your own cipher and get its own sidebar page, Learn lesson and Lab entry. There are two ways to make one:
- Configure a cipher: choose Caesar, Vigenère or Substitution and save its settings.
- Write custom code: write your own Python
encrypt(text)anddecrypt(text)functions.
- Favourites: the Lab keeps your 3 most recently used ciphers as quick-select cards.
- Files: open a
.txtfile as your message (up to 50,000 characters) and save the result to a file. - Copy and clear: copy the result to the clipboard, or clear the message and result boxes.
- Auto-save: your custom ciphers, favourites and last-used cipher come back when you reopen the app.
- In the Lab, click Add Cipher and choose a cipher.
- Type a message, set any options (such as the shift or keyword), then press Encrypt or Decrypt.
- Open Learn to read how a cipher works.
- Open Add Cipher in the sidebar to create your own cipher.
- To remove a custom cipher, open its lesson in Learn and click Delete this cipher (click twice to confirm).
Your favourites and custom ciphers are stored in ~/.cipherlab/save.json. Rebuilding or deleting the app does not remove this file.
To reset the app, delete that file:
- Press
Win + R. - Type
%USERPROFILE%\.cipherlaband press Enter. - Delete
save.json.
The Write Custom Code option runs the Python you type, so only use code you trust.
- Each run has a time limit. Code that runs too long, such as an infinite loop, is stopped and shows an error. The limit is 3 seconds when running from source and 10 seconds in the packaged app.
- This is a time limit, not a security sandbox. Don't run code you don't understand.
- In the packaged app, some Python standard-library modules may not be available to custom code.
Requirements: Python 3.8 or newer.
pip install -r requirements.txt
python main.py
Tkinter comes with most Python installs. On some Linux distributions you may need to install it separately (for example sudo apt install python3-tk).
python -m venv venv
.\venv\Scripts\python -m pip install ttkbootstrap pyinstaller
.\venv\Scripts\python -m PyInstaller -y --clean --noconsole --onedir --name CipherLab --collect-all ttkbootstrap main.py
The finished app is in dist\CipherLab. Share that whole folder, zipped.
Coded by ChiefyBean


