1# SPDX-License-Identifier: GPL-2.0 2# 3# Generic algorithms support 4# 5config XOR_BLOCKS 6 tristate 7 8# 9# async_tx api: hardware offloaded memory transfer/transform support 10# 11source "crypto/async_tx/Kconfig" 12 13# 14# Cryptographic API Configuration 15# 16menuconfig CRYPTO 17 tristate "Cryptographic API" 18 select CRYPTO_LIB_UTILS 19 help 20 This option provides the core Cryptographic API. 21 22if CRYPTO 23 24menu "Crypto core or helper" 25 26config CRYPTO_FIPS 27 bool "FIPS 200 compliance" 28 depends on (CRYPTO_ANSI_CPRNG || CRYPTO_DRBG) && !CRYPTO_MANAGER_DISABLE_TESTS 29 depends on (MODULE_SIG || !MODULES) 30 help 31 This option enables the fips boot option which is 32 required if you want the system to operate in a FIPS 200 33 certification. You should say no unless you know what 34 this is. 35 36config CRYPTO_FIPS_NAME 37 string "FIPS Module Name" 38 default "Linux Kernel Cryptographic API" 39 depends on CRYPTO_FIPS 40 help 41 This option sets the FIPS Module name reported by the Crypto API via 42 the /proc/sys/crypto/fips_name file. 43 44config CRYPTO_FIPS_CUSTOM_VERSION 45 bool "Use Custom FIPS Module Version" 46 depends on CRYPTO_FIPS 47 default n 48 49config CRYPTO_FIPS_VERSION 50 string "FIPS Module Version" 51 default "(none)" 52 depends on CRYPTO_FIPS_CUSTOM_VERSION 53 help 54 This option provides the ability to override the FIPS Module Version. 55 By default the KERNELRELEASE value is used. 56 57config CRYPTO_FIPS140_MOD 58 tristate "Enable FIPS 140 cryptographic module" 59 depends on ARM64 60 depends on CC_IS_CLANG 61 depends on m 62 select CRYPTO_FIPS140_MERGE_MOD_SECTIONS 63 help 64 This option enables building a loadable module fips140.ko, which 65 contains various crypto algorithms that are also built into vmlinux. 66 At load time, this module overrides the built-in implementations of 67 these algorithms with its implementations. It also runs self-tests on 68 these algorithms and verifies the integrity of its code and data. If 69 either of these steps fails, the kernel will panic. 70 71 This module is intended to be loaded at early boot time in order to 72 meet FIPS 140 and NIAP FPT_TST_EXT.1 requirements. It shouldn't be 73 used if you don't need to meet these requirements. 74 75config CRYPTO_FIPS140_MOD_EVAL_TESTING 76 bool "Enable evaluation testing features in FIPS 140 module" 77 depends on CRYPTO_FIPS140_MOD 78 help 79 This option adds some features to the FIPS 140 module which are needed 80 for lab evaluation testing of the module, e.g. support for injecting 81 errors and support for a userspace interface to some of the module's 82 services. This option should not be enabled in production builds. 83 84config CRYPTO_FIPS140_MERGE_MOD_SECTIONS 85 bool 86 help 87 This option causes the module linker script to place the delimeters 88 of the text and rodata sections at the appropriate places so that 89 the FIPS 140 integrity check can be performed. This option is required 90 by the Crypto FIPS 140 module, and can be enabled by other FIPS 140 91 modules using the same logic to perform the self integrity check. 92 93config CRYPTO_FIPS140_MOD_DEBUG_INTEGRITY_CHECK 94 bool "Debug the integrity check in FIPS 140 module" 95 depends on CRYPTO_FIPS140_MOD 96 help 97 This option makes the FIPS 140 module provide debugfs files containing 98 the text and rodata that were used for the integrity check, i.e. the 99 runtime text and rodata with relocations and code patches unapplied. 100 This option also makes the module load even if the integrity check 101 fails so that these files can be used to debug the failure. (A 102 possible failure mode is that the kernel has added a new type of code 103 patching and the module needs to be updated to disable or unapply it.) 104 105 This option must not be enabled in production builds. 106 107 Example commands for debugging an integrity check failure: 108 109 adb root 110 adb shell mount debugfs -t debugfs /sys/kernel/debug 111 adb shell cp /sys/kernel/debug/fips140/{text,rodata} /data/local/tmp/ 112 adb pull /data/local/tmp/text text.checked 113 adb pull /data/local/tmp/rodata rodata.checked 114 llvm-objcopy -O binary --only-section=.text fips140.ko text.orig 115 llvm-objcopy -O binary --only-section=.rodata fips140.ko rodata.orig 116 for f in {text,rodata}.{orig,checked}; do xxd -g1 $f > $f.xxd; done 117 vimdiff text.{orig,checked}.xxd 118 vimdiff rodata.{orig,checked}.xxd 119 120config CRYPTO_ALGAPI 121 tristate 122 select CRYPTO_ALGAPI2 123 help 124 This option provides the API for cryptographic algorithms. 125 126config CRYPTO_ALGAPI2 127 tristate 128 129config CRYPTO_AEAD 130 tristate 131 select CRYPTO_AEAD2 132 select CRYPTO_ALGAPI 133 134config CRYPTO_AEAD2 135 tristate 136 select CRYPTO_ALGAPI2 137 138config CRYPTO_SIG 139 tristate 140 select CRYPTO_SIG2 141 select CRYPTO_ALGAPI 142 143config CRYPTO_SIG2 144 tristate 145 select CRYPTO_ALGAPI2 146 147config CRYPTO_SKCIPHER 148 tristate 149 select CRYPTO_SKCIPHER2 150 select CRYPTO_ALGAPI 151 152config CRYPTO_SKCIPHER2 153 tristate 154 select CRYPTO_ALGAPI2 155 156config CRYPTO_HASH 157 tristate 158 select CRYPTO_HASH2 159 select CRYPTO_ALGAPI 160 161config CRYPTO_HASH2 162 tristate 163 select CRYPTO_ALGAPI2 164 165config CRYPTO_RNG 166 tristate 167 select CRYPTO_RNG2 168 select CRYPTO_ALGAPI 169 170config CRYPTO_RNG2 171 tristate 172 select CRYPTO_ALGAPI2 173 174config CRYPTO_RNG_DEFAULT 175 tristate 176 select CRYPTO_DRBG_MENU 177 178config CRYPTO_AKCIPHER2 179 tristate 180 select CRYPTO_ALGAPI2 181 182config CRYPTO_AKCIPHER 183 tristate 184 select CRYPTO_AKCIPHER2 185 select CRYPTO_ALGAPI 186 187config CRYPTO_KPP2 188 tristate 189 select CRYPTO_ALGAPI2 190 191config CRYPTO_KPP 192 tristate 193 select CRYPTO_ALGAPI 194 select CRYPTO_KPP2 195 196config CRYPTO_ACOMP2 197 tristate 198 select CRYPTO_ALGAPI2 199 select SGL_ALLOC 200 201config CRYPTO_ACOMP 202 tristate 203 select CRYPTO_ALGAPI 204 select CRYPTO_ACOMP2 205 206config CRYPTO_MANAGER 207 tristate "Cryptographic algorithm manager" 208 select CRYPTO_MANAGER2 209 help 210 Create default cryptographic template instantiations such as 211 cbc(aes). 212 213config CRYPTO_MANAGER2 214 def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y) 215 select CRYPTO_ACOMP2 216 select CRYPTO_AEAD2 217 select CRYPTO_AKCIPHER2 218 select CRYPTO_SIG2 219 select CRYPTO_HASH2 220 select CRYPTO_KPP2 221 select CRYPTO_RNG2 222 select CRYPTO_SKCIPHER2 223 224config CRYPTO_USER 225 tristate "Userspace cryptographic algorithm configuration" 226 depends on NET 227 select CRYPTO_MANAGER 228 help 229 Userspace configuration for cryptographic instantiations such as 230 cbc(aes). 231 232config CRYPTO_MANAGER_DISABLE_TESTS 233 bool "Disable run-time self tests" 234 default y 235 help 236 Disable run-time self tests that normally take place at 237 algorithm registration. 238 239config CRYPTO_MANAGER_EXTRA_TESTS 240 bool "Enable extra run-time crypto self tests" 241 depends on DEBUG_KERNEL && !CRYPTO_MANAGER_DISABLE_TESTS && CRYPTO_MANAGER 242 help 243 Enable extra run-time self tests of registered crypto algorithms, 244 including randomized fuzz tests. 245 246 This is intended for developer use only, as these tests take much 247 longer to run than the normal self tests. 248 249config CRYPTO_NULL 250 tristate "Null algorithms" 251 select CRYPTO_NULL2 252 help 253 These are 'Null' algorithms, used by IPsec, which do nothing. 254 255config CRYPTO_NULL2 256 tristate 257 select CRYPTO_ALGAPI2 258 select CRYPTO_SKCIPHER2 259 select CRYPTO_HASH2 260 261config CRYPTO_PCRYPT 262 tristate "Parallel crypto engine" 263 depends on SMP 264 select PADATA 265 select CRYPTO_MANAGER 266 select CRYPTO_AEAD 267 help 268 This converts an arbitrary crypto algorithm into a parallel 269 algorithm that executes in kernel threads. 270 271config CRYPTO_CRYPTD 272 tristate "Software async crypto daemon" 273 select CRYPTO_SKCIPHER 274 select CRYPTO_HASH 275 select CRYPTO_MANAGER 276 help 277 This is a generic software asynchronous crypto daemon that 278 converts an arbitrary synchronous software crypto algorithm 279 into an asynchronous algorithm that executes in a kernel thread. 280 281config CRYPTO_AUTHENC 282 tristate "Authenc support" 283 select CRYPTO_AEAD 284 select CRYPTO_SKCIPHER 285 select CRYPTO_MANAGER 286 select CRYPTO_HASH 287 select CRYPTO_NULL 288 help 289 Authenc: Combined mode wrapper for IPsec. 290 291 This is required for IPSec ESP (XFRM_ESP). 292 293config CRYPTO_TEST 294 tristate "Testing module" 295 depends on m || EXPERT 296 select CRYPTO_MANAGER 297 help 298 Quick & dirty crypto test module. 299 300config CRYPTO_SIMD 301 tristate 302 select CRYPTO_CRYPTD 303 304config CRYPTO_ENGINE 305 tristate 306 307endmenu 308 309menu "Public-key cryptography" 310 311config CRYPTO_RSA 312 tristate "RSA (Rivest-Shamir-Adleman)" 313 select CRYPTO_AKCIPHER 314 select CRYPTO_MANAGER 315 select MPILIB 316 select ASN1 317 help 318 RSA (Rivest-Shamir-Adleman) public key algorithm (RFC8017) 319 320config CRYPTO_DH 321 tristate "DH (Diffie-Hellman)" 322 select CRYPTO_KPP 323 select MPILIB 324 help 325 DH (Diffie-Hellman) key exchange algorithm 326 327config CRYPTO_DH_RFC7919_GROUPS 328 bool "RFC 7919 FFDHE groups" 329 depends on CRYPTO_DH 330 select CRYPTO_RNG_DEFAULT 331 help 332 FFDHE (Finite-Field-based Diffie-Hellman Ephemeral) groups 333 defined in RFC7919. 334 335 Support these finite-field groups in DH key exchanges: 336 - ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192 337 338 If unsure, say N. 339 340config CRYPTO_ECC 341 tristate 342 select CRYPTO_RNG_DEFAULT 343 344config CRYPTO_ECDH 345 tristate "ECDH (Elliptic Curve Diffie-Hellman)" 346 select CRYPTO_ECC 347 select CRYPTO_KPP 348 help 349 ECDH (Elliptic Curve Diffie-Hellman) key exchange algorithm 350 using curves P-192, P-256, and P-384 (FIPS 186) 351 352config CRYPTO_ECDSA 353 tristate "ECDSA (Elliptic Curve Digital Signature Algorithm)" 354 select CRYPTO_ECC 355 select CRYPTO_AKCIPHER 356 select ASN1 357 help 358 ECDSA (Elliptic Curve Digital Signature Algorithm) (FIPS 186, 359 ISO/IEC 14888-3) 360 using curves P-192, P-256, and P-384 361 362 Only signature verification is implemented. 363 364config CRYPTO_ECRDSA 365 tristate "EC-RDSA (Elliptic Curve Russian Digital Signature Algorithm)" 366 select CRYPTO_ECC 367 select CRYPTO_AKCIPHER 368 select CRYPTO_STREEBOG 369 select OID_REGISTRY 370 select ASN1 371 help 372 Elliptic Curve Russian Digital Signature Algorithm (GOST R 34.10-2012, 373 RFC 7091, ISO/IEC 14888-3) 374 375 One of the Russian cryptographic standard algorithms (called GOST 376 algorithms). Only signature verification is implemented. 377 378config CRYPTO_SM2 379 tristate "SM2 (ShangMi 2)" 380 select CRYPTO_SM3 381 select CRYPTO_AKCIPHER 382 select CRYPTO_MANAGER 383 select MPILIB 384 select ASN1 385 help 386 SM2 (ShangMi 2) public key algorithm 387 388 Published by State Encryption Management Bureau, China, 389 as specified by OSCCA GM/T 0003.1-2012 -- 0003.5-2012. 390 391 References: 392 https://datatracker.ietf.org/doc/draft-shen-sm2-ecdsa/ 393 http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml 394 http://www.gmbz.org.cn/main/bzlb.html 395 396config CRYPTO_CURVE25519 397 tristate "Curve25519" 398 select CRYPTO_KPP 399 select CRYPTO_LIB_CURVE25519_GENERIC 400 help 401 Curve25519 elliptic curve (RFC7748) 402 403endmenu 404 405menu "Block ciphers" 406 407config CRYPTO_AES 408 tristate "AES (Advanced Encryption Standard)" 409 select CRYPTO_ALGAPI 410 select CRYPTO_LIB_AES 411 help 412 AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3) 413 414 Rijndael appears to be consistently a very good performer in 415 both hardware and software across a wide range of computing 416 environments regardless of its use in feedback or non-feedback 417 modes. Its key setup time is excellent, and its key agility is 418 good. Rijndael's very low memory requirements make it very well 419 suited for restricted-space environments, in which it also 420 demonstrates excellent performance. Rijndael's operations are 421 among the easiest to defend against power and timing attacks. 422 423 The AES specifies three key sizes: 128, 192 and 256 bits 424 425config CRYPTO_AES_TI 426 tristate "AES (Advanced Encryption Standard) (fixed time)" 427 select CRYPTO_ALGAPI 428 select CRYPTO_LIB_AES 429 help 430 AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3) 431 432 This is a generic implementation of AES that attempts to eliminate 433 data dependent latencies as much as possible without affecting 434 performance too much. It is intended for use by the generic CCM 435 and GCM drivers, and other CTR or CMAC/XCBC based modes that rely 436 solely on encryption (although decryption is supported as well, but 437 with a more dramatic performance hit) 438 439 Instead of using 16 lookup tables of 1 KB each, (8 for encryption and 440 8 for decryption), this implementation only uses just two S-boxes of 441 256 bytes each, and attempts to eliminate data dependent latencies by 442 prefetching the entire table into the cache at the start of each 443 block. Interrupts are also disabled to avoid races where cachelines 444 are evicted when the CPU is interrupted to do something else. 445 446config CRYPTO_ANUBIS 447 tristate "Anubis" 448 depends on CRYPTO_USER_API_ENABLE_OBSOLETE 449 select CRYPTO_ALGAPI 450 help 451 Anubis cipher algorithm 452 453 Anubis is a variable key length cipher which can use keys from 454 128 bits to 320 bits in length. It was evaluated as a entrant 455 in the NESSIE competition. 456 457 See https://web.archive.org/web/20160606112246/http://www.larc.usp.br/~pbarreto/AnubisPage.html 458 for further information. 459 460config CRYPTO_ARIA 461 tristate "ARIA" 462 select CRYPTO_ALGAPI 463 help 464 ARIA cipher algorithm (RFC5794) 465 466 ARIA is a standard encryption algorithm of the Republic of Korea. 467 The ARIA specifies three key sizes and rounds. 468 128-bit: 12 rounds. 469 192-bit: 14 rounds. 470 256-bit: 16 rounds. 471 472 See: 473 https://seed.kisa.or.kr/kisa/algorithm/EgovAriaInfo.do 474 475config CRYPTO_BLOWFISH 476 tristate "Blowfish" 477 select CRYPTO_ALGAPI 478 select CRYPTO_BLOWFISH_COMMON 479 help 480 Blowfish cipher algorithm, by Bruce Schneier 481 482 This is a variable key length cipher which can use keys from 32 483 bits to 448 bits in length. It's fast, simple and specifically 484 designed for use on "large microprocessors". 485 486 See https://www.schneier.com/blowfish.html for further information. 487 488config CRYPTO_BLOWFISH_COMMON 489 tristate 490 help 491 Common parts of the Blowfish cipher algorithm shared by the 492 generic c and the assembler implementations. 493 494config CRYPTO_CAMELLIA 495 tristate "Camellia" 496 select CRYPTO_ALGAPI 497 help 498 Camellia cipher algorithms (ISO/IEC 18033-3) 499 500 Camellia is a symmetric key block cipher developed jointly 501 at NTT and Mitsubishi Electric Corporation. 502 503 The Camellia specifies three key sizes: 128, 192 and 256 bits. 504 505 See https://info.isl.ntt.co.jp/crypt/eng/camellia/ for further information. 506 507config CRYPTO_CAST_COMMON 508 tristate 509 help 510 Common parts of the CAST cipher algorithms shared by the 511 generic c and the assembler implementations. 512 513config CRYPTO_CAST5 514 tristate "CAST5 (CAST-128)" 515 select CRYPTO_ALGAPI 516 select CRYPTO_CAST_COMMON 517 help 518 CAST5 (CAST-128) cipher algorithm (RFC2144, ISO/IEC 18033-3) 519 520config CRYPTO_CAST6 521 tristate "CAST6 (CAST-256)" 522 select CRYPTO_ALGAPI 523 select CRYPTO_CAST_COMMON 524 help 525 CAST6 (CAST-256) encryption algorithm (RFC2612) 526 527config CRYPTO_DES 528 tristate "DES and Triple DES EDE" 529 select CRYPTO_ALGAPI 530 select CRYPTO_LIB_DES 531 help 532 DES (Data Encryption Standard)(FIPS 46-2, ISO/IEC 18033-3) and 533 Triple DES EDE (Encrypt/Decrypt/Encrypt) (FIPS 46-3, ISO/IEC 18033-3) 534 cipher algorithms 535 536config CRYPTO_FCRYPT 537 tristate "FCrypt" 538 select CRYPTO_ALGAPI 539 select CRYPTO_SKCIPHER 540 help 541 FCrypt algorithm used by RxRPC 542 543 See https://ota.polyonymo.us/fcrypt-paper.txt 544 545config CRYPTO_KHAZAD 546 tristate "Khazad" 547 depends on CRYPTO_USER_API_ENABLE_OBSOLETE 548 select CRYPTO_ALGAPI 549 help 550 Khazad cipher algorithm 551 552 Khazad was a finalist in the initial NESSIE competition. It is 553 an algorithm optimized for 64-bit processors with good performance 554 on 32-bit processors. Khazad uses an 128 bit key size. 555 556 See https://web.archive.org/web/20171011071731/http://www.larc.usp.br/~pbarreto/KhazadPage.html 557 for further information. 558 559config CRYPTO_SEED 560 tristate "SEED" 561 depends on CRYPTO_USER_API_ENABLE_OBSOLETE 562 select CRYPTO_ALGAPI 563 help 564 SEED cipher algorithm (RFC4269, ISO/IEC 18033-3) 565 566 SEED is a 128-bit symmetric key block cipher that has been 567 developed by KISA (Korea Information Security Agency) as a 568 national standard encryption algorithm of the Republic of Korea. 569 It is a 16 round block cipher with the key size of 128 bit. 570 571 See https://seed.kisa.or.kr/kisa/algorithm/EgovSeedInfo.do 572 for further information. 573 574config CRYPTO_SERPENT 575 tristate "Serpent" 576 select CRYPTO_ALGAPI 577 help 578 Serpent cipher algorithm, by Anderson, Biham & Knudsen 579 580 Keys are allowed to be from 0 to 256 bits in length, in steps 581 of 8 bits. 582 583 See https://www.cl.cam.ac.uk/~rja14/serpent.html for further information. 584 585config CRYPTO_SM4 586 tristate 587 588config CRYPTO_SM4_GENERIC 589 tristate "SM4 (ShangMi 4)" 590 select CRYPTO_ALGAPI 591 select CRYPTO_SM4 592 help 593 SM4 cipher algorithms (OSCCA GB/T 32907-2016, 594 ISO/IEC 18033-3:2010/Amd 1:2021) 595 596 SM4 (GBT.32907-2016) is a cryptographic standard issued by the 597 Organization of State Commercial Administration of China (OSCCA) 598 as an authorized cryptographic algorithms for the use within China. 599 600 SMS4 was originally created for use in protecting wireless 601 networks, and is mandated in the Chinese National Standard for 602 Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure) 603 (GB.15629.11-2003). 604 605 The latest SM4 standard (GBT.32907-2016) was proposed by OSCCA and 606 standardized through TC 260 of the Standardization Administration 607 of the People's Republic of China (SAC). 608 609 The input, output, and key of SMS4 are each 128 bits. 610 611 See https://eprint.iacr.org/2008/329.pdf for further information. 612 613 If unsure, say N. 614 615config CRYPTO_TEA 616 tristate "TEA, XTEA and XETA" 617 depends on CRYPTO_USER_API_ENABLE_OBSOLETE 618 select CRYPTO_ALGAPI 619 help 620 TEA (Tiny Encryption Algorithm) cipher algorithms 621 622 Tiny Encryption Algorithm is a simple cipher that uses 623 many rounds for security. It is very fast and uses 624 little memory. 625 626 Xtendend Tiny Encryption Algorithm is a modification to 627 the TEA algorithm to address a potential key weakness 628 in the TEA algorithm. 629 630 Xtendend Encryption Tiny Algorithm is a mis-implementation 631 of the XTEA algorithm for compatibility purposes. 632 633config CRYPTO_TWOFISH 634 tristate "Twofish" 635 select CRYPTO_ALGAPI 636 select CRYPTO_TWOFISH_COMMON 637 help 638 Twofish cipher algorithm 639 640 Twofish was submitted as an AES (Advanced Encryption Standard) 641 candidate cipher by researchers at CounterPane Systems. It is a 642 16 round block cipher supporting key sizes of 128, 192, and 256 643 bits. 644 645 See https://www.schneier.com/twofish.html for further information. 646 647config CRYPTO_TWOFISH_COMMON 648 tristate 649 help 650 Common parts of the Twofish cipher algorithm shared by the 651 generic c and the assembler implementations. 652 653endmenu 654 655menu "Length-preserving ciphers and modes" 656 657config CRYPTO_ADIANTUM 658 tristate "Adiantum" 659 select CRYPTO_CHACHA20 660 select CRYPTO_LIB_POLY1305_GENERIC 661 select CRYPTO_NHPOLY1305 662 select CRYPTO_MANAGER 663 help 664 Adiantum tweakable, length-preserving encryption mode 665 666 Designed for fast and secure disk encryption, especially on 667 CPUs without dedicated crypto instructions. It encrypts 668 each sector using the XChaCha12 stream cipher, two passes of 669 an ε-almost-∆-universal hash function, and an invocation of 670 the AES-256 block cipher on a single 16-byte block. On CPUs 671 without AES instructions, Adiantum is much faster than 672 AES-XTS. 673 674 Adiantum's security is provably reducible to that of its 675 underlying stream and block ciphers, subject to a security 676 bound. Unlike XTS, Adiantum is a true wide-block encryption 677 mode, so it actually provides an even stronger notion of 678 security than XTS, subject to the security bound. 679 680 If unsure, say N. 681 682config CRYPTO_ARC4 683 tristate "ARC4 (Alleged Rivest Cipher 4)" 684 depends on CRYPTO_USER_API_ENABLE_OBSOLETE 685 select CRYPTO_SKCIPHER 686 select CRYPTO_LIB_ARC4 687 help 688 ARC4 cipher algorithm 689 690 ARC4 is a stream cipher using keys ranging from 8 bits to 2048 691 bits in length. This algorithm is required for driver-based 692 WEP, but it should not be for other purposes because of the 693 weakness of the algorithm. 694 695config CRYPTO_CHACHA20 696 tristate "ChaCha" 697 select CRYPTO_LIB_CHACHA_GENERIC 698 select CRYPTO_SKCIPHER 699 help 700 The ChaCha20, XChaCha20, and XChaCha12 stream cipher algorithms 701 702 ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J. 703 Bernstein and further specified in RFC7539 for use in IETF protocols. 704 This is the portable C implementation of ChaCha20. See 705 https://cr.yp.to/chacha/chacha-20080128.pdf for further information. 706 707 XChaCha20 is the application of the XSalsa20 construction to ChaCha20 708 rather than to Salsa20. XChaCha20 extends ChaCha20's nonce length 709 from 64 bits (or 96 bits using the RFC7539 convention) to 192 bits, 710 while provably retaining ChaCha20's security. See 711 https://cr.yp.to/snuffle/xsalsa-20081128.pdf for further information. 712 713 XChaCha12 is XChaCha20 reduced to 12 rounds, with correspondingly 714 reduced security margin but increased performance. It can be needed 715 in some performance-sensitive scenarios. 716 717config CRYPTO_CBC 718 tristate "CBC (Cipher Block Chaining)" 719 select CRYPTO_SKCIPHER 720 select CRYPTO_MANAGER 721 help 722 CBC (Cipher Block Chaining) mode (NIST SP800-38A) 723 724 This block cipher mode is required for IPSec ESP (XFRM_ESP). 725 726config CRYPTO_CFB 727 tristate "CFB (Cipher Feedback)" 728 select CRYPTO_SKCIPHER 729 select CRYPTO_MANAGER 730 help 731 CFB (Cipher Feedback) mode (NIST SP800-38A) 732 733 This block cipher mode is required for TPM2 Cryptography. 734 735config CRYPTO_CTR 736 tristate "CTR (Counter)" 737 select CRYPTO_SKCIPHER 738 select CRYPTO_MANAGER 739 help 740 CTR (Counter) mode (NIST SP800-38A) 741 742config CRYPTO_CTS 743 tristate "CTS (Cipher Text Stealing)" 744 select CRYPTO_SKCIPHER 745 select CRYPTO_MANAGER 746 help 747 CBC-CS3 variant of CTS (Cipher Text Stealing) (NIST 748 Addendum to SP800-38A (October 2010)) 749 750 This mode is required for Kerberos gss mechanism support 751 for AES encryption. 752 753config CRYPTO_ECB 754 tristate "ECB (Electronic Codebook)" 755 select CRYPTO_SKCIPHER 756 select CRYPTO_MANAGER 757 help 758 ECB (Electronic Codebook) mode (NIST SP800-38A) 759 760config CRYPTO_HCTR2 761 tristate "HCTR2" 762 select CRYPTO_XCTR 763 select CRYPTO_POLYVAL 764 select CRYPTO_MANAGER 765 help 766 HCTR2 length-preserving encryption mode 767 768 A mode for storage encryption that is efficient on processors with 769 instructions to accelerate AES and carryless multiplication, e.g. 770 x86 processors with AES-NI and CLMUL, and ARM processors with the 771 ARMv8 crypto extensions. 772 773 See https://eprint.iacr.org/2021/1441 774 775config CRYPTO_KEYWRAP 776 tristate "KW (AES Key Wrap)" 777 select CRYPTO_SKCIPHER 778 select CRYPTO_MANAGER 779 help 780 KW (AES Key Wrap) authenticated encryption mode (NIST SP800-38F 781 and RFC3394) without padding. 782 783config CRYPTO_LRW 784 tristate "LRW (Liskov Rivest Wagner)" 785 select CRYPTO_LIB_GF128MUL 786 select CRYPTO_SKCIPHER 787 select CRYPTO_MANAGER 788 select CRYPTO_ECB 789 help 790 LRW (Liskov Rivest Wagner) mode 791 792 A tweakable, non malleable, non movable 793 narrow block cipher mode for dm-crypt. Use it with cipher 794 specification string aes-lrw-benbi, the key must be 256, 320 or 384. 795 The first 128, 192 or 256 bits in the key are used for AES and the 796 rest is used to tie each cipher block to its logical position. 797 798 See https://people.csail.mit.edu/rivest/pubs/LRW02.pdf 799 800config CRYPTO_OFB 801 tristate "OFB (Output Feedback)" 802 select CRYPTO_SKCIPHER 803 select CRYPTO_MANAGER 804 help 805 OFB (Output Feedback) mode (NIST SP800-38A) 806 807 This mode makes a block cipher into a synchronous 808 stream cipher. It generates keystream blocks, which are then XORed 809 with the plaintext blocks to get the ciphertext. Flipping a bit in the 810 ciphertext produces a flipped bit in the plaintext at the same 811 location. This property allows many error correcting codes to function 812 normally even when applied before encryption. 813 814config CRYPTO_PCBC 815 tristate "PCBC (Propagating Cipher Block Chaining)" 816 select CRYPTO_SKCIPHER 817 select CRYPTO_MANAGER 818 help 819 PCBC (Propagating Cipher Block Chaining) mode 820 821 This block cipher mode is required for RxRPC. 822 823config CRYPTO_XCTR 824 tristate 825 select CRYPTO_SKCIPHER 826 select CRYPTO_MANAGER 827 help 828 XCTR (XOR Counter) mode for HCTR2 829 830 This blockcipher mode is a variant of CTR mode using XORs and little-endian 831 addition rather than big-endian arithmetic. 832 833 XCTR mode is used to implement HCTR2. 834 835config CRYPTO_XTS 836 tristate "XTS (XOR Encrypt XOR with ciphertext stealing)" 837 select CRYPTO_SKCIPHER 838 select CRYPTO_MANAGER 839 select CRYPTO_ECB 840 help 841 XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E 842 and IEEE 1619) 843 844 Use with aes-xts-plain, key size 256, 384 or 512 bits. This 845 implementation currently can't handle a sectorsize which is not a 846 multiple of 16 bytes. 847 848config CRYPTO_NHPOLY1305 849 tristate 850 select CRYPTO_HASH 851 select CRYPTO_LIB_POLY1305_GENERIC 852 853endmenu 854 855menu "AEAD (authenticated encryption with associated data) ciphers" 856 857config CRYPTO_AEGIS128 858 tristate "AEGIS-128" 859 select CRYPTO_AEAD 860 select CRYPTO_AES # for AES S-box tables 861 help 862 AEGIS-128 AEAD algorithm 863 864config CRYPTO_AEGIS128_SIMD 865 bool "AEGIS-128 (arm NEON, arm64 NEON)" 866 depends on CRYPTO_AEGIS128 && ((ARM || ARM64) && KERNEL_MODE_NEON) 867 default y 868 help 869 AEGIS-128 AEAD algorithm 870 871 Architecture: arm or arm64 using: 872 - NEON (Advanced SIMD) extension 873 874config CRYPTO_CHACHA20POLY1305 875 tristate "ChaCha20-Poly1305" 876 select CRYPTO_CHACHA20 877 select CRYPTO_POLY1305 878 select CRYPTO_AEAD 879 select CRYPTO_MANAGER 880 help 881 ChaCha20 stream cipher and Poly1305 authenticator combined 882 mode (RFC8439) 883 884config CRYPTO_CCM 885 tristate "CCM (Counter with Cipher Block Chaining-MAC)" 886 select CRYPTO_CTR 887 select CRYPTO_HASH 888 select CRYPTO_AEAD 889 select CRYPTO_MANAGER 890 help 891 CCM (Counter with Cipher Block Chaining-Message Authentication Code) 892 authenticated encryption mode (NIST SP800-38C) 893 894config CRYPTO_GCM 895 tristate "GCM (Galois/Counter Mode) and GMAC (GCM MAC)" 896 select CRYPTO_CTR 897 select CRYPTO_AEAD 898 select CRYPTO_GHASH 899 select CRYPTO_NULL 900 select CRYPTO_MANAGER 901 help 902 GCM (Galois/Counter Mode) authenticated encryption mode and GMAC 903 (GCM Message Authentication Code) (NIST SP800-38D) 904 905 This is required for IPSec ESP (XFRM_ESP). 906 907config CRYPTO_GENIV 908 tristate 909 select CRYPTO_AEAD 910 select CRYPTO_NULL 911 select CRYPTO_MANAGER 912 select CRYPTO_RNG_DEFAULT 913 914config CRYPTO_SEQIV 915 tristate "Sequence Number IV Generator" 916 select CRYPTO_GENIV 917 help 918 Sequence Number IV generator 919 920 This IV generator generates an IV based on a sequence number by 921 xoring it with a salt. This algorithm is mainly useful for CTR. 922 923 This is required for IPsec ESP (XFRM_ESP). 924 925config CRYPTO_ECHAINIV 926 tristate "Encrypted Chain IV Generator" 927 select CRYPTO_GENIV 928 help 929 Encrypted Chain IV generator 930 931 This IV generator generates an IV based on the encryption of 932 a sequence number xored with a salt. This is the default 933 algorithm for CBC. 934 935config CRYPTO_ESSIV 936 tristate "Encrypted Salt-Sector IV Generator" 937 select CRYPTO_AUTHENC 938 help 939 Encrypted Salt-Sector IV generator 940 941 This IV generator is used in some cases by fscrypt and/or 942 dm-crypt. It uses the hash of the block encryption key as the 943 symmetric key for a block encryption pass applied to the input 944 IV, making low entropy IV sources more suitable for block 945 encryption. 946 947 This driver implements a crypto API template that can be 948 instantiated either as an skcipher or as an AEAD (depending on the 949 type of the first template argument), and which defers encryption 950 and decryption requests to the encapsulated cipher after applying 951 ESSIV to the input IV. Note that in the AEAD case, it is assumed 952 that the keys are presented in the same format used by the authenc 953 template, and that the IV appears at the end of the authenticated 954 associated data (AAD) region (which is how dm-crypt uses it.) 955 956 Note that the use of ESSIV is not recommended for new deployments, 957 and so this only needs to be enabled when interoperability with 958 existing encrypted volumes of filesystems is required, or when 959 building for a particular system that requires it (e.g., when 960 the SoC in question has accelerated CBC but not XTS, making CBC 961 combined with ESSIV the only feasible mode for h/w accelerated 962 block encryption) 963 964endmenu 965 966menu "Hashes, digests, and MACs" 967 968config CRYPTO_BLAKE2B 969 tristate "BLAKE2b" 970 select CRYPTO_HASH 971 help 972 BLAKE2b cryptographic hash function (RFC 7693) 973 974 BLAKE2b is optimized for 64-bit platforms and can produce digests 975 of any size between 1 and 64 bytes. The keyed hash is also implemented. 976 977 This module provides the following algorithms: 978 - blake2b-160 979 - blake2b-256 980 - blake2b-384 981 - blake2b-512 982 983 Used by the btrfs filesystem. 984 985 See https://blake2.net for further information. 986 987config CRYPTO_CMAC 988 tristate "CMAC (Cipher-based MAC)" 989 select CRYPTO_HASH 990 select CRYPTO_MANAGER 991 help 992 CMAC (Cipher-based Message Authentication Code) authentication 993 mode (NIST SP800-38B and IETF RFC4493) 994 995config CRYPTO_GHASH 996 tristate "GHASH" 997 select CRYPTO_HASH 998 select CRYPTO_LIB_GF128MUL 999 help 1000 GCM GHASH function (NIST SP800-38D) 1001 1002config CRYPTO_HMAC 1003 tristate "HMAC (Keyed-Hash MAC)" 1004 select CRYPTO_HASH 1005 select CRYPTO_MANAGER 1006 help 1007 HMAC (Keyed-Hash Message Authentication Code) (FIPS 198 and 1008 RFC2104) 1009 1010 This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP). 1011 1012config CRYPTO_MD4 1013 tristate "MD4" 1014 select CRYPTO_HASH 1015 help 1016 MD4 message digest algorithm (RFC1320) 1017 1018config CRYPTO_MD5 1019 tristate "MD5" 1020 select CRYPTO_HASH 1021 help 1022 MD5 message digest algorithm (RFC1321) 1023 1024config CRYPTO_MICHAEL_MIC 1025 tristate "Michael MIC" 1026 select CRYPTO_HASH 1027 help 1028 Michael MIC (Message Integrity Code) (IEEE 802.11i) 1029 1030 Defined by the IEEE 802.11i TKIP (Temporal Key Integrity Protocol), 1031 known as WPA (Wif-Fi Protected Access). 1032 1033 This algorithm is required for TKIP, but it should not be used for 1034 other purposes because of the weakness of the algorithm. 1035 1036config CRYPTO_POLYVAL 1037 tristate 1038 select CRYPTO_HASH 1039 select CRYPTO_LIB_GF128MUL 1040 help 1041 POLYVAL hash function for HCTR2 1042 1043 This is used in HCTR2. It is not a general-purpose 1044 cryptographic hash function. 1045 1046config CRYPTO_POLY1305 1047 tristate "Poly1305" 1048 select CRYPTO_HASH 1049 select CRYPTO_LIB_POLY1305_GENERIC 1050 help 1051 Poly1305 authenticator algorithm (RFC7539) 1052 1053 Poly1305 is an authenticator algorithm designed by Daniel J. Bernstein. 1054 It is used for the ChaCha20-Poly1305 AEAD, specified in RFC7539 for use 1055 in IETF protocols. This is the portable C implementation of Poly1305. 1056 1057config CRYPTO_RMD160 1058 tristate "RIPEMD-160" 1059 select CRYPTO_HASH 1060 help 1061 RIPEMD-160 hash function (ISO/IEC 10118-3) 1062 1063 RIPEMD-160 is a 160-bit cryptographic hash function. It is intended 1064 to be used as a secure replacement for the 128-bit hash functions 1065 MD4, MD5 and its predecessor RIPEMD 1066 (not to be confused with RIPEMD-128). 1067 1068 Its speed is comparable to SHA-1 and there are no known attacks 1069 against RIPEMD-160. 1070 1071 Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel. 1072 See https://homes.esat.kuleuven.be/~bosselae/ripemd160.html 1073 for further information. 1074 1075config CRYPTO_SHA1 1076 tristate "SHA-1" 1077 select CRYPTO_HASH 1078 select CRYPTO_LIB_SHA1 1079 help 1080 SHA-1 secure hash algorithm (FIPS 180, ISO/IEC 10118-3) 1081 1082config CRYPTO_SHA256 1083 tristate "SHA-224 and SHA-256" 1084 select CRYPTO_HASH 1085 select CRYPTO_LIB_SHA256 1086 help 1087 SHA-224 and SHA-256 secure hash algorithms (FIPS 180, ISO/IEC 10118-3) 1088 1089 This is required for IPsec AH (XFRM_AH) and IPsec ESP (XFRM_ESP). 1090 Used by the btrfs filesystem, Ceph, NFS, and SMB. 1091 1092config CRYPTO_SHA512 1093 tristate "SHA-384 and SHA-512" 1094 select CRYPTO_HASH 1095 help 1096 SHA-384 and SHA-512 secure hash algorithms (FIPS 180, ISO/IEC 10118-3) 1097 1098config CRYPTO_SHA3 1099 tristate "SHA-3" 1100 select CRYPTO_HASH 1101 help 1102 SHA-3 secure hash algorithms (FIPS 202, ISO/IEC 10118-3) 1103 1104config CRYPTO_SM3 1105 tristate 1106 1107config CRYPTO_SM3_GENERIC 1108 tristate "SM3 (ShangMi 3)" 1109 select CRYPTO_HASH 1110 select CRYPTO_SM3 1111 help 1112 SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012, ISO/IEC 10118-3) 1113 1114 This is part of the Chinese Commercial Cryptography suite. 1115 1116 References: 1117 http://www.oscca.gov.cn/UpFile/20101222141857786.pdf 1118 https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash 1119 1120config CRYPTO_STREEBOG 1121 tristate "Streebog" 1122 select CRYPTO_HASH 1123 help 1124 Streebog Hash Function (GOST R 34.11-2012, RFC 6986, ISO/IEC 10118-3) 1125 1126 This is one of the Russian cryptographic standard algorithms (called 1127 GOST algorithms). This setting enables two hash algorithms with 1128 256 and 512 bits output. 1129 1130 References: 1131 https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf 1132 https://tools.ietf.org/html/rfc6986 1133 1134config CRYPTO_VMAC 1135 tristate "VMAC" 1136 select CRYPTO_HASH 1137 select CRYPTO_MANAGER 1138 help 1139 VMAC is a message authentication algorithm designed for 1140 very high speed on 64-bit architectures. 1141 1142 See https://fastcrypto.org/vmac for further information. 1143 1144config CRYPTO_WP512 1145 tristate "Whirlpool" 1146 select CRYPTO_HASH 1147 help 1148 Whirlpool hash function (ISO/IEC 10118-3) 1149 1150 512, 384 and 256-bit hashes. 1151 1152 Whirlpool-512 is part of the NESSIE cryptographic primitives. 1153 1154 See https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html 1155 for further information. 1156 1157config CRYPTO_XCBC 1158 tristate "XCBC-MAC (Extended Cipher Block Chaining MAC)" 1159 select CRYPTO_HASH 1160 select CRYPTO_MANAGER 1161 help 1162 XCBC-MAC (Extended Cipher Block Chaining Message Authentication 1163 Code) (RFC3566) 1164 1165config CRYPTO_XXHASH 1166 tristate "xxHash" 1167 select CRYPTO_HASH 1168 select XXHASH 1169 help 1170 xxHash non-cryptographic hash algorithm 1171 1172 Extremely fast, working at speeds close to RAM limits. 1173 1174 Used by the btrfs filesystem. 1175 1176endmenu 1177 1178menu "CRCs (cyclic redundancy checks)" 1179 1180config CRYPTO_CRC32C 1181 tristate "CRC32c" 1182 select CRYPTO_HASH 1183 select CRC32 1184 help 1185 CRC32c CRC algorithm with the iSCSI polynomial (RFC 3385 and RFC 3720) 1186 1187 A 32-bit CRC (cyclic redundancy check) with a polynomial defined 1188 by G. Castagnoli, S. Braeuer and M. Herrman in "Optimization of Cyclic 1189 Redundancy-Check Codes with 24 and 32 Parity Bits", IEEE Transactions 1190 on Communications, Vol. 41, No. 6, June 1993, selected for use with 1191 iSCSI. 1192 1193 Used by btrfs, ext4, jbd2, NVMeoF/TCP, and iSCSI. 1194 1195config CRYPTO_CRC32 1196 tristate "CRC32" 1197 select CRYPTO_HASH 1198 select CRC32 1199 help 1200 CRC32 CRC algorithm (IEEE 802.3) 1201 1202 Used by RoCEv2 and f2fs. 1203 1204config CRYPTO_CRCT10DIF 1205 tristate "CRCT10DIF" 1206 select CRYPTO_HASH 1207 help 1208 CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF) 1209 1210 CRC algorithm used by the SCSI Block Commands standard. 1211 1212config CRYPTO_CRC64_ROCKSOFT 1213 tristate "CRC64 based on Rocksoft Model algorithm" 1214 depends on CRC64 1215 select CRYPTO_HASH 1216 help 1217 CRC64 CRC algorithm based on the Rocksoft Model CRC Algorithm 1218 1219 Used by the NVMe implementation of T10 DIF (BLK_DEV_INTEGRITY) 1220 1221 See https://zlib.net/crc_v3.txt 1222 1223endmenu 1224 1225menu "Compression" 1226 1227config CRYPTO_DEFLATE 1228 tristate "Deflate" 1229 select CRYPTO_ALGAPI 1230 select CRYPTO_ACOMP2 1231 select ZLIB_INFLATE 1232 select ZLIB_DEFLATE 1233 help 1234 Deflate compression algorithm (RFC1951) 1235 1236 Used by IPSec with the IPCOMP protocol (RFC3173, RFC2394) 1237 1238config CRYPTO_LZO 1239 tristate "LZO" 1240 select CRYPTO_ALGAPI 1241 select CRYPTO_ACOMP2 1242 select LZO_COMPRESS 1243 select LZO_DECOMPRESS 1244 help 1245 LZO compression algorithm 1246 1247 See https://www.oberhumer.com/opensource/lzo/ for further information. 1248 1249config CRYPTO_842 1250 tristate "842" 1251 select CRYPTO_ALGAPI 1252 select CRYPTO_ACOMP2 1253 select 842_COMPRESS 1254 select 842_DECOMPRESS 1255 help 1256 842 compression algorithm by IBM 1257 1258 See https://github.com/plauth/lib842 for further information. 1259 1260config CRYPTO_LZ4 1261 tristate "LZ4" 1262 select CRYPTO_ALGAPI 1263 select CRYPTO_ACOMP2 1264 select LZ4_COMPRESS 1265 select LZ4_DECOMPRESS 1266 help 1267 LZ4 compression algorithm 1268 1269 See https://github.com/lz4/lz4 for further information. 1270 1271config CRYPTO_LZ4HC 1272 tristate "LZ4HC" 1273 select CRYPTO_ALGAPI 1274 select CRYPTO_ACOMP2 1275 select LZ4HC_COMPRESS 1276 select LZ4_DECOMPRESS 1277 help 1278 LZ4 high compression mode algorithm 1279 1280 See https://github.com/lz4/lz4 for further information. 1281 1282config CRYPTO_ZSTD 1283 tristate "Zstd" 1284 select CRYPTO_ALGAPI 1285 select CRYPTO_ACOMP2 1286 select ZSTD_COMPRESS 1287 select ZSTD_DECOMPRESS 1288 help 1289 zstd compression algorithm 1290 1291 See https://github.com/facebook/zstd for further information. 1292 1293endmenu 1294 1295menu "Random number generation" 1296 1297config CRYPTO_ANSI_CPRNG 1298 tristate "ANSI PRNG (Pseudo Random Number Generator)" 1299 select CRYPTO_AES 1300 select CRYPTO_RNG 1301 help 1302 Pseudo RNG (random number generator) (ANSI X9.31 Appendix A.2.4) 1303 1304 This uses the AES cipher algorithm. 1305 1306 Note that this option must be enabled if CRYPTO_FIPS is selected 1307 1308menuconfig CRYPTO_DRBG_MENU 1309 tristate "NIST SP800-90A DRBG (Deterministic Random Bit Generator)" 1310 help 1311 DRBG (Deterministic Random Bit Generator) (NIST SP800-90A) 1312 1313 In the following submenu, one or more of the DRBG types must be selected. 1314 1315if CRYPTO_DRBG_MENU 1316 1317config CRYPTO_DRBG_HMAC 1318 bool 1319 default y 1320 select CRYPTO_HMAC 1321 select CRYPTO_SHA512 1322 1323config CRYPTO_DRBG_HASH 1324 bool "Hash_DRBG" 1325 select CRYPTO_SHA256 1326 help 1327 Hash_DRBG variant as defined in NIST SP800-90A. 1328 1329 This uses the SHA-1, SHA-256, SHA-384, or SHA-512 hash algorithms. 1330 1331config CRYPTO_DRBG_CTR 1332 bool "CTR_DRBG" 1333 select CRYPTO_AES 1334 select CRYPTO_CTR 1335 help 1336 CTR_DRBG variant as defined in NIST SP800-90A. 1337 1338 This uses the AES cipher algorithm with the counter block mode. 1339 1340config CRYPTO_DRBG 1341 tristate 1342 default CRYPTO_DRBG_MENU 1343 select CRYPTO_RNG 1344 select CRYPTO_JITTERENTROPY 1345 1346endif # if CRYPTO_DRBG_MENU 1347 1348config CRYPTO_JITTERENTROPY 1349 tristate "CPU Jitter Non-Deterministic RNG (Random Number Generator)" 1350 select CRYPTO_RNG 1351 select CRYPTO_SHA3 1352 help 1353 CPU Jitter RNG (Random Number Generator) from the Jitterentropy library 1354 1355 A non-physical non-deterministic ("true") RNG (e.g., an entropy source 1356 compliant with NIST SP800-90B) intended to provide a seed to a 1357 deterministic RNG (e.g., per NIST SP800-90C). 1358 This RNG does not perform any cryptographic whitening of the generated 1359 random numbers. 1360 1361 See https://www.chronox.de/jent/ 1362 1363config CRYPTO_JITTERENTROPY_TESTINTERFACE 1364 bool "CPU Jitter RNG Test Interface" 1365 depends on CRYPTO_JITTERENTROPY 1366 help 1367 The test interface allows a privileged process to capture 1368 the raw unconditioned high resolution time stamp noise that 1369 is collected by the Jitter RNG for statistical analysis. As 1370 this data is used at the same time to generate random bits, 1371 the Jitter RNG operates in an insecure mode as long as the 1372 recording is enabled. This interface therefore is only 1373 intended for testing purposes and is not suitable for 1374 production systems. 1375 1376 The raw noise data can be obtained using the jent_raw_hires 1377 debugfs file. Using the option 1378 jitterentropy_testing.boot_raw_hires_test=1 the raw noise of 1379 the first 1000 entropy events since boot can be sampled. 1380 1381 If unsure, select N. 1382 1383config CRYPTO_KDF800108_CTR 1384 tristate 1385 select CRYPTO_HMAC 1386 select CRYPTO_SHA256 1387 1388endmenu 1389menu "Userspace interface" 1390 1391config CRYPTO_USER_API 1392 tristate 1393 1394config CRYPTO_USER_API_HASH 1395 tristate "Hash algorithms" 1396 depends on NET 1397 select CRYPTO_HASH 1398 select CRYPTO_USER_API 1399 help 1400 Enable the userspace interface for hash algorithms. 1401 1402 See Documentation/crypto/userspace-if.rst and 1403 https://www.chronox.de/libkcapi/html/index.html 1404 1405config CRYPTO_USER_API_SKCIPHER 1406 tristate "Symmetric key cipher algorithms" 1407 depends on NET 1408 select CRYPTO_SKCIPHER 1409 select CRYPTO_USER_API 1410 help 1411 Enable the userspace interface for symmetric key cipher algorithms. 1412 1413 See Documentation/crypto/userspace-if.rst and 1414 https://www.chronox.de/libkcapi/html/index.html 1415 1416config CRYPTO_USER_API_RNG 1417 tristate "RNG (random number generator) algorithms" 1418 depends on NET 1419 select CRYPTO_RNG 1420 select CRYPTO_USER_API 1421 help 1422 Enable the userspace interface for RNG (random number generator) 1423 algorithms. 1424 1425 See Documentation/crypto/userspace-if.rst and 1426 https://www.chronox.de/libkcapi/html/index.html 1427 1428config CRYPTO_USER_API_RNG_CAVP 1429 bool "Enable CAVP testing of DRBG" 1430 depends on CRYPTO_USER_API_RNG && CRYPTO_DRBG 1431 help 1432 Enable extra APIs in the userspace interface for NIST CAVP 1433 (Cryptographic Algorithm Validation Program) testing: 1434 - resetting DRBG entropy 1435 - providing Additional Data 1436 1437 This should only be enabled for CAVP testing. You should say 1438 no unless you know what this is. 1439 1440config CRYPTO_USER_API_AEAD 1441 tristate "AEAD cipher algorithms" 1442 depends on NET 1443 select CRYPTO_AEAD 1444 select CRYPTO_SKCIPHER 1445 select CRYPTO_NULL 1446 select CRYPTO_USER_API 1447 help 1448 Enable the userspace interface for AEAD cipher algorithms. 1449 1450 See Documentation/crypto/userspace-if.rst and 1451 https://www.chronox.de/libkcapi/html/index.html 1452 1453config CRYPTO_USER_API_ENABLE_OBSOLETE 1454 bool "Obsolete cryptographic algorithms" 1455 depends on CRYPTO_USER_API 1456 default y 1457 help 1458 Allow obsolete cryptographic algorithms to be selected that have 1459 already been phased out from internal use by the kernel, and are 1460 only useful for userspace clients that still rely on them. 1461 1462config CRYPTO_STATS 1463 bool "Crypto usage statistics" 1464 depends on CRYPTO_USER 1465 help 1466 Enable the gathering of crypto stats. 1467 1468 Enabling this option reduces the performance of the crypto API. It 1469 should only be enabled when there is actually a use case for it. 1470 1471 This collects data sizes, numbers of requests, and numbers 1472 of errors processed by: 1473 - AEAD ciphers (encrypt, decrypt) 1474 - asymmetric key ciphers (encrypt, decrypt, verify, sign) 1475 - symmetric key ciphers (encrypt, decrypt) 1476 - compression algorithms (compress, decompress) 1477 - hash algorithms (hash) 1478 - key-agreement protocol primitives (setsecret, generate 1479 public key, compute shared secret) 1480 - RNG (generate, seed) 1481 1482endmenu 1483 1484config CRYPTO_HASH_INFO 1485 bool 1486 1487if !KMSAN # avoid false positives from assembly 1488if ARM 1489source "arch/arm/crypto/Kconfig" 1490endif 1491if ARM64 1492source "arch/arm64/crypto/Kconfig" 1493endif 1494if LOONGARCH 1495source "arch/loongarch/crypto/Kconfig" 1496endif 1497if MIPS 1498source "arch/mips/crypto/Kconfig" 1499endif 1500if PPC 1501source "arch/powerpc/crypto/Kconfig" 1502endif 1503if RISCV 1504source "arch/riscv/crypto/Kconfig" 1505endif 1506if S390 1507source "arch/s390/crypto/Kconfig" 1508endif 1509if SPARC 1510source "arch/sparc/crypto/Kconfig" 1511endif 1512if X86 1513source "arch/x86/crypto/Kconfig" 1514endif 1515endif 1516 1517source "drivers/crypto/Kconfig" 1518source "crypto/asymmetric_keys/Kconfig" 1519source "certs/Kconfig" 1520 1521endif # if CRYPTO 1522