diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-07-06 20:52:27 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-06 20:52:27 (GMT) |
commit | 6789b2dc455b90efc9c88886c9366adc9abb7347 (patch) | |
tree | a962565f31b2c8c0cb112b2ce482cceb3d16caef /drivers/crypto/padlock.h | |
parent | 95477377995aefa2ec1654a9a3777bd57ea99146 (diff) | |
download | linux-fsl-qoriq-6789b2dc455b90efc9c88886c9366adc9abb7347.tar.xz |
[PADLOCK] Move fast path work into aes_set_key and upper layer
Most of the work done aes_padlock can be done in aes_set_key. This
means that we only have to do it once when the key changes rather
than every time we perform an encryption or decryption.
This patch also sets cra_alignmask to let the upper layer ensure
that the buffers fed to us are aligned correctly.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/crypto/padlock.h')
-rw-r--r-- | drivers/crypto/padlock.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/crypto/padlock.h b/drivers/crypto/padlock.h index 7a50060..3cf2b7a 100644 --- a/drivers/crypto/padlock.h +++ b/drivers/crypto/padlock.h @@ -13,18 +13,18 @@ #ifndef _CRYPTO_PADLOCK_H #define _CRYPTO_PADLOCK_H +#define PADLOCK_ALIGNMENT 16 + /* Control word. */ -union cword { - uint32_t cword[4]; - struct { - int rounds:4; - int algo:3; - int keygen:1; - int interm:1; - int encdec:1; - int ksize:2; - } b; -}; +struct cword { + int __attribute__ ((__packed__)) + rounds:4, + algo:3, + keygen:1, + interm:1, + encdec:1, + ksize:2; +} __attribute__ ((__aligned__(PADLOCK_ALIGNMENT))); #define PFX "padlock: " |