sarimbinwaseem / Ciphers

Code implementation of Ciphers taught in Information Security

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code style: black Ruff linting: pylint

Cipher Implementaions

Caesar Cipher

How to run:

Encrypt:

python main.py -e -m "The message of secret" -k 8

Decrypt:

python main.py -d "APMHUM  IOMHWNH MKZMA" -k 8

Both:

python main.py -ed -m "The message of secret" -k 8
  • -k/--key is optional as it defaults to 3

Affine Cipher

Comming soon

Playfair Cipher

How to run:

Encrypt:

python main.py -e -m "charlemagne" -k "AACHEN"

Decrypt:

python main.py -d -m "HECQOCKHIEHY" -k "AACHEN"
  • Encryption is working.
  • Code needs optimization.
  • Spaces will break the code.
  • Double letters are not welcome in message at the moment.

Hill Cipher

How to run:

Encrypt:

python main.py -e -m "USMAN" -k "7 8 11 11"

Decrypt (Not implemented yet):

python main.py -d -m "" -k "7 8 11 11"
  • Support for space can be activated by changing mod to 27.
  • Mod value will be changed to 27 if space is present in message.
Image of Hill Cipher running and output. Image of Hill Cipher running and output with space in message.

About

Code implementation of Ciphers taught in Information Security


Languages

Language:Python 100.0%