DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
[linux-2.6.git] / crypto / tcrypt.h
blobecdeeb1a7b05116301c2b6bf315319e463d09264
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 hash_speed {
26 unsigned int blen; /* buffer length */
27 unsigned int plen; /* per-update length */
28 unsigned int klen; /* key length */
32 * DES test vectors.
34 #define DES3_SPEED_VECTORS 1
36 static struct cipher_speed_template des3_speed_template[] = {
38 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
39 "\x55\x55\x55\x55\x55\x55\x55\x55"
40 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
41 .klen = 24,
46 * Cipher speed tests
48 static u8 speed_template_8[] = {8, 0};
49 static u8 speed_template_24[] = {24, 0};
50 static u8 speed_template_8_16[] = {8, 16, 0};
51 static u8 speed_template_8_32[] = {8, 32, 0};
52 static u8 speed_template_16_32[] = {16, 32, 0};
53 static u8 speed_template_16_24_32[] = {16, 24, 32, 0};
54 static u8 speed_template_20_28_36[] = {20, 28, 36, 0};
55 static u8 speed_template_32_40_48[] = {32, 40, 48, 0};
56 static u8 speed_template_32_48[] = {32, 48, 0};
57 static u8 speed_template_32_48_64[] = {32, 48, 64, 0};
58 static u8 speed_template_32_64[] = {32, 64, 0};
61 * Digest speed tests
63 static struct hash_speed generic_hash_speed_template[] = {
64 { .blen = 16, .plen = 16, },
65 { .blen = 64, .plen = 16, },
66 { .blen = 64, .plen = 64, },
67 { .blen = 256, .plen = 16, },
68 { .blen = 256, .plen = 64, },
69 { .blen = 256, .plen = 256, },
70 { .blen = 1024, .plen = 16, },
71 { .blen = 1024, .plen = 256, },
72 { .blen = 1024, .plen = 1024, },
73 { .blen = 2048, .plen = 16, },
74 { .blen = 2048, .plen = 256, },
75 { .blen = 2048, .plen = 1024, },
76 { .blen = 2048, .plen = 2048, },
77 { .blen = 4096, .plen = 16, },
78 { .blen = 4096, .plen = 256, },
79 { .blen = 4096, .plen = 1024, },
80 { .blen = 4096, .plen = 4096, },
81 { .blen = 8192, .plen = 16, },
82 { .blen = 8192, .plen = 256, },
83 { .blen = 8192, .plen = 1024, },
84 { .blen = 8192, .plen = 4096, },
85 { .blen = 8192, .plen = 8192, },
87 /* End marker */
88 { .blen = 0, .plen = 0, }
91 static struct hash_speed hash_speed_template_16[] = {
92 { .blen = 16, .plen = 16, .klen = 16, },
93 { .blen = 64, .plen = 16, .klen = 16, },
94 { .blen = 64, .plen = 64, .klen = 16, },
95 { .blen = 256, .plen = 16, .klen = 16, },
96 { .blen = 256, .plen = 64, .klen = 16, },
97 { .blen = 256, .plen = 256, .klen = 16, },
98 { .blen = 1024, .plen = 16, .klen = 16, },
99 { .blen = 1024, .plen = 256, .klen = 16, },
100 { .blen = 1024, .plen = 1024, .klen = 16, },
101 { .blen = 2048, .plen = 16, .klen = 16, },
102 { .blen = 2048, .plen = 256, .klen = 16, },
103 { .blen = 2048, .plen = 1024, .klen = 16, },
104 { .blen = 2048, .plen = 2048, .klen = 16, },
105 { .blen = 4096, .plen = 16, .klen = 16, },
106 { .blen = 4096, .plen = 256, .klen = 16, },
107 { .blen = 4096, .plen = 1024, .klen = 16, },
108 { .blen = 4096, .plen = 4096, .klen = 16, },
109 { .blen = 8192, .plen = 16, .klen = 16, },
110 { .blen = 8192, .plen = 256, .klen = 16, },
111 { .blen = 8192, .plen = 1024, .klen = 16, },
112 { .blen = 8192, .plen = 4096, .klen = 16, },
113 { .blen = 8192, .plen = 8192, .klen = 16, },
115 /* End marker */
116 { .blen = 0, .plen = 0, .klen = 0, }
119 #endif /* _CRYPTO_TCRYPT_H */