aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/crypto
Commit message (Collapse)AuthorAgeFilesLines
* crypto: arm - replace memset by memzero_explicitJulia Lawall2019-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memset on a local variable may be removed when it is called just before the variable goes out of scope. Using memzero_explicit defeats this optimization. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier x; type T; @@ { ... when any T x[...]; ... when any when exists - memset + memzero_explicit (x, -0, ...) ... when != x when strict } // </smpl> This change was suggested by Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Change-Id: I89b5957f922b7e5568a405c212eb186449f1deab (cherry picked from commit 025f4cbff16e284192b04bfa1f7b19551c1f5af3)
* crypto: arm/sha256 - Use memzero_explicit to fill memory with 0elektroschmock2019-07-081-1/+1
| | | | | | | | memzero_explicit should be used instead in order to prevent the compiler from optimising away zeroing. Change-Id: I248925e4c3e934a98f1341b6649ca7cb200a7781 (cherry picked from commit af92d4cf4b0a9ffc39fbd242c2659267ea62fb97)
* UPSTREAM: crypto: arm/chacha20 - implement NEON version based on SSE3 codeArd Biesheuvel2017-12-143-0/+661
| | | | | | | | | | | | This is a straight port to ARM/NEON of the x86 SSE3 implementation of the ChaCha20 stream cipher. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> (cherry picked from commit 8096667273477e735b0072b11a6d617ccee45e5f, fixed merge conflicts in Kconfig and Makefile) Change-Id: Id5d32a41a3ec036b9cffe0b739321eede4c92d0a Signed-off-by: Eric Biggers <ebiggers@google.com>
* Fix arch/arm/crypto/sha256_glue.cSami Tolvanen2017-12-141-1/+1
| | | | | | | | MODULE_ALIAS_CRYPTO is not defined, use MODULE_ALIAS. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Change-Id: I24803dbbbf7ac7889bc027f69af371b594eca835 (cherry picked from 5eb3cca16fcf9c62753058aaf73bb12b71acba79)
* crypto: arm - ignore generated SHA2 assembly filesBaruch Siach2017-04-111-0/+2
| | | | | | | | | | | These files are generated since commits f2f770d74a8d (crypto: arm/sha256 - Add optimized SHA-256/224, 2015-04-03) and c80ae7ca3726 (crypto: arm/sha512 - accelerated SHA-512 using ARM generic ASM and NEON, 2015-05-08). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* arm: crypto: Add optimized SHA-256/224Sami Tolvanen2016-11-076-1/+3972
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Andy Polyakov's optimized assembly and NEON implementations for SHA-256/224. The sha256-armv4.pl script for generating the assembly code is from OpenSSL commit 51f8d095562f36cdaa6893597b5c609e943b0565. Compared to sha256-generic these implementations have the following tcrypt speed improvements on Motorola Nexus 6 (Snapdragon 805): bs b/u sha256-neon sha256-asm 16 16 x1.32 x1.19 64 16 x1.27 x1.15 64 64 x1.36 x1.20 256 16 x1.22 x1.11 256 64 x1.36 x1.19 256 256 x1.59 x1.23 1024 16 x1.21 x1.10 1024 256 x1.65 x1.23 1024 1024 x1.76 x1.25 2048 16 x1.21 x1.10 2048 256 x1.66 x1.23 2048 1024 x1.78 x1.25 2048 2048 x1.79 x1.25 4096 16 x1.20 x1.09 4096 256 x1.66 x1.23 4096 1024 x1.79 x1.26 4096 4096 x1.82 x1.26 8192 16 x1.20 x1.09 8192 256 x1.67 x1.23 8192 1024 x1.80 x1.26 8192 4096 x1.85 x1.28 8192 8192 x1.85 x1.27 Where bs refers to block size and b/u to bytes per update. Change-Id: I83938010007660f7f3f77f2946c8d22557e3a327 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
* crypto: arm/aes update NEON AES module to latest OpenSSL versionArd Biesheuvel2016-09-282-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 001eabfd54c0cbf9d7d16264ddc8cc0bee67e3ed ] This updates the bit sliced AES module to the latest version in the upstream OpenSSL repository (e620e5ae37bc). This is needed to fix a bug in the XTS decryption path, where data chunked in a certain way could trigger the ciphertext stealing code, which is not supposed to be active in the kernel build (The kernel implementation of XTS only supports round multiples of the AES block size of 16 bytes, whereas the conformant OpenSSL implementation of XTS supports inputs of arbitrary size by applying ciphertext stealing). This is fixed in the upstream version by adding the missing #ifndef XTS_CHAIN_TWEAK around the offending instructions. The upstream code also contains the change applied by Russell to build the code unconditionally, i.e., even if __LINUX_ARM_ARCH__ < 7, but implemented slightly differently. Cc: stable@vger.kernel.org Fixes: e4e7f10bfc40 ("ARM: add support for bit sliced AES using NEON instructions") Reported-by: Adrian Kotelba <adrian.kotelba@gmail.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Milan Broz <gmazyland@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: W4TCH0UT <ateekujjawal@gmail.com>
* 3.10.66 -> 3.10.67Jan Engelmohr2016-08-262-3/+3
|
* first commitMeizu OpenSource2016-08-1517-0/+10189