aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/crypto.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-07-06 16:52:09 -0400
committerDavid S. Miller <davem@davemloft.net>2005-07-06 16:52:09 -0400
commit95477377995aefa2ec1654a9a3777bd57ea99146 (patch)
tree7aa4d6173de13c81c2fa0e4d2f9e0de22e141b6a /include/linux/crypto.h
parent40725181b74be6b0e3bdc8c05bd1e0b9873ec5cc (diff)
[CRYPTO] Add alignmask for low-level cipher implementations
The VIA Padlock device requires the input and output buffers to be aligned on 16-byte boundaries. This patch adds the alignmask attribute for low-level cipher implementations to indicate their alignment requirements. The mid-level crypt() function will copy the input/output buffers if they are not aligned correctly before they are passed to the low-level implementation. Strictly speaking, some of the software implementations require the buffers to be aligned on 4-byte boundaries as they do 32-bit loads. However, it is not clear whether it is better to copy the buffers or pay the penalty for unaligned loads/stores. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/crypto.h')
-rw-r--r--include/linux/crypto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 26ce01c25745..ac9d49beecd3 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -124,6 +124,7 @@ struct crypto_alg {
124 u32 cra_flags; 124 u32 cra_flags;
125 unsigned int cra_blocksize; 125 unsigned int cra_blocksize;
126 unsigned int cra_ctxsize; 126 unsigned int cra_ctxsize;
127 unsigned int cra_alignmask;
127 const char cra_name[CRYPTO_MAX_ALG_NAME]; 128 const char cra_name[CRYPTO_MAX_ALG_NAME];
128 129
129 union { 130 union {