38 lines
1.3 KiB
Markdown
38 lines
1.3 KiB
Markdown
# 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](http://people.csail.mit.edu/hubert/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
|