Python Ciphers

Three ciphers I have implemented in python:

Beaufort Cipher in Ascii

This is the famous historical Vigenère-like cipher, but encrypts letters,  numbers, and punctuation; also capable of using numbers/punctuation in the key.

This algorithm use the key to generate a hash (sha 512) instead of just using the letters as in the original cipher; this  increases the key length considerably, hopefully increasing security as well.

example:
Plaintext: This secret message was sent at 2100 UTC
key linux

Ciphertext:

&IdtZ )a@gu _4e(t #hupy fakxl O@~?H x879M

decryption mode:

Thiss ecret messa gewas senta t2100 UTCxx

Code Name: Obsidian

This is my own algorithm, a digraphic cipher (encrypts two letters at a time), and uses an integer as a key:

Plaintext: This secret message was sent at 2100 UTC

key: 712815

Ciphertext:

ot<g( n@a.b 5NJn. u)b*u (n}p) uCkHq D”GEL O[GFU

decryption mode:

Thiss ecret messa gewas senta t2100 UTCHD ]B%OY

Random characters are added whenever the length of the message is not a multiple of ten.

Dinumeric Encryption

This is also an original digraphic algorithm, using an integer as a key, but outputs numbers.

Plaintext: This secret message was sent at 2100 UTC

key: 13245

Ciphertext:

6674 7650 7488 7325 4538 4664 7500 4869 4542 4882 7488 4290 4880 1541 1622 4395 6193 3412

decryption mode:

Thiss ecret messa gewas senta t2100 UTC@; cQnkZ

This entry was posted in Encryption and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*