This application replicates the following text encryption processes:
- Vigenère cipher used in the famous Kryptos Sculpture on the grounds of the Central Intelligence Agency (CIA) headquarters.
- Enigma Machine.
More encryption methods will be added in the future.
-
Clone the Repository
To get started, clone this repository to your local machine using the following command:
git clone https://github.com/tranhlok/obfuscate.git
cd obfuscate
- Set Up a Virtual Environment (optional but recommended)
Create a new virtual environment by running
python3 -m venv venv
Activate the virtual environment:
- On Windows:
.\venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- Install Dependencies
Install the required Python packages with pip:
pip install -r requirements.txt
python run.py
Select the encryption technique from the dropdown menu.
If Vigenère is Selected:
- Enter the first key (a keyword) in the "First Key" field.
- Enter the second key (a keyword) in the "Second Key" field.
- Enter the passage you want to encrypt or decrypt in the "Passage" field.
- Click "Encrypt" to encrypt the passage or "Decrypt" to decrypt the passage.
- The results will be displayed in the "Result" field, along with the generated alphabet and lines used for the Vigenere cipher. All output can be select and copy.
If Enigma is Selected:
- Enter the settings and passage.
- The encrypt/decrypt is the same due to the natural of the machine
-
Keywords: KRYPTOS and PALIMPSEST
-
Encrypted Text
EMUFPHZLRFAXYUSDJKZLDKRNSHGNFIVJ
YQTQUXQBQVYUVLLTREVJYQTMKYRDMFD
- Decrypted Text
BETWEENSUBTLESHADINGANDTHEABSENCEOFLIGHTLIESTHENUANCEOFIQLUSION
- Decrypted Text With Spaces
BETWEEN SUBTLE SHADING AND THE ABSENCE OF LIGHT LIES THE NUANCE OF IQLUSION
-
Keywords: KRYPTOS and ABSCISSA
-
Encrypted Text
VFPJUDEEHZWETZYVGWHKKQETGFQJNCE
GGWHKK?DQMCPFQZDQMMIAGPFXHQRLG
TIMVMZJANQLVKQEDAGDVFRPJUNGEUNA
QZGZLECGYUXUEENJTBJLBQCRTBJDFHRR
YIZETKZEMVDUFKSJHKFWHKUWQLSZFTI
HHDDDUVH?DWKBFUFPWNTDFIYCUQZERE
EVLDKFEZMOQQJLTTUGSYQPFEUNLAVIDX
FLGGTEZ?FKZBSFDQVGOGIPUFXHHDRKF
FHQNTGPUAECNUVPDJMQCLQUMUNEDFQ
ELZZVRRGKFFVOEEXBDMVPNFQXEZLGRE
DNQFMPNZGLFLPMRJQYALMGNUVPDXVKP
DQUMEBEDMHDAFMJGZNUPLGEWJLLAETG
- Decrypted Text
ITWASTOTALLYINVISIBLEHOWSTHATPOSSIBLETHEYUSEDTHEEARTHSMAGNETICFIELDXTHE
INFORMATIONWASGATHEREDANDTRANSMITTEDUNDERGRUUNDTOANUNKNOWNLOCATIONXDOES
LANGLEYKNOWABOUTTHISTHEYSHOULDITSBURIEDOUTTHERESOMEWHEREXWHOKNOWSTHEEXACT
LOCATIONONLYWWTHISWASHISLASTMESSAGEXTHIRTYEIGHTDEGREESFIFTYSEVENMINUTES
SIXPOINTFIVESECONDSNORTHSEVENTYSEVENDEGREESEIGHTMINUTESFORTYFOURSECONDSWEST
IDBYROWS
- Decrypted Text With Spaces and Symbols
IT WAS TOTALLY INVISIBLE HOW'S THAT POSSIBLE?
THEY USED THE EARTH'S MAGNETIC FIELD. THE INFORMATION WAS GATHERED AND TRANSMITTED UNDERGROUND TO AN UNKNOWN LOCATION.
DOES LANGLEY KNOW ABOUT THIS? THEY SHOULD. IT'S BURIED OUT THERE SOMEWHERE. WHO KNOWS THE EXACT LOCATION? ONLY W.W. THIS WAS HIS LAST MESSAGE:
THIRTY-EIGHT DEGREES FIFTY-SEVEN MINUTES SIX POINT FIVE SECONDS NORTH, SEVENTY-SEVEN DEGREES EIGHT MINUTES FORTY-FOUR SECONDS WEST. ID BY ROWS.
vigenere_cipher_app/
├── encryption_methods/ # Directory containing different encryption method modules
│ ├── __init__.py
│ ├── vigenere/ # Directory for the Vigenere cipher implementation
│ │ ├── __init__.py
│ │ ├── vigenere.py # Vigenere cipher logic (encryption, decryption, and helpers)
│ └── enigma/ # Directory for the Enigma Machine implementation
│ ├── __init__.py
│ ├── enigma.py # Logic for Enigma Machine
├── app/ # Directory for the main application code
│ ├── __init__.py
│ ├── main.py # Main entry point for the PyQt5 application
├── fig/ # Directory for additional supporting figures
├── README.md # Documentation for the project
├── requirements.txt # Lists all Python dependencies
└── run.py # Script to run the application
- The project is inspired by a Youtube video by LEMMiNO.
- UCSD Solutions walkthrough for KRYPTOS K1-2-3.
- This explaination of Enigma Machine.
- Wiki pages of Kryptos, Enigma Machine, Vigenère cipher.
(
)\ ) * )
(()/( ` ) /(( )
/(_)) ( ( ( )(_))( ( /( (
(_)) )\ )\ (_(_()|()\ )(_)) )\ )
| | ((_) ((_) |_ _|((_|(_)_ _(_/(
| |__/ _ \/ _| | | | '_/ _` | ' \))
|____\___/\__| |_| |_| \__,_|_||_|