1
0
Fork 0
alistair23-linux/include
Ondrej Mosnáček acb9b159c7 crypto: gf128mul - define gf128mul_x_* in gf128mul.h
The gf128mul_x_ble function is currently defined in gf128mul.c, because
it depends on the gf128mul_table_be multiplication table.

However, since the function is very small and only uses two values from
the table, it is better for it to be defined as inline function in
gf128mul.h. That way, the function can be inlined by the compiler for
better performance.

For consistency, the other gf128mul_x_* functions are also moved to the
header file. In addition, the code is rewritten to be constant-time.

After this change, the speed of the generic 'xts(aes)' implementation
increased from ~225 MiB/s to ~235 MiB/s (measured using 'cryptsetup
benchmark -c aes-xts-plain64' on an Intel system with CRYPTO_AES_X86_64
and CRYPTO_AES_NI_INTEL disabled).

Signed-off-by: Ondrej Mosnacek <omosnacek@gmail.com>
Reviewd-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-04-05 21:58:35 +08:00
..
acpi Merge branches 'acpi-bus', 'acpi-sleep' and 'acpi-processor' 2017-02-20 14:28:03 +01:00
asm-generic mm: convert generic code to 5-level paging 2017-03-09 11:48:47 -08:00
clocksource
crypto crypto: gf128mul - define gf128mul_x_* in gf128mul.h 2017-04-05 21:58:35 +08:00
drm sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
dt-bindings Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2017-03-24 21:58:58 +08:00
keys KEYS: Differentiate uses of rcu_dereference_key() and user_key_payload() 2017-03-02 10:09:00 +11:00
kvm
linux Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-04-05 21:57:07 +08:00
math-emu
media media fixes for v4.11-rc2 2017-03-09 15:50:56 -08:00
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-03-14 21:31:23 -07:00
pcmcia
ras
rdma sched/headers: Prepare to remove <linux/cred.h> inclusion from <linux/sched.h> 2017-03-02 08:42:31 +01:00
rxrpc
scsi scsi: mpt3sas: Avoid sleeping in interrupt context 2017-03-01 21:52:13 -05:00
soc soc/qman: add macros needed by caam/qi driver 2017-03-24 22:02:58 +08:00
sound sched/headers: Prepare to remove spurious <linux/sched.h> inclusion dependencies 2017-03-02 08:42:41 +01:00
target target: fix ALUA transition timeout handling 2017-03-18 14:47:28 -07:00
trace There was some breakage with the changes for jump labels in the 4.11 merge 2017-03-07 09:37:28 -08:00
uapi amd, intel, tilcdc, omap, and malidp fixes. 2017-03-17 11:19:52 -07:00
video
xen Merge branch 'stable/for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb 2017-03-07 10:23:17 -08:00
Kbuild