diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 18:33:19 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 18:33:19 +0100 |
commit | ec1248e70edc5cf7b485efcc7b41e44e10f422e5 (patch) | |
tree | 80ca10a1ad9dc572e131a56a93fcf0c63c14d168 /crypto/tcrypt.h | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 (diff) | |
parent | [CRYPTO] aes: Fixed array boundary violation (diff) | |
download | linux-ec1248e70edc5cf7b485efcc7b41e44e10f422e5.tar.xz linux-ec1248e70edc5cf7b485efcc7b41e44e10f422e5.zip |
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
[CRYPTO] aes: Fixed array boundary violation
[CRYPTO] tcrypt: Fix key alignment
[CRYPTO] all: Add missing cra_alignmask
[CRYPTO] all: Use kzalloc where possible
[CRYPTO] api: Align tfm context as wide as possible
[CRYPTO] twofish: Use rol32/ror32 where appropriate
Diffstat (limited to 'crypto/tcrypt.h')
-rw-r--r-- | crypto/tcrypt.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h index 733d07ed75e9..1f683ba794ee 100644 --- a/crypto/tcrypt.h +++ b/crypto/tcrypt.h @@ -26,37 +26,38 @@ #define MAX_IVLEN 32 struct hash_testvec { + /* only used with keyed hash algorithms */ + char key[128] __attribute__ ((__aligned__(4))); char plaintext[128]; - unsigned char psize; char digest[MAX_DIGEST_SIZE]; - unsigned char np; unsigned char tap[MAX_TAP]; - char key[128]; /* only used with keyed hash algorithms */ + unsigned char psize; + unsigned char np; unsigned char ksize; }; struct hmac_testvec { char key[128]; - unsigned char ksize; char plaintext[128]; - unsigned char psize; char digest[MAX_DIGEST_SIZE]; - unsigned char np; unsigned char tap[MAX_TAP]; + unsigned char ksize; + unsigned char psize; + unsigned char np; }; struct cipher_testvec { + char key[MAX_KEYLEN] __attribute__ ((__aligned__(4))); + char iv[MAX_IVLEN]; + char input[48]; + char result[48]; + unsigned char tap[MAX_TAP]; + int np; unsigned char fail; unsigned char wk; /* weak key flag */ - char key[MAX_KEYLEN]; unsigned char klen; - char iv[MAX_IVLEN]; - char input[48]; unsigned char ilen; - char result[48]; unsigned char rlen; - int np; - unsigned char tap[MAX_TAP]; }; struct cipher_speed { |