Kernel sources for Moto G9 (Play) (Guamp)
Find a file
Eric Biggers e9f2289a4b BACKPORT: crypto: blake2b - sync with blake2s implementation
Sync the BLAKE2b code with the BLAKE2s code as much as possible:

- Move a lot of code into new headers <crypto/blake2b.h> and
  <crypto/internal/blake2b.h>, and adjust it to be like the
  corresponding BLAKE2s code, i.e. like <crypto/blake2s.h> and
  <crypto/internal/blake2s.h>.

- Rename constants, e.g. BLAKE2B_*_DIGEST_SIZE => BLAKE2B_*_HASH_SIZE.

- Use a macro BLAKE2B_ALG() to define the shash_alg structs.

- Export blake2b_compress_generic() for use as a fallback.

This makes it much easier to add optimized implementations of BLAKE2b,
as optimized implementations can use the helper functions
crypto_blake2b_{setkey,init,update,final}() and
blake2b_compress_generic().  The ARM implementation will use these.

But this change is also helpful because it eliminates unnecessary
differences between the BLAKE2b and BLAKE2s code, so that the same
improvements can easily be made to both.  (The two algorithms are
basically identical, except for the word size and constants.)  It also
makes it straightforward to add a library API for BLAKE2b in the future
if/when it's needed.

This change does make the BLAKE2b code slightly more complicated than it
needs to be, as it doesn't actually provide a library API yet.  For
example, __blake2b_update() doesn't really need to exist yet; it could
just be inlined into crypto_blake2b_update().  But I believe this is
outweighed by the benefits of keeping the code in sync.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 28dcca4cc0c01e2467549a36b1b0eacfdb01236c)

Conflicts:
	crypto/blake2b_generic.c

(conflict due to this branch not having commit 674f368a952c,
"crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN")

Bug: 178411248
Change-Id: I755c64fefe1209b54d1417d91e8a4c207382a620
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-20 10:11:13 -07:00
android ANDROID: GKI: update .xml file for struct sock change 2021-10-11 08:08:01 +02:00
arch UPSTREAM: crypto: arm/blake2s - add ARM scalar optimized BLAKE2s 2021-10-20 10:11:08 -07:00
block Merge 4.19.209 into android-4.19-stable 2021-10-08 11:28:08 +02:00
certs certs: Trigger creation of RSA module signing key if it's not an RSA key 2021-09-22 11:47:51 +02:00
crypto BACKPORT: crypto: blake2b - sync with blake2s implementation 2021-10-20 10:11:13 -07:00
Documentation This is the 4.19.207 stable release 2021-09-25 14:26:55 +02:00
drivers UPSTREAM: wireguard: Kconfig: select CRYPTO_BLAKE2S_ARM 2021-10-20 10:11:13 -07:00
firmware
fs This is the 4.19.211 stable release 2021-10-13 14:17:14 +02:00
include BACKPORT: crypto: blake2b - sync with blake2s implementation 2021-10-20 10:11:13 -07:00
init ANDROID: Add CONFIG_LLD_VERSION 2021-06-23 12:22:01 -07:00
ipc
kernel This is the 4.19.211 stable release 2021-10-13 14:17:14 +02:00
lib UPSTREAM: crypto: blake2s - move update and final logic to internal/blake2s.h 2021-10-20 10:10:52 -07:00
LICENSES
mm This is the 4.19.207 stable release 2021-09-25 14:26:55 +02:00
net This is the 4.19.212 stable release 2021-10-17 10:40:32 +02:00
samples This is the 4.19.207 stable release 2021-09-25 14:26:55 +02:00
scripts This is the 4.19.203 stable release 2021-08-12 13:58:30 +02:00
security This is the 4.19.208 stable release 2021-10-04 19:05:27 +02:00
sound This is the 4.19.207 stable release 2021-09-25 14:26:55 +02:00
tools Merge 4.19.210 into android-4.19-stable 2021-10-13 12:14:49 +02:00
usr
virt KVM: remember position in kvm->vcpus array 2021-09-26 13:39:46 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
build.config.aarch64
build.config.allmodconfig ANDROID: Different fix for KABI breakage in 4.19.209 in struct sock 2021-10-11 19:44:01 +00:00
build.config.allmodconfig.aarch64
build.config.allmodconfig.arm
build.config.allmodconfig.x86_64
build.config.arm
build.config.common ANDROID: clang: update to 12.0.5 2021-04-19 19:40:51 +00:00
build.config.gki
build.config.gki-debug.aarch64
build.config.gki-debug.x86_64
build.config.gki.aarch64
build.config.gki.x86_64
build.config.gki_kasan ANDROID: build_config: drop CONFIG_KASAN_PANIC_ON_WARN 2021-02-15 18:29:34 +00:00
build.config.gki_kasan.aarch64
build.config.gki_kasan.x86_64
build.config.gki_kprobes ANDROID: Adding kprobes build configs for Cuttlefish 2021-02-28 05:19:39 +00:00
build.config.gki_kprobes.aarch64 ANDROID: Adding kprobes build configs for Cuttlefish 2021-02-28 05:19:39 +00:00
build.config.gki_kprobes.x86_64 ANDROID: Adding kprobes build configs for Cuttlefish 2021-02-28 05:19:39 +00:00
build.config.x86_64
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile This is the 4.19.212 stable release 2021-10-17 10:40:32 +02:00
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-03 14:09:44 +00:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.