Browse Source

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>
master
Eric Biggers 6 months ago
committed by Herbert Xu
parent
commit
a24d22b225
120 changed files with 205 additions and 155 deletions
  1. +1
    -1
      arch/arm/crypto/sha1-ce-glue.c
  2. +1
    -1
      arch/arm/crypto/sha1.h
  3. +1
    -1
      arch/arm/crypto/sha1_glue.c
  4. +1
    -1
      arch/arm/crypto/sha1_neon_glue.c
  5. +1
    -1
      arch/arm/crypto/sha2-ce-glue.c
  6. +1
    -1
      arch/arm/crypto/sha256_glue.c
  7. +1
    -1
      arch/arm/crypto/sha256_neon_glue.c
  8. +1
    -1
      arch/arm/crypto/sha512-glue.c
  9. +1
    -1
      arch/arm/crypto/sha512-neon-glue.c
  10. +1
    -1
      arch/arm64/crypto/aes-glue.c
  11. +1
    -1
      arch/arm64/crypto/sha1-ce-glue.c
  12. +1
    -1
      arch/arm64/crypto/sha2-ce-glue.c
  13. +1
    -1
      arch/arm64/crypto/sha256-glue.c
  14. +1
    -1
      arch/arm64/crypto/sha512-ce-glue.c
  15. +1
    -1
      arch/arm64/crypto/sha512-glue.c
  16. +1
    -1
      arch/mips/cavium-octeon/crypto/octeon-sha1.c
  17. +1
    -1
      arch/mips/cavium-octeon/crypto/octeon-sha256.c
  18. +1
    -1
      arch/mips/cavium-octeon/crypto/octeon-sha512.c
  19. +1
    -1
      arch/powerpc/crypto/sha1-spe-glue.c
  20. +1
    -1
      arch/powerpc/crypto/sha1.c
  21. +1
    -1
      arch/powerpc/crypto/sha256-spe-glue.c
  22. +2
    -1
      arch/s390/crypto/sha.h
  23. +1
    -1
      arch/s390/crypto/sha1_s390.c
  24. +1
    -1
      arch/s390/crypto/sha256_s390.c
  25. +0
    -1
      arch/s390/crypto/sha3_256_s390.c
  26. +0
    -1
      arch/s390/crypto/sha3_512_s390.c
  27. +1
    -1
      arch/s390/crypto/sha512_s390.c
  28. +1
    -1
      arch/s390/purgatory/purgatory.c
  29. +1
    -1
      arch/sparc/crypto/sha1_glue.c
  30. +1
    -1
      arch/sparc/crypto/sha256_glue.c
  31. +1
    -1
      arch/sparc/crypto/sha512_glue.c
  32. +1
    -1
      arch/x86/crypto/sha1_ssse3_glue.c
  33. +1
    -1
      arch/x86/crypto/sha256_ssse3_glue.c
  34. +1
    -1
      arch/x86/crypto/sha512_ssse3_glue.c
  35. +1
    -1
      arch/x86/purgatory/purgatory.c
  36. +1
    -1
      crypto/asymmetric_keys/asym_tpm.c
  37. +1
    -1
      crypto/sha1_generic.c
  38. +1
    -1
      crypto/sha256_generic.c
  39. +1
    -1
      crypto/sha512_generic.c
  40. +1
    -1
      drivers/char/random.c
  41. +1
    -1
      drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h
  42. +2
    -1
      drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
  43. +2
    -1
      drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
  44. +2
    -1
      drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
  45. +2
    -1
      drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h
  46. +1
    -1
      drivers/crypto/amcc/crypto4xx_alg.c
  47. +1
    -1
      drivers/crypto/amcc/crypto4xx_core.c
  48. +2
    -1
      drivers/crypto/atmel-authenc.h
  49. +2
    -1
      drivers/crypto/atmel-sha.c
  50. +2
    -1
      drivers/crypto/axis/artpec6_crypto.c
  51. +2
    -1
      drivers/crypto/bcm/cipher.c
  52. +2
    -1
      drivers/crypto/bcm/cipher.h
  53. +2
    -1
      drivers/crypto/bcm/spu.h
  54. +2
    -1
      drivers/crypto/caam/compat.h
  55. +0
    -1
      drivers/crypto/cavium/nitrox/nitrox_aead.c
  56. +2
    -1
      drivers/crypto/ccp/ccp-crypto-sha.c
  57. +2
    -1
      drivers/crypto/ccp/ccp-crypto.h
  58. +2
    -1
      drivers/crypto/ccree/cc_driver.h
  59. +2
    -1
      drivers/crypto/chelsio/chcr_algo.c
  60. +2
    -1
      drivers/crypto/hisilicon/sec2/sec_crypto.c
  61. +2
    -1
      drivers/crypto/img-hash.c
  62. +2
    -1
      drivers/crypto/inside-secure/safexcel.h
  63. +2
    -1
      drivers/crypto/inside-secure/safexcel_cipher.c
  64. +2
    -1
      drivers/crypto/inside-secure/safexcel_hash.c
  65. +1
    -1
      drivers/crypto/ixp4xx_crypto.c
  66. +2
    -1
      drivers/crypto/marvell/cesa/hash.c
  67. +2
    -1
      drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
  68. +2
    -1
      drivers/crypto/mediatek/mtk-sha.c
  69. +2
    -1
      drivers/crypto/mxs-dcp.c
  70. +2
    -1
      drivers/crypto/n2_core.c
  71. +1
    -1
      drivers/crypto/nx/nx-sha256.c
  72. +1
    -1
      drivers/crypto/nx/nx-sha512.c
  73. +1
    -1
      drivers/crypto/nx/nx.c
  74. +2
    -1
      drivers/crypto/omap-sham.c
  75. +2
    -1
      drivers/crypto/padlock-sha.c
  76. +2
    -1
      drivers/crypto/picoxcell_crypto.c
  77. +2
    -1
      drivers/crypto/qat/qat_common/qat_algs.c
  78. +2
    -1
      drivers/crypto/qce/common.c
  79. +0
    -1
      drivers/crypto/qce/core.c
  80. +2
    -1
      drivers/crypto/qce/sha.h
  81. +2
    -1
      drivers/crypto/rockchip/rk3288_crypto.h
  82. +2
    -1
      drivers/crypto/s5p-sss.c
  83. +2
    -1
      drivers/crypto/sa2ul.c
  84. +2
    -1
      drivers/crypto/sa2ul.h
  85. +2
    -1
      drivers/crypto/sahara.c
  86. +2
    -1
      drivers/crypto/stm32/stm32-hash.c
  87. +2
    -1
      drivers/crypto/talitos.c
  88. +2
    -1
      drivers/crypto/ux500/hash/hash_core.c
  89. +1
    -1
      drivers/firmware/efi/embedded-firmware.c
  90. +2
    -1
      drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c
  91. +2
    -1
      drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h
  92. +1
    -1
      drivers/nfc/s3fwrn5/firmware.c
  93. +1
    -1
      drivers/tee/tee_core.c
  94. +1
    -1
      fs/crypto/fname.c
  95. +1
    -1
      fs/crypto/hkdf.c
  96. +0
    -1
      fs/ubifs/auth.c
  97. +1
    -1
      fs/verity/fsverity_private.h
  98. +2
    -1
      include/crypto/hash_info.h
  99. +46
    -0
      include/crypto/sha1.h
  100. +1
    -1
      include/crypto/sha1_base.h

+ 1
- 1
arch/arm/crypto/sha1-ce-glue.c View File

@ -7,7 +7,7 @@
#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha1_base.h>
#include <linux/cpufeature.h>
#include <linux/crypto.h>


+ 1
- 1
arch/arm/crypto/sha1.h View File

@ -3,7 +3,7 @@
#define ASM_ARM_CRYPTO_SHA1_H
#include <linux/crypto.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
extern int sha1_update_arm(struct shash_desc *desc, const u8 *data,
unsigned int len);


+ 1
- 1
arch/arm/crypto/sha1_glue.c View File

@ -15,7 +15,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha1_base.h>
#include <asm/byteorder.h>


+ 1
- 1
arch/arm/crypto/sha1_neon_glue.c View File

@ -19,7 +19,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha1_base.h>
#include <asm/neon.h>
#include <asm/simd.h>


+ 1
- 1
arch/arm/crypto/sha2-ce-glue.c View File

@ -7,7 +7,7 @@
#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha256_base.h>
#include <linux/cpufeature.h>
#include <linux/crypto.h>


+ 1
- 1
arch/arm/crypto/sha256_glue.c View File

@ -17,7 +17,7 @@
#include <linux/mm.h>
#include <linux/types.h>
#include <linux/string.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha256_base.h>
#include <asm/simd.h>
#include <asm/neon.h>


+ 1
- 1
arch/arm/crypto/sha256_neon_glue.c View File

@ -13,7 +13,7 @@
#include <crypto/internal/simd.h>
#include <linux/types.h>
#include <linux/string.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha256_base.h>
#include <asm/byteorder.h>
#include <asm/simd.h>


+ 1
- 1
arch/arm/crypto/sha512-glue.c View File

@ -6,7 +6,7 @@
*/
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha512_base.h>
#include <linux/crypto.h>
#include <linux/module.h>


+ 1
- 1
arch/arm/crypto/sha512-neon-glue.c View File

@ -7,7 +7,7 @@
#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha512_base.h>
#include <linux/crypto.h>
#include <linux/module.h>


+ 1
- 1
arch/arm64/crypto/aes-glue.c View File

@ -10,7 +10,7 @@
#include <asm/simd.h>
#include <crypto/aes.h>
#include <crypto/ctr.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <crypto/internal/skcipher.h>


+ 1
- 1
arch/arm64/crypto/sha1-ce-glue.c View File

@ -10,7 +10,7 @@
#include <asm/unaligned.h>
#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha1_base.h>
#include <linux/cpufeature.h>
#include <linux/crypto.h>


+ 1
- 1
arch/arm64/crypto/sha2-ce-glue.c View File

@ -10,7 +10,7 @@
#include <asm/unaligned.h>
#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha256_base.h>
#include <linux/cpufeature.h>
#include <linux/crypto.h>


+ 1
- 1
arch/arm64/crypto/sha256-glue.c View File

@ -10,7 +10,7 @@
#include <asm/simd.h>
#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha256_base.h>
#include <linux/types.h>
#include <linux/string.h>


+ 1
- 1
arch/arm64/crypto/sha512-ce-glue.c View File

@ -14,7 +14,7 @@
#include <asm/unaligned.h>
#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha512_base.h>
#include <linux/cpufeature.h>
#include <linux/crypto.h>


+ 1
- 1
arch/arm64/crypto/sha512-glue.c View File

@ -8,7 +8,7 @@
#include <crypto/internal/hash.h>
#include <linux/types.h>
#include <linux/string.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha512_base.h>
#include <asm/neon.h>


+ 1
- 1
arch/mips/cavium-octeon/crypto/octeon-sha1.c View File

@ -14,7 +14,7 @@
*/
#include <linux/mm.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/module.h>


+ 1
- 1
arch/mips/cavium-octeon/crypto/octeon-sha256.c View File

@ -15,7 +15,7 @@
*/
#include <linux/mm.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/module.h>


+ 1
- 1
arch/mips/cavium-octeon/crypto/octeon-sha512.c View File

@ -14,7 +14,7 @@
*/
#include <linux/mm.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/module.h>


+ 1
- 1
arch/powerpc/crypto/sha1-spe-glue.c View File

@ -12,7 +12,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <asm/byteorder.h>
#include <asm/switch_to.h>
#include <linux/hardirq.h>


+ 1
- 1
arch/powerpc/crypto/sha1.c View File

@ -17,7 +17,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <asm/byteorder.h>
void powerpc_sha_transform(u32 *state, const u8 *src);


+ 1
- 1
arch/powerpc/crypto/sha256-spe-glue.c View File

@ -13,7 +13,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <asm/byteorder.h>
#include <asm/switch_to.h>
#include <linux/hardirq.h>


+ 2
- 1
arch/s390/crypto/sha.h View File

@ -11,7 +11,8 @@
#define _CRYPTO_ARCH_S390_SHA_H
#include <linux/crypto.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/sha3.h>
/* must be big enough for the largest SHA variant */


+ 1
- 1
arch/s390/crypto/sha1_s390.c View File

@ -22,7 +22,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/cpufeature.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <asm/cpacf.h>
#include "sha.h"


+ 1
- 1
arch/s390/crypto/sha256_s390.c View File

@ -12,7 +12,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/cpufeature.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <asm/cpacf.h>
#include "sha.h"


+ 0
- 1
arch/s390/crypto/sha3_256_s390.c View File

@ -12,7 +12,6 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/cpufeature.h>
#include <crypto/sha.h>
#include <crypto/sha3.h>
#include <asm/cpacf.h>


+ 0
- 1
arch/s390/crypto/sha3_512_s390.c View File

@ -11,7 +11,6 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/cpufeature.h>
#include <crypto/sha.h>
#include <crypto/sha3.h>
#include <asm/cpacf.h>


+ 1
- 1
arch/s390/crypto/sha512_s390.c View File

@ -8,7 +8,7 @@
* Author(s): Jan Glauber (jang@de.ibm.com)
*/
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/kernel.h>


+ 1
- 1
arch/s390/purgatory/purgatory.c View File

@ -9,7 +9,7 @@
#include <linux/kexec.h>
#include <linux/string.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <asm/purgatory.h>
int verify_sha256_digest(void)


+ 1
- 1
arch/sparc/crypto/sha1_glue.c View File

@ -16,7 +16,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <asm/pstate.h>
#include <asm/elf.h>


+ 1
- 1
arch/sparc/crypto/sha256_glue.c View File

@ -16,7 +16,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <asm/pstate.h>
#include <asm/elf.h>


+ 1
- 1
arch/sparc/crypto/sha512_glue.c View File

@ -15,7 +15,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <asm/pstate.h>
#include <asm/elf.h>


+ 1
- 1
arch/x86/crypto/sha1_ssse3_glue.c View File

@ -22,7 +22,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha1_base.h>
#include <asm/simd.h>


+ 1
- 1
arch/x86/crypto/sha256_ssse3_glue.c View File

@ -35,7 +35,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha256_base.h>
#include <linux/string.h>
#include <asm/simd.h>


+ 1
- 1
arch/x86/crypto/sha512_ssse3_glue.c View File

@ -34,7 +34,7 @@
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha512_base.h>
#include <asm/simd.h>


+ 1
- 1
arch/x86/purgatory/purgatory.c View File

@ -9,7 +9,7 @@
*/
#include <linux/bug.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <asm/purgatory.h>
#include "../boot/string.h"


+ 1
- 1
crypto/asymmetric_keys/asym_tpm.c View File

@ -10,7 +10,7 @@
#include <linux/tpm_command.h>
#include <crypto/akcipher.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <asm/unaligned.h>
#include <keys/asymmetric-subtype.h>
#include <keys/trusted_tpm.h>


+ 1
- 1
crypto/sha1_generic.c View File

@ -16,7 +16,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha1_base.h>
#include <asm/byteorder.h>


+ 1
- 1
crypto/sha256_generic.c View File

@ -12,7 +12,7 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha256_base.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>


+ 1
- 1
crypto/sha512_generic.c View File

@ -12,7 +12,7 @@
#include <linux/init.h>
#include <linux/crypto.h>
#include <linux/types.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/sha512_base.h>
#include <linux/percpu.h>
#include <asm/byteorder.h>


+ 1
- 1
drivers/char/random.c View File

@ -336,7 +336,7 @@
#include <linux/completion.h>
#include <linux/uuid.h>
#include <crypto/chacha.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <asm/processor.h>
#include <linux/uaccess.h>


+ 1
- 1
drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h View File

@ -25,7 +25,7 @@
#include <linux/pm_runtime.h>
#include <crypto/md5.h>
#include <crypto/skcipher.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/hash.h>
#include <crypto/internal/hash.h>
#include <crypto/internal/skcipher.h>


+ 2
- 1
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c View File

@ -13,7 +13,8 @@
#include <linux/pm_runtime.h>
#include <linux/scatterlist.h>
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/md5.h>
#include "sun8i-ce.h"


+ 2
- 1
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h View File

@ -16,7 +16,8 @@
#include <crypto/internal/hash.h>
#include <crypto/md5.h>
#include <crypto/rng.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
/* CE Registers */
#define CE_TDQ 0x00


+ 2
- 1
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c View File

@ -13,7 +13,8 @@
#include <linux/pm_runtime.h>
#include <linux/scatterlist.h>
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/md5.h>
#include "sun8i-ss.h"


+ 2
- 1
drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h View File

@ -15,7 +15,8 @@
#include <linux/crypto.h>
#include <crypto/internal/hash.h>
#include <crypto/md5.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#define SS_START 1


+ 1
- 1
drivers/crypto/amcc/crypto4xx_alg.c View File

@ -20,7 +20,7 @@
#include <crypto/aead.h>
#include <crypto/aes.h>
#include <crypto/gcm.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/ctr.h>
#include <crypto/skcipher.h>
#include "crypto4xx_reg_def.h"


+ 1
- 1
drivers/crypto/amcc/crypto4xx_core.c View File

@ -30,7 +30,7 @@
#include <crypto/aes.h>
#include <crypto/ctr.h>
#include <crypto/gcm.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/rng.h>
#include <crypto/scatterwalk.h>
#include <crypto/skcipher.h>


+ 2
- 1
drivers/crypto/atmel-authenc.h View File

@ -16,7 +16,8 @@
#include <crypto/authenc.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include "atmel-sha-regs.h"
struct atmel_aes_dev;


+ 2
- 1
drivers/crypto/atmel-sha.c View File

@ -33,7 +33,8 @@
#include <linux/crypto.h>
#include <crypto/scatterwalk.h>
#include <crypto/algapi.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/hash.h>
#include <crypto/internal/hash.h>
#include "atmel-sha-regs.h"


+ 2
- 1
drivers/crypto/axis/artpec6_crypto.c View File

@ -28,7 +28,8 @@
#include <crypto/internal/hash.h>
#include <crypto/internal/skcipher.h>
#include <crypto/scatterwalk.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/xts.h>
/* Max length of a line in all cache levels for Artpec SoCs. */


+ 2
- 1
drivers/crypto/bcm/cipher.c View File

@ -26,11 +26,12 @@
#include <crypto/aes.h>
#include <crypto/internal/des.h>
#include <crypto/hmac.h>
#include <crypto/sha.h>
#include <crypto/md5.h>
#include <crypto/authenc.h>
#include <crypto/skcipher.h>
#include <crypto/hash.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/sha3.h>
#include "util.h"


+ 2
- 1
drivers/crypto/bcm/cipher.h View File

@ -16,7 +16,8 @@
#include <crypto/aead.h>
#include <crypto/arc4.h>
#include <crypto/gcm.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/sha3.h>
#include "spu.h"


+ 2
- 1
drivers/crypto/bcm/spu.h View File

@ -17,7 +17,8 @@
#include <linux/types.h>
#include <linux/scatterlist.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
enum spu_cipher_alg {
CIPHER_ALG_NONE = 0x0,


+ 2
- 1
drivers/crypto/caam/compat.h View File

@ -34,7 +34,8 @@
#include <crypto/ctr.h>
#include <crypto/internal/des.h>
#include <crypto/gcm.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/md5.h>
#include <crypto/chacha.h>
#include <crypto/poly1305.h>


+ 0
- 1
drivers/crypto/cavium/nitrox/nitrox_aead.c View File

@ -7,7 +7,6 @@
#include <crypto/aead.h>
#include <crypto/authenc.h>
#include <crypto/des.h>
#include <crypto/sha.h>
#include <crypto/internal/aead.h>
#include <crypto/scatterwalk.h>
#include <crypto/gcm.h>


+ 2
- 1
drivers/crypto/ccp/ccp-crypto-sha.c View File

@ -17,7 +17,8 @@
#include <crypto/hash.h>
#include <crypto/hmac.h>
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/scatterwalk.h>
#include <linux/string.h>


+ 2
- 1
drivers/crypto/ccp/ccp-crypto.h View File

@ -19,7 +19,8 @@
#include <crypto/aead.h>
#include <crypto/ctr.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/akcipher.h>
#include <crypto/skcipher.h>
#include <crypto/internal/rsa.h>


+ 2
- 1
drivers/crypto/ccree/cc_driver.h View File

@ -17,7 +17,8 @@
#include <crypto/algapi.h>
#include <crypto/internal/skcipher.h>
#include <crypto/aes.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/aead.h>
#include <crypto/authenc.h>
#include <crypto/hash.h>


+ 2
- 1
drivers/crypto/chelsio/chcr_algo.c View File

@ -53,7 +53,8 @@
#include <crypto/algapi.h>
#include <crypto/hash.h>
#include <crypto/gcm.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/authenc.h>
#include <crypto/ctr.h>
#include <crypto/gf128mul.h>


+ 2
- 1
drivers/crypto/hisilicon/sec2/sec_crypto.c View File

@ -7,7 +7,8 @@
#include <crypto/des.h>
#include <crypto/hash.h>
#include <crypto/internal/aead.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/skcipher.h>
#include <crypto/xts.h>
#include <linux/crypto.h>


+ 2
- 1
drivers/crypto/img-hash.c View File

@ -19,7 +19,8 @@
#include <crypto/internal/hash.h>
#include <crypto/md5.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#define CR_RESET 0
#define CR_RESET_SET 1


+ 2
- 1
drivers/crypto/inside-secure/safexcel.h View File

@ -11,7 +11,8 @@
#include <crypto/aead.h>
#include <crypto/algapi.h>
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/sha3.h>
#include <crypto/skcipher.h>
#include <linux/types.h>


+ 2
- 1
drivers/crypto/inside-secure/safexcel_cipher.c View File

@ -18,7 +18,8 @@
#include <crypto/gcm.h>
#include <crypto/ghash.h>
#include <crypto/poly1305.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/sm3.h>
#include <crypto/sm4.h>
#include <crypto/xts.h>


+ 2
- 1
drivers/crypto/inside-secure/safexcel_hash.c View File

@ -8,7 +8,8 @@
#include <crypto/aes.h>
#include <crypto/hmac.h>
#include <crypto/md5.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/sha3.h>
#include <crypto/skcipher.h>
#include <crypto/sm3.h>


+ 1
- 1
drivers/crypto/ixp4xx_crypto.c View File

@ -20,7 +20,7 @@
#include <crypto/internal/des.h>
#include <crypto/aes.h>
#include <crypto/hmac.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/algapi.h>
#include <crypto/internal/aead.h>
#include <crypto/internal/skcipher.h>


+ 2
- 1
drivers/crypto/marvell/cesa/hash.c View File

@ -11,7 +11,8 @@
#include <crypto/hmac.h>
#include <crypto/md5.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>


+ 2
- 1
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c View File

@ -13,7 +13,8 @@
#include <crypto/cryptd.h>
#include <crypto/des.h>
#include <crypto/internal/aead.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/xts.h>
#include <crypto/scatterwalk.h>
#include <linux/rtnetlink.h>


+ 2
- 1
drivers/crypto/mediatek/mtk-sha.c View File

@ -10,7 +10,8 @@
*/
#include <crypto/hmac.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include "mtk-platform.h"
#define SHA_ALIGN_MSK (sizeof(u32) - 1)


+ 2
- 1
drivers/crypto/mxs-dcp.c View File

@ -17,7 +17,8 @@
#include <linux/clk.h>
#include <crypto/aes.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/internal/hash.h>
#include <crypto/internal/skcipher.h>
#include <crypto/scatterwalk.h>


+ 2
- 1
drivers/crypto/n2_core.c View File

@ -15,7 +15,8 @@
#include <linux/interrupt.h>
#include <linux/crypto.h>
#include <crypto/md5.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/aes.h>
#include <crypto/internal/des.h>
#include <linux/mutex.h>


+ 1
- 1
drivers/crypto/nx/nx-sha256.c View File

@ -8,7 +8,7 @@
*/
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <linux/module.h>
#include <asm/vio.h>
#include <asm/byteorder.h>


+ 1
- 1
drivers/crypto/nx/nx-sha512.c View File

@ -8,7 +8,7 @@
*/
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <linux/module.h>
#include <asm/vio.h>


+ 1
- 1
drivers/crypto/nx/nx.c View File

@ -10,7 +10,7 @@
#include <crypto/internal/aead.h>
#include <crypto/internal/hash.h>
#include <crypto/aes.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/algapi.h>
#include <crypto/scatterwalk.h>
#include <linux/module.h>


+ 2
- 1
drivers/crypto/omap-sham.c View File

@ -35,7 +35,8 @@
#include <linux/crypto.h>
#include <crypto/scatterwalk.h>
#include <crypto/algapi.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/hash.h>
#include <crypto/hmac.h>
#include <crypto/internal/hash.h>


+ 2
- 1
drivers/crypto/padlock-sha.c View File

@ -9,7 +9,8 @@
#include <crypto/internal/hash.h>
#include <crypto/padlock.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/init.h>


+ 2
- 1
drivers/crypto/picoxcell_crypto.c View File

@ -8,7 +8,8 @@
#include <crypto/authenc.h>
#include <crypto/internal/des.h>
#include <crypto/md5.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/internal/skcipher.h>
#include <linux/clk.h>
#include <linux/crypto.h>


+ 2
- 1
drivers/crypto/qat/qat_common/qat_algs.c View File

@ -6,7 +6,8 @@
#include <crypto/internal/aead.h>
#include <crypto/internal/skcipher.h>
#include <crypto/aes.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/hash.h>
#include <crypto/hmac.h>
#include <crypto/algapi.h>


+ 2
- 1
drivers/crypto/qce/common.c View File

@ -7,7 +7,8 @@
#include <linux/interrupt.h>
#include <linux/types.h>
#include <crypto/scatterwalk.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include "cipher.h"
#include "common.h"


+ 0
- 1
drivers/crypto/qce/core.c View File

@ -13,7 +13,6 @@
#include <linux/types.h>
#include <crypto/algapi.h>
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include "core.h"
#include "cipher.h"


+ 2
- 1
drivers/crypto/qce/sha.h View File

@ -7,7 +7,8 @@
#define _SHA_H_
#include <crypto/scatterwalk.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include "common.h"
#include "core.h"


+ 2
- 1
drivers/crypto/rockchip/rk3288_crypto.h View File

@ -12,7 +12,8 @@
#include <crypto/internal/skcipher.h>
#include <crypto/md5.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#define _SBF(v, f) ((v) << (f))


+ 2
- 1
drivers/crypto/s5p-sss.c View File

@ -30,7 +30,8 @@
#include <crypto/hash.h>
#include <crypto/md5.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/internal/hash.h>
#define _SBF(s, v) ((v) << (s))


+ 2
- 1
drivers/crypto/sa2ul.c View File

@ -25,7 +25,8 @@
#include <crypto/internal/hash.h>
#include <crypto/internal/skcipher.h>
#include <crypto/scatterwalk.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include "sa2ul.h"


+ 2
- 1
drivers/crypto/sa2ul.h View File

@ -13,7 +13,8 @@
#define _K3_SA2UL_
#include <crypto/aes.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#define SA_ENGINE_ENABLE_CONTROL 0x1000


+ 2
- 1
drivers/crypto/sahara.c View File

@ -15,7 +15,8 @@
#include <crypto/internal/hash.h>
#include <crypto/internal/skcipher.h>
#include <crypto/scatterwalk.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>


+ 2
- 1
drivers/crypto/stm32/stm32-hash.c View File

@ -25,7 +25,8 @@
#include <crypto/hash.h>
#include <crypto/md5.h>
#include <crypto/scatterwalk.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/internal/hash.h>
#define HASH_CR 0x00


+ 2
- 1
drivers/crypto/talitos.c View File

@ -31,7 +31,8 @@
#include <crypto/algapi.h>
#include <crypto/aes.h>
#include <crypto/internal/des.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/md5.h>
#include <crypto/internal/aead.h>
#include <crypto/authenc.h>


+ 2
- 1
drivers/crypto/ux500/hash/hash_core.c View File

@ -31,7 +31,8 @@
#include <linux/bitops.h>
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/scatterwalk.h>
#include <crypto/algapi.h>


+ 1
- 1
drivers/firmware/efi/embedded-firmware.c View File

@ -12,7 +12,7 @@
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/vmalloc.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
/* Exported for use by lib/test_firmware.c only */
LIST_HEAD(efi_embedded_fw_list);


+ 2
- 1
drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c View File

@ -51,7 +51,8 @@
#include <crypto/aes.h>
#include <crypto/algapi.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/authenc.h>
#include <crypto/internal/aead.h>
#include <crypto/null.h>


+ 2
- 1
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h View File

@ -9,7 +9,8 @@
#include <crypto/aes.h>
#include <crypto/algapi.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/authenc.h>
#include <crypto/ctr.h>
#include <crypto/gf128mul.h>


+ 1
- 1
drivers/nfc/s3fwrn5/firmware.c View File

@ -9,7 +9,7 @@
#include <linux/completion.h>
#include <linux/firmware.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include "s3fwrn5.h"
#include "firmware.h"


+ 1
- 1
drivers/tee/tee_core.c View File

@ -14,7 +14,7 @@
#include <linux/tee_drv.h>
#include <linux/uaccess.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include "tee_private.h"
#define TEE_NUM_DEVICES 32


+ 1
- 1
fs/crypto/fname.c View File

@ -14,7 +14,7 @@
#include <linux/namei.h>
#include <linux/scatterlist.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <crypto/skcipher.h>
#include "fscrypt_private.h"


+ 1
- 1
fs/crypto/hkdf.c View File

@ -10,7 +10,7 @@
*/
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include "fscrypt_private.h"


+ 0
- 1
fs/ubifs/auth.c View File

@ -12,7 +12,6 @@
#include <linux/crypto.h>
#include <linux/verification.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <crypto/algapi.h>
#include <keys/user-type.h>
#include <keys/asymmetric-type.h>


+ 1
- 1
fs/verity/fsverity_private.h View File

@ -14,7 +14,7 @@
#define pr_fmt(fmt) "fs-verity: " fmt
#include <crypto/sha.h>
#include <crypto/sha2.h>
#include <linux/fsverity.h>
#include <linux/mempool.h>


+ 2
- 1
include/crypto/hash_info.h View File

@ -8,7 +8,8 @@
#ifndef _CRYPTO_HASH_INFO_H
#define _CRYPTO_HASH_INFO_H
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <crypto/sha2.h>
#include <crypto/md5.h>
#include <crypto/streebog.h>


+ 46
- 0
include/crypto/sha1.h View File

@ -0,0 +1,46 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Common values for SHA-1 algorithms
*/
#ifndef _CRYPTO_SHA1_H
#define _CRYPTO_SHA1_H
#include <linux/types.h>
#define SHA1_DIGEST_SIZE 20
#define SHA1_BLOCK_SIZE 64
#define SHA1_H0 0x67452301UL
#define SHA1_H1 0xefcdab89UL
#define SHA1_H2 0x98badcfeUL
#define SHA1_H3 0x10325476UL
#define SHA1_H4 0xc3d2e1f0UL
extern const u8 sha1_zero_message_hash[SHA1_DIGEST_SIZE];
struct sha1_state {
u32 state[SHA1_DIGEST_SIZE / 4];
u64 count;
u8 buffer[SHA1_BLOCK_SIZE];
};
struct shash_desc;
extern int crypto_sha1_update(struct shash_desc *desc, const u8 *data,
unsigned int len);
extern int crypto_sha1_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *hash);
/*
* An implementation of SHA-1's compression function. Don't use in new code!
* You shouldn't be using SHA-1, and even if you *have* to use SHA-1, this isn't
* the correct way to hash something with SHA-1 (use crypto_shash instead).
*/
#define SHA1_DIGEST_WORDS (SHA1_DIGEST_SIZE / 4)
#define SHA1_WORKSPACE_WORDS 16
void sha1_init(__u32 *buf);
void sha1_transform(__u32 *digest, const char *data, __u32 *W);
#endif /* _CRYPTO_SHA1_H */

+ 1
- 1
include/crypto/sha1_base.h View File

@ -9,7 +9,7 @@
#define _CRYPTO_SHA1_BASE_H
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
#include <crypto/sha1.h>
#include <linux/crypto.h>
#include <linux/module.h>
#include <linux/string.h>


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save