The Hill cipher Encryption algorithm is one of the symmetric key algorithms that have several advantages in data encryption.
Project description
Cipher-Python-Package
Summary of the Python Package
This package encrypts your text using Hill Cipher Technique. Hill ciphers are an application of linear algebra to cryptology (the science of making and breaking codes and ciphers).
Algorithm:
Let the order of the encryption key be N (as it is a square matrix). Your text is divided into batches of length N and converted to numerical vectors by a simple mapping starting with A=0 and so on.
The key is then multiplied with the newly created batch vector to obtain the encoded vector. After each multiplication modular 36 calculations are performed on the vectors so as to bring the numbers between 0 and 36 and then mapped with their corresponding alphanumerics.
While decrypting, the decrypting key is found which is the inverse of the encrypting key modular 36. The same process is repeated for decrypting to get the original message back.
Implementation:
from pycipher import HillCipher
obj = HillCipher("beaf")
print(hc.encrypt("Love Python"))
print(hc.decrypt("PITTOO"))
References:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyciphers-1.0.0.tar.gz
.
File metadata
- Download URL: pyciphers-1.0.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05845b0935bdb3e35164a06c9e32f29df993145ebf938730a05e484c86360516 |
|
MD5 | 70f2dff70ea7da56a2ee35309681237d |
|
BLAKE2b-256 | 31bee69cc02cc77aab9bf91235fbe86bab4aeea4860014ae63c49910f905b79c |
File details
Details for the file pyciphers-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pyciphers-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b60661a66caf275008a91fe30dc3a04174f785d67db2027f39f352760fc3b3a2 |
|
MD5 | 5c079b1df5355316fc2d1a47fb1bcf63 |
|
BLAKE2b-256 | a0e2b6342439e54eb4e670c4045ca6f8856c18fbd80e559855566f3357ea590e |