Re: [PATCH v3 5/7] crypto: arc4 - remove cipher implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 11, 2019 at 10:39:39AM -0700, Eric Biggers wrote:
> > -
> >  static struct skcipher_alg arc4_skcipher = {
> 
> Similarly this could be renamed from arc4_skcipher to arc4_alg, now that the
> skcipher algorithm doesn't need to be distinguished from the cipher algorithm.
> 
> >  	.base.cra_name		=	"ecb(arc4)",
> 
> Given the confusion this name causes, can you leave a comment?  Like:
> 
>         /*
>          * For legacy reasons, this is named "ecb(arc4)", not "arc4".
>          * Nevertheless it's actually a stream cipher, not a block cipher.
>          */
> 	 .base.cra_name          =       "ecb(arc4)",
> 
> 
> Also, due to removing the cipher algorithm, we need the following testmgr change
> so that the comparison self-tests consider the generic implementation of this
> algorithm to be itself rather than "ecb(arc4-generic)":
> 
> diff --git a/crypto/testmgr.c b/crypto/testmgr.c
> index 658a7eeebab28..5d3eb8577605f 100644
> --- a/crypto/testmgr.c
> +++ b/crypto/testmgr.c
> @@ -4125,6 +4125,7 @@ static const struct alg_test_desc alg_test_descs[] = {
>  		}
>  	}, {
>  		.alg = "ecb(arc4)",
> +		.generic_driver = "ecb(arc4)-generic",
>  		.test = alg_test_skcipher,
>  		.suite = {
>  			.cipher = __VECS(arc4_tv_template)
> 
> - Eric

Hi Ard, did you see these comments?  They weren't addressed in v4.  We need at
least the testmgr change, otherwise there's a warning when booting with
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y:

[    0.542610] alg: skcipher: skipping comparison tests for ecb(arc4)-generic because ecb(arc4-generic) is unavailable

- Eric



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux