Jason A. Donenfeld
f4cb809a90
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-05-30 09:29:15 +02:00
..
2022-04-08 14:23:57 +02:00
2022-05-25 09:57:28 +02:00
2021-11-18 19:17:06 +01:00
2022-04-13 20:59:23 +02:00
2022-01-27 11:02:57 +01:00
2022-03-16 14:23:38 +01:00
2022-05-09 09:14:34 +02:00
2021-06-02 20:06:36 -03:00
2022-04-27 14:39:01 +02:00
2021-11-25 09:48:24 +01:00
2022-04-27 14:38:57 +02:00
2022-04-20 09:34:04 +02:00
2022-05-18 10:26:56 +02:00
2021-11-18 19:15:59 +01:00
2022-02-01 17:27:07 +01:00
2021-12-08 09:04:41 +01:00
2020-01-24 21:03:53 +01:00
2022-03-11 12:22:34 +01:00
2022-04-08 14:24:17 +02:00
2022-04-08 14:22:59 +02:00
2022-01-27 11:04:15 +01:00
2022-04-27 14:38:50 +02:00
2022-05-01 17:22:24 +02:00
2021-11-18 19:16:20 +01:00
2022-05-01 17:22:26 +02:00
2020-10-25 14:51:49 -07:00
2021-01-24 14:27:17 +01:00
2021-11-18 19:17:21 +01:00
2017-11-02 11:10:55 +01:00
2021-06-08 17:00:09 +02:00
2021-09-03 09:58:17 -07:00
2022-02-23 12:03:17 +01:00
2021-11-18 19:16:03 +01:00
2020-08-18 13:45:20 +02:00
2021-05-22 15:09:07 -10:00
2021-05-05 22:54:12 +02:00
2022-04-08 14:24:18 +02:00
2021-09-11 00:41:21 +02:00
2021-11-18 19:16:45 +01:00
2022-05-30 09:29:09 +02:00
2021-08-17 17:29:10 +02:00
2021-05-21 20:59:55 +02:00
2021-12-14 10:57:11 +01:00
2019-06-05 17:37:05 +02:00
2021-11-18 19:16:00 +01:00
2022-04-08 14:24:13 +02:00
2021-11-25 09:48:41 +01:00
2019-12-03 11:20:37 +01:00
2022-01-05 12:42:34 +01:00
2017-11-02 11:10:55 +01:00
2022-04-27 14:38:50 +02:00
2021-11-18 19:17:06 +01:00
2022-03-08 19:12:39 +01:00
2021-05-21 13:15:39 +02:00
2021-08-26 15:32:10 -04:00
2020-01-03 09:42:52 +01:00
2022-04-08 14:22:59 +02:00
2020-12-10 12:42:59 -06:00
2021-09-06 07:20:56 -04:00
2022-03-08 19:12:40 +01:00
2021-11-18 19:16:25 +01:00
2022-01-20 09:13:13 +01:00
2021-11-25 09:49:08 +01:00
2022-01-11 15:35:11 +01:00
2022-02-01 17:27:15 +01:00
2022-03-16 14:23:46 +01:00
2017-11-02 11:10:55 +01:00
2022-01-27 11:04:41 +01:00
2022-05-30 09:29:09 +02:00
2022-03-23 09:16:42 +01:00
2021-12-29 12:28:49 +01:00
2020-09-08 16:28:49 +03:00
2021-04-30 11:20:40 -07:00
2022-05-01 17:22:32 +02:00
2022-05-25 09:57:22 +02:00
2021-11-25 09:48:42 +01:00
2022-04-13 20:59:03 +02:00
2022-03-08 19:12:32 +01:00
2022-03-08 19:12:38 +01:00
2021-11-18 19:16:13 +01:00
2020-09-04 12:46:06 +01:00
2022-05-09 09:14:30 +02:00
2022-04-27 14:38:51 +02:00
2021-12-08 09:04:41 +01:00
2021-06-29 17:29:11 -07:00
2022-02-08 18:34:12 +01:00
2021-11-18 19:15:51 +01:00
2019-11-26 13:35:25 -07:00
2020-03-31 17:29:33 -07:00
2021-11-12 15:05:48 +01:00
2021-11-12 15:05:48 +01:00
2022-05-25 09:57:26 +02:00
2022-01-05 12:42:33 +01:00
2022-04-27 14:38:57 +02:00
2021-10-18 20:22:02 -10:00
2018-05-14 13:14:23 -06:00
2021-12-14 10:57:22 +01:00
2017-11-02 11:10:55 +01:00
2021-02-24 13:38:33 -08:00
2022-05-01 17:22:32 +02:00
2022-04-13 20:59:28 +02:00
2021-08-16 14:42:22 +02:00
2021-07-01 11:06:05 -07:00
2021-11-18 19:17:14 +01:00
2021-04-08 22:18:36 -07:00
2022-05-18 10:26:47 +02:00
2022-05-25 09:57:31 +02:00
2021-08-25 15:20:25 +01:00
2021-04-19 15:41:28 -07:00
2020-07-15 07:45:25 -07:00
2022-02-16 12:56:09 +01:00
2022-04-13 20:59:13 +02:00
2022-02-16 12:56:09 +01:00
2020-08-19 13:47:15 +02:00
2022-04-08 14:24:09 +02:00
2022-03-02 11:48:06 +01:00
2021-01-26 11:12:00 -06:00
2022-01-27 11:04:15 +01:00
2022-03-08 19:12:42 +01:00
2021-10-28 17:18:55 -07:00
2022-05-01 17:22:29 +02:00
2021-07-01 11:06:04 -07:00
2022-03-16 14:23:46 +01:00
2022-04-08 14:23:37 +02:00
2022-02-01 17:27:10 +01:00
2022-02-08 18:34:05 +01:00
2020-08-19 14:14:06 +02:00
2021-08-26 11:28:07 -07:00
2022-01-27 11:04:44 +01:00
2021-11-18 19:17:14 +01:00
2019-05-24 17:36:45 +02:00
2022-05-30 09:29:15 +02:00
2021-11-25 09:48:45 +01:00
2022-02-01 17:27:01 +01:00
2022-02-01 17:27:15 +01:00
2022-04-08 14:23:01 +02:00
2022-01-27 11:03:52 +01:00
2022-05-30 09:29:10 +02:00
2022-04-08 14:23:06 +02:00
2020-12-11 12:47:17 +01:00
2021-11-18 19:16:58 +01:00
2022-04-27 14:38:58 +02:00
2021-07-13 11:39:42 +01:00
2022-05-25 09:57:37 +02:00
2018-05-16 07:24:30 +02:00
2021-11-18 19:17:12 +01:00
2021-08-13 09:12:53 +02:00
2022-04-08 14:23:50 +02:00
2018-10-02 14:38:02 -07:00
2012-10-13 10:46:48 +01:00
2021-07-08 11:48:20 -07:00
2021-11-18 19:16:01 +01:00
2022-05-30 09:29:15 +02:00
2020-12-29 15:36:49 -08:00
2022-04-08 14:24:13 +02:00
2022-04-08 14:23:40 +02:00
2021-08-31 16:43:06 -07:00
2022-04-13 20:59:28 +02:00
2022-04-13 20:59:28 +02:00
2022-04-13 20:59:28 +02:00
2022-05-12 12:30:05 +02:00
2021-11-21 13:44:12 +01:00
2018-04-28 15:01:14 -07:00
2022-02-16 12:56:19 +01:00
2022-04-08 14:24:17 +02:00
2018-02-05 21:34:50 +01:00
2020-12-02 15:07:56 +01:00
2021-08-17 11:47:53 -04:00
2021-04-11 19:30:25 -06:00
2022-03-02 11:47:51 +01:00
2019-08-23 02:12:11 +02:00
2022-05-30 09:29:13 +02:00
2021-11-18 19:16:41 +01:00
2021-11-25 09:48:34 +01:00
2020-12-07 18:25:02 -05:00
2021-06-28 14:12:26 -04:00
2022-05-01 17:22:33 +02:00
2020-09-10 14:03:31 -07:00
2021-05-27 09:36:31 +02:00
2022-04-20 09:34:13 +02:00
2022-03-16 14:23:43 +01:00
2021-12-29 12:28:43 +01:00
2022-03-16 14:23:43 +01:00
2022-03-08 19:12:38 +01:00
2021-12-14 10:57:15 +01:00
2022-03-16 14:23:44 +01:00
2017-11-02 11:10:55 +01:00
2021-09-13 07:53:27 -10:00