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: <20150708074805.GA18991@gondor.apana.org.au>
Date:	Wed, 8 Jul 2015 15:48:05 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Lokesh Vutla <lokeshvutla@...com>
Cc:	linux-crypto@...r.kernel.org, davem@...emloft.net,
	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
	t-kristo@...com, nsekhar@...com
Subject: Re: [PATCH v2 6/7] crypto: omap-aes: Add support for GCM mode

On Wed, Jul 08, 2015 at 12:29:47PM +0530, Lokesh Vutla wrote:
>
> >> +	if (req->assoclen + req->cryptlen == 0) {
> >> +		scatterwalk_map_and_copy(ctx->auth_tag, req->dst, 0, authlen,
> >> +					 1);
> >> +		return 0;
> >> +	}
> > 
> > How can this be right? Did you enable the selftest?
> Why not? Self tests are passed for this case.
> 
> As per the equation given in GCM spec[1], we can see that
> if assoclen and cryptlen is 0, then output of GCM  is just E(K, Y0)
> where Y0 = IV||(0^31)1
> I have E(K, Y0) calculated in previous step. And copying it
> to destination if assoclen and cryptlen is 0.
> 
> Correct me if I am wrong.

It should be E(K, Y0) ^ GHASH(0).  So unless GHASH(0) == 0, your
code doesn't work.

Cheers,
-- 
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ