kernel-ark/arch/arm
Eric Biggers ede9622162 crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS
Add an ARM NEON-accelerated implementation of Speck-XTS.  It operates on
128-byte chunks at a time, i.e. 8 blocks for Speck128 or 16 blocks for
Speck64.  Each 128-byte chunk goes through XTS preprocessing, then is
encrypted/decrypted (doing one cipher round for all the blocks, then the
next round, etc.), then goes through XTS postprocessing.

The performance depends on the processor but can be about 3 times faster
than the generic code.  For example, on an ARMv7 processor we observe
the following performance with Speck128/256-XTS:

    xts-speck128-neon:     Encryption 107.9 MB/s, Decryption 108.1 MB/s
    xts(speck128-generic): Encryption  32.1 MB/s, Decryption  36.6 MB/s

In comparison to AES-256-XTS without the Cryptography Extensions:

    xts-aes-neonbs:        Encryption  41.2 MB/s, Decryption  36.7 MB/s
    xts(aes-asm):          Encryption  31.7 MB/s, Decryption  30.8 MB/s
    xts(aes-generic):      Encryption  21.2 MB/s, Decryption  20.9 MB/s

Speck64/128-XTS is even faster:

    xts-speck64-neon:      Encryption 138.6 MB/s, Decryption 139.1 MB/s

Note that as with the generic code, only the Speck128 and Speck64
variants are supported.  Also, for now only the XTS mode of operation is
supported, to target the disk and file encryption use cases.  The NEON
code also only handles the portion of the data that is evenly divisible
into 128-byte chunks, with any remainder handled by a C fallback.  Of
course, other modes of operation could be added later if needed, and/or
the NEON code could be updated to handle other buffer sizes.

The XTS specification is only defined for AES which has a 128-bit block
size, so for the GF(2^64) math needed for Speck64-XTS we use the
reducing polynomial 'x^64 + x^4 + x^3 + x + 1' given by the original XEX
paper.  Of course, when possible users should use Speck128-XTS, but even
that may be too slow on some processors; Speck64-XTS can be faster.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-02-22 22:16:55 +08:00
..
boot media updates for v4.16-rc1 2018-02-06 11:27:48 -08:00
common Merge branches 'fixes', 'misc', 'sa1111' and 'sa1100-for-next' into for-next 2018-01-21 15:38:10 +00:00
configs ARM: SoC platform updates for 4.16 2018-02-01 16:17:40 -08:00
crypto crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS 2018-02-22 22:16:55 +08:00
firmware
include KVM changes for 4.16 2018-02-10 13:16:35 -08:00
kernel pci-v4.16-changes 2018-02-06 09:59:40 -08:00
kvm KVM changes for 4.16 2018-02-10 13:16:35 -08:00
lib Merge branches 'fixes', 'misc', 'sa1111' and 'sa1100-for-next' into for-next 2018-01-21 15:38:10 +00:00
mach-actions ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-alpine License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-axxia License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-bcm soc: brcmstb: biuctrl: Move to early_initcall 2017-12-20 17:37:44 -08:00
mach-berlin
mach-clps711x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-cns3xxx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-davinci Merge branch 'i2c/for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-02-04 10:57:43 -08:00
mach-digicolor License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-dove License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ebsa110 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-efm32 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ep93xx ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative 2017-12-13 22:26:10 +01:00
mach-exynos ARM: EXYNOS: Add SPDX license identifiers 2018-01-03 18:36:22 +01:00
mach-footbridge Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
mach-gemini License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-highbank License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-hisi License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-imx ARM: imx: remove unused imx3 pm definitions 2017-12-26 16:30:20 +08:00
mach-integrator ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-iop13xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-iop32x treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
mach-iop33x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ixp4xx w1: w1-gpio: Convert to use GPIO descriptors 2017-12-08 15:32:53 +01:00
mach-keystone License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ks8695 Merge branch 'i2c/for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2017-11-14 17:52:21 -08:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek ARM: mediatek: use more generic prompts for SoCs with ARMv7 2017-12-20 15:48:18 +01:00
mach-meson Amlogic 32-bit DT changes for v4.16 2017-12-21 16:37:34 +01:00
mach-mmp ARM: pxa: move header file out of I2C realm 2017-11-28 22:49:30 +01:00
mach-moxart
mach-mv78xx0 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-mvebu PCI: Move OF-related PCI functions into PCI core 2018-01-17 17:36:39 -06:00
mach-mxs ARM: mxs: constify platform_suspend_ops 2017-09-20 22:21:08 +08:00
mach-netx
mach-nomadik
mach-nspire
mach-omap1 ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-omap2 ARM: SoC driver updates for 4.16 2018-02-01 16:35:31 -08:00
mach-orion5x treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
mach-oxnas
mach-picoxcell
mach-prima2 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-pxa ARM: SoC platform updates for 4.16 2018-02-01 16:17:40 -08:00
mach-qcom
mach-realview
mach-rockchip Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
mach-rpc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-s3c24xx ARM: S3C24XX: Add SPDX license identifiers 2018-01-03 18:36:43 +01:00
mach-s3c64xx ARM: S3C64XX: Add SPDX license identifiers 2018-01-03 18:42:53 +01:00
mach-s5pv210 ARM: S5PV210: Add SPDX license identifiers 2018-01-03 18:43:04 +01:00
mach-sa1100 ARM: sa1100/neponset: add GPIO drivers for control and modem registers 2018-01-01 00:50:05 +00:00
mach-shmobile ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-socfpga License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-spear License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-sti
mach-stm32
mach-sunxi ARM: sunxi: add support for R40 SoC 2017-09-22 21:57:09 +02:00
mach-tango License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-tegra Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
mach-u300 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-uniphier kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
mach-ux500 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-versatile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-vexpress ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
mach-vt8500 arm: vt8500: kconfig: Remove blank help text 2018-02-02 23:53:10 +09:00
mach-w90x900 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-zx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-zynq License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2018-02-02 09:50:51 -08:00
net bpf, arm: remove obsolete exception handling from div/mod 2018-01-26 16:42:07 -08:00
nwfpe License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
plat-iop License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
plat-omap ARM: SoC platform updates for 4.15 2017-11-16 14:05:12 -08:00
plat-orion
plat-pxa
plat-samsung ARM: SAMSUNG: Add SPDX license identifiers 2018-01-03 18:43:13 +01:00
plat-versatile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
probes ARM: probes: avoid adding kprobes to sensitive kernel-entry/exit code 2017-12-17 22:14:21 +00:00
tools ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative 2017-12-13 22:26:10 +01:00
vdso Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
vfp signal/arm: Document conflicts with SI_USER and SIGFPE 2018-01-12 14:21:05 -06:00
xen xen: re-introduce support for grant v2 interface 2017-11-06 15:50:17 -05:00
Kconfig Currently, hardened usercopy performs dynamic bounds checking on slab 2018-02-03 16:25:42 -08:00
Kconfig-nommu Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-11-16 12:50:35 -08:00
Kconfig.debug ARM: 8737/1: mm: dump: add checking for writable and executable 2018-01-21 15:32:20 +00:00
Makefile ARM: 8723/2: always assume the "unified" syntax for assembly code 2017-12-17 22:14:21 +00:00