lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dbac8a57-a1dd-1926-624f-cdbb2e4f6dff@gmail.com>
Date:   Tue, 6 Nov 2018 10:02:47 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Raveendra Padasalagi <raveendra.padasalagi@...adcom.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Biggers <ebiggers@...gle.com>,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        Stefan Agner <stefan@...er.ch>
Cc:     bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH] crypto: bcm: fix normal/non key hash algorithm failure

On 11/6/18 12:28 AM, Raveendra Padasalagi wrote:
> Remove setkey() callback handler for normal/non key
> hash algorithms and keep it for AES-CBC/CMAC which needs key.
> 
> Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@...adcom.com>

Should this have the following Fixes tag?

Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver")

> ---
>  drivers/crypto/bcm/cipher.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c
> index 2d1f1db..4d67e22 100644
> --- a/drivers/crypto/bcm/cipher.c
> +++ b/drivers/crypto/bcm/cipher.c
> @@ -4652,12 +4652,16 @@ static int spu_register_ahash(struct iproc_alg_s *driver_alg)
>  	hash->halg.statesize = sizeof(struct spu_hash_export_s);
>  
>  	if (driver_alg->auth_info.mode != HASH_MODE_HMAC) {
> -		hash->setkey = ahash_setkey;
>  		hash->init = ahash_init;
>  		hash->update = ahash_update;
>  		hash->final = ahash_final;
>  		hash->finup = ahash_finup;
>  		hash->digest = ahash_digest;
> +		if ((driver_alg->auth_info.alg == HASH_ALG_AES) &&
> +		    ((driver_alg->auth_info.mode == HASH_MODE_XCBC) ||
> +		    (driver_alg->auth_info.mode == HASH_MODE_CMAC))) {
> +			hash->setkey = ahash_setkey;
> +		}
>  	} else {
>  		hash->setkey = ahash_hmac_setkey;
>  		hash->init = ahash_hmac_init;
> 


-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ