Kconfig 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. # SPDX-License-Identifier: GPL-2.0
  2. menu "Accelerated Cryptographic Algorithms for CPU (arm)"
  3. config CRYPTO_CURVE25519_NEON
  4. tristate
  5. depends on KERNEL_MODE_NEON
  6. select CRYPTO_KPP
  7. select CRYPTO_LIB_CURVE25519_GENERIC
  8. select CRYPTO_ARCH_HAVE_LIB_CURVE25519
  9. default CRYPTO_LIB_CURVE25519_INTERNAL
  10. help
  11. Curve25519 algorithm
  12. Architecture: arm with
  13. - NEON (Advanced SIMD) extensions
  14. config CRYPTO_GHASH_ARM_CE
  15. tristate "Hash functions: GHASH (PMULL/NEON/ARMv8 Crypto Extensions)"
  16. depends on KERNEL_MODE_NEON
  17. select CRYPTO_AEAD
  18. select CRYPTO_HASH
  19. select CRYPTO_CRYPTD
  20. select CRYPTO_LIB_AES
  21. select CRYPTO_LIB_GF128MUL
  22. help
  23. GCM GHASH function (NIST SP800-38D)
  24. Architecture: arm using
  25. - PMULL (Polynomial Multiply Long) instructions
  26. - NEON (Advanced SIMD) extensions
  27. - ARMv8 Crypto Extensions
  28. Use an implementation of GHASH (used by the GCM AEAD chaining mode)
  29. that uses the 64x64 to 128 bit polynomial multiplication (vmull.p64)
  30. that is part of the ARMv8 Crypto Extensions, or a slower variant that
  31. uses the vmull.p8 instruction that is part of the basic NEON ISA.
  32. config CRYPTO_NHPOLY1305_NEON
  33. tristate "Hash functions: NHPoly1305 (NEON)"
  34. depends on KERNEL_MODE_NEON
  35. select CRYPTO_NHPOLY1305
  36. help
  37. NHPoly1305 hash function (Adiantum)
  38. Architecture: arm using:
  39. - NEON (Advanced SIMD) extensions
  40. config CRYPTO_POLY1305_ARM
  41. tristate
  42. select CRYPTO_HASH
  43. select CRYPTO_ARCH_HAVE_LIB_POLY1305
  44. default CRYPTO_LIB_POLY1305_INTERNAL
  45. help
  46. Poly1305 authenticator algorithm (RFC7539)
  47. Architecture: arm optionally using
  48. - NEON (Advanced SIMD) extensions
  49. config CRYPTO_BLAKE2S_ARM
  50. bool "Hash functions: BLAKE2s"
  51. select CRYPTO_ARCH_HAVE_LIB_BLAKE2S
  52. help
  53. BLAKE2s cryptographic hash function (RFC 7693)
  54. Architecture: arm
  55. This is faster than the generic implementations of BLAKE2s and
  56. BLAKE2b, but slower than the NEON implementation of BLAKE2b.
  57. There is no NEON implementation of BLAKE2s, since NEON doesn't
  58. really help with it.
  59. config CRYPTO_BLAKE2B_NEON
  60. tristate "Hash functions: BLAKE2b (NEON)"
  61. depends on KERNEL_MODE_NEON
  62. select CRYPTO_BLAKE2B
  63. help
  64. BLAKE2b cryptographic hash function (RFC 7693)
  65. Architecture: arm using
  66. - NEON (Advanced SIMD) extensions
  67. BLAKE2b digest algorithm optimized with ARM NEON instructions.
  68. On ARM processors that have NEON support but not the ARMv8
  69. Crypto Extensions, typically this BLAKE2b implementation is
  70. much faster than the SHA-2 family and slightly faster than
  71. SHA-1.
  72. config CRYPTO_SHA1_ARM
  73. tristate "Hash functions: SHA-1"
  74. select CRYPTO_SHA1
  75. select CRYPTO_HASH
  76. help
  77. SHA-1 secure hash algorithm (FIPS 180)
  78. Architecture: arm
  79. config CRYPTO_SHA1_ARM_NEON
  80. tristate "Hash functions: SHA-1 (NEON)"
  81. depends on KERNEL_MODE_NEON
  82. select CRYPTO_SHA1_ARM
  83. select CRYPTO_SHA1
  84. select CRYPTO_HASH
  85. help
  86. SHA-1 secure hash algorithm (FIPS 180)
  87. Architecture: arm using
  88. - NEON (Advanced SIMD) extensions
  89. config CRYPTO_SHA1_ARM_CE
  90. tristate "Hash functions: SHA-1 (ARMv8 Crypto Extensions)"
  91. depends on KERNEL_MODE_NEON
  92. select CRYPTO_SHA1_ARM
  93. select CRYPTO_HASH
  94. help
  95. SHA-1 secure hash algorithm (FIPS 180)
  96. Architecture: arm using ARMv8 Crypto Extensions
  97. config CRYPTO_SHA2_ARM_CE
  98. tristate "Hash functions: SHA-224 and SHA-256 (ARMv8 Crypto Extensions)"
  99. depends on KERNEL_MODE_NEON
  100. select CRYPTO_SHA256_ARM
  101. select CRYPTO_HASH
  102. help
  103. SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
  104. Architecture: arm using
  105. - ARMv8 Crypto Extensions
  106. config CRYPTO_SHA256_ARM
  107. tristate "Hash functions: SHA-224 and SHA-256 (NEON)"
  108. select CRYPTO_HASH
  109. depends on !CPU_V7M
  110. help
  111. SHA-224 and SHA-256 secure hash algorithms (FIPS 180)
  112. Architecture: arm using
  113. - NEON (Advanced SIMD) extensions
  114. config CRYPTO_SHA512_ARM
  115. tristate "Hash functions: SHA-384 and SHA-512 (NEON)"
  116. select CRYPTO_HASH
  117. depends on !CPU_V7M
  118. help
  119. SHA-384 and SHA-512 secure hash algorithms (FIPS 180)
  120. Architecture: arm using
  121. - NEON (Advanced SIMD) extensions
  122. config CRYPTO_AES_ARM
  123. tristate "Ciphers: AES"
  124. select CRYPTO_ALGAPI
  125. select CRYPTO_AES
  126. help
  127. Block ciphers: AES cipher algorithms (FIPS-197)
  128. Architecture: arm
  129. On ARM processors without the Crypto Extensions, this is the
  130. fastest AES implementation for single blocks. For multiple
  131. blocks, the NEON bit-sliced implementation is usually faster.
  132. This implementation may be vulnerable to cache timing attacks,
  133. since it uses lookup tables. However, as countermeasures it
  134. disables IRQs and preloads the tables; it is hoped this makes
  135. such attacks very difficult.
  136. config CRYPTO_AES_ARM_BS
  137. tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (bit-sliced NEON)"
  138. depends on KERNEL_MODE_NEON
  139. select CRYPTO_AES_ARM
  140. select CRYPTO_SKCIPHER
  141. select CRYPTO_LIB_AES
  142. select CRYPTO_SIMD
  143. help
  144. Length-preserving ciphers: AES cipher algorithms (FIPS-197)
  145. with block cipher modes:
  146. - ECB (Electronic Codebook) mode (NIST SP800-38A)
  147. - CBC (Cipher Block Chaining) mode (NIST SP800-38A)
  148. - CTR (Counter) mode (NIST SP800-38A)
  149. - XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
  150. and IEEE 1619)
  151. Bit sliced AES gives around 45% speedup on Cortex-A15 for CTR mode
  152. and for XTS mode encryption, CBC and XTS mode decryption speedup is
  153. around 25%. (CBC encryption speed is not affected by this driver.)
  154. The bit sliced AES code does not use lookup tables, so it is believed
  155. to be invulnerable to cache timing attacks. However, since the bit
  156. sliced AES code cannot process single blocks efficiently, in certain
  157. cases table-based code with some countermeasures against cache timing
  158. attacks will still be used as a fallback method; specifically CBC
  159. encryption (not CBC decryption), the encryption of XTS tweaks, XTS
  160. ciphertext stealing when the message isn't a multiple of 16 bytes, and
  161. CTR when invoked in a context in which NEON instructions are unusable.
  162. config CRYPTO_AES_ARM_CE
  163. tristate "Ciphers: AES, modes: ECB/CBC/CTS/CTR/XTS (ARMv8 Crypto Extensions)"
  164. depends on KERNEL_MODE_NEON
  165. select CRYPTO_SKCIPHER
  166. select CRYPTO_LIB_AES
  167. select CRYPTO_SIMD
  168. help
  169. Length-preserving ciphers: AES cipher algorithms (FIPS-197)
  170. with block cipher modes:
  171. - ECB (Electronic Codebook) mode (NIST SP800-38A)
  172. - CBC (Cipher Block Chaining) mode (NIST SP800-38A)
  173. - CTR (Counter) mode (NIST SP800-38A)
  174. - CTS (Cipher Text Stealing) mode (NIST SP800-38A)
  175. - XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E
  176. and IEEE 1619)
  177. Architecture: arm using:
  178. - ARMv8 Crypto Extensions
  179. config CRYPTO_CHACHA20_NEON
  180. tristate
  181. select CRYPTO_SKCIPHER
  182. select CRYPTO_ARCH_HAVE_LIB_CHACHA
  183. default CRYPTO_LIB_CHACHA_INTERNAL
  184. help
  185. Length-preserving ciphers: ChaCha20, XChaCha20, and XChaCha12
  186. stream cipher algorithms
  187. Architecture: arm using:
  188. - NEON (Advanced SIMD) extensions
  189. config CRYPTO_CRC32_ARM_CE
  190. tristate "CRC32C and CRC32"
  191. depends on KERNEL_MODE_NEON
  192. depends on CRC32
  193. select CRYPTO_HASH
  194. help
  195. CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720)
  196. and CRC32 CRC algorithm (IEEE 802.3)
  197. Architecture: arm using:
  198. - CRC and/or PMULL instructions
  199. Drivers: crc32-arm-ce and crc32c-arm-ce
  200. config CRYPTO_CRCT10DIF_ARM_CE
  201. tristate "CRCT10DIF"
  202. depends on KERNEL_MODE_NEON
  203. depends on CRC_T10DIF
  204. select CRYPTO_HASH
  205. help
  206. CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
  207. Architecture: arm using:
  208. - PMULL (Polynomial Multiply Long) instructions
  209. endmenu