Skip to content

Commit

Permalink
added xor-rotate
Browse files Browse the repository at this point in the history
  • Loading branch information
Logan007 committed Jun 12, 2021
1 parent 451b7fd commit 0f70a23
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 97 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a little tool for automated [integer hash function][wang]
discovery. It generates billions of [integer hash functions][jenkins] at
random from a selection of eleven [reversible operations][rev] ([also][]).
random from a selection of 13 [reversible operations][rev] ([also][]).
The generated functions are JIT compiled and their avalanche behavior is
evaluated. The current best function is printed out in C syntax.

Expand Down Expand Up @@ -288,16 +288,17 @@ long.
```c
x = ~x;
x ^= constant;
x *= constant | 1; // e.g. only odd constants
x *= constant | 1; // e.g. only odd constants
x += constant;
x ^= x >> constant;
x ^= x << constant;
x += x << constant;
x -= x << constant;
x <<<= constant; // left rotation
bswap(x); // byte swap - the endianess changer
shf(x, constant); // byte shuffle, permutation
clmul(x, constant | 1); // carryless multiplication, odd constants
x <<<= constant; // left rotation
x ^= (x <<< constantA) ^ (x <<< constantB); // xor-rotate
bswap(x); // byte swap - the endianess changer
shf(x, constant); // byte shuffle, permutation
clmul(x, constant | 1); // carryless multiplication, odd constants
```
Technically `x = ~x` is covered by `x = ^= constant`. However, `~x` is
Expand Down
Loading

0 comments on commit 0f70a23

Please sign in to comment.