Home GnuPG

Speed up Stribog
a48d07ccadeeUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

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>

Details

Provenance
jukiviliAuthored on Oct 1 2013, 8:47 PM
Parents
rC3b5058b58a18: Tweak AES-NI bulk CTR mode slightly
Branches
Unknown
Tags
Unknown

Event Timeline

Jussi Kivilinna <jussi.kivilinna@iki.fi> committed rCa48d07ccadee: Speed up Stribog (authored by Jussi Kivilinna <jussi.kivilinna@iki.fi>).Nov 6 2013, 6:23 PM