Package of historical and famous ciphers
Go to file
Michele Guerini Rocco a86b6052f2 Improve RNG 2015-03-11 23:25:47 +01:00
crypto Improve RNG 2015-03-11 23:25:47 +01:00
.gitignore Aggiornamento minore 2013-01-05 01:21:19 +01:00
README.md Fixed layout 2014-01-14 20:27:51 +01:00
example.py English translation 2014-01-14 17:36:54 +01:00

README.md

Crypto

Package of historical and famous ciphers in python 3

Info

A collection of historical and famous ciphers in python 3. For now it contains:

  • ROT13;
  • Vigenere cipher;
  • Vernam cipher
  • Gödel numbering

You can choose whether to encrypt only the letters of the alphabet, ASCII or Unicode UTF-8 depending on the module that you import. It is able to generate a onetimepad for the Vernam cipher with true random numbers from the microphone via pyaudio.

Instruction

Encryption:

*.rot13(string): string to be encoded;
*.vigenere(string, worm): string to encode and worm (encryption key);
*.vernam(string): string to be encoded;
*.godel(string, first): string to be encoded and a prime number (a few thousand digits are recommended);

Decryption:

*.rot13(string): encoded string;
*.vigenere(string, worm) encoded string and worm (encryption key);
*.vernam(string, pad): encoded string and onetimepad in a tuple;
*.godel(string, first, n): encoded string, number and length of the first decoded string;	

Usage

In "example.py" there is an example of the use of each function.

License

Dual licensed under the MIT and GPL licenses:
http://www.opensource.org/licenses/mit-license.php
http://www.gnu.org/licenses/gpl.html