From: Matt Mackall <mpm@selenic.com>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
herbert@gondor.apana.org.au, akpm@osdl.org
Subject: Re: [PATCH] crypto: fix key alignment in tcrypt
Date: Sat, 11 Mar 2006 17:12:38 -0600 [thread overview]
Message-ID: <20060311231238.GJ7110@waste.org> (raw)
In-Reply-To: <20060308.231155.63512624.nemoto@toshiba-tops.co.jp>
On Wed, Mar 08, 2006 at 11:11:55PM +0900, Atsushi Nemoto wrote:
> Force 32-bit alignment on keys in tcrypt test vectors.
>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
>
> diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
> index 733d07e..050f852 100644
> --- a/crypto/tcrypt.h
> +++ b/crypto/tcrypt.h
> @@ -31,7 +31,7 @@ struct hash_testvec {
> char digest[MAX_DIGEST_SIZE];
> unsigned char np;
> unsigned char tap[MAX_TAP];
> - char key[128]; /* only used with keyed hash algorithms */
> + char key[128] __attribute__((__aligned__(4))); /* only used with keyed hash algorithms */
> unsigned char ksize;
> };
>
> @@ -48,7 +48,7 @@ struct hmac_testvec {
> struct cipher_testvec {
> unsigned char fail;
> unsigned char wk; /* weak key flag */
> - char key[MAX_KEYLEN];
> + char key[MAX_KEYLEN] __attribute__((__aligned__(4)));
> unsigned char klen;
> char iv[MAX_IVLEN];
> char input[48];
Wouldn't it be better to simply move this to the head of the structure?
--
Mathematics is the supreme nostalgia of our time.
next prev parent reply other threads:[~2006-03-11 23:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-08 14:11 Atsushi Nemoto
2006-03-11 23:12 ` Matt Mackall [this message]
2006-03-11 23:29 ` Andreas Schwab
2006-03-11 23:48 ` Matt Mackall
2006-03-13 10:43 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060311231238.GJ7110@waste.org \
--to=mpm@selenic.com \
--cc=akpm@osdl.org \
--cc=anemo@mba.ocn.ne.jp \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®