diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 12:33:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 12:33:19 -0500 |
commit | ec1248e70edc5cf7b485efcc7b41e44e10f422e5 (patch) | |
tree | 80ca10a1ad9dc572e131a56a93fcf0c63c14d168 /crypto/tcrypt.h | |
parent | 3d1f337b3e7378923c89f37afb573a918ef40be5 (diff) | |
parent | 55e9dce37ddf3ab358ba1d1e9eef4ee4bd8174a6 (diff) |
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 @@ | |||
26 | #define MAX_IVLEN 32 | 26 | #define MAX_IVLEN 32 |
27 | 27 | ||
28 | struct hash_testvec { | 28 | struct hash_testvec { |
29 | /* only used with keyed hash algorithms */ | ||
30 | char key[128] __attribute__ ((__aligned__(4))); | ||
29 | char plaintext[128]; | 31 | char plaintext[128]; |
30 | unsigned char psize; | ||
31 | char digest[MAX_DIGEST_SIZE]; | 32 | char digest[MAX_DIGEST_SIZE]; |
32 | unsigned char np; | ||
33 | unsigned char tap[MAX_TAP]; | 33 | unsigned char tap[MAX_TAP]; |
34 | char key[128]; /* only used with keyed hash algorithms */ | 34 | unsigned char psize; |
35 | unsigned char np; | ||
35 | unsigned char ksize; | 36 | unsigned char ksize; |
36 | }; | 37 | }; |
37 | 38 | ||
38 | struct hmac_testvec { | 39 | struct hmac_testvec { |
39 | char key[128]; | 40 | char key[128]; |
40 | unsigned char ksize; | ||
41 | char plaintext[128]; | 41 | char plaintext[128]; |
42 | unsigned char psize; | ||
43 | char digest[MAX_DIGEST_SIZE]; | 42 | char digest[MAX_DIGEST_SIZE]; |
44 | unsigned char np; | ||
45 | unsigned char tap[MAX_TAP]; | 43 | unsigned char tap[MAX_TAP]; |
44 | unsigned char ksize; | ||
45 | unsigned char psize; | ||
46 | unsigned char np; | ||
46 | }; | 47 | }; |
47 | 48 | ||
48 | struct cipher_testvec { | 49 | struct cipher_testvec { |
50 | char key[MAX_KEYLEN] __attribute__ ((__aligned__(4))); | ||
51 | char iv[MAX_IVLEN]; | ||
52 | char input[48]; | ||
53 | char result[48]; | ||
54 | unsigned char tap[MAX_TAP]; | ||
55 | int np; | ||
49 | unsigned char fail; | 56 | unsigned char fail; |
50 | unsigned char wk; /* weak key flag */ | 57 | unsigned char wk; /* weak key flag */ |
51 | char key[MAX_KEYLEN]; | ||
52 | unsigned char klen; | 58 | unsigned char klen; |
53 | char iv[MAX_IVLEN]; | ||
54 | char input[48]; | ||
55 | unsigned char ilen; | 59 | unsigned char ilen; |
56 | char result[48]; | ||
57 | unsigned char rlen; | 60 | unsigned char rlen; |
58 | int np; | ||
59 | unsigned char tap[MAX_TAP]; | ||
60 | }; | 61 | }; |
61 | 62 | ||
62 | struct cipher_speed { | 63 | struct cipher_speed { |