tequel-rs-0.1.1 has been yanked.
Tequel
For educacional purposes only, but still usable.
A authenticated simetric encrypt engine (AEAD) built in Rust.
This project was designed to explore byte's manipulation concepts, XOR and modular-aritmetic in Rust. Not is recommended to use in high-safe systems, but yes like a tool to learn about how data can be converted and recovered through dynamic keys.
By Gabriel Xavier : ]
Summary
Security Notice
Tequel is an experimental cryptographic implementation and should not be used in production environments.
⚙️ What Tequel do?
- Confiability: Uses XOR operations and Modular-Arithmetic to "mask" data.
- Integrity (MAC): Validates if data was modified before decryption.
- Salting: Generates random salts to guarante that same password generate different results.
📥 How to install and Use
- Install with Cargo
cargo install tequel-rs
- Add in your
cargo.toml's project
tequel-rs = "0.1.0"
- Import in your project
use Tequel;
💻 How to use?
// Quick example
use ;
Random
Simple Random
use Tequel;
Output:
34390ff2
More functions to RNG soon...
🔒🔢 Hashing
df_hash: Generates a different HASH for each call. (No matter INPUT).dt_hash: Generates a unique HASH for a INPUT.
Different HASH
use Tequel;
HASH1: 1e330de76c53a6523c5d8cca9ff42c7be5430a4c2cc599a4b0a81f0f9567c7f541d0a92fed232026
HASH2: 58c2e9cfcc2b5acc9aa94e6702d16c91479a156bf29f896793ad439039de53cef310ba8debf46728
UNIQUE HASH
use Tequel;
HASH1: 319970a3340073dc2003a470be1ee25c490bc8c64f4cb394e5f53249ca79433e9955a16371374491
HASH2: 319970a3340073dc2003a470be1ee25c490bc8c64f4cb394e5f53249ca79433e9955a16371374491
UNIQUE HASH + Random Salt
use ;
HASH: TequelSHash { salt: "0528547e", hash: "1f56cd5a9d2e60b117107d2c1f0267e546684ac68bc1a73b9816d46420b970a1a13edcc671374491" }
UNIQUE HASH + Custom Salt
use ;
HASH: TequelSHash { salt: "yellow", hash: "b42de9b670a2fb62d0e1239b65e71140298fc07a2b14818a54623ebc576576c5593ca0fe71374491" }
🔐 Encryption and Decryption
Encryption with teq_encrypt
use ;
CRYPT: TequelEncryption { data: "9504f49d243ff5cd9d", salt: "3861306562636666", key: "pass123", mac: "f9e50b94f68388958eae9d2e63b1862ef12495a835c38fa8d9fbf23ca850680b95b4292471374491" }
It returns a TequelEncryption
data: Hashsalt: Randomic Hash Salt for Saltingkey: Key to decryptionmac: EtM (Encrypt-then-MAC). It is to validade modifications in HASH
Decryption with teq_decrypt
use ;
CRYPT: TequelEncryption { data: "9d05c5f8543dc4cd95", salt: "3066613832613766", key: "pass123", mac: "7cddcee8f68388958eae9d2e63b1862ef12495a835c38fa8d9fbf23ca850680b95b4292471374491" }
DECRYPT: "MY_SECRET"
The mac is verified in start of teq_decrypt, before the main process to validade if the HASH was not modified.
License
MIT License - free to use, modify and integrate.