]> err.no Git - linux-2.6/blobdiff - crypto/tcrypt.c
[POWERPC] Fix default cputable entries for e200 and e500 families
[linux-2.6] / crypto / tcrypt.c
index 30e75d49f35af2ffd9ad9b63ce57ca3c4e7f91f5..6beabc5abd0747b0c2749d1d0c045c53e87e9856 100644 (file)
@@ -82,9 +82,8 @@ static char *check[] = {
        "des", "md5", "des3_ede", "rot13", "sha1", "sha224", "sha256",
        "blowfish", "twofish", "serpent", "sha384", "sha512", "md4", "aes",
        "cast6", "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea",
-       "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea",
        "khazad", "wp512", "wp384", "wp256", "tnepres", "xeta",  "fcrypt",
-       "camellia", "seed", "salsa20", "lzo", NULL
+       "camellia", "seed", "salsa20", "lzo", "cts", NULL
 };
 
 static void hexdump(unsigned char *buf, unsigned int len)
@@ -1328,6 +1327,12 @@ static void do_test(void)
                test_cipher("ecb(seed)", DECRYPT, seed_dec_tv_template,
                            SEED_DEC_TEST_VECTORS);
 
+               //CTS
+               test_cipher("cts(cbc(aes))", ENCRYPT, cts_mode_enc_tv_template,
+                           CTS_MODE_ENC_TEST_VECTORS);
+               test_cipher("cts(cbc(aes))", DECRYPT, cts_mode_dec_tv_template,
+                           CTS_MODE_DEC_TEST_VECTORS);
+
                test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS);
                test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS);
                test_hash("wp512", wp512_tv_template, WP512_TEST_VECTORS);
@@ -1611,6 +1616,13 @@ static void do_test(void)
                          AES_CCM_DEC_TEST_VECTORS);
                break;
 
+       case 38:
+               test_cipher("cts(cbc(aes))", ENCRYPT, cts_mode_enc_tv_template,
+                           CTS_MODE_ENC_TEST_VECTORS);
+               test_cipher("cts(cbc(aes))", DECRYPT, cts_mode_dec_tv_template,
+                           CTS_MODE_DEC_TEST_VECTORS);
+               break;
+
        case 100:
                test_hash("hmac(md5)", hmac_md5_tv_template,
                          HMAC_MD5_TEST_VECTORS);
@@ -1798,7 +1810,7 @@ static void do_test(void)
        }
 }
 
-static int __init init(void)
+static int __init tcrypt_mod_init(void)
 {
        int err = -ENOMEM;
 
@@ -1837,10 +1849,10 @@ static int __init init(void)
  * If an init function is provided, an exit function must also be provided
  * to allow module unload.
  */
-static void __exit fini(void) { }
+static void __exit tcrypt_mod_fini(void) { }
 
-module_init(init);
-module_exit(fini);
+module_init(tcrypt_mod_init);
+module_exit(tcrypt_mod_fini);
 
 module_param(mode, int, 0);
 module_param(sec, uint, 0);