mbox series

[v7,0/4] crypto: poly1305 improvements

Message ID 20200104234141.4624-1-Jason@zx2c4.com
Headers show
Series crypto: poly1305 improvements | expand

Message

Jason A. Donenfeld Jan. 4, 2020, 11:41 p.m. UTC
Version 7 incorporates suggestions from the mailing list on version 6.
We now use a union type to handle the poly1305_core_key, per suggestion.
And now the changes to the cryptogams code are nicely split out into its
own commit, with detail on the (limited) scope of the changes. I believe
this should address the last of issues brought up.

####

These are some improvements to the Poly1305 code that I think should be
fairly uncontroversial. The first part, the new C implementations, adds
cleaner code in two forms that can easily be compared and reviewed, and
also results in performance speedups. The second part, the new x86_64
implementation, replaces an slow unvetted implementation with an
extremely fast implementation that has received many eyeballs. Finally,
we fix up some deadcode.

Jason A. Donenfeld (4):
  crypto: poly1305 - add new 32 and 64-bit generic versions
  crypto: x86_64/poly1305 - import unmodified cryptogams implementation
  crypto: x86_64/poly1305 - wire up faster implementations for kernel
  crypto: arm/arm64/mips/poly1305 - remove redundant non-reduction from
    emit

 arch/arm/crypto/poly1305-glue.c        |   18 +-
 arch/arm64/crypto/poly1305-glue.c      |   18 +-
 arch/mips/crypto/poly1305-glue.c       |   18 +-
 arch/x86/crypto/.gitignore             |    1 +
 arch/x86/crypto/Makefile               |   11 +-
 arch/x86/crypto/poly1305-avx2-x86_64.S |  390 ---
 arch/x86/crypto/poly1305-sse2-x86_64.S |  590 ----
 arch/x86/crypto/poly1305-x86_64.pl     | 4265 ++++++++++++++++++++++++
 arch/x86/crypto/poly1305_glue.c        |  308 +-
 crypto/adiantum.c                      |    4 +-
 crypto/nhpoly1305.c                    |    2 +-
 crypto/poly1305_generic.c              |   25 +-
 include/crypto/internal/poly1305.h     |   45 +-
 include/crypto/nhpoly1305.h            |    4 +-
 include/crypto/poly1305.h              |   26 +-
 lib/crypto/Kconfig                     |    2 +-
 lib/crypto/Makefile                    |    4 +-
 lib/crypto/poly1305-donna32.c          |  204 ++
 lib/crypto/poly1305-donna64.c          |  185 +
 lib/crypto/poly1305.c                  |  169 +-
 20 files changed, 4924 insertions(+), 1365 deletions(-)
 create mode 100644 arch/x86/crypto/.gitignore
 delete mode 100644 arch/x86/crypto/poly1305-avx2-x86_64.S
 delete mode 100644 arch/x86/crypto/poly1305-sse2-x86_64.S
 create mode 100644 arch/x86/crypto/poly1305-x86_64.pl
 create mode 100644 lib/crypto/poly1305-donna32.c
 create mode 100644 lib/crypto/poly1305-donna64.c