aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-12-15 20:13:14 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2007-02-06 17:20:59 -0500
commit90831639a65592d6d3dc888dc3341f54ebf932e6 (patch)
tree30f3c32f414ff69d76b2c733a71739229f00be97 /crypto/tcrypt.c
parent91652be5d1b901673a8e926455f0ed146cfaa588 (diff)
[CRYPTO] fcrypt: Add FCrypt from RxRPC
Add a crypto module to provide FCrypt encryption as used by RxRPC. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r--crypto/tcrypt.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index ff489423b2cf..57882c2c5f71 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -72,7 +72,8 @@ static char *check[] = {
72 "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish", 72 "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish",
73 "twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6", 73 "twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6",
74 "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea", 74 "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea",
75 "khazad", "wp512", "wp384", "wp256", "tnepres", "xeta", NULL 75 "khazad", "wp512", "wp384", "wp256", "tnepres", "xeta", "fcrypt",
76 NULL
76}; 77};
77 78
78static void hexdump(unsigned char *buf, unsigned int len) 79static void hexdump(unsigned char *buf, unsigned int len)
@@ -965,6 +966,12 @@ static void do_test(void)
965 test_cipher("ecb(xeta)", DECRYPT, xeta_dec_tv_template, 966 test_cipher("ecb(xeta)", DECRYPT, xeta_dec_tv_template,
966 XETA_DEC_TEST_VECTORS); 967 XETA_DEC_TEST_VECTORS);
967 968
969 //FCrypt
970 test_cipher("pcbc(fcrypt)", ENCRYPT, fcrypt_pcbc_enc_tv_template,
971 FCRYPT_ENC_TEST_VECTORS);
972 test_cipher("pcbc(fcrypt)", DECRYPT, fcrypt_pcbc_dec_tv_template,
973 FCRYPT_DEC_TEST_VECTORS);
974
968 test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS); 975 test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS);
969 test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS); 976 test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS);
970 test_hash("wp512", wp512_tv_template, WP512_TEST_VECTORS); 977 test_hash("wp512", wp512_tv_template, WP512_TEST_VECTORS);
@@ -1182,6 +1189,13 @@ static void do_test(void)
1182 XETA_DEC_TEST_VECTORS); 1189 XETA_DEC_TEST_VECTORS);
1183 break; 1190 break;
1184 1191
1192 case 31:
1193 test_cipher("pcbc(fcrypt)", ENCRYPT, fcrypt_pcbc_enc_tv_template,
1194 FCRYPT_ENC_TEST_VECTORS);
1195 test_cipher("pcbc(fcrypt)", DECRYPT, fcrypt_pcbc_dec_tv_template,
1196 FCRYPT_DEC_TEST_VECTORS);
1197 break;
1198
1185 case 100: 1199 case 100:
1186 test_hash("hmac(md5)", hmac_md5_tv_template, 1200 test_hash("hmac(md5)", hmac_md5_tv_template,
1187 HMAC_MD5_TEST_VECTORS); 1201 HMAC_MD5_TEST_VECTORS);