Tequel
A high-performance authenticated symmetric encryption engine (AEAD) and KDF, robust and chaotic, built in pure Rust.
Tequel 0.5.7 High-Performance AEAD: Certified Entropy of 7.999986 and Avalanche Stability over 110M iterations. Designed for secure local storage, high-speed obfuscation, and cryptographic research.
By Gabriel Xavier (@dotxav)
Summary
- Tequel
π¬ Internal Architecture: TQL-11
Tequel is powered by the TQL-11, a custom ARX-based (Addition-Rotation-XOR) cryptographic primitive.
- Mathematically Grounded: Internal state initialized with constants derived from $\pi$, $e$, and the Golden Ratio ($\phi$).
- Maximum Diffusion: 12-register state chain with a non-linear feedback loop and dynamic bit-mixing.
- Security First: Zero-cost memory safety via the
Zeroizeprotocol to prevent data leakage.
π Read the Full White Paper for detailed mathematical specifications.
π Performance Benchmarks
Verified using criterion.rs on an optimized release build.
| Operation | Data Size | Result |
|---|---|---|
| Hashing Latency | 1 KB | 105.5 Β΅s |
| Stable Throughput | 1 MB | 9.31 MiB/s |
| KDF (1000 iter) | Password | 270 ms |
π‘οΈ Stress and Safety Report (v0.5.7)
Tequel has been submitted to rigorous statistical tests:
1. Avalanche Effect (SAC)
We measured the Strict Avalanche Criterion to ensure that a single bit change in input results in a radical change in output.
- Result: 52.26% Avalanche (The cryptographic "Sweet Spot").
- Collision Resistance: 110,600,000+ iterations without a single collision found.
2. Shannon Entropy Analysis
We measured the unpredictability of generated bytes to ensure the output is indistinguishable from pure random noise.
- Result: 7.999986 bits/byte (Theoretical maximum: 8.0).
- Status: π Excellent. Statistical parity with SHA-256 and AES in bit distribution.
3. Memory Forensic Resistance
- Mechanism: Full integration with the
zeroizeframework. - Protection: All sensitive buffers (Keys, Salts, and Plaintext) are overwritten with zeros immediately after use, mitigating Cold Boot Attacks.
βοΈ Core Features
- Confidentiality: ARX-based masking with bitwise wrapping and dynamic rotations.
- Integrity (MAC): Built-in Message Authentication to prevent data tampering.
- Advanced KDF: Key stretching with configurable iterations to thwart Brute-Force and GPU-accelerated attacks.
- Encrypt-then-MAC (EtM): Industry-standard architecture for superior security.
π₯ Installation & Usage
Add to your Cargo.toml:
[]
= "0.5.7"
Basic Hashing
use TequelHash
π Key Derivation (KDF)
Perfect for deriving encryption keys from user passwords (used in My Way CLI).
let mut teq = new;
// Derives a 256-bit key from a password using 1000 iterations
let key = teq.derive_key;
Why the name 'Tequel'?
"Tequel" is a biblical reference from the Book of Daniel (5:25-28).
"Mene, Mene, Tequel, Parsim"
TEQUEL means "Weighed". In the biblical context, it represented a divine judgment where a kingdom was weighed and found wanting. I chose this name to represent the cryptographic weight and robustness of the libraryβdata secured by Tequel is "weighed" and protected by a hand that cannot be easily bypassed.
License
MIT License - free to use, modify, and integrate.