Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test vectors #11

Closed
cocowalla opened this issue Apr 4, 2019 · 6 comments
Closed

Test vectors #11

cocowalla opened this issue Apr 4, 2019 · 6 comments

Comments

@cocowalla
Copy link

Any chance you could publish some test vectors for wyhash?

This would be really useful for verifying correctness of ports to other languages.

@wangyi-fudan
Copy link
Owner

Dear Cocowalla:
I am not sure about the meaning of "test vectors". I guess the simplest way to verify a ported code is to run the c version and c# version seperately, and compare them.
thanks!

@cocowalla
Copy link
Author

Test vectors are inputs along with their expected outputs, and are commonly published for ciphers and hashes (although for some reason they seem to be more commonly published for cryptographic hashes, rather than non-cryptographic ones 🤷‍♂️).

For example, in the MD5 RFC some vectors are included in section A.5, some are published on the RIPEMD160 website, and NIST publishes test vectors for various algorithms.

I can of course run the C version myself, but it would be really useful to have an authoritative list published here. This might also help, for example, if different results are observed on different processor architectures, or if different compilers produce different results.

@wangyi-fudan
Copy link
Owner

thanks for your comment! I add test vectors in readme

@eldruin
Copy link
Contributor

eldruin commented Apr 5, 2019

Historically at least the hash results have changed in between revisions. In my rust implementation of wyhash I added a small program that downloads the reference version of wyhash for my implementation automatically and generates the hashes and random numbers for a list of inputs which I later use in my tests.

@cocowalla
Copy link
Author

@eldruin I had come across your rust port, but hadn't seen this test utility, so thanks for the pointer 😄

@Sahnvour
Copy link

Looks like they're gone, would you mind putting them back ?
I guess that the version 2 of wyhash also changed their results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants