1 /* test_hmac_prng.c - TinyCrypt implementation of some HMAC-PRNG tests */
2
3 /*
4 * Copyright (C) 2017 by Intel Corporation, All Rights Reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *
9 * - Redistributions of source code must retain the above copyright notice,
10 * this list of conditions and the following disclaimer.
11 *
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * - Neither the name of Intel Corporation nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 /*
34 * DESCRIPTION
35 * This module tests the following PRNG routines:
36 *
37 * Scenarios tested include:
38 * - HMAC-PRNG init
39 * - HMAC-PRNG reseed
40 * - HMAC-PRNG generate
41 */
42
43 #include <tinycrypt/hmac_prng.h>
44 #include <tinycrypt/constants.h>
45
46 #include <stdio.h>
47 #include <zephyr/tc_util.h>
48 #include <zephyr/test_utils.h>
49 #include <zephyr/ztest.h>
50
51 struct hmac_prng_test_vector {
52 uint8_t entropyinputlen;
53 uint8_t noncelen;
54 uint8_t personalizationstringlen;
55 uint8_t additionalinputlen;
56 uint8_t returnedbitslen;
57 uint8_t entropyinput[32];
58 uint8_t nonce[16];
59 uint8_t personalizationstring[32];
60 uint8_t entropyinputreseed[32];
61 uint8_t additionalinputreseed[32];
62 uint8_t returnedbits[128];
63 };
64
do_hmac_prng_pr_false_test(unsigned int testnum,const struct hmac_prng_test_vector * vec)65 unsigned int do_hmac_prng_pr_false_test(unsigned int testnum, const struct
66 hmac_prng_test_vector * vec)
67 {
68 struct tc_hmac_prng_struct h;
69 uint8_t random[128];
70 uint32_t seed_material_size;
71 /* entropyinput || nonce || personalizationstring */
72 uint8_t seed_material[32 + 16 + 32];
73 unsigned int result = TC_PASS;
74
75 uint8_t *p = seed_material;
76
77 memset(&h, 0x0, sizeof(h));
78
79 if (vec->entropyinputlen > 0) {
80 memcpy(p, vec->entropyinput, vec->entropyinputlen);
81 p += vec->entropyinputlen;
82 }
83
84 if (vec->noncelen > 0) {
85 memcpy(p, vec->nonce, vec->noncelen);
86 p += vec->noncelen;
87 }
88
89 if (vec->personalizationstringlen > 0) {
90 memcpy(p, vec->personalizationstring,
91 vec->personalizationstringlen);
92 }
93
94 seed_material_size = vec->entropyinputlen + vec->noncelen +
95 vec->personalizationstringlen;
96 (void)tc_hmac_prng_init(&h, seed_material, seed_material_size);
97 (void)tc_hmac_prng_reseed(&h, vec->entropyinputreseed,
98 vec->entropyinputlen, 0, 0);
99 (void)tc_hmac_prng_generate(random, vec->returnedbitslen, &h);
100 (void)tc_hmac_prng_generate(random, vec->returnedbitslen, &h);
101 result = check_result(testnum, vec->returnedbits, vec->returnedbitslen,
102 random, vec->returnedbitslen, 1);
103 return result;
104 }
105
test_1(void)106 unsigned int test_1(void)
107 {
108 unsigned int result = TC_PASS;
109 const struct hmac_prng_test_vector vec = {
110 32,
111 16,
112 0,
113 0,
114 128,
115 {
116 0x06, 0x03, 0x2c, 0xd5, 0xee, 0xd3, 0x3f, 0x39, 0x26,
117 0x5f, 0x49, 0xec, 0xb1, 0x42, 0xc5, 0x11, 0xda, 0x9a,
118 0xff, 0x2a, 0xf7, 0x12, 0x03, 0xbf, 0xfa, 0xf3, 0x4a,
119 0x9c, 0xa5, 0xbd, 0x9c, 0x0d,
120 },
121 {
122 0x0e, 0x66, 0xf7, 0x1e, 0xdc, 0x43, 0xe4, 0x2a, 0x45,
123 0xad, 0x3c, 0x6f, 0xc6, 0xcd, 0xc4, 0xdf,
124 },
125 {
126 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
127 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
128 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
129 0x00, 0x00, 0x00, 0x00, 0x00,
130 },
131 {
132 0x01, 0x92, 0x0a, 0x4e, 0x66, 0x9e, 0xd3, 0xa8, 0x5a,
133 0xe8, 0xa3, 0x3b, 0x35, 0xa7, 0x4a, 0xd7, 0xfb, 0x2a,
134 0x6b, 0xb4, 0xcf, 0x39, 0x5c, 0xe0, 0x03, 0x34, 0xa9,
135 0xc9, 0xa5, 0xa5, 0xd5, 0x52,
136 },
137 {
138 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
139 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
140 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
141 0x00, 0x00, 0x00, 0x00, 0x00,
142 },
143 {
144 0x76, 0xfc, 0x79, 0xfe, 0x9b, 0x50, 0xbe, 0xcc, 0xc9,
145 0x91, 0xa1, 0x1b, 0x56, 0x35, 0x78, 0x3a, 0x83, 0x53,
146 0x6a, 0xdd, 0x03, 0xc1, 0x57, 0xfb, 0x30, 0x64, 0x5e,
147 0x61, 0x1c, 0x28, 0x98, 0xbb, 0x2b, 0x1b, 0xc2, 0x15,
148 0x00, 0x02, 0x09, 0x20, 0x8c, 0xd5, 0x06, 0xcb, 0x28,
149 0xda, 0x2a, 0x51, 0xbd, 0xb0, 0x38, 0x26, 0xaa, 0xf2,
150 0xbd, 0x23, 0x35, 0xd5, 0x76, 0xd5, 0x19, 0x16, 0x08,
151 0x42, 0xe7, 0x15, 0x8a, 0xd0, 0x94, 0x9d, 0x1a, 0x9e,
152 0xc3, 0xe6, 0x6e, 0xa1, 0xb1, 0xa0, 0x64, 0xb0, 0x05,
153 0xde, 0x91, 0x4e, 0xac, 0x2e, 0x9d, 0x4f, 0x2d, 0x72,
154 0xa8, 0x61, 0x6a, 0x80, 0x22, 0x54, 0x22, 0x91, 0x82,
155 0x50, 0xff, 0x66, 0xa4, 0x1b, 0xd2, 0xf8, 0x64, 0xa6,
156 0xa3, 0x8c, 0xc5, 0xb6, 0x49, 0x9d, 0xc4, 0x3f, 0x7f,
157 0x2b, 0xd0, 0x9e, 0x1e, 0x0f, 0x8f, 0x58, 0x85, 0x93,
158 0x51, 0x24,
159 }
160 };
161
162 TC_PRINT(".");
163 result = do_hmac_prng_pr_false_test(1, &vec);
164
165 return result;
166 }
167
test_2(void)168 unsigned int test_2(void)
169 {
170 unsigned int result = TC_PASS;
171 const struct hmac_prng_test_vector vec = {
172 32,
173 16,
174 0,
175 0,
176 128,
177 {
178 0xaa, 0xdc, 0xf3, 0x37, 0x78, 0x8b, 0xb8, 0xac, 0x01,
179 0x97, 0x66, 0x40, 0x72, 0x6b, 0xc5, 0x16, 0x35, 0xd4,
180 0x17, 0x77, 0x7f, 0xe6, 0x93, 0x9e, 0xde, 0xd9, 0xcc,
181 0xc8, 0xa3, 0x78, 0xc7, 0x6a,
182 },
183 {
184 0x9c, 0xcc, 0x9d, 0x80, 0xc8, 0x9a, 0xc5, 0x5a, 0x8c,
185 0xfe, 0x0f, 0x99, 0x94, 0x2f, 0x5a, 0x4d,
186 },
187 {
188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
189 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
190 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
191 0x00, 0x00, 0x00, 0x00, 0x00,
192 },
193 {
194 0x03, 0xa5, 0x77, 0x92, 0x54, 0x7e, 0x0c, 0x98, 0xea,
195 0x17, 0x76, 0xe4, 0xba, 0x80, 0xc0, 0x07, 0x34, 0x62,
196 0x96, 0xa5, 0x6a, 0x27, 0x0a, 0x35, 0xfd, 0x9e, 0xa2,
197 0x84, 0x5c, 0x7e, 0x81, 0xe2,
198 },
199 {
200 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
201 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
202 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
203 0x00, 0x00, 0x00, 0x00, 0x00,
204 },
205 {
206 0x17, 0xd0, 0x9f, 0x40, 0xa4, 0x37, 0x71, 0xf4, 0xa2,
207 0xf0, 0xdb, 0x32, 0x7d, 0xf6, 0x37, 0xde, 0xa9, 0x72,
208 0xbf, 0xff, 0x30, 0xc9, 0x8e, 0xbc, 0x88, 0x42, 0xdc,
209 0x7a, 0x9e, 0x3d, 0x68, 0x1c, 0x61, 0x90, 0x2f, 0x71,
210 0xbf, 0xfa, 0xf5, 0x09, 0x36, 0x07, 0xfb, 0xfb, 0xa9,
211 0x67, 0x4a, 0x70, 0xd0, 0x48, 0xe5, 0x62, 0xee, 0x88,
212 0xf0, 0x27, 0xf6, 0x30, 0xa7, 0x85, 0x22, 0xec, 0x6f,
213 0x70, 0x6b, 0xb4, 0x4a, 0xe1, 0x30, 0xe0, 0x5c, 0x8d,
214 0x7e, 0xac, 0x66, 0x8b, 0xf6, 0x98, 0x0d, 0x99, 0xb4,
215 0xc0, 0x24, 0x29, 0x46, 0x45, 0x23, 0x99, 0xcb, 0x03,
216 0x2c, 0xc6, 0xf9, 0xfd, 0x96, 0x28, 0x47, 0x09, 0xbd,
217 0x2f, 0xa5, 0x65, 0xb9, 0xeb, 0x9f, 0x20, 0x04, 0xbe,
218 0x6c, 0x9e, 0xa9, 0xff, 0x91, 0x28, 0xc3, 0xf9, 0x3b,
219 0x60, 0xdc, 0x30, 0xc5, 0xfc, 0x85, 0x87, 0xa1, 0x0d,
220 0xe6, 0x8c,
221 }
222 };
223
224 TC_PRINT(".");
225 result = do_hmac_prng_pr_false_test(2, &vec);
226
227 return result;
228 }
229
test_3(void)230 unsigned int test_3(void)
231 {
232 unsigned int result = TC_PASS;
233 const struct hmac_prng_test_vector vec = {
234 32,
235 16,
236 0,
237 0,
238 128,
239 {
240 0x62, 0xcd, 0xa4, 0x41, 0xdd, 0x80, 0x2c, 0x76, 0x52,
241 0xc0, 0x0b, 0x99, 0xca, 0xc3, 0x65, 0x2a, 0x64, 0xfc,
242 0x75, 0x38, 0x8d, 0xc9, 0xad, 0xcf, 0x76, 0x35, 0x30,
243 0xac, 0x31, 0xdf, 0x92, 0x14,
244 },
245 {
246 0x5f, 0xdc, 0x89, 0x7a, 0x0c, 0x1c, 0x48, 0x22, 0x04,
247 0xef, 0x07, 0xe0, 0x80, 0x5c, 0x01, 0x4b,
248 },
249 {
250 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
251 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
252 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
253 0x00, 0x00, 0x00, 0x00, 0x00,
254 },
255 {
256 0xbd, 0x9b, 0xbf, 0x71, 0x74, 0x67, 0xbf, 0x4b, 0x5d,
257 0xb2, 0xaa, 0x34, 0x4d, 0xd0, 0xd9, 0x09, 0x97, 0xc8,
258 0x20, 0x1b, 0x22, 0x65, 0xf4, 0x45, 0x12, 0x70, 0x12,
259 0x8f, 0x5a, 0xc0, 0x5a, 0x1a,
260 },
261 {
262 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
263 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
264 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
265 0x00, 0x00, 0x00, 0x00, 0x00,
266 },
267 {
268 0x7e, 0x41, 0xf9, 0x64, 0x7a, 0x5e, 0x67, 0x50, 0xeb,
269 0x8a, 0xcf, 0x13, 0xa0, 0x2f, 0x23, 0xf3, 0xbe, 0x77,
270 0x61, 0x1e, 0x51, 0x99, 0x2c, 0xed, 0xb6, 0x60, 0x2c,
271 0x31, 0x45, 0x31, 0xaf, 0xf2, 0xa6, 0xe4, 0xc5, 0x57,
272 0xda, 0x07, 0x77, 0xd4, 0xe8, 0x5f, 0xae, 0xfc, 0xb1,
273 0x43, 0xf1, 0xa9, 0x2e, 0x0d, 0xba, 0xc8, 0xde, 0x8b,
274 0x88, 0x5c, 0xed, 0x62, 0xa1, 0x24, 0xf0, 0xb1, 0x06,
275 0x20, 0xf1, 0x40, 0x9a, 0xe8, 0x7e, 0x22, 0x89, 0x94,
276 0xb8, 0x30, 0xec, 0xa6, 0x38, 0xcc, 0xdc, 0xee, 0xdd,
277 0x3f, 0xcd, 0x07, 0xd0, 0x24, 0xb6, 0x46, 0x70, 0x4f,
278 0x44, 0xd5, 0xd9, 0xc4, 0xc3, 0xa7, 0xb7, 0x05, 0xf3,
279 0x71, 0x04, 0xb4, 0x5b, 0x9c, 0xfc, 0x2d, 0x93, 0x3a,
280 0xe4, 0x3c, 0x12, 0xf5, 0x3e, 0x3e, 0x6f, 0x79, 0x8c,
281 0x51, 0xbe, 0x5f, 0x64, 0x01, 0x15, 0xd4, 0x5c, 0xf9,
282 0x19, 0xa4,
283 }
284 };
285
286 TC_PRINT(".");
287 result = do_hmac_prng_pr_false_test(3, &vec);
288
289 return result;
290 }
291
test_4(void)292 unsigned int test_4(void)
293 {
294 unsigned int result = TC_PASS;
295 const struct hmac_prng_test_vector vec = {
296 32,
297 16,
298 0,
299 0,
300 128,
301 {
302 0x6b, 0xdc, 0x6c, 0xa8, 0xee, 0xf0, 0xe3, 0x53, 0x3a,
303 0xbd, 0x02, 0x58, 0x0e, 0xbb, 0xc8, 0xa9, 0x2f, 0x38,
304 0x2c, 0x5b, 0x1c, 0x8e, 0x3e, 0xaa, 0x12, 0x56, 0x6e,
305 0xcf, 0xb9, 0x03, 0x89, 0xa3,
306 },
307 {
308 0x8f, 0x84, 0x81, 0xcc, 0x77, 0x35, 0x82, 0x74, 0x77,
309 0xe0, 0xe4, 0xac, 0xb7, 0xf4, 0xa0, 0xfa,
310 },
311 {
312 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
313 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
314 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
315 0x00, 0x00, 0x00, 0x00, 0x00,
316 },
317 {
318 0x72, 0xec, 0xa6, 0xf1, 0x56, 0x07, 0x20, 0xe6, 0xbd,
319 0x1f, 0xf0, 0x15, 0x2c, 0x12, 0xee, 0xff, 0x1f, 0x95,
320 0x94, 0x62, 0xfd, 0x62, 0xc7, 0x2b, 0x7d, 0xde, 0x96,
321 0xab, 0xcb, 0x7f, 0x79, 0xfb,
322 },
323 {
324 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
325 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
326 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
327 0x00, 0x00, 0x00, 0x00, 0x00,
328 },
329 {
330 0xd5, 0xa2, 0xe2, 0xf2, 0x54, 0xb5, 0xae, 0x65, 0x59,
331 0x0d, 0x4f, 0xd1, 0xff, 0x5c, 0x75, 0x8e, 0x42, 0x5b,
332 0xe4, 0xba, 0xcd, 0xee, 0xde, 0x79, 0x89, 0x66, 0x9f,
333 0x0a, 0x22, 0xd3, 0x42, 0x74, 0xfd, 0xfc, 0x2b, 0xf8,
334 0x71, 0x35, 0xe3, 0x0a, 0xbd, 0xae, 0x26, 0x91, 0x62,
335 0x9c, 0x2f, 0x6f, 0x42, 0x5b, 0xd4, 0xe1, 0x19, 0x90,
336 0x4d, 0x47, 0x85, 0xec, 0xd9, 0x32, 0x8f, 0x15, 0x25,
337 0x95, 0x63, 0xe5, 0xa7, 0x1f, 0x91, 0x5e, 0xc0, 0xc0,
338 0x2b, 0x66, 0x65, 0x54, 0x71, 0x06, 0x7b, 0x01, 0x01,
339 0x6f, 0xdf, 0x93, 0x4a, 0x47, 0xb0, 0x17, 0xe0, 0x7c,
340 0x21, 0x33, 0x26, 0x41, 0x40, 0x0b, 0xbe, 0x57, 0x19,
341 0x05, 0x0d, 0xba, 0x22, 0xc0, 0x20, 0xb9, 0xb2, 0xd2,
342 0xcd, 0xb9, 0x33, 0xdb, 0xc7, 0x0f, 0x76, 0xfe, 0xc4,
343 0xb1, 0xd8, 0x39, 0x80, 0xfd, 0x1a, 0x13, 0xc4, 0x56,
344 0x58, 0x36,
345 }
346 };
347
348 TC_PRINT(".");
349 result = do_hmac_prng_pr_false_test(4, &vec);
350
351 return result;
352 }
353
test_5(void)354 unsigned int test_5(void)
355 {
356 unsigned int result = TC_PASS;
357 const struct hmac_prng_test_vector vec = {
358 32,
359 16,
360 0,
361 0,
362 128,
363 {
364 0x09, 0x6e, 0xf3, 0x72, 0x94, 0xd3, 0x69, 0xfa, 0xce,
365 0x1a, 0xdd, 0x3e, 0xb8, 0xb4, 0x25, 0x89, 0x5e, 0x92,
366 0x16, 0x26, 0x49, 0x57, 0x05, 0xc5, 0xa0, 0x3e, 0xe5,
367 0x66, 0xb3, 0x41, 0x58, 0xec,
368 },
369 {
370 0x6e, 0x2e, 0x08, 0x25, 0x53, 0x4d, 0x29, 0x89, 0x71,
371 0x5c, 0xc8, 0x59, 0x56, 0xe0, 0x14, 0x8d,
372 },
373 {
374 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
375 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
376 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
377 0x00, 0x00, 0x00, 0x00, 0x00,
378 },
379 {
380 0x1b, 0x4f, 0x71, 0x25, 0xf4, 0x72, 0xc2, 0x53, 0x83,
381 0x7f, 0xa7, 0x87, 0xd5, 0xac, 0xf0, 0x38, 0x2a, 0x3b,
382 0x89, 0xc3, 0xf4, 0x1c, 0x21, 0x1d, 0x26, 0x30, 0x52,
383 0x40, 0x2d, 0xcc, 0x62, 0xc5,
384 },
385 {
386 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
387 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
388 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
389 0x00, 0x00, 0x00, 0x00, 0x00,
390 },
391 {
392 0x45, 0x41, 0xf2, 0x4f, 0x75, 0x9b, 0x5f, 0x2a, 0xc2,
393 0xb5, 0x7b, 0x51, 0x12, 0x50, 0x77, 0xcc, 0x74, 0x0b,
394 0x38, 0x59, 0xa7, 0x19, 0xa9, 0xba, 0xb1, 0x19, 0x6e,
395 0x6c, 0x0c, 0xa2, 0xbd, 0x05, 0x7a, 0xf9, 0xd3, 0x89,
396 0x23, 0x86, 0xa1, 0x81, 0x3f, 0xc8, 0x87, 0x5d, 0x8d,
397 0x36, 0x4f, 0x15, 0xe7, 0xfd, 0x69, 0xd1, 0xcc, 0x66,
398 0x59, 0x47, 0x04, 0x15, 0x27, 0x81, 0x64, 0xdf, 0x65,
399 0x62, 0x95, 0xba, 0x9c, 0xfc, 0xee, 0x79, 0xf6, 0xcb,
400 0xe2, 0x6e, 0xe1, 0x36, 0xe6, 0xb4, 0x5e, 0xc2, 0x24,
401 0xad, 0x37, 0x9c, 0x60, 0x79, 0xb1, 0x0a, 0x2e, 0x0c,
402 0xb5, 0xf7, 0xf7, 0x85, 0xef, 0x0a, 0xb7, 0xa7, 0xc3,
403 0xfc, 0xd9, 0xcb, 0x65, 0x06, 0x05, 0x4d, 0x20, 0xe2,
404 0xf3, 0xec, 0x61, 0x0c, 0xbb, 0xa9, 0xb0, 0x45, 0xa2,
405 0x48, 0xaf, 0x56, 0xe4, 0xf6, 0xd3, 0xf0, 0xc8, 0xd9,
406 0x6a, 0x23,
407 }
408 };
409
410 TC_PRINT(".");
411 result = do_hmac_prng_pr_false_test(5, &vec);
412
413 return result;
414 }
415
test_6(void)416 unsigned int test_6(void)
417 {
418 unsigned int result = TC_PASS;
419 const struct hmac_prng_test_vector vec = {
420 32,
421 16,
422 0,
423 0,
424 128,
425 {
426 0xa7, 0xdc, 0xcd, 0xd4, 0x31, 0xae, 0x57, 0x26, 0xb8,
427 0x35, 0x85, 0xb5, 0x4e, 0xae, 0x41, 0x08, 0xf7, 0xb7,
428 0xa2, 0x5c, 0x70, 0x18, 0x7c, 0x0a, 0xcb, 0xb9, 0x4c,
429 0x96, 0xcc, 0x27, 0x7a, 0xa8,
430 },
431 {
432 0x94, 0xc8, 0xf4, 0xb8, 0xe1, 0x95, 0xa4, 0x73, 0x56,
433 0xa8, 0x9a, 0x50, 0xd1, 0x38, 0x9a, 0xb5,
434 },
435 {
436 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
437 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
438 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
439 0x00, 0x00, 0x00, 0x00, 0x00,
440 },
441 {
442 0x51, 0x73, 0x3e, 0xee, 0x2e, 0x92, 0x2f, 0x40, 0x55,
443 0xe5, 0x39, 0x39, 0xe2, 0x22, 0xe7, 0x1f, 0xae, 0x73,
444 0x0e, 0xb0, 0x37, 0x44, 0x3d, 0xb2, 0xc7, 0x67, 0x97,
445 0x08, 0xab, 0xb8, 0x6a, 0x65,
446 },
447 {
448 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
449 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
450 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
451 0x00, 0x00, 0x00, 0x00, 0x00,
452 },
453 {
454 0x99, 0xba, 0x26, 0x91, 0xa6, 0x22, 0xaf, 0xec, 0xc9,
455 0x47, 0x24, 0x18, 0xe6, 0xa8, 0xf9, 0xf1, 0xcd, 0xc1,
456 0xe3, 0x58, 0x3c, 0x3b, 0xc7, 0xa2, 0xa6, 0x50, 0xa1,
457 0xab, 0x79, 0xdc, 0xbc, 0xcb, 0xd6, 0x56, 0x63, 0x6c,
458 0x57, 0x31, 0x79, 0x27, 0x6e, 0x78, 0x25, 0x69, 0x42,
459 0x0c, 0x97, 0x43, 0x8c, 0x06, 0xbe, 0x89, 0x88, 0x67,
460 0xf6, 0x28, 0xb1, 0xc0, 0x1e, 0xb5, 0x70, 0x26, 0x3d,
461 0x2c, 0x0f, 0x09, 0xc7, 0xaa, 0xb5, 0x36, 0xf6, 0xfb,
462 0xa7, 0xdf, 0x6a, 0xad, 0x19, 0xe0, 0x5c, 0x23, 0x6b,
463 0x64, 0x56, 0x74, 0x66, 0x7c, 0x03, 0xd1, 0xb6, 0xa0,
464 0x4d, 0x7f, 0xc1, 0x11, 0x77, 0xfe, 0x78, 0x93, 0x3b,
465 0x30, 0x96, 0x79, 0xf5, 0xbf, 0x26, 0xa4, 0x63, 0x2b,
466 0x9a, 0x13, 0xe3, 0x14, 0xc4, 0xbf, 0x45, 0x32, 0x42,
467 0x8d, 0x3d, 0x95, 0xc6, 0x89, 0x00, 0x2b, 0x6d, 0xc1,
468 0xfb, 0xb1,
469 }
470 };
471
472 TC_PRINT(".");
473 result = do_hmac_prng_pr_false_test(6, &vec);
474
475 return result;
476 }
477
test_7(void)478 unsigned int test_7(void)
479 {
480 unsigned int result = TC_PASS;
481 const struct hmac_prng_test_vector vec = {
482 32,
483 16,
484 0,
485 0,
486 128,
487 {
488 0xc2, 0x86, 0x42, 0x5e, 0xcf, 0x54, 0x3a, 0x49, 0xbc,
489 0xc9, 0x19, 0x6b, 0x0d, 0xb1, 0xa8, 0x0b, 0xc5, 0x4e,
490 0x49, 0x48, 0xad, 0xba, 0x6f, 0x41, 0x71, 0x2a, 0x35,
491 0x0a, 0x02, 0x89, 0x1f, 0xa6,
492 },
493 {
494 0x95, 0x7a, 0x65, 0x9a, 0x4e, 0xc2, 0xe0, 0xb7, 0xad,
495 0x18, 0x54, 0x83, 0xc2, 0x20, 0xfd, 0x61,
496 },
497 {
498 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
500 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
501 0x00, 0x00, 0x00, 0x00, 0x00,
502 },
503 {
504 0x08, 0xc2, 0x12, 0x98, 0x13, 0xee, 0xa0, 0x77, 0x6f,
505 0xba, 0x72, 0x78, 0x8f, 0xdf, 0x27, 0x18, 0x75, 0x9c,
506 0xc3, 0xc4, 0x20, 0x7f, 0xa2, 0x0a, 0x5f, 0xe2, 0x3a,
507 0xc6, 0xe3, 0x2c, 0xc2, 0x8e,
508 },
509 {
510 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
511 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
512 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
513 0x00, 0x00, 0x00, 0x00, 0x00,
514 },
515 {
516 0x8e, 0x10, 0x20, 0xa4, 0xfd, 0x84, 0xc9, 0x9e, 0x0f,
517 0xc7, 0xe3, 0xf7, 0xce, 0x48, 0xde, 0x5e, 0xd9, 0xec,
518 0x9a, 0x5c, 0x2c, 0xcd, 0x62, 0x4d, 0xbe, 0x6f, 0x30,
519 0xe2, 0xf6, 0x88, 0xa3, 0x1d, 0xc5, 0x59, 0x57, 0x63,
520 0x03, 0x57, 0xa5, 0xd4, 0x8c, 0xa2, 0xa4, 0x56, 0x24,
521 0x1a, 0x28, 0xbf, 0xb1, 0x6d, 0x8b, 0xb0, 0x00, 0x87,
522 0x76, 0x97, 0xa7, 0xce, 0x24, 0xd9, 0xad, 0x4d, 0x22,
523 0xb0, 0xc1, 0x51, 0x17, 0x99, 0x6f, 0x1f, 0x27, 0x0b,
524 0x94, 0xf4, 0x6d, 0x7a, 0x9b, 0xdf, 0xa7, 0x60, 0x8f,
525 0xa1, 0xdd, 0x84, 0x91, 0x77, 0xa9, 0xb8, 0x04, 0x9e,
526 0x51, 0xb6, 0xb7, 0xa2, 0x74, 0x26, 0x23, 0x85, 0x4a,
527 0x1f, 0xdd, 0xb5, 0xef, 0xc4, 0x47, 0xee, 0xd1, 0xea,
528 0x1a, 0xed, 0x6f, 0x02, 0xb4, 0xb2, 0x75, 0x4e, 0xcf,
529 0x71, 0xea, 0x05, 0x09, 0xda, 0x2e, 0x54, 0xf5, 0x24,
530 0xa7, 0xe7,
531 }
532 };
533
534 TC_PRINT(".");
535 result = do_hmac_prng_pr_false_test(7, &vec);
536
537 return result;
538 }
539
test_8(void)540 unsigned int test_8(void)
541 {
542 unsigned int result = TC_PASS;
543 const struct hmac_prng_test_vector vec = {
544 32,
545 16,
546 0,
547 0,
548 128,
549 {
550 0x02, 0x81, 0x8b, 0xd7, 0xc1, 0xec, 0x45, 0x6a, 0xce,
551 0x55, 0xbe, 0xeb, 0xa9, 0x9f, 0x64, 0x6a, 0x6d, 0x3a,
552 0xa0, 0xea, 0x78, 0x35, 0x6e, 0xa7, 0x26, 0xb7, 0x63,
553 0xff, 0x0d, 0xd2, 0xd6, 0x56,
554 },
555 {
556 0xc4, 0x82, 0x68, 0x7d, 0x50, 0x8c, 0x9b, 0x5c, 0x2a,
557 0x75, 0xf7, 0xce, 0x39, 0x00, 0x14, 0xe8,
558 },
559 {
560 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
561 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
562 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
563 0x00, 0x00, 0x00, 0x00, 0x00,
564 },
565 {
566 0xcf, 0x31, 0x9b, 0xfa, 0x63, 0x98, 0x0e, 0x3c, 0xb9,
567 0x97, 0xfd, 0x28, 0x77, 0x1b, 0xb5, 0x61, 0x4e, 0x3a,
568 0xcb, 0x11, 0x49, 0xba, 0x45, 0xc1, 0x33, 0xff, 0xbb,
569 0xab, 0x17, 0x43, 0x31, 0x93,
570 },
571 {
572 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
573 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
574 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
575 0x00, 0x00, 0x00, 0x00, 0x00,
576 },
577 {
578 0x19, 0xa2, 0x31, 0xff, 0x26, 0xc1, 0x86, 0x5c, 0xe7,
579 0x5d, 0x7a, 0x71, 0x85, 0xc3, 0x0d, 0xd0, 0xb3, 0x33,
580 0x12, 0x64, 0x33, 0xd0, 0xc8, 0xcb, 0xf1, 0xbe, 0x0d,
581 0x2b, 0x38, 0x4d, 0x4e, 0xb3, 0xa8, 0xaf, 0xf0, 0x35,
582 0x40, 0xfb, 0xfa, 0x5f, 0x54, 0x96, 0x52, 0x1a, 0x4e,
583 0x4a, 0x64, 0x07, 0x1b, 0x44, 0xc7, 0x8b, 0xd0, 0xb7,
584 0xe6, 0x8f, 0xac, 0x9e, 0x56, 0x95, 0xc5, 0xc1, 0x3f,
585 0xd3, 0xb9, 0xdb, 0xe7, 0xf7, 0x73, 0x97, 0x81, 0xa4,
586 0xc8, 0xf0, 0xb9, 0x80, 0xf1, 0xb1, 0x7d, 0x99, 0xbc,
587 0xe1, 0x7c, 0xeb, 0x52, 0xb5, 0x68, 0x66, 0xae, 0x02,
588 0x45, 0x6f, 0xfe, 0xf8, 0x33, 0x99, 0xc8, 0xcf, 0x78,
589 0x26, 0xf3, 0xc4, 0x5c, 0x8a, 0x19, 0x31, 0x58, 0x90,
590 0x91, 0x9d, 0x20, 0xf4, 0x0f, 0xc4, 0xe1, 0x8d, 0x07,
591 0xe9, 0xc8, 0xcc, 0xd1, 0x6c, 0x33, 0x27, 0xb5, 0x98,
592 0x8f, 0x71,
593 }
594 };
595
596 TC_PRINT(".");
597 result = do_hmac_prng_pr_false_test(8, &vec);
598
599 return result;
600 }
601
test_9(void)602 unsigned int test_9(void)
603 {
604 unsigned int result = TC_PASS;
605 const struct hmac_prng_test_vector vec = {
606 32,
607 16,
608 0,
609 0,
610 128,
611 {
612 0x77, 0xa5, 0xc8, 0x6d, 0x99, 0xbe, 0x7b, 0xc2, 0x50,
613 0x28, 0x70, 0xf4, 0x02, 0x5f, 0x9f, 0x75, 0x63, 0xe9,
614 0x17, 0x4e, 0xc6, 0x7c, 0x5f, 0x48, 0x1f, 0x21, 0xfc,
615 0xf2, 0xb4, 0x1c, 0xae, 0x4b,
616 },
617 {
618 0xed, 0x04, 0x4a, 0xd7, 0x2e, 0xe8, 0x22, 0x50, 0x6a,
619 0x6d, 0x0b, 0x12, 0x11, 0x50, 0x29, 0x67,
620 },
621 {
622 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
623 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
624 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
625 0x00, 0x00, 0x00, 0x00, 0x00,
626 },
627 {
628 0x77, 0x81, 0x00, 0x74, 0x9f, 0x01, 0xa4, 0xd3, 0x5c,
629 0x3b, 0x4a, 0x95, 0x8a, 0xaf, 0xe2, 0x96, 0x87, 0x7e,
630 0x0a, 0xca, 0xfd, 0x08, 0x9f, 0x50, 0xbc, 0x77, 0x97,
631 0xa4, 0x2a, 0x33, 0xab, 0x71,
632 },
633 {
634 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
635 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
636 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
637 0x00, 0x00, 0x00, 0x00, 0x00,
638 },
639 {
640 0x83, 0x1a, 0x4d, 0xa5, 0x66, 0xf4, 0x62, 0x89, 0x90,
641 0x48, 0x93, 0xef, 0x1c, 0xc1, 0xcd, 0x4a, 0xd1, 0x9e,
642 0xe4, 0x8f, 0x38, 0x57, 0xe2, 0xb6, 0x9e, 0x93, 0x6d,
643 0x10, 0xaf, 0xbd, 0xc2, 0x98, 0x22, 0xe8, 0x5d, 0x02,
644 0x66, 0x3d, 0x34, 0x6e, 0xf3, 0xe0, 0x9a, 0x84, 0x8b,
645 0x1d, 0x9c, 0xc0, 0x4f, 0x4c, 0x4c, 0x6e, 0x3b, 0x3b,
646 0x0e, 0x56, 0xa0, 0x34, 0xe2, 0x33, 0x4d, 0x34, 0xca,
647 0x08, 0xf8, 0x09, 0x7b, 0xe3, 0x07, 0xba, 0x41, 0xd0,
648 0x20, 0xbc, 0x94, 0xf8, 0xc1, 0x93, 0x7f, 0xe8, 0x56,
649 0x44, 0xee, 0xb5, 0x59, 0x2c, 0x2b, 0x5a, 0x21, 0x38,
650 0xf7, 0xde, 0xd9, 0xa5, 0xb4, 0x4b, 0x20, 0x0c, 0x8b,
651 0x5b, 0xeb, 0x27, 0x59, 0x7c, 0x79, 0x0f, 0x94, 0xd6,
652 0x60, 0xeb, 0x61, 0xe8, 0x24, 0x83, 0x91, 0xed, 0xc3,
653 0xae, 0x2d, 0x77, 0x65, 0x6c, 0xbe, 0x83, 0x54, 0x27,
654 0x5b, 0x13,
655 }
656 };
657
658 TC_PRINT(".");
659 result = do_hmac_prng_pr_false_test(9, &vec);
660
661 return result;
662 }
663
test_10(void)664 unsigned int test_10(void)
665 {
666 unsigned int result = TC_PASS;
667 const struct hmac_prng_test_vector vec = {
668 32,
669 16,
670 0,
671 0,
672 128,
673 {
674 0x0e, 0xa4, 0x58, 0xcf, 0xf8, 0xbf, 0xd1, 0xdd, 0x8b,
675 0x1a, 0xdd, 0xcb, 0xa9, 0xc0, 0x13, 0x17, 0xd5, 0x30,
676 0x39, 0xe5, 0x33, 0x10, 0x4e, 0x32, 0xf9, 0x6e, 0x7d,
677 0x34, 0x2e, 0x6c, 0x7b, 0x9b,
678 },
679 {
680 0x93, 0x5a, 0x4b, 0x66, 0xfc, 0x74, 0xc2, 0xa4, 0x87,
681 0x57, 0xa9, 0x9c, 0x39, 0x9e, 0x64, 0xe3,
682 },
683 {
684 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
685 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
686 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
687 0x00, 0x00, 0x00, 0x00, 0x00,
688 },
689 {
690 0x6c, 0x5f, 0x37, 0x08, 0xe7, 0xb7, 0x14, 0xc4, 0xed,
691 0x13, 0x9b, 0x4f, 0xa9, 0xe8, 0xc7, 0x63, 0xaf, 0x01,
692 0x77, 0x34, 0x84, 0x00, 0x51, 0x09, 0xa8, 0x5e, 0x33,
693 0x65, 0x3b, 0xb0, 0xce, 0x98,
694 },
695 {
696 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
697 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
698 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
699 0x00, 0x00, 0x00, 0x00, 0x00,
700 },
701 {
702 0x37, 0x3a, 0x37, 0xaf, 0x84, 0xfd, 0xde, 0xc1, 0x36,
703 0x45, 0xa9, 0x76, 0x8d, 0x6a, 0x78, 0x5a, 0xe5, 0xa2,
704 0x58, 0x9d, 0x64, 0xcd, 0x9b, 0x37, 0x98, 0x0d, 0xde,
705 0x25, 0x41, 0x49, 0x92, 0x10, 0xc4, 0xf4, 0x08, 0x33,
706 0x5d, 0xe1, 0xd5, 0x85, 0x34, 0x90, 0x64, 0xf3, 0xf5,
707 0x3a, 0x2b, 0x4c, 0x5e, 0xc6, 0xdc, 0x2a, 0x09, 0x59,
708 0x1f, 0x99, 0xad, 0x9f, 0xad, 0x52, 0x8a, 0xc8, 0x34,
709 0x74, 0x16, 0x4b, 0x45, 0x49, 0x7b, 0xf1, 0x67, 0xf8,
710 0x1e, 0x66, 0xfa, 0x08, 0x46, 0x3f, 0xfe, 0xa9, 0x17,
711 0xf6, 0x89, 0x1e, 0x48, 0xf1, 0x49, 0xfa, 0xfc, 0x20,
712 0x62, 0x2b, 0xb1, 0x17, 0x2f, 0x34, 0x88, 0x6f, 0xeb,
713 0x45, 0xc2, 0x6f, 0xd4, 0x46, 0xa4, 0xa4, 0xe2, 0x89,
714 0x1b, 0x4b, 0xc5, 0x94, 0x18, 0x68, 0x96, 0x14, 0x1a,
715 0xaa, 0xee, 0xb3, 0x01, 0xb4, 0x9e, 0x7c, 0x1a, 0x26,
716 0xfe, 0xc7,
717 }
718 };
719
720 TC_PRINT(".");
721 result = do_hmac_prng_pr_false_test(10, &vec);
722
723 return result;
724 }
725
test_11(void)726 unsigned int test_11(void)
727 {
728 unsigned int result = TC_PASS;
729 const struct hmac_prng_test_vector vec = {
730 32,
731 16,
732 0,
733 0,
734 128,
735 {
736 0xbf, 0xb6, 0x8b, 0xe4, 0xce, 0x17, 0x56, 0xd2, 0x5b,
737 0xdf, 0xad, 0x5e, 0x0c, 0x2f, 0x8b, 0xec, 0x29, 0x36,
738 0x09, 0x01, 0xcc, 0x4d, 0xa5, 0x1d, 0x42, 0x3d, 0x15,
739 0x91, 0xcc, 0x57, 0xe1, 0xba,
740 },
741 {
742 0x98, 0xaf, 0xe4, 0xbd, 0x19, 0x4c, 0x14, 0x3e, 0x09,
743 0x96, 0x80, 0xc5, 0x04, 0xcc, 0xea, 0xab,
744 },
745 {
746 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
747 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
748 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
749 0x00, 0x00, 0x00, 0x00, 0x00,
750 },
751 {
752 0xb9, 0x7c, 0xaf, 0x21, 0x0e, 0x82, 0x49, 0x8c, 0x34,
753 0x08, 0x79, 0x0d, 0x41, 0xc3, 0x20, 0xdd, 0x4a, 0x72,
754 0x00, 0x77, 0x78, 0x38, 0x9b, 0x44, 0xb7, 0xbc, 0x3c,
755 0x1c, 0x4b, 0x8c, 0x53, 0xf8,
756 },
757 {
758 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
759 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
760 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
761 0x00, 0x00, 0x00, 0x00, 0x00,
762 },
763 {
764 0x40, 0x9e, 0x0a, 0xa9, 0x49, 0xfb, 0x3b, 0x38, 0x23,
765 0x1b, 0xf8, 0x73, 0x2e, 0x79, 0x59, 0xe9, 0x43, 0xa3,
766 0x38, 0xea, 0x39, 0x90, 0x26, 0xb7, 0x44, 0xdf, 0x15,
767 0xcb, 0xfe, 0xff, 0x8d, 0x71, 0xb3, 0xda, 0x02, 0x3d,
768 0xcc, 0xe0, 0x59, 0xa8, 0x8c, 0xf0, 0xd4, 0xb7, 0x47,
769 0x5f, 0x62, 0x8e, 0x47, 0x64, 0xc8, 0xbe, 0xf1, 0x3c,
770 0x70, 0xcf, 0xbb, 0xbb, 0x6d, 0xa2, 0xa1, 0x8a, 0xab,
771 0xca, 0xd9, 0x19, 0xdb, 0x09, 0xd0, 0x4f, 0xc5, 0x97,
772 0x65, 0xed, 0xb1, 0x65, 0x14, 0x7c, 0x88, 0xdd, 0x47,
773 0x3a, 0x0f, 0x3c, 0x5e, 0xe1, 0x92, 0x37, 0xca, 0x95,
774 0x56, 0x97, 0xe0, 0x01, 0xba, 0x65, 0x4c, 0x5e, 0xe0,
775 0xbd, 0x26, 0x76, 0x1b, 0x49, 0x33, 0x31, 0x54, 0x42,
776 0x6b, 0xc6, 0x32, 0x86, 0x29, 0x8a, 0x8b, 0xe6, 0x34,
777 0xfe, 0x0d, 0x72, 0xcf, 0xde, 0xef, 0x0f, 0x3f, 0xc4,
778 0x8e, 0xca,
779 }
780 };
781
782 TC_PRINT(".");
783 result = do_hmac_prng_pr_false_test(11, &vec);
784
785 return result;
786 }
787
test_12(void)788 unsigned int test_12(void)
789 {
790 unsigned int result = TC_PASS;
791 const struct hmac_prng_test_vector vec = {
792 32,
793 16,
794 0,
795 0,
796 128,
797 {
798 0x4f, 0x68, 0x80, 0xa6, 0x46, 0x10, 0x00, 0x44, 0x63,
799 0x03, 0x1d, 0x67, 0xd7, 0x92, 0x4f, 0xa4, 0x46, 0xc3,
800 0x91, 0x38, 0xd4, 0xd4, 0x10, 0x07, 0xe8, 0xdf, 0x3d,
801 0x65, 0x69, 0x1a, 0x93, 0x67,
802 },
803 {
804 0x6b, 0x33, 0xb2, 0xc1, 0x36, 0x00, 0xf4, 0xb1, 0xdf,
805 0x6c, 0xa3, 0xd1, 0x96, 0x0e, 0x8d, 0xd4,
806 },
807 {
808 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
809 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
810 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
811 0x00, 0x00, 0x00, 0x00, 0x00,
812 },
813 {
814 0x57, 0xb8, 0x7b, 0x8c, 0x8f, 0x48, 0x31, 0x2b, 0x53,
815 0x33, 0xd4, 0x3b, 0x36, 0x77, 0x30, 0xc0, 0xa5, 0xad,
816 0x47, 0x25, 0xa1, 0x67, 0x78, 0xfc, 0xb5, 0x3f, 0xe1,
817 0x36, 0xd1, 0x36, 0xcb, 0xfd,
818 },
819 {
820 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
821 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
822 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
823 0x00, 0x00, 0x00, 0x00, 0x00,
824 },
825 {
826 0x73, 0xd0, 0xf3, 0x24, 0xed, 0x18, 0x6e, 0x2a, 0xd0,
827 0x6b, 0xd1, 0x80, 0x0e, 0x26, 0x2b, 0xdb, 0xda, 0x79,
828 0xba, 0x54, 0xe6, 0x26, 0x76, 0x1b, 0xd6, 0x0f, 0x74,
829 0xf4, 0x3e, 0x3b, 0xb6, 0x29, 0x58, 0xec, 0x1e, 0x2f,
830 0x1d, 0x94, 0x0a, 0xf1, 0x63, 0xe1, 0xca, 0xdc, 0x12,
831 0x4e, 0x7e, 0xba, 0xba, 0x2f, 0x72, 0xe6, 0x7e, 0xfd,
832 0x74, 0x6c, 0x7f, 0x6d, 0x0c, 0xad, 0x53, 0xef, 0x03,
833 0xd8, 0x59, 0xd9, 0x3c, 0xff, 0x77, 0x8a, 0x32, 0xee,
834 0x5b, 0xe1, 0x72, 0xfe, 0x7f, 0xdb, 0xdc, 0x23, 0x2d,
835 0xed, 0x36, 0x0d, 0x70, 0x4a, 0x6f, 0xa0, 0xf7, 0x0b,
836 0xeb, 0xe9, 0x42, 0xe5, 0x64, 0x78, 0x34, 0x54, 0x92,
837 0xf4, 0x9d, 0xc5, 0xc6, 0xfc, 0x34, 0x6b, 0x88, 0xa5,
838 0x89, 0x47, 0xad, 0x25, 0x0e, 0x68, 0x8e, 0x8c, 0x62,
839 0x6f, 0xe1, 0xef, 0xe7, 0x62, 0x46, 0x20, 0xe5, 0x71,
840 0x97, 0x6e,
841 }
842 };
843
844 TC_PRINT(".");
845 result = do_hmac_prng_pr_false_test(12, &vec);
846
847 return result;
848 }
849
test_13(void)850 unsigned int test_13(void)
851 {
852 unsigned int result = TC_PASS;
853 const struct hmac_prng_test_vector vec = {
854 32,
855 16,
856 0,
857 0,
858 128,
859 {
860 0xaa, 0xe3, 0x52, 0xe1, 0x11, 0x84, 0x32, 0x19, 0xca,
861 0xe8, 0xf7, 0x0e, 0x7b, 0x8f, 0x6e, 0xb9, 0xbb, 0x53,
862 0xd2, 0x46, 0xcb, 0xec, 0x1e, 0x4f, 0x07, 0xd4, 0x27,
863 0x57, 0x14, 0x32, 0x95, 0xb4,
864 },
865 {
866 0xb8, 0x44, 0x85, 0xdc, 0xcd, 0x1b, 0xf9, 0x32, 0x10,
867 0xe3, 0x22, 0xea, 0xfc, 0xbe, 0xbc, 0xd9,
868 },
869 {
870 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
871 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
872 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
873 0x00, 0x00, 0x00, 0x00, 0x00,
874 },
875 {
876 0xf9, 0x23, 0x7f, 0x00, 0xd7, 0x44, 0xd8, 0xfb, 0xff,
877 0x21, 0xb9, 0xd0, 0x04, 0x3c, 0x25, 0x8e, 0x87, 0x31,
878 0x81, 0x7e, 0x6a, 0x5f, 0xb7, 0xb4, 0xbf, 0x50, 0x11,
879 0x68, 0x0e, 0x5b, 0xc6, 0x42,
880 },
881 {
882 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
883 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
884 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
885 0x00, 0x00, 0x00, 0x00, 0x00,
886 },
887 {
888 0xcf, 0xb2, 0x8b, 0x93, 0x52, 0x2c, 0x7d, 0x61, 0xd8,
889 0xd3, 0xce, 0x3f, 0x08, 0x0e, 0x43, 0x5e, 0x4c, 0x83,
890 0xc7, 0xe1, 0x3a, 0x9d, 0xab, 0x78, 0x8d, 0xb8, 0xfe,
891 0xf0, 0x40, 0x72, 0x67, 0xa1, 0x4f, 0xbc, 0x93, 0x24,
892 0xe0, 0x90, 0xe2, 0x4d, 0xf5, 0x49, 0x1f, 0xed, 0xfa,
893 0x81, 0x11, 0x68, 0x69, 0x98, 0x39, 0x38, 0xd4, 0xd4,
894 0xd7, 0x32, 0x4a, 0x31, 0x0c, 0x3a, 0xf3, 0x3a, 0x6f,
895 0x79, 0x38, 0xf6, 0x02, 0xc5, 0xe4, 0xe6, 0x3f, 0x17,
896 0x71, 0xcd, 0xaa, 0xbd, 0xab, 0x07, 0x82, 0xb5, 0xaf,
897 0xfb, 0x54, 0xeb, 0x53, 0x04, 0x7c, 0x10, 0x9a, 0x96,
898 0x06, 0x73, 0x9d, 0xd0, 0x06, 0x5b, 0xd2, 0x1e, 0xca,
899 0x33, 0x13, 0x29, 0x86, 0x55, 0x48, 0x78, 0x35, 0x4f,
900 0x5f, 0x9f, 0x85, 0x2e, 0x67, 0x4d, 0xd6, 0x90, 0x16,
901 0x3b, 0x0f, 0xf7, 0x4c, 0x7a, 0x25, 0xe6, 0xba, 0xe8,
902 0xce, 0x39,
903 }
904 };
905
906 TC_PRINT(".");
907 result = do_hmac_prng_pr_false_test(13, &vec);
908
909 return result;
910 }
911
test_14(void)912 unsigned int test_14(void)
913 {
914 unsigned int result = TC_PASS;
915 const struct hmac_prng_test_vector vec = {
916 32,
917 16,
918 0,
919 0,
920 128,
921 {
922 0x58, 0x9e, 0x79, 0xe3, 0x39, 0xb7, 0xd2, 0xa1, 0xb8,
923 0x79, 0xf0, 0xb0, 0xe1, 0xa7, 0xd1, 0xad, 0x24, 0x74,
924 0xea, 0xa8, 0x02, 0x5b, 0x07, 0x0f, 0x1f, 0xfa, 0x87,
925 0x7b, 0x71, 0x24, 0xd4, 0xff,
926 },
927 {
928 0x09, 0x61, 0xed, 0x64, 0xdb, 0xd6, 0x20, 0x65, 0xd9,
929 0x6e, 0x75, 0xde, 0x6d, 0x2f, 0xf9, 0xd6,
930 },
931 {
932 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
933 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
934 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
935 0x00, 0x00, 0x00, 0x00, 0x00,
936 },
937 {
938 0xe9, 0x28, 0x38, 0x8d, 0x3a, 0xf4, 0x8c, 0x29, 0x68,
939 0x52, 0x7a, 0x4d, 0x2f, 0x9c, 0x26, 0x26, 0xfb, 0xc3,
940 0xf3, 0xf5, 0xa5, 0xd8, 0x4e, 0x05, 0x83, 0xab, 0x6f,
941 0x78, 0xe7, 0xf8, 0xb0, 0x81,
942 },
943 {
944 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
945 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
946 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
947 0x00, 0x00, 0x00, 0x00, 0x00,
948 },
949 {
950 0xfc, 0xe6, 0xce, 0xd1, 0xec, 0xf4, 0x74, 0xd1, 0x81,
951 0xab, 0x33, 0x1f, 0x79, 0xc3, 0xd2, 0xcc, 0x8a, 0x76,
952 0x8e, 0xc2, 0x81, 0x8d, 0xe5, 0xb3, 0xfc, 0x7c, 0xf4,
953 0x18, 0x32, 0x27, 0x16, 0xd6, 0xa6, 0x85, 0x37, 0x33,
954 0x56, 0x1a, 0x49, 0x7c, 0x0c, 0x25, 0xcb, 0x28, 0x8d,
955 0x2c, 0x9f, 0xcf, 0xbc, 0xa8, 0x91, 0xba, 0xfd, 0x5a,
956 0x83, 0x4c, 0x85, 0xf3, 0x60, 0x3f, 0x40, 0x2a, 0xcf,
957 0x1a, 0x7b, 0x1e, 0xa9, 0x2d, 0xb8, 0x47, 0xed, 0x5c,
958 0x25, 0x2a, 0x86, 0x2a, 0xd4, 0xab, 0x5e, 0x25, 0x97,
959 0x15, 0xf1, 0xfc, 0x81, 0xda, 0x67, 0xf5, 0x23, 0x0b,
960 0xf8, 0xbe, 0x50, 0xee, 0x80, 0x69, 0x75, 0x80, 0x95,
961 0xf7, 0xd0, 0xe5, 0x59, 0xe0, 0x3f, 0x2c, 0x60, 0x72,
962 0x29, 0x0e, 0x61, 0x79, 0x44, 0x58, 0x43, 0x76, 0x09,
963 0xe4, 0x73, 0xeb, 0x66, 0x58, 0x0c, 0xdd, 0xaa, 0xd1,
964 0x9b, 0x71,
965 }
966 };
967
968 TC_PRINT(".");
969 result = do_hmac_prng_pr_false_test(14, &vec);
970
971 return result;
972 }
973
test_15(void)974 unsigned int test_15(void)
975 {
976 unsigned int result = TC_PASS;
977 const struct hmac_prng_test_vector vec = {
978 32,
979 16,
980 0,
981 0,
982 128,
983 {
984 0x71, 0x42, 0x77, 0xd4, 0x08, 0xad, 0x87, 0xfd, 0xe3,
985 0x17, 0xf0, 0xa9, 0x47, 0x32, 0xfc, 0xe6, 0x2f, 0x13,
986 0x52, 0xbd, 0xc9, 0x09, 0x36, 0x67, 0x3b, 0x4f, 0x1d,
987 0xaa, 0x09, 0x25, 0xaa, 0x26,
988 },
989 {
990 0xd1, 0x65, 0x82, 0xa9, 0x9f, 0x23, 0x01, 0x0b, 0x42,
991 0x48, 0xb8, 0x8d, 0x86, 0x48, 0x54, 0x19,
992 },
993 {
994 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
995 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
996 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
997 0x00, 0x00, 0x00, 0x00, 0x00,
998 },
999 {
1000 0xbd, 0x9f, 0xc7, 0xcb, 0x2f, 0xd5, 0x06, 0x3b, 0x2c,
1001 0x3c, 0x0c, 0x4f, 0x34, 0x6a, 0xd2, 0xe3, 0x87, 0x93,
1002 0x71, 0xa9, 0xc8, 0x05, 0xe5, 0x9b, 0x9f, 0x2c, 0xd2,
1003 0xcc, 0x2a, 0x40, 0x89, 0x4f,
1004 },
1005 {
1006 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1007 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1008 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1009 0x00, 0x00, 0x00, 0x00, 0x00,
1010 },
1011 {
1012 0x62, 0xef, 0x7a, 0x43, 0x12, 0x88, 0x25, 0x2e, 0x0d,
1013 0x73, 0x6c, 0x1d, 0x4e, 0x36, 0xcc, 0x9a, 0xc3, 0x71,
1014 0x07, 0xdc, 0xd0, 0xd0, 0xe9, 0x71, 0xa2, 0x24, 0x44,
1015 0xa4, 0xad, 0xae, 0x73, 0xa4, 0x1e, 0xff, 0x0b, 0x11,
1016 0xc8, 0x62, 0x5e, 0x11, 0x8d, 0xbc, 0x92, 0x26, 0x14,
1017 0x2f, 0xd0, 0xa6, 0xaa, 0x10, 0xac, 0x9b, 0x19, 0x09,
1018 0x19, 0xbd, 0xa4, 0x4e, 0x72, 0x48, 0xd6, 0xc8, 0x88,
1019 0x74, 0x61, 0x2a, 0xbd, 0x77, 0xfb, 0x37, 0x16, 0xea,
1020 0x51, 0x5a, 0x2d, 0x56, 0x32, 0x37, 0xc4, 0x46, 0xe2,
1021 0xa2, 0x82, 0xe7, 0xc3, 0xb0, 0xa3, 0xae, 0xf2, 0x7d,
1022 0x34, 0x27, 0xcc, 0x7d, 0x0a, 0x7d, 0x38, 0x71, 0x46,
1023 0x59, 0xc3, 0x40, 0x1d, 0xbc, 0x91, 0xd3, 0x59, 0x51,
1024 0x59, 0x31, 0x8e, 0xbc, 0xa0, 0x1a, 0xe7, 0xd7, 0xfd,
1025 0x1c, 0x89, 0xf6, 0xad, 0x6b, 0x60, 0x41, 0x73, 0xb0,
1026 0xc7, 0x44,
1027 }
1028 };
1029
1030 TC_PRINT(".");
1031 result = do_hmac_prng_pr_false_test(15, &vec);
1032
1033 return result;
1034 }
1035
test_16(void)1036 unsigned int test_16(void)
1037 {
1038 unsigned int result = TC_PASS;
1039 const struct hmac_prng_test_vector vec = {
1040 32,
1041 16,
1042 32,
1043 0,
1044 128,
1045 {
1046 0xfa, 0x0e, 0xe1, 0xfe, 0x39, 0xc7, 0xc3, 0x90, 0xaa,
1047 0x94, 0x15, 0x9d, 0x0d, 0xe9, 0x75, 0x64, 0x34, 0x2b,
1048 0x59, 0x17, 0x77, 0xf3, 0xe5, 0xf6, 0xa4, 0xba, 0x2a,
1049 0xea, 0x34, 0x2e, 0xc8, 0x40,
1050 },
1051 {
1052 0xdd, 0x08, 0x20, 0x65, 0x5c, 0xb2, 0xff, 0xdb, 0x0d,
1053 0xa9, 0xe9, 0x31, 0x0a, 0x67, 0xc9, 0xe5,
1054 },
1055 {
1056 0xf2, 0xe5, 0x8f, 0xe6, 0x0a, 0x3a, 0xfc, 0x59, 0xda,
1057 0xd3, 0x75, 0x95, 0x41, 0x5f, 0xfd, 0x31, 0x8c, 0xcf,
1058 0x69, 0xd6, 0x77, 0x80, 0xf6, 0xfa, 0x07, 0x97, 0xdc,
1059 0x9a, 0xa4, 0x3e, 0x14, 0x4c,
1060 },
1061 {
1062 0xe0, 0x62, 0x9b, 0x6d, 0x79, 0x75, 0xdd, 0xfa, 0x96,
1063 0xa3, 0x99, 0x64, 0x87, 0x40, 0xe6, 0x0f, 0x1f, 0x95,
1064 0x57, 0xdc, 0x58, 0xb3, 0xd7, 0x41, 0x5f, 0x9b, 0xa9,
1065 0xd4, 0xdb, 0xb5, 0x01, 0xf6,
1066 },
1067 {
1068 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1069 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1070 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1071 0x00, 0x00, 0x00, 0x00, 0x00,
1072 },
1073 {
1074 0xf9, 0x2d, 0x4c, 0xf9, 0x9a, 0x53, 0x5b, 0x20, 0x22,
1075 0x2a, 0x52, 0xa6, 0x8d, 0xb0, 0x4c, 0x5a, 0xf6, 0xf5,
1076 0xff, 0xc7, 0xb6, 0x6a, 0x47, 0x3a, 0x37, 0xa2, 0x56,
1077 0xbd, 0x8d, 0x29, 0x8f, 0x9b, 0x4a, 0xa4, 0xaf, 0x7e,
1078 0x8d, 0x18, 0x1e, 0x02, 0x36, 0x79, 0x03, 0xf9, 0x3b,
1079 0xdb, 0x74, 0x4c, 0x6c, 0x2f, 0x3f, 0x34, 0x72, 0x62,
1080 0x6b, 0x40, 0xce, 0x9b, 0xd6, 0xa7, 0x0e, 0x7b, 0x8f,
1081 0x93, 0x99, 0x2a, 0x16, 0xa7, 0x6f, 0xab, 0x6b, 0x5f,
1082 0x16, 0x25, 0x68, 0xe0, 0x8e, 0xe6, 0xc3, 0xe8, 0x04,
1083 0xae, 0xfd, 0x95, 0x2d, 0xdd, 0x3a, 0xcb, 0x79, 0x1c,
1084 0x50, 0xf2, 0xad, 0x69, 0xe9, 0xa0, 0x40, 0x28, 0xa0,
1085 0x6a, 0x9c, 0x01, 0xd3, 0xa6, 0x2a, 0xca, 0x2a, 0xaf,
1086 0x6e, 0xfe, 0x69, 0xed, 0x97, 0xa0, 0x16, 0x21, 0x3a,
1087 0x2d, 0xd6, 0x42, 0xb4, 0x88, 0x67, 0x64, 0x07, 0x2d,
1088 0x9c, 0xbe,
1089 }
1090 };
1091
1092 TC_PRINT(".");
1093 result = do_hmac_prng_pr_false_test(16, &vec);
1094
1095 return result;
1096 }
1097
test_17(void)1098 unsigned int test_17(void)
1099 {
1100 unsigned int result = TC_PASS;
1101 const struct hmac_prng_test_vector vec = {
1102 32,
1103 16,
1104 32,
1105 0,
1106 128,
1107 {
1108 0xcf, 0xf7, 0x2f, 0x34, 0x51, 0x15, 0x37, 0x6a, 0x57,
1109 0xf4, 0xdb, 0x8a, 0x5c, 0x9f, 0x64, 0x05, 0x3e, 0x73,
1110 0x79, 0x17, 0x1a, 0x5a, 0x1e, 0x81, 0xe8, 0x2a, 0xad,
1111 0x34, 0x48, 0xd1, 0x7d, 0x44,
1112 },
1113 {
1114 0xd1, 0xe9, 0x71, 0xec, 0x79, 0x5d, 0x09, 0x8b, 0x3d,
1115 0xae, 0x14, 0xff, 0xcb, 0xee, 0xcf, 0xd9,
1116 },
1117 {
1118 0x6e, 0xc0, 0xc7, 0x98, 0xc2, 0x40, 0xf2, 0x27, 0x40,
1119 0xca, 0xd7, 0xe2, 0x7b, 0x41, 0xf5, 0xe4, 0x2d, 0xcc,
1120 0xaf, 0x66, 0xde, 0xf3, 0xb7, 0xf3, 0x41, 0xc4, 0xd8,
1121 0x27, 0x29, 0x4f, 0x83, 0xc9,
1122 },
1123 {
1124 0x45, 0xec, 0x80, 0xf0, 0xc0, 0x0c, 0xad, 0x0f, 0xf0,
1125 0xb7, 0x61, 0x6d, 0x2a, 0x93, 0x0a, 0xf3, 0xf5, 0xcf,
1126 0x23, 0xcd, 0x61, 0xbe, 0x7f, 0xbf, 0x7c, 0x65, 0xbe,
1127 0x00, 0x31, 0xe9, 0x3e, 0x38,
1128 },
1129 {
1130 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1131 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1132 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1133 0x00, 0x00, 0x00, 0x00, 0x00,
1134 },
1135 {
1136 0x17, 0xa7, 0x90, 0x1e, 0x25, 0x50, 0xde, 0x08, 0x8f,
1137 0x47, 0x25, 0x18, 0xd3, 0x77, 0xcc, 0x4c, 0xc6, 0x97,
1138 0x9f, 0x4a, 0x64, 0xf4, 0x97, 0x5c, 0x74, 0x34, 0x42,
1139 0x15, 0xe4, 0x80, 0x7a, 0x12, 0x34, 0xee, 0xfe, 0xf9,
1140 0x9f, 0x64, 0xcb, 0x8a, 0xbc, 0x3f, 0xb8, 0x62, 0x09,
1141 0xf6, 0xfc, 0x7d, 0xdd, 0x03, 0xe9, 0x4f, 0x83, 0x74,
1142 0x6c, 0x5a, 0xbe, 0x53, 0x60, 0xcd, 0xde, 0x4f, 0x25,
1143 0x25, 0xcc, 0xf7, 0x16, 0x7e, 0x6f, 0x0b, 0xef, 0xae,
1144 0x05, 0xb3, 0x8f, 0xd6, 0x08, 0x9a, 0x2a, 0xb8, 0x37,
1145 0x19, 0x87, 0x4c, 0xe8, 0xf6, 0x70, 0x48, 0x0d, 0x5f,
1146 0x3e, 0xd9, 0xbf, 0x40, 0x53, 0x8a, 0x15, 0xaa, 0xad,
1147 0x11, 0x2d, 0xb1, 0x61, 0x8a, 0x58, 0xb1, 0x06, 0x87,
1148 0xb6, 0x88, 0x75, 0xf0, 0x0f, 0x13, 0x9a, 0x72, 0xbd,
1149 0xf0, 0x43, 0xf7, 0x36, 0xe4, 0xa3, 0x20, 0xc0, 0x6e,
1150 0xfd, 0x2c,
1151 }
1152 };
1153
1154 TC_PRINT(".");
1155 result = do_hmac_prng_pr_false_test(17, &vec);
1156
1157 return result;
1158 }
1159
test_18(void)1160 unsigned int test_18(void)
1161 {
1162 unsigned int result = TC_PASS;
1163 const struct hmac_prng_test_vector vec = {
1164 32,
1165 16,
1166 32,
1167 0,
1168 128,
1169 {
1170 0xb7, 0x09, 0x9b, 0x06, 0xfc, 0x7a, 0x8a, 0x74, 0xc5,
1171 0x82, 0x19, 0x72, 0x9d, 0xb6, 0xb0, 0xf7, 0x80, 0xd7,
1172 0xb4, 0xfa, 0x30, 0x7b, 0xc3, 0xd3, 0xf9, 0xf2, 0x2b,
1173 0xfb, 0x76, 0x35, 0x96, 0xa3,
1174 },
1175 {
1176 0xb8, 0x77, 0x20, 0x59, 0xa1, 0x35, 0xa6, 0xb6, 0x1d,
1177 0xa7, 0x2f, 0x37, 0x54, 0x11, 0xde, 0x26,
1178 },
1179 {
1180 0x2a, 0xc1, 0xbf, 0xb2, 0x4e, 0x0b, 0x8c, 0x6a, 0xc2,
1181 0x80, 0x3e, 0x89, 0x26, 0x18, 0x22, 0xb7, 0xf7, 0x2a,
1182 0x03, 0x20, 0xdf, 0x2b, 0x19, 0x91, 0x71, 0xb7, 0x9b,
1183 0xcb, 0xdb, 0x40, 0xb7, 0x19,
1184 },
1185 {
1186 0x9a, 0xec, 0x4f, 0x56, 0xec, 0x5e, 0x96, 0xfb, 0xd9,
1187 0x60, 0x48, 0xb9, 0xa6, 0x3a, 0xc8, 0xd0, 0x47, 0xae,
1188 0xdb, 0xbe, 0xea, 0x77, 0x12, 0xe2, 0x41, 0x13, 0x3b,
1189 0x1a, 0x35, 0x7e, 0xcf, 0xc4,
1190 },
1191 {
1192 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1193 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1194 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1195 0x00, 0x00, 0x00, 0x00, 0x00,
1196 },
1197 {
1198 0x0e, 0x1f, 0x2b, 0xfe, 0xf7, 0x78, 0xf5, 0xe5, 0xbe,
1199 0x67, 0x1e, 0xcb, 0x49, 0x71, 0x62, 0x4e, 0xc7, 0x84,
1200 0xed, 0x27, 0x32, 0xab, 0xc4, 0xfb, 0xb9, 0x8a, 0x8b,
1201 0x48, 0x2f, 0xb6, 0x87, 0x37, 0xdf, 0x91, 0xfd, 0x15,
1202 0xac, 0xfa, 0xd2, 0x95, 0x14, 0x03, 0xac, 0x77, 0xc5,
1203 0xca, 0x3e, 0xdf, 0xfc, 0x1e, 0x03, 0x39, 0x8a, 0xe6,
1204 0xcf, 0x6a, 0xc2, 0x4a, 0x91, 0x67, 0x8d, 0xb5, 0xc7,
1205 0x29, 0x0a, 0xbc, 0x3f, 0xa0, 0x01, 0xaa, 0x02, 0xd5,
1206 0x03, 0x99, 0x32, 0x6f, 0x85, 0xd2, 0xb8, 0x94, 0x21,
1207 0x99, 0xa1, 0x57, 0x5f, 0x67, 0x46, 0x36, 0x47, 0x40,
1208 0xa5, 0x91, 0x05, 0x52, 0xc6, 0x39, 0x80, 0x4d, 0x75,
1209 0x30, 0xc0, 0xd4, 0x13, 0x39, 0x34, 0x5a, 0x58, 0xff,
1210 0x00, 0x80, 0xec, 0xcf, 0x17, 0x11, 0x89, 0x51, 0x92,
1211 0xa3, 0x81, 0x7a, 0x8d, 0xc3, 0xf0, 0x0f, 0x28, 0xcc,
1212 0x10, 0xcc,
1213 }
1214 };
1215
1216 TC_PRINT(".");
1217 result = do_hmac_prng_pr_false_test(18, &vec);
1218
1219 return result;
1220 }
1221
test_19(void)1222 unsigned int test_19(void)
1223 {
1224 unsigned int result = TC_PASS;
1225 const struct hmac_prng_test_vector vec = {
1226 32,
1227 16,
1228 32,
1229 0,
1230 128,
1231 {
1232 0x7b, 0xa0, 0x2a, 0x73, 0x4c, 0x87, 0x44, 0xb1, 0x5e,
1233 0xf8, 0xb4, 0x07, 0x4f, 0xe6, 0x39, 0xb3, 0x2e, 0x44,
1234 0x31, 0x76, 0x2a, 0xb5, 0xb7, 0xcd, 0x4d, 0x5d, 0xf6,
1235 0x75, 0xea, 0x90, 0x67, 0x2b,
1236 },
1237 {
1238 0x8a, 0x42, 0x4f, 0x32, 0x10, 0x86, 0x07, 0xc8, 0xf1,
1239 0xf4, 0x5d, 0x97, 0xf5, 0x00, 0xee, 0x12,
1240 },
1241 {
1242 0x3a, 0xd6, 0x27, 0x43, 0x3f, 0x46, 0x51, 0x87, 0xc4,
1243 0x81, 0x41, 0xe3, 0x0c, 0x26, 0x78, 0x10, 0x60, 0x91,
1244 0xe7, 0xa6, 0x80, 0x22, 0x9a, 0x53, 0x4b, 0x85, 0x1b,
1245 0x8d, 0x46, 0xfe, 0xb9, 0x57,
1246 },
1247 {
1248 0xd8, 0xf0, 0x2b, 0x59, 0xb6, 0xa3, 0xdd, 0x27, 0x6b,
1249 0xc6, 0x9c, 0xba, 0x68, 0xef, 0xcf, 0x11, 0xab, 0x83,
1250 0xea, 0xd1, 0x39, 0x7a, 0xfd, 0x98, 0x41, 0x78, 0x6b,
1251 0xd1, 0xbb, 0x5d, 0xa9, 0x7a,
1252 },
1253 {
1254 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1255 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1256 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1257 0x00, 0x00, 0x00, 0x00, 0x00,
1258 },
1259 {
1260 0x1f, 0xb9, 0x11, 0x86, 0xba, 0x4b, 0x44, 0x59, 0xd9,
1261 0x94, 0xb4, 0xb9, 0xf4, 0xca, 0x25, 0x2c, 0x7b, 0xe6,
1262 0x29, 0x4d, 0x6c, 0xdb, 0x5f, 0xe5, 0x6f, 0x8f, 0xf7,
1263 0x84, 0xd4, 0xb1, 0x90, 0xa1, 0xc6, 0x45, 0x6e, 0x0a,
1264 0x41, 0x22, 0x3b, 0xbb, 0xdf, 0x83, 0xed, 0x8e, 0x7c,
1265 0xfb, 0xfa, 0x76, 0x5d, 0x9d, 0x8b, 0xc7, 0xea, 0x5f,
1266 0x4d, 0x79, 0xea, 0x7e, 0xcc, 0xb4, 0x92, 0x80, 0x81,
1267 0xa2, 0x1d, 0xe4, 0xcc, 0xa3, 0x66, 0x20, 0xd6, 0x26,
1268 0x7f, 0x55, 0xd9, 0xa3, 0x52, 0xb7, 0x6f, 0xc0, 0xa5,
1269 0x73, 0x75, 0x88, 0x41, 0x12, 0xc3, 0x1f, 0x65, 0xff,
1270 0x28, 0xe7, 0x6d, 0x31, 0x56, 0x98, 0xc2, 0x9e, 0x6c,
1271 0x4c, 0x05, 0xcb, 0x58, 0xb0, 0xa0, 0x7a, 0xe6, 0x61,
1272 0x43, 0xb4, 0xab, 0xc7, 0x8b, 0x9d, 0x25, 0xc7, 0x8b,
1273 0x41, 0x21, 0xe1, 0xe4, 0x5b, 0xef, 0x1a, 0x6c, 0x17,
1274 0x93, 0xe2,
1275 }
1276 };
1277
1278 TC_PRINT(".");
1279 result = do_hmac_prng_pr_false_test(19, &vec);
1280
1281 return result;
1282 }
1283
test_20(void)1284 unsigned int test_20(void)
1285 {
1286 unsigned int result = TC_PASS;
1287 const struct hmac_prng_test_vector vec = {
1288 32,
1289 16,
1290 32,
1291 0,
1292 128,
1293 {
1294 0x9a, 0x88, 0x65, 0xdf, 0xe0, 0x53, 0xae, 0x77, 0xcb,
1295 0x6a, 0x93, 0x65, 0xb8, 0x8f, 0x34, 0xee, 0xc1, 0x7e,
1296 0xa5, 0xcb, 0xfb, 0x0b, 0x1f, 0x04, 0xd1, 0x45, 0x9e,
1297 0x7f, 0xa9, 0xc4, 0xf3, 0xcb,
1298 },
1299 {
1300 0x18, 0x0c, 0x0a, 0x74, 0xda, 0x3e, 0xc4, 0x64, 0xdf,
1301 0x11, 0xfa, 0xc1, 0x72, 0xd1, 0xc6, 0x32,
1302 },
1303 {
1304 0x33, 0x63, 0x72, 0xec, 0x82, 0xd0, 0xd6, 0x8b, 0xef,
1305 0xad, 0x83, 0x69, 0x19, 0x66, 0xef, 0x6f, 0xfc, 0x65,
1306 0x10, 0x53, 0x88, 0xeb, 0x2d, 0x6e, 0xed, 0x82, 0x6c,
1307 0x22, 0x85, 0x03, 0x7c, 0x77,
1308 },
1309 {
1310 0x75, 0xb9, 0x51, 0x08, 0xef, 0xf1, 0xfa, 0xbe, 0x83,
1311 0x61, 0x3e, 0x1c, 0x4d, 0xe5, 0x75, 0xe7, 0x2a, 0x5c,
1312 0xdc, 0x4b, 0xb9, 0x31, 0x1d, 0xd0, 0x06, 0xf9, 0x71,
1313 0xa0, 0x52, 0x38, 0x66, 0x92,
1314 },
1315 {
1316 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1317 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1318 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1319 0x00, 0x00, 0x00, 0x00, 0x00,
1320 },
1321 {
1322 0x3c, 0x68, 0x3f, 0x6d, 0x4f, 0x8f, 0x5a, 0x40, 0x18,
1323 0xd0, 0x16, 0x33, 0xdf, 0xee, 0x74, 0x26, 0x6a, 0xaa,
1324 0x68, 0xed, 0x6f, 0xc6, 0x49, 0xe8, 0x1b, 0x64, 0xdf,
1325 0xdf, 0x5f, 0x75, 0xe7, 0x5d, 0x5c, 0x05, 0x8d, 0x66,
1326 0xcf, 0x5f, 0xd0, 0x1a, 0x4f, 0x14, 0x3a, 0x6f, 0xf6,
1327 0x95, 0x51, 0x7a, 0x4a, 0x43, 0xbd, 0x3a, 0xdf, 0xd1,
1328 0xfb, 0x2c, 0x28, 0xba, 0x9a, 0x41, 0x06, 0x31, 0x40,
1329 0xbe, 0xdb, 0xff, 0xdb, 0x4d, 0x21, 0xb1, 0xac, 0xe1,
1330 0x55, 0x0d, 0x59, 0x20, 0x9e, 0xc6, 0x1f, 0x1e, 0x2d,
1331 0xba, 0xcb, 0x2a, 0x91, 0x16, 0xa7, 0x9c, 0xb1, 0x41,
1332 0x0b, 0xf2, 0xde, 0xca, 0x52, 0x18, 0x08, 0x0a, 0xac,
1333 0xd9, 0xc6, 0x8e, 0x1d, 0x65, 0x57, 0x72, 0x1a, 0x89,
1334 0x13, 0xe2, 0x3f, 0x61, 0x7e, 0x30, 0xf2, 0xe5, 0x94,
1335 0xf6, 0x12, 0x67, 0xd5, 0xed, 0x81, 0x46, 0x4e, 0xe7,
1336 0x30, 0xb2,
1337 }
1338 };
1339
1340 TC_PRINT(".");
1341 result = do_hmac_prng_pr_false_test(20, &vec);
1342
1343 return result;
1344 }
1345
test_21(void)1346 unsigned int test_21(void)
1347 {
1348 unsigned int result = TC_PASS;
1349 const struct hmac_prng_test_vector vec = {
1350 32,
1351 16,
1352 32,
1353 0,
1354 128,
1355 {
1356 0x22, 0xc1, 0xaf, 0x2f, 0x2a, 0x4c, 0x88, 0x5f, 0x06,
1357 0x98, 0x85, 0x67, 0xda, 0x9f, 0xc9, 0x0f, 0x34, 0xf8,
1358 0x0f, 0x6d, 0xd5, 0x10, 0x1c, 0x28, 0x1b, 0xee, 0xf4,
1359 0x97, 0xa6, 0xa1, 0xb2, 0xf8,
1360 },
1361 {
1362 0x3f, 0xaf, 0xde, 0xcf, 0x79, 0xa4, 0x17, 0x48, 0x01,
1363 0xf1, 0x33, 0x13, 0x16, 0x29, 0x03, 0x7b,
1364 },
1365 {
1366 0x80, 0x32, 0x7d, 0xac, 0x48, 0x61, 0x11, 0xb8, 0xa8,
1367 0xb2, 0xc8, 0xe8, 0x38, 0x1f, 0xb2, 0xd7, 0x13, 0xa6,
1368 0x76, 0x95, 0xc2, 0xe6, 0x60, 0xb2, 0xb0, 0xd4, 0xaf,
1369 0x69, 0x6c, 0xc3, 0xe1, 0xde,
1370 },
1371 {
1372 0xf9, 0x5a, 0x0e, 0x4b, 0xd2, 0x4f, 0x0e, 0x2e, 0x9e,
1373 0x44, 0x4f, 0x51, 0x1b, 0x76, 0x32, 0x86, 0x8e, 0xad,
1374 0x0d, 0x5b, 0xb3, 0x84, 0x67, 0x71, 0x26, 0x4e, 0x03,
1375 0xf8, 0xab, 0x8e, 0xd0, 0x74,
1376 },
1377 {
1378 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1379 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1380 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1381 0x00, 0x00, 0x00, 0x00, 0x00,
1382 },
1383 {
1384 0x77, 0xa7, 0xfe, 0xa2, 0xf3, 0x5a, 0x18, 0x8f, 0x6d,
1385 0x1b, 0xfd, 0xd4, 0x9b, 0x56, 0x9d, 0x8c, 0x45, 0xe2,
1386 0xdd, 0x43, 0x1d, 0x35, 0xa1, 0x8c, 0x6f, 0x43, 0x2c,
1387 0x72, 0x4f, 0x1e, 0x33, 0xae, 0x92, 0xcb, 0x89, 0xa9,
1388 0xcf, 0x91, 0x51, 0x9e, 0x50, 0x70, 0x5a, 0x53, 0x19,
1389 0x9f, 0x5b, 0x57, 0x2d, 0xc8, 0x5c, 0x1a, 0xef, 0x8f,
1390 0x28, 0xfb, 0x52, 0xdc, 0x79, 0x86, 0x22, 0x8f, 0x66,
1391 0x95, 0x4d, 0x54, 0xed, 0xa8, 0x4a, 0x86, 0x96, 0x2c,
1392 0xf2, 0x5c, 0xf7, 0x65, 0xbd, 0x99, 0x49, 0x87, 0x63,
1393 0x49, 0x29, 0x1b, 0x1a, 0xae, 0x5f, 0x88, 0xfc, 0xf4,
1394 0xb3, 0x76, 0x91, 0x2d, 0x20, 0x5a, 0xdd, 0x4f, 0x53,
1395 0xb2, 0x77, 0x0c, 0x65, 0x79, 0x46, 0xc0, 0xd8, 0x24,
1396 0x28, 0x1f, 0x44, 0x15, 0x09, 0x15, 0x3f, 0x48, 0x35,
1397 0x6d, 0x9d, 0x43, 0xf8, 0xa9, 0x27, 0xe0, 0x69, 0x3d,
1398 0xb8, 0xfc,
1399 }
1400 };
1401
1402 TC_PRINT(".");
1403 result = do_hmac_prng_pr_false_test(21, &vec);
1404
1405 return result;
1406 }
1407
test_22(void)1408 unsigned int test_22(void)
1409 {
1410 unsigned int result = TC_PASS;
1411 const struct hmac_prng_test_vector vec = {
1412 32,
1413 16,
1414 32,
1415 0,
1416 128,
1417 {
1418 0xd0, 0x84, 0x0e, 0x3a, 0x8d, 0x62, 0x9d, 0x5b, 0x88,
1419 0x3d, 0x33, 0xe0, 0x53, 0xa3, 0x41, 0xb2, 0x1c, 0x67,
1420 0x4e, 0x67, 0xe1, 0x99, 0x9f, 0x06, 0x8c, 0x49, 0x7e,
1421 0xcf, 0xaa, 0xbf, 0xd6, 0xf6,
1422 },
1423 {
1424 0x07, 0x1d, 0xe7, 0x24, 0x4e, 0xcb, 0x2f, 0xdf, 0x7a,
1425 0xb2, 0x7f, 0x2d, 0x84, 0xaa, 0x7b, 0x7a,
1426 },
1427 {
1428 0x90, 0xd6, 0x09, 0x52, 0x7f, 0xad, 0x96, 0xff, 0xe6,
1429 0x4a, 0xb1, 0x53, 0x86, 0x03, 0x46, 0xf3, 0xd2, 0x37,
1430 0xc8, 0x94, 0x05, 0x55, 0xae, 0x17, 0xb4, 0x78, 0x42,
1431 0xd8, 0x2d, 0x3b, 0x09, 0x43,
1432 },
1433 {
1434 0x1d, 0xd1, 0xa8, 0xb5, 0x98, 0x56, 0xc4, 0x9a, 0x38,
1435 0x8f, 0x59, 0x4c, 0x5f, 0x42, 0xcc, 0x2e, 0x4a, 0x56,
1436 0xb3, 0xcc, 0xb8, 0xa6, 0x5e, 0x70, 0x66, 0xe4, 0x4c,
1437 0x12, 0xf4, 0x34, 0x4d, 0x50,
1438 },
1439 {
1440 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1441 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1442 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1443 0x00, 0x00, 0x00, 0x00, 0x00,
1444 },
1445 {
1446 0x7a, 0xb2, 0x8a, 0x9b, 0x2d, 0x3a, 0xe9, 0x99, 0x19,
1447 0x55, 0x53, 0xe6, 0x55, 0x0c, 0xce, 0xd4, 0xc2, 0xda,
1448 0xcc, 0xbe, 0x7e, 0xc9, 0xdc, 0xbb, 0x0d, 0x46, 0x7f,
1449 0xab, 0xba, 0x18, 0x5b, 0x72, 0x7f, 0xbf, 0xd9, 0x83,
1450 0x02, 0x42, 0xcd, 0x09, 0x8f, 0x4d, 0xb3, 0xcf, 0x4a,
1451 0x85, 0xe8, 0xbf, 0x8e, 0x8d, 0x59, 0x74, 0xb6, 0x2b,
1452 0x28, 0x55, 0x09, 0x22, 0xb3, 0x2e, 0xd5, 0xbf, 0xc1,
1453 0xa5, 0x22, 0xb6, 0x60, 0x5c, 0xf9, 0x3b, 0xf8, 0xd9,
1454 0x0b, 0xde, 0xc1, 0xc5, 0xb9, 0xe5, 0x9c, 0x6f, 0xc3,
1455 0x7a, 0x81, 0x7d, 0x43, 0x70, 0x68, 0xa8, 0x72, 0x54,
1456 0xbe, 0x1f, 0x7c, 0x46, 0x18, 0xad, 0xa4, 0x6f, 0xbc,
1457 0x3a, 0x2e, 0xfb, 0x02, 0xe4, 0x45, 0x24, 0xe2, 0x1d,
1458 0x91, 0xbe, 0x75, 0x34, 0xcf, 0x05, 0xfb, 0xfd, 0x85,
1459 0x83, 0x04, 0xb7, 0x06, 0xd6, 0xa9, 0x1e, 0xa1, 0xcc,
1460 0x6a, 0xd5,
1461 }
1462 };
1463
1464 TC_PRINT(".");
1465 result = do_hmac_prng_pr_false_test(22, &vec);
1466
1467 return result;
1468 }
1469
test_23(void)1470 unsigned int test_23(void)
1471 {
1472 unsigned int result = TC_PASS;
1473 const struct hmac_prng_test_vector vec = {
1474 32,
1475 16,
1476 32,
1477 0,
1478 128,
1479 {
1480 0x2e, 0x2d, 0xd5, 0x68, 0x69, 0x10, 0x44, 0x92, 0x76,
1481 0x7a, 0x59, 0x77, 0x86, 0x52, 0x83, 0x19, 0x19, 0xe1,
1482 0xc8, 0xb9, 0x70, 0xf8, 0x4e, 0x82, 0x4a, 0xe4, 0x11,
1483 0x65, 0x97, 0xa0, 0xab, 0x7f,
1484 },
1485 {
1486 0x01, 0xc4, 0x2a, 0x7e, 0x98, 0x36, 0x41, 0xde, 0x46,
1487 0xc8, 0x2f, 0xd0, 0x9b, 0x4f, 0x2f, 0x76,
1488 },
1489 {
1490 0xbc, 0xd9, 0xe1, 0x50, 0x8f, 0xcc, 0x22, 0x82, 0x0a,
1491 0x8b, 0xe0, 0x71, 0x80, 0xfe, 0xa5, 0x04, 0x53, 0x67,
1492 0x33, 0x3b, 0x56, 0x9e, 0x11, 0x1b, 0x01, 0x1c, 0xd5,
1493 0x7d, 0xc1, 0x85, 0x87, 0x65,
1494 },
1495 {
1496 0x73, 0x06, 0x50, 0x7c, 0xd3, 0xca, 0x7e, 0xec, 0x66,
1497 0x7e, 0x64, 0x0d, 0x27, 0x0c, 0xfb, 0xb0, 0x33, 0x06,
1498 0x3d, 0x97, 0x52, 0x0b, 0x6b, 0x7e, 0x38, 0xff, 0x3c,
1499 0xea, 0x0e, 0x79, 0xd1, 0x2b,
1500 },
1501 {
1502 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1503 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1504 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1505 0x00, 0x00, 0x00, 0x00, 0x00,
1506 },
1507 {
1508 0xb9, 0x15, 0x72, 0x6c, 0x7b, 0x8c, 0x5d, 0xc3, 0x97,
1509 0x5f, 0x1a, 0x33, 0x46, 0x84, 0xb9, 0x73, 0xab, 0xf6,
1510 0xa9, 0x49, 0x5d, 0x93, 0x00, 0x88, 0xcf, 0x5d, 0x07,
1511 0x15, 0x48, 0xe4, 0xfd, 0x29, 0xa6, 0x7b, 0x55, 0xcc,
1512 0x56, 0x1e, 0xd6, 0x94, 0x9a, 0xd2, 0x81, 0x50, 0xa9,
1513 0xfb, 0x43, 0x07, 0xc1, 0xfa, 0x5f, 0x78, 0x3a, 0x7e,
1514 0xa8, 0x72, 0xe8, 0xd7, 0xc7, 0xe6, 0x7f, 0xf0, 0xc2,
1515 0x90, 0x60, 0x81, 0xee, 0x91, 0x57, 0x37, 0xd8, 0x13,
1516 0xc2, 0x5b, 0xe5, 0xc3, 0x0b, 0x95, 0x2a, 0x36, 0xf3,
1517 0x93, 0xe6, 0xba, 0xa5, 0x6a, 0xb0, 0x1a, 0xdc, 0x2b,
1518 0x47, 0x76, 0xad, 0x7b, 0x5d, 0x03, 0x6a, 0x53, 0x65,
1519 0x98, 0x77, 0xc7, 0xa4, 0xe5, 0x22, 0x0a, 0x89, 0x7d,
1520 0x6c, 0x07, 0x99, 0xaf, 0x37, 0xbe, 0xee, 0xd9, 0x11,
1521 0x73, 0xfb, 0xe9, 0xc6, 0x13, 0xc3, 0xb6, 0xb9, 0xbb,
1522 0x28, 0xe5,
1523 }
1524 };
1525
1526 TC_PRINT(".");
1527 result = do_hmac_prng_pr_false_test(23, &vec);
1528
1529 return result;
1530 }
1531
test_24(void)1532 unsigned int test_24(void)
1533 {
1534 unsigned int result = TC_PASS;
1535 const struct hmac_prng_test_vector vec = {
1536 32,
1537 16,
1538 32,
1539 0,
1540 128,
1541 {
1542 0xd1, 0xaa, 0xb0, 0xf1, 0x6b, 0xd4, 0x7a, 0x5c, 0xcd,
1543 0x67, 0xc2, 0x2e, 0x09, 0x4d, 0xaa, 0x37, 0x35, 0xea,
1544 0xe2, 0x1a, 0xa5, 0x7f, 0x0b, 0xcd, 0x9e, 0x05, 0x3d,
1545 0x9d, 0x0d, 0x54, 0x5c, 0xb8,
1546 },
1547 {
1548 0x19, 0x93, 0x10, 0xdf, 0xe1, 0xb0, 0x12, 0x65, 0xb8,
1549 0xc0, 0xd2, 0xb4, 0x6d, 0x6c, 0x7c, 0x9f,
1550 },
1551 {
1552 0x62, 0x5b, 0x4b, 0x8f, 0x4d, 0xe7, 0x2e, 0xa9, 0xcb,
1553 0x6f, 0x70, 0x55, 0x63, 0x22, 0xdc, 0x2a, 0x19, 0xd6,
1554 0xb2, 0xb3, 0x2d, 0xe6, 0x23, 0xf5, 0x57, 0xe4, 0x19,
1555 0xa0, 0x84, 0xba, 0x60, 0xfd,
1556 },
1557 {
1558 0xf5, 0x0c, 0xab, 0xae, 0x4e, 0x06, 0x0f, 0x39, 0x71,
1559 0x09, 0x6b, 0x78, 0xe5, 0x50, 0xcd, 0xa2, 0x83, 0x7a,
1560 0x26, 0xa6, 0x93, 0xd9, 0x05, 0xdb, 0x2d, 0x99, 0x2d,
1561 0x58, 0x9b, 0x26, 0x8f, 0x44,
1562 },
1563 {
1564 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1565 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1566 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1567 0x00, 0x00, 0x00, 0x00, 0x00,
1568 },
1569 {
1570 0x98, 0x7e, 0x1f, 0xdf, 0xe0, 0x04, 0xc6, 0x19, 0xcf,
1571 0x1e, 0x90, 0x34, 0x57, 0x67, 0x07, 0xec, 0xcd, 0x84,
1572 0x94, 0x00, 0xe1, 0x9c, 0x87, 0xa1, 0xfe, 0xf5, 0xb0,
1573 0x17, 0x9e, 0xc5, 0x1c, 0x42, 0xa2, 0xf8, 0xc4, 0x5d,
1574 0x79, 0x42, 0xd0, 0x02, 0x3a, 0x02, 0x3c, 0x89, 0xf1,
1575 0x88, 0xb2, 0x63, 0x43, 0x62, 0x70, 0x39, 0x85, 0x69,
1576 0x53, 0x69, 0x86, 0x33, 0x22, 0xf5, 0x86, 0x19, 0xc5,
1577 0x0a, 0x73, 0x85, 0xa2, 0xdc, 0x91, 0xfc, 0x78, 0xf9,
1578 0x4b, 0x59, 0xf0, 0x13, 0x1d, 0xc2, 0xb5, 0x6a, 0x0d,
1579 0x7c, 0x69, 0x9d, 0x42, 0x72, 0x85, 0xda, 0x1c, 0x10,
1580 0x4b, 0x0a, 0xd1, 0x73, 0x9d, 0xa1, 0x0d, 0x80, 0x71,
1581 0xc2, 0x39, 0x93, 0x78, 0x70, 0x45, 0xdc, 0x21, 0xf0,
1582 0x07, 0x0e, 0x1e, 0x9a, 0xa1, 0x65, 0x8f, 0xc8, 0xe3,
1583 0xad, 0xd7, 0x3d, 0xac, 0x72, 0x62, 0xe8, 0x0e, 0x0a,
1584 0xa2, 0xee,
1585 }
1586 };
1587
1588 TC_PRINT(".");
1589 result = do_hmac_prng_pr_false_test(24, &vec);
1590
1591 return result;
1592 }
1593
test_25(void)1594 unsigned int test_25(void)
1595 {
1596 unsigned int result = TC_PASS;
1597 const struct hmac_prng_test_vector vec = {
1598 32,
1599 16,
1600 32,
1601 0,
1602 128,
1603 {
1604 0x44, 0x94, 0x80, 0xea, 0xa1, 0x00, 0xaf, 0xf6, 0xf4,
1605 0x8d, 0xc6, 0x28, 0x6a, 0x5a, 0x81, 0xb9, 0x72, 0x8b,
1606 0x08, 0x48, 0x64, 0xf7, 0x8a, 0x9d, 0xa9, 0x8f, 0x60,
1607 0x6a, 0x00, 0xa6, 0xa4, 0x1f,
1608 },
1609 {
1610 0xe5, 0x3c, 0x6c, 0x5a, 0xc3, 0xda, 0x9f, 0x47, 0x26,
1611 0x38, 0x9a, 0x03, 0xf9, 0x7b, 0xb6, 0x40,
1612 },
1613 {
1614 0x6b, 0x8f, 0xed, 0xc0, 0x84, 0xd8, 0xe2, 0x8d, 0x33,
1615 0x3a, 0xef, 0x6d, 0xb3, 0x70, 0x2b, 0x63, 0x51, 0xf0,
1616 0xd2, 0x4e, 0x30, 0x90, 0x8c, 0xcc, 0xb6, 0x37, 0x94,
1617 0x28, 0x26, 0x55, 0x88, 0x6b,
1618 },
1619 {
1620 0x73, 0xa6, 0xd6, 0x4e, 0x19, 0x66, 0xae, 0x32, 0x43,
1621 0x88, 0xdc, 0x12, 0xc1, 0x45, 0x44, 0xe9, 0xdc, 0x5a,
1622 0xe4, 0xfc, 0xb3, 0x31, 0xe9, 0x9d, 0x35, 0x0c, 0x45,
1623 0x6f, 0xf1, 0x6f, 0x9a, 0xa0,
1624 },
1625 {
1626 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1627 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1628 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1629 0x00, 0x00, 0x00, 0x00, 0x00,
1630 },
1631 {
1632 0xa0, 0x69, 0x12, 0xd3, 0x62, 0xda, 0x7e, 0xb2, 0x55,
1633 0x98, 0x85, 0x7f, 0x6d, 0x65, 0x34, 0x4c, 0x3e, 0x23,
1634 0xec, 0x3d, 0xeb, 0x80, 0xc6, 0xe4, 0x31, 0x58, 0x84,
1635 0x5b, 0x95, 0xea, 0xec, 0xa2, 0x41, 0xc0, 0xbb, 0xbd,
1636 0x67, 0xac, 0x38, 0x5e, 0x24, 0x69, 0x34, 0x44, 0x45,
1637 0x5c, 0xc1, 0xc2, 0xc0, 0x8c, 0x11, 0x34, 0xd9, 0x56,
1638 0xb8, 0xbc, 0x93, 0xb2, 0x8b, 0xe9, 0xc2, 0xd3, 0x32,
1639 0x2b, 0x3e, 0x09, 0x25, 0x29, 0x79, 0xdf, 0xb8, 0xd3,
1640 0x9d, 0x04, 0xc9, 0x4f, 0x81, 0xbe, 0xbd, 0xa5, 0xc7,
1641 0x31, 0x10, 0x60, 0x5a, 0x23, 0x7b, 0x56, 0x12, 0x16,
1642 0xbd, 0xa9, 0xee, 0x9b, 0xde, 0xe1, 0xcc, 0x0c, 0x77,
1643 0x28, 0xbc, 0xc8, 0x30, 0x46, 0x82, 0x33, 0x4c, 0xa9,
1644 0x44, 0xe4, 0x67, 0xa2, 0x7a, 0x85, 0x31, 0x3f, 0xa5,
1645 0x39, 0x5a, 0x9c, 0x79, 0x0e, 0x35, 0xde, 0xfd, 0x2e,
1646 0xdb, 0x12,
1647 }
1648 };
1649
1650 TC_PRINT(".");
1651 result = do_hmac_prng_pr_false_test(25, &vec);
1652
1653 return result;
1654 }
1655
test_26(void)1656 unsigned int test_26(void)
1657 {
1658 unsigned int result = TC_PASS;
1659 const struct hmac_prng_test_vector vec = {
1660 32,
1661 16,
1662 32,
1663 0,
1664 128,
1665 {
1666 0x9a, 0x61, 0x74, 0x16, 0x6e, 0x97, 0xaa, 0x49, 0x81,
1667 0xdd, 0xf5, 0x80, 0xbc, 0x01, 0xc9, 0x67, 0x54, 0xb9,
1668 0xf0, 0xba, 0x04, 0x27, 0x50, 0xaa, 0xbf, 0xda, 0x1c,
1669 0xff, 0xe5, 0x6e, 0x85, 0x81,
1670 },
1671 {
1672 0xd7, 0x51, 0x2f, 0xf6, 0xb7, 0xdb, 0x7c, 0xe1, 0x41,
1673 0xb2, 0xbb, 0x01, 0xdc, 0xd0, 0x42, 0x5e,
1674 },
1675 {
1676 0xed, 0x75, 0x28, 0x8f, 0x23, 0x27, 0x5f, 0x94, 0x22,
1677 0x44, 0x4d, 0xa5, 0xd3, 0xb5, 0x3c, 0xcb, 0x3c, 0x4a,
1678 0xc8, 0xac, 0xfb, 0x65, 0x9a, 0x1e, 0x9b, 0x76, 0x55,
1679 0xc2, 0xdb, 0x52, 0xf8, 0x79,
1680 },
1681 {
1682 0x68, 0x88, 0xb9, 0x27, 0x7e, 0x57, 0xdc, 0x57, 0x66,
1683 0x3d, 0x40, 0x2e, 0xba, 0x8d, 0x03, 0xcf, 0x56, 0xa0,
1684 0x70, 0xdc, 0x86, 0x8e, 0x6a, 0x12, 0x8b, 0x18, 0x04,
1685 0x00, 0x02, 0xba, 0xf6, 0x90,
1686 },
1687 {
1688 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1689 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1690 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1691 0x00, 0x00, 0x00, 0x00, 0x00,
1692 },
1693 {
1694 0x03, 0x51, 0x9d, 0xfb, 0x2f, 0xf8, 0x8c, 0xc2, 0xb5,
1695 0x3e, 0xec, 0xc4, 0x8a, 0xe2, 0xa1, 0x8d, 0xdc, 0xf9,
1696 0x1a, 0x5d, 0x69, 0xd5, 0xae, 0xfc, 0xdd, 0xa8, 0x44,
1697 0x4e, 0x6d, 0xf7, 0x90, 0xa5, 0x24, 0x0e, 0x67, 0xb2,
1698 0xa4, 0xde, 0x75, 0xb4, 0xbb, 0x8a, 0x31, 0xf0, 0xf8,
1699 0xae, 0xb5, 0xe7, 0x85, 0xff, 0xb7, 0xa1, 0x34, 0x1b,
1700 0xb5, 0x2f, 0xe0, 0x0a, 0x05, 0xee, 0x66, 0xfa, 0x2d,
1701 0x44, 0xea, 0x99, 0x56, 0xe0, 0x55, 0xf9, 0xff, 0xa6,
1702 0x64, 0x7c, 0x3b, 0xfe, 0x85, 0x1a, 0xb3, 0x64, 0xad,
1703 0xe7, 0x1a, 0x0d, 0x35, 0x6d, 0xe7, 0x10, 0xdd, 0xaf,
1704 0xb7, 0x62, 0x2b, 0x1d, 0xa1, 0xbc, 0x53, 0xfd, 0x4d,
1705 0x32, 0x10, 0x40, 0x72, 0x89, 0xc6, 0x8d, 0x8a, 0xeb,
1706 0x34, 0x6b, 0xf1, 0x58, 0x06, 0xdb, 0xe7, 0x87, 0xe7,
1707 0x81, 0xb9, 0x4f, 0x63, 0xda, 0x3e, 0x1f, 0x61, 0xb5,
1708 0xac, 0x60,
1709 }
1710 };
1711
1712 TC_PRINT(".");
1713 result = do_hmac_prng_pr_false_test(26, &vec);
1714
1715 return result;
1716 }
1717
test_27(void)1718 unsigned int test_27(void)
1719 {
1720 unsigned int result = TC_PASS;
1721 const struct hmac_prng_test_vector vec = {
1722 32,
1723 16,
1724 32,
1725 0,
1726 128,
1727 {
1728 0x9c, 0x6a, 0xe1, 0x00, 0x2e, 0xe1, 0xb0, 0xad, 0xd0,
1729 0xbe, 0x56, 0x3c, 0xe5, 0x0f, 0x89, 0x9d, 0xa9, 0x36,
1730 0xe1, 0x3e, 0xfa, 0x62, 0x0d, 0x08, 0xc2, 0x68, 0x8c,
1731 0x19, 0x25, 0x14, 0x76, 0x3a,
1732 },
1733 {
1734 0xfd, 0xe7, 0xdb, 0x51, 0x60, 0xc7, 0x30, 0x44, 0xbe,
1735 0x73, 0xe9, 0xd4, 0xc1, 0xb2, 0x2d, 0x86,
1736 },
1737 {
1738 0x8f, 0xda, 0xae, 0xff, 0xd6, 0x4e, 0x53, 0xf7, 0xb4,
1739 0x37, 0x4d, 0x90, 0x2d, 0x44, 0x12, 0x09, 0x96, 0x4e,
1740 0x12, 0xb6, 0x5d, 0x29, 0xaf, 0xec, 0x25, 0x8e, 0x65,
1741 0xdb, 0x6d, 0xe1, 0x67, 0xca,
1742 },
1743 {
1744 0xbc, 0xc2, 0x8f, 0xd5, 0x8e, 0x39, 0x7f, 0x53, 0xf4,
1745 0x94, 0xad, 0x81, 0x32, 0xdf, 0x82, 0xc5, 0xd8, 0xc4,
1746 0xc2, 0x2e, 0xa0, 0xb7, 0x13, 0x9b, 0xd8, 0x1e, 0xeb,
1747 0xa6, 0x56, 0x67, 0xbb, 0x69,
1748 },
1749 {
1750 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1751 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1752 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1753 0x00, 0x00, 0x00, 0x00, 0x00,
1754 },
1755 {
1756 0x02, 0x1d, 0x93, 0x8c, 0x9b, 0x4d, 0xb7, 0x80, 0xc7,
1757 0xd8, 0x13, 0x4a, 0xef, 0xf1, 0x05, 0x3e, 0x5b, 0x88,
1758 0x43, 0x37, 0x0b, 0x8a, 0xe9, 0xa6, 0x74, 0x9f, 0xca,
1759 0x71, 0x99, 0xd8, 0x09, 0x81, 0x0f, 0x1b, 0xc8, 0xdf,
1760 0xa4, 0x94, 0x26, 0x47, 0x0c, 0x30, 0xc3, 0x61, 0x6f,
1761 0x90, 0x3e, 0x35, 0xfb, 0xac, 0xb2, 0x34, 0x20, 0xa3,
1762 0x2f, 0x1b, 0xee, 0x56, 0x7c, 0xc3, 0x23, 0x00, 0xf7,
1763 0x04, 0x24, 0x6d, 0xdc, 0x02, 0x17, 0xf2, 0x36, 0xef,
1764 0x52, 0xc3, 0xec, 0x9e, 0x24, 0x33, 0xca, 0x66, 0xf0,
1765 0x5c, 0x25, 0x72, 0x1f, 0x76, 0x61, 0xc4, 0x3f, 0x22,
1766 0xc1, 0xa1, 0x25, 0xed, 0x5d, 0xb5, 0x31, 0xbd, 0x08,
1767 0x36, 0xeb, 0x43, 0x5c, 0x27, 0xee, 0xfc, 0x74, 0x24,
1768 0xce, 0x9d, 0x84, 0x5e, 0x1d, 0x4c, 0xc4, 0xc5, 0x03,
1769 0x09, 0x7b, 0x4f, 0xfc, 0xa7, 0x88, 0xe6, 0x74, 0xa5,
1770 0xcb, 0x53,
1771 }
1772 };
1773
1774 TC_PRINT(".");
1775 result = do_hmac_prng_pr_false_test(27, &vec);
1776
1777 return result;
1778 }
1779
test_28(void)1780 unsigned int test_28(void)
1781 {
1782 unsigned int result = TC_PASS;
1783 const struct hmac_prng_test_vector vec = {
1784 32,
1785 16,
1786 32,
1787 0,
1788 128,
1789 {
1790 0xfe, 0x96, 0xa8, 0x5b, 0x69, 0xd4, 0x6b, 0x54, 0x09,
1791 0x18, 0x92, 0x7b, 0xb6, 0x09, 0xdc, 0x57, 0x64, 0x2e,
1792 0xea, 0xef, 0xd4, 0x6b, 0xb5, 0xda, 0x21, 0x63, 0xa0,
1793 0xbc, 0x60, 0x29, 0x4b, 0x58,
1794 },
1795 {
1796 0x22, 0x19, 0x5a, 0x41, 0x0d, 0x24, 0xdb, 0x45, 0x58,
1797 0x94, 0x48, 0xdf, 0xe9, 0x79, 0xd3, 0xfd,
1798 },
1799 {
1800 0x20, 0xf6, 0x98, 0x83, 0x3a, 0x44, 0x72, 0xfd, 0x7b,
1801 0x78, 0xfb, 0x9b, 0x0c, 0x4e, 0xb6, 0x86, 0x04, 0xf1,
1802 0x66, 0xa2, 0x69, 0x4c, 0x4a, 0xf4, 0x8d, 0xac, 0x2b,
1803 0x23, 0x76, 0x79, 0x0e, 0x1e,
1804 },
1805 {
1806 0x09, 0xcb, 0x87, 0x08, 0x79, 0xd3, 0xf7, 0x34, 0x21,
1807 0x4f, 0x6a, 0x4b, 0xd2, 0xe0, 0x8c, 0x62, 0xa2, 0xa9,
1808 0x54, 0xbe, 0xbe, 0x55, 0x94, 0x16, 0xd8, 0xc3, 0x55,
1809 0x1a, 0xaf, 0xe7, 0x1d, 0x6a,
1810 },
1811 {
1812 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1813 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1814 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1815 0x00, 0x00, 0x00, 0x00, 0x00,
1816 },
1817 {
1818 0xd3, 0xe9, 0x6d, 0xbe, 0x29, 0xe1, 0xfc, 0xb8, 0xed,
1819 0x83, 0xb1, 0x9d, 0xbf, 0xb2, 0x40, 0xe6, 0xf4, 0x16,
1820 0x79, 0xfb, 0xe8, 0x38, 0x53, 0xaa, 0x71, 0x44, 0x66,
1821 0x17, 0xe6, 0x3e, 0x5a, 0xf7, 0x8c, 0xf9, 0x8b, 0x33,
1822 0x1d, 0x15, 0xbc, 0xcb, 0x8c, 0x67, 0x3c, 0x4e, 0x5d,
1823 0x5d, 0xce, 0xc4, 0x67, 0xa1, 0xfe, 0x26, 0xa6, 0xcd,
1824 0x16, 0x96, 0xd0, 0xc9, 0xbc, 0x49, 0xf7, 0x81, 0x39,
1825 0xd0, 0x51, 0x28, 0x7d, 0xf7, 0xf3, 0xae, 0x0d, 0xbb,
1826 0x4b, 0xbf, 0x58, 0x1c, 0xb8, 0x21, 0x19, 0x31, 0x06,
1827 0x3c, 0x3f, 0x46, 0x12, 0xce, 0xd5, 0x3f, 0x59, 0xd1,
1828 0xb4, 0xeb, 0xb8, 0x75, 0x72, 0x91, 0x39, 0xf5, 0xd2,
1829 0xa7, 0xd6, 0x06, 0x42, 0xe8, 0xf2, 0x83, 0x5e, 0xed,
1830 0x88, 0x8b, 0x7e, 0x3e, 0x49, 0xc0, 0xdf, 0xfd, 0x01,
1831 0x2c, 0xd7, 0x46, 0xab, 0xfa, 0x3e, 0x1c, 0x5c, 0x23,
1832 0x08, 0xc6,
1833 }
1834 };
1835
1836 TC_PRINT(".");
1837 result = do_hmac_prng_pr_false_test(28, &vec);
1838
1839 return result;
1840 }
1841
test_29(void)1842 unsigned int test_29(void)
1843 {
1844 unsigned int result = TC_PASS;
1845 const struct hmac_prng_test_vector vec = {
1846 32,
1847 16,
1848 32,
1849 0,
1850 128,
1851 {
1852 0xa4, 0xfd, 0x69, 0x3f, 0xf0, 0xa8, 0xaf, 0x24, 0xbc,
1853 0xec, 0x35, 0x2d, 0x31, 0x96, 0x54, 0x9f, 0xd0, 0xda,
1854 0x5e, 0xe5, 0xd9, 0x9c, 0xa5, 0x84, 0x16, 0xca, 0x03,
1855 0xce, 0x4c, 0x50, 0xf3, 0x8e,
1856 },
1857 {
1858 0x8c, 0xd6, 0x7f, 0x2b, 0xf7, 0x1d, 0x43, 0x66, 0xce,
1859 0x61, 0x39, 0x66, 0x42, 0x53, 0x1f, 0xf5,
1860 },
1861 {
1862 0x36, 0x89, 0x69, 0xc1, 0x5a, 0x48, 0x49, 0xd7, 0x59,
1863 0x3b, 0xe8, 0xb1, 0x62, 0x11, 0x3b, 0x92, 0x98, 0xa5,
1864 0x35, 0xc1, 0x48, 0xff, 0x66, 0x8a, 0x9e, 0x8b, 0x14,
1865 0x7f, 0xb3, 0xaf, 0x4e, 0xba,
1866 },
1867 {
1868 0x83, 0xd2, 0xbe, 0x9a, 0x0d, 0x74, 0xe6, 0xa4, 0x21,
1869 0x59, 0xae, 0x63, 0x0a, 0xce, 0xbf, 0x4e, 0x15, 0x27,
1870 0x1e, 0xf7, 0xf1, 0x4f, 0x3d, 0xe1, 0x47, 0x52, 0xbe,
1871 0x0e, 0x0e, 0x82, 0x2b, 0x11,
1872 },
1873 {
1874 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1875 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1876 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1877 0x00, 0x00, 0x00, 0x00, 0x00,
1878 },
1879 {
1880 0xe9, 0x18, 0x8f, 0xc0, 0xea, 0xec, 0x74, 0xb2, 0x60,
1881 0x8e, 0x21, 0xe3, 0xa4, 0x0b, 0xe9, 0x4a, 0xaf, 0x4a,
1882 0xe0, 0x8e, 0xb6, 0x84, 0xde, 0x8f, 0x8b, 0xba, 0x2d,
1883 0x5f, 0xd3, 0xb0, 0x73, 0xaa, 0x55, 0x31, 0xc9, 0x38,
1884 0xc0, 0xfc, 0x62, 0x8d, 0xa6, 0x57, 0x25, 0xc5, 0x4b,
1885 0x5c, 0x68, 0xbb, 0x91, 0xd7, 0xd3, 0x26, 0x56, 0x5e,
1886 0x96, 0x68, 0x5e, 0x0a, 0x4e, 0x7b, 0x22, 0x0c, 0x50,
1887 0xe0, 0xca, 0xf1, 0x62, 0x8e, 0xdb, 0xa5, 0xbd, 0x75,
1888 0x5b, 0x31, 0x89, 0x4f, 0x8c, 0xb9, 0x0a, 0xfa, 0x76,
1889 0xe8, 0x8c, 0x5e, 0xb9, 0xe6, 0x1b, 0x49, 0x32, 0x44,
1890 0x4c, 0x13, 0x97, 0xde, 0xe3, 0xe3, 0x22, 0x41, 0xa3,
1891 0xfb, 0x70, 0xa3, 0x92, 0x9e, 0x49, 0xf6, 0xda, 0x02,
1892 0xee, 0xa5, 0x48, 0x12, 0xab, 0xb3, 0xd6, 0xb5, 0xce,
1893 0xe1, 0x8f, 0x03, 0xaf, 0x1e, 0x0b, 0x49, 0x58, 0x43,
1894 0x0a, 0xb3,
1895 }
1896 };
1897
1898 TC_PRINT(".");
1899 result = do_hmac_prng_pr_false_test(29, &vec);
1900
1901 return result;
1902 }
1903
test_30(void)1904 unsigned int test_30(void)
1905 {
1906 unsigned int result = TC_PASS;
1907 const struct hmac_prng_test_vector vec = {
1908 32,
1909 16,
1910 32,
1911 0,
1912 128,
1913 {
1914 0x25, 0x4f, 0xf5, 0x68, 0x7a, 0x6d, 0xad, 0x3f, 0x1d,
1915 0x23, 0x7d, 0xc7, 0x62, 0xf5, 0x8d, 0x24, 0xef, 0x2e,
1916 0x2c, 0x08, 0x4d, 0x0a, 0x48, 0xd2, 0x6a, 0x3d, 0xc8,
1917 0x1e, 0x54, 0x90, 0xcd, 0xa3,
1918 },
1919 {
1920 0xf2, 0xec, 0x39, 0x2a, 0xcc, 0xa4, 0x91, 0xe0, 0x3c,
1921 0xe4, 0x7b, 0x95, 0x96, 0x3a, 0x49, 0xfc,
1922 },
1923 {
1924 0xf8, 0x06, 0xb9, 0xb4, 0xa5, 0x66, 0x82, 0xc6, 0x1b,
1925 0x55, 0xcb, 0x6a, 0x33, 0x4c, 0xaf, 0x87, 0xff, 0xe1,
1926 0x35, 0xad, 0xfe, 0xa6, 0xd0, 0xc3, 0xfc, 0x22, 0xb3,
1927 0x98, 0x98, 0xfb, 0xd0, 0x78,
1928 },
1929 {
1930 0xb8, 0x49, 0x4b, 0x1c, 0x1f, 0x17, 0x52, 0xfb, 0x6f,
1931 0x80, 0xd7, 0x32, 0xa8, 0x9b, 0x08, 0x11, 0x58, 0x57,
1932 0xf7, 0xcc, 0x96, 0xe7, 0xdf, 0xf0, 0x5e, 0xbb, 0x82,
1933 0x27, 0x06, 0x88, 0x99, 0x17,
1934 },
1935 {
1936 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1937 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1938 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1939 0x00, 0x00, 0x00, 0x00, 0x00,
1940 },
1941 {
1942 0x0e, 0x52, 0x7e, 0x00, 0x49, 0x4d, 0x55, 0x56, 0x4f,
1943 0x9d, 0x9b, 0x28, 0xe7, 0x11, 0x0f, 0x9a, 0x61, 0xce,
1944 0x36, 0xc8, 0x83, 0xb5, 0xbe, 0x2d, 0xcb, 0x05, 0x54,
1945 0x44, 0x16, 0x4c, 0xdd, 0xdd, 0x1a, 0x9f, 0x27, 0x31,
1946 0x71, 0x6f, 0x22, 0xd6, 0xff, 0x47, 0x6c, 0xe4, 0x13,
1947 0xc7, 0x7a, 0xbf, 0xc0, 0xe9, 0x46, 0x87, 0x1d, 0x54,
1948 0x81, 0x34, 0x5c, 0x2e, 0x97, 0xb4, 0xbf, 0xdd, 0x12,
1949 0xac, 0x03, 0xdf, 0x60, 0x6f, 0xc5, 0x6b, 0xdb, 0x99,
1950 0xac, 0x7b, 0x71, 0xa6, 0x9b, 0x5b, 0x91, 0x60, 0x37,
1951 0x3b, 0xbe, 0xc3, 0xe9, 0xdd, 0xe4, 0x77, 0x18, 0x0a,
1952 0xf4, 0x54, 0xe7, 0xac, 0xc6, 0xbc, 0x58, 0xdc, 0x0a,
1953 0xfb, 0x42, 0x81, 0xc0, 0xde, 0x43, 0x54, 0xc1, 0xbf,
1954 0x59, 0x90, 0x54, 0xe3, 0x80, 0x0c, 0x6d, 0x60, 0xd8,
1955 0x92, 0x85, 0x88, 0x65, 0xb5, 0x36, 0x1f, 0x50, 0xbf,
1956 0xca, 0x9b,
1957 }
1958 };
1959
1960 TC_PRINT(".");
1961 result = do_hmac_prng_pr_false_test(30, &vec);
1962
1963 return result;
1964 }
1965
test_31(void)1966 unsigned int test_31(void)
1967 {
1968 unsigned int result = TC_PASS;
1969 const struct hmac_prng_test_vector vec = {
1970 32,
1971 16,
1972 0,
1973 0,
1974 128,
1975 {
1976 0xff, 0x0c, 0xdd, 0x55, 0x5c, 0x60, 0x46, 0x47, 0x60,
1977 0xb2, 0x89, 0xb7, 0xbc, 0x1f, 0x81, 0x1a, 0x41, 0xff,
1978 0xf7, 0x2d, 0xe5, 0x90, 0x83, 0x85, 0x8c, 0x02, 0x0a,
1979 0x10, 0x53, 0xbd, 0xc7, 0x4a,
1980 },
1981 {
1982 0x7b, 0xc0, 0x99, 0x28, 0x5a, 0xd5, 0x62, 0x19, 0x93,
1983 0xb6, 0x39, 0xc4, 0xa9, 0x4c, 0x37, 0x6b,
1984 },
1985 {
1986 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1987 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1988 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1989 0x00, 0x00, 0x00, 0x00, 0x00,
1990 },
1991 {
1992 0x14, 0xfc, 0x6c, 0x9b, 0x17, 0x8d, 0xb6, 0x44, 0xa8,
1993 0xcd, 0x71, 0x30, 0xa4, 0xcf, 0x05, 0x16, 0x78, 0xc8,
1994 0xf4, 0xfa, 0x8f, 0x24, 0xc2, 0x7b, 0x0a, 0x53, 0x13,
1995 0x38, 0xa5, 0xce, 0x85, 0x89,
1996 },
1997 {
1998 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1999 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2000 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2001 0x00, 0x00, 0x00, 0x00, 0x00,
2002 },
2003 {
2004 0x2f, 0x26, 0x20, 0x34, 0x7b, 0xdd, 0xca, 0xa2, 0x94,
2005 0x36, 0x85, 0x34, 0x6b, 0xbf, 0x31, 0xc4, 0x40, 0x81,
2006 0xf8, 0x66, 0x5f, 0x3d, 0xdb, 0x2b, 0x42, 0xae, 0x14,
2007 0x16, 0xa7, 0x4c, 0x4b, 0x77, 0xfa, 0xb3, 0xfa, 0x19,
2008 0xae, 0xec, 0xc5, 0x47, 0xe7, 0x6c, 0x8c, 0xbe, 0x6a,
2009 0xd1, 0xf1, 0x00, 0xa3, 0xfc, 0x8b, 0x2c, 0xe2, 0xa1,
2010 0xea, 0x3a, 0x3d, 0xd7, 0xcf, 0xad, 0x46, 0xc1, 0xb2,
2011 0x78, 0x30, 0xb9, 0x40, 0xba, 0x18, 0xd0, 0x9e, 0x9b,
2012 0x7f, 0xa9, 0x02, 0xbb, 0x76, 0x06, 0x69, 0xb1, 0x73,
2013 0x5c, 0xc7, 0xb7, 0xbd, 0x39, 0x05, 0x2d, 0xa7, 0xf2,
2014 0x62, 0x6f, 0xa8, 0x70, 0x00, 0xcf, 0xfa, 0xda, 0x41,
2015 0x00, 0x19, 0xd0, 0x53, 0x38, 0x6a, 0xd8, 0x08, 0xbd,
2016 0x3c, 0x0c, 0xfc, 0xf5, 0x6b, 0x91, 0x87, 0x9e, 0xb8,
2017 0xd3, 0xf9, 0x32, 0xee, 0x2d, 0x18, 0x5e, 0x54, 0xf3,
2018 0x1b, 0x74,
2019 }
2020 };
2021
2022 TC_PRINT(".");
2023 result = do_hmac_prng_pr_false_test(31, &vec);
2024
2025 return result;
2026 }
2027
test_32(void)2028 unsigned int test_32(void)
2029 {
2030 unsigned int result = TC_PASS;
2031 const struct hmac_prng_test_vector vec = {
2032 32,
2033 16,
2034 0,
2035 0,
2036 128,
2037 {
2038 0xf6, 0x1b, 0x9a, 0x29, 0x3d, 0x18, 0x95, 0x2c, 0x74,
2039 0x65, 0xa5, 0x11, 0x38, 0x2c, 0x03, 0x1b, 0x86, 0x0b,
2040 0xcc, 0x85, 0x86, 0xa7, 0xec, 0x99, 0xd7, 0x52, 0x3e,
2041 0xad, 0x8a, 0xca, 0xd0, 0xcb,
2042 },
2043 {
2044 0xe3, 0x32, 0xa1, 0x0e, 0x88, 0xf0, 0x0d, 0x95, 0x1d,
2045 0xdf, 0xd4, 0xc7, 0xb0, 0xb5, 0x96, 0x58,
2046 },
2047 {
2048 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2049 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2050 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2051 0x00, 0x00, 0x00, 0x00, 0x00,
2052 },
2053 {
2054 0x10, 0xf2, 0x3a, 0xfe, 0xbe, 0x72, 0x60, 0x93, 0xde,
2055 0x81, 0x70, 0x03, 0x6a, 0x9f, 0x69, 0x4e, 0x80, 0x84,
2056 0xc0, 0x9c, 0x6e, 0x62, 0x0e, 0x98, 0xbb, 0x45, 0xf1,
2057 0x6e, 0xe5, 0x60, 0x31, 0xce,
2058 },
2059 {
2060 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2061 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2062 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2063 0x00, 0x00, 0x00, 0x00, 0x00,
2064 },
2065 {
2066 0xd3, 0x43, 0x84, 0x89, 0x3e, 0xf4, 0xcb, 0x3e, 0x42,
2067 0x38, 0x6a, 0x42, 0xef, 0xbd, 0xce, 0x46, 0x7c, 0xd4,
2068 0x11, 0xa7, 0x6e, 0x6a, 0x32, 0xe1, 0xd6, 0x34, 0xa5,
2069 0xa3, 0x67, 0x0a, 0x95, 0x97, 0x39, 0x85, 0x85, 0x1b,
2070 0x5f, 0x36, 0x9a, 0x1b, 0xe6, 0x5a, 0xdd, 0x3e, 0xd6,
2071 0x1f, 0x7c, 0x6a, 0x11, 0x98, 0x64, 0x85, 0xb7, 0xe1,
2072 0x6b, 0x57, 0x26, 0x3e, 0xed, 0x71, 0xff, 0xc5, 0xa8,
2073 0x97, 0x56, 0xcb, 0x42, 0xb7, 0xbd, 0xfd, 0xf9, 0x2b,
2074 0x2e, 0x31, 0xc3, 0x6b, 0x4d, 0x7b, 0x7c, 0xbd, 0x2e,
2075 0x65, 0x0c, 0xcb, 0xd6, 0xc0, 0xb5, 0xdf, 0xc9, 0x5c,
2076 0xd8, 0x93, 0x7e, 0xf1, 0xe8, 0xeb, 0xc7, 0x1a, 0x04,
2077 0xcf, 0x33, 0xc3, 0x98, 0xf7, 0xf9, 0x08, 0x6f, 0x0b,
2078 0xae, 0x57, 0xee, 0x9a, 0xf8, 0xf9, 0x3f, 0x3b, 0x8e,
2079 0xc1, 0xc9, 0x81, 0x69, 0x17, 0xf6, 0x99, 0xd8, 0xf4,
2080 0x32, 0x72,
2081 }
2082 };
2083
2084 TC_PRINT(".");
2085 result = do_hmac_prng_pr_false_test(32, &vec);
2086
2087 return result;
2088 }
2089
test_33(void)2090 unsigned int test_33(void)
2091 {
2092 unsigned int result = TC_PASS;
2093 const struct hmac_prng_test_vector vec = {
2094 32,
2095 16,
2096 0,
2097 0,
2098 128,
2099 {
2100 0x1b, 0x6b, 0x52, 0xb7, 0xba, 0x19, 0xc2, 0x6e, 0x62,
2101 0xbd, 0x0a, 0xc9, 0xb2, 0x33, 0xbc, 0xf0, 0x04, 0xbb,
2102 0xc9, 0xfd, 0x9e, 0x1e, 0x73, 0x7c, 0xcf, 0x88, 0x4a,
2103 0x76, 0x08, 0x29, 0xcd, 0x10,
2104 },
2105 {
2106 0xd3, 0x81, 0xc8, 0xbe, 0x20, 0x32, 0x74, 0xf1, 0x76,
2107 0x69, 0x18, 0xb4, 0x5e, 0x08, 0xdd, 0xc6,
2108 },
2109 {
2110 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2111 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2112 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2113 0x00, 0x00, 0x00, 0x00, 0x00,
2114 },
2115 {
2116 0x2f, 0x50, 0x4e, 0xb2, 0x9f, 0x8e, 0xc0, 0x70, 0x4f,
2117 0x07, 0x0b, 0x59, 0xc0, 0x20, 0x76, 0xf4, 0xa4, 0xe5,
2118 0xc8, 0xe7, 0xb6, 0x45, 0x68, 0xb2, 0x2c, 0x5f, 0xf5,
2119 0xba, 0xe1, 0x96, 0xd5, 0xeb,
2120 },
2121 {
2122 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2123 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2124 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2125 0x00, 0x00, 0x00, 0x00, 0x00,
2126 },
2127 {
2128 0xa4, 0x15, 0x00, 0xfc, 0x54, 0xcc, 0xf5, 0x49, 0xfe,
2129 0x21, 0xb3, 0x69, 0x34, 0x28, 0xe0, 0x3c, 0xcd, 0xff,
2130 0xbf, 0x42, 0xff, 0x79, 0x0d, 0x47, 0xdf, 0xf3, 0x4f,
2131 0xd8, 0x8f, 0xce, 0x01, 0xaf, 0xd4, 0x9a, 0x26, 0xd3,
2132 0x00, 0xad, 0x66, 0xa3, 0x4c, 0xd3, 0xd1, 0xae, 0xc7,
2133 0x3d, 0xd0, 0x02, 0xdc, 0x83, 0xc1, 0xb8, 0x6c, 0x43,
2134 0x2d, 0x72, 0x17, 0x66, 0xfb, 0x90, 0x36, 0x61, 0x30,
2135 0xa3, 0xa2, 0x88, 0x88, 0xa6, 0x3a, 0x5d, 0x0b, 0x8b,
2136 0xef, 0xa8, 0x95, 0x61, 0x1c, 0x25, 0xbf, 0xa8, 0x81,
2137 0x75, 0x36, 0xeb, 0x0b, 0x20, 0xb9, 0x98, 0x2c, 0x7d,
2138 0x97, 0x6f, 0x47, 0x07, 0x56, 0x3b, 0x16, 0xb4, 0x9c,
2139 0xcb, 0xd4, 0x35, 0xcf, 0x04, 0x9b, 0x6a, 0x6e, 0x11,
2140 0xdf, 0x12, 0xe5, 0xfa, 0xf0, 0xd2, 0x0f, 0xc9, 0xde,
2141 0xab, 0x39, 0x5a, 0xc6, 0x93, 0x03, 0x60, 0x1b, 0xa3,
2142 0x1f, 0xe3,
2143 }
2144 };
2145
2146 TC_PRINT(".");
2147 result = do_hmac_prng_pr_false_test(33, &vec);
2148
2149 return result;
2150 }
2151
test_34(void)2152 unsigned int test_34(void)
2153 {
2154 unsigned int result = TC_PASS;
2155 const struct hmac_prng_test_vector vec = {
2156 32,
2157 16,
2158 0,
2159 0,
2160 128,
2161 {
2162 0x36, 0x36, 0x7f, 0xa9, 0x73, 0xaa, 0x4e, 0x2e, 0xc7,
2163 0xbc, 0xef, 0x33, 0x99, 0x00, 0xdd, 0x95, 0x94, 0x16,
2164 0xbd, 0x63, 0xe7, 0x46, 0xaa, 0x3c, 0x14, 0xa9, 0xb6,
2165 0x6e, 0x83, 0x8f, 0xc7, 0x80,
2166 },
2167 {
2168 0xfb, 0xa0, 0x71, 0x24, 0xe6, 0xd5, 0x7f, 0x3c, 0x81,
2169 0xba, 0x59, 0x6d, 0x25, 0x6e, 0x43, 0x3c,
2170 },
2171 {
2172 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2173 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2174 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2175 0x00, 0x00, 0x00, 0x00, 0x00,
2176 },
2177 {
2178 0xf3, 0x0b, 0xd1, 0x1a, 0x1f, 0x2b, 0xc9, 0x7d, 0xd8,
2179 0xd4, 0x82, 0x9f, 0x75, 0xd5, 0x9d, 0x55, 0x77, 0xe7,
2180 0x26, 0x82, 0x5e, 0x23, 0x64, 0xd2, 0x04, 0xe9, 0x07,
2181 0x7d, 0xf4, 0x8f, 0x65, 0xa9,
2182 },
2183 {
2184 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2185 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2186 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2187 0x00, 0x00, 0x00, 0x00, 0x00,
2188 },
2189 {
2190 0x6a, 0x5b, 0xdf, 0xdf, 0x37, 0x31, 0x9c, 0x2e, 0x6b,
2191 0xd2, 0xbc, 0x44, 0x93, 0x84, 0x55, 0xe0, 0x3a, 0x2e,
2192 0x83, 0x0b, 0x23, 0xee, 0x8e, 0xbd, 0x6f, 0x98, 0x2f,
2193 0xf8, 0x38, 0xb4, 0x99, 0xd6, 0xd3, 0x7b, 0x44, 0xef,
2194 0x0a, 0x59, 0x41, 0xba, 0x42, 0xfe, 0x02, 0x45, 0xe6,
2195 0x4b, 0x28, 0xee, 0x1a, 0x2f, 0xa3, 0xe8, 0xd2, 0x24,
2196 0x69, 0xce, 0xb4, 0xc6, 0xf6, 0x75, 0x62, 0x9c, 0x3c,
2197 0x6a, 0xbf, 0x61, 0xaa, 0xb6, 0xb1, 0xe8, 0x87, 0xc8,
2198 0xcf, 0x66, 0x44, 0x80, 0x3f, 0x5d, 0x51, 0x16, 0xbe,
2199 0x11, 0xff, 0x42, 0x69, 0x8d, 0x42, 0xac, 0x36, 0x86,
2200 0x80, 0x70, 0x36, 0xf5, 0x1a, 0xf4, 0xae, 0x34, 0x4a,
2201 0x36, 0x5e, 0x8a, 0xd8, 0xeb, 0xc3, 0xa6, 0x23, 0xde,
2202 0x1b, 0xcc, 0x68, 0xe0, 0x64, 0xd9, 0xfa, 0x82, 0xb6,
2203 0xc8, 0x0f, 0xb0, 0x57, 0x00, 0x60, 0xbc, 0x58, 0xe8,
2204 0x7e, 0xbd,
2205 }
2206 };
2207
2208 TC_PRINT(".");
2209 result = do_hmac_prng_pr_false_test(34, &vec);
2210
2211 return result;
2212 }
2213
test_35(void)2214 unsigned int test_35(void)
2215 {
2216 unsigned int result = TC_PASS;
2217 const struct hmac_prng_test_vector vec = {
2218 32,
2219 16,
2220 0,
2221 0,
2222 128,
2223 {
2224 0x24, 0x85, 0xcf, 0xc6, 0x15, 0xd7, 0xfa, 0xb6, 0x0f,
2225 0x46, 0x57, 0xe4, 0x70, 0xc8, 0x12, 0x1e, 0xdd, 0x6b,
2226 0xc1, 0xfa, 0x22, 0x47, 0xb2, 0x05, 0xce, 0x40, 0x40,
2227 0xee, 0x13, 0xc3, 0x6f, 0x17,
2228 },
2229 {
2230 0x08, 0x7e, 0x6b, 0x4b, 0xf1, 0xe7, 0x75, 0xa4, 0xc9,
2231 0xf1, 0x82, 0xdf, 0x61, 0x80, 0x13, 0x43,
2232 },
2233 {
2234 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2235 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2236 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2237 0x00, 0x00, 0x00, 0x00, 0x00,
2238 },
2239 {
2240 0x9a, 0xee, 0x0e, 0xbe, 0xd8, 0xda, 0xf7, 0x03, 0x36,
2241 0x0a, 0xa1, 0xfa, 0x2e, 0x17, 0xfa, 0xc6, 0xb7, 0x94,
2242 0x5a, 0xc4, 0x5c, 0xda, 0xaa, 0xcb, 0xcc, 0x9f, 0xce,
2243 0x22, 0xd2, 0x8c, 0x0d, 0x1d,
2244 },
2245 {
2246 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2247 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2248 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2249 0x00, 0x00, 0x00, 0x00, 0x00,
2250 },
2251 {
2252 0xca, 0x4e, 0x2c, 0x4b, 0x63, 0xbb, 0x7f, 0x08, 0x43,
2253 0x8b, 0x82, 0x5c, 0xde, 0xb6, 0xa8, 0x83, 0xa2, 0xca,
2254 0xf3, 0x0d, 0xdb, 0xcc, 0xeb, 0x05, 0xc9, 0x1d, 0x37,
2255 0xc0, 0x56, 0x76, 0xf6, 0x3c, 0xc4, 0xde, 0x0b, 0xd6,
2256 0x80, 0xa8, 0x21, 0xa9, 0x95, 0x56, 0x4e, 0xcd, 0x12,
2257 0xe5, 0x4f, 0xc0, 0x56, 0xa3, 0x9e, 0x4e, 0xc5, 0xfe,
2258 0x33, 0x73, 0xb4, 0xd6, 0x62, 0x04, 0x02, 0xb6, 0xa5,
2259 0x37, 0x76, 0x2f, 0x95, 0xa2, 0xd4, 0x90, 0x95, 0x81,
2260 0xc8, 0x98, 0x5d, 0xf8, 0x01, 0xc7, 0x2f, 0x32, 0x23,
2261 0xbd, 0x94, 0x67, 0x96, 0xac, 0x71, 0xdc, 0x8f, 0xc1,
2262 0xb2, 0x83, 0x8e, 0xa5, 0xaa, 0x68, 0x64, 0x49, 0x08,
2263 0xcc, 0x74, 0xcd, 0x81, 0x84, 0x86, 0x1b, 0x88, 0x94,
2264 0xe0, 0x74, 0x92, 0x2e, 0x85, 0xa5, 0xe2, 0x58, 0xfb,
2265 0x6e, 0xd3, 0xec, 0x10, 0xe3, 0xff, 0xe2, 0x40, 0xb6,
2266 0x73, 0x8c,
2267 }
2268 };
2269
2270 TC_PRINT(".");
2271 result = do_hmac_prng_pr_false_test(35, &vec);
2272
2273 return result;
2274 }
2275
test_36(void)2276 unsigned int test_36(void)
2277 {
2278 unsigned int result = TC_PASS;
2279 const struct hmac_prng_test_vector vec = {
2280 32,
2281 16,
2282 0,
2283 0,
2284 128,
2285 {
2286 0xd1, 0x09, 0xe7, 0x55, 0xa7, 0x25, 0xc9, 0x64, 0x8d,
2287 0x33, 0x71, 0xff, 0xbf, 0x2c, 0xe0, 0x80, 0x45, 0xd1,
2288 0x71, 0x75, 0xbb, 0x1e, 0x77, 0x7a, 0xaa, 0x73, 0xfc,
2289 0x6f, 0x9e, 0xc2, 0xac, 0xf6,
2290 },
2291 {
2292 0xc1, 0x42, 0xf6, 0xe0, 0x4d, 0xc8, 0x87, 0xd0, 0x2d,
2293 0x57, 0xb1, 0xc2, 0x7c, 0x1c, 0x77, 0xae,
2294 },
2295 {
2296 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2297 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2298 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2299 0x00, 0x00, 0x00, 0x00, 0x00,
2300 },
2301 {
2302 0x09, 0x1f, 0xd9, 0xe5, 0xb5, 0xb7, 0x41, 0x5f, 0x87,
2303 0x3f, 0x2c, 0xb1, 0xe5, 0x54, 0xea, 0xbd, 0xd9, 0x1f,
2304 0x96, 0xb6, 0x84, 0xc1, 0x0c, 0xd0, 0x02, 0x4f, 0xb3,
2305 0x2e, 0x48, 0x1d, 0x4c, 0xb0,
2306 },
2307 {
2308 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2309 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2310 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2311 0x00, 0x00, 0x00, 0x00, 0x00,
2312 },
2313 {
2314 0x1d, 0x6f, 0xd5, 0x0a, 0x84, 0x38, 0x69, 0xbb, 0x8a,
2315 0x9b, 0x83, 0xcc, 0xb4, 0xd1, 0x00, 0xaf, 0x18, 0xee,
2316 0xfc, 0xbd, 0xcb, 0x98, 0xaf, 0xa2, 0x73, 0x73, 0x7c,
2317 0x68, 0x7b, 0x50, 0x40, 0x22, 0x73, 0xb9, 0x88, 0x6c,
2318 0xa1, 0x32, 0x0e, 0xca, 0x2c, 0x55, 0x8e, 0xd2, 0x64,
2319 0xa4, 0x2e, 0x02, 0xe1, 0xa7, 0xdc, 0xbc, 0xa2, 0x67,
2320 0xa3, 0x85, 0xdc, 0x70, 0xd6, 0xe1, 0x5a, 0xc4, 0x27,
2321 0x6a, 0x6a, 0xd5, 0x91, 0x07, 0xd6, 0x3b, 0x2d, 0x07,
2322 0x73, 0x91, 0xee, 0xe7, 0x62, 0xd9, 0xfb, 0xe2, 0x29,
2323 0x46, 0xc7, 0xd6, 0xe3, 0x75, 0x78, 0xd4, 0xdd, 0xcc,
2324 0xfa, 0xe9, 0x78, 0x96, 0x28, 0xa6, 0x05, 0x37, 0xa3,
2325 0x93, 0x3c, 0xf7, 0xcf, 0xcb, 0x12, 0x71, 0xa2, 0x92,
2326 0x15, 0x99, 0x1b, 0xd3, 0x41, 0xdf, 0xf3, 0x9b, 0x2c,
2327 0x9b, 0x6c, 0x24, 0x3a, 0x03, 0xdd, 0xde, 0x0b, 0x73,
2328 0xff, 0xb1,
2329 }
2330 };
2331
2332 TC_PRINT(".");
2333 result = do_hmac_prng_pr_false_test(36, &vec);
2334
2335 return result;
2336 }
2337
test_37(void)2338 unsigned int test_37(void)
2339 {
2340 unsigned int result = TC_PASS;
2341 const struct hmac_prng_test_vector vec = {
2342 32,
2343 16,
2344 0,
2345 0,
2346 128,
2347 {
2348 0x8b, 0xc4, 0x7b, 0x94, 0xd0, 0x69, 0x19, 0xa1, 0x7b,
2349 0x23, 0xfc, 0xcb, 0xd4, 0xd2, 0x34, 0x94, 0xbe, 0x25,
2350 0x87, 0xe0, 0xb5, 0xd2, 0xb8, 0x23, 0x95, 0x59, 0x3d,
2351 0xd4, 0x2a, 0x28, 0x37, 0xa5,
2352 },
2353 {
2354 0xbf, 0x4d, 0x19, 0xfd, 0xfa, 0xf2, 0xd5, 0xee, 0x48,
2355 0x39, 0x11, 0x95, 0x82, 0x8a, 0xcb, 0xed,
2356 },
2357 {
2358 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2359 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2360 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2361 0x00, 0x00, 0x00, 0x00, 0x00,
2362 },
2363 {
2364 0x08, 0x19, 0x0c, 0xb3, 0x1d, 0x8f, 0x20, 0xe8, 0xdf,
2365 0x5e, 0x5a, 0x64, 0x8e, 0xda, 0x89, 0x63, 0x68, 0xff,
2366 0x3b, 0xae, 0x1b, 0x60, 0xf7, 0xca, 0x1c, 0x93, 0xf8,
2367 0xbc, 0xdc, 0xdf, 0xbd, 0xcb,
2368 },
2369 {
2370 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2371 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2372 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2373 0x00, 0x00, 0x00, 0x00, 0x00,
2374 },
2375 {
2376 0x61, 0x05, 0x19, 0x7b, 0x7f, 0xd3, 0xa3, 0x12, 0x17,
2377 0x27, 0x89, 0x95, 0x50, 0x14, 0x4f, 0x8b, 0x9f, 0x03,
2378 0xcf, 0x9b, 0x1a, 0x57, 0x0e, 0x97, 0x2a, 0xd2, 0x3f,
2379 0x0e, 0xa7, 0x14, 0xdb, 0x42, 0x4a, 0x0b, 0xdc, 0xba,
2380 0x04, 0x5b, 0x6a, 0xeb, 0x12, 0x37, 0xc7, 0xab, 0xe9,
2381 0x0b, 0xcf, 0x84, 0x3d, 0x42, 0x53, 0xb3, 0x75, 0x72,
2382 0x49, 0x53, 0xc3, 0xf7, 0x26, 0xa9, 0xad, 0x8b, 0x25,
2383 0xba, 0x91, 0x3e, 0x4d, 0xb3, 0x74, 0x18, 0x5a, 0xf9,
2384 0x36, 0x37, 0xf3, 0xdc, 0xdf, 0x97, 0x3b, 0x98, 0x67,
2385 0x23, 0xf5, 0x90, 0xee, 0x76, 0x69, 0x16, 0x05, 0x2c,
2386 0x5e, 0xaa, 0x41, 0x91, 0x51, 0xf0, 0x9d, 0x12, 0x41,
2387 0x0e, 0x48, 0x28, 0x4a, 0xc8, 0xee, 0x87, 0xf2, 0x5e,
2388 0xd9, 0x67, 0x1b, 0x23, 0x5c, 0xd7, 0xac, 0xaa, 0x44,
2389 0x0a, 0xd4, 0xb6, 0xad, 0xa8, 0x64, 0xed, 0x62, 0xfb,
2390 0x98, 0x23,
2391 }
2392 };
2393
2394 TC_PRINT(".");
2395 result = do_hmac_prng_pr_false_test(37, &vec);
2396
2397 return result;
2398 }
2399
test_38(void)2400 unsigned int test_38(void)
2401 {
2402 unsigned int result = TC_PASS;
2403 const struct hmac_prng_test_vector vec = {
2404 32,
2405 16,
2406 0,
2407 0,
2408 128,
2409 {
2410 0x8b, 0x95, 0xec, 0xfe, 0x9f, 0xd0, 0x90, 0xa0, 0x92,
2411 0x10, 0x17, 0x2b, 0x4c, 0xc1, 0x99, 0xef, 0x1b, 0xfa,
2412 0x73, 0xed, 0xdd, 0xe5, 0x0d, 0x3d, 0x41, 0x47, 0xc7,
2413 0x5b, 0x6e, 0x0e, 0x76, 0xeb,
2414 },
2415 {
2416 0x13, 0x0c, 0x18, 0xae, 0xc9, 0x41, 0x5a, 0x2a, 0x54,
2417 0xd6, 0xcf, 0xa4, 0x33, 0x44, 0x08, 0x33,
2418 },
2419 {
2420 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2421 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2422 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2423 0x00, 0x00, 0x00, 0x00, 0x00,
2424 },
2425 {
2426 0x82, 0x5f, 0x0b, 0x1d, 0xd1, 0xa1, 0x57, 0x0f, 0xb7,
2427 0x10, 0x23, 0x15, 0x12, 0xcc, 0x28, 0x86, 0x81, 0xfc,
2428 0xba, 0x15, 0xa0, 0xa4, 0x5c, 0xef, 0x45, 0xaa, 0x1f,
2429 0x26, 0x82, 0xcf, 0x37, 0xf8,
2430 },
2431 {
2432 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2433 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2434 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2435 0x00, 0x00, 0x00, 0x00, 0x00,
2436 },
2437 {
2438 0x5e, 0xec, 0xa5, 0x1c, 0x5a, 0x05, 0x8f, 0x08, 0xbc,
2439 0xdc, 0xf8, 0x3c, 0x1d, 0x90, 0x44, 0xb5, 0x20, 0x3b,
2440 0x77, 0xb5, 0x36, 0xf8, 0x66, 0x23, 0x15, 0x3e, 0x67,
2441 0xf0, 0x5f, 0x3a, 0xdb, 0x28, 0xee, 0xb8, 0x92, 0x5b,
2442 0x61, 0x07, 0xd7, 0xa8, 0xac, 0xca, 0x77, 0x8b, 0xc4,
2443 0x52, 0x6e, 0xf1, 0xcf, 0xf5, 0xac, 0x5f, 0xdd, 0x02,
2444 0x39, 0x52, 0x2f, 0xa1, 0x75, 0xd3, 0xe0, 0x65, 0xd7,
2445 0x8c, 0x19, 0xa6, 0xda, 0xba, 0x56, 0xe2, 0x0b, 0x28,
2446 0x4b, 0x43, 0x3e, 0xa8, 0x1c, 0xba, 0xe8, 0x13, 0x9c,
2447 0xa7, 0x94, 0x45, 0xb8, 0x87, 0x74, 0x99, 0x49, 0xda,
2448 0xe8, 0xb9, 0xf0, 0x3e, 0x55, 0x9f, 0xcf, 0x5f, 0x71,
2449 0x07, 0x22, 0x83, 0x1e, 0xfa, 0x92, 0xad, 0xe0, 0xcd,
2450 0x0c, 0xab, 0x5c, 0x34, 0x3d, 0xfd, 0x4b, 0xcd, 0xd8,
2451 0xd6, 0xbc, 0xef, 0xba, 0xf0, 0x53, 0x1a, 0x8d, 0xed,
2452 0x69, 0x3c,
2453 }
2454 };
2455
2456 TC_PRINT(".");
2457 result = do_hmac_prng_pr_false_test(38, &vec);
2458
2459 return result;
2460 }
2461
test_39(void)2462 unsigned int test_39(void)
2463 {
2464 unsigned int result = TC_PASS;
2465 const struct hmac_prng_test_vector vec = {
2466 32,
2467 16,
2468 0,
2469 0,
2470 128,
2471 {
2472 0xe8, 0x43, 0x6e, 0x86, 0x22, 0xea, 0x34, 0x5d, 0xcb,
2473 0x94, 0x31, 0x64, 0x0a, 0xff, 0x32, 0x8c, 0x21, 0xbe,
2474 0x83, 0x83, 0x21, 0xda, 0xf0, 0x89, 0x51, 0x0d, 0x27,
2475 0xaa, 0x4d, 0x3d, 0x64, 0x0c,
2476 },
2477 {
2478 0xd6, 0x9a, 0xe9, 0xda, 0xe2, 0x16, 0xae, 0x6c, 0xf3,
2479 0x6f, 0x48, 0xcf, 0x3f, 0x97, 0xbd, 0x3a,
2480 },
2481 {
2482 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2483 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2484 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2485 0x00, 0x00, 0x00, 0x00, 0x00,
2486 },
2487 {
2488 0xd9, 0x12, 0xaa, 0xb4, 0x83, 0x68, 0xed, 0xe1, 0xc5,
2489 0xf9, 0xc1, 0x11, 0x6c, 0xb4, 0xe2, 0xe9, 0x91, 0xfb,
2490 0xaf, 0x26, 0x24, 0xd9, 0xf8, 0x1a, 0xf4, 0x7e, 0x8d,
2491 0x74, 0x67, 0x46, 0x01, 0x05,
2492 },
2493 {
2494 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2495 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2496 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2497 0x00, 0x00, 0x00, 0x00, 0x00,
2498 },
2499 {
2500 0xc3, 0xcb, 0x77, 0x89, 0xf6, 0x9f, 0x6a, 0x99, 0xc3,
2501 0x8c, 0xcd, 0x8d, 0x73, 0xb6, 0x27, 0xc5, 0xa2, 0x4d,
2502 0xa7, 0x11, 0x6f, 0x9d, 0x1b, 0x11, 0xb4, 0xa9, 0xfe,
2503 0x34, 0x48, 0xa6, 0x83, 0x7d, 0x21, 0x90, 0x99, 0xb3,
2504 0x39, 0xf0, 0x6f, 0x18, 0x5d, 0x9f, 0x4c, 0x3d, 0x1b,
2505 0x9a, 0x47, 0x4b, 0xbd, 0x2c, 0x63, 0x3a, 0xcc, 0x09,
2506 0xfd, 0x54, 0x0a, 0xb8, 0xdf, 0x42, 0x3b, 0x95, 0x15,
2507 0xd5, 0x2c, 0x68, 0xc5, 0x39, 0x06, 0x8f, 0xcb, 0xa5,
2508 0x31, 0xb8, 0x85, 0xc2, 0x6c, 0xcc, 0x4f, 0x57, 0x6e,
2509 0x34, 0x71, 0xf7, 0xe0, 0x88, 0x6f, 0x39, 0x72, 0x51,
2510 0x31, 0xc2, 0xf1, 0x25, 0x6b, 0x45, 0x02, 0x20, 0x47,
2511 0x3b, 0xcd, 0x07, 0xdd, 0xd9, 0x0a, 0xc8, 0x63, 0x05,
2512 0x9e, 0xb1, 0x8c, 0x69, 0x82, 0x70, 0x3c, 0xa4, 0x21,
2513 0x9c, 0x74, 0x7d, 0x84, 0x58, 0x00, 0x92, 0x09, 0x6a,
2514 0x55, 0xc1,
2515 }
2516 };
2517
2518 TC_PRINT(".");
2519 result = do_hmac_prng_pr_false_test(39, &vec);
2520
2521 return result;
2522 }
2523
test_40(void)2524 unsigned int test_40(void)
2525 {
2526 unsigned int result = TC_PASS;
2527 const struct hmac_prng_test_vector vec = {
2528 32,
2529 16,
2530 0,
2531 0,
2532 128,
2533 {
2534 0x61, 0x30, 0x87, 0x33, 0xc0, 0x88, 0x36, 0x27, 0xae,
2535 0x93, 0x19, 0xe1, 0x86, 0x57, 0x07, 0x24, 0x40, 0xc7,
2536 0x58, 0x8f, 0x58, 0x13, 0x1e, 0xda, 0x02, 0x81, 0xa4,
2537 0xe6, 0xc6, 0x3e, 0xc6, 0xf4,
2538 },
2539 {
2540 0x37, 0x38, 0x4d, 0x9f, 0x08, 0xc4, 0x25, 0x70, 0x35,
2541 0xf7, 0x30, 0xdb, 0x48, 0xa2, 0xc1, 0x53,
2542 },
2543 {
2544 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2545 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2546 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2547 0x00, 0x00, 0x00, 0x00, 0x00,
2548 },
2549 {
2550 0xec, 0x66, 0x81, 0xc5, 0x28, 0x13, 0x99, 0xbf, 0xb3,
2551 0xad, 0x4f, 0x5c, 0x6d, 0x73, 0xde, 0x97, 0x26, 0x35,
2552 0x1e, 0x18, 0x9c, 0x46, 0xba, 0x94, 0x30, 0x42, 0x50,
2553 0xb7, 0x10, 0x52, 0xf9, 0x04,
2554 },
2555 {
2556 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2557 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2558 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2559 0x00, 0x00, 0x00, 0x00, 0x00,
2560 },
2561 {
2562 0xb3, 0xf6, 0x42, 0xcd, 0x6f, 0xfb, 0x6d, 0xea, 0xa1,
2563 0x1c, 0x07, 0x4e, 0x76, 0x72, 0x99, 0xd9, 0x3d, 0x24,
2564 0x11, 0xfe, 0x4d, 0xbd, 0xe2, 0xad, 0xc0, 0x46, 0x30,
2565 0x90, 0x4e, 0x3b, 0xd5, 0xe6, 0x1b, 0x53, 0x44, 0x0f,
2566 0x9d, 0x51, 0x39, 0x8a, 0xf3, 0xeb, 0x8e, 0x95, 0x12,
2567 0x33, 0xe5, 0x85, 0xd8, 0x89, 0x75, 0x73, 0x7e, 0x3f,
2568 0x45, 0xe2, 0x3f, 0x5d, 0x63, 0xbb, 0xd4, 0x2a, 0x28,
2569 0x62, 0xe8, 0x27, 0xa8, 0xa4, 0x9c, 0xed, 0xd8, 0xec,
2570 0xf8, 0xfd, 0x82, 0x56, 0xa4, 0x75, 0x73, 0xd3, 0x5c,
2571 0x26, 0x22, 0xd7, 0xe8, 0x7d, 0x83, 0xe5, 0x35, 0x72,
2572 0x05, 0xe0, 0xdc, 0xe5, 0x31, 0xf9, 0x2e, 0x8f, 0xa3,
2573 0x25, 0x77, 0x82, 0xf1, 0xdb, 0x47, 0xcf, 0x70, 0xdb,
2574 0xe9, 0x44, 0x01, 0xcd, 0x50, 0xe2, 0x7d, 0xcc, 0xe1,
2575 0x83, 0x69, 0x3a, 0xd5, 0x01, 0xdb, 0x7b, 0x0a, 0xeb,
2576 0x55, 0xb2,
2577 }
2578 };
2579
2580 TC_PRINT(".");
2581 result = do_hmac_prng_pr_false_test(40, &vec);
2582
2583 return result;
2584 }
2585
test_41(void)2586 unsigned int test_41(void)
2587 {
2588 unsigned int result = TC_PASS;
2589 const struct hmac_prng_test_vector vec = {
2590 32,
2591 16,
2592 0,
2593 0,
2594 128,
2595 {
2596 0x7c, 0x6b, 0x15, 0xd4, 0x47, 0x7c, 0x5d, 0xdf, 0xf3,
2597 0xea, 0xfa, 0xd5, 0x56, 0x90, 0xe0, 0x21, 0xf8, 0xbf,
2598 0x5d, 0x34, 0x3b, 0xc6, 0xdc, 0x2d, 0x58, 0xd2, 0x9a,
2599 0x97, 0x9a, 0xa9, 0x21, 0xc3,
2600 },
2601 {
2602 0x79, 0x38, 0x80, 0x4e, 0xeb, 0xf0, 0x61, 0x38, 0x8d,
2603 0x3c, 0x34, 0x61, 0x44, 0xf4, 0x92, 0x11,
2604 },
2605 {
2606 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2607 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2608 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2609 0x00, 0x00, 0x00, 0x00, 0x00,
2610 },
2611 {
2612 0x7d, 0x8b, 0x82, 0xd9, 0xee, 0x9a, 0x99, 0xaf, 0x59,
2613 0x34, 0x7d, 0xa7, 0x67, 0x78, 0x05, 0x14, 0x42, 0xbe,
2614 0x40, 0x98, 0xa3, 0x00, 0xa4, 0xc6, 0x06, 0xa3, 0x24,
2615 0x73, 0x14, 0xea, 0x46, 0x18,
2616 },
2617 {
2618 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2619 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2620 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2621 0x00, 0x00, 0x00, 0x00, 0x00,
2622 },
2623 {
2624 0x62, 0xac, 0xe9, 0x9f, 0xe2, 0xdb, 0x12, 0xe9, 0x3c,
2625 0x2c, 0x91, 0x55, 0xd7, 0x0a, 0x58, 0x1b, 0x2b, 0xac,
2626 0xb8, 0xf1, 0xed, 0x90, 0x9a, 0x24, 0xde, 0x1b, 0x36,
2627 0x5f, 0xde, 0xec, 0xc6, 0x71, 0x35, 0x60, 0x7a, 0x44,
2628 0x79, 0x2b, 0x00, 0x4e, 0x50, 0x7d, 0x07, 0xf5, 0xb3,
2629 0x61, 0x48, 0x0c, 0xe4, 0xb2, 0xf1, 0xf6, 0xd3, 0x2b,
2630 0xb2, 0x53, 0x69, 0x33, 0xec, 0xe2, 0x81, 0x6d, 0x47,
2631 0xa9, 0x46, 0x77, 0xcd, 0x82, 0x3e, 0xf6, 0x4a, 0x17,
2632 0xba, 0xaa, 0x33, 0x59, 0x87, 0x72, 0x2b, 0x0e, 0x1c,
2633 0x02, 0x39, 0x94, 0x0b, 0x0f, 0x3d, 0x00, 0x52, 0x19,
2634 0xd8, 0xd3, 0x78, 0x15, 0x7c, 0xcf, 0x17, 0xc1, 0x41,
2635 0x62, 0x16, 0x5a, 0x8e, 0xf3, 0x8f, 0xd4, 0x08, 0xa4,
2636 0xe9, 0xac, 0x85, 0xa7, 0x08, 0x04, 0xd5, 0x73, 0x53,
2637 0xc7, 0x5f, 0xb1, 0x87, 0xbe, 0x0d, 0x72, 0xcf, 0x69,
2638 0x9c, 0xc8,
2639 }
2640 };
2641
2642 TC_PRINT(".");
2643 result = do_hmac_prng_pr_false_test(41, &vec);
2644
2645 return result;
2646 }
2647
test_42(void)2648 unsigned int test_42(void)
2649 {
2650 unsigned int result = TC_PASS;
2651 const struct hmac_prng_test_vector vec = {
2652 32,
2653 16,
2654 0,
2655 0,
2656 128,
2657 {
2658 0x71, 0x59, 0xc7, 0xae, 0xa9, 0x6d, 0xa8, 0xab, 0x86,
2659 0x48, 0xf8, 0xf8, 0x54, 0xf3, 0x51, 0xbe, 0x9b, 0x28,
2660 0x45, 0x66, 0x90, 0xb7, 0x88, 0xc4, 0x9c, 0x3d, 0xce,
2661 0x74, 0xb2, 0x31, 0x1e, 0x63,
2662 },
2663 {
2664 0x6a, 0xed, 0x95, 0x1f, 0xc6, 0xe1, 0x55, 0x7f, 0x5f,
2665 0x1c, 0xb6, 0xad, 0xbe, 0xc5, 0x46, 0x86,
2666 },
2667 {
2668 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2669 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2670 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2671 0x00, 0x00, 0x00, 0x00, 0x00,
2672 },
2673 {
2674 0xce, 0x6d, 0xe3, 0xb5, 0x21, 0x17, 0x77, 0xf9, 0x05,
2675 0x66, 0x69, 0xd0, 0x46, 0x01, 0x84, 0x00, 0x3e, 0x87,
2676 0x97, 0x84, 0xdf, 0xff, 0x86, 0xd7, 0xeb, 0xf0, 0x8a,
2677 0x23, 0x3e, 0x6a, 0x54, 0x82,
2678 },
2679 {
2680 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2681 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2682 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2683 0x00, 0x00, 0x00, 0x00, 0x00,
2684 },
2685 {
2686 0x13, 0x33, 0xd1, 0x21, 0x11, 0xb9, 0x59, 0xc5, 0x11,
2687 0x74, 0xca, 0x21, 0x88, 0xed, 0x84, 0xca, 0x7d, 0xfd,
2688 0xa3, 0x0d, 0x5f, 0xf2, 0x53, 0x27, 0xcd, 0x19, 0xf7,
2689 0x37, 0x79, 0x59, 0x0b, 0x19, 0xc0, 0xb5, 0x24, 0x75,
2690 0x60, 0x33, 0x00, 0x8b, 0x64, 0x06, 0xab, 0xe6, 0x31,
2691 0xcc, 0xa6, 0xb8, 0x2e, 0xbd, 0xda, 0x5c, 0xe7, 0xb9,
2692 0xe2, 0x96, 0x8a, 0x8a, 0xde, 0xe3, 0xe4, 0xa6, 0xb3,
2693 0xea, 0xa8, 0x07, 0x9a, 0x64, 0xe7, 0x62, 0x2f, 0x66,
2694 0x28, 0xc3, 0x62, 0xb5, 0xc6, 0xdc, 0xb6, 0x1b, 0x7c,
2695 0xf6, 0x45, 0x67, 0xe6, 0xec, 0x5a, 0xe3, 0x12, 0x04,
2696 0x72, 0x50, 0x51, 0x3e, 0xc5, 0x65, 0x91, 0x60, 0xeb,
2697 0xa5, 0xc7, 0x58, 0x35, 0x2f, 0x74, 0x16, 0xa0, 0x39,
2698 0x86, 0x37, 0x90, 0x2a, 0x4d, 0x7e, 0x86, 0xad, 0xf9,
2699 0x84, 0x50, 0xdf, 0x11, 0x1e, 0xf4, 0x33, 0x11, 0x1f,
2700 0xf2, 0xd1,
2701 }
2702 };
2703
2704 TC_PRINT(".");
2705 result = do_hmac_prng_pr_false_test(42, &vec);
2706
2707 return result;
2708 }
2709
test_43(void)2710 unsigned int test_43(void)
2711 {
2712 unsigned int result = TC_PASS;
2713 const struct hmac_prng_test_vector vec = {
2714 32,
2715 16,
2716 0,
2717 0,
2718 128,
2719 {
2720 0xeb, 0xcf, 0xe2, 0x5c, 0xea, 0x69, 0x66, 0x45, 0xc7,
2721 0x9e, 0x77, 0x29, 0x22, 0xdf, 0x04, 0xd4, 0x84, 0x17,
2722 0xf9, 0xcf, 0x2e, 0xce, 0xf7, 0x27, 0xcc, 0xcb, 0x3e,
2723 0x89, 0x98, 0x89, 0x3c, 0x59,
2724 },
2725 {
2726 0x13, 0x6e, 0x0c, 0x8e, 0x8f, 0xad, 0x1c, 0x49, 0x43,
2727 0x5e, 0x6e, 0xac, 0x76, 0x3c, 0x77, 0x6f,
2728 },
2729 {
2730 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2731 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2732 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2733 0x00, 0x00, 0x00, 0x00, 0x00,
2734 },
2735 {
2736 0x38, 0xb4, 0x8d, 0xb1, 0x1f, 0xf3, 0x1c, 0xe5, 0xe0,
2737 0xa0, 0xcb, 0x62, 0x79, 0x86, 0xb8, 0x8b, 0xea, 0xd7,
2738 0x4b, 0xe8, 0x34, 0xa4, 0xe3, 0x47, 0xde, 0x17, 0x07,
2739 0x4c, 0xe1, 0x17, 0x24, 0x4c,
2740 },
2741 {
2742 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2743 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2744 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2745 0x00, 0x00, 0x00, 0x00, 0x00,
2746 },
2747 {
2748 0xd9, 0x0c, 0xb0, 0x83, 0x5b, 0x0c, 0xa6, 0x4c, 0x8d,
2749 0x1d, 0xec, 0x23, 0xf2, 0x77, 0x3b, 0x6d, 0xd8, 0x35,
2750 0xbe, 0xe7, 0xe2, 0x7c, 0x91, 0x82, 0x2d, 0xbf, 0x08,
2751 0x98, 0xd1, 0x81, 0xde, 0x5b, 0xe4, 0xe4, 0xf6, 0xa1,
2752 0xd5, 0x97, 0x12, 0xe3, 0xb4, 0x72, 0x00, 0xcb, 0x14,
2753 0xe1, 0x22, 0x52, 0xe9, 0xd7, 0xc5, 0x62, 0x4c, 0x84,
2754 0x1e, 0x4c, 0x05, 0xc7, 0x37, 0x2a, 0x5e, 0x70, 0xe8,
2755 0x3a, 0x1d, 0x86, 0xd0, 0xc0, 0x69, 0xbf, 0xb2, 0x9a,
2756 0x21, 0xf5, 0x11, 0xc4, 0xcc, 0x8c, 0x4c, 0xd9, 0xf6,
2757 0x6b, 0xa3, 0xa0, 0x81, 0x02, 0x44, 0xdf, 0x25, 0x18,
2758 0xbf, 0x37, 0x85, 0xb3, 0x03, 0xe7, 0xae, 0xbe, 0x9f,
2759 0x19, 0x06, 0xbc, 0xff, 0x55, 0xa4, 0x54, 0x5d, 0x53,
2760 0xd2, 0xfb, 0x8d, 0xd7, 0x2e, 0xee, 0x00, 0x3f, 0x10,
2761 0x00, 0x9e, 0x9b, 0x41, 0x82, 0x52, 0x11, 0xf2, 0x35,
2762 0x2b, 0xe9,
2763 }
2764 };
2765
2766 TC_PRINT(".");
2767 result = do_hmac_prng_pr_false_test(43, &vec);
2768
2769 return result;
2770 }
2771
test_44(void)2772 unsigned int test_44(void)
2773 {
2774 unsigned int result = TC_PASS;
2775 const struct hmac_prng_test_vector vec = {
2776 32,
2777 16,
2778 0,
2779 0,
2780 128,
2781 {
2782 0xb0, 0xcc, 0xe5, 0xac, 0xf0, 0xd3, 0x30, 0x5c, 0xf5,
2783 0xeb, 0xdb, 0x55, 0x87, 0x0a, 0xf9, 0x31, 0x68, 0x20,
2784 0x0d, 0xa5, 0x6f, 0xa2, 0xfa, 0x68, 0x85, 0xbf, 0x1c,
2785 0x2a, 0x93, 0x28, 0x95, 0x6f,
2786 },
2787 {
2788 0x6d, 0x79, 0x66, 0x19, 0x8e, 0xc2, 0x34, 0x18, 0x08,
2789 0x97, 0x39, 0x00, 0xa9, 0xfc, 0xf0, 0x44,
2790 },
2791 {
2792 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2793 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2794 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2795 0x00, 0x00, 0x00, 0x00, 0x00,
2796 },
2797 {
2798 0x2c, 0x0b, 0xb1, 0xbd, 0xa5, 0xa0, 0x12, 0x57, 0x57,
2799 0xb6, 0x4d, 0x57, 0x3a, 0xd0, 0x4c, 0xf3, 0x6d, 0x47,
2800 0xee, 0x46, 0x15, 0x58, 0x3f, 0xa8, 0xfe, 0x5a, 0x2d,
2801 0xec, 0x8b, 0x80, 0x59, 0x21,
2802 },
2803 {
2804 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2805 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2806 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2807 0x00, 0x00, 0x00, 0x00, 0x00,
2808 },
2809 {
2810 0xb4, 0x17, 0xb4, 0x47, 0x0e, 0xa9, 0x50, 0x77, 0x2c,
2811 0xbe, 0xda, 0x48, 0x5d, 0xe1, 0xe9, 0x45, 0xd2, 0x31,
2812 0x9a, 0x6a, 0x35, 0x00, 0xd8, 0x8f, 0xd5, 0x22, 0x08,
2813 0x0a, 0x26, 0x44, 0xcf, 0x7c, 0x18, 0x61, 0xd4, 0x28,
2814 0x1d, 0xbe, 0xab, 0x81, 0x51, 0x8b, 0x59, 0x24, 0x50,
2815 0x50, 0xb1, 0xb4, 0xa5, 0xf8, 0x9e, 0x9a, 0x61, 0xbe,
2816 0x4c, 0x5a, 0x43, 0x72, 0xb4, 0x97, 0x2f, 0x1c, 0x17,
2817 0xb9, 0x83, 0x35, 0x99, 0x07, 0xa4, 0x4d, 0x88, 0xb5,
2818 0xbb, 0x12, 0x84, 0x84, 0x28, 0xef, 0xea, 0x84, 0x40,
2819 0x78, 0x93, 0x64, 0x0f, 0xb0, 0x36, 0x3b, 0x23, 0x71,
2820 0xe1, 0x48, 0x91, 0x24, 0x8a, 0xfd, 0x61, 0xab, 0xb5,
2821 0xac, 0x04, 0x74, 0xc5, 0x00, 0xe1, 0xc8, 0xef, 0x2c,
2822 0x11, 0x41, 0x84, 0xd7, 0xea, 0x47, 0x66, 0xd4, 0x6b,
2823 0x78, 0xd2, 0x74, 0x29, 0x86, 0xbb, 0x34, 0xe6, 0x2c,
2824 0x49, 0xde,
2825 }
2826 };
2827
2828 TC_PRINT(".");
2829 result = do_hmac_prng_pr_false_test(44, &vec);
2830
2831 return result;
2832 }
2833
test_45(void)2834 unsigned int test_45(void)
2835 {
2836 unsigned int result = TC_PASS;
2837 const struct hmac_prng_test_vector vec = {
2838 32,
2839 16,
2840 0,
2841 0,
2842 128,
2843 {
2844 0x10, 0x3e, 0x04, 0xdc, 0x6c, 0x88, 0x5d, 0xe4, 0x22,
2845 0x50, 0x67, 0xc8, 0xdd, 0x67, 0xce, 0xc5, 0xa3, 0xdd,
2846 0x7c, 0x45, 0x58, 0x6d, 0x2a, 0xdf, 0x59, 0xb5, 0x4b,
2847 0x54, 0x6c, 0xdc, 0x15, 0x91,
2848 },
2849 {
2850 0x5e, 0x37, 0xbf, 0x8f, 0x45, 0x5a, 0x28, 0x35, 0xcf,
2851 0x44, 0x8d, 0xa6, 0x83, 0xd6, 0x36, 0xb4,
2852 },
2853 {
2854 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2855 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2856 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2857 0x00, 0x00, 0x00, 0x00, 0x00,
2858 },
2859 {
2860 0x93, 0x6f, 0xfb, 0x8c, 0xb0, 0x83, 0x33, 0x24, 0xbe,
2861 0x82, 0x3a, 0xe7, 0x23, 0x92, 0x99, 0x96, 0xbc, 0x45,
2862 0x0f, 0x81, 0x57, 0x6f, 0x2c, 0x43, 0xb4, 0x82, 0x9e,
2863 0xa8, 0x50, 0x44, 0xcb, 0x55,
2864 },
2865 {
2866 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2867 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2868 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2869 0x00, 0x00, 0x00, 0x00, 0x00,
2870 },
2871 {
2872 0x14, 0xef, 0xb3, 0xf1, 0x2f, 0xa0, 0x3b, 0xd2, 0x0b,
2873 0x94, 0xb9, 0x79, 0x4e, 0xee, 0xd7, 0xde, 0x9e, 0x7f,
2874 0x7f, 0xc9, 0xf1, 0x06, 0xd6, 0x80, 0x36, 0x63, 0x22,
2875 0xe7, 0x10, 0x28, 0x5c, 0x1e, 0xb8, 0xc1, 0x43, 0x60,
2876 0x76, 0x41, 0xe0, 0xc4, 0x4f, 0xe9, 0xdb, 0x92, 0xc0,
2877 0xab, 0xb5, 0xfd, 0xa3, 0x80, 0x6b, 0xef, 0x59, 0x61,
2878 0x28, 0x9e, 0x3e, 0xd7, 0x2b, 0x67, 0xb1, 0x4f, 0x1e,
2879 0x98, 0xdc, 0x3b, 0xd9, 0xb9, 0x38, 0x86, 0x3d, 0x5c,
2880 0xd9, 0xe4, 0x5f, 0xff, 0x3e, 0x7c, 0x5e, 0xb2, 0x56,
2881 0xb4, 0x87, 0xf0, 0x29, 0x64, 0x3a, 0x0a, 0x27, 0xc0,
2882 0x9b, 0xcb, 0x6f, 0x5e, 0xec, 0x83, 0x63, 0xc4, 0xde,
2883 0xbe, 0xd6, 0x17, 0x52, 0xdf, 0x88, 0x40, 0xcd, 0x34,
2884 0xe6, 0xae, 0x7f, 0x5e, 0xe3, 0xfb, 0x53, 0xb7, 0x26,
2885 0x76, 0x78, 0xd1, 0x5e, 0x01, 0x72, 0xa6, 0x99, 0xfa,
2886 0xbd, 0x8d,
2887 }
2888 };
2889
2890 TC_PRINT(".");
2891 result = do_hmac_prng_pr_false_test(45, &vec);
2892
2893 return result;
2894 }
2895
test_46(void)2896 unsigned int test_46(void)
2897 {
2898 unsigned int result = TC_PASS;
2899 const struct hmac_prng_test_vector vec = {
2900 32,
2901 16,
2902 32,
2903 0,
2904 128,
2905 {
2906 0x28, 0xba, 0x1a, 0x66, 0x16, 0x32, 0xef, 0xc8, 0xec,
2907 0xce, 0xd5, 0xf5, 0x1b, 0x79, 0x13, 0x00, 0xfb, 0x3b,
2908 0x55, 0xb0, 0x5d, 0x04, 0x17, 0x08, 0x63, 0x8d, 0xe4,
2909 0xbe, 0xb7, 0x57, 0xa9, 0xe5,
2910 },
2911 {
2912 0x76, 0x82, 0x87, 0x96, 0xaf, 0xf0, 0x7f, 0x55, 0x79,
2913 0x5c, 0xb5, 0x47, 0x13, 0xc7, 0x7e, 0xd4,
2914 },
2915 {
2916 0x40, 0x93, 0x3f, 0xdc, 0xce, 0x41, 0x59, 0xb0, 0x95,
2917 0x51, 0x11, 0xf8, 0x44, 0x47, 0x1b, 0x0d, 0xb8, 0x5b,
2918 0x73, 0xbd, 0xd2, 0xb7, 0x8c, 0x46, 0x8d, 0xd3, 0x9e,
2919 0x2a, 0x9b, 0x29, 0xae, 0xf2,
2920 },
2921 {
2922 0xa5, 0xf5, 0x42, 0xb0, 0x4a, 0xaa, 0x5d, 0xbc, 0x93,
2923 0x1e, 0x47, 0x01, 0x9f, 0xeb, 0x38, 0x96, 0x26, 0x16,
2924 0xc5, 0x7a, 0xf0, 0x9b, 0x7c, 0x1d, 0xf8, 0x3f, 0x2b,
2925 0x86, 0x0f, 0xf7, 0x65, 0x86,
2926 },
2927 {
2928 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2929 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2930 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2931 0x00, 0x00, 0x00, 0x00, 0x00,
2932 },
2933 {
2934 0x65, 0xe5, 0xaa, 0x47, 0xb3, 0x85, 0xf1, 0xea, 0x42,
2935 0xb2, 0x31, 0xb9, 0xfe, 0x74, 0x42, 0x53, 0xb8, 0x59,
2936 0x88, 0x59, 0xd7, 0x01, 0x1e, 0x52, 0x5f, 0x5a, 0x2a,
2937 0x1a, 0xd3, 0x2a, 0x97, 0x2a, 0x85, 0x08, 0x02, 0xc6,
2938 0x0a, 0x2b, 0xe1, 0x9b, 0xe2, 0x70, 0x06, 0x3a, 0x3c,
2939 0xfb, 0xea, 0xae, 0x95, 0x4f, 0x10, 0xb1, 0x22, 0x35,
2940 0x2d, 0xe6, 0xa0, 0x8a, 0xc4, 0x10, 0xe0, 0x99, 0x16,
2941 0x53, 0xaa, 0xb2, 0x71, 0xb3, 0x60, 0xfe, 0x91, 0x91,
2942 0xcf, 0x5a, 0xdd, 0xcc, 0xcc, 0xed, 0x8c, 0x4a, 0xcf,
2943 0xb6, 0x14, 0x57, 0x04, 0x99, 0x92, 0x98, 0x8f, 0xd7,
2944 0xa9, 0xac, 0xca, 0x1f, 0x1b, 0xca, 0x35, 0xf1, 0x47,
2945 0x58, 0x13, 0x69, 0x4a, 0x39, 0x98, 0x8e, 0x5f, 0xac,
2946 0x9f, 0x4a, 0xc0, 0x57, 0x22, 0x86, 0xbc, 0x46, 0x25,
2947 0x82, 0xad, 0x0a, 0xf7, 0x8a, 0xb3, 0xb8, 0x5e, 0xc1,
2948 0x7a, 0x25,
2949 }
2950 };
2951
2952 TC_PRINT(".");
2953 result = do_hmac_prng_pr_false_test(46, &vec);
2954
2955 return result;
2956 }
2957
test_47(void)2958 unsigned int test_47(void)
2959 {
2960 unsigned int result = TC_PASS;
2961 const struct hmac_prng_test_vector vec = {
2962 32,
2963 16,
2964 32,
2965 0,
2966 128,
2967 {
2968 0xcf, 0xd5, 0x49, 0xc8, 0x08, 0x0a, 0x50, 0x2e, 0x3e,
2969 0xdd, 0x79, 0x05, 0x58, 0x4e, 0x5b, 0xe1, 0x4d, 0x7e,
2970 0xf5, 0x59, 0x10, 0xd2, 0x82, 0xd8, 0x1d, 0x34, 0x5c,
2971 0x53, 0xca, 0x34, 0xe0, 0x7b,
2972 },
2973 {
2974 0xa5, 0x65, 0xe4, 0xbc, 0x2f, 0x46, 0x17, 0x69, 0xc0,
2975 0xa8, 0xf2, 0x11, 0xa6, 0x7d, 0xc9, 0xa7,
2976 },
2977 {
2978 0xd4, 0xad, 0xd6, 0x4c, 0x86, 0x03, 0x41, 0x56, 0x29,
2979 0xda, 0x5c, 0xd5, 0x8c, 0x51, 0x89, 0x58, 0xc8, 0x4d,
2980 0x43, 0xad, 0xa7, 0x1b, 0xd1, 0xbd, 0x57, 0x8f, 0xbe,
2981 0x67, 0x74, 0x4b, 0x24, 0x76,
2982 },
2983 {
2984 0x27, 0x12, 0xa4, 0x16, 0x15, 0xf2, 0xb4, 0xaf, 0x37,
2985 0xd6, 0x41, 0xc3, 0xa7, 0x34, 0x07, 0xad, 0x62, 0xb4,
2986 0x3e, 0xeb, 0xd0, 0x43, 0x9b, 0xc7, 0x0f, 0xaf, 0x2b,
2987 0x7f, 0x25, 0x25, 0xe2, 0xf1,
2988 },
2989 {
2990 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2991 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2992 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2993 0x00, 0x00, 0x00, 0x00, 0x00,
2994 },
2995 {
2996 0xb5, 0x22, 0x5f, 0xa8, 0xb7, 0xb1, 0xff, 0x05, 0x8f,
2997 0x3e, 0xd4, 0x92, 0xcc, 0x7f, 0x66, 0xcb, 0xc3, 0x93,
2998 0x47, 0x74, 0x03, 0x14, 0x47, 0x12, 0x5a, 0xf8, 0x20,
2999 0xcf, 0xe9, 0x42, 0x9c, 0x19, 0x5d, 0xf9, 0xb3, 0xcc,
3000 0x9a, 0x11, 0xb0, 0x2c, 0xf3, 0x80, 0x06, 0x13, 0xeb,
3001 0x53, 0x4d, 0xc2, 0xce, 0x13, 0x65, 0xbc, 0x40, 0x9b,
3002 0x2b, 0x13, 0xd6, 0x5b, 0xed, 0xe5, 0x4c, 0xd2, 0x13,
3003 0xa5, 0x49, 0xf2, 0xef, 0x9e, 0x3d, 0x17, 0xc4, 0xfb,
3004 0x99, 0x55, 0x1e, 0xea, 0x53, 0x9b, 0x91, 0x25, 0x48,
3005 0x83, 0xca, 0xd8, 0x6f, 0x5c, 0x38, 0x53, 0xa8, 0x03,
3006 0x56, 0x6a, 0xc1, 0xea, 0x86, 0x4a, 0x08, 0xbf, 0x6e,
3007 0x80, 0x29, 0x58, 0x8f, 0xf8, 0x58, 0x0f, 0x7d, 0x26,
3008 0x57, 0xdc, 0x8f, 0x38, 0x9f, 0x72, 0xca, 0xb4, 0x25,
3009 0x1a, 0x19, 0xc4, 0xfa, 0x2e, 0x53, 0x9a, 0xfa, 0xc7,
3010 0xc1, 0xc1,
3011 }
3012 };
3013
3014 TC_PRINT(".");
3015 result = do_hmac_prng_pr_false_test(47, &vec);
3016
3017 return result;
3018 }
3019
test_48(void)3020 unsigned int test_48(void)
3021 {
3022 unsigned int result = TC_PASS;
3023 const struct hmac_prng_test_vector vec = {
3024 32,
3025 16,
3026 32,
3027 0,
3028 128,
3029 {
3030 0x5c, 0xc9, 0x13, 0xe1, 0x26, 0x29, 0x48, 0x12, 0x62,
3031 0xad, 0x31, 0x7f, 0xb8, 0xd3, 0x98, 0x70, 0xb4, 0xf7,
3032 0x26, 0x0c, 0xca, 0xcd, 0xce, 0xbd, 0x91, 0x31, 0x71,
3033 0x0a, 0xe7, 0x1e, 0x0c, 0x98,
3034 },
3035 {
3036 0xd4, 0x6d, 0xe6, 0xc6, 0xf4, 0xa5, 0x43, 0xfe, 0x5f,
3037 0x47, 0x3c, 0x2c, 0x2d, 0x0e, 0x21, 0x4a,
3038 },
3039 {
3040 0xca, 0x7f, 0x2f, 0x65, 0x01, 0xe6, 0xde, 0xa1, 0xbf,
3041 0x7f, 0x54, 0xe6, 0xbd, 0x50, 0x30, 0x47, 0x97, 0xab,
3042 0x80, 0xea, 0x02, 0x28, 0x81, 0x3e, 0xb3, 0x84, 0x98,
3043 0x42, 0xf2, 0x17, 0x27, 0x3f,
3044 },
3045 {
3046 0xe7, 0xf0, 0x08, 0xab, 0xd0, 0x0d, 0x52, 0x52, 0x97,
3047 0xff, 0x6e, 0x2c, 0x39, 0xa3, 0x58, 0xe6, 0xc7, 0x5c,
3048 0x4a, 0x64, 0xf6, 0xac, 0x68, 0xde, 0xfd, 0x27, 0x56,
3049 0x23, 0xf4, 0x96, 0xca, 0x07,
3050 },
3051 {
3052 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3053 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3054 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3055 0x00, 0x00, 0x00, 0x00, 0x00,
3056 },
3057 {
3058 0x8c, 0xa7, 0xdd, 0x3d, 0x3b, 0x82, 0xf6, 0x40, 0xb3,
3059 0x3c, 0xf1, 0x76, 0xb2, 0x2d, 0xe7, 0x13, 0x0c, 0x1d,
3060 0xc5, 0x4c, 0x68, 0x4d, 0xdf, 0x8b, 0xc7, 0xb0, 0x8a,
3061 0x18, 0x17, 0x53, 0xad, 0x7a, 0xf8, 0xc4, 0x63, 0x82,
3062 0x87, 0xf7, 0x24, 0xdf, 0x8f, 0xf9, 0x91, 0x43, 0x1f,
3063 0x99, 0xa3, 0x10, 0x51, 0x73, 0xb1, 0x07, 0xf0, 0x64,
3064 0x54, 0x1d, 0xd9, 0x24, 0x40, 0xfd, 0x4c, 0xee, 0x65,
3065 0x9e, 0x93, 0x22, 0xb5, 0x15, 0x41, 0x68, 0xf4, 0x9d,
3066 0xb3, 0x6f, 0x32, 0x24, 0x5a, 0xe4, 0xd9, 0x83, 0x15,
3067 0x59, 0xeb, 0x83, 0x9b, 0x28, 0xb9, 0xa3, 0x88, 0xae,
3068 0x49, 0x80, 0xce, 0xea, 0xdd, 0x99, 0x03, 0xd4, 0xfe,
3069 0xbc, 0x66, 0x2b, 0xb7, 0xd2, 0x46, 0x01, 0x74, 0x63,
3070 0xe8, 0x43, 0xe7, 0x72, 0x56, 0x72, 0x66, 0x22, 0xcd,
3071 0x1f, 0x10, 0x25, 0xc5, 0x1b, 0x66, 0x24, 0xce, 0x84,
3072 0x77, 0x16,
3073 }
3074 };
3075
3076 TC_PRINT(".");
3077 result = do_hmac_prng_pr_false_test(48, &vec);
3078
3079 return result;
3080 }
3081
test_49(void)3082 unsigned int test_49(void)
3083 {
3084 unsigned int result = TC_PASS;
3085 const struct hmac_prng_test_vector vec = {
3086 32,
3087 16,
3088 32,
3089 0,
3090 128,
3091 {
3092 0xb8, 0xbc, 0x5e, 0x67, 0x20, 0xa4, 0x14, 0xb7, 0xf7,
3093 0xa2, 0x13, 0xd4, 0x55, 0xd4, 0x3e, 0xc5, 0x5c, 0x77,
3094 0x3e, 0xdf, 0x24, 0x03, 0x31, 0x97, 0x16, 0xde, 0xf9,
3095 0xee, 0xc1, 0x29, 0x39, 0x75,
3096 },
3097 {
3098 0x2d, 0xa2, 0x86, 0x29, 0x23, 0x31, 0x05, 0x6d, 0xcf,
3099 0x88, 0x4d, 0xe8, 0x94, 0x4e, 0x02, 0x6b,
3100 },
3101 {
3102 0x51, 0x4e, 0xb0, 0xc6, 0x9b, 0xbe, 0xa5, 0xb9, 0x95,
3103 0x32, 0x49, 0x76, 0xca, 0x12, 0x33, 0x37, 0xe2, 0x6f,
3104 0x63, 0x9b, 0x06, 0xa7, 0xa3, 0x62, 0xff, 0x57, 0x67,
3105 0x35, 0x20, 0xcb, 0x70, 0xdb,
3106 },
3107 {
3108 0x3c, 0x1b, 0xba, 0x68, 0x1b, 0x3e, 0x04, 0x08, 0xd0,
3109 0x8b, 0x92, 0xfd, 0xd3, 0x25, 0x2d, 0xda, 0x67, 0x68,
3110 0x5d, 0x86, 0x5f, 0xe8, 0x28, 0x6d, 0x6c, 0x4f, 0xd6,
3111 0x69, 0xc3, 0x3c, 0x09, 0x20,
3112 },
3113 {
3114 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3115 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3116 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3117 0x00, 0x00, 0x00, 0x00, 0x00,
3118 },
3119 {
3120 0xb9, 0x41, 0x60, 0x02, 0xc5, 0x44, 0xe0, 0x79, 0x99,
3121 0x84, 0x64, 0xd5, 0x18, 0x1a, 0xfe, 0x70, 0xc1, 0x06,
3122 0xd4, 0x4b, 0x87, 0x6d, 0x16, 0xb3, 0x9f, 0x93, 0x6a,
3123 0xff, 0x36, 0xec, 0x86, 0xdd, 0xef, 0x5f, 0xb2, 0x68,
3124 0x8a, 0x0a, 0xad, 0xf6, 0x69, 0xc3, 0x9b, 0x6f, 0x67,
3125 0x24, 0xff, 0x3e, 0xea, 0xac, 0x90, 0xb7, 0x06, 0x74,
3126 0xc1, 0x4d, 0x97, 0xe9, 0x94, 0xbd, 0xec, 0x0f, 0xd5,
3127 0x23, 0x73, 0xcf, 0x7a, 0x21, 0x25, 0x0c, 0x83, 0x5e,
3128 0x93, 0xc7, 0x3d, 0x7c, 0x49, 0x79, 0x0b, 0x59, 0x30,
3129 0x0d, 0xb4, 0x85, 0xf0, 0x21, 0xb1, 0x35, 0x93, 0xa3,
3130 0x2d, 0x72, 0xb7, 0x05, 0x7d, 0xa0, 0xd5, 0x5f, 0x63,
3131 0xa6, 0xca, 0xe5, 0x18, 0x35, 0x40, 0xe8, 0x17, 0x29,
3132 0x0d, 0x8b, 0x91, 0xce, 0x55, 0xf4, 0x5f, 0xeb, 0x77,
3133 0x30, 0x73, 0x2f, 0xa9, 0x15, 0x6d, 0xa8, 0x27, 0x6d,
3134 0x67, 0x32,
3135 }
3136 };
3137
3138 TC_PRINT(".");
3139 result = do_hmac_prng_pr_false_test(49, &vec);
3140
3141 return result;
3142 }
3143
test_50(void)3144 unsigned int test_50(void)
3145 {
3146 unsigned int result = TC_PASS;
3147 const struct hmac_prng_test_vector vec = {
3148 32,
3149 16,
3150 32,
3151 0,
3152 128,
3153 {
3154 0x28, 0xdc, 0x2f, 0x25, 0xb2, 0x63, 0x4c, 0x06, 0x72,
3155 0xa0, 0xfa, 0x03, 0x37, 0x85, 0x63, 0xde, 0x21, 0x45,
3156 0x00, 0xfa, 0xa7, 0x7e, 0xe4, 0x07, 0x64, 0x09, 0xaa,
3157 0x16, 0xbc, 0x85, 0x12, 0xd2,
3158 },
3159 {
3160 0x85, 0xd5, 0x2e, 0xd3, 0x4e, 0x06, 0x29, 0x09, 0xbb,
3161 0x5e, 0x61, 0x75, 0xdf, 0xa1, 0x87, 0xb8,
3162 },
3163 {
3164 0x5b, 0xb0, 0xe4, 0x22, 0xce, 0xec, 0x47, 0xaa, 0xf4,
3165 0x80, 0x82, 0x90, 0x9f, 0x11, 0xc9, 0x98, 0xa5, 0xa7,
3166 0x7d, 0x54, 0x32, 0x0b, 0x28, 0xea, 0xea, 0xab, 0x71,
3167 0x32, 0x21, 0xc9, 0x54, 0x19,
3168 },
3169 {
3170 0x43, 0x93, 0xb2, 0x0d, 0x7d, 0xd1, 0x5d, 0x67, 0xa2,
3171 0xf7, 0x8e, 0x74, 0x37, 0xe1, 0xe7, 0xa9, 0x51, 0x10,
3172 0xdc, 0x2d, 0xf6, 0x46, 0xdb, 0x22, 0x34, 0x2a, 0x71,
3173 0x1a, 0xe1, 0x02, 0xd1, 0xd6,
3174 },
3175 {
3176 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3179 0x00, 0x00, 0x00, 0x00, 0x00,
3180 },
3181 {
3182 0x66, 0xdb, 0xf2, 0xb1, 0x21, 0xbf, 0xd4, 0xa7, 0x25,
3183 0x84, 0xb5, 0x61, 0xc6, 0x50, 0xf5, 0x09, 0x95, 0xd2,
3184 0x2f, 0x0f, 0x37, 0x7d, 0xf2, 0xf6, 0x0c, 0xd2, 0x6e,
3185 0x03, 0x77, 0xb7, 0xd1, 0xae, 0x7b, 0x1a, 0xfc, 0x72,
3186 0xd2, 0x2f, 0x9a, 0xb5, 0xb5, 0x42, 0x76, 0x4a, 0x21,
3187 0x9c, 0xbb, 0x66, 0xf3, 0x25, 0x3e, 0x60, 0x2e, 0x93,
3188 0x80, 0x7d, 0x3e, 0xc2, 0xbe, 0xe5, 0xab, 0x13, 0x1f,
3189 0x00, 0xfb, 0x4e, 0xd3, 0x28, 0x8b, 0xb1, 0xb6, 0xf5,
3190 0x2d, 0xd3, 0x9d, 0x79, 0xc8, 0x17, 0xab, 0x73, 0xd9,
3191 0xb1, 0x1f, 0x81, 0xe3, 0x01, 0x31, 0xd1, 0xf3, 0xca,
3192 0xb9, 0x60, 0x44, 0x1d, 0x07, 0xec, 0x23, 0xbe, 0xa0,
3193 0xee, 0xd7, 0x71, 0x88, 0xd7, 0x14, 0x07, 0x87, 0x39,
3194 0xd8, 0x1c, 0x42, 0xcb, 0x22, 0x4b, 0xc5, 0xad, 0x0b,
3195 0x65, 0xc8, 0xc9, 0xc5, 0xa8, 0x08, 0xb6, 0x05, 0xf1,
3196 0x92, 0x3c,
3197 }
3198 };
3199
3200 TC_PRINT(".");
3201 result = do_hmac_prng_pr_false_test(50, &vec);
3202
3203 return result;
3204 }
3205
test_51(void)3206 unsigned int test_51(void)
3207 {
3208 unsigned int result = TC_PASS;
3209 const struct hmac_prng_test_vector vec = {
3210 32,
3211 16,
3212 32,
3213 0,
3214 128,
3215 {
3216 0xaf, 0x84, 0x05, 0x9f, 0x96, 0xed, 0x19, 0xb2, 0xe5,
3217 0x3f, 0x09, 0x12, 0x28, 0xe7, 0x09, 0x67, 0x86, 0x47,
3218 0x35, 0xdc, 0x83, 0x17, 0x8e, 0x15, 0x9f, 0x57, 0x7c,
3219 0x57, 0xbc, 0x12, 0x1c, 0xbf,
3220 },
3221 {
3222 0x84, 0xc6, 0x51, 0x5f, 0xcb, 0x88, 0x13, 0x6a, 0xdc,
3223 0x23, 0x9f, 0x53, 0x7f, 0xca, 0xbf, 0x4d,
3224 },
3225 {
3226 0x9f, 0xab, 0xe3, 0x0a, 0xdb, 0x15, 0xa1, 0x45, 0x2f,
3227 0xba, 0xf2, 0xb6, 0x27, 0xc0, 0xe4, 0x7a, 0xdc, 0x60,
3228 0xce, 0x6e, 0x9b, 0x10, 0xa5, 0x6a, 0x33, 0x8f, 0x08,
3229 0xe8, 0x85, 0x8f, 0x82, 0xa1,
3230 },
3231 {
3232 0xf5, 0xfd, 0xb3, 0xb3, 0xaa, 0x2e, 0xde, 0xf8, 0xca,
3233 0x8d, 0x31, 0xc9, 0x91, 0x2e, 0xb4, 0x3a, 0x3a, 0xdc,
3234 0x48, 0x25, 0xc8, 0x8d, 0x46, 0x32, 0x30, 0xb1, 0x13,
3235 0x91, 0x3f, 0x1d, 0x01, 0x17,
3236 },
3237 {
3238 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3239 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3240 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3241 0x00, 0x00, 0x00, 0x00, 0x00,
3242 },
3243 {
3244 0x18, 0x1c, 0x7a, 0x02, 0x26, 0x4e, 0x5a, 0x6a, 0x1f,
3245 0xf4, 0xd9, 0x7d, 0xbc, 0xe0, 0x74, 0x28, 0xe4, 0xb2,
3246 0xb4, 0x49, 0xa2, 0xb8, 0x61, 0xeb, 0x0a, 0x61, 0x72,
3247 0x93, 0xfb, 0x84, 0x7e, 0x2a, 0xa1, 0x23, 0x4d, 0x21,
3248 0x4d, 0x50, 0x92, 0x07, 0x3f, 0x9d, 0xbb, 0x49, 0xfa,
3249 0xe8, 0xb9, 0x63, 0x56, 0x9b, 0xf4, 0xb7, 0xfe, 0x20,
3250 0xe6, 0xaa, 0x35, 0x5e, 0x56, 0x5d, 0xb4, 0xc7, 0x5d,
3251 0x62, 0x3b, 0x47, 0xcb, 0x62, 0x7a, 0x7f, 0xde, 0x90,
3252 0x08, 0xd0, 0x29, 0xd2, 0x0c, 0x09, 0xbb, 0x50, 0xe8,
3253 0x3a, 0xb0, 0x37, 0xf3, 0x70, 0x8f, 0xc5, 0x18, 0x3f,
3254 0xe0, 0xf2, 0x2a, 0x73, 0x2b, 0x89, 0xf3, 0x9c, 0x3a,
3255 0x45, 0xf1, 0xf1, 0x61, 0x68, 0x76, 0xf8, 0x72, 0x03,
3256 0xce, 0xef, 0x06, 0x05, 0xf0, 0x3c, 0x28, 0xb2, 0x65,
3257 0x4d, 0xf0, 0x0a, 0x4d, 0x55, 0xa0, 0xc0, 0x11, 0xb9,
3258 0x39, 0x16,
3259 }
3260 };
3261
3262 TC_PRINT(".");
3263 result = do_hmac_prng_pr_false_test(51, &vec);
3264
3265 return result;
3266 }
3267
test_52(void)3268 unsigned int test_52(void)
3269 {
3270 unsigned int result = TC_PASS;
3271 const struct hmac_prng_test_vector vec = {
3272 32,
3273 16,
3274 32,
3275 0,
3276 128,
3277 {
3278 0x4a, 0xf2, 0xbb, 0xf3, 0x6d, 0x2a, 0x30, 0x25, 0x95,
3279 0xde, 0x66, 0x7e, 0x42, 0xe0, 0x8a, 0xbb, 0x5e, 0x44,
3280 0xcb, 0xde, 0x9b, 0x1b, 0xe2, 0xee, 0xd0, 0x33, 0x8a,
3281 0xac, 0xb4, 0x86, 0x73, 0xbc,
3282 },
3283 {
3284 0xe0, 0xb9, 0x43, 0xf5, 0x5f, 0xc1, 0x34, 0x16, 0x86,
3285 0x9a, 0x62, 0x4a, 0x9a, 0x38, 0x3f, 0xcf,
3286 },
3287 {
3288 0xde, 0xa4, 0xc6, 0xb2, 0x49, 0x0f, 0x18, 0x72, 0xe6,
3289 0x1a, 0x9b, 0xf7, 0x7c, 0x3f, 0x3b, 0x67, 0xaf, 0xa8,
3290 0xe8, 0x92, 0xbe, 0x0c, 0x3c, 0x1a, 0xb8, 0x9e, 0x92,
3291 0xa2, 0x70, 0x45, 0xe1, 0xa7,
3292 },
3293 {
3294 0xbb, 0x6a, 0x04, 0xce, 0x7f, 0x81, 0xef, 0x18, 0xbb,
3295 0x34, 0x55, 0xc9, 0x25, 0xb8, 0xd5, 0x76, 0xdf, 0x2b,
3296 0xbf, 0x68, 0xc0, 0xfe, 0x4e, 0x65, 0xc6, 0x80, 0x22,
3297 0xaa, 0x69, 0xdc, 0x0e, 0xc2,
3298 },
3299 {
3300 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3301 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3302 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3303 0x00, 0x00, 0x00, 0x00, 0x00,
3304 },
3305 {
3306 0x31, 0x05, 0x2a, 0x14, 0xc9, 0x11, 0xb6, 0x92, 0x64,
3307 0x57, 0xf5, 0x62, 0xfc, 0x27, 0xd1, 0x9f, 0x22, 0xa3,
3308 0xde, 0x7d, 0xd1, 0x45, 0xaa, 0x75, 0xb9, 0xb6, 0x03,
3309 0xa6, 0x10, 0x9f, 0xe1, 0xc1, 0xfe, 0xa3, 0xff, 0x2e,
3310 0x37, 0xe9, 0xd9, 0x84, 0x14, 0x50, 0x2e, 0x2d, 0xfe,
3311 0xf0, 0x13, 0x77, 0x88, 0x18, 0x7e, 0x42, 0xa7, 0x1c,
3312 0xd6, 0x94, 0x75, 0xa8, 0xbb, 0x00, 0x40, 0xac, 0x6d,
3313 0xb2, 0x3a, 0xed, 0x06, 0x92, 0x74, 0x95, 0x95, 0x4a,
3314 0xaa, 0x23, 0x19, 0x3d, 0xb8, 0x32, 0x89, 0xf7, 0x5f,
3315 0x96, 0x6e, 0xef, 0x0a, 0x7c, 0xed, 0x68, 0xe8, 0x87,
3316 0x1a, 0xb2, 0xa4, 0x7d, 0x38, 0x92, 0xf5, 0x94, 0xa9,
3317 0x8c, 0x90, 0xae, 0x51, 0xcf, 0x11, 0xbc, 0xf6, 0xed,
3318 0x87, 0x9d, 0x45, 0x8d, 0x17, 0x1f, 0x33, 0x4c, 0x04,
3319 0x92, 0x34, 0xdc, 0xe7, 0x94, 0x1f, 0x34, 0xb4, 0x83,
3320 0x9f, 0xcb,
3321 }
3322 };
3323
3324 TC_PRINT(".");
3325 result = do_hmac_prng_pr_false_test(52, &vec);
3326
3327 return result;
3328 }
3329
test_53(void)3330 unsigned int test_53(void)
3331 {
3332 unsigned int result = TC_PASS;
3333 const struct hmac_prng_test_vector vec = {
3334 32,
3335 16,
3336 32,
3337 0,
3338 128,
3339 {
3340 0xd6, 0x66, 0xa2, 0xe7, 0x0a, 0xf2, 0x77, 0x12, 0x69,
3341 0x42, 0x5c, 0x4d, 0xc1, 0xec, 0xa8, 0x7f, 0xe1, 0x77,
3342 0x31, 0x38, 0x43, 0xb8, 0xb6, 0xb9, 0xc3, 0xd4, 0xda,
3343 0x9d, 0x46, 0x54, 0x0c, 0xaf,
3344 },
3345 {
3346 0xd5, 0x48, 0x6a, 0x3b, 0x88, 0x1c, 0x35, 0xbe, 0x94,
3347 0x4d, 0xd2, 0x35, 0x9b, 0x88, 0xd6, 0xa2,
3348 },
3349 {
3350 0x5f, 0x0c, 0xcf, 0x34, 0xc2, 0x57, 0x60, 0x8e, 0xbf,
3351 0x9e, 0x5f, 0xcb, 0xb9, 0x79, 0xc1, 0xd8, 0xf6, 0x69,
3352 0x04, 0x7e, 0x71, 0x8c, 0x76, 0x0d, 0x0a, 0x9b, 0xe0,
3353 0xbe, 0xe7, 0xc9, 0x4d, 0x79,
3354 },
3355 {
3356 0x1a, 0x6c, 0xf1, 0xd8, 0xf6, 0xa1, 0x7a, 0xd9, 0xdb,
3357 0xa6, 0x89, 0x8f, 0x7f, 0x82, 0xd3, 0x3d, 0xba, 0x59,
3358 0x6e, 0xac, 0xcc, 0x20, 0x11, 0xd1, 0x55, 0xac, 0x6e,
3359 0x39, 0xd5, 0x9a, 0x75, 0x58,
3360 },
3361 {
3362 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3363 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3364 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3365 0x00, 0x00, 0x00, 0x00, 0x00,
3366 },
3367 {
3368 0x58, 0xfd, 0xe4, 0xf4, 0xe1, 0x08, 0xa5, 0x40, 0x22,
3369 0x6f, 0x40, 0x84, 0x6b, 0xce, 0x66, 0xda, 0xb6, 0x08,
3370 0x2e, 0xfb, 0x63, 0x6e, 0x89, 0x87, 0xe1, 0x85, 0x42,
3371 0xdd, 0x6e, 0x28, 0x40, 0xa8, 0x8b, 0xe0, 0x45, 0x01,
3372 0x94, 0x02, 0xb2, 0x03, 0x71, 0xe0, 0x8e, 0x41, 0x52,
3373 0x38, 0x92, 0x5a, 0x44, 0x0a, 0x49, 0x3e, 0xd8, 0xe1,
3374 0x03, 0x55, 0xfc, 0x16, 0x46, 0x85, 0xe4, 0x99, 0x60,
3375 0x0e, 0xe1, 0x92, 0xed, 0x0b, 0x95, 0x31, 0x59, 0x2d,
3376 0x4a, 0x52, 0xf4, 0xd7, 0x0a, 0xc0, 0xa0, 0xaa, 0xe1,
3377 0x2c, 0x17, 0x05, 0xe9, 0xc1, 0xec, 0xa2, 0x6b, 0x36,
3378 0xc0, 0x90, 0x6e, 0x21, 0x6f, 0xda, 0xe4, 0x79, 0xae,
3379 0xf2, 0xdc, 0xa8, 0x46, 0x0d, 0x05, 0x58, 0xbd, 0xf7,
3380 0x68, 0xd7, 0xc0, 0x00, 0x2f, 0xc7, 0x1d, 0x6a, 0x5e,
3381 0xb0, 0x6f, 0xd6, 0x60, 0x56, 0x42, 0x57, 0xa1, 0x58,
3382 0xdb, 0x53,
3383 }
3384 };
3385
3386 TC_PRINT(".");
3387 result = do_hmac_prng_pr_false_test(53, &vec);
3388
3389 return result;
3390 }
3391
test_54(void)3392 unsigned int test_54(void)
3393 {
3394 unsigned int result = TC_PASS;
3395 const struct hmac_prng_test_vector vec = {
3396 32,
3397 16,
3398 32,
3399 0,
3400 128,
3401 {
3402 0x20, 0x8b, 0x9e, 0xf5, 0x00, 0xb0, 0x49, 0x3b, 0x7f,
3403 0x2d, 0xed, 0x5f, 0x3a, 0xf6, 0xbd, 0x56, 0x8f, 0x5d,
3404 0xff, 0x0e, 0xbe, 0xfd, 0x19, 0x98, 0xd3, 0x48, 0x03,
3405 0x7e, 0xc3, 0x63, 0xdf, 0x80,
3406 },
3407 {
3408 0x13, 0xeb, 0x96, 0x9c, 0xea, 0xc8, 0x94, 0x56, 0xab,
3409 0x22, 0xd8, 0x69, 0x33, 0xa1, 0x81, 0x81,
3410 },
3411 {
3412 0xcc, 0xae, 0xbe, 0xad, 0x9e, 0x2b, 0x91, 0x1e, 0xf9,
3413 0x27, 0xf3, 0x06, 0x9d, 0xa5, 0xe3, 0x58, 0x2a, 0x78,
3414 0x86, 0xd9, 0x56, 0x57, 0x0d, 0x2e, 0xdf, 0x2a, 0xf4,
3415 0x34, 0xb9, 0x47, 0x3d, 0xba,
3416 },
3417 {
3418 0x06, 0x9b, 0x76, 0x7a, 0xc6, 0x12, 0x3f, 0x9c, 0x55,
3419 0x1d, 0x3b, 0xbd, 0x43, 0x22, 0x8d, 0xf5, 0x4f, 0x37,
3420 0x9c, 0xa6, 0xb4, 0x18, 0x96, 0x77, 0x22, 0x82, 0x5f,
3421 0xad, 0x33, 0x34, 0x3f, 0x9c,
3422 },
3423 {
3424 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3425 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3426 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3427 0x00, 0x00, 0x00, 0x00, 0x00,
3428 },
3429 {
3430 0xec, 0xc7, 0x58, 0xfd, 0x31, 0x6a, 0x75, 0xe5, 0xf9,
3431 0x7a, 0x14, 0x80, 0x3a, 0xe5, 0x1f, 0x8c, 0x0a, 0x80,
3432 0xec, 0xba, 0x95, 0x4b, 0x54, 0xec, 0x8b, 0x9d, 0xa8,
3433 0x08, 0x1f, 0x0b, 0xe9, 0x68, 0x0b, 0x11, 0xac, 0xdc,
3434 0xb9, 0xfc, 0x65, 0xc6, 0xef, 0x45, 0x87, 0x87, 0x54,
3435 0x61, 0x37, 0xfa, 0xdb, 0xbf, 0x07, 0x7a, 0x60, 0x02,
3436 0x52, 0x88, 0x35, 0xca, 0x3c, 0x80, 0x8f, 0xa5, 0x93,
3437 0xd8, 0x20, 0xa0, 0x65, 0x01, 0x59, 0x2d, 0x85, 0x7a,
3438 0xb0, 0xa6, 0x7b, 0x80, 0x3e, 0xcb, 0x63, 0x15, 0xba,
3439 0x1a, 0xa0, 0xc9, 0x0c, 0xaf, 0xed, 0xe0, 0x24, 0x80,
3440 0xb9, 0x8a, 0x07, 0xcf, 0x9b, 0xb8, 0x67, 0xdc, 0xe3,
3441 0xb1, 0x57, 0x5b, 0x6b, 0x46, 0xd4, 0x04, 0x6f, 0x44,
3442 0x08, 0xdd, 0xc7, 0x12, 0x82, 0xfa, 0x43, 0xac, 0xc7,
3443 0x38, 0xa2, 0x76, 0x65, 0xb3, 0x3a, 0xfc, 0xcf, 0x97,
3444 0x40, 0x77,
3445 }
3446 };
3447
3448 TC_PRINT(".");
3449 result = do_hmac_prng_pr_false_test(54, &vec);
3450
3451 return result;
3452 }
3453
test_55(void)3454 unsigned int test_55(void)
3455 {
3456 unsigned int result = TC_PASS;
3457 const struct hmac_prng_test_vector vec = {
3458 32,
3459 16,
3460 32,
3461 0,
3462 128,
3463 {
3464 0x01, 0x46, 0x9d, 0xfd, 0xc9, 0x93, 0xba, 0x87, 0x0c,
3465 0x34, 0x87, 0xf9, 0x3b, 0xec, 0x20, 0x81, 0x97, 0x4d,
3466 0xe5, 0xf4, 0x19, 0x3d, 0x10, 0x5b, 0xd8, 0xaf, 0x41,
3467 0xcf, 0x00, 0x1f, 0x69, 0x9c,
3468 },
3469 {
3470 0x76, 0x15, 0x4e, 0xbb, 0xfe, 0xe0, 0x89, 0x51, 0xcf,
3471 0xfc, 0x61, 0xc1, 0xc2, 0x2c, 0x96, 0x85,
3472 },
3473 {
3474 0x4e, 0x5f, 0xa3, 0x38, 0x43, 0x45, 0xb6, 0x6b, 0x7d,
3475 0xd4, 0xfe, 0x9f, 0xc7, 0x88, 0xa0, 0x3a, 0x38, 0x05,
3476 0xc5, 0xe8, 0xac, 0xb4, 0x70, 0x7e, 0x6d, 0x24, 0x41,
3477 0x2c, 0x49, 0x27, 0xe8, 0xff,
3478 },
3479 {
3480 0x5e, 0x74, 0x35, 0xf0, 0x0f, 0x59, 0x38, 0x7b, 0xf0,
3481 0x97, 0x7a, 0x6d, 0x79, 0xc9, 0x5b, 0x83, 0x18, 0x84,
3482 0xe8, 0xed, 0x26, 0x1b, 0xdd, 0x09, 0x58, 0x87, 0x16,
3483 0x91, 0xc7, 0x0a, 0x3f, 0xe2,
3484 },
3485 {
3486 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3487 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3488 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3489 0x00, 0x00, 0x00, 0x00, 0x00,
3490 },
3491 {
3492 0x26, 0xdf, 0xf7, 0x9a, 0xd2, 0xe7, 0x29, 0x32, 0xcc,
3493 0xb0, 0x0a, 0xfe, 0x66, 0x90, 0x5f, 0xb9, 0x66, 0xfc,
3494 0x7a, 0x05, 0x7b, 0x49, 0x1c, 0x37, 0x5a, 0x31, 0x54,
3495 0x0a, 0x79, 0xe3, 0x0a, 0x47, 0x80, 0x70, 0x8a, 0x1e,
3496 0x92, 0x8d, 0x7c, 0x6e, 0xf9, 0x59, 0x43, 0x3b, 0x9a,
3497 0x0d, 0xbd, 0x19, 0xcc, 0x73, 0x08, 0x2c, 0xf5, 0xd3,
3498 0x04, 0xff, 0x2e, 0x9a, 0xcb, 0xc5, 0x62, 0x20, 0x02,
3499 0x50, 0xe7, 0x37, 0x6d, 0x7d, 0x35, 0xf2, 0x2b, 0xfa,
3500 0x25, 0x7c, 0x86, 0xb0, 0xda, 0x74, 0x83, 0x79, 0x1f,
3501 0x8f, 0x82, 0xe7, 0x95, 0x59, 0xe5, 0xb4, 0xb9, 0xbf,
3502 0xe0, 0xe1, 0xfe, 0xc5, 0x2a, 0xc4, 0x09, 0x33, 0xb3,
3503 0x93, 0x4b, 0x13, 0xdd, 0x65, 0x0e, 0xd5, 0xcc, 0x18,
3504 0x3e, 0x79, 0x6b, 0xe3, 0x5f, 0xc5, 0x9f, 0xaf, 0x51,
3505 0x3c, 0x40, 0xf1, 0x24, 0x9b, 0xc8, 0xfe, 0xc4, 0xf2,
3506 0xf6, 0x11,
3507 }
3508 };
3509
3510 TC_PRINT(".");
3511 result = do_hmac_prng_pr_false_test(55, &vec);
3512
3513 return result;
3514 }
3515
test_56(void)3516 unsigned int test_56(void)
3517 {
3518 unsigned int result = TC_PASS;
3519 const struct hmac_prng_test_vector vec = {
3520 32,
3521 16,
3522 32,
3523 0,
3524 128,
3525 {
3526 0xf1, 0x9f, 0x4d, 0xd4, 0x01, 0xe7, 0xfb, 0x21, 0xb3,
3527 0xf7, 0xf7, 0x3c, 0x8b, 0x39, 0x0e, 0xb6, 0x76, 0xf8,
3528 0x95, 0xda, 0xab, 0x86, 0x0b, 0x49, 0x1c, 0xb2, 0xfa,
3529 0xc8, 0x51, 0x97, 0xc1, 0x49,
3530 },
3531 {
3532 0x25, 0x38, 0xe6, 0xbe, 0x68, 0x44, 0x1f, 0x15, 0xac,
3533 0x6f, 0xd0, 0xa3, 0x4e, 0xf3, 0xb8, 0xb8,
3534 },
3535 {
3536 0x12, 0x35, 0x2e, 0x74, 0xb9, 0x12, 0xc5, 0xc6, 0x37,
3537 0xaf, 0x35, 0xb1, 0x90, 0x47, 0x77, 0x5f, 0x9c, 0xae,
3538 0x26, 0xc1, 0xad, 0x49, 0xc5, 0xd5, 0x6c, 0xd2, 0x87,
3539 0xc7, 0xb4, 0x11, 0x76, 0x22,
3540 },
3541 {
3542 0x05, 0x1f, 0xfc, 0xc7, 0x64, 0x79, 0xa5, 0x67, 0x0c,
3543 0xb0, 0xfb, 0xba, 0x2b, 0xdc, 0x83, 0x79, 0x33, 0x1d,
3544 0x8d, 0xba, 0xd0, 0x60, 0x69, 0xf9, 0xa5, 0xe3, 0x6c,
3545 0xb8, 0xf7, 0xaf, 0xb3, 0x98,
3546 },
3547 {
3548 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3549 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3550 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3551 0x00, 0x00, 0x00, 0x00, 0x00,
3552 },
3553 {
3554 0x8c, 0x44, 0xe3, 0xd5, 0xd0, 0xfe, 0xe7, 0x9b, 0x1a,
3555 0x25, 0x8f, 0x3e, 0x30, 0xe3, 0xcd, 0x9a, 0x0e, 0xbd,
3556 0x12, 0xcf, 0x68, 0x97, 0x8c, 0xca, 0x5e, 0xd0, 0x53,
3557 0x44, 0x76, 0x57, 0xff, 0x41, 0x05, 0x77, 0x8b, 0x4d,
3558 0xd8, 0x72, 0xfd, 0xe9, 0x2f, 0x98, 0x80, 0x4a, 0x72,
3559 0x42, 0xea, 0x57, 0xe1, 0x3b, 0x0d, 0x6a, 0x8d, 0x49,
3560 0x37, 0x37, 0x48, 0xc4, 0x95, 0xa7, 0x7d, 0xe8, 0x0e,
3561 0xfe, 0x24, 0xfa, 0xe7, 0x68, 0x60, 0x4d, 0x1c, 0xbb,
3562 0x94, 0xeb, 0xd0, 0x8f, 0x37, 0x91, 0x40, 0xea, 0x52,
3563 0x08, 0xdb, 0x58, 0x9d, 0x1d, 0x1d, 0xdc, 0xb6, 0x9e,
3564 0xcc, 0x76, 0x4b, 0x51, 0xfc, 0x08, 0x25, 0x08, 0xac,
3565 0xd6, 0x93, 0xce, 0xdb, 0xc7, 0x07, 0x0f, 0x55, 0x2d,
3566 0x29, 0x4b, 0x6b, 0x2b, 0xab, 0x9c, 0x7b, 0x6c, 0x9c,
3567 0x0e, 0x06, 0x88, 0x8b, 0xab, 0xbd, 0x75, 0x68, 0x8c,
3568 0xf5, 0x36,
3569 }
3570 };
3571
3572 TC_PRINT(".");
3573 result = do_hmac_prng_pr_false_test(56, &vec);
3574
3575 return result;
3576 }
3577
test_57(void)3578 unsigned int test_57(void)
3579 {
3580 unsigned int result = TC_PASS;
3581 const struct hmac_prng_test_vector vec = {
3582 32,
3583 16,
3584 32,
3585 0,
3586 128,
3587 {
3588 0xa0, 0x24, 0x5f, 0x99, 0x08, 0xf6, 0xc6, 0x64, 0xde,
3589 0xa7, 0x68, 0x9e, 0x97, 0x1a, 0x1f, 0xf2, 0xc1, 0x89,
3590 0xee, 0xe4, 0x22, 0xea, 0x15, 0x7d, 0x40, 0xa4, 0x44,
3591 0xd8, 0x3c, 0x94, 0x19, 0x80,
3592 },
3593 {
3594 0xf5, 0x69, 0xf2, 0xaf, 0x4d, 0x5f, 0xbb, 0xb7, 0x81,
3595 0x3f, 0x3e, 0x24, 0x4e, 0x4d, 0x3d, 0xc4,
3596 },
3597 {
3598 0x88, 0x7e, 0x6c, 0x40, 0x26, 0x35, 0x97, 0xd7, 0x56,
3599 0xc2, 0x5b, 0x40, 0x15, 0xe7, 0x09, 0xa9, 0x66, 0x3e,
3600 0x48, 0xd5, 0xa9, 0xfb, 0xb4, 0x81, 0x3b, 0x85, 0xa5,
3601 0x3b, 0x99, 0x7a, 0x64, 0xb6,
3602 },
3603 {
3604 0x2b, 0x85, 0x59, 0x8a, 0x4f, 0x92, 0xa0, 0x0f, 0x4c,
3605 0xb4, 0xc1, 0xfa, 0xd1, 0x82, 0x9e, 0xd6, 0xf8, 0xf0,
3606 0x2a, 0x8a, 0x81, 0x02, 0x7d, 0x14, 0xb6, 0x57, 0x4c,
3607 0x91, 0x78, 0x3c, 0x1d, 0xc4,
3608 },
3609 {
3610 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3611 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3612 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3613 0x00, 0x00, 0x00, 0x00, 0x00,
3614 },
3615 {
3616 0xb4, 0xc4, 0xf4, 0x13, 0x96, 0x70, 0x6c, 0xf3, 0x6d,
3617 0x6c, 0xd9, 0xff, 0xb6, 0xf8, 0xa9, 0x4c, 0x46, 0x82,
3618 0xa8, 0x69, 0x2a, 0xe9, 0xd8, 0xea, 0xd8, 0x0a, 0xe8,
3619 0x9d, 0x96, 0x4a, 0x01, 0xa5, 0xde, 0xc1, 0x49, 0x3d,
3620 0x96, 0xe7, 0x64, 0xb9, 0x49, 0x35, 0xf8, 0x8d, 0xfd,
3621 0x95, 0xe7, 0xb5, 0xfd, 0x19, 0x6e, 0xed, 0xa8, 0xc2,
3622 0xaf, 0xe9, 0x94, 0x6d, 0xca, 0x07, 0x25, 0xff, 0x51,
3623 0x7d, 0x7b, 0xa3, 0xd8, 0xf7, 0xe0, 0x17, 0x41, 0x19,
3624 0x23, 0xfa, 0xa9, 0x28, 0x9f, 0x68, 0xb7, 0xf7, 0xba,
3625 0x6e, 0x29, 0xe3, 0xde, 0x65, 0x2f, 0xa4, 0xd6, 0x0e,
3626 0x8c, 0xac, 0xf5, 0x82, 0xef, 0xa2, 0x15, 0x7a, 0x23,
3627 0xe9, 0x53, 0xb5, 0x03, 0x98, 0x1c, 0x48, 0x5c, 0xf5,
3628 0x23, 0xbd, 0x14, 0x56, 0xbb, 0x7e, 0x8c, 0x32, 0x2f,
3629 0x7b, 0xf0, 0x06, 0x22, 0x3e, 0x37, 0x74, 0x69, 0x75,
3630 0x00, 0xfd,
3631 }
3632 };
3633
3634 TC_PRINT(".");
3635 result = do_hmac_prng_pr_false_test(57, &vec);
3636
3637 return result;
3638 }
3639
test_58(void)3640 unsigned int test_58(void)
3641 {
3642 unsigned int result = TC_PASS;
3643 const struct hmac_prng_test_vector vec = {
3644 32,
3645 16,
3646 32,
3647 0,
3648 128,
3649 {
3650 0xee, 0x8f, 0x7a, 0x02, 0x9a, 0xa7, 0xd2, 0x20, 0xa5,
3651 0xa1, 0x9d, 0x28, 0x5f, 0xff, 0x41, 0x1f, 0x2e, 0xd5,
3652 0x66, 0xa1, 0x2e, 0xc3, 0xc8, 0x13, 0xf9, 0x55, 0x9d,
3653 0x22, 0x1d, 0xa3, 0x8e, 0x81,
3654 },
3655 {
3656 0xb0, 0x28, 0xd4, 0xb9, 0x6d, 0x9a, 0x61, 0x80, 0x1d,
3657 0x24, 0x53, 0xc4, 0xb4, 0x2f, 0xaf, 0xdb,
3658 },
3659 {
3660 0x28, 0x2c, 0xf8, 0x31, 0x13, 0x75, 0x83, 0x7c, 0x25,
3661 0x77, 0xd3, 0x1c, 0x50, 0x3e, 0xc0, 0x60, 0x23, 0xf8,
3662 0xe2, 0xa5, 0xa0, 0xa2, 0xe5, 0xcf, 0x9c, 0xb7, 0xd9,
3663 0x11, 0x89, 0x9f, 0x2b, 0x5a,
3664 },
3665 {
3666 0x4c, 0x7b, 0x59, 0xe4, 0xdf, 0xd6, 0x9c, 0x36, 0xfe,
3667 0xd4, 0xa1, 0x28, 0xd7, 0xe6, 0x3d, 0x5e, 0x76, 0x47,
3668 0x14, 0x3f, 0x5d, 0x4a, 0xab, 0x55, 0x51, 0x6e, 0xad,
3669 0x95, 0x9c, 0x05, 0x94, 0x6a,
3670 },
3671 {
3672 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3673 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3674 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3675 0x00, 0x00, 0x00, 0x00, 0x00,
3676 },
3677 {
3678 0xb6, 0xe8, 0x89, 0xd0, 0x2d, 0x5d, 0x4c, 0xd5, 0xa9,
3679 0x37, 0xc7, 0x94, 0x94, 0xe9, 0x92, 0x8c, 0x38, 0x3d,
3680 0x5a, 0x3b, 0xb1, 0x1f, 0x6c, 0xea, 0xa1, 0x80, 0xc7,
3681 0x96, 0x47, 0x96, 0xac, 0x59, 0xfc, 0xc2, 0x46, 0x61,
3682 0x71, 0xd6, 0x1f, 0x53, 0x3c, 0xea, 0xee, 0x81, 0xb0,
3683 0xdc, 0x76, 0x3f, 0x0c, 0x62, 0xc4, 0x49, 0xb7, 0x79,
3684 0xcd, 0x30, 0x3d, 0xdf, 0x56, 0xe1, 0xce, 0x01, 0xdc,
3685 0x12, 0x7b, 0xf1, 0xbb, 0x52, 0x67, 0x23, 0xfd, 0x7f,
3686 0x2f, 0x05, 0x46, 0x76, 0xd6, 0x51, 0xc9, 0x4d, 0xfb,
3687 0x06, 0x23, 0xf9, 0x72, 0x22, 0xe3, 0x42, 0x41, 0xb5,
3688 0x65, 0x4d, 0x5d, 0x9f, 0x23, 0x1b, 0x99, 0x41, 0x1c,
3689 0x0f, 0x36, 0xd5, 0x7f, 0xcb, 0xd0, 0xed, 0x49, 0xe2,
3690 0xea, 0xc4, 0x7d, 0xb3, 0xf2, 0xa1, 0x22, 0x17, 0x8e,
3691 0x11, 0x6d, 0x68, 0xf0, 0x4f, 0xe0, 0x89, 0x88, 0x54,
3692 0xe6, 0x95,
3693 }
3694 };
3695
3696 TC_PRINT(".");
3697 result = do_hmac_prng_pr_false_test(58, &vec);
3698
3699 return result;
3700 }
3701
test_59(void)3702 unsigned int test_59(void)
3703 {
3704 unsigned int result = TC_PASS;
3705 const struct hmac_prng_test_vector vec = {
3706 32,
3707 16,
3708 32,
3709 0,
3710 128,
3711 {
3712 0x10, 0xb8, 0x78, 0x9c, 0xdb, 0xd6, 0x77, 0x84, 0x42,
3713 0xa4, 0x5e, 0xdf, 0x22, 0x8b, 0x99, 0x23, 0xf4, 0x52,
3714 0x63, 0x1a, 0xd0, 0xfe, 0x9e, 0x60, 0x8d, 0x10, 0x82,
3715 0x6b, 0xa7, 0x1d, 0xa7, 0xca,
3716 },
3717 {
3718 0x15, 0x9f, 0xc5, 0xd8, 0xe5, 0x0e, 0xb5, 0x6e, 0x22,
3719 0x97, 0x47, 0x89, 0xb1, 0xdc, 0x20, 0xd1,
3720 },
3721 {
3722 0x2d, 0xd5, 0x9e, 0x37, 0x76, 0x6c, 0x66, 0x75, 0x71,
3723 0xb7, 0x79, 0xc0, 0x6e, 0x12, 0xba, 0x21, 0x91, 0x88,
3724 0x48, 0x97, 0x72, 0xf4, 0x86, 0x31, 0xa6, 0x72, 0x8b,
3725 0x5b, 0x86, 0x7e, 0x3c, 0xf4,
3726 },
3727 {
3728 0x96, 0x6d, 0x94, 0x20, 0x38, 0x03, 0x05, 0x09, 0xb2,
3729 0x0e, 0x61, 0x00, 0x62, 0x04, 0x2b, 0x6b, 0xf1, 0x04,
3730 0x81, 0x28, 0x18, 0x89, 0x32, 0x92, 0xa6, 0x8d, 0x57,
3731 0xd1, 0xce, 0x86, 0x51, 0x51,
3732 },
3733 {
3734 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3735 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3736 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3737 0x00, 0x00, 0x00, 0x00, 0x00,
3738 },
3739 {
3740 0x3e, 0x6a, 0xcd, 0x8b, 0x4e, 0x85, 0xb4, 0xa0, 0xf7,
3741 0x92, 0x8f, 0x6b, 0xd4, 0x1a, 0x8e, 0x6b, 0x52, 0x52,
3742 0x4f, 0xe7, 0x27, 0x23, 0xa0, 0x50, 0x96, 0x37, 0xd3,
3743 0x3f, 0x15, 0xaf, 0xe7, 0xd8, 0xda, 0x6a, 0x15, 0x20,
3744 0x9b, 0x9e, 0x41, 0x49, 0x57, 0x6f, 0xbb, 0x1f, 0xd8,
3745 0x31, 0xf7, 0x84, 0xc0, 0x44, 0x39, 0xab, 0xda, 0x46,
3746 0x05, 0xd0, 0x65, 0x56, 0xdc, 0x30, 0x02, 0x05, 0x5b,
3747 0x58, 0x55, 0xfb, 0xa2, 0x01, 0xf6, 0xda, 0xef, 0x79,
3748 0xf7, 0x8d, 0x00, 0x1e, 0xd6, 0x9e, 0xca, 0x8a, 0x41,
3749 0x85, 0x13, 0xd0, 0x24, 0x64, 0xe8, 0xd7, 0x42, 0xc2,
3750 0x79, 0x9c, 0xd6, 0x8e, 0xdf, 0xbe, 0x88, 0xae, 0x9b,
3751 0x35, 0xa0, 0xaa, 0x06, 0x5c, 0x42, 0xa4, 0x77, 0x00,
3752 0x58, 0xc4, 0xb0, 0x26, 0xd0, 0x35, 0x0a, 0x7a, 0xfa,
3753 0x9c, 0x52, 0xc3, 0xc7, 0xfa, 0x05, 0x4f, 0x8a, 0x96,
3754 0xd8, 0x87,
3755 }
3756 };
3757
3758 TC_PRINT(".");
3759 result = do_hmac_prng_pr_false_test(59, &vec);
3760
3761 return result;
3762 }
3763
test_60(void)3764 unsigned int test_60(void)
3765 {
3766 unsigned int result = TC_PASS;
3767 const struct hmac_prng_test_vector vec = {
3768 32,
3769 16,
3770 32,
3771 0,
3772 128,
3773 {
3774 0x98, 0x29, 0xd2, 0xe5, 0x40, 0x96, 0x29, 0xd9, 0xc5,
3775 0x3c, 0x7d, 0xbb, 0x16, 0xc6, 0x19, 0xb6, 0x16, 0xb0,
3776 0xd1, 0x73, 0x94, 0xa3, 0xe0, 0x55, 0xbf, 0x6f, 0xae,
3777 0x9f, 0xcb, 0xbb, 0xaf, 0xd4,
3778 },
3779 {
3780 0xe1, 0x5d, 0x27, 0x62, 0x63, 0x15, 0x16, 0x80, 0x7c,
3781 0x1f, 0x07, 0x33, 0x82, 0xe8, 0x52, 0x12,
3782 },
3783 {
3784 0x25, 0x56, 0xe3, 0xd7, 0x5e, 0xef, 0xe6, 0xb6, 0x17,
3785 0x13, 0x28, 0xe6, 0x60, 0xbb, 0x65, 0x58, 0xda, 0xdf,
3786 0xfa, 0xa1, 0xe0, 0x32, 0xe7, 0xeb, 0xb6, 0xb3, 0x26,
3787 0x2a, 0xdd, 0xe0, 0xdd, 0xeb,
3788 },
3789 {
3790 0xa4, 0xf4, 0xe2, 0x8b, 0x33, 0x0b, 0x73, 0x38, 0x2f,
3791 0xcc, 0x5c, 0x85, 0x7e, 0xd6, 0x2e, 0x94, 0x5f, 0xd9,
3792 0x71, 0x55, 0x40, 0x64, 0x54, 0x54, 0x37, 0xa5, 0xd2,
3793 0x2d, 0xdc, 0xbf, 0xf3, 0xee,
3794 },
3795 {
3796 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3797 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3798 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3799 0x00, 0x00, 0x00, 0x00, 0x00,
3800 },
3801 {
3802 0x74, 0x74, 0x02, 0xc5, 0x0d, 0xcc, 0xc3, 0xa6, 0x66,
3803 0xd9, 0x4d, 0x2d, 0x6f, 0x6f, 0x43, 0xfd, 0x2b, 0x50,
3804 0x53, 0x84, 0x73, 0x3c, 0x97, 0x62, 0xc2, 0xef, 0x84,
3805 0x93, 0x6f, 0xb3, 0x29, 0xc3, 0x66, 0x54, 0x12, 0x88,
3806 0xfb, 0xc5, 0x78, 0xe9, 0x39, 0x7b, 0x5b, 0x11, 0x98,
3807 0xf1, 0x66, 0x5f, 0x8c, 0x37, 0x3d, 0xe8, 0x55, 0x6d,
3808 0x3c, 0x08, 0xc6, 0x61, 0x9a, 0xa3, 0xb3, 0x55, 0xdb,
3809 0x20, 0x6f, 0x84, 0x0b, 0x6a, 0xa4, 0xcc, 0x72, 0x20,
3810 0x6d, 0x7f, 0xef, 0xb2, 0x43, 0x5d, 0x6b, 0x02, 0x4e,
3811 0x4c, 0x15, 0x68, 0xe9, 0xab, 0x31, 0xf7, 0x11, 0x0f,
3812 0x43, 0x11, 0xb0, 0x5d, 0x79, 0x96, 0xce, 0xba, 0x6e,
3813 0x5e, 0x6b, 0xb9, 0x00, 0xf8, 0xe7, 0x21, 0xae, 0x10,
3814 0x6a, 0x95, 0x11, 0xf8, 0x92, 0x6d, 0xe2, 0xf8, 0x48,
3815 0x71, 0x00, 0x69, 0x8a, 0xa8, 0xfe, 0x99, 0x53, 0x88,
3816 0xa0, 0x72,
3817 }
3818 };
3819
3820 TC_PRINT(".");
3821 result = do_hmac_prng_pr_false_test(60, &vec);
3822
3823 return result;
3824 }
3825
test_61(void)3826 unsigned int test_61(void)
3827 {
3828 unsigned int result = TC_PASS;
3829 const struct hmac_prng_test_vector vec = {
3830 32,
3831 16,
3832 0,
3833 0,
3834 128,
3835 {
3836 0x6a, 0xe8, 0x03, 0x03, 0x29, 0x23, 0x91, 0x33, 0x5b,
3837 0xf9, 0xc9, 0x38, 0x7f, 0xbd, 0x3b, 0xf6, 0x15, 0x75,
3838 0x6c, 0x9c, 0x27, 0xc3, 0x47, 0x8c, 0x87, 0xe2, 0x60,
3839 0xcf, 0x97, 0xd4, 0x71, 0x10,
3840 },
3841 {
3842 0x01, 0xe1, 0x62, 0x47, 0xdd, 0x4c, 0xae, 0x64, 0x99,
3843 0x33, 0x7d, 0x82, 0x78, 0x4e, 0xa5, 0x7f,
3844 },
3845 {
3846 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3847 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3848 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3849 0x00, 0x00, 0x00, 0x00, 0x00,
3850 },
3851 {
3852 0x03, 0x57, 0x02, 0xef, 0x4e, 0x11, 0x2b, 0x17, 0x31,
3853 0x12, 0xc5, 0x85, 0x1d, 0x07, 0xb2, 0x79, 0x30, 0x98,
3854 0x63, 0x74, 0x0d, 0x38, 0xd0, 0xd0, 0x72, 0x02, 0x23,
3855 0xe2, 0x40, 0x17, 0xbb, 0xc0,
3856 },
3857 {
3858 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3859 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3860 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3861 0x00, 0x00, 0x00, 0x00, 0x00,
3862 },
3863 {
3864 0xcf, 0x43, 0x15, 0x59, 0x8f, 0xcd, 0x6a, 0xf1, 0x31,
3865 0x55, 0x18, 0xc4, 0xbf, 0xba, 0xc0, 0x54, 0x0c, 0x58,
3866 0x96, 0x35, 0x27, 0x35, 0x48, 0xa7, 0xb5, 0x07, 0xe7,
3867 0xd2, 0xe6, 0x85, 0xe5, 0x94, 0x7b, 0x87, 0xae, 0x25,
3868 0x7e, 0x58, 0xfa, 0xf2, 0x14, 0xf2, 0xb5, 0x8e, 0xd1,
3869 0x0c, 0x3b, 0xd3, 0x5f, 0x75, 0xf6, 0xc3, 0x5d, 0xd6,
3870 0xd4, 0x41, 0xc9, 0x3b, 0xcd, 0x42, 0xe7, 0x17, 0x20,
3871 0x10, 0x26, 0x31, 0xb1, 0xa6, 0xa4, 0xba, 0x24, 0x7c,
3872 0x17, 0x5e, 0xd8, 0x00, 0xcf, 0xca, 0x6e, 0x1e, 0x83,
3873 0x9b, 0x5a, 0xa9, 0x07, 0x60, 0x4c, 0xcf, 0xe6, 0xf9,
3874 0x84, 0xf6, 0x82, 0x2e, 0x00, 0x1a, 0xb0, 0x2d, 0xd6,
3875 0x63, 0x49, 0x64, 0xf7, 0x89, 0xcb, 0x10, 0x7a, 0x97,
3876 0x73, 0x46, 0x69, 0x3f, 0x32, 0x44, 0xc8, 0x95, 0xe8,
3877 0x40, 0xdf, 0xa0, 0xed, 0xf7, 0xf1, 0x4d, 0xc6, 0x1d,
3878 0x79, 0x4f,
3879 }
3880 };
3881
3882 TC_PRINT(".");
3883 result = do_hmac_prng_pr_false_test(61, &vec);
3884
3885 return result;
3886 }
3887
test_62(void)3888 unsigned int test_62(void)
3889 {
3890 unsigned int result = TC_PASS;
3891 const struct hmac_prng_test_vector vec = {
3892 32,
3893 16,
3894 0,
3895 0,
3896 128,
3897 {
3898 0xda, 0x2c, 0x40, 0x6c, 0x1a, 0x40, 0xf1, 0xbe, 0x98,
3899 0xfd, 0xb2, 0x86, 0x07, 0x8a, 0x92, 0x7f, 0x60, 0x6a,
3900 0xe8, 0xec, 0x91, 0xab, 0x3a, 0x66, 0x3f, 0xe2, 0x13,
3901 0xfd, 0x8f, 0x05, 0x23, 0xf9,
3902 },
3903 {
3904 0x4b, 0x49, 0x85, 0x7c, 0x62, 0x5f, 0x7a, 0x6c, 0xa2,
3905 0x66, 0x9a, 0xba, 0x21, 0x3d, 0x79, 0xcb,
3906 },
3907 {
3908 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3909 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3910 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3911 0x00, 0x00, 0x00, 0x00, 0x00,
3912 },
3913 {
3914 0x52, 0xc1, 0xc0, 0x06, 0xc5, 0x77, 0x96, 0x91, 0x79,
3915 0xcc, 0x1f, 0xef, 0xff, 0x1b, 0xb0, 0xdc, 0x42, 0x25,
3916 0x5c, 0x35, 0x8b, 0x68, 0x6c, 0x73, 0x21, 0x6d, 0xa1,
3917 0x21, 0x6f, 0x82, 0xff, 0xfb,
3918 },
3919 {
3920 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3921 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3922 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3923 0x00, 0x00, 0x00, 0x00, 0x00,
3924 },
3925 {
3926 0x5b, 0x6e, 0x8e, 0xf0, 0x30, 0x07, 0x12, 0xaa, 0xeb,
3927 0x44, 0xa5, 0x2f, 0x91, 0xca, 0x2f, 0x3d, 0xee, 0xfc,
3928 0xee, 0xa9, 0x5c, 0xe2, 0x8e, 0x8c, 0x4d, 0x93, 0x10,
3929 0x12, 0x5a, 0x7d, 0x25, 0x9c, 0x34, 0x23, 0xb2, 0xcd,
3930 0x66, 0x2b, 0x33, 0x37, 0xae, 0xdf, 0x7d, 0xf1, 0x27,
3931 0x19, 0xaf, 0x7b, 0xe6, 0xca, 0xcb, 0x3a, 0x65, 0x65,
3932 0x07, 0x0f, 0xaf, 0xc9, 0x86, 0xc3, 0x36, 0x83, 0x6a,
3933 0xa2, 0xe1, 0x8c, 0x23, 0x7b, 0x23, 0xff, 0x19, 0x33,
3934 0x9b, 0x4b, 0x5e, 0xf7, 0x04, 0x63, 0x4f, 0x16, 0x26,
3935 0xd6, 0x6b, 0xce, 0x9e, 0x72, 0x55, 0x51, 0x83, 0x74,
3936 0x2b, 0x59, 0x13, 0x35, 0x82, 0x1c, 0xe9, 0xc3, 0xa9,
3937 0x5f, 0x2a, 0x1b, 0xea, 0xb6, 0xb0, 0x65, 0x9f, 0xfe,
3938 0x6e, 0x94, 0x0b, 0x55, 0x9d, 0xfb, 0x8a, 0x8d, 0xf1,
3939 0xa4, 0x73, 0x30, 0x8c, 0x31, 0x54, 0x58, 0x4e, 0xbf,
3940 0x96, 0x22,
3941 }
3942 };
3943
3944 TC_PRINT(".");
3945 result = do_hmac_prng_pr_false_test(62, &vec);
3946
3947 return result;
3948 }
3949
test_63(void)3950 unsigned int test_63(void)
3951 {
3952 unsigned int result = TC_PASS;
3953 const struct hmac_prng_test_vector vec = {
3954 32,
3955 16,
3956 0,
3957 0,
3958 128,
3959 {
3960 0x5b, 0x77, 0xe8, 0x85, 0x05, 0x6b, 0x4f, 0xaf, 0x9d,
3961 0x8e, 0xf9, 0xc8, 0x57, 0x30, 0xfd, 0x50, 0x75, 0xf0,
3962 0xa0, 0x70, 0x15, 0xc6, 0xdb, 0xd7, 0x32, 0x3c, 0xe6,
3963 0x3e, 0xa5, 0xd7, 0x1e, 0x42,
3964 },
3965 {
3966 0x9a, 0xc3, 0xae, 0x89, 0xcf, 0xb2, 0x86, 0xb3, 0x11,
3967 0x49, 0xe7, 0x8b, 0xce, 0xd8, 0xcf, 0xf0,
3968 },
3969 {
3970 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3971 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3973 0x00, 0x00, 0x00, 0x00, 0x00,
3974 },
3975 {
3976 0x0d, 0xa5, 0xab, 0x25, 0x7b, 0x38, 0x96, 0x73, 0x85,
3977 0x2c, 0xde, 0x48, 0x00, 0xc0, 0x5a, 0xca, 0x59, 0x6e,
3978 0xc5, 0x7c, 0x25, 0xd7, 0xda, 0x45, 0x19, 0x11, 0x48,
3979 0x7a, 0x5b, 0xa6, 0xbd, 0xaa,
3980 },
3981 {
3982 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3983 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3984 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3985 0x00, 0x00, 0x00, 0x00, 0x00,
3986 },
3987 {
3988 0x1d, 0x60, 0x4f, 0x4d, 0x5b, 0xb1, 0x0e, 0x11, 0x4a,
3989 0xed, 0x67, 0x8a, 0x51, 0x39, 0xbb, 0x46, 0xee, 0x69,
3990 0x55, 0xd8, 0x6e, 0x06, 0x3d, 0x17, 0xca, 0x5e, 0xf6,
3991 0xdb, 0x38, 0x71, 0x51, 0x43, 0x0d, 0xb2, 0x3a, 0xa0,
3992 0xb4, 0x8a, 0x34, 0x3b, 0x2d, 0x35, 0x00, 0x3d, 0x29,
3993 0x5f, 0xd0, 0x24, 0xfc, 0x34, 0x4e, 0x7c, 0x01, 0x06,
3994 0x49, 0x24, 0x84, 0x69, 0xda, 0x7d, 0x9a, 0xb7, 0xe2,
3995 0x50, 0x97, 0xbe, 0x35, 0xfe, 0xda, 0xd1, 0xba, 0x89,
3996 0xad, 0x66, 0xaf, 0x96, 0x80, 0x9c, 0x64, 0xba, 0x3b,
3997 0x2e, 0xfe, 0x60, 0x1c, 0x1d, 0x6c, 0x20, 0x1c, 0xa5,
3998 0x5e, 0xa8, 0x2d, 0x90, 0x1a, 0xf1, 0x46, 0xf2, 0x00,
3999 0x29, 0x1b, 0x11, 0x3f, 0xbb, 0x05, 0x9a, 0x20, 0x43,
4000 0x28, 0x5a, 0x8d, 0x88, 0xee, 0x65, 0x5d, 0xa7, 0x6f,
4001 0x83, 0x79, 0x08, 0xec, 0xfc, 0x9b, 0xc0, 0xbb, 0xae,
4002 0xc1, 0xc3,
4003 }
4004 };
4005
4006 TC_PRINT(".");
4007 result = do_hmac_prng_pr_false_test(63, &vec);
4008
4009 return result;
4010 }
4011
test_64(void)4012 unsigned int test_64(void)
4013 {
4014 unsigned int result = TC_PASS;
4015 const struct hmac_prng_test_vector vec = {
4016 32,
4017 16,
4018 0,
4019 0,
4020 128,
4021 {
4022 0x40, 0x30, 0xb2, 0xa9, 0x83, 0xa8, 0xe2, 0x14, 0xc9,
4023 0xb6, 0x05, 0x3f, 0x47, 0x4d, 0xeb, 0xb1, 0x35, 0x52,
4024 0x2e, 0x2b, 0x0d, 0x50, 0xae, 0x98, 0x44, 0x1b, 0xef,
4025 0x99, 0xb9, 0x3e, 0x63, 0xb4,
4026 },
4027 {
4028 0xd6, 0x29, 0x2c, 0x76, 0x33, 0xac, 0xc7, 0xa1, 0x7e,
4029 0x79, 0x7a, 0x14, 0x99, 0x43, 0xe6, 0xe4,
4030 },
4031 {
4032 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4033 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4034 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4035 0x00, 0x00, 0x00, 0x00, 0x00,
4036 },
4037 {
4038 0xea, 0x9f, 0xf3, 0x34, 0x4c, 0xba, 0x86, 0x34, 0xe8,
4039 0x05, 0x8f, 0x09, 0x35, 0x10, 0x51, 0x9c, 0x4c, 0xb9,
4040 0x3a, 0x1a, 0xb4, 0x7c, 0x31, 0x23, 0x67, 0x42, 0x95,
4041 0x28, 0x0a, 0x26, 0x30, 0x9c,
4042 },
4043 {
4044 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4045 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4046 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4047 0x00, 0x00, 0x00, 0x00, 0x00,
4048 },
4049 {
4050 0xe9, 0x8a, 0x2d, 0x67, 0xd2, 0xd5, 0x2d, 0xc6, 0x12,
4051 0x43, 0x7c, 0x57, 0x87, 0xad, 0xad, 0x2f, 0x5d, 0xaa,
4052 0x82, 0x90, 0x42, 0x3c, 0x45, 0xe5, 0x90, 0x94, 0x55,
4053 0xe7, 0x55, 0xf2, 0xd4, 0xa7, 0x29, 0xa6, 0xe6, 0xcb,
4054 0x42, 0xf3, 0x6b, 0x0e, 0x40, 0x57, 0x1f, 0x1d, 0x77,
4055 0x21, 0xb4, 0x0e, 0x3d, 0x4f, 0x77, 0x3d, 0x84, 0x5e,
4056 0x72, 0x6e, 0x8e, 0x1e, 0x5b, 0xd9, 0x50, 0x4a, 0x94,
4057 0x59, 0x43, 0xf3, 0x34, 0x60, 0x3f, 0x28, 0x2b, 0xfc,
4058 0x7c, 0x5d, 0x8b, 0x2a, 0x6a, 0x1c, 0x82, 0xcc, 0xa1,
4059 0xee, 0x94, 0x3b, 0xe6, 0xc4, 0x64, 0xbc, 0xf8, 0xa4,
4060 0xdf, 0x47, 0x0d, 0x3d, 0xdc, 0xd7, 0xea, 0xb1, 0xe8,
4061 0xbb, 0xa0, 0x09, 0x0e, 0x53, 0x7c, 0x36, 0x70, 0xf4,
4062 0x24, 0x43, 0x8e, 0x3a, 0x0b, 0x19, 0x72, 0x97, 0xa7,
4063 0xa1, 0x6d, 0x12, 0xa2, 0x82, 0x55, 0x8d, 0x55, 0x6f,
4064 0x3b, 0x5e,
4065 }
4066 };
4067
4068 TC_PRINT(".");
4069 result = do_hmac_prng_pr_false_test(64, &vec);
4070
4071 return result;
4072 }
4073
test_65(void)4074 unsigned int test_65(void)
4075 {
4076 unsigned int result = TC_PASS;
4077 const struct hmac_prng_test_vector vec = {
4078 32,
4079 16,
4080 0,
4081 0,
4082 128,
4083 {
4084 0x94, 0x7b, 0x3f, 0x93, 0xa6, 0x01, 0xda, 0x15, 0xaa,
4085 0xec, 0x58, 0x07, 0x8d, 0x19, 0x8c, 0x20, 0xc9, 0x13,
4086 0x79, 0xd5, 0xbf, 0x1c, 0x0d, 0xea, 0x32, 0x96, 0x91,
4087 0xf4, 0x7b, 0x3c, 0xdb, 0x40,
4088 },
4089 {
4090 0x97, 0x69, 0x2e, 0xbc, 0x8c, 0x9b, 0x04, 0x5b, 0x73,
4091 0xe8, 0x23, 0x50, 0x0e, 0xba, 0x50, 0x77,
4092 },
4093 {
4094 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4095 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4096 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4097 0x00, 0x00, 0x00, 0x00, 0x00,
4098 },
4099 {
4100 0x59, 0x9f, 0xe8, 0x4d, 0x8a, 0x84, 0xc3, 0x06, 0xee,
4101 0x33, 0x4a, 0x3b, 0x44, 0x30, 0x05, 0xe3, 0x3b, 0xa0,
4102 0xf8, 0xf5, 0x9b, 0x63, 0x6e, 0x67, 0xd7, 0x4f, 0x8c,
4103 0x59, 0x65, 0x58, 0xcf, 0x8e,
4104 },
4105 {
4106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4108 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4109 0x00, 0x00, 0x00, 0x00, 0x00,
4110 },
4111 {
4112 0x38, 0x8d, 0xe4, 0xee, 0x5c, 0x19, 0xad, 0x97, 0x2c,
4113 0x65, 0x0c, 0x86, 0x5e, 0xc3, 0x4f, 0x7d, 0xb6, 0x69,
4114 0x66, 0x9d, 0x32, 0x6f, 0x0c, 0x55, 0x89, 0xc5, 0xab,
4115 0x24, 0x10, 0xd6, 0x4f, 0x2d, 0x27, 0x14, 0x84, 0x3c,
4116 0xf5, 0xa2, 0x28, 0x8e, 0x37, 0x95, 0xfa, 0xe7, 0xf5,
4117 0x41, 0xfd, 0xa4, 0xbd, 0x4d, 0x48, 0x84, 0x01, 0x4c,
4118 0xc7, 0x75, 0x8e, 0xc2, 0x97, 0x3b, 0xce, 0x26, 0xa6,
4119 0xb4, 0xc4, 0xda, 0x09, 0x11, 0xde, 0xba, 0x01, 0x64,
4120 0x24, 0x63, 0x0d, 0x30, 0xd5, 0xf3, 0x53, 0x6e, 0x4e,
4121 0x79, 0x77, 0xdf, 0xc7, 0x0f, 0x40, 0xb5, 0x30, 0x8f,
4122 0x38, 0xef, 0x6e, 0x5a, 0x3d, 0xd7, 0xa0, 0x60, 0xda,
4123 0x5c, 0x68, 0xcc, 0xe2, 0x75, 0x05, 0x74, 0x5f, 0x57,
4124 0x68, 0x24, 0x5a, 0xb3, 0xc3, 0x1f, 0xdc, 0xc5, 0x40,
4125 0xd3, 0x76, 0x7b, 0x9f, 0xa6, 0x2d, 0x41, 0x71, 0xc7,
4126 0x15, 0xc7,
4127 }
4128 };
4129
4130 TC_PRINT(".");
4131 result = do_hmac_prng_pr_false_test(65, &vec);
4132
4133 return result;
4134 }
4135
test_66(void)4136 unsigned int test_66(void)
4137 {
4138 unsigned int result = TC_PASS;
4139 const struct hmac_prng_test_vector vec = {
4140 32,
4141 16,
4142 0,
4143 0,
4144 128,
4145 {
4146 0xc8, 0x68, 0xe7, 0x22, 0x1f, 0xe5, 0x65, 0xc1, 0x3e,
4147 0x46, 0xba, 0x78, 0x14, 0x17, 0xda, 0x8c, 0xf4, 0x2b,
4148 0xed, 0xc9, 0xbf, 0x5e, 0xca, 0xb8, 0x98, 0xf6, 0x4f,
4149 0x53, 0xa8, 0xe5, 0xbe, 0x2f,
4150 },
4151 {
4152 0x49, 0x24, 0x05, 0x87, 0xc2, 0xf9, 0xe2, 0xc9, 0xaf,
4153 0xae, 0x3a, 0x7a, 0xa7, 0x06, 0x20, 0x80,
4154 },
4155 {
4156 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4157 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4158 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4159 0x00, 0x00, 0x00, 0x00, 0x00,
4160 },
4161 {
4162 0xa6, 0x98, 0x20, 0x3c, 0x5f, 0x5e, 0x55, 0x9d, 0x5f,
4163 0x08, 0xdf, 0x28, 0x23, 0x0a, 0xb3, 0xb1, 0xff, 0x40,
4164 0x59, 0xce, 0x8e, 0x8b, 0x2b, 0x96, 0x76, 0x88, 0x03,
4165 0x13, 0xd1, 0x34, 0xf7, 0xfd,
4166 },
4167 {
4168 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4169 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4170 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4171 0x00, 0x00, 0x00, 0x00, 0x00,
4172 },
4173 {
4174 0x64, 0xe6, 0x9b, 0x9c, 0xdd, 0x82, 0x94, 0x57, 0x3c,
4175 0x67, 0xe0, 0x6c, 0xd6, 0x62, 0x66, 0x2e, 0x98, 0xcb,
4176 0xca, 0xb9, 0xb8, 0xfc, 0x8c, 0x9a, 0xd7, 0xd3, 0x66,
4177 0xc3, 0xf9, 0x78, 0xf1, 0x0a, 0xf1, 0xbb, 0xd9, 0x93,
4178 0x4a, 0xdb, 0x9a, 0x31, 0x22, 0x8d, 0x0c, 0x51, 0xa2,
4179 0x68, 0xac, 0xb7, 0x76, 0xe3, 0xdf, 0x0d, 0x9a, 0x5d,
4180 0xc4, 0x13, 0xda, 0x62, 0x36, 0xe7, 0x7c, 0x15, 0xf2,
4181 0x2d, 0xff, 0x41, 0x09, 0x11, 0x5e, 0x2e, 0x7a, 0x09,
4182 0xd4, 0x5d, 0x43, 0xf5, 0xa2, 0x69, 0x10, 0x4a, 0x71,
4183 0x7e, 0x10, 0x1f, 0x2c, 0x84, 0x27, 0x04, 0x9a, 0xb6,
4184 0x58, 0x8d, 0xaf, 0x89, 0x07, 0xe3, 0x31, 0x68, 0xee,
4185 0xbe, 0xde, 0xcc, 0x47, 0x01, 0x90, 0x65, 0x57, 0xf9,
4186 0x7f, 0xd3, 0x4b, 0x72, 0x46, 0x42, 0xf2, 0x85, 0xc0,
4187 0xb0, 0x6a, 0xbc, 0x3c, 0xa1, 0x5b, 0xe6, 0x87, 0xc9,
4188 0xbe, 0x1d,
4189 }
4190 };
4191
4192 TC_PRINT(".");
4193 result = do_hmac_prng_pr_false_test(66, &vec);
4194
4195 return result;
4196 }
4197
test_67(void)4198 unsigned int test_67(void)
4199 {
4200 unsigned int result = TC_PASS;
4201 const struct hmac_prng_test_vector vec = {
4202 32,
4203 16,
4204 0,
4205 0,
4206 128,
4207 {
4208 0x5b, 0x75, 0xc3, 0xc8, 0x00, 0x0a, 0x81, 0x72, 0x18,
4209 0x24, 0xe9, 0x67, 0x66, 0x62, 0x85, 0x12, 0x57, 0xff,
4210 0x31, 0x5b, 0x9f, 0x20, 0x65, 0x63, 0x1e, 0x4b, 0x1c,
4211 0x31, 0xa8, 0x24, 0xed, 0x0f,
4212 },
4213 {
4214 0x18, 0x71, 0xbf, 0x15, 0xff, 0x16, 0xe9, 0x4c, 0x9c,
4215 0x8d, 0x93, 0xda, 0x29, 0x51, 0x55, 0x66,
4216 },
4217 {
4218 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4219 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4220 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4221 0x00, 0x00, 0x00, 0x00, 0x00,
4222 },
4223 {
4224 0x99, 0x48, 0x67, 0xb4, 0x13, 0x45, 0x9c, 0x17, 0xa1,
4225 0xe5, 0x07, 0x69, 0xcb, 0x2d, 0xc3, 0x0a, 0x00, 0x12,
4226 0xc8, 0xd5, 0x94, 0x74, 0x2e, 0xd4, 0xea, 0x2c, 0x2a,
4227 0xc4, 0x34, 0xbe, 0x33, 0x86,
4228 },
4229 {
4230 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4231 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4232 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4233 0x00, 0x00, 0x00, 0x00, 0x00,
4234 },
4235 {
4236 0x2b, 0x40, 0xdb, 0x08, 0xa5, 0xe1, 0x5e, 0xb1, 0x81,
4237 0x7f, 0x05, 0x14, 0x1c, 0xb0, 0xb5, 0x86, 0x46, 0x84,
4238 0xea, 0x4e, 0x10, 0x04, 0xc2, 0x60, 0x98, 0xb4, 0x83,
4239 0x11, 0x9b, 0xde, 0x01, 0x75, 0x26, 0xdf, 0x8d, 0x39,
4240 0x3a, 0xbd, 0x6a, 0x26, 0x02, 0xf4, 0x2f, 0xe3, 0x52,
4241 0x24, 0xea, 0x7d, 0xee, 0xd2, 0xf6, 0x40, 0x3d, 0x92,
4242 0xc4, 0x1d, 0xf8, 0x01, 0xab, 0x93, 0x65, 0xce, 0x24,
4243 0xa6, 0xa9, 0xae, 0xa9, 0x08, 0xdc, 0xf6, 0x11, 0x3e,
4244 0x02, 0xcb, 0x67, 0xae, 0x13, 0x01, 0x5b, 0x61, 0x74,
4245 0xf2, 0x2c, 0xd9, 0x43, 0x31, 0xa4, 0x79, 0xab, 0x03,
4246 0xb7, 0xa1, 0x9d, 0xe2, 0x81, 0xe0, 0x69, 0xa1, 0x7b,
4247 0x60, 0x0c, 0x66, 0x49, 0xd7, 0xb8, 0x8e, 0x5b, 0xa3,
4248 0xf3, 0x40, 0xfb, 0xdb, 0x53, 0x7a, 0x9e, 0x45, 0x81,
4249 0x49, 0x6c, 0x8e, 0xaa, 0x40, 0xe5, 0xb8, 0x88, 0x62,
4250 0xc4, 0xb0,
4251 }
4252 };
4253
4254 TC_PRINT(".");
4255 result = do_hmac_prng_pr_false_test(67, &vec);
4256
4257 return result;
4258 }
4259
test_68(void)4260 unsigned int test_68(void)
4261 {
4262 unsigned int result = TC_PASS;
4263 const struct hmac_prng_test_vector vec = {
4264 32,
4265 16,
4266 0,
4267 0,
4268 128,
4269 {
4270 0xbb, 0x44, 0x58, 0xcc, 0xeb, 0x0d, 0xce, 0x73, 0x32,
4271 0xf3, 0x0c, 0xe9, 0x0f, 0x69, 0xd8, 0x28, 0x25, 0xb5,
4272 0x47, 0xbb, 0x51, 0x2a, 0xfb, 0xae, 0x3e, 0x1c, 0xba,
4273 0xaa, 0x4c, 0x17, 0x2b, 0x7b,
4274 },
4275 {
4276 0x60, 0xbd, 0x6a, 0x33, 0xbe, 0xe6, 0x1d, 0x1a, 0x9b,
4277 0xbf, 0xdd, 0xfe, 0xe6, 0x0f, 0x7a, 0x18,
4278 },
4279 {
4280 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4281 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4282 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4283 0x00, 0x00, 0x00, 0x00, 0x00,
4284 },
4285 {
4286 0xe8, 0x8a, 0x2a, 0xee, 0x17, 0xcc, 0x49, 0x16, 0x40,
4287 0xf2, 0xe0, 0xa6, 0x93, 0xf0, 0x3e, 0xbc, 0x48, 0xa9,
4288 0x57, 0x90, 0x31, 0x86, 0x1d, 0xf3, 0x1c, 0xdb, 0x42,
4289 0x64, 0x99, 0x7f, 0x8a, 0x64,
4290 },
4291 {
4292 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4293 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4294 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4295 0x00, 0x00, 0x00, 0x00, 0x00,
4296 },
4297 {
4298 0x5b, 0xea, 0x97, 0xa6, 0xda, 0xae, 0xe5, 0x40, 0xab,
4299 0x6d, 0x41, 0x7c, 0xa4, 0x58, 0x7c, 0x19, 0x8f, 0x58,
4300 0x9d, 0xb5, 0xac, 0x72, 0xb4, 0xf1, 0x38, 0x4b, 0x1b,
4301 0x1d, 0x8c, 0x03, 0xec, 0x73, 0xb2, 0x97, 0x93, 0x9f,
4302 0x5a, 0x8b, 0x82, 0x40, 0xfd, 0x10, 0x33, 0xca, 0xce,
4303 0x0e, 0x97, 0x1e, 0x3c, 0x3f, 0x49, 0x23, 0x9b, 0x16,
4304 0x85, 0x76, 0xf8, 0x3d, 0xce, 0x89, 0x53, 0x37, 0x87,
4305 0xfc, 0xb7, 0x25, 0x37, 0xb3, 0x2f, 0x58, 0x5d, 0xf1,
4306 0x35, 0x50, 0x64, 0xf7, 0xd7, 0x37, 0xb6, 0xc2, 0x52,
4307 0x59, 0x5f, 0x16, 0xc4, 0x2d, 0x77, 0xb8, 0x37, 0xfb,
4308 0x7d, 0x4d, 0x44, 0xbd, 0x84, 0xdb, 0xe8, 0x4d, 0x0b,
4309 0xb5, 0xa4, 0x22, 0x44, 0x87, 0xfa, 0xe3, 0xca, 0x26,
4310 0xe9, 0x30, 0xe5, 0x4c, 0x27, 0xe2, 0xeb, 0xdd, 0xe9,
4311 0x92, 0xe7, 0x6d, 0xc4, 0xc4, 0x07, 0x77, 0x7a, 0xa4,
4312 0xbd, 0x11,
4313 }
4314 };
4315
4316 TC_PRINT(".");
4317 result = do_hmac_prng_pr_false_test(68, &vec);
4318
4319 return result;
4320 }
4321
test_69(void)4322 unsigned int test_69(void)
4323 {
4324 unsigned int result = TC_PASS;
4325 const struct hmac_prng_test_vector vec = {
4326 32,
4327 16,
4328 0,
4329 0,
4330 128,
4331 {
4332 0x7e, 0x70, 0x38, 0x1b, 0xfb, 0xa7, 0x80, 0x7b, 0xc7,
4333 0x73, 0xe2, 0xcd, 0x68, 0x3f, 0x90, 0xc7, 0xad, 0x60,
4334 0x6d, 0xcf, 0x46, 0x27, 0x67, 0x98, 0x8b, 0x3f, 0x6c,
4335 0x75, 0x8f, 0x5c, 0x79, 0x5d,
4336 },
4337 {
4338 0x7e, 0x5a, 0xb4, 0x42, 0x70, 0x29, 0xe9, 0x9d, 0xf2,
4339 0x20, 0x1d, 0x81, 0xc3, 0xff, 0x28, 0x4e,
4340 },
4341 {
4342 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4343 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4344 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4345 0x00, 0x00, 0x00, 0x00, 0x00,
4346 },
4347 {
4348 0xe0, 0xdd, 0x5b, 0x4e, 0x7c, 0xa7, 0x2a, 0xfd, 0xe5,
4349 0x3c, 0x16, 0xb8, 0x22, 0x54, 0x03, 0xbb, 0x6e, 0x74,
4350 0x97, 0x42, 0xf3, 0xe3, 0x88, 0x96, 0xfb, 0xf8, 0xf1,
4351 0x8b, 0x7c, 0xe6, 0xf7, 0x99,
4352 },
4353 {
4354 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4355 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4356 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4357 0x00, 0x00, 0x00, 0x00, 0x00,
4358 },
4359 {
4360 0x8a, 0xf2, 0x7c, 0x16, 0x3d, 0x25, 0xec, 0xf4, 0xf5,
4361 0x39, 0x94, 0x4d, 0x94, 0x50, 0xf5, 0x11, 0x6e, 0xa8,
4362 0xaa, 0x7f, 0x97, 0x36, 0x1c, 0x69, 0x6f, 0x8d, 0xc7,
4363 0xd8, 0xb3, 0xaf, 0xe6, 0xff, 0xc0, 0x20, 0x14, 0x59,
4364 0xa1, 0x73, 0x3d, 0x9e, 0xe0, 0x9b, 0x2e, 0x45, 0xf3,
4365 0xb6, 0xcd, 0x5f, 0x45, 0xd9, 0xf9, 0xf4, 0x5f, 0xdc,
4366 0x66, 0x2b, 0x56, 0x90, 0x59, 0x89, 0x1f, 0x2e, 0x9e,
4367 0xbc, 0x74, 0x0f, 0x78, 0x40, 0x4a, 0x0b, 0xb1, 0xc4,
4368 0x6a, 0x6b, 0xfe, 0xee, 0xed, 0x9c, 0x6b, 0x55, 0x2c,
4369 0x5c, 0x46, 0x8a, 0x49, 0x96, 0xad, 0x41, 0xcf, 0xff,
4370 0x77, 0xae, 0x4d, 0x98, 0x96, 0xcb, 0x80, 0xaf, 0x27,
4371 0x63, 0x5a, 0x4e, 0x2a, 0x1b, 0x5c, 0x07, 0xc1, 0xb5,
4372 0x8b, 0x49, 0xc9, 0xa7, 0x68, 0x51, 0x14, 0x4e, 0x69,
4373 0x03, 0x7e, 0x14, 0xf7, 0xb8, 0x05, 0x16, 0x13, 0x29,
4374 0xca, 0x15,
4375 }
4376 };
4377
4378 TC_PRINT(".");
4379 result = do_hmac_prng_pr_false_test(69, &vec);
4380
4381 return result;
4382 }
4383
test_70(void)4384 unsigned int test_70(void)
4385 {
4386 unsigned int result = TC_PASS;
4387 const struct hmac_prng_test_vector vec = {
4388 32,
4389 16,
4390 0,
4391 0,
4392 128,
4393 {
4394 0x2e, 0x54, 0x32, 0xac, 0xda, 0xb8, 0xca, 0x81, 0xee,
4395 0x56, 0xf3, 0xe6, 0x9a, 0x0c, 0x74, 0x8a, 0x72, 0xf8,
4396 0x3e, 0x11, 0xd1, 0x8c, 0x2e, 0xf8, 0xfc, 0x8a, 0xad,
4397 0x56, 0x8e, 0x19, 0xe9, 0x1c,
4398 },
4399 {
4400 0xca, 0x5f, 0x6e, 0xb3, 0x25, 0xe4, 0xa2, 0xb2, 0x4c,
4401 0x00, 0x91, 0x5b, 0xc3, 0x7d, 0x99, 0x41,
4402 },
4403 {
4404 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4405 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4406 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4407 0x00, 0x00, 0x00, 0x00, 0x00,
4408 },
4409 {
4410 0xae, 0x3d, 0x7a, 0xc0, 0x62, 0x2f, 0x7d, 0xc0, 0x69,
4411 0xe5, 0x2c, 0xbd, 0x15, 0x84, 0x47, 0x29, 0x79, 0xe1,
4412 0xc8, 0xa9, 0x6b, 0xf4, 0x61, 0xc8, 0xd3, 0x97, 0x6d,
4413 0x8d, 0x53, 0x5c, 0x10, 0xec,
4414 },
4415 {
4416 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4417 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4418 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4419 0x00, 0x00, 0x00, 0x00, 0x00,
4420 },
4421 {
4422 0xfd, 0xa5, 0xdb, 0x4b, 0x28, 0xbb, 0xc5, 0xd2, 0xf6,
4423 0xbd, 0x33, 0xac, 0x98, 0x39, 0x9b, 0xcf, 0xcf, 0xa4,
4424 0x60, 0x37, 0x47, 0x8c, 0xf2, 0x69, 0xbf, 0x35, 0x9d,
4425 0xb2, 0x28, 0x28, 0x06, 0x62, 0x71, 0x8f, 0x6d, 0x4c,
4426 0xa4, 0x77, 0xbb, 0x1c, 0xac, 0xa5, 0x67, 0x30, 0x9a,
4427 0xba, 0xab, 0x08, 0x32, 0xe7, 0x88, 0x58, 0x84, 0xe8,
4428 0x6c, 0x4e, 0x0b, 0x01, 0x7e, 0x86, 0x77, 0x74, 0x9c,
4429 0x5d, 0xb2, 0xc3, 0x3e, 0x65, 0xfa, 0x53, 0x8d, 0xf4,
4430 0xae, 0xc4, 0x46, 0xc7, 0xca, 0x72, 0x4a, 0xf1, 0x8e,
4431 0x45, 0x98, 0x36, 0x01, 0x78, 0x5f, 0x98, 0x00, 0xa0,
4432 0xc5, 0xb2, 0x3f, 0xea, 0xfb, 0xbd, 0x34, 0x9d, 0x20,
4433 0x4a, 0xe5, 0x4b, 0x40, 0xa0, 0x19, 0xa5, 0x7a, 0x83,
4434 0x68, 0xf0, 0x7d, 0x70, 0x94, 0x5f, 0x22, 0xbe, 0x24,
4435 0xaa, 0x99, 0x2f, 0x93, 0x0f, 0x92, 0xa6, 0x26, 0xbb,
4436 0x22, 0xb6,
4437 }
4438 };
4439
4440 TC_PRINT(".");
4441 result = do_hmac_prng_pr_false_test(70, &vec);
4442
4443 return result;
4444 }
4445
test_71(void)4446 unsigned int test_71(void)
4447 {
4448 unsigned int result = TC_PASS;
4449 const struct hmac_prng_test_vector vec = {
4450 32,
4451 16,
4452 0,
4453 0,
4454 128,
4455 {
4456 0xef, 0xfa, 0xaf, 0x06, 0xcd, 0x99, 0x7b, 0x99, 0x78,
4457 0x33, 0x72, 0xc5, 0x15, 0x67, 0x2e, 0xde, 0x1a, 0x74,
4458 0x16, 0x22, 0xa2, 0x04, 0x39, 0x53, 0x45, 0x1c, 0x33,
4459 0x66, 0x8e, 0x8d, 0xf4, 0x65,
4460 },
4461 {
4462 0xfb, 0x92, 0x29, 0x10, 0xbc, 0x6c, 0x2a, 0xd0, 0x46,
4463 0x1c, 0x98, 0x09, 0xd1, 0x8a, 0x23, 0xf9,
4464 },
4465 {
4466 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4467 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4468 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4469 0x00, 0x00, 0x00, 0x00, 0x00,
4470 },
4471 {
4472 0x53, 0xce, 0x26, 0xba, 0xbc, 0x29, 0x4d, 0x2f, 0x1b,
4473 0x48, 0xb5, 0x8a, 0xec, 0xad, 0xab, 0x33, 0x08, 0xd8,
4474 0x71, 0x18, 0x92, 0xcf, 0xa3, 0x93, 0xf3, 0x58, 0x33,
4475 0x5f, 0xc0, 0xf4, 0x67, 0x4e,
4476 },
4477 {
4478 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4479 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4480 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4481 0x00, 0x00, 0x00, 0x00, 0x00,
4482 },
4483 {
4484 0x8a, 0xe5, 0x35, 0xa3, 0xcc, 0x00, 0xda, 0x2c, 0x81,
4485 0x7e, 0x7f, 0x38, 0x9a, 0x9b, 0xc9, 0x97, 0xd8, 0xe7,
4486 0x20, 0xe3, 0x94, 0xbc, 0xd3, 0xa6, 0xc2, 0x3e, 0xc6,
4487 0x78, 0xed, 0x9d, 0xa4, 0x8d, 0x3d, 0x83, 0xe3, 0x2f,
4488 0x73, 0xd8, 0x96, 0xda, 0x58, 0x2a, 0x5c, 0x2b, 0x0f,
4489 0x44, 0x12, 0x7b, 0x3f, 0x7e, 0xd3, 0x6d, 0x91, 0xfc,
4490 0x87, 0x7b, 0xbe, 0x91, 0x33, 0x90, 0x64, 0x89, 0x0a,
4491 0x4c, 0x2d, 0xb0, 0x5f, 0x16, 0xb5, 0x53, 0x61, 0x1d,
4492 0x68, 0x72, 0xc8, 0xbf, 0x40, 0x84, 0x34, 0x4c, 0x5d,
4493 0xae, 0x08, 0xca, 0x48, 0x17, 0x2f, 0x98, 0x22, 0x24,
4494 0x4d, 0x4f, 0xf3, 0x72, 0xe0, 0x4c, 0xe9, 0x9a, 0xed,
4495 0x28, 0xc3, 0x94, 0x4c, 0x47, 0xfa, 0x43, 0x4e, 0x20,
4496 0xe9, 0x97, 0x30, 0xba, 0xf2, 0xbe, 0x9e, 0xe8, 0x52,
4497 0x47, 0xf1, 0xb9, 0x4b, 0x12, 0x9c, 0x3f, 0x6c, 0x3e,
4498 0x0f, 0xe0,
4499 }
4500 };
4501
4502 TC_PRINT(".");
4503 result = do_hmac_prng_pr_false_test(71, &vec);
4504
4505 return result;
4506 }
4507
test_72(void)4508 unsigned int test_72(void)
4509 {
4510 unsigned int result = TC_PASS;
4511 const struct hmac_prng_test_vector vec = {
4512 32,
4513 16,
4514 0,
4515 0,
4516 128,
4517 {
4518 0x4a, 0x35, 0x42, 0xce, 0xa1, 0xb5, 0xa7, 0xb8, 0x93,
4519 0x85, 0x15, 0x32, 0x54, 0x98, 0x84, 0xa9, 0xeb, 0xa9,
4520 0x36, 0x95, 0xbe, 0x8d, 0x76, 0x76, 0x1d, 0xb6, 0x98,
4521 0x31, 0xbd, 0x10, 0x53, 0xee,
4522 },
4523 {
4524 0xff, 0x03, 0x20, 0xc4, 0x7e, 0x47, 0xb4, 0x40, 0x71,
4525 0x8b, 0x80, 0xab, 0x61, 0x6d, 0x7f, 0xff,
4526 },
4527 {
4528 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4529 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4530 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4531 0x00, 0x00, 0x00, 0x00, 0x00,
4532 },
4533 {
4534 0x86, 0x9a, 0xe8, 0xff, 0x94, 0x9a, 0x10, 0xc9, 0x3c,
4535 0x05, 0xd6, 0x20, 0xe4, 0xc4, 0xf1, 0x3d, 0x03, 0x76,
4536 0xee, 0x1e, 0x00, 0xc7, 0x1b, 0xba, 0x58, 0x83, 0xb3,
4537 0xbc, 0x41, 0xf5, 0x24, 0x7b,
4538 },
4539 {
4540 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4541 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4542 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4543 0x00, 0x00, 0x00, 0x00, 0x00,
4544 },
4545 {
4546 0xad, 0xda, 0x83, 0xc6, 0x11, 0x88, 0x3e, 0x01, 0xf9,
4547 0x58, 0xfe, 0xbf, 0xf1, 0x05, 0x2b, 0x65, 0x8b, 0x0c,
4548 0x84, 0xf8, 0x57, 0xad, 0x8d, 0x7d, 0x18, 0xde, 0x89,
4549 0x7d, 0xe2, 0xa8, 0xee, 0xaf, 0x39, 0x53, 0xd9, 0x40,
4550 0x7c, 0xbc, 0x4c, 0x05, 0x9c, 0x9f, 0xf9, 0xbf, 0xe6,
4551 0x77, 0x44, 0xe1, 0x34, 0x06, 0xcb, 0xfb, 0x09, 0xed,
4552 0x31, 0xdc, 0x2f, 0xbc, 0xd9, 0x62, 0x61, 0x29, 0xd0,
4553 0xb6, 0xe4, 0xa8, 0x0a, 0xc3, 0xc1, 0xb2, 0x86, 0xd8,
4554 0x1f, 0x6f, 0x28, 0x18, 0x3a, 0x3e, 0x8c, 0xe2, 0x66,
4555 0x68, 0x60, 0x05, 0x60, 0x08, 0x4f, 0x3a, 0xde, 0xd9,
4556 0x4e, 0xe5, 0x7d, 0xe1, 0x86, 0x57, 0xf4, 0x43, 0x50,
4557 0xf9, 0x75, 0x32, 0xa7, 0xc2, 0x5d, 0xcb, 0x99, 0xa8,
4558 0x68, 0x3a, 0xc3, 0xd6, 0x32, 0xa3, 0x76, 0x18, 0xeb,
4559 0x9e, 0x2b, 0x18, 0x54, 0x5c, 0x00, 0xb0, 0xc2, 0xcd,
4560 0xc3, 0xc0,
4561 }
4562 };
4563
4564 TC_PRINT(".");
4565 result = do_hmac_prng_pr_false_test(72, &vec);
4566
4567 return result;
4568 }
4569
test_73(void)4570 unsigned int test_73(void)
4571 {
4572 unsigned int result = TC_PASS;
4573 const struct hmac_prng_test_vector vec = {
4574 32,
4575 16,
4576 0,
4577 0,
4578 128,
4579 {
4580 0xc5, 0x02, 0xa0, 0x09, 0xeb, 0x41, 0xc8, 0xf8, 0x22,
4581 0x06, 0x66, 0xd4, 0xe2, 0x33, 0x54, 0xb3, 0xd0, 0x86,
4582 0xc8, 0xf6, 0xe0, 0x96, 0x28, 0xd2, 0xa9, 0xbb, 0xe0,
4583 0x72, 0x77, 0x0c, 0x99, 0xee,
4584 },
4585 {
4586 0xbb, 0xfc, 0xb4, 0x61, 0x3c, 0x45, 0x03, 0x26, 0x8b,
4587 0xc9, 0x07, 0x45, 0xdf, 0x3c, 0xc8, 0x90,
4588 },
4589 {
4590 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4591 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4592 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4593 0x00, 0x00, 0x00, 0x00, 0x00,
4594 },
4595 {
4596 0x6d, 0xa4, 0xc1, 0x2b, 0x0a, 0xa1, 0x28, 0xa5, 0x8f,
4597 0xee, 0xb8, 0x7a, 0xbb, 0xea, 0x04, 0xee, 0xcf, 0xb2,
4598 0xb4, 0x3c, 0x62, 0x93, 0xb8, 0x86, 0x3d, 0xe3, 0x16,
4599 0xae, 0x6e, 0xd2, 0x22, 0x21,
4600 },
4601 {
4602 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4603 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4604 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4605 0x00, 0x00, 0x00, 0x00, 0x00,
4606 },
4607 {
4608 0xc2, 0xa8, 0x78, 0x4f, 0xbc, 0xe4, 0xfa, 0x6e, 0x15,
4609 0x84, 0x4f, 0xdd, 0x8a, 0x84, 0x41, 0xd6, 0xb5, 0x6e,
4610 0xbe, 0x6c, 0x0d, 0xb5, 0x76, 0xd6, 0x81, 0xe0, 0x2b,
4611 0xdb, 0x45, 0x9e, 0x4b, 0xaa, 0xdd, 0xe1, 0x7b, 0xd0,
4612 0xb8, 0x7d, 0xfa, 0xfc, 0x9f, 0x92, 0x94, 0x1d, 0x7c,
4613 0xa8, 0x99, 0xa1, 0x3f, 0x7e, 0x19, 0xeb, 0xd4, 0x92,
4614 0xb3, 0x47, 0xf7, 0x75, 0x0d, 0x7c, 0x43, 0xe6, 0x70,
4615 0x28, 0x65, 0x47, 0x48, 0x57, 0x2d, 0xc9, 0x1d, 0x20,
4616 0x02, 0xb1, 0x44, 0x27, 0x18, 0x7c, 0xf3, 0x3d, 0x42,
4617 0x1a, 0x56, 0xef, 0xef, 0xbd, 0x62, 0x1a, 0x84, 0xde,
4618 0x1e, 0x56, 0x64, 0xdf, 0x1c, 0xb2, 0xe7, 0xef, 0xc3,
4619 0x6b, 0xce, 0xf0, 0x3a, 0xca, 0xe1, 0x3b, 0x05, 0xea,
4620 0x10, 0x59, 0x76, 0xf8, 0x40, 0xea, 0x75, 0x9d, 0x68,
4621 0x00, 0x4b, 0x40, 0x43, 0xe8, 0xca, 0x76, 0xd5, 0x2c,
4622 0x73, 0x66,
4623 }
4624 };
4625
4626 TC_PRINT(".");
4627 result = do_hmac_prng_pr_false_test(73, &vec);
4628
4629 return result;
4630 }
4631
test_74(void)4632 unsigned int test_74(void)
4633 {
4634 unsigned int result = TC_PASS;
4635 const struct hmac_prng_test_vector vec = {
4636 32,
4637 16,
4638 0,
4639 0,
4640 128,
4641 {
4642 0x30, 0x4f, 0x12, 0x9a, 0xfb, 0x5b, 0xa1, 0xe0, 0x62,
4643 0xbd, 0x6c, 0x0d, 0x85, 0x9e, 0x71, 0x61, 0xe3, 0xb9,
4644 0xea, 0x53, 0xef, 0x52, 0x6f, 0x00, 0x32, 0x95, 0x33,
4645 0xb6, 0xbe, 0x12, 0xfa, 0xaf,
4646 },
4647 {
4648 0x58, 0x56, 0x5e, 0x9d, 0x77, 0x6c, 0x89, 0xab, 0xf6,
4649 0xcd, 0xa5, 0xe7, 0x7c, 0xe7, 0xd2, 0x7b,
4650 },
4651 {
4652 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4653 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4654 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4655 0x00, 0x00, 0x00, 0x00, 0x00,
4656 },
4657 {
4658 0x19, 0x80, 0xa2, 0xd6, 0x5b, 0x26, 0xb7, 0xed, 0x3b,
4659 0xfc, 0x2b, 0xa9, 0x76, 0xf1, 0x4f, 0x14, 0x7d, 0xdb,
4660 0x7f, 0xb1, 0x8c, 0x85, 0x43, 0xd0, 0x46, 0x86, 0xe6,
4661 0xad, 0xc0, 0x20, 0xcf, 0x72,
4662 },
4663 {
4664 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4665 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4666 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4667 0x00, 0x00, 0x00, 0x00, 0x00,
4668 },
4669 {
4670 0x8c, 0xda, 0x68, 0xca, 0xf5, 0x7c, 0x12, 0xdd, 0x0a,
4671 0x2b, 0x62, 0x8f, 0xe8, 0x75, 0xd5, 0xe0, 0xbb, 0xa5,
4672 0x09, 0x81, 0x41, 0x5a, 0x4a, 0xe2, 0xd5, 0x88, 0x06,
4673 0xaf, 0x4c, 0x23, 0xf0, 0x59, 0x78, 0xe3, 0x9e, 0x56,
4674 0x62, 0x69, 0x07, 0x6c, 0xd4, 0x3e, 0x36, 0xea, 0xa1,
4675 0x02, 0x5e, 0x35, 0x13, 0x95, 0x51, 0x4a, 0xe5, 0x07,
4676 0x11, 0xb1, 0x87, 0xed, 0xe5, 0xcf, 0xd8, 0x45, 0x8a,
4677 0x7b, 0x8a, 0x7d, 0x97, 0x88, 0xc2, 0x12, 0x0d, 0x1d,
4678 0x71, 0xf6, 0x1e, 0xa9, 0x5d, 0x84, 0xa7, 0xff, 0x1e,
4679 0x04, 0xf5, 0x14, 0xe8, 0x44, 0x8b, 0xa2, 0xea, 0x6b,
4680 0x95, 0x6a, 0xea, 0xfd, 0xc3, 0xeb, 0xb6, 0xc1, 0xcd,
4681 0x0c, 0x7b, 0x7e, 0xc7, 0x6b, 0x95, 0x8e, 0xef, 0xb8,
4682 0x12, 0xec, 0xb3, 0xe8, 0x6b, 0x33, 0xa4, 0xd3, 0xa7,
4683 0xb2, 0x97, 0x7f, 0x66, 0xb2, 0x14, 0x08, 0x96, 0x62,
4684 0xd1, 0x4a,
4685 }
4686 };
4687
4688 TC_PRINT(".");
4689 result = do_hmac_prng_pr_false_test(74, &vec);
4690
4691 return result;
4692 }
4693
test_75(void)4694 unsigned int test_75(void)
4695 {
4696 unsigned int result = TC_PASS;
4697 const struct hmac_prng_test_vector vec = {
4698 32,
4699 16,
4700 0,
4701 0,
4702 128,
4703 {
4704 0xc5, 0x58, 0x92, 0x6a, 0x4d, 0xbb, 0x9f, 0x41, 0xe7,
4705 0x56, 0x89, 0xd9, 0xc8, 0xae, 0xc8, 0x67, 0x97, 0xc2,
4706 0x9f, 0x8c, 0x77, 0xe3, 0x56, 0xf0, 0x33, 0x1b, 0xed,
4707 0x78, 0x8b, 0x76, 0xe9, 0xb7,
4708 },
4709 {
4710 0xcf, 0x83, 0xe7, 0x71, 0x58, 0x26, 0xfd, 0x14, 0x89,
4711 0xcc, 0x30, 0x54, 0xd3, 0xcd, 0x57, 0x37,
4712 },
4713 {
4714 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4715 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4716 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4717 0x00, 0x00, 0x00, 0x00, 0x00,
4718 },
4719 {
4720 0xd1, 0x20, 0x7c, 0x7b, 0x91, 0x4f, 0x5e, 0x87, 0x3e,
4721 0xa0, 0xcf, 0x6f, 0x06, 0xdb, 0xd0, 0x2d, 0x59, 0x49,
4722 0x4f, 0x6c, 0x8d, 0x4c, 0x9a, 0xef, 0x5a, 0xd1, 0x80,
4723 0xc9, 0xbb, 0xbe, 0xe2, 0x08,
4724 },
4725 {
4726 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4727 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4728 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4729 0x00, 0x00, 0x00, 0x00, 0x00,
4730 },
4731 {
4732 0xd3, 0xa7, 0xd7, 0x8c, 0xfe, 0x76, 0xff, 0x97, 0xbc,
4733 0x54, 0xf7, 0xf6, 0x94, 0xf7, 0x2f, 0x31, 0x24, 0x41,
4734 0xd8, 0x60, 0x8d, 0x3c, 0x15, 0x13, 0xfd, 0x28, 0xe9,
4735 0x47, 0x42, 0xcb, 0x19, 0x68, 0x3a, 0x02, 0x70, 0x83,
4736 0x9b, 0x02, 0x6c, 0xee, 0x52, 0xe4, 0x92, 0x4d, 0xee,
4737 0x99, 0x9e, 0xe8, 0xcd, 0x7d, 0xd0, 0x1e, 0xa4, 0x45,
4738 0xcf, 0x91, 0x00, 0x87, 0x98, 0xb8, 0xed, 0x64, 0xc8,
4739 0x45, 0x8d, 0x86, 0x78, 0xc3, 0x44, 0xd4, 0xe3, 0xfe,
4740 0x32, 0x01, 0xc1, 0xaf, 0x2f, 0xae, 0x3b, 0xea, 0x82,
4741 0xea, 0x3a, 0xf0, 0xcd, 0xac, 0x8e, 0x77, 0xb5, 0xe4,
4742 0xd7, 0xc2, 0xb0, 0x84, 0xe4, 0x16, 0xe5, 0x32, 0x23,
4743 0x66, 0xad, 0x13, 0xe3, 0x6b, 0x45, 0x5f, 0x04, 0x7b,
4744 0xa4, 0x64, 0xcf, 0xf2, 0x87, 0xaf, 0x37, 0x22, 0x97,
4745 0xc6, 0x8b, 0x51, 0xaa, 0x47, 0x01, 0x90, 0x19, 0x43,
4746 0xaa, 0xc8,
4747 }
4748 };
4749
4750 TC_PRINT(".");
4751 result = do_hmac_prng_pr_false_test(75, &vec);
4752
4753 return result;
4754 }
4755
test_76(void)4756 unsigned int test_76(void)
4757 {
4758 unsigned int result = TC_PASS;
4759 const struct hmac_prng_test_vector vec = {
4760 32,
4761 16,
4762 32,
4763 0,
4764 128,
4765 {
4766 0x63, 0x3d, 0x32, 0xe3, 0x00, 0x5f, 0x78, 0x11, 0x47,
4767 0x23, 0xb3, 0xea, 0x5a, 0xc1, 0x21, 0xba, 0x74, 0xaa,
4768 0x00, 0xc5, 0x2d, 0x93, 0x96, 0x67, 0xe3, 0x0c, 0x33,
4769 0x51, 0xb3, 0x85, 0x49, 0xf7,
4770 },
4771 {
4772 0x37, 0xaf, 0xff, 0x50, 0x4a, 0x2d, 0x8a, 0xc1, 0x68,
4773 0xc6, 0x8e, 0x24, 0xd0, 0xfe, 0x66, 0xf6,
4774 },
4775 {
4776 0x9f, 0x16, 0x99, 0xc9, 0x9d, 0x60, 0xb0, 0x85, 0xbc,
4777 0x61, 0xcb, 0x11, 0x0e, 0xf8, 0xab, 0x59, 0x0d, 0x82,
4778 0xa9, 0x70, 0x02, 0x1c, 0x3c, 0x6a, 0x5d, 0x48, 0x02,
4779 0x1c, 0x45, 0xde, 0x49, 0x56,
4780 },
4781 {
4782 0x3e, 0x33, 0x47, 0xc5, 0x47, 0xf1, 0x7f, 0x4d, 0x0b,
4783 0x9f, 0x46, 0x40, 0x5a, 0x54, 0xee, 0xdd, 0x7e, 0x98,
4784 0x0d, 0x06, 0xa2, 0x15, 0xec, 0x15, 0xe8, 0x93, 0x16,
4785 0xab, 0x74, 0x3b, 0x75, 0x47,
4786 },
4787 {
4788 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4789 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4790 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4791 0x00, 0x00, 0x00, 0x00, 0x00,
4792 },
4793 {
4794 0x6e, 0x38, 0xe8, 0x29, 0x62, 0xd7, 0x07, 0xce, 0x9a,
4795 0x6a, 0xc3, 0x83, 0xa7, 0x38, 0xa7, 0x48, 0xf9, 0x75,
4796 0xeb, 0x78, 0x56, 0x11, 0xfa, 0xd5, 0xe3, 0xf5, 0xa4,
4797 0xfe, 0x44, 0xd7, 0xb5, 0x9a, 0x98, 0x13, 0x7a, 0x2b,
4798 0xcd, 0xc3, 0x5f, 0x9e, 0xe9, 0xa1, 0xe2, 0x1b, 0xb1,
4799 0x7d, 0xf1, 0x66, 0x5c, 0xd1, 0x39, 0x76, 0x25, 0xa1,
4800 0x77, 0x24, 0x7e, 0x2e, 0x32, 0x9a, 0x66, 0x01, 0x40,
4801 0x63, 0x61, 0x41, 0x56, 0x06, 0x10, 0xa3, 0x68, 0xbf,
4802 0xd4, 0x99, 0xc2, 0xe2, 0x5b, 0xe3, 0x18, 0xaa, 0x4d,
4803 0xa9, 0xe7, 0xa3, 0x52, 0xd1, 0x15, 0xdb, 0x82, 0x82,
4804 0xed, 0x8d, 0x79, 0xec, 0xf9, 0xcd, 0x82, 0x03, 0x60,
4805 0xd3, 0xd2, 0xd1, 0xa5, 0x8a, 0x93, 0xe0, 0x40, 0xf5,
4806 0x55, 0x48, 0x87, 0xce, 0x6c, 0x98, 0x58, 0xbc, 0x2b,
4807 0xb1, 0x02, 0x24, 0x99, 0x80, 0xa8, 0x58, 0x49, 0x8a,
4808 0xbc, 0xda,
4809 }
4810 };
4811
4812 TC_PRINT(".");
4813 result = do_hmac_prng_pr_false_test(76, &vec);
4814
4815 return result;
4816 }
4817
test_77(void)4818 unsigned int test_77(void)
4819 {
4820 unsigned int result = TC_PASS;
4821 const struct hmac_prng_test_vector vec = {
4822 32,
4823 16,
4824 32,
4825 0,
4826 128,
4827 {
4828 0xcb, 0x20, 0x15, 0x2e, 0x99, 0xd8, 0xca, 0x5e, 0x80,
4829 0x95, 0xa1, 0x3e, 0x72, 0xe0, 0xc1, 0xbb, 0x9e, 0x6c,
4830 0xbe, 0xad, 0xbd, 0x0b, 0xf4, 0xe7, 0x0f, 0xc6, 0xfa,
4831 0x3c, 0x81, 0xec, 0x5d, 0x0f,
4832 },
4833 {
4834 0x0a, 0x55, 0xd4, 0x33, 0xd3, 0x74, 0x4a, 0x2f, 0x38,
4835 0x19, 0x39, 0xbe, 0x85, 0xc9, 0x7a, 0x98,
4836 },
4837 {
4838 0xb5, 0xbd, 0x74, 0x29, 0x59, 0x1e, 0x5e, 0x29, 0x14,
4839 0x53, 0x2a, 0x7d, 0xea, 0x75, 0xff, 0x76, 0xca, 0xa3,
4840 0x9f, 0x15, 0x27, 0x9c, 0x73, 0x09, 0x2c, 0x2c, 0xac,
4841 0x3b, 0x0d, 0x28, 0xc1, 0x3b,
4842 },
4843 {
4844 0xd0, 0x8c, 0xa9, 0x6d, 0x74, 0x5f, 0x7e, 0x3a, 0x9f,
4845 0x2a, 0xcb, 0xc1, 0xe8, 0x00, 0xa9, 0x81, 0x95, 0x52,
4846 0x2a, 0x4f, 0x7c, 0x60, 0x7a, 0xad, 0x62, 0xf3, 0x8b,
4847 0x1f, 0x63, 0x35, 0x4b, 0xd1,
4848 },
4849 {
4850 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4851 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4852 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4853 0x00, 0x00, 0x00, 0x00, 0x00,
4854 },
4855 {
4856 0x03, 0xe8, 0xcd, 0x60, 0x76, 0x82, 0x62, 0xcf, 0x4c,
4857 0xc2, 0xf2, 0x95, 0x50, 0x6c, 0x24, 0xf0, 0x6f, 0xb3,
4858 0xfd, 0x3a, 0x88, 0x9c, 0x71, 0x52, 0x14, 0x51, 0xdf,
4859 0x6f, 0x2e, 0xfa, 0x07, 0x47, 0xff, 0xb8, 0x75, 0x78,
4860 0xb7, 0x1b, 0xcf, 0xc3, 0x7d, 0x3a, 0x43, 0xf8, 0x5a,
4861 0xb4, 0xe5, 0xfc, 0x02, 0xd2, 0x1a, 0x90, 0xe8, 0x5a,
4862 0xf1, 0x8d, 0x6d, 0x75, 0xe9, 0xfa, 0x95, 0xf7, 0xf9,
4863 0x29, 0x42, 0xa2, 0x93, 0xda, 0x5d, 0x31, 0xa6, 0xb7,
4864 0x77, 0xf1, 0x10, 0xff, 0x86, 0x27, 0x91, 0x42, 0x8b,
4865 0xa0, 0x1b, 0x3c, 0x1b, 0x2f, 0xb4, 0xb2, 0x36, 0x63,
4866 0x18, 0xd2, 0x44, 0xa9, 0x1e, 0xc1, 0x30, 0xf4, 0xc0,
4867 0xbd, 0xb8, 0xc4, 0x0c, 0xb7, 0xa6, 0x23, 0xe5, 0xed,
4868 0x02, 0x0b, 0xb3, 0x05, 0xa3, 0x8b, 0x13, 0x47, 0x12,
4869 0x15, 0x1b, 0x48, 0x91, 0xda, 0x7f, 0xfb, 0x06, 0x91,
4870 0x2f, 0x4b,
4871 }
4872 };
4873
4874 TC_PRINT(".");
4875 result = do_hmac_prng_pr_false_test(77, &vec);
4876
4877 return result;
4878 }
4879
test_78(void)4880 unsigned int test_78(void)
4881 {
4882 unsigned int result = TC_PASS;
4883 const struct hmac_prng_test_vector vec = {
4884 32,
4885 16,
4886 32,
4887 0,
4888 128,
4889 {
4890 0xbd, 0xcb, 0xcf, 0x6d, 0x34, 0x75, 0xac, 0x89, 0x03,
4891 0xdd, 0x32, 0xcb, 0x12, 0x54, 0x36, 0xa6, 0xf4, 0xce,
4892 0x74, 0x64, 0x49, 0x60, 0x43, 0xa1, 0x80, 0xb2, 0x60,
4893 0xd2, 0xa0, 0x0e, 0xed, 0xa1,
4894 },
4895 {
4896 0x4e, 0x63, 0xef, 0x1d, 0xd0, 0x4d, 0x3e, 0x6c, 0xa8,
4897 0xa8, 0x09, 0x9d, 0x7e, 0x3d, 0xa0, 0x95,
4898 },
4899 {
4900 0xe0, 0xb7, 0x81, 0x6c, 0xae, 0x86, 0x74, 0xb8, 0x73,
4901 0x08, 0x54, 0x1f, 0xdd, 0x65, 0xc0, 0xf8, 0x11, 0xb7,
4902 0x80, 0x8f, 0x3f, 0x2f, 0xc1, 0x5f, 0x57, 0x7d, 0x64,
4903 0x74, 0x8e, 0xe3, 0x6d, 0x4b,
4904 },
4905 {
4906 0x04, 0x1d, 0x73, 0x1b, 0x34, 0x97, 0xb4, 0x19, 0x09,
4907 0xde, 0xec, 0xaf, 0xff, 0x8b, 0x71, 0x16, 0x08, 0x5d,
4908 0x8e, 0xf2, 0x8c, 0x32, 0xf4, 0x23, 0x3f, 0x6c, 0x66,
4909 0x0e, 0x77, 0xa9, 0x9b, 0xb6,
4910 },
4911 {
4912 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4913 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4914 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4915 0x00, 0x00, 0x00, 0x00, 0x00,
4916 },
4917 {
4918 0xd1, 0x0f, 0x8e, 0x09, 0xba, 0x93, 0x52, 0x69, 0xd8,
4919 0xc3, 0x87, 0x62, 0xad, 0xca, 0xf2, 0x83, 0x08, 0xd2,
4920 0x5d, 0xce, 0xcc, 0x19, 0xff, 0xdb, 0xf7, 0x93, 0xa9,
4921 0xc6, 0x75, 0x85, 0xcb, 0x79, 0x1d, 0xf6, 0x5a, 0x24,
4922 0xda, 0x8b, 0xa2, 0xb7, 0x79, 0x41, 0xf7, 0x01, 0xde,
4923 0x86, 0x3b, 0xe3, 0xd6, 0xf3, 0xc9, 0xd1, 0x3f, 0x44,
4924 0x45, 0x97, 0x19, 0x38, 0x7b, 0x51, 0x36, 0x53, 0x46,
4925 0x63, 0x86, 0x2b, 0x70, 0xc7, 0xdc, 0xf9, 0x91, 0x31,
4926 0xde, 0x59, 0x25, 0x30, 0xb3, 0xce, 0xdc, 0x61, 0x68,
4927 0x98, 0xd3, 0x65, 0x6e, 0x20, 0x64, 0xd8, 0x79, 0x14,
4928 0x9d, 0xb2, 0x54, 0xd2, 0x6e, 0x72, 0xc5, 0x46, 0x6a,
4929 0xd5, 0x5b, 0x1a, 0xc6, 0xfe, 0x52, 0x43, 0x86, 0xa0,
4930 0x99, 0xaa, 0x64, 0x2a, 0xd0, 0x96, 0xa0, 0x93, 0x3f,
4931 0x92, 0xdb, 0x03, 0xe9, 0x41, 0x70, 0xe0, 0x5d, 0xa5,
4932 0x00, 0xe5,
4933 }
4934 };
4935
4936 TC_PRINT(".");
4937 result = do_hmac_prng_pr_false_test(78, &vec);
4938
4939 return result;
4940 }
4941
test_79(void)4942 unsigned int test_79(void)
4943 {
4944 unsigned int result = TC_PASS;
4945 const struct hmac_prng_test_vector vec = {
4946 32,
4947 16,
4948 32,
4949 0,
4950 128,
4951 {
4952 0x0c, 0xf0, 0x73, 0x1c, 0x47, 0xca, 0x73, 0xe8, 0xc4,
4953 0x29, 0x42, 0xcc, 0x61, 0xf9, 0x98, 0xf5, 0x34, 0x2e,
4954 0x31, 0x8c, 0xb8, 0xed, 0x3b, 0x18, 0x69, 0x02, 0x0e,
4955 0x3d, 0xab, 0x1e, 0x12, 0x67,
4956 },
4957 {
4958 0x60, 0x4c, 0x64, 0x15, 0x4f, 0x91, 0x4e, 0xd0, 0xcf,
4959 0x63, 0xc8, 0x61, 0x65, 0x3b, 0x78, 0xd4,
4960 },
4961 {
4962 0x30, 0x50, 0xb2, 0xdf, 0x2f, 0x59, 0x76, 0x3e, 0x44,
4963 0x3c, 0xaa, 0x92, 0x5a, 0x54, 0xde, 0x1e, 0x5c, 0xed,
4964 0x87, 0x59, 0xb5, 0x54, 0xb5, 0xf0, 0xf6, 0x8c, 0xb0,
4965 0x1b, 0x41, 0x50, 0xf9, 0x99,
4966 },
4967 {
4968 0xed, 0xa0, 0x82, 0xed, 0xfa, 0xf4, 0xf9, 0x76, 0x6d,
4969 0xe2, 0x9a, 0xe2, 0xcb, 0x93, 0x0f, 0xb1, 0xbc, 0x26,
4970 0xbd, 0xe6, 0xd1, 0x8a, 0xb1, 0x6f, 0x66, 0xfb, 0xf4,
4971 0xb0, 0x6d, 0x3e, 0x74, 0x80,
4972 },
4973 {
4974 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4975 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4976 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4977 0x00, 0x00, 0x00, 0x00, 0x00,
4978 },
4979 {
4980 0x39, 0xb3, 0xf4, 0x7c, 0x02, 0x4b, 0xc8, 0x4a, 0xad,
4981 0x80, 0x91, 0x13, 0x6d, 0x34, 0x1e, 0xba, 0x3a, 0x89,
4982 0xd0, 0x65, 0x77, 0xaa, 0x4f, 0xd3, 0xd2, 0x4f, 0x8b,
4983 0x7a, 0x5b, 0xe4, 0x28, 0x0f, 0xdf, 0x62, 0x35, 0x34,
4984 0x90, 0xd5, 0xf6, 0x6c, 0x1a, 0x7d, 0x57, 0xcf, 0x19,
4985 0x8a, 0x63, 0x37, 0x56, 0xc0, 0x90, 0x71, 0x86, 0xa7,
4986 0x1a, 0x4f, 0xea, 0x41, 0xc3, 0xfa, 0x42, 0xef, 0xee,
4987 0xfb, 0x0a, 0xc2, 0x85, 0xea, 0x85, 0x87, 0xf1, 0xa8,
4988 0xd8, 0xfb, 0xb7, 0x83, 0xae, 0x62, 0x7c, 0x1e, 0x85,
4989 0x8f, 0xfb, 0xe0, 0x51, 0xd6, 0xb7, 0xa2, 0xa5, 0x18,
4990 0xa2, 0x4e, 0x71, 0xd5, 0x54, 0xe8, 0xa0, 0xda, 0x3d,
4991 0x54, 0xbc, 0x69, 0xe4, 0xca, 0x94, 0x0b, 0x7c, 0xa3,
4992 0x20, 0xc4, 0xbc, 0x44, 0xdf, 0x1e, 0x47, 0x6e, 0x05,
4993 0xe4, 0x89, 0xa2, 0xc6, 0x68, 0x70, 0x2b, 0x0b, 0xb8,
4994 0x91, 0x3d,
4995 }
4996 };
4997
4998 TC_PRINT(".");
4999 result = do_hmac_prng_pr_false_test(79, &vec);
5000
5001 return result;
5002 }
5003
test_80(void)5004 unsigned int test_80(void)
5005 {
5006 unsigned int result = TC_PASS;
5007 const struct hmac_prng_test_vector vec = {
5008 32,
5009 16,
5010 32,
5011 0,
5012 128,
5013 {
5014 0x97, 0x15, 0x5a, 0x62, 0x4e, 0xe4, 0x2b, 0x97, 0x4c,
5015 0x4b, 0xc9, 0xe0, 0xb9, 0xa7, 0x37, 0xeb, 0x79, 0x0c,
5016 0xde, 0x2f, 0x0a, 0x93, 0xf8, 0xef, 0x2c, 0x6f, 0xe7,
5017 0x20, 0x15, 0xc5, 0x27, 0x6b,
5018 },
5019 {
5020 0x44, 0x4d, 0xf2, 0xbe, 0xae, 0x4a, 0xe6, 0xe9, 0xa6,
5021 0x40, 0x41, 0x6f, 0xc3, 0x94, 0x8d, 0xde,
5022 },
5023 {
5024 0x62, 0x5c, 0x7e, 0xf0, 0xfa, 0x30, 0xe0, 0xcb, 0x5c,
5025 0x28, 0xff, 0x3a, 0x23, 0x96, 0x63, 0x93, 0x24, 0x29,
5026 0x2b, 0x20, 0x06, 0x9e, 0xcb, 0x1c, 0x01, 0x63, 0xd9,
5027 0x66, 0xf2, 0x52, 0x0e, 0x61,
5028 },
5029 {
5030 0x40, 0x1b, 0x91, 0xbb, 0xd7, 0x26, 0xeb, 0x24, 0xeb,
5031 0x19, 0xb4, 0xf3, 0x62, 0x88, 0x19, 0x2a, 0xe0, 0x71,
5032 0x35, 0x91, 0x7d, 0xec, 0x75, 0xb7, 0xf7, 0x75, 0x81,
5033 0x77, 0x76, 0x72, 0x98, 0xb7,
5034 },
5035 {
5036 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5037 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5038 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5039 0x00, 0x00, 0x00, 0x00, 0x00,
5040 },
5041 {
5042 0x8b, 0x1c, 0x56, 0xcd, 0x41, 0x5d, 0xdf, 0x12, 0x3b,
5043 0xc5, 0xbb, 0x32, 0x7f, 0x0e, 0xc4, 0xcf, 0x53, 0xa6,
5044 0x49, 0x83, 0x1d, 0x7c, 0x09, 0x20, 0xe7, 0x42, 0x03,
5045 0x3c, 0xe1, 0x83, 0xa4, 0x42, 0x3c, 0x4b, 0x16, 0x2e,
5046 0xac, 0xa3, 0x15, 0x7c, 0xb1, 0x94, 0xdc, 0xe0, 0x6a,
5047 0x54, 0x3b, 0xf1, 0x55, 0x16, 0x4c, 0x70, 0x41, 0x75,
5048 0x0f, 0xb3, 0xaf, 0xc7, 0x78, 0x92, 0xbd, 0x7b, 0x45,
5049 0x2a, 0x20, 0xb6, 0x48, 0x90, 0x18, 0xe5, 0x36, 0x9f,
5050 0xce, 0x4e, 0x7e, 0xb7, 0x93, 0x54, 0xea, 0x8a, 0x03,
5051 0x38, 0x80, 0xa6, 0xdb, 0x0a, 0x79, 0xee, 0x0c, 0x1c,
5052 0xa1, 0x5d, 0x80, 0x75, 0x12, 0x31, 0x2c, 0x3f, 0x2d,
5053 0x82, 0xbd, 0xf0, 0x06, 0x83, 0x64, 0xcc, 0x3e, 0xae,
5054 0x76, 0x3b, 0xe2, 0x4e, 0xdb, 0x39, 0x35, 0x6d, 0xc1,
5055 0xa6, 0xd1, 0xc5, 0xeb, 0x09, 0x3c, 0xde, 0x4b, 0xf9,
5056 0xa5, 0x89,
5057 }
5058 };
5059
5060 TC_PRINT(".");
5061 result = do_hmac_prng_pr_false_test(80, &vec);
5062
5063 return result;
5064 }
5065
test_81(void)5066 unsigned int test_81(void)
5067 {
5068 unsigned int result = TC_PASS;
5069 const struct hmac_prng_test_vector vec = {
5070 32,
5071 16,
5072 32,
5073 0,
5074 128,
5075 {
5076 0x88, 0xe9, 0xbc, 0x0e, 0x56, 0xbb, 0xbf, 0xe8, 0xc0,
5077 0x7f, 0x31, 0x1b, 0x95, 0x5d, 0x2b, 0x87, 0x7f, 0xe7,
5078 0x04, 0x7f, 0x3f, 0x85, 0xac, 0x83, 0xf9, 0xda, 0x68,
5079 0xac, 0x2a, 0xbe, 0x36, 0xe2,
5080 },
5081 {
5082 0x2c, 0xf7, 0x59, 0x3a, 0x98, 0x12, 0x25, 0x25, 0xc2,
5083 0x81, 0xd3, 0xce, 0xc1, 0xe2, 0xb9, 0x4c,
5084 },
5085 {
5086 0x0d, 0x28, 0x96, 0x1b, 0x6a, 0xba, 0xd3, 0x01, 0x91,
5087 0xb2, 0x14, 0x70, 0xba, 0x1e, 0xe0, 0x0d, 0xa1, 0x70,
5088 0x37, 0x90, 0xdd, 0x8a, 0x15, 0x53, 0x73, 0x97, 0xc7,
5089 0x3e, 0x80, 0xeb, 0x7f, 0xbc,
5090 },
5091 {
5092 0xe3, 0x28, 0x52, 0xb8, 0x1c, 0x80, 0xf3, 0x7d, 0x79,
5093 0xcf, 0xfd, 0x3c, 0xae, 0x78, 0x59, 0x10, 0xe7, 0x92,
5094 0x32, 0x81, 0x3d, 0x17, 0x4a, 0x2d, 0x14, 0xf0, 0xbf,
5095 0x27, 0x5f, 0x31, 0x29, 0x4b,
5096 },
5097 {
5098 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5099 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5101 0x00, 0x00, 0x00, 0x00, 0x00,
5102 },
5103 {
5104 0x4a, 0x6b, 0x13, 0xbd, 0xe6, 0xcb, 0xf8, 0x66, 0xd1,
5105 0xb6, 0x09, 0x42, 0x48, 0x8c, 0xef, 0x40, 0x86, 0x36,
5106 0x7f, 0xd4, 0xe2, 0x44, 0x5f, 0x73, 0xed, 0xef, 0x03,
5107 0x28, 0xf6, 0x94, 0x1d, 0x40, 0x84, 0xa4, 0x46, 0x98,
5108 0x62, 0x81, 0x2f, 0xf6, 0xe4, 0xd9, 0xe4, 0x19, 0x2e,
5109 0x29, 0xd5, 0x9d, 0x56, 0x2e, 0x5d, 0xaf, 0xa0, 0xae,
5110 0x10, 0x94, 0x4f, 0x8b, 0x62, 0xad, 0x15, 0xa8, 0xf4,
5111 0x83, 0xd6, 0xd1, 0x0e, 0xed, 0x6c, 0x4f, 0xe4, 0x26,
5112 0x45, 0x58, 0x7b, 0x61, 0x25, 0xd8, 0x63, 0x65, 0x37,
5113 0x10, 0xbd, 0x6a, 0x21, 0x27, 0x7a, 0xe4, 0x49, 0xb7,
5114 0xd2, 0xa9, 0x79, 0x78, 0x29, 0x74, 0xa7, 0x31, 0xda,
5115 0x60, 0x1b, 0x29, 0xbc, 0x8e, 0x31, 0xfa, 0x12, 0x1b,
5116 0x8b, 0x7e, 0x95, 0xd1, 0xeb, 0x30, 0xa7, 0x5b, 0x3d,
5117 0x4f, 0xb2, 0x13, 0x1e, 0x17, 0xfd, 0xea, 0xa0, 0x39,
5118 0x5e, 0xa6,
5119 }
5120 };
5121
5122 TC_PRINT(".");
5123 result = do_hmac_prng_pr_false_test(81, &vec);
5124
5125 return result;
5126 }
5127
test_82(void)5128 unsigned int test_82(void)
5129 {
5130 unsigned int result = TC_PASS;
5131 const struct hmac_prng_test_vector vec = {
5132 32,
5133 16,
5134 32,
5135 0,
5136 128,
5137 {
5138 0xdf, 0x81, 0x88, 0xfe, 0x2b, 0x7b, 0xc5, 0xed, 0x26,
5139 0xf7, 0x47, 0xc9, 0x3e, 0xd4, 0x80, 0x24, 0xe3, 0xed,
5140 0x62, 0x75, 0x30, 0x10, 0x7d, 0x94, 0x90, 0x6b, 0xb2,
5141 0xde, 0xbd, 0x4f, 0xb9, 0x2b,
5142 },
5143 {
5144 0x0d, 0xd7, 0x50, 0xc7, 0x4f, 0x83, 0x63, 0xc1, 0x4c,
5145 0x17, 0x2b, 0x40, 0x98, 0xf5, 0x20, 0x58,
5146 },
5147 {
5148 0x8a, 0x9b, 0xa6, 0xbd, 0xb3, 0x05, 0x9e, 0xc8, 0x8b,
5149 0xb2, 0x9e, 0x1c, 0x51, 0x60, 0x51, 0xf8, 0xf9, 0x58,
5150 0xb3, 0xc7, 0x75, 0x1f, 0xb3, 0x7a, 0x61, 0x6e, 0x9d,
5151 0x4a, 0x6c, 0xf1, 0x7a, 0x79,
5152 },
5153 {
5154 0x1b, 0x21, 0x45, 0xc0, 0xeb, 0x75, 0x77, 0x50, 0x30,
5155 0xd1, 0x68, 0x1c, 0x84, 0x8b, 0x92, 0x49, 0xda, 0xcb,
5156 0x81, 0x37, 0xa3, 0xa0, 0xfe, 0x26, 0x54, 0x4d, 0x17,
5157 0xa2, 0x37, 0x4a, 0x51, 0x82,
5158 },
5159 {
5160 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5161 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5162 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5163 0x00, 0x00, 0x00, 0x00, 0x00,
5164 },
5165 {
5166 0xb9, 0x25, 0xc2, 0x7c, 0x1b, 0x2a, 0x82, 0xe6, 0x96,
5167 0x9a, 0x90, 0xfe, 0x4e, 0x4b, 0x6f, 0x27, 0xc3, 0x69,
5168 0xe8, 0x2b, 0x4b, 0x03, 0x47, 0x9a, 0x9a, 0x15, 0x2a,
5169 0xca, 0x12, 0x88, 0xb2, 0x62, 0x42, 0x0f, 0xaa, 0x6c,
5170 0x62, 0xda, 0x1f, 0x22, 0x5d, 0xc7, 0xf3, 0x12, 0x5d,
5171 0x42, 0x88, 0x58, 0x50, 0x78, 0x8b, 0x26, 0x44, 0x10,
5172 0xc8, 0x14, 0x9e, 0xab, 0xf6, 0xba, 0x16, 0x4c, 0x17,
5173 0x32, 0xa2, 0xb6, 0x0b, 0x77, 0xa5, 0x25, 0xec, 0x74,
5174 0x5b, 0xac, 0x6e, 0xda, 0x51, 0xec, 0x7d, 0x88, 0xd1,
5175 0x1b, 0x40, 0xc2, 0xe1, 0x28, 0x54, 0xd3, 0x92, 0xe7,
5176 0xc6, 0xaf, 0x2f, 0xff, 0x7a, 0xaf, 0x15, 0x44, 0xab,
5177 0x30, 0x6a, 0xc3, 0x1b, 0x6d, 0x97, 0x1b, 0x70, 0xa8,
5178 0x2a, 0x67, 0x2c, 0x81, 0xe9, 0x28, 0x20, 0x4d, 0x04,
5179 0x96, 0x0e, 0xbf, 0xf5, 0xbf, 0x5e, 0x38, 0xaa, 0x89,
5180 0x7f, 0x23,
5181 }
5182 };
5183
5184 TC_PRINT(".");
5185 result = do_hmac_prng_pr_false_test(82, &vec);
5186
5187 return result;
5188 }
5189
test_83(void)5190 unsigned int test_83(void)
5191 {
5192 unsigned int result = TC_PASS;
5193 const struct hmac_prng_test_vector vec = {
5194 32,
5195 16,
5196 32,
5197 0,
5198 128,
5199 {
5200 0x6a, 0xeb, 0x84, 0xcf, 0x5f, 0x72, 0x98, 0x2b, 0xf7,
5201 0xb1, 0xef, 0x4c, 0xa1, 0x6f, 0x8a, 0x27, 0x96, 0x5c,
5202 0x35, 0xb2, 0xa5, 0x55, 0x61, 0x94, 0x6c, 0x6d, 0x2c,
5203 0xf6, 0xa6, 0xf9, 0xe4, 0x1e,
5204 },
5205 {
5206 0x82, 0x76, 0x07, 0xb8, 0x06, 0xdf, 0x2c, 0x42, 0x37,
5207 0x41, 0x20, 0x9b, 0xed, 0x59, 0xb4, 0xeb,
5208 },
5209 {
5210 0xc2, 0x53, 0x73, 0xb6, 0x1d, 0x8d, 0x58, 0x2f, 0xc2,
5211 0x68, 0xcb, 0xd6, 0x49, 0x3a, 0x91, 0x61, 0xee, 0xbe,
5212 0xde, 0x96, 0xc4, 0x3b, 0x02, 0x95, 0x28, 0x1c, 0xc8,
5213 0xac, 0x47, 0x38, 0x24, 0xe7,
5214 },
5215 {
5216 0x57, 0x54, 0x81, 0x26, 0x38, 0x1e, 0xd8, 0x62, 0x67,
5217 0x05, 0xd3, 0x53, 0x71, 0x22, 0x80, 0x0c, 0x4c, 0xd9,
5218 0xef, 0x81, 0x32, 0x04, 0x4d, 0xfd, 0x0f, 0x8d, 0x27,
5219 0xd5, 0xeb, 0xce, 0x55, 0xd1,
5220 },
5221 {
5222 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5223 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5224 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5225 0x00, 0x00, 0x00, 0x00, 0x00,
5226 },
5227 {
5228 0xb2, 0x0c, 0x3a, 0xe8, 0x13, 0x3b, 0x87, 0x20, 0x49,
5229 0x8c, 0x17, 0xfc, 0xa0, 0xb9, 0xa2, 0xf7, 0x04, 0x57,
5230 0x26, 0xfd, 0xc1, 0x5e, 0x71, 0xa6, 0xd3, 0x9e, 0x18,
5231 0x95, 0x49, 0xb0, 0x2d, 0x39, 0x92, 0xa7, 0x4b, 0xfa,
5232 0x9d, 0x68, 0xec, 0xca, 0x5f, 0xf1, 0x71, 0x89, 0x0e,
5233 0xe5, 0xba, 0xfc, 0x4e, 0x59, 0xbf, 0xc6, 0x62, 0xfd,
5234 0xb2, 0x45, 0x8e, 0xf2, 0x44, 0xe5, 0x4e, 0x03, 0xfa,
5235 0x43, 0xa0, 0x61, 0x67, 0x97, 0xbd, 0xca, 0x83, 0xb6,
5236 0xef, 0x8f, 0x36, 0xda, 0xd2, 0x80, 0xc9, 0xdf, 0xb1,
5237 0xca, 0x56, 0xd3, 0xaa, 0x5e, 0x2d, 0xa3, 0x2a, 0xaf,
5238 0xe2, 0xf6, 0x89, 0xf5, 0x1a, 0x43, 0xc7, 0x54, 0x7d,
5239 0x24, 0xed, 0x94, 0xd0, 0x2a, 0x56, 0x7f, 0x78, 0x55,
5240 0xaa, 0xaf, 0xc8, 0xb6, 0x94, 0xea, 0x5f, 0x0b, 0xb5,
5241 0x60, 0x2f, 0x72, 0xda, 0xbf, 0x86, 0x56, 0xe7, 0x43,
5242 0x58, 0xb2,
5243 }
5244 };
5245
5246 TC_PRINT(".");
5247 result = do_hmac_prng_pr_false_test(83, &vec);
5248
5249 return result;
5250 }
5251
test_84(void)5252 unsigned int test_84(void)
5253 {
5254 unsigned int result = TC_PASS;
5255 const struct hmac_prng_test_vector vec = {
5256 32,
5257 16,
5258 32,
5259 0,
5260 128,
5261 {
5262 0x49, 0xce, 0xab, 0x47, 0xef, 0x95, 0x58, 0x5a, 0xaa,
5263 0xeb, 0x98, 0x06, 0x4c, 0x61, 0xe8, 0xa2, 0x89, 0xee,
5264 0xe5, 0x41, 0x2f, 0x4a, 0xf1, 0xfb, 0x6e, 0x48, 0xa1,
5265 0x23, 0x58, 0xf9, 0xcf, 0x67,
5266 },
5267 {
5268 0xd4, 0x8e, 0x4a, 0x8a, 0x61, 0x2c, 0xac, 0x57, 0xfe,
5269 0x7b, 0xc1, 0x78, 0x8c, 0x64, 0x83, 0x6b,
5270 },
5271 {
5272 0x62, 0x1e, 0x31, 0x3b, 0x13, 0x34, 0x80, 0xd5, 0xc4,
5273 0x71, 0xba, 0xe8, 0xda, 0x09, 0x7a, 0x03, 0x33, 0xb2,
5274 0xb2, 0xea, 0x23, 0xf8, 0x3c, 0x1b, 0x10, 0x28, 0x50,
5275 0xd4, 0x11, 0xd1, 0x51, 0x5c,
5276 },
5277 {
5278 0x84, 0x40, 0x7b, 0x20, 0xd0, 0xad, 0xc2, 0x2c, 0x07,
5279 0xbf, 0x24, 0x94, 0x08, 0x0a, 0xd2, 0x86, 0x93, 0x8b,
5280 0x21, 0x28, 0xf8, 0x24, 0xda, 0xe3, 0xe4, 0x4d, 0x3c,
5281 0x71, 0x81, 0x87, 0x02, 0xc0,
5282 },
5283 {
5284 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5285 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5286 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5287 0x00, 0x00, 0x00, 0x00, 0x00,
5288 },
5289 {
5290 0xdf, 0xb9, 0xcc, 0xd2, 0x74, 0x93, 0x63, 0xfd, 0x99,
5291 0x3d, 0xf5, 0xdb, 0x53, 0x82, 0x6d, 0xc3, 0x6a, 0xdf,
5292 0x4e, 0x04, 0x08, 0x78, 0xf6, 0x85, 0x15, 0x14, 0x46,
5293 0x6d, 0xd7, 0x21, 0x4b, 0xa7, 0x0d, 0x35, 0xf4, 0x74,
5294 0xb2, 0x2d, 0x5d, 0x18, 0x0d, 0x71, 0xf8, 0xca, 0x00,
5295 0x49, 0xfc, 0x90, 0x15, 0x6d, 0x6d, 0x79, 0x67, 0x08,
5296 0x28, 0x0c, 0xe1, 0xd2, 0x25, 0x18, 0x4b, 0x06, 0xdb,
5297 0xe3, 0xd7, 0x98, 0xb7, 0xb9, 0x02, 0x85, 0x62, 0xd2,
5298 0x22, 0xf1, 0x1e, 0xe8, 0xfe, 0xd9, 0xa9, 0x55, 0x87,
5299 0xa6, 0x53, 0x6e, 0x90, 0x7a, 0xde, 0xe3, 0x10, 0x2b,
5300 0x2f, 0x3d, 0x92, 0xdb, 0x24, 0x67, 0x37, 0xa9, 0xbc,
5301 0x71, 0xaa, 0xaa, 0x4f, 0x40, 0xcd, 0xa3, 0x3d, 0x33,
5302 0xa3, 0x37, 0x9d, 0x2e, 0x8b, 0xfe, 0xd1, 0x76, 0x0e,
5303 0xc1, 0x28, 0x01, 0xe7, 0x2a, 0x38, 0x4b, 0x74, 0x8f,
5304 0xfa, 0xf5,
5305 }
5306 };
5307
5308 TC_PRINT(".");
5309 result = do_hmac_prng_pr_false_test(84, &vec);
5310
5311 return result;
5312 }
5313
test_85(void)5314 unsigned int test_85(void)
5315 {
5316 unsigned int result = TC_PASS;
5317 const struct hmac_prng_test_vector vec = {
5318 32,
5319 16,
5320 32,
5321 0,
5322 128,
5323 {
5324 0xf3, 0x22, 0xb2, 0x58, 0xc6, 0x29, 0x51, 0xd3, 0x7b,
5325 0xa6, 0x80, 0xab, 0xc4, 0x9a, 0x61, 0x98, 0x3f, 0x3f,
5326 0xd8, 0x99, 0x73, 0x94, 0x0c, 0x1d, 0x4f, 0x07, 0x65,
5327 0xc9, 0x5d, 0x0d, 0x70, 0x78,
5328 },
5329 {
5330 0x0b, 0x79, 0xd5, 0xbe, 0xfe, 0x42, 0x85, 0xa7, 0x3e,
5331 0xa4, 0xb4, 0x8e, 0x2b, 0xa1, 0x85, 0xc1,
5332 },
5333 {
5334 0x05, 0x32, 0xbc, 0x7e, 0x99, 0x70, 0x90, 0x06, 0xaa,
5335 0x19, 0x1b, 0x37, 0x9a, 0xce, 0xfa, 0x16, 0x45, 0xc6,
5336 0x7d, 0x2f, 0x5b, 0x61, 0xf1, 0x3f, 0x36, 0xf8, 0x68,
5337 0xbc, 0xe4, 0x44, 0xa5, 0x29,
5338 },
5339 {
5340 0x2e, 0x4e, 0x16, 0x74, 0x8e, 0xbf, 0x36, 0x59, 0x02,
5341 0xd9, 0x10, 0xa0, 0x1d, 0x9c, 0xa2, 0x4a, 0xeb, 0x8e,
5342 0x3e, 0x54, 0x58, 0xed, 0xfd, 0x88, 0xf6, 0xb9, 0x09,
5343 0xc1, 0xff, 0xc7, 0x46, 0x8c,
5344 },
5345 {
5346 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5347 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5348 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5349 0x00, 0x00, 0x00, 0x00, 0x00,
5350 },
5351 {
5352 0x85, 0x5e, 0xe8, 0xe0, 0x06, 0x0c, 0xb8, 0xb4, 0xfc,
5353 0x56, 0x92, 0x07, 0x3f, 0x62, 0xcc, 0x3e, 0x19, 0xa1,
5354 0x9b, 0x89, 0xdf, 0x2d, 0xf9, 0x7c, 0x2a, 0x21, 0x87,
5355 0x9d, 0x74, 0x57, 0x1d, 0x33, 0x62, 0xec, 0xdd, 0x1a,
5356 0xd9, 0xe4, 0x64, 0x58, 0xe3, 0x5f, 0x5f, 0x35, 0x80,
5357 0xe7, 0x66, 0x06, 0x7e, 0x3d, 0x8f, 0x72, 0x58, 0xd8,
5358 0xee, 0xcb, 0x17, 0xa0, 0x75, 0xf7, 0xdc, 0x75, 0x23,
5359 0xa4, 0x78, 0xb5, 0xd1, 0x77, 0xf6, 0x73, 0x65, 0x9e,
5360 0x38, 0x87, 0x67, 0x0e, 0xdf, 0x6e, 0x8f, 0x0f, 0xf7,
5361 0x5e, 0x26, 0xd4, 0x1a, 0xdf, 0xee, 0x6a, 0xe2, 0x8f,
5362 0xbe, 0x5c, 0x2e, 0x24, 0x7e, 0x10, 0x36, 0x24, 0x1e,
5363 0x1f, 0x5b, 0xf3, 0x16, 0xfb, 0xd9, 0xad, 0xb3, 0xc1,
5364 0x59, 0x30, 0xe8, 0x42, 0x5a, 0xe7, 0x50, 0x24, 0xc2,
5365 0x77, 0x02, 0x99, 0x72, 0xf0, 0xd6, 0xc6, 0x45, 0xb4,
5366 0xa1, 0x17,
5367 }
5368 };
5369
5370 TC_PRINT(".");
5371 result = do_hmac_prng_pr_false_test(85, &vec);
5372
5373 return result;
5374 }
5375
test_86(void)5376 unsigned int test_86(void)
5377 {
5378 unsigned int result = TC_PASS;
5379 const struct hmac_prng_test_vector vec = {
5380 32,
5381 16,
5382 32,
5383 0,
5384 128,
5385 {
5386 0x33, 0xa6, 0x8b, 0xad, 0x0f, 0xa3, 0x44, 0xfd, 0x6a,
5387 0x46, 0xf7, 0x5f, 0x04, 0x28, 0xcb, 0xdf, 0x27, 0x11,
5388 0xd3, 0xf0, 0xc7, 0xef, 0x0f, 0x6a, 0x39, 0x50, 0x73,
5389 0xed, 0x70, 0x89, 0x7b, 0xaa,
5390 },
5391 {
5392 0x18, 0x92, 0x79, 0x9f, 0xeb, 0x41, 0x0b, 0x9d, 0xd6,
5393 0xe6, 0x9b, 0xf4, 0x40, 0x3e, 0xfc, 0x20,
5394 },
5395 {
5396 0x67, 0x7e, 0xcc, 0xd0, 0xc6, 0xe0, 0x1a, 0x26, 0x3f,
5397 0xc7, 0xd2, 0xe2, 0xc2, 0xd0, 0xc6, 0x29, 0x4a, 0x30,
5398 0x7b, 0xf3, 0xee, 0x1b, 0xa3, 0x53, 0x72, 0xc2, 0x16,
5399 0x6d, 0x04, 0x04, 0x29, 0x72,
5400 },
5401 {
5402 0xa6, 0x44, 0x7d, 0xdb, 0xfa, 0xf7, 0xea, 0x07, 0xe1,
5403 0x0a, 0x95, 0xdb, 0x1f, 0xae, 0x3e, 0xa8, 0x6d, 0x10,
5404 0x3c, 0xfc, 0xdd, 0xa5, 0x50, 0xf1, 0x10, 0x1b, 0x02,
5405 0xdd, 0xc5, 0xac, 0x46, 0x0c,
5406 },
5407 {
5408 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5409 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5410 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5411 0x00, 0x00, 0x00, 0x00, 0x00,
5412 },
5413 {
5414 0x22, 0x91, 0x43, 0x3d, 0xf6, 0xfa, 0x57, 0x25, 0x89,
5415 0xc3, 0xa6, 0x51, 0x3f, 0x38, 0x1a, 0xf4, 0x21, 0x27,
5416 0x87, 0x49, 0x9b, 0xad, 0x08, 0x64, 0xcb, 0x36, 0xd0,
5417 0xeb, 0xee, 0x3b, 0x56, 0xe3, 0x40, 0xab, 0x7b, 0xdb,
5418 0x9f, 0x3b, 0x0e, 0x0d, 0x61, 0xdb, 0xa6, 0xb0, 0x14,
5419 0x35, 0x77, 0x21, 0x08, 0xbd, 0x89, 0x21, 0xcf, 0xc0,
5420 0x0b, 0xeb, 0xd2, 0x07, 0x66, 0x94, 0x41, 0x84, 0x04,
5421 0x6a, 0x84, 0xf5, 0x6c, 0x43, 0x19, 0x69, 0x58, 0x80,
5422 0xd2, 0x43, 0x45, 0xac, 0xc6, 0x4f, 0x85, 0x79, 0xd3,
5423 0xca, 0x30, 0xc1, 0xf5, 0x4e, 0x41, 0x1c, 0xff, 0x51,
5424 0x5e, 0xd7, 0x2a, 0x8f, 0xca, 0xa5, 0xd2, 0xa1, 0x5f,
5425 0xc2, 0x52, 0x6d, 0x5d, 0x11, 0x6f, 0xa1, 0x78, 0x3f,
5426 0xff, 0x6d, 0x70, 0xd1, 0x56, 0xb6, 0xe3, 0x3b, 0xf3,
5427 0x1d, 0x21, 0x0d, 0x3e, 0xe7, 0x9c, 0x44, 0xb7, 0x3e,
5428 0xaa, 0x7e,
5429 }
5430 };
5431
5432 TC_PRINT(".");
5433 result = do_hmac_prng_pr_false_test(86, &vec);
5434
5435 return result;
5436 }
5437
test_87(void)5438 unsigned int test_87(void)
5439 {
5440 unsigned int result = TC_PASS;
5441 const struct hmac_prng_test_vector vec = {
5442 32,
5443 16,
5444 32,
5445 0,
5446 128,
5447 {
5448 0x31, 0x36, 0xf4, 0x42, 0xdd, 0x3c, 0xdc, 0x24, 0x95,
5449 0x38, 0xbd, 0x5f, 0x0e, 0xb3, 0x55, 0xc7, 0x67, 0x0a,
5450 0xdd, 0x64, 0x27, 0xd1, 0xe1, 0x80, 0x31, 0x7b, 0x7d,
5451 0x64, 0x96, 0x78, 0x0b, 0x83,
5452 },
5453 {
5454 0x83, 0x65, 0x57, 0x29, 0x4d, 0x84, 0x4f, 0x21, 0x80,
5455 0xd3, 0x7a, 0xc0, 0x57, 0xcb, 0xb8, 0x69,
5456 },
5457 {
5458 0x48, 0x34, 0xc6, 0x8e, 0x72, 0xe2, 0x5a, 0xce, 0xc7,
5459 0xce, 0x57, 0x7e, 0xfd, 0x4d, 0xc9, 0x74, 0x6b, 0x8a,
5460 0xbb, 0x89, 0xa4, 0x46, 0xad, 0x39, 0xdb, 0x70, 0x42,
5461 0xce, 0xb6, 0xda, 0x9c, 0xde,
5462 },
5463 {
5464 0xc6, 0x6a, 0x48, 0x65, 0xfb, 0x9b, 0x0f, 0x86, 0xf0,
5465 0x69, 0x6d, 0x4a, 0x2e, 0x1e, 0xa5, 0xf7, 0xa3, 0x93,
5466 0x15, 0x7d, 0x09, 0x69, 0x29, 0xdf, 0xf4, 0x5f, 0x64,
5467 0xe7, 0x45, 0xd0, 0x6a, 0x3c,
5468 },
5469 {
5470 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5471 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5472 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5473 0x00, 0x00, 0x00, 0x00, 0x00,
5474 },
5475 {
5476 0xed, 0xb8, 0x11, 0x68, 0x13, 0x0e, 0xc4, 0x33, 0x01,
5477 0x6e, 0x07, 0x42, 0x93, 0x74, 0x07, 0x31, 0x37, 0xe0,
5478 0xec, 0x1d, 0x14, 0x64, 0xe6, 0x3a, 0xd2, 0xdd, 0x24,
5479 0xbf, 0xe5, 0xcb, 0x76, 0x3a, 0xa8, 0x79, 0x3d, 0x8f,
5480 0xb3, 0x2e, 0xb2, 0xc7, 0x0e, 0xb6, 0x70, 0x53, 0x7f,
5481 0xce, 0x9f, 0x7e, 0x53, 0xc4, 0x2d, 0x4b, 0xd8, 0x5d,
5482 0xbe, 0x0b, 0x2f, 0x50, 0xf4, 0x40, 0xcb, 0x13, 0x2c,
5483 0xe6, 0xcc, 0x46, 0xfa, 0xe1, 0x08, 0x69, 0xda, 0x2a,
5484 0xe6, 0xab, 0x8c, 0x10, 0xc3, 0xa1, 0xff, 0x2e, 0x45,
5485 0x29, 0xe4, 0x6c, 0x8f, 0x84, 0x3e, 0x0c, 0xf9, 0x31,
5486 0xb7, 0x70, 0xec, 0xf0, 0xd0, 0x63, 0x9f, 0x1a, 0x5d,
5487 0x93, 0x94, 0x29, 0x96, 0x01, 0x71, 0x4c, 0xdd, 0xab,
5488 0xea, 0x3d, 0x00, 0x4d, 0x24, 0xda, 0x00, 0x56, 0x66,
5489 0x51, 0x48, 0x48, 0xd2, 0xfe, 0x0a, 0x1c, 0x07, 0xc7,
5490 0x8f, 0x11,
5491 }
5492 };
5493
5494 TC_PRINT(".");
5495 result = do_hmac_prng_pr_false_test(87, &vec);
5496
5497 return result;
5498 }
5499
test_88(void)5500 unsigned int test_88(void)
5501 {
5502 unsigned int result = TC_PASS;
5503 const struct hmac_prng_test_vector vec = {
5504 32,
5505 16,
5506 32,
5507 0,
5508 128,
5509 {
5510 0x2e, 0x9b, 0xeb, 0x64, 0xfb, 0x0f, 0xd6, 0xfe, 0xa5,
5511 0x9b, 0x58, 0x73, 0xdc, 0x0a, 0x94, 0x6e, 0x8a, 0xf6,
5512 0x8a, 0xfb, 0xf8, 0xf1, 0x63, 0x58, 0x12, 0x4b, 0x4a,
5513 0x56, 0x79, 0xa1, 0xa8, 0xdb,
5514 },
5515 {
5516 0x05, 0xfa, 0xc5, 0x86, 0xd8, 0x8f, 0x7d, 0xdd, 0x6f,
5517 0xd8, 0x49, 0xe5, 0xbd, 0x93, 0x32, 0xe1,
5518 },
5519 {
5520 0x81, 0xa6, 0x57, 0xd8, 0x96, 0xe2, 0x94, 0xdb, 0x49,
5521 0x77, 0xb5, 0x26, 0x53, 0xb8, 0xea, 0x29, 0xc8, 0x9e,
5522 0xb2, 0xcd, 0xfd, 0xd9, 0x95, 0x67, 0x6c, 0x81, 0x35,
5523 0xba, 0x6e, 0x8d, 0xd3, 0x1f,
5524 },
5525 {
5526 0x0c, 0xc8, 0x1f, 0x75, 0x7d, 0x01, 0x42, 0x73, 0x66,
5527 0xbb, 0x76, 0x4b, 0x40, 0x37, 0x8c, 0x10, 0x24, 0xcf,
5528 0x88, 0x13, 0x6b, 0xcc, 0x36, 0x24, 0x3c, 0xdf, 0x11,
5529 0x1c, 0x28, 0xd9, 0x76, 0xf8,
5530 },
5531 {
5532 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5533 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5534 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5535 0x00, 0x00, 0x00, 0x00, 0x00,
5536 },
5537 {
5538 0xde, 0x24, 0x72, 0x30, 0xbc, 0x5e, 0x80, 0x5a, 0x67,
5539 0x88, 0xa4, 0xce, 0x2b, 0xdd, 0x42, 0x87, 0x04, 0xc0,
5540 0x76, 0x68, 0x63, 0x1f, 0x85, 0x91, 0x78, 0x12, 0xcb,
5541 0x04, 0xef, 0x3b, 0x76, 0x92, 0xe7, 0x26, 0x3a, 0x43,
5542 0x3a, 0x66, 0xcb, 0x78, 0x50, 0x4a, 0xdb, 0x04, 0xf5,
5543 0xb6, 0x03, 0x95, 0x68, 0x47, 0x83, 0xf4, 0x1a, 0x3c,
5544 0x93, 0x7a, 0xd0, 0xe1, 0x0c, 0xb6, 0x9c, 0x4e, 0x80,
5545 0x95, 0x47, 0x7f, 0xf4, 0x37, 0x8b, 0x8a, 0x3a, 0xe0,
5546 0x6c, 0x9a, 0x03, 0xe9, 0x85, 0xbf, 0x14, 0xb9, 0x99,
5547 0xd2, 0x76, 0xa4, 0x5c, 0x27, 0x76, 0x2b, 0x4c, 0x09,
5548 0xc5, 0x38, 0x72, 0xfe, 0xfc, 0xff, 0xf0, 0x34, 0x96,
5549 0xc1, 0xc8, 0x83, 0x3d, 0xaa, 0x4b, 0xb6, 0x09, 0x28,
5550 0xb4, 0x4a, 0x6c, 0x63, 0xaa, 0x44, 0x04, 0x03, 0x51,
5551 0x53, 0x65, 0x90, 0x7e, 0xd4, 0xd6, 0xcc, 0x87, 0x87,
5552 0xb8, 0x92,
5553 }
5554 };
5555
5556 TC_PRINT(".");
5557 result = do_hmac_prng_pr_false_test(88, &vec);
5558
5559 return result;
5560 }
5561
test_89(void)5562 unsigned int test_89(void)
5563 {
5564 unsigned int result = TC_PASS;
5565 const struct hmac_prng_test_vector vec = {
5566 32,
5567 16,
5568 32,
5569 0,
5570 128,
5571 {
5572 0x51, 0x15, 0xf6, 0x8f, 0xf0, 0x85, 0x32, 0xab, 0xc3,
5573 0x07, 0x7b, 0x0a, 0x49, 0xf9, 0xeb, 0x9c, 0x29, 0x02,
5574 0xfa, 0xb5, 0x23, 0x43, 0x9f, 0xb6, 0x89, 0x15, 0x7f,
5575 0xf9, 0xf0, 0x39, 0x97, 0xaf,
5576 },
5577 {
5578 0x41, 0xdf, 0x1a, 0xc0, 0x1f, 0x8c, 0xa0, 0x29, 0xff,
5579 0xf6, 0x03, 0x4d, 0x57, 0xd0, 0x93, 0xd0,
5580 },
5581 {
5582 0x1e, 0x92, 0xf8, 0xea, 0xb8, 0x16, 0x68, 0x25, 0x91,
5583 0x5a, 0x56, 0xbb, 0xb0, 0x0c, 0x4b, 0x25, 0x77, 0xcd,
5584 0xc9, 0x9c, 0x36, 0x12, 0x62, 0x69, 0xfc, 0xfe, 0xd6,
5585 0x82, 0xb1, 0x2b, 0x06, 0xed,
5586 },
5587 {
5588 0x0b, 0x24, 0x5e, 0x6e, 0x6e, 0xd2, 0x3e, 0x17, 0x1a,
5589 0x02, 0xd5, 0x2f, 0x1f, 0x1a, 0x52, 0x0e, 0xd5, 0x0d,
5590 0x67, 0xae, 0xdc, 0xf9, 0x99, 0xa9, 0x06, 0x3e, 0xae,
5591 0x51, 0xb3, 0xb3, 0x3e, 0x08,
5592 },
5593 {
5594 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5595 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5596 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5597 0x00, 0x00, 0x00, 0x00, 0x00,
5598 },
5599 {
5600 0x5b, 0x1e, 0xde, 0x46, 0xc5, 0x8a, 0x3d, 0x79, 0xcf,
5601 0x63, 0x05, 0xae, 0x59, 0xfc, 0xde, 0xdd, 0x1f, 0x88,
5602 0xf1, 0xfe, 0x35, 0x14, 0xf6, 0xb8, 0x16, 0x67, 0xeb,
5603 0x65, 0x91, 0x72, 0xa1, 0x20, 0xb7, 0x0d, 0x12, 0x8d,
5604 0x23, 0xcd, 0xcf, 0x2a, 0xdd, 0xb9, 0xb9, 0x7c, 0xda,
5605 0x13, 0x7a, 0xe3, 0x02, 0xbc, 0x99, 0x3e, 0x9e, 0x40,
5606 0x5b, 0x50, 0x85, 0xd8, 0xa0, 0xdf, 0x2e, 0x4b, 0x9e,
5607 0x0f, 0x4a, 0xcc, 0x64, 0x4a, 0x0b, 0xd4, 0x9c, 0xf6,
5608 0x0d, 0xd2, 0x17, 0x0c, 0x0e, 0xab, 0x8d, 0xf5, 0x37,
5609 0x39, 0x78, 0xd8, 0x9e, 0x41, 0x5f, 0xf6, 0x89, 0x10,
5610 0x80, 0xae, 0xed, 0xed, 0xe6, 0x26, 0x6e, 0xf1, 0x22,
5611 0xd4, 0x48, 0xa0, 0xb2, 0x05, 0x74, 0xcc, 0x51, 0x1c,
5612 0x3b, 0xdf, 0x35, 0x38, 0x4f, 0x58, 0x87, 0x8a, 0x04,
5613 0xeb, 0xcc, 0x86, 0x2f, 0x2f, 0x1d, 0xd3, 0xc9, 0x3a,
5614 0x10, 0x1a,
5615 }
5616 };
5617
5618 TC_PRINT(".");
5619 result = do_hmac_prng_pr_false_test(89, &vec);
5620
5621 return result;
5622 }
5623
test_90(void)5624 unsigned int test_90(void)
5625 {
5626 unsigned int result = TC_PASS;
5627 const struct hmac_prng_test_vector vec = {
5628 32,
5629 16,
5630 32,
5631 0,
5632 128,
5633 {
5634 0xdc, 0x59, 0x04, 0xbd, 0x75, 0x2c, 0x66, 0xe0, 0x25,
5635 0x07, 0x26, 0x22, 0x82, 0x4e, 0x4e, 0x78, 0x9d, 0xfa,
5636 0xfe, 0xdc, 0xba, 0xad, 0x33, 0x56, 0xa3, 0x44, 0x95,
5637 0x3e, 0x00, 0x2f, 0xf8, 0x45,
5638 },
5639 {
5640 0x1a, 0xa5, 0x63, 0x88, 0x3b, 0xba, 0x44, 0x4c, 0x88,
5641 0x50, 0x0e, 0xcf, 0xcc, 0xa2, 0xaf, 0x94,
5642 },
5643 {
5644 0xab, 0x75, 0x4f, 0x51, 0xc0, 0x3f, 0x29, 0xeb, 0x77,
5645 0x03, 0xca, 0x5e, 0x4c, 0x8b, 0x10, 0xe1, 0x68, 0x49,
5646 0x4a, 0x1f, 0x09, 0xb5, 0x44, 0x17, 0x5b, 0xd8, 0x7b,
5647 0x68, 0x7b, 0xf6, 0x9f, 0x7d,
5648 },
5649 {
5650 0xbb, 0xba, 0x28, 0x0c, 0x3e, 0x22, 0x07, 0x21, 0x2f,
5651 0x18, 0xf7, 0x8d, 0xba, 0x28, 0x62, 0x92, 0x0c, 0x2e,
5652 0x1b, 0x69, 0xb8, 0xc9, 0x53, 0x1d, 0xcf, 0x8a, 0x5c,
5653 0x98, 0x1b, 0xf4, 0x38, 0x65,
5654 },
5655 {
5656 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5657 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5658 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5659 0x00, 0x00, 0x00, 0x00, 0x00,
5660 },
5661 {
5662 0x2f, 0x7d, 0x00, 0x53, 0xb5, 0x08, 0x3a, 0xe0, 0x49,
5663 0x52, 0x4f, 0x18, 0xa2, 0x5d, 0x07, 0x83, 0xdb, 0xff,
5664 0xd2, 0xe5, 0x31, 0xf6, 0x73, 0xf8, 0x7b, 0xbc, 0x28,
5665 0x71, 0xc0, 0xc4, 0xbf, 0xcc, 0xbe, 0xb5, 0x44, 0xa0,
5666 0x9d, 0xc2, 0x08, 0xcf, 0xc7, 0x58, 0x2b, 0x48, 0x84,
5667 0xc9, 0x94, 0xbf, 0x84, 0xaa, 0xed, 0x1b, 0x55, 0xcd,
5668 0x88, 0xe9, 0x56, 0x43, 0x02, 0x08, 0x8c, 0xb5, 0x49,
5669 0x92, 0xc4, 0x00, 0x26, 0xca, 0xcd, 0xd0, 0x28, 0x31,
5670 0x92, 0x6d, 0x11, 0xbf, 0x19, 0x94, 0xe0, 0x8e, 0xf2,
5671 0xe9, 0x40, 0xf1, 0xa7, 0xac, 0xc1, 0xcb, 0x3b, 0xdd,
5672 0x4a, 0x3a, 0xfb, 0x2e, 0xe3, 0xa7, 0xde, 0xfe, 0xfb,
5673 0x6b, 0xa8, 0x7a, 0x5e, 0xf1, 0x82, 0x8c, 0x84, 0x02,
5674 0x86, 0x63, 0x1c, 0xf1, 0xc8, 0x84, 0x22, 0xba, 0x90,
5675 0xe3, 0x95, 0x4b, 0x42, 0x1b, 0x0a, 0x86, 0x9a, 0x9f,
5676 0xde, 0xe1,
5677 }
5678 };
5679
5680 TC_PRINT(".");
5681 result = do_hmac_prng_pr_false_test(90, &vec);
5682
5683 return result;
5684 }
5685
test_91(void)5686 unsigned int test_91(void)
5687 {
5688 unsigned int result = TC_PASS;
5689 const struct hmac_prng_test_vector vec = {
5690 32,
5691 16,
5692 0,
5693 0,
5694 128,
5695 {
5696 0xea, 0x28, 0x92, 0x6c, 0xd5, 0xdf, 0x4f, 0xef, 0xd5,
5697 0x72, 0xc9, 0x10, 0x3d, 0x87, 0xff, 0xb0, 0x4f, 0x59,
5698 0x9d, 0xa9, 0x5e, 0x1e, 0x6f, 0xec, 0xb8, 0x4f, 0x53,
5699 0xf7, 0x3f, 0xd0, 0x0d, 0x6c,
5700 },
5701 {
5702 0xcb, 0x40, 0xe1, 0x66, 0x55, 0xb9, 0xa2, 0xc7, 0x1e,
5703 0x8e, 0x36, 0x77, 0xb9, 0xea, 0x6c, 0x6f,
5704 },
5705 {
5706 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5707 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5708 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5709 0x00, 0x00, 0x00, 0x00, 0x00,
5710 },
5711 {
5712 0x3d, 0x2d, 0x1d, 0xb8, 0x8b, 0x84, 0x62, 0x78, 0x7a,
5713 0x55, 0x76, 0xc9, 0x5f, 0xd6, 0x60, 0x73, 0x4f, 0xb6,
5714 0x81, 0xf8, 0x94, 0xe8, 0xef, 0xc4, 0x7e, 0x3b, 0xe3,
5715 0xbf, 0xc3, 0x09, 0x8e, 0x40,
5716 },
5717 {
5718 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5719 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5720 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5721 0x00, 0x00, 0x00, 0x00, 0x00,
5722 },
5723 {
5724 0xe9, 0x29, 0xc6, 0xe7, 0x49, 0xc5, 0x17, 0x50, 0x31,
5725 0xdc, 0xc9, 0x26, 0xbc, 0xe8, 0xd5, 0x29, 0x14, 0x7b,
5726 0x5e, 0x94, 0x0f, 0x61, 0xd0, 0xba, 0x1f, 0x02, 0x83,
5727 0x1c, 0x80, 0xc2, 0x7a, 0x23, 0xcd, 0x4b, 0x5f, 0xfb,
5728 0x50, 0x7c, 0x7d, 0x09, 0xa7, 0x7e, 0x4c, 0x84, 0x27,
5729 0xe2, 0x90, 0x10, 0xcf, 0x1c, 0x80, 0x21, 0xa8, 0x0c,
5730 0xa2, 0x95, 0x04, 0xca, 0xa3, 0x50, 0xa2, 0x7d, 0x6c,
5731 0xa4, 0x55, 0x4f, 0xe4, 0xd8, 0xb0, 0x23, 0x55, 0x54,
5732 0xf2, 0x51, 0xa5, 0x9e, 0xc6, 0x72, 0x9d, 0x80, 0x2b,
5733 0x47, 0x30, 0x83, 0xb0, 0xbd, 0x6c, 0xa8, 0x3f, 0x6d,
5734 0x94, 0x5b, 0x3d, 0x1d, 0xe2, 0xb7, 0x06, 0xbd, 0xcc,
5735 0x3b, 0x50, 0xdd, 0xef, 0x57, 0x84, 0x7f, 0xff, 0x88,
5736 0xa4, 0x49, 0x85, 0x86, 0xca, 0x6a, 0xfe, 0x65, 0xe7,
5737 0x6c, 0x2d, 0x97, 0xf8, 0x7d, 0xde, 0xa6, 0x6f, 0x55,
5738 0x63, 0xe3,
5739 }
5740 };
5741
5742 TC_PRINT(".");
5743 result = do_hmac_prng_pr_false_test(91, &vec);
5744
5745 return result;
5746 }
5747
test_92(void)5748 unsigned int test_92(void)
5749 {
5750 unsigned int result = TC_PASS;
5751 const struct hmac_prng_test_vector vec = {
5752 32,
5753 16,
5754 0,
5755 0,
5756 128,
5757 {
5758 0xbc, 0x3c, 0x34, 0x69, 0x28, 0x92, 0x91, 0x69, 0xc7,
5759 0xa0, 0x0c, 0x6f, 0x53, 0x2f, 0x7e, 0xb1, 0xc4, 0xa7,
5760 0x7d, 0x42, 0x19, 0x3b, 0x65, 0x69, 0x7b, 0xdd, 0xe5,
5761 0xfe, 0x59, 0xae, 0x45, 0x20,
5762 },
5763 {
5764 0x1b, 0x2b, 0xa3, 0x3d, 0xa4, 0x9d, 0x3f, 0x6c, 0xf8,
5765 0x40, 0x39, 0xcd, 0x99, 0xcc, 0xe5, 0x0f,
5766 },
5767 {
5768 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5769 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5770 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5771 0x00, 0x00, 0x00, 0x00, 0x00,
5772 },
5773 {
5774 0xb4, 0x25, 0x4a, 0xab, 0x62, 0xc4, 0x15, 0xd8, 0x32,
5775 0x3d, 0x55, 0x6a, 0xec, 0xa6, 0x14, 0x17, 0xb4, 0x1b,
5776 0x09, 0x04, 0x65, 0x48, 0x0d, 0xb8, 0xfb, 0x86, 0x4f,
5777 0x57, 0x8f, 0x56, 0x7b, 0x3d,
5778 },
5779 {
5780 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5781 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5782 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5783 0x00, 0x00, 0x00, 0x00, 0x00,
5784 },
5785 {
5786 0x26, 0x02, 0xfc, 0xc0, 0xfc, 0xdb, 0x71, 0x04, 0x6d,
5787 0xa4, 0x22, 0x6e, 0x12, 0x77, 0xd5, 0xdf, 0x89, 0x22,
5788 0x54, 0x73, 0xe4, 0x56, 0x4f, 0x04, 0x7e, 0x60, 0x61,
5789 0x0d, 0x98, 0x1a, 0x18, 0xe2, 0xb4, 0x4d, 0x79, 0xa9,
5790 0x3c, 0xd8, 0x64, 0xb8, 0x0f, 0xd3, 0x77, 0x68, 0x5f,
5791 0xb4, 0x19, 0x8e, 0xce, 0x5b, 0x22, 0x11, 0xae, 0xba,
5792 0x57, 0xff, 0x49, 0xfd, 0xb6, 0x12, 0x82, 0x62, 0xe2,
5793 0x83, 0x6e, 0x7e, 0x81, 0x66, 0xf3, 0xc3, 0xd5, 0xa9,
5794 0x3c, 0x68, 0x6a, 0x9b, 0x70, 0xaa, 0x73, 0x9c, 0x66,
5795 0xf8, 0x5f, 0x84, 0xc4, 0x4c, 0x31, 0x46, 0x62, 0xd7,
5796 0xaf, 0x17, 0xad, 0x62, 0x5e, 0x55, 0xb6, 0xb4, 0x80,
5797 0x1f, 0x0d, 0xda, 0xd8, 0xe6, 0x36, 0x85, 0x4d, 0x22,
5798 0x8f, 0x01, 0xba, 0x8f, 0x2f, 0x81, 0x20, 0x76, 0x20,
5799 0x52, 0xd2, 0x89, 0x48, 0x19, 0xa9, 0xfb, 0xc7, 0x6d,
5800 0x6e, 0x6f,
5801 }
5802 };
5803
5804 TC_PRINT(".");
5805 result = do_hmac_prng_pr_false_test(92, &vec);
5806
5807 return result;
5808 }
5809
test_93(void)5810 unsigned int test_93(void)
5811 {
5812 unsigned int result = TC_PASS;
5813 const struct hmac_prng_test_vector vec = {
5814 32,
5815 16,
5816 0,
5817 0,
5818 128,
5819 {
5820 0x0b, 0xa0, 0x38, 0xbd, 0xb7, 0xad, 0x7b, 0xbe, 0x77,
5821 0xa6, 0xc7, 0xda, 0xa3, 0x3a, 0x2b, 0xdf, 0xd9, 0xa1,
5822 0xa5, 0xf3, 0x1c, 0xd2, 0xe7, 0x53, 0x77, 0xc7, 0x78,
5823 0xf4, 0x92, 0xf5, 0xb3, 0xcb,
5824 },
5825 {
5826 0x17, 0xa1, 0x34, 0x23, 0x4a, 0x30, 0xe0, 0x91, 0x70,
5827 0x89, 0x9c, 0x11, 0x5b, 0x43, 0xca, 0x16,
5828 },
5829 {
5830 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5831 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5832 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5833 0x00, 0x00, 0x00, 0x00, 0x00,
5834 },
5835 {
5836 0xdb, 0x02, 0x0e, 0x00, 0xba, 0xce, 0x41, 0x7b, 0xa7,
5837 0x68, 0x7e, 0x82, 0x9c, 0x1f, 0xfc, 0x91, 0xd2, 0x2e,
5838 0xf9, 0x3b, 0x27, 0xbf, 0xe1, 0x10, 0x77, 0x32, 0xcf,
5839 0xe0, 0x82, 0xa0, 0x5c, 0xf6,
5840 },
5841 {
5842 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5843 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5844 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5845 0x00, 0x00, 0x00, 0x00, 0x00,
5846 },
5847 {
5848 0x01, 0x79, 0x2f, 0x59, 0xd0, 0xa6, 0x3d, 0xef, 0xd8,
5849 0x7d, 0x13, 0x18, 0x8b, 0x1a, 0xec, 0xa9, 0x8c, 0x03,
5850 0xb1, 0x1b, 0x7d, 0xd6, 0x69, 0x83, 0x28, 0x17, 0x2d,
5851 0xfb, 0x65, 0xcc, 0xb6, 0x95, 0xa1, 0xba, 0xa5, 0x8e,
5852 0x44, 0xfd, 0x75, 0x23, 0xfd, 0x17, 0x6d, 0x27, 0x06,
5853 0x64, 0x33, 0x7e, 0x59, 0x8a, 0xa4, 0x53, 0x64, 0x3c,
5854 0xe3, 0xc6, 0xeb, 0xad, 0xed, 0xec, 0x63, 0x11, 0xe2,
5855 0xe1, 0xa6, 0xed, 0x22, 0x52, 0x47, 0x74, 0x01, 0x04,
5856 0x12, 0x53, 0xd3, 0xaf, 0xba, 0xda, 0xc0, 0x6e, 0x4d,
5857 0x06, 0xf4, 0x6d, 0xc3, 0xd7, 0xac, 0xe2, 0x87, 0xee,
5858 0x3e, 0x23, 0x28, 0x6b, 0x28, 0x85, 0x2e, 0xe0, 0xcf,
5859 0x1e, 0x7a, 0xb3, 0xad, 0xb0, 0xff, 0x10, 0x07, 0xd0,
5860 0x77, 0x16, 0xb0, 0x9c, 0x22, 0xeb, 0x13, 0x80, 0xbb,
5861 0xd0, 0xe8, 0xda, 0xc4, 0x82, 0xdf, 0x48, 0x0d, 0x41,
5862 0x58, 0x1d,
5863 }
5864 };
5865
5866 TC_PRINT(".");
5867 result = do_hmac_prng_pr_false_test(93, &vec);
5868
5869 return result;
5870 }
5871
test_94(void)5872 unsigned int test_94(void)
5873 {
5874 unsigned int result = TC_PASS;
5875 const struct hmac_prng_test_vector vec = {
5876 32,
5877 16,
5878 0,
5879 0,
5880 128,
5881 {
5882 0x2b, 0x37, 0xc7, 0x0c, 0x56, 0xa2, 0xa1, 0xc3, 0xd5,
5883 0x15, 0x0e, 0xdc, 0x4c, 0x31, 0x80, 0x7e, 0x17, 0x97,
5884 0x3f, 0x4a, 0xfd, 0x85, 0x32, 0x18, 0xe9, 0x94, 0x03,
5885 0xd8, 0xdd, 0x9f, 0x19, 0x5f,
5886 },
5887 {
5888 0xa5, 0x11, 0x0c, 0x3a, 0x0f, 0x45, 0xba, 0x13, 0xb8,
5889 0xea, 0x3f, 0x77, 0xf3, 0x33, 0x58, 0x49,
5890 },
5891 {
5892 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5893 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5894 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5895 0x00, 0x00, 0x00, 0x00, 0x00,
5896 },
5897 {
5898 0x14, 0x50, 0xbb, 0xf9, 0xf6, 0xb6, 0x83, 0x30, 0xfa,
5899 0x6c, 0x3e, 0xeb, 0x20, 0x18, 0x5e, 0xcb, 0xb3, 0x0c,
5900 0x4c, 0xcb, 0x4b, 0x7b, 0x5e, 0xe3, 0x27, 0x12, 0x63,
5901 0xa6, 0x43, 0xd4, 0xf3, 0xe9,
5902 },
5903 {
5904 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5905 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5906 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5907 0x00, 0x00, 0x00, 0x00, 0x00,
5908 },
5909 {
5910 0x57, 0x14, 0xe0, 0x8e, 0xcb, 0x34, 0xe5, 0x1c, 0x1b,
5911 0x5b, 0x91, 0x40, 0x5c, 0x81, 0x2e, 0x80, 0x10, 0x72,
5912 0x9b, 0x69, 0x95, 0xb6, 0xcc, 0x90, 0x14, 0x80, 0x9c,
5913 0x47, 0xc3, 0xb6, 0xba, 0xf1, 0x10, 0x13, 0x45, 0x75,
5914 0x14, 0x6c, 0x6b, 0xb4, 0x3d, 0x20, 0xfe, 0x16, 0x38,
5915 0x6d, 0x10, 0x05, 0xb5, 0x64, 0x1b, 0xdc, 0x12, 0xb6,
5916 0x45, 0x4f, 0x3b, 0xb7, 0x45, 0x88, 0xb6, 0x16, 0xc6,
5917 0x54, 0xbd, 0xca, 0x84, 0xf0, 0x71, 0x36, 0x4e, 0xfd,
5918 0x8d, 0x1e, 0xe6, 0x66, 0xcd, 0x60, 0xe4, 0xe2, 0xa8,
5919 0xa3, 0xde, 0x99, 0xe3, 0xf5, 0x6a, 0x72, 0x71, 0x4d,
5920 0xb0, 0x4f, 0x15, 0xaa, 0x03, 0x76, 0xac, 0xa8, 0xb1,
5921 0x2d, 0x50, 0x31, 0x8c, 0x12, 0x8e, 0x1f, 0x4c, 0xe2,
5922 0x58, 0x40, 0x09, 0xed, 0x4d, 0x7e, 0x57, 0x54, 0x4a,
5923 0xba, 0x9d, 0x63, 0x12, 0x69, 0xef, 0xf9, 0x95, 0x31,
5924 0x99, 0x23,
5925 }
5926 };
5927
5928 TC_PRINT(".");
5929 result = do_hmac_prng_pr_false_test(94, &vec);
5930
5931 return result;
5932 }
5933
test_95(void)5934 unsigned int test_95(void)
5935 {
5936 unsigned int result = TC_PASS;
5937 const struct hmac_prng_test_vector vec = {
5938 32,
5939 16,
5940 0,
5941 0,
5942 128,
5943 {
5944 0xab, 0x79, 0xf1, 0xff, 0x8a, 0x69, 0xc7, 0xf7, 0xeb,
5945 0x33, 0xe5, 0x7f, 0x03, 0xc5, 0xfd, 0x84, 0x58, 0xc0,
5946 0xaf, 0xa9, 0xd2, 0x73, 0x88, 0xb7, 0x84, 0x20, 0xa1,
5947 0xac, 0x8d, 0x98, 0xbe, 0x68,
5948 },
5949 {
5950 0xb3, 0x6b, 0x72, 0xa0, 0x4b, 0xbd, 0xd2, 0x85, 0x96,
5951 0x8d, 0x73, 0x05, 0xd3, 0x56, 0xf8, 0xff,
5952 },
5953 {
5954 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5955 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5956 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5957 0x00, 0x00, 0x00, 0x00, 0x00,
5958 },
5959 {
5960 0x5c, 0xe8, 0x78, 0x3b, 0x45, 0x3b, 0xa8, 0x56, 0x7e,
5961 0x7b, 0x6d, 0x7a, 0x63, 0xac, 0xe5, 0xb4, 0xea, 0xf8,
5962 0x75, 0x62, 0x42, 0x0e, 0x72, 0x9f, 0xae, 0x94, 0x39,
5963 0xce, 0x3a, 0x68, 0xdc, 0x86,
5964 },
5965 {
5966 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5967 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5968 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5969 0x00, 0x00, 0x00, 0x00, 0x00,
5970 },
5971 {
5972 0x9d, 0x10, 0x40, 0x4b, 0x95, 0x2e, 0x37, 0xc1, 0xd7,
5973 0x00, 0x7b, 0xea, 0xb7, 0xf8, 0xf1, 0xfa, 0xf2, 0x36,
5974 0x17, 0x00, 0xf1, 0x38, 0x8b, 0xeb, 0xfa, 0x83, 0xd8,
5975 0x57, 0xac, 0xbd, 0x65, 0x20, 0x94, 0x7a, 0x4a, 0x06,
5976 0x9f, 0x80, 0x27, 0x8d, 0xae, 0x1d, 0x5a, 0x8e, 0xef,
5977 0xf9, 0xd6, 0x9f, 0x63, 0x30, 0x18, 0x31, 0x0e, 0x2a,
5978 0x16, 0xac, 0xb9, 0x08, 0xb3, 0xb0, 0x29, 0xb5, 0xbb,
5979 0xef, 0x71, 0xf2, 0xa0, 0x59, 0x70, 0xf5, 0x44, 0xad,
5980 0xcf, 0xa6, 0xe7, 0x07, 0x79, 0x9f, 0xc1, 0xe6, 0xb7,
5981 0x8b, 0x96, 0xea, 0x1a, 0x57, 0x4f, 0x34, 0xd4, 0x49,
5982 0x94, 0xe6, 0x8d, 0x1c, 0x40, 0xbc, 0x2f, 0x39, 0x7a,
5983 0xe1, 0xa4, 0x87, 0x28, 0xa9, 0x2b, 0x8b, 0x4d, 0x46,
5984 0xe3, 0x47, 0x22, 0xdd, 0xf2, 0x4d, 0xd3, 0xa0, 0x35,
5985 0x26, 0x2e, 0x90, 0xc5, 0xbf, 0xfe, 0x04, 0x89, 0x6b,
5986 0x56, 0x58,
5987 }
5988 };
5989
5990 TC_PRINT(".");
5991 result = do_hmac_prng_pr_false_test(95, &vec);
5992
5993 return result;
5994 }
5995
test_96(void)5996 unsigned int test_96(void)
5997 {
5998 unsigned int result = TC_PASS;
5999 const struct hmac_prng_test_vector vec = {
6000 32,
6001 16,
6002 0,
6003 0,
6004 128,
6005 {
6006 0x05, 0xfa, 0xe5, 0xa2, 0x08, 0x03, 0xa1, 0x44, 0x21,
6007 0x11, 0xac, 0x0b, 0xd1, 0x81, 0x01, 0x86, 0x31, 0x9d,
6008 0x72, 0x1d, 0x29, 0x46, 0xec, 0xa2, 0x64, 0xfb, 0x31,
6009 0xac, 0x8d, 0x8c, 0xbd, 0xa8,
6010 },
6011 {
6012 0x97, 0xc4, 0x1c, 0xa6, 0x69, 0xe2, 0x23, 0xee, 0xcf,
6013 0xb2, 0x65, 0x99, 0x41, 0xff, 0xa1, 0xbc,
6014 },
6015 {
6016 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6017 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6018 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6019 0x00, 0x00, 0x00, 0x00, 0x00,
6020 },
6021 {
6022 0xdf, 0x4f, 0x01, 0xea, 0x4a, 0x91, 0xaa, 0x2e, 0xb6,
6023 0x51, 0x55, 0xf1, 0x53, 0xdc, 0xa7, 0x0a, 0xfc, 0xe9,
6024 0x8f, 0xf5, 0x6b, 0xff, 0x2a, 0x1c, 0x94, 0x11, 0x78,
6025 0xc2, 0xc2, 0xdb, 0xe9, 0x18,
6026 },
6027 {
6028 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6029 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6030 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6031 0x00, 0x00, 0x00, 0x00, 0x00,
6032 },
6033 {
6034 0xf3, 0xeb, 0x85, 0xc1, 0x68, 0x37, 0x79, 0x31, 0xa2,
6035 0xf6, 0x77, 0xf1, 0x06, 0x4c, 0x82, 0xde, 0x81, 0x5e,
6036 0xff, 0x75, 0x70, 0x1b, 0x03, 0x16, 0x06, 0x09, 0x87,
6037 0x94, 0xee, 0xa7, 0x16, 0x96, 0x80, 0x54, 0x85, 0xf7,
6038 0x77, 0xad, 0xe2, 0xf2, 0x50, 0xe4, 0x8f, 0xd5, 0x8d,
6039 0x23, 0x58, 0xaa, 0x8e, 0xeb, 0xff, 0x59, 0x7d, 0x39,
6040 0x6a, 0x7a, 0xfc, 0xf3, 0x8b, 0xe6, 0x5e, 0x0e, 0x78,
6041 0x40, 0x5d, 0x35, 0xee, 0x3d, 0x8d, 0xd2, 0x98, 0x5c,
6042 0xd6, 0x2c, 0x26, 0xca, 0xc1, 0xbd, 0x0d, 0x9c, 0x6e,
6043 0x67, 0xac, 0xcf, 0xbb, 0xe2, 0xbf, 0xda, 0x87, 0xd5,
6044 0x0d, 0xe6, 0x41, 0x5a, 0x4a, 0x9b, 0xaa, 0x27, 0x3f,
6045 0x99, 0x7b, 0xdc, 0xe9, 0x03, 0x27, 0x1a, 0x05, 0x82,
6046 0xbe, 0xfc, 0x40, 0x2f, 0x33, 0xfc, 0xab, 0xb6, 0xdb,
6047 0x6f, 0x14, 0x52, 0x52, 0xd8, 0x70, 0x55, 0x4d, 0x78,
6048 0x91, 0xd2,
6049 }
6050 };
6051
6052 TC_PRINT(".");
6053 result = do_hmac_prng_pr_false_test(96, &vec);
6054
6055 return result;
6056 }
6057
test_97(void)6058 unsigned int test_97(void)
6059 {
6060 unsigned int result = TC_PASS;
6061 const struct hmac_prng_test_vector vec = {
6062 32,
6063 16,
6064 0,
6065 0,
6066 128,
6067 {
6068 0xf0, 0x7a, 0xce, 0x29, 0x9e, 0xa3, 0xc1, 0x04, 0x9d,
6069 0x88, 0x37, 0x8e, 0x3a, 0x64, 0xd6, 0xfe, 0x78, 0x1b,
6070 0x87, 0x72, 0xcb, 0xd1, 0x92, 0xc9, 0x69, 0x2a, 0x4d,
6071 0x8e, 0x7a, 0xec, 0x19, 0x87,
6072 },
6073 {
6074 0x87, 0xcd, 0x0d, 0x8f, 0xff, 0x8d, 0xad, 0xec, 0x5b,
6075 0x8b, 0xcc, 0xd0, 0x85, 0xf4, 0x1a, 0x1e,
6076 },
6077 {
6078 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6079 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6080 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6081 0x00, 0x00, 0x00, 0x00, 0x00,
6082 },
6083 {
6084 0x42, 0xfb, 0x6e, 0x92, 0xee, 0x26, 0x3b, 0x1c, 0x03,
6085 0xa6, 0x3e, 0x5b, 0xea, 0xf8, 0x06, 0x62, 0xad, 0x67,
6086 0xb1, 0x95, 0xe1, 0x55, 0xd0, 0xac, 0xb7, 0x47, 0x8a,
6087 0x82, 0x93, 0x83, 0x1f, 0xc6,
6088 },
6089 {
6090 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6091 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6092 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6093 0x00, 0x00, 0x00, 0x00, 0x00,
6094 },
6095 {
6096 0x3e, 0x3e, 0xeb, 0x53, 0x80, 0x0b, 0x48, 0x74, 0xbd,
6097 0xda, 0x33, 0x1c, 0x1e, 0x9b, 0x98, 0xc5, 0x77, 0x00,
6098 0xe7, 0xc2, 0x06, 0xf5, 0xf3, 0xd0, 0xf4, 0x21, 0xe3,
6099 0xc4, 0x90, 0x79, 0x70, 0x84, 0xc0, 0x9e, 0xd6, 0xb4,
6100 0xbd, 0x58, 0x85, 0xbc, 0xaa, 0x42, 0xe0, 0x36, 0x87,
6101 0x0d, 0x63, 0x3d, 0xf8, 0xb3, 0xbf, 0x1d, 0x1b, 0xaf,
6102 0xf5, 0x88, 0xac, 0x9b, 0x24, 0xe0, 0x82, 0x7c, 0x26,
6103 0xed, 0x4f, 0x06, 0x18, 0xd9, 0x12, 0xd3, 0x90, 0x04,
6104 0xcc, 0xa9, 0x73, 0x9e, 0x0b, 0x99, 0x46, 0xf8, 0x92,
6105 0x7b, 0x58, 0x0b, 0xb2, 0xf3, 0x2c, 0x9f, 0x14, 0x2a,
6106 0x7b, 0x1c, 0x09, 0xb3, 0x2a, 0x40, 0x5e, 0x1e, 0xf5,
6107 0x20, 0x9c, 0xae, 0x79, 0x0b, 0x07, 0x11, 0xd1, 0x49,
6108 0x93, 0x51, 0x09, 0x53, 0x01, 0x8f, 0x27, 0x9c, 0x8c,
6109 0x8d, 0xfd, 0x06, 0x64, 0x8c, 0xd1, 0xb1, 0xa5, 0x8b,
6110 0xdf, 0x93,
6111 }
6112 };
6113
6114 TC_PRINT(".");
6115 result = do_hmac_prng_pr_false_test(97, &vec);
6116
6117 return result;
6118 }
6119
test_98(void)6120 unsigned int test_98(void)
6121 {
6122 unsigned int result = TC_PASS;
6123 const struct hmac_prng_test_vector vec = {
6124 32,
6125 16,
6126 0,
6127 0,
6128 128,
6129 {
6130 0x96, 0xc3, 0xe7, 0xe5, 0xfe, 0xcc, 0xc0, 0x61, 0x80,
6131 0x59, 0x00, 0x6c, 0x73, 0x5a, 0x6c, 0xe0, 0xb5, 0x11,
6132 0x4d, 0x20, 0x8c, 0x79, 0x14, 0x3e, 0x1c, 0x9f, 0x8e,
6133 0xf5, 0x03, 0x6e, 0x33, 0x0d,
6134 },
6135 {
6136 0x6b, 0xbb, 0x09, 0xc4, 0x16, 0x51, 0xc1, 0xc7, 0x8c,
6137 0x36, 0xc2, 0x5e, 0x4c, 0xee, 0x8a, 0xa9,
6138 },
6139 {
6140 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6141 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6142 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6143 0x00, 0x00, 0x00, 0x00, 0x00,
6144 },
6145 {
6146 0xab, 0xa5, 0x10, 0x86, 0x57, 0x7c, 0x69, 0x48, 0xb8,
6147 0x92, 0xcf, 0x52, 0x54, 0x52, 0x0b, 0xf8, 0xd2, 0x40,
6148 0xc2, 0xe3, 0xb0, 0x92, 0x4a, 0xfe, 0x69, 0x65, 0xac,
6149 0xfa, 0xbd, 0x7e, 0x0a, 0xbf,
6150 },
6151 {
6152 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6153 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6155 0x00, 0x00, 0x00, 0x00, 0x00,
6156 },
6157 {
6158 0x1d, 0x7e, 0xc4, 0x82, 0x34, 0xbb, 0x2a, 0xaa, 0xf5,
6159 0x4f, 0xbd, 0x55, 0xff, 0x06, 0x63, 0xf0, 0xfc, 0x82,
6160 0x82, 0x25, 0x31, 0xf6, 0x66, 0xee, 0x7f, 0x7f, 0x5e,
6161 0x25, 0x70, 0x07, 0xf3, 0x04, 0x62, 0x42, 0x8a, 0x51,
6162 0x9d, 0x86, 0xa8, 0x76, 0x4b, 0xa0, 0xd6, 0xa2, 0x33,
6163 0x1c, 0xb1, 0x29, 0x23, 0x2d, 0x9a, 0x5c, 0x03, 0x18,
6164 0x3b, 0x0f, 0x41, 0x9d, 0x81, 0x3f, 0x4c, 0x0e, 0x00,
6165 0xe4, 0xbe, 0x5d, 0xd1, 0x6a, 0x87, 0xa9, 0xfa, 0xec,
6166 0x89, 0x15, 0xa3, 0x9f, 0xd2, 0xd4, 0x06, 0xc5, 0x4e,
6167 0xb8, 0xaa, 0xf2, 0x28, 0xa0, 0x9a, 0x46, 0xdb, 0x55,
6168 0xfd, 0xa8, 0xa9, 0x0b, 0x27, 0xef, 0xc9, 0x6c, 0x46,
6169 0x1e, 0x9e, 0x9b, 0xe0, 0x8e, 0x27, 0xaf, 0x86, 0xb0,
6170 0x17, 0x50, 0xdb, 0xbf, 0xb4, 0x02, 0x45, 0xe9, 0x98,
6171 0xf0, 0x67, 0x96, 0x86, 0xe1, 0x8d, 0x80, 0x17, 0x02,
6172 0xff, 0xa2,
6173 }
6174 };
6175
6176 TC_PRINT(".");
6177 result = do_hmac_prng_pr_false_test(98, &vec);
6178
6179 return result;
6180 }
6181
test_99(void)6182 unsigned int test_99(void)
6183 {
6184 unsigned int result = TC_PASS;
6185 const struct hmac_prng_test_vector vec = {
6186 32,
6187 16,
6188 0,
6189 0,
6190 128,
6191 {
6192 0x21, 0x07, 0x25, 0xc6, 0x08, 0x39, 0x78, 0x2d, 0x36,
6193 0x65, 0xa3, 0x00, 0xad, 0xcf, 0x81, 0xc6, 0xd5, 0x14,
6194 0x78, 0xb1, 0xf1, 0x2e, 0x5d, 0x53, 0x10, 0x4b, 0xeb,
6195 0x38, 0x5c, 0xe1, 0x50, 0x24,
6196 },
6197 {
6198 0x12, 0x9a, 0x70, 0x5c, 0x88, 0xe4, 0xfd, 0xb1, 0x67,
6199 0xd3, 0x47, 0x94, 0xf6, 0xf7, 0x39, 0xb4,
6200 },
6201 {
6202 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6203 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6204 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6205 0x00, 0x00, 0x00, 0x00, 0x00,
6206 },
6207 {
6208 0xe1, 0x2e, 0x9c, 0xc5, 0x23, 0xd6, 0x18, 0xae, 0x6c,
6209 0xb6, 0x67, 0xec, 0xa7, 0xed, 0xd3, 0x54, 0x58, 0x18,
6210 0x7b, 0xd1, 0x9e, 0x90, 0x79, 0xb5, 0xc5, 0xe1, 0xcb,
6211 0x97, 0x1e, 0x38, 0x03, 0x09,
6212 },
6213 {
6214 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6215 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6216 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6217 0x00, 0x00, 0x00, 0x00, 0x00,
6218 },
6219 {
6220 0x34, 0x5b, 0x3b, 0x8c, 0x01, 0x1c, 0x78, 0x7e, 0x90,
6221 0x63, 0xf8, 0x11, 0xd5, 0x1f, 0x09, 0x6a, 0x31, 0xcc,
6222 0x1e, 0xa9, 0xfa, 0xa0, 0xb8, 0xf2, 0x9d, 0x91, 0x6b,
6223 0xe1, 0xb9, 0x25, 0xa4, 0xb7, 0x1f, 0x8e, 0x6d, 0xb5,
6224 0x6e, 0x0e, 0x22, 0xab, 0xfd, 0xe3, 0xf0, 0x35, 0xf2,
6225 0xd5, 0xa6, 0xfc, 0xde, 0x02, 0xe5, 0xdf, 0x8c, 0x0b,
6226 0xef, 0xe0, 0xc0, 0x04, 0x38, 0xfa, 0xa4, 0x27, 0x7c,
6227 0xa7, 0x90, 0xe6, 0x32, 0x31, 0x80, 0x61, 0xfb, 0xab,
6228 0xbb, 0x83, 0xdc, 0x83, 0xf7, 0x19, 0xf3, 0xce, 0xab,
6229 0x43, 0x1e, 0x3f, 0xe8, 0x06, 0x95, 0xbc, 0x44, 0xd7,
6230 0x4d, 0x09, 0x35, 0xc8, 0x42, 0x25, 0x21, 0xce, 0x78,
6231 0x4a, 0x92, 0x3c, 0xac, 0xc3, 0x75, 0x17, 0xb9, 0xdd,
6232 0x93, 0xc7, 0xc0, 0x60, 0x8f, 0x95, 0x5e, 0x5b, 0x48,
6233 0x68, 0x0b, 0x53, 0x71, 0x42, 0x45, 0x9a, 0x6d, 0x7b,
6234 0x79, 0xe8,
6235 }
6236 };
6237
6238 TC_PRINT(".");
6239 result = do_hmac_prng_pr_false_test(99, &vec);
6240
6241 return result;
6242 }
6243
test_100(void)6244 unsigned int test_100(void)
6245 {
6246 unsigned int result = TC_PASS;
6247 const struct hmac_prng_test_vector vec = {
6248 32,
6249 16,
6250 0,
6251 0,
6252 128,
6253 {
6254 0xf8, 0x7e, 0x04, 0x74, 0x38, 0xc6, 0xf5, 0xdc, 0x41,
6255 0xa5, 0xe3, 0xbd, 0x0d, 0xdb, 0x38, 0x6c, 0x99, 0x40,
6256 0x7b, 0xf2, 0x76, 0xb5, 0x78, 0x24, 0xd4, 0x36, 0x6e,
6257 0x09, 0x73, 0xef, 0x65, 0xf2,
6258 },
6259 {
6260 0x73, 0x00, 0x2b, 0x5a, 0xc3, 0xcd, 0xb5, 0x61, 0x5a,
6261 0x2e, 0x17, 0x92, 0xb9, 0x63, 0x86, 0xe2,
6262 },
6263 {
6264 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6265 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6266 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6267 0x00, 0x00, 0x00, 0x00, 0x00,
6268 },
6269 {
6270 0xca, 0x22, 0xf8, 0x53, 0xf4, 0x37, 0x1e, 0xd3, 0x34,
6271 0xab, 0x94, 0x44, 0x4b, 0x58, 0xa4, 0xf9, 0xcb, 0xda,
6272 0xcf, 0xda, 0x96, 0xe4, 0xa9, 0xe4, 0x6c, 0x9c, 0xf7,
6273 0x76, 0xa9, 0x03, 0x99, 0x0d,
6274 },
6275 {
6276 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6277 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6278 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6279 0x00, 0x00, 0x00, 0x00, 0x00,
6280 },
6281 {
6282 0x5d, 0x54, 0x82, 0x7f, 0xb3, 0x7f, 0xd8, 0x64, 0x41,
6283 0xab, 0x4e, 0xb3, 0x79, 0x60, 0x89, 0xde, 0x39, 0xf1,
6284 0x13, 0x24, 0x41, 0x58, 0x23, 0x6e, 0xc1, 0x62, 0x99,
6285 0x69, 0xf9, 0x29, 0x5f, 0x37, 0x83, 0x6b, 0x2d, 0x7d,
6286 0x4d, 0x6e, 0x59, 0xe0, 0xbd, 0xce, 0xfd, 0x92, 0x3c,
6287 0x2c, 0x44, 0x21, 0x18, 0xc8, 0xca, 0x3b, 0x00, 0xa2,
6288 0x58, 0xbe, 0xec, 0xad, 0x7d, 0x28, 0xd7, 0xe1, 0x21,
6289 0x62, 0xa4, 0x20, 0x21, 0x29, 0x18, 0x93, 0x7a, 0x4d,
6290 0x0d, 0xa5, 0xea, 0x7c, 0x0b, 0x96, 0x02, 0x81, 0x32,
6291 0x66, 0x01, 0x5f, 0x38, 0x5e, 0xd5, 0xc6, 0x9a, 0x48,
6292 0x37, 0x5e, 0x9b, 0x37, 0x38, 0x81, 0x4f, 0x16, 0xc0,
6293 0x85, 0xd5, 0xcf, 0xd1, 0xd2, 0xe6, 0x26, 0x7e, 0x1c,
6294 0x5d, 0x7b, 0xad, 0x88, 0xf2, 0x0b, 0x3a, 0xb0, 0xab,
6295 0x27, 0x9f, 0xcb, 0x65, 0x10, 0x20, 0xec, 0xfc, 0x15,
6296 0x07, 0x63,
6297 }
6298 };
6299
6300 TC_PRINT(".");
6301 result = do_hmac_prng_pr_false_test(100, &vec);
6302
6303 return result;
6304 }
6305
test_101(void)6306 unsigned int test_101(void)
6307 {
6308 unsigned int result = TC_PASS;
6309 const struct hmac_prng_test_vector vec = {
6310 32,
6311 16,
6312 0,
6313 0,
6314 128,
6315 {
6316 0x50, 0xeb, 0xb3, 0x84, 0x61, 0xd3, 0xf2, 0x6c, 0x5a,
6317 0xc2, 0xec, 0xf5, 0x3a, 0x03, 0x41, 0x78, 0x42, 0x52,
6318 0x5b, 0xad, 0x57, 0x7f, 0x05, 0x7e, 0xd9, 0x20, 0xc1,
6319 0xc4, 0x97, 0x0e, 0x55, 0x29,
6320 },
6321 {
6322 0x99, 0x6c, 0x6b, 0x9d, 0xb4, 0xa1, 0xaa, 0xb9, 0xd3,
6323 0x1c, 0x75, 0x4a, 0xf4, 0x9a, 0x54, 0x45,
6324 },
6325 {
6326 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6327 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6328 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6329 0x00, 0x00, 0x00, 0x00, 0x00,
6330 },
6331 {
6332 0xea, 0x89, 0x85, 0x50, 0xce, 0xe3, 0x88, 0x88, 0xc0,
6333 0x38, 0xf6, 0x7b, 0x49, 0x12, 0xe4, 0x8a, 0xa9, 0xe3,
6334 0x78, 0xff, 0x3a, 0xdc, 0x9c, 0xc6, 0xc5, 0xba, 0xee,
6335 0x8c, 0x37, 0x6f, 0xc7, 0x08,
6336 },
6337 {
6338 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6339 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6340 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6341 0x00, 0x00, 0x00, 0x00, 0x00,
6342 },
6343 {
6344 0x77, 0x37, 0x71, 0xf1, 0xf3, 0x90, 0x37, 0x63, 0xf4,
6345 0xf9, 0xd6, 0xb2, 0x16, 0x73, 0xd2, 0xa9, 0x3f, 0x6e,
6346 0x4d, 0x03, 0x63, 0x6d, 0x38, 0x1b, 0xc2, 0x68, 0x64,
6347 0xb4, 0x64, 0x96, 0xe9, 0x58, 0x8a, 0x06, 0x4b, 0x00,
6348 0xe8, 0x46, 0xa8, 0xd9, 0x1e, 0x30, 0x2c, 0x47, 0xda,
6349 0xcd, 0xab, 0x73, 0x88, 0xf5, 0xcd, 0x00, 0x93, 0xd2,
6350 0x17, 0x4e, 0x33, 0x32, 0x7f, 0x9d, 0xf6, 0x53, 0x71,
6351 0x24, 0xab, 0x91, 0xcf, 0x35, 0xcb, 0xee, 0xce, 0x38,
6352 0xf6, 0x37, 0x3a, 0x8b, 0x85, 0x1d, 0xa2, 0x64, 0x5d,
6353 0xad, 0x5c, 0xf0, 0x1a, 0x59, 0xf5, 0x31, 0x80, 0xa0,
6354 0xfb, 0xfe, 0xb9, 0x28, 0xa7, 0x10, 0x90, 0xd1, 0x99,
6355 0x7b, 0x05, 0x5f, 0xa2, 0x0f, 0x14, 0xf4, 0x9c, 0x28,
6356 0xdc, 0x06, 0x5d, 0xdd, 0x84, 0xa1, 0x4d, 0x93, 0x23,
6357 0x19, 0x2b, 0x24, 0x28, 0xae, 0xc6, 0xf9, 0x15, 0xf9,
6358 0x04, 0x91,
6359 }
6360 };
6361
6362 TC_PRINT(".");
6363 result = do_hmac_prng_pr_false_test(101, &vec);
6364
6365 return result;
6366 }
6367
test_102(void)6368 unsigned int test_102(void)
6369 {
6370 unsigned int result = TC_PASS;
6371 const struct hmac_prng_test_vector vec = {
6372 32,
6373 16,
6374 0,
6375 0,
6376 128,
6377 {
6378 0xc1, 0x3d, 0x6c, 0xd6, 0x3b, 0xb7, 0x93, 0x11, 0x74,
6379 0x69, 0x6f, 0x3e, 0x04, 0xa0, 0xc4, 0x1c, 0xb0, 0xb2,
6380 0x56, 0x11, 0x34, 0xe8, 0x47, 0xce, 0x03, 0xe3, 0x63,
6381 0x26, 0xb8, 0x03, 0xf8, 0xab,
6382 },
6383 {
6384 0x20, 0x84, 0xab, 0x32, 0x37, 0x43, 0x92, 0xea, 0x9f,
6385 0x6e, 0x8a, 0x47, 0x4f, 0x18, 0xe9, 0xd7,
6386 },
6387 {
6388 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6389 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6390 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6391 0x00, 0x00, 0x00, 0x00, 0x00,
6392 },
6393 {
6394 0xae, 0xc5, 0xa6, 0xa7, 0x23, 0x2a, 0x52, 0xb8, 0x1c,
6395 0xe7, 0xe9, 0x81, 0xa3, 0x59, 0xce, 0xf1, 0xbb, 0xd2,
6396 0xf1, 0xef, 0xf8, 0x48, 0x83, 0x71, 0x46, 0x8c, 0xd1,
6397 0xf4, 0x14, 0x7a, 0x89, 0xc2,
6398 },
6399 {
6400 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6401 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6402 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6403 0x00, 0x00, 0x00, 0x00, 0x00,
6404 },
6405 {
6406 0xda, 0xea, 0x78, 0x88, 0x17, 0x37, 0xcb, 0x26, 0xd6,
6407 0x0c, 0x36, 0xce, 0xb9, 0xfe, 0xc3, 0xd2, 0x81, 0xc7,
6408 0xae, 0xc5, 0x4b, 0x4b, 0x98, 0x50, 0x93, 0x7b, 0x37,
6409 0x3b, 0x2b, 0x26, 0x21, 0xfe, 0x07, 0x75, 0x85, 0xa1,
6410 0xfe, 0x88, 0x26, 0x5d, 0x84, 0xf2, 0x25, 0x55, 0x2e,
6411 0x5c, 0x85, 0xcb, 0xec, 0x8d, 0x00, 0x06, 0x96, 0x48,
6412 0x06, 0x5a, 0xc1, 0x20, 0x73, 0xae, 0xdc, 0xe8, 0xc9,
6413 0x40, 0x46, 0x09, 0x49, 0xb5, 0x97, 0x66, 0x7e, 0xcf,
6414 0xce, 0xda, 0xbd, 0x7a, 0x86, 0xa9, 0x79, 0xb9, 0x04,
6415 0xa2, 0x4d, 0x32, 0xdb, 0x10, 0x22, 0x3e, 0xae, 0x5a,
6416 0x98, 0xa0, 0xd1, 0xb6, 0x57, 0x1b, 0x86, 0x43, 0xdf,
6417 0x2c, 0x62, 0x65, 0xa5, 0xd6, 0x6c, 0xee, 0x9f, 0x4a,
6418 0xbf, 0xc5, 0x77, 0x81, 0x46, 0xd6, 0xfb, 0x2b, 0x85,
6419 0x3d, 0x82, 0x63, 0x6c, 0x13, 0x25, 0xb2, 0xd1, 0xef,
6420 0x45, 0x76,
6421 }
6422 };
6423
6424 TC_PRINT(".");
6425 result = do_hmac_prng_pr_false_test(102, &vec);
6426
6427 return result;
6428 }
6429
test_103(void)6430 unsigned int test_103(void)
6431 {
6432 unsigned int result = TC_PASS;
6433 const struct hmac_prng_test_vector vec = {
6434 32,
6435 16,
6436 0,
6437 0,
6438 128,
6439 {
6440 0x67, 0xf9, 0x8d, 0x4d, 0x9f, 0x35, 0xa8, 0xda, 0xc0,
6441 0x3d, 0x19, 0x92, 0x22, 0xb0, 0x7c, 0x78, 0x5f, 0x11,
6442 0xdc, 0x51, 0x7a, 0x8d, 0x88, 0x40, 0xf5, 0xfe, 0xa4,
6443 0xb6, 0xfd, 0x68, 0x44, 0x8e,
6444 },
6445 {
6446 0x1d, 0xcd, 0x3a, 0x1b, 0xbb, 0x4f, 0x94, 0xad, 0x78,
6447 0x35, 0x58, 0x42, 0x89, 0x3d, 0xe0, 0x35,
6448 },
6449 {
6450 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6451 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6452 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6453 0x00, 0x00, 0x00, 0x00, 0x00,
6454 },
6455 {
6456 0xf1, 0xf9, 0xca, 0xee, 0x31, 0x03, 0x6a, 0x2a, 0x20,
6457 0x0a, 0x05, 0x2d, 0x8a, 0x1e, 0x06, 0x59, 0x20, 0xb8,
6458 0x36, 0x3f, 0xbb, 0xf1, 0xc3, 0x71, 0xa2, 0x32, 0x44,
6459 0xc6, 0x83, 0x51, 0x13, 0xd3,
6460 },
6461 {
6462 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6463 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6464 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6465 0x00, 0x00, 0x00, 0x00, 0x00,
6466 },
6467 {
6468 0x9f, 0x24, 0xa5, 0x6f, 0x98, 0x58, 0x51, 0x26, 0x2d,
6469 0x0c, 0xfd, 0xf1, 0x22, 0xb8, 0x9b, 0x3b, 0x93, 0xa1,
6470 0xdf, 0xd9, 0x7a, 0x29, 0x7f, 0xb1, 0xf6, 0xfc, 0x39,
6471 0xd6, 0xc7, 0x19, 0x94, 0x2e, 0x28, 0x97, 0x7b, 0xde,
6472 0x91, 0xcb, 0x39, 0x41, 0xc0, 0x35, 0xe3, 0xec, 0x45,
6473 0x4d, 0xbf, 0x9d, 0xbb, 0x43, 0x57, 0x69, 0x20, 0xdc,
6474 0x47, 0x27, 0x3d, 0x3f, 0x82, 0xcc, 0xc8, 0xa8, 0xfa,
6475 0xbc, 0x1b, 0x53, 0x2f, 0x9d, 0x1c, 0x48, 0x7d, 0xb3,
6476 0x1e, 0x7e, 0xaa, 0xc3, 0x32, 0x5e, 0xdd, 0x1f, 0xd8,
6477 0x08, 0x70, 0xcf, 0x30, 0xcc, 0xdc, 0x87, 0xa1, 0xfa,
6478 0x4b, 0x88, 0xeb, 0x7a, 0x1c, 0x46, 0x4d, 0x0b, 0x68,
6479 0xef, 0xc3, 0xdd, 0x76, 0x0a, 0x32, 0x59, 0xad, 0x28,
6480 0x0d, 0x49, 0x64, 0x2b, 0xeb, 0xde, 0xbc, 0x1a, 0x58,
6481 0x29, 0xf3, 0x2f, 0x09, 0xfb, 0x77, 0x7a, 0xfb, 0x40,
6482 0x9a, 0xee,
6483 }
6484 };
6485
6486 TC_PRINT(".");
6487 result = do_hmac_prng_pr_false_test(103, &vec);
6488
6489 return result;
6490 }
6491
test_104(void)6492 unsigned int test_104(void)
6493 {
6494 unsigned int result = TC_PASS;
6495 const struct hmac_prng_test_vector vec = {
6496 32,
6497 16,
6498 0,
6499 0,
6500 128,
6501 {
6502 0x0f, 0x4a, 0x78, 0xc8, 0x62, 0x3d, 0x30, 0x31, 0x54,
6503 0x39, 0x8c, 0xb9, 0x34, 0x08, 0x57, 0xba, 0x93, 0x73,
6504 0x88, 0xf9, 0x5b, 0x01, 0x97, 0xec, 0xba, 0x48, 0x7c,
6505 0x4c, 0xf0, 0x21, 0xb3, 0xca,
6506 },
6507 {
6508 0x6c, 0x02, 0xe6, 0x93, 0x98, 0xab, 0x7b, 0x7d, 0xfc,
6509 0x4a, 0xd8, 0x3e, 0x7f, 0x3c, 0xa8, 0xff,
6510 },
6511 {
6512 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6513 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6514 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6515 0x00, 0x00, 0x00, 0x00, 0x00,
6516 },
6517 {
6518 0x03, 0x02, 0x0b, 0x45, 0x11, 0xb2, 0x52, 0x9b, 0x2a,
6519 0x33, 0x48, 0x07, 0x8a, 0xd0, 0x31, 0x8b, 0xa5, 0xf8,
6520 0x25, 0xa1, 0xbb, 0x06, 0x72, 0xdc, 0x89, 0x4c, 0xb4,
6521 0xd1, 0xdd, 0x3e, 0x29, 0x4d,
6522 },
6523 {
6524 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6525 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6526 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6527 0x00, 0x00, 0x00, 0x00, 0x00,
6528 },
6529 {
6530 0xf5, 0xb9, 0xa5, 0x26, 0x29, 0x70, 0xb8, 0xcd, 0x94,
6531 0x48, 0x2a, 0xc6, 0xe4, 0xde, 0xdd, 0x8f, 0xfd, 0xca,
6532 0xca, 0x0f, 0xc3, 0x7e, 0x6d, 0x0f, 0xa7, 0x1a, 0xb1,
6533 0x0e, 0x5a, 0xe0, 0x74, 0x87, 0xc6, 0x88, 0x01, 0x7d,
6534 0xc0, 0x15, 0x14, 0xf8, 0x57, 0x70, 0x2b, 0x28, 0xcd,
6535 0x8e, 0x4f, 0x1b, 0x08, 0x39, 0xb9, 0xec, 0x4d, 0x6f,
6536 0x9e, 0x07, 0xe4, 0x55, 0x1e, 0x15, 0x0c, 0x91, 0xcd,
6537 0x4f, 0x4a, 0xa2, 0x2a, 0xa7, 0xe8, 0xa5, 0xe1, 0x07,
6538 0x78, 0x69, 0xb2, 0x45, 0x4b, 0xb8, 0xcd, 0xda, 0xee,
6539 0x69, 0xa0, 0x67, 0xc6, 0xb0, 0xdc, 0xc1, 0x78, 0xfe,
6540 0x1d, 0xa6, 0xed, 0xe5, 0xd5, 0x32, 0x69, 0x37, 0x25,
6541 0x36, 0xf3, 0x4b, 0xed, 0x37, 0x85, 0x66, 0xcb, 0xd8,
6542 0x98, 0x6d, 0xc1, 0xae, 0x08, 0x48, 0xbe, 0x74, 0x90,
6543 0x79, 0xdd, 0x57, 0x2d, 0x4d, 0x62, 0xe5, 0x1f, 0xe6,
6544 0x59, 0xca,
6545 }
6546 };
6547
6548 TC_PRINT(".");
6549 result = do_hmac_prng_pr_false_test(104, &vec);
6550
6551 return result;
6552 }
6553
test_105(void)6554 unsigned int test_105(void)
6555 {
6556 unsigned int result = TC_PASS;
6557 const struct hmac_prng_test_vector vec = {
6558 32,
6559 16,
6560 0,
6561 0,
6562 128,
6563 {
6564 0x00, 0x1c, 0xf2, 0xbb, 0x87, 0xee, 0x4a, 0xa1, 0x45,
6565 0x01, 0x19, 0x08, 0xce, 0x79, 0x92, 0x07, 0x00, 0xff,
6566 0x40, 0xce, 0x76, 0x50, 0x99, 0x29, 0x2b, 0x7b, 0x7a,
6567 0xec, 0x68, 0xee, 0xb0, 0x5e,
6568 },
6569 {
6570 0xb1, 0x01, 0x15, 0xcc, 0xfe, 0xfe, 0xc7, 0x48, 0x7c,
6571 0x87, 0x24, 0x12, 0x97, 0x70, 0x67, 0xa9,
6572 },
6573 {
6574 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6575 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6576 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6577 0x00, 0x00, 0x00, 0x00, 0x00,
6578 },
6579 {
6580 0x9b, 0x5d, 0xcf, 0xa4, 0x0b, 0x5c, 0x5a, 0x9d, 0xca,
6581 0xe4, 0xe8, 0xcd, 0xf1, 0x6e, 0x14, 0x58, 0xd4, 0x91,
6582 0x64, 0xb3, 0x17, 0xce, 0xfc, 0xe6, 0x3f, 0x28, 0xc1,
6583 0x0d, 0x29, 0x22, 0x99, 0x74,
6584 },
6585 {
6586 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6587 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6588 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6589 0x00, 0x00, 0x00, 0x00, 0x00,
6590 },
6591 {
6592 0xe0, 0xf0, 0x73, 0xc0, 0xbb, 0x40, 0x24, 0xc4, 0x6c,
6593 0xed, 0xd5, 0x6f, 0x6d, 0xde, 0x44, 0x67, 0x7d, 0x8d,
6594 0xcd, 0xaf, 0x8d, 0xf9, 0x39, 0xe2, 0xcb, 0xfa, 0xaf,
6595 0x0f, 0xc3, 0x81, 0x0f, 0x62, 0x1b, 0x29, 0xdd, 0xaa,
6596 0x78, 0x10, 0xee, 0x3c, 0xfc, 0x25, 0x12, 0x32, 0xc4,
6597 0xf8, 0xb0, 0x1c, 0x56, 0x64, 0xe4, 0xaf, 0x5e, 0xa0,
6598 0xa7, 0xa2, 0x0c, 0x76, 0x8a, 0xae, 0x83, 0x92, 0x18,
6599 0x63, 0xd7, 0xe0, 0xff, 0x12, 0x77, 0x8e, 0xe1, 0xe6,
6600 0xe4, 0xef, 0xee, 0xa6, 0x32, 0x0f, 0x9c, 0x8d, 0xd4,
6601 0x39, 0xe7, 0x98, 0x7e, 0x62, 0x0a, 0xc2, 0xee, 0x40,
6602 0x96, 0x52, 0xba, 0x7f, 0x07, 0x70, 0x8c, 0xa1, 0x9a,
6603 0x2e, 0x16, 0xf4, 0xd3, 0x24, 0xba, 0x1a, 0xcc, 0xa3,
6604 0xa4, 0xd2, 0x44, 0x30, 0x24, 0x38, 0x60, 0x8b, 0xa3,
6605 0xb6, 0x4c, 0xae, 0x05, 0x54, 0x5a, 0xd8, 0x67, 0x19,
6606 0x49, 0x51,
6607 }
6608 };
6609
6610 TC_PRINT(".");
6611 result = do_hmac_prng_pr_false_test(105, &vec);
6612
6613 return result;
6614 }
6615
test_106(void)6616 unsigned int test_106(void)
6617 {
6618 unsigned int result = TC_PASS;
6619 const struct hmac_prng_test_vector vec = {
6620 32,
6621 16,
6622 32,
6623 0,
6624 128,
6625 {
6626 0x22, 0xd8, 0xc6, 0x2b, 0xcd, 0xdf, 0x5d, 0xa1, 0xdb,
6627 0xdb, 0x09, 0x3d, 0x6b, 0x1f, 0x66, 0x3d, 0xde, 0x33,
6628 0x73, 0x43, 0xc5, 0x6c, 0xcf, 0xd4, 0x0a, 0xcb, 0xe3,
6629 0x30, 0x23, 0x09, 0xea, 0xe0,
6630 },
6631 {
6632 0x2a, 0x4b, 0x8e, 0x66, 0xde, 0xaa, 0xc3, 0x8b, 0x70,
6633 0xd9, 0xff, 0xc2, 0x0c, 0x58, 0x5d, 0xa5,
6634 },
6635 {
6636 0x0a, 0x33, 0x70, 0x38, 0xf4, 0xb4, 0x57, 0x3f, 0xf4,
6637 0x3a, 0x43, 0x21, 0xa5, 0x86, 0xca, 0x77, 0x7c, 0x30,
6638 0x30, 0x12, 0x67, 0xd8, 0x2f, 0xdf, 0x93, 0x71, 0x98,
6639 0xac, 0x56, 0xc7, 0x06, 0x2c,
6640 },
6641 {
6642 0x0b, 0x6f, 0xd1, 0x79, 0xe4, 0x4f, 0x14, 0x9f, 0x06,
6643 0x2d, 0xa4, 0xf6, 0x6f, 0x82, 0x9c, 0x3c, 0x58, 0xc4,
6644 0xa0, 0xa4, 0xf7, 0x5a, 0xc2, 0xa9, 0xe0, 0x24, 0x0d,
6645 0x43, 0xbe, 0xc3, 0x0e, 0x44,
6646 },
6647 {
6648 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6649 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6650 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6651 0x00, 0x00, 0x00, 0x00, 0x00,
6652 },
6653 {
6654 0x04, 0x6e, 0x19, 0xb4, 0xd8, 0xab, 0x38, 0xdd, 0x08,
6655 0xde, 0xfd, 0xd0, 0xd7, 0xc3, 0x0c, 0x8c, 0x75, 0xd5,
6656 0x68, 0x9c, 0xa2, 0x6f, 0x2b, 0xc9, 0x94, 0xac, 0x7f,
6657 0xca, 0x4f, 0xdb, 0xee, 0x80, 0x67, 0x7d, 0xfb, 0xdd,
6658 0x85, 0x1e, 0x77, 0x22, 0x83, 0x58, 0x44, 0xdc, 0xa7,
6659 0x9d, 0xec, 0x4a, 0x3f, 0xa8, 0x2f, 0xeb, 0x88, 0x4d,
6660 0xf7, 0xd4, 0x74, 0xbd, 0x97, 0x2e, 0x12, 0x61, 0x9b,
6661 0xd5, 0xd6, 0xcb, 0x1b, 0x95, 0x1e, 0xac, 0x47, 0xee,
6662 0xc2, 0x58, 0x11, 0x95, 0xb5, 0x31, 0x53, 0x4e, 0xde,
6663 0x50, 0x7a, 0xf6, 0xf7, 0x41, 0x7f, 0xca, 0x84, 0x53,
6664 0x2b, 0xe7, 0xef, 0x5d, 0xa6, 0x73, 0x8d, 0xbf, 0x7a,
6665 0xad, 0xfc, 0xd7, 0xcb, 0x88, 0x88, 0x62, 0xb5, 0x2e,
6666 0xc7, 0x73, 0xcf, 0x3f, 0xd0, 0x0e, 0x6d, 0x4e, 0xfb,
6667 0x30, 0x71, 0xaf, 0x9b, 0x70, 0xa4, 0x99, 0x35, 0xa3,
6668 0xba, 0x38,
6669 }
6670 };
6671
6672 TC_PRINT(".");
6673 result = do_hmac_prng_pr_false_test(106, &vec);
6674
6675 return result;
6676 }
6677
test_107(void)6678 unsigned int test_107(void)
6679 {
6680 unsigned int result = TC_PASS;
6681 const struct hmac_prng_test_vector vec = {
6682 32,
6683 16,
6684 32,
6685 0,
6686 128,
6687 {
6688 0x64, 0x11, 0x75, 0x6d, 0xc7, 0xaa, 0x3b, 0xe0, 0x96,
6689 0xad, 0x41, 0x9c, 0xe8, 0x38, 0x1c, 0x09, 0x10, 0xd2,
6690 0xa2, 0xaf, 0x5e, 0x94, 0x4d, 0x8f, 0xf2, 0x1f, 0x2f,
6691 0xc5, 0x66, 0x6a, 0xcb, 0x87,
6692 },
6693 {
6694 0x73, 0xb6, 0x8f, 0x5c, 0x74, 0x9f, 0xac, 0x09, 0xf0,
6695 0x1b, 0xa5, 0x65, 0xa7, 0x57, 0x89, 0xf8,
6696 },
6697 {
6698 0x3c, 0xa3, 0xd9, 0x14, 0x6e, 0x2e, 0xbf, 0xf2, 0x1a,
6699 0x28, 0x7d, 0x38, 0x5c, 0x42, 0x24, 0xed, 0x23, 0x59,
6700 0x6d, 0x74, 0x50, 0x17, 0xf3, 0xb8, 0x11, 0x48, 0xc9,
6701 0x2f, 0x3b, 0x9b, 0x27, 0xa1,
6702 },
6703 {
6704 0xd7, 0x70, 0x12, 0x8e, 0x71, 0x1a, 0x8d, 0xf1, 0x63,
6705 0xf4, 0xe2, 0x89, 0xe7, 0x75, 0x03, 0x2f, 0xdb, 0x47,
6706 0x3a, 0xa3, 0x8f, 0x7e, 0x1d, 0x29, 0x17, 0x26, 0x12,
6707 0x13, 0x78, 0xe9, 0xa8, 0xde,
6708 },
6709 {
6710 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6711 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6712 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6713 0x00, 0x00, 0x00, 0x00, 0x00,
6714 },
6715 {
6716 0xcd, 0x72, 0xf8, 0x09, 0xd9, 0xcd, 0x1a, 0xe1, 0x3d,
6717 0x99, 0x5d, 0x1c, 0xac, 0x36, 0x8e, 0xdb, 0xff, 0xf4,
6718 0x56, 0x97, 0xde, 0xb1, 0xd1, 0xb7, 0x95, 0xff, 0xcf,
6719 0x35, 0x49, 0x36, 0xf0, 0xbf, 0x61, 0xcf, 0x55, 0x0d,
6720 0x04, 0x3f, 0x9d, 0x2f, 0xa4, 0x62, 0x81, 0xa1, 0x39,
6721 0x3e, 0xac, 0xe3, 0x84, 0x7d, 0x5e, 0x4c, 0x63, 0x35,
6722 0x18, 0x2f, 0x87, 0xf4, 0x65, 0x80, 0x29, 0x89, 0xb2,
6723 0x55, 0x70, 0x1f, 0x9d, 0xae, 0xe0, 0x3f, 0x59, 0x1b,
6724 0xa5, 0xc0, 0x80, 0xd1, 0xf0, 0x58, 0x4b, 0x02, 0x7a,
6725 0xb3, 0xb1, 0xda, 0x57, 0x35, 0xc9, 0x36, 0x11, 0xd9,
6726 0xbe, 0x11, 0xa7, 0x9c, 0x0f, 0xde, 0x3b, 0xd4, 0x20,
6727 0x4e, 0xa3, 0x67, 0x40, 0x75, 0xea, 0x96, 0x7a, 0x24,
6728 0x4a, 0xb1, 0xdc, 0xac, 0xa6, 0xf0, 0x7b, 0x48, 0xbb,
6729 0xb0, 0xb7, 0xe2, 0x7d, 0x8a, 0x1a, 0x68, 0x0f, 0xa0,
6730 0x79, 0x4c,
6731 }
6732 };
6733
6734 TC_PRINT(".");
6735 result = do_hmac_prng_pr_false_test(107, &vec);
6736
6737 return result;
6738 }
6739
test_108(void)6740 unsigned int test_108(void)
6741 {
6742 unsigned int result = TC_PASS;
6743 const struct hmac_prng_test_vector vec = {
6744 32,
6745 16,
6746 32,
6747 0,
6748 128,
6749 {
6750 0x68, 0xae, 0xa6, 0x3a, 0xa5, 0xd6, 0xa8, 0x3a, 0x5f,
6751 0x71, 0xe3, 0x32, 0x68, 0xd1, 0x62, 0xa5, 0x8d, 0x8e,
6752 0xd1, 0x2f, 0xfb, 0x26, 0xc8, 0x25, 0x70, 0x3e, 0xd0,
6753 0xd1, 0x00, 0xdf, 0xd1, 0xeb,
6754 },
6755 {
6756 0xfa, 0x79, 0x9c, 0x67, 0x7c, 0x36, 0x1c, 0x3e, 0x3e,
6757 0xb3, 0x21, 0xb0, 0x73, 0x08, 0xf2, 0xfd,
6758 },
6759 {
6760 0xfd, 0x42, 0x73, 0xdf, 0xd5, 0xb3, 0xbc, 0x1c, 0x6a,
6761 0x12, 0x46, 0xf5, 0x43, 0x75, 0xe9, 0xa0, 0x02, 0x28,
6762 0x64, 0xdc, 0x40, 0x08, 0xf1, 0x94, 0x22, 0xec, 0x9c,
6763 0x0f, 0xf8, 0xa9, 0x56, 0x44,
6764 },
6765 {
6766 0xc6, 0x73, 0x35, 0x99, 0x70, 0x4a, 0xb7, 0x20, 0x44,
6767 0xfd, 0x28, 0x6e, 0x3f, 0x32, 0x7b, 0x53, 0xe2, 0xf0,
6768 0x4c, 0x33, 0xb1, 0x75, 0x44, 0xa4, 0x2c, 0x39, 0x90,
6769 0x59, 0x43, 0xce, 0x20, 0xe7,
6770 },
6771 {
6772 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6773 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6774 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6775 0x00, 0x00, 0x00, 0x00, 0x00,
6776 },
6777 {
6778 0x38, 0x92, 0x53, 0xf7, 0x3e, 0x2e, 0xd3, 0xf9, 0x10,
6779 0x9e, 0x6f, 0x98, 0xd8, 0x89, 0xb1, 0x55, 0x4f, 0x3b,
6780 0xee, 0xdc, 0xf9, 0xd4, 0x12, 0xae, 0xbc, 0x07, 0xba,
6781 0x9a, 0xc8, 0x50, 0xaf, 0x07, 0x91, 0x3f, 0xe1, 0xc9,
6782 0x9c, 0xc8, 0x24, 0xe9, 0x4e, 0x55, 0xcb, 0xe9, 0x9e,
6783 0xe2, 0x30, 0x66, 0xe8, 0xe0, 0x18, 0x83, 0x90, 0xaf,
6784 0xd8, 0x8d, 0xc3, 0xe1, 0x2d, 0x41, 0xb5, 0xb2, 0x77,
6785 0x62, 0xa9, 0x6b, 0x2d, 0xb3, 0x05, 0xbf, 0x7c, 0x12,
6786 0x06, 0x53, 0x09, 0xaa, 0xb5, 0x71, 0xad, 0xf3, 0x5b,
6787 0x26, 0x9b, 0xfb, 0x64, 0x79, 0x39, 0x79, 0x4c, 0x2e,
6788 0x7d, 0x1d, 0xae, 0xf3, 0x5d, 0x85, 0x74, 0x55, 0xde,
6789 0xb0, 0xfe, 0x12, 0x45, 0x1c, 0x41, 0x7e, 0x95, 0x55,
6790 0x30, 0x11, 0x81, 0x2e, 0xad, 0x9b, 0x81, 0x38, 0xf7,
6791 0xac, 0xeb, 0x75, 0xa5, 0x5e, 0xdc, 0xbf, 0x96, 0x8e,
6792 0x1f, 0x68,
6793 }
6794 };
6795
6796 TC_PRINT(".");
6797 result = do_hmac_prng_pr_false_test(108, &vec);
6798
6799 return result;
6800 }
6801
test_109(void)6802 unsigned int test_109(void)
6803 {
6804 unsigned int result = TC_PASS;
6805 const struct hmac_prng_test_vector vec = {
6806 32,
6807 16,
6808 32,
6809 0,
6810 128,
6811 {
6812 0xf9, 0xaa, 0xbb, 0x49, 0x60, 0x0f, 0xef, 0x8a, 0x93,
6813 0x11, 0xc0, 0x28, 0x80, 0xb3, 0xab, 0x2d, 0xf9, 0x0a,
6814 0xbb, 0xe0, 0x7f, 0x51, 0x43, 0x63, 0x2c, 0x6c, 0x35,
6815 0xb5, 0x73, 0xff, 0xdb, 0x8d,
6816 },
6817 {
6818 0x7c, 0x64, 0xac, 0xa5, 0xa1, 0x21, 0x11, 0x4f, 0x6e,
6819 0xbf, 0x5f, 0x62, 0x9b, 0x08, 0x2b, 0x61,
6820 },
6821 {
6822 0xf5, 0x55, 0x69, 0xa6, 0xdf, 0xb8, 0x77, 0x69, 0xcf,
6823 0x69, 0xb0, 0x2b, 0x40, 0x43, 0xa0, 0xe9, 0x05, 0x5b,
6824 0x5a, 0xec, 0x53, 0xa3, 0x1d, 0x24, 0x59, 0x55, 0x66,
6825 0xd5, 0x22, 0xf7, 0x6c, 0xd5,
6826 },
6827 {
6828 0x11, 0xdc, 0x58, 0x43, 0xc5, 0x5d, 0x03, 0x3b, 0x18,
6829 0x01, 0x01, 0x6b, 0xd0, 0xcf, 0x5d, 0x79, 0x9d, 0x76,
6830 0x8c, 0xdc, 0x1e, 0xe3, 0xe2, 0x1d, 0xa6, 0x1a, 0x02,
6831 0x27, 0xb9, 0x83, 0x15, 0x8c,
6832 },
6833 {
6834 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6835 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6836 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6837 0x00, 0x00, 0x00, 0x00, 0x00,
6838 },
6839 {
6840 0x3b, 0x6a, 0xa6, 0x99, 0xd9, 0x6f, 0x4f, 0x1d, 0xd2,
6841 0x9c, 0x19, 0xc5, 0x58, 0xd0, 0x3d, 0xb3, 0x00, 0xdb,
6842 0x1c, 0xc9, 0x2f, 0xb1, 0xa0, 0x56, 0x52, 0x79, 0xdb,
6843 0x1d, 0x05, 0x56, 0x67, 0xa7, 0x84, 0x49, 0x34, 0xf0,
6844 0x4d, 0xb0, 0x00, 0x59, 0x4c, 0xc0, 0x66, 0xb0, 0x4b,
6845 0xe5, 0x68, 0xc0, 0xde, 0xa8, 0xe4, 0xeb, 0xe5, 0x46,
6846 0x7e, 0x1f, 0xf9, 0xaf, 0x2c, 0x62, 0x72, 0x3b, 0x90,
6847 0xd4, 0xf2, 0xc2, 0x2a, 0x6c, 0xba, 0x2a, 0xfe, 0x15,
6848 0xf5, 0x50, 0x45, 0x03, 0xc8, 0xe4, 0x54, 0xdb, 0xc0,
6849 0xe8, 0x0a, 0x20, 0x33, 0x15, 0xa8, 0xf4, 0x59, 0xf9,
6850 0xea, 0xfb, 0x71, 0x11, 0x64, 0x53, 0x9d, 0xef, 0xa4,
6851 0x42, 0xb8, 0xf3, 0x52, 0x0e, 0xbe, 0xd4, 0xa5, 0xfc,
6852 0x4a, 0x84, 0x46, 0x10, 0x69, 0xee, 0xc4, 0x42, 0x5a,
6853 0xa3, 0xeb, 0x88, 0xae, 0x6d, 0x83, 0xad, 0x7a, 0x23,
6854 0x98, 0x50,
6855 }
6856 };
6857
6858 TC_PRINT(".");
6859 result = do_hmac_prng_pr_false_test(109, &vec);
6860
6861 return result;
6862 }
6863
test_110(void)6864 unsigned int test_110(void)
6865 {
6866 unsigned int result = TC_PASS;
6867 const struct hmac_prng_test_vector vec = {
6868 32,
6869 16,
6870 32,
6871 0,
6872 128,
6873 {
6874 0x88, 0xa7, 0x6c, 0x16, 0xd3, 0x27, 0x0e, 0xd3, 0xfc,
6875 0xd1, 0x76, 0xf9, 0xd7, 0x93, 0xfa, 0x0c, 0x35, 0x51,
6876 0x65, 0x74, 0xc1, 0xce, 0xf4, 0x25, 0xb6, 0x00, 0x76,
6877 0x28, 0xaf, 0xa3, 0x5e, 0x2b,
6878 },
6879 {
6880 0xff, 0x16, 0xcf, 0x7c, 0xb8, 0xe4, 0x9d, 0x48, 0x2c,
6881 0xfd, 0x39, 0x94, 0xab, 0xc5, 0xef, 0x8a,
6882 },
6883 {
6884 0x92, 0x13, 0xc5, 0x4e, 0x3d, 0x00, 0x2d, 0xf8, 0x74,
6885 0x11, 0x63, 0xab, 0x9d, 0x7e, 0x07, 0x57, 0xcd, 0x51,
6886 0x2c, 0x69, 0x1a, 0xd6, 0x4b, 0xaf, 0xef, 0x95, 0xcb,
6887 0x72, 0x53, 0x9b, 0x0a, 0xc6,
6888 },
6889 {
6890 0x49, 0x3b, 0x64, 0x7f, 0xf0, 0xb3, 0xfa, 0xa2, 0x92,
6891 0x1f, 0x12, 0xf8, 0xf5, 0x7b, 0x91, 0x93, 0x29, 0xf2,
6892 0xaf, 0x2f, 0xc1, 0xf1, 0x45, 0x76, 0xd9, 0xdf, 0x2f,
6893 0x8c, 0xc2, 0xad, 0xa7, 0xa6,
6894 },
6895 {
6896 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6897 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6898 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6899 0x00, 0x00, 0x00, 0x00, 0x00,
6900 },
6901 {
6902 0xf1, 0x33, 0x0a, 0x85, 0xf9, 0x00, 0x37, 0x87, 0x6b,
6903 0x37, 0x49, 0x20, 0x3e, 0x84, 0x92, 0x87, 0x44, 0x4a,
6904 0x82, 0x7f, 0x0a, 0x58, 0xc2, 0x49, 0xff, 0x86, 0x8f,
6905 0xc1, 0xad, 0xba, 0x4d, 0xce, 0x28, 0x5e, 0x07, 0x6a,
6906 0x1f, 0x8a, 0xe1, 0xda, 0x8c, 0xf9, 0xfe, 0x14, 0x93,
6907 0x1e, 0x81, 0x64, 0x18, 0x6c, 0x97, 0xa8, 0xfe, 0xaf,
6908 0x24, 0x58, 0x34, 0x51, 0xf1, 0x16, 0xe6, 0x5f, 0x8e,
6909 0x43, 0x2e, 0x7e, 0xd5, 0x5a, 0x36, 0x68, 0x31, 0x20,
6910 0x37, 0x7e, 0x23, 0x12, 0x8d, 0xca, 0x15, 0x40, 0xfe,
6911 0xfb, 0xf3, 0xaf, 0x1b, 0x56, 0xd5, 0xc7, 0x41, 0x87,
6912 0xf5, 0x28, 0x6d, 0x0a, 0x95, 0xfb, 0x55, 0x93, 0x17,
6913 0x70, 0x54, 0x30, 0x60, 0xce, 0x8d, 0xf0, 0x8f, 0x3c,
6914 0x19, 0x59, 0xa1, 0xf4, 0xfc, 0x36, 0xb6, 0x46, 0x71,
6915 0xe0, 0x65, 0x4f, 0xff, 0xe7, 0x0d, 0x96, 0xd5, 0x21,
6916 0xbe, 0x21,
6917 }
6918 };
6919
6920 TC_PRINT(".");
6921 result = do_hmac_prng_pr_false_test(110, &vec);
6922
6923 return result;
6924 }
6925
test_111(void)6926 unsigned int test_111(void)
6927 {
6928 unsigned int result = TC_PASS;
6929 const struct hmac_prng_test_vector vec = {
6930 32,
6931 16,
6932 32,
6933 0,
6934 128,
6935 {
6936 0xf8, 0xf2, 0xc3, 0x19, 0x4e, 0x8c, 0x4e, 0x90, 0x9e,
6937 0x6f, 0x05, 0x27, 0x95, 0x03, 0x07, 0x18, 0xcd, 0xd6,
6938 0x23, 0x53, 0x03, 0xbd, 0xe5, 0x37, 0xea, 0x3c, 0x70,
6939 0x53, 0x05, 0x62, 0x26, 0xe1,
6940 },
6941 {
6942 0xd5, 0x0e, 0xf4, 0xd0, 0x6d, 0x00, 0x74, 0x54, 0x65,
6943 0xce, 0x7b, 0x08, 0xcd, 0x03, 0x51, 0x76,
6944 },
6945 {
6946 0xed, 0x89, 0x7e, 0xc3, 0x3a, 0xe3, 0xf4, 0xb0, 0xc2,
6947 0x0b, 0x12, 0x8d, 0x94, 0x61, 0x5f, 0xe3, 0x87, 0x27,
6948 0x0f, 0x8f, 0x0d, 0x66, 0x5e, 0x11, 0x9b, 0x9b, 0x5a,
6949 0xd1, 0x0f, 0xd3, 0x65, 0x7a,
6950 },
6951 {
6952 0x91, 0x78, 0x49, 0x2a, 0x92, 0x51, 0x12, 0x80, 0x6b,
6953 0x27, 0x80, 0x2e, 0x0c, 0x9b, 0x0e, 0x70, 0xaf, 0x3f,
6954 0xd5, 0xb6, 0xdb, 0x9a, 0xf8, 0x70, 0x40, 0x28, 0x02,
6955 0x56, 0x35, 0xc5, 0xed, 0x27,
6956 },
6957 {
6958 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6959 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6960 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6961 0x00, 0x00, 0x00, 0x00, 0x00,
6962 },
6963 {
6964 0x0e, 0x50, 0xd9, 0xdb, 0x9a, 0x5e, 0xb2, 0xd0, 0xb0,
6965 0xd5, 0xc4, 0x53, 0x01, 0x70, 0x7e, 0xe2, 0x81, 0x86,
6966 0x68, 0x79, 0xe0, 0x72, 0xe5, 0x16, 0x96, 0xe3, 0x28,
6967 0x19, 0xb3, 0x3a, 0x44, 0xf0, 0xd0, 0x0b, 0x88, 0xab,
6968 0x5d, 0x6c, 0x31, 0xd9, 0x19, 0x88, 0xb1, 0x75, 0x7c,
6969 0xee, 0xa8, 0x93, 0x6e, 0xd5, 0xd0, 0xad, 0x67, 0x29,
6970 0x90, 0xf4, 0x95, 0x1d, 0xfa, 0xea, 0x99, 0x4d, 0xc0,
6971 0x0f, 0x32, 0x65, 0x09, 0x5b, 0xdb, 0xef, 0xaf, 0x1d,
6972 0x42, 0x24, 0xda, 0x61, 0x68, 0x88, 0xa8, 0x06, 0x60,
6973 0x9d, 0x28, 0x05, 0xcf, 0x0f, 0x51, 0x83, 0xd5, 0xe9,
6974 0x25, 0x26, 0x1e, 0x6b, 0x24, 0x90, 0xdd, 0x85, 0x24,
6975 0x2f, 0xc9, 0xfb, 0xd4, 0x26, 0xd7, 0x7a, 0xe8, 0x33,
6976 0x9a, 0xea, 0xc1, 0x83, 0x94, 0xbb, 0xf3, 0x51, 0xe0,
6977 0x61, 0xe4, 0x95, 0x61, 0x38, 0x36, 0x1d, 0x11, 0xb3,
6978 0x57, 0x72,
6979 }
6980 };
6981
6982 TC_PRINT(".");
6983 result = do_hmac_prng_pr_false_test(111, &vec);
6984
6985 return result;
6986 }
6987
test_112(void)6988 unsigned int test_112(void)
6989 {
6990 unsigned int result = TC_PASS;
6991 const struct hmac_prng_test_vector vec = {
6992 32,
6993 16,
6994 32,
6995 0,
6996 128,
6997 {
6998 0x2a, 0x65, 0xb1, 0x29, 0x9d, 0x03, 0x4b, 0x95, 0x40,
6999 0x07, 0xae, 0x77, 0x34, 0x03, 0xf5, 0x09, 0xec, 0x8d,
7000 0xf5, 0x2b, 0x25, 0xff, 0x57, 0x79, 0x19, 0xd3, 0x3e,
7001 0x97, 0x6f, 0xfd, 0x21, 0xa5,
7002 },
7003 {
7004 0x80, 0x80, 0xab, 0xa8, 0xc9, 0xf7, 0xa0, 0x4a, 0xd4,
7005 0x1c, 0x41, 0xde, 0xbc, 0x8d, 0x6b, 0x02,
7006 },
7007 {
7008 0x31, 0xa4, 0x66, 0x17, 0xe8, 0xee, 0xc9, 0x15, 0x70,
7009 0x7b, 0x75, 0xf7, 0xba, 0x78, 0x81, 0xf9, 0x63, 0x4e,
7010 0x7b, 0x01, 0x5e, 0xf2, 0xa2, 0xfb, 0x51, 0xf5, 0x92,
7011 0xfd, 0xda, 0x27, 0xfb, 0x20,
7012 },
7013 {
7014 0xe3, 0xc8, 0x81, 0x51, 0x72, 0xec, 0xee, 0x13, 0xe6,
7015 0x49, 0xff, 0x62, 0x4c, 0x62, 0x43, 0xaf, 0xbb, 0x46,
7016 0x60, 0x2b, 0xbf, 0xc3, 0xbd, 0x28, 0xd0, 0x31, 0x7b,
7017 0xad, 0x68, 0x56, 0xc6, 0x6f,
7018 },
7019 {
7020 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7021 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7022 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7023 0x00, 0x00, 0x00, 0x00, 0x00,
7024 },
7025 {
7026 0x5b, 0x1c, 0x01, 0xab, 0x1d, 0xf4, 0x42, 0x30, 0x5d,
7027 0xaa, 0x89, 0x98, 0x72, 0x8e, 0x1e, 0x99, 0x97, 0x5b,
7028 0x32, 0x32, 0x7d, 0xa7, 0x27, 0xf1, 0x62, 0xaf, 0xf5,
7029 0xec, 0xbb, 0x01, 0xd4, 0xd6, 0xe8, 0xb8, 0x55, 0x1f,
7030 0x7a, 0xbe, 0x18, 0x92, 0x62, 0x50, 0x12, 0xc2, 0x48,
7031 0x17, 0x8b, 0x2e, 0xc1, 0x2d, 0x64, 0xd8, 0x40, 0x63,
7032 0xf8, 0x7f, 0x12, 0x79, 0x28, 0xeb, 0xab, 0x06, 0xcf,
7033 0xc3, 0x77, 0xfd, 0x96, 0x55, 0xaa, 0xdb, 0xa3, 0x61,
7034 0xb9, 0x3f, 0x97, 0x6e, 0x51, 0x33, 0xb6, 0xfb, 0x87,
7035 0x45, 0xf1, 0x30, 0xd8, 0xc5, 0xea, 0xe6, 0xf0, 0xd3,
7036 0x85, 0x7f, 0xe5, 0xc6, 0x89, 0x04, 0xad, 0xea, 0xa2,
7037 0x24, 0xcc, 0xb9, 0x3a, 0x96, 0x0e, 0xd7, 0x9e, 0xcf,
7038 0x55, 0xd6, 0xaf, 0x30, 0x7d, 0x28, 0x73, 0x66, 0xb8,
7039 0xa2, 0xd4, 0x66, 0xb9, 0x5e, 0xdb, 0xa1, 0x42, 0xe8,
7040 0x6d, 0x12,
7041 }
7042 };
7043
7044 TC_PRINT(".");
7045 result = do_hmac_prng_pr_false_test(112, &vec);
7046
7047 return result;
7048 }
7049
test_113(void)7050 unsigned int test_113(void)
7051 {
7052 unsigned int result = TC_PASS;
7053 const struct hmac_prng_test_vector vec = {
7054 32,
7055 16,
7056 32,
7057 0,
7058 128,
7059 {
7060 0x85, 0xb6, 0x0f, 0xaa, 0x4e, 0xbf, 0xde, 0x82, 0x5f,
7061 0x0a, 0x49, 0x70, 0xc8, 0x0c, 0x78, 0xe3, 0x77, 0xa5,
7062 0x1d, 0xce, 0xbb, 0x09, 0x45, 0x3a, 0x03, 0xb6, 0x46,
7063 0xcb, 0xdc, 0x1c, 0x2f, 0x0e,
7064 },
7065 {
7066 0xfb, 0x4d, 0xff, 0x7e, 0x1a, 0xd3, 0x7f, 0x1d, 0x00,
7067 0xa1, 0x00, 0xde, 0x0a, 0x9d, 0x5d, 0x2b,
7068 },
7069 {
7070 0x46, 0x10, 0xc5, 0x65, 0x63, 0x72, 0x6c, 0x7b, 0xaa,
7071 0x3a, 0x21, 0x12, 0x90, 0x4a, 0xd8, 0x03, 0x62, 0x55,
7072 0xc9, 0x2f, 0xe7, 0x48, 0xd6, 0x5f, 0x12, 0x33, 0x35,
7073 0x48, 0x96, 0xfe, 0xe7, 0x2a,
7074 },
7075 {
7076 0x85, 0x40, 0x56, 0x92, 0x7b, 0x35, 0x05, 0x3b, 0x57,
7077 0x44, 0x8a, 0x2e, 0x0b, 0x6c, 0x7c, 0xf3, 0x71, 0xce,
7078 0x10, 0x79, 0x7e, 0xab, 0x1c, 0x0a, 0x00, 0x9d, 0x7a,
7079 0xbd, 0x1a, 0x06, 0x7c, 0xcc,
7080 },
7081 {
7082 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7083 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7084 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7085 0x00, 0x00, 0x00, 0x00, 0x00,
7086 },
7087 {
7088 0x19, 0x42, 0xa4, 0xdc, 0x08, 0xfe, 0x8d, 0x92, 0xf5,
7089 0xfa, 0x58, 0x17, 0x56, 0xdd, 0xc3, 0xf7, 0xa3, 0x21,
7090 0xcb, 0x96, 0x93, 0x3c, 0xc1, 0x93, 0x71, 0x1a, 0x0f,
7091 0x64, 0x40, 0xa7, 0x6b, 0x6c, 0x5a, 0x5d, 0xb8, 0x06,
7092 0x9c, 0x5c, 0x82, 0xfe, 0x3e, 0x1c, 0xdf, 0x3f, 0x35,
7093 0x20, 0xde, 0xb1, 0x65, 0x2a, 0x96, 0x98, 0xf9, 0x72,
7094 0x6f, 0xd4, 0x04, 0x8b, 0xab, 0xaf, 0x07, 0x05, 0x0e,
7095 0x93, 0x7d, 0x56, 0x54, 0x28, 0x99, 0xee, 0xa5, 0xec,
7096 0x2c, 0x16, 0x91, 0x9a, 0x36, 0x0d, 0xe5, 0xcc, 0xf4,
7097 0x9e, 0xee, 0xd1, 0x15, 0xee, 0x02, 0xc0, 0x67, 0xb7,
7098 0x25, 0x52, 0xbc, 0x4d, 0x4e, 0xef, 0xb6, 0xaa, 0x91,
7099 0xa2, 0x33, 0xdd, 0x73, 0x17, 0x95, 0x9a, 0x7e, 0x80,
7100 0xe1, 0x6b, 0x17, 0x37, 0x91, 0x84, 0x50, 0x3c, 0xbf,
7101 0x39, 0x31, 0xa6, 0x9e, 0x90, 0x2d, 0x97, 0xf8, 0x20,
7102 0xf8, 0x03,
7103 }
7104 };
7105
7106 TC_PRINT(".");
7107 result = do_hmac_prng_pr_false_test(113, &vec);
7108
7109 return result;
7110 }
7111
test_114(void)7112 unsigned int test_114(void)
7113 {
7114 unsigned int result = TC_PASS;
7115 const struct hmac_prng_test_vector vec = {
7116 32,
7117 16,
7118 32,
7119 0,
7120 128,
7121 {
7122 0xbb, 0x71, 0x47, 0xf6, 0x74, 0x54, 0x51, 0x7b, 0x2f,
7123 0x2b, 0x10, 0x37, 0x90, 0xb4, 0x42, 0x47, 0xef, 0xb5,
7124 0x28, 0xa7, 0x7a, 0x05, 0xaa, 0x22, 0x0c, 0x8f, 0xe4,
7125 0x0b, 0x32, 0x3a, 0x1f, 0x0a,
7126 },
7127 {
7128 0x33, 0xb4, 0x2b, 0x70, 0xeb, 0x65, 0xd9, 0x85, 0xf2,
7129 0x47, 0x61, 0x36, 0xc9, 0x49, 0xca, 0x18,
7130 },
7131 {
7132 0x7e, 0xaa, 0x52, 0xf6, 0xd4, 0x35, 0x29, 0x8f, 0xda,
7133 0x70, 0xef, 0x9a, 0xba, 0xe9, 0x0e, 0xb5, 0x49, 0x68,
7134 0xbd, 0x2b, 0x4c, 0xe7, 0x49, 0x83, 0x6c, 0xb2, 0xb1,
7135 0x1e, 0x45, 0x2f, 0x67, 0x68,
7136 },
7137 {
7138 0x4c, 0x26, 0x86, 0xe2, 0xed, 0xc7, 0xa2, 0x5b, 0xc9,
7139 0x27, 0x46, 0x42, 0xb8, 0x86, 0xf1, 0x51, 0x0c, 0x4d,
7140 0x0f, 0x00, 0x71, 0x5b, 0x75, 0x90, 0x1a, 0x40, 0xf3,
7141 0xd1, 0x53, 0x77, 0x88, 0xfc,
7142 },
7143 {
7144 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7145 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7147 0x00, 0x00, 0x00, 0x00, 0x00,
7148 },
7149 {
7150 0x50, 0xdc, 0x60, 0xbf, 0x8d, 0xf4, 0xb7, 0x3e, 0x0c,
7151 0x95, 0xb3, 0xe1, 0x73, 0x64, 0x11, 0x1d, 0xde, 0xff,
7152 0x81, 0x44, 0x24, 0x60, 0xd6, 0xc9, 0x35, 0xe1, 0xfc,
7153 0x5d, 0x2e, 0xd2, 0x95, 0xc2, 0x54, 0xc5, 0xc9, 0xf3,
7154 0x9d, 0x18, 0xf6, 0x54, 0x0e, 0x69, 0x7a, 0x1a, 0x7f,
7155 0xc5, 0x88, 0xb3, 0x7e, 0x8f, 0xc4, 0x5f, 0x31, 0x4c,
7156 0x06, 0xe9, 0xeb, 0x04, 0x45, 0x8f, 0x3b, 0xd1, 0x8d,
7157 0x23, 0xfb, 0x33, 0xdb, 0x2a, 0x31, 0x85, 0xa0, 0xcb,
7158 0x2b, 0x2d, 0x9b, 0xa6, 0x09, 0x15, 0x38, 0xe8, 0x5c,
7159 0x2d, 0x6f, 0xba, 0xc0, 0x20, 0x1f, 0xec, 0xd3, 0x37,
7160 0xd2, 0x68, 0x34, 0x7a, 0xd8, 0xf3, 0x04, 0x21, 0x3c,
7161 0x3a, 0xf9, 0x45, 0xca, 0x31, 0xed, 0xf8, 0xbe, 0x84,
7162 0x7a, 0x7b, 0x56, 0xd7, 0xbd, 0xcd, 0x30, 0x83, 0x99,
7163 0xb0, 0x65, 0x02, 0x79, 0x44, 0x43, 0xf7, 0x38, 0xf6,
7164 0xee, 0x55,
7165 }
7166 };
7167
7168 TC_PRINT(".");
7169 result = do_hmac_prng_pr_false_test(114, &vec);
7170
7171 return result;
7172 }
7173
test_115(void)7174 unsigned int test_115(void)
7175 {
7176 unsigned int result = TC_PASS;
7177 const struct hmac_prng_test_vector vec = {
7178 32,
7179 16,
7180 32,
7181 0,
7182 128,
7183 {
7184 0xd7, 0xdc, 0xdf, 0xaa, 0x81, 0xc3, 0x51, 0x19, 0xa4,
7185 0x69, 0x51, 0xae, 0xd8, 0xd8, 0x89, 0x95, 0x02, 0xfc,
7186 0x21, 0xb9, 0x09, 0xc8, 0xde, 0x8c, 0xf3, 0xa5, 0x67,
7187 0xc1, 0xae, 0x81, 0x16, 0x1d,
7188 },
7189 {
7190 0x4c, 0x24, 0x49, 0x56, 0x7c, 0x08, 0x67, 0xc9, 0xf4,
7191 0x3b, 0x75, 0x28, 0x60, 0xe3, 0x4b, 0xde,
7192 },
7193 {
7194 0x09, 0x41, 0x7a, 0x19, 0x12, 0xef, 0xc0, 0x14, 0x65,
7195 0xa8, 0x68, 0x2f, 0xf7, 0x13, 0x78, 0x70, 0x65, 0x24,
7196 0xb4, 0x6a, 0x0c, 0x27, 0x22, 0x0e, 0x9e, 0x40, 0xec,
7197 0x43, 0x07, 0x3c, 0x56, 0x3c,
7198 },
7199 {
7200 0x54, 0x8a, 0x97, 0xb1, 0x12, 0xab, 0x6c, 0xcb, 0x57,
7201 0x8d, 0xd7, 0x75, 0x99, 0xdf, 0x0c, 0xac, 0xde, 0x33,
7202 0x2a, 0xc1, 0xa6, 0x00, 0x88, 0xdc, 0x01, 0x8d, 0x18,
7203 0x38, 0x75, 0xb6, 0x1c, 0x51,
7204 },
7205 {
7206 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7207 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7208 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7209 0x00, 0x00, 0x00, 0x00, 0x00,
7210 },
7211 {
7212 0xb2, 0x00, 0xd6, 0x98, 0xfc, 0x72, 0xf0, 0x1e, 0x97,
7213 0x09, 0xe5, 0x3a, 0x0c, 0xa4, 0x82, 0xed, 0x3b, 0xe1,
7214 0x0e, 0x27, 0x72, 0x96, 0x42, 0x4c, 0xef, 0xd1, 0x10,
7215 0x72, 0xc7, 0xb1, 0x9b, 0xdd, 0xf7, 0x0f, 0xf1, 0x37,
7216 0xc9, 0x56, 0xe4, 0xd1, 0x1d, 0x8e, 0xb1, 0xeb, 0x29,
7217 0xbb, 0xe4, 0x97, 0x9c, 0xba, 0x9e, 0x2e, 0xb9, 0x41,
7218 0xf5, 0x29, 0xea, 0x96, 0x84, 0xce, 0xc6, 0x61, 0x4a,
7219 0x5f, 0x8c, 0x30, 0x95, 0x0d, 0x95, 0x44, 0x14, 0x8f,
7220 0xc4, 0xc9, 0x2b, 0xb8, 0xb7, 0xba, 0x89, 0x9e, 0x72,
7221 0x17, 0x48, 0xa1, 0xd6, 0xbf, 0x5e, 0x8b, 0xb6, 0x42,
7222 0x9b, 0xa9, 0x02, 0x0e, 0x08, 0x9a, 0x7c, 0x1e, 0x91,
7223 0x0c, 0x8f, 0xc7, 0x08, 0xe0, 0x2b, 0xe7, 0x5e, 0xfb,
7224 0x89, 0xf0, 0x0d, 0x6f, 0x8b, 0x52, 0x05, 0x40, 0x62,
7225 0xe4, 0x33, 0x43, 0xa6, 0x0d, 0xee, 0xd3, 0x9c, 0xd8,
7226 0x75, 0x6a,
7227 }
7228 };
7229
7230 TC_PRINT(".");
7231 result = do_hmac_prng_pr_false_test(115, &vec);
7232
7233 return result;
7234 }
7235
test_116(void)7236 unsigned int test_116(void)
7237 {
7238 unsigned int result = TC_PASS;
7239 const struct hmac_prng_test_vector vec = {
7240 32,
7241 16,
7242 32,
7243 0,
7244 128,
7245 {
7246 0x79, 0xad, 0xc5, 0xce, 0xae, 0xf7, 0x71, 0x10, 0x24,
7247 0x01, 0xac, 0xc2, 0xfc, 0xb3, 0xd0, 0x1d, 0x9b, 0xf7,
7248 0x54, 0x1e, 0xd8, 0x6e, 0x8a, 0xa1, 0x6c, 0x93, 0x8d,
7249 0x95, 0x56, 0x82, 0x9a, 0x8e,
7250 },
7251 {
7252 0x37, 0x9d, 0x9a, 0xeb, 0xe0, 0xbd, 0xbc, 0xa0, 0x7c,
7253 0x77, 0x4b, 0x5e, 0xf1, 0xee, 0x73, 0x2d,
7254 },
7255 {
7256 0x8b, 0x13, 0x32, 0x6a, 0x52, 0x19, 0x57, 0xed, 0xe0,
7257 0x04, 0x23, 0x5c, 0xd1, 0x38, 0x76, 0x7b, 0x7f, 0x45,
7258 0xf5, 0x50, 0xf2, 0xfc, 0x55, 0xb1, 0xf6, 0x7c, 0xdc,
7259 0xc7, 0x09, 0x23, 0x81, 0x1d,
7260 },
7261 {
7262 0xe2, 0x68, 0xce, 0xa9, 0xdd, 0xeb, 0x0c, 0xca, 0x53,
7263 0x88, 0xe1, 0x24, 0x17, 0xd9, 0x0c, 0x7f, 0xab, 0x62,
7264 0x9b, 0x2b, 0x2c, 0x14, 0x4d, 0xdc, 0x80, 0x54, 0xd0,
7265 0x42, 0x10, 0x58, 0x67, 0x14,
7266 },
7267 {
7268 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7269 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7271 0x00, 0x00, 0x00, 0x00, 0x00,
7272 },
7273 {
7274 0x00, 0x8f, 0xed, 0xe4, 0x41, 0xe5, 0x50, 0x95, 0x5d,
7275 0x75, 0x9c, 0x89, 0x22, 0x93, 0x59, 0xf6, 0xa0, 0x6e,
7276 0xc2, 0xc0, 0x6c, 0xe2, 0xdc, 0xf4, 0x2b, 0xb7, 0x2f,
7277 0x25, 0x5c, 0x28, 0xed, 0x75, 0x8b, 0x38, 0xa5, 0xf7,
7278 0xf7, 0xea, 0x94, 0x51, 0xa1, 0xc9, 0xb7, 0xa6, 0x88,
7279 0xd3, 0x79, 0xc9, 0xd3, 0x6f, 0xa7, 0xc8, 0x6e, 0xb1,
7280 0x1b, 0x67, 0xf4, 0xe3, 0xb9, 0x83, 0xfe, 0x4b, 0x42,
7281 0x15, 0x9f, 0xa6, 0x23, 0xf5, 0x5e, 0xea, 0x9f, 0xb1,
7282 0xff, 0x36, 0x76, 0xad, 0x54, 0x7d, 0xf4, 0x69, 0x60,
7283 0x7a, 0x03, 0xe8, 0xf8, 0x32, 0x26, 0x79, 0x68, 0xc8,
7284 0x38, 0x8b, 0x2d, 0xb8, 0x49, 0x16, 0x6a, 0x98, 0xa9,
7285 0x8a, 0xef, 0x8d, 0x9e, 0x25, 0x88, 0x8b, 0x1f, 0x6a,
7286 0xec, 0x3d, 0x66, 0xa0, 0x26, 0x35, 0x32, 0x59, 0xbd,
7287 0xa9, 0x02, 0xdf, 0x45, 0x5e, 0x6d, 0x2d, 0x52, 0x2c,
7288 0xde, 0xd4,
7289 }
7290 };
7291
7292 TC_PRINT(".");
7293 result = do_hmac_prng_pr_false_test(116, &vec);
7294
7295 return result;
7296 }
7297
test_117(void)7298 unsigned int test_117(void)
7299 {
7300 unsigned int result = TC_PASS;
7301 const struct hmac_prng_test_vector vec = {
7302 32,
7303 16,
7304 32,
7305 0,
7306 128,
7307 {
7308 0x37, 0x6d, 0xfb, 0x59, 0x42, 0x41, 0x45, 0x42, 0x0a,
7309 0xc6, 0x59, 0x67, 0x14, 0x5f, 0x6f, 0xa5, 0x1a, 0xac,
7310 0xec, 0x27, 0xbe, 0xa1, 0xd3, 0xf9, 0xf8, 0xb7, 0x61,
7311 0x6f, 0xcb, 0x36, 0xf7, 0x3b,
7312 },
7313 {
7314 0x56, 0x4c, 0x1c, 0xb8, 0x2b, 0xef, 0x2b, 0xdc, 0x2c,
7315 0x69, 0x99, 0x55, 0xbd, 0x2b, 0x07, 0x77,
7316 },
7317 {
7318 0xa0, 0x83, 0x9d, 0xaa, 0xac, 0xe6, 0xff, 0x20, 0x9f,
7319 0xba, 0x71, 0xc6, 0xbb, 0xba, 0x05, 0x84, 0x49, 0x7c,
7320 0xff, 0x77, 0x5d, 0x86, 0x50, 0x72, 0x28, 0x71, 0x7b,
7321 0x57, 0x6f, 0x3d, 0x5e, 0xd2,
7322 },
7323 {
7324 0x23, 0x0d, 0xa7, 0x2e, 0x74, 0x36, 0x7d, 0x92, 0x10,
7325 0x77, 0xb7, 0xc3, 0x8c, 0x11, 0xeb, 0x9e, 0x17, 0x13,
7326 0x1f, 0x7e, 0xe4, 0xff, 0x58, 0x0e, 0xd8, 0x83, 0x53,
7327 0x0d, 0xac, 0xf3, 0x41, 0x99,
7328 },
7329 {
7330 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7331 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7332 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7333 0x00, 0x00, 0x00, 0x00, 0x00,
7334 },
7335 {
7336 0xa7, 0xfe, 0xff, 0x8c, 0x68, 0x59, 0xff, 0x3d, 0x69,
7337 0x54, 0x3b, 0xe6, 0x16, 0x57, 0xc8, 0xc1, 0x9b, 0xe1,
7338 0x2b, 0x9f, 0x2b, 0x53, 0x48, 0xb9, 0x4f, 0x23, 0x70,
7339 0x04, 0x43, 0x7a, 0x20, 0xc6, 0xbe, 0x86, 0x19, 0xd5,
7340 0x31, 0x00, 0x5f, 0xc4, 0x7f, 0xcd, 0x6a, 0x1f, 0x07,
7341 0x38, 0x0f, 0xca, 0x90, 0x75, 0xfb, 0x11, 0x48, 0xf5,
7342 0xe3, 0xe1, 0x57, 0x16, 0x99, 0x8c, 0x12, 0x68, 0xba,
7343 0xc9, 0x72, 0xf9, 0x4e, 0x1b, 0x3e, 0xdb, 0x89, 0xe2,
7344 0x86, 0xa7, 0xb3, 0x6a, 0x53, 0xc0, 0x21, 0xfc, 0xa6,
7345 0x04, 0x53, 0xd7, 0xfb, 0x03, 0xa4, 0xeb, 0x00, 0x96,
7346 0x0d, 0xe3, 0x1c, 0x45, 0x8b, 0x37, 0x79, 0x86, 0xaf,
7347 0x33, 0xfc, 0xfc, 0xef, 0xa7, 0xf6, 0xc9, 0x38, 0xc7,
7348 0xfc, 0x61, 0x83, 0x37, 0xd4, 0xec, 0x8b, 0xd9, 0x42,
7349 0xb2, 0x3a, 0xb0, 0x1b, 0xb3, 0xb3, 0xde, 0x27, 0x0c,
7350 0xc9, 0xa9,
7351 }
7352 };
7353
7354 TC_PRINT(".");
7355 result = do_hmac_prng_pr_false_test(117, &vec);
7356
7357 return result;
7358 }
7359
test_118(void)7360 unsigned int test_118(void)
7361 {
7362 unsigned int result = TC_PASS;
7363 const struct hmac_prng_test_vector vec = {
7364 32,
7365 16,
7366 32,
7367 0,
7368 128,
7369 {
7370 0xfd, 0xbe, 0xe9, 0xba, 0xff, 0x0d, 0x02, 0x17, 0x18,
7371 0xbc, 0x07, 0x32, 0xce, 0x5b, 0x2e, 0x0b, 0xba, 0x13,
7372 0x3b, 0xd3, 0x19, 0xb4, 0xc5, 0x37, 0x5c, 0xbe, 0x32,
7373 0xda, 0x82, 0x74, 0xef, 0x72,
7374 },
7375 {
7376 0x68, 0x48, 0xa7, 0x8d, 0xac, 0x81, 0x74, 0x3c, 0x0a,
7377 0xc4, 0xc1, 0xd7, 0xa0, 0x8b, 0x21, 0xf3,
7378 },
7379 {
7380 0xeb, 0xc1, 0xf9, 0x76, 0x83, 0x42, 0x63, 0x2f, 0x57,
7381 0x6f, 0x7a, 0xf5, 0x03, 0x69, 0x95, 0x98, 0xd1, 0x3b,
7382 0xba, 0x5f, 0xcc, 0x8f, 0xfb, 0xe2, 0x94, 0xbd, 0xd1,
7383 0x6b, 0x8c, 0x86, 0x5f, 0xad,
7384 },
7385 {
7386 0xcc, 0x39, 0x27, 0x64, 0x5f, 0x65, 0xf5, 0x46, 0x60,
7387 0xc1, 0x69, 0xfd, 0x33, 0x94, 0xa3, 0x6a, 0x98, 0x9c,
7388 0x76, 0x0a, 0x28, 0x7f, 0x23, 0xee, 0x8b, 0xe2, 0x3d,
7389 0x0b, 0xcd, 0xb2, 0xbf, 0x6c,
7390 },
7391 {
7392 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7393 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7394 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7395 0x00, 0x00, 0x00, 0x00, 0x00,
7396 },
7397 {
7398 0xb4, 0x58, 0xae, 0xd8, 0x8a, 0x53, 0xcb, 0x5a, 0x1a,
7399 0x15, 0x71, 0x97, 0xb3, 0x80, 0x79, 0xcd, 0xa4, 0x55,
7400 0xbe, 0xdb, 0xc0, 0xe6, 0x9f, 0x7c, 0x66, 0xc1, 0xca,
7401 0x67, 0xad, 0xec, 0x05, 0xa4, 0x11, 0x71, 0x53, 0x09,
7402 0x58, 0x2c, 0x7a, 0x2d, 0x57, 0x09, 0xa4, 0xd6, 0xf2,
7403 0x7c, 0x70, 0x68, 0x66, 0x27, 0xad, 0xec, 0xc6, 0x8f,
7404 0x3a, 0x20, 0x45, 0xb8, 0xe7, 0xce, 0xd5, 0xb9, 0x2b,
7405 0x5d, 0xfa, 0x4a, 0x36, 0xe5, 0x55, 0xfd, 0x42, 0x12,
7406 0xf1, 0xe0, 0x33, 0xd9, 0x4a, 0x52, 0x3b, 0x16, 0xf1,
7407 0xa4, 0xfb, 0x15, 0xb6, 0x95, 0xd5, 0x8d, 0xf4, 0xa5,
7408 0xbe, 0x8e, 0xe7, 0xa2, 0xb9, 0xcb, 0xa0, 0xaf, 0x05,
7409 0xf2, 0x94, 0xcf, 0x0d, 0xaf, 0x54, 0xca, 0xba, 0x5b,
7410 0xfc, 0xd2, 0x89, 0xc6, 0xf7, 0xd9, 0x78, 0xef, 0xb4,
7411 0x12, 0x63, 0xc1, 0xba, 0x0d, 0xeb, 0xb0, 0x6b, 0x56,
7412 0xf3, 0xdc,
7413 }
7414 };
7415
7416 TC_PRINT(".");
7417 result = do_hmac_prng_pr_false_test(118, &vec);
7418
7419 return result;
7420 }
7421
test_119(void)7422 unsigned int test_119(void)
7423 {
7424 unsigned int result = TC_PASS;
7425 const struct hmac_prng_test_vector vec = {
7426 32,
7427 16,
7428 32,
7429 0,
7430 128,
7431 {
7432 0x0d, 0x10, 0x15, 0xbc, 0xe0, 0xf7, 0xba, 0xc3, 0xc0,
7433 0x74, 0x20, 0xb4, 0xf3, 0xf9, 0xbe, 0xca, 0x05, 0x64,
7434 0x87, 0x89, 0x7a, 0xb2, 0x6e, 0x8a, 0xd5, 0xc3, 0x39,
7435 0x03, 0x6c, 0x87, 0xa7, 0xce,
7436 },
7437 {
7438 0xad, 0x72, 0x17, 0x94, 0x44, 0x30, 0x6c, 0x67, 0x7b,
7439 0xb2, 0x70, 0x9d, 0x1d, 0x46, 0x4e, 0xfc,
7440 },
7441 {
7442 0xe8, 0xce, 0x89, 0xf4, 0xb7, 0xe0, 0xcb, 0xb3, 0xa2,
7443 0xfb, 0x74, 0x79, 0xd9, 0x5e, 0x80, 0xb3, 0x6e, 0xae,
7444 0x5c, 0x62, 0xd7, 0x23, 0x2f, 0x26, 0xc5, 0xa9, 0x10,
7445 0x35, 0x99, 0xa4, 0x9b, 0xdd,
7446 },
7447 {
7448 0x15, 0x58, 0x98, 0x57, 0x01, 0x04, 0x68, 0xca, 0x37,
7449 0xcb, 0x83, 0xad, 0xd5, 0x9c, 0xfc, 0x73, 0x3f, 0x6e,
7450 0x97, 0xf9, 0x53, 0xe2, 0xf8, 0xb8, 0xb9, 0x8f, 0xab,
7451 0xb8, 0x1f, 0x60, 0x8e, 0x47,
7452 },
7453 {
7454 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7455 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7456 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7457 0x00, 0x00, 0x00, 0x00, 0x00,
7458 },
7459 {
7460 0xcd, 0xb7, 0xa1, 0x15, 0x16, 0x1c, 0x33, 0x2a, 0x97,
7461 0xca, 0xee, 0xa6, 0xeb, 0x7a, 0x6b, 0xfd, 0x29, 0x9a,
7462 0x76, 0x8a, 0x8f, 0x78, 0x27, 0xdf, 0x16, 0x30, 0x48,
7463 0xf4, 0xdb, 0xf1, 0x75, 0x0e, 0xe1, 0xe8, 0x4d, 0x52,
7464 0x1b, 0x80, 0x01, 0xad, 0x7d, 0xbf, 0x97, 0xa8, 0x67,
7465 0xfb, 0x2b, 0x99, 0xd2, 0x1f, 0x99, 0x52, 0x4b, 0x84,
7466 0x11, 0x36, 0x36, 0x36, 0xe2, 0xd4, 0x40, 0xe9, 0x4f,
7467 0x26, 0xf2, 0xdd, 0x93, 0x51, 0x6e, 0x08, 0x96, 0x4d,
7468 0x29, 0x1f, 0x49, 0x96, 0x1a, 0xd2, 0xf3, 0xfa, 0x21,
7469 0xf6, 0xac, 0x7a, 0x00, 0xda, 0x08, 0xdb, 0xd8, 0x3c,
7470 0x52, 0x02, 0x31, 0xa9, 0x7e, 0x48, 0x29, 0xf6, 0x76,
7471 0xfb, 0xc1, 0x87, 0x17, 0xab, 0xce, 0xdc, 0x4d, 0xee,
7472 0x2a, 0x41, 0x44, 0x0d, 0x57, 0x97, 0xab, 0x01, 0x45,
7473 0x37, 0xa4, 0x2f, 0x59, 0x53, 0xa9, 0x59, 0x53, 0x5b,
7474 0x3c, 0x81,
7475 }
7476 };
7477
7478 TC_PRINT(".");
7479 result = do_hmac_prng_pr_false_test(119, &vec);
7480
7481 return result;
7482 }
7483
test_120(void)7484 unsigned int test_120(void)
7485 {
7486 unsigned int result = TC_PASS;
7487 const struct hmac_prng_test_vector vec = {
7488 32,
7489 16,
7490 32,
7491 0,
7492 128,
7493 {
7494 0x92, 0x84, 0xfd, 0x46, 0x60, 0xbe, 0xb7, 0xa1, 0x54,
7495 0x34, 0x9d, 0x74, 0xe2, 0xad, 0x84, 0x42, 0xa5, 0xac,
7496 0x06, 0x67, 0xac, 0x4d, 0x28, 0xda, 0xf0, 0x52, 0x9d,
7497 0xac, 0x5c, 0x80, 0x5a, 0x21,
7498 },
7499 {
7500 0xaf, 0xe9, 0x6e, 0x33, 0xc6, 0xd5, 0xbe, 0xf1, 0x65,
7501 0x28, 0x21, 0xde, 0xdb, 0x96, 0x41, 0x83,
7502 },
7503 {
7504 0x1b, 0x34, 0x19, 0xbe, 0xc2, 0x51, 0x35, 0x31, 0xfa,
7505 0x5f, 0xaf, 0xb4, 0x27, 0x85, 0xeb, 0x07, 0xec, 0x01,
7506 0xb6, 0x1a, 0x1e, 0x06, 0x45, 0x28, 0x08, 0xb2, 0x27,
7507 0xf5, 0xf5, 0xc8, 0x73, 0xcf,
7508 },
7509 {
7510 0xf4, 0x94, 0x2b, 0x20, 0xa4, 0x25, 0x89, 0xa2, 0x2e,
7511 0x1b, 0x3b, 0x22, 0x14, 0x33, 0x6d, 0x1b, 0xa3, 0xb1,
7512 0x17, 0x53, 0x93, 0x7b, 0x93, 0xf1, 0xd7, 0xc3, 0x63,
7513 0x6b, 0x34, 0x6d, 0x70, 0xa1,
7514 },
7515 {
7516 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7517 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7518 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7519 0x00, 0x00, 0x00, 0x00, 0x00,
7520 },
7521 {
7522 0xf0, 0xb8, 0x7f, 0x8c, 0x3c, 0x67, 0xf4, 0xdf, 0x3c,
7523 0xc6, 0x13, 0xc3, 0xc6, 0x79, 0x99, 0x67, 0x59, 0x51,
7524 0x17, 0x7c, 0x2d, 0x7d, 0x64, 0x6e, 0xc0, 0x3e, 0x52,
7525 0x22, 0x67, 0xea, 0x1d, 0x39, 0xd4, 0x20, 0x60, 0xd8,
7526 0xb1, 0x57, 0x77, 0x4a, 0xf7, 0xad, 0x7f, 0xd7, 0xf8,
7527 0x51, 0xf9, 0xc1, 0x3a, 0xaf, 0xa5, 0x6a, 0x64, 0xd7,
7528 0xc0, 0xff, 0x86, 0xc8, 0xdd, 0x95, 0x88, 0xf6, 0x9c,
7529 0x6e, 0x7a, 0x96, 0x80, 0x75, 0x9b, 0xc1, 0xb6, 0x02,
7530 0x79, 0x8b, 0x23, 0x95, 0x9f, 0xe5, 0x4f, 0xf4, 0xbd,
7531 0x2c, 0xe2, 0xd8, 0xed, 0xe7, 0x29, 0x8f, 0x68, 0x80,
7532 0x1a, 0xad, 0x61, 0x97, 0x74, 0x85, 0xe0, 0xac, 0xba,
7533 0xde, 0xec, 0xf4, 0x7b, 0x7e, 0xb3, 0x0e, 0x92, 0xf4,
7534 0x06, 0xd9, 0x73, 0xe3, 0x26, 0x51, 0x8d, 0xb3, 0xaf,
7535 0x0e, 0xa0, 0x6e, 0xa5, 0x74, 0xba, 0x7b, 0x01, 0x61,
7536 0xab, 0xf2,
7537 }
7538 };
7539
7540 TC_PRINT(".");
7541 result = do_hmac_prng_pr_false_test(120, &vec);
7542
7543 return result;
7544 }
7545
7546
ZTEST(hmac_prng_fn,test_hmac_prng)7547 ZTEST(hmac_prng_fn, test_hmac_prng)
7548 {
7549 unsigned int result = TC_PASS;
7550
7551
7552 result = test_1();
7553 zassert_false(result == TC_FAIL, "HMAC test 1 failed");
7554
7555 result = test_2();
7556 zassert_false(result == TC_FAIL, "HMAC test 2 failed");
7557
7558 result = test_3();
7559 zassert_false(result == TC_FAIL, "HMAC test 3 failed");
7560
7561 result = test_4();
7562 zassert_false(result == TC_FAIL, "HMAC test 4 failed");
7563
7564 result = test_5();
7565 zassert_false(result == TC_FAIL, "HMAC test 5 failed");
7566
7567 result = test_6();
7568 zassert_false(result == TC_FAIL, "HMAC test 6 failed");
7569
7570 result = test_7();
7571 zassert_false(result == TC_FAIL, "HMAC test 7 failed");
7572
7573 result = test_8();
7574 zassert_false(result == TC_FAIL, "HMAC test 8 failed");
7575
7576 result = test_9();
7577 zassert_false(result == TC_FAIL, "HMAC test 9 failed");
7578
7579 result = test_10();
7580 zassert_false(result == TC_FAIL, "HMAC test 10 failed");
7581
7582 result = test_11();
7583 zassert_false(result == TC_FAIL, "HMAC test 11 failed");
7584
7585 result = test_12();
7586 zassert_false(result == TC_FAIL, "HMAC test 12 failed");
7587
7588 result = test_13();
7589 zassert_false(result == TC_FAIL, "HMAC test 13 failed");
7590
7591 result = test_14();
7592 zassert_false(result == TC_FAIL, "HMAC test 14 failed");
7593
7594 result = test_15();
7595 zassert_false(result == TC_FAIL, "HMAC test 15 failed");
7596
7597 result = test_16();
7598 zassert_false(result == TC_FAIL, "HMAC test 16 failed");
7599
7600 result = test_17();
7601 zassert_false(result == TC_FAIL, "HMAC test 17 failed");
7602
7603 result = test_18();
7604 zassert_false(result == TC_FAIL, "HMAC test 18 failed");
7605
7606 result = test_19();
7607 zassert_false(result == TC_FAIL, "HMAC test 19 failed");
7608
7609 result = test_20();
7610 zassert_false(result == TC_FAIL, "HMAC test 20 failed");
7611
7612 result = test_21();
7613 zassert_false(result == TC_FAIL, "HMAC test 21 failed");
7614
7615 result = test_22();
7616 zassert_false(result == TC_FAIL, "HMAC test 22 failed");
7617
7618 result = test_23();
7619 zassert_false(result == TC_FAIL, "HMAC test 23 failed");
7620
7621 result = test_24();
7622 zassert_false(result == TC_FAIL, "HMAC test 24 failed");
7623
7624 result = test_25();
7625 zassert_false(result == TC_FAIL, "HMAC test 25 failed");
7626
7627 result = test_26();
7628 zassert_false(result == TC_FAIL, "HMAC test 26 failed");
7629
7630 result = test_27();
7631 zassert_false(result == TC_FAIL, "HMAC test 27 failed");
7632
7633 result = test_28();
7634 zassert_false(result == TC_FAIL, "HMAC test 28 failed");
7635
7636 result = test_29();
7637 zassert_false(result == TC_FAIL, "HMAC test 29 failed");
7638
7639 result = test_30();
7640 zassert_false(result == TC_FAIL, "HMAC test 30 failed");
7641
7642 result = test_31();
7643 zassert_false(result == TC_FAIL, "HMAC test 31 failed");
7644
7645 result = test_32();
7646 zassert_false(result == TC_FAIL, "HMAC test 32 failed");
7647
7648 result = test_33();
7649 zassert_false(result == TC_FAIL, "HMAC test 33 failed");
7650
7651 result = test_34();
7652 zassert_false(result == TC_FAIL, "HMAC test 34 failed");
7653
7654 result = test_35();
7655 zassert_false(result == TC_FAIL, "HMAC test 35 failed");
7656
7657 result = test_36();
7658 zassert_false(result == TC_FAIL, "HMAC test 36 failed");
7659
7660 result = test_37();
7661 zassert_false(result == TC_FAIL, "HMAC test 37 failed");
7662
7663 result = test_38();
7664 zassert_false(result == TC_FAIL, "HMAC test 38 failed");
7665
7666 result = test_39();
7667 zassert_false(result == TC_FAIL, "HMAC test 39 failed");
7668
7669 result = test_40();
7670 zassert_false(result == TC_FAIL, "HMAC test 40 failed");
7671
7672 result = test_41();
7673 zassert_false(result == TC_FAIL, "HMAC test 41 failed");
7674
7675 result = test_42();
7676 zassert_false(result == TC_FAIL, "HMAC test 42 failed");
7677
7678 result = test_43();
7679 zassert_false(result == TC_FAIL, "HMAC test 43 failed");
7680
7681 result = test_44();
7682 zassert_false(result == TC_FAIL, "HMAC test 44 failed");
7683
7684 result = test_45();
7685 zassert_false(result == TC_FAIL, "HMAC test 45 failed");
7686
7687 result = test_46();
7688 zassert_false(result == TC_FAIL, "HMAC test 46 failed");
7689
7690 result = test_47();
7691 zassert_false(result == TC_FAIL, "HMAC test 47 failed");
7692
7693 result = test_48();
7694 zassert_false(result == TC_FAIL, "HMAC test 48 failed");
7695
7696 result = test_49();
7697 zassert_false(result == TC_FAIL, "HMAC test 49 failed");
7698
7699 result = test_50();
7700 zassert_false(result == TC_FAIL, "HMAC test 50 failed");
7701
7702 result = test_51();
7703 zassert_false(result == TC_FAIL, "HMAC test 51 failed");
7704
7705 result = test_52();
7706 zassert_false(result == TC_FAIL, "HMAC test 52 failed");
7707
7708 result = test_53();
7709 zassert_false(result == TC_FAIL, "HMAC test 53 failed");
7710
7711 result = test_54();
7712 zassert_false(result == TC_FAIL, "HMAC test 54 failed");
7713
7714 result = test_55();
7715 zassert_false(result == TC_FAIL, "HMAC test 55 failed");
7716
7717 result = test_56();
7718 zassert_false(result == TC_FAIL, "HMAC test 56 failed");
7719
7720 result = test_57();
7721 zassert_false(result == TC_FAIL, "HMAC test 57 failed");
7722
7723 result = test_58();
7724 zassert_false(result == TC_FAIL, "HMAC test 58 failed");
7725
7726 result = test_59();
7727 zassert_false(result == TC_FAIL, "HMAC test 59 failed");
7728
7729 result = test_60();
7730 zassert_false(result == TC_FAIL, "HMAC test 60 failed");
7731
7732 result = test_61();
7733 zassert_false(result == TC_FAIL, "HMAC test 61 failed");
7734
7735 result = test_62();
7736 zassert_false(result == TC_FAIL, "HMAC test 62 failed");
7737
7738 result = test_63();
7739 zassert_false(result == TC_FAIL, "HMAC test 63 failed");
7740
7741 result = test_64();
7742 zassert_false(result == TC_FAIL, "HMAC test 64 failed");
7743
7744 result = test_65();
7745 zassert_false(result == TC_FAIL, "HMAC test 65 failed");
7746
7747 result = test_66();
7748 zassert_false(result == TC_FAIL, "HMAC test 66 failed");
7749
7750 result = test_67();
7751 zassert_false(result == TC_FAIL, "HMAC test 67 failed");
7752
7753 result = test_68();
7754 zassert_false(result == TC_FAIL, "HMAC test 68 failed");
7755
7756 result = test_69();
7757 zassert_false(result == TC_FAIL, "HMAC test 69 failed");
7758
7759 result = test_70();
7760 zassert_false(result == TC_FAIL, "HMAC test 70 failed");
7761
7762 result = test_71();
7763 zassert_false(result == TC_FAIL, "HMAC test 71 failed");
7764
7765 result = test_72();
7766 zassert_false(result == TC_FAIL, "HMAC test 72 failed");
7767
7768 result = test_73();
7769 zassert_false(result == TC_FAIL, "HMAC test 73 failed");
7770
7771 result = test_74();
7772 zassert_false(result == TC_FAIL, "HMAC test 74 failed");
7773
7774 result = test_75();
7775 zassert_false(result == TC_FAIL, "HMAC test 75 failed");
7776
7777 result = test_76();
7778 zassert_false(result == TC_FAIL, "HMAC test 76 failed");
7779
7780 result = test_77();
7781 zassert_false(result == TC_FAIL, "HMAC test 77 failed");
7782
7783 result = test_78();
7784 zassert_false(result == TC_FAIL, "HMAC test 78 failed");
7785
7786 result = test_79();
7787 zassert_false(result == TC_FAIL, "HMAC test 79 failed");
7788
7789 result = test_80();
7790 zassert_false(result == TC_FAIL, "HMAC test 80 failed");
7791
7792 result = test_81();
7793 zassert_false(result == TC_FAIL, "HMAC test 81 failed");
7794
7795 result = test_82();
7796 zassert_false(result == TC_FAIL, "HMAC test 82 failed");
7797
7798 result = test_83();
7799 zassert_false(result == TC_FAIL, "HMAC test 83 failed");
7800
7801 result = test_84();
7802 zassert_false(result == TC_FAIL, "HMAC test 84 failed");
7803
7804 result = test_85();
7805 zassert_false(result == TC_FAIL, "HMAC test 85 failed");
7806
7807 result = test_86();
7808 zassert_false(result == TC_FAIL, "HMAC test 86 failed");
7809
7810 result = test_87();
7811 zassert_false(result == TC_FAIL, "HMAC test 87 failed");
7812
7813 result = test_88();
7814 zassert_false(result == TC_FAIL, "HMAC test 88 failed");
7815
7816 result = test_89();
7817 zassert_false(result == TC_FAIL, "HMAC test 89 failed");
7818
7819 result = test_90();
7820 zassert_false(result == TC_FAIL, "HMAC test 90 failed");
7821
7822 result = test_91();
7823 zassert_false(result == TC_FAIL, "HMAC test 91 failed");
7824
7825 result = test_92();
7826 zassert_false(result == TC_FAIL, "HMAC test 92 failed");
7827
7828 result = test_93();
7829 zassert_false(result == TC_FAIL, "HMAC test 93 failed");
7830
7831 result = test_94();
7832 zassert_false(result == TC_FAIL, "HMAC test 94 failed");
7833
7834 result = test_95();
7835 zassert_false(result == TC_FAIL, "HMAC test 95 failed");
7836
7837 result = test_96();
7838 zassert_false(result == TC_FAIL, "HMAC test 96 failed");
7839
7840 result = test_97();
7841 zassert_false(result == TC_FAIL, "HMAC test 97 failed");
7842
7843 result = test_98();
7844 zassert_false(result == TC_FAIL, "HMAC test 98 failed");
7845
7846 result = test_99();
7847 zassert_false(result == TC_FAIL, "HMAC test 99 failed");
7848
7849 result = test_100();
7850 zassert_false(result == TC_FAIL, "HMAC test 100 failed");
7851
7852 result = test_101();
7853 zassert_false(result == TC_FAIL, "HMAC test 101 failed");
7854
7855 result = test_102();
7856 zassert_false(result == TC_FAIL, "HMAC test 102 failed");
7857
7858 result = test_103();
7859 zassert_false(result == TC_FAIL, "HMAC test 103 failed");
7860
7861 result = test_104();
7862 zassert_false(result == TC_FAIL, "HMAC test 104 failed");
7863
7864 result = test_105();
7865 zassert_false(result == TC_FAIL, "HMAC test 105 failed");
7866
7867 result = test_106();
7868 zassert_false(result == TC_FAIL, "HMAC test 106 failed");
7869
7870 result = test_107();
7871 zassert_false(result == TC_FAIL, "HMAC test 107 failed");
7872
7873 result = test_108();
7874 zassert_false(result == TC_FAIL, "HMAC test 108 failed");
7875
7876 result = test_109();
7877 zassert_false(result == TC_FAIL, "HMAC test 109 failed");
7878
7879 result = test_110();
7880 zassert_false(result == TC_FAIL, "HMAC test 110 failed");
7881
7882 result = test_111();
7883 zassert_false(result == TC_FAIL, "HMAC test 111 failed");
7884
7885 result = test_112();
7886 zassert_false(result == TC_FAIL, "HMAC test 112 failed");
7887
7888 result = test_113();
7889 zassert_false(result == TC_FAIL, "HMAC test 113 failed");
7890
7891 result = test_114();
7892 zassert_false(result == TC_FAIL, "HMAC test 114 failed");
7893
7894 result = test_115();
7895 zassert_false(result == TC_FAIL, "HMAC test 115 failed");
7896
7897 result = test_116();
7898 zassert_false(result == TC_FAIL, "HMAC test 116 failed");
7899
7900 result = test_117();
7901 zassert_false(result == TC_FAIL, "HMAC test 117 failed");
7902
7903 result = test_118();
7904 zassert_false(result == TC_FAIL, "HMAC test 118 failed");
7905
7906 result = test_119();
7907 zassert_false(result == TC_FAIL, "HMAC test 119 failed");
7908
7909 result = test_120();
7910 zassert_false(result == TC_FAIL, "HMAC test 120 failed");
7911
7912 TC_PRINT("\n");
7913 TC_PRINT("All HMAC-PRNG tests succeeded!\n");
7914 }
7915
7916 ZTEST_SUITE(hmac_prng_fn, NULL, NULL, NULL, NULL, NULL);
7917