tequel-rs 0.5.7

A high-performance, chaotic AEAD encryption engine built on the TQL-11 ARX primitive.
Documentation
tequel-rs-0.5.7 has been yanked.

Tequel

Crates.io Version License Rust

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

πŸ”¬ 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 Zeroize protocol 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 zeroize framework.
  • 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:

[dependencies]

tequel-rs = "0.5.7"

Basic Hashing

use tequel_rs::hash::TequelHash

fn main() {
  let mut teq = TequelHash::new()
    .with_salt("project_salt")
    .with_iterations(32);

  let hash = teq.dt_hash_string("my_secure_data");
}

πŸ”‘ Key Derivation (KDF)

Perfect for deriving encryption keys from user passwords (used in My Way CLI).

let mut teq = TequelHash::new();
// Derives a 256-bit key from a password using 1000 iterations
let key = teq.derive_key("user_password", "unique_salt", 1000);

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.