core-ciphers
This project/library contains common elements related to ciphers…
Security - Cryptographic Library
This project uses ``pycryptodome`` (version >=3.21.0) for cryptographic operations, not the deprecated pycrypto library.
Important Note: Security scanners like bandit may report false positives (B413 warnings) when scanning this codebase. This occurs because both pycrypto (deprecated) and pycryptodome (actively maintained) use the same Crypto import namespace, causing scanners to incorrectly flag the imports as deprecated.
Verification: - Check pyproject.toml dependencies: pycryptodome>=3.21.0. - pycryptodome is actively maintained and regularly updated. - It is the recommended drop-in replacement for the deprecated pycrypto.
The B413 bandit warnings can be safely ignored as they are false positives.
Installation
Install from PyPI using pip:
pip install core-ciphers
uv pip install core-ciphers # Or using UV...
Features
Core Components:
ICipher Interface - Abstract base class for implementing custom cipher algorithms.
AESCipher - Advanced Encryption Standard (AES) implementation with multiple cipher modes.
AES Cipher Capabilities:
Key Sizes: Support for 128, 192, and 256-bit encryption keys (MODE_SIV requires a double-length key: 32, 48, or 64 bytes)
- Authenticated Encryption Modes:
MODE_GCM (Galois/Counter Mode) - Default, recommended for most use cases
MODE_EAX (EAX Mode)
MODE_CCM (Counter with CBC-MAC)
MODE_SIV (Synthetic Initialization Vector)
MODE_OCB (Offset Codebook Mode)
- Block Cipher Modes:
MODE_ECB (Electronic Code Book)
MODE_CBC (Cipher Block Chaining)
- Stream Cipher Modes:
MODE_CFB (Cipher Feedback)
MODE_OFB (Output Feedback)
MODE_CTR (Counter Mode)
Additional Features:
Automatic key generation if not provided.
Automatic padding for modes that require it (ECB, CBC).
Authentication tag generation and verification for authenticated modes.
Configurable character encoding (default: UTF-8).
Hex-encoded output for easy serialization.
Built on pycryptodome for secure, actively maintained cryptographic operations.
Quick Start
Installation
Install the package:
pip install core-ciphers
uv pip install core-ciphers # Or using UV...
pip install -e ".[dev]" # For development...
Setting Up Environment
Install required libraries:
pip install --upgrade pip
pip install virtualenv
Create Python virtual environment:
virtualenv --python=python3.12 .venv
Activate the virtual environment:
source .venv/bin/activate
Install packages
pip install .
pip install -e ".[dev]"
Check tests and coverage
python manager.py run-tests
python manager.py run-coverage
Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Write tests for new functionality
Ensure all tests pass: python -m unittest discover -s tests -p "tests_*.py"
Run linting: pylint core_ciphers
Run security checks: bandit -r core_ciphers
Submit a pull request
License
This project is licensed under the MIT License. See the LICENSE file for details.
Links
Support
For questions or support, please open an issue on GitLab or contact the maintainers.
Metadata
Release files for core-ciphers 1.3.2
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 |
|---|---|---|---|---|
| core_ciphers-1.3.2.tar.gz | 8.6 kB | With provenance | Details for core_ciphers-1.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| core_ciphers-1.3.2-py3-none-any.whl | Python 3 | none | any | Details for core_ciphers-1.3.2-py3-none-any.whl |
Total release size: 17.4 kB
Release files / core_ciphers-1.3.2.tar.gz
| Download URL | core_ciphers-1.3.2.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a334cca1ad8e502c70995a4dcb9170c0dbf723abc6dce0f37c4ffaa32e65a320
|
|
BLAKE2b-256 checksum How to use checksums |
ec62cb8729d119a7a2ee3772ba1ed611b4febb2c6525823db2d8c5f32758e513
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / core_ciphers-1.3.2-py3-none-any.whl
| Download URL | core_ciphers-1.3.2-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c313a28085c2d8ff0134a2e02c9659d0855573042d477e7411fb16b577a930b9
|
|
BLAKE2b-256 checksum How to use checksums |
f5a7b7ea1b83798111b1a1a79a86b337288f6fc20639718d17ac375bc12c4572
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for core-ciphers 1.3.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for core_ciphers-1.3.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Nov 16, 2026.
Transparency logA 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.