crypto: fix some DRBG Kconfig deps
v3 cover crypto: fix some DRBG Kconfig deps
Hello
Fix serie try to fix some DRBG depencies in Kconfig
Change since v2:
- added patch #2
Changes since v1:
- Updated commit message with recursive dependency
Corentin Labbe (3):
crypto: drbg: DRBG should select SHA512
crypto: CRYPTO_CTR no longer need CRYPTO_SEQIV
crypto: drbg: DRBG_CTR should select CTR
crypto/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.2
PATCH v3 1/3 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.26.2
Herbert Xu
maintainerRe: [PATCH v3 1/3] crypto: drbg: DRBG should select SHA512
Quoted 13 lines · Corentin Labbe
Since DRBG could use SHA384/SHA512, it should select it.
Signed-off-by Corentin Labbe <[email protected]>--- crypto/Kconfig | 2 ++ 1 file changed, 2 insertions(+)crypto/Kconfig +0
-0@@ -1810,10 +1810,12 @@ config CRYPTO_DRBG_HMAC default y
crypto/Kconfig config CRYPTO_DRBG_HMAC · line 1820
Quoted 10 lines
crypto/Kconfig +2
-0select 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.
The default hash drbg is sha256, the others are only optional.
Cheers,
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
PATCH v3 2/3 crypto: CRYPTO_CTR no longer need CRYPTO_SEQIV
In reply to Corentin LabbeAs comment of the v2, Herbert said: "The SEQIV select from CTR is historical and no longer necessary."
So let's get rid of it.
--- crypto/Kconfig | 1 - 1 file changed, 1 deletion(-)
crypto/Kconfig +0 -1
@@ -370,7 +370,6 @@ config CRYPTO_CFB config CRYPTO_CTR tristate "CTR support" select CRYPTO_SKCIPHER - select CRYPTO_SEQIV select CRYPTO_MANAGER help CTR: Counter mode
Signature · 1 line
2.26.2
Re: [PATCH v3 2/3] crypto: CRYPTO_CTR no longer need CRYPTO_SEQIV
Quoted 15 lines · Corentin Labbe
As comment of the v2, Herbert said: "The SEQIV select from CTR is historical and no longer necessary."
So let's get rid of it.
Signed-off-by Corentin Labbe <[email protected]>--- crypto/Kconfig | 1 - 1 file changed, 1 deletion(-)crypto/Kconfig +0
-0
crypto/Kconfig config CRYPTO_CFB · line 375
Quoted 7 lines
crypto/Kconfig +0
-1@@ -370,7 +370,6 @@ config CRYPTO_CFB config CRYPTO_CTR tristate "CTR support" select CRYPTO_SKCIPHER - select CRYPTO_SEQIV select CRYPTO_MANAGER help CTR: Counter mode
Shouldn't this patch also have added 'select CRYPTO_SEQIV' to INET_ESP and INET6_ESP? Or is the intent to make people explicitly select CRYPTO_SEQIV?
- Eric
PATCH v3 3/3 crypto: drbg: DRBG_CTR should select CTR
In reply to Corentin Labbeif 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
alg: drbg: Test 0 failed for drbg_nopr_ctr_aes256
So let's select CTR instead of just depend on it.
--- crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/Kconfig +1 -1
@@ -1821,7 +1821,7 @@ config CRYPTO_DRBG_HASH config CRYPTO_DRBG_CTR bool "Enable CTR DRBG" select CRYPTO_AES - depends on CRYPTO_CTR + select CRYPTO_CTR help Enable the CTR DRBG variant as defined in NIST SP800-90A.
Signature · 1 line
2.26.2
Herbert Xu
maintainerQuoted 10 lines · Corentin Labbe
Hello
Fix serie try to fix some DRBG depencies in
KconfigChange since v2:
- added patch #2Changes since v1:
- Updated commit message with recursive dependency
Quoted 7 lines
Corentin Labbe (3):
crypto: drbg: DRBG should select SHA512
crypto:CRYPTO_CTRno longer needCRYPTO_SEQIV
crypto: drbg:DRBG_CTRshould select CTRcrypto/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Patches 2-3 applied. 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