You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adapts the Apache 2.0+MIT licensed implementation of the Reduction/Field
algorithm (#290, see https://eprint.iacr.org/2025/2171) from
`hpcrypt-mac`: https://github.com/seceq/hpcrypt/
Sources were taken as of upstream commit 6c22585, then modified to fit
the structure of this crate (e.g. removed buffering).
Benchmarks show for 4 powers-of-H, this algorithm is ~66% faster for
short messages on ARMv8, and ~20% faster for longer messages. It
requires double the memory footprint, however, and for the same size is
faster than our previous Karatsuba + 8 x powers-of-H for short messages,
but slower for longer ones.
This removes the generic parameter, since the implementation we're
adapting isn't currently generic, however it could potentially be
returned if there's a desire for higher performance on long messages.
Additionally support for using a custom init block has been removed, but
could be added back. I was noticing there are some oddities to it like
`Reset` will always use `0` rather than the custom init block. I think
perhaps instead of trying to shoehorn that stuff into `Polyval`/`GHash`
and adding undue complexity there, we should instead expose bits through
`polyval::hazmat` (like the core R/F algorithm) which make it possible
to build your own customized high performance GHASH/POLYVAL-like UHF
that can be tweaked in any way desired.
0 commit comments