crypto: drbg: DRBG should select SHA512
PATCH 1/2 crypto: drbg: DRBG should select SHA512
Since DRBG could use SHA384/SHA512, it should select it.
--- crypto/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
crypto/Kconfig +2 -0
@@ -1810,10 +1810,12 @@ config CRYPTO_DRBG_HMAC default y select CRYPTO_HMAC select CRYPTO_SHA256 + select CRYPTO_SHA512 config CRYPTO_DRBG_HASH bool "Enable Hash DRBG" select CRYPTO_SHA256 + select CRYPTO_SHA512 help Enable the Hash DRBG variant as defined in NIST SP800-90A.
Signature · 1 line
2.24.1
PATCH 2/2 crypto: drbg: DRBG_CTR should select CTR
if CRYPTO_DRBG_CTR is builtin and CTR is module, allocating such algo will fail.
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
alg: drbg: Test 0 failed for drbg_pr_ctr_aes128
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
alg: drbg: Test 0 failed for drbg_nopr_ctr_aes128
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
alg: drbg: Test 0 failed for drbg_nopr_ctr_aes192
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
ialg: drbg: Test 0 failed for drbg_nopr_ctr_aes256
Since setting DRBG_CTR=CTR lead to a recursive dependency, let's depends on CTR=y
--- crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/Kconfig +1 -1
@@ -1822,7 +1822,7 @@ config CRYPTO_DRBG_HASH config CRYPTO_DRBG_CTR bool "Enable CTR DRBG" select CRYPTO_AES - depends on CRYPTO_CTR + depends on CRYPTO_CTR=y help Enable the CTR DRBG variant as defined in NIST SP800-90A.
Signature · 1 line
2.24.1
Herbert Xu
maintainerRe: [PATCH 2/2] crypto: drbg: DRBG_CTR should select CTR
Quoted 28 lines · Corentin Labbe
if
CRYPTO_DRBG_CTRis builtin and CTR is module, allocating such algo will fail.
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
alg: drbg: Test 0 failed fordrbg_pr_ctr_aes128
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
alg: drbg: Test 0 failed fordrbg_nopr_ctr_aes128
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
alg: drbg: Test 0 failed fordrbg_nopr_ctr_aes192
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
ialg: drbg: Test 0 failed fordrbg_nopr_ctr_aes256Since setting DRBG_CTR=CTR lead to a recursive dependency, let's depends on CTR=y
Signed-off-by Corentin Labbe <[email protected]>--- crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)crypto/Kconfig +0
-0
crypto/Kconfig config CRYPTO_DRBG_HASH · line 1825
Quoted 5 lines
crypto/Kconfig +1
-1@@ -1822,7 +1822,7 @@ config CRYPTO_DRBG_HASH config CRYPTO_DRBG_CTR bool "Enable CTR DRBG" select CRYPTO_AES - depends on CRYPTO_CTR + depends on CRYPTO_CTR=y
This should be turned into a select.
Thanks,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: [PATCH 2/2] crypto: drbg: DRBG_CTR should select CTR
Quoted 24 lines · Herbert Xu
Quoted 23 lines · Corentin Labbe
if
CRYPTO_DRBG_CTRis builtin and CTR is module, allocating such algo will fail.
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
alg: drbg: Test 0 failed fordrbg_pr_ctr_aes128
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
alg: drbg: Test 0 failed fordrbg_nopr_ctr_aes128
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
alg: drbg: Test 0 failed fordrbg_nopr_ctr_aes192
DRBG: could not allocate CTR cipher TFM handle: ctr(aes)
alg: drbg: Failed to reset rng
ialg: drbg: Test 0 failed fordrbg_nopr_ctr_aes256Since setting DRBG_CTR=CTR lead to a recursive dependency, let's depends on CTR=y
Signed-off-by Corentin Labbe <[email protected]>--- crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
crypto/Kconfig config CRYPTO_DRBG_HASH · line 1825
Quoted 10 lines
crypto/Kconfig +1
-1@@ -1822,7 +1822,7 @@ config CRYPTO_DRBG_HASH config CRYPTO_DRBG_CTR bool "Enable CTR DRBG" select CRYPTO_AES - depends on CRYPTO_CTR + depends on CRYPTO_CTR=yThis should be turned into a select.
it fail also if I select it:
crypto/Kconfig:1800:error: recursive dependency detected!crypto/Kconfig:1800: symbol CRYPTO_DRBG_MENU is selected by CRYPTO_RNG_DEFAULTcrypto/Kconfig:83: symbol CRYPTO_RNG_DEFAULT is selected by CRYPTO_SEQIVcrypto/Kconfig:330: symbol CRYPTO_SEQIV is selected by CRYPTO_CTRcrypto/Kconfig:370: symbol CRYPTO_CTR is selected by CRYPTO_DRBG_CTRcrypto/Kconfig:1822: symbol CRYPTO_DRBG_CTR depends on CRYPTO_DRBG_MENU
I forgot to say it in the commit message.
I will send a v2 with an updated commit message.
Regards