diff options
Diffstat (limited to 'crypto/tcrypt.h')
-rw-r--r-- | crypto/tcrypt.h | 92 |
1 files changed, 91 insertions, 1 deletions
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h index 72d40704042f..c01a0ce9b40a 100644 --- a/crypto/tcrypt.h +++ b/crypto/tcrypt.h | |||
@@ -12,7 +12,8 @@ | |||
12 | * Software Foundation; either version 2 of the License, or (at your option) | 12 | * Software Foundation; either version 2 of the License, or (at your option) |
13 | * any later version. | 13 | * any later version. |
14 | * | 14 | * |
15 | * 14 - 09 - 2003 Changes by Kartikey Mahendra Bhatt | 15 | * 2004-08-09 Cipher speed tests by Reyk Floeter <reyk@vantronix.net> |
16 | * 2003-09-14 Changes by Kartikey Mahendra Bhatt | ||
16 | * | 17 | * |
17 | */ | 18 | */ |
18 | #ifndef _CRYPTO_TCRYPT_H | 19 | #ifndef _CRYPTO_TCRYPT_H |
@@ -58,6 +59,11 @@ struct cipher_testvec { | |||
58 | unsigned char tap[MAX_TAP]; | 59 | unsigned char tap[MAX_TAP]; |
59 | }; | 60 | }; |
60 | 61 | ||
62 | struct cipher_speed { | ||
63 | unsigned char klen; | ||
64 | unsigned int blen; | ||
65 | }; | ||
66 | |||
61 | /* | 67 | /* |
62 | * MD4 test vectors from RFC1320 | 68 | * MD4 test vectors from RFC1320 |
63 | */ | 69 | */ |
@@ -2728,4 +2734,88 @@ static struct hash_testvec michael_mic_tv_template[] = { | |||
2728 | } | 2734 | } |
2729 | }; | 2735 | }; |
2730 | 2736 | ||
2737 | /* | ||
2738 | * Cipher speed tests | ||
2739 | */ | ||
2740 | static struct cipher_speed aes_speed_template[] = { | ||
2741 | { .klen = 16, .blen = 16, }, | ||
2742 | { .klen = 16, .blen = 64, }, | ||
2743 | { .klen = 16, .blen = 256, }, | ||
2744 | { .klen = 16, .blen = 1024, }, | ||
2745 | { .klen = 16, .blen = 8192, }, | ||
2746 | { .klen = 24, .blen = 16, }, | ||
2747 | { .klen = 24, .blen = 64, }, | ||
2748 | { .klen = 24, .blen = 256, }, | ||
2749 | { .klen = 24, .blen = 1024, }, | ||
2750 | { .klen = 24, .blen = 8192, }, | ||
2751 | { .klen = 32, .blen = 16, }, | ||
2752 | { .klen = 32, .blen = 64, }, | ||
2753 | { .klen = 32, .blen = 256, }, | ||
2754 | { .klen = 32, .blen = 1024, }, | ||
2755 | { .klen = 32, .blen = 8192, }, | ||
2756 | |||
2757 | /* End marker */ | ||
2758 | { .klen = 0, .blen = 0, } | ||
2759 | }; | ||
2760 | |||
2761 | static struct cipher_speed des3_ede_speed_template[] = { | ||
2762 | { .klen = 24, .blen = 16, }, | ||
2763 | { .klen = 24, .blen = 64, }, | ||
2764 | { .klen = 24, .blen = 256, }, | ||
2765 | { .klen = 24, .blen = 1024, }, | ||
2766 | { .klen = 24, .blen = 8192, }, | ||
2767 | |||
2768 | /* End marker */ | ||
2769 | { .klen = 0, .blen = 0, } | ||
2770 | }; | ||
2771 | |||
2772 | static struct cipher_speed twofish_speed_template[] = { | ||
2773 | { .klen = 16, .blen = 16, }, | ||
2774 | { .klen = 16, .blen = 64, }, | ||
2775 | { .klen = 16, .blen = 256, }, | ||
2776 | { .klen = 16, .blen = 1024, }, | ||
2777 | { .klen = 16, .blen = 8192, }, | ||
2778 | { .klen = 24, .blen = 16, }, | ||
2779 | { .klen = 24, .blen = 64, }, | ||
2780 | { .klen = 24, .blen = 256, }, | ||
2781 | { .klen = 24, .blen = 1024, }, | ||
2782 | { .klen = 24, .blen = 8192, }, | ||
2783 | { .klen = 32, .blen = 16, }, | ||
2784 | { .klen = 32, .blen = 64, }, | ||
2785 | { .klen = 32, .blen = 256, }, | ||
2786 | { .klen = 32, .blen = 1024, }, | ||
2787 | { .klen = 32, .blen = 8192, }, | ||
2788 | |||
2789 | /* End marker */ | ||
2790 | { .klen = 0, .blen = 0, } | ||
2791 | }; | ||
2792 | |||
2793 | static struct cipher_speed blowfish_speed_template[] = { | ||
2794 | /* Don't support blowfish keys > 256 bit in this test */ | ||
2795 | { .klen = 8, .blen = 16, }, | ||
2796 | { .klen = 8, .blen = 64, }, | ||
2797 | { .klen = 8, .blen = 256, }, | ||
2798 | { .klen = 8, .blen = 1024, }, | ||
2799 | { .klen = 8, .blen = 8192, }, | ||
2800 | { .klen = 32, .blen = 16, }, | ||
2801 | { .klen = 32, .blen = 64, }, | ||
2802 | { .klen = 32, .blen = 256, }, | ||
2803 | { .klen = 32, .blen = 1024, }, | ||
2804 | { .klen = 32, .blen = 8192, }, | ||
2805 | |||
2806 | /* End marker */ | ||
2807 | { .klen = 0, .blen = 0, } | ||
2808 | }; | ||
2809 | |||
2810 | static struct cipher_speed des_speed_template[] = { | ||
2811 | { .klen = 8, .blen = 16, }, | ||
2812 | { .klen = 8, .blen = 64, }, | ||
2813 | { .klen = 8, .blen = 256, }, | ||
2814 | { .klen = 8, .blen = 1024, }, | ||
2815 | { .klen = 8, .blen = 8192, }, | ||
2816 | |||
2817 | /* End marker */ | ||
2818 | { .klen = 0, .blen = 0, } | ||
2819 | }; | ||
2820 | |||
2731 | #endif /* _CRYPTO_TCRYPT_H */ | 2821 | #endif /* _CRYPTO_TCRYPT_H */ |