Skip to content
This repository was archived by the owner on May 13, 2022. It is now read-only.
This repository was archived by the owner on May 13, 2022. It is now read-only.

SpookyHashV2 hashes do not match official implementation #30

Closed

Description

@mulgarz

The 32 bit spookyhashv2 of the string "hello world" should be UInt32 "2617184861" according to the official implementation But with this library it is not.

I have tested all possible ways of feeding this string including different encodings and none of them match.

Testing the same thing with other libraries and this website match properly
https://asecuritysite.com/encryption/Spooky

Activity

  1. modified the milestones: 2.0, 1.9 on Nov 2, 2017
  2. brandondahler commented on Nov 2, 2017

    @brandondahler
    Owner

    Going through the history, it appears that the initial implementation was never correct and therefore all versions of Data.HashFunction.SpookyHash have been producing incorrect values, checked against incorrect test vectors. Because of this, I am going to unlist all existing versions of this package from NuGet.

    I will fix and re-release a fixed implementation as soon as I am able to.

  3. brandondahler commented on Nov 25, 2017

    @brandondahler
    Owner

    Looking at the implementation, it appears that the root cause of the error is because it was incorrectly assumed that the Short(...) function call for byte lengths of 192 and less were just optimizations of the core hash implementation.

    This assumption is incorrect -- SpookyHash has a slightly different hash generation implementation for input values of < 192 bytes in length.

    The net effect is that we have been producing incorrect results for all values < 192 bytes in length.

  4. brandondahler commented on Mar 27, 2018

    @brandondahler
    Owner

    I have verified that this has been resolved in v2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址