Commit 8cb51ba8e06570a5fff674b3744d12a1b089f2d0
Committed by
Herbert Xu
1 parent
f139cfa7cd
Exists in
master
and in
4 other branches
crypto: crc32c - Use Intel CRC32 instruction
From NHM processor onward, Intel processors can support hardware accelerated CRC32c algorithm with the new CRC32 instruction in SSE 4.2 instruction set. The patch detects the availability of the feature, and chooses the most proper way to calculate CRC32c checksum. Byte code instructions are used for compiler compatibility. No MMX / XMM registers is involved in the implementation. Signed-off-by: Austin Zhang <austin.zhang@intel.com> Signed-off-by: Kent Liu <kent.liu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Showing 3 changed files with 211 additions and 0 deletions Inline Diff
arch/x86/crypto/Makefile
1 | # | 1 | # |
2 | # Arch-specific CryptoAPI modules. | 2 | # Arch-specific CryptoAPI modules. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o | 5 | obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o |
6 | obj-$(CONFIG_CRYPTO_TWOFISH_586) += twofish-i586.o | 6 | obj-$(CONFIG_CRYPTO_TWOFISH_586) += twofish-i586.o |
7 | obj-$(CONFIG_CRYPTO_SALSA20_586) += salsa20-i586.o | 7 | obj-$(CONFIG_CRYPTO_SALSA20_586) += salsa20-i586.o |
8 | 8 | ||
9 | obj-$(CONFIG_CRYPTO_AES_X86_64) += aes-x86_64.o | 9 | obj-$(CONFIG_CRYPTO_AES_X86_64) += aes-x86_64.o |
10 | obj-$(CONFIG_CRYPTO_TWOFISH_X86_64) += twofish-x86_64.o | 10 | obj-$(CONFIG_CRYPTO_TWOFISH_X86_64) += twofish-x86_64.o |
11 | obj-$(CONFIG_CRYPTO_SALSA20_X86_64) += salsa20-x86_64.o | 11 | obj-$(CONFIG_CRYPTO_SALSA20_X86_64) += salsa20-x86_64.o |
12 | 12 | ||
13 | obj-$(CONFIG_CRYPTO_CRC32C_INTEL) += crc32c-intel.o | ||
14 | |||
13 | aes-i586-y := aes-i586-asm_32.o aes_glue.o | 15 | aes-i586-y := aes-i586-asm_32.o aes_glue.o |
14 | twofish-i586-y := twofish-i586-asm_32.o twofish_glue.o | 16 | twofish-i586-y := twofish-i586-asm_32.o twofish_glue.o |
15 | salsa20-i586-y := salsa20-i586-asm_32.o salsa20_glue.o | 17 | salsa20-i586-y := salsa20-i586-asm_32.o salsa20_glue.o |
16 | 18 | ||
17 | aes-x86_64-y := aes-x86_64-asm_64.o aes_glue.o | 19 | aes-x86_64-y := aes-x86_64-asm_64.o aes_glue.o |
18 | twofish-x86_64-y := twofish-x86_64-asm_64.o twofish_glue.o | 20 | twofish-x86_64-y := twofish-x86_64-asm_64.o twofish_glue.o |
19 | salsa20-x86_64-y := salsa20-x86_64-asm_64.o salsa20_glue.o | 21 | salsa20-x86_64-y := salsa20-x86_64-asm_64.o salsa20_glue.o |
20 | 22 |
arch/x86/crypto/crc32c-intel.c
File was created | 1 | /* | |
2 | * Using hardware provided CRC32 instruction to accelerate the CRC32 disposal. | ||
3 | * CRC32C polynomial:0x1EDC6F41(BE)/0x82F63B78(LE) | ||
4 | * CRC32 is a new instruction in Intel SSE4.2, the reference can be found at: | ||
5 | * http://www.intel.com/products/processor/manuals/ | ||
6 | * Intel(R) 64 and IA-32 Architectures Software Developer's Manual | ||
7 | * Volume 2A: Instruction Set Reference, A-M | ||
8 | * | ||
9 | * Copyright (c) 2008 Austin Zhang <austin_zhang@linux.intel.com> | ||
10 | * Copyright (c) 2008 Kent Liu <kent.liu@intel.com> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the Free | ||
14 | * Software Foundation; either version 2 of the License, or (at your option) | ||
15 | * any later version. | ||
16 | * | ||
17 | */ | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/module.h> | ||
20 | #include <linux/string.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <crypto/internal/hash.h> | ||
23 | |||
24 | #include <asm/cpufeature.h> | ||
25 | |||
26 | #define CHKSUM_BLOCK_SIZE 1 | ||
27 | #define CHKSUM_DIGEST_SIZE 4 | ||
28 | |||
29 | #define SCALE_F sizeof(unsigned long) | ||
30 | |||
31 | #ifdef CONFIG_X86_64 | ||
32 | #define REX_PRE "0x48, " | ||
33 | #else | ||
34 | #define REX_PRE | ||
35 | #endif | ||
36 | |||
37 | static u32 crc32c_intel_le_hw_byte(u32 crc, unsigned char const *data, size_t length) | ||
38 | { | ||
39 | while (length--) { | ||
40 | __asm__ __volatile__( | ||
41 | ".byte 0xf2, 0xf, 0x38, 0xf0, 0xf1" | ||
42 | :"=S"(crc) | ||
43 | :"0"(crc), "c"(*data) | ||
44 | ); | ||
45 | data++; | ||
46 | } | ||
47 | |||
48 | return crc; | ||
49 | } | ||
50 | |||
51 | static u32 __pure crc32c_intel_le_hw(u32 crc, unsigned char const *p, size_t len) | ||
52 | { | ||
53 | unsigned int iquotient = len / SCALE_F; | ||
54 | unsigned int iremainder = len % SCALE_F; | ||
55 | unsigned long *ptmp = (unsigned long *)p; | ||
56 | |||
57 | while (iquotient--) { | ||
58 | __asm__ __volatile__( | ||
59 | ".byte 0xf2, " REX_PRE "0xf, 0x38, 0xf1, 0xf1;" | ||
60 | :"=S"(crc) | ||
61 | :"0"(crc), "c"(*ptmp) | ||
62 | ); | ||
63 | ptmp++; | ||
64 | } | ||
65 | |||
66 | if (iremainder) | ||
67 | crc = crc32c_intel_le_hw_byte(crc, (unsigned char *)ptmp, | ||
68 | iremainder); | ||
69 | |||
70 | return crc; | ||
71 | } | ||
72 | |||
73 | /* | ||
74 | * Setting the seed allows arbitrary accumulators and flexible XOR policy | ||
75 | * If your algorithm starts with ~0, then XOR with ~0 before you set | ||
76 | * the seed. | ||
77 | */ | ||
78 | static int crc32c_intel_setkey(struct crypto_ahash *hash, const u8 *key, | ||
79 | unsigned int keylen) | ||
80 | { | ||
81 | u32 *mctx = crypto_ahash_ctx(hash); | ||
82 | |||
83 | if (keylen != sizeof(u32)) { | ||
84 | crypto_ahash_set_flags(hash, CRYPTO_TFM_RES_BAD_KEY_LEN); | ||
85 | return -EINVAL; | ||
86 | } | ||
87 | *mctx = le32_to_cpup((__le32 *)key); | ||
88 | return 0; | ||
89 | } | ||
90 | |||
91 | static int crc32c_intel_init(struct ahash_request *req) | ||
92 | { | ||
93 | u32 *mctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req)); | ||
94 | u32 *crcp = ahash_request_ctx(req); | ||
95 | |||
96 | *crcp = *mctx; | ||
97 | |||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | static int crc32c_intel_update(struct ahash_request *req) | ||
102 | { | ||
103 | struct crypto_hash_walk walk; | ||
104 | u32 *crcp = ahash_request_ctx(req); | ||
105 | u32 crc = *crcp; | ||
106 | int nbytes; | ||
107 | |||
108 | for (nbytes = crypto_hash_walk_first(req, &walk); nbytes; | ||
109 | nbytes = crypto_hash_walk_done(&walk, 0)) | ||
110 | crc = crc32c_intel_le_hw(crc, walk.data, nbytes); | ||
111 | |||
112 | *crcp = crc; | ||
113 | return 0; | ||
114 | } | ||
115 | |||
116 | static int crc32c_intel_final(struct ahash_request *req) | ||
117 | { | ||
118 | u32 *crcp = ahash_request_ctx(req); | ||
119 | |||
120 | *(__le32 *)req->result = ~cpu_to_le32p(crcp); | ||
121 | return 0; | ||
122 | } | ||
123 | |||
124 | static int crc32c_intel_digest(struct ahash_request *req) | ||
125 | { | ||
126 | struct crypto_hash_walk walk; | ||
127 | u32 *mctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req)); | ||
128 | u32 crc = *mctx; | ||
129 | int nbytes; | ||
130 | |||
131 | for (nbytes = crypto_hash_walk_first(req, &walk); nbytes; | ||
132 | nbytes = crypto_hash_walk_done(&walk, 0)) | ||
133 | crc = crc32c_intel_le_hw(crc, walk.data, nbytes); | ||
134 | |||
135 | *(__le32 *)req->result = ~cpu_to_le32(crc); | ||
136 | return 0; | ||
137 | } | ||
138 | |||
139 | static int crc32c_intel_cra_init(struct crypto_tfm *tfm) | ||
140 | { | ||
141 | u32 *key = crypto_tfm_ctx(tfm); | ||
142 | |||
143 | *key = ~0; | ||
144 | |||
145 | tfm->crt_ahash.reqsize = sizeof(u32); | ||
146 | |||
147 | return 0; | ||
148 | } | ||
149 | |||
150 | static struct crypto_alg alg = { | ||
151 | .cra_name = "crc32c", | ||
152 | .cra_driver_name = "crc32c-intel", | ||
153 | .cra_priority = 200, | ||
154 | .cra_flags = CRYPTO_ALG_TYPE_AHASH, | ||
155 | .cra_blocksize = CHKSUM_BLOCK_SIZE, | ||
156 | .cra_alignmask = 3, | ||
157 | .cra_ctxsize = sizeof(u32), | ||
158 | .cra_module = THIS_MODULE, | ||
159 | .cra_list = LIST_HEAD_INIT(alg.cra_list), | ||
160 | .cra_init = crc32c_intel_cra_init, | ||
161 | .cra_type = &crypto_ahash_type, | ||
162 | .cra_u = { | ||
163 | .ahash = { | ||
164 | .digestsize = CHKSUM_DIGEST_SIZE, | ||
165 | .setkey = crc32c_intel_setkey, | ||
166 | .init = crc32c_intel_init, | ||
167 | .update = crc32c_intel_update, | ||
168 | .final = crc32c_intel_final, | ||
169 | .digest = crc32c_intel_digest, | ||
170 | } | ||
171 | } | ||
172 | }; | ||
173 | |||
174 | |||
175 | static int __init crc32c_intel_mod_init(void) | ||
176 | { | ||
177 | if (cpu_has_xmm4_2) | ||
178 | return crypto_register_alg(&alg); | ||
179 | else | ||
180 | return -ENODEV; | ||
181 | } | ||
182 | |||
183 | static void __exit crc32c_intel_mod_fini(void) | ||
184 | { | ||
185 | crypto_unregister_alg(&alg); | ||
186 | } | ||
187 | |||
188 | module_init(crc32c_intel_mod_init); | ||
189 | module_exit(crc32c_intel_mod_fini); | ||
190 | |||
191 | MODULE_AUTHOR("Austin Zhang <austin.zhang@intel.com>, Kent Liu <kent.liu@intel.com>"); | ||
192 | MODULE_DESCRIPTION("CRC32c (Castagnoli) optimization using Intel Hardware."); | ||
193 | MODULE_LICENSE("GPL"); | ||
194 | |||
195 | MODULE_ALIAS("crc32c"); | ||
196 | MODULE_ALIAS("crc32c-intel"); | ||
197 | |||
198 |
crypto/Kconfig
1 | # | 1 | # |
2 | # Generic algorithms support | 2 | # Generic algorithms support |
3 | # | 3 | # |
4 | config XOR_BLOCKS | 4 | config XOR_BLOCKS |
5 | tristate | 5 | tristate |
6 | 6 | ||
7 | # | 7 | # |
8 | # async_tx api: hardware offloaded memory transfer/transform support | 8 | # async_tx api: hardware offloaded memory transfer/transform support |
9 | # | 9 | # |
10 | source "crypto/async_tx/Kconfig" | 10 | source "crypto/async_tx/Kconfig" |
11 | 11 | ||
12 | # | 12 | # |
13 | # Cryptographic API Configuration | 13 | # Cryptographic API Configuration |
14 | # | 14 | # |
15 | menuconfig CRYPTO | 15 | menuconfig CRYPTO |
16 | tristate "Cryptographic API" | 16 | tristate "Cryptographic API" |
17 | help | 17 | help |
18 | This option provides the core Cryptographic API. | 18 | This option provides the core Cryptographic API. |
19 | 19 | ||
20 | if CRYPTO | 20 | if CRYPTO |
21 | 21 | ||
22 | comment "Crypto core or helper" | 22 | comment "Crypto core or helper" |
23 | 23 | ||
24 | config CRYPTO_ALGAPI | 24 | config CRYPTO_ALGAPI |
25 | tristate | 25 | tristate |
26 | help | 26 | help |
27 | This option provides the API for cryptographic algorithms. | 27 | This option provides the API for cryptographic algorithms. |
28 | 28 | ||
29 | config CRYPTO_AEAD | 29 | config CRYPTO_AEAD |
30 | tristate | 30 | tristate |
31 | select CRYPTO_ALGAPI | 31 | select CRYPTO_ALGAPI |
32 | 32 | ||
33 | config CRYPTO_BLKCIPHER | 33 | config CRYPTO_BLKCIPHER |
34 | tristate | 34 | tristate |
35 | select CRYPTO_ALGAPI | 35 | select CRYPTO_ALGAPI |
36 | 36 | ||
37 | config CRYPTO_HASH | 37 | config CRYPTO_HASH |
38 | tristate | 38 | tristate |
39 | select CRYPTO_ALGAPI | 39 | select CRYPTO_ALGAPI |
40 | 40 | ||
41 | config CRYPTO_MANAGER | 41 | config CRYPTO_MANAGER |
42 | tristate "Cryptographic algorithm manager" | 42 | tristate "Cryptographic algorithm manager" |
43 | select CRYPTO_ALGAPI | 43 | select CRYPTO_ALGAPI |
44 | help | 44 | help |
45 | Create default cryptographic template instantiations such as | 45 | Create default cryptographic template instantiations such as |
46 | cbc(aes). | 46 | cbc(aes). |
47 | 47 | ||
48 | config CRYPTO_GF128MUL | 48 | config CRYPTO_GF128MUL |
49 | tristate "GF(2^128) multiplication functions (EXPERIMENTAL)" | 49 | tristate "GF(2^128) multiplication functions (EXPERIMENTAL)" |
50 | depends on EXPERIMENTAL | 50 | depends on EXPERIMENTAL |
51 | help | 51 | help |
52 | Efficient table driven implementation of multiplications in the | 52 | Efficient table driven implementation of multiplications in the |
53 | field GF(2^128). This is needed by some cypher modes. This | 53 | field GF(2^128). This is needed by some cypher modes. This |
54 | option will be selected automatically if you select such a | 54 | option will be selected automatically if you select such a |
55 | cipher mode. Only select this option by hand if you expect to load | 55 | cipher mode. Only select this option by hand if you expect to load |
56 | an external module that requires these functions. | 56 | an external module that requires these functions. |
57 | 57 | ||
58 | config CRYPTO_NULL | 58 | config CRYPTO_NULL |
59 | tristate "Null algorithms" | 59 | tristate "Null algorithms" |
60 | select CRYPTO_ALGAPI | 60 | select CRYPTO_ALGAPI |
61 | select CRYPTO_BLKCIPHER | 61 | select CRYPTO_BLKCIPHER |
62 | help | 62 | help |
63 | These are 'Null' algorithms, used by IPsec, which do nothing. | 63 | These are 'Null' algorithms, used by IPsec, which do nothing. |
64 | 64 | ||
65 | config CRYPTO_CRYPTD | 65 | config CRYPTO_CRYPTD |
66 | tristate "Software async crypto daemon" | 66 | tristate "Software async crypto daemon" |
67 | select CRYPTO_BLKCIPHER | 67 | select CRYPTO_BLKCIPHER |
68 | select CRYPTO_HASH | 68 | select CRYPTO_HASH |
69 | select CRYPTO_MANAGER | 69 | select CRYPTO_MANAGER |
70 | help | 70 | help |
71 | This is a generic software asynchronous crypto daemon that | 71 | This is a generic software asynchronous crypto daemon that |
72 | converts an arbitrary synchronous software crypto algorithm | 72 | converts an arbitrary synchronous software crypto algorithm |
73 | into an asynchronous algorithm that executes in a kernel thread. | 73 | into an asynchronous algorithm that executes in a kernel thread. |
74 | 74 | ||
75 | config CRYPTO_AUTHENC | 75 | config CRYPTO_AUTHENC |
76 | tristate "Authenc support" | 76 | tristate "Authenc support" |
77 | select CRYPTO_AEAD | 77 | select CRYPTO_AEAD |
78 | select CRYPTO_BLKCIPHER | 78 | select CRYPTO_BLKCIPHER |
79 | select CRYPTO_MANAGER | 79 | select CRYPTO_MANAGER |
80 | select CRYPTO_HASH | 80 | select CRYPTO_HASH |
81 | help | 81 | help |
82 | Authenc: Combined mode wrapper for IPsec. | 82 | Authenc: Combined mode wrapper for IPsec. |
83 | This is required for IPSec. | 83 | This is required for IPSec. |
84 | 84 | ||
85 | config CRYPTO_TEST | 85 | config CRYPTO_TEST |
86 | tristate "Testing module" | 86 | tristate "Testing module" |
87 | depends on m | 87 | depends on m |
88 | select CRYPTO_ALGAPI | 88 | select CRYPTO_ALGAPI |
89 | select CRYPTO_AEAD | 89 | select CRYPTO_AEAD |
90 | select CRYPTO_BLKCIPHER | 90 | select CRYPTO_BLKCIPHER |
91 | help | 91 | help |
92 | Quick & dirty crypto test module. | 92 | Quick & dirty crypto test module. |
93 | 93 | ||
94 | comment "Authenticated Encryption with Associated Data" | 94 | comment "Authenticated Encryption with Associated Data" |
95 | 95 | ||
96 | config CRYPTO_CCM | 96 | config CRYPTO_CCM |
97 | tristate "CCM support" | 97 | tristate "CCM support" |
98 | select CRYPTO_CTR | 98 | select CRYPTO_CTR |
99 | select CRYPTO_AEAD | 99 | select CRYPTO_AEAD |
100 | help | 100 | help |
101 | Support for Counter with CBC MAC. Required for IPsec. | 101 | Support for Counter with CBC MAC. Required for IPsec. |
102 | 102 | ||
103 | config CRYPTO_GCM | 103 | config CRYPTO_GCM |
104 | tristate "GCM/GMAC support" | 104 | tristate "GCM/GMAC support" |
105 | select CRYPTO_CTR | 105 | select CRYPTO_CTR |
106 | select CRYPTO_AEAD | 106 | select CRYPTO_AEAD |
107 | select CRYPTO_GF128MUL | 107 | select CRYPTO_GF128MUL |
108 | help | 108 | help |
109 | Support for Galois/Counter Mode (GCM) and Galois Message | 109 | Support for Galois/Counter Mode (GCM) and Galois Message |
110 | Authentication Code (GMAC). Required for IPSec. | 110 | Authentication Code (GMAC). Required for IPSec. |
111 | 111 | ||
112 | config CRYPTO_SEQIV | 112 | config CRYPTO_SEQIV |
113 | tristate "Sequence Number IV Generator" | 113 | tristate "Sequence Number IV Generator" |
114 | select CRYPTO_AEAD | 114 | select CRYPTO_AEAD |
115 | select CRYPTO_BLKCIPHER | 115 | select CRYPTO_BLKCIPHER |
116 | help | 116 | help |
117 | This IV generator generates an IV based on a sequence number by | 117 | This IV generator generates an IV based on a sequence number by |
118 | xoring it with a salt. This algorithm is mainly useful for CTR | 118 | xoring it with a salt. This algorithm is mainly useful for CTR |
119 | 119 | ||
120 | comment "Block modes" | 120 | comment "Block modes" |
121 | 121 | ||
122 | config CRYPTO_CBC | 122 | config CRYPTO_CBC |
123 | tristate "CBC support" | 123 | tristate "CBC support" |
124 | select CRYPTO_BLKCIPHER | 124 | select CRYPTO_BLKCIPHER |
125 | select CRYPTO_MANAGER | 125 | select CRYPTO_MANAGER |
126 | help | 126 | help |
127 | CBC: Cipher Block Chaining mode | 127 | CBC: Cipher Block Chaining mode |
128 | This block cipher algorithm is required for IPSec. | 128 | This block cipher algorithm is required for IPSec. |
129 | 129 | ||
130 | config CRYPTO_CTR | 130 | config CRYPTO_CTR |
131 | tristate "CTR support" | 131 | tristate "CTR support" |
132 | select CRYPTO_BLKCIPHER | 132 | select CRYPTO_BLKCIPHER |
133 | select CRYPTO_SEQIV | 133 | select CRYPTO_SEQIV |
134 | select CRYPTO_MANAGER | 134 | select CRYPTO_MANAGER |
135 | help | 135 | help |
136 | CTR: Counter mode | 136 | CTR: Counter mode |
137 | This block cipher algorithm is required for IPSec. | 137 | This block cipher algorithm is required for IPSec. |
138 | 138 | ||
139 | config CRYPTO_CTS | 139 | config CRYPTO_CTS |
140 | tristate "CTS support" | 140 | tristate "CTS support" |
141 | select CRYPTO_BLKCIPHER | 141 | select CRYPTO_BLKCIPHER |
142 | help | 142 | help |
143 | CTS: Cipher Text Stealing | 143 | CTS: Cipher Text Stealing |
144 | This is the Cipher Text Stealing mode as described by | 144 | This is the Cipher Text Stealing mode as described by |
145 | Section 8 of rfc2040 and referenced by rfc3962. | 145 | Section 8 of rfc2040 and referenced by rfc3962. |
146 | (rfc3962 includes errata information in its Appendix A) | 146 | (rfc3962 includes errata information in its Appendix A) |
147 | This mode is required for Kerberos gss mechanism support | 147 | This mode is required for Kerberos gss mechanism support |
148 | for AES encryption. | 148 | for AES encryption. |
149 | 149 | ||
150 | config CRYPTO_ECB | 150 | config CRYPTO_ECB |
151 | tristate "ECB support" | 151 | tristate "ECB support" |
152 | select CRYPTO_BLKCIPHER | 152 | select CRYPTO_BLKCIPHER |
153 | select CRYPTO_MANAGER | 153 | select CRYPTO_MANAGER |
154 | help | 154 | help |
155 | ECB: Electronic CodeBook mode | 155 | ECB: Electronic CodeBook mode |
156 | This is the simplest block cipher algorithm. It simply encrypts | 156 | This is the simplest block cipher algorithm. It simply encrypts |
157 | the input block by block. | 157 | the input block by block. |
158 | 158 | ||
159 | config CRYPTO_LRW | 159 | config CRYPTO_LRW |
160 | tristate "LRW support (EXPERIMENTAL)" | 160 | tristate "LRW support (EXPERIMENTAL)" |
161 | depends on EXPERIMENTAL | 161 | depends on EXPERIMENTAL |
162 | select CRYPTO_BLKCIPHER | 162 | select CRYPTO_BLKCIPHER |
163 | select CRYPTO_MANAGER | 163 | select CRYPTO_MANAGER |
164 | select CRYPTO_GF128MUL | 164 | select CRYPTO_GF128MUL |
165 | help | 165 | help |
166 | LRW: Liskov Rivest Wagner, a tweakable, non malleable, non movable | 166 | LRW: Liskov Rivest Wagner, a tweakable, non malleable, non movable |
167 | narrow block cipher mode for dm-crypt. Use it with cipher | 167 | narrow block cipher mode for dm-crypt. Use it with cipher |
168 | specification string aes-lrw-benbi, the key must be 256, 320 or 384. | 168 | specification string aes-lrw-benbi, the key must be 256, 320 or 384. |
169 | The first 128, 192 or 256 bits in the key are used for AES and the | 169 | The first 128, 192 or 256 bits in the key are used for AES and the |
170 | rest is used to tie each cipher block to its logical position. | 170 | rest is used to tie each cipher block to its logical position. |
171 | 171 | ||
172 | config CRYPTO_PCBC | 172 | config CRYPTO_PCBC |
173 | tristate "PCBC support" | 173 | tristate "PCBC support" |
174 | select CRYPTO_BLKCIPHER | 174 | select CRYPTO_BLKCIPHER |
175 | select CRYPTO_MANAGER | 175 | select CRYPTO_MANAGER |
176 | help | 176 | help |
177 | PCBC: Propagating Cipher Block Chaining mode | 177 | PCBC: Propagating Cipher Block Chaining mode |
178 | This block cipher algorithm is required for RxRPC. | 178 | This block cipher algorithm is required for RxRPC. |
179 | 179 | ||
180 | config CRYPTO_XTS | 180 | config CRYPTO_XTS |
181 | tristate "XTS support (EXPERIMENTAL)" | 181 | tristate "XTS support (EXPERIMENTAL)" |
182 | depends on EXPERIMENTAL | 182 | depends on EXPERIMENTAL |
183 | select CRYPTO_BLKCIPHER | 183 | select CRYPTO_BLKCIPHER |
184 | select CRYPTO_MANAGER | 184 | select CRYPTO_MANAGER |
185 | select CRYPTO_GF128MUL | 185 | select CRYPTO_GF128MUL |
186 | help | 186 | help |
187 | XTS: IEEE1619/D16 narrow block cipher use with aes-xts-plain, | 187 | XTS: IEEE1619/D16 narrow block cipher use with aes-xts-plain, |
188 | key size 256, 384 or 512 bits. This implementation currently | 188 | key size 256, 384 or 512 bits. This implementation currently |
189 | can't handle a sectorsize which is not a multiple of 16 bytes. | 189 | can't handle a sectorsize which is not a multiple of 16 bytes. |
190 | 190 | ||
191 | comment "Hash modes" | 191 | comment "Hash modes" |
192 | 192 | ||
193 | config CRYPTO_HMAC | 193 | config CRYPTO_HMAC |
194 | tristate "HMAC support" | 194 | tristate "HMAC support" |
195 | select CRYPTO_HASH | 195 | select CRYPTO_HASH |
196 | select CRYPTO_MANAGER | 196 | select CRYPTO_MANAGER |
197 | help | 197 | help |
198 | HMAC: Keyed-Hashing for Message Authentication (RFC2104). | 198 | HMAC: Keyed-Hashing for Message Authentication (RFC2104). |
199 | This is required for IPSec. | 199 | This is required for IPSec. |
200 | 200 | ||
201 | config CRYPTO_XCBC | 201 | config CRYPTO_XCBC |
202 | tristate "XCBC support" | 202 | tristate "XCBC support" |
203 | depends on EXPERIMENTAL | 203 | depends on EXPERIMENTAL |
204 | select CRYPTO_HASH | 204 | select CRYPTO_HASH |
205 | select CRYPTO_MANAGER | 205 | select CRYPTO_MANAGER |
206 | help | 206 | help |
207 | XCBC: Keyed-Hashing with encryption algorithm | 207 | XCBC: Keyed-Hashing with encryption algorithm |
208 | http://www.ietf.org/rfc/rfc3566.txt | 208 | http://www.ietf.org/rfc/rfc3566.txt |
209 | http://csrc.nist.gov/encryption/modes/proposedmodes/ | 209 | http://csrc.nist.gov/encryption/modes/proposedmodes/ |
210 | xcbc-mac/xcbc-mac-spec.pdf | 210 | xcbc-mac/xcbc-mac-spec.pdf |
211 | 211 | ||
212 | comment "Digest" | 212 | comment "Digest" |
213 | 213 | ||
214 | config CRYPTO_CRC32C | 214 | config CRYPTO_CRC32C |
215 | tristate "CRC32c CRC algorithm" | 215 | tristate "CRC32c CRC algorithm" |
216 | select CRYPTO_HASH | 216 | select CRYPTO_HASH |
217 | select LIBCRC32C | 217 | select LIBCRC32C |
218 | help | 218 | help |
219 | Castagnoli, et al Cyclic Redundancy-Check Algorithm. Used | 219 | Castagnoli, et al Cyclic Redundancy-Check Algorithm. Used |
220 | by iSCSI for header and data digests and by others. | 220 | by iSCSI for header and data digests and by others. |
221 | See Castagnoli93. This implementation uses lib/libcrc32c. | 221 | See Castagnoli93. This implementation uses lib/libcrc32c. |
222 | Module will be crc32c. | 222 | Module will be crc32c. |
223 | 223 | ||
224 | config CRYPTO_CRC32C_INTEL | ||
225 | tristate "CRC32c INTEL hardware acceleration" | ||
226 | depends on X86 | ||
227 | select CRYPTO_HASH | ||
228 | help | ||
229 | In Intel processor with SSE4.2 supported, the processor will | ||
230 | support CRC32C implementation using hardware accelerated CRC32 | ||
231 | instruction. This option will create 'crc32c-intel' module, | ||
232 | which will enable any routine to use the CRC32 instruction to | ||
233 | gain performance compared with software implementation. | ||
234 | Module will be crc32c-intel. | ||
235 | |||
224 | config CRYPTO_MD4 | 236 | config CRYPTO_MD4 |
225 | tristate "MD4 digest algorithm" | 237 | tristate "MD4 digest algorithm" |
226 | select CRYPTO_ALGAPI | 238 | select CRYPTO_ALGAPI |
227 | help | 239 | help |
228 | MD4 message digest algorithm (RFC1320). | 240 | MD4 message digest algorithm (RFC1320). |
229 | 241 | ||
230 | config CRYPTO_MD5 | 242 | config CRYPTO_MD5 |
231 | tristate "MD5 digest algorithm" | 243 | tristate "MD5 digest algorithm" |
232 | select CRYPTO_ALGAPI | 244 | select CRYPTO_ALGAPI |
233 | help | 245 | help |
234 | MD5 message digest algorithm (RFC1321). | 246 | MD5 message digest algorithm (RFC1321). |
235 | 247 | ||
236 | config CRYPTO_MICHAEL_MIC | 248 | config CRYPTO_MICHAEL_MIC |
237 | tristate "Michael MIC keyed digest algorithm" | 249 | tristate "Michael MIC keyed digest algorithm" |
238 | select CRYPTO_ALGAPI | 250 | select CRYPTO_ALGAPI |
239 | help | 251 | help |
240 | Michael MIC is used for message integrity protection in TKIP | 252 | Michael MIC is used for message integrity protection in TKIP |
241 | (IEEE 802.11i). This algorithm is required for TKIP, but it | 253 | (IEEE 802.11i). This algorithm is required for TKIP, but it |
242 | should not be used for other purposes because of the weakness | 254 | should not be used for other purposes because of the weakness |
243 | of the algorithm. | 255 | of the algorithm. |
244 | 256 | ||
245 | config CRYPTO_RMD128 | 257 | config CRYPTO_RMD128 |
246 | tristate "RIPEMD-128 digest algorithm" | 258 | tristate "RIPEMD-128 digest algorithm" |
247 | select CRYPTO_ALGAPI | 259 | select CRYPTO_ALGAPI |
248 | help | 260 | help |
249 | RIPEMD-128 (ISO/IEC 10118-3:2004). | 261 | RIPEMD-128 (ISO/IEC 10118-3:2004). |
250 | 262 | ||
251 | RIPEMD-128 is a 128-bit cryptographic hash function. It should only | 263 | RIPEMD-128 is a 128-bit cryptographic hash function. It should only |
252 | to be used as a secure replacement for RIPEMD. For other use cases | 264 | to be used as a secure replacement for RIPEMD. For other use cases |
253 | RIPEMD-160 should be used. | 265 | RIPEMD-160 should be used. |
254 | 266 | ||
255 | Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel. | 267 | Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel. |
256 | See <http://home.esat.kuleuven.be/~bosselae/ripemd160.html> | 268 | See <http://home.esat.kuleuven.be/~bosselae/ripemd160.html> |
257 | 269 | ||
258 | config CRYPTO_RMD160 | 270 | config CRYPTO_RMD160 |
259 | tristate "RIPEMD-160 digest algorithm" | 271 | tristate "RIPEMD-160 digest algorithm" |
260 | select CRYPTO_ALGAPI | 272 | select CRYPTO_ALGAPI |
261 | help | 273 | help |
262 | RIPEMD-160 (ISO/IEC 10118-3:2004). | 274 | RIPEMD-160 (ISO/IEC 10118-3:2004). |
263 | 275 | ||
264 | RIPEMD-160 is a 160-bit cryptographic hash function. It is intended | 276 | RIPEMD-160 is a 160-bit cryptographic hash function. It is intended |
265 | to be used as a secure replacement for the 128-bit hash functions | 277 | to be used as a secure replacement for the 128-bit hash functions |
266 | MD4, MD5 and it's predecessor RIPEMD | 278 | MD4, MD5 and it's predecessor RIPEMD |
267 | (not to be confused with RIPEMD-128). | 279 | (not to be confused with RIPEMD-128). |
268 | 280 | ||
269 | It's speed is comparable to SHA1 and there are no known attacks | 281 | It's speed is comparable to SHA1 and there are no known attacks |
270 | against RIPEMD-160. | 282 | against RIPEMD-160. |
271 | 283 | ||
272 | Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel. | 284 | Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel. |
273 | See <http://home.esat.kuleuven.be/~bosselae/ripemd160.html> | 285 | See <http://home.esat.kuleuven.be/~bosselae/ripemd160.html> |
274 | 286 | ||
275 | config CRYPTO_RMD256 | 287 | config CRYPTO_RMD256 |
276 | tristate "RIPEMD-256 digest algorithm" | 288 | tristate "RIPEMD-256 digest algorithm" |
277 | select CRYPTO_ALGAPI | 289 | select CRYPTO_ALGAPI |
278 | help | 290 | help |
279 | RIPEMD-256 is an optional extension of RIPEMD-128 with a | 291 | RIPEMD-256 is an optional extension of RIPEMD-128 with a |
280 | 256 bit hash. It is intended for applications that require | 292 | 256 bit hash. It is intended for applications that require |
281 | longer hash-results, without needing a larger security level | 293 | longer hash-results, without needing a larger security level |
282 | (than RIPEMD-128). | 294 | (than RIPEMD-128). |
283 | 295 | ||
284 | Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel. | 296 | Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel. |
285 | See <http://home.esat.kuleuven.be/~bosselae/ripemd160.html> | 297 | See <http://home.esat.kuleuven.be/~bosselae/ripemd160.html> |
286 | 298 | ||
287 | config CRYPTO_RMD320 | 299 | config CRYPTO_RMD320 |
288 | tristate "RIPEMD-320 digest algorithm" | 300 | tristate "RIPEMD-320 digest algorithm" |
289 | select CRYPTO_ALGAPI | 301 | select CRYPTO_ALGAPI |
290 | help | 302 | help |
291 | RIPEMD-320 is an optional extension of RIPEMD-160 with a | 303 | RIPEMD-320 is an optional extension of RIPEMD-160 with a |
292 | 320 bit hash. It is intended for applications that require | 304 | 320 bit hash. It is intended for applications that require |
293 | longer hash-results, without needing a larger security level | 305 | longer hash-results, without needing a larger security level |
294 | (than RIPEMD-160). | 306 | (than RIPEMD-160). |
295 | 307 | ||
296 | Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel. | 308 | Developed by Hans Dobbertin, Antoon Bosselaers and Bart Preneel. |
297 | See <http://home.esat.kuleuven.be/~bosselae/ripemd160.html> | 309 | See <http://home.esat.kuleuven.be/~bosselae/ripemd160.html> |
298 | 310 | ||
299 | config CRYPTO_SHA1 | 311 | config CRYPTO_SHA1 |
300 | tristate "SHA1 digest algorithm" | 312 | tristate "SHA1 digest algorithm" |
301 | select CRYPTO_ALGAPI | 313 | select CRYPTO_ALGAPI |
302 | help | 314 | help |
303 | SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2). | 315 | SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2). |
304 | 316 | ||
305 | config CRYPTO_SHA256 | 317 | config CRYPTO_SHA256 |
306 | tristate "SHA224 and SHA256 digest algorithm" | 318 | tristate "SHA224 and SHA256 digest algorithm" |
307 | select CRYPTO_ALGAPI | 319 | select CRYPTO_ALGAPI |
308 | help | 320 | help |
309 | SHA256 secure hash standard (DFIPS 180-2). | 321 | SHA256 secure hash standard (DFIPS 180-2). |
310 | 322 | ||
311 | This version of SHA implements a 256 bit hash with 128 bits of | 323 | This version of SHA implements a 256 bit hash with 128 bits of |
312 | security against collision attacks. | 324 | security against collision attacks. |
313 | 325 | ||
314 | This code also includes SHA-224, a 224 bit hash with 112 bits | 326 | This code also includes SHA-224, a 224 bit hash with 112 bits |
315 | of security against collision attacks. | 327 | of security against collision attacks. |
316 | 328 | ||
317 | config CRYPTO_SHA512 | 329 | config CRYPTO_SHA512 |
318 | tristate "SHA384 and SHA512 digest algorithms" | 330 | tristate "SHA384 and SHA512 digest algorithms" |
319 | select CRYPTO_ALGAPI | 331 | select CRYPTO_ALGAPI |
320 | help | 332 | help |
321 | SHA512 secure hash standard (DFIPS 180-2). | 333 | SHA512 secure hash standard (DFIPS 180-2). |
322 | 334 | ||
323 | This version of SHA implements a 512 bit hash with 256 bits of | 335 | This version of SHA implements a 512 bit hash with 256 bits of |
324 | security against collision attacks. | 336 | security against collision attacks. |
325 | 337 | ||
326 | This code also includes SHA-384, a 384 bit hash with 192 bits | 338 | This code also includes SHA-384, a 384 bit hash with 192 bits |
327 | of security against collision attacks. | 339 | of security against collision attacks. |
328 | 340 | ||
329 | config CRYPTO_TGR192 | 341 | config CRYPTO_TGR192 |
330 | tristate "Tiger digest algorithms" | 342 | tristate "Tiger digest algorithms" |
331 | select CRYPTO_ALGAPI | 343 | select CRYPTO_ALGAPI |
332 | help | 344 | help |
333 | Tiger hash algorithm 192, 160 and 128-bit hashes | 345 | Tiger hash algorithm 192, 160 and 128-bit hashes |
334 | 346 | ||
335 | Tiger is a hash function optimized for 64-bit processors while | 347 | Tiger is a hash function optimized for 64-bit processors while |
336 | still having decent performance on 32-bit processors. | 348 | still having decent performance on 32-bit processors. |
337 | Tiger was developed by Ross Anderson and Eli Biham. | 349 | Tiger was developed by Ross Anderson and Eli Biham. |
338 | 350 | ||
339 | See also: | 351 | See also: |
340 | <http://www.cs.technion.ac.il/~biham/Reports/Tiger/>. | 352 | <http://www.cs.technion.ac.il/~biham/Reports/Tiger/>. |
341 | 353 | ||
342 | config CRYPTO_WP512 | 354 | config CRYPTO_WP512 |
343 | tristate "Whirlpool digest algorithms" | 355 | tristate "Whirlpool digest algorithms" |
344 | select CRYPTO_ALGAPI | 356 | select CRYPTO_ALGAPI |
345 | help | 357 | help |
346 | Whirlpool hash algorithm 512, 384 and 256-bit hashes | 358 | Whirlpool hash algorithm 512, 384 and 256-bit hashes |
347 | 359 | ||
348 | Whirlpool-512 is part of the NESSIE cryptographic primitives. | 360 | Whirlpool-512 is part of the NESSIE cryptographic primitives. |
349 | Whirlpool will be part of the ISO/IEC 10118-3:2003(E) standard | 361 | Whirlpool will be part of the ISO/IEC 10118-3:2003(E) standard |
350 | 362 | ||
351 | See also: | 363 | See also: |
352 | <http://planeta.terra.com.br/informatica/paulobarreto/WhirlpoolPage.html> | 364 | <http://planeta.terra.com.br/informatica/paulobarreto/WhirlpoolPage.html> |
353 | 365 | ||
354 | comment "Ciphers" | 366 | comment "Ciphers" |
355 | 367 | ||
356 | config CRYPTO_AES | 368 | config CRYPTO_AES |
357 | tristate "AES cipher algorithms" | 369 | tristate "AES cipher algorithms" |
358 | select CRYPTO_ALGAPI | 370 | select CRYPTO_ALGAPI |
359 | help | 371 | help |
360 | AES cipher algorithms (FIPS-197). AES uses the Rijndael | 372 | AES cipher algorithms (FIPS-197). AES uses the Rijndael |
361 | algorithm. | 373 | algorithm. |
362 | 374 | ||
363 | Rijndael appears to be consistently a very good performer in | 375 | Rijndael appears to be consistently a very good performer in |
364 | both hardware and software across a wide range of computing | 376 | both hardware and software across a wide range of computing |
365 | environments regardless of its use in feedback or non-feedback | 377 | environments regardless of its use in feedback or non-feedback |
366 | modes. Its key setup time is excellent, and its key agility is | 378 | modes. Its key setup time is excellent, and its key agility is |
367 | good. Rijndael's very low memory requirements make it very well | 379 | good. Rijndael's very low memory requirements make it very well |
368 | suited for restricted-space environments, in which it also | 380 | suited for restricted-space environments, in which it also |
369 | demonstrates excellent performance. Rijndael's operations are | 381 | demonstrates excellent performance. Rijndael's operations are |
370 | among the easiest to defend against power and timing attacks. | 382 | among the easiest to defend against power and timing attacks. |
371 | 383 | ||
372 | The AES specifies three key sizes: 128, 192 and 256 bits | 384 | The AES specifies three key sizes: 128, 192 and 256 bits |
373 | 385 | ||
374 | See <http://csrc.nist.gov/CryptoToolkit/aes/> for more information. | 386 | See <http://csrc.nist.gov/CryptoToolkit/aes/> for more information. |
375 | 387 | ||
376 | config CRYPTO_AES_586 | 388 | config CRYPTO_AES_586 |
377 | tristate "AES cipher algorithms (i586)" | 389 | tristate "AES cipher algorithms (i586)" |
378 | depends on (X86 || UML_X86) && !64BIT | 390 | depends on (X86 || UML_X86) && !64BIT |
379 | select CRYPTO_ALGAPI | 391 | select CRYPTO_ALGAPI |
380 | select CRYPTO_AES | 392 | select CRYPTO_AES |
381 | help | 393 | help |
382 | AES cipher algorithms (FIPS-197). AES uses the Rijndael | 394 | AES cipher algorithms (FIPS-197). AES uses the Rijndael |
383 | algorithm. | 395 | algorithm. |
384 | 396 | ||
385 | Rijndael appears to be consistently a very good performer in | 397 | Rijndael appears to be consistently a very good performer in |
386 | both hardware and software across a wide range of computing | 398 | both hardware and software across a wide range of computing |
387 | environments regardless of its use in feedback or non-feedback | 399 | environments regardless of its use in feedback or non-feedback |
388 | modes. Its key setup time is excellent, and its key agility is | 400 | modes. Its key setup time is excellent, and its key agility is |
389 | good. Rijndael's very low memory requirements make it very well | 401 | good. Rijndael's very low memory requirements make it very well |
390 | suited for restricted-space environments, in which it also | 402 | suited for restricted-space environments, in which it also |
391 | demonstrates excellent performance. Rijndael's operations are | 403 | demonstrates excellent performance. Rijndael's operations are |
392 | among the easiest to defend against power and timing attacks. | 404 | among the easiest to defend against power and timing attacks. |
393 | 405 | ||
394 | The AES specifies three key sizes: 128, 192 and 256 bits | 406 | The AES specifies three key sizes: 128, 192 and 256 bits |
395 | 407 | ||
396 | See <http://csrc.nist.gov/encryption/aes/> for more information. | 408 | See <http://csrc.nist.gov/encryption/aes/> for more information. |
397 | 409 | ||
398 | config CRYPTO_AES_X86_64 | 410 | config CRYPTO_AES_X86_64 |
399 | tristate "AES cipher algorithms (x86_64)" | 411 | tristate "AES cipher algorithms (x86_64)" |
400 | depends on (X86 || UML_X86) && 64BIT | 412 | depends on (X86 || UML_X86) && 64BIT |
401 | select CRYPTO_ALGAPI | 413 | select CRYPTO_ALGAPI |
402 | select CRYPTO_AES | 414 | select CRYPTO_AES |
403 | help | 415 | help |
404 | AES cipher algorithms (FIPS-197). AES uses the Rijndael | 416 | AES cipher algorithms (FIPS-197). AES uses the Rijndael |
405 | algorithm. | 417 | algorithm. |
406 | 418 | ||
407 | Rijndael appears to be consistently a very good performer in | 419 | Rijndael appears to be consistently a very good performer in |
408 | both hardware and software across a wide range of computing | 420 | both hardware and software across a wide range of computing |
409 | environments regardless of its use in feedback or non-feedback | 421 | environments regardless of its use in feedback or non-feedback |
410 | modes. Its key setup time is excellent, and its key agility is | 422 | modes. Its key setup time is excellent, and its key agility is |
411 | good. Rijndael's very low memory requirements make it very well | 423 | good. Rijndael's very low memory requirements make it very well |
412 | suited for restricted-space environments, in which it also | 424 | suited for restricted-space environments, in which it also |
413 | demonstrates excellent performance. Rijndael's operations are | 425 | demonstrates excellent performance. Rijndael's operations are |
414 | among the easiest to defend against power and timing attacks. | 426 | among the easiest to defend against power and timing attacks. |
415 | 427 | ||
416 | The AES specifies three key sizes: 128, 192 and 256 bits | 428 | The AES specifies three key sizes: 128, 192 and 256 bits |
417 | 429 | ||
418 | See <http://csrc.nist.gov/encryption/aes/> for more information. | 430 | See <http://csrc.nist.gov/encryption/aes/> for more information. |
419 | 431 | ||
420 | config CRYPTO_ANUBIS | 432 | config CRYPTO_ANUBIS |
421 | tristate "Anubis cipher algorithm" | 433 | tristate "Anubis cipher algorithm" |
422 | select CRYPTO_ALGAPI | 434 | select CRYPTO_ALGAPI |
423 | help | 435 | help |
424 | Anubis cipher algorithm. | 436 | Anubis cipher algorithm. |
425 | 437 | ||
426 | Anubis is a variable key length cipher which can use keys from | 438 | Anubis is a variable key length cipher which can use keys from |
427 | 128 bits to 320 bits in length. It was evaluated as a entrant | 439 | 128 bits to 320 bits in length. It was evaluated as a entrant |
428 | in the NESSIE competition. | 440 | in the NESSIE competition. |
429 | 441 | ||
430 | See also: | 442 | See also: |
431 | <https://www.cosic.esat.kuleuven.ac.be/nessie/reports/> | 443 | <https://www.cosic.esat.kuleuven.ac.be/nessie/reports/> |
432 | <http://planeta.terra.com.br/informatica/paulobarreto/AnubisPage.html> | 444 | <http://planeta.terra.com.br/informatica/paulobarreto/AnubisPage.html> |
433 | 445 | ||
434 | config CRYPTO_ARC4 | 446 | config CRYPTO_ARC4 |
435 | tristate "ARC4 cipher algorithm" | 447 | tristate "ARC4 cipher algorithm" |
436 | select CRYPTO_ALGAPI | 448 | select CRYPTO_ALGAPI |
437 | help | 449 | help |
438 | ARC4 cipher algorithm. | 450 | ARC4 cipher algorithm. |
439 | 451 | ||
440 | ARC4 is a stream cipher using keys ranging from 8 bits to 2048 | 452 | ARC4 is a stream cipher using keys ranging from 8 bits to 2048 |
441 | bits in length. This algorithm is required for driver-based | 453 | bits in length. This algorithm is required for driver-based |
442 | WEP, but it should not be for other purposes because of the | 454 | WEP, but it should not be for other purposes because of the |
443 | weakness of the algorithm. | 455 | weakness of the algorithm. |
444 | 456 | ||
445 | config CRYPTO_BLOWFISH | 457 | config CRYPTO_BLOWFISH |
446 | tristate "Blowfish cipher algorithm" | 458 | tristate "Blowfish cipher algorithm" |
447 | select CRYPTO_ALGAPI | 459 | select CRYPTO_ALGAPI |
448 | help | 460 | help |
449 | Blowfish cipher algorithm, by Bruce Schneier. | 461 | Blowfish cipher algorithm, by Bruce Schneier. |
450 | 462 | ||
451 | This is a variable key length cipher which can use keys from 32 | 463 | This is a variable key length cipher which can use keys from 32 |
452 | bits to 448 bits in length. It's fast, simple and specifically | 464 | bits to 448 bits in length. It's fast, simple and specifically |
453 | designed for use on "large microprocessors". | 465 | designed for use on "large microprocessors". |
454 | 466 | ||
455 | See also: | 467 | See also: |
456 | <http://www.schneier.com/blowfish.html> | 468 | <http://www.schneier.com/blowfish.html> |
457 | 469 | ||
458 | config CRYPTO_CAMELLIA | 470 | config CRYPTO_CAMELLIA |
459 | tristate "Camellia cipher algorithms" | 471 | tristate "Camellia cipher algorithms" |
460 | depends on CRYPTO | 472 | depends on CRYPTO |
461 | select CRYPTO_ALGAPI | 473 | select CRYPTO_ALGAPI |
462 | help | 474 | help |
463 | Camellia cipher algorithms module. | 475 | Camellia cipher algorithms module. |
464 | 476 | ||
465 | Camellia is a symmetric key block cipher developed jointly | 477 | Camellia is a symmetric key block cipher developed jointly |
466 | at NTT and Mitsubishi Electric Corporation. | 478 | at NTT and Mitsubishi Electric Corporation. |
467 | 479 | ||
468 | The Camellia specifies three key sizes: 128, 192 and 256 bits. | 480 | The Camellia specifies three key sizes: 128, 192 and 256 bits. |
469 | 481 | ||
470 | See also: | 482 | See also: |
471 | <https://info.isl.ntt.co.jp/crypt/eng/camellia/index_s.html> | 483 | <https://info.isl.ntt.co.jp/crypt/eng/camellia/index_s.html> |
472 | 484 | ||
473 | config CRYPTO_CAST5 | 485 | config CRYPTO_CAST5 |
474 | tristate "CAST5 (CAST-128) cipher algorithm" | 486 | tristate "CAST5 (CAST-128) cipher algorithm" |
475 | select CRYPTO_ALGAPI | 487 | select CRYPTO_ALGAPI |
476 | help | 488 | help |
477 | The CAST5 encryption algorithm (synonymous with CAST-128) is | 489 | The CAST5 encryption algorithm (synonymous with CAST-128) is |
478 | described in RFC2144. | 490 | described in RFC2144. |
479 | 491 | ||
480 | config CRYPTO_CAST6 | 492 | config CRYPTO_CAST6 |
481 | tristate "CAST6 (CAST-256) cipher algorithm" | 493 | tristate "CAST6 (CAST-256) cipher algorithm" |
482 | select CRYPTO_ALGAPI | 494 | select CRYPTO_ALGAPI |
483 | help | 495 | help |
484 | The CAST6 encryption algorithm (synonymous with CAST-256) is | 496 | The CAST6 encryption algorithm (synonymous with CAST-256) is |
485 | described in RFC2612. | 497 | described in RFC2612. |
486 | 498 | ||
487 | config CRYPTO_DES | 499 | config CRYPTO_DES |
488 | tristate "DES and Triple DES EDE cipher algorithms" | 500 | tristate "DES and Triple DES EDE cipher algorithms" |
489 | select CRYPTO_ALGAPI | 501 | select CRYPTO_ALGAPI |
490 | help | 502 | help |
491 | DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3). | 503 | DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3). |
492 | 504 | ||
493 | config CRYPTO_FCRYPT | 505 | config CRYPTO_FCRYPT |
494 | tristate "FCrypt cipher algorithm" | 506 | tristate "FCrypt cipher algorithm" |
495 | select CRYPTO_ALGAPI | 507 | select CRYPTO_ALGAPI |
496 | select CRYPTO_BLKCIPHER | 508 | select CRYPTO_BLKCIPHER |
497 | help | 509 | help |
498 | FCrypt algorithm used by RxRPC. | 510 | FCrypt algorithm used by RxRPC. |
499 | 511 | ||
500 | config CRYPTO_KHAZAD | 512 | config CRYPTO_KHAZAD |
501 | tristate "Khazad cipher algorithm" | 513 | tristate "Khazad cipher algorithm" |
502 | select CRYPTO_ALGAPI | 514 | select CRYPTO_ALGAPI |
503 | help | 515 | help |
504 | Khazad cipher algorithm. | 516 | Khazad cipher algorithm. |
505 | 517 | ||
506 | Khazad was a finalist in the initial NESSIE competition. It is | 518 | Khazad was a finalist in the initial NESSIE competition. It is |
507 | an algorithm optimized for 64-bit processors with good performance | 519 | an algorithm optimized for 64-bit processors with good performance |
508 | on 32-bit processors. Khazad uses an 128 bit key size. | 520 | on 32-bit processors. Khazad uses an 128 bit key size. |
509 | 521 | ||
510 | See also: | 522 | See also: |
511 | <http://planeta.terra.com.br/informatica/paulobarreto/KhazadPage.html> | 523 | <http://planeta.terra.com.br/informatica/paulobarreto/KhazadPage.html> |
512 | 524 | ||
513 | config CRYPTO_SALSA20 | 525 | config CRYPTO_SALSA20 |
514 | tristate "Salsa20 stream cipher algorithm (EXPERIMENTAL)" | 526 | tristate "Salsa20 stream cipher algorithm (EXPERIMENTAL)" |
515 | depends on EXPERIMENTAL | 527 | depends on EXPERIMENTAL |
516 | select CRYPTO_BLKCIPHER | 528 | select CRYPTO_BLKCIPHER |
517 | help | 529 | help |
518 | Salsa20 stream cipher algorithm. | 530 | Salsa20 stream cipher algorithm. |
519 | 531 | ||
520 | Salsa20 is a stream cipher submitted to eSTREAM, the ECRYPT | 532 | Salsa20 is a stream cipher submitted to eSTREAM, the ECRYPT |
521 | Stream Cipher Project. See <http://www.ecrypt.eu.org/stream/> | 533 | Stream Cipher Project. See <http://www.ecrypt.eu.org/stream/> |
522 | 534 | ||
523 | The Salsa20 stream cipher algorithm is designed by Daniel J. | 535 | The Salsa20 stream cipher algorithm is designed by Daniel J. |
524 | Bernstein <djb@cr.yp.to>. See <http://cr.yp.to/snuffle.html> | 536 | Bernstein <djb@cr.yp.to>. See <http://cr.yp.to/snuffle.html> |
525 | 537 | ||
526 | config CRYPTO_SALSA20_586 | 538 | config CRYPTO_SALSA20_586 |
527 | tristate "Salsa20 stream cipher algorithm (i586) (EXPERIMENTAL)" | 539 | tristate "Salsa20 stream cipher algorithm (i586) (EXPERIMENTAL)" |
528 | depends on (X86 || UML_X86) && !64BIT | 540 | depends on (X86 || UML_X86) && !64BIT |
529 | depends on EXPERIMENTAL | 541 | depends on EXPERIMENTAL |
530 | select CRYPTO_BLKCIPHER | 542 | select CRYPTO_BLKCIPHER |
531 | help | 543 | help |
532 | Salsa20 stream cipher algorithm. | 544 | Salsa20 stream cipher algorithm. |
533 | 545 | ||
534 | Salsa20 is a stream cipher submitted to eSTREAM, the ECRYPT | 546 | Salsa20 is a stream cipher submitted to eSTREAM, the ECRYPT |
535 | Stream Cipher Project. See <http://www.ecrypt.eu.org/stream/> | 547 | Stream Cipher Project. See <http://www.ecrypt.eu.org/stream/> |
536 | 548 | ||
537 | The Salsa20 stream cipher algorithm is designed by Daniel J. | 549 | The Salsa20 stream cipher algorithm is designed by Daniel J. |
538 | Bernstein <djb@cr.yp.to>. See <http://cr.yp.to/snuffle.html> | 550 | Bernstein <djb@cr.yp.to>. See <http://cr.yp.to/snuffle.html> |
539 | 551 | ||
540 | config CRYPTO_SALSA20_X86_64 | 552 | config CRYPTO_SALSA20_X86_64 |
541 | tristate "Salsa20 stream cipher algorithm (x86_64) (EXPERIMENTAL)" | 553 | tristate "Salsa20 stream cipher algorithm (x86_64) (EXPERIMENTAL)" |
542 | depends on (X86 || UML_X86) && 64BIT | 554 | depends on (X86 || UML_X86) && 64BIT |
543 | depends on EXPERIMENTAL | 555 | depends on EXPERIMENTAL |
544 | select CRYPTO_BLKCIPHER | 556 | select CRYPTO_BLKCIPHER |
545 | help | 557 | help |
546 | Salsa20 stream cipher algorithm. | 558 | Salsa20 stream cipher algorithm. |
547 | 559 | ||
548 | Salsa20 is a stream cipher submitted to eSTREAM, the ECRYPT | 560 | Salsa20 is a stream cipher submitted to eSTREAM, the ECRYPT |
549 | Stream Cipher Project. See <http://www.ecrypt.eu.org/stream/> | 561 | Stream Cipher Project. See <http://www.ecrypt.eu.org/stream/> |
550 | 562 | ||
551 | The Salsa20 stream cipher algorithm is designed by Daniel J. | 563 | The Salsa20 stream cipher algorithm is designed by Daniel J. |
552 | Bernstein <djb@cr.yp.to>. See <http://cr.yp.to/snuffle.html> | 564 | Bernstein <djb@cr.yp.to>. See <http://cr.yp.to/snuffle.html> |
553 | 565 | ||
554 | config CRYPTO_SEED | 566 | config CRYPTO_SEED |
555 | tristate "SEED cipher algorithm" | 567 | tristate "SEED cipher algorithm" |
556 | select CRYPTO_ALGAPI | 568 | select CRYPTO_ALGAPI |
557 | help | 569 | help |
558 | SEED cipher algorithm (RFC4269). | 570 | SEED cipher algorithm (RFC4269). |
559 | 571 | ||
560 | SEED is a 128-bit symmetric key block cipher that has been | 572 | SEED is a 128-bit symmetric key block cipher that has been |
561 | developed by KISA (Korea Information Security Agency) as a | 573 | developed by KISA (Korea Information Security Agency) as a |
562 | national standard encryption algorithm of the Republic of Korea. | 574 | national standard encryption algorithm of the Republic of Korea. |
563 | It is a 16 round block cipher with the key size of 128 bit. | 575 | It is a 16 round block cipher with the key size of 128 bit. |
564 | 576 | ||
565 | See also: | 577 | See also: |
566 | <http://www.kisa.or.kr/kisa/seed/jsp/seed_eng.jsp> | 578 | <http://www.kisa.or.kr/kisa/seed/jsp/seed_eng.jsp> |
567 | 579 | ||
568 | config CRYPTO_SERPENT | 580 | config CRYPTO_SERPENT |
569 | tristate "Serpent cipher algorithm" | 581 | tristate "Serpent cipher algorithm" |
570 | select CRYPTO_ALGAPI | 582 | select CRYPTO_ALGAPI |
571 | help | 583 | help |
572 | Serpent cipher algorithm, by Anderson, Biham & Knudsen. | 584 | Serpent cipher algorithm, by Anderson, Biham & Knudsen. |
573 | 585 | ||
574 | Keys are allowed to be from 0 to 256 bits in length, in steps | 586 | Keys are allowed to be from 0 to 256 bits in length, in steps |
575 | of 8 bits. Also includes the 'Tnepres' algorithm, a reversed | 587 | of 8 bits. Also includes the 'Tnepres' algorithm, a reversed |
576 | variant of Serpent for compatibility with old kerneli.org code. | 588 | variant of Serpent for compatibility with old kerneli.org code. |
577 | 589 | ||
578 | See also: | 590 | See also: |
579 | <http://www.cl.cam.ac.uk/~rja14/serpent.html> | 591 | <http://www.cl.cam.ac.uk/~rja14/serpent.html> |
580 | 592 | ||
581 | config CRYPTO_TEA | 593 | config CRYPTO_TEA |
582 | tristate "TEA, XTEA and XETA cipher algorithms" | 594 | tristate "TEA, XTEA and XETA cipher algorithms" |
583 | select CRYPTO_ALGAPI | 595 | select CRYPTO_ALGAPI |
584 | help | 596 | help |
585 | TEA cipher algorithm. | 597 | TEA cipher algorithm. |
586 | 598 | ||
587 | Tiny Encryption Algorithm is a simple cipher that uses | 599 | Tiny Encryption Algorithm is a simple cipher that uses |
588 | many rounds for security. It is very fast and uses | 600 | many rounds for security. It is very fast and uses |
589 | little memory. | 601 | little memory. |
590 | 602 | ||
591 | Xtendend Tiny Encryption Algorithm is a modification to | 603 | Xtendend Tiny Encryption Algorithm is a modification to |
592 | the TEA algorithm to address a potential key weakness | 604 | the TEA algorithm to address a potential key weakness |
593 | in the TEA algorithm. | 605 | in the TEA algorithm. |
594 | 606 | ||
595 | Xtendend Encryption Tiny Algorithm is a mis-implementation | 607 | Xtendend Encryption Tiny Algorithm is a mis-implementation |
596 | of the XTEA algorithm for compatibility purposes. | 608 | of the XTEA algorithm for compatibility purposes. |
597 | 609 | ||
598 | config CRYPTO_TWOFISH | 610 | config CRYPTO_TWOFISH |
599 | tristate "Twofish cipher algorithm" | 611 | tristate "Twofish cipher algorithm" |
600 | select CRYPTO_ALGAPI | 612 | select CRYPTO_ALGAPI |
601 | select CRYPTO_TWOFISH_COMMON | 613 | select CRYPTO_TWOFISH_COMMON |
602 | help | 614 | help |
603 | Twofish cipher algorithm. | 615 | Twofish cipher algorithm. |
604 | 616 | ||
605 | Twofish was submitted as an AES (Advanced Encryption Standard) | 617 | Twofish was submitted as an AES (Advanced Encryption Standard) |
606 | candidate cipher by researchers at CounterPane Systems. It is a | 618 | candidate cipher by researchers at CounterPane Systems. It is a |
607 | 16 round block cipher supporting key sizes of 128, 192, and 256 | 619 | 16 round block cipher supporting key sizes of 128, 192, and 256 |
608 | bits. | 620 | bits. |
609 | 621 | ||
610 | See also: | 622 | See also: |
611 | <http://www.schneier.com/twofish.html> | 623 | <http://www.schneier.com/twofish.html> |
612 | 624 | ||
613 | config CRYPTO_TWOFISH_COMMON | 625 | config CRYPTO_TWOFISH_COMMON |
614 | tristate | 626 | tristate |
615 | help | 627 | help |
616 | Common parts of the Twofish cipher algorithm shared by the | 628 | Common parts of the Twofish cipher algorithm shared by the |
617 | generic c and the assembler implementations. | 629 | generic c and the assembler implementations. |
618 | 630 | ||
619 | config CRYPTO_TWOFISH_586 | 631 | config CRYPTO_TWOFISH_586 |
620 | tristate "Twofish cipher algorithms (i586)" | 632 | tristate "Twofish cipher algorithms (i586)" |
621 | depends on (X86 || UML_X86) && !64BIT | 633 | depends on (X86 || UML_X86) && !64BIT |
622 | select CRYPTO_ALGAPI | 634 | select CRYPTO_ALGAPI |
623 | select CRYPTO_TWOFISH_COMMON | 635 | select CRYPTO_TWOFISH_COMMON |
624 | help | 636 | help |
625 | Twofish cipher algorithm. | 637 | Twofish cipher algorithm. |
626 | 638 | ||
627 | Twofish was submitted as an AES (Advanced Encryption Standard) | 639 | Twofish was submitted as an AES (Advanced Encryption Standard) |
628 | candidate cipher by researchers at CounterPane Systems. It is a | 640 | candidate cipher by researchers at CounterPane Systems. It is a |
629 | 16 round block cipher supporting key sizes of 128, 192, and 256 | 641 | 16 round block cipher supporting key sizes of 128, 192, and 256 |
630 | bits. | 642 | bits. |
631 | 643 | ||
632 | See also: | 644 | See also: |
633 | <http://www.schneier.com/twofish.html> | 645 | <http://www.schneier.com/twofish.html> |
634 | 646 | ||
635 | config CRYPTO_TWOFISH_X86_64 | 647 | config CRYPTO_TWOFISH_X86_64 |
636 | tristate "Twofish cipher algorithm (x86_64)" | 648 | tristate "Twofish cipher algorithm (x86_64)" |
637 | depends on (X86 || UML_X86) && 64BIT | 649 | depends on (X86 || UML_X86) && 64BIT |
638 | select CRYPTO_ALGAPI | 650 | select CRYPTO_ALGAPI |
639 | select CRYPTO_TWOFISH_COMMON | 651 | select CRYPTO_TWOFISH_COMMON |
640 | help | 652 | help |
641 | Twofish cipher algorithm (x86_64). | 653 | Twofish cipher algorithm (x86_64). |
642 | 654 | ||
643 | Twofish was submitted as an AES (Advanced Encryption Standard) | 655 | Twofish was submitted as an AES (Advanced Encryption Standard) |
644 | candidate cipher by researchers at CounterPane Systems. It is a | 656 | candidate cipher by researchers at CounterPane Systems. It is a |
645 | 16 round block cipher supporting key sizes of 128, 192, and 256 | 657 | 16 round block cipher supporting key sizes of 128, 192, and 256 |
646 | bits. | 658 | bits. |
647 | 659 | ||
648 | See also: | 660 | See also: |
649 | <http://www.schneier.com/twofish.html> | 661 | <http://www.schneier.com/twofish.html> |
650 | 662 | ||
651 | comment "Compression" | 663 | comment "Compression" |
652 | 664 | ||
653 | config CRYPTO_DEFLATE | 665 | config CRYPTO_DEFLATE |
654 | tristate "Deflate compression algorithm" | 666 | tristate "Deflate compression algorithm" |
655 | select CRYPTO_ALGAPI | 667 | select CRYPTO_ALGAPI |
656 | select ZLIB_INFLATE | 668 | select ZLIB_INFLATE |
657 | select ZLIB_DEFLATE | 669 | select ZLIB_DEFLATE |
658 | help | 670 | help |
659 | This is the Deflate algorithm (RFC1951), specified for use in | 671 | This is the Deflate algorithm (RFC1951), specified for use in |
660 | IPSec with the IPCOMP protocol (RFC3173, RFC2394). | 672 | IPSec with the IPCOMP protocol (RFC3173, RFC2394). |
661 | 673 | ||
662 | You will most probably want this if using IPSec. | 674 | You will most probably want this if using IPSec. |
663 | 675 | ||
664 | config CRYPTO_LZO | 676 | config CRYPTO_LZO |
665 | tristate "LZO compression algorithm" | 677 | tristate "LZO compression algorithm" |
666 | select CRYPTO_ALGAPI | 678 | select CRYPTO_ALGAPI |
667 | select LZO_COMPRESS | 679 | select LZO_COMPRESS |
668 | select LZO_DECOMPRESS | 680 | select LZO_DECOMPRESS |
669 | help | 681 | help |
670 | This is the LZO algorithm. | 682 | This is the LZO algorithm. |
671 | 683 | ||
672 | source "drivers/crypto/Kconfig" | 684 | source "drivers/crypto/Kconfig" |
673 | 685 | ||
674 | endif # if CRYPTO | 686 | endif # if CRYPTO |
675 | 687 |