Giter Club home page Giter Club logo

Comments (4)

wangyi-fudan avatar wangyi-fudan commented on June 2, 2024

The secrets should be prime. because in wyrand, we add the secret to the seed. a prime secret ensure that the period is 2^64. For other part of wyhash library, it is a "feeling to be perfect". And non-prime secret seem to fail smhasher.
A balanced secret meant all its 8 bytes have popcount==4. The early version of secret are popcount==32 for the whole seed which is not fully balanced.
Thank you for your Miller-Rabin primality test. I am looking for the code. However, I need some time to port it to wyhash.
usually, we generate secret offline and hard code it to the .h file. A de novo make_secret is indeed time consuming. That's why someone propose a PR to remove the prime-test. And I didn't notice this change. Now, the prime-test is back as normal and intended.

from wyhash.

wangyi-fudan avatar wangyi-fudan commented on June 2, 2024

Miller-Rabin test is done by copying :-)

from wyhash.

wangyi-fudan avatar wangyi-fudan commented on June 2, 2024

The cleaned code for Miller Rabin test is available here https://github.com/wangyi-fudan/MillerRabin64

from wyhash.

tansy avatar tansy commented on June 2, 2024

However, I need some time to port it to wyhash.
usually, we generate secret offline and hard code it to the .h file

It could be in separate tool/file. I already proposed it with hash map (#120). I don't get why would it have to be in hash itself. If you just mentioned in the hash that secret was generated with function moved to make-secret.c it would be fine and everyone wanting to dig it further would find the tool and used it.

May I propose PR #140 that does that.

from wyhash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.