Conversation
06a0d23 to
34ba395
Compare
|
Is there a significant performance increase from using unsafe code rather than just letting |
|
Also, is there another implementation we can test against? Or some test vectors? |
|
To be honest, I have no idea about the implementation internals. I just took the one from the siphasher package. I also took their unit tests, but I had to adapt them since they were using the About more unit tests, I will look for some in other languages that can be verified line per line because I understand the ones I have aren't verbatim from siphasher and that might sound phishy :) |
|
@apoelstra hehe, I noticed that the test vectors we have are actually the same ones as the reference implementation has: https://github.com/veorq/SipHash/blob/master/vectors.h#L3 I think the siphasher people made a variation on that (so they could use the Hash trait) and I coincidentally reverted their variation back to the original vectors. It's a series of 64 hashes of the series |
apoelstra
left a comment
There was a problem hiding this comment.
Looks good. Did not verify the test vectors
Based on the siphasher crate (https://github.com/jedisct1/rust-siphash/) that is a copy of the implementation in
std::hash.