| Crates.io | fract |
| lib.rs | fract |
| version | 0.1.1 |
| created_at | 2026-01-03 00:16:19.484278+00 |
| updated_at | 2026-01-04 15:53:03.193479+00 |
| description | A Hyperchaotic, Quantum-Resistant, Minimalist Cryptographic Hash |
| homepage | |
| repository | https://github.com/morphym/fract |
| max_upload_size | |
| id | 2019374 |
| size | 68,730 |
A Hyperchaotic, Quantum-Resistant, Minimalist Cryptographic Hash implementation in Rust.
FRACT is a cryptographic hash function that leverages hyperchaotic dynamical systems on finite modular lattices to achieve provable diffusion, natural quantum resistance, and exceptional performance. By eschewing traditional S-boxes and large constant arrays in favor of coupled chaotic maps with positive Lyapunov exponents, the design achieves cryptographically secure avalanche effects through deterministic chaos.
READ WHITEPAPER -> https://www.pawit.co/whitepapers/fract-whitepaper.pdf
:: license is creative commons attribution 4.0 international
Author: Pawit Sahare ( @morphym ).
Install binary
cargo install fract
Then, Enjoy a, Fast. Minimal. Hyperchaotic, Quantum-Resistant, Hash.
princee@princee:~$ fract
╔══════════════════════════════════════════════════════════════╗
║ ║
║ ░██████╗░█████╗░░█████╗░██╗░░██╗░█████╗░████████╗░█████╗░ ║
║ ██╔════╝██╔══██╗██╔══██╗██║░░██║██╔══██╗╚══██╔══╝██╔══██╗ ║
║ █████╗░░███████║██║░░╚═╝███████║███████║░░░██║░░░██║░░╚═╝ ║
║ ██╔══╝░░██╔══██║██║░░██╗██╔══██║██╔══██║░░░██║░░░██║░░██╗ ║
║ ██║░░░░░██║░░██║╚█████╔╝██║░░██║██║░░██║░░░██║░░░╚█████╔╝ ║
║ ╚═╝░░░░░╚═╝░░╚═╝░╚════╝░╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░░╚════╝░ ║
║ ║
║ Hyperchaotic · Quantum-Resistant · Fast Cryptographic Hash ║
║ ║
║ Author: @morphym ║
║ Version: 0.1.0 ║
║ ║
╚══════════════════════════════════════════════════════════════╝
Usage: fract [OPTIONS] [FILE]...
fract bench [OPTIONS]
Run 'fract --help' for detailed usage information.
princee@princee:~$ fract cat
c3405751cd163e953f04744da9eb4bd411930a2b3de066c3c9e2ca905b33aa99 cat
princee@princee:~$
To run local benchmark in your machine
fract bench
Result: On a 4 vCPU machine:
princee@princee:~$ fract bench
=== Fract Benchmark ===
Data size: 1048576 bytes
Iterations: 100
Mode: 256-bit
Method: single-pass
Total time: 1.439969279s
Throughput: 69.45 MiB/s
Last hash: 60e1a1235112e7d3
=== Additional Stats ===
Bytes processed: 104857600
Nanoseconds per byte: 13.73
Cycles/byte (est. at 3GHz): 41.20
princee@princee:~$
These are core mathematical foundation; not all are stated here; read whitepaper for comprehensive mathematical specification.
The core chaotic primitive is defined on ℤ₂₆₄:
f(x) = { 4x(1 - x) mod 2^64 if x < 2^63
{ 4(2^64 - x)(x - 2^63) mod 2^64 if x ≥ 2^63
This exhibits a Lyapunov exponent λ ≈ 0.693, guaranteeing exponential divergence.
For state S = (s₀, s₁, s₂, s₃) ∈ (ℤ₂₆₄)⁴:
Φ(S) = {
s₀' = f(s₀) ⊕ (s₁ ≫ 31) ⊕ (s₃ ≪ 17)
s₁' = f(s₁) ⊕ (s₂ ≫ 23) ⊕ (s₀ ≪ 11)
s₂' = f(s₂) ⊕ (s₃ ≫ 47) ⊕ (s₁ ≪ 29)
s₃' = f(s₃) ⊕ (s₀ ≫ 13) ⊕ (s₂ ≪ 5)
}
All operations use modular arithmetic with constant-time behavior.
note: whitepaper contain more information on all mathematical impl.
Read: https://github.com/morphym/fract/blob/master/usage.md
FractThe main hasher struct that implements the sponge construction.
new() -> Self - Creates a new hasher instanceupdate(&mut self, data: &[u8]) - Absorbs data into the statefinalize(self) -> [u8; 32] - Finalizes and returns 256-bit hashhash(data: &[u8]) -> [u8; 32] - One-shot hashing (256-bit)hash512(data: &[u8]) -> [u8; 64] - One-shot hashing (512-bit)hash_to_hex(data: &[u8]) -> String - Returns 256-bit hash as hex stringhash512_to_hex(data: &[u8]) -> String - Returns 512-bit hash as hex stringNOTE: This is an experimental implementation of a novel cryptographic design. The security claims in the whitepaper have not yet been independently verified through third-party cryptanalysis.
#![no_std] compatiblewrapping_* intrinsicshex crate for hex encoding functionsTarget performance characteristics:
Run the test suite:
cargo test
Run the demo:
cargo run --example demo
fract.pdf - Comprehensive mathematical specificationMIT License
@morphym- Morphy Moretti {Pawit Sahare}.
Pawit, S. (2025). FRACT- A Hyperchaotic, Quantum Resistant, Fast Cryptographic Hash.
Pawit Sahare.
https://doi.org/10.5281/zenodo.17983496
https://pawit.co/works/fract
.