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: <20210312130150.GA17238@gondor.apana.org.au>
Date:   Sat, 13 Mar 2021 00:01:50 +1100
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Thara Gopinath <thara.gopinath@...aro.org>
Cc:     davem@...emloft.net, bjorn.andersson@...aro.org,
        ebiggers@...gle.com, ardb@...nel.org, sivaprak@...eaurora.org,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/7] crypto: qce: Add support for AEAD algorithms

On Thu, Feb 25, 2021 at 01:27:13PM -0500, Thara Gopinath wrote:
>
> +static int
> +qce_aead_async_req_handle(struct crypto_async_request *async_req)
> +{
> +	struct aead_request *req = aead_request_cast(async_req);
> +	struct qce_aead_reqctx *rctx = aead_request_ctx(req);
> +	struct crypto_aead *tfm = crypto_aead_reqtfm(req);
> +	struct qce_aead_ctx *ctx = crypto_tfm_ctx(async_req->tfm);
> +	struct qce_alg_template *tmpl = to_aead_tmpl(crypto_aead_reqtfm(req));
> +	struct qce_device *qce = tmpl->qce;
> +	enum dma_data_direction dir_src, dir_dst;
> +	unsigned int totallen;
> +	bool diff_dst;
> +	int ret;
> +
> +	if (IS_CCM_RFC4309(rctx->flags)) {
> +		memset(rctx->ccm_rfc4309_iv, 0, QCE_MAX_IV_SIZE);
> +		rctx->ccm_rfc4309_iv[0] = 3;
> +		memcpy(&rctx->ccm_rfc4309_iv[1], ctx->ccm4309_salt, QCE_CCM4309_SALT_SIZE);
> +		memcpy(&rctx->ccm_rfc4309_iv[4], req->iv, 8);
> +		rctx->iv = rctx->ccm_rfc4309_iv;
> +		rctx->ivsize = AES_BLOCK_SIZE;
> +	} else {
> +		rctx->iv = req->iv;
> +		rctx->ivsize = crypto_aead_ivsize(tfm);
> +	}
> +	if (IS_CCM_RFC4309(rctx->flags))
> +		rctx->assoclen = req->assoclen - 8;
> +	else
> +		rctx->assoclen = req->assoclen;
> +
> +	totallen = rctx->cryptlen + rctx->assoclen;

This triggers a warning on totallen not being used.  Please fix.

Thanks,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ