Speed up Stribog
* cipher/stribog.c (STRIBOG_TABLES): Remove. (Pi): Remove. [!STRIBOG_TABLES] (A, strido): Remove. (stribog_table): New table pre-reordered with Pi values. (strido): Rewrite for new table. (LPSX): Rewrite for new table. (xor): Remove. (g): Small tweaks.
Patch optimizes the table-lookup implementation a bit. Patch also removes
the unused non-table implementation from source.
On Intel Core i5-4570 (amd64, 3.2Ghz):
After:
| nanosecs/byte mebibytes/sec cycles/byte
STRIBOG256 | 9.22 ns/B 103.4 MiB/s 29.53 c/B
STRIBOG512 | 9.23 ns/B 103.4 MiB/s 29.53 c/B
Before:
| nanosecs/byte mebibytes/sec cycles/byte
STRIBOG256 | 30.17 ns/B 31.61 MiB/s 96.56 c/B
STRIBOG512 | 30.20 ns/B 31.57 MiB/s 96.68 c/B
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>