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] [day] [month] [year] [list]
Message-ID: <1503386722.23987.5.camel@mtkswgap22>
Date:   Tue, 22 Aug 2017 15:25:22 +0800
From:   Ryder Lee <ryder.lee@...iatek.com>
To:     Herbert Xu <herbert@...dor.apana.org.au>
CC:     <linux-crypto@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] crypto: mediatek - Add empty messages check in GCM mode

Hi,
On Tue, 2017-08-22 at 15:01 +0800, Herbert Xu wrote:
> On Wed, Aug 16, 2017 at 07:19:48PM +0800, Ryder Lee wrote:
> > Currently, empty messages are not supported in GCM mode, hence add
> > a check to prevent producing incorrect results.
> > 
> > Signed-off-by: Ryder Lee <ryder.lee@...iatek.com>
> > ---
> >  drivers/crypto/mediatek/mtk-aes.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/drivers/crypto/mediatek/mtk-aes.c b/drivers/crypto/mediatek/mtk-aes.c
> > index 9e845e8..efe4e63 100644
> > --- a/drivers/crypto/mediatek/mtk-aes.c
> > +++ b/drivers/crypto/mediatek/mtk-aes.c
> > @@ -928,8 +928,13 @@ static int mtk_aes_gcm_start(struct mtk_cryp *cryp, struct mtk_aes_rec *aes)
> >  static int mtk_aes_gcm_crypt(struct aead_request *req, u64 mode)
> >  {
> >  	struct mtk_aes_base_ctx *ctx = crypto_aead_ctx(crypto_aead_reqtfm(req));
> > +	struct mtk_aes_gcm_ctx *gctx = mtk_aes_gcm_ctx_cast(ctx);
> >  	struct mtk_aes_reqctx *rctx = aead_request_ctx(req);
> >  
> > +	/* Empty messages are not supported yet */
> > +	if (!gctx->textlen && !req->assoclen)
> > +		return -EINVAL
> 
> Your patch does not compile.

Ohh..Somehow I delete the semicolon. I will send v1 soon, sorry about
that.

Ryder


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ