ogxd / gxhash

The fastest hashing algorithm 📈
https://docs.rs/gxhash
MIT License
700 stars 23 forks source link

Non-hardcoded AES keys #11

Closed bill-myers closed 6 months ago

bill-myers commented 8 months ago

The code seems to hardcode AES keys.

This makes no sense, and it should instead a mechanism similar to what the standard library uses to provide keys for SipHash.

ogxd commented 8 months ago

Hello @bill-myers,

As GxHash is a non-cryptographic algorithm, AES isn't used here for cryptography but for its excellent bit mixing properties, at a cheap computational cost via SIMD intrinsics. For this reason, I think there is no reason not to hardcode keys. SipHash is advertised as a "keyed hash function". GxHash isn't, it only is seeded, like many other non-cryptographic algorithms.

ogxd commented 6 months ago

Closing this issue. Feel free to create a new one with more information if you feel there I haven't covered your point with my answer