D-DES (Dynamic Data Encryption Standard)
⚠️ Security Disclaimer: This is an experimental cryptographic tool for research and educational purposes. It is not intended for securing sensitive production data.
D-DES is a custom implementation of the classic DES (Data Encryption Standard) block cipher, modified to feature a Dynamic S-Box.
Requirements
- Python 3.8+: This library leverages Python type hinting and bit-manipulation features. Ensure you are running Python 3.8 or higher.
Features
- Standard 64-bit block size and 56-bit effective key.
- 16 Feistel rounds with standard permutation tables (IP, IP-1, E, P, PC-1, PC-2).
- Dynamic S-Box: Replaces the 8 static S-boxes with a single, dynamically generated $6 \times 4$ S-box completely seeded by the encryption key.
- CBC Mode Support: Prevents repeating data blocks by utilizing an Initialization Vector (IV).
- PKCS#7 Padding: Safely encrypts and decrypts files of any arbitrary size.
- CLI Utility: Built-in command line interface to seamlessly encrypt/decrypt any file on your computer.
- Operational Logger: Automatically and securely logs operation metadata to a
logs.jsonfile without leaking secrets or plaintext.
Installation
You can install the package directly from PyPI. In your terminal, run:
pip install ddes-dua-crypto
CLI Usage
The package installs a globally available ddes-cli tool.
To encrypt a file (CBC mode):
ddes-cli encrypt -k "8bytekey" -m CBC --iv "8byte_iv" -i plaintext.txt -o encrypted.bin
To decrypt a file:
ddes-cli decrypt -k "8bytekey" -m CBC --iv "8byte_iv" -i encrypted.bin -o decrypted.txt
Python API Usage
You can also use the cipher directly inside your own Python projects.
from ddes import DDESCipher
# 8-byte key and IV
key = b'8bytekey'
iv = b'8byte_iv'
# Initialize in CBC mode
cipher = DDESCipher(key, mode='CBC', iv=iv)
# Encrypt
plaintext = b'Hello World! This is D-DES.'
ciphertext = cipher.encrypt(plaintext)
print(f"Ciphertext (Hex): {ciphertext.hex()}")
# Decrypt
decrypted = cipher.decrypt(ciphertext)
print(f"Decrypted: {decrypted.decode('utf-8')}")
Operational Logger
All CLI encryption and decryption commands automatically append an audit trail to logs.json. The logger securely stores the timestamp, operation type, mode, and success status. It never stores keys or file contents.
Example Audit Log (logs.json):
[
{
"timestamp": "2026-05-08T19:02:15.123456",
"operation": "Encrypt",
"mode": "CBC",
"status": "Success"
}
]
Metadata
Release files for ddes-dua-crypto 0.1.1
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 |
|---|---|---|---|---|
| ddes_dua_crypto-0.1.1.tar.gz | 8.8 kB | Without provenance | Details for ddes_dua_crypto-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ddes_dua_crypto-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ddes_dua_crypto-0.1.1-py3-none-any.whl |
Total release size: 16.8 kB
Release files / ddes_dua_crypto-0.1.1.tar.gz
| Download URL | ddes_dua_crypto-0.1.1.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7acaf42a5dd63d25e962c23ca8b7454dc735c9db65e7cf9ab11b972390e4907
|
|
BLAKE2b-256 checksum How to use checksums |
f54e18da29ff8f0711942d4dc0f5ac18a8aabf94f707fc329952ea5b140fb924
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / ddes_dua_crypto-0.1.1-py3-none-any.whl
| Download URL | ddes_dua_crypto-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa419acc822ad41d65b42b633b2f21c0e0a1093592820e1b49e70ee7994d8647
|
|
BLAKE2b-256 checksum How to use checksums |
5068664131afb2f06fddf821106ca22b20572f810b9dde88236ccf24db324154
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for ddes-dua-crypto 0.1.1
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.