aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2014-08-17 11:41:10 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2014-08-25 08:34:12 -0400
commit05c81ccd9087d238c10b234eadb55632742e5518 (patch)
tree11d1b1e9d391a1a7feb8d55c58f3938a2a24b370 /crypto
parentbc034ef5573ef4d81daa666c02a3df1ad28e24a7 (diff)
crypto: drbg - remove configuration of fixed values
SP800-90A mandates several hard-coded values. The old drbg_cores allows the setting of these values per DRBG implementation. However, due to the hard requirement of SP800-90A, these values are now returned globally for each DRBG. The ability to set such values per DRBG is therefore removed. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/drbg.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c
index 701575734420..b4938bb4c465 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -117,27 +117,18 @@ static const struct drbg_core drbg_cores[] = {
117 { 117 {
118 .flags = DRBG_CTR | DRBG_STRENGTH128, 118 .flags = DRBG_CTR | DRBG_STRENGTH128,
119 .statelen = 32, /* 256 bits as defined in 10.2.1 */ 119 .statelen = 32, /* 256 bits as defined in 10.2.1 */
120 .max_addtllen = 35,
121 .max_bits = 19,
122 .max_req = 48,
123 .blocklen_bytes = 16, 120 .blocklen_bytes = 16,
124 .cra_name = "ctr_aes128", 121 .cra_name = "ctr_aes128",
125 .backend_cra_name = "ecb(aes)", 122 .backend_cra_name = "ecb(aes)",
126 }, { 123 }, {
127 .flags = DRBG_CTR | DRBG_STRENGTH192, 124 .flags = DRBG_CTR | DRBG_STRENGTH192,
128 .statelen = 40, /* 320 bits as defined in 10.2.1 */ 125 .statelen = 40, /* 320 bits as defined in 10.2.1 */
129 .max_addtllen = 35,
130 .max_bits = 19,
131 .max_req = 48,
132 .blocklen_bytes = 16, 126 .blocklen_bytes = 16,
133 .cra_name = "ctr_aes192", 127 .cra_name = "ctr_aes192",
134 .backend_cra_name = "ecb(aes)", 128 .backend_cra_name = "ecb(aes)",
135 }, { 129 }, {
136 .flags = DRBG_CTR | DRBG_STRENGTH256, 130 .flags = DRBG_CTR | DRBG_STRENGTH256,
137 .statelen = 48, /* 384 bits as defined in 10.2.1 */ 131 .statelen = 48, /* 384 bits as defined in 10.2.1 */
138 .max_addtllen = 35,
139 .max_bits = 19,
140 .max_req = 48,
141 .blocklen_bytes = 16, 132 .blocklen_bytes = 16,
142 .cra_name = "ctr_aes256", 133 .cra_name = "ctr_aes256",
143 .backend_cra_name = "ecb(aes)", 134 .backend_cra_name = "ecb(aes)",
@@ -147,36 +138,24 @@ static const struct drbg_core drbg_cores[] = {
147 { 138 {
148 .flags = DRBG_HASH | DRBG_STRENGTH128, 139 .flags = DRBG_HASH | DRBG_STRENGTH128,
149 .statelen = 55, /* 440 bits */ 140 .statelen = 55, /* 440 bits */
150 .max_addtllen = 35,
151 .max_bits = 19,
152 .max_req = 48,
153 .blocklen_bytes = 20, 141 .blocklen_bytes = 20,
154 .cra_name = "sha1", 142 .cra_name = "sha1",
155 .backend_cra_name = "sha1", 143 .backend_cra_name = "sha1",
156 }, { 144 }, {
157 .flags = DRBG_HASH | DRBG_STRENGTH256, 145 .flags = DRBG_HASH | DRBG_STRENGTH256,
158 .statelen = 111, /* 888 bits */ 146 .statelen = 111, /* 888 bits */
159 .max_addtllen = 35,
160 .max_bits = 19,
161 .max_req = 48,
162 .blocklen_bytes = 48, 147 .blocklen_bytes = 48,
163 .cra_name = "sha384", 148 .cra_name = "sha384",
164 .backend_cra_name = "sha384", 149 .backend_cra_name = "sha384",
165 }, { 150 }, {
166 .flags = DRBG_HASH | DRBG_STRENGTH256, 151 .flags = DRBG_HASH | DRBG_STRENGTH256,
167 .statelen = 111, /* 888 bits */ 152 .statelen = 111, /* 888 bits */
168 .max_addtllen = 35,
169 .max_bits = 19,
170 .max_req = 48,
171 .blocklen_bytes = 64, 153 .blocklen_bytes = 64,
172 .cra_name = "sha512", 154 .cra_name = "sha512",
173 .backend_cra_name = "sha512", 155 .backend_cra_name = "sha512",
174 }, { 156 }, {
175 .flags = DRBG_HASH | DRBG_STRENGTH256, 157 .flags = DRBG_HASH | DRBG_STRENGTH256,
176 .statelen = 55, /* 440 bits */ 158 .statelen = 55, /* 440 bits */
177 .max_addtllen = 35,
178 .max_bits = 19,
179 .max_req = 48,
180 .blocklen_bytes = 32, 159 .blocklen_bytes = 32,
181 .cra_name = "sha256", 160 .cra_name = "sha256",
182 .backend_cra_name = "sha256", 161 .backend_cra_name = "sha256",
@@ -186,36 +165,24 @@ static const struct drbg_core drbg_cores[] = {
186 { 165 {
187 .flags = DRBG_HMAC | DRBG_STRENGTH128, 166 .flags = DRBG_HMAC | DRBG_STRENGTH128,
188 .statelen = 20, /* block length of cipher */ 167 .statelen = 20, /* block length of cipher */
189 .max_addtllen = 35,
190 .max_bits = 19,
191 .max_req = 48,
192 .blocklen_bytes = 20, 168 .blocklen_bytes = 20,
193 .cra_name = "hmac_sha1", 169 .cra_name = "hmac_sha1",
194 .backend_cra_name = "hmac(sha1)", 170 .backend_cra_name = "hmac(sha1)",
195 }, { 171 }, {
196 .flags = DRBG_HMAC | DRBG_STRENGTH256, 172 .flags = DRBG_HMAC | DRBG_STRENGTH256,
197 .statelen = 48, /* block length of cipher */ 173 .statelen = 48, /* block length of cipher */
198 .max_addtllen = 35,
199 .max_bits = 19,
200 .max_req = 48,
201 .blocklen_bytes = 48, 174 .blocklen_bytes = 48,
202 .cra_name = "hmac_sha384", 175 .cra_name = "hmac_sha384",
203 .backend_cra_name = "hmac(sha384)", 176 .backend_cra_name = "hmac(sha384)",
204 }, { 177 }, {
205 .flags = DRBG_HMAC | DRBG_STRENGTH256, 178 .flags = DRBG_HMAC | DRBG_STRENGTH256,
206 .statelen = 64, /* block length of cipher */ 179 .statelen = 64, /* block length of cipher */
207 .max_addtllen = 35,
208 .max_bits = 19,
209 .max_req = 48,
210 .blocklen_bytes = 64, 180 .blocklen_bytes = 64,
211 .cra_name = "hmac_sha512", 181 .cra_name = "hmac_sha512",
212 .backend_cra_name = "hmac(sha512)", 182 .backend_cra_name = "hmac(sha512)",
213 }, { 183 }, {
214 .flags = DRBG_HMAC | DRBG_STRENGTH256, 184 .flags = DRBG_HMAC | DRBG_STRENGTH256,
215 .statelen = 32, /* block length of cipher */ 185 .statelen = 32, /* block length of cipher */
216 .max_addtllen = 35,
217 .max_bits = 19,
218 .max_req = 48,
219 .blocklen_bytes = 32, 186 .blocklen_bytes = 32,
220 .cra_name = "hmac_sha256", 187 .cra_name = "hmac_sha256",
221 .backend_cra_name = "hmac(sha256)", 188 .backend_cra_name = "hmac(sha256)",