𝚌𝚛𝚢𝚙𝚝𝚘𝚜𝚢𝚜𝚝𝚎𝚖𝚜
Overview
The cryptosystems package offers a robust suite of classes and functions for symmetric and asymmetric encryption, hashing algorithms, key exchange protocols as well as mathematical utility functions. Designed for seamless encryption, decryption, and cryptographic operations, this package is lightweight and efficient, relying solely on Python’s built-in libraries: ctypes, warnings and hashlib. With almost all of the cryptographic logic implemented from scratch, cryptosystems provides a streamlined, dependency-free solution, ensuring consistency and reliability across different environments as well as Python versions.
📜 Changelog for cryptosystems v1.0.0 📜
- 🚀 Improved Performance with GMP 🚀: Optimized performance using GMP for faster computations.
- 🧩 Modularized Codebase 🧩: Refactored the codebase to be more modular for better maintainability and scalability.
- 🔄 Updated Function Interfaces for Asymmetric Cryptosystems 🔄: Revised function interfaces, with added
generate_keysfunctionality. - 📝 API Documentation Created 📝: Comprehensive API documentation has been created to assist with the usage of
cryptosystems, covering cryptosystem description, mathematical details, usage examples and more. - 🛠️ Modified Rabin implementation 🛠️: Modified Rabin implementation with added functionality to verify plaintext using SHA-256 hash.
- 🔧 Fixed ElGamal errors 🔧: Corrected the ElGamal implementation with a newly added
find_generatorfunction. - 🌀 Extended Support for ECC Curves 🌀: Added support for additional ECC curves, including Montgomery curves.
- 🔐 SHA-512 Wrapper Added 🔐: Added a wrapper for the SHA-512 algorithm to the
hash_functionssubmodule.
Key Features
- Dependency-Free 🚫📦: Operates solely on Python's built-in modules, eliminating the need for external libraries.
- Version Stability 🔒📅: Crafted to maintain consistent functionality across Python versions.
- Optimized for Performance ⚡⚙️: Built from scratch for efficient and consistant cryptographic operations.
- Lightweight Codebase 🪶💻: Minimalistic design ensures a low overhead and straightforward integration.
- Reliability and Security 🔐🛡️: Ensures robust encryption/decryption and hashing without reliance on third-party modules.
- Comprehensive Cryptosystem Support 🔄🔑: Offers a full suite of symmetric, asymmetric, and hashing methods.
Installation
To install the package, simply clone the repository and install the dependencies:
pip install cryptosystems
Usage
The general structure for usage is to create an object of the respective cryptosystem, with the key as argument if required. Similar usage for the utility functions as well. See docs for the exact reference example of a specific cryptosystem if required.
from cryptosystems import SomeCryptosystem
cipher = SomeCryptosystem()
ciphertext = cipher.encrypt("Hello World")
print(ciphertext) # Output: 'ciphertext string'
plaintext = cipher.decrypt(ciphertext)
print(plaintext) # Output: 'Hello World'
License
This project is licensed under the Apache License - see the LICENSE file for details.
Authors
- Ishan Surana - Inception, implementation and testing - GitHub
Acknowledgments
PyCryptodome, for the logic of functions in the functions submodule(Python-based implementation, discontinued from version v1.x onward)bcrypt.handgmp.h, for functions in the functions submodule
Metadata
Release files for cryptosystems 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cryptosystems-1.0.0.tar.gz | 423.6 kB | Without provenance | Details for cryptosystems-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cryptosystems-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for cryptosystems-1.0.0-py3-none-any.whl |
Total release size: 848.5 kB
Release files / cryptosystems-1.0.0.tar.gz
| Download URL | cryptosystems-1.0.0.tar.gz |
|---|---|
| Size | 423.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d287dcc6385dfd2578aaa8ca492b4c1ef9c4803e6f37ee5a0bc1706afb7b391
|
|
BLAKE2b-256 checksum How to use checksums |
a942a9907d0a1050ee22c7354035d9527f400f8148b4d994b1ac3bbb38053ef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Release files / cryptosystems-1.0.0-py3-none-any.whl
| Download URL | cryptosystems-1.0.0-py3-none-any.whl |
|---|---|
| Size | 424.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a7aa21601f2175e6452b5ecf3c35f0c59ad2dfb6b5fede34430696d3e50347b
|
|
BLAKE2b-256 checksum How to use checksums |
5db1cbbbc7ef787b0d208c0341f7fbe6b26e373fd8de122dc53332ed1324533c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for cryptosystems 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.