FRACT-256
A Hyperchaotic, Quantum-Resistant, Minimalist Cryptographic Hash implementation in Rust.
Overview
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.
Features
- Minimal Design: Only 8 arithmetic operations per round, zero lookup tables
- High Performance: Targeting ~4 cycles/byte on commodity hardware
- Quantum Resistant: Non-algebraic structure resists quantum algorithms
- Sponge Construction: 256-bit state with 128-bit rate and capacity
- Hybrid Logistic-Tent Map: Chaotic primitive on ℤ₂₆₄
- Hyperchaotic Lattice: Four coupled chaotic maps for enhanced diffusion
Foundation
READ WHITEPAPER ->
Metrics
Core
These are core mathematical foundation; not all are stated here; read whitepaper for comprehensive mathematical specification.
Hybrid Logistic-Tent Map (HLTM)
The core chaotic primitive is defined on ℤ₂₆₄:
f =
This exhibits a Lyapunov exponent λ ≈ 0.693, guaranteeing exponential divergence.
Coupled Hyperchaotic Lattice Φ
For state S = (s₀, s₁, s₂, s₃) ∈ (ℤ₂₆₄)⁴:
Φ =
All operations use modular arithmetic with constant-time behavior.
note: whitepaper contain more information on all mathematical impl.
Usage
Add this to your Cargo.toml:
[]
= { = "path/to/fract" }
Usage
use ;
// Single-shot hashing (256-bit output)
let hash = hash;
println!;
// Or use the convenience function
let hex_hash = hash_to_hex;
println!;
// 512-bit output for enhanced quantum resistance
let hash512 = hash512;
println!;
Incremental Hashing
use Fract;
let mut hasher = new;
// Update with multiple chunks
hasher.update;
hasher.update;
hasher.update;
// Finalize and get the hash
let hash = hasher.finalize;
println!;
API Reference
Fract
The main hasher struct that implements the sponge construction.
Methods
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)
Convenience Functions
hash_to_hex(data: &[u8]) -> String- Returns 256-bit hash as hex stringhash512_to_hex(data: &[u8]) -> String- Returns 512-bit hash as hex string
Security Considerations
WARNING: This is an experimental implementation of a novel cryptographic design. The security claims in the whitepaper have not been independently verified through third-party cryptanalysis.
Claims
- Classical Preimage Resistance: 2²⁵⁶
- Classical Collision Resistance: 2¹²⁸ (birthday bound on 128-bit capacity)
- Quantum Preimage Resistance: 2²⁵⁶ (with 512-bit output)
Future Works.
- No third-party cryptanalysis has yet been performed
- The aggressive round count (R=8) may need increase for conservative deployments
- Algebraic attacks using modular arithmetic decomposition have not yet been thoroughly analyzed
Implementation information.
- Language: Pure Rust,
#![no_std]compatible - Constants: Only 4 IV words (256 bits of √2)
- Memory: Zero lookup tables, entirely ALU-bound
- Timing: Constant-time operations using
wrapping_*intrinsics - Dependencies: Only
hexcrate for hex encoding functions
Performance
Target performance characteristics:
- Throughput: ~4 cycles/byte
- Latency: 48 cycles for 16-byte input
- Code Size: <1 KB
- Vectorization: Four u64 lanes enable SIMD execution
Testing
Run the test suite:
Run the demo:
References
- Whitepaper:
fract.pdf- Comprehensive mathematical specification - Based on chaos theory and hyperchaotic dynamical systems
- Sponge construction as described in the Keccak/SHA-3 standard
License
MIT License
Author
@morphym- Morphy Moretti {Pawit Sahare}.
Disclaimer
This software is provided "as is", without warranty of any kind. Use at your own risk for security-sensitive applications. Always consult with a cryptographer before using novel cryptographic primitives in production.