summaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/tcrypt.h')
-rw-r--r--crypto/tcrypt.h92
1 files changed, 91 insertions, 1 deletions
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index 72d40704042..c01a0ce9b40 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -12,7 +12,8 @@
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
- * 14 - 09 - 2003 Changes by Kartikey Mahendra Bhatt
+ * 2004-08-09 Cipher speed tests by Reyk Floeter <reyk@vantronix.net>
+ * 2003-09-14 Changes by Kartikey Mahendra Bhatt
*
*/
#ifndef _CRYPTO_TCRYPT_H
@@ -58,6 +59,11 @@ struct cipher_testvec {
unsigned char tap[MAX_TAP];
};
+struct cipher_speed {
+ unsigned char klen;
+ unsigned int blen;
+};
+
/*
* MD4 test vectors from RFC1320
*/
@@ -2728,4 +2734,88 @@ static struct hash_testvec michael_mic_tv_template[] = {
}
};
+/*
+ * Cipher speed tests
+ */
+static struct cipher_speed aes_speed_template[] = {
+ { .klen = 16, .blen = 16, },
+ { .klen = 16, .blen = 64, },
+ { .klen = 16, .blen = 256, },
+ { .klen = 16, .blen = 1024, },
+ { .klen = 16, .blen = 8192, },
+ { .klen = 24, .blen = 16, },
+ { .klen = 24, .blen = 64, },
+ { .klen = 24, .blen = 256, },
+ { .klen = 24, .blen = 1024, },
+ { .klen = 24, .blen = 8192, },
+ { .klen = 32, .blen = 16, },
+ { .klen = 32, .blen = 64, },
+ { .klen = 32, .blen = 256, },
+ { .klen = 32, .blen = 1024, },
+ { .klen = 32, .blen = 8192, },
+
+ /* End marker */
+ { .klen = 0, .blen = 0, }
+};
+
+static struct cipher_speed des3_ede_speed_template[] = {
+ { .klen = 24, .blen = 16, },
+ { .klen = 24, .blen = 64, },
+ { .klen = 24, .blen = 256, },
+ { .klen = 24, .blen = 1024, },
+ { .klen = 24, .blen = 8192, },
+
+ /* End marker */
+ { .klen = 0, .blen = 0, }
+};
+
+static struct cipher_speed twofish_speed_template[] = {
+ { .klen = 16, .blen = 16, },
+ { .klen = 16, .blen = 64, },
+ { .klen = 16, .blen = 256, },
+ { .klen = 16, .blen = 1024, },
+ { .klen = 16, .blen = 8192, },
+ { .klen = 24, .blen = 16, },
+ { .klen = 24, .blen = 64, },
+ { .klen = 24, .blen = 256, },
+ { .klen = 24, .blen = 1024, },
+ { .klen = 24, .blen = 8192, },
+ { .klen = 32, .blen = 16, },
+ { .klen = 32, .blen = 64, },
+ { .klen = 32, .blen = 256, },
+ { .klen = 32, .blen = 1024, },
+ { .klen = 32, .blen = 8192, },
+
+ /* End marker */
+ { .klen = 0, .blen = 0, }
+};
+
+static struct cipher_speed blowfish_speed_template[] = {
+ /* Don't support blowfish keys > 256 bit in this test */
+ { .klen = 8, .blen = 16, },
+ { .klen = 8, .blen = 64, },
+ { .klen = 8, .blen = 256, },
+ { .klen = 8, .blen = 1024, },
+ { .klen = 8, .blen = 8192, },
+ { .klen = 32, .blen = 16, },
+ { .klen = 32, .blen = 64, },
+ { .klen = 32, .blen = 256, },
+ { .klen = 32, .blen = 1024, },
+ { .klen = 32, .blen = 8192, },
+
+ /* End marker */
+ { .klen = 0, .blen = 0, }
+};
+
+static struct cipher_speed des_speed_template[] = {
+ { .klen = 8, .blen = 16, },
+ { .klen = 8, .blen = 64, },
+ { .klen = 8, .blen = 256, },
+ { .klen = 8, .blen = 1024, },
+ { .klen = 8, .blen = 8192, },
+
+ /* End marker */
+ { .klen = 0, .blen = 0, }
+};
+
#endif /* _CRYPTO_TCRYPT_H */