Verification value · 0x6B558D9D

Ports

The C header defines the algorithm. Every port must match its output for every input and seed, independent of host endianness.

Implementations

C

C99

Single-header reference implementation. Uses memcpy-based loads and explicit byte swapping on big-endian hosts. No undefined behavior or external dependency. View hayahash.h.

Reference

Rust

no_std

Safe Rust implementation with #![forbid(unsafe_code)]. Tests cover the SMHasher3 verification value and known-answer vectors shared with the C reference. View Rust source.

Verified

Port contract

Exact output
Match hayahash64() for all byte sequences, lengths, and 64-bit seeds.
Endianness
Interpret input words as little-endian. Output must not depend on host byte order.
Arithmetic
Use wrapping 64-bit addition, multiplication, shifts, rotations, and XOR.
Verification
Check the SMHasher3 value 0x6B558D9D and the shared known-answer vectors in rust/tests/kat.rs.
Location
New ports belong in a top-level language directory such as go/ or zig/.

Contribute a port

Start from the C header’s design notes and include automated known-answer tests with the implementation.