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