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]
Date:	Thu, 3 Dec 2009 11:50:13 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Tobias Brunner <tobias@...ongswan.org>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	linux-crypto@...r.kernel.org
Subject: Re: [PATCH] crypto: gmac - Add RFC4543 wrapper for GCM

On Tue, Dec 01, 2009 at 05:49:28PM +0100, Tobias Brunner wrote:
> This patch adds the RFC4543 (GMAC) wrapper for GCM similar to the
> existing RFC4106 wrapper. The main differences between GCM and GMAC are
> the contents of the AAD and that the plaintext is empty for the latter.
> 
> Signed-off-by: Tobias Brunner <tobias@...ongswan.org>
> ---
>  crypto/gcm.c            |  275 +++++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/pfkeyv2.h |    1 +
>  net/xfrm/xfrm_algo.c    |   16 +++
>  3 files changed, 292 insertions(+), 0 deletions(-)
> 
> diff --git a/crypto/gcm.c b/crypto/gcm.c
> index 5fc3292..b097eb4 100644
> --- a/crypto/gcm.c
> +++ b/crypto/gcm.c
> @@ -37,6 +37,15 @@ struct crypto_rfc4106_ctx {
>  	u8 nonce[4];
>  };
>  
> +struct crypto_rfc4543_ctx {
> +	struct crypto_aead *child;
> +	u8 nonce[4];
> +	u8 auth_tag[16];

This field needs to be aligned to whatever alignment needed by
the underlying cipher algorithm (currently the biggest is padlock
which needs 16-byte alignment).

See for example how rfc4543/gcm handles it.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ