pip install pycryptokg
A cryptography library for Python ( both 2.7x and 3.x versions are supported. ) Here's a broad description of the cryptography techniques given
-
1 Substitution ( each character is substituted with another, can be a different space than the plaintext )
-
1.1 Monalphabetic ( every character is substituted to the same character, no matter the position )
- 1.1.1 Additive Cipher ( aka Shift, Caesar )
- 1.1.2 Multiplicative Cipher
- 1.1.3 Affine Cipher
-
1.2 Polyalphabetic Cipher ( the value of the substituted character depends on both its value and it's position )
- 1.2.1 Autokey Cipher
- 1.2.2 Playfair Cipher
- 1.2.3 Vignere Cipher
- 1.2.4 Hill Cipher
-
-
2 Transpostion ( The orders of the characters is interchanged )
- 2.1 Keyless Transposition
- 2.2 Keyed Transposition
-
3 Modern Symmetric Ciphers
- 3.1 Data Encryption Standard ( DES )
- 3.2 Advanced Encryption Standard ( AES )
- 1. Rivest, Shamir, Adleman ( RSA ) Cryptosystem
- 2. Rabin Cryptosystem
- 3. Merkle-Hellman Knapsack Cryptosystem
- 4. El-Gamal Cryptosystem
- 5. Elliptic Curve Cryptosystem
Open a terminal and use
pip install pycryptokg
In your Python script, you can use the library as:
from pycryptokg import MonoalphabeticCrypto as MC
from pycryptokg import PolyalphabeticCrypto as PC
mc = MC()
pc = PC()
To use the additive cipher
cipher_text = mc.additive_cipher_encrypt("Sample Text",7)
print(cipher_text)
Zhtwsl'[l {
You can decrypt using
plain = mc.additive_cipher_decrypt(cipher_text, 7)
print(plain)
Sample Text
For detailed information about the API's, use
help(mc.additive_cipher_encrypt)