Files
kernel_xiaomi_sm8250/include/linux
Jason A. Donenfeld 68d98553de siphash: use one source of truth for siphash permutations
commit e73aaae2fa9024832e1f42e30c787c7baf61d014 upstream.

The SipHash family of permutations is currently used in three places:

- siphash.c itself, used in the ordinary way it was intended.
- random32.c, in a construction from an anonymous contributor.
- random.c, as part of its fast_mix function.

Each one of these places reinvents the wheel with the same C code, same
rotation constants, and same symmetry-breaking constants.

This commit tidies things up a bit by placing macros for the
permutations and constants into siphash.h, where each of the three .c
users can access them. It also leaves a note dissuading more users of
them from emerging.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:49:11 +02:00
..
2021-12-08 08:50:13 +01:00
2021-12-08 08:50:13 +01:00
2021-01-30 13:32:12 +01:00
2021-05-22 10:59:50 +02:00
2021-03-04 09:39:44 +01:00
2021-02-07 14:48:38 +01:00
2021-11-26 11:35:57 +01:00
2021-07-11 12:49:26 +02:00
2020-07-29 10:16:52 +02:00
2021-06-30 08:48:18 -04:00
2021-09-03 09:58:00 +02:00
2020-03-18 07:14:17 +01:00
2021-12-14 10:18:04 +01:00
2020-04-02 15:28:22 +02:00
2020-12-11 13:25:01 +01:00
2020-04-02 15:28:23 +02:00
2021-12-14 10:18:06 +01:00