f2568() - A variable Length Tabulation Hash Function
June 1, 2025
f2568() #
f2568()
is a variable length tabulation hashing function which returns a 64 bit hash result of
input data up to a size of 256 bytes. It’s quite fast (basically requiring as many XOR operations as the
data length in bytes), easy to understand and very strong at the same time.
f2568()
is publicly available under the BSD-3-Clause License.
Being a tabulation hash function, it’s not 4-independent, which can safely be ignored for the intended purposes.
The Implementation #
The Random Material #
The random material is “true random” as it has been retrieved from the Quantis QRNG device, a physical random number generator exploiting an elementary quantum optics process.
To cover the possible input space of 256 bytes the required ramdom material size becomes
256 * 256 * sizeof(uint64_t)
bytes (256KB). This size leads to increased latency due to
memory cache misses, detailed performance benchmarks and comparisons are not yet ready.
f2568()
#
The implementation is straightforward, note the fixed random initialisation value result = 0xdc6cd513e996ae54;
which is the f2568()
result of data with length zero.
f2568resume()
#
f2568resume()
allows to resume computation with additional data which is
non consecutively located at another place.
Also, it allows to chain multiple
f2568resume()
calls to obtain a strong 64 bit hash of larger data (dividing it into
256 byte blocks and setting the offset
to 0 on consecutive calls).
f2568.c
#
|
|
Test Vectors #
f2568("", 0) 0xdc6cd513e996ae54
f2568("a", 1) 0x733057f5184fd8e8
f2568("ab", 2) 0x7e7a27a682632a2c
f2568("abc", 3) 0x033ba573649a3044
f2568("abcd", 4) 0xb3f66d62bcf674a4
f2568resume("cd", 2, 2, 0x7e7a27a682632a2c) 0xb3f66d62bcf674a4
f2568("abcde", 5) 0xa6141edba1c60acd
f2568("abcdef", 6) 0x430e40daa722a64b
f2568("abcdefg", 7) 0x3111e6b33be5be6c
f2568("abcdefgh", 8) 0x302ce90427347152
f2568resume("efgh", 4, 4, 0xb3f66d62bcf674a4) 0x302ce90427347152