AxonHash is a research and prototyping cryptographic hash function based on ARX (Add-Rotate-Xor) permutation and Merkle tree construction. It is designed for educational, experimental, and benchmarking purposes.
- ARX Permutation: Modern, efficient mixing using add, rotate, and xor operations.
- Merkle Tree Aggregation: Parallelizable leaf hashing and secure digest aggregation.
- Configurable Block Size: User can set chunk size for flexibility and experimentation.
- Domain Separation: Supports domain tags for protocol separation.
- Extendable Output (XOF): Can produce digests of arbitrary length.
- Profiling and Testing: Includes scripts for benchmarking and avalanche/collision testing.
from main import Axon
# Hash a message
h = Axon(b"hello world")
digest = h.digest() # Raw bytes
digest_hex = h.hexdigest() # Hex string
print(digest_hex)
- Chunk Size: Set via the
chunks
parameter (default: 64 bytes) - Rounds: Set via the
round
parameter (default: 4) - Domain Tag: Set via the
domain
parameter
h = Axon(b"data", chunks=32, round=8, domain=0x42)
Run profiler.py
to benchmark different stages of the hash pipeline.
Run axon_test.py
for avalanche, collision, and speed tests:
python axon_test.py
main.py
: Main AxonHash implementation (class-based)parallel.py
: Standalone and parallelized hash utilitiesprofiler.py
: Profiling and benchmarking scriptaxon_test.py
: Test suite for correctness and performanceaxon.py
: (If present) Shared core functions
AxonHash is experimental and has not undergone professional cryptanalysis. Do not use it for production or security-critical applications.
MIT License