test_cipher_speed("des", MODE_ECB, ENCRYPT, sec, des_speed_template); test_cipher_speed("des", MODE_ECB, DECRYPT, sec, des_speed_template); test_cipher_speed("des", MODE_CBC, ENCRYPT, sec, des_speed_template); test_cipher_speed("des", MODE_CBC, DECRYPT, sec, des_speed_template); 
test_cipher_speed("des", MODE_ECB, ENCRYPT, sec, NULL, 0, des_speed_template); test_cipher_speed("des", MODE_ECB, DECRYPT, sec, NULL, 0, des_speed_template); test_cipher_speed("des", MODE_CBC, ENCRYPT, sec, NULL, 0, des_speed_template); test_cipher_speed("des", MODE_CBC, DECRYPT, sec, NULL, 0, des_speed_template); 
static void do_test(void){	switch (mode) {	case 0:		test_hash("md5", md5_tv_template, MD5_TEST_VECTORS);		test_hash("sha1", sha1_tv_template, SHA1_TEST_VECTORS);		//DES		test_cipher ("des", MODE_ECB, ENCRYPT, des_enc_tv_template, DES_ENC_TEST_VECTORS);		test_cipher ("des", MODE_ECB, DECRYPT, des_dec_tv_template, DES_DEC_TEST_VECTORS);		test_cipher ("des", MODE_CBC, ENCRYPT, des_cbc_enc_tv_template, DES_CBC_ENC_TEST_VECTORS);		test_cipher ("des", MODE_CBC, DECRYPT, des_cbc_dec_tv_template, DES_CBC_DEC_TEST_VECTORS);		//DES3_EDE		test_cipher ("des3_ede", MODE_ECB, ENCRYPT, des3_ede_enc_tv_template, DES3_EDE_ENC_TEST_VECTORS);		test_cipher ("des3_ede", MODE_ECB, DECRYPT, des3_ede_dec_tv_template, DES3_EDE_DEC_TEST_VECTORS);		test_hash("md4", md4_tv_template, MD4_TEST_VECTORS);		test_hash("sha256", sha256_tv_template, SHA256_TEST_VECTORS);		//BLOWFISH		test_cipher ("blowfish", MODE_ECB, ENCRYPT, bf_enc_tv_template, BF_ENC_TEST_VECTORS);		test_cipher ("blowfish", MODE_ECB, DECRYPT, bf_dec_tv_template, BF_DEC_TEST_VECTORS);		test_cipher ("blowfish", MODE_CBC, ENCRYPT, bf_cbc_enc_tv_template, BF_CBC_ENC_TEST_VECTORS);		test_cipher ("blowfish", MODE_CBC, DECRYPT, bf_cbc_dec_tv_template, BF_CBC_DEC_TEST_VECTORS);		//TWOFISH		test_cipher ("twofish", MODE_ECB, ENCRYPT, tf_enc_tv_template, TF_ENC_TEST_VECTORS);		test_cipher ("twofish", MODE_ECB, DECRYPT, tf_dec_tv_template, TF_DEC_TEST_VECTORS);		test_cipher ("twofish", MODE_CBC, ENCRYPT, tf_cbc_enc_tv_template, TF_CBC_ENC_TEST_VECTORS);		test_cipher ("twofish", MODE_CBC, DECRYPT, tf_cbc_dec_tv_template, TF_CBC_DEC_TEST_VECTORS);		//SERPENT		test_cipher ("serpent", MODE_ECB, ENCRYPT, serpent_enc_tv_template, SERPENT_ENC_TEST_VECTORS);		test_cipher ("serpent", MODE_ECB, DECRYPT, serpent_dec_tv_template, SERPENT_DEC_TEST_VECTORS);		//TNEPRES		test_cipher ("tnepres", MODE_ECB, ENCRYPT, tnepres_enc_tv_template, TNEPRES_ENC_TEST_VECTORS);		test_cipher ("tnepres", MODE_ECB, DECRYPT, tnepres_dec_tv_template, TNEPRES_DEC_TEST_VECTORS);		//AES		test_cipher ("aes", MODE_ECB, ENCRYPT, aes_enc_tv_template, AES_ENC_TEST_VECTORS);		test_cipher ("aes", MODE_ECB, DECRYPT, aes_dec_tv_template, AES_DEC_TEST_VECTORS);		//CAST5		test_cipher ("cast5", MODE_ECB, ENCRYPT, cast5_enc_tv_template, CAST5_ENC_TEST_VECTORS);		test_cipher ("cast5", MODE_ECB, DECRYPT, cast5_dec_tv_template, CAST5_DEC_TEST_VECTORS);		//CAST6		test_cipher ("cast6", MODE_ECB, ENCRYPT, cast6_enc_tv_template, CAST6_ENC_TEST_VECTORS);		test_cipher ("cast6", MODE_ECB, DECRYPT, cast6_dec_tv_template, CAST6_DEC_TEST_VECTORS);		//ARC4		test_cipher ("arc4", MODE_ECB, ENCRYPT, arc4_enc_tv_template, ARC4_ENC_TEST_VECTORS);		test_cipher ("arc4", MODE_ECB, DECRYPT, arc4_dec_tv_template, ARC4_DEC_TEST_VECTORS);		//TEA		test_cipher ("tea", MODE_ECB, ENCRYPT, tea_enc_tv_template, TEA_ENC_TEST_VECTORS);		test_cipher ("tea", MODE_ECB, DECRYPT, tea_dec_tv_template, TEA_DEC_TEST_VECTORS);		//XTEA		test_cipher ("xtea", MODE_ECB, ENCRYPT, xtea_enc_tv_template, XTEA_ENC_TEST_VECTORS);		test_cipher ("xtea", MODE_ECB, DECRYPT, xtea_dec_tv_template, XTEA_DEC_TEST_VECTORS);		//KHAZAD		test_cipher ("khazad", MODE_ECB, ENCRYPT, khazad_enc_tv_template, KHAZAD_ENC_TEST_VECTORS);		test_cipher ("khazad", MODE_ECB, DECRYPT, khazad_dec_tv_template, KHAZAD_DEC_TEST_VECTORS);		//ANUBIS		test_cipher ("anubis", MODE_ECB, ENCRYPT, anubis_enc_tv_template, ANUBIS_ENC_TEST_VECTORS);		test_cipher ("anubis", MODE_ECB, DECRYPT, anubis_dec_tv_template, ANUBIS_DEC_TEST_VECTORS);		test_cipher ("anubis", MODE_CBC, ENCRYPT, anubis_cbc_enc_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS);		test_cipher ("anubis", MODE_CBC, DECRYPT, anubis_cbc_dec_tv_template, ANUBIS_CBC_ENC_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);		test_hash("wp384", wp384_tv_template, WP384_TEST_VECTORS);		test_hash("wp256", wp256_tv_template, WP256_TEST_VECTORS);		test_hash("tgr192", tgr192_tv_template, TGR192_TEST_VECTORS);		test_hash("tgr160", tgr160_tv_template, TGR160_TEST_VECTORS);		test_hash("tgr128", tgr128_tv_template, TGR128_TEST_VECTORS);		test_deflate();		test_crc32c();#ifdef CONFIG_CRYPTO_HMAC		test_hmac("md5", hmac_md5_tv_template, HMAC_MD5_TEST_VECTORS);		test_hmac("sha1", hmac_sha1_tv_template, HMAC_SHA1_TEST_VECTORS);		test_hmac("sha256", hmac_sha256_tv_template, HMAC_SHA256_TEST_VECTORS);#endif		test_hash("michael_mic", michael_mic_tv_template, MICHAEL_MIC_TEST_VECTORS);		break;	case 1:		test_hash("md5", md5_tv_template, MD5_TEST_VECTORS);		break;	case 2:		test_hash("sha1", sha1_tv_template, SHA1_TEST_VECTORS);		break;	case 3:		test_cipher ("des", MODE_ECB, ENCRYPT, des_enc_tv_template, DES_ENC_TEST_VECTORS);		test_cipher ("des", MODE_ECB, DECRYPT, des_dec_tv_template, DES_DEC_TEST_VECTORS);		test_cipher ("des", MODE_CBC, ENCRYPT, des_cbc_enc_tv_template, DES_CBC_ENC_TEST_VECTORS);		test_cipher ("des", MODE_CBC, DECRYPT, des_cbc_dec_tv_template, DES_CBC_DEC_TEST_VECTORS);		break;	case 4:		test_cipher ("des3_ede", MODE_ECB, ENCRYPT, des3_ede_enc_tv_template, DES3_EDE_ENC_TEST_VECTORS);		test_cipher ("des3_ede", MODE_ECB, DECRYPT, des3_ede_dec_tv_template, DES3_EDE_DEC_TEST_VECTORS);		break;	case 5:		test_hash("md4", md4_tv_template, MD4_TEST_VECTORS);		break;	case 6:		test_hash("sha256", sha256_tv_template, SHA256_TEST_VECTORS);		break;	case 7:		test_cipher ("blowfish", MODE_ECB, ENCRYPT, bf_enc_tv_template, BF_ENC_TEST_VECTORS);		test_cipher ("blowfish", MODE_ECB, DECRYPT, bf_dec_tv_template, BF_DEC_TEST_VECTORS);		test_cipher ("blowfish", MODE_CBC, ENCRYPT, bf_cbc_enc_tv_template, BF_CBC_ENC_TEST_VECTORS);		test_cipher ("blowfish", MODE_CBC, DECRYPT, bf_cbc_dec_tv_template, BF_CBC_DEC_TEST_VECTORS);		break;	case 8:		test_cipher ("twofish", MODE_ECB, ENCRYPT, tf_enc_tv_template, TF_ENC_TEST_VECTORS);		test_cipher ("twofish", MODE_ECB, DECRYPT, tf_dec_tv_template, TF_DEC_TEST_VECTORS);		test_cipher ("twofish", MODE_CBC, ENCRYPT, tf_cbc_enc_tv_template, TF_CBC_ENC_TEST_VECTORS);		test_cipher ("twofish", MODE_CBC, DECRYPT, tf_cbc_dec_tv_template, TF_CBC_DEC_TEST_VECTORS);		break;	case 9:		test_cipher ("serpent", MODE_ECB, ENCRYPT, serpent_enc_tv_template, SERPENT_ENC_TEST_VECTORS);		test_cipher ("serpent", MODE_ECB, DECRYPT, serpent_dec_tv_template, SERPENT_DEC_TEST_VECTORS);		break;	case 10:		test_cipher ("aes", MODE_ECB, ENCRYPT, aes_enc_tv_template, AES_ENC_TEST_VECTORS);		test_cipher ("aes", MODE_ECB, DECRYPT, aes_dec_tv_template, AES_DEC_TEST_VECTORS);		break;	case 11:		test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS);		break;	case 12:		test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS);		break;	case 13:		test_deflate();		break;	case 14:		test_cipher ("cast5", MODE_ECB, ENCRYPT, cast5_enc_tv_template, CAST5_ENC_TEST_VECTORS);		test_cipher ("cast5", MODE_ECB, DECRYPT, cast5_dec_tv_template, CAST5_DEC_TEST_VECTORS);		break;	case 15:		test_cipher ("cast6", MODE_ECB, ENCRYPT, cast6_enc_tv_template, CAST6_ENC_TEST_VECTORS);		test_cipher ("cast6", MODE_ECB, DECRYPT, cast6_dec_tv_template, CAST6_DEC_TEST_VECTORS);		break;	case 16:		test_cipher ("arc4", MODE_ECB, ENCRYPT, arc4_enc_tv_template, ARC4_ENC_TEST_VECTORS);		test_cipher ("arc4", MODE_ECB, DECRYPT, arc4_dec_tv_template, ARC4_DEC_TEST_VECTORS);		break;	case 17:		test_hash("michael_mic", michael_mic_tv_template, MICHAEL_MIC_TEST_VECTORS);		break;	case 18:		test_crc32c();		break;	case 19:		test_cipher ("tea", MODE_ECB, ENCRYPT, tea_enc_tv_template, TEA_ENC_TEST_VECTORS);		test_cipher ("tea", MODE_ECB, DECRYPT, tea_dec_tv_template, TEA_DEC_TEST_VECTORS);		break;	case 20:		test_cipher ("xtea", MODE_ECB, ENCRYPT, xtea_enc_tv_template, XTEA_ENC_TEST_VECTORS);		test_cipher ("xtea", MODE_ECB, DECRYPT, xtea_dec_tv_template, XTEA_DEC_TEST_VECTORS);		break;	case 21:		test_cipher ("khazad", MODE_ECB, ENCRYPT, khazad_enc_tv_template, KHAZAD_ENC_TEST_VECTORS);		test_cipher ("khazad", MODE_ECB, DECRYPT, khazad_dec_tv_template, KHAZAD_DEC_TEST_VECTORS);		break;	case 22:		test_hash("wp512", wp512_tv_template, WP512_TEST_VECTORS);		break;	case 23:		test_hash("wp384", wp384_tv_template, WP384_TEST_VECTORS);		break;	case 24:		test_hash("wp256", wp256_tv_template, WP256_TEST_VECTORS);		break;	case 25:		test_cipher ("tnepres", MODE_ECB, ENCRYPT, tnepres_enc_tv_template, TNEPRES_ENC_TEST_VECTORS);		test_cipher ("tnepres", MODE_ECB, DECRYPT, tnepres_dec_tv_template, TNEPRES_DEC_TEST_VECTORS);		break;	case 26:		test_cipher ("anubis", MODE_ECB, ENCRYPT, anubis_enc_tv_template, ANUBIS_ENC_TEST_VECTORS);		test_cipher ("anubis", MODE_ECB, DECRYPT, anubis_dec_tv_template, ANUBIS_DEC_TEST_VECTORS);		test_cipher ("anubis", MODE_CBC, ENCRYPT, anubis_cbc_enc_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS);		test_cipher ("anubis", MODE_CBC, DECRYPT, anubis_cbc_dec_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS);		break;	case 27:		test_hash("tgr192", tgr192_tv_template, TGR192_TEST_VECTORS);		break;	case 28:		test_hash("tgr160", tgr160_tv_template, TGR160_TEST_VECTORS);		break;	case 29:		test_hash("tgr128", tgr128_tv_template, TGR128_TEST_VECTORS);		break;#ifdef CONFIG_CRYPTO_HMAC	case 100:		test_hmac("md5", hmac_md5_tv_template, HMAC_MD5_TEST_VECTORS);		break;	case 101:		test_hmac("sha1", hmac_sha1_tv_template, HMAC_SHA1_TEST_VECTORS);		break;	case 102:		test_hmac("sha256", hmac_sha256_tv_template, HMAC_SHA256_TEST_VECTORS);		break;#endif	case 200:		test_cipher_speed("aes", MODE_ECB, ENCRYPT, sec, aes_speed_template);		test_cipher_speed("aes", MODE_ECB, DECRYPT, sec, aes_speed_template);		test_cipher_speed("aes", MODE_CBC, ENCRYPT, sec, aes_speed_template);		test_cipher_speed("aes", MODE_CBC, DECRYPT, sec, aes_speed_template);		break;	case 201:		test_cipher_speed("des3_ede", MODE_ECB, ENCRYPT, sec, des3_ede_speed_template);		test_cipher_speed("des3_ede", MODE_ECB, DECRYPT, sec, des3_ede_speed_template);		test_cipher_speed("des3_ede", MODE_CBC, ENCRYPT, sec, des3_ede_speed_template);		test_cipher_speed("des3_ede", MODE_CBC, DECRYPT, sec, des3_ede_speed_template);		break;	case 202:		test_cipher_speed("twofish", MODE_ECB, ENCRYPT, sec, twofish_speed_template);		test_cipher_speed("twofish", MODE_ECB, DECRYPT, sec, twofish_speed_template);		test_cipher_speed("twofish", MODE_CBC, ENCRYPT, sec, twofish_speed_template);		test_cipher_speed("twofish", MODE_CBC, DECRYPT, sec, twofish_speed_template);		break;	case 203:		test_cipher_speed("blowfish", MODE_ECB, ENCRYPT, sec, blowfish_speed_template);		test_cipher_speed("blowfish", MODE_ECB, DECRYPT, sec, blowfish_speed_template);		test_cipher_speed("blowfish", MODE_CBC, ENCRYPT, sec, blowfish_speed_template);		test_cipher_speed("blowfish", MODE_CBC, DECRYPT, sec, blowfish_speed_template);		break;	case 204:		test_cipher_speed("des", MODE_ECB, ENCRYPT, sec, des_speed_template);		test_cipher_speed("des", MODE_ECB, DECRYPT, sec, des_speed_template);		test_cipher_speed("des", MODE_CBC, ENCRYPT, sec, des_speed_template);		test_cipher_speed("des", MODE_CBC, DECRYPT, sec, des_speed_template);		break;	case 1000:		test_available();		break;	default:		/* useful for debugging */		printk("not testing anything\n");		break;	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/dce907c00ff246a1fbb2b619964753ebc046591d/tcrypt.c/clean/crypto/tcrypt.c