summaryrefslogtreecommitdiff
path: root/crypto/tcrypt.h
diff options
context:
space:
mode:
authorSebastian Siewior <sebastian@breakpoint.cc>2008-03-13 20:29:07 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-04-21 10:19:22 +0800
commit0fc2dcc7dea1f29cff7c029124d6bcc47454340a (patch)
treeecbb449feb248c07157ca8a1218b564ba2374381 /crypto/tcrypt.h
parentb4b800617c68051d4fb3c7556f3d636725a72d34 (diff)
downloadlinux-crypto-0fc2dcc7dea1f29cff7c029124d6bcc47454340a.tar.gz
linux-crypto-0fc2dcc7dea1f29cff7c029124d6bcc47454340a.zip
[CRYPTO] tcrypt: Change the XTEA test vectors
The third test vector of ECB-XTEA-ENC fails for me all other are fine. I could not find a RFC or something else where they are defined. The test vector has not been modified since git started recording histrory. The implementation is very close (not to say equal) to what is available as Public Domain (they recommend 64 rounds and the in kernel uses 32). Therefore I belive that there is typo somewhere and tcrypt reported always *fail* instead of *okey*. This patch replaces input + result of the third test vector with result + input from the third decryption vector. The key is the same, the other three test vectors are also the reverse. Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.h')
-rw-r--r--crypto/tcrypt.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index 1ac6ecdf..aae79e9c 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -5631,11 +5631,11 @@ static struct cipher_testvec xtea_enc_tv_template[] = {
.key = "\x09\x65\x43\x11\x66\x44\x39\x25"
"\x51\x3a\x16\x10\x0a\x08\x12\x6e",
.klen = 16,
- .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
+ .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
"\x65\x73\x74\x5f\x76\x65\x63\x74",
.ilen = 16,
- .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
- "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
+ .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
+ "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
.rlen = 16,
}, {
.key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"