-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add crc32c to the list of invertible functions. #17
Comments
I wonder what do you mean here? It has two operands and CRC is the remainder of polynomial division and as such, provides average quality hash - better than multiplication or a few add-rotate-xor operations, but comparable to integer remainder operation. |
Yes, my mistake. Maybe this: For every input X and state S, if you change single N-th bit of X, every bit of crc32(S, X) will either always change or always not change, regardless of value X. Or this: Xoring argument of crc with some constant is equivalent to xoring the result of crc with (some other) constant. Or even this: crc commutates with xor: |
#13 was updated to support the CRC32c opcode, try |
crc32c
instruction from SSE4.2 has latency of 3 cycles (similar to integer multiplication) and thoughput of 1 operation per cycle. It is invertible on uint32. If you change one bit of input, only one bit of output is changed and other are unchanged.The operation itself is very bad as generic hash function (no avalanche), but it can be used in construction of hash functions. Or it can be used as a hash function in some applications where avalanche property is unneeded.
The text was updated successfully, but these errors were encountered: