- Graham Seamans
- [email protected]
- Place the key into
./key.txt
. Hex but with no leading '0x'. - Place the plaintext into
./plaintext.txt
or the ciphertext into./ciphertext.txt
- Run:
python src/main.py e
orpython src/main.py d
wheree
is encrypt andd
is decrypt. If you don't provide an arumgent you will be prompted. - Find the plaintext or cypher text in the appropriate file.
- This runs with ASCII encode and decode so things will get weird with UTF-8 files, although the majority of the text will be just fine.
./plaintext.txt
- Put the plain text here to encrypt or find it here after decryption../ciphertext.txt
- Put the cipher text here to decrypt or find it here after encryption../key.txt
- The key goes here. No '0x' before the key. 80bit key only../src/main.py
- Takes user input about whether to encrypt and decrypt and interfaces withcipher.py
./src/cipher.py
- Largely runs the show. Reads and writes to files and calls thefestel.py
with blocks to encrypt or decrypt../src/festel.py
- The festel cipher. Gets keys fromkey.py
. Has the f and g functions../src/key.py
- Generates the keys. Makes a list of lists of all subkeys in encrytion order../src/ftable.py
- The ftable and lookup function../src/utility.py
- Functions to translate between and combine ascii, hex, binary, binary strings, and such.