Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: sha - split sha.h into sha1.h and sha2.h

Currently <crypto/sha.h> contains declarations for both SHA-1 and SHA-2,
and <crypto/sha3.h> contains declarations for SHA-3.

This organization is inconsistent, but more importantly SHA-1 is no
longer considered to be cryptographically secure. So to the extent
possible, SHA-1 shouldn't be grouped together with any of the other SHA
versions, and usage of it should be phased out.

Therefore, split <crypto/sha.h> into two headers <crypto/sha1.h> and
<crypto/sha2.h>, and make everyone explicitly specify whether they want
the declarations for SHA-1, SHA-2, or both.

This avoids making the SHA-1 declarations visible to files that don't
want anything to do with SHA-1. It also prepares for potentially moving
sha1.h into a new insecure/ or dangerous/ directory.

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

authored by

Eric Biggers and committed by
Herbert Xu
a24d22b2 5bdad829

+205 -155
+1 -1
arch/arm/crypto/sha1-ce-glue.c
··· 7 7 8 8 #include <crypto/internal/hash.h> 9 9 #include <crypto/internal/simd.h> 10 - #include <crypto/sha.h> 10 + #include <crypto/sha1.h> 11 11 #include <crypto/sha1_base.h> 12 12 #include <linux/cpufeature.h> 13 13 #include <linux/crypto.h>
+1 -1
arch/arm/crypto/sha1.h
··· 3 3 #define ASM_ARM_CRYPTO_SHA1_H 4 4 5 5 #include <linux/crypto.h> 6 - #include <crypto/sha.h> 6 + #include <crypto/sha1.h> 7 7 8 8 extern int sha1_update_arm(struct shash_desc *desc, const u8 *data, 9 9 unsigned int len);
+1 -1
arch/arm/crypto/sha1_glue.c
··· 15 15 #include <linux/init.h> 16 16 #include <linux/module.h> 17 17 #include <linux/types.h> 18 - #include <crypto/sha.h> 18 + #include <crypto/sha1.h> 19 19 #include <crypto/sha1_base.h> 20 20 #include <asm/byteorder.h> 21 21
+1 -1
arch/arm/crypto/sha1_neon_glue.c
··· 19 19 #include <linux/module.h> 20 20 #include <linux/mm.h> 21 21 #include <linux/types.h> 22 - #include <crypto/sha.h> 22 + #include <crypto/sha1.h> 23 23 #include <crypto/sha1_base.h> 24 24 #include <asm/neon.h> 25 25 #include <asm/simd.h>
+1 -1
arch/arm/crypto/sha2-ce-glue.c
··· 7 7 8 8 #include <crypto/internal/hash.h> 9 9 #include <crypto/internal/simd.h> 10 - #include <crypto/sha.h> 10 + #include <crypto/sha2.h> 11 11 #include <crypto/sha256_base.h> 12 12 #include <linux/cpufeature.h> 13 13 #include <linux/crypto.h>
+1 -1
arch/arm/crypto/sha256_glue.c
··· 17 17 #include <linux/mm.h> 18 18 #include <linux/types.h> 19 19 #include <linux/string.h> 20 - #include <crypto/sha.h> 20 + #include <crypto/sha2.h> 21 21 #include <crypto/sha256_base.h> 22 22 #include <asm/simd.h> 23 23 #include <asm/neon.h>
+1 -1
arch/arm/crypto/sha256_neon_glue.c
··· 13 13 #include <crypto/internal/simd.h> 14 14 #include <linux/types.h> 15 15 #include <linux/string.h> 16 - #include <crypto/sha.h> 16 + #include <crypto/sha2.h> 17 17 #include <crypto/sha256_base.h> 18 18 #include <asm/byteorder.h> 19 19 #include <asm/simd.h>
+1 -1
arch/arm/crypto/sha512-glue.c
··· 6 6 */ 7 7 8 8 #include <crypto/internal/hash.h> 9 - #include <crypto/sha.h> 9 + #include <crypto/sha2.h> 10 10 #include <crypto/sha512_base.h> 11 11 #include <linux/crypto.h> 12 12 #include <linux/module.h>
+1 -1
arch/arm/crypto/sha512-neon-glue.c
··· 7 7 8 8 #include <crypto/internal/hash.h> 9 9 #include <crypto/internal/simd.h> 10 - #include <crypto/sha.h> 10 + #include <crypto/sha2.h> 11 11 #include <crypto/sha512_base.h> 12 12 #include <linux/crypto.h> 13 13 #include <linux/module.h>
+1 -1
arch/arm64/crypto/aes-glue.c
··· 10 10 #include <asm/simd.h> 11 11 #include <crypto/aes.h> 12 12 #include <crypto/ctr.h> 13 - #include <crypto/sha.h> 13 + #include <crypto/sha2.h> 14 14 #include <crypto/internal/hash.h> 15 15 #include <crypto/internal/simd.h> 16 16 #include <crypto/internal/skcipher.h>
+1 -1
arch/arm64/crypto/sha1-ce-glue.c
··· 10 10 #include <asm/unaligned.h> 11 11 #include <crypto/internal/hash.h> 12 12 #include <crypto/internal/simd.h> 13 - #include <crypto/sha.h> 13 + #include <crypto/sha1.h> 14 14 #include <crypto/sha1_base.h> 15 15 #include <linux/cpufeature.h> 16 16 #include <linux/crypto.h>
+1 -1
arch/arm64/crypto/sha2-ce-glue.c
··· 10 10 #include <asm/unaligned.h> 11 11 #include <crypto/internal/hash.h> 12 12 #include <crypto/internal/simd.h> 13 - #include <crypto/sha.h> 13 + #include <crypto/sha2.h> 14 14 #include <crypto/sha256_base.h> 15 15 #include <linux/cpufeature.h> 16 16 #include <linux/crypto.h>
+1 -1
arch/arm64/crypto/sha256-glue.c
··· 10 10 #include <asm/simd.h> 11 11 #include <crypto/internal/hash.h> 12 12 #include <crypto/internal/simd.h> 13 - #include <crypto/sha.h> 13 + #include <crypto/sha2.h> 14 14 #include <crypto/sha256_base.h> 15 15 #include <linux/types.h> 16 16 #include <linux/string.h>
+1 -1
arch/arm64/crypto/sha512-ce-glue.c
··· 14 14 #include <asm/unaligned.h> 15 15 #include <crypto/internal/hash.h> 16 16 #include <crypto/internal/simd.h> 17 - #include <crypto/sha.h> 17 + #include <crypto/sha2.h> 18 18 #include <crypto/sha512_base.h> 19 19 #include <linux/cpufeature.h> 20 20 #include <linux/crypto.h>
+1 -1
arch/arm64/crypto/sha512-glue.c
··· 8 8 #include <crypto/internal/hash.h> 9 9 #include <linux/types.h> 10 10 #include <linux/string.h> 11 - #include <crypto/sha.h> 11 + #include <crypto/sha2.h> 12 12 #include <crypto/sha512_base.h> 13 13 #include <asm/neon.h> 14 14
+1 -1
arch/mips/cavium-octeon/crypto/octeon-sha1.c
··· 14 14 */ 15 15 16 16 #include <linux/mm.h> 17 - #include <crypto/sha.h> 17 + #include <crypto/sha1.h> 18 18 #include <linux/init.h> 19 19 #include <linux/types.h> 20 20 #include <linux/module.h>
+1 -1
arch/mips/cavium-octeon/crypto/octeon-sha256.c
··· 15 15 */ 16 16 17 17 #include <linux/mm.h> 18 - #include <crypto/sha.h> 18 + #include <crypto/sha2.h> 19 19 #include <linux/init.h> 20 20 #include <linux/types.h> 21 21 #include <linux/module.h>
+1 -1
arch/mips/cavium-octeon/crypto/octeon-sha512.c
··· 14 14 */ 15 15 16 16 #include <linux/mm.h> 17 - #include <crypto/sha.h> 17 + #include <crypto/sha2.h> 18 18 #include <linux/init.h> 19 19 #include <linux/types.h> 20 20 #include <linux/module.h>
+1 -1
arch/powerpc/crypto/sha1-spe-glue.c
··· 12 12 #include <linux/module.h> 13 13 #include <linux/mm.h> 14 14 #include <linux/types.h> 15 - #include <crypto/sha.h> 15 + #include <crypto/sha1.h> 16 16 #include <asm/byteorder.h> 17 17 #include <asm/switch_to.h> 18 18 #include <linux/hardirq.h>
+1 -1
arch/powerpc/crypto/sha1.c
··· 17 17 #include <linux/module.h> 18 18 #include <linux/mm.h> 19 19 #include <linux/types.h> 20 - #include <crypto/sha.h> 20 + #include <crypto/sha1.h> 21 21 #include <asm/byteorder.h> 22 22 23 23 void powerpc_sha_transform(u32 *state, const u8 *src);
+1 -1
arch/powerpc/crypto/sha256-spe-glue.c
··· 13 13 #include <linux/module.h> 14 14 #include <linux/mm.h> 15 15 #include <linux/types.h> 16 - #include <crypto/sha.h> 16 + #include <crypto/sha2.h> 17 17 #include <asm/byteorder.h> 18 18 #include <asm/switch_to.h> 19 19 #include <linux/hardirq.h>
+2 -1
arch/s390/crypto/sha.h
··· 11 11 #define _CRYPTO_ARCH_S390_SHA_H 12 12 13 13 #include <linux/crypto.h> 14 - #include <crypto/sha.h> 14 + #include <crypto/sha1.h> 15 + #include <crypto/sha2.h> 15 16 #include <crypto/sha3.h> 16 17 17 18 /* must be big enough for the largest SHA variant */
+1 -1
arch/s390/crypto/sha1_s390.c
··· 22 22 #include <linux/init.h> 23 23 #include <linux/module.h> 24 24 #include <linux/cpufeature.h> 25 - #include <crypto/sha.h> 25 + #include <crypto/sha1.h> 26 26 #include <asm/cpacf.h> 27 27 28 28 #include "sha.h"
+1 -1
arch/s390/crypto/sha256_s390.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/module.h> 14 14 #include <linux/cpufeature.h> 15 - #include <crypto/sha.h> 15 + #include <crypto/sha2.h> 16 16 #include <asm/cpacf.h> 17 17 18 18 #include "sha.h"
-1
arch/s390/crypto/sha3_256_s390.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/module.h> 14 14 #include <linux/cpufeature.h> 15 - #include <crypto/sha.h> 16 15 #include <crypto/sha3.h> 17 16 #include <asm/cpacf.h> 18 17
-1
arch/s390/crypto/sha3_512_s390.c
··· 11 11 #include <linux/init.h> 12 12 #include <linux/module.h> 13 13 #include <linux/cpufeature.h> 14 - #include <crypto/sha.h> 15 14 #include <crypto/sha3.h> 16 15 #include <asm/cpacf.h> 17 16
+1 -1
arch/s390/crypto/sha512_s390.c
··· 8 8 * Author(s): Jan Glauber (jang@de.ibm.com) 9 9 */ 10 10 #include <crypto/internal/hash.h> 11 - #include <crypto/sha.h> 11 + #include <crypto/sha2.h> 12 12 #include <linux/errno.h> 13 13 #include <linux/init.h> 14 14 #include <linux/kernel.h>
+1 -1
arch/s390/purgatory/purgatory.c
··· 9 9 10 10 #include <linux/kexec.h> 11 11 #include <linux/string.h> 12 - #include <crypto/sha.h> 12 + #include <crypto/sha2.h> 13 13 #include <asm/purgatory.h> 14 14 15 15 int verify_sha256_digest(void)
+1 -1
arch/sparc/crypto/sha1_glue.c
··· 16 16 #include <linux/module.h> 17 17 #include <linux/mm.h> 18 18 #include <linux/types.h> 19 - #include <crypto/sha.h> 19 + #include <crypto/sha1.h> 20 20 21 21 #include <asm/pstate.h> 22 22 #include <asm/elf.h>
+1 -1
arch/sparc/crypto/sha256_glue.c
··· 16 16 #include <linux/module.h> 17 17 #include <linux/mm.h> 18 18 #include <linux/types.h> 19 - #include <crypto/sha.h> 19 + #include <crypto/sha2.h> 20 20 21 21 #include <asm/pstate.h> 22 22 #include <asm/elf.h>
+1 -1
arch/sparc/crypto/sha512_glue.c
··· 15 15 #include <linux/module.h> 16 16 #include <linux/mm.h> 17 17 #include <linux/types.h> 18 - #include <crypto/sha.h> 18 + #include <crypto/sha2.h> 19 19 20 20 #include <asm/pstate.h> 21 21 #include <asm/elf.h>
+1 -1
arch/x86/crypto/sha1_ssse3_glue.c
··· 22 22 #include <linux/module.h> 23 23 #include <linux/mm.h> 24 24 #include <linux/types.h> 25 - #include <crypto/sha.h> 25 + #include <crypto/sha1.h> 26 26 #include <crypto/sha1_base.h> 27 27 #include <asm/simd.h> 28 28
+1 -1
arch/x86/crypto/sha256_ssse3_glue.c
··· 35 35 #include <linux/module.h> 36 36 #include <linux/mm.h> 37 37 #include <linux/types.h> 38 - #include <crypto/sha.h> 38 + #include <crypto/sha2.h> 39 39 #include <crypto/sha256_base.h> 40 40 #include <linux/string.h> 41 41 #include <asm/simd.h>
+1 -1
arch/x86/crypto/sha512_ssse3_glue.c
··· 34 34 #include <linux/mm.h> 35 35 #include <linux/string.h> 36 36 #include <linux/types.h> 37 - #include <crypto/sha.h> 37 + #include <crypto/sha2.h> 38 38 #include <crypto/sha512_base.h> 39 39 #include <asm/simd.h> 40 40
+1 -1
arch/x86/purgatory/purgatory.c
··· 9 9 */ 10 10 11 11 #include <linux/bug.h> 12 - #include <crypto/sha.h> 12 + #include <crypto/sha2.h> 13 13 #include <asm/purgatory.h> 14 14 15 15 #include "../boot/string.h"
+1 -1
crypto/asymmetric_keys/asym_tpm.c
··· 10 10 #include <linux/tpm_command.h> 11 11 #include <crypto/akcipher.h> 12 12 #include <crypto/hash.h> 13 - #include <crypto/sha.h> 13 + #include <crypto/sha1.h> 14 14 #include <asm/unaligned.h> 15 15 #include <keys/asymmetric-subtype.h> 16 16 #include <keys/trusted_tpm.h>
+1 -1
crypto/sha1_generic.c
··· 16 16 #include <linux/module.h> 17 17 #include <linux/mm.h> 18 18 #include <linux/types.h> 19 - #include <crypto/sha.h> 19 + #include <crypto/sha1.h> 20 20 #include <crypto/sha1_base.h> 21 21 #include <asm/byteorder.h> 22 22
+1 -1
crypto/sha256_generic.c
··· 12 12 #include <linux/module.h> 13 13 #include <linux/mm.h> 14 14 #include <linux/types.h> 15 - #include <crypto/sha.h> 15 + #include <crypto/sha2.h> 16 16 #include <crypto/sha256_base.h> 17 17 #include <asm/byteorder.h> 18 18 #include <asm/unaligned.h>
+1 -1
crypto/sha512_generic.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/crypto.h> 14 14 #include <linux/types.h> 15 - #include <crypto/sha.h> 15 + #include <crypto/sha2.h> 16 16 #include <crypto/sha512_base.h> 17 17 #include <linux/percpu.h> 18 18 #include <asm/byteorder.h>
+1 -1
drivers/char/random.c
··· 336 336 #include <linux/completion.h> 337 337 #include <linux/uuid.h> 338 338 #include <crypto/chacha.h> 339 - #include <crypto/sha.h> 339 + #include <crypto/sha1.h> 340 340 341 341 #include <asm/processor.h> 342 342 #include <linux/uaccess.h>
+1 -1
drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h
··· 25 25 #include <linux/pm_runtime.h> 26 26 #include <crypto/md5.h> 27 27 #include <crypto/skcipher.h> 28 - #include <crypto/sha.h> 28 + #include <crypto/sha1.h> 29 29 #include <crypto/hash.h> 30 30 #include <crypto/internal/hash.h> 31 31 #include <crypto/internal/skcipher.h>
+2 -1
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
··· 13 13 #include <linux/pm_runtime.h> 14 14 #include <linux/scatterlist.h> 15 15 #include <crypto/internal/hash.h> 16 - #include <crypto/sha.h> 16 + #include <crypto/sha1.h> 17 + #include <crypto/sha2.h> 17 18 #include <crypto/md5.h> 18 19 #include "sun8i-ce.h" 19 20
+2 -1
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
··· 16 16 #include <crypto/internal/hash.h> 17 17 #include <crypto/md5.h> 18 18 #include <crypto/rng.h> 19 - #include <crypto/sha.h> 19 + #include <crypto/sha1.h> 20 + #include <crypto/sha2.h> 20 21 21 22 /* CE Registers */ 22 23 #define CE_TDQ 0x00
+2 -1
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
··· 13 13 #include <linux/pm_runtime.h> 14 14 #include <linux/scatterlist.h> 15 15 #include <crypto/internal/hash.h> 16 - #include <crypto/sha.h> 16 + #include <crypto/sha1.h> 17 + #include <crypto/sha2.h> 17 18 #include <crypto/md5.h> 18 19 #include "sun8i-ss.h" 19 20
+2 -1
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
··· 15 15 #include <linux/crypto.h> 16 16 #include <crypto/internal/hash.h> 17 17 #include <crypto/md5.h> 18 - #include <crypto/sha.h> 18 + #include <crypto/sha1.h> 19 + #include <crypto/sha2.h> 19 20 20 21 #define SS_START 1 21 22
+1 -1
drivers/crypto/amcc/crypto4xx_alg.c
··· 20 20 #include <crypto/aead.h> 21 21 #include <crypto/aes.h> 22 22 #include <crypto/gcm.h> 23 - #include <crypto/sha.h> 23 + #include <crypto/sha1.h> 24 24 #include <crypto/ctr.h> 25 25 #include <crypto/skcipher.h> 26 26 #include "crypto4xx_reg_def.h"
+1 -1
drivers/crypto/amcc/crypto4xx_core.c
··· 30 30 #include <crypto/aes.h> 31 31 #include <crypto/ctr.h> 32 32 #include <crypto/gcm.h> 33 - #include <crypto/sha.h> 33 + #include <crypto/sha1.h> 34 34 #include <crypto/rng.h> 35 35 #include <crypto/scatterwalk.h> 36 36 #include <crypto/skcipher.h>
+2 -1
drivers/crypto/atmel-authenc.h
··· 16 16 17 17 #include <crypto/authenc.h> 18 18 #include <crypto/hash.h> 19 - #include <crypto/sha.h> 19 + #include <crypto/sha1.h> 20 + #include <crypto/sha2.h> 20 21 #include "atmel-sha-regs.h" 21 22 22 23 struct atmel_aes_dev;
+2 -1
drivers/crypto/atmel-sha.c
··· 33 33 #include <linux/crypto.h> 34 34 #include <crypto/scatterwalk.h> 35 35 #include <crypto/algapi.h> 36 - #include <crypto/sha.h> 36 + #include <crypto/sha1.h> 37 + #include <crypto/sha2.h> 37 38 #include <crypto/hash.h> 38 39 #include <crypto/internal/hash.h> 39 40 #include "atmel-sha-regs.h"
+2 -1
drivers/crypto/axis/artpec6_crypto.c
··· 28 28 #include <crypto/internal/hash.h> 29 29 #include <crypto/internal/skcipher.h> 30 30 #include <crypto/scatterwalk.h> 31 - #include <crypto/sha.h> 31 + #include <crypto/sha1.h> 32 + #include <crypto/sha2.h> 32 33 #include <crypto/xts.h> 33 34 34 35 /* Max length of a line in all cache levels for Artpec SoCs. */
+2 -1
drivers/crypto/bcm/cipher.c
··· 26 26 #include <crypto/aes.h> 27 27 #include <crypto/internal/des.h> 28 28 #include <crypto/hmac.h> 29 - #include <crypto/sha.h> 30 29 #include <crypto/md5.h> 31 30 #include <crypto/authenc.h> 32 31 #include <crypto/skcipher.h> 33 32 #include <crypto/hash.h> 33 + #include <crypto/sha1.h> 34 + #include <crypto/sha2.h> 34 35 #include <crypto/sha3.h> 35 36 36 37 #include "util.h"
+2 -1
drivers/crypto/bcm/cipher.h
··· 16 16 #include <crypto/aead.h> 17 17 #include <crypto/arc4.h> 18 18 #include <crypto/gcm.h> 19 - #include <crypto/sha.h> 19 + #include <crypto/sha1.h> 20 + #include <crypto/sha2.h> 20 21 #include <crypto/sha3.h> 21 22 22 23 #include "spu.h"
+2 -1
drivers/crypto/bcm/spu.h
··· 17 17 18 18 #include <linux/types.h> 19 19 #include <linux/scatterlist.h> 20 - #include <crypto/sha.h> 20 + #include <crypto/sha1.h> 21 + #include <crypto/sha2.h> 21 22 22 23 enum spu_cipher_alg { 23 24 CIPHER_ALG_NONE = 0x0,
+2 -1
drivers/crypto/caam/compat.h
··· 34 34 #include <crypto/ctr.h> 35 35 #include <crypto/internal/des.h> 36 36 #include <crypto/gcm.h> 37 - #include <crypto/sha.h> 37 + #include <crypto/sha1.h> 38 + #include <crypto/sha2.h> 38 39 #include <crypto/md5.h> 39 40 #include <crypto/chacha.h> 40 41 #include <crypto/poly1305.h>
-1
drivers/crypto/cavium/nitrox/nitrox_aead.c
··· 7 7 #include <crypto/aead.h> 8 8 #include <crypto/authenc.h> 9 9 #include <crypto/des.h> 10 - #include <crypto/sha.h> 11 10 #include <crypto/internal/aead.h> 12 11 #include <crypto/scatterwalk.h> 13 12 #include <crypto/gcm.h>
+2 -1
drivers/crypto/ccp/ccp-crypto-sha.c
··· 17 17 #include <crypto/hash.h> 18 18 #include <crypto/hmac.h> 19 19 #include <crypto/internal/hash.h> 20 - #include <crypto/sha.h> 20 + #include <crypto/sha1.h> 21 + #include <crypto/sha2.h> 21 22 #include <crypto/scatterwalk.h> 22 23 #include <linux/string.h> 23 24
+2 -1
drivers/crypto/ccp/ccp-crypto.h
··· 19 19 #include <crypto/aead.h> 20 20 #include <crypto/ctr.h> 21 21 #include <crypto/hash.h> 22 - #include <crypto/sha.h> 22 + #include <crypto/sha1.h> 23 + #include <crypto/sha2.h> 23 24 #include <crypto/akcipher.h> 24 25 #include <crypto/skcipher.h> 25 26 #include <crypto/internal/rsa.h>
+2 -1
drivers/crypto/ccree/cc_driver.h
··· 17 17 #include <crypto/algapi.h> 18 18 #include <crypto/internal/skcipher.h> 19 19 #include <crypto/aes.h> 20 - #include <crypto/sha.h> 20 + #include <crypto/sha1.h> 21 + #include <crypto/sha2.h> 21 22 #include <crypto/aead.h> 22 23 #include <crypto/authenc.h> 23 24 #include <crypto/hash.h>
+2 -1
drivers/crypto/chelsio/chcr_algo.c
··· 53 53 #include <crypto/algapi.h> 54 54 #include <crypto/hash.h> 55 55 #include <crypto/gcm.h> 56 - #include <crypto/sha.h> 56 + #include <crypto/sha1.h> 57 + #include <crypto/sha2.h> 57 58 #include <crypto/authenc.h> 58 59 #include <crypto/ctr.h> 59 60 #include <crypto/gf128mul.h>
+2 -1
drivers/crypto/hisilicon/sec2/sec_crypto.c
··· 7 7 #include <crypto/des.h> 8 8 #include <crypto/hash.h> 9 9 #include <crypto/internal/aead.h> 10 - #include <crypto/sha.h> 10 + #include <crypto/sha1.h> 11 + #include <crypto/sha2.h> 11 12 #include <crypto/skcipher.h> 12 13 #include <crypto/xts.h> 13 14 #include <linux/crypto.h>
+2 -1
drivers/crypto/img-hash.c
··· 19 19 20 20 #include <crypto/internal/hash.h> 21 21 #include <crypto/md5.h> 22 - #include <crypto/sha.h> 22 + #include <crypto/sha1.h> 23 + #include <crypto/sha2.h> 23 24 24 25 #define CR_RESET 0 25 26 #define CR_RESET_SET 1
+2 -1
drivers/crypto/inside-secure/safexcel.h
··· 11 11 #include <crypto/aead.h> 12 12 #include <crypto/algapi.h> 13 13 #include <crypto/internal/hash.h> 14 - #include <crypto/sha.h> 14 + #include <crypto/sha1.h> 15 + #include <crypto/sha2.h> 15 16 #include <crypto/sha3.h> 16 17 #include <crypto/skcipher.h> 17 18 #include <linux/types.h>
+2 -1
drivers/crypto/inside-secure/safexcel_cipher.c
··· 18 18 #include <crypto/gcm.h> 19 19 #include <crypto/ghash.h> 20 20 #include <crypto/poly1305.h> 21 - #include <crypto/sha.h> 21 + #include <crypto/sha1.h> 22 + #include <crypto/sha2.h> 22 23 #include <crypto/sm3.h> 23 24 #include <crypto/sm4.h> 24 25 #include <crypto/xts.h>
+2 -1
drivers/crypto/inside-secure/safexcel_hash.c
··· 8 8 #include <crypto/aes.h> 9 9 #include <crypto/hmac.h> 10 10 #include <crypto/md5.h> 11 - #include <crypto/sha.h> 11 + #include <crypto/sha1.h> 12 + #include <crypto/sha2.h> 12 13 #include <crypto/sha3.h> 13 14 #include <crypto/skcipher.h> 14 15 #include <crypto/sm3.h>
+1 -1
drivers/crypto/ixp4xx_crypto.c
··· 20 20 #include <crypto/internal/des.h> 21 21 #include <crypto/aes.h> 22 22 #include <crypto/hmac.h> 23 - #include <crypto/sha.h> 23 + #include <crypto/sha1.h> 24 24 #include <crypto/algapi.h> 25 25 #include <crypto/internal/aead.h> 26 26 #include <crypto/internal/skcipher.h>
+2 -1
drivers/crypto/marvell/cesa/hash.c
··· 11 11 12 12 #include <crypto/hmac.h> 13 13 #include <crypto/md5.h> 14 - #include <crypto/sha.h> 14 + #include <crypto/sha1.h> 15 + #include <crypto/sha2.h> 15 16 #include <linux/device.h> 16 17 #include <linux/dma-mapping.h> 17 18
+2 -1
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
··· 13 13 #include <crypto/cryptd.h> 14 14 #include <crypto/des.h> 15 15 #include <crypto/internal/aead.h> 16 - #include <crypto/sha.h> 16 + #include <crypto/sha1.h> 17 + #include <crypto/sha2.h> 17 18 #include <crypto/xts.h> 18 19 #include <crypto/scatterwalk.h> 19 20 #include <linux/rtnetlink.h>
+2 -1
drivers/crypto/mediatek/mtk-sha.c
··· 10 10 */ 11 11 12 12 #include <crypto/hmac.h> 13 - #include <crypto/sha.h> 13 + #include <crypto/sha1.h> 14 + #include <crypto/sha2.h> 14 15 #include "mtk-platform.h" 15 16 16 17 #define SHA_ALIGN_MSK (sizeof(u32) - 1)
+2 -1
drivers/crypto/mxs-dcp.c
··· 17 17 #include <linux/clk.h> 18 18 19 19 #include <crypto/aes.h> 20 - #include <crypto/sha.h> 20 + #include <crypto/sha1.h> 21 + #include <crypto/sha2.h> 21 22 #include <crypto/internal/hash.h> 22 23 #include <crypto/internal/skcipher.h> 23 24 #include <crypto/scatterwalk.h>
+2 -1
drivers/crypto/n2_core.c
··· 15 15 #include <linux/interrupt.h> 16 16 #include <linux/crypto.h> 17 17 #include <crypto/md5.h> 18 - #include <crypto/sha.h> 18 + #include <crypto/sha1.h> 19 + #include <crypto/sha2.h> 19 20 #include <crypto/aes.h> 20 21 #include <crypto/internal/des.h> 21 22 #include <linux/mutex.h>
+1 -1
drivers/crypto/nx/nx-sha256.c
··· 8 8 */ 9 9 10 10 #include <crypto/internal/hash.h> 11 - #include <crypto/sha.h> 11 + #include <crypto/sha2.h> 12 12 #include <linux/module.h> 13 13 #include <asm/vio.h> 14 14 #include <asm/byteorder.h>
+1 -1
drivers/crypto/nx/nx-sha512.c
··· 8 8 */ 9 9 10 10 #include <crypto/internal/hash.h> 11 - #include <crypto/sha.h> 11 + #include <crypto/sha2.h> 12 12 #include <linux/module.h> 13 13 #include <asm/vio.h> 14 14
+1 -1
drivers/crypto/nx/nx.c
··· 10 10 #include <crypto/internal/aead.h> 11 11 #include <crypto/internal/hash.h> 12 12 #include <crypto/aes.h> 13 - #include <crypto/sha.h> 13 + #include <crypto/sha2.h> 14 14 #include <crypto/algapi.h> 15 15 #include <crypto/scatterwalk.h> 16 16 #include <linux/module.h>
+2 -1
drivers/crypto/omap-sham.c
··· 35 35 #include <linux/crypto.h> 36 36 #include <crypto/scatterwalk.h> 37 37 #include <crypto/algapi.h> 38 - #include <crypto/sha.h> 38 + #include <crypto/sha1.h> 39 + #include <crypto/sha2.h> 39 40 #include <crypto/hash.h> 40 41 #include <crypto/hmac.h> 41 42 #include <crypto/internal/hash.h>
+2 -1
drivers/crypto/padlock-sha.c
··· 9 9 10 10 #include <crypto/internal/hash.h> 11 11 #include <crypto/padlock.h> 12 - #include <crypto/sha.h> 12 + #include <crypto/sha1.h> 13 + #include <crypto/sha2.h> 13 14 #include <linux/err.h> 14 15 #include <linux/module.h> 15 16 #include <linux/init.h>
+2 -1
drivers/crypto/picoxcell_crypto.c
··· 8 8 #include <crypto/authenc.h> 9 9 #include <crypto/internal/des.h> 10 10 #include <crypto/md5.h> 11 - #include <crypto/sha.h> 11 + #include <crypto/sha1.h> 12 + #include <crypto/sha2.h> 12 13 #include <crypto/internal/skcipher.h> 13 14 #include <linux/clk.h> 14 15 #include <linux/crypto.h>
+2 -1
drivers/crypto/qat/qat_common/qat_algs.c
··· 6 6 #include <crypto/internal/aead.h> 7 7 #include <crypto/internal/skcipher.h> 8 8 #include <crypto/aes.h> 9 - #include <crypto/sha.h> 9 + #include <crypto/sha1.h> 10 + #include <crypto/sha2.h> 10 11 #include <crypto/hash.h> 11 12 #include <crypto/hmac.h> 12 13 #include <crypto/algapi.h>
+2 -1
drivers/crypto/qce/common.c
··· 7 7 #include <linux/interrupt.h> 8 8 #include <linux/types.h> 9 9 #include <crypto/scatterwalk.h> 10 - #include <crypto/sha.h> 10 + #include <crypto/sha1.h> 11 + #include <crypto/sha2.h> 11 12 12 13 #include "cipher.h" 13 14 #include "common.h"
-1
drivers/crypto/qce/core.c
··· 13 13 #include <linux/types.h> 14 14 #include <crypto/algapi.h> 15 15 #include <crypto/internal/hash.h> 16 - #include <crypto/sha.h> 17 16 18 17 #include "core.h" 19 18 #include "cipher.h"
+2 -1
drivers/crypto/qce/sha.h
··· 7 7 #define _SHA_H_ 8 8 9 9 #include <crypto/scatterwalk.h> 10 - #include <crypto/sha.h> 10 + #include <crypto/sha1.h> 11 + #include <crypto/sha2.h> 11 12 12 13 #include "common.h" 13 14 #include "core.h"
+2 -1
drivers/crypto/rockchip/rk3288_crypto.h
··· 12 12 #include <crypto/internal/skcipher.h> 13 13 14 14 #include <crypto/md5.h> 15 - #include <crypto/sha.h> 15 + #include <crypto/sha1.h> 16 + #include <crypto/sha2.h> 16 17 17 18 #define _SBF(v, f) ((v) << (f)) 18 19
+2 -1
drivers/crypto/s5p-sss.c
··· 30 30 31 31 #include <crypto/hash.h> 32 32 #include <crypto/md5.h> 33 - #include <crypto/sha.h> 33 + #include <crypto/sha1.h> 34 + #include <crypto/sha2.h> 34 35 #include <crypto/internal/hash.h> 35 36 36 37 #define _SBF(s, v) ((v) << (s))
+2 -1
drivers/crypto/sa2ul.c
··· 25 25 #include <crypto/internal/hash.h> 26 26 #include <crypto/internal/skcipher.h> 27 27 #include <crypto/scatterwalk.h> 28 - #include <crypto/sha.h> 28 + #include <crypto/sha1.h> 29 + #include <crypto/sha2.h> 29 30 30 31 #include "sa2ul.h" 31 32
+2 -1
drivers/crypto/sa2ul.h
··· 13 13 #define _K3_SA2UL_ 14 14 15 15 #include <crypto/aes.h> 16 - #include <crypto/sha.h> 16 + #include <crypto/sha1.h> 17 + #include <crypto/sha2.h> 17 18 18 19 #define SA_ENGINE_ENABLE_CONTROL 0x1000 19 20
+2 -1
drivers/crypto/sahara.c
··· 15 15 #include <crypto/internal/hash.h> 16 16 #include <crypto/internal/skcipher.h> 17 17 #include <crypto/scatterwalk.h> 18 - #include <crypto/sha.h> 18 + #include <crypto/sha1.h> 19 + #include <crypto/sha2.h> 19 20 20 21 #include <linux/clk.h> 21 22 #include <linux/dma-mapping.h>
+2 -1
drivers/crypto/stm32/stm32-hash.c
··· 25 25 #include <crypto/hash.h> 26 26 #include <crypto/md5.h> 27 27 #include <crypto/scatterwalk.h> 28 - #include <crypto/sha.h> 28 + #include <crypto/sha1.h> 29 + #include <crypto/sha2.h> 29 30 #include <crypto/internal/hash.h> 30 31 31 32 #define HASH_CR 0x00
+2 -1
drivers/crypto/talitos.c
··· 31 31 #include <crypto/algapi.h> 32 32 #include <crypto/aes.h> 33 33 #include <crypto/internal/des.h> 34 - #include <crypto/sha.h> 34 + #include <crypto/sha1.h> 35 + #include <crypto/sha2.h> 35 36 #include <crypto/md5.h> 36 37 #include <crypto/internal/aead.h> 37 38 #include <crypto/authenc.h>
+2 -1
drivers/crypto/ux500/hash/hash_core.c
··· 31 31 #include <linux/bitops.h> 32 32 33 33 #include <crypto/internal/hash.h> 34 - #include <crypto/sha.h> 34 + #include <crypto/sha1.h> 35 + #include <crypto/sha2.h> 35 36 #include <crypto/scatterwalk.h> 36 37 #include <crypto/algapi.h> 37 38
+1 -1
drivers/firmware/efi/embedded-firmware.c
··· 12 12 #include <linux/slab.h> 13 13 #include <linux/types.h> 14 14 #include <linux/vmalloc.h> 15 - #include <crypto/sha.h> 15 + #include <crypto/sha2.h> 16 16 17 17 /* Exported for use by lib/test_firmware.c only */ 18 18 LIST_HEAD(efi_embedded_fw_list);
+2 -1
drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c
··· 51 51 #include <crypto/aes.h> 52 52 #include <crypto/algapi.h> 53 53 #include <crypto/hash.h> 54 - #include <crypto/sha.h> 54 + #include <crypto/sha1.h> 55 + #include <crypto/sha2.h> 55 56 #include <crypto/authenc.h> 56 57 #include <crypto/internal/aead.h> 57 58 #include <crypto/null.h>
+2 -1
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h
··· 9 9 #include <crypto/aes.h> 10 10 #include <crypto/algapi.h> 11 11 #include <crypto/hash.h> 12 - #include <crypto/sha.h> 12 + #include <crypto/sha1.h> 13 + #include <crypto/sha2.h> 13 14 #include <crypto/authenc.h> 14 15 #include <crypto/ctr.h> 15 16 #include <crypto/gf128mul.h>
+1 -1
drivers/nfc/s3fwrn5/firmware.c
··· 9 9 #include <linux/completion.h> 10 10 #include <linux/firmware.h> 11 11 #include <crypto/hash.h> 12 - #include <crypto/sha.h> 12 + #include <crypto/sha1.h> 13 13 14 14 #include "s3fwrn5.h" 15 15 #include "firmware.h"
+1 -1
drivers/tee/tee_core.c
··· 14 14 #include <linux/tee_drv.h> 15 15 #include <linux/uaccess.h> 16 16 #include <crypto/hash.h> 17 - #include <crypto/sha.h> 17 + #include <crypto/sha1.h> 18 18 #include "tee_private.h" 19 19 20 20 #define TEE_NUM_DEVICES 32
+1 -1
fs/crypto/fname.c
··· 14 14 #include <linux/namei.h> 15 15 #include <linux/scatterlist.h> 16 16 #include <crypto/hash.h> 17 - #include <crypto/sha.h> 17 + #include <crypto/sha2.h> 18 18 #include <crypto/skcipher.h> 19 19 #include "fscrypt_private.h" 20 20
+1 -1
fs/crypto/hkdf.c
··· 10 10 */ 11 11 12 12 #include <crypto/hash.h> 13 - #include <crypto/sha.h> 13 + #include <crypto/sha2.h> 14 14 15 15 #include "fscrypt_private.h" 16 16
-1
fs/ubifs/auth.c
··· 12 12 #include <linux/crypto.h> 13 13 #include <linux/verification.h> 14 14 #include <crypto/hash.h> 15 - #include <crypto/sha.h> 16 15 #include <crypto/algapi.h> 17 16 #include <keys/user-type.h> 18 17 #include <keys/asymmetric-type.h>
+1 -1
fs/verity/fsverity_private.h
··· 14 14 15 15 #define pr_fmt(fmt) "fs-verity: " fmt 16 16 17 - #include <crypto/sha.h> 17 + #include <crypto/sha2.h> 18 18 #include <linux/fsverity.h> 19 19 #include <linux/mempool.h> 20 20
+2 -1
include/crypto/hash_info.h
··· 8 8 #ifndef _CRYPTO_HASH_INFO_H 9 9 #define _CRYPTO_HASH_INFO_H 10 10 11 - #include <crypto/sha.h> 11 + #include <crypto/sha1.h> 12 + #include <crypto/sha2.h> 12 13 #include <crypto/md5.h> 13 14 #include <crypto/streebog.h> 14 15
+4 -37
include/crypto/sha.h include/crypto/sha2.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* 3 - * Common values for SHA algorithms 3 + * Common values for SHA-2 algorithms 4 4 */ 5 5 6 - #ifndef _CRYPTO_SHA_H 7 - #define _CRYPTO_SHA_H 6 + #ifndef _CRYPTO_SHA2_H 7 + #define _CRYPTO_SHA2_H 8 8 9 9 #include <linux/types.h> 10 - 11 - #define SHA1_DIGEST_SIZE 20 12 - #define SHA1_BLOCK_SIZE 64 13 10 14 11 #define SHA224_DIGEST_SIZE 28 15 12 #define SHA224_BLOCK_SIZE 64 ··· 19 22 20 23 #define SHA512_DIGEST_SIZE 64 21 24 #define SHA512_BLOCK_SIZE 128 22 - 23 - #define SHA1_H0 0x67452301UL 24 - #define SHA1_H1 0xefcdab89UL 25 - #define SHA1_H2 0x98badcfeUL 26 - #define SHA1_H3 0x10325476UL 27 - #define SHA1_H4 0xc3d2e1f0UL 28 25 29 26 #define SHA224_H0 0xc1059ed8UL 30 27 #define SHA224_H1 0x367cd507UL ··· 56 65 #define SHA512_H6 0x1f83d9abfb41bd6bULL 57 66 #define SHA512_H7 0x5be0cd19137e2179ULL 58 67 59 - extern const u8 sha1_zero_message_hash[SHA1_DIGEST_SIZE]; 60 - 61 68 extern const u8 sha224_zero_message_hash[SHA224_DIGEST_SIZE]; 62 69 63 70 extern const u8 sha256_zero_message_hash[SHA256_DIGEST_SIZE]; ··· 63 74 extern const u8 sha384_zero_message_hash[SHA384_DIGEST_SIZE]; 64 75 65 76 extern const u8 sha512_zero_message_hash[SHA512_DIGEST_SIZE]; 66 - 67 - struct sha1_state { 68 - u32 state[SHA1_DIGEST_SIZE / 4]; 69 - u64 count; 70 - u8 buffer[SHA1_BLOCK_SIZE]; 71 - }; 72 77 73 78 struct sha256_state { 74 79 u32 state[SHA256_DIGEST_SIZE / 4]; ··· 78 95 79 96 struct shash_desc; 80 97 81 - extern int crypto_sha1_update(struct shash_desc *desc, const u8 *data, 82 - unsigned int len); 83 - 84 - extern int crypto_sha1_finup(struct shash_desc *desc, const u8 *data, 85 - unsigned int len, u8 *hash); 86 - 87 98 extern int crypto_sha256_update(struct shash_desc *desc, const u8 *data, 88 99 unsigned int len); 89 100 ··· 89 112 90 113 extern int crypto_sha512_finup(struct shash_desc *desc, const u8 *data, 91 114 unsigned int len, u8 *hash); 92 - 93 - /* 94 - * An implementation of SHA-1's compression function. Don't use in new code! 95 - * You shouldn't be using SHA-1, and even if you *have* to use SHA-1, this isn't 96 - * the correct way to hash something with SHA-1 (use crypto_shash instead). 97 - */ 98 - #define SHA1_DIGEST_WORDS (SHA1_DIGEST_SIZE / 4) 99 - #define SHA1_WORKSPACE_WORDS 16 100 - void sha1_init(__u32 *buf); 101 - void sha1_transform(__u32 *digest, const char *data, __u32 *W); 102 115 103 116 /* 104 117 * Stand-alone implementation of the SHA256 algorithm. It is designed to ··· 131 164 void sha224_update(struct sha256_state *sctx, const u8 *data, unsigned int len); 132 165 void sha224_final(struct sha256_state *sctx, u8 *out); 133 166 134 - #endif 167 + #endif /* _CRYPTO_SHA2_H */
+46
include/crypto/sha1.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Common values for SHA-1 algorithms 4 + */ 5 + 6 + #ifndef _CRYPTO_SHA1_H 7 + #define _CRYPTO_SHA1_H 8 + 9 + #include <linux/types.h> 10 + 11 + #define SHA1_DIGEST_SIZE 20 12 + #define SHA1_BLOCK_SIZE 64 13 + 14 + #define SHA1_H0 0x67452301UL 15 + #define SHA1_H1 0xefcdab89UL 16 + #define SHA1_H2 0x98badcfeUL 17 + #define SHA1_H3 0x10325476UL 18 + #define SHA1_H4 0xc3d2e1f0UL 19 + 20 + extern const u8 sha1_zero_message_hash[SHA1_DIGEST_SIZE]; 21 + 22 + struct sha1_state { 23 + u32 state[SHA1_DIGEST_SIZE / 4]; 24 + u64 count; 25 + u8 buffer[SHA1_BLOCK_SIZE]; 26 + }; 27 + 28 + struct shash_desc; 29 + 30 + extern int crypto_sha1_update(struct shash_desc *desc, const u8 *data, 31 + unsigned int len); 32 + 33 + extern int crypto_sha1_finup(struct shash_desc *desc, const u8 *data, 34 + unsigned int len, u8 *hash); 35 + 36 + /* 37 + * An implementation of SHA-1's compression function. Don't use in new code! 38 + * You shouldn't be using SHA-1, and even if you *have* to use SHA-1, this isn't 39 + * the correct way to hash something with SHA-1 (use crypto_shash instead). 40 + */ 41 + #define SHA1_DIGEST_WORDS (SHA1_DIGEST_SIZE / 4) 42 + #define SHA1_WORKSPACE_WORDS 16 43 + void sha1_init(__u32 *buf); 44 + void sha1_transform(__u32 *digest, const char *data, __u32 *W); 45 + 46 + #endif /* _CRYPTO_SHA1_H */
+1 -1
include/crypto/sha1_base.h
··· 9 9 #define _CRYPTO_SHA1_BASE_H 10 10 11 11 #include <crypto/internal/hash.h> 12 - #include <crypto/sha.h> 12 + #include <crypto/sha1.h> 13 13 #include <linux/crypto.h> 14 14 #include <linux/module.h> 15 15 #include <linux/string.h>
+1 -1
include/crypto/sha256_base.h
··· 9 9 #define _CRYPTO_SHA256_BASE_H 10 10 11 11 #include <crypto/internal/hash.h> 12 - #include <crypto/sha.h> 12 + #include <crypto/sha2.h> 13 13 #include <linux/crypto.h> 14 14 #include <linux/module.h> 15 15 #include <linux/string.h>
+1 -1
include/crypto/sha512_base.h
··· 9 9 #define _CRYPTO_SHA512_BASE_H 10 10 11 11 #include <crypto/internal/hash.h> 12 - #include <crypto/sha.h> 12 + #include <crypto/sha2.h> 13 13 #include <linux/crypto.h> 14 14 #include <linux/module.h> 15 15 #include <linux/string.h>
+2 -1
include/linux/ccp.h
··· 15 15 #include <linux/workqueue.h> 16 16 #include <linux/list.h> 17 17 #include <crypto/aes.h> 18 - #include <crypto/sha.h> 18 + #include <crypto/sha1.h> 19 + #include <crypto/sha2.h> 19 20 20 21 struct ccp_device; 21 22 struct ccp_cmd;
+1 -1
include/linux/filter.h
··· 21 21 #include <linux/if_vlan.h> 22 22 #include <linux/vmalloc.h> 23 23 #include <linux/sockptr.h> 24 - #include <crypto/sha.h> 24 + #include <crypto/sha1.h> 25 25 26 26 #include <net/sch_generic.h> 27 27
+1 -1
include/linux/purgatory.h
··· 3 3 #define _LINUX_PURGATORY_H 4 4 5 5 #include <linux/types.h> 6 - #include <crypto/sha.h> 6 + #include <crypto/sha2.h> 7 7 #include <uapi/linux/kexec.h> 8 8 9 9 struct kexec_sha_region {
+1 -1
kernel/crash_core.c
··· 11 11 #include <asm/page.h> 12 12 #include <asm/sections.h> 13 13 14 - #include <crypto/sha.h> 14 + #include <crypto/sha1.h> 15 15 16 16 /* vmcoreinfo stuff */ 17 17 unsigned char *vmcoreinfo_data;
-1
kernel/kexec_core.c
··· 42 42 #include <asm/sections.h> 43 43 44 44 #include <crypto/hash.h> 45 - #include <crypto/sha.h> 46 45 #include "kexec_internal.h" 47 46 48 47 DEFINE_MUTEX(kexec_mutex);
+1 -1
kernel/kexec_file.c
··· 20 20 #include <linux/fs.h> 21 21 #include <linux/ima.h> 22 22 #include <crypto/hash.h> 23 - #include <crypto/sha.h> 23 + #include <crypto/sha2.h> 24 24 #include <linux/elf.h> 25 25 #include <linux/elfcore.h> 26 26 #include <linux/kernel.h>
+1 -1
lib/crypto/sha256.c
··· 15 15 #include <linux/export.h> 16 16 #include <linux/module.h> 17 17 #include <linux/string.h> 18 - #include <crypto/sha.h> 18 + #include <crypto/sha2.h> 19 19 #include <asm/unaligned.h> 20 20 21 21 static const u32 SHA256_K[] = {
+1 -1
lib/digsig.c
··· 20 20 #include <linux/key.h> 21 21 #include <linux/crypto.h> 22 22 #include <crypto/hash.h> 23 - #include <crypto/sha.h> 23 + #include <crypto/sha1.h> 24 24 #include <keys/user-type.h> 25 25 #include <linux/mpi.h> 26 26 #include <linux/digsig.h>
+1 -1
lib/sha1.c
··· 9 9 #include <linux/kernel.h> 10 10 #include <linux/export.h> 11 11 #include <linux/bitops.h> 12 - #include <crypto/sha.h> 12 + #include <crypto/sha1.h> 13 13 #include <asm/unaligned.h> 14 14 15 15 /*
-1
net/ipv6/seg6_hmac.c
··· 35 35 #include <net/xfrm.h> 36 36 37 37 #include <crypto/hash.h> 38 - #include <crypto/sha.h> 39 38 #include <net/seg6.h> 40 39 #include <net/genetlink.h> 41 40 #include <net/seg6_hmac.h>
+1 -1
net/mptcp/crypto.c
··· 21 21 */ 22 22 23 23 #include <linux/kernel.h> 24 - #include <crypto/sha.h> 24 + #include <crypto/sha2.h> 25 25 #include <asm/unaligned.h> 26 26 27 27 #include "protocol.h"
+1 -1
net/mptcp/options.c
··· 7 7 #define pr_fmt(fmt) "MPTCP: " fmt 8 8 9 9 #include <linux/kernel.h> 10 - #include <crypto/sha.h> 10 + #include <crypto/sha2.h> 11 11 #include <net/tcp.h> 12 12 #include <net/mptcp.h> 13 13 #include "protocol.h"
+1 -1
net/mptcp/subflow.c
··· 10 10 #include <linux/module.h> 11 11 #include <linux/netdevice.h> 12 12 #include <crypto/algapi.h> 13 - #include <crypto/sha.h> 13 + #include <crypto/sha2.h> 14 14 #include <net/sock.h> 15 15 #include <net/inet_common.h> 16 16 #include <net/inet_hashtables.h>
+1 -1
security/integrity/integrity.h
··· 14 14 15 15 #include <linux/types.h> 16 16 #include <linux/integrity.h> 17 - #include <crypto/sha.h> 17 + #include <crypto/sha1.h> 18 18 #include <linux/key.h> 19 19 #include <linux/audit.h> 20 20
+1 -1
security/keys/encrypted-keys/encrypted.c
··· 29 29 #include <crypto/aes.h> 30 30 #include <crypto/algapi.h> 31 31 #include <crypto/hash.h> 32 - #include <crypto/sha.h> 32 + #include <crypto/sha2.h> 33 33 #include <crypto/skcipher.h> 34 34 35 35 #include "encrypted.h"
+1 -1
security/keys/trusted-keys/trusted_tpm1.c
··· 22 22 #include <linux/rcupdate.h> 23 23 #include <linux/crypto.h> 24 24 #include <crypto/hash.h> 25 - #include <crypto/sha.h> 25 + #include <crypto/sha1.h> 26 26 #include <linux/capability.h> 27 27 #include <linux/tpm.h> 28 28 #include <linux/tpm_command.h>
+1 -1
sound/soc/codecs/cros_ec_codec.c
··· 8 8 * EC for audio function. 9 9 */ 10 10 11 - #include <crypto/sha.h> 11 + #include <crypto/sha2.h> 12 12 #include <linux/acpi.h> 13 13 #include <linux/delay.h> 14 14 #include <linux/device.h>