Skip to content

Alternative Hash (ex : highway, xxh3) #69

@chris-ha458

Description

@chris-ha458

wyrng has been shown to have some flaws within the randomness
(from official repo )

Both of them are not 64 bit collision resistant, but is about 62 bits (flyingmutant/Cyan4973/vigna)
When test on longer dataset (32TB, 23 days), wyrand will fail practrand (vigna)

Would there be interest in implementing an alternative hash?

If there is interest, I think I might take a try in implementing it.
I think possible candidates would be highwayhash or xxh3
The former has a bit stronger preliminary (but not full) cryptanalysis. But both pass smhasher without problems without known hash issues.

Both are known to be fast.
I do want to add that all algorithms, including wyhash, has strong and weak points regarding speed depending on input length, output length, specific implementation (if SIMD which ISA?).
So I think it would not be fair to judge speed without seeing the actual implementation here.

If there is interest I might proceed as follows.
I shall assume that there is a desire here to keep it simple and not add another dependency

  1. abstract current implementation within the codebase and isolate it
  2. implement an alternate hash and then provide a way to select it, or maintain a branch
  3. provide benchmarks to compare the two.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions