summaryrefslogtreecommitdiff
path: root/crypto/tcrypt.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-07-31 12:23:53 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-08-29 15:48:57 +1000
commitf139cfa7cdccd0b315fad098889897b5fcd389b0 (patch)
tree365985f84f6dade6125f7d9a0e8cffcf30b87fa0 /crypto/tcrypt.h
parenta7581a01fbc69771a2b391de4220ba670c0aa261 (diff)
crypto: tcrypt - Avoid using contiguous pages
If tcrypt is to be used as a run-time integrity test, it needs to be more resilient in a hostile environment. For a start allocating 32K of physically contiguous memory is definitely out. This patch teaches it to use separate pages instead. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.h')
-rw-r--r--crypto/tcrypt.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index 801e0c288862..c6254a1776fe 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -39,7 +39,7 @@ struct cipher_testvec {
char *iv;
char *input;
char *result;
- unsigned char tap[MAX_TAP];
+ unsigned short tap[MAX_TAP];
int np;
unsigned char fail;
unsigned char wk; /* weak key flag */
@@ -5111,6 +5111,8 @@ static struct cipher_testvec aes_ctr_enc_tv_template[] = {
"\x4b\xef\x31\x18\xea\xac\xb1\x84"
"\x21\xed\xda\x86",
.rlen = 4100,
+ .np = 2,
+ .tap = { 4064, 36 },
},
};
@@ -8126,7 +8128,9 @@ static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
"\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
"\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
"\xaf\xdf\x11\x95",
- .rlen = 4100,
+ .rlen = 4100,
+ .np = 2,
+ .tap = { 4064, 36 },
},
};