Paradox: Recursive Visual Entropy Key Derivation Engine (RVE-KDE)
1. Project Overview & Motivation
Paradox is an experimental cryptographic key derivation engine that maps high-dimensional visual media (images) to symmetric keys deterministically.
Why Visual Entropy?
Traditional key derivation functions (like PBKDF2 or bcrypt) process low-entropy, linear inputs (passwords). In contrast, images represent high-dimensional physical entropy source matrices. Paradox leverages this visual media matrix to establish a deterministic "visual factor" for key agreement, file archiving, and cover-medium key setup.
2. Core Architecture
The pipeline processes input visual data and nonces through seven discrete layers:
- Initial Seed Generator: Formulates
Seed0 = SHA3-512(ImageHash + Nonce + Timestamp + Version). - Recursive Walker: Slices coordinates modulo dimensions and traverses local adjacent neighbors.
- Luminance & Contrast Extractor: Extracts color states, perceived brightness, and local grid standard deviations.
- Hash Chain Evolved State: Formulates sequential hash linkages of coordinates, pixel bytes, and neighbor values.
- Multi-Layer Recursion Manager: Runs dependent walks in sequence (Layer $n$ seed depends on Layer $n-1$'s final state) to diffuse spatial dependencies.
- Entropy Pool Collector: Aggregates SHA3-256 slices from each step into a master entropy pool.
- KDF Compressor: Squeezes the pool into 128/256/512-bit keys using HKDF-SHA256 or BLAKE3-KDF.
3. Installation & Developer Setup
Clone the repository, install Maturin/build dependencies, and build the Rust native extension in release mode:
python3 -m venv .venv
source .venv/bin/activate
pip install maturin patchelf
export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
maturin develop --release
4. Quick Start & Examples
Text Encryption
import paradox
img = paradox.useImage("sample.png")
# Encrypts message and returns metadata envelope
encrypted = paradox.encrypt_text("Confidential message", image=img, security_level="low")
# Decrypts payload deterministically
decrypted = paradox.decrypt_text(encrypted, image=img)
print(decrypted) # "Confidential message"
File Encryption
import paradox
img = paradox.useImage("sample.png")
paradox.encrypt_file("doc.pdf", "doc.pdf.enc", image=img, security_level="low")
paradox.decrypt_file("doc.pdf.enc", "doc_dec.pdf", image=img)
5. API Reference
| Category | Functions |
|---|---|
| Image Loading | useImage(path), getRandomImage() |
| Key Derivation | generate_key(image, len, level, kdf), generate_key128(), generate_key256(), generate_key512() |
| Encryption/Decryption | encrypt_text(), decrypt_text(), encrypt_file(), decrypt_file() |
| Diagnostics | visualize_walk(), analyze_image() |
6. Experimental Validation Results
- Entropy Density: Derived keys exhibit a Shannon entropy of 7.99946 bits/byte (squeezed via HKDF-SHA256).
- Chi-Square Goodness-of-Fit: Passed ($p = 0.75 > 0.01$), confirming uniform byte distributions.
- Avalanche Effect: 50.09% mean bit difference following a 1-bit input offset.
- Collision Rate: 0.00% collision count over 3,000 keys.
For detailed plots and analysis, see newresults.md and changes.md.
7. Comparative Benchmark Metrics
Symmetric key (256-bit) latency and memory footprints compared to traditional standards:
| Metric Category | Paradox v1 (Python) | Paradox v2 (Rust, SHA3) | Paradox v2.0.2 (Rust, BLAKE3) | PBKDF2-SHA256 | HKDF-SHA256 | Argon2id (ID) | BLAKE3-KDF |
|---|---|---|---|---|---|---|---|
| Latency LOW | 91.0 ms | 7.64 ms | < 1.5 ms | 0.54 ms | 0.26 ms | 6.37 ms | 0.04 ms |
| Latency MEDIUM | 2,140.0 ms | 93.0 ms | < 15.0 ms | 3.20 ms | 0.26 ms | 33.00 ms | 0.04 ms |
| Latency HIGH | 58,300.0 ms | 1,866.31 ms | < 200.0 ms | 18.45 ms | 0.17 ms | 200.25 ms | 0.06 ms |
| Peak Mem HIGH | 104.62 MB | 104.62 MB | < 5.0 MB | <0.01 MB | <0.01 MB | 256.00 MB | <0.20 MB |
| Uniqueness (10k) | 100% Unique | 100% Unique | 100% Unique | 100% Unique | 100% Unique | 100% Unique | 100% Unique |
| Vulnerabilities | Nonce-reuse risk | Nonce-reuse risk | Nonce-reuse risk | GPU cracking | Salt reuse | Param tuning | Context collision |
8. Citation & Acknowledgements
If you use Paradox in your cryptographic research or academic publications, please cite it using:
@software{paradox_kdf2026,
author = {Chirag Ferwani},
title = {Paradox: Recursive Visual Entropy Key Derivation Engine},
url = {https://github.com/chiragferwani/paradox},
version = {1.0.2},
year = {2026},
doi = {10.5281/zenodo.20811708}
}
Acknowledgements
- Matplotlib and NumPy contributors for diagnostic utilities.
- The Google DeepMind pair-programming agent workspace.
- Established standard KDF authors (Argon2, PBKDF2, BLAKE3).
9. License
Licensed under the MIT License - see LICENSE for details.
Metadata
Release files for paradox-rvekde 2.0.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 |
|---|---|---|---|---|
| paradox_rvekde-2.0.2.tar.gz | 55.3 MB | Without provenance | Details for paradox_rvekde-2.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| paradox_rvekde-2.0.2-cp313-cp313-manylinux_2_34_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.34+ x86-64 | Details for paradox_rvekde-2.0.2-cp313-cp313-manylinux_2_34_x86_64.whl |
Total release size: 55.6 MB
Release files / paradox_rvekde-2.0.2.tar.gz
| Download URL | paradox_rvekde-2.0.2.tar.gz |
|---|---|
| Size | 55.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23f8fe154caa964ba6667dcc65a828add0b2358d38082faf2b9e54464927c0ba
|
|
BLAKE2b-256 checksum How to use checksums |
64b76c06416e94d9bf0f3904044c759227a9270931653b9c154f8a09b0945465
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Release files / paradox_rvekde-2.0.2-cp313-cp313-manylinux_2_34_x86_64.whl
| Download URL | paradox_rvekde-2.0.2-cp313-cp313-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 283.4 kB |
| Tags | CPython 3.13 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
ca029fc0096a0137a57eccf8d7ee30d85e4eca11c288838c9a1f8d0d22dfd524
|
|
BLAKE2b-256 checksum How to use checksums |
ea7ffc445424361da058fafabb75a3ae9645f8f8a4ac6c3f3d1d889b9711624d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.14.1
|
Security for paradox-rvekde 2.0.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.
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.