2014-01-14 17:36:54 +01:00
# Crypto
2012-12-25 23:19:52 +01:00
2013-12-06 19:57:11 +01:00
2014-01-14 17:36:54 +01:00
## Package of historical and famous ciphers in python 3
2012-12-25 23:19:52 +01:00
2014-01-14 17:36:54 +01:00
### Info
A collection of historical and famous ciphers in python 3.
For now it contains:
2012-12-25 23:19:52 +01:00
* ROT13;
2014-01-14 17:36:54 +01:00
* Vigenere cipher;
* Vernam cipher
* Gödel numbering
2012-12-25 23:19:52 +01:00
2014-01-14 17:36:54 +01:00
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 ](http://people.csail.mit.edu/hubert/pyaudio/ ).
2012-12-25 23:19:52 +01:00
2014-01-14 17:36:54 +01:00
### Instruction
Encryption:
2012-12-25 23:19:52 +01:00
2014-01-14 17:36:54 +01:00
*.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:
2012-12-25 23:19:52 +01:00
2014-01-14 17:36:54 +01:00
*.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