Lynx framebuffers multidomain implementation.
[linux/elbrus.git] / crypto / tcrypt.h
blob6c7e21a09f78f170905abf74a897c21dee7a39e9
1 /*
2 * Quick & dirty crypto testing module.
4 * This will only exist until we have a better testing mechanism
5 * (e.g. a char device).
7 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
8 * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
9 * Copyright (c) 2007 Nokia Siemens Networks
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the Free
13 * Software Foundation; either version 2 of the License, or (at your option)
14 * any later version.
17 #ifndef _CRYPTO_TCRYPT_H
18 #define _CRYPTO_TCRYPT_H
20 struct cipher_speed_template {
21 const char *key;
22 unsigned int klen;
25 struct aead_speed_template {
26 const char *key;
27 unsigned int klen;
30 struct hash_speed {
31 unsigned int blen; /* buffer length */
32 unsigned int plen; /* per-update length */
33 unsigned int klen; /* key length */
37 * DES test vectors.
39 #define DES3_SPEED_VECTORS 1
41 static struct cipher_speed_template des3_speed_template[] = {
43 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
44 "\x55\x55\x55\x55\x55\x55\x55\x55"
45 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
46 .klen = 24,
51 * Cipher speed tests
53 static u8 speed_template_8[] = {8, 0};
54 static u8 speed_template_24[] = {24, 0};
55 static u8 speed_template_8_16[] = {8, 16, 0};
56 static u8 speed_template_8_32[] = {8, 32, 0};
57 static u8 speed_template_16_32[] = {16, 32, 0};
58 static u8 speed_template_16_24_32[] = {16, 24, 32, 0};
59 static u8 speed_template_20_28_36[] = {20, 28, 36, 0};
60 static u8 speed_template_32_40_48[] = {32, 40, 48, 0};
61 static u8 speed_template_32_48[] = {32, 48, 0};
62 static u8 speed_template_32_48_64[] = {32, 48, 64, 0};
63 static u8 speed_template_32_64[] = {32, 64, 0};
66 * AEAD speed tests
68 static u8 aead_speed_template_20[] = {20, 0};
71 * Digest speed tests
73 static struct hash_speed generic_hash_speed_template[] = {
74 { .blen = 16, .plen = 16, },
75 { .blen = 64, .plen = 16, },
76 { .blen = 64, .plen = 64, },
77 { .blen = 256, .plen = 16, },
78 { .blen = 256, .plen = 64, },
79 { .blen = 256, .plen = 256, },
80 { .blen = 1024, .plen = 16, },
81 { .blen = 1024, .plen = 256, },
82 { .blen = 1024, .plen = 1024, },
83 { .blen = 2048, .plen = 16, },
84 { .blen = 2048, .plen = 256, },
85 { .blen = 2048, .plen = 1024, },
86 { .blen = 2048, .plen = 2048, },
87 { .blen = 4096, .plen = 16, },
88 { .blen = 4096, .plen = 256, },
89 { .blen = 4096, .plen = 1024, },
90 { .blen = 4096, .plen = 4096, },
91 { .blen = 8192, .plen = 16, },
92 { .blen = 8192, .plen = 256, },
93 { .blen = 8192, .plen = 1024, },
94 { .blen = 8192, .plen = 4096, },
95 { .blen = 8192, .plen = 8192, },
97 /* End marker */
98 { .blen = 0, .plen = 0, }
101 static struct hash_speed hash_speed_template_16[] = {
102 { .blen = 16, .plen = 16, .klen = 16, },
103 { .blen = 64, .plen = 16, .klen = 16, },
104 { .blen = 64, .plen = 64, .klen = 16, },
105 { .blen = 256, .plen = 16, .klen = 16, },
106 { .blen = 256, .plen = 64, .klen = 16, },
107 { .blen = 256, .plen = 256, .klen = 16, },
108 { .blen = 1024, .plen = 16, .klen = 16, },
109 { .blen = 1024, .plen = 256, .klen = 16, },
110 { .blen = 1024, .plen = 1024, .klen = 16, },
111 { .blen = 2048, .plen = 16, .klen = 16, },
112 { .blen = 2048, .plen = 256, .klen = 16, },
113 { .blen = 2048, .plen = 1024, .klen = 16, },
114 { .blen = 2048, .plen = 2048, .klen = 16, },
115 { .blen = 4096, .plen = 16, .klen = 16, },
116 { .blen = 4096, .plen = 256, .klen = 16, },
117 { .blen = 4096, .plen = 1024, .klen = 16, },
118 { .blen = 4096, .plen = 4096, .klen = 16, },
119 { .blen = 8192, .plen = 16, .klen = 16, },
120 { .blen = 8192, .plen = 256, .klen = 16, },
121 { .blen = 8192, .plen = 1024, .klen = 16, },
122 { .blen = 8192, .plen = 4096, .klen = 16, },
123 { .blen = 8192, .plen = 8192, .klen = 16, },
125 /* End marker */
126 { .blen = 0, .plen = 0, .klen = 0, }
129 #endif /* _CRYPTO_TCRYPT_H */