Skip to main content

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:

https://apprendre-en-ligne.net/crypto/hill/Hillciph.pdf

Metadata

Release files for pyciphers 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyciphers 1.0.0
File Size Uploaded
pyciphers-1.0.0.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyciphers 1.0.0
File Interpreter ABI Platform
pyciphers-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / pyciphers-1.0.0.tar.gz

Download URL pyciphers-1.0.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
05845b0935bdb3e35164a06c9e32f29df993145ebf938730a05e484c86360516
BLAKE2b-256 checksum
How to use checksums
31bee69cc02cc77aab9bf91235fbe86bab4aeea4860014ae63c49910f905b79c
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pyciphers-1.0.0-py3-none-any.whl

Download URL pyciphers-1.0.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b60661a66caf275008a91fe30dc3a04174f785d67db2027f39f352760fc3b3a2
BLAKE2b-256 checksum
How to use checksums
a0e2b6342439e54eb4e670c4045ca6f8856c18fbd80e559855566f3357ea590e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page