Jason A. Donenfeld
f4cb809a90
siphash: use one source of truth for siphash permutations
...
commit e73aaae2fa 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-05-30 09:29:15 +02:00
..
2022-02-16 12:56:37 +01:00
2022-05-30 09:28:58 +02:00
2022-01-27 11:04:09 +01:00
2022-04-27 14:38:58 +02:00
2022-03-23 09:16:41 +01:00
2022-03-08 19:12:47 +01:00
2022-05-18 10:26:53 +02:00
2022-05-25 09:57:26 +02:00
2022-04-08 14:23:41 +02:00
2022-05-09 09:14:37 +02:00
2022-05-30 09:29:15 +02:00
2022-05-25 09:57:32 +02:00
2022-04-08 14:23:09 +02:00
2022-05-09 09:14:37 +02:00
2022-05-25 09:57:28 +02:00
2022-04-08 14:23:30 +02:00
2022-04-08 14:23:31 +02:00
2022-04-27 14:38:58 +02:00
2022-05-25 09:57:29 +02:00
2022-04-27 14:38:57 +02:00
2022-05-12 12:30:05 +02:00
2022-04-20 09:34:09 +02:00
2022-04-08 14:23:44 +02:00
2022-05-25 09:57:34 +02:00
2022-05-25 09:57:28 +02:00
2022-04-08 14:22:50 +02:00
2022-05-30 09:28:58 +02:00
2022-01-27 11:04:31 +01:00
2022-05-30 09:29:00 +02:00
2022-05-18 10:26:51 +02:00
2022-04-08 14:22:50 +02:00
2022-05-25 09:57:37 +02:00
2022-03-08 19:12:37 +01:00
2022-05-09 09:14:31 +02:00
2022-05-18 10:26:52 +02:00
2022-05-25 09:57:36 +02:00
2022-05-18 10:26:53 +02:00
2022-05-18 10:26:52 +02:00
2022-04-13 20:59:28 +02:00
2022-03-16 14:23:36 +01:00
2022-01-27 11:04:21 +01:00
2022-04-08 14:24:10 +02:00
2022-04-20 09:34:20 +02:00
2022-04-20 09:34:09 +02:00
2022-05-09 09:14:34 +02:00
2022-04-08 14:23:43 +02:00
2022-05-09 09:14:44 +02:00
2022-05-12 12:30:26 +02:00
2022-05-09 09:14:41 +02:00
2022-05-30 09:28:59 +02:00
2022-05-12 12:30:10 +02:00
2022-03-08 19:12:44 +01:00
2022-04-08 14:23:48 +02:00
2022-05-25 09:57:25 +02:00
2022-03-02 11:48:06 +01:00
2022-03-08 19:12:41 +01:00
2022-04-13 20:59:11 +02:00
2022-04-13 20:59:14 +02:00
2022-05-25 09:57:31 +02:00
2022-01-27 11:04:02 +01:00
2022-04-27 14:39:00 +02:00
2022-05-09 09:14:34 +02:00
2022-05-25 09:57:29 +02:00
2022-05-25 09:57:26 +02:00
2022-04-13 20:59:05 +02:00
2022-04-08 14:23:44 +02:00
2022-04-13 20:59:01 +02:00
2022-04-08 14:23:44 +02:00
2022-04-20 09:34:16 +02:00
2022-04-08 14:23:47 +02:00
2022-04-27 14:38:55 +02:00
2022-02-01 17:27:07 +01:00
2022-05-25 09:57:26 +02:00
2022-05-18 10:26:50 +02:00
2022-05-25 09:57:35 +02:00
2021-11-25 09:48:31 +01:00
2022-05-18 10:26:55 +02:00
2022-04-20 09:34:21 +02:00
2022-04-08 14:24:02 +02:00
2022-05-01 17:22:27 +02:00
2022-04-13 20:59:11 +02:00
2022-04-20 09:34:15 +02:00
2022-03-02 11:47:51 +01:00
2022-05-09 09:14:42 +02:00
2022-01-27 11:04:36 +01:00
2022-05-18 10:26:55 +02:00
2022-05-25 09:57:21 +02:00
2022-04-13 20:59:15 +02:00
2022-04-20 09:34:13 +02:00
2022-05-25 09:57:27 +02:00
2022-05-25 09:57:35 +02:00
2022-04-08 14:23:50 +02:00
2022-03-16 14:23:43 +01:00
2022-04-13 20:59:11 +02:00
2022-05-25 09:57:23 +02:00
2022-04-08 14:24:17 +02:00
2021-12-22 09:32:39 +01:00