hashes icon indicating copy to clipboard operation
hashes copied to clipboard

skein: improve performance

Open fck-gthb opened this issue 9 months ago • 2 comments

The C implementation of Skein in https://github.com/pornin/sphlib is 5x+ faster than the one in RustCrypto/hashes.

  skein/512-rust          time:   [1.3714 µs 1.3734 µs 1.3753 µs]
Found 6 outliers among 100 measurements (6.00%)
  4 (4.00%) high mild
  2 (2.00%) high severe
skein/512-sphlib        time:   [200.72 ns 200.79 ns 200.88 ns]
Found 8 outliers among 100 measurements (8.00%)
  3 (3.00%) high mild
  5 (5.00%) high severe

fck-gthb avatar Apr 24 '25 11:04 fck-gthb

The reason is likely in a suboptimal implementation of the underlying block cipher in the threefish crate, since block compress function in Skein is mostly just threefish block encrypt.

newpavlov avatar Apr 25 '25 18:04 newpavlov

Performance not perfromance.

fck-gthb avatar Jun 13 '25 16:06 fck-gthb