[PATCH v2 1/3] crypto/arm64: aes-ce-gcm - operate on two input blocks at a time

2018-07-30 Thread Ard Biesheuvel
Update the core AES/GCM transform and the associated plumbing to operate on 2 AES/GHASH blocks at a time. By itself, this is not expected to result in a noticeable speedup, but it paves the way for reimplementing the GHASH component using 2-way aggregation. Signed-off-by: Ard Biesheuvel --- arch

[PATCH v2 0/3] crypto/arm64: aes-ce-gcm - switch to 2-way aggregation

2018-07-30 Thread Ard Biesheuvel
Update the combined AES-GCM AEAD implementation to process two blocks at a time, allowing us to switch to a faster version of the GHASH implementation. Note that this does not update the core GHASH transform, only the combined AES-GCM AEAD mode. GHASH is mostly used with AES anyway, and the ARMv8

[PATCH v2 3/3] crypto: arm64/aes-ce-gcm - don't reload key schedule if avoidable

2018-07-30 Thread Ard Biesheuvel
Squeeze out another 5% of performance by minimizing the number of invocations of kernel_neon_begin()/kernel_neon_end() on the common path, which also allows some reloads of the key schedule to be optimized away. The resulting code runs at 2.3 cycles per byte on a Cortex-A53. Signed-off-by: Ard Bi

[PATCH v2 2/3] crypto/arm64: aes-ce-gcm - implement 2-way aggregation

2018-07-30 Thread Ard Biesheuvel
Implement a faster version of the GHASH transform which amortizes the reduction modulo the characteristic polynomial across two input blocks at a time. On a Cortex-A53, the gcm(aes) performance increases 24%, from 3.0 cycles per byte to 2.4 cpb for large input sizes. Signed-off-by: Ard Biesheuvel

Re: [PATCH 0/4][RFC v2] Introduce the in-kernel hibernation encryption

2018-07-30 Thread joeyli
Hi all, On Thu, Jul 26, 2018 at 04:14:04PM +0800, joeyli wrote: > On Thu, Jul 26, 2018 at 09:30:46AM +0200, Oliver Neukum wrote: > > On Di, 2018-07-24 at 00:23 +0800, Yu Chen wrote: > > > > > > Good point, we once tried to generate key in kernel, but people > > > suggest to generate key in usersp

[PATCH][RESEND] lib/mpi: remove redundant variable esign

2018-07-30 Thread Colin King
From: Colin Ian King Variable esign is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'esign' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- lib/mpi/mpi-pow.c | 3 +-- 1 file changed, 1 inse