android_kernel_sony_sdm845/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Biggers b8181f36dc BACKPORT, FROMGIT: crypto: chacha20-generic - refactor to allow varying number of rounds
In preparation for adding XChaCha12 support, rename/refactor
chacha20-generic to support different numbers of rounds.  The
justification for needing XChaCha12 support is explained in more detail
in the patch "crypto: chacha - add XChaCha12 support".

The only difference between ChaCha{8,12,20} are the number of rounds
itself; all other parts of the algorithm are the same.  Therefore,
remove the "20" from all definitions, structures, functions, files, etc.
that will be shared by all ChaCha versions.

Also make ->setkey() store the round count in the chacha_ctx (previously
chacha20_ctx).  The generic code then passes the round count through to
chacha_block().  There will be a ->setkey() function for each explicitly
allowed round count; the encrypt/decrypt functions will be the same.  I
decided not to do it the opposite way (same ->setkey() function for all
round counts, with different encrypt/decrypt functions) because that
would have required more boilerplate code in architecture-specific
implementations of ChaCha and XChaCha.

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Martin Willi <martin@strongswan.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 1ca1b917940c24ca3d1f490118c5474168622953
 https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master)

Conflicts:
	arch/arm/crypto/chacha20-neon-glue.c
	arch/arm64/crypto/chacha20-neon-glue.c
	arch/x86/crypto/chacha20_glue.c
	drivers/char/random.c
	drivers/crypto/caam/caamalg.c
	drivers/crypto/caam/caamalg_qi2.c
	drivers/crypto/caam/compat.h
	include/crypto/chacha20.h
	lib/Makefile

Bug: 112008522
Test: As series, see Ic61c13b53facfd2173065be715a7ee5f3af8760b
Change-Id: I7fa203ddc7095ce8675a32f49b8a5230cd0cf5f6
Signed-off-by: Eric Biggers <ebiggers@google.com>
2018-12-13 09:34:58 -08:00
..
alpha This is the 4.9.138 stable release 2018-11-23 11:46:13 +01:00
arc ARC: [zebu] Remove CONFIG_INITRAMFS_SOURCE from defconfigs 2018-12-13 09:20:26 +01:00
arm BACKPORT, FROMGIT: crypto: chacha20-generic - refactor to allow varying number of rounds 2018-12-13 09:34:58 -08:00
arm64 ANDROID: cuttlefish_defconfig: Enable VIRT_WIFI 2018-12-13 17:11:37 +00:00
avr32
blackfin
c6x
cris
frv This is the 4.9.101 stable release 2018-05-19 14:06:17 +02:00
h8300
hexagon hexagon: modify ffs() and fls() to return int 2018-10-10 08:53:21 +02:00
ia64 kbuild: Consolidate header generation from ASM offset information 2018-11-23 08:20:34 +01:00
m32r
m68k m68k: fix "bad page state" oops on ColdFire boot 2018-08-24 13:12:34 +02:00
metag
microblaze microblaze: Fix simpleImage format generation 2018-08-03 07:55:25 +02:00
mips This is the 4.9.144 stable release 2018-12-08 16:06:13 +01:00
mn10300 This is the 4.9.82 stable release 2018-02-17 14:52:07 +01:00
nios2
openrisc kthread: fix boot hang (regression) on MIPS/OpenRISC 2018-09-19 22:47:11 +02:00
parisc This is the 4.9.138 stable release 2018-11-23 11:46:13 +01:00
powerpc This is the 4.9.142 stable release 2018-12-01 10:00:35 +01:00
s390 This is the 4.9.142 stable release 2018-12-01 10:00:35 +01:00
score
sh sh: fix debug trap failure to process signals before return to user 2018-05-30 07:50:39 +02:00
sparc This is the 4.9.137 stable release 2018-11-23 11:11:43 +01:00
tile futex: Remove duplicated code and fix undefined behaviour 2018-05-19 10:27:00 +02:00
um um: Give start_idle_thread() a return code 2018-11-27 16:09:38 +01:00
unicore32
x86 BACKPORT, FROMGIT: crypto: chacha20-generic - refactor to allow varying number of rounds 2018-12-13 09:34:58 -08:00
xtensa This is the 4.9.143 stable release 2018-12-05 20:10:23 +01:00
.gitignore
Kconfig ANDROID: kbuild: disable LTO_CLANG with KASAN 2018-10-02 15:21:15 -07:00