Skip to content

Commit fd8a0de

Browse files
jallisonciqPlaidCat
authored andcommitted
Revert: crypto: DRBG - switch to HMAC SHA512 DRBG as default DRBG
JIRA: INTERNAL Revert Author <[email protected]> Revert Commit 9b7b946 Revert Reason: This changes the default DRBG back to HMAC SHA256 as more processors have hardware acceleration for this algorithm. Approved by the lab. The default DRBG is the one that has the highest priority. The priority is defined based on the order of the list drbg_cores[] where the highest priority is given to the last entry by drbg_fill_array. With this patch the default DRBG is switched from HMAC SHA256 to HMAC SHA512 to support compliance with SP800-90B and SP800-90C (current draft). The user of the crypto API is completely unaffected by the change. Signed-off-by: Stephan Mueller <[email protected]> Acked-by: simo Sorce <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Jeremy Allison <[email protected]> Signed-off-by: Jonathan Maple <[email protected]>
1 parent e10a72f commit fd8a0de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crypto/drbg.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,18 +176,18 @@ static const struct drbg_core drbg_cores[] = {
176176
.blocklen_bytes = 48,
177177
.cra_name = "hmac_sha384",
178178
.backend_cra_name = "hmac(sha384)",
179-
}, {
180-
.flags = DRBG_HMAC | DRBG_STRENGTH256,
181-
.statelen = 32, /* block length of cipher */
182-
.blocklen_bytes = 32,
183-
.cra_name = "hmac_sha256",
184-
.backend_cra_name = "hmac(sha256)",
185179
}, {
186180
.flags = DRBG_HMAC | DRBG_STRENGTH256,
187181
.statelen = 64, /* block length of cipher */
188182
.blocklen_bytes = 64,
189183
.cra_name = "hmac_sha512",
190184
.backend_cra_name = "hmac(sha512)",
185+
}, {
186+
.flags = DRBG_HMAC | DRBG_STRENGTH256,
187+
.statelen = 32, /* block length of cipher */
188+
.blocklen_bytes = 32,
189+
.cra_name = "hmac_sha256",
190+
.backend_cra_name = "hmac(sha256)",
191191
},
192192
#endif /* CONFIG_CRYPTO_DRBG_HMAC */
193193
};

0 commit comments

Comments
 (0)