blob: 70a1e6d0d9fcb5688e9f830473bbcc7b573eef36 [file] [log] [blame]
Etienne Carriere9b7b70d2020-05-16 10:27:23 +02001/* SPDX-License-Identifier: GPL-2.0 */
Pascal Brandc639ac82015-07-02 08:53:34 +02002/*
3 * Copyright (c) 2014, STMicroelectronics International N.V.
Alexander Zakharov0afe00c2021-02-10 19:06:48 +01004 * Copyright (c) 2021, SumUp Services GmbH
Pascal Brandc639ac82015-07-02 08:53:34 +02005 */
6
7#ifndef XTEST_4000_DATA_H
8#define XTEST_4000_DATA_H
9#include <stdint.h>
Cedric Chaumonteb1f7902015-09-18 12:54:58 +020010#include <nist/186-3dsatestvectors.h>
11#include <nist/ecccdhtestvectors.h>
Pascal Brandc639ac82015-07-02 08:53:34 +020012
13/*
14 * XTS-AES Test data from:
15 * http://grouper.ieee.org/groups/1619/email/pdf00086.pdf
16 */
17
18/*
19 * XTS-AES applied for a data unit of 32 bytes, 32 bytes key material.
20 */
21
22/* Vector 1 */
23static const uint8_t ciph_data_aes_xts_vect1_key1[] = {
24 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
25 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
26};
27static const uint8_t ciph_data_aes_xts_vect1_key2[] = {
28 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
29 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
30};
31static const uint8_t ciph_data_aes_xts_vect1_iv[16] = {
32 0x0
33};
34static const uint8_t ciph_data_aes_xts_vect1_ptx[] = {
35 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
36 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
37 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
38 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
39};
40/* TWK 66e94bd4ef8a2c3b884cfa59ca342b2eccd297a8df1559761099f4b39469565c */
41static const uint8_t ciph_data_aes_xts_vect1_ctx[] = {
42 0x91, 0x7c, 0xf6, 0x9e, 0xbd, 0x68, 0xb2, 0xec,
43 0x9b, 0x9f, 0xe9, 0xa3, 0xea, 0xdd, 0xa6, 0x92,
44 0xcd, 0x43, 0xd2, 0xf5, 0x95, 0x98, 0xed, 0x85,
45 0x8c, 0x02, 0xc2, 0x65, 0x2f, 0xbf, 0x92, 0x2e,
46};
47
48/* Vector 2 */
49static const uint8_t ciph_data_aes_xts_vect2_key1[] = {
50 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
51 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
52};
53static const uint8_t ciph_data_aes_xts_vect2_key2[] = {
54 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
55 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
56};
57static const uint8_t ciph_data_aes_xts_vect2_iv[16] = {
58 0x33, 0x33, 0x33, 0x33, 0x33
59};
60static const uint8_t ciph_data_aes_xts_vect2_ptx[] = {
61 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
62 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
63 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
64 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
65};
66/* TWK 3f803bcd0d7fd2b37558419f59d5cda6f900779a1bfea467ebb0823eb3aa9b4d */
67static const uint8_t ciph_data_aes_xts_vect2_ctx[] = {
68 0xc4, 0x54, 0x18, 0x5e, 0x6a, 0x16, 0x93, 0x6e,
69 0x39, 0x33, 0x40, 0x38, 0xac, 0xef, 0x83, 0x8b,
70 0xfb, 0x18, 0x6f, 0xff, 0x74, 0x80, 0xad, 0xc4,
71 0x28, 0x93, 0x82, 0xec, 0xd6, 0xd3, 0x94, 0xf0,
72};
73
74/* Vector 3 */
75static const uint8_t ciph_data_aes_xts_vect3_key1[] = {
76 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8,
77 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0,
78};
79static const uint8_t ciph_data_aes_xts_vect3_key2[] = {
80 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
81 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
82};
83static const uint8_t ciph_data_aes_xts_vect3_iv[16] = {
84 0x33, 0x33, 0x33, 0x33, 0x33
85};
86static const uint8_t ciph_data_aes_xts_vect3_ptx[] = {
87 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
88 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
89 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
90 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
91};
92/* TWK 3f803bcd0d7fd2b37558419f59d5cda6f900779a1bfea467ebb0823eb3aa9b4d */
93static const uint8_t ciph_data_aes_xts_vect3_ctx[] = {
94 0xaf, 0x85, 0x33, 0x6b, 0x59, 0x7a, 0xfc, 0x1a,
95 0x90, 0x0b, 0x2e, 0xb2, 0x1e, 0xc9, 0x49, 0xd2,
96 0x92, 0xdf, 0x4c, 0x04, 0x7e, 0x0b, 0x21, 0x53,
97 0x21, 0x86, 0xa5, 0x97, 0x1a, 0x22, 0x7a, 0x89,
98};
99
100/*
101 * XTS-AES-128 applied for a data unit of 512 bytes
102 */
103
104/* Vector 4 */
105static const uint8_t ciph_data_aes_xts_vect4_key1[] = {
106 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
107 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
108};
109static const uint8_t ciph_data_aes_xts_vect4_key2[] = {
110 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
111 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
112};
113static const uint8_t ciph_data_aes_xts_vect4_iv[16] = {
114 0x00
115};
116static const uint8_t ciph_data_aes_xts_vect4_ptx[] = {
117 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
118 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
119 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
120 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
121
122 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
123 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
124 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
125 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
126
127 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
128 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
129 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
130 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
131
132 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
133 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
134 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
135 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
136
137 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
138 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
139 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
140 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
141
142 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
143 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
144 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
145 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
146
147 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
148 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
149 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
150 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
151
152 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
153 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
154 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
155 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
156
157 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
158 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
159 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
160 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
161
162 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
163 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
164 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
165 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
166
167 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
168 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
169 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
170 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
171
172 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
173 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
174 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
175 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
176
177 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
178 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
179 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
180 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
181
182 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
183 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
184 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
185 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
186
187 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
188 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
189 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
190 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
191
192 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
193 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
194 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
195 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
196};
197static const uint8_t ciph_data_aes_xts_vect4_ctx[] = {
198 0x27, 0xa7, 0x47, 0x9b, 0xef, 0xa1, 0xd4, 0x76,
199 0x48, 0x9f, 0x30, 0x8c, 0xd4, 0xcf, 0xa6, 0xe2,
200 0xa9, 0x6e, 0x4b, 0xbe, 0x32, 0x08, 0xff, 0x25,
201 0x28, 0x7d, 0xd3, 0x81, 0x96, 0x16, 0xe8, 0x9c,
202
203 0xc7, 0x8c, 0xf7, 0xf5, 0xe5, 0x43, 0x44, 0x5f,
204 0x83, 0x33, 0xd8, 0xfa, 0x7f, 0x56, 0x00, 0x00,
205 0x05, 0x27, 0x9f, 0xa5, 0xd8, 0xb5, 0xe4, 0xad,
206 0x40, 0xe7, 0x36, 0xdd, 0xb4, 0xd3, 0x54, 0x12,
207
208 0x32, 0x80, 0x63, 0xfd, 0x2a, 0xab, 0x53, 0xe5,
209 0xea, 0x1e, 0x0a, 0x9f, 0x33, 0x25, 0x00, 0xa5,
210 0xdf, 0x94, 0x87, 0xd0, 0x7a, 0x5c, 0x92, 0xcc,
211 0x51, 0x2c, 0x88, 0x66, 0xc7, 0xe8, 0x60, 0xce,
212
213 0x93, 0xfd, 0xf1, 0x66, 0xa2, 0x49, 0x12, 0xb4,
214 0x22, 0x97, 0x61, 0x46, 0xae, 0x20, 0xce, 0x84,
215 0x6b, 0xb7, 0xdc, 0x9b, 0xa9, 0x4a, 0x76, 0x7a,
216 0xae, 0xf2, 0x0c, 0x0d, 0x61, 0xad, 0x02, 0x65,
217
218 0x5e, 0xa9, 0x2d, 0xc4, 0xc4, 0xe4, 0x1a, 0x89,
219 0x52, 0xc6, 0x51, 0xd3, 0x31, 0x74, 0xbe, 0x51,
220 0xa1, 0x0c, 0x42, 0x11, 0x10, 0xe6, 0xd8, 0x15,
221 0x88, 0xed, 0xe8, 0x21, 0x03, 0xa2, 0x52, 0xd8,
222
223 0xa7, 0x50, 0xe8, 0x76, 0x8d, 0xef, 0xff, 0xed,
224 0x91, 0x22, 0x81, 0x0a, 0xae, 0xb9, 0x9f, 0x91,
225 0x72, 0xaf, 0x82, 0xb6, 0x04, 0xdc, 0x4b, 0x8e,
226 0x51, 0xbc, 0xb0, 0x82, 0x35, 0xa6, 0xf4, 0x34,
227
228 0x13, 0x32, 0xe4, 0xca, 0x60, 0x48, 0x2a, 0x4b,
229 0xa1, 0xa0, 0x3b, 0x3e, 0x65, 0x00, 0x8f, 0xc5,
230 0xda, 0x76, 0xb7, 0x0b, 0xf1, 0x69, 0x0d, 0xb4,
231 0xea, 0xe2, 0x9c, 0x5f, 0x1b, 0xad, 0xd0, 0x3c,
232
233 0x5c, 0xcf, 0x2a, 0x55, 0xd7, 0x05, 0xdd, 0xcd,
234 0x86, 0xd4, 0x49, 0x51, 0x1c, 0xeb, 0x7e, 0xc3,
235 0x0b, 0xf1, 0x2b, 0x1f, 0xa3, 0x5b, 0x91, 0x3f,
236 0x9f, 0x74, 0x7a, 0x8a, 0xfd, 0x1b, 0x13, 0x0e,
237
238 0x94, 0xbf, 0xf9, 0x4e, 0xff, 0xd0, 0x1a, 0x91,
239 0x73, 0x5c, 0xa1, 0x72, 0x6a, 0xcd, 0x0b, 0x19,
240 0x7c, 0x4e, 0x5b, 0x03, 0x39, 0x36, 0x97, 0xe1,
241 0x26, 0x82, 0x6f, 0xb6, 0xbb, 0xde, 0x8e, 0xcc,
242
243 0x1e, 0x08, 0x29, 0x85, 0x16, 0xe2, 0xc9, 0xed,
244 0x03, 0xff, 0x3c, 0x1b, 0x78, 0x60, 0xf6, 0xde,
245 0x76, 0xd4, 0xce, 0xcd, 0x94, 0xc8, 0x11, 0x98,
246 0x55, 0xef, 0x52, 0x97, 0xca, 0x67, 0xe9, 0xf3,
247
248 0xe7, 0xff, 0x72, 0xb1, 0xe9, 0x97, 0x85, 0xca,
249 0x0a, 0x7e, 0x77, 0x20, 0xc5, 0xb3, 0x6d, 0xc6,
250 0xd7, 0x2c, 0xac, 0x95, 0x74, 0xc8, 0xcb, 0xbc,
251 0x2f, 0x80, 0x1e, 0x23, 0xe5, 0x6f, 0xd3, 0x44,
252
253 0xb0, 0x7f, 0x22, 0x15, 0x4b, 0xeb, 0xa0, 0xf0,
254 0x8c, 0xe8, 0x89, 0x1e, 0x64, 0x3e, 0xd9, 0x95,
255 0xc9, 0x4d, 0x9a, 0x69, 0xc9, 0xf1, 0xb5, 0xf4,
256 0x99, 0x02, 0x7a, 0x78, 0x57, 0x2a, 0xee, 0xbd,
257
258 0x74, 0xd2, 0x0c, 0xc3, 0x98, 0x81, 0xc2, 0x13,
259 0xee, 0x77, 0x0b, 0x10, 0x10, 0xe4, 0xbe, 0xa7,
260 0x18, 0x84, 0x69, 0x77, 0xae, 0x11, 0x9f, 0x7a,
261 0x02, 0x3a, 0xb5, 0x8c, 0xca, 0x0a, 0xd7, 0x52,
262
263 0xaf, 0xe6, 0x56, 0xbb, 0x3c, 0x17, 0x25, 0x6a,
264 0x9f, 0x6e, 0x9b, 0xf1, 0x9f, 0xdd, 0x5a, 0x38,
265 0xfc, 0x82, 0xbb, 0xe8, 0x72, 0xc5, 0x53, 0x9e,
266 0xdb, 0x60, 0x9e, 0xf4, 0xf7, 0x9c, 0x20, 0x3e,
267
268 0xbb, 0x14, 0x0f, 0x2e, 0x58, 0x3c, 0xb2, 0xad,
269 0x15, 0xb4, 0xaa, 0x5b, 0x65, 0x50, 0x16, 0xa8,
270 0x44, 0x92, 0x77, 0xdb, 0xd4, 0x77, 0xef, 0x2c,
271 0x8d, 0x6c, 0x01, 0x7d, 0xb7, 0x38, 0xb1, 0x8d,
272
273 0xeb, 0x4a, 0x42, 0x7d, 0x19, 0x23, 0xce, 0x3f,
274 0xf2, 0x62, 0x73, 0x57, 0x79, 0xa4, 0x18, 0xf2,
275 0x0a, 0x28, 0x2d, 0xf9, 0x20, 0x14, 0x7b, 0xea,
276 0xbe, 0x42, 0x1e, 0xe5, 0x31, 0x9d, 0x05, 0x68,
277};
278
279/* Vector 5 */
280static const uint8_t ciph_data_aes_xts_vect5_key1[] = {
281 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
282 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
283};
284static const uint8_t ciph_data_aes_xts_vect5_key2[] = {
285 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
286 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
287};
288static const uint8_t ciph_data_aes_xts_vect5_iv[16] = {
289 0x01
290};
291static const uint8_t ciph_data_aes_xts_vect5_ptx[] = {
292 0x27, 0xa7, 0x47, 0x9b, 0xef, 0xa1, 0xd4, 0x76,
293 0x48, 0x9f, 0x30, 0x8c, 0xd4, 0xcf, 0xa6, 0xe2,
294 0xa9, 0x6e, 0x4b, 0xbe, 0x32, 0x08, 0xff, 0x25,
295 0x28, 0x7d, 0xd3, 0x81, 0x96, 0x16, 0xe8, 0x9c,
296
297 0xc7, 0x8c, 0xf7, 0xf5, 0xe5, 0x43, 0x44, 0x5f,
298 0x83, 0x33, 0xd8, 0xfa, 0x7f, 0x56, 0x00, 0x00,
299 0x05, 0x27, 0x9f, 0xa5, 0xd8, 0xb5, 0xe4, 0xad,
300 0x40, 0xe7, 0x36, 0xdd, 0xb4, 0xd3, 0x54, 0x12,
301
302 0x32, 0x80, 0x63, 0xfd, 0x2a, 0xab, 0x53, 0xe5,
303 0xea, 0x1e, 0x0a, 0x9f, 0x33, 0x25, 0x00, 0xa5,
304 0xdf, 0x94, 0x87, 0xd0, 0x7a, 0x5c, 0x92, 0xcc,
305 0x51, 0x2c, 0x88, 0x66, 0xc7, 0xe8, 0x60, 0xce,
306
307 0x93, 0xfd, 0xf1, 0x66, 0xa2, 0x49, 0x12, 0xb4,
308 0x22, 0x97, 0x61, 0x46, 0xae, 0x20, 0xce, 0x84,
309 0x6b, 0xb7, 0xdc, 0x9b, 0xa9, 0x4a, 0x76, 0x7a,
310 0xae, 0xf2, 0x0c, 0x0d, 0x61, 0xad, 0x02, 0x65,
311
312 0x5e, 0xa9, 0x2d, 0xc4, 0xc4, 0xe4, 0x1a, 0x89,
313 0x52, 0xc6, 0x51, 0xd3, 0x31, 0x74, 0xbe, 0x51,
314 0xa1, 0x0c, 0x42, 0x11, 0x10, 0xe6, 0xd8, 0x15,
315 0x88, 0xed, 0xe8, 0x21, 0x03, 0xa2, 0x52, 0xd8,
316
317 0xa7, 0x50, 0xe8, 0x76, 0x8d, 0xef, 0xff, 0xed,
318 0x91, 0x22, 0x81, 0x0a, 0xae, 0xb9, 0x9f, 0x91,
319 0x72, 0xaf, 0x82, 0xb6, 0x04, 0xdc, 0x4b, 0x8e,
320 0x51, 0xbc, 0xb0, 0x82, 0x35, 0xa6, 0xf4, 0x34,
321
322 0x13, 0x32, 0xe4, 0xca, 0x60, 0x48, 0x2a, 0x4b,
323 0xa1, 0xa0, 0x3b, 0x3e, 0x65, 0x00, 0x8f, 0xc5,
324 0xda, 0x76, 0xb7, 0x0b, 0xf1, 0x69, 0x0d, 0xb4,
325 0xea, 0xe2, 0x9c, 0x5f, 0x1b, 0xad, 0xd0, 0x3c,
326
327 0x5c, 0xcf, 0x2a, 0x55, 0xd7, 0x05, 0xdd, 0xcd,
328 0x86, 0xd4, 0x49, 0x51, 0x1c, 0xeb, 0x7e, 0xc3,
329 0x0b, 0xf1, 0x2b, 0x1f, 0xa3, 0x5b, 0x91, 0x3f,
330 0x9f, 0x74, 0x7a, 0x8a, 0xfd, 0x1b, 0x13, 0x0e,
331
332 0x94, 0xbf, 0xf9, 0x4e, 0xff, 0xd0, 0x1a, 0x91,
333 0x73, 0x5c, 0xa1, 0x72, 0x6a, 0xcd, 0x0b, 0x19,
334 0x7c, 0x4e, 0x5b, 0x03, 0x39, 0x36, 0x97, 0xe1,
335 0x26, 0x82, 0x6f, 0xb6, 0xbb, 0xde, 0x8e, 0xcc,
336
337 0x1e, 0x08, 0x29, 0x85, 0x16, 0xe2, 0xc9, 0xed,
338 0x03, 0xff, 0x3c, 0x1b, 0x78, 0x60, 0xf6, 0xde,
339 0x76, 0xd4, 0xce, 0xcd, 0x94, 0xc8, 0x11, 0x98,
340 0x55, 0xef, 0x52, 0x97, 0xca, 0x67, 0xe9, 0xf3,
341
342 0xe7, 0xff, 0x72, 0xb1, 0xe9, 0x97, 0x85, 0xca,
343 0x0a, 0x7e, 0x77, 0x20, 0xc5, 0xb3, 0x6d, 0xc6,
344 0xd7, 0x2c, 0xac, 0x95, 0x74, 0xc8, 0xcb, 0xbc,
345 0x2f, 0x80, 0x1e, 0x23, 0xe5, 0x6f, 0xd3, 0x44,
346
347 0xb0, 0x7f, 0x22, 0x15, 0x4b, 0xeb, 0xa0, 0xf0,
348 0x8c, 0xe8, 0x89, 0x1e, 0x64, 0x3e, 0xd9, 0x95,
349 0xc9, 0x4d, 0x9a, 0x69, 0xc9, 0xf1, 0xb5, 0xf4,
350 0x99, 0x02, 0x7a, 0x78, 0x57, 0x2a, 0xee, 0xbd,
351
352 0x74, 0xd2, 0x0c, 0xc3, 0x98, 0x81, 0xc2, 0x13,
353 0xee, 0x77, 0x0b, 0x10, 0x10, 0xe4, 0xbe, 0xa7,
354 0x18, 0x84, 0x69, 0x77, 0xae, 0x11, 0x9f, 0x7a,
355 0x02, 0x3a, 0xb5, 0x8c, 0xca, 0x0a, 0xd7, 0x52,
356
357 0xaf, 0xe6, 0x56, 0xbb, 0x3c, 0x17, 0x25, 0x6a,
358 0x9f, 0x6e, 0x9b, 0xf1, 0x9f, 0xdd, 0x5a, 0x38,
359 0xfc, 0x82, 0xbb, 0xe8, 0x72, 0xc5, 0x53, 0x9e,
360 0xdb, 0x60, 0x9e, 0xf4, 0xf7, 0x9c, 0x20, 0x3e,
361
362 0xbb, 0x14, 0x0f, 0x2e, 0x58, 0x3c, 0xb2, 0xad,
363 0x15, 0xb4, 0xaa, 0x5b, 0x65, 0x50, 0x16, 0xa8,
364 0x44, 0x92, 0x77, 0xdb, 0xd4, 0x77, 0xef, 0x2c,
365 0x8d, 0x6c, 0x01, 0x7d, 0xb7, 0x38, 0xb1, 0x8d,
366
367 0xeb, 0x4a, 0x42, 0x7d, 0x19, 0x23, 0xce, 0x3f,
368 0xf2, 0x62, 0x73, 0x57, 0x79, 0xa4, 0x18, 0xf2,
369 0x0a, 0x28, 0x2d, 0xf9, 0x20, 0x14, 0x7b, 0xea,
370 0xbe, 0x42, 0x1e, 0xe5, 0x31, 0x9d, 0x05, 0x68,
371};
372static const uint8_t ciph_data_aes_xts_vect5_ctx[] = {
373 0x26, 0x4d, 0x3c, 0xa8, 0x51, 0x21, 0x94, 0xfe,
374 0xc3, 0x12, 0xc8, 0xc9, 0x89, 0x1f, 0x27, 0x9f,
375 0xef, 0xdd, 0x60, 0x8d, 0x0c, 0x02, 0x7b, 0x60,
376 0x48, 0x3a, 0x3f, 0xa8, 0x11, 0xd6, 0x5e, 0xe5,
377
378 0x9d, 0x52, 0xd9, 0xe4, 0x0e, 0xc5, 0x67, 0x2d,
379 0x81, 0x53, 0x2b, 0x38, 0xb6, 0xb0, 0x89, 0xce,
380 0x95, 0x1f, 0x0f, 0x9c, 0x35, 0x59, 0x0b, 0x8b,
381 0x97, 0x8d, 0x17, 0x52, 0x13, 0xf3, 0x29, 0xbb,
382
383 0x1c, 0x2f, 0xd3, 0x0f, 0x2f, 0x7f, 0x30, 0x49,
384 0x2a, 0x61, 0xa5, 0x32, 0xa7, 0x9f, 0x51, 0xd3,
385 0x6f, 0x5e, 0x31, 0xa7, 0xc9, 0xa1, 0x2c, 0x28,
386 0x60, 0x82, 0xff, 0x7d, 0x23, 0x94, 0xd1, 0x8f,
387
388 0x78, 0x3e, 0x1a, 0x8e, 0x72, 0xc7, 0x22, 0xca,
389 0xaa, 0xa5, 0x2d, 0x8f, 0x06, 0x56, 0x57, 0xd2,
390 0x63, 0x1f, 0xd2, 0x5b, 0xfd, 0x8e, 0x5b, 0xaa,
391 0xd6, 0xe5, 0x27, 0xd7, 0x63, 0x51, 0x75, 0x01,
392
393 0xc6, 0x8c, 0x5e, 0xdc, 0x3c, 0xdd, 0x55, 0x43,
394 0x5c, 0x53, 0x2d, 0x71, 0x25, 0xc8, 0x61, 0x4d,
395 0xee, 0xd9, 0xad, 0xaa, 0x3a, 0xca, 0xde, 0x58,
396 0x88, 0xb8, 0x7b, 0xef, 0x64, 0x1c, 0x4c, 0x99,
397
398 0x4c, 0x80, 0x91, 0xb5, 0xbc, 0xd3, 0x87, 0xf3,
399 0x96, 0x3f, 0xb5, 0xbc, 0x37, 0xaa, 0x92, 0x2f,
400 0xbf, 0xe3, 0xdf, 0x4e, 0x5b, 0x91, 0x5e, 0x6e,
401 0xb5, 0x14, 0x71, 0x7b, 0xdd, 0x2a, 0x74, 0x07,
402
403 0x9a, 0x50, 0x73, 0xf5, 0xc4, 0xbf, 0xd4, 0x6a,
404 0xdf, 0x7d, 0x28, 0x2e, 0x7a, 0x39, 0x3a, 0x52,
405 0x57, 0x9d, 0x11, 0xa0, 0x28, 0xda, 0x4d, 0x9c,
406 0xd9, 0xc7, 0x71, 0x24, 0xf9, 0x64, 0x8e, 0xe3,
407
408 0x83, 0xb1, 0xac, 0x76, 0x39, 0x30, 0xe7, 0x16,
409 0x2a, 0x8d, 0x37, 0xf3, 0x50, 0xb2, 0xf7, 0x4b,
410 0x84, 0x72, 0xcf, 0x09, 0x90, 0x20, 0x63, 0xc6,
411 0xb3, 0x2e, 0x8c, 0x2d, 0x92, 0x90, 0xce, 0xfb,
412
413 0xd7, 0x34, 0x6d, 0x1c, 0x77, 0x9a, 0x0d, 0xf5,
414 0x0e, 0xdc, 0xde, 0x45, 0x31, 0xda, 0x07, 0xb0,
415 0x99, 0xc6, 0x38, 0xe8, 0x3a, 0x75, 0x59, 0x44,
416 0xdf, 0x2a, 0xef, 0x1a, 0xa3, 0x17, 0x52, 0xfd,
417
418 0x32, 0x3d, 0xcb, 0x71, 0x0f, 0xb4, 0xbf, 0xbb,
419 0x9d, 0x22, 0xb9, 0x25, 0xbc, 0x35, 0x77, 0xe1,
420 0xb8, 0x94, 0x9e, 0x72, 0x9a, 0x90, 0xbb, 0xaf,
421 0xea, 0xcf, 0x7f, 0x78, 0x79, 0xe7, 0xb1, 0x14,
422
423 0x7e, 0x28, 0xba, 0x0b, 0xae, 0x94, 0x0d, 0xb7,
424 0x95, 0xa6, 0x1b, 0x15, 0xec, 0xf4, 0xdf, 0x8d,
425 0xb0, 0x7b, 0x82, 0x4b, 0xb0, 0x62, 0x80, 0x2c,
426 0xc9, 0x8a, 0x95, 0x45, 0xbb, 0x2a, 0xae, 0xed,
427
428 0x77, 0xcb, 0x3f, 0xc6, 0xdb, 0x15, 0xdc, 0xd7,
429 0xd8, 0x0d, 0x7d, 0x5b, 0xc4, 0x06, 0xc4, 0x97,
430 0x0a, 0x34, 0x78, 0xad, 0xa8, 0x89, 0x9b, 0x32,
431 0x91, 0x98, 0xeb, 0x61, 0xc1, 0x93, 0xfb, 0x62,
432
433 0x75, 0xaa, 0x8c, 0xa3, 0x40, 0x34, 0x4a, 0x75,
434 0xa8, 0x62, 0xae, 0xbe, 0x92, 0xee, 0xe1, 0xce,
435 0x03, 0x2f, 0xd9, 0x50, 0xb4, 0x7d, 0x77, 0x04,
436 0xa3, 0x87, 0x69, 0x23, 0xb4, 0xad, 0x62, 0x84,
437
438 0x4b, 0xf4, 0xa0, 0x9c, 0x4d, 0xbe, 0x8b, 0x43,
439 0x97, 0x18, 0x4b, 0x74, 0x71, 0x36, 0x0c, 0x95,
440 0x64, 0x88, 0x0a, 0xed, 0xdd, 0xb9, 0xba, 0xa4,
441 0xaf, 0x2e, 0x75, 0x39, 0x4b, 0x08, 0xcd, 0x32,
442
443 0xff, 0x47, 0x9c, 0x57, 0xa0, 0x7d, 0x3e, 0xab,
444 0x5d, 0x54, 0xde, 0x5f, 0x97, 0x38, 0xb8, 0xd2,
445 0x7f, 0x27, 0xa9, 0xf0, 0xab, 0x11, 0x79, 0x9d,
446 0x7b, 0x7f, 0xfe, 0xfb, 0x27, 0x04, 0xc9, 0x5c,
447
448 0x6a, 0xd1, 0x2c, 0x39, 0xf1, 0xe8, 0x67, 0xa4,
449 0xb7, 0xb1, 0xd7, 0x81, 0x8a, 0x4b, 0x75, 0x3d,
450 0xfd, 0x2a, 0x89, 0xcc, 0xb4, 0x5e, 0x00, 0x1a,
451 0x03, 0xa8, 0x67, 0xb1, 0x87, 0xf2, 0x25, 0xdd,
452};
453
454/* Vector 6 */
455static const uint8_t ciph_data_aes_xts_vect6_key1[] = {
456 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
457 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
458};
459static const uint8_t ciph_data_aes_xts_vect6_key2[] = {
460 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
461 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
462};
463static const uint8_t ciph_data_aes_xts_vect6_iv[16] = {
464 0x02
465};
466static const uint8_t ciph_data_aes_xts_vect6_ptx[] = {
467 0x26, 0x4d, 0x3c, 0xa8, 0x51, 0x21, 0x94, 0xfe,
468 0xc3, 0x12, 0xc8, 0xc9, 0x89, 0x1f, 0x27, 0x9f,
469 0xef, 0xdd, 0x60, 0x8d, 0x0c, 0x02, 0x7b, 0x60,
470 0x48, 0x3a, 0x3f, 0xa8, 0x11, 0xd6, 0x5e, 0xe5,
471
472 0x9d, 0x52, 0xd9, 0xe4, 0x0e, 0xc5, 0x67, 0x2d,
473 0x81, 0x53, 0x2b, 0x38, 0xb6, 0xb0, 0x89, 0xce,
474 0x95, 0x1f, 0x0f, 0x9c, 0x35, 0x59, 0x0b, 0x8b,
475 0x97, 0x8d, 0x17, 0x52, 0x13, 0xf3, 0x29, 0xbb,
476
477 0x1c, 0x2f, 0xd3, 0x0f, 0x2f, 0x7f, 0x30, 0x49,
478 0x2a, 0x61, 0xa5, 0x32, 0xa7, 0x9f, 0x51, 0xd3,
479 0x6f, 0x5e, 0x31, 0xa7, 0xc9, 0xa1, 0x2c, 0x28,
480 0x60, 0x82, 0xff, 0x7d, 0x23, 0x94, 0xd1, 0x8f,
481
482 0x78, 0x3e, 0x1a, 0x8e, 0x72, 0xc7, 0x22, 0xca,
483 0xaa, 0xa5, 0x2d, 0x8f, 0x06, 0x56, 0x57, 0xd2,
484 0x63, 0x1f, 0xd2, 0x5b, 0xfd, 0x8e, 0x5b, 0xaa,
485 0xd6, 0xe5, 0x27, 0xd7, 0x63, 0x51, 0x75, 0x01,
486
487 0xc6, 0x8c, 0x5e, 0xdc, 0x3c, 0xdd, 0x55, 0x43,
488 0x5c, 0x53, 0x2d, 0x71, 0x25, 0xc8, 0x61, 0x4d,
489 0xee, 0xd9, 0xad, 0xaa, 0x3a, 0xca, 0xde, 0x58,
490 0x88, 0xb8, 0x7b, 0xef, 0x64, 0x1c, 0x4c, 0x99,
491
492 0x4c, 0x80, 0x91, 0xb5, 0xbc, 0xd3, 0x87, 0xf3,
493 0x96, 0x3f, 0xb5, 0xbc, 0x37, 0xaa, 0x92, 0x2f,
494 0xbf, 0xe3, 0xdf, 0x4e, 0x5b, 0x91, 0x5e, 0x6e,
495 0xb5, 0x14, 0x71, 0x7b, 0xdd, 0x2a, 0x74, 0x07,
496
497 0x9a, 0x50, 0x73, 0xf5, 0xc4, 0xbf, 0xd4, 0x6a,
498 0xdf, 0x7d, 0x28, 0x2e, 0x7a, 0x39, 0x3a, 0x52,
499 0x57, 0x9d, 0x11, 0xa0, 0x28, 0xda, 0x4d, 0x9c,
500 0xd9, 0xc7, 0x71, 0x24, 0xf9, 0x64, 0x8e, 0xe3,
501
502 0x83, 0xb1, 0xac, 0x76, 0x39, 0x30, 0xe7, 0x16,
503 0x2a, 0x8d, 0x37, 0xf3, 0x50, 0xb2, 0xf7, 0x4b,
504 0x84, 0x72, 0xcf, 0x09, 0x90, 0x20, 0x63, 0xc6,
505 0xb3, 0x2e, 0x8c, 0x2d, 0x92, 0x90, 0xce, 0xfb,
506
507 0xd7, 0x34, 0x6d, 0x1c, 0x77, 0x9a, 0x0d, 0xf5,
508 0x0e, 0xdc, 0xde, 0x45, 0x31, 0xda, 0x07, 0xb0,
509 0x99, 0xc6, 0x38, 0xe8, 0x3a, 0x75, 0x59, 0x44,
510 0xdf, 0x2a, 0xef, 0x1a, 0xa3, 0x17, 0x52, 0xfd,
511
512 0x32, 0x3d, 0xcb, 0x71, 0x0f, 0xb4, 0xbf, 0xbb,
513 0x9d, 0x22, 0xb9, 0x25, 0xbc, 0x35, 0x77, 0xe1,
514 0xb8, 0x94, 0x9e, 0x72, 0x9a, 0x90, 0xbb, 0xaf,
515 0xea, 0xcf, 0x7f, 0x78, 0x79, 0xe7, 0xb1, 0x14,
516
517 0x7e, 0x28, 0xba, 0x0b, 0xae, 0x94, 0x0d, 0xb7,
518 0x95, 0xa6, 0x1b, 0x15, 0xec, 0xf4, 0xdf, 0x8d,
519 0xb0, 0x7b, 0x82, 0x4b, 0xb0, 0x62, 0x80, 0x2c,
520 0xc9, 0x8a, 0x95, 0x45, 0xbb, 0x2a, 0xae, 0xed,
521
522 0x77, 0xcb, 0x3f, 0xc6, 0xdb, 0x15, 0xdc, 0xd7,
523 0xd8, 0x0d, 0x7d, 0x5b, 0xc4, 0x06, 0xc4, 0x97,
524 0x0a, 0x34, 0x78, 0xad, 0xa8, 0x89, 0x9b, 0x32,
525 0x91, 0x98, 0xeb, 0x61, 0xc1, 0x93, 0xfb, 0x62,
526
527 0x75, 0xaa, 0x8c, 0xa3, 0x40, 0x34, 0x4a, 0x75,
528 0xa8, 0x62, 0xae, 0xbe, 0x92, 0xee, 0xe1, 0xce,
529 0x03, 0x2f, 0xd9, 0x50, 0xb4, 0x7d, 0x77, 0x04,
530 0xa3, 0x87, 0x69, 0x23, 0xb4, 0xad, 0x62, 0x84,
531
532 0x4b, 0xf4, 0xa0, 0x9c, 0x4d, 0xbe, 0x8b, 0x43,
533 0x97, 0x18, 0x4b, 0x74, 0x71, 0x36, 0x0c, 0x95,
534 0x64, 0x88, 0x0a, 0xed, 0xdd, 0xb9, 0xba, 0xa4,
535 0xaf, 0x2e, 0x75, 0x39, 0x4b, 0x08, 0xcd, 0x32,
536
537 0xff, 0x47, 0x9c, 0x57, 0xa0, 0x7d, 0x3e, 0xab,
538 0x5d, 0x54, 0xde, 0x5f, 0x97, 0x38, 0xb8, 0xd2,
539 0x7f, 0x27, 0xa9, 0xf0, 0xab, 0x11, 0x79, 0x9d,
540 0x7b, 0x7f, 0xfe, 0xfb, 0x27, 0x04, 0xc9, 0x5c,
541
542 0x6a, 0xd1, 0x2c, 0x39, 0xf1, 0xe8, 0x67, 0xa4,
543 0xb7, 0xb1, 0xd7, 0x81, 0x8a, 0x4b, 0x75, 0x3d,
544 0xfd, 0x2a, 0x89, 0xcc, 0xb4, 0x5e, 0x00, 0x1a,
545 0x03, 0xa8, 0x67, 0xb1, 0x87, 0xf2, 0x25, 0xdd,
546};
547static const uint8_t ciph_data_aes_xts_vect6_ctx[] = {
548 0xfa, 0x76, 0x2a, 0x36, 0x80, 0xb7, 0x60, 0x07,
549 0x92, 0x8e, 0xd4, 0xa4, 0xf4, 0x9a, 0x94, 0x56,
550 0x03, 0x1b, 0x70, 0x47, 0x82, 0xe6, 0x5e, 0x16,
551 0xce, 0xcb, 0x54, 0xed, 0x7d, 0x01, 0x7b, 0x5e,
552
553 0x18, 0xab, 0xd6, 0x7b, 0x33, 0x8e, 0x81, 0x07,
554 0x8f, 0x21, 0xed, 0xb7, 0x86, 0x8d, 0x90, 0x1e,
555 0xbe, 0x9c, 0x73, 0x1a, 0x7c, 0x18, 0xb5, 0xe6,
556 0xde, 0xc1, 0xd6, 0xa7, 0x2e, 0x07, 0x8a, 0xc9,
557
558 0xa4, 0x26, 0x2f, 0x86, 0x0b, 0xee, 0xfa, 0x14,
559 0xf4, 0xe8, 0x21, 0x01, 0x82, 0x72, 0xe4, 0x11,
560 0xa9, 0x51, 0x50, 0x2b, 0x6e, 0x79, 0x06, 0x6e,
561 0x84, 0x25, 0x2c, 0x33, 0x46, 0xf3, 0xaa, 0x62,
562
563 0x34, 0x43, 0x51, 0xa2, 0x91, 0xd4, 0xbe, 0xdc,
564 0x7a, 0x07, 0x61, 0x8b, 0xde, 0xa2, 0xaf, 0x63,
565 0x14, 0x5c, 0xc7, 0xa4, 0xb8, 0xd4, 0x07, 0x06,
566 0x91, 0xae, 0x89, 0x0c, 0xd6, 0x57, 0x33, 0xe7,
567
568 0x94, 0x6e, 0x90, 0x21, 0xa1, 0xdf, 0xfc, 0x4c,
569 0x59, 0xf1, 0x59, 0x42, 0x5e, 0xe6, 0xd5, 0x0c,
570 0xa9, 0xb1, 0x35, 0xfa, 0x61, 0x62, 0xce, 0xa1,
571 0x8a, 0x93, 0x98, 0x38, 0xdc, 0x00, 0x0f, 0xb3,
572
573 0x86, 0xfa, 0xd0, 0x86, 0xac, 0xce, 0x5a, 0xc0,
574 0x7c, 0xb2, 0xec, 0xe7, 0xfd, 0x58, 0x0b, 0x00,
575 0xcf, 0xa5, 0xe9, 0x85, 0x89, 0x63, 0x1d, 0xc2,
576 0x5e, 0x8e, 0x2a, 0x3d, 0xaf, 0x2f, 0xfd, 0xec,
577
578 0x26, 0x53, 0x16, 0x59, 0x91, 0x2c, 0x9d, 0x8f,
579 0x7a, 0x15, 0xe5, 0x86, 0x5e, 0xa8, 0xfb, 0x58,
580 0x16, 0xd6, 0x20, 0x70, 0x52, 0xbd, 0x71, 0x28,
581 0xcd, 0x74, 0x3c, 0x12, 0xc8, 0x11, 0x87, 0x91,
582
583 0xa4, 0x73, 0x68, 0x11, 0x93, 0x5e, 0xb9, 0x82,
584 0xa5, 0x32, 0x34, 0x9e, 0x31, 0xdd, 0x40, 0x1e,
585 0x0b, 0x66, 0x0a, 0x56, 0x8c, 0xb1, 0xa4, 0x71,
586 0x1f, 0x55, 0x2f, 0x55, 0xde, 0xd5, 0x9f, 0x1f,
587
588 0x15, 0xbf, 0x71, 0x96, 0xb3, 0xca, 0x12, 0xa9,
589 0x1e, 0x48, 0x8e, 0xf5, 0x9d, 0x64, 0xf3, 0xa0,
590 0x2b, 0xf4, 0x52, 0x39, 0x49, 0x9a, 0xc6, 0x17,
591 0x6a, 0xe3, 0x21, 0xc4, 0xa2, 0x11, 0xec, 0x54,
592
593 0x53, 0x65, 0x97, 0x1c, 0x5d, 0x3f, 0x4f, 0x09,
594 0xd4, 0xeb, 0x13, 0x9b, 0xfd, 0xf2, 0x07, 0x3d,
595 0x33, 0x18, 0x0b, 0x21, 0x00, 0x2b, 0x65, 0xcc,
596 0x98, 0x65, 0xe7, 0x6c, 0xb2, 0x4c, 0xd9, 0x2c,
597
598 0x87, 0x4c, 0x24, 0xc1, 0x83, 0x50, 0x39, 0x9a,
599 0x93, 0x6a, 0xb3, 0x63, 0x70, 0x79, 0x29, 0x5d,
600 0x76, 0xc4, 0x17, 0x77, 0x6b, 0x94, 0xef, 0xce,
601 0x3a, 0x0e, 0xf7, 0x20, 0x6b, 0x15, 0x11, 0x05,
602
603 0x19, 0x65, 0x5c, 0x95, 0x6c, 0xbd, 0x8b, 0x24,
604 0x89, 0x40, 0x5e, 0xe2, 0xb0, 0x9a, 0x6b, 0x6e,
605 0xeb, 0xe0, 0xc5, 0x37, 0x90, 0xa1, 0x2a, 0x89,
606 0x98, 0x37, 0x8b, 0x33, 0xa5, 0xb7, 0x11, 0x59,
607
608 0x62, 0x5f, 0x4b, 0xa4, 0x9d, 0x2a, 0x2f, 0xdb,
609 0xa5, 0x9f, 0xbf, 0x08, 0x97, 0xbc, 0x7a, 0xab,
610 0xd8, 0xd7, 0x07, 0xdc, 0x14, 0x0a, 0x80, 0xf0,
611 0xf3, 0x09, 0xf8, 0x35, 0xd3, 0xda, 0x54, 0xab,
612
613 0x58, 0x4e, 0x50, 0x1d, 0xfa, 0x0e, 0xe9, 0x77,
614 0xfe, 0xc5, 0x43, 0xf7, 0x41, 0x86, 0xa8, 0x02,
615 0xb9, 0xa3, 0x7a, 0xdb, 0x3e, 0x82, 0x91, 0xec,
616 0xa0, 0x4d, 0x66, 0x52, 0x0d, 0x22, 0x9e, 0x60,
617
618 0x40, 0x1e, 0x72, 0x82, 0xbe, 0xf4, 0x86, 0xae,
619 0x05, 0x9a, 0xa7, 0x06, 0x96, 0xe0, 0xe3, 0x05,
620 0xd7, 0x77, 0x14, 0x0a, 0x7a, 0x88, 0x3e, 0xcd,
621 0xcb, 0x69, 0xb9, 0xff, 0x93, 0x8e, 0x8a, 0x42,
622
623 0x31, 0x86, 0x4c, 0x69, 0xca, 0x2c, 0x20, 0x43,
624 0xbe, 0xd0, 0x07, 0xff, 0x3e, 0x60, 0x5e, 0x01,
625 0x4b, 0xcf, 0x51, 0x81, 0x38, 0xdc, 0x3a, 0x25,
626 0xc5, 0xe2, 0x36, 0x17, 0x1a, 0x2d, 0x01, 0xd6,
627};
628
629/* Vector 7 */
630static const uint8_t ciph_data_aes_xts_vect7_key1[] = {
631 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
632 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
633};
634static const uint8_t ciph_data_aes_xts_vect7_key2[] = {
635 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
636 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
637};
638static const uint8_t ciph_data_aes_xts_vect7_iv[16] = {
639 0xfd
640};
641static const uint8_t ciph_data_aes_xts_vect7_ptx[] = {
642 0x8e, 0x41, 0xb7, 0x8c, 0x39, 0x0b, 0x5a, 0xf9,
643 0xd7, 0x58, 0xbb, 0x21, 0x4a, 0x67, 0xe9, 0xf6,
644 0xbf, 0x77, 0x27, 0xb0, 0x9a, 0xc6, 0x12, 0x40,
645 0x84, 0xc3, 0x76, 0x11, 0x39, 0x8f, 0xa4, 0x5d,
646
647 0xaa, 0xd9, 0x48, 0x68, 0x60, 0x0e, 0xd3, 0x91,
648 0xfb, 0x1a, 0xcd, 0x48, 0x57, 0xa9, 0x5b, 0x46,
649 0x6e, 0x62, 0xef, 0x9f, 0x4b, 0x37, 0x72, 0x44,
650 0xd1, 0xc1, 0x52, 0xe7, 0xb3, 0x0d, 0x73, 0x1a,
651
652 0xad, 0x30, 0xc7, 0x16, 0xd2, 0x14, 0xb7, 0x07,
653 0xae, 0xd9, 0x9e, 0xb5, 0xb5, 0xe5, 0x80, 0xb3,
654 0xe8, 0x87, 0xcf, 0x74, 0x97, 0x46, 0x56, 0x51,
655 0xd4, 0xb6, 0x0e, 0x60, 0x42, 0x05, 0x1d, 0xa3,
656
657 0x69, 0x3c, 0x3b, 0x78, 0xc1, 0x44, 0x89, 0x54,
658 0x3b, 0xe8, 0xb6, 0xad, 0x0b, 0xa6, 0x29, 0x56,
659 0x5b, 0xba, 0x20, 0x23, 0x13, 0xba, 0x7b, 0x0d,
660 0x0c, 0x94, 0xa3, 0x25, 0x2b, 0x67, 0x6f, 0x46,
661
662 0xcc, 0x02, 0xce, 0x0f, 0x8a, 0x7d, 0x34, 0xc0,
663 0xed, 0x22, 0x91, 0x29, 0x67, 0x3c, 0x1f, 0x61,
664 0xae, 0xd5, 0x79, 0xd0, 0x8a, 0x92, 0x03, 0xa2,
665 0x5a, 0xac, 0x3a, 0x77, 0xe9, 0xdb, 0x60, 0x26,
666
667 0x79, 0x96, 0xdb, 0x38, 0xdf, 0x63, 0x73, 0x56,
668 0xd9, 0xdc, 0xd1, 0x63, 0x2e, 0x36, 0x99, 0x39,
669 0xf2, 0xa2, 0x9d, 0x89, 0x34, 0x5c, 0x66, 0xe0,
670 0x50, 0x66, 0xf1, 0xa3, 0x67, 0x7a, 0xef, 0x18,
671
672 0xde, 0xa4, 0x11, 0x3f, 0xae, 0xb6, 0x29, 0xe4,
673 0x67, 0x21, 0xa6, 0x6d, 0x0a, 0x7e, 0x78, 0x5d,
674 0x3e, 0x29, 0xaf, 0x25, 0x94, 0xeb, 0x67, 0xdf,
675 0xa9, 0x82, 0xaf, 0xfe, 0x0a, 0xac, 0x05, 0x8f,
676
677 0x6e, 0x15, 0x86, 0x42, 0x69, 0xb1, 0x35, 0x41,
678 0x82, 0x61, 0xfc, 0x3a, 0xfb, 0x08, 0x94, 0x72,
679 0xcf, 0x68, 0xc4, 0x5d, 0xd7, 0xf2, 0x31, 0xc6,
680 0x24, 0x9b, 0xa0, 0x25, 0x5e, 0x1e, 0x03, 0x38,
681
682 0x33, 0xfc, 0x4d, 0x00, 0xa3, 0xfe, 0x02, 0x13,
683 0x2d, 0x7b, 0xc3, 0x87, 0x36, 0x14, 0xb8, 0xae,
684 0xe3, 0x42, 0x73, 0x58, 0x1e, 0xa0, 0x32, 0x5c,
685 0x81, 0xf0, 0x27, 0x0a, 0xff, 0xa1, 0x36, 0x41,
686
687 0xd0, 0x52, 0xd3, 0x6f, 0x07, 0x57, 0xd4, 0x84,
688 0x01, 0x43, 0x54, 0xd0, 0x2d, 0x68, 0x83, 0xca,
689 0x15, 0xc2, 0x4d, 0x8c, 0x39, 0x56, 0xb1, 0xbd,
690 0x02, 0x7b, 0xcf, 0x41, 0xf1, 0x51, 0xfd, 0x80,
691
692 0x23, 0xc5, 0x34, 0x0e, 0x56, 0x06, 0xf3, 0x7e,
693 0x90, 0xfd, 0xb8, 0x7c, 0x86, 0xfb, 0x4f, 0xa6,
694 0x34, 0xb3, 0x71, 0x8a, 0x30, 0xba, 0xce, 0x06,
695 0xa6, 0x6e, 0xaf, 0x8f, 0x63, 0xc4, 0xaa, 0x3b,
696
697 0x63, 0x78, 0x26, 0xa8, 0x7f, 0xe8, 0xcf, 0xa4,
698 0x42, 0x82, 0xe9, 0x2c, 0xb1, 0x61, 0x5a, 0xf3,
699 0xa2, 0x8e, 0x53, 0xbc, 0x74, 0xc7, 0xcb, 0xa1,
700 0xa0, 0x97, 0x7b, 0xe9, 0x06, 0x5d, 0x0c, 0x1a,
701
702 0x5d, 0xec, 0x6c, 0x54, 0xae, 0x38, 0xd3, 0x7f,
703 0x37, 0xaa, 0x35, 0x28, 0x3e, 0x04, 0x8e, 0x55,
704 0x30, 0xa8, 0x5c, 0x4e, 0x7a, 0x29, 0xd7, 0xb9,
705 0x2e, 0xc0, 0xc3, 0x16, 0x9c, 0xdf, 0x2a, 0x80,
706
707 0x5c, 0x76, 0x04, 0xbc, 0xe6, 0x00, 0x49, 0xb9,
708 0xfb, 0x7b, 0x8e, 0xaa, 0xc1, 0x0f, 0x51, 0xae,
709 0x23, 0x79, 0x4c, 0xeb, 0xa6, 0x8b, 0xb5, 0x81,
710 0x12, 0xe2, 0x93, 0xb9, 0xb6, 0x92, 0xca, 0x72,
711
712 0x1b, 0x37, 0xc6, 0x62, 0xf8, 0x57, 0x4e, 0xd4,
713 0xdb, 0xa6, 0xf8, 0x8e, 0x17, 0x08, 0x81, 0xc8,
714 0x2c, 0xdd, 0xc1, 0x03, 0x4a, 0x0c, 0xa7, 0xe2,
715 0x84, 0xbf, 0x09, 0x62, 0xb6, 0xb2, 0x62, 0x92,
716
717 0xd8, 0x36, 0xfa, 0x9f, 0x73, 0xc1, 0xac, 0x77,
718 0x0e, 0xef, 0x0f, 0x2d, 0x3a, 0x1e, 0xaf, 0x61,
719 0xd3, 0xe0, 0x35, 0x55, 0xfd, 0x42, 0x4e, 0xed,
720 0xd6, 0x7e, 0x18, 0xa1, 0x80, 0x94, 0xf8, 0x88,
721};
722static const uint8_t ciph_data_aes_xts_vect7_ctx[] = {
723 0xd5, 0x5f, 0x68, 0x4f, 0x81, 0xf4, 0x42, 0x6e,
724 0x9f, 0xde, 0x92, 0xa5, 0xff, 0x02, 0xdf, 0x2a,
725 0xc8, 0x96, 0xaf, 0x63, 0x96, 0x28, 0x88, 0xa9,
726 0x79, 0x10, 0xc1, 0x37, 0x9e, 0x20, 0xb0, 0xa3,
727
728 0xb1, 0xdb, 0x61, 0x3f, 0xb7, 0xfe, 0x2e, 0x07,
729 0x00, 0x43, 0x29, 0xea, 0x5c, 0x22, 0xbf, 0xd3,
730 0x3e, 0x3d, 0xbe, 0x4c, 0xf5, 0x8c, 0xc6, 0x08,
731 0xc2, 0xc2, 0x6c, 0x19, 0xa2, 0xe2, 0xfe, 0x22,
732
733 0xf9, 0x87, 0x32, 0xc2, 0xb5, 0xcb, 0x84, 0x4c,
734 0xc6, 0xc0, 0x70, 0x2d, 0x91, 0xe1, 0xd5, 0x0f,
735 0xc4, 0x38, 0x2a, 0x7e, 0xba, 0x56, 0x35, 0xcd,
736 0x60, 0x24, 0x32, 0xa2, 0x30, 0x6a, 0xc4, 0xce,
737
738 0x82, 0xf8, 0xd7, 0x0c, 0x8d, 0x9b, 0xc1, 0x5f,
739 0x91, 0x8f, 0xe7, 0x1e, 0x74, 0xc6, 0x22, 0xd5,
740 0xcf, 0x71, 0x17, 0x8b, 0xf6, 0xe0, 0xb9, 0xcc,
741 0x9f, 0x2b, 0x41, 0xdd, 0x8d, 0xbe, 0x44, 0x1c,
742
743 0x41, 0xcd, 0x0c, 0x73, 0xa6, 0xdc, 0x47, 0xa3,
744 0x48, 0xf6, 0x70, 0x2f, 0x9d, 0x0e, 0x9b, 0x1b,
745 0x14, 0x31, 0xe9, 0x48, 0xe2, 0x99, 0xb9, 0xec,
746 0x22, 0x72, 0xab, 0x2c, 0x5f, 0x0c, 0x7b, 0xe8,
747
748 0x6a, 0xff, 0xa5, 0xde, 0xc8, 0x7a, 0x0b, 0xee,
749 0x81, 0xd3, 0xd5, 0x00, 0x07, 0xed, 0xaa, 0x2b,
750 0xcf, 0xcc, 0xb3, 0x56, 0x05, 0x15, 0x5f, 0xf3,
751 0x6e, 0xd8, 0xed, 0xd4, 0xa4, 0x0d, 0xcd, 0x4b,
752
753 0x24, 0x3a, 0xcd, 0x11, 0xb2, 0xb9, 0x87, 0xbd,
754 0xbf, 0xaf, 0x91, 0xa7, 0xca, 0xc2, 0x7e, 0x9c,
755 0x5a, 0xea, 0x52, 0x5e, 0xe5, 0x3d, 0xe7, 0xb2,
756 0xd3, 0x33, 0x2c, 0x86, 0x44, 0x40, 0x2b, 0x82,
757
758 0x3e, 0x94, 0xa7, 0xdb, 0x26, 0x27, 0x6d, 0x2d,
759 0x23, 0xaa, 0x07, 0x18, 0x0f, 0x76, 0xb4, 0xfd,
760 0x29, 0xb9, 0xc0, 0x82, 0x30, 0x99, 0xc9, 0xd6,
761 0x2c, 0x51, 0x98, 0x80, 0xae, 0xe7, 0xe9, 0x69,
762
763 0x76, 0x17, 0xc1, 0x49, 0x7d, 0x47, 0xbf, 0x3e,
764 0x57, 0x19, 0x50, 0x31, 0x14, 0x21, 0xb6, 0xb7,
765 0x34, 0xd3, 0x8b, 0x0d, 0xb9, 0x1e, 0xb8, 0x53,
766 0x31, 0xb9, 0x1e, 0xa9, 0xf6, 0x15, 0x30, 0xf5,
767
768 0x45, 0x12, 0xa5, 0xa5, 0x2a, 0x4b, 0xad, 0x58,
769 0x9e, 0xb6, 0x97, 0x81, 0xd5, 0x37, 0xf2, 0x32,
770 0x97, 0xbb, 0x45, 0x9b, 0xda, 0xd2, 0x94, 0x8a,
771 0x29, 0xe1, 0x55, 0x0b, 0xf4, 0x78, 0x7e, 0x0b,
772
773 0xe9, 0x5b, 0xb1, 0x73, 0xcf, 0x5f, 0xab, 0x17,
774 0xda, 0xb7, 0xa1, 0x3a, 0x05, 0x2a, 0x63, 0x45,
775 0x3d, 0x97, 0xcc, 0xec, 0x1a, 0x32, 0x19, 0x54,
776 0x88, 0x6b, 0x7a, 0x12, 0x99, 0xfa, 0xae, 0xec,
777
778 0xae, 0x35, 0xc6, 0xea, 0xac, 0xa7, 0x53, 0xb0,
779 0x41, 0xb5, 0xe5, 0xf0, 0x93, 0xbf, 0x83, 0x39,
780 0x7f, 0xd2, 0x1d, 0xd6, 0xb3, 0x01, 0x20, 0x66,
781 0xfc, 0xc0, 0x58, 0xcc, 0x32, 0xc3, 0xb0, 0x9d,
782
783 0x75, 0x62, 0xde, 0xe2, 0x95, 0x09, 0xb5, 0x83,
784 0x93, 0x92, 0xc9, 0xff, 0x05, 0xf5, 0x1f, 0x31,
785 0x66, 0xaa, 0xac, 0x4a, 0xc5, 0xf2, 0x38, 0x03,
786 0x8a, 0x30, 0x45, 0xe6, 0xf7, 0x2e, 0x48, 0xef,
787
788 0x0f, 0xe8, 0xbc, 0x67, 0x5e, 0x82, 0xc3, 0x18,
789 0xa2, 0x68, 0xe4, 0x39, 0x70, 0x27, 0x1b, 0xf1,
790 0x19, 0xb8, 0x1b, 0xf6, 0xa9, 0x82, 0x74, 0x65,
791 0x54, 0xf8, 0x4e, 0x72, 0xb9, 0xf0, 0x02, 0x80,
792
793 0xa3, 0x20, 0xa0, 0x81, 0x42, 0x92, 0x3c, 0x23,
794 0xc8, 0x83, 0x42, 0x3f, 0xf9, 0x49, 0x82, 0x7f,
795 0x29, 0xbb, 0xac, 0xdc, 0x1c, 0xcd, 0xb0, 0x49,
796 0x38, 0xce, 0x60, 0x98, 0xc9, 0x5b, 0xa6, 0xb3,
797
798 0x25, 0x28, 0xf4, 0xef, 0x78, 0xee, 0xd7, 0x78,
799 0xb2, 0xe1, 0x22, 0xdd, 0xfd, 0x1c, 0xbd, 0xd1,
800 0x1d, 0x1c, 0x0a, 0x67, 0x83, 0xe0, 0x11, 0xfc,
801 0x53, 0x6d, 0x63, 0xd0, 0x53, 0x26, 0x06, 0x37,
802};
803
804/* Vector 8 */
805static const uint8_t ciph_data_aes_xts_vect8_key1[] = {
806 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
807 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
808};
809static const uint8_t ciph_data_aes_xts_vect8_key2[] = {
810 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
811 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
812};
813static const uint8_t ciph_data_aes_xts_vect8_iv[16] = {
814 0xfe
815};
816static const uint8_t ciph_data_aes_xts_vect8_ptx[] = {
817 0xd5, 0x5f, 0x68, 0x4f, 0x81, 0xf4, 0x42, 0x6e,
818 0x9f, 0xde, 0x92, 0xa5, 0xff, 0x02, 0xdf, 0x2a,
819 0xc8, 0x96, 0xaf, 0x63, 0x96, 0x28, 0x88, 0xa9,
820 0x79, 0x10, 0xc1, 0x37, 0x9e, 0x20, 0xb0, 0xa3,
821
822 0xb1, 0xdb, 0x61, 0x3f, 0xb7, 0xfe, 0x2e, 0x07,
823 0x00, 0x43, 0x29, 0xea, 0x5c, 0x22, 0xbf, 0xd3,
824 0x3e, 0x3d, 0xbe, 0x4c, 0xf5, 0x8c, 0xc6, 0x08,
825 0xc2, 0xc2, 0x6c, 0x19, 0xa2, 0xe2, 0xfe, 0x22,
826
827 0xf9, 0x87, 0x32, 0xc2, 0xb5, 0xcb, 0x84, 0x4c,
828 0xc6, 0xc0, 0x70, 0x2d, 0x91, 0xe1, 0xd5, 0x0f,
829 0xc4, 0x38, 0x2a, 0x7e, 0xba, 0x56, 0x35, 0xcd,
830 0x60, 0x24, 0x32, 0xa2, 0x30, 0x6a, 0xc4, 0xce,
831
832 0x82, 0xf8, 0xd7, 0x0c, 0x8d, 0x9b, 0xc1, 0x5f,
833 0x91, 0x8f, 0xe7, 0x1e, 0x74, 0xc6, 0x22, 0xd5,
834 0xcf, 0x71, 0x17, 0x8b, 0xf6, 0xe0, 0xb9, 0xcc,
835 0x9f, 0x2b, 0x41, 0xdd, 0x8d, 0xbe, 0x44, 0x1c,
836
837 0x41, 0xcd, 0x0c, 0x73, 0xa6, 0xdc, 0x47, 0xa3,
838 0x48, 0xf6, 0x70, 0x2f, 0x9d, 0x0e, 0x9b, 0x1b,
839 0x14, 0x31, 0xe9, 0x48, 0xe2, 0x99, 0xb9, 0xec,
840 0x22, 0x72, 0xab, 0x2c, 0x5f, 0x0c, 0x7b, 0xe8,
841
842 0x6a, 0xff, 0xa5, 0xde, 0xc8, 0x7a, 0x0b, 0xee,
843 0x81, 0xd3, 0xd5, 0x00, 0x07, 0xed, 0xaa, 0x2b,
844 0xcf, 0xcc, 0xb3, 0x56, 0x05, 0x15, 0x5f, 0xf3,
845 0x6e, 0xd8, 0xed, 0xd4, 0xa4, 0x0d, 0xcd, 0x4b,
846
847 0x24, 0x3a, 0xcd, 0x11, 0xb2, 0xb9, 0x87, 0xbd,
848 0xbf, 0xaf, 0x91, 0xa7, 0xca, 0xc2, 0x7e, 0x9c,
849 0x5a, 0xea, 0x52, 0x5e, 0xe5, 0x3d, 0xe7, 0xb2,
850 0xd3, 0x33, 0x2c, 0x86, 0x44, 0x40, 0x2b, 0x82,
851
852 0x3e, 0x94, 0xa7, 0xdb, 0x26, 0x27, 0x6d, 0x2d,
853 0x23, 0xaa, 0x07, 0x18, 0x0f, 0x76, 0xb4, 0xfd,
854 0x29, 0xb9, 0xc0, 0x82, 0x30, 0x99, 0xc9, 0xd6,
855 0x2c, 0x51, 0x98, 0x80, 0xae, 0xe7, 0xe9, 0x69,
856
857 0x76, 0x17, 0xc1, 0x49, 0x7d, 0x47, 0xbf, 0x3e,
858 0x57, 0x19, 0x50, 0x31, 0x14, 0x21, 0xb6, 0xb7,
859 0x34, 0xd3, 0x8b, 0x0d, 0xb9, 0x1e, 0xb8, 0x53,
860 0x31, 0xb9, 0x1e, 0xa9, 0xf6, 0x15, 0x30, 0xf5,
861
862 0x45, 0x12, 0xa5, 0xa5, 0x2a, 0x4b, 0xad, 0x58,
863 0x9e, 0xb6, 0x97, 0x81, 0xd5, 0x37, 0xf2, 0x32,
864 0x97, 0xbb, 0x45, 0x9b, 0xda, 0xd2, 0x94, 0x8a,
865 0x29, 0xe1, 0x55, 0x0b, 0xf4, 0x78, 0x7e, 0x0b,
866
867 0xe9, 0x5b, 0xb1, 0x73, 0xcf, 0x5f, 0xab, 0x17,
868 0xda, 0xb7, 0xa1, 0x3a, 0x05, 0x2a, 0x63, 0x45,
869 0x3d, 0x97, 0xcc, 0xec, 0x1a, 0x32, 0x19, 0x54,
870 0x88, 0x6b, 0x7a, 0x12, 0x99, 0xfa, 0xae, 0xec,
871
872 0xae, 0x35, 0xc6, 0xea, 0xac, 0xa7, 0x53, 0xb0,
873 0x41, 0xb5, 0xe5, 0xf0, 0x93, 0xbf, 0x83, 0x39,
874 0x7f, 0xd2, 0x1d, 0xd6, 0xb3, 0x01, 0x20, 0x66,
875 0xfc, 0xc0, 0x58, 0xcc, 0x32, 0xc3, 0xb0, 0x9d,
876
877 0x75, 0x62, 0xde, 0xe2, 0x95, 0x09, 0xb5, 0x83,
878 0x93, 0x92, 0xc9, 0xff, 0x05, 0xf5, 0x1f, 0x31,
879 0x66, 0xaa, 0xac, 0x4a, 0xc5, 0xf2, 0x38, 0x03,
880 0x8a, 0x30, 0x45, 0xe6, 0xf7, 0x2e, 0x48, 0xef,
881
882 0x0f, 0xe8, 0xbc, 0x67, 0x5e, 0x82, 0xc3, 0x18,
883 0xa2, 0x68, 0xe4, 0x39, 0x70, 0x27, 0x1b, 0xf1,
884 0x19, 0xb8, 0x1b, 0xf6, 0xa9, 0x82, 0x74, 0x65,
885 0x54, 0xf8, 0x4e, 0x72, 0xb9, 0xf0, 0x02, 0x80,
886
887 0xa3, 0x20, 0xa0, 0x81, 0x42, 0x92, 0x3c, 0x23,
888 0xc8, 0x83, 0x42, 0x3f, 0xf9, 0x49, 0x82, 0x7f,
889 0x29, 0xbb, 0xac, 0xdc, 0x1c, 0xcd, 0xb0, 0x49,
890 0x38, 0xce, 0x60, 0x98, 0xc9, 0x5b, 0xa6, 0xb3,
891
892 0x25, 0x28, 0xf4, 0xef, 0x78, 0xee, 0xd7, 0x78,
893 0xb2, 0xe1, 0x22, 0xdd, 0xfd, 0x1c, 0xbd, 0xd1,
894 0x1d, 0x1c, 0x0a, 0x67, 0x83, 0xe0, 0x11, 0xfc,
895 0x53, 0x6d, 0x63, 0xd0, 0x53, 0x26, 0x06, 0x37,
896};
897static const uint8_t ciph_data_aes_xts_vect8_ctx[] = {
898 0x72, 0xef, 0xc1, 0xeb, 0xfe, 0x1e, 0xe2, 0x59,
899 0x75, 0xa6, 0xeb, 0x3a, 0xa8, 0x58, 0x9d, 0xda,
900 0x2b, 0x26, 0x1f, 0x1c, 0x85, 0xbd, 0xab, 0x44,
901 0x2a, 0x9e, 0x5b, 0x2d, 0xd1, 0xd7, 0xc3, 0x95,
902
903 0x7a, 0x16, 0xfc, 0x08, 0xe5, 0x26, 0xd4, 0xb1,
904 0x22, 0x3f, 0x1b, 0x12, 0x32, 0xa1, 0x1a, 0xf2,
905 0x74, 0xc3, 0xd7, 0x0d, 0xac, 0x57, 0xf8, 0x3e,
906 0x09, 0x83, 0xc4, 0x98, 0xf1, 0xa6, 0xf1, 0xae,
907
908 0xcb, 0x02, 0x1c, 0x3e, 0x70, 0x08, 0x5a, 0x1e,
909 0x52, 0x7f, 0x1c, 0xe4, 0x1e, 0xe5, 0x91, 0x1a,
910 0x82, 0x02, 0x01, 0x61, 0x52, 0x9c, 0xd8, 0x27,
911 0x73, 0x76, 0x2d, 0xaf, 0x54, 0x59, 0xde, 0x94,
912
913 0xa0, 0xa8, 0x2a, 0xda, 0xe7, 0xe1, 0x70, 0x3c,
914 0x80, 0x85, 0x43, 0xc2, 0x9e, 0xd6, 0xfb, 0x32,
915 0xd9, 0xe0, 0x04, 0x32, 0x7c, 0x13, 0x55, 0x18,
916 0x0c, 0x99, 0x5a, 0x07, 0x74, 0x14, 0x93, 0xa0,
917
918 0x9c, 0x21, 0xba, 0x01, 0xa3, 0x87, 0x88, 0x2d,
919 0xa4, 0xf6, 0x25, 0x34, 0xb8, 0x7b, 0xb1, 0x5d,
920 0x60, 0xd1, 0x97, 0x20, 0x1c, 0x0f, 0xd3, 0xbf,
921 0x30, 0xc1, 0x50, 0x0a, 0x3e, 0xcf, 0xec, 0xdd,
922
923 0x66, 0xd8, 0x72, 0x1f, 0x90, 0xbc, 0xc4, 0xc1,
924 0x7e, 0xe9, 0x25, 0xc6, 0x1b, 0x0a, 0x03, 0x72,
925 0x7a, 0x9c, 0x0d, 0x5f, 0x5c, 0xa4, 0x62, 0xfb,
926 0xfa, 0x0a, 0xf1, 0xc2, 0x51, 0x3a, 0x9d, 0x9d,
927
928 0x4b, 0x53, 0x45, 0xbd, 0x27, 0xa5, 0xf6, 0xe6,
929 0x53, 0xf7, 0x51, 0x69, 0x3e, 0x6b, 0x6a, 0x2b,
930 0x8e, 0xad, 0x57, 0xd5, 0x11, 0xe0, 0x0e, 0x58,
931 0xc4, 0x5b, 0x7b, 0x8d, 0x00, 0x5a, 0xf7, 0x92,
932
933 0x88, 0xf5, 0xc7, 0xc2, 0x2f, 0xd4, 0xf1, 0xbf,
934 0x7a, 0x89, 0x8b, 0x03, 0xa5, 0x63, 0x4c, 0x6a,
935 0x1a, 0xe3, 0xf9, 0xfa, 0xe5, 0xde, 0x4f, 0x29,
936 0x6a, 0x28, 0x96, 0xb2, 0x3e, 0x7e, 0xd4, 0x3e,
937
938 0xd1, 0x4f, 0xa5, 0xa2, 0x80, 0x3f, 0x4d, 0x28,
939 0xf0, 0xd3, 0xff, 0xcf, 0x24, 0x75, 0x76, 0x77,
940 0xae, 0xbd, 0xb4, 0x7b, 0xb3, 0x88, 0x37, 0x87,
941 0x08, 0x94, 0x8a, 0x8d, 0x41, 0x26, 0xed, 0x18,
942
943 0x39, 0xe0, 0xda, 0x29, 0xa5, 0x37, 0xa8, 0xc1,
944 0x98, 0xb3, 0xc6, 0x6a, 0xb0, 0x07, 0x12, 0xdd,
945 0x26, 0x16, 0x74, 0xbf, 0x45, 0xa7, 0x3d, 0x67,
946 0xf7, 0x69, 0x14, 0xf8, 0x30, 0xca, 0x01, 0x4b,
947
948 0x65, 0x59, 0x6f, 0x27, 0xe4, 0xcf, 0x62, 0xde,
949 0x66, 0x12, 0x5a, 0x55, 0x66, 0xdf, 0x99, 0x75,
950 0x15, 0x56, 0x28, 0xb4, 0x00, 0xfb, 0xfb, 0x3a,
951 0x29, 0x04, 0x0e, 0xd5, 0x0f, 0xaf, 0xfd, 0xbb,
952
953 0x18, 0xae, 0xce, 0x7c, 0x5c, 0x44, 0x69, 0x32,
954 0x60, 0xaa, 0xb3, 0x86, 0xc0, 0xa3, 0x7b, 0x11,
955 0xb1, 0x14, 0xf1, 0xc4, 0x15, 0xae, 0xbb, 0x65,
956 0x3b, 0xe4, 0x68, 0x17, 0x94, 0x28, 0xd4, 0x3a,
957
958 0x4d, 0x8b, 0xc3, 0xec, 0x38, 0x81, 0x3e, 0xca,
959 0x30, 0xa1, 0x3c, 0xf1, 0xbb, 0x18, 0xd5, 0x24,
960 0xf1, 0x99, 0x2d, 0x44, 0xd8, 0xb1, 0xa4, 0x2e,
961 0xa3, 0x0b, 0x22, 0xe6, 0xc9, 0x5b, 0x19, 0x9d,
962
963 0x8d, 0x18, 0x2f, 0x88, 0x40, 0xb0, 0x9d, 0x05,
964 0x95, 0x85, 0xc3, 0x1a, 0xd6, 0x91, 0xfa, 0x06,
965 0x19, 0xff, 0x03, 0x8a, 0xca, 0x2c, 0x39, 0xa9,
966 0x43, 0x42, 0x11, 0x57, 0x36, 0x17, 0x17, 0xc4,
967
968 0x9d, 0x32, 0x20, 0x28, 0xa7, 0x46, 0x48, 0x11,
969 0x3b, 0xd8, 0xc9, 0xd7, 0xec, 0x77, 0xcf, 0x3c,
970 0x89, 0xc1, 0xec, 0x87, 0x18, 0xce, 0xff, 0x85,
971 0x16, 0xd9, 0x6b, 0x34, 0xc3, 0xc6, 0x14, 0xf1,
972
973 0x06, 0x99, 0xc9, 0xab, 0xc4, 0xed, 0x04, 0x11,
974 0x50, 0x62, 0x23, 0xbe, 0xa1, 0x6a, 0xf3, 0x5c,
975 0x88, 0x3a, 0xcc, 0xdb, 0xe1, 0x10, 0x4e, 0xef,
976 0x0c, 0xfd, 0xb5, 0x4e, 0x12, 0xfb, 0x23, 0x0a,
977};
978
979/* Vector 9 */
980static const uint8_t ciph_data_aes_xts_vect9_key1[] = {
981 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
982 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
983};
984static const uint8_t ciph_data_aes_xts_vect9_key2[] = {
985 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
986 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
987};
988static const uint8_t ciph_data_aes_xts_vect9_iv[16] = {
989 0xff
990};
991static const uint8_t ciph_data_aes_xts_vect9_ptx[] = {
992 0x72, 0xef, 0xc1, 0xeb, 0xfe, 0x1e, 0xe2, 0x59,
993 0x75, 0xa6, 0xeb, 0x3a, 0xa8, 0x58, 0x9d, 0xda,
994 0x2b, 0x26, 0x1f, 0x1c, 0x85, 0xbd, 0xab, 0x44,
995 0x2a, 0x9e, 0x5b, 0x2d, 0xd1, 0xd7, 0xc3, 0x95,
996
997 0x7a, 0x16, 0xfc, 0x08, 0xe5, 0x26, 0xd4, 0xb1,
998 0x22, 0x3f, 0x1b, 0x12, 0x32, 0xa1, 0x1a, 0xf2,
999 0x74, 0xc3, 0xd7, 0x0d, 0xac, 0x57, 0xf8, 0x3e,
1000 0x09, 0x83, 0xc4, 0x98, 0xf1, 0xa6, 0xf1, 0xae,
1001
1002 0xcb, 0x02, 0x1c, 0x3e, 0x70, 0x08, 0x5a, 0x1e,
1003 0x52, 0x7f, 0x1c, 0xe4, 0x1e, 0xe5, 0x91, 0x1a,
1004 0x82, 0x02, 0x01, 0x61, 0x52, 0x9c, 0xd8, 0x27,
1005 0x73, 0x76, 0x2d, 0xaf, 0x54, 0x59, 0xde, 0x94,
1006
1007 0xa0, 0xa8, 0x2a, 0xda, 0xe7, 0xe1, 0x70, 0x3c,
1008 0x80, 0x85, 0x43, 0xc2, 0x9e, 0xd6, 0xfb, 0x32,
1009 0xd9, 0xe0, 0x04, 0x32, 0x7c, 0x13, 0x55, 0x18,
1010 0x0c, 0x99, 0x5a, 0x07, 0x74, 0x14, 0x93, 0xa0,
1011
1012 0x9c, 0x21, 0xba, 0x01, 0xa3, 0x87, 0x88, 0x2d,
1013 0xa4, 0xf6, 0x25, 0x34, 0xb8, 0x7b, 0xb1, 0x5d,
1014 0x60, 0xd1, 0x97, 0x20, 0x1c, 0x0f, 0xd3, 0xbf,
1015 0x30, 0xc1, 0x50, 0x0a, 0x3e, 0xcf, 0xec, 0xdd,
1016
1017 0x66, 0xd8, 0x72, 0x1f, 0x90, 0xbc, 0xc4, 0xc1,
1018 0x7e, 0xe9, 0x25, 0xc6, 0x1b, 0x0a, 0x03, 0x72,
1019 0x7a, 0x9c, 0x0d, 0x5f, 0x5c, 0xa4, 0x62, 0xfb,
1020 0xfa, 0x0a, 0xf1, 0xc2, 0x51, 0x3a, 0x9d, 0x9d,
1021
1022 0x4b, 0x53, 0x45, 0xbd, 0x27, 0xa5, 0xf6, 0xe6,
1023 0x53, 0xf7, 0x51, 0x69, 0x3e, 0x6b, 0x6a, 0x2b,
1024 0x8e, 0xad, 0x57, 0xd5, 0x11, 0xe0, 0x0e, 0x58,
1025 0xc4, 0x5b, 0x7b, 0x8d, 0x00, 0x5a, 0xf7, 0x92,
1026
1027 0x88, 0xf5, 0xc7, 0xc2, 0x2f, 0xd4, 0xf1, 0xbf,
1028 0x7a, 0x89, 0x8b, 0x03, 0xa5, 0x63, 0x4c, 0x6a,
1029 0x1a, 0xe3, 0xf9, 0xfa, 0xe5, 0xde, 0x4f, 0x29,
1030 0x6a, 0x28, 0x96, 0xb2, 0x3e, 0x7e, 0xd4, 0x3e,
1031
1032 0xd1, 0x4f, 0xa5, 0xa2, 0x80, 0x3f, 0x4d, 0x28,
1033 0xf0, 0xd3, 0xff, 0xcf, 0x24, 0x75, 0x76, 0x77,
1034 0xae, 0xbd, 0xb4, 0x7b, 0xb3, 0x88, 0x37, 0x87,
1035 0x08, 0x94, 0x8a, 0x8d, 0x41, 0x26, 0xed, 0x18,
1036
1037 0x39, 0xe0, 0xda, 0x29, 0xa5, 0x37, 0xa8, 0xc1,
1038 0x98, 0xb3, 0xc6, 0x6a, 0xb0, 0x07, 0x12, 0xdd,
1039 0x26, 0x16, 0x74, 0xbf, 0x45, 0xa7, 0x3d, 0x67,
1040 0xf7, 0x69, 0x14, 0xf8, 0x30, 0xca, 0x01, 0x4b,
1041
1042 0x65, 0x59, 0x6f, 0x27, 0xe4, 0xcf, 0x62, 0xde,
1043 0x66, 0x12, 0x5a, 0x55, 0x66, 0xdf, 0x99, 0x75,
1044 0x15, 0x56, 0x28, 0xb4, 0x00, 0xfb, 0xfb, 0x3a,
1045 0x29, 0x04, 0x0e, 0xd5, 0x0f, 0xaf, 0xfd, 0xbb,
1046
1047 0x18, 0xae, 0xce, 0x7c, 0x5c, 0x44, 0x69, 0x32,
1048 0x60, 0xaa, 0xb3, 0x86, 0xc0, 0xa3, 0x7b, 0x11,
1049 0xb1, 0x14, 0xf1, 0xc4, 0x15, 0xae, 0xbb, 0x65,
1050 0x3b, 0xe4, 0x68, 0x17, 0x94, 0x28, 0xd4, 0x3a,
1051
1052 0x4d, 0x8b, 0xc3, 0xec, 0x38, 0x81, 0x3e, 0xca,
1053 0x30, 0xa1, 0x3c, 0xf1, 0xbb, 0x18, 0xd5, 0x24,
1054 0xf1, 0x99, 0x2d, 0x44, 0xd8, 0xb1, 0xa4, 0x2e,
1055 0xa3, 0x0b, 0x22, 0xe6, 0xc9, 0x5b, 0x19, 0x9d,
1056
1057 0x8d, 0x18, 0x2f, 0x88, 0x40, 0xb0, 0x9d, 0x05,
1058 0x95, 0x85, 0xc3, 0x1a, 0xd6, 0x91, 0xfa, 0x06,
1059 0x19, 0xff, 0x03, 0x8a, 0xca, 0x2c, 0x39, 0xa9,
1060 0x43, 0x42, 0x11, 0x57, 0x36, 0x17, 0x17, 0xc4,
1061
1062 0x9d, 0x32, 0x20, 0x28, 0xa7, 0x46, 0x48, 0x11,
1063 0x3b, 0xd8, 0xc9, 0xd7, 0xec, 0x77, 0xcf, 0x3c,
1064 0x89, 0xc1, 0xec, 0x87, 0x18, 0xce, 0xff, 0x85,
1065 0x16, 0xd9, 0x6b, 0x34, 0xc3, 0xc6, 0x14, 0xf1,
1066
1067 0x06, 0x99, 0xc9, 0xab, 0xc4, 0xed, 0x04, 0x11,
1068 0x50, 0x62, 0x23, 0xbe, 0xa1, 0x6a, 0xf3, 0x5c,
1069 0x88, 0x3a, 0xcc, 0xdb, 0xe1, 0x10, 0x4e, 0xef,
1070 0x0c, 0xfd, 0xb5, 0x4e, 0x12, 0xfb, 0x23, 0x0a,
1071};
1072static const uint8_t ciph_data_aes_xts_vect9_ctx[] = {
1073 0x32, 0x60, 0xae, 0x8d, 0xad, 0x1f, 0x4a, 0x32,
1074 0xc5, 0xca, 0xfe, 0x3a, 0xb0, 0xeb, 0x95, 0x54,
1075 0x9d, 0x46, 0x1a, 0x67, 0xce, 0xb9, 0xe5, 0xaa,
1076 0x2d, 0x3a, 0xfb, 0x62, 0xde, 0xce, 0x05, 0x53,
1077
1078 0x19, 0x3b, 0xa5, 0x0c, 0x75, 0xbe, 0x25, 0x1e,
1079 0x08, 0xd1, 0xd0, 0x8f, 0x10, 0x88, 0x57, 0x6c,
1080 0x7e, 0xfd, 0xfa, 0xaf, 0x3f, 0x45, 0x95, 0x59,
1081 0x57, 0x1e, 0x12, 0x51, 0x17, 0x53, 0xb0, 0x7a,
1082
1083 0xf0, 0x73, 0xf3, 0x5d, 0xa0, 0x6a, 0xf0, 0xce,
1084 0x0b, 0xbf, 0x6b, 0x8f, 0x5c, 0xcc, 0x5c, 0xea,
1085 0x50, 0x0e, 0xc1, 0xb2, 0x11, 0xbd, 0x51, 0xf6,
1086 0x3b, 0x60, 0x6b, 0xf6, 0x52, 0x87, 0x96, 0xca,
1087
1088 0x12, 0x17, 0x3b, 0xa3, 0x9b, 0x89, 0x35, 0xee,
1089 0x44, 0xcc, 0xce, 0x64, 0x6f, 0x90, 0xa4, 0x5b,
1090 0xf9, 0xcc, 0xc5, 0x67, 0xf0, 0xac, 0xe1, 0x3d,
1091 0xc2, 0xd5, 0x3e, 0xbe, 0xed, 0xc8, 0x1f, 0x58,
1092
1093 0xb2, 0xe4, 0x11, 0x79, 0xdd, 0xdf, 0x0d, 0x5a,
1094 0x5c, 0x42, 0xf5, 0xd8, 0x50, 0x6c, 0x1a, 0x5d,
1095 0x2f, 0x8f, 0x59, 0xf3, 0xea, 0x87, 0x3c, 0xbc,
1096 0xd0, 0xee, 0xc1, 0x9a, 0xcb, 0xf3, 0x25, 0x42,
1097
1098 0x3b, 0xd3, 0xdc, 0xb8, 0xc2, 0xb1, 0xbf, 0x1d,
1099 0x1e, 0xae, 0xd0, 0xeb, 0xa7, 0xf0, 0x69, 0x8e,
1100 0x43, 0x14, 0xfb, 0xeb, 0x2f, 0x15, 0x66, 0xd1,
1101 0xb9, 0x25, 0x30, 0x08, 0xcb, 0xcc, 0xf4, 0x5a,
1102
1103 0x2b, 0x0d, 0x9c, 0x5c, 0x9c, 0x21, 0x47, 0x4f,
1104 0x40, 0x76, 0xe0, 0x2b, 0xe2, 0x60, 0x50, 0xb9,
1105 0x9d, 0xee, 0x4f, 0xd6, 0x8a, 0x4c, 0xf8, 0x90,
1106 0xe4, 0x96, 0xe4, 0xfc, 0xae, 0x7b, 0x70, 0xf9,
1107
1108 0x4e, 0xa5, 0xa9, 0x06, 0x2d, 0xa0, 0xda, 0xeb,
1109 0xa1, 0x99, 0x3d, 0x2c, 0xcd, 0x1d, 0xd3, 0xc2,
1110 0x44, 0xb8, 0x42, 0x88, 0x01, 0x49, 0x5a, 0x58,
1111 0xb2, 0x16, 0x54, 0x7e, 0x7e, 0x84, 0x7c, 0x46,
1112
1113 0xd1, 0xd7, 0x56, 0x37, 0x7b, 0x62, 0x42, 0xd2,
1114 0xe5, 0xfb, 0x83, 0xbf, 0x75, 0x2b, 0x54, 0xe0,
1115 0xdf, 0x71, 0xe8, 0x89, 0xf3, 0xa2, 0xbb, 0x0f,
1116 0x4c, 0x10, 0x80, 0x5b, 0xf3, 0xc5, 0x90, 0x37,
1117
1118 0x6e, 0x3c, 0x24, 0xe2, 0x2f, 0xf5, 0x7f, 0x7f,
1119 0xa9, 0x65, 0x57, 0x73, 0x75, 0x32, 0x5c, 0xea,
1120 0x5d, 0x92, 0x0d, 0xb9, 0x4b, 0x9c, 0x33, 0x6b,
1121 0x45, 0x5f, 0x6e, 0x89, 0x4c, 0x01, 0x86, 0x6f,
1122
1123 0xe9, 0xfb, 0xb8, 0xc8, 0xd3, 0xf7, 0x0a, 0x29,
1124 0x57, 0x28, 0x5f, 0x6d, 0xfb, 0x5d, 0xcd, 0x8c,
1125 0xbf, 0x54, 0x78, 0x2f, 0x8f, 0xe7, 0x76, 0x6d,
1126 0x47, 0x23, 0x81, 0x99, 0x13, 0xac, 0x77, 0x34,
1127
1128 0x21, 0xe3, 0xa3, 0x10, 0x95, 0x86, 0x6b, 0xad,
1129 0x22, 0xc8, 0x6a, 0x60, 0x36, 0xb2, 0x51, 0x8b,
1130 0x20, 0x59, 0xb4, 0x22, 0x9d, 0x18, 0xc8, 0xc2,
1131 0xcc, 0xbd, 0xf9, 0x06, 0xc6, 0xcc, 0x6e, 0x82,
1132
1133 0x46, 0x4e, 0xe5, 0x7b, 0xdd, 0xb0, 0xbe, 0xbc,
1134 0xb1, 0xdc, 0x64, 0x53, 0x25, 0xbf, 0xb3, 0xe6,
1135 0x65, 0xef, 0x72, 0x51, 0x08, 0x2c, 0x88, 0xeb,
1136 0xb1, 0xcf, 0x20, 0x3b, 0xd7, 0x79, 0xfd, 0xd3,
1137
1138 0x86, 0x75, 0x71, 0x3c, 0x8d, 0xaa, 0xdd, 0x17,
1139 0xe1, 0xca, 0xbe, 0xe4, 0x32, 0xb0, 0x97, 0x87,
1140 0xb6, 0xdd, 0xf3, 0x30, 0x4e, 0x38, 0xb7, 0x31,
1141 0xb4, 0x5d, 0xf5, 0xdf, 0x51, 0xb7, 0x8f, 0xcf,
1142
1143 0xb3, 0xd3, 0x24, 0x66, 0x02, 0x8d, 0x0b, 0xa3,
1144 0x65, 0x55, 0xe7, 0xe1, 0x1a, 0xb0, 0xee, 0x06,
1145 0x66, 0x06, 0x1d, 0x16, 0x45, 0xd9, 0x62, 0x44,
1146 0x4b, 0xc4, 0x7a, 0x38, 0x18, 0x89, 0x30, 0xa8,
1147
1148 0x4b, 0x4d, 0x56, 0x13, 0x95, 0xc7, 0x3c, 0x08,
1149 0x70, 0x21, 0x92, 0x7c, 0xa6, 0x38, 0xb7, 0xaf,
1150 0xc8, 0xa8, 0x67, 0x9c, 0xcb, 0x84, 0xc2, 0x65,
1151 0x55, 0x44, 0x0e, 0xc7, 0xf1, 0x04, 0x45, 0xcd,
1152};
1153
1154/*
1155 * XTS-AES-256 applied for a data unit of 512 bytes
1156 */
1157
1158/* Vector 10 */
1159static const uint8_t ciph_data_aes_xts_vect10_key1[] = {
1160 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
1161 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
1162 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69,
1163 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27,
1164};
1165static const uint8_t ciph_data_aes_xts_vect10_key2[] = {
1166 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
1167 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
1168 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37,
1169 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92,
1170};
1171static const uint8_t ciph_data_aes_xts_vect10_iv[16] = {
1172 0xff
1173};
1174static const uint8_t ciph_data_aes_xts_vect10_ptx[] = {
1175 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1176 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
1177 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
1178 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1179
1180 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
1181 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
1182 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1183 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
1184
1185 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1186 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
1187 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
1188 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
1189
1190 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1191 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
1192 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
1193 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
1194
1195 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1196 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1197 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1198 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
1199
1200 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
1201 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
1202 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
1203 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
1204
1205 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1206 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
1207 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
1208 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
1209
1210 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
1211 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
1212 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1213 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
1214
1215 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1216 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
1217 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
1218 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1219
1220 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
1221 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
1222 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1223 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
1224
1225 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1226 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
1227 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
1228 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
1229
1230 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1231 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
1232 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
1233 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
1234
1235 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1236 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1237 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1238 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
1239
1240 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
1241 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
1242 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
1243 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
1244
1245 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1246 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
1247 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
1248 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
1249
1250 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
1251 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
1252 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1253 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
1254};
1255static const uint8_t ciph_data_aes_xts_vect10_ctx[] = {
1256 0x1c, 0x3b, 0x3a, 0x10, 0x2f, 0x77, 0x03, 0x86,
1257 0xe4, 0x83, 0x6c, 0x99, 0xe3, 0x70, 0xcf, 0x9b,
1258 0xea, 0x00, 0x80, 0x3f, 0x5e, 0x48, 0x23, 0x57,
1259 0xa4, 0xae, 0x12, 0xd4, 0x14, 0xa3, 0xe6, 0x3b,
1260
1261 0x5d, 0x31, 0xe2, 0x76, 0xf8, 0xfe, 0x4a, 0x8d,
1262 0x66, 0xb3, 0x17, 0xf9, 0xac, 0x68, 0x3f, 0x44,
1263 0x68, 0x0a, 0x86, 0xac, 0x35, 0xad, 0xfc, 0x33,
1264 0x45, 0xbe, 0xfe, 0xcb, 0x4b, 0xb1, 0x88, 0xfd,
1265
1266 0x57, 0x76, 0x92, 0x6c, 0x49, 0xa3, 0x09, 0x5e,
1267 0xb1, 0x08, 0xfd, 0x10, 0x98, 0xba, 0xec, 0x70,
1268 0xaa, 0xa6, 0x69, 0x99, 0xa7, 0x2a, 0x82, 0xf2,
1269 0x7d, 0x84, 0x8b, 0x21, 0xd4, 0xa7, 0x41, 0xb0,
1270
1271 0xc5, 0xcd, 0x4d, 0x5f, 0xff, 0x9d, 0xac, 0x89,
1272 0xae, 0xba, 0x12, 0x29, 0x61, 0xd0, 0x3a, 0x75,
1273 0x71, 0x23, 0xe9, 0x87, 0x0f, 0x8a, 0xcf, 0x10,
1274 0x00, 0x02, 0x08, 0x87, 0x89, 0x14, 0x29, 0xca,
1275
1276 0x2a, 0x3e, 0x7a, 0x7d, 0x7d, 0xf7, 0xb1, 0x03,
1277 0x55, 0x16, 0x5c, 0x8b, 0x9a, 0x6d, 0x0a, 0x7d,
1278 0xe8, 0xb0, 0x62, 0xc4, 0x50, 0x0d, 0xc4, 0xcd,
1279 0x12, 0x0c, 0x0f, 0x74, 0x18, 0xda, 0xe3, 0xd0,
1280
1281 0xb5, 0x78, 0x1c, 0x34, 0x80, 0x3f, 0xa7, 0x54,
1282 0x21, 0xc7, 0x90, 0xdf, 0xe1, 0xde, 0x18, 0x34,
1283 0xf2, 0x80, 0xd7, 0x66, 0x7b, 0x32, 0x7f, 0x6c,
1284 0x8c, 0xd7, 0x55, 0x7e, 0x12, 0xac, 0x3a, 0x0f,
1285
1286 0x93, 0xec, 0x05, 0xc5, 0x2e, 0x04, 0x93, 0xef,
1287 0x31, 0xa1, 0x2d, 0x3d, 0x92, 0x60, 0xf7, 0x9a,
1288 0x28, 0x9d, 0x6a, 0x37, 0x9b, 0xc7, 0x0c, 0x50,
1289 0x84, 0x14, 0x73, 0xd1, 0xa8, 0xcc, 0x81, 0xec,
1290
1291 0x58, 0x3e, 0x96, 0x45, 0xe0, 0x7b, 0x8d, 0x96,
1292 0x70, 0x65, 0x5b, 0xa5, 0xbb, 0xcf, 0xec, 0xc6,
1293 0xdc, 0x39, 0x66, 0x38, 0x0a, 0xd8, 0xfe, 0xcb,
1294 0x17, 0xb6, 0xba, 0x02, 0x46, 0x9a, 0x02, 0x0a,
1295
1296 0x84, 0xe1, 0x8e, 0x8f, 0x84, 0x25, 0x20, 0x70,
1297 0xc1, 0x3e, 0x9f, 0x1f, 0x28, 0x9b, 0xe5, 0x4f,
1298 0xbc, 0x48, 0x14, 0x57, 0x77, 0x8f, 0x61, 0x60,
1299 0x15, 0xe1, 0x32, 0x7a, 0x02, 0xb1, 0x40, 0xf1,
1300
1301 0x50, 0x5e, 0xb3, 0x09, 0x32, 0x6d, 0x68, 0x37,
1302 0x8f, 0x83, 0x74, 0x59, 0x5c, 0x84, 0x9d, 0x84,
1303 0xf4, 0xc3, 0x33, 0xec, 0x44, 0x23, 0x88, 0x51,
1304 0x43, 0xcb, 0x47, 0xbd, 0x71, 0xc5, 0xed, 0xae,
1305
1306 0x9b, 0xe6, 0x9a, 0x2f, 0xfe, 0xce, 0xb1, 0xbe,
1307 0xc9, 0xde, 0x24, 0x4f, 0xbe, 0x15, 0x99, 0x2b,
1308 0x11, 0xb7, 0x7c, 0x04, 0x0f, 0x12, 0xbd, 0x8f,
1309 0x6a, 0x97, 0x5a, 0x44, 0xa0, 0xf9, 0x0c, 0x29,
1310
1311 0xa9, 0xab, 0xc3, 0xd4, 0xd8, 0x93, 0x92, 0x72,
1312 0x84, 0xc5, 0x87, 0x54, 0xcc, 0xe2, 0x94, 0x52,
1313 0x9f, 0x86, 0x14, 0xdc, 0xd2, 0xab, 0xa9, 0x91,
1314 0x92, 0x5f, 0xed, 0xc4, 0xae, 0x74, 0xff, 0xac,
1315
1316 0x6e, 0x33, 0x3b, 0x93, 0xeb, 0x4a, 0xff, 0x04,
1317 0x79, 0xda, 0x9a, 0x41, 0x0e, 0x44, 0x50, 0xe0,
1318 0xdd, 0x7a, 0xe4, 0xc6, 0xe2, 0x91, 0x09, 0x00,
1319 0x57, 0x5d, 0xa4, 0x01, 0xfc, 0x07, 0x05, 0x9f,
1320
1321 0x64, 0x5e, 0x8b, 0x7e, 0x9b, 0xfd, 0xef, 0x33,
1322 0x94, 0x30, 0x54, 0xff, 0x84, 0x01, 0x14, 0x93,
1323 0xc2, 0x7b, 0x34, 0x29, 0xea, 0xed, 0xb4, 0xed,
1324 0x53, 0x76, 0x44, 0x1a, 0x77, 0xed, 0x43, 0x85,
1325
1326 0x1a, 0xd7, 0x7f, 0x16, 0xf5, 0x41, 0xdf, 0xd2,
1327 0x69, 0xd5, 0x0d, 0x6a, 0x5f, 0x14, 0xfb, 0x0a,
1328 0xab, 0x1c, 0xbb, 0x4c, 0x15, 0x50, 0xbe, 0x97,
1329 0xf7, 0xab, 0x40, 0x66, 0x19, 0x3c, 0x4c, 0xaa,
1330
1331 0x77, 0x3d, 0xad, 0x38, 0x01, 0x4b, 0xd2, 0x09,
1332 0x2f, 0xa7, 0x55, 0xc8, 0x24, 0xbb, 0x5e, 0x54,
1333 0xc4, 0xf3, 0x6f, 0xfd, 0xa9, 0xfc, 0xea, 0x70,
1334 0xb9, 0xc6, 0xe6, 0x93, 0xe1, 0x48, 0xc1, 0x51,
1335};
1336
1337/* Vector 11 */
1338static const uint8_t ciph_data_aes_xts_vect11_key1[] = {
1339 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
1340 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
1341 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69,
1342 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27,
1343};
1344static const uint8_t ciph_data_aes_xts_vect11_key2[] = {
1345 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
1346 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
1347 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37,
1348 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92,
1349};
1350static const uint8_t ciph_data_aes_xts_vect11_iv[16] = {
1351 0xff, 0xff
1352};
1353static const uint8_t ciph_data_aes_xts_vect11_ptx[] = {
1354 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1355 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
1356 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
1357 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1358
1359 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
1360 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
1361 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1362 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
1363
1364 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1365 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
1366 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
1367 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
1368
1369 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1370 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
1371 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
1372 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
1373
1374 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1375 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1376 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1377 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
1378
1379 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
1380 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
1381 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
1382 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
1383
1384 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1385 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
1386 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
1387 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
1388
1389 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
1390 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
1391 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1392 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
1393
1394 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1395 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
1396 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
1397 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1398
1399 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
1400 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
1401 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1402 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
1403
1404 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1405 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
1406 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
1407 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
1408
1409 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1410 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
1411 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
1412 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
1413
1414 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1415 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1416 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1417 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
1418
1419 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
1420 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
1421 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
1422 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
1423
1424 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1425 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
1426 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
1427 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
1428
1429 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
1430 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
1431 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1432 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
1433};
1434static const uint8_t ciph_data_aes_xts_vect11_ctx[] = {
1435 0x77, 0xa3, 0x12, 0x51, 0x61, 0x8a, 0x15, 0xe6,
1436 0xb9, 0x2d, 0x1d, 0x66, 0xdf, 0xfe, 0x7b, 0x50,
1437 0xb5, 0x0b, 0xad, 0x55, 0x23, 0x05, 0xba, 0x02,
1438 0x17, 0xa6, 0x10, 0x68, 0x8e, 0xff, 0x7e, 0x11,
1439
1440 0xe1, 0xd0, 0x22, 0x54, 0x38, 0xe0, 0x93, 0x24,
1441 0x2d, 0x6d, 0xb2, 0x74, 0xfd, 0xe8, 0x01, 0xd4,
1442 0xca, 0xe0, 0x6f, 0x20, 0x92, 0xc7, 0x28, 0xb2,
1443 0x47, 0x85, 0x59, 0xdf, 0x58, 0xe8, 0x37, 0xc2,
1444
1445 0x46, 0x9e, 0xe4, 0xa4, 0xfa, 0x79, 0x4e, 0x4b,
1446 0xbc, 0x7f, 0x39, 0xbc, 0x02, 0x6e, 0x3c, 0xb7,
1447 0x2c, 0x33, 0xb0, 0x88, 0x8f, 0x25, 0xb4, 0xac,
1448 0xf5, 0x6a, 0x2a, 0x98, 0x04, 0xf1, 0xce, 0x6d,
1449
1450 0x3d, 0x6e, 0x1d, 0xc6, 0xca, 0x18, 0x1d, 0x4b,
1451 0x54, 0x61, 0x79, 0xd5, 0x55, 0x44, 0xaa, 0x77,
1452 0x60, 0xc4, 0x0d, 0x06, 0x74, 0x15, 0x39, 0xc7,
1453 0xe3, 0xcd, 0x9d, 0x2f, 0x66, 0x50, 0xb2, 0x01,
1454
1455 0x3f, 0xd0, 0xee, 0xb8, 0xc2, 0xb8, 0xe3, 0xd8,
1456 0xd2, 0x40, 0xcc, 0xae, 0x2d, 0x4c, 0x98, 0x32,
1457 0x0a, 0x74, 0x42, 0xe1, 0xc8, 0xd7, 0x5a, 0x42,
1458 0xd6, 0xe6, 0xcf, 0xa4, 0xc2, 0xec, 0xa1, 0x79,
1459
1460 0x8d, 0x15, 0x8c, 0x7a, 0xec, 0xdf, 0x82, 0x49,
1461 0x0f, 0x24, 0xbb, 0x9b, 0x38, 0xe1, 0x08, 0xbc,
1462 0xda, 0x12, 0xc3, 0xfa, 0xf9, 0xa2, 0x11, 0x41,
1463 0xc3, 0x61, 0x3b, 0x58, 0x36, 0x7f, 0x92, 0x2a,
1464
1465 0xaa, 0x26, 0xcd, 0x22, 0xf2, 0x3d, 0x70, 0x8d,
1466 0xae, 0x69, 0x9a, 0xd7, 0xcb, 0x40, 0xa8, 0xad,
1467 0x0b, 0x6e, 0x27, 0x84, 0x97, 0x3d, 0xcb, 0x60,
1468 0x56, 0x84, 0xc0, 0x8b, 0x8d, 0x69, 0x98, 0xc6,
1469
1470 0x9a, 0xac, 0x04, 0x99, 0x21, 0x87, 0x1e, 0xbb,
1471 0x65, 0x30, 0x1a, 0x46, 0x19, 0xca, 0x80, 0xec,
1472 0xb4, 0x85, 0xa3, 0x1d, 0x74, 0x42, 0x23, 0xce,
1473 0x8d, 0xdc, 0x23, 0x94, 0x82, 0x8d, 0x6a, 0x80,
1474
1475 0x47, 0x0c, 0x09, 0x2f, 0x5b, 0xa4, 0x13, 0xc3,
1476 0x37, 0x8f, 0xa6, 0x05, 0x42, 0x55, 0xc6, 0xf9,
1477 0xdf, 0x44, 0x95, 0x86, 0x2b, 0xbb, 0x32, 0x87,
1478 0x68, 0x1f, 0x93, 0x1b, 0x68, 0x7c, 0x88, 0x8a,
1479
1480 0xbf, 0x84, 0x4d, 0xfc, 0x8f, 0xc2, 0x83, 0x31,
1481 0xe5, 0x79, 0x92, 0x8c, 0xd1, 0x2b, 0xd2, 0x39,
1482 0x0a, 0xe1, 0x23, 0xcf, 0x03, 0x81, 0x8d, 0x14,
1483 0xde, 0xdd, 0xe5, 0xc0, 0xc2, 0x4c, 0x8a, 0xb0,
1484
1485 0x18, 0xbf, 0xca, 0x75, 0xca, 0x09, 0x6f, 0x2d,
1486 0x53, 0x1f, 0x3d, 0x16, 0x19, 0xe7, 0x85, 0xf1,
1487 0xad, 0xa4, 0x37, 0xca, 0xb9, 0x2e, 0x98, 0x05,
1488 0x58, 0xb3, 0xdc, 0xe1, 0x47, 0x4a, 0xfb, 0x75,
1489
1490 0xbf, 0xed, 0xbf, 0x8f, 0xf5, 0x4c, 0xb2, 0x61,
1491 0x8e, 0x02, 0x44, 0xc9, 0xac, 0x0d, 0x3c, 0x66,
1492 0xfb, 0x51, 0x59, 0x8c, 0xd2, 0xdb, 0x11, 0xf9,
1493 0xbe, 0x39, 0x79, 0x1a, 0xbe, 0x44, 0x7c, 0x63,
1494
1495 0x09, 0x4f, 0x7c, 0x45, 0x3b, 0x7f, 0xf8, 0x7c,
1496 0xb5, 0xbb, 0x36, 0xb7, 0xc7, 0x9e, 0xfb, 0x08,
1497 0x72, 0xd1, 0x70, 0x58, 0xb8, 0x3b, 0x15, 0xab,
1498 0x08, 0x66, 0xad, 0x8a, 0x58, 0x65, 0x6c, 0x5a,
1499
1500 0x7e, 0x20, 0xdb, 0xdf, 0x30, 0x8b, 0x24, 0x61,
1501 0xd9, 0x7c, 0x0e, 0xc0, 0x02, 0x4a, 0x27, 0x15,
1502 0x05, 0x52, 0x49, 0xcf, 0x3b, 0x47, 0x8d, 0xdd,
1503 0x47, 0x40, 0xde, 0x65, 0x4f, 0x75, 0xca, 0x68,
1504
1505 0x6e, 0x0d, 0x73, 0x45, 0xc6, 0x9e, 0xd5, 0x0c,
1506 0xdc, 0x2a, 0x8b, 0x33, 0x2b, 0x1f, 0x88, 0x24,
1507 0x10, 0x8a, 0xc9, 0x37, 0xeb, 0x05, 0x05, 0x85,
1508 0x60, 0x8e, 0xe7, 0x34, 0x09, 0x7f, 0xc0, 0x90,
1509
1510 0x54, 0xfb, 0xff, 0x89, 0xee, 0xae, 0xea, 0x79,
1511 0x1f, 0x4a, 0x7a, 0xb1, 0xf9, 0x86, 0x82, 0x94,
1512 0xa4, 0xf9, 0xe2, 0x7b, 0x42, 0xaf, 0x81, 0x00,
1513 0xcb, 0x9d, 0x59, 0xce, 0xf9, 0x64, 0x58, 0x03,
1514};
1515
1516
1517/* Vector 12 */
1518static const uint8_t ciph_data_aes_xts_vect12_key1[] = {
1519 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
1520 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
1521 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69,
1522 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27,
1523};
1524static const uint8_t ciph_data_aes_xts_vect12_key2[] = {
1525 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
1526 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
1527 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37,
1528 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92,
1529};
1530static const uint8_t ciph_data_aes_xts_vect12_iv[16] = {
1531 0xff, 0xff, 0xff
1532};
1533static const uint8_t ciph_data_aes_xts_vect12_ptx[] = {
1534 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1535 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
1536 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
1537 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1538
1539 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
1540 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
1541 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1542 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
1543
1544 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1545 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
1546 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
1547 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
1548
1549 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1550 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
1551 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
1552 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
1553
1554 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1555 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1556 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1557 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
1558
1559 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
1560 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
1561 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
1562 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
1563
1564 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1565 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
1566 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
1567 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
1568
1569 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
1570 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
1571 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1572 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
1573
1574 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1575 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
1576 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
1577 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1578
1579 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
1580 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
1581 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1582 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
1583
1584 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1585 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
1586 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
1587 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
1588
1589 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1590 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
1591 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
1592 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
1593
1594 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1595 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1596 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1597 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
1598
1599 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
1600 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
1601 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
1602 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
1603
1604 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1605 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
1606 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
1607 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
1608
1609 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
1610 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
1611 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1612 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
1613};
1614static const uint8_t ciph_data_aes_xts_vect12_ctx[] = {
1615 0xe3, 0x87, 0xaa, 0xa5, 0x8b, 0xa4, 0x83, 0xaf,
1616 0xa7, 0xe8, 0xeb, 0x46, 0x97, 0x78, 0x31, 0x7e,
1617 0xcf, 0x4c, 0xf5, 0x73, 0xaa, 0x9d, 0x4e, 0xac,
1618 0x23, 0xf2, 0xcd, 0xf9, 0x14, 0xe4, 0xe2, 0x00,
1619
1620 0xa8, 0xb4, 0x90, 0xe4, 0x2e, 0xe6, 0x46, 0x80,
1621 0x2d, 0xc6, 0xee, 0x2b, 0x47, 0x1b, 0x27, 0x81,
1622 0x95, 0xd6, 0x09, 0x18, 0xec, 0xec, 0xb4, 0x4b,
1623 0xf7, 0x99, 0x66, 0xf8, 0x3f, 0xab, 0xa0, 0x49,
1624
1625 0x92, 0x98, 0xeb, 0xc6, 0x99, 0xc0, 0xc8, 0x63,
1626 0x47, 0x15, 0xa3, 0x20, 0xbb, 0x4f, 0x07, 0x5d,
1627 0x62, 0x2e, 0x74, 0xc8, 0xc9, 0x32, 0x00, 0x4f,
1628 0x25, 0xb4, 0x1e, 0x36, 0x10, 0x25, 0xb5, 0xa8,
1629
1630 0x78, 0x15, 0x39, 0x1f, 0x61, 0x08, 0xfc, 0x4a,
1631 0xfa, 0x6a, 0x05, 0xd9, 0x30, 0x3c, 0x6b, 0xa6,
1632 0x8a, 0x12, 0x8a, 0x55, 0x70, 0x5d, 0x41, 0x59,
1633 0x85, 0x83, 0x2f, 0xde, 0xaa, 0xe6, 0xc8, 0xe1,
1634
1635 0x91, 0x10, 0xe8, 0x4d, 0x1b, 0x1f, 0x19, 0x9a,
1636 0x26, 0x92, 0x11, 0x9e, 0xdc, 0x96, 0x13, 0x26,
1637 0x58, 0xf0, 0x9d, 0xa7, 0xc6, 0x23, 0xef, 0xce,
1638 0xc7, 0x12, 0x53, 0x7a, 0x3d, 0x94, 0xc0, 0xbf,
1639
1640 0x5d, 0x7e, 0x35, 0x2e, 0xc9, 0x4a, 0xe5, 0x79,
1641 0x7f, 0xdb, 0x37, 0x7d, 0xc1, 0x55, 0x11, 0x50,
1642 0x72, 0x1a, 0xdf, 0x15, 0xbd, 0x26, 0xa8, 0xef,
1643 0xc2, 0xfc, 0xaa, 0xd5, 0x68, 0x81, 0xfa, 0x9e,
1644
1645 0x62, 0x46, 0x2c, 0x28, 0xf3, 0x0a, 0xe1, 0xce,
1646 0xac, 0xa9, 0x3c, 0x34, 0x5c, 0xf2, 0x43, 0xb7,
1647 0x3f, 0x54, 0x2e, 0x20, 0x74, 0xa7, 0x05, 0xbd,
1648 0x26, 0x43, 0xbb, 0x9f, 0x7c, 0xc7, 0x9b, 0xb6,
1649
1650 0xe7, 0x09, 0x1e, 0xa6, 0xe2, 0x32, 0xdf, 0x0f,
1651 0x9a, 0xd0, 0xd6, 0xcf, 0x50, 0x23, 0x27, 0x87,
1652 0x6d, 0x82, 0x20, 0x7a, 0xbf, 0x21, 0x15, 0xcd,
1653 0xac, 0xf6, 0xd5, 0xa4, 0x8f, 0x6c, 0x18, 0x79,
1654
1655 0xa6, 0x5b, 0x11, 0x5f, 0x0f, 0x8b, 0x3c, 0xb3,
1656 0xc5, 0x9d, 0x15, 0xdd, 0x8c, 0x76, 0x9b, 0xc0,
1657 0x14, 0x79, 0x5a, 0x18, 0x37, 0xf3, 0x90, 0x1b,
1658 0x58, 0x45, 0xeb, 0x49, 0x1a, 0xdf, 0xef, 0xe0,
1659
1660 0x97, 0xb1, 0xfa, 0x30, 0xa1, 0x2f, 0xc1, 0xf6,
1661 0x5b, 0xa2, 0x29, 0x05, 0x03, 0x15, 0x39, 0x97,
1662 0x1a, 0x10, 0xf2, 0xf3, 0x6c, 0x32, 0x1b, 0xb5,
1663 0x13, 0x31, 0xcd, 0xef, 0xb3, 0x9e, 0x39, 0x64,
1664
1665 0xc7, 0xef, 0x07, 0x99, 0x94, 0xf5, 0xb6, 0x9b,
1666 0x2e, 0xdd, 0x83, 0xa7, 0x1e, 0xf5, 0x49, 0x97,
1667 0x1e, 0xe9, 0x3f, 0x44, 0xea, 0xc3, 0x93, 0x8f,
1668 0xcd, 0xd6, 0x1d, 0x01, 0xfa, 0x71, 0x79, 0x9d,
1669
1670 0xa3, 0xa8, 0x09, 0x1c, 0x4c, 0x48, 0xaa, 0x9e,
1671 0xd2, 0x63, 0xff, 0x07, 0x49, 0xdf, 0x95, 0xd4,
1672 0x4f, 0xef, 0x6a, 0x0b, 0xb5, 0x78, 0xec, 0x69,
1673 0x45, 0x6a, 0xa5, 0x40, 0x8a, 0xe3, 0x2c, 0x7a,
1674
1675 0xf0, 0x8a, 0xd7, 0xba, 0x89, 0x21, 0x28, 0x7e,
1676 0x3b, 0xbe, 0xe3, 0x1b, 0x76, 0x7b, 0xe0, 0x6a,
1677 0x0e, 0x70, 0x5c, 0x86, 0x4a, 0x76, 0x91, 0x37,
1678 0xdf, 0x28, 0x29, 0x22, 0x83, 0xea, 0x81, 0xa2,
1679
1680 0x48, 0x02, 0x41, 0xb4, 0x4d, 0x99, 0x21, 0xcd,
1681 0xbe, 0xc1, 0xbc, 0x28, 0xdc, 0x1f, 0xda, 0x11,
1682 0x4b, 0xd8, 0xe5, 0x21, 0x7a, 0xc9, 0xd8, 0xeb,
1683 0xaf, 0xa7, 0x20, 0xe9, 0xda, 0x4f, 0x9a, 0xce,
1684
1685 0x23, 0x1c, 0xc9, 0x49, 0xe5, 0xb9, 0x6f, 0xe7,
1686 0x6f, 0xfc, 0x21, 0x06, 0x3f, 0xdd, 0xc8, 0x3a,
1687 0x6b, 0x86, 0x79, 0xc0, 0x0d, 0x35, 0xe0, 0x95,
1688 0x76, 0xa8, 0x75, 0x30, 0x5b, 0xed, 0x5f, 0x36,
1689
1690 0xed, 0x24, 0x2c, 0x89, 0x00, 0xdd, 0x1f, 0xa9,
1691 0x65, 0xbc, 0x95, 0x0d, 0xfc, 0xe0, 0x9b, 0x13,
1692 0x22, 0x63, 0xa1, 0xee, 0xf5, 0x2d, 0xd6, 0x88,
1693 0x8c, 0x30, 0x9f, 0x5a, 0x7d, 0x71, 0x28, 0x26,
1694};
1695
1696/* Vector 13 */
1697static const uint8_t ciph_data_aes_xts_vect13_key1[] = {
1698 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
1699 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
1700 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69,
1701 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27,
1702};
1703static const uint8_t ciph_data_aes_xts_vect13_key2[] = {
1704 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
1705 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
1706 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37,
1707 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92,
1708};
1709static const uint8_t ciph_data_aes_xts_vect13_iv[16] = {
1710 0xff, 0xff, 0xff, 0xff
1711};
1712static const uint8_t ciph_data_aes_xts_vect13_ptx[] = {
1713 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1714 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
1715 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
1716 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1717
1718 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
1719 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
1720 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1721 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
1722
1723 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1724 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
1725 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
1726 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
1727
1728 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1729 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
1730 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
1731 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
1732
1733 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1734 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1735 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1736 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
1737
1738 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
1739 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
1740 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
1741 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
1742
1743 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1744 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
1745 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
1746 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
1747
1748 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
1749 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
1750 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1751 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
1752
1753 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1754 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
1755 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
1756 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1757
1758 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
1759 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
1760 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1761 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
1762
1763 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1764 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
1765 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
1766 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
1767
1768 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1769 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
1770 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
1771 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
1772
1773 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1774 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1775 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1776 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
1777
1778 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
1779 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
1780 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
1781 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
1782
1783 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1784 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
1785 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
1786 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
1787
1788 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
1789 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
1790 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1791 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
1792};
1793static const uint8_t ciph_data_aes_xts_vect13_ctx[] = {
1794 0xbf, 0x53, 0xd2, 0xda, 0xde, 0x78, 0xe8, 0x22,
1795 0xa4, 0xd9, 0x49, 0xa9, 0xbc, 0x67, 0x66, 0xb0,
1796 0x1b, 0x06, 0xa8, 0xef, 0x70, 0xd2, 0x67, 0x48,
1797 0xc6, 0xa7, 0xfc, 0x36, 0xd8, 0x0a, 0xe4, 0xc5,
1798
1799 0x52, 0x0f, 0x7c, 0x4a, 0xb0, 0xac, 0x85, 0x44,
1800 0x42, 0x4f, 0xa4, 0x05, 0x16, 0x2f, 0xef, 0x5a,
1801 0x6b, 0x7f, 0x22, 0x94, 0x98, 0x06, 0x36, 0x18,
1802 0xd3, 0x9f, 0x00, 0x03, 0xcb, 0x5f, 0xb8, 0xd1,
1803
1804 0xc8, 0x6b, 0x64, 0x34, 0x97, 0xda, 0x1f, 0xf9,
1805 0x45, 0xc8, 0xd3, 0xbe, 0xde, 0xca, 0x4f, 0x47,
1806 0x97, 0x02, 0xa7, 0xa7, 0x35, 0xf0, 0x43, 0xdd,
1807 0xb1, 0xd6, 0xaa, 0xad, 0xe3, 0xc4, 0xa0, 0xac,
1808
1809 0x7c, 0xa7, 0xf3, 0xfa, 0x52, 0x79, 0xbe, 0xf5,
1810 0x6f, 0x82, 0xcd, 0x7a, 0x2f, 0x38, 0x67, 0x2e,
1811 0x82, 0x48, 0x14, 0xe1, 0x07, 0x00, 0x30, 0x0a,
1812 0x05, 0x5e, 0x16, 0x30, 0xb8, 0xf1, 0xcb, 0x0e,
1813
1814 0x91, 0x9f, 0x5e, 0x94, 0x20, 0x10, 0xa4, 0x16,
1815 0xe2, 0xbf, 0x48, 0xcb, 0x46, 0x99, 0x3d, 0x3c,
1816 0xb6, 0xa5, 0x1c, 0x19, 0xba, 0xcf, 0x86, 0x47,
1817 0x85, 0xa0, 0x0b, 0xc2, 0xec, 0xff, 0x15, 0xd3,
1818
1819 0x50, 0x87, 0x5b, 0x24, 0x6e, 0xd5, 0x3e, 0x68,
1820 0xbe, 0x6f, 0x55, 0xbd, 0x7e, 0x05, 0xcf, 0xc2,
1821 0xb2, 0xed, 0x64, 0x32, 0x19, 0x8a, 0x64, 0x44,
1822 0xb6, 0xd8, 0xc2, 0x47, 0xfa, 0xb9, 0x41, 0xf5,
1823
1824 0x69, 0x76, 0x8b, 0x5c, 0x42, 0x93, 0x66, 0xf1,
1825 0xd3, 0xf0, 0x0f, 0x03, 0x45, 0xb9, 0x61, 0x23,
1826 0xd5, 0x62, 0x04, 0xc0, 0x1c, 0x63, 0xb2, 0x2c,
1827 0xe7, 0x8b, 0xaf, 0x11, 0x6e, 0x52, 0x5e, 0xd9,
1828
1829 0x0f, 0xde, 0xa3, 0x9f, 0xa4, 0x69, 0x49, 0x4d,
1830 0x38, 0x66, 0xc3, 0x1e, 0x05, 0xf2, 0x95, 0xff,
1831 0x21, 0xfe, 0xa8, 0xd4, 0xe6, 0xe1, 0x3d, 0x67,
1832 0xe4, 0x7c, 0xe7, 0x22, 0xe9, 0x69, 0x8a, 0x1c,
1833
1834 0x10, 0x48, 0xd6, 0x8e, 0xbc, 0xde, 0x76, 0xb8,
1835 0x6f, 0xcf, 0x97, 0x6e, 0xab, 0x8a, 0xa9, 0x79,
1836 0x02, 0x68, 0xb7, 0x06, 0x8e, 0x01, 0x7a, 0x8b,
1837 0x9b, 0x74, 0x94, 0x09, 0x51, 0x4f, 0x10, 0x53,
1838
1839 0x02, 0x7f, 0xd1, 0x6c, 0x37, 0x86, 0xea, 0x1b,
1840 0xac, 0x5f, 0x15, 0xcb, 0x79, 0x71, 0x1e, 0xe2,
1841 0xab, 0xe8, 0x2f, 0x5c, 0xf8, 0xb1, 0x3a, 0xe7,
1842 0x30, 0x30, 0xef, 0x5b, 0x9e, 0x44, 0x57, 0xe7,
1843
1844 0x5d, 0x13, 0x04, 0xf9, 0x88, 0xd6, 0x2d, 0xd6,
1845 0xfc, 0x4b, 0x94, 0xed, 0x38, 0xba, 0x83, 0x1d,
1846 0xa4, 0xb7, 0x63, 0x49, 0x71, 0xb6, 0xcd, 0x8e,
1847 0xc3, 0x25, 0xd9, 0xc6, 0x1c, 0x00, 0xf1, 0xdf,
1848
1849 0x73, 0x62, 0x7e, 0xd3, 0x74, 0x5a, 0x5e, 0x84,
1850 0x89, 0xf3, 0xa9, 0x5c, 0x69, 0x63, 0x9c, 0x32,
1851 0xcd, 0x6e, 0x1d, 0x53, 0x7a, 0x85, 0xf7, 0x5c,
1852 0xc8, 0x44, 0x72, 0x6e, 0x8a, 0x72, 0xfc, 0x00,
1853
1854 0x77, 0xad, 0x22, 0x00, 0x0f, 0x1d, 0x50, 0x78,
1855 0xf6, 0xb8, 0x66, 0x31, 0x8c, 0x66, 0x8f, 0x1a,
1856 0xd0, 0x3d, 0x5a, 0x5f, 0xce, 0xd5, 0x21, 0x9f,
1857 0x2e, 0xab, 0xbd, 0x0a, 0xa5, 0xc0, 0xf4, 0x60,
1858
1859 0xd1, 0x83, 0xf0, 0x44, 0x04, 0xa0, 0xd6, 0xf4,
1860 0x69, 0x55, 0x8e, 0x81, 0xfa, 0xb2, 0x4a, 0x16,
1861 0x79, 0x05, 0xab, 0x4c, 0x78, 0x78, 0x50, 0x2a,
1862 0xd3, 0xe3, 0x8f, 0xdb, 0xe6, 0x2a, 0x41, 0x55,
1863
1864 0x6c, 0xec, 0x37, 0x32, 0x57, 0x59, 0x53, 0x3c,
1865 0xe8, 0xf2, 0x5f, 0x36, 0x7c, 0x87, 0xbb, 0x55,
1866 0x78, 0xd6, 0x67, 0xae, 0x93, 0xf9, 0xe2, 0xfd,
1867 0x99, 0xbc, 0xbc, 0x5f, 0x2f, 0xbb, 0xa8, 0x8c,
1868
1869 0xf6, 0x51, 0x61, 0x39, 0x42, 0x0f, 0xcf, 0xf3,
1870 0xb7, 0x36, 0x1d, 0x86, 0x32, 0x2c, 0x4b, 0xd8,
1871 0x4c, 0x82, 0xf3, 0x35, 0xab, 0xb1, 0x52, 0xc4,
1872 0xa9, 0x34, 0x11, 0x37, 0x3a, 0xaa, 0x82, 0x20,
1873};
1874
1875/* Vector 14 */
1876static const uint8_t ciph_data_aes_xts_vect14_key1[] = {
1877 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
1878 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
1879 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69,
1880 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27,
1881};
1882static const uint8_t ciph_data_aes_xts_vect14_key2[] = {
1883 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
1884 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
1885 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37,
1886 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92,
1887};
1888static const uint8_t ciph_data_aes_xts_vect14_iv[16] = {
1889 0xff, 0xff, 0xff, 0xff, 0xff
1890};
1891static const uint8_t ciph_data_aes_xts_vect14_ptx[] = {
1892 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1893 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
1894 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
1895 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1896
1897 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
1898 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
1899 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1900 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
1901
1902 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1903 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
1904 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
1905 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
1906
1907 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1908 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
1909 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
1910 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
1911
1912 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1913 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1914 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1915 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
1916
1917 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
1918 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
1919 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
1920 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
1921
1922 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1923 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
1924 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
1925 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
1926
1927 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
1928 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
1929 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1930 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
1931
1932 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1933 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
1934 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
1935 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1936
1937 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
1938 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
1939 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
1940 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
1941
1942 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
1943 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
1944 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
1945 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
1946
1947 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
1948 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
1949 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
1950 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
1951
1952 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1953 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1954 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1955 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
1956
1957 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
1958 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
1959 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
1960 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
1961
1962 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
1963 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
1964 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
1965 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
1966
1967 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
1968 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
1969 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
1970 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
1971};
1972static const uint8_t ciph_data_aes_xts_vect14_ctx[] = {
1973 0x64, 0x49, 0x7e, 0x5a, 0x83, 0x1e, 0x4a, 0x93,
1974 0x2c, 0x09, 0xbe, 0x3e, 0x53, 0x93, 0x37, 0x6d,
1975 0xaa, 0x59, 0x95, 0x48, 0xb8, 0x16, 0x03, 0x1d,
1976 0x22, 0x4b, 0xbf, 0x50, 0xa8, 0x18, 0xed, 0x23,
1977
1978 0x50, 0xea, 0xe7, 0xe9, 0x60, 0x87, 0xc8, 0xa0,
1979 0xdb, 0x51, 0xad, 0x29, 0x0b, 0xd0, 0x0c, 0x1a,
1980 0xc1, 0x62, 0x08, 0x57, 0x63, 0x5b, 0xf2, 0x46,
1981 0xc1, 0x76, 0xab, 0x46, 0x3b, 0xe3, 0x0b, 0x80,
1982
1983 0x8d, 0xa5, 0x48, 0x08, 0x1a, 0xc8, 0x47, 0xb1,
1984 0x58, 0xe1, 0x26, 0x4b, 0xe2, 0x5b, 0xb0, 0x91,
1985 0x0b, 0xbc, 0x92, 0x64, 0x71, 0x08, 0x08, 0x94,
1986 0x15, 0xd4, 0x5f, 0xab, 0x1b, 0x3d, 0x26, 0x04,
1987
1988 0xe8, 0xa8, 0xef, 0xf1, 0xae, 0x40, 0x20, 0xcf,
1989 0xa3, 0x99, 0x36, 0xb6, 0x68, 0x27, 0xb2, 0x3f,
1990 0x37, 0x1b, 0x92, 0x20, 0x0b, 0xe9, 0x02, 0x51,
1991 0xe6, 0xd7, 0x3c, 0x5f, 0x86, 0xde, 0x5f, 0xd4,
1992
1993 0xa9, 0x50, 0x78, 0x19, 0x33, 0xd7, 0x9a, 0x28,
1994 0x27, 0x2b, 0x78, 0x2a, 0x2e, 0xc3, 0x13, 0xef,
1995 0xdf, 0xcc, 0x06, 0x28, 0xf4, 0x3d, 0x74, 0x4c,
1996 0x2d, 0xc2, 0xff, 0x3d, 0xcb, 0x66, 0x99, 0x9b,
1997
1998 0x50, 0xc7, 0xca, 0x89, 0x5b, 0x0c, 0x64, 0x79,
1999 0x1e, 0xea, 0xa5, 0xf2, 0x94, 0x99, 0xfb, 0x1c,
2000 0x02, 0x6f, 0x84, 0xce, 0x5b, 0x5c, 0x72, 0xba,
2001 0x10, 0x83, 0xcd, 0xdb, 0x5c, 0xe4, 0x54, 0x34,
2002
2003 0x63, 0x16, 0x65, 0xc3, 0x33, 0xb6, 0x0b, 0x11,
2004 0x59, 0x3f, 0xb2, 0x53, 0xc5, 0x17, 0x9a, 0x2c,
2005 0x8d, 0xb8, 0x13, 0x78, 0x2a, 0x00, 0x48, 0x56,
2006 0xa1, 0x65, 0x30, 0x11, 0xe9, 0x3f, 0xb6, 0xd8,
2007
2008 0x76, 0xc1, 0x83, 0x66, 0xdd, 0x86, 0x83, 0xf5,
2009 0x34, 0x12, 0xc0, 0xc1, 0x80, 0xf9, 0xc8, 0x48,
2010 0x59, 0x2d, 0x59, 0x3f, 0x86, 0x09, 0xca, 0x73,
2011 0x63, 0x17, 0xd3, 0x56, 0xe1, 0x3e, 0x2b, 0xff,
2012
2013 0x3a, 0x9f, 0x59, 0xcd, 0x9a, 0xeb, 0x19, 0xcd,
2014 0x48, 0x25, 0x93, 0xd8, 0xc4, 0x61, 0x28, 0xbb,
2015 0x32, 0x42, 0x3b, 0x37, 0xa9, 0xad, 0xfb, 0x48,
2016 0x2b, 0x99, 0x45, 0x3f, 0xbe, 0x25, 0xa4, 0x1b,
2017
2018 0xf6, 0xfe, 0xb4, 0xaa, 0x0b, 0xef, 0x5e, 0xd2,
2019 0x4b, 0xf7, 0x3c, 0x76, 0x29, 0x78, 0x02, 0x54,
2020 0x82, 0xc1, 0x31, 0x15, 0xe4, 0x01, 0x5a, 0xac,
2021 0x99, 0x2e, 0x56, 0x13, 0xa3, 0xb5, 0xc2, 0xf6,
2022
2023 0x85, 0xb8, 0x47, 0x95, 0xcb, 0x6e, 0x9b, 0x26,
2024 0x56, 0xd8, 0xc8, 0x81, 0x57, 0xe5, 0x2c, 0x42,
2025 0xf9, 0x78, 0xd8, 0x63, 0x4c, 0x43, 0xd0, 0x6f,
2026 0xea, 0x92, 0x8f, 0x28, 0x22, 0xe4, 0x65, 0xaa,
2027
2028 0x65, 0x76, 0xe9, 0xbf, 0x41, 0x93, 0x84, 0x50,
2029 0x6c, 0xc3, 0xce, 0x3c, 0x54, 0xac, 0x1a, 0x6f,
2030 0x67, 0xdc, 0x66, 0xf3, 0xb3, 0x01, 0x91, 0xe6,
2031 0x98, 0x38, 0x0b, 0xc9, 0x99, 0xb0, 0x5a, 0xbc,
2032
2033 0xe1, 0x9d, 0xc0, 0xc6, 0xdc, 0xc2, 0xdd, 0x00,
2034 0x1e, 0xc5, 0x35, 0xba, 0x18, 0xde, 0xb2, 0xdf,
2035 0x1a, 0x10, 0x10, 0x23, 0x10, 0x83, 0x18, 0xc7,
2036 0x5d, 0xc9, 0x86, 0x11, 0xa0, 0x9d, 0xc4, 0x8a,
2037
2038 0x0a, 0xcd, 0xec, 0x67, 0x6f, 0xab, 0xdf, 0x22,
2039 0x2f, 0x07, 0xe0, 0x26, 0xf0, 0x59, 0xb6, 0x72,
2040 0xb5, 0x6e, 0x5c, 0xbc, 0x8e, 0x1d, 0x21, 0xbb,
2041 0xd8, 0x67, 0xdd, 0x92, 0x72, 0x12, 0x05, 0x46,
2042
2043 0x81, 0xd7, 0x0e, 0xa7, 0x37, 0x13, 0x4c, 0xdf,
2044 0xce, 0x93, 0xb6, 0xf8, 0x2a, 0xe2, 0x24, 0x23,
2045 0x27, 0x4e, 0x58, 0xa0, 0x82, 0x1c, 0xc5, 0x50,
2046 0x2e, 0x2d, 0x0a, 0xb4, 0x58, 0x5e, 0x94, 0xde,
2047
2048 0x69, 0x75, 0xbe, 0x5e, 0x0b, 0x4e, 0xfc, 0xe5,
2049 0x1c, 0xd3, 0xe7, 0x0c, 0x25, 0xa1, 0xfb, 0xbb,
2050 0xd6, 0x09, 0xd2, 0x73, 0xad, 0x5b, 0x0d, 0x59,
2051 0x63, 0x1c, 0x53, 0x1f, 0x6a, 0x0a, 0x57, 0xb9,
2052};
2053
2054/*
2055 * XTS-AES-128 applied for a data unit that is not a multiple of 16 bytes
2056 */
2057
2058/* Vector 15 */
2059static const uint8_t ciph_data_aes_xts_vect15_key1[] = {
2060 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8,
2061 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0,
2062};
2063static const uint8_t ciph_data_aes_xts_vect15_key2[] = {
2064 0xbf, 0xbe, 0xbd, 0xbc, 0xbb, 0xba, 0xb9, 0xb8,
2065 0xb7, 0xb6, 0xb5, 0xb4, 0xb3, 0xb2, 0xb1, 0xb0,
2066};
2067static const uint8_t ciph_data_aes_xts_vect15_iv[16] = {
2068 0x9a, 0x78, 0x56, 0x34, 0x12
2069};
2070static const uint8_t ciph_data_aes_xts_vect15_ptx[] = {
2071 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
2072 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
2073 0x10
2074};
2075static const uint8_t ciph_data_aes_xts_vect15_ctx[] = {
2076 0x6c, 0x16, 0x25, 0xdb, 0x46, 0x71, 0x52, 0x2d,
2077 0x3d, 0x75, 0x99, 0x60, 0x1d, 0xe7, 0xca, 0x09,
2078 0xed
2079};
2080
2081/* Vector 16 */
2082static const uint8_t ciph_data_aes_xts_vect16_key1[] = {
2083 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8,
2084 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0,
2085};
2086static const uint8_t ciph_data_aes_xts_vect16_key2[] = {
2087 0xbf, 0xbe, 0xbd, 0xbc, 0xbb, 0xba, 0xb9, 0xb8,
2088 0xb7, 0xb6, 0xb5, 0xb4, 0xb3, 0xb2, 0xb1, 0xb0,
2089};
2090static const uint8_t ciph_data_aes_xts_vect16_iv[16] = {
2091 0x9a, 0x78, 0x56, 0x34, 0x12
2092};
2093static const uint8_t ciph_data_aes_xts_vect16_ptx[] = {
2094 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
2095 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
2096 0x10, 0x11
2097};
2098static const uint8_t ciph_data_aes_xts_vect16_ctx[] = {
2099 0xd0, 0x69, 0x44, 0x4b, 0x7a, 0x7e, 0x0c, 0xab,
2100 0x09, 0xe2, 0x44, 0x47, 0xd2, 0x4d, 0xeb, 0x1f,
2101 0xed, 0xbf
2102};
2103
2104/* Vector 17 */
2105static const uint8_t ciph_data_aes_xts_vect17_key1[] = {
2106 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8,
2107 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0,
2108};
2109static const uint8_t ciph_data_aes_xts_vect17_key2[] = {
2110 0xbf, 0xbe, 0xbd, 0xbc, 0xbb, 0xba, 0xb9, 0xb8,
2111 0xb7, 0xb6, 0xb5, 0xb4, 0xb3, 0xb2, 0xb1, 0xb0,
2112};
2113static const uint8_t ciph_data_aes_xts_vect17_iv[16] = {
2114 0x9a, 0x78, 0x56, 0x34, 0x12
2115};
2116static const uint8_t ciph_data_aes_xts_vect17_ptx[] = {
2117 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
2118 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
2119 0x10, 0x11, 0x12
2120};
2121static const uint8_t ciph_data_aes_xts_vect17_ctx[] = {
2122 0xe5, 0xdf, 0x13, 0x51, 0xc0, 0x54, 0x4b, 0xa1,
2123 0x35, 0x0b, 0x33, 0x63, 0xcd, 0x8e, 0xf4, 0xbe,
2124 0xed, 0xbf, 0x9d
2125};
2126
2127/* Vector 18 */
2128static const uint8_t ciph_data_aes_xts_vect18_key1[] = {
2129 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8,
2130 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0,
2131};
2132static const uint8_t ciph_data_aes_xts_vect18_key2[] = {
2133 0xbf, 0xbe, 0xbd, 0xbc, 0xbb, 0xba, 0xb9, 0xb8,
2134 0xb7, 0xb6, 0xb5, 0xb4, 0xb3, 0xb2, 0xb1, 0xb0,
2135};
2136static const uint8_t ciph_data_aes_xts_vect18_iv[16] = {
2137 0x9a, 0x78, 0x56, 0x34, 0x12
2138};
2139static const uint8_t ciph_data_aes_xts_vect18_ptx[] = {
2140 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
2141 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
2142 0x10, 0x11, 0x12, 0x13
2143};
2144static const uint8_t ciph_data_aes_xts_vect18_ctx[] = {
2145 0x9d, 0x84, 0xc8, 0x13, 0xf7, 0x19, 0xaa, 0x2c,
2146 0x7b, 0xe3, 0xf6, 0x61, 0x71, 0xc7, 0xc5, 0xc2,
2147 0xed, 0xbf, 0x9d, 0xac
2148};
2149
2150/* Vector 19 */
2151static const uint8_t ciph_data_aes_xts_vect19_key1[] = {
2152 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
2153 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
2154};
2155static const uint8_t ciph_data_aes_xts_vect19_key2[] = {
2156 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
2157 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
2158};
2159static const uint8_t ciph_data_aes_xts_vect19_iv[16] = {
2160 0x21, 0x43, 0x65, 0x87, 0xa9
2161};
2162static const uint8_t ciph_data_aes_xts_vect19_ptx[] = {
2163 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
2164 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
2165 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
2166 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
2167
2168 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
2169 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
2170 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
2171 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
2172
2173 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
2174 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
2175 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
2176 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
2177
2178 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
2179 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
2180 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
2181 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
2182
2183 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
2184 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
2185 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
2186 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
2187
2188 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
2189 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
2190 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
2191 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
2192
2193 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
2194 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
2195 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
2196 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
2197
2198 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
2199 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
2200 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
2201 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
2202
2203 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
2204 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
2205 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
2206 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
2207
2208 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
2209 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
2210 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
2211 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
2212
2213 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
2214 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
2215 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
2216 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
2217
2218 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
2219 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
2220 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
2221 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
2222
2223 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
2224 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
2225 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
2226 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
2227
2228 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
2229 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
2230 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
2231 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
2232
2233 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
2234 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
2235 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
2236 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
2237
2238 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
2239 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
2240 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
2241 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
2242};
2243static const uint8_t ciph_data_aes_xts_vect19_ctx[] = {
2244 0x38, 0xb4, 0x58, 0x12, 0xef, 0x43, 0xa0, 0x5b,
2245 0xd9, 0x57, 0xe5, 0x45, 0x90, 0x7e, 0x22, 0x3b,
2246 0x95, 0x4a, 0xb4, 0xaa, 0xf0, 0x88, 0x30, 0x3a,
2247 0xd9, 0x10, 0xea, 0xdf, 0x14, 0xb4, 0x2b, 0xe6,
2248
2249 0x8b, 0x24, 0x61, 0x14, 0x9d, 0x8c, 0x8b, 0xa8,
2250 0x5f, 0x99, 0x2b, 0xe9, 0x70, 0xbc, 0x62, 0x1f,
2251 0x1b, 0x06, 0x57, 0x3f, 0x63, 0xe8, 0x67, 0xbf,
2252 0x58, 0x75, 0xac, 0xaf, 0xa0, 0x4e, 0x42, 0xcc,
2253
2254 0xbd, 0x7b, 0xd3, 0xc2, 0xa0, 0xfb, 0x1f, 0xff,
2255 0x79, 0x1e, 0xc5, 0xec, 0x36, 0xc6, 0x6a, 0xe4,
2256 0xac, 0x1e, 0x80, 0x6d, 0x81, 0xfb, 0xf7, 0x09,
2257 0xdb, 0xe2, 0x9e, 0x47, 0x1f, 0xad, 0x38, 0x54,
2258
2259 0x9c, 0x8e, 0x66, 0xf5, 0x34, 0x5d, 0x7c, 0x1e,
2260 0xb9, 0x4f, 0x40, 0x5d, 0x1e, 0xc7, 0x85, 0xcc,
2261 0x6f, 0x6a, 0x68, 0xf6, 0x25, 0x4d, 0xd8, 0x33,
2262 0x9f, 0x9d, 0x84, 0x05, 0x7e, 0x01, 0xa1, 0x77,
2263
2264 0x41, 0x99, 0x04, 0x82, 0x99, 0x95, 0x16, 0xb5,
2265 0x61, 0x1a, 0x38, 0xf4, 0x1b, 0xb6, 0x47, 0x8e,
2266 0x6f, 0x17, 0x3f, 0x32, 0x08, 0x05, 0xdd, 0x71,
2267 0xb1, 0x93, 0x2f, 0xc3, 0x33, 0xcb, 0x9e, 0xe3,
2268
2269 0x99, 0x36, 0xbe, 0xea, 0x9a, 0xd9, 0x6f, 0xa1,
2270 0x0f, 0xb4, 0x11, 0x2b, 0x90, 0x17, 0x34, 0xdd,
2271 0xad, 0x40, 0xbc, 0x18, 0x78, 0x99, 0x5f, 0x8e,
2272 0x11, 0xae, 0xe7, 0xd1, 0x41, 0xa2, 0xf5, 0xd4,
2273
2274 0x8b, 0x7a, 0x4e, 0x1e, 0x7f, 0x0b, 0x2c, 0x04,
2275 0x83, 0x0e, 0x69, 0xa4, 0xfd, 0x13, 0x78, 0x41,
2276 0x1c, 0x2f, 0x28, 0x7e, 0xdf, 0x48, 0xc6, 0xc4,
2277 0xe5, 0xc2, 0x47, 0xa1, 0x96, 0x80, 0xf7, 0xfe,
2278
2279 0x41, 0xce, 0xfb, 0xd4, 0x9b, 0x58, 0x21, 0x06,
2280 0xe3, 0x61, 0x6c, 0xbb, 0xe4, 0xdf, 0xb2, 0x34,
2281 0x4b, 0x2a, 0xe9, 0x51, 0x93, 0x91, 0xf3, 0xe0,
2282 0xfb, 0x49, 0x22, 0x25, 0x4b, 0x1d, 0x6d, 0x2d,
2283
2284 0x19, 0xc6, 0xd4, 0xd5, 0x37, 0xb3, 0xa2, 0x6f,
2285 0x3b, 0xcc, 0x51, 0x58, 0x8b, 0x32, 0xf3, 0xec,
2286 0xa0, 0x82, 0x9b, 0x6a, 0x5a, 0xc7, 0x25, 0x78,
2287 0xfb, 0x81, 0x4f, 0xb4, 0x3c, 0xf8, 0x0d, 0x64,
2288
2289 0xa2, 0x33, 0xe3, 0xf9, 0x97, 0xa3, 0xf0, 0x26,
2290 0x83, 0x34, 0x2f, 0x2b, 0x33, 0xd2, 0x5b, 0x49,
2291 0x25, 0x36, 0xb9, 0x3b, 0xec, 0xb2, 0xf5, 0xe1,
2292 0xa8, 0xb8, 0x2f, 0x5b, 0x88, 0x33, 0x42, 0x72,
2293
2294 0x9e, 0x8a, 0xe0, 0x9d, 0x16, 0x93, 0x88, 0x41,
2295 0xa2, 0x1a, 0x97, 0xfb, 0x54, 0x3e, 0xea, 0x3b,
2296 0xbf, 0xf5, 0x9f, 0x13, 0xc1, 0xa1, 0x84, 0x49,
2297 0xe3, 0x98, 0x70, 0x1c, 0x1a, 0xd5, 0x16, 0x48,
2298
2299 0x34, 0x6c, 0xbc, 0x04, 0xc2, 0x7b, 0xb2, 0xda,
2300 0x3b, 0x93, 0xa1, 0x37, 0x2c, 0xca, 0xe5, 0x48,
2301 0xfb, 0x53, 0xbe, 0xe4, 0x76, 0xf9, 0xe9, 0xc9,
2302 0x17, 0x73, 0xb1, 0xbb, 0x19, 0x82, 0x83, 0x94,
2303
2304 0xd5, 0x5d, 0x3e, 0x1a, 0x20, 0xed, 0x69, 0x11,
2305 0x3a, 0x86, 0x0b, 0x68, 0x29, 0xff, 0xa8, 0x47,
2306 0x22, 0x46, 0x04, 0x43, 0x50, 0x70, 0x22, 0x1b,
2307 0x25, 0x7e, 0x8d, 0xff, 0x78, 0x36, 0x15, 0xd2,
2308
2309 0xca, 0xe4, 0x80, 0x3a, 0x93, 0xaa, 0x43, 0x34,
2310 0xab, 0x48, 0x2a, 0x0a, 0xfa, 0xc9, 0xc0, 0xae,
2311 0xda, 0x70, 0xb4, 0x5a, 0x48, 0x1d, 0xf5, 0xde,
2312 0xc5, 0xdf, 0x8c, 0xc0, 0xf4, 0x23, 0xc7, 0x7a,
2313
2314 0x5f, 0xd4, 0x6c, 0xd3, 0x12, 0x02, 0x1d, 0x4b,
2315 0x43, 0x88, 0x62, 0x41, 0x9a, 0x79, 0x1b, 0xe0,
2316 0x3b, 0xb4, 0xd9, 0x7c, 0x0e, 0x59, 0x57, 0x85,
2317 0x42, 0x53, 0x1b, 0xa4, 0x66, 0xa8, 0x3b, 0xaf,
2318
2319 0x92, 0xce, 0xfc, 0x15, 0x1b, 0x5c, 0xc1, 0x61,
2320 0x1a, 0x16, 0x78, 0x93, 0x81, 0x9b, 0x63, 0xfb,
2321 0x8a, 0x6b, 0x18, 0xe8, 0x6d, 0xe6, 0x02, 0x90,
2322 0xfa, 0x72, 0xb7, 0x97, 0xb0, 0xce, 0x59, 0xf3,
2323};
2324
2325/* AES-CCM test data from NIST Special Publication 800-38C */
2326
2327/*
2328 * Example1:
2329 * K: 40414243 44454647 48494a4b 4c4d4e4f
2330 * N: 10111213 141516
2331 * A: 00010203 04050607
2332 * P: 20212223
2333 * B: 4f101112 13141516 00000000 00000004
2334 * 00080001 02030405 06070000 00000000
2335 * 20212223 00000000 00000000 00000000
2336 * T: 6084341b
2337 * Ctr0: 07101112 13141516 00000000 00000000
2338 * S0: 2d281146 10676c26 32bad748 559a679a
2339 * Ctr1: 07101112 13141516 00000000 00000001
2340 * S1: 51432378 e474b339 71318484 103cddfb
2341 * C: 7162015b 4dac255d
2342 */
2343static const uint8_t ae_data_aes_ccm_vect1_key[] = {
2344 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
2345 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f
2346};
2347static const uint8_t ae_data_aes_ccm_vect1_nonce[] = {
2348 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16
2349};
2350static const uint8_t ae_data_aes_ccm_vect1_aad[] = {
2351 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
2352};
2353static const uint8_t ae_data_aes_ccm_vect1_ptx[] = {
2354 0x20, 0x21, 0x22, 0x23
2355};
2356static const uint8_t ae_data_aes_ccm_vect1_ctx[] = {
2357 0x71, 0x62, 0x01, 0x5b,
2358};
2359static const uint8_t ae_data_aes_ccm_vect1_tag[] = {
2360 0x4d, 0xac, 0x25, 0x5d
2361};
2362
2363/*
2364 * Example 2:
2365 * K: 40414243 44454647 48494a4b 4c4d4e4f
2366 * N: 10111213 14151617
2367 * A: 00010203 04050607 08090a0b 0c0d0e0f
2368 * P: 20212223 24252627 28292a2b 2c2d2e2f
2369 * B: 56101112 13141516 17000000 00000010
2370 * 00100001 02030405 06070809 0a0b0c0d
2371 * 0e0f0000 00000000 00000000 00000000
2372 * 20212223 24252627 28292a2b 2c2d2e2f
2373 * T: 7f479ffc a464
2374 * Ctr0: 06101112 13141516 17000000 00000000
2375 * S0: 6081d043 08a97dcc 20cdcc60 bf947b78
2376 * Ctr1: 06101112 13141516 17000000 00000001
2377 * S1: f280d2c3 75cf7945 20335db9 2b107712
2378 * C: d2a1f0e0 51ea5f62 081a7792 073d593d
2379 * 1fc64fbf accd
2380 */
2381static const uint8_t ae_data_aes_ccm_vect2_key[] = {
2382 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
2383 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f
2384};
2385static const uint8_t ae_data_aes_ccm_vect2_nonce[] = {
2386 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17
2387};
2388static const uint8_t ae_data_aes_ccm_vect2_aad[] = {
2389 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
2390 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
2391};
2392static const uint8_t ae_data_aes_ccm_vect2_ptx[] = {
2393 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
2394 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f
2395};
2396static const uint8_t ae_data_aes_ccm_vect2_ctx[] = {
2397 0xd2, 0xa1, 0xf0, 0xe0, 0x51, 0xea, 0x5f, 0x62,
2398 0x08, 0x1a, 0x77, 0x92, 0x07, 0x3d, 0x59, 0x3d,
2399};
2400static const uint8_t ae_data_aes_ccm_vect2_tag[] = {
2401 0x1f, 0xc6, 0x4f, 0xbf, 0xac, 0xcd
2402};
2403
2404/*
2405 * Example 3
2406 * K: 40414243 44454647 48494a4b 4c4d4e4f
2407 * N: 10111213 14151617 18191a1b
2408 * A: 00010203 04050607 08090a0b 0c0d0e0f
2409 * 10111213
2410 * P: 20212223 24252627 28292a2b 2c2d2e2f
2411 * 30313233 34353637
2412 * B: 5a101112 13141516 1718191a 1b000018
2413 * 00140001 02030405 06070809 0a0b0c0d
2414 * 0e0f1011 12130000 00000000 00000000
2415 * 20212223 24252627 28292a2b 2c2d2e2f
2416 * 30313233 34353637 00000000 00000000
2417 * T: 67c99240 c7d51048
2418 * Ctr0: 02101112 13141516 1718191a 1b000000
2419 * S0: 2f8a00bb 06658919 c3a040a6 eaed1a7f
2420 * Ctr1: 02101112 13141516 1718191a 1b000001
2421 * S1: c393238a d1923c5d b335c0c7 e1bac924
2422 * Ctr2: 02101112 13141516 1718191a 1b000002
2423 * S2: 514798ea 9077bc92 6c22ebef 2ac732dc
2424 * C: e3b201a9 f5b71a7a 9b1ceaec cd97e70b
2425 * 6176aad9 a4428aa5 484392fb c1b09951
2426 */
2427static const uint8_t ae_data_aes_ccm_vect3_key[] = {
2428 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
2429 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f
2430};
2431static const uint8_t ae_data_aes_ccm_vect3_nonce[] = {
2432 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
2433 0x18, 0x19, 0x1a, 0x1b
2434};
2435static const uint8_t ae_data_aes_ccm_vect3_aad[] = {
2436 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
2437 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
2438 0x10, 0x11, 0x12, 0x13
2439};
2440static const uint8_t ae_data_aes_ccm_vect3_ptx[] = {
2441 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
2442 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
2443 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37
2444};
2445static const uint8_t ae_data_aes_ccm_vect3_ctx[] = {
2446 0xe3, 0xb2, 0x01, 0xa9, 0xf5, 0xb7, 0x1a, 0x7a,
2447 0x9b, 0x1c, 0xea, 0xec, 0xcd, 0x97, 0xe7, 0x0b,
2448 0x61, 0x76, 0xaa, 0xd9, 0xa4, 0x42, 0x8a, 0xa5,
2449};
2450static const uint8_t ae_data_aes_ccm_vect3_tag[] = {
2451 0x48, 0x43, 0x92, 0xfb, 0xc1, 0xb0, 0x99, 0x51
2452};
2453
2454/*
2455 * AES-GCM vectors from the reviced "The Galois/Counter Mode of Operation
2456 * (GCM)" 2005-05-31 spec
2457 */
2458
2459/*
2460 * Test case 1
2461 * K 00000000000000000000000000000000
2462 * P
2463 * IV 000000000000000000000000
2464 * H 66e94bd4ef8a2c3b884cfa59ca342b2e
2465 * Y0 00000000000000000000000000000001
2466 * E(K, Y0) 58e2fccefa7e3061367f1d57a4e7455a
2467 * len(A)||len(C) 00000000000000000000000000000000
2468 * GHASH(H, A, C) 00000000000000000000000000000000
2469 * C
2470 * T 58e2fccefa7e3061367f1d57a4e7455a
2471 */
2472static const uint8_t ae_data_aes_gcm_vect1_key[] = {
2473 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2474 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
2475};
2476static const uint8_t ae_data_aes_gcm_vect1_nonce[] = {
2477 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2478 0x00, 0x00, 0x00, 0x00
2479};
2480#define ae_data_aes_gcm_vect1_aad NULL
2481#define ae_data_aes_gcm_vect1_ptx NULL
2482#define ae_data_aes_gcm_vect1_ctx NULL
2483static const uint8_t ae_data_aes_gcm_vect1_tag[] = {
2484 0x58, 0xe2, 0xfc, 0xce, 0xfa, 0x7e, 0x30, 0x61,
2485 0x36, 0x7f, 0x1d, 0x57, 0xa4, 0xe7, 0x45, 0x5a
2486};
2487
2488/*
2489 * Test case 2
2490 * K 00000000000000000000000000000000
2491 * P 00000000000000000000000000000000
2492 * IV 000000000000000000000000
2493 * H 66e94bd4ef8a2c3b884cfa59ca342b2e
2494 * Y0 00000000000000000000000000000001
2495 * E(K, Y0) 58e2fccefa7e3061367f1d57a4e7455a
2496 * Y1 00000000000000000000000000000002
2497 * E(K, Y1) 0388dace60b6a392f328c2b971b2fe78
2498 * X1 5e2ec746917062882c85b0685353deb7
2499 * len(A)||len(C) 00000000000000000000000000000080
2500 * GHASH(H, A, C) f38cbb1ad69223dcc3457ae5b6b0f885
2501 * C 0388dace60b6a392f328c2b971b2fe78
2502 * T ab6e47d42cec13bdf53a67b21257bddf
2503 */
2504
2505static const uint8_t ae_data_aes_gcm_vect2_key[] = {
2506 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2507 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
2508};
2509static const uint8_t ae_data_aes_gcm_vect2_nonce[] = {
2510 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2511 0x00, 0x00, 0x00, 0x00
2512};
2513#define ae_data_aes_gcm_vect2_aad NULL
2514static const uint8_t ae_data_aes_gcm_vect2_ptx[] = {
2515 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2516 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
2517};
2518static const uint8_t ae_data_aes_gcm_vect2_ctx[] = {
2519 0x03, 0x88, 0xda, 0xce, 0x60, 0xb6, 0xa3, 0x92,
2520 0xf3, 0x28, 0xc2, 0xb9, 0x71, 0xb2, 0xfe, 0x78
2521};
2522static const uint8_t ae_data_aes_gcm_vect2_tag[] = {
2523 0xab, 0x6e, 0x47, 0xd4, 0x2c, 0xec, 0x13, 0xbd,
2524 0xf5, 0x3a, 0x67, 0xb2, 0x12, 0x57, 0xbd, 0xdf
2525};
2526
2527/*
2528 * Test case 3
2529 * K feffe9928665731c6d6a8f9467308308
2530 * P d9313225f88406e5a55909c5aff5269a
2531 * 86a7a9531534f7da2e4c303d8a318a72
2532 * 1c3c0c95956809532fcf0e2449a6b525
2533 * b16aedf5aa0de657ba637b391aafd255
2534 * IV cafebabefacedbaddecaf888
2535 * H b83b533708bf535d0aa6e52980d53b78
2536 * Y0 cafebabefacedbaddecaf88800000001
2537 * E(K, Y0) 3247184b3c4f69a44dbcd22887bbb418
2538 * Y1 cafebabefacedbaddecaf88800000002
2539 * E(K, Y1) 9bb22ce7d9f372c1ee2b28722b25f206
2540 * Y2 cafebabefacedbaddecaf88800000003
2541 * E(K, Y2) 650d887c3936533a1b8d4e1ea39d2b5c
2542 * Y3 cafebabefacedbaddecaf88800000004
2543 * E(K, Y3) 3de91827c10e9a4f5240647ee5221f20
2544 * Y4 cafebabefacedbaddecaf88800000005
2545 * E(K, Y4) aac9e6ccc0074ac0873b9ba85d908bd0
2546 * X1 59ed3f2bb1a0aaa07c9f56c6a504647b
2547 * X2 b714c9048389afd9f9bc5c1d4378e052
2548 * X3 47400c6577b1ee8d8f40b2721e86ff10
2549 * X4 4796cf49464704b5dd91f159bb1b7f95
2550 * len(A)||len(C) 00000000000000000000000000000200
2551 * GHASH(H, A, C) 7f1b32b81b820d02614f8895ac1d4eac
2552 * C 42831ec2217774244b7221b784d0d49c
2553 * e3aa212f2c02a4e035c17e2329aca12e
2554 * 21d514b25466931c7d8f6a5aac84aa05
2555 * 1ba30b396a0aac973d58e091473f5985
2556 * T 4d5c2af327cd64a62cf35abd2ba6fab4
2557 */
2558
2559static const uint8_t ae_data_aes_gcm_vect3_key[] = {
2560 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
2561 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08
2562};
2563static const uint8_t ae_data_aes_gcm_vect3_nonce[] = {
2564 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
2565 0xde, 0xca, 0xf8, 0x88
2566};
2567#define ae_data_aes_gcm_vect3_aad NULL
2568static const uint8_t ae_data_aes_gcm_vect3_ptx[] = {
2569 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
2570 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
2571 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
2572 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
2573 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
2574 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
2575 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
2576 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55
2577};
2578static const uint8_t ae_data_aes_gcm_vect3_ctx[] = {
2579 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24,
2580 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c,
2581 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0,
2582 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e,
2583 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c,
2584 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05,
2585 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97,
2586 0x3d, 0x58, 0xe0, 0x91, 0x47, 0x3f, 0x59, 0x85
2587};
2588static const uint8_t ae_data_aes_gcm_vect3_tag[] = {
2589 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6,
2590 0x2c, 0xf3, 0x5a, 0xbd, 0x2b, 0xa6, 0xfa, 0xb4
2591};
2592
2593/*
2594 * Test case 4
2595 * K feffe9928665731c6d6a8f9467308308
2596 * P d9313225f88406e5a55909c5aff5269a
2597 * 86a7a9531534f7da2e4c303d8a318a72
2598 * 1c3c0c95956809532fcf0e2449a6b525
2599 * b16aedf5aa0de657ba637b39
2600 * A feedfacedeadbeeffeedfacedeadbeef
2601 * abaddad2
2602 * IV cafebabefacedbaddecaf888
2603 * H b83b533708bf535d0aa6e52980d53b78
2604 * Y0 cafebabefacedbaddecaf88800000001
2605 * E(K, Y0) 3247184b3c4f69a44dbcd22887bbb418
2606 * X1 ed56aaf8a72d67049fdb9228edba1322
2607 * X2 cd47221ccef0554ee4bb044c88150352
2608 * Y1 cafebabefacedbaddecaf88800000002
2609 * E(K, Y1) 9bb22ce7d9f372c1ee2b28722b25f206
2610 * Y2 cafebabefacedbaddecaf88800000003
2611 * E(K, Y2) 650d887c3936533a1b8d4e1ea39d2b5c
2612 * Y3 cafebabefacedbaddecaf88800000004
2613 * E(K, Y3) 3de91827c10e9a4f5240647ee5221f20
2614 * Y4 cafebabefacedbaddecaf88800000005
2615 * E(K, Y4) aac9e6ccc0074ac0873b9ba85d908bd0
2616 * X3 54f5e1b2b5a8f9525c23924751a3ca51
2617 * X4 324f585c6ffc1359ab371565d6c45f93
2618 * X5 ca7dd446af4aa70cc3c0cd5abba6aa1c
2619 * X6 1590df9b2eb6768289e57d56274c8570
2620 * len(A)||len(C) 00000000000000a000000000000001e0
2621 * GHASH(H, A, C) 698e57f70e6ecc7fd9463b7260a9ae5f
2622 * C 42831ec2217774244b7221b784d0d49c
2623 * e3aa212f2c02a4e035c17e2329aca12e
2624 * 21d514b25466931c7d8f6a5aac84aa05
2625 * 1ba30b396a0aac973d58e091
2626 * T 5bc94fbc3221a5db94fae95ae7121a47
2627 */
2628
2629static const uint8_t ae_data_aes_gcm_vect4_key[] = {
2630 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
2631 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08
2632};
2633static const uint8_t ae_data_aes_gcm_vect4_nonce[] = {
2634 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
2635 0xde, 0xca, 0xf8, 0x88
2636};
2637static const uint8_t ae_data_aes_gcm_vect4_aad[] = {
2638 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
2639 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
2640 0xab, 0xad, 0xda, 0xd2
2641};
2642static const uint8_t ae_data_aes_gcm_vect4_ptx[] = {
2643 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
2644 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
2645 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
2646 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
2647 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
2648 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
2649 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
2650 0xba, 0x63, 0x7b, 0x39
2651};
2652static const uint8_t ae_data_aes_gcm_vect4_ctx[] = {
2653 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24,
2654 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c,
2655 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0,
2656 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e,
2657 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c,
2658 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05,
2659 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97,
2660 0x3d, 0x58, 0xe0, 0x91
2661};
2662static const uint8_t ae_data_aes_gcm_vect4_tag[] = {
2663 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb,
2664 0x94, 0xfa, 0xe9, 0x5a, 0xe7, 0x12, 0x1a, 0x47
2665};
2666
2667/*
2668 * Test case 5
2669 * K feffe9928665731c6d6a8f9467308308
2670 * P d9313225f88406e5a55909c5aff5269a
2671 * 86a7a9531534f7da2e4c303d8a318a72
2672 * 1c3c0c95956809532fcf0e2449a6b525
2673 * b16aedf5aa0de657ba637b39
2674 * A feedfacedeadbeeffeedfacedeadbeef
2675 * abaddad2
2676 * IV cafebabefacedbad
2677 * H b83b533708bf535d0aa6e52980d53b78
2678 * N1 6f288b846e5fed9a18376829c86a6a16
2679 * len({})||len(IV ) 00000000000000000000000000000040
2680 * Y0 c43a83c4c4badec4354ca984db252f7d
2681 * E(K, Y0) e94ab9535c72bea9e089c93d48e62fb0
2682 * X1 ed56aaf8a72d67049fdb9228edba1322
2683 * X2 cd47221ccef0554ee4bb044c88150352
2684 * Y1 c43a83c4c4badec4354ca984db252f7e
2685 * E(K, Y1) b8040969d08295afd226fcda0ddf61cf
2686 * Y2 c43a83c4c4badec4354ca984db252f7f
2687 * E(K, Y2) ef3c83225af93122192ad5c4f15dfe51
2688 * Y3 c43a83c4c4badec4354ca984db252f80
2689 * E(K, Y3) 6fbc659571f72de104c67b609d2fde67
2690 * Y4 c43a83c4c4badec4354ca984db252f81
2691 * E(K, Y4) f8e3581441a1e950785c3ea1430c6fa6
2692 * X3 9379e2feae14649c86cf2250e3a81916
2693 * X4 65dde904c92a6b3db877c4817b50a5f4
2694 * X5 48c53cf863b49a1b0bbfc48c3baaa89d
2695 * X6 08c873f1c8cec3effc209a07468caab1
2696 * len(A)||len(C) 00000000000000a000000000000001e0
2697 * GHASH(H, A, C) df586bb4c249b92cb6922877e444d37b
2698 * C 61353b4c2806934a777ff51fa22a4755
2699 * 699b2a714fcdc6f83766e5f97b6c7423
2700 * 73806900e49f24b22b097544d4896b42
2701 * 4989b5e1ebac0f07c23f4598
2702 * T 3612d2e79e3b0785561be14aaca2fccb
2703 */
2704
2705static const uint8_t ae_data_aes_gcm_vect5_key[] = {
2706 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
2707 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08
2708};
2709static const uint8_t ae_data_aes_gcm_vect5_nonce[] = {
2710 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad
2711};
2712static const uint8_t ae_data_aes_gcm_vect5_aad[] = {
2713 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
2714 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
2715 0xab, 0xad, 0xda, 0xd2
2716};
2717static const uint8_t ae_data_aes_gcm_vect5_ptx[] = {
2718 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
2719 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
2720 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
2721 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
2722 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
2723 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
2724 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
2725 0xba, 0x63, 0x7b, 0x39
2726};
2727static const uint8_t ae_data_aes_gcm_vect5_ctx[] = {
2728 0x61, 0x35, 0x3b, 0x4c, 0x28, 0x06, 0x93, 0x4a,
2729 0x77, 0x7f, 0xf5, 0x1f, 0xa2, 0x2a, 0x47, 0x55,
2730 0x69, 0x9b, 0x2a, 0x71, 0x4f, 0xcd, 0xc6, 0xf8,
2731 0x37, 0x66, 0xe5, 0xf9, 0x7b, 0x6c, 0x74, 0x23,
2732 0x73, 0x80, 0x69, 0x00, 0xe4, 0x9f, 0x24, 0xb2,
2733 0x2b, 0x09, 0x75, 0x44, 0xd4, 0x89, 0x6b, 0x42,
2734 0x49, 0x89, 0xb5, 0xe1, 0xeb, 0xac, 0x0f, 0x07,
2735 0xc2, 0x3f, 0x45, 0x98
2736};
2737static const uint8_t ae_data_aes_gcm_vect5_tag[] = {
2738 0x36, 0x12, 0xd2, 0xe7, 0x9e, 0x3b, 0x07, 0x85,
2739 0x56, 0x1b, 0xe1, 0x4a, 0xac, 0xa2, 0xfc, 0xcb
2740};
2741
2742/*
2743 * Test case 6
2744 * K feffe9928665731c6d6a8f9467308308
2745 * P d9313225f88406e5a55909c5aff5269a
2746 * 86a7a9531534f7da2e4c303d8a318a72
2747 * 1c3c0c95956809532fcf0e2449a6b525
2748 * b16aedf5aa0de657ba637b39
2749 * A feedfacedeadbeeffeedfacedeadbeef
2750 * abaddad2
2751 * IV 9313225df88406e555909c5aff5269aa
2752 * 6a7a9538534f7da1e4c303d2a318a728
2753 * c3c0c95156809539fcf0e2429a6b5254
2754 * 16aedbf5a0de6a57a637b39b
2755 * H b83b533708bf535d0aa6e52980d53b78
2756 * N1 004d6599d7fb1634756e1e299d81630f
2757 * N2 88ffe8a3c8033df4b54d732f7f88408e
2758 * N3 24e694cfab657beabba8055aad495e23
2759 * N4 d8349a5eda24943c8fbb2ef5168b20cb
2760 * len({})||len(IV ) 000000000000000000000000000001e0
2761 * Y0 3bab75780a31c059f83d2a44752f9864
2762 * E(K, Y0) 7dc63b399f2d98d57ab073b6baa4138e
2763 * X1 ed56aaf8a72d67049fdb9228edba1322
2764 * X2 cd47221ccef0554ee4bb044c88150352
2765 * Y1 3bab75780a31c059f83d2a44752f9865
2766 * E(K, Y1) 55d37bbd9ad21353a6f93a690eca9e0e
2767 * Y2 3bab75780a31c059f83d2a44752f9866
2768 * E(K, Y2) 3836bbf6d696e672946a1a01404fa6d5
2769 * Y3 3bab75780a31c059f83d2a44752f9867
2770 * E(K, Y3) 1dd8a5316ecc35c3e313bca59d2ac94a
2771 * Y4 3bab75780a31c059f83d2a44752f9868
2772 * E(K, Y4) 6742982706a9f154f657d5dc94b746db
2773 * X3 31727669c63c6f078b5d22adbbbca384
2774 * X4 480c00db2679065a7ed2f771a53acacd
2775 * X5 1c1ae3c355e2214466a9923d2ba6ab35
2776 * X6 0694c6f16bb0275a48891d06590344b0
2777 * len(A)||len(C) 00000000000000a000000000000001e0
2778 * GHASH(H, A, C) 1c5afe9760d3932f3c9a878aac3dc3de
2779 * C 8ce24998625615b603a033aca13fb894
2780 * be9112a5c3a211a8ba262a3cca7e2ca7
2781 * 01e4a9a4fba43c90ccdcb281d48c7c6f
2782 * d62875d2aca417034c34aee5
2783 * T 619cc5aefffe0bfa462af43c1699d050
2784 */
2785
2786static const uint8_t ae_data_aes_gcm_vect6_key[] = {
2787 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
2788 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
2789};
2790static const uint8_t ae_data_aes_gcm_vect6_nonce[] = {
2791 0x93, 0x13, 0x22, 0x5d, 0xf8, 0x84, 0x06, 0xe5,
2792 0x55, 0x90, 0x9c, 0x5a, 0xff, 0x52, 0x69, 0xaa,
2793 0x6a, 0x7a, 0x95, 0x38, 0x53, 0x4f, 0x7d, 0xa1,
2794 0xe4, 0xc3, 0x03, 0xd2, 0xa3, 0x18, 0xa7, 0x28,
2795 0xc3, 0xc0, 0xc9, 0x51, 0x56, 0x80, 0x95, 0x39,
2796 0xfc, 0xf0, 0xe2, 0x42, 0x9a, 0x6b, 0x52, 0x54,
2797 0x16, 0xae, 0xdb, 0xf5, 0xa0, 0xde, 0x6a, 0x57,
2798 0xa6, 0x37, 0xb3, 0x9b,
2799};
2800static const uint8_t ae_data_aes_gcm_vect6_aad[] = {
2801 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
2802 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
2803 0xab, 0xad, 0xda, 0xd2,
2804};
2805static const uint8_t ae_data_aes_gcm_vect6_ptx[] = {
2806 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
2807 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
2808 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
2809 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
2810 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
2811 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
2812 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
2813 0xba, 0x63, 0x7b, 0x39,
2814};
2815static const uint8_t ae_data_aes_gcm_vect6_ctx[] = {
2816 0x8c, 0xe2, 0x49, 0x98, 0x62, 0x56, 0x15, 0xb6,
2817 0x03, 0xa0, 0x33, 0xac, 0xa1, 0x3f, 0xb8, 0x94,
2818 0xbe, 0x91, 0x12, 0xa5, 0xc3, 0xa2, 0x11, 0xa8,
2819 0xba, 0x26, 0x2a, 0x3c, 0xca, 0x7e, 0x2c, 0xa7,
2820 0x01, 0xe4, 0xa9, 0xa4, 0xfb, 0xa4, 0x3c, 0x90,
2821 0xcc, 0xdc, 0xb2, 0x81, 0xd4, 0x8c, 0x7c, 0x6f,
2822 0xd6, 0x28, 0x75, 0xd2, 0xac, 0xa4, 0x17, 0x03,
2823 0x4c, 0x34, 0xae, 0xe5,
2824};
2825static const uint8_t ae_data_aes_gcm_vect6_tag[] = {
2826 0x61, 0x9c, 0xc5, 0xae, 0xff, 0xfe, 0x0b, 0xfa,
2827 0x46, 0x2a, 0xf4, 0x3c, 0x16, 0x99, 0xd0, 0x50,
2828};
2829
2830/*
2831 * Test case 7
2832 * K 00000000000000000000000000000000
2833 * 0000000000000000
2834 * P
2835 * IV 000000000000000000000000
2836 * H aae06992acbf52a3e8f4a96ec9300bd7
2837 * Y0 00000000000000000000000000000001
2838 * E(K, Y0) cd33b28ac773f74ba00ed1f312572435
2839 * len(A)||len(C) 00000000000000000000000000000000
2840 * GHASH(H, A, C) 00000000000000000000000000000000
2841 * C
2842 * T cd33b28ac773f74ba00ed1f312572435
2843 */
2844
2845static const uint8_t ae_data_aes_gcm_vect7_key[] = {
2846 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2847 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2848 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2849};
2850static const uint8_t ae_data_aes_gcm_vect7_nonce[] = {
2851 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2852 0x00, 0x00, 0x00, 0x00,
2853};
2854#define ae_data_aes_gcm_vect7_aad NULL
2855#define ae_data_aes_gcm_vect7_ptx NULL
2856#define ae_data_aes_gcm_vect7_ctx NULL
2857static const uint8_t ae_data_aes_gcm_vect7_tag[] = {
2858 0xcd, 0x33, 0xb2, 0x8a, 0xc7, 0x73, 0xf7, 0x4b,
2859 0xa0, 0x0e, 0xd1, 0xf3, 0x12, 0x57, 0x24, 0x35,
2860};
2861
2862/*
2863 * Test case 8
2864 * K 00000000000000000000000000000000
2865 * 0000000000000000
2866 * P 00000000000000000000000000000000
2867 * IV 000000000000000000000000
2868 * H aae06992acbf52a3e8f4a96ec9300bd7
2869 * Y0 00000000000000000000000000000001
2870 * E(K, Y0) cd33b28ac773f74ba00ed1f312572435
2871 * Y1 00000000000000000000000000000002
2872 * E(K, Y1) 98e7247c07f0fe411c267e4384b0f600
2873 * X1 90e87315fb7d4e1b4092ec0cbfda5d7d
2874 * len(A)||len(C) 00000000000000000000000000000080
2875 * GHASH(H, A, C) e2c63f0ac44ad0e02efa05ab6743d4ce
2876 * C 98e7247c07f0fe411c267e4384b0f600
2877 * T 2ff58d80033927ab8ef4d4587514f0fb
2878 */
2879
2880static const uint8_t ae_data_aes_gcm_vect8_key[] = {
2881 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2882 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2883 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2884};
2885static const uint8_t ae_data_aes_gcm_vect8_nonce[] = {
2886 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2887 0x00, 0x00, 0x00, 0x00,
2888};
2889#define ae_data_aes_gcm_vect8_aad NULL
2890static const uint8_t ae_data_aes_gcm_vect8_ptx[] = {
2891 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2892 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2893};
2894static const uint8_t ae_data_aes_gcm_vect8_ctx[] = {
2895 0x98, 0xe7, 0x24, 0x7c, 0x07, 0xf0, 0xfe, 0x41,
2896 0x1c, 0x26, 0x7e, 0x43, 0x84, 0xb0, 0xf6, 0x00,
2897};
2898static const uint8_t ae_data_aes_gcm_vect8_tag[] = {
2899 0x2f, 0xf5, 0x8d, 0x80, 0x03, 0x39, 0x27, 0xab,
2900 0x8e, 0xf4, 0xd4, 0x58, 0x75, 0x14, 0xf0, 0xfb,
2901};
2902
2903/* Test case 9 */
2904static const uint8_t ae_data_aes_gcm_vect9_key[] = {
2905 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
2906 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
2907 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
2908};
2909static const uint8_t ae_data_aes_gcm_vect9_nonce[] = {
2910 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
2911 0xde, 0xca, 0xf8, 0x88,
2912};
2913#define ae_data_aes_gcm_vect9_aad NULL
2914static const uint8_t ae_data_aes_gcm_vect9_ptx[] = {
2915 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
2916 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
2917 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
2918 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
2919 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
2920 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
2921 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
2922 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55,
2923};
2924static const uint8_t ae_data_aes_gcm_vect9_ctx[] = {
2925 0x39, 0x80, 0xca, 0x0b, 0x3c, 0x00, 0xe8, 0x41,
2926 0xeb, 0x06, 0xfa, 0xc4, 0x87, 0x2a, 0x27, 0x57,
2927 0x85, 0x9e, 0x1c, 0xea, 0xa6, 0xef, 0xd9, 0x84,
2928 0x62, 0x85, 0x93, 0xb4, 0x0c, 0xa1, 0xe1, 0x9c,
2929 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25,
2930 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47,
2931 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9,
2932 0xcc, 0xda, 0x27, 0x10, 0xac, 0xad, 0xe2, 0x56,
2933};
2934static const uint8_t ae_data_aes_gcm_vect9_tag[] = {
2935 0x99, 0x24, 0xa7, 0xc8, 0x58, 0x73, 0x36, 0xbf,
2936 0xb1, 0x18, 0x02, 0x4d, 0xb8, 0x67, 0x4a, 0x14,
2937};
2938
2939/* Test case 10 */
2940static const uint8_t ae_data_aes_gcm_vect10_key[] = {
2941 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
2942 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
2943 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
2944};
2945static const uint8_t ae_data_aes_gcm_vect10_nonce[] = {
2946 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
2947 0xde, 0xca, 0xf8, 0x88,
2948};
2949static const uint8_t ae_data_aes_gcm_vect10_aad[] = {
2950 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
2951 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
2952 0xab, 0xad, 0xda, 0xd2,
2953};
2954static const uint8_t ae_data_aes_gcm_vect10_ptx[] = {
2955 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
2956 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
2957 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
2958 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
2959 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
2960 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
2961 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
2962 0xba, 0x63, 0x7b, 0x39,
2963};
2964static const uint8_t ae_data_aes_gcm_vect10_ctx[] = {
2965 0x39, 0x80, 0xca, 0x0b, 0x3c, 0x00, 0xe8, 0x41,
2966 0xeb, 0x06, 0xfa, 0xc4, 0x87, 0x2a, 0x27, 0x57,
2967 0x85, 0x9e, 0x1c, 0xea, 0xa6, 0xef, 0xd9, 0x84,
2968 0x62, 0x85, 0x93, 0xb4, 0x0c, 0xa1, 0xe1, 0x9c,
2969 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25,
2970 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47,
2971 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9,
2972 0xcc, 0xda, 0x27, 0x10,
2973};
2974static const uint8_t ae_data_aes_gcm_vect10_tag[] = {
2975 0x25, 0x19, 0x49, 0x8e, 0x80, 0xf1, 0x47, 0x8f,
2976 0x37, 0xba, 0x55, 0xbd, 0x6d, 0x27, 0x61, 0x8c,
2977};
2978
2979/* Test case 11 */
2980static const uint8_t ae_data_aes_gcm_vect11_key[] = {
2981 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
2982 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
2983 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
2984};
2985static const uint8_t ae_data_aes_gcm_vect11_nonce[] = {
2986 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
2987};
2988static const uint8_t ae_data_aes_gcm_vect11_aad[] = {
2989 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
2990 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
2991 0xab, 0xad, 0xda, 0xd2,
2992};
2993static const uint8_t ae_data_aes_gcm_vect11_ptx[] = {
2994 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
2995 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
2996 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
2997 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
2998 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
2999 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
3000 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
3001 0xba, 0x63, 0x7b, 0x39,
3002};
3003static const uint8_t ae_data_aes_gcm_vect11_ctx[] = {
3004 0x0f, 0x10, 0xf5, 0x99, 0xae, 0x14, 0xa1, 0x54,
3005 0xed, 0x24, 0xb3, 0x6e, 0x25, 0x32, 0x4d, 0xb8,
3006 0xc5, 0x66, 0x63, 0x2e, 0xf2, 0xbb, 0xb3, 0x4f,
3007 0x83, 0x47, 0x28, 0x0f, 0xc4, 0x50, 0x70, 0x57,
3008 0xfd, 0xdc, 0x29, 0xdf, 0x9a, 0x47, 0x1f, 0x75,
3009 0xc6, 0x65, 0x41, 0xd4, 0xd4, 0xda, 0xd1, 0xc9,
3010 0xe9, 0x3a, 0x19, 0xa5, 0x8e, 0x8b, 0x47, 0x3f,
3011 0xa0, 0xf0, 0x62, 0xf7,
3012};
3013static const uint8_t ae_data_aes_gcm_vect11_tag[] = {
3014 0x65, 0xdc, 0xc5, 0x7f, 0xcf, 0x62, 0x3a, 0x24,
3015 0x09, 0x4f, 0xcc, 0xa4, 0x0d, 0x35, 0x33, 0xf8,
3016};
3017
3018/* Test case 12 */
3019static const uint8_t ae_data_aes_gcm_vect12_key[] = {
3020 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
3021 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
3022 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
3023};
3024static const uint8_t ae_data_aes_gcm_vect12_nonce[] = {
3025 0x93, 0x13, 0x22, 0x5d, 0xf8, 0x84, 0x06, 0xe5,
3026 0x55, 0x90, 0x9c, 0x5a, 0xff, 0x52, 0x69, 0xaa,
3027 0x6a, 0x7a, 0x95, 0x38, 0x53, 0x4f, 0x7d, 0xa1,
3028 0xe4, 0xc3, 0x03, 0xd2, 0xa3, 0x18, 0xa7, 0x28,
3029 0xc3, 0xc0, 0xc9, 0x51, 0x56, 0x80, 0x95, 0x39,
3030 0xfc, 0xf0, 0xe2, 0x42, 0x9a, 0x6b, 0x52, 0x54,
3031 0x16, 0xae, 0xdb, 0xf5, 0xa0, 0xde, 0x6a, 0x57,
3032 0xa6, 0x37, 0xb3, 0x9b,
3033};
3034static const uint8_t ae_data_aes_gcm_vect12_aad[] = {
3035 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
3036 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
3037 0xab, 0xad, 0xda, 0xd2,
3038};
3039static const uint8_t ae_data_aes_gcm_vect12_ptx[] = {
3040 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
3041 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
3042 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
3043 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
3044 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
3045 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
3046 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
3047 0xba, 0x63, 0x7b, 0x39,
3048};
3049static const uint8_t ae_data_aes_gcm_vect12_ctx[] = {
3050 0xd2, 0x7e, 0x88, 0x68, 0x1c, 0xe3, 0x24, 0x3c,
3051 0x48, 0x30, 0x16, 0x5a, 0x8f, 0xdc, 0xf9, 0xff,
3052 0x1d, 0xe9, 0xa1, 0xd8, 0xe6, 0xb4, 0x47, 0xef,
3053 0x6e, 0xf7, 0xb7, 0x98, 0x28, 0x66, 0x6e, 0x45,
3054 0x81, 0xe7, 0x90, 0x12, 0xaf, 0x34, 0xdd, 0xd9,
3055 0xe2, 0xf0, 0x37, 0x58, 0x9b, 0x29, 0x2d, 0xb3,
3056 0xe6, 0x7c, 0x03, 0x67, 0x45, 0xfa, 0x22, 0xe7,
3057 0xe9, 0xb7, 0x37, 0x3b,
3058};
3059static const uint8_t ae_data_aes_gcm_vect12_tag[] = {
3060 0xdc, 0xf5, 0x66, 0xff, 0x29, 0x1c, 0x25, 0xbb,
3061 0xb8, 0x56, 0x8f, 0xc3, 0xd3, 0x76, 0xa6, 0xd9,
3062};
3063
3064/* Test case 13 */
3065static const uint8_t ae_data_aes_gcm_vect13_key[] = {
3066 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3067 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3068 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3069 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3070};
3071static const uint8_t ae_data_aes_gcm_vect13_nonce[] = {
3072 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3073 0x00, 0x00, 0x00, 0x00,
3074};
3075#define ae_data_aes_gcm_vect13_aad NULL
3076#define ae_data_aes_gcm_vect13_ptx NULL
3077#define ae_data_aes_gcm_vect13_ctx NULL
3078static const uint8_t ae_data_aes_gcm_vect13_tag[] = {
3079 0x53, 0x0f, 0x8a, 0xfb, 0xc7, 0x45, 0x36, 0xb9,
3080 0xa9, 0x63, 0xb4, 0xf1, 0xc4, 0xcb, 0x73, 0x8b,
3081};
3082
3083/* Test case 14 */
3084static const uint8_t ae_data_aes_gcm_vect14_key[] = {
3085 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3086 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3087 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3088 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3089};
3090static const uint8_t ae_data_aes_gcm_vect14_nonce[] = {
3091 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3092 0x00, 0x00, 0x00, 0x00,
3093};
3094#define ae_data_aes_gcm_vect14_aad NULL
3095static const uint8_t ae_data_aes_gcm_vect14_ptx[] = {
3096 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3097 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3098};
3099static const uint8_t ae_data_aes_gcm_vect14_ctx[] = {
3100 0xce, 0xa7, 0x40, 0x3d, 0x4d, 0x60, 0x6b, 0x6e,
3101 0x07, 0x4e, 0xc5, 0xd3, 0xba, 0xf3, 0x9d, 0x18,
3102};
3103static const uint8_t ae_data_aes_gcm_vect14_tag[] = {
3104 0xd0, 0xd1, 0xc8, 0xa7, 0x99, 0x99, 0x6b, 0xf0,
3105 0x26, 0x5b, 0x98, 0xb5, 0xd4, 0x8a, 0xb9, 0x19,
3106};
3107
3108/* Test case 15 */
3109static const uint8_t ae_data_aes_gcm_vect15_key[] = {
3110 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
3111 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
3112 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
3113 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
3114};
3115static const uint8_t ae_data_aes_gcm_vect15_nonce[] = {
3116 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
3117 0xde, 0xca, 0xf8, 0x88,
3118};
3119#define ae_data_aes_gcm_vect15_aad NULL
3120static const uint8_t ae_data_aes_gcm_vect15_ptx[] = {
3121 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
3122 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
3123 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
3124 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
3125 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
3126 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
3127 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
3128 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55,
3129};
3130static const uint8_t ae_data_aes_gcm_vect15_ctx[] = {
3131 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07,
3132 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d,
3133 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9,
3134 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa,
3135 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d,
3136 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38,
3137 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a,
3138 0xbc, 0xc9, 0xf6, 0x62, 0x89, 0x80, 0x15, 0xad,
3139};
3140static const uint8_t ae_data_aes_gcm_vect15_tag[] = {
3141 0xb0, 0x94, 0xda, 0xc5, 0xd9, 0x34, 0x71, 0xbd,
3142 0xec, 0x1a, 0x50, 0x22, 0x70, 0xe3, 0xcc, 0x6c,
3143};
3144
3145/* Test case 16 */
3146static const uint8_t ae_data_aes_gcm_vect16_key[] = {
3147 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
3148 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
3149 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
3150 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
3151};
3152static const uint8_t ae_data_aes_gcm_vect16_nonce[] = {
3153 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
3154 0xde, 0xca, 0xf8, 0x88,
3155};
3156static const uint8_t ae_data_aes_gcm_vect16_aad[] = {
3157 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
3158 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
3159 0xab, 0xad, 0xda, 0xd2,
3160};
3161static const uint8_t ae_data_aes_gcm_vect16_ptx[] = {
3162 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
3163 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
3164 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
3165 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
3166 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
3167 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
3168 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
3169 0xba, 0x63, 0x7b, 0x39,
3170};
3171static const uint8_t ae_data_aes_gcm_vect16_ctx[] = {
3172 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07,
3173 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d,
3174 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9,
3175 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa,
3176 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d,
3177 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38,
3178 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a,
3179 0xbc, 0xc9, 0xf6, 0x62,
3180};
3181static const uint8_t ae_data_aes_gcm_vect16_tag[] = {
3182 0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68,
3183 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b,
3184};
3185
3186/* Test case 17 */
3187static const uint8_t ae_data_aes_gcm_vect17_key[] = {
3188 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
3189 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
3190 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
3191 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
3192};
3193static const uint8_t ae_data_aes_gcm_vect17_nonce[] = {
3194 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad,
3195};
3196static const uint8_t ae_data_aes_gcm_vect17_aad[] = {
3197 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
3198 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
3199 0xab, 0xad, 0xda, 0xd2,
3200};
3201static const uint8_t ae_data_aes_gcm_vect17_ptx[] = {
3202 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
3203 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
3204 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
3205 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
3206 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
3207 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
3208 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
3209 0xba, 0x63, 0x7b, 0x39,
3210};
3211static const uint8_t ae_data_aes_gcm_vect17_ctx[] = {
3212 0xc3, 0x76, 0x2d, 0xf1, 0xca, 0x78, 0x7d, 0x32,
3213 0xae, 0x47, 0xc1, 0x3b, 0xf1, 0x98, 0x44, 0xcb,
3214 0xaf, 0x1a, 0xe1, 0x4d, 0x0b, 0x97, 0x6a, 0xfa,
3215 0xc5, 0x2f, 0xf7, 0xd7, 0x9b, 0xba, 0x9d, 0xe0,
3216 0xfe, 0xb5, 0x82, 0xd3, 0x39, 0x34, 0xa4, 0xf0,
3217 0x95, 0x4c, 0xc2, 0x36, 0x3b, 0xc7, 0x3f, 0x78,
3218 0x62, 0xac, 0x43, 0x0e, 0x64, 0xab, 0xe4, 0x99,
3219 0xf4, 0x7c, 0x9b, 0x1f,
3220};
3221static const uint8_t ae_data_aes_gcm_vect17_tag[] = {
3222 0x3a, 0x33, 0x7d, 0xbf, 0x46, 0xa7, 0x92, 0xc4,
3223 0x5e, 0x45, 0x49, 0x13, 0xfe, 0x2e, 0xa8, 0xf2,
3224};
3225
3226/* Test case 18 */
3227static const uint8_t ae_data_aes_gcm_vect18_key[] = {
3228 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
3229 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
3230 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
3231 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
3232};
3233static const uint8_t ae_data_aes_gcm_vect18_nonce[] = {
3234 0x93, 0x13, 0x22, 0x5d, 0xf8, 0x84, 0x06, 0xe5,
3235 0x55, 0x90, 0x9c, 0x5a, 0xff, 0x52, 0x69, 0xaa,
3236 0x6a, 0x7a, 0x95, 0x38, 0x53, 0x4f, 0x7d, 0xa1,
3237 0xe4, 0xc3, 0x03, 0xd2, 0xa3, 0x18, 0xa7, 0x28,
3238 0xc3, 0xc0, 0xc9, 0x51, 0x56, 0x80, 0x95, 0x39,
3239 0xfc, 0xf0, 0xe2, 0x42, 0x9a, 0x6b, 0x52, 0x54,
3240 0x16, 0xae, 0xdb, 0xf5, 0xa0, 0xde, 0x6a, 0x57,
3241 0xa6, 0x37, 0xb3, 0x9b,
3242};
3243static const uint8_t ae_data_aes_gcm_vect18_aad[] = {
3244 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
3245 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
3246 0xab, 0xad, 0xda, 0xd2,
3247};
3248static const uint8_t ae_data_aes_gcm_vect18_ptx[] = {
3249 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5,
3250 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a,
3251 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda,
3252 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72,
3253 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53,
3254 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25,
3255 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57,
3256 0xba, 0x63, 0x7b, 0x39,
3257};
3258static const uint8_t ae_data_aes_gcm_vect18_ctx[] = {
3259 0x5a, 0x8d, 0xef, 0x2f, 0x0c, 0x9e, 0x53, 0xf1,
3260 0xf7, 0x5d, 0x78, 0x53, 0x65, 0x9e, 0x2a, 0x20,
3261 0xee, 0xb2, 0xb2, 0x2a, 0xaf, 0xde, 0x64, 0x19,
3262 0xa0, 0x58, 0xab, 0x4f, 0x6f, 0x74, 0x6b, 0xf4,
3263 0x0f, 0xc0, 0xc3, 0xb7, 0x80, 0xf2, 0x44, 0x45,
3264 0x2d, 0xa3, 0xeb, 0xf1, 0xc5, 0xd8, 0x2c, 0xde,
3265 0xa2, 0x41, 0x89, 0x97, 0x20, 0x0e, 0xf8, 0x2e,
3266 0x44, 0xae, 0x7e, 0x3f,
3267};
3268static const uint8_t ae_data_aes_gcm_vect18_tag[] = {
3269 0xa4, 0x4a, 0x82, 0x66, 0xee, 0x1c, 0x8e, 0xb0,
3270 0xc8, 0xb5, 0xd4, 0xcf, 0x5a, 0xe9, 0xf1, 0x9a,
3271};
3272
3273/*
3274 * Test data generated with
3275 * http://www.mobilefish.com/services/rsa_key_generation/rsa_key_generation.php
3276 * selecting 1024 bit key
3277 */
3278static const uint8_t ac_rsassa_vect1_modulus[] = {
3279 0xab, 0x42, 0x30, 0x54, 0x02, 0x15, 0x19, 0x4f, 0x03, 0x15, 0x73, 0xdf,
3280 0x96, 0x4c, 0x23, 0xeb, 0xd3, 0xd5, 0xf2, 0xff, 0x17, 0xf4, 0x1f, 0x5c,
3281 0x41, 0x26, 0x3e, 0x20, 0x15, 0x6d, 0x0a, 0x70, 0x8d, 0x9e, 0x9e, 0x67,
3282 0x47, 0x87, 0x6a, 0x15, 0xb5, 0x40, 0x38, 0x99, 0x64, 0x90, 0xc1, 0x32,
3283 0x32, 0x95, 0xc7, 0x63, 0x0a, 0xac, 0x5b, 0xcc, 0x21, 0x6b, 0x51, 0x7b,
3284 0xa5, 0xef, 0x7b, 0x62, 0x12, 0x34, 0x2d, 0x8d, 0xb6, 0x0d, 0x24, 0x92,
3285 0xa4, 0x83, 0xd4, 0x3b, 0xa5, 0x29, 0xe2, 0x94, 0xfc, 0xcd, 0x5e, 0xcb,
3286 0xc6, 0x52, 0x7b, 0xf7, 0x65, 0x80, 0x1f, 0x63, 0xcb, 0x4f, 0x40, 0x27,
3287 0x5b, 0x2d, 0x2a, 0x9f, 0xce, 0x9b, 0x33, 0x97, 0xeb, 0xbe, 0xcb, 0x34,
3288 0x22, 0xff, 0x5f, 0x21, 0x21, 0xba, 0x75, 0xb3, 0xba, 0x8f, 0x00, 0x9e,
3289 0x08, 0x66, 0x86, 0x4a, 0x8e, 0x40, 0xb2, 0x5f
3290};
3291static const uint8_t ac_rsassa_vect1_pub_exp[] = {
3292 0x01, 0x00, 0x01
3293};
3294static const uint8_t ac_rsassa_vect1_priv_exp[] = {
3295 0x91, 0xaa, 0x4f, 0xae, 0xf4, 0xc2, 0x7b, 0x6f, 0x60, 0x21, 0x1c, 0x18,
3296 0xde, 0x1e, 0xcf, 0x22, 0xe4, 0x60, 0x83, 0x3a, 0x04, 0x66, 0xc9, 0x51,
3297 0xcf, 0xbc, 0x36, 0x75, 0x55, 0xa4, 0x14, 0x90, 0x1d, 0x75, 0x00, 0x28,
3298 0xba, 0x87, 0x6c, 0x6d, 0x20, 0x68, 0x8a, 0x7b, 0xb6, 0x35, 0x05, 0x8e,
3299 0xab, 0xc6, 0x07, 0xfc, 0xae, 0xf4, 0x61, 0x74, 0x24, 0x2c, 0xc2, 0xf6,
3300 0xd7, 0xf1, 0xf5, 0x4f, 0xd3, 0x68, 0x86, 0x9b, 0x40, 0x47, 0x74, 0x51,
3301 0x2a, 0xe3, 0x87, 0xe3, 0x6f, 0x8c, 0x2e, 0x71, 0xb9, 0xe1, 0x49, 0x62,
3302 0x8b, 0x1f, 0x00, 0x92, 0x51, 0x82, 0x5b, 0x56, 0xeb, 0x55, 0x4e, 0x17,
3303 0x67, 0x91, 0x74, 0xc3, 0x01, 0xdc, 0x34, 0xda, 0x56, 0x03, 0x3c, 0x5d,
3304 0x50, 0xb5, 0xa5, 0xf5, 0xd0, 0xe1, 0x84, 0x7f, 0x2c, 0x16, 0x86, 0x34,
3305 0x1d, 0xb1, 0x8f, 0xd9, 0xb4, 0x0b, 0x35, 0x79
3306};
3307static const uint8_t ac_rsassa_vect1_prime1[] = {
3308 0xec, 0xbb, 0x19, 0x15, 0xc6, 0x52, 0xee, 0xf2, 0x75, 0x0b, 0x2f, 0x4f,
3309 0x1b, 0x2e, 0xd5, 0x14, 0x13, 0x26, 0xb4, 0xb4, 0x8d, 0x1d, 0xbd, 0x27,
3310 0xbb, 0x38, 0xba, 0x2f, 0xa7, 0xc7, 0xb6, 0x76, 0x88, 0xad, 0x73, 0x24,
3311 0x56, 0xe4, 0xd6, 0x9e, 0xe1, 0x20, 0x50, 0x4e, 0x90, 0x09, 0xb1, 0xf7,
3312 0x58, 0x1f, 0x47, 0x82, 0x88, 0xe7, 0xd8, 0xab, 0x3c, 0x1c, 0x9d, 0xc1,
3313 0xa7, 0x79, 0x5c, 0x65
3314};
3315static const uint8_t ac_rsassa_vect1_prime2[] = {
3316 0xb9, 0x32, 0xce, 0x2d, 0x38, 0xb4, 0x21, 0x7f, 0x9e, 0x79, 0x36, 0xf8,
3317 0x6a, 0xf4, 0x99, 0xae, 0x57, 0x1b, 0xd6, 0x1c, 0x53, 0xf7, 0xf9, 0x61,
3318 0xed, 0x47, 0xca, 0x7d, 0x76, 0xd7, 0x4e, 0xc6, 0x59, 0x51, 0x2d, 0xea,
3319 0x91, 0x0f, 0xdf, 0x56, 0x77, 0xa9, 0x2e, 0xf7, 0x63, 0x57, 0x14, 0x93,
3320 0x3b, 0x6f, 0x39, 0x4d, 0x88, 0x18, 0x2f, 0x78, 0xfc, 0xa3, 0xdb, 0xf6,
3321 0xc0, 0x05, 0xdd, 0x73
3322};
3323static const uint8_t ac_rsassa_vect1_exp1[] = {
3324 0xaa, 0xa7, 0x45, 0xb2, 0x18, 0xc1, 0xf8, 0x56, 0xf8, 0x61, 0x13, 0xbd,
3325 0xa7, 0x0e, 0xdf, 0xb4, 0x15, 0x0a, 0x36, 0x02, 0x62, 0x28, 0x2a, 0x0f,
3326 0xd6, 0x3b, 0x52, 0x9c, 0xc0, 0x0a, 0x8c, 0x52, 0x6e, 0xbc, 0xfa, 0xe0,
3327 0x1b, 0x73, 0xe3, 0xf3, 0xac, 0xbe, 0xaa, 0xa5, 0xb7, 0xd8, 0x05, 0x5f,
3328 0x15, 0x3b, 0x97, 0x45, 0x56, 0x84, 0x2c, 0x01, 0x64, 0xd8, 0x0c, 0x31,
3329 0x6a, 0x15, 0x66, 0xb1
3330};
3331static const uint8_t ac_rsassa_vect1_exp2[] = {
3332 0x82, 0xec, 0x11, 0xa9, 0x12, 0x5e, 0xf5, 0x17, 0x7c, 0xf6, 0x80, 0x0f,
3333 0xd9, 0xbc, 0x95, 0x30, 0x14, 0x50, 0x8f, 0x6a, 0x73, 0x49, 0xe8, 0x38,
3334 0x7c, 0x3f, 0xb6, 0x3c, 0x3f, 0xd9, 0x31, 0xcd, 0x32, 0xb3, 0x1a, 0xdc,
3335 0xaa, 0x34, 0x28, 0x54, 0xbe, 0x3f, 0x11, 0xfe, 0xbd, 0x71, 0x80, 0x10,
3336 0x1d, 0x82, 0x21, 0x66, 0x58, 0x01, 0x90, 0xfd, 0xdc, 0xcc, 0x11, 0xe2,
3337 0x3c, 0x19, 0x69, 0x55
3338};
3339static const uint8_t ac_rsassa_vect1_coeff[] = {
3340 0x2b, 0x9b, 0x48, 0xc0, 0xe1, 0xcb, 0x28, 0x9c, 0x03, 0xb2, 0xcf, 0xc6,
3341 0xf6, 0xbb, 0xbe, 0x1b, 0xad, 0xe6, 0x3b, 0xd3, 0x65, 0xbb, 0xca, 0xb7,
3342 0x43, 0x17, 0x8e, 0x3d, 0xb1, 0x6d, 0xc3, 0x06, 0xad, 0x7d, 0xe8, 0x81,
3343 0xb9, 0x5a, 0x13, 0xad, 0x18, 0x46, 0xcd, 0x93, 0xb6, 0x44, 0x1f, 0xd0,
3344 0x4d, 0x73, 0xb1, 0x00, 0x4d, 0x46, 0xc8, 0x22, 0x4a, 0x7e, 0xb8, 0xe6,
3345 0xdd, 0xae, 0x5f, 0x40
3346};
3347static const uint8_t ac_rsassa_vect1_ptx[] = {
3348 0x91, 0x07, 0xf4, 0x49, 0x0a, 0xf9, 0x99, 0x12, 0xaa, 0x95, 0x02, 0x76,
3349 0x95, 0x1b, 0xfa, 0x94, 0x32, 0xbf
3350};
3351static const uint8_t ac_rsassa_vect1_out[] = {
3352 0x5f, 0xf8, 0xc0, 0x00, 0x4b, 0xd6, 0x5a, 0x3b, 0xf9, 0x34, 0xad, 0xca,
3353 0x24, 0x8f, 0x8f, 0x99, 0xba, 0x24, 0xb3, 0x84, 0x1b, 0x82, 0xff, 0xdb,
3354 0x35, 0x00, 0xa0, 0x66, 0x62, 0xc3, 0x85, 0x4d, 0xfc, 0x4b, 0x42, 0xce,
3355 0xd1, 0x29, 0x39, 0x04, 0x16, 0xcb, 0xa2, 0x53, 0x12, 0x5d, 0x71, 0x5c,
3356 0xcd, 0x37, 0xcb, 0x0a, 0x5d, 0x07, 0xdd, 0xb2, 0x18, 0x94, 0x47, 0x2a,
3357 0x82, 0x64, 0x7a, 0xd3, 0xbb, 0x83, 0xc5, 0x9c, 0x50, 0x85, 0x65, 0x94,
3358 0x0f, 0x01, 0xfe, 0x20, 0xa0, 0x83, 0x4f, 0x3b, 0x78, 0x99, 0x48, 0x94,
3359 0x36, 0xaf, 0x4a, 0xac, 0x89, 0xfa, 0xf6, 0xf8, 0x42, 0x86, 0xa5, 0xbe,
3360 0x0d, 0xb3, 0x39, 0x42, 0xa0, 0x70, 0x56, 0x5f, 0xea, 0xc6, 0x8f, 0x31,
3361 0xfe, 0x56, 0x56, 0xac, 0xf7, 0x4c, 0x9b, 0x8a, 0x06, 0x5a, 0xbd, 0x61,
3362 0x92, 0xfc, 0xef, 0x4b, 0x26, 0x36, 0x6d, 0x91
3363};
3364
3365
3366/*
3367 * Test data generated with
3368 * http://www.mobilefish.com/services/rsa_key_generation/rsa_key_generation.php
3369 * selecting 2048 bit key
3370 */
3371static const uint8_t ac_rsassa_vect2_modulus[] = {
3372 0x9a, 0x83, 0xda, 0x0e, 0xfb, 0xa1, 0x77, 0xc5, 0x34, 0x88, 0xac, 0x3d,
3373 0xd1, 0x3e, 0x89, 0x3e, 0xca, 0xad, 0x40, 0x47, 0xdc, 0xff, 0xc6, 0x18,
3374 0xc3, 0x1a, 0x95, 0xd3, 0x82, 0xb9, 0x98, 0xa8, 0xec, 0x90, 0xbe, 0xab,
3375 0xef, 0x74, 0xb7, 0x58, 0xa0, 0x0d, 0x0f, 0xb5, 0x13, 0xb8, 0x7e, 0xf7,
3376 0xdb, 0x19, 0x77, 0x55, 0xc5, 0xed, 0xa6, 0x60, 0xa7, 0xaf, 0xea, 0x83,
3377 0x69, 0xcf, 0xcf, 0x50, 0x51, 0x94, 0xa7, 0xc0, 0x96, 0x68, 0xe6, 0x63,
3378 0xef, 0xdf, 0xa8, 0x28, 0x4a, 0x50, 0xbf, 0xd7, 0x44, 0xbf, 0x0b, 0x0a,
3379 0x41, 0xd6, 0x02, 0xfc, 0x3f, 0x06, 0x51, 0x82, 0xe4, 0x56, 0x3f, 0xe9,
3380 0x37, 0x40, 0xe0, 0xaa, 0x18, 0x56, 0xcb, 0x2e, 0xd4, 0x02, 0x66, 0xcc,
3381 0xfb, 0xbd, 0x6b, 0x34, 0xfd, 0x3d, 0x2c, 0xad, 0xeb, 0x8c, 0x7c, 0x85,
3382 0x09, 0xd1, 0x00, 0x4f, 0xaf, 0xc7, 0x9d, 0x25, 0x19, 0x45, 0x3a, 0x54,
3383 0x9d, 0xda, 0x4b, 0x3b, 0x11, 0x6b, 0xbc, 0x66, 0xb7, 0xb1, 0xa2, 0x79,
3384 0x1c, 0xd5, 0x38, 0x7a, 0x7b, 0x62, 0xae, 0x8a, 0x35, 0xc7, 0x4b, 0xdd,
3385 0x0e, 0x23, 0x78, 0xa3, 0xec, 0xcf, 0xe9, 0xa4, 0x26, 0x33, 0xca, 0x48,
3386 0x08, 0xc1, 0x3c, 0xb0, 0xe8, 0xfa, 0x2f, 0xbb, 0x75, 0x8a, 0x3d, 0x45,
3387 0xf4, 0xe5, 0x7a, 0x2f, 0x4d, 0xd8, 0x6f, 0x05, 0x14, 0x21, 0xb1, 0xfd,
3388 0xd1, 0xbb, 0x3c, 0xa7, 0x1d, 0x2f, 0xe7, 0x79, 0xc2, 0x99, 0x49, 0x25,
3389 0xef, 0x73, 0xd4, 0xe9, 0xbb, 0xf9, 0x1b, 0xeb, 0x0e, 0xb7, 0xdf, 0x53,
3390 0xc1, 0xdc, 0x41, 0xf9, 0x92, 0x01, 0x68, 0x63, 0x84, 0x52, 0x78, 0xfc,
3391 0xf8, 0x7f, 0x84, 0xa1, 0x47, 0xe3, 0x7c, 0x5b, 0x53, 0x82, 0x1b, 0x3a,
3392 0x78, 0x7a, 0xae, 0x8d, 0x6a, 0xef, 0x87, 0x38, 0x28, 0x14, 0x4c, 0xf5,
3393 0xd7, 0xb9, 0xd0, 0xad
3394};
3395static const uint8_t ac_rsassa_vect2_pub_exp[] = {
3396 0x01, 0x00, 0x01
3397};
3398static const uint8_t ac_rsassa_vect2_priv_exp[] = {
3399 0x73, 0xdd, 0x01, 0x0b, 0x91, 0x26, 0xb0, 0x00, 0x01, 0x77, 0xa6, 0xe8,
3400 0xa7, 0xd9, 0xe3, 0xe2, 0x60, 0xea, 0x6f, 0x34, 0x34, 0x04, 0xdb, 0x8f,
3401 0xbf, 0xe5, 0x54, 0x8a, 0x09, 0x11, 0x90, 0xe6, 0xc2, 0x95, 0x7b, 0x54,
3402 0xc4, 0x37, 0x5a, 0x30, 0xab, 0xbb, 0x7f, 0x96, 0xc1, 0xd5, 0xeb, 0xe7,
3403 0x81, 0xb4, 0xe3, 0xe6, 0x3e, 0x88, 0x08, 0xe5, 0x9b, 0x78, 0x6f, 0x3a,
3404 0xe1, 0x82, 0x41, 0xab, 0xb1, 0xb0, 0xed, 0xe5, 0x9d, 0x23, 0xc5, 0xf7,
3405 0x14, 0x6d, 0x3a, 0xd4, 0x13, 0x7d, 0xdf, 0x8c, 0xd5, 0x71, 0x08, 0x1f,
3406 0x45, 0xe4, 0xeb, 0xd2, 0x28, 0x94, 0x5d, 0x54, 0xf0, 0x51, 0xb8, 0x94,
3407 0xf1, 0xa8, 0xc5, 0x8e, 0xe6, 0xb7, 0x56, 0x9e, 0xa3, 0xbd, 0xb5, 0x46,
3408 0x6a, 0x52, 0xcc, 0x6c, 0x2c, 0xa4, 0xcd, 0xb7, 0x10, 0xd5, 0x04, 0x9e,
3409 0x62, 0x11, 0x05, 0xd1, 0xbb, 0x36, 0xcc, 0x9f, 0x55, 0x91, 0x21, 0x2e,
3410 0xe7, 0x10, 0x4a, 0xe9, 0xb1, 0xd2, 0xc7, 0x16, 0x45, 0x46, 0xd8, 0x9e,
3411 0xd4, 0xe6, 0x7e, 0x90, 0xc9, 0x33, 0xf0, 0x4e, 0x9d, 0x1f, 0x46, 0x79,
3412 0xcf, 0xcd, 0xf6, 0x77, 0x6a, 0x6c, 0x97, 0x77, 0x00, 0x3a, 0x78, 0x24,
3413 0x81, 0xec, 0x2a, 0xae, 0x51, 0x77, 0xa0, 0xb2, 0xc9, 0xb8, 0x4a, 0xca,
3414 0xab, 0x7a, 0x28, 0x3f, 0x99, 0x53, 0xa3, 0xab, 0xe8, 0x60, 0x7a, 0x6d,
3415 0x2e, 0xda, 0xa6, 0x90, 0x24, 0xf6, 0x34, 0x51, 0x22, 0x7d, 0x32, 0x81,
3416 0x0c, 0x50, 0xa5, 0x14, 0x69, 0x8b, 0xbc, 0x4e, 0x06, 0xcc, 0xc3, 0xe1,
3417 0x69, 0x5f, 0xaa, 0xc3, 0x99, 0x46, 0x2f, 0xb7, 0x86, 0xc9, 0x39, 0xba,
3418 0x58, 0x97, 0x4e, 0x40, 0xc1, 0x29, 0xe6, 0x0e, 0xa4, 0x7d, 0x4a, 0xdf,
3419 0x87, 0x8c, 0x93, 0x7c, 0x22, 0x67, 0xae, 0xbb, 0x0e, 0xfc, 0x05, 0x67,
3420 0x5f, 0xde, 0xe2, 0x21
3421};
3422static const uint8_t ac_rsassa_vect2_prime1[] = {
3423 0xcd, 0xff, 0x70, 0x4b, 0x87, 0xc8, 0xd3, 0xad, 0x23, 0xb4, 0xe9, 0x63,
3424 0x91, 0x50, 0xbd, 0x78, 0x28, 0x4f, 0x23, 0x5a, 0xd5, 0x32, 0x53, 0xae,
3425 0x04, 0xe5, 0x87, 0x9c, 0xb4, 0x18, 0x07, 0x90, 0x6e, 0xaa, 0x8a, 0xfe,
3426 0x1c, 0xfe, 0x60, 0x77, 0x85, 0x27, 0x87, 0x4b, 0x91, 0x72, 0x43, 0x9d,
3427 0xe1, 0x71, 0x39, 0xe4, 0x0e, 0x7d, 0x03, 0xa9, 0x5d, 0xbc, 0xc2, 0x02,
3428 0x87, 0xd9, 0x39, 0x98, 0xf0, 0x51, 0xac, 0x6a, 0x96, 0x7c, 0x00, 0xf9,
3429 0xe4, 0x95, 0x02, 0xb8, 0xbd, 0xf1, 0xae, 0x2c, 0x15, 0x5a, 0x12, 0x30,
3430 0x6e, 0x1d, 0xe4, 0x1e, 0x65, 0x65, 0xde, 0x2e, 0xdc, 0x93, 0x02, 0xc2,
3431 0xbb, 0x9f, 0x7e, 0xec, 0xa3, 0xc4, 0x8f, 0x05, 0x07, 0xce, 0xbb, 0x9a,
3432 0x53, 0x1c, 0x57, 0x77, 0x89, 0xff, 0x6c, 0xcb, 0xf8, 0xa1, 0xde, 0xbe,
3433 0x14, 0x4b, 0xee, 0xd6, 0xad, 0x27, 0x04, 0x99
3434};
3435static const uint8_t ac_rsassa_vect2_prime2[] = {
3436 0xc0, 0x05, 0x4f, 0x58, 0xa0, 0x22, 0x58, 0x60, 0x7b, 0xef, 0x87, 0x1f,
3437 0x87, 0x39, 0x47, 0x48, 0xa8, 0x86, 0x15, 0xd5, 0xf9, 0xb5, 0xf8, 0x71,
3438 0x81, 0xf9, 0xb7, 0x3e, 0x4a, 0xe8, 0x5d, 0xbc, 0xbf, 0x8f, 0x17, 0xc0,
3439 0x96, 0xdc, 0xc2, 0x7f, 0x5e, 0x60, 0x65, 0xe7, 0xa2, 0xc6, 0x30, 0x25,
3440 0x8b, 0xe9, 0xdb, 0x28, 0x10, 0xac, 0x02, 0x0e, 0x23, 0x0f, 0x14, 0x6b,
3441 0xff, 0xd4, 0x09, 0xdd, 0x7c, 0x06, 0x5d, 0xb2, 0x6e, 0x32, 0x49, 0x62,
3442 0xb7, 0x93, 0x5d, 0x24, 0x99, 0x03, 0x69, 0x9b, 0x60, 0x2e, 0x34, 0xa3,
3443 0x9f, 0x62, 0x33, 0xaf, 0xc5, 0xdc, 0x8f, 0x10, 0x61, 0xfa, 0xc5, 0x8d,
3444 0xa9, 0xcc, 0x86, 0x93, 0x7d, 0x1e, 0xa6, 0x7d, 0xcb, 0x6e, 0x69, 0xfe,
3445 0xe1, 0x3c, 0x64, 0x01, 0x58, 0xd8, 0x1a, 0x0f, 0xf8, 0xcc, 0x34, 0xe5,
3446 0x01, 0x2c, 0xb8, 0xf9, 0x90, 0x71, 0xe5, 0x35
3447};
3448static const uint8_t ac_rsassa_vect2_exp1[] = {
3449 0x8b, 0x46, 0xc7, 0x8f, 0xe9, 0xb0, 0x78, 0x9d, 0xb9, 0x64, 0x99, 0xdf,
3450 0xbd, 0xe2, 0x4f, 0x18, 0x2c, 0x78, 0xc5, 0x38, 0xa6, 0xa8, 0xae, 0x37,
3451 0x1c, 0x0c, 0x6c, 0x52, 0x20, 0xd9, 0x96, 0x53, 0xaa, 0xdf, 0x17, 0xb6,
3452 0x93, 0xb7, 0xd1, 0x55, 0x3d, 0xeb, 0xe9, 0xe7, 0xc7, 0xe0, 0xef, 0xa2,
3453 0x91, 0x48, 0x52, 0x91, 0xc4, 0xd1, 0xf5, 0x65, 0xcf, 0x80, 0xcd, 0xd3,
3454 0x94, 0x31, 0xe4, 0x65, 0x69, 0x26, 0x6f, 0x62, 0x69, 0x78, 0x51, 0xd8,
3455 0xa3, 0x19, 0xb4, 0x8b, 0x5f, 0xb1, 0x45, 0xc7, 0x7c, 0x70, 0x37, 0x98,
3456 0x12, 0xfb, 0x96, 0xbe, 0x8e, 0x63, 0xff, 0x82, 0xc3, 0x93, 0x89, 0xec,
3457 0x4b, 0x9a, 0x9c, 0xe0, 0x36, 0x21, 0xb1, 0x68, 0xff, 0x4c, 0x61, 0x3f,
3458 0x08, 0x2e, 0x43, 0x5d, 0x09, 0x2a, 0x6f, 0x4e, 0xc1, 0x3e, 0x00, 0x31,
3459 0x97, 0xdb, 0x77, 0x12, 0x22, 0x64, 0x1d, 0x11
3460};
3461static const uint8_t ac_rsassa_vect2_exp2[] = {
3462 0x88, 0x05, 0xfa, 0xec, 0x44, 0x1b, 0xb0, 0x51, 0x40, 0xda, 0x2f, 0xf5,
3463 0x14, 0x9c, 0x6d, 0xb3, 0xb9, 0xb5, 0xaa, 0x58, 0x36, 0x99, 0x42, 0x52,
3464 0x5e, 0x09, 0x60, 0x56, 0x5f, 0x47, 0xf5, 0xc7, 0x14, 0x47, 0xb0, 0x42,
3465 0xbc, 0x5b, 0xcb, 0xe7, 0xe0, 0x1a, 0x17, 0x76, 0x1c, 0x27, 0x9a, 0xc9,
3466 0xae, 0x30, 0x4e, 0x10, 0x36, 0xa7, 0x32, 0x99, 0x83, 0x1a, 0x56, 0x94,
3467 0x1e, 0xd8, 0xbc, 0xd8, 0x49, 0xd8, 0x54, 0x9d, 0x66, 0x54, 0x77, 0x09,
3468 0xd8, 0x13, 0x2b, 0x03, 0x16, 0xe5, 0x84, 0xf5, 0x0d, 0x10, 0x0e, 0x37,
3469 0xee, 0x5a, 0xe9, 0x54, 0x55, 0xac, 0x65, 0x27, 0xec, 0xd0, 0x71, 0x0b,
3470 0x66, 0x42, 0x3c, 0xfe, 0xd3, 0xbe, 0x57, 0xa0, 0x7a, 0xf0, 0x4f, 0x63,
3471 0xbf, 0x78, 0x41, 0x3b, 0x77, 0x0d, 0x36, 0x81, 0x23, 0xf4, 0xbc, 0x6f,
3472 0x91, 0x02, 0x76, 0x52, 0x4b, 0x91, 0x73, 0x15
3473};
3474static const uint8_t ac_rsassa_vect2_coeff[] = {
3475 0xb1, 0x70, 0x9b, 0x0c, 0xec, 0xc7, 0x8b, 0xc3, 0x50, 0xe4, 0x3a, 0x85,
3476 0xda, 0x6c, 0xf6, 0x36, 0x30, 0x27, 0xe5, 0xf5, 0xa2, 0x96, 0x1d, 0x78,
3477 0xa2, 0xd5, 0x89, 0xce, 0xef, 0xba, 0xd9, 0xfc, 0x3e, 0x91, 0x0e, 0x63,
3478 0x42, 0x31, 0x2d, 0x99, 0xd7, 0x47, 0x1d, 0xb2, 0x42, 0x56, 0xd3, 0x07,
3479 0x76, 0x31, 0x35, 0x92, 0x23, 0xcd, 0x81, 0x7d, 0xc2, 0x14, 0xfd, 0x90,
3480 0x71, 0xbb, 0x43, 0x5e, 0x8b, 0xec, 0x1f, 0x8a, 0xf5, 0xe6, 0x08, 0xee,
3481 0x26, 0x79, 0xa1, 0xb4, 0xee, 0x58, 0x99, 0x4c, 0xad, 0x91, 0x6a, 0xaa,
3482 0x5c, 0x4b, 0xbc, 0xbc, 0xad, 0xf7, 0xe1, 0xdd, 0x48, 0xfd, 0x98, 0x82,
3483 0x06, 0x11, 0xac, 0xc5, 0x74, 0xb5, 0xa9, 0x16, 0x4a, 0x6c, 0xc1, 0xae,
3484 0x25, 0x70, 0xde, 0x96, 0xcf, 0xad, 0x2a, 0x8b, 0x89, 0x39, 0x77, 0x94,
3485 0xae, 0x4b, 0x84, 0x02, 0x92, 0x0c, 0x05, 0x42
3486};
3487static const uint8_t ac_rsassa_vect2_ptx[] = {
3488 0x91, 0x07, 0xf4, 0x49, 0x0a, 0xf9, 0x99, 0x12, 0xaa, 0x95, 0x02, 0x76,
3489 0x95, 0x1b, 0xfa, 0x94, 0x32, 0xbf
3490};
3491static const uint8_t ac_rsassa_vect2_out[] = {
3492 0x47, 0x16, 0xe1, 0xee, 0x54, 0xb7, 0xe0, 0x8a, 0xcc, 0x5d, 0x1b, 0xae,
3493 0xde, 0xc1, 0x43, 0x09, 0xd8, 0x4d, 0xe3, 0xcd, 0x5f, 0xd5, 0x48, 0x51,
3494 0xd3, 0x1c, 0x62, 0x5d, 0x1c, 0x13, 0x0b, 0x05, 0x89, 0x77, 0xd6, 0x95,
3495 0x4e, 0x8f, 0x4a, 0x0a, 0x51, 0xc2, 0x0c, 0xcf, 0xfe, 0x4c, 0x24, 0x6d,
3496 0x0c, 0x73, 0x33, 0x46, 0xd9, 0xdf, 0xfe, 0x6e, 0x06, 0xcb, 0x8c, 0x79,
3497 0x32, 0x3f, 0xbd, 0x1d, 0x10, 0x3a, 0x60, 0x3c, 0xe8, 0x1c, 0xbe, 0xd9,
3498 0xa8, 0x00, 0x76, 0x5b, 0x6d, 0x7a, 0x62, 0xdd, 0x3c, 0x21, 0x53, 0x16,
3499 0xab, 0x0b, 0x6c, 0x8d, 0x43, 0xfd, 0xba, 0x9a, 0xd9, 0x9a, 0xc1, 0x21,
3500 0x0c, 0x79, 0x78, 0x93, 0x86, 0xbd, 0xdf, 0x63, 0xca, 0xc8, 0xd6, 0xc6,
3501 0x20, 0xc9, 0x08, 0xf6, 0xc8, 0xfe, 0x22, 0xa4, 0xc6, 0xe3, 0x49, 0xe4,
3502 0x63, 0x01, 0x03, 0x5b, 0x78, 0x63, 0x3a, 0x02, 0x9c, 0xa1, 0xed, 0x20,
3503 0x01, 0x10, 0x79, 0x2e, 0x8d, 0xe5, 0x70, 0xae, 0x1a, 0x5f, 0x72, 0x9e,
3504 0x31, 0xab, 0x21, 0xd3, 0xd7, 0x59, 0x5f, 0x26, 0xbf, 0x45, 0x31, 0x6d,
3505 0xc3, 0xa6, 0x45, 0x7b, 0x6d, 0x8e, 0x3c, 0xb0, 0x42, 0xb4, 0xeb, 0x09,
3506 0xcf, 0x54, 0x0a, 0x72, 0x38, 0xf8, 0x67, 0x83, 0xa7, 0x7b, 0xce, 0x52,
3507 0x74, 0x0f, 0x03, 0x9d, 0x09, 0x1f, 0xe7, 0xf0, 0x85, 0x27, 0x3e, 0x1d,
3508 0x2f, 0xea, 0x2d, 0xa8, 0xdc, 0x58, 0x00, 0x9b, 0xdc, 0x10, 0x95, 0xe4,
3509 0x5f, 0x69, 0x20, 0x11, 0x1c, 0x3c, 0x58, 0x27, 0xcd, 0x1f, 0x23, 0xc9,
3510 0x28, 0xfa, 0x98, 0x53, 0xce, 0xa6, 0xe6, 0x64, 0x20, 0x2e, 0xe1, 0x2b,
3511 0x35, 0x30, 0x4e, 0xb2, 0x14, 0xaa, 0x7f, 0x89, 0x6f, 0xa8, 0xb1, 0xd6,
3512 0x30, 0x2c, 0x7c, 0xe5, 0x26, 0xe4, 0xce, 0x61, 0x6c, 0xc6, 0x06, 0xbc,
3513 0xea, 0x26, 0x6f, 0xe4
3514};
3515
3516/*
Jerome Forissiere576f052018-03-23 21:24:21 +08003517 * 3072-bit RSA
3518 * Test data generated with:
3519 * openssl genrsa -out 3072.pem 3072
3520 * openssl rsa -in 3072.pem -text -noout
3521 * (dd if=/dev/zero bs=1 count=368; \
3522 * printf '\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10';) | \
3523 * openssl rsautl -encrypt -raw -inkey 3072.pem | od -t x1
3524 */
3525static const uint8_t ac_rsassa_vect18_modulus[] = {
3526 0xca, 0x72, 0xcc, 0xef, 0xad, 0x0a, 0xbe, 0xd6, 0x35, 0x16, 0x23, 0x93,
3527 0x16, 0x8f, 0xee, 0x31, 0x4c, 0xc2, 0x6f, 0x20, 0x99, 0x38, 0x69, 0xc1,
3528 0xcb, 0x57, 0x5f, 0x7e, 0x35, 0xba, 0x85, 0xa7, 0xe9, 0xe1, 0xe6, 0x1d,
3529 0x39, 0xc2, 0x41, 0x7d, 0xc3, 0xa3, 0xea, 0x6a, 0xdb, 0x5a, 0x07, 0x4a,
3530 0x4a, 0x3a, 0xcb, 0xce, 0xf2, 0xa0, 0xdd, 0xcd, 0x4b, 0x99, 0x67, 0x0d,
3531 0x38, 0xf1, 0x40, 0x41, 0xed, 0x5b, 0xb8, 0xf8, 0xea, 0xc7, 0xd9, 0x91,
3532 0x30, 0x42, 0x8d, 0xee, 0x48, 0xc4, 0x7c, 0x7f, 0x0d, 0x33, 0x7b, 0x8f,
3533 0x38, 0x18, 0xed, 0x7f, 0x02, 0x8c, 0x44, 0x52, 0x6a, 0x93, 0x37, 0xfd,
3534 0x6a, 0x27, 0x3e, 0xbf, 0x03, 0x78, 0xe3, 0xfc, 0x29, 0x83, 0x20, 0x65,
3535 0xe3, 0xfa, 0x2c, 0x93, 0xcb, 0x83, 0x90, 0x61, 0xd3, 0x1a, 0x9a, 0x65,
3536 0x53, 0xf0, 0xea, 0x2c, 0xf8, 0x61, 0x8d, 0x9f, 0x54, 0x22, 0x7e, 0x2e,
3537 0x1e, 0x36, 0x62, 0xd9, 0x9f, 0x7d, 0x56, 0xf4, 0xad, 0x61, 0xb6, 0x1a,
3538 0x7b, 0x40, 0x59, 0x10, 0x04, 0xff, 0xea, 0x16, 0x98, 0x36, 0x61, 0x9d,
3539 0x5c, 0x62, 0xcb, 0xf6, 0xc2, 0x95, 0x3b, 0x91, 0xc9, 0xff, 0xf0, 0x65,
3540 0x7e, 0x0e, 0xa2, 0x43, 0x89, 0x24, 0xaa, 0xdd, 0x0e, 0xed, 0xb0, 0x8c,
3541 0xb0, 0xb2, 0x4d, 0x80, 0x2a, 0x11, 0xcf, 0x35, 0xe9, 0x82, 0xc6, 0x67,
3542 0x37, 0x3b, 0xc9, 0xd5, 0xa1, 0xd8, 0x8e, 0x07, 0x93, 0xfd, 0xe7, 0x5a,
3543 0x54, 0xc6, 0xf0, 0xae, 0x82, 0x43, 0x86, 0x62, 0x70, 0x44, 0x09, 0xb7,
3544 0x62, 0x58, 0xb2, 0x17, 0x9f, 0x3c, 0xa5, 0x10, 0x60, 0xc6, 0x61, 0x47,
3545 0x83, 0x1f, 0x3e, 0xa7, 0xf2, 0x26, 0x5b, 0x70, 0xd5, 0x81, 0x47, 0x6a,
3546 0x78, 0xe0, 0x85, 0x16, 0x36, 0xc0, 0x2e, 0xbb, 0x01, 0x6c, 0x99, 0x19,
3547 0xeb, 0x22, 0xf5, 0x13, 0xe3, 0x38, 0x67, 0x9f, 0x85, 0xed, 0x0f, 0x05,
3548 0x22, 0x29, 0x34, 0xda, 0x4b, 0x8f, 0x44, 0xfa, 0x30, 0xf8, 0xe6, 0xc1,
3549 0xf6, 0x9d, 0x9b, 0xd6, 0x56, 0x81, 0x2c, 0x58, 0x4d, 0xf8, 0x90, 0xef,
3550 0xf9, 0xea, 0x31, 0x6f, 0x04, 0xd2, 0x8d, 0xc1, 0xc9, 0x6e, 0x90, 0xd1,
3551 0xff, 0xce, 0xab, 0x58, 0x9f, 0x98, 0x57, 0x7c, 0x7a, 0x79, 0x8a, 0xb2,
3552 0x3d, 0x32, 0x0d, 0x0c, 0x3b, 0x6a, 0xd4, 0x33, 0x49, 0x50, 0xe1, 0x41,
3553 0x3d, 0x07, 0x32, 0xfc, 0x6d, 0x9f, 0xfc, 0x8c, 0xad, 0x05, 0x74, 0xa9,
3554 0x37, 0x5e, 0x70, 0x0b, 0xe9, 0xdf, 0xc1, 0x96, 0xca, 0x7c, 0xca, 0xbd,
3555 0xab, 0x8e, 0x68, 0xd0, 0xf9, 0x3f, 0x5f, 0x90, 0xb4, 0x30, 0x17, 0x4d,
3556 0x3a, 0xf9, 0xa1, 0xf0, 0xcb, 0xc7, 0x54, 0xb3, 0xa6, 0x0f, 0xd7, 0xe7,
3557 0x68, 0x43, 0x5f, 0x39, 0xa6, 0x05, 0x83, 0x74, 0xf9, 0xd9, 0x94, 0xab
3558};
3559static const uint8_t ac_rsassa_vect18_pub_exp[] = {
3560 0x01, 0x00, 0x01
3561};
3562static const uint8_t ac_rsassa_vect18_priv_exp[] = {
3563 0xaf, 0xb1, 0xa9, 0xc1, 0x67, 0x7f, 0xa7, 0xd6, 0xe7, 0x03, 0x6b, 0xa4,
3564 0x3f, 0x34, 0x72, 0x17, 0x3e, 0xf2, 0x8e, 0xd6, 0xcf, 0xa2, 0x71, 0xc5,
3565 0xc9, 0xde, 0xed, 0xf4, 0xee, 0x54, 0x0d, 0xa2, 0x88, 0x0b, 0x90, 0x55,
3566 0x54, 0xc7, 0x0d, 0x67, 0x43, 0xde, 0x81, 0x96, 0x72, 0xff, 0x52, 0xcc,
3567 0x5a, 0x57, 0x64, 0x81, 0x19, 0x78, 0x1a, 0x86, 0x0c, 0x51, 0xf9, 0x69,
3568 0x34, 0x3d, 0xca, 0xf2, 0x6c, 0x37, 0xe9, 0xf3, 0xbc, 0x6d, 0xec, 0x97,
3569 0x60, 0x36, 0xa2, 0x4e, 0x65, 0xc0, 0x7f, 0xfb, 0x13, 0x4d, 0xd6, 0xb1,
3570 0x98, 0x91, 0xa9, 0xab, 0x4c, 0x5e, 0xc6, 0xfc, 0x6f, 0x99, 0x8c, 0x41,
3571 0xd5, 0x5a, 0x71, 0xcd, 0xfc, 0x09, 0x72, 0x72, 0x68, 0xe4, 0x6f, 0xbd,
3572 0x7d, 0x78, 0xa4, 0x2f, 0x2f, 0xb3, 0xe2, 0x1d, 0xc3, 0xc3, 0x96, 0xb2,
3573 0xd1, 0x82, 0x86, 0xf8, 0xb8, 0x26, 0x91, 0x6d, 0xf0, 0xea, 0x6e, 0x6f,
3574 0x3f, 0xb1, 0x1b, 0x60, 0x9a, 0x55, 0x80, 0x9d, 0x9f, 0xca, 0xe8, 0xeb,
3575 0x5a, 0x83, 0xa1, 0xc7, 0x91, 0x4f, 0x37, 0xac, 0x9c, 0x34, 0xb5, 0xca,
3576 0x87, 0x5f, 0x06, 0x7c, 0x04, 0xaa, 0xd6, 0xa3, 0xd3, 0x96, 0xd6, 0xde,
3577 0x7d, 0xe3, 0xdd, 0x56, 0x97, 0x32, 0xc7, 0x46, 0x49, 0xaa, 0x66, 0x49,
3578 0xf3, 0x1f, 0x0a, 0xbb, 0x6b, 0xc7, 0x40, 0xf9, 0x1c, 0xca, 0x6d, 0xbb,
3579 0xa2, 0x9a, 0xf4, 0xae, 0x38, 0xf6, 0x53, 0x12, 0xb9, 0xea, 0xef, 0x97,
3580 0xbd, 0xfa, 0x1d, 0xb3, 0x85, 0x25, 0x0e, 0x24, 0x8c, 0xd2, 0x2d, 0x6e,
3581 0x2d, 0xeb, 0xd0, 0x4c, 0x1f, 0x82, 0x99, 0x96, 0x7f, 0x7f, 0x55, 0x13,
3582 0x20, 0x24, 0xd0, 0xa3, 0x62, 0x47, 0x84, 0x24, 0x3e, 0x61, 0xc1, 0x97,
3583 0xa8, 0x56, 0x1a, 0x60, 0x88, 0x13, 0x36, 0x82, 0xc8, 0xfe, 0x8e, 0x96,
3584 0x83, 0x47, 0x40, 0xc4, 0x89, 0x5d, 0x8d, 0xb4, 0xa8, 0x4e, 0x44, 0x7e,
3585 0xc1, 0x72, 0x79, 0xd5, 0xc8, 0x10, 0x72, 0x76, 0x38, 0x84, 0x43, 0x92,
3586 0x17, 0x6b, 0x9e, 0xbd, 0xa8, 0x35, 0xbf, 0xe8, 0xb3, 0xd5, 0x97, 0xbf,
3587 0xb7, 0x6a, 0x3c, 0xca, 0xb9, 0x9c, 0x3f, 0x92, 0x94, 0xb3, 0x5d, 0x82,
3588 0xca, 0xa7, 0x19, 0xa4, 0x96, 0xa7, 0xbe, 0xfa, 0xc5, 0xd0, 0xb0, 0xf3,
3589 0x93, 0x8d, 0x2f, 0x39, 0x4a, 0x08, 0x5d, 0xfc, 0x5d, 0xfe, 0x99, 0x2a,
3590 0x4e, 0x3a, 0x90, 0x10, 0xc6, 0xf8, 0x4c, 0xe3, 0xae, 0xcb, 0xd5, 0x7f,
3591 0x18, 0xab, 0xe6, 0x3b, 0x48, 0xf5, 0xdf, 0x25, 0x51, 0xe4, 0xad, 0x3e,
3592 0x77, 0x60, 0x5d, 0x68, 0xa5, 0x91, 0xcb, 0x09, 0x6b, 0x2d, 0x98, 0x51,
3593 0x73, 0x6b, 0x5b, 0xa9, 0x45, 0xfa, 0xf5, 0xa1, 0xdc, 0x3b, 0x12, 0x05,
3594 0x70, 0x1d, 0x73, 0x63, 0x2d, 0xa3, 0x28, 0xac, 0x51, 0xe6, 0x0d, 0x61
3595};
3596static const uint8_t ac_rsassa_vect18_prime1[] = {
3597 0xea, 0x1e, 0xe9, 0x51, 0xc9, 0x72, 0xdf, 0x9e, 0x72, 0x8e, 0xea, 0xe8,
3598 0x09, 0x78, 0x52, 0x2e, 0xfe, 0x7f, 0x87, 0x6e, 0xc5, 0x04, 0x88, 0x6b,
3599 0x67, 0xf6, 0x2b, 0x0d, 0xd2, 0x0b, 0xfb, 0x4f, 0xa2, 0x1c, 0x8c, 0xf6,
3600 0x8a, 0xbe, 0x8b, 0x1b, 0x1c, 0xec, 0x7e, 0x75, 0xf8, 0xd9, 0xed, 0x55,
3601 0x04, 0x08, 0xcc, 0x2c, 0x8b, 0x67, 0xa8, 0xc2, 0xfb, 0x2e, 0x0d, 0xd9,
3602 0x14, 0x70, 0x13, 0xf7, 0x94, 0x15, 0x74, 0xdd, 0x23, 0x66, 0x45, 0x43,
3603 0x41, 0x30, 0xc8, 0xec, 0x06, 0x23, 0xfc, 0xd6, 0xaa, 0x9d, 0x95, 0xa6,
3604 0x2b, 0xee, 0x53, 0xf5, 0xd5, 0x6c, 0x01, 0x23, 0x42, 0xa9, 0x36, 0x93,
3605 0xe1, 0x03, 0x96, 0x01, 0xce, 0x55, 0x14, 0xc0, 0xc0, 0x46, 0x9b, 0x93,
3606 0xca, 0x8d, 0x45, 0xf7, 0x6a, 0x2c, 0x4e, 0x5b, 0x25, 0x63, 0x7b, 0xef,
3607 0xdd, 0x38, 0x75, 0x51, 0xc6, 0x12, 0x5a, 0xbd, 0x4a, 0x4a, 0xee, 0xbf,
3608 0x0d, 0xc4, 0x42, 0x45, 0xcc, 0xf0, 0xb6, 0x05, 0x59, 0x21, 0x84, 0xb1,
3609 0x1f, 0x2a, 0x5c, 0x25, 0x22, 0xb8, 0xea, 0xc5, 0x60, 0x23, 0x68, 0x0d,
3610 0xa3, 0xf2, 0xe8, 0x1c, 0xfe, 0x6f, 0xfd, 0x95, 0x8a, 0x33, 0xef, 0x4f,
3611 0x2e, 0x24, 0x90, 0xa7, 0x60, 0xd6, 0x5c, 0x72, 0x5a, 0xc5, 0xd7, 0x5b,
3612 0xcf, 0x50, 0x76, 0x32, 0xe5, 0xc3, 0x3d, 0xa7, 0xda, 0x65, 0x86, 0x97
3613};
3614static const uint8_t ac_rsassa_vect18_prime2[] = {
3615 0xdd, 0x5e, 0x29, 0xbb, 0x78, 0x73, 0x74, 0x49, 0xec, 0xd1, 0x71, 0x91,
3616 0xa6, 0x74, 0x11, 0xae, 0x4b, 0x64, 0x6a, 0x5b, 0x60, 0x89, 0x70, 0x0c,
3617 0x1a, 0x3e, 0x3d, 0x42, 0x02, 0xd9, 0x16, 0x18, 0xb5, 0x33, 0xf8, 0xda,
3618 0x7f, 0x76, 0x6d, 0xc3, 0xf2, 0xc1, 0xf6, 0x90, 0x97, 0x2a, 0xbe, 0xeb,
3619 0x15, 0x8a, 0x05, 0xc2, 0xa4, 0xb8, 0xb0, 0x80, 0xe4, 0xc4, 0xc8, 0xc4,
3620 0xb5, 0xcc, 0x1e, 0xf0, 0x02, 0x6e, 0x02, 0xef, 0x5e, 0x35, 0xdb, 0x2e,
3621 0x41, 0x2d, 0xbc, 0x23, 0x44, 0x41, 0xbc, 0x29, 0xbd, 0xa7, 0x70, 0x0c,
3622 0x06, 0x53, 0x12, 0x78, 0x9b, 0x7f, 0x51, 0xfe, 0xb5, 0x82, 0x9c, 0xc9,
3623 0xf6, 0x40, 0x8d, 0xf9, 0x25, 0xd2, 0xae, 0x3f, 0x54, 0x22, 0x62, 0x80,
3624 0x03, 0x1f, 0xa3, 0x14, 0xc3, 0x13, 0x9c, 0x3a, 0xee, 0x3b, 0x34, 0xa3,
3625 0x7e, 0xe2, 0x71, 0xe8, 0x9d, 0x7c, 0xbc, 0x0e, 0x01, 0x34, 0xd5, 0x6d,
3626 0x89, 0x62, 0xd0, 0xaf, 0xe6, 0x03, 0x76, 0x94, 0xe2, 0xdc, 0xea, 0x1a,
3627 0xc7, 0x55, 0x68, 0x81, 0x9d, 0xdc, 0xf7, 0xc9, 0x81, 0xc8, 0x0f, 0x7a,
3628 0x03, 0xc2, 0x83, 0x98, 0xde, 0xc4, 0x4a, 0x1c, 0x7a, 0xc6, 0x13, 0x01,
3629 0x01, 0x04, 0x9a, 0x39, 0x14, 0xa5, 0x8d, 0x6a, 0x47, 0xef, 0xa5, 0xc4,
3630 0x35, 0xee, 0x72, 0x8e, 0x83, 0xe1, 0x74, 0x4e, 0xe2, 0x7b, 0x19, 0x0d
3631};
3632static const uint8_t ac_rsassa_vect18_exp1[] = {
3633 0x9d, 0xde, 0x7a, 0x36, 0x4c, 0x40, 0xc9, 0xc9, 0x6e, 0x36, 0x30, 0xf0,
3634 0x86, 0x72, 0x3b, 0xf8, 0xb4, 0x64, 0x0a, 0x4f, 0x07, 0x4b, 0x27, 0x32,
3635 0x45, 0xc8, 0x19, 0x00, 0x18, 0xc3, 0x3b, 0x93, 0x57, 0x1d, 0x29, 0x70,
3636 0x95, 0xde, 0x26, 0xaf, 0x01, 0xb1, 0xf7, 0x14, 0x55, 0xd9, 0x9d, 0xcf,
3637 0xd6, 0x08, 0x98, 0xa4, 0xf0, 0xdb, 0xd5, 0x50, 0xa5, 0x4f, 0x48, 0xc7,
3638 0x38, 0xa0, 0xda, 0xd5, 0xf7, 0x65, 0x00, 0x88, 0x9d, 0x76, 0x38, 0xfe,
3639 0x40, 0xd7, 0x44, 0xa4, 0xe2, 0xff, 0x21, 0x5f, 0x1f, 0x6d, 0x63, 0x9b,
3640 0xc9, 0xc3, 0xcb, 0x99, 0xd9, 0x70, 0x1a, 0xd4, 0x4b, 0xff, 0x0e, 0x6e,
3641 0x69, 0x2c, 0xa1, 0xda, 0x55, 0xe7, 0xc9, 0x36, 0xb0, 0x70, 0xec, 0x37,
3642 0x9c, 0x3d, 0xe7, 0x10, 0x0e, 0xe8, 0x11, 0x6e, 0x24, 0xa8, 0x10, 0xca,
3643 0x8d, 0xc1, 0xa4, 0x5a, 0x9f, 0xd5, 0x80, 0x9a, 0x63, 0x9e, 0x63, 0x9f,
3644 0x31, 0x09, 0x46, 0x27, 0x0b, 0x2a, 0xc5, 0x92, 0x95, 0xa7, 0xa4, 0x72,
3645 0x4b, 0x31, 0xa5, 0x30, 0xe5, 0x59, 0x0b, 0xf6, 0x4b, 0xfd, 0x94, 0x0c,
3646 0x9e, 0xa1, 0x0d, 0x23, 0x7f, 0xee, 0xc4, 0x70, 0x31, 0xe1, 0x13, 0x5d,
3647 0xb1, 0x1f, 0xb6, 0xeb, 0x26, 0xc1, 0x65, 0x55, 0x37, 0x20, 0x71, 0x37,
3648 0xd7, 0x73, 0xca, 0x40, 0x47, 0xee, 0x7f, 0x84, 0xd0, 0x1f, 0xe5, 0xc1
3649};
3650static const uint8_t ac_rsassa_vect18_exp2[] = {
3651 0x6d, 0xdb, 0xa9, 0x42, 0x4c, 0x48, 0x9f, 0xd1, 0x80, 0x21, 0x81, 0x07,
3652 0x13, 0x60, 0x4e, 0xd5, 0xfc, 0xbc, 0x5c, 0xbb, 0xf4, 0x70, 0xc0, 0x96,
3653 0x80, 0xff, 0x9a, 0x4f, 0x04, 0x32, 0xcf, 0xf0, 0x7b, 0x1c, 0xcb, 0xc7,
3654 0x43, 0xb2, 0x76, 0x4e, 0xe4, 0x4e, 0xb6, 0x1a, 0x93, 0xaa, 0xb7, 0x0c,
3655 0xdb, 0xa7, 0x9f, 0xac, 0x35, 0x2b, 0x23, 0x0d, 0x14, 0x7b, 0x44, 0x57,
3656 0xbb, 0x11, 0x0d, 0xd9, 0x76, 0x9b, 0x3a, 0x01, 0xa8, 0xf3, 0x79, 0x4e,
3657 0xbf, 0x31, 0xff, 0x48, 0x51, 0x3b, 0x7e, 0x32, 0x08, 0xd8, 0xeb, 0x96,
3658 0x4c, 0x1d, 0x35, 0xf1, 0x7c, 0xd9, 0xf6, 0xcb, 0x3d, 0x31, 0x10, 0xb6,
3659 0x79, 0xeb, 0x17, 0x8a, 0x29, 0xe7, 0x20, 0x6a, 0x75, 0x4a, 0x8b, 0x2f,
3660 0x94, 0x5d, 0x43, 0x05, 0xae, 0xba, 0x30, 0xb2, 0x5e, 0x40, 0x2b, 0xa3,
3661 0x67, 0xf8, 0xe1, 0x26, 0xdb, 0xe1, 0x67, 0x42, 0x5b, 0xfe, 0xe8, 0x5c,
3662 0x6f, 0xee, 0x06, 0x3b, 0x05, 0x1f, 0x7a, 0xdd, 0xf0, 0xa8, 0x49, 0xd5,
3663 0xf8, 0x4e, 0xbe, 0x8a, 0x74, 0xd9, 0x90, 0x6f, 0x04, 0x65, 0x50, 0xa8,
3664 0xf0, 0xec, 0xbb, 0x7a, 0x46, 0x33, 0x8b, 0xc4, 0x0e, 0x79, 0xf6, 0x3c,
3665 0x6d, 0x50, 0xe7, 0x68, 0xa4, 0x82, 0x74, 0x67, 0xe6, 0x43, 0x5c, 0x34,
3666 0xbf, 0xbf, 0x12, 0x42, 0xff, 0xd8, 0x07, 0x6c, 0x8e, 0xa1, 0x20, 0x91
3667};
3668static const uint8_t ac_rsassa_vect18_coeff[] = {
3669 0x83, 0x1f, 0x72, 0x3b, 0x3f, 0x9e, 0x46, 0x88, 0x83, 0xb3, 0xa0, 0xe2,
3670 0xa8, 0xf0, 0x56, 0x97, 0x3e, 0x4a, 0xed, 0x56, 0x46, 0xdf, 0xf8, 0x21,
3671 0xf5, 0xb8, 0xf9, 0xd8, 0x43, 0x3c, 0xf4, 0x39, 0x51, 0xd2, 0xf3, 0xa0,
3672 0x6f, 0x57, 0x18, 0xc0, 0xe1, 0x8a, 0x6a, 0xc0, 0x49, 0x34, 0xf6, 0x4d,
3673 0x60, 0xf6, 0xd0, 0x0f, 0x64, 0x58, 0xed, 0x17, 0x7d, 0x68, 0x47, 0x05,
3674 0x6f, 0x64, 0x2e, 0xa9, 0x53, 0xa8, 0x17, 0x65, 0x13, 0xdc, 0x27, 0x51,
3675 0xe3, 0x35, 0x01, 0xb8, 0x0c, 0x68, 0xfd, 0xaf, 0xa3, 0xf7, 0xb1, 0x9a,
3676 0xdc, 0x7b, 0x1b, 0xf7, 0xcc, 0x90, 0x8e, 0x93, 0xbc, 0x08, 0x15, 0xa7,
3677 0xc0, 0x92, 0xa0, 0xa3, 0xc9, 0x17, 0x9d, 0x8d, 0x3d, 0x10, 0x4f, 0xe6,
3678 0xa3, 0x4b, 0x91, 0x21, 0x42, 0x7c, 0xdf, 0x9c, 0x71, 0xed, 0xe1, 0x30,
3679 0x76, 0xf5, 0x1c, 0x71, 0xa0, 0x47, 0xc8, 0xa6, 0x2a, 0x94, 0x01, 0x49,
3680 0xae, 0x2e, 0x90, 0x47, 0x21, 0x17, 0xae, 0x10, 0x91, 0x53, 0x91, 0x88,
3681 0x88, 0xb4, 0x12, 0x50, 0x47, 0x7d, 0xf6, 0xfb, 0xde, 0x12, 0x6b, 0xc2,
3682 0x50, 0x4f, 0x59, 0x61, 0x81, 0x42, 0xe7, 0x19, 0x72, 0x73, 0xef, 0x9d,
3683 0x7c, 0xa0, 0xf4, 0x30, 0x91, 0xa8, 0x6a, 0x46, 0x9c, 0x5c, 0x0f, 0x9a,
3684 0xeb, 0x1f, 0x00, 0x1e, 0x0c, 0x49, 0x1f, 0xb8, 0x5f, 0x37, 0xd7, 0x4f
3685};
3686static const uint8_t ac_rsassa_vect18_ptx[] = {
3687 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
3688 0x0d, 0x0e, 0x0f, 0x10 };
3689static const uint8_t ac_rsassa_vect18_out[] = {
3690 0x06, 0xe3, 0x94, 0xdc, 0x4b, 0xbc, 0xa5, 0x80, 0x7e, 0x65, 0x65, 0xe2,
3691 0x6c, 0x91, 0x8b, 0x57, 0x52, 0x29, 0xa0, 0x05, 0x20, 0xef, 0x49, 0xb1,
3692 0xf9, 0xdb, 0x9e, 0xd8, 0x2e, 0x65, 0x9d, 0x61, 0xa8, 0xda, 0x9a, 0x95,
3693 0xab, 0xa6, 0x8e, 0x7b, 0xfd, 0x89, 0x5f, 0x5b, 0xfc, 0x10, 0x12, 0x98,
3694 0x4a, 0x2b, 0x48, 0x38, 0x2d, 0x66, 0x4c, 0x5b, 0x2c, 0xe2, 0x4d, 0xaa,
3695 0xa3, 0x19, 0x64, 0xf1, 0xf1, 0x4b, 0xd5, 0x06, 0x14, 0x83, 0xf2, 0x71,
3696 0x5a, 0xef, 0x81, 0xa2, 0xaa, 0x5a, 0xfa, 0x48, 0x38, 0x4a, 0x46, 0x52,
3697 0xb2, 0xbd, 0x10, 0x1b, 0x11, 0xa1, 0x46, 0x2d, 0x51, 0x59, 0xc0, 0x49,
3698 0x32, 0x43, 0x83, 0x28, 0xe0, 0x59, 0x0b, 0x6a, 0xef, 0x5d, 0xee, 0x37,
3699 0xca, 0xd8, 0x8f, 0xd5, 0xcf, 0x57, 0x4b, 0xac, 0x80, 0x3d, 0x05, 0xa0,
3700 0x15, 0x0c, 0x27, 0xee, 0xa2, 0x91, 0xfb, 0x1d, 0x4f, 0xbd, 0x45, 0x39,
3701 0x34, 0x37, 0x05, 0x82, 0x8f, 0x19, 0x4e, 0x20, 0xb8, 0x3b, 0x7e, 0x60,
3702 0x0a, 0x2f, 0x48, 0xaa, 0xf9, 0xa3, 0x5e, 0xd5, 0xd8, 0xdb, 0xc1, 0x61,
3703 0xa3, 0x95, 0x72, 0x19, 0xba, 0x97, 0xd6, 0x5f, 0x5d, 0xb3, 0x50, 0x51,
3704 0xb8, 0x5a, 0x1a, 0x8a, 0x0f, 0xd2, 0x25, 0xdc, 0x12, 0xd1, 0x96, 0xac,
3705 0x8c, 0x70, 0x47, 0x46, 0x35, 0xdf, 0xb1, 0x15, 0xf6, 0x65, 0xc3, 0x6d,
3706 0xd5, 0xd7, 0x4c, 0xb2, 0xa3, 0xc7, 0x03, 0xd6, 0xc1, 0x8d, 0x33, 0x56,
3707 0x49, 0xf4, 0xf4, 0x4e, 0x44, 0x83, 0xee, 0x7a, 0xb9, 0xdc, 0x5f, 0x7c,
3708 0x85, 0x10, 0x0e, 0x30, 0x46, 0x73, 0x7e, 0x44, 0x42, 0x17, 0x8f, 0x20,
3709 0x12, 0x13, 0x39, 0x5d, 0x55, 0x6b, 0xb2, 0x3c, 0xde, 0xae, 0xb9, 0xa0,
3710 0xb3, 0x0a, 0x81, 0x08, 0x72, 0xf8, 0xb3, 0xc4, 0xb9, 0x79, 0x09, 0x5d,
3711 0x81, 0x56, 0x49, 0xab, 0x07, 0xbd, 0xce, 0xd7, 0x39, 0x94, 0xfb, 0xfc,
3712 0x73, 0x2d, 0xd6, 0x9f, 0x7f, 0x26, 0x39, 0x05, 0xe5, 0xc9, 0x0b, 0x67,
3713 0x71, 0x09, 0xac, 0xfd, 0x75, 0x26, 0x92, 0xd6, 0x02, 0xf1, 0xa8, 0x25,
3714 0xee, 0x7c, 0xb6, 0x46, 0x28, 0xb6, 0x92, 0xf0, 0x99, 0xdc, 0x6e, 0xf1,
3715 0xa4, 0x9d, 0xc1, 0x45, 0x9d, 0x19, 0xd5, 0x78, 0x93, 0xc0, 0x2c, 0x3c,
3716 0x8b, 0x3c, 0x96, 0xf9, 0x84, 0x26, 0xc9, 0xf0, 0xe0, 0xde, 0xce, 0x23,
3717 0x7e, 0xe4, 0x06, 0xef, 0x5a, 0xea, 0x24, 0x65, 0x97, 0x4c, 0xd8, 0x48,
3718 0x44, 0xb1, 0x59, 0x8a, 0x15, 0x95, 0x62, 0xc9, 0xee, 0x86, 0x63, 0x32,
3719 0xba, 0xe2, 0xfc, 0x05, 0x5e, 0x17, 0x5c, 0x69, 0x8f, 0x04, 0x02, 0x91,
3720 0xec, 0x46, 0xf8, 0x0a, 0xd1, 0xb0, 0x95, 0x40, 0x3d, 0x92, 0x6e, 0xdf,
3721 0xf6, 0xe7, 0x3e, 0xc6, 0x40, 0x05, 0xdf, 0x82, 0xe6, 0xe0, 0x9f, 0x1b
3722};
3723
3724/*
Jerome Forissier0451e372018-03-27 00:10:23 +08003725 * 4096-bit RSA
3726 * Test data generated with:
3727 * openssl genrsa -out 4096.pem 4096
3728 * openssl rsa -in 4096.pem -text -noout
3729 * (dd if=/dev/zero bs=1 count=368; \
3730 * printf '\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10';) | \
3731 * openssl rsautl -encrypt -raw -inkey 4096.pem | od -t x1
3732 */
3733static const uint8_t ac_rsassa_vect19_modulus[] = {
3734 0xf6, 0x48, 0x38, 0x0c, 0x61, 0xc5, 0xf2, 0x8f, 0x1d, 0x36, 0x78, 0x3b,
3735 0xfd, 0x03, 0x74, 0x2f, 0xe7, 0xb0, 0xab, 0xbd, 0x25, 0x88, 0x46, 0xd8,
3736 0x4f, 0x6b, 0xc8, 0xcb, 0xb8, 0x5d, 0x88, 0x16, 0x8c, 0x68, 0xf2, 0xda,
3737 0x34, 0x25, 0xc9, 0x8a, 0xcf, 0xf8, 0x34, 0xbd, 0xa3, 0xc9, 0x42, 0x9a,
3738 0xb7, 0x4d, 0xab, 0xc3, 0x87, 0xad, 0xa6, 0xa7, 0x02, 0x69, 0xdf, 0x58,
3739 0x84, 0xeb, 0x6e, 0xf7, 0x77, 0xd7, 0x4d, 0xf2, 0x01, 0x4e, 0x7b, 0x79,
3740 0x72, 0xb0, 0x23, 0xb3, 0xb2, 0x22, 0x15, 0x14, 0x05, 0xce, 0xea, 0x98,
3741 0x88, 0x9e, 0xe4, 0x03, 0x9d, 0x5b, 0x07, 0x56, 0xac, 0x77, 0x56, 0x3a,
3742 0xd7, 0x0c, 0x7f, 0x74, 0x2d, 0xd1, 0x48, 0xdd, 0x1c, 0x99, 0xe3, 0x53,
3743 0x3a, 0xa3, 0x9e, 0x4b, 0xb2, 0xd7, 0xe9, 0xfd, 0x04, 0x2c, 0xa2, 0x05,
3744 0x60, 0xae, 0x2d, 0xd0, 0x59, 0x2a, 0x90, 0xf6, 0xe4, 0x99, 0x4d, 0x7a,
3745 0xf8, 0xe5, 0x80, 0xeb, 0x77, 0xa5, 0xae, 0xe2, 0x40, 0xb7, 0x0e, 0x6c,
3746 0x02, 0xbe, 0x33, 0x04, 0xb0, 0xab, 0x01, 0xfe, 0x0c, 0xc1, 0xd1, 0x86,
3747 0x58, 0x6a, 0xc1, 0xb2, 0x3b, 0xfb, 0x03, 0x16, 0x72, 0xf3, 0xbb, 0xd6,
3748 0x43, 0xd3, 0xbf, 0xf0, 0x5b, 0xce, 0xa8, 0x39, 0x53, 0xee, 0x49, 0xc9,
3749 0x2c, 0x04, 0xb3, 0x4a, 0x4c, 0xd7, 0xd1, 0x9b, 0xf6, 0x51, 0x28, 0xd3,
3750 0x24, 0x03, 0xff, 0xa1, 0xcb, 0xb7, 0x7a, 0x73, 0xee, 0xfa, 0x2c, 0x1e,
3751 0x43, 0xc2, 0xb6, 0x3a, 0x4c, 0x68, 0x23, 0x1e, 0x88, 0x85, 0xf2, 0xcb,
3752 0x1d, 0xc9, 0x79, 0x3b, 0x4a, 0x72, 0xe7, 0xdb, 0xfa, 0x62, 0x8d, 0xf5,
3753 0x93, 0xfd, 0x32, 0x40, 0x09, 0x17, 0xa9, 0xda, 0x72, 0x02, 0xf4, 0xcb,
3754 0x8e, 0xb1, 0xe8, 0x64, 0x57, 0xf1, 0x94, 0xba, 0xe6, 0x24, 0x84, 0xf0,
3755 0xca, 0x0d, 0x6a, 0xeb, 0x1e, 0xde, 0x6e, 0xc6, 0x05, 0x55, 0x09, 0x99,
3756 0x18, 0x41, 0xe2, 0x55, 0x1a, 0x1f, 0xcc, 0xee, 0xae, 0x5f, 0x49, 0xb9,
3757 0x2b, 0x6a, 0xf8, 0xdd, 0x0e, 0x10, 0x9c, 0xef, 0x6e, 0xaa, 0xe9, 0x59,
3758 0x81, 0x1b, 0x4e, 0x8a, 0xac, 0x48, 0x6f, 0x7b, 0xc4, 0x62, 0x5f, 0x8c,
3759 0x59, 0x83, 0x96, 0xdb, 0x62, 0x88, 0x8f, 0x22, 0x57, 0x91, 0x0b, 0x9f,
3760 0xcd, 0xca, 0x6a, 0x3c, 0x71, 0x0b, 0x36, 0x8d, 0xf9, 0xbf, 0x3b, 0x37,
3761 0x05, 0xeb, 0xc3, 0x45, 0xc5, 0xeb, 0xe0, 0xdb, 0x12, 0x24, 0xe8, 0xad,
3762 0x83, 0xe8, 0x18, 0xd7, 0x67, 0x47, 0x0e, 0x53, 0x37, 0xf4, 0x16, 0xc5,
3763 0x5e, 0x82, 0x68, 0xfa, 0x8b, 0xe0, 0xde, 0xd1, 0x93, 0xea, 0x94, 0x70,
3764 0x4e, 0xfd, 0x5c, 0xd6, 0x4d, 0x99, 0x7b, 0xfc, 0x99, 0x2c, 0x65, 0x2b,
3765 0xe2, 0x29, 0xf1, 0x8f, 0x5c, 0x77, 0x30, 0x46, 0x11, 0x3f, 0x33, 0x2b,
3766 0xb1, 0x00, 0x50, 0x14, 0x97, 0x26, 0x39, 0xfd, 0xd5, 0xc2, 0x83, 0x0a,
3767 0x07, 0xe3, 0x4e, 0xa7, 0x82, 0x21, 0x4e, 0xb3, 0xef, 0xae, 0x0d, 0x7b,
3768 0xee, 0xe8, 0x1d, 0xf7, 0x31, 0xcb, 0x1e, 0x05, 0x4f, 0x8e, 0xf0, 0x67,
3769 0x36, 0x71, 0x23, 0x72, 0x11, 0x37, 0x0f, 0x4f, 0xf8, 0xc2, 0x04, 0xff,
3770 0x76, 0xb2, 0x77, 0xa2, 0xee, 0x79, 0xf1, 0x5f, 0x34, 0x6f, 0xf8, 0xda,
3771 0x93, 0xeb, 0x6f, 0x38, 0x7e, 0x14, 0xf0, 0xca, 0x14, 0x40, 0x5e, 0xb8,
3772 0x56, 0x7e, 0x61, 0x3e, 0xc0, 0x20, 0x3f, 0x2a, 0xac, 0x43, 0x69, 0xf2,
3773 0x10, 0xce, 0x33, 0x22, 0xe4, 0xdc, 0x9a, 0xac, 0x53, 0x95, 0x38, 0x16,
3774 0x81, 0xbc, 0xf0, 0x45, 0x64, 0x52, 0xbb, 0x20, 0x77, 0x3b, 0xa0, 0x92,
3775 0x40, 0xfd, 0x4b, 0x46, 0xe0, 0x5c, 0xaf, 0x3d, 0x87, 0xad, 0xf8, 0x90,
3776 0x2f, 0xdc, 0x27, 0x4f, 0x2d, 0xe6, 0xcd, 0x25
3777};
3778static const uint8_t ac_rsassa_vect19_pub_exp[] = {
3779 0x01, 0x00, 0x01
3780};
3781static const uint8_t ac_rsassa_vect19_priv_exp[] = {
3782 0xae, 0x48, 0xc9, 0x31, 0x29, 0xf7, 0xd5, 0x01, 0x26, 0x21, 0x27, 0xd0,
3783 0xfb, 0xe9, 0xf7, 0xcc, 0xf6, 0xde, 0xf5, 0x89, 0xf3, 0x07, 0x8f, 0x6b,
3784 0x00, 0x39, 0x3c, 0x6d, 0xbe, 0x58, 0xa2, 0x37, 0xa2, 0xc1, 0x9a, 0x2a,
3785 0x84, 0x80, 0xc1, 0x31, 0x74, 0x9f, 0x27, 0x63, 0x94, 0x86, 0x96, 0x95,
3786 0xba, 0x66, 0x42, 0xc9, 0x2a, 0x38, 0xdf, 0x18, 0x8d, 0x02, 0xb3, 0x45,
3787 0x87, 0x3a, 0xbc, 0xda, 0x6f, 0x7a, 0x73, 0xf4, 0x70, 0xac, 0x43, 0x80,
3788 0xdc, 0x82, 0x7d, 0xa1, 0x6a, 0xcb, 0xe7, 0xb2, 0xb5, 0xb1, 0x8a, 0x1e,
3789 0xcb, 0x7f, 0xf5, 0xc8, 0x01, 0x11, 0x2c, 0x0e, 0x50, 0x1a, 0x5b, 0x71,
3790 0x64, 0x41, 0xb9, 0xe8, 0x53, 0x8c, 0x29, 0x4e, 0x20, 0x31, 0x5e, 0xc7,
3791 0xc5, 0x55, 0x88, 0x6d, 0xf5, 0x70, 0x0a, 0x6c, 0x3d, 0x0a, 0x00, 0xd6,
3792 0x61, 0x66, 0xa1, 0x91, 0x31, 0xa8, 0x87, 0xd1, 0xd0, 0x50, 0x14, 0x9e,
3793 0x93, 0x88, 0x86, 0x45, 0x1b, 0xf4, 0xa9, 0xdf, 0xff, 0x00, 0x0c, 0x3a,
3794 0xaf, 0x6e, 0x3d, 0xd8, 0x71, 0xd5, 0x72, 0xa1, 0x80, 0x11, 0xa0, 0xde,
3795 0xbb, 0xaf, 0x40, 0xc7, 0x8a, 0xde, 0xc5, 0x7e, 0x9b, 0x76, 0x94, 0x54,
3796 0xba, 0xc7, 0x1c, 0xab, 0x51, 0xac, 0xdb, 0x2b, 0x46, 0x93, 0xf8, 0xaf,
3797 0x5e, 0x71, 0x2d, 0x17, 0xc5, 0x6d, 0x6d, 0x2e, 0x3b, 0x8f, 0x8f, 0x9e,
3798 0x6b, 0x7c, 0x50, 0xe9, 0x04, 0xab, 0x21, 0x02, 0xed, 0xf9, 0x28, 0x43,
3799 0x7a, 0x9c, 0x4e, 0x2c, 0xcf, 0x69, 0x5a, 0x80, 0xff, 0x08, 0x1b, 0x9b,
3800 0x55, 0xc6, 0xff, 0xfd, 0xcf, 0x5f, 0xa5, 0x68, 0xec, 0xb5, 0xd5, 0xd4,
3801 0x16, 0x18, 0x35, 0xf9, 0x4e, 0xf5, 0xea, 0x03, 0x66, 0x6f, 0x65, 0x20,
3802 0xb0, 0x28, 0x82, 0x56, 0x90, 0x4d, 0xab, 0x7c, 0xdf, 0xe4, 0xb4, 0x17,
3803 0x5a, 0x45, 0x48, 0x85, 0x1b, 0x7e, 0x08, 0x71, 0xef, 0x4c, 0xd0, 0xdd,
3804 0x2a, 0x19, 0x3a, 0xed, 0x1f, 0x96, 0xa1, 0xf9, 0xca, 0xe0, 0x52, 0x27,
3805 0xd8, 0xf7, 0x9b, 0x0d, 0x4c, 0x82, 0x08, 0x46, 0xb6, 0xef, 0x53, 0x1b,
3806 0x72, 0x63, 0xb6, 0xe7, 0x3f, 0xa4, 0x5b, 0xed, 0x89, 0xeb, 0xc8, 0x10,
3807 0x78, 0x61, 0x68, 0x98, 0x8f, 0x87, 0x2f, 0xb9, 0x41, 0x31, 0x47, 0x20,
3808 0xf2, 0xde, 0x52, 0x2a, 0x17, 0x3f, 0x84, 0xad, 0x39, 0xec, 0x42, 0x1c,
3809 0x37, 0xbc, 0xb2, 0x7c, 0x43, 0xdb, 0x2e, 0x65, 0x43, 0x17, 0x9e, 0x8f,
3810 0xa0, 0x5b, 0x96, 0xc3, 0xd4, 0x2d, 0xc0, 0x52, 0x3b, 0xe4, 0x0b, 0xe5,
3811 0xaa, 0xcc, 0x1f, 0x57, 0xf0, 0xd6, 0xdd, 0x9a, 0xd1, 0x77, 0xea, 0x0c,
3812 0x7a, 0x8b, 0x69, 0xdb, 0xe9, 0x36, 0x63, 0x1d, 0x46, 0x23, 0x51, 0x9f,
3813 0x45, 0xce, 0xa4, 0x68, 0xb4, 0x6e, 0x65, 0x32, 0xef, 0xdf, 0xe8, 0xce,
3814 0xb6, 0x91, 0x91, 0xbc, 0x3a, 0xc0, 0xd3, 0xb2, 0x7f, 0xf4, 0x14, 0xbf,
3815 0xb8, 0xc9, 0x3d, 0x60, 0x99, 0x5f, 0x14, 0x45, 0x22, 0x07, 0x77, 0x08,
3816 0x32, 0xdd, 0xc8, 0x46, 0x3a, 0x3d, 0x2d, 0xa1, 0x4d, 0xc2, 0xa0, 0x3f,
3817 0xa1, 0xe8, 0x9d, 0x28, 0x57, 0x4c, 0x65, 0x03, 0x54, 0x6f, 0xbb, 0x1c,
3818 0x86, 0x47, 0x29, 0x44, 0x5c, 0xd4, 0x17, 0xed, 0x84, 0x60, 0xbf, 0xb6,
3819 0xb6, 0x0d, 0x0e, 0x47, 0xe2, 0x73, 0x95, 0xf4, 0x4d, 0x6a, 0x6a, 0x04,
3820 0x1b, 0xd4, 0x98, 0xb4, 0xcf, 0x8f, 0xe4, 0x0d, 0x14, 0x66, 0xa0, 0xf5,
3821 0x8d, 0x65, 0xdc, 0xb9, 0xdd, 0x1a, 0x2c, 0x9e, 0x71, 0x78, 0x5a, 0x98,
3822 0x13, 0x0d, 0x91, 0x40, 0xd1, 0x6f, 0x1c, 0x7a, 0x06, 0xab, 0x0b, 0xc1,
3823 0xd1, 0x19, 0x00, 0xca, 0x7a, 0xde, 0x45, 0x5c, 0x50, 0x53, 0x83, 0x71,
3824 0x45, 0x0a, 0x4b, 0x0f, 0x2f, 0x67, 0x3b, 0x39
3825};
3826static const uint8_t ac_rsassa_vect19_prime1[] = {
3827 0xfc, 0x1e, 0xca, 0x69, 0x92, 0x80, 0xf8, 0x54, 0x87, 0x29, 0xd4, 0x68,
3828 0xcb, 0xd6, 0xba, 0x1d, 0x4a, 0x29, 0x4c, 0xa1, 0x49, 0xd7, 0x42, 0x68,
3829 0x09, 0xb0, 0x66, 0xa1, 0x1e, 0xf8, 0x8a, 0xf2, 0x8b, 0xdc, 0x57, 0x70,
3830 0xa2, 0x29, 0x7f, 0x18, 0xce, 0x18, 0x88, 0x8a, 0x02, 0x60, 0xcf, 0x05,
3831 0x15, 0xa0, 0x98, 0x23, 0x77, 0xf4, 0x1a, 0xba, 0xc5, 0x9e, 0x61, 0xea,
3832 0x42, 0xfd, 0x86, 0x88, 0xca, 0x93, 0xa1, 0xf3, 0xf4, 0x0c, 0x38, 0x62,
3833 0x3a, 0x6e, 0x30, 0x0d, 0x52, 0xce, 0xc8, 0xdd, 0xf2, 0xc4, 0x75, 0x8b,
3834 0x44, 0xf9, 0x14, 0xcd, 0x09, 0xd9, 0x37, 0x0d, 0x09, 0x75, 0x82, 0xd6,
3835 0x1d, 0x86, 0x23, 0x29, 0xc7, 0x6f, 0xea, 0x88, 0x5a, 0x88, 0xc5, 0x69,
3836 0x4e, 0x67, 0x8b, 0x90, 0xd5, 0xc6, 0xe8, 0xd8, 0xd6, 0x05, 0xc9, 0xfe,
3837 0x2c, 0x56, 0x8f, 0xcb, 0xb7, 0x7e, 0x59, 0xfa, 0x16, 0x60, 0x8a, 0xf6,
3838 0xdc, 0x63, 0xe5, 0xfc, 0x24, 0x87, 0xc6, 0x2d, 0x94, 0x3d, 0x29, 0x0d,
3839 0xe8, 0xc7, 0x75, 0xe6, 0x32, 0xa3, 0x74, 0x50, 0xae, 0xdd, 0x03, 0x14,
3840 0x70, 0xbc, 0x61, 0x04, 0x07, 0xf4, 0x62, 0xa8, 0x79, 0x2b, 0xf8, 0xc4,
3841 0x69, 0xdb, 0x9a, 0x78, 0x97, 0xa7, 0x71, 0x4c, 0xde, 0x78, 0x5b, 0xab,
3842 0x08, 0x85, 0x0e, 0x34, 0xad, 0x64, 0x24, 0x41, 0x75, 0x24, 0xe0, 0x9b,
3843 0xa8, 0x98, 0x14, 0xe6, 0xe3, 0xf9, 0x59, 0xcc, 0x06, 0x67, 0xf0, 0x5e,
3844 0x3c, 0x75, 0x03, 0xb3, 0xcf, 0x35, 0x57, 0x28, 0x02, 0x6b, 0x42, 0x0f,
3845 0x9b, 0x3d, 0x7d, 0xa0, 0x26, 0xc6, 0xe0, 0x06, 0x3b, 0x97, 0x07, 0x0d,
3846 0x9b, 0xa4, 0xc5, 0x16, 0x91, 0x9d, 0xa3, 0xec, 0x8b, 0x49, 0x47, 0x44,
3847 0xd2, 0xdd, 0xd4, 0xd3, 0xc9, 0x88, 0xe3, 0x88, 0x57, 0xce, 0x3f, 0xc2,
3848 0x08, 0x77, 0x8f, 0x13
3849};
3850static const uint8_t ac_rsassa_vect19_prime2[] = {
3851 0xfa, 0x12, 0x6d, 0xe1, 0x5b, 0x6b, 0x88, 0x0e, 0x28, 0x61, 0x4c, 0x18,
3852 0xc8, 0x2f, 0xf5, 0xe7, 0x0e, 0xc6, 0x1e, 0x14, 0x3b, 0x5a, 0xe1, 0x51,
3853 0xbf, 0x64, 0x6f, 0x9e, 0xb7, 0xca, 0x3f, 0x57, 0xdb, 0xc2, 0x87, 0x8a,
3854 0x41, 0x57, 0xfb, 0xcd, 0x5d, 0x1a, 0xe6, 0x2a, 0x50, 0x0f, 0x60, 0xe1,
3855 0x81, 0x4a, 0x7c, 0xc5, 0xbf, 0xba, 0x37, 0x6f, 0xec, 0x30, 0xba, 0xcf,
3856 0x13, 0x51, 0x43, 0x19, 0x29, 0xaf, 0xb8, 0xc9, 0xee, 0x8d, 0x56, 0xee,
3857 0x3d, 0x90, 0x8e, 0x5e, 0x4d, 0xe6, 0x01, 0xbe, 0x26, 0xf9, 0x7e, 0x3a,
3858 0xaf, 0xa0, 0x56, 0xda, 0x9f, 0x29, 0x42, 0x84, 0x1c, 0x4b, 0xde, 0x67,
3859 0x32, 0xc1, 0xf0, 0xde, 0x5f, 0x89, 0x01, 0xc7, 0xb1, 0x8e, 0x2b, 0x15,
3860 0xf1, 0x59, 0x80, 0xf1, 0x9a, 0x15, 0x20, 0xfd, 0x53, 0xc1, 0x9f, 0xb7,
3861 0x4a, 0xde, 0xe0, 0x58, 0xac, 0x6c, 0xd2, 0x44, 0xb7, 0x9a, 0x0f, 0x8e,
3862 0xdc, 0xa2, 0x57, 0xf6, 0x69, 0x61, 0x37, 0xe3, 0x8a, 0xb4, 0xa6, 0xf4,
3863 0x08, 0x41, 0xfb, 0x22, 0xd1, 0xe4, 0x62, 0x4d, 0xac, 0x2d, 0x71, 0x7b,
3864 0x32, 0xe1, 0x5d, 0xa4, 0x29, 0xbd, 0xde, 0xa4, 0x87, 0xb9, 0xe7, 0xe4,
3865 0xd1, 0x12, 0x81, 0x15, 0xfd, 0x13, 0xff, 0xf0, 0xce, 0x8b, 0x4c, 0x3f,
3866 0x66, 0xe8, 0xb4, 0xd5, 0xa7, 0x09, 0xb0, 0x31, 0x2e, 0xbd, 0x86, 0x56,
3867 0xb4, 0xa2, 0xee, 0xc4, 0x17, 0xda, 0x86, 0x26, 0xb1, 0x14, 0x27, 0x1a,
3868 0x12, 0xed, 0x6a, 0xe2, 0xb5, 0x3f, 0x53, 0x3a, 0x23, 0xf6, 0x19, 0xb6,
3869 0xcc, 0x3b, 0x72, 0xcc, 0xf8, 0xde, 0xec, 0xe0, 0x68, 0x62, 0x5c, 0xe0,
3870 0xff, 0x34, 0x80, 0xab, 0x4d, 0x65, 0x46, 0x06, 0x06, 0xce, 0xb5, 0xd6,
3871 0xb0, 0xca, 0x76, 0x82, 0xed, 0x13, 0x5d, 0x5b, 0xc9, 0x8c, 0xf0, 0x1e,
3872 0xfd, 0x47, 0xe1, 0xe7
3873};
3874static const uint8_t ac_rsassa_vect19_exp1[] = {
3875 0xa2, 0x90, 0xf0, 0x0f, 0x56, 0xca, 0x16, 0x55, 0xda, 0xb9, 0x9c, 0x1e,
3876 0xde, 0xa0, 0xdc, 0x6d, 0x1a, 0x6e, 0xba, 0xdc, 0x9d, 0x12, 0x51, 0xdd,
3877 0x67, 0xb1, 0xf8, 0xdb, 0x17, 0x6f, 0x47, 0x98, 0xd1, 0x9a, 0x08, 0x3f,
3878 0xb6, 0x30, 0x6f, 0xa5, 0x7c, 0xee, 0xd0, 0xcb, 0xbc, 0x70, 0xd3, 0xcc,
3879 0x01, 0x80, 0x05, 0xd9, 0x88, 0xf5, 0x3b, 0x6f, 0x07, 0x11, 0xf3, 0x2c,
3880 0xec, 0x79, 0x31, 0x10, 0x6f, 0x1e, 0xf6, 0xa4, 0xa8, 0xce, 0x60, 0x64,
3881 0xe6, 0x2c, 0x3a, 0x8b, 0xbc, 0xc3, 0x5d, 0x3d, 0xcf, 0xd5, 0xe1, 0xbd,
3882 0x25, 0x82, 0x3e, 0x69, 0x5f, 0x5a, 0x52, 0x66, 0xf3, 0x9c, 0x73, 0xfa,
3883 0xc0, 0x1a, 0xc7, 0xfd, 0x9e, 0x7d, 0x89, 0x8a, 0xd6, 0x65, 0xae, 0x75,
3884 0x12, 0x7b, 0x2d, 0xc0, 0xfc, 0x37, 0x3f, 0xd8, 0xe1, 0x57, 0xe6, 0x41,
3885 0x20, 0x31, 0xc8, 0x92, 0xa1, 0x04, 0xb5, 0xdb, 0xce, 0x25, 0xfe, 0x34,
3886 0xe3, 0x32, 0xff, 0x0e, 0xb0, 0x37, 0x64, 0x0f, 0xeb, 0xaf, 0xec, 0x12,
3887 0xed, 0xef, 0xff, 0x13, 0xa9, 0xbf, 0x3f, 0xb6, 0xee, 0xa9, 0xcf, 0xdc,
3888 0x94, 0x3c, 0xc3, 0x89, 0xa7, 0xdf, 0x6a, 0xe6, 0x1b, 0x0b, 0xc1, 0x62,
3889 0x54, 0xa7, 0xa7, 0x58, 0xee, 0xe0, 0xa6, 0xeb, 0xdb, 0xdf, 0x5b, 0xac,
3890 0x52, 0xd8, 0x08, 0xaa, 0xea, 0xca, 0xd1, 0x9d, 0xeb, 0x7d, 0x15, 0xdf,
3891 0x08, 0xbc, 0xd7, 0x6d, 0x71, 0xbe, 0x4c, 0xaa, 0x83, 0xce, 0xed, 0x6c,
3892 0xb6, 0x2a, 0xf5, 0x72, 0x31, 0xbf, 0xc1, 0x2d, 0x29, 0x32, 0x23, 0xec,
3893 0x90, 0x3a, 0xfc, 0x10, 0x12, 0x30, 0xd6, 0x2e, 0xee, 0xa9, 0x99, 0x80,
3894 0xaa, 0xc5, 0x79, 0xd7, 0xed, 0x98, 0xea, 0x24, 0x12, 0x43, 0xf3, 0xd2,
3895 0x6a, 0xed, 0x62, 0xd8, 0x14, 0xf1, 0x51, 0x55, 0x8e, 0xd8, 0x8c, 0xbf,
3896 0xfe, 0x59, 0xa9, 0x45
3897};
3898static const uint8_t ac_rsassa_vect19_exp2[] = {
3899 0xd8, 0x59, 0x37, 0x5d, 0x1f, 0xd5, 0xa1, 0x48, 0xf6, 0x60, 0x6f, 0x10,
3900 0x85, 0xa9, 0x10, 0xaa, 0x8d, 0x1a, 0x94, 0x0d, 0x56, 0xe8, 0xa2, 0x45,
3901 0x32, 0x3b, 0x77, 0x62, 0x2e, 0x89, 0xb8, 0x51, 0x8f, 0x9b, 0xf5, 0xdd,
3902 0x83, 0xf8, 0xd5, 0xad, 0x6f, 0x5e, 0x85, 0x40, 0x98, 0x31, 0x25, 0xd5,
3903 0x13, 0x21, 0x59, 0x5f, 0x50, 0x27, 0x90, 0x2c, 0xb1, 0x7f, 0xdb, 0x2e,
3904 0xa9, 0xfc, 0xc4, 0xfb, 0x31, 0x18, 0x88, 0xdb, 0x93, 0x1a, 0x0e, 0xda,
3905 0x60, 0xc2, 0xfe, 0x98, 0xd1, 0xf6, 0x2b, 0x0d, 0xd2, 0xf4, 0x48, 0xe4,
3906 0x06, 0xeb, 0xc6, 0x18, 0xb0, 0x58, 0x66, 0xe6, 0x9b, 0x00, 0x7c, 0x72,
3907 0x75, 0xf4, 0x5a, 0x2a, 0x59, 0x26, 0xd4, 0x36, 0x6b, 0x03, 0x9f, 0x7d,
3908 0x05, 0x68, 0x34, 0xe9, 0x51, 0x2f, 0xf4, 0x71, 0x96, 0x93, 0xce, 0x55,
3909 0x2a, 0x5e, 0x36, 0x64, 0x21, 0x10, 0xa8, 0xbd, 0xb0, 0xc6, 0x85, 0xad,
3910 0x48, 0x6e, 0xdf, 0x81, 0x1c, 0xdc, 0x72, 0x18, 0xd6, 0xf8, 0xc1, 0xf4,
3911 0x20, 0x6c, 0xcd, 0x13, 0xeb, 0xd9, 0x15, 0xbf, 0x33, 0x35, 0xc1, 0x97,
3912 0x1f, 0x86, 0xe0, 0x97, 0xd5, 0x51, 0x22, 0x1c, 0xe0, 0x1b, 0xd3, 0x67,
3913 0x20, 0x06, 0x4d, 0x4d, 0xb3, 0xbd, 0x28, 0xd1, 0xb2, 0x2f, 0xcb, 0x90,
3914 0x92, 0xbc, 0xc3, 0x2e, 0x90, 0xac, 0x0e, 0x16, 0x0e, 0xe5, 0x03, 0x23,
3915 0x62, 0x76, 0x0f, 0xf1, 0xf0, 0xdd, 0x2a, 0xf0, 0xb0, 0x84, 0xc9, 0xeb,
3916 0x81, 0xf2, 0x8b, 0x65, 0x85, 0xff, 0x3a, 0x46, 0xf3, 0xb3, 0xc7, 0xbd,
3917 0x61, 0x66, 0x11, 0x45, 0x0a, 0x0e, 0xfb, 0x8a, 0x8e, 0x64, 0x83, 0x0c,
3918 0x59, 0x5e, 0x97, 0xef, 0x1c, 0x2f, 0x80, 0xec, 0x57, 0xd9, 0x60, 0x72,
3919 0x54, 0x53, 0x65, 0x42, 0x92, 0x4f, 0x0d, 0x97, 0x0a, 0x81, 0x77, 0x80,
3920 0xa8, 0x0a, 0x17, 0x83
3921};
3922static const uint8_t ac_rsassa_vect19_coeff[] = {
3923 0x47, 0xcc, 0x01, 0x3c, 0xe5, 0xd4, 0x0f, 0xce, 0xd4, 0x07, 0x20, 0x80,
3924 0x3b, 0xb3, 0xfc, 0x46, 0x34, 0x46, 0x8f, 0xe7, 0xf4, 0x31, 0xf4, 0x13,
3925 0x7b, 0x13, 0x3c, 0xb4, 0x55, 0x3d, 0x77, 0xcb, 0x38, 0xb4, 0xe1, 0x56,
3926 0x27, 0x96, 0xcd, 0x55, 0x4b, 0x73, 0x2e, 0xf6, 0x13, 0x3b, 0x9d, 0x23,
3927 0x01, 0x4d, 0x05, 0xce, 0x44, 0x46, 0xc4, 0xa3, 0xc6, 0x1d, 0x86, 0x16,
3928 0xcc, 0xf0, 0xe5, 0x66, 0xcf, 0xc0, 0xed, 0x35, 0x44, 0xe9, 0x58, 0x42,
3929 0x32, 0x9a, 0x5b, 0x6d, 0x47, 0xcc, 0x11, 0x7a, 0x79, 0x47, 0x46, 0x82,
3930 0xda, 0x57, 0x80, 0x8f, 0xe2, 0xf6, 0xd5, 0xc4, 0x71, 0x57, 0x1e, 0x1a,
3931 0xe5, 0x04, 0x06, 0x3e, 0x9e, 0xec, 0xcd, 0x16, 0x17, 0xaf, 0x25, 0x85,
3932 0xcd, 0xdb, 0x55, 0xce, 0x9b, 0xab, 0xbc, 0x57, 0x36, 0x66, 0x48, 0xdb,
3933 0x6c, 0x3a, 0x96, 0x71, 0x83, 0x90, 0x7a, 0xa4, 0x87, 0xb5, 0xcd, 0x6a,
3934 0x8a, 0x27, 0x21, 0x2c, 0xa5, 0xba, 0x62, 0x07, 0x28, 0xe3, 0x77, 0xca,
3935 0x19, 0xed, 0x7a, 0x55, 0xb8, 0x0c, 0x1c, 0x17, 0x08, 0xa6, 0xf6, 0xd3,
3936 0xda, 0x2c, 0x20, 0x25, 0xb9, 0xb7, 0x3e, 0x2e, 0xe6, 0x25, 0x32, 0xb2,
3937 0xc3, 0x06, 0x63, 0xfb, 0xfb, 0x16, 0x3f, 0x66, 0x18, 0x82, 0x0d, 0x15,
3938 0x37, 0x35, 0x97, 0x17, 0x79, 0xad, 0xd8, 0x96, 0xa1, 0x20, 0x51, 0xd5,
3939 0xb8, 0xb9, 0x53, 0x85, 0x20, 0xbe, 0x71, 0xac, 0xa3, 0xe6, 0x8d, 0xeb,
3940 0xef, 0x1b, 0x8e, 0x42, 0x89, 0xf4, 0x5c, 0x10, 0x80, 0x8a, 0xac, 0xe4,
3941 0xbf, 0xd1, 0xbd, 0x40, 0x47, 0x62, 0x95, 0xfb, 0xab, 0xd1, 0xac, 0x28,
3942 0x6c, 0xa4, 0xfc, 0xbb, 0x77, 0x1f, 0xdb, 0x91, 0xa7, 0xff, 0x90, 0x49,
3943 0x74, 0xee, 0x32, 0x28, 0xbc, 0x15, 0x44, 0x17, 0xdf, 0x30, 0x5a, 0xb6,
3944 0x91, 0xe2, 0x87, 0x02
3945};
3946static const uint8_t ac_rsassa_vect19_ptx[] = {
3947 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
3948 0x0d, 0x0e, 0x0f, 0x10
3949};
3950static const uint8_t ac_rsassa_vect19_out[] = {
3951 0x5c, 0x9c, 0x79, 0x1b, 0xd1, 0x64, 0x6a, 0xb5, 0xc7, 0xd9, 0xb1, 0x7c,
3952 0xd0, 0x3b, 0x05, 0xae, 0x9f, 0x93, 0x36, 0xcd, 0xa3, 0x38, 0x1b, 0xc6,
3953 0x23, 0x81, 0x72, 0xd7, 0x57, 0xa4, 0x16, 0x07, 0x2c, 0xc0, 0x63, 0x38,
3954 0x01, 0x51, 0x58, 0x6d, 0x24, 0xcd, 0x7b, 0x24, 0x86, 0xd4, 0x5a, 0xb5,
3955 0x44, 0x47, 0x13, 0xc4, 0xaf, 0xce, 0x1d, 0x1e, 0x5d, 0x23, 0xb2, 0xe8,
3956 0xae, 0x14, 0x2f, 0x61, 0xf5, 0xf4, 0x7f, 0x37, 0x83, 0x1c, 0x55, 0xdb,
3957 0xb8, 0xd9, 0x27, 0xf4, 0xa7, 0x39, 0x77, 0x3b, 0x73, 0xdb, 0x1a, 0x1d,
3958 0xf7, 0x21, 0x82, 0xb7, 0xda, 0xce, 0x76, 0x90, 0xf2, 0xda, 0x18, 0x0b,
3959 0xf9, 0x11, 0x4f, 0x64, 0xc4, 0x1d, 0xe2, 0xd4, 0xd0, 0x6a, 0xfb, 0x6f,
3960 0x1b, 0x32, 0x2f, 0x4a, 0xcc, 0x6f, 0x5b, 0x28, 0x7f, 0x26, 0xe8, 0x4b,
3961 0x6e, 0x0a, 0x4b, 0x62, 0xef, 0xd9, 0x88, 0x23, 0x1c, 0xea, 0x4f, 0x1a,
3962 0x0a, 0x3a, 0xbd, 0xf6, 0x7d, 0xdc, 0xca, 0x57, 0xc8, 0x68, 0xa6, 0xb3,
3963 0x16, 0xa2, 0xe9, 0x6e, 0x56, 0x69, 0xc9, 0x62, 0xf4, 0x12, 0xf5, 0x48,
3964 0xcf, 0x34, 0x2a, 0x5b, 0x4f, 0xf1, 0x0c, 0xb6, 0x24, 0x04, 0x9d, 0x4f,
3965 0xb0, 0xd3, 0x11, 0x43, 0x29, 0x89, 0x99, 0x9b, 0xb1, 0xe3, 0x8c, 0x00,
3966 0x83, 0xe3, 0xbe, 0x94, 0xbf, 0x1f, 0xf1, 0x5c, 0x83, 0xe9, 0x01, 0xb9,
3967 0xec, 0x41, 0x73, 0x23, 0x98, 0x5e, 0x20, 0x91, 0xca, 0x56, 0x3f, 0x6f,
3968 0x6b, 0x50, 0x6d, 0x94, 0x3e, 0x2e, 0x1b, 0xb3, 0xc5, 0x74, 0x8f, 0x3a,
3969 0xaf, 0x21, 0x49, 0x7e, 0x9a, 0xe8, 0x85, 0x95, 0xd5, 0x87, 0xb1, 0xd7,
3970 0x0a, 0xf2, 0x35, 0x59, 0x1d, 0xe5, 0x8e, 0x9e, 0xc8, 0xa0, 0x84, 0xd1,
3971 0xdf, 0xea, 0x20, 0x16, 0x16, 0x1c, 0x35, 0x69, 0x37, 0x3d, 0x38, 0x3a,
3972 0x53, 0x97, 0x1f, 0xa8, 0x3a, 0xa6, 0x41, 0xc6, 0xd4, 0x7e, 0xac, 0xd3,
3973 0x9e, 0x24, 0x22, 0x9b, 0xb9, 0x6e, 0xfb, 0xd9, 0x23, 0x65, 0xd5, 0xda,
3974 0x28, 0xb3, 0x0c, 0x74, 0x8b, 0xb6, 0xfa, 0x5b, 0xd4, 0x1e, 0x95, 0x1c,
3975 0x08, 0xd0, 0x38, 0x7c, 0xef, 0x6e, 0xb3, 0xee, 0x5b, 0x3b, 0x66, 0xa9,
3976 0x5f, 0x74, 0xab, 0x29, 0x3c, 0x6d, 0x58, 0x51, 0x95, 0x5f, 0xb0, 0x68,
3977 0x5d, 0xc5, 0x78, 0xe4, 0x7a, 0x1c, 0x1d, 0x37, 0xde, 0xdf, 0xd9, 0xae,
3978 0xa0, 0x9b, 0xcd, 0x42, 0x60, 0x74, 0x07, 0x6d, 0xbc, 0x37, 0x80, 0x49,
3979 0x8f, 0xdf, 0x7e, 0x6e, 0x7d, 0x54, 0xde, 0x7f, 0x0c, 0x06, 0xb9, 0xe8,
3980 0xc2, 0x5b, 0xed, 0xaa, 0xe5, 0x87, 0xc7, 0xed, 0xe5, 0x90, 0x98, 0xbb,
3981 0xf4, 0xf3, 0x76, 0x96, 0x7f, 0xc1, 0xe8, 0x49, 0xbc, 0x78, 0x56, 0xf1,
3982 0x5e, 0x87, 0xbd, 0xca, 0xd9, 0xdb, 0xf7, 0xa4, 0x13, 0xc5, 0x32, 0x51,
3983 0x27, 0xa4, 0xeb, 0xd8, 0x1b, 0xf5, 0x37, 0xcd, 0x1c, 0xba, 0x7b, 0xb5,
3984 0x0c, 0xce, 0x71, 0xcb, 0x18, 0xfb, 0x61, 0x60, 0xe7, 0xc0, 0x06, 0xd0,
3985 0x09, 0xc7, 0xbf, 0x3f, 0x7b, 0x55, 0x52, 0x88, 0xa8, 0x7a, 0x94, 0xcf,
3986 0x15, 0x5d, 0x97, 0xba, 0x9a, 0xa8, 0xe2, 0x37, 0xe6, 0xe7, 0xf3, 0x2b,
3987 0xc2, 0xec, 0x33, 0x0b, 0xe7, 0x60, 0xa2, 0xc3, 0x63, 0x89, 0xc6, 0xf1,
3988 0xe5, 0xda, 0x13, 0xd5, 0xcc, 0x27, 0x35, 0xf8, 0x9f, 0xa8, 0x21, 0x49,
3989 0x09, 0x5b, 0x6b, 0xaf, 0x65, 0xbf, 0xb8, 0x6e, 0x5b, 0xf1, 0x61, 0xf4,
3990 0xd3, 0xe9, 0xb5, 0x20, 0x01, 0x40, 0xd6, 0x81, 0x1e, 0x4f, 0xcd, 0x77,
3991 0x51, 0x80, 0x6d, 0x69, 0xc7, 0xba, 0xf8, 0x2b, 0x38, 0x02, 0xa1, 0x9b,
3992 0x36, 0x8d, 0x56, 0xcf, 0x88, 0xb8, 0x71, 0x29, 0x08, 0x69, 0xbe, 0x68,
3993 0x98, 0x84, 0xbb, 0x38, 0xe7, 0xc0, 0x0f, 0x05
3994};
3995
3996/*
Pascal Brandc639ac82015-07-02 08:53:34 +02003997 * Test data from ftp://ftp.rsa.com/pub/rsalabs/tmp/pkcs1v15sign-vectors.txt
3998 *
3999 * As specified in PKCS#1, the block type for this operation
4000 * is 1. The digest algorithm is SHA-1; i.e. the given message
4001 * must be hashed and the SHA-1 hash must be encapsulated in a
4002 * DigestInfo structure as specified in PKCS#1 v1.5.
4003 */
4004
4005/* PKCS#1 v1.5 Signature Example 1 1024-bit RSA key pair */
4006static const uint8_t ac_rsassa_example1_modulus[] = {
4007 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, 0x87, 0xdc,
4008 0x7e, 0xa8, 0x41, 0xd1,
4009 0x56, 0xf2, 0xec, 0x0e, 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6,
4010 0x1f, 0x7a, 0xd9, 0x91,
4011 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, 0xb4, 0xc0, 0xf2, 0x83,
4012 0xa1, 0x2a, 0x88, 0xa3,
4013 0x94, 0xdf, 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab,
4014 0xfc, 0xe0, 0xb1, 0xdf,
4015 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6,
4016 0x71, 0xef, 0x63, 0x77,
4017 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, 0x8e, 0x6f,
4018 0xf8, 0x9d, 0x19, 0xf1,
4019 0x05, 0xac, 0xc2, 0xd3, 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38,
4020 0x6b, 0x6f, 0x64, 0xc4,
4021 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8, 0xcf, 0xfb, 0x22, 0x49,
4022 0xbd, 0x9a, 0x21, 0x37,
4023};
4024static const uint8_t ac_rsassa_example1_pub_exp[] = {
4025 0x01, 0x00, 0x01
4026};
4027static const uint8_t ac_rsassa_example1_priv_exp[] = {
4028 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, 0xca, 0x9b,
4029 0xbb, 0xd0, 0xb4, 0x47,
4030 0x71, 0xa1, 0x01, 0xaf, 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a,
4031 0x4b, 0xbe, 0x92, 0xe8,
4032 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, 0x97, 0x85, 0x3a, 0xd0,
4033 0x7c, 0x02, 0x66, 0xc8,
4034 0xc6, 0xa3, 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44,
4035 0x29, 0xfc, 0x4d, 0x9a,
4036 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7,
4037 0x34, 0xe4, 0x47, 0x27,
4038 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, 0x2a, 0xba,
4039 0xca, 0xba, 0x28, 0x3c,
4040 0x31, 0xb4, 0xbd, 0x2f, 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3,
4041 0x4f, 0x9e, 0x50, 0x3b,
4042 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, 0xee, 0x88, 0x35, 0x47,
4043 0xc6, 0xa3, 0xb3, 0x25,
4044};
4045static const uint8_t ac_rsassa_example1_prime1[] = {
4046 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, 0xa3, 0x56,
4047 0x05, 0x3e, 0xa2, 0xa1,
4048 0xbc, 0x0c, 0x94, 0xaa, 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d,
4049 0xfc, 0x96, 0x79, 0x48,
4050 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, 0x35, 0x70, 0x6e, 0x09,
4051 0xa1, 0xdf, 0x55, 0xa1,
4052 0x53, 0x5b, 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e,
4053 0xda, 0x8e, 0x64, 0x43,
4054};
4055static const uint8_t ac_rsassa_example1_prime2[] = {
4056 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, 0x5b, 0x90,
4057 0xfc, 0xca, 0x87, 0x4a,
4058 0xbc, 0xde, 0x12, 0x3f, 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b,
4059 0x6e, 0x48, 0xde, 0x8d,
4060 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, 0x27, 0x58, 0x74, 0xf5,
4061 0x42, 0xcd, 0x20, 0xdc,
4062 0x72, 0x3e, 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26,
4063 0x9a, 0x67, 0x99, 0xfd,
4064};
4065static const uint8_t ac_rsassa_example1_exp1[] = {
4066 0x28, 0xfa, 0x13, 0x93, 0x86, 0x55, 0xbe, 0x1f, 0x8a, 0x15, 0x9c, 0xba,
4067 0xca, 0x5a, 0x72, 0xea,
4068 0x19, 0x0c, 0x30, 0x08, 0x9e, 0x19, 0xcd, 0x27, 0x4a, 0x55, 0x6f, 0x36,
4069 0xc4, 0xf6, 0xe1, 0x9f,
4070 0x55, 0x4b, 0x34, 0xc0, 0x77, 0x79, 0x04, 0x27, 0xbb, 0xdd, 0x8d, 0xd3,
4071 0xed, 0xe2, 0x44, 0x83,
4072 0x28, 0xf3, 0x85, 0xd8, 0x1b, 0x30, 0xe8, 0xe4, 0x3b, 0x2f, 0xff, 0xa0,
4073 0x27, 0x86, 0x19, 0x79,
4074};
4075static const uint8_t ac_rsassa_example1_exp2[] = {
4076 0x1a, 0x8b, 0x38, 0xf3, 0x98, 0xfa, 0x71, 0x20, 0x49, 0x89, 0x8d, 0x7f,
4077 0xb7, 0x9e, 0xe0, 0xa7,
4078 0x76, 0x68, 0x79, 0x12, 0x99, 0xcd, 0xfa, 0x09, 0xef, 0xc0, 0xe5, 0x07,
4079 0xac, 0xb2, 0x1e, 0xd7,
4080 0x43, 0x01, 0xef, 0x5b, 0xfd, 0x48, 0xbe, 0x45, 0x5e, 0xae, 0xb6, 0xe1,
4081 0x67, 0x82, 0x55, 0x82,
4082 0x75, 0x80, 0xa8, 0xe4, 0xe8, 0xe1, 0x41, 0x51, 0xd1, 0x51, 0x0a, 0x82,
4083 0xa3, 0xf2, 0xe7, 0x29,
4084};
4085static const uint8_t ac_rsassa_example1_coeff[] = {
4086 0x27, 0x15, 0x6a, 0xba, 0x41, 0x26, 0xd2, 0x4a, 0x81, 0xf3, 0xa5, 0x28,
4087 0xcb, 0xfb, 0x27, 0xf5,
4088 0x68, 0x86, 0xf8, 0x40, 0xa9, 0xf6, 0xe8, 0x6e, 0x17, 0xa4, 0x4b, 0x94,
4089 0xfe, 0x93, 0x19, 0x58,
4090 0x4b, 0x8e, 0x22, 0xfd, 0xde, 0x1e, 0x5a, 0x2e, 0x3b, 0xd8, 0xaa, 0x5b,
4091 0xa8, 0xd8, 0x58, 0x41,
4092 0x94, 0xeb, 0x21, 0x90, 0xac, 0xf8, 0x32, 0xb8, 0x47, 0xf1, 0x3a, 0x3d,
4093 0x24, 0xa7, 0x9f, 0x4d,
4094};
4095
4096/* PKCS#1 v1.5 Signature Example 1.1 */
4097#define ac_rsassa_vect3_modulus ac_rsassa_example1_modulus
4098#define ac_rsassa_vect3_pub_exp ac_rsassa_example1_pub_exp
4099#define ac_rsassa_vect3_priv_exp ac_rsassa_example1_priv_exp
4100#define ac_rsassa_vect3_prime1 ac_rsassa_example1_prime1
4101#define ac_rsassa_vect3_prime2 ac_rsassa_example1_prime2
4102#define ac_rsassa_vect3_exp1 ac_rsassa_example1_exp1
4103#define ac_rsassa_vect3_exp2 ac_rsassa_example1_exp2
4104#define ac_rsassa_vect3_coeff ac_rsassa_example1_coeff
4105static const uint8_t ac_rsassa_vect3_ptx[] = {
4106 0xcd, 0xc8, 0x7d, 0xa2, 0x23, 0xd7, 0x86, 0xdf, 0x3b, 0x45, 0xe0, 0xbb,
4107 0xbc, 0x72, 0x13, 0x26,
4108 0xd1, 0xee, 0x2a, 0xf8, 0x06, 0xcc, 0x31, 0x54, 0x75, 0xcc, 0x6f, 0x0d,
4109 0x9c, 0x66, 0xe1, 0xb6,
4110 0x23, 0x71, 0xd4, 0x5c, 0xe2, 0x39, 0x2e, 0x1a, 0xc9, 0x28, 0x44, 0xc3,
4111 0x10, 0x10, 0x2f, 0x15,
4112 0x6a, 0x0d, 0x8d, 0x52, 0xc1, 0xf4, 0xc4, 0x0b, 0xa3, 0xaa, 0x65, 0x09,
4113 0x57, 0x86, 0xcb, 0x76,
4114 0x97, 0x57, 0xa6, 0x56, 0x3b, 0xa9, 0x58, 0xfe, 0xd0, 0xbc, 0xc9, 0x84,
4115 0xe8, 0xb5, 0x17, 0xa3,
4116 0xd5, 0xf5, 0x15, 0xb2, 0x3b, 0x8a, 0x41, 0xe7, 0x4a, 0xa8, 0x67, 0x69,
4117 0x3f, 0x90, 0xdf, 0xb0,
4118 0x61, 0xa6, 0xe8, 0x6d, 0xfa, 0xae, 0xe6, 0x44, 0x72, 0xc0, 0x0e, 0x5f,
4119 0x20, 0x94, 0x57, 0x29,
4120 0xcb, 0xeb, 0xe7, 0x7f, 0x06, 0xce, 0x78, 0xe0, 0x8f, 0x40, 0x98, 0xfb,
4121 0xa4, 0x1f, 0x9d, 0x61,
4122 0x93, 0xc0, 0x31, 0x7e, 0x8b, 0x60, 0xd4, 0xb6, 0x08, 0x4a, 0xcb, 0x42,
4123 0xd2, 0x9e, 0x38, 0x08,
4124 0xa3, 0xbc, 0x37, 0x2d, 0x85, 0xe3, 0x31, 0x17, 0x0f, 0xcb, 0xf7, 0xcc,
4125 0x72, 0xd0, 0xb7, 0x1c,
4126 0x29, 0x66, 0x48, 0xb3, 0xa4, 0xd1, 0x0f, 0x41, 0x62, 0x95, 0xd0, 0x80,
4127 0x7a, 0xa6, 0x25, 0xca,
4128 0xb2, 0x74, 0x4f, 0xd9, 0xea, 0x8f, 0xd2, 0x23, 0xc4, 0x25, 0x37, 0x02,
4129 0x98, 0x28, 0xbd, 0x16,
4130 0xbe, 0x02, 0x54, 0x6f, 0x13, 0x0f, 0xd2, 0xe3, 0x3b, 0x93, 0x6d, 0x26,
4131 0x76, 0xe0, 0x8a, 0xed,
4132 0x1b, 0x73, 0x31, 0x8b, 0x75, 0x0a, 0x01, 0x67, 0xd0,
4133};
4134static const uint8_t ac_rsassa_vect3_out[] = {
4135 0x6b, 0xc3, 0xa0, 0x66, 0x56, 0x84, 0x29, 0x30, 0xa2, 0x47, 0xe3, 0x0d,
4136 0x58, 0x64, 0xb4, 0xd8,
4137 0x19, 0x23, 0x6b, 0xa7, 0xc6, 0x89, 0x65, 0x86, 0x2a, 0xd7, 0xdb, 0xc4,
4138 0xe2, 0x4a, 0xf2, 0x8e,
4139 0x86, 0xbb, 0x53, 0x1f, 0x03, 0x35, 0x8b, 0xe5, 0xfb, 0x74, 0x77, 0x7c,
4140 0x60, 0x86, 0xf8, 0x50,
4141 0xca, 0xef, 0x89, 0x3f, 0x0d, 0x6f, 0xcc, 0x2d, 0x0c, 0x91, 0xec, 0x01,
4142 0x36, 0x93, 0xb4, 0xea,
4143 0x00, 0xb8, 0x0c, 0xd4, 0x9a, 0xac, 0x4e, 0xcb, 0x5f, 0x89, 0x11, 0xaf,
4144 0xe5, 0x39, 0xad, 0xa4,
4145 0xa8, 0xf3, 0x82, 0x3d, 0x1d, 0x13, 0xe4, 0x72, 0xd1, 0x49, 0x05, 0x47,
4146 0xc6, 0x59, 0xc7, 0x61,
4147 0x7f, 0x3d, 0x24, 0x08, 0x7d, 0xdb, 0x6f, 0x2b, 0x72, 0x09, 0x61, 0x67,
4148 0xfc, 0x09, 0x7c, 0xab,
4149 0x18, 0xe9, 0xa4, 0x58, 0xfc, 0xb6, 0x34, 0xcd, 0xce, 0x8e, 0xe3, 0x58,
4150 0x94, 0xc4, 0x84, 0xd7,
4151};
4152
4153/* PKCS#1 v1.5 Signature Example 1.2 */
4154#define ac_rsassa_vect4_modulus ac_rsassa_example1_modulus
4155#define ac_rsassa_vect4_pub_exp ac_rsassa_example1_pub_exp
4156#define ac_rsassa_vect4_priv_exp ac_rsassa_example1_priv_exp
4157#define ac_rsassa_vect4_prime1 ac_rsassa_example1_prime1
4158#define ac_rsassa_vect4_prime2 ac_rsassa_example1_prime2
4159#define ac_rsassa_vect4_exp1 ac_rsassa_example1_exp1
4160#define ac_rsassa_vect4_exp2 ac_rsassa_example1_exp2
4161#define ac_rsassa_vect4_coeff ac_rsassa_example1_coeff
4162static const uint8_t ac_rsassa_vect4_ptx[] = {
4163 0x85, 0x13, 0x84, 0xcd, 0xfe, 0x81, 0x9c, 0x22, 0xed, 0x6c, 0x4c, 0xcb,
4164 0x30, 0xda, 0xeb, 0x5c,
4165 0xf0, 0x59, 0xbc, 0x8e, 0x11, 0x66, 0xb7, 0xe3, 0x53, 0x0c, 0x4c, 0x23,
4166 0x3e, 0x2b, 0x5f, 0x8f,
4167 0x71, 0xa1, 0xcc, 0xa5, 0x82, 0xd4, 0x3e, 0xcc, 0x72, 0xb1, 0xbc, 0xa1,
4168 0x6d, 0xfc, 0x70, 0x13,
4169 0x22, 0x6b, 0x9e,
4170};
4171static const uint8_t ac_rsassa_vect4_out[] = {
4172 0x84, 0xfd, 0x2c, 0xe7, 0x34, 0xec, 0x1d, 0xa8, 0x28, 0xd0, 0xf1, 0x5b,
4173 0xf4, 0x9a, 0x87, 0x07,
4174 0xc1, 0x5d, 0x05, 0x94, 0x81, 0x36, 0xde, 0x53, 0x7a, 0x3d, 0xb4, 0x21,
4175 0x38, 0x41, 0x67, 0xc8,
4176 0x6f, 0xae, 0x02, 0x25, 0x87, 0xee, 0x9e, 0x13, 0x7d, 0xae, 0xe7, 0x54,
4177 0x73, 0x82, 0x62, 0x93,
4178 0x2d, 0x27, 0x1c, 0x74, 0x4c, 0x6d, 0x3a, 0x18, 0x9a, 0xd4, 0x31, 0x1b,
4179 0xdb, 0x02, 0x04, 0x92,
4180 0xe3, 0x22, 0xfb, 0xdd, 0xc4, 0x04, 0x06, 0xea, 0x86, 0x0d, 0x4e, 0x8e,
4181 0xa2, 0xa4, 0x08, 0x4a,
4182 0xa9, 0x8b, 0x96, 0x22, 0xa4, 0x46, 0x75, 0x6f, 0xdb, 0x74, 0x0d, 0xdb,
4183 0x3d, 0x91, 0xdb, 0x76,
4184 0x70, 0xe2, 0x11, 0x66, 0x1b, 0xbf, 0x87, 0x09, 0xb1, 0x1c, 0x08, 0xa7,
4185 0x07, 0x71, 0x42, 0x2d,
4186 0x1a, 0x12, 0xde, 0xf2, 0x9f, 0x06, 0x88, 0xa1, 0x92, 0xae, 0xbd, 0x89,
4187 0xe0, 0xf8, 0x96, 0xf8,
4188};
4189
4190/* PKCS#1 v1.5 Signature Example 1.3 */
4191#define ac_rsassa_vect5_modulus ac_rsassa_example1_modulus
4192#define ac_rsassa_vect5_pub_exp ac_rsassa_example1_pub_exp
4193#define ac_rsassa_vect5_priv_exp ac_rsassa_example1_priv_exp
4194#define ac_rsassa_vect5_prime1 ac_rsassa_example1_prime1
4195#define ac_rsassa_vect5_prime2 ac_rsassa_example1_prime2
4196#define ac_rsassa_vect5_exp1 ac_rsassa_example1_exp1
4197#define ac_rsassa_vect5_exp2 ac_rsassa_example1_exp2
4198#define ac_rsassa_vect5_coeff ac_rsassa_example1_coeff
4199static const uint8_t ac_rsassa_vect5_ptx[] = {
4200 0xa4, 0xb1, 0x59, 0x94, 0x17, 0x61, 0xc4, 0x0c, 0x6a, 0x82, 0xf2, 0xb8,
4201 0x0d, 0x1b, 0x94, 0xf5,
4202 0xaa, 0x26, 0x54, 0xfd, 0x17, 0xe1, 0x2d, 0x58, 0x88, 0x64, 0x67, 0x9b,
4203 0x54, 0xcd, 0x04, 0xef,
4204 0x8b, 0xd0, 0x30, 0x12, 0xbe, 0x8d, 0xc3, 0x7f, 0x4b, 0x83, 0xaf, 0x79,
4205 0x63, 0xfa, 0xff, 0x0d,
4206 0xfa, 0x22, 0x54, 0x77, 0x43, 0x7c, 0x48, 0x01, 0x7f, 0xf2, 0xbe, 0x81,
4207 0x91, 0xcf, 0x39, 0x55,
4208 0xfc, 0x07, 0x35, 0x6e, 0xab, 0x3f, 0x32, 0x2f, 0x7f, 0x62, 0x0e, 0x21,
4209 0xd2, 0x54, 0xe5, 0xdb,
4210 0x43, 0x24, 0x27, 0x9f, 0xe0, 0x67, 0xe0, 0x91, 0x0e, 0x2e, 0x81, 0xca,
4211 0x2c, 0xab, 0x31, 0xc7,
4212 0x45, 0xe6, 0x7a, 0x54, 0x05, 0x8e, 0xb5, 0x0d, 0x99, 0x3c, 0xdb, 0x9e,
4213 0xd0, 0xb4, 0xd0, 0x29,
4214 0xc0, 0x6d, 0x21, 0xa9, 0x4c, 0xa6, 0x61, 0xc3, 0xce, 0x27, 0xfa, 0xe1,
4215 0xd6, 0xcb, 0x20, 0xf4,
4216 0x56, 0x4d, 0x66, 0xce, 0x47, 0x67, 0x58, 0x3d, 0x0e, 0x5f, 0x06, 0x02,
4217 0x15, 0xb5, 0x90, 0x17,
4218 0xbe, 0x85, 0xea, 0x84, 0x89, 0x39, 0x12, 0x7b, 0xd8, 0xc9, 0xc4, 0xd4,
4219 0x7b, 0x51, 0x05, 0x6c,
4220 0x03, 0x1c, 0xf3, 0x36, 0xf1, 0x7c, 0x99, 0x80, 0xf3, 0xb8, 0xf5, 0xb9,
4221 0xb6, 0x87, 0x8e, 0x8b,
4222 0x79, 0x7a, 0xa4, 0x3b, 0x88, 0x26, 0x84, 0x33, 0x3e, 0x17, 0x89, 0x3f,
4223 0xe9, 0xca, 0xa6, 0xaa,
4224 0x29, 0x9f, 0x7e, 0xd1, 0xa1, 0x8e, 0xe2, 0xc5, 0x48, 0x64, 0xb7, 0xb2,
4225 0xb9, 0x9b, 0x72, 0x61,
4226 0x8f, 0xb0, 0x25, 0x74, 0xd1, 0x39, 0xef, 0x50, 0xf0, 0x19, 0xc9, 0xee,
4227 0xf4, 0x16, 0x97, 0x13,
4228 0x38, 0xe7, 0xd4, 0x70
4229};
4230static const uint8_t ac_rsassa_vect5_out[] = {
4231 0x0b, 0x1f, 0x2e, 0x51, 0x80, 0xe5, 0xc7, 0xb4, 0xb5, 0xe6, 0x72, 0x92,
4232 0x9f, 0x66, 0x4c, 0x48,
4233 0x96, 0xe5, 0x0c, 0x35, 0x13, 0x4b, 0x6d, 0xe4, 0xd5, 0xa9, 0x34, 0x25,
4234 0x2a, 0x3a, 0x24, 0x5f,
4235 0xf4, 0x83, 0x40, 0x92, 0x0e, 0x10, 0x34, 0xb7, 0xd5, 0xa5, 0xb5, 0x24,
4236 0xeb, 0x0e, 0x1c, 0xf1,
4237 0x2b, 0xef, 0xef, 0x49, 0xb2, 0x7b, 0x73, 0x2d, 0x2c, 0x19, 0xe1, 0xc4,
4238 0x32, 0x17, 0xd6, 0xe1,
4239 0x41, 0x73, 0x81, 0x11, 0x1a, 0x1d, 0x36, 0xde, 0x63, 0x75, 0xcf, 0x45,
4240 0x5b, 0x3c, 0x98, 0x12,
4241 0x63, 0x9d, 0xbc, 0x27, 0x60, 0x0c, 0x75, 0x19, 0x94, 0xfb, 0x61, 0x79,
4242 0x9e, 0xcf, 0x7d, 0xa6,
4243 0xbc, 0xf5, 0x15, 0x40, 0xaf, 0xd0, 0x17, 0x4d, 0xb4, 0x03, 0x31, 0x88,
4244 0x55, 0x66, 0x75, 0xb1,
4245 0xd7, 0x63, 0x36, 0x0a, 0xf4, 0x6f, 0xee, 0xca, 0x5b, 0x60, 0xf8, 0x82,
4246 0x82, 0x9e, 0xe7, 0xb2,
4247};
4248
4249/* PKCS#1 v1.5 Signature Example 1.4 */
4250#define ac_rsassa_vect6_modulus ac_rsassa_example1_modulus
4251#define ac_rsassa_vect6_pub_exp ac_rsassa_example1_pub_exp
4252#define ac_rsassa_vect6_priv_exp ac_rsassa_example1_priv_exp
4253#define ac_rsassa_vect6_prime1 ac_rsassa_example1_prime1
4254#define ac_rsassa_vect6_prime2 ac_rsassa_example1_prime2
4255#define ac_rsassa_vect6_exp1 ac_rsassa_example1_exp1
4256#define ac_rsassa_vect6_exp2 ac_rsassa_example1_exp2
4257#define ac_rsassa_vect6_coeff ac_rsassa_example1_coeff
4258static const uint8_t ac_rsassa_vect6_ptx[] = {
4259 0xbc, 0x65, 0x67, 0x47, 0xfa, 0x9e, 0xaf, 0xb3, 0xf0
4260};
4261static const uint8_t ac_rsassa_vect6_out[] = {
4262 0x45, 0x60, 0x7a, 0xd6, 0x11, 0xcf, 0x57, 0x47, 0xa4, 0x1a, 0xc9, 0x4d,
4263 0x0f, 0xfe, 0xc8, 0x78,
4264 0xbd, 0xaf, 0x63, 0xf6, 0xb5, 0x7a, 0x4b, 0x08, 0x8b, 0xf3, 0x6e, 0x34,
4265 0xe1, 0x09, 0xf8, 0x40,
4266 0xf2, 0x4b, 0x74, 0x2a, 0xda, 0x16, 0x10, 0x2d, 0xab, 0xf9, 0x51, 0xcb,
4267 0xc4, 0x4f, 0x89, 0x82,
4268 0xe9, 0x4e, 0xd4, 0xcd, 0x09, 0x44, 0x8d, 0x20, 0xec, 0x0e, 0xfa, 0x73,
4269 0x54, 0x5f, 0x80, 0xb6,
4270 0x54, 0x06, 0xbe, 0xd6, 0x19, 0x4a, 0x61, 0xc3, 0x40, 0xb4, 0xad, 0x15,
4271 0x68, 0xcb, 0xb7, 0x58,
4272 0x51, 0x04, 0x9f, 0x11, 0xaf, 0x17, 0x34, 0x96, 0x40, 0x76, 0xe0, 0x20,
4273 0x29, 0xae, 0xe2, 0x00,
4274 0xe4, 0x0e, 0x80, 0xbe, 0x0f, 0x43, 0x61, 0xf6, 0x98, 0x41, 0xc4, 0xf9,
4275 0x2a, 0x44, 0x50, 0xa2,
4276 0x28, 0x6d, 0x43, 0x28, 0x9b, 0x40, 0x55, 0x54, 0xc5, 0x4d, 0x25, 0xc6,
4277 0xec, 0xb5, 0x84, 0xf4,
4278};
4279
4280/* PKCS#1 v1.5 Signature Example 7 1025-bit RSA key pair */
4281static const uint8_t ac_rsassa_example2_modulus[] = {
4282 0x01, 0x69, 0x34, 0xcd, 0xff, 0x48, 0x50, 0xb6, 0x00, 0x2c, 0xc0, 0xf0,
4283 0xf4, 0x01, 0x0a, 0x32,
4284 0xc6, 0x55, 0xe5, 0xcf, 0x6e, 0x7c, 0x89, 0x93, 0x7f, 0xd7, 0x55, 0xef,
4285 0x6a, 0xbe, 0x37, 0x9d,
4286 0xad, 0xde, 0x70, 0xcc, 0x21, 0x77, 0x51, 0xf1, 0x4c, 0xba, 0x6d, 0x90,
4287 0xfe, 0x52, 0xdc, 0x0a,
4288 0xf5, 0x8b, 0x25, 0x2f, 0x26, 0xbf, 0x72, 0xda, 0x57, 0x9f, 0xda, 0xf5,
4289 0x7d, 0xdd, 0x6c, 0xd6,
4290 0x02, 0x18, 0x79, 0x94, 0x9a, 0x02, 0x76, 0xb4, 0x43, 0x3f, 0xf0, 0x1e,
4291 0xfc, 0xcc, 0xf3, 0x5a,
4292 0x11, 0xe7, 0xc7, 0x7b, 0x38, 0xc1, 0x8c, 0xca, 0x94, 0xae, 0x01, 0x2d,
4293 0x0f, 0x37, 0x04, 0x21,
4294 0x49, 0x1c, 0x52, 0xad, 0x15, 0xac, 0x76, 0xb1, 0x2e, 0xcd, 0x21, 0x8f,
4295 0x52, 0xe7, 0x57, 0x86,
4296 0x6e, 0x08, 0x9d, 0xd8, 0xad, 0xbb, 0x48, 0xe9, 0xba, 0x89, 0x43, 0x36,
4297 0xc5, 0x75, 0xc4, 0x06,
4298 0x55
4299};
4300static const uint8_t ac_rsassa_example2_pub_exp[] = {
4301 0x01, 0x00, 0x01
4302};
4303static const uint8_t ac_rsassa_example2_priv_exp[] = {
4304 0x0d, 0x17, 0x19, 0xe5, 0xbd, 0x47, 0x6d, 0x87, 0xc7, 0xec, 0xc3, 0x1e,
4305 0xb8, 0xab, 0x42, 0x5d,
4306 0x4f, 0xe4, 0xc8, 0xf5, 0xc7, 0xae, 0x23, 0x0a, 0x10, 0x47, 0x55, 0x3f,
4307 0xfb, 0x53, 0x9f, 0xd3,
4308 0x85, 0x5a, 0xf5, 0xa4, 0x3b, 0x2d, 0xdd, 0x4e, 0x95, 0xa2, 0xb3, 0x0d,
4309 0x40, 0x7a, 0xa8, 0x81,
4310 0x59, 0xbb, 0xad, 0x2a, 0x87, 0x3d, 0x80, 0x93, 0xb4, 0x8a, 0x4b, 0xce,
4311 0x20, 0xad, 0x99, 0x26,
4312 0x25, 0x3e, 0xd3, 0x39, 0xac, 0x3b, 0x54, 0x3f, 0xc7, 0x42, 0x96, 0x95,
4313 0x33, 0x8d, 0xb0, 0xbc,
4314 0x1d, 0xc3, 0x68, 0x6c, 0xfd, 0x13, 0x9b, 0xb5, 0xb2, 0x87, 0x36, 0xbc,
4315 0x16, 0x60, 0xa9, 0x53,
4316 0x48, 0xfc, 0x91, 0xc3, 0x25, 0xd0, 0x3a, 0x7f, 0xb2, 0x16, 0xd2, 0xd9,
4317 0xcd, 0x93, 0x64, 0xde,
4318 0x4e, 0xe7, 0xd2, 0x11, 0x9c, 0x3b, 0x0f, 0xbb, 0xa8, 0xa7, 0x1f, 0x0d,
4319 0x3f, 0x5a, 0xb9, 0xb9,
4320};
4321static const uint8_t ac_rsassa_example2_prime1[] = {
4322 0x01, 0x58, 0xc0, 0x24, 0x6c, 0xd1, 0x69, 0xfc, 0x59, 0x3b, 0x25, 0x8b,
4323 0xbf, 0x45, 0x23, 0xab,
4324 0x2b, 0x55, 0xc4, 0x60, 0x73, 0x3a, 0x7f, 0xb4, 0x69, 0x10, 0x90, 0x77,
4325 0xb3, 0x0e, 0x4d, 0x35,
4326 0xf2, 0x1a, 0x35, 0xb1, 0xf4, 0x1e, 0x42, 0x04, 0xe8, 0x1d, 0x2e, 0x4c,
4327 0x46, 0x3c, 0x24, 0x11,
4328 0x39, 0x34, 0x09, 0x8b, 0x45, 0x2d, 0xab, 0x4b, 0xe1, 0x59, 0x97, 0x20,
4329 0xef, 0x68, 0x72, 0x83,
4330 0x3d
4331};
4332static const uint8_t ac_rsassa_example2_prime2[] = {
4333 0x01, 0x0c, 0x38, 0x2d, 0xea, 0x5e, 0x7d, 0x79, 0x29, 0x8c, 0x64, 0x1f,
4334 0xb2, 0xe4, 0xfa, 0x09,
4335 0xf2, 0x4f, 0x6a, 0x7a, 0x45, 0x9a, 0x88, 0x2c, 0x87, 0xa8, 0x03, 0x49,
4336 0x5f, 0x05, 0x6e, 0xcc,
4337 0x3b, 0x43, 0xc5, 0x37, 0x73, 0x1f, 0x85, 0xef, 0xc8, 0xfb, 0x53, 0x87,
4338 0xad, 0x67, 0x31, 0xa6,
4339 0x43, 0x53, 0x32, 0x15, 0xde, 0xcc, 0x38, 0x7d, 0x96, 0x76, 0x12, 0x2c,
4340 0x17, 0x0e, 0x91, 0xe0,
4341 0xf9
4342};
4343static const uint8_t ac_rsassa_example2_exp1[] = {
4344 0xd5, 0x78, 0xdc, 0xd5, 0x38, 0xf2, 0xfc, 0xdc, 0x30, 0x00, 0xb6, 0xc0,
4345 0xf0, 0x49, 0xfe, 0xe2,
4346 0xad, 0x90, 0x14, 0xfd, 0x24, 0xfb, 0x10, 0xb6, 0x82, 0x18, 0x42, 0xd6,
4347 0x70, 0x03, 0xa5, 0x64,
4348 0xcd, 0x8f, 0xf4, 0x2a, 0x2a, 0x56, 0x4c, 0xfd, 0x81, 0x9c, 0x3a, 0x84,
4349 0xbf, 0x16, 0xc2, 0x47,
4350 0x7e, 0x8e, 0x6e, 0x5b, 0x9e, 0xc4, 0xd4, 0x0e, 0xad, 0x50, 0x24, 0x87,
4351 0xba, 0x50, 0x36, 0x2d,
4352};
4353static const uint8_t ac_rsassa_example2_exp2[] = {
4354 0x88, 0x88, 0xdc, 0x8e, 0xae, 0x94, 0xee, 0xa5, 0x80, 0xca, 0xc2, 0xfc,
4355 0x1c, 0xe5, 0x4f, 0x44,
4356 0xe2, 0xba, 0x50, 0x0d, 0xb8, 0x71, 0x53, 0x41, 0xa6, 0xfc, 0x2d, 0x50,
4357 0x4a, 0x82, 0xb1, 0x42,
4358 0x05, 0xe8, 0x91, 0xa6, 0x6f, 0xc8, 0x8d, 0x5c, 0x60, 0xdb, 0x8f, 0x78,
4359 0x6c, 0xcc, 0x70, 0x57,
4360 0x5b, 0x35, 0x66, 0xbe, 0xa8, 0x74, 0xa5, 0x31, 0x7f, 0x5f, 0x16, 0xc4,
4361 0x91, 0xed, 0x1e, 0x79,
4362};
4363static const uint8_t ac_rsassa_example2_coeff[] = {
4364 0x17, 0xb0, 0xd6, 0x23, 0x36, 0x19, 0x1e, 0x63, 0xbc, 0xa1, 0x59, 0x93,
4365 0x4d, 0x06, 0x16, 0xcb,
4366 0x89, 0x97, 0x40, 0x9c, 0xbf, 0xca, 0x37, 0x05, 0x69, 0x5b, 0x14, 0xfb,
4367 0x64, 0xa0, 0x81, 0xc1,
4368 0xc9, 0xf5, 0x86, 0x19, 0x3e, 0x52, 0x3a, 0xbd, 0x0b, 0xeb, 0x8d, 0x72,
4369 0x0c, 0xfe, 0x53, 0x7d,
4370 0xfa, 0x1e, 0xde, 0xc4, 0xa6, 0x64, 0x37, 0xd2, 0x41, 0x19, 0x6b, 0x7a,
4371 0x2c, 0xe5, 0x56, 0xc4,
4372};
4373
4374
4375/* PKCS#1 v1.5 Signature Example 7.1 */
4376#define ac_rsassa_vect7_modulus ac_rsassa_example2_modulus
4377#define ac_rsassa_vect7_pub_exp ac_rsassa_example2_pub_exp
4378#define ac_rsassa_vect7_priv_exp ac_rsassa_example2_priv_exp
4379#define ac_rsassa_vect7_prime1 ac_rsassa_example2_prime1
4380#define ac_rsassa_vect7_prime2 ac_rsassa_example2_prime2
4381#define ac_rsassa_vect7_exp1 ac_rsassa_example2_exp1
4382#define ac_rsassa_vect7_exp2 ac_rsassa_example2_exp2
4383#define ac_rsassa_vect7_coeff ac_rsassa_example2_coeff
4384static const uint8_t ac_rsassa_vect7_ptx[] = {
4385 0x35, 0x39, 0x99, 0x7a, 0xe7, 0x09, 0xfe, 0x32, 0xc1, 0x03, 0x6a, 0x13,
4386 0x27, 0x57, 0xf2, 0xa1,
4387 0x66, 0x7a, 0x91, 0xcc, 0x83, 0xbe, 0x73, 0x3a, 0xad, 0xa1, 0xbd, 0xd2,
4388 0x17, 0x92, 0x4c, 0x9a,
4389 0x2c, 0x9f, 0xed, 0x1f, 0xec, 0xf6, 0x1d, 0x1c, 0xf7, 0x9d, 0xae, 0x9a,
4390 0x83, 0xf8, 0xae, 0x3f,
4391 0x4d, 0x05, 0x1b, 0x34, 0xfb, 0xb5, 0x59, 0xcb, 0xfd, 0xa4, 0x92, 0xf1,
4392 0xd8, 0x3b, 0x8b, 0xeb,
4393 0xa0, 0x45, 0xd4, 0xae, 0x1c, 0x8f, 0xea, 0x15, 0xb7, 0x57, 0x7a, 0x1b,
4394 0x8a, 0x3f, 0x55, 0xba,
4395 0xc1, 0x72, 0x7e, 0xdc, 0xa7, 0xf8, 0xf5, 0x2c, 0xb4, 0xba, 0x61, 0xca,
4396 0xf1, 0xfa, 0x8f, 0x8f,
4397 0xd9, 0xaa, 0xc7, 0x79, 0x09, 0x5c, 0xa8, 0x4c, 0x79, 0x91, 0x52, 0x9f,
4398 0xb8, 0x06, 0x99, 0xd0,
4399 0xd4, 0x68, 0x8d, 0xfd, 0xb1, 0x42, 0xed, 0x61, 0xa9, 0x5b, 0x89, 0xce,
4400 0x33, 0x06, 0xbf, 0x97,
4401 0x80, 0xe1, 0xb9, 0x1b, 0x84, 0x8c, 0x8d, 0x20, 0x03, 0x97, 0x0e, 0x52,
4402 0x70, 0x2a, 0x1f, 0x61,
4403 0x2e, 0x2f, 0x40, 0x17, 0xcf, 0xe0, 0xa9, 0x1d, 0xb9, 0xe4, 0x6d, 0xb9,
4404 0xdc
4405};
4406static const uint8_t ac_rsassa_vect7_out[] = {
4407 0x00, 0x08, 0x0f, 0x77, 0x0a, 0x2d, 0x1f, 0x6a, 0xbf, 0x5f, 0x22, 0x1f,
4408 0x62, 0xe1, 0x66, 0xab,
4409 0xd7, 0x9d, 0x06, 0xc7, 0xb9, 0xa8, 0x78, 0xd6, 0x1b, 0x80, 0xfc, 0x4d,
4410 0x5b, 0xa2, 0x90, 0xb2,
4411 0x3a, 0xba, 0xab, 0x51, 0x8f, 0x09, 0x44, 0x7e, 0x45, 0xae, 0xe6, 0xf3,
4412 0xbd, 0x06, 0x10, 0x24,
4413 0x44, 0x36, 0xa4, 0x73, 0x01, 0x60, 0xe6, 0xa6, 0x72, 0x11, 0x0c, 0x01,
4414 0xae, 0xb5, 0x62, 0x4b,
4415 0x71, 0x8d, 0xc7, 0xc0, 0x86, 0x1e, 0x58, 0x6b, 0xa8, 0xb6, 0x0a, 0x29,
4416 0xd6, 0xa5, 0x75, 0x5c,
4417 0xd2, 0xcc, 0x50, 0x85, 0x99, 0xc6, 0xe2, 0x8d, 0x73, 0x55, 0xb2, 0x7e,
4418 0x40, 0xb7, 0x40, 0xc6,
4419 0xfb, 0xbb, 0xb1, 0xa9, 0x18, 0x23, 0xb1, 0xc1, 0x24, 0x2b, 0xa6, 0x93,
4420 0xd4, 0x52, 0x69, 0x51,
4421 0x47, 0xdb, 0xb2, 0x3e, 0xa8, 0x9c, 0xbf, 0x11, 0xeb, 0x8b, 0x07, 0xec,
4422 0x3a, 0x02, 0x7b, 0x0f,
4423 0x17
4424};
4425
4426/*
4427 * Test data from 186-2rsatestvectors.zip SigVet15_186-3.rsp with CRT
4428 * parameters created with:
4429 * http://sourceforge.net/projects/rsaconverter/
4430 */
4431
4432/* SigGen15_186-2.txt line 9 mod 1024 */
4433static const uint8_t ac_siggen15_186_2_modulus[] = {
4434 0xc8, 0xa2, 0x06, 0x91, 0x82, 0x39, 0x4a, 0x2a, 0xb7, 0xc3, 0xf4, 0x19,
4435 0x0c, 0x15, 0x58, 0x9c, 0x56, 0xa2, 0xd4, 0xbc, 0x42, 0xdc, 0xa6, 0x75,
4436 0xb3, 0x4c, 0xc9, 0x50, 0xe2, 0x46, 0x63, 0x04, 0x84, 0x41, 0xe8, 0xaa,
4437 0x59, 0x3b, 0x2b, 0xc5, 0x9e, 0x19, 0x8b, 0x8c, 0x25, 0x7e, 0x88, 0x21,
4438 0x20, 0xc6, 0x23, 0x36, 0xe5, 0xcc, 0x74, 0x50, 0x12, 0xc7, 0xff, 0xb0,
4439 0x63, 0xee, 0xbe, 0x53, 0xf3, 0xc6, 0x50, 0x4c, 0xba, 0x6c, 0xfe, 0x51,
4440 0xba, 0xa3, 0xb6, 0xd1, 0x07, 0x4b, 0x2f, 0x39, 0x81, 0x71, 0xf4, 0xb1,
4441 0x98, 0x2f, 0x4d, 0x65, 0xca, 0xf8, 0x82, 0xea, 0x4d, 0x56, 0xf3, 0x2a,
4442 0xb5, 0x7d, 0x0c, 0x44, 0xe6, 0xad, 0x4e, 0x9c, 0xf5, 0x7a, 0x43, 0x39,
4443 0xeb, 0x69, 0x62, 0x40, 0x6e, 0x35, 0x0c, 0x1b, 0x15, 0x39, 0x71, 0x83,
4444 0xfb, 0xf1, 0xf0, 0x35, 0x3c, 0x9f, 0xc9, 0x91
4445};
4446static const uint8_t ac_siggen15_186_2_pub_exp[] = {
4447 0x01, 0x00, 0x01
4448};
4449static const uint8_t ac_siggen15_186_2_priv_exp[] = {
4450 0x5d, 0xfc, 0xb1, 0x11, 0x07, 0x2d, 0x29, 0x56, 0x5b, 0xa1, 0xdb, 0x3e,
4451 0xc4, 0x8f, 0x57, 0x64, 0x5d, 0x9d, 0x88, 0x04, 0xed, 0x59, 0x8a, 0x4d,
4452 0x47, 0x02, 0x68, 0xa8, 0x90, 0x67, 0xa2, 0xc9, 0x21, 0xdf, 0xf2, 0x4b,
4453 0xa2, 0xe3, 0x7a, 0x3c, 0xe8, 0x34, 0x55, 0x50, 0x00, 0xdc, 0x86, 0x8e,
4454 0xe6, 0x58, 0x8b, 0x74, 0x93, 0x30, 0x35, 0x28, 0xb1, 0xb3, 0xa9, 0x4f,
4455 0x0b, 0x71, 0x73, 0x0c, 0xf1, 0xe8, 0x6f, 0xca, 0x5a, 0xee, 0xdc, 0x3a,
4456 0xfa, 0x16, 0xf6, 0x5c, 0x01, 0x89, 0xd8, 0x10, 0xdd, 0xcd, 0x81, 0x04,
4457 0x9e, 0xbb, 0xd0, 0x39, 0x18, 0x68, 0xc5, 0x0e, 0xde, 0xc9, 0x58, 0xb3,
4458 0xa2, 0xaa, 0xef, 0xf6, 0xa5, 0x75, 0x89, 0x7e, 0x2f, 0x20, 0xa3, 0xab,
4459 0x54, 0x55, 0xc1, 0xbf, 0xa5, 0x50, 0x10, 0xac, 0x51, 0xa7, 0x79, 0x9b,
4460 0x1f, 0xf8, 0x48, 0x36, 0x44, 0xa3, 0xd4, 0x25
4461};
4462static const uint8_t ac_siggen15_186_2_prime1[] = {
4463 0xF6, 0x6A, 0x24, 0x68, 0xB1, 0x48, 0x1A, 0x0D, 0x6B, 0x60, 0x49, 0x67,
4464 0xF0, 0x58, 0x03, 0x89, 0xD6, 0x06, 0x1F, 0x03, 0x3A, 0x9B, 0x57, 0xB7,
4465 0x4D, 0x1B, 0xEF, 0xE8, 0x10, 0x11, 0x98, 0x94, 0x5B, 0x80, 0x93, 0x04,
4466 0x24, 0x1D, 0x02, 0xFD, 0x5F, 0x92, 0x1F, 0xE9, 0x59, 0xFB, 0xEC, 0xDB,
4467 0x18, 0x00, 0x54, 0x86, 0x9A, 0xDB, 0x17, 0xD3, 0x21, 0xF9, 0xD5, 0xD5,
4468 0x98, 0x12, 0x3E, 0x73
4469};
4470static const uint8_t ac_siggen15_186_2_prime2[] = {
4471 0xD0, 0x6F, 0xFA, 0x56, 0x3B, 0xD0, 0xB8, 0xB9, 0x7F, 0x00, 0x72, 0xEA,
4472 0x07, 0x51, 0x03, 0xEC, 0x1F, 0xF0, 0xB1, 0x7F, 0xD6, 0xBD, 0xAF, 0x94,
4473 0xA7, 0x5A, 0xE6, 0x03, 0x59, 0x82, 0xF6, 0x80, 0x24, 0x9D, 0x77, 0xCC,
4474 0x15, 0x96, 0xA6, 0x54, 0xF1, 0x4C, 0x51, 0x7A, 0x13, 0xB9, 0x5F, 0x1A,
4475 0x8C, 0x5D, 0xE8, 0xCC, 0x84, 0xAD, 0x38, 0xD2, 0xE6, 0xAA, 0x4F, 0xCD,
4476 0x54, 0x1A, 0x32, 0xEB
4477};
4478static const uint8_t ac_siggen15_186_2_exp1[] = {
4479 0xD4, 0xD4, 0xB6, 0x9F, 0xCA, 0x47, 0x89, 0x60, 0xFF, 0xD6, 0x49, 0x70,
4480 0xC1, 0xD1, 0x73, 0x34, 0xF1, 0x2B, 0x96, 0x4B, 0xB6, 0xAA, 0x07, 0xA8,
4481 0x25, 0xAC, 0xB4, 0x98, 0xCE, 0x90, 0x34, 0x26, 0x27, 0xA6, 0x34, 0xD5,
4482 0x05, 0xD0, 0x1D, 0x0D, 0xF5, 0x27, 0x03, 0xF3, 0x0C, 0x2A, 0xA0, 0xD8,
4483 0x57, 0xB1, 0xA9, 0x50, 0x1D, 0x9E, 0x90, 0xC4, 0x66, 0x7B, 0x20, 0x6B,
4484 0x7D, 0x0E, 0x7C, 0xEB
4485};
4486static const uint8_t ac_siggen15_186_2_exp2[] = {
4487 0x28, 0x4F, 0xEF, 0xE7, 0xAB, 0xAB, 0xE3, 0x7E, 0x24, 0xBC, 0xEE, 0x7C,
4488 0xAA, 0xAB, 0x95, 0x89, 0x9E, 0x67, 0xCB, 0xBC, 0x80, 0xC8, 0xB0, 0xE3,
4489 0x9C, 0x36, 0x6D, 0x53, 0xEA, 0x84, 0xF4, 0xAD, 0xB5, 0xE7, 0x2A, 0x9B,
4490 0x32, 0xF5, 0xAE, 0xF7, 0xB0, 0xAF, 0x64, 0xF6, 0xAA, 0x47, 0xE8, 0xC7,
4491 0xD6, 0xAB, 0xF6, 0xF1, 0x4F, 0x1B, 0xBD, 0x68, 0xB4, 0xA9, 0xED, 0xC3,
4492 0x35, 0x67, 0xD7, 0xBF
4493};
4494static const uint8_t ac_siggen15_186_2_coeff[] = {
4495 0xE3, 0xBD, 0x88, 0x1C, 0x5A, 0x8F, 0x4A, 0xFC, 0xA0, 0x8C, 0xBC, 0x04,
4496 0x7C, 0xF0, 0xE3, 0x89, 0x7C, 0x85, 0x18, 0x9A, 0xF4, 0xF9, 0xA7, 0x00,
4497 0x93, 0x2C, 0xF4, 0x9E, 0x72, 0xF6, 0x44, 0x04, 0x39, 0x0D, 0xA5, 0x04,
4498 0x82, 0x79, 0xCE, 0x47, 0xF5, 0xAF, 0x58, 0x9B, 0x1B, 0xE9, 0xE4, 0x61,
4499 0xBB, 0xD8, 0xCC, 0x07, 0xAB, 0x8B, 0xC6, 0x8B, 0xAF, 0x6C, 0xC9, 0x13,
4500 0xB2, 0xE6, 0x26, 0x72
4501};
4502
4503/* SigGen15_186-2.txt line 13 SHA-1*/
4504#define ac_rsassa_vect8_modulus ac_siggen15_186_2_modulus
4505#define ac_rsassa_vect8_pub_exp ac_siggen15_186_2_pub_exp
4506#define ac_rsassa_vect8_priv_exp ac_siggen15_186_2_priv_exp
4507#define ac_rsassa_vect8_prime1 ac_siggen15_186_2_prime1
4508#define ac_rsassa_vect8_prime2 ac_siggen15_186_2_prime2
4509#define ac_rsassa_vect8_exp1 ac_siggen15_186_2_exp1
4510#define ac_rsassa_vect8_exp2 ac_siggen15_186_2_exp2
4511#define ac_rsassa_vect8_coeff ac_siggen15_186_2_coeff
4512static const uint8_t ac_rsassa_vect8_ptx[] = {
4513 0xe8, 0x31, 0x27, 0x42, 0xae, 0x23, 0xc4, 0x56, 0xef, 0x28, 0xa2, 0x31,
4514 0x42, 0xc4, 0x49, 0x08, 0x95, 0x83, 0x27, 0x65, 0xda, 0xdc, 0xe0, 0x2a,
4515 0xfe, 0x5b, 0xe5, 0xd3, 0x1b, 0x00, 0x48, 0xfb, 0xee, 0xe2, 0xcf, 0x21,
4516 0x8b, 0x17, 0x47, 0xad, 0x4f, 0xd8, 0x1a, 0x2e, 0x17, 0xe1, 0x24, 0xe6,
4517 0xaf, 0x17, 0xc3, 0x88, 0x8e, 0x6d, 0x2d, 0x40, 0xc0, 0x08, 0x07, 0xf4,
4518 0x23, 0xa2, 0x33, 0xca, 0xd6, 0x2c, 0xe9, 0xea, 0xef, 0xb7, 0x09, 0x85,
4519 0x6c, 0x94, 0xaf, 0x16, 0x6d, 0xba, 0x08, 0xe7, 0xa0, 0x69, 0x65, 0xd7,
4520 0xfc, 0x0d, 0x8e, 0x5c, 0xb2, 0x65, 0x59, 0xc4, 0x60, 0xe4, 0x7b, 0xc0,
4521 0x88, 0x58, 0x9d, 0x22, 0x42, 0xc9, 0xb3, 0xe6, 0x2d, 0xa4, 0x89, 0x6f,
4522 0xab, 0x19, 0x9e, 0x14, 0x4e, 0xc1, 0x36, 0xdb, 0x8d, 0x84, 0xab, 0x84,
4523 0xbc, 0xba, 0x04, 0xca, 0x3b, 0x90, 0xc8, 0xe5
4524};
4525static const uint8_t ac_rsassa_vect8_out[] = {
4526 0x28, 0x92, 0x8e, 0x19, 0xeb, 0x86, 0xf9, 0xc0, 0x00, 0x70, 0xa5, 0x9e,
4527 0xdf, 0x6b, 0xf8, 0x43, 0x3a, 0x45, 0xdf, 0x49, 0x5c, 0xd1, 0xc7, 0x36,
4528 0x13, 0xc2, 0x12, 0x98, 0x40, 0xf4, 0x8c, 0x4a, 0x2c, 0x24, 0xf1, 0x1d,
4529 0xf7, 0x9b, 0xc5, 0xc0, 0x78, 0x2b, 0xce, 0xdd, 0xe9, 0x7d, 0xbb, 0xb2,
4530 0xac, 0xc6, 0xe5, 0x12, 0xd1, 0x9f, 0x08, 0x50, 0x27, 0xcd, 0x57, 0x50,
4531 0x38, 0x45, 0x3d, 0x04, 0x90, 0x54, 0x13, 0xe9, 0x47, 0xe6, 0xe1, 0xdd,
4532 0xdb, 0xeb, 0x35, 0x35, 0xcd, 0xb3, 0xd8, 0x97, 0x1f, 0xe0, 0x20, 0x05,
4533 0x06, 0x94, 0x10, 0x56, 0xf2, 0x12, 0x43, 0x50, 0x3c, 0x83, 0xea, 0xdd,
4534 0xe0, 0x53, 0xed, 0x86, 0x6c, 0x0e, 0x02, 0x50, 0xbe, 0xdd, 0xd9, 0x27,
4535 0xa0, 0x82, 0x12, 0xaa, 0x8a, 0xc0, 0xef, 0xd6, 0x16, 0x31, 0xef, 0x89,
4536 0xd8, 0xd0, 0x49, 0xef, 0xb3, 0x6b, 0xb3, 0x5f
4537};
4538
4539/* SigGen15_186-2.txt line 54 SHA-224*/
4540#define ac_rsassa_vect16_modulus ac_siggen15_186_2_modulus
4541#define ac_rsassa_vect16_pub_exp ac_siggen15_186_2_pub_exp
4542#define ac_rsassa_vect16_priv_exp ac_siggen15_186_2_priv_exp
4543#define ac_rsassa_vect16_prime1 ac_siggen15_186_2_prime1
4544#define ac_rsassa_vect16_prime2 ac_siggen15_186_2_prime2
4545#define ac_rsassa_vect16_exp1 ac_siggen15_186_2_exp1
4546#define ac_rsassa_vect16_exp2 ac_siggen15_186_2_exp2
4547#define ac_rsassa_vect16_coeff ac_siggen15_186_2_coeff
4548static const uint8_t ac_rsassa_vect16_ptx[] = {
4549 0xe5, 0x67, 0xa3, 0x9a, 0xe4, 0xe5, 0xef, 0x9b, 0x68, 0x01, 0xea, 0x05,
4550 0x61, 0xb7, 0x2a, 0x5d, 0x4b, 0x5f, 0x38, 0x5f, 0x05, 0x32, 0xfc, 0x9f,
4551 0xe1, 0x0a, 0x75, 0x70, 0xf8, 0x69, 0xae, 0x05, 0xc0, 0xbd, 0xed, 0xd6,
4552 0xe0, 0xe2, 0x2d, 0x45, 0x42, 0xe9, 0xce, 0x82, 0x6a, 0x18, 0x8c, 0xac,
4553 0x07, 0x31, 0xae, 0x39, 0xc8, 0xf8, 0x7f, 0x97, 0x71, 0xef, 0x02, 0x13,
4554 0x2e, 0x64, 0xe2, 0xfb, 0x27, 0xad, 0xa8, 0xff, 0x54, 0xb3, 0x30, 0xdd,
4555 0x93, 0xad, 0x5e, 0x3e, 0xf8, 0x2e, 0x0d, 0xda, 0x64, 0x62, 0x48, 0xe3,
4556 0x59, 0x94, 0xbd, 0xa1, 0x0c, 0xf4, 0x6e, 0x5a, 0xbc, 0x98, 0xaa, 0x74,
4557 0x43, 0xc0, 0x3c, 0xdd, 0xeb, 0x5e, 0xe2, 0xab, 0x82, 0xd6, 0x01, 0x00,
4558 0xb1, 0x02, 0x96, 0x31, 0x89, 0x79, 0x70, 0x27, 0x5f, 0x11, 0x9d, 0x05,
4559 0xda, 0xa2, 0x22, 0x0a, 0x4a, 0x0d, 0xef, 0xba
4560};
4561static const uint8_t ac_rsassa_vect16_out[] = {
4562 0x5a, 0xa5, 0x03, 0x33, 0x81, 0xbd, 0xd0, 0xac, 0xce, 0x33, 0x2d, 0xd3,
4563 0x14, 0xda, 0xf0, 0x08, 0xac, 0xaa, 0x9e, 0x83, 0x5f, 0x83, 0x29, 0x79,
4564 0x89, 0x1d, 0x1b, 0xda, 0x2b, 0x55, 0xd5, 0xea, 0xe3, 0x5c, 0x47, 0x9c,
4565 0x06, 0xca, 0xc5, 0xbf, 0x33, 0xf4, 0x32, 0xc8, 0xc0, 0xa5, 0x54, 0x9d,
4566 0x1d, 0x1b, 0x29, 0xc5, 0xe2, 0x58, 0x90, 0x24, 0xd2, 0x78, 0x00, 0xa0,
4567 0xc2, 0x35, 0xa6, 0x15, 0x32, 0xc2, 0x03, 0xcb, 0xc4, 0x06, 0xac, 0x6e,
4568 0xcf, 0x63, 0xf5, 0x2a, 0xe7, 0x71, 0xb9, 0x7c, 0x08, 0xe4, 0xb1, 0x08,
4569 0xec, 0x91, 0x69, 0x00, 0xe5, 0xa1, 0x1b, 0x1d, 0x48, 0xcc, 0xa8, 0x6c,
4570 0xa5, 0xa5, 0xa7, 0x99, 0xed, 0x32, 0xe9, 0x9c, 0x81, 0x5c, 0xef, 0x04,
4571 0xcf, 0x8e, 0xb5, 0x52, 0x23, 0xbf, 0xd4, 0xd9, 0xc3, 0x44, 0x92, 0x64,
4572 0xb6, 0x00, 0x61, 0xbc, 0x36, 0x84, 0xbc, 0x82
4573};
4574
4575/* SigGen15_186-2.txt line 93 SHA-256 */
4576#define ac_rsassa_vect9_modulus ac_siggen15_186_2_modulus
4577#define ac_rsassa_vect9_pub_exp ac_siggen15_186_2_pub_exp
4578#define ac_rsassa_vect9_priv_exp ac_siggen15_186_2_priv_exp
4579#define ac_rsassa_vect9_prime1 ac_siggen15_186_2_prime1
4580#define ac_rsassa_vect9_prime2 ac_siggen15_186_2_prime2
4581#define ac_rsassa_vect9_exp1 ac_siggen15_186_2_exp1
4582#define ac_rsassa_vect9_exp2 ac_siggen15_186_2_exp2
4583#define ac_rsassa_vect9_coeff ac_siggen15_186_2_coeff
4584static const uint8_t ac_rsassa_vect9_ptx[] = {
4585 0xe5, 0x67, 0xa3, 0x9a, 0xe4, 0xe5, 0xef, 0x9b, 0x68, 0x01, 0xea, 0x05,
4586 0x61, 0xb7, 0x2a, 0x5d, 0x4b, 0x5f, 0x38, 0x5f, 0x05, 0x32, 0xfc, 0x9f,
4587 0xe1, 0x0a, 0x75, 0x70, 0xf8, 0x69, 0xae, 0x05, 0xc0, 0xbd, 0xed, 0xd6,
4588 0xe0, 0xe2, 0x2d, 0x45, 0x42, 0xe9, 0xce, 0x82, 0x6a, 0x18, 0x8c, 0xac,
4589 0x07, 0x31, 0xae, 0x39, 0xc8, 0xf8, 0x7f, 0x97, 0x71, 0xef, 0x02, 0x13,
4590 0x2e, 0x64, 0xe2, 0xfb, 0x27, 0xad, 0xa8, 0xff, 0x54, 0xb3, 0x30, 0xdd,
4591 0x93, 0xad, 0x5e, 0x3e, 0xf8, 0x2e, 0x0d, 0xda, 0x64, 0x62, 0x48, 0xe3,
4592 0x59, 0x94, 0xbd, 0xa1, 0x0c, 0xf4, 0x6e, 0x5a, 0xbc, 0x98, 0xaa, 0x74,
4593 0x43, 0xc0, 0x3c, 0xdd, 0xeb, 0x5e, 0xe2, 0xab, 0x82, 0xd6, 0x01, 0x00,
4594 0xb1, 0x02, 0x96, 0x31, 0x89, 0x79, 0x70, 0x27, 0x5f, 0x11, 0x9d, 0x05,
4595 0xda, 0xa2, 0x22, 0x0a, 0x4a, 0x0d, 0xef, 0xba
4596};
4597static const uint8_t ac_rsassa_vect9_out[] = {
4598 0x0e, 0x7c, 0xdd, 0x12, 0x1e, 0x40, 0x32, 0x3c, 0xa6, 0x11, 0x5d, 0x1e,
4599 0xc6, 0xd1, 0xf9, 0x56, 0x17, 0x38, 0x45, 0x5f, 0x0e, 0x9e, 0x1c, 0xd8,
4600 0x58, 0xe8, 0xb5, 0x66, 0xae, 0x2d, 0xa5, 0xe8, 0xee, 0x63, 0xd8, 0xf1,
4601 0x5c, 0x3c, 0xdd, 0x88, 0x02, 0x7e, 0x13, 0x40, 0x6d, 0xb6, 0x09, 0x36,
4602 0x9c, 0x88, 0xca, 0x99, 0xb3, 0x4f, 0xa1, 0x56, 0xc7, 0xee, 0x62, 0xbc,
4603 0x5a, 0x39, 0x23, 0xbb, 0x5a, 0x1e, 0xda, 0xbd, 0x45, 0xc1, 0xa4, 0x22,
4604 0xaa, 0xfc, 0xbb, 0x47, 0xe0, 0x94, 0x7f, 0x35, 0xcf, 0xef, 0x87, 0x97,
4605 0x0b, 0x4b, 0x71, 0x31, 0x62, 0xb2, 0x19, 0x16, 0xca, 0xfb, 0x8c, 0x86,
4606 0x4a, 0x3e, 0x5b, 0x9f, 0xfc, 0x98, 0x94, 0x01, 0xd4, 0xea, 0xe9, 0x92,
4607 0x31, 0x2a, 0x32, 0xc5, 0xbc, 0x88, 0xab, 0xbb, 0x45, 0xf9, 0x9a, 0xc8,
4608 0x85, 0xb5, 0x4d, 0x6b, 0x8e, 0x61, 0xb6, 0xec
4609};
4610
Gabor Szekely2ad190f2018-09-14 14:05:06 +00004611/* SigGen15_186-2.txt line 93 SHA-256 without ASN.1 */
4612#define ac_rsassa_vect20_modulus ac_siggen15_186_2_modulus
4613#define ac_rsassa_vect20_pub_exp ac_siggen15_186_2_pub_exp
4614#define ac_rsassa_vect20_priv_exp ac_siggen15_186_2_priv_exp
4615#define ac_rsassa_vect20_prime1 ac_siggen15_186_2_prime1
4616#define ac_rsassa_vect20_prime2 ac_siggen15_186_2_prime2
4617#define ac_rsassa_vect20_exp1 ac_siggen15_186_2_exp1
4618#define ac_rsassa_vect20_exp2 ac_siggen15_186_2_exp2
4619#define ac_rsassa_vect20_coeff ac_siggen15_186_2_coeff
4620static const uint8_t ac_rsassa_vect20_ptx[] = {
4621 0xe5, 0x67, 0xa3, 0x9a, 0xe4, 0xe5, 0xef, 0x9b, 0x68, 0x01, 0xea, 0x05,
4622 0x61, 0xb7, 0x2a, 0x5d, 0x4b, 0x5f, 0x38, 0x5f, 0x05, 0x32, 0xfc, 0x9f,
4623 0xe1, 0x0a, 0x75, 0x70, 0xf8, 0x69, 0xae, 0x05, 0xc0, 0xbd, 0xed, 0xd6,
4624 0xe0, 0xe2, 0x2d, 0x45, 0x42, 0xe9, 0xce, 0x82, 0x6a, 0x18, 0x8c, 0xac,
4625 0x07, 0x31, 0xae, 0x39, 0xc8, 0xf8, 0x7f, 0x97, 0x71, 0xef, 0x02, 0x13,
4626 0x2e, 0x64, 0xe2, 0xfb, 0x27, 0xad, 0xa8, 0xff, 0x54, 0xb3, 0x30, 0xdd,
4627 0x93, 0xad, 0x5e, 0x3e, 0xf8, 0x2e, 0x0d, 0xda, 0x64, 0x62, 0x48, 0xe3,
4628 0x59, 0x94, 0xbd, 0xa1, 0x0c, 0xf4, 0x6e, 0x5a, 0xbc, 0x98, 0xaa, 0x74,
4629 0x43, 0xc0, 0x3c, 0xdd, 0xeb, 0x5e, 0xe2, 0xab, 0x82, 0xd6, 0x01, 0x00,
4630 0xb1, 0x02, 0x96, 0x31, 0x89, 0x79, 0x70, 0x27, 0x5f, 0x11, 0x9d, 0x05,
4631 0xda, 0xa2, 0x22, 0x0a, 0x4a, 0x0d, 0xef, 0xba
4632};
4633static const uint8_t ac_rsassa_vect20_out[] = {
4634 0xbe, 0x03, 0x14, 0xbb, 0x4e, 0x73, 0xae, 0xa0, 0x8c, 0x3b, 0xd3, 0x47,
4635 0xc5, 0x71, 0x81, 0x6a, 0xb6, 0x0d, 0xc8, 0xd4, 0xbd, 0x6d, 0x8e, 0x5c,
4636 0xa3, 0x59, 0xd7, 0x31, 0xb3, 0x44, 0xa8, 0x17, 0x09, 0xc5, 0x00, 0x96,
4637 0x1a, 0xaa, 0x8b, 0xb2, 0xb4, 0xdc, 0x63, 0xda, 0xa2, 0x66, 0xe1, 0xf6,
4638 0xbb, 0x73, 0xb3, 0x03, 0x6d, 0x9a, 0x2d, 0x65, 0x9e, 0x10, 0x9c, 0x0c,
4639 0x46, 0xa3, 0xf4, 0xd3, 0x91, 0x23, 0x6d, 0x40, 0xb5, 0x0d, 0xd3, 0x31,
4640 0xea, 0xd3, 0x0d, 0x22, 0xf5, 0xfc, 0xfa, 0x8d, 0x67, 0x08, 0x65, 0x76,
4641 0xd4, 0x41, 0x24, 0xd6, 0x74, 0x2b, 0xfe, 0x44, 0xe5, 0x88, 0xde, 0x28,
4642 0xca, 0x2f, 0xb8, 0xd1, 0xc8, 0xb4, 0x65, 0xb3, 0x8a, 0x4e, 0x1d, 0xdd,
4643 0x43, 0x80, 0x68, 0x72, 0xf7, 0x52, 0x46, 0x56, 0xa0, 0x9e, 0x1d, 0x76,
4644 0x89, 0xee, 0x20, 0x71, 0x66, 0xd1, 0x19, 0xb7
4645};
4646
Pascal Brandc639ac82015-07-02 08:53:34 +02004647/* SigGen15_186-2.txt line 133 SHA-384*/
4648#define ac_rsassa_vect10_modulus ac_siggen15_186_2_modulus
4649#define ac_rsassa_vect10_pub_exp ac_siggen15_186_2_pub_exp
4650#define ac_rsassa_vect10_priv_exp ac_siggen15_186_2_priv_exp
4651#define ac_rsassa_vect10_prime1 ac_siggen15_186_2_prime1
4652#define ac_rsassa_vect10_prime2 ac_siggen15_186_2_prime2
4653#define ac_rsassa_vect10_exp1 ac_siggen15_186_2_exp1
4654#define ac_rsassa_vect10_exp2 ac_siggen15_186_2_exp2
4655#define ac_rsassa_vect10_coeff ac_siggen15_186_2_coeff
4656static const uint8_t ac_rsassa_vect10_ptx[] = {
4657 0xe5, 0x67, 0xa3, 0x9a, 0xe4, 0xe5, 0xef, 0x9b, 0x68, 0x01, 0xea, 0x05,
4658 0x61, 0xb7, 0x2a, 0x5d, 0x4b, 0x5f, 0x38, 0x5f, 0x05, 0x32, 0xfc, 0x9f,
4659 0xe1, 0x0a, 0x75, 0x70, 0xf8, 0x69, 0xae, 0x05, 0xc0, 0xbd, 0xed, 0xd6,
4660 0xe0, 0xe2, 0x2d, 0x45, 0x42, 0xe9, 0xce, 0x82, 0x6a, 0x18, 0x8c, 0xac,
4661 0x07, 0x31, 0xae, 0x39, 0xc8, 0xf8, 0x7f, 0x97, 0x71, 0xef, 0x02, 0x13,
4662 0x2e, 0x64, 0xe2, 0xfb, 0x27, 0xad, 0xa8, 0xff, 0x54, 0xb3, 0x30, 0xdd,
4663 0x93, 0xad, 0x5e, 0x3e, 0xf8, 0x2e, 0x0d, 0xda, 0x64, 0x62, 0x48, 0xe3,
4664 0x59, 0x94, 0xbd, 0xa1, 0x0c, 0xf4, 0x6e, 0x5a, 0xbc, 0x98, 0xaa, 0x74,
4665 0x43, 0xc0, 0x3c, 0xdd, 0xeb, 0x5e, 0xe2, 0xab, 0x82, 0xd6, 0x01, 0x00,
4666 0xb1, 0x02, 0x96, 0x31, 0x89, 0x79, 0x70, 0x27, 0x5f, 0x11, 0x9d, 0x05,
4667 0xda, 0xa2, 0x22, 0x0a, 0x4a, 0x0d, 0xef, 0xba
4668};
4669static const uint8_t ac_rsassa_vect10_out[] = {
4670 0x16, 0x89, 0xa8, 0x52, 0x39, 0x19, 0xac, 0x77, 0xcc, 0x99, 0x7e, 0xbc,
4671 0x59, 0xcb, 0x90, 0x88, 0x72, 0xd8, 0x8b, 0x28, 0x55, 0xa3, 0x09, 0xea,
4672 0xd2, 0x77, 0x9b, 0x88, 0x8b, 0x22, 0xb4, 0x23, 0x2d, 0xa9, 0xb9, 0x3b,
4673 0xb1, 0x9b, 0x32, 0xc1, 0xdb, 0x77, 0xad, 0x73, 0x8c, 0x6e, 0x43, 0x36,
4674 0x1e, 0x9e, 0xb6, 0xb1, 0xa3, 0x7c, 0x49, 0xa8, 0xf3, 0xc7, 0xc7, 0xae,
4675 0x7e, 0x78, 0x4d, 0x19, 0xa6, 0x21, 0x38, 0x74, 0x12, 0x93, 0xe4, 0x9b,
4676 0x18, 0x31, 0xc0, 0xc3, 0x61, 0x7e, 0xb4, 0x3c, 0x56, 0x70, 0x6d, 0x83,
4677 0x31, 0x49, 0x53, 0x47, 0x06, 0x36, 0x44, 0x10, 0x86, 0x41, 0x9a, 0xb9,
4678 0xe6, 0xfd, 0x1e, 0xc4, 0xf9, 0xd5, 0xcc, 0x65, 0x44, 0x81, 0x5d, 0x1e,
4679 0x02, 0xed, 0x96, 0xa3, 0xae, 0x64, 0xc6, 0x99, 0x8b, 0x2c, 0xf2, 0x38,
4680 0xe7, 0x9a, 0x12, 0x16, 0x43, 0x52, 0xd1, 0x2a
4681};
4682
4683/* SigGen15_186-2.txt line 173 SHA-512*/
4684#define ac_rsassa_vect11_modulus ac_siggen15_186_2_modulus
4685#define ac_rsassa_vect11_pub_exp ac_siggen15_186_2_pub_exp
4686#define ac_rsassa_vect11_priv_exp ac_siggen15_186_2_priv_exp
4687#define ac_rsassa_vect11_prime1 ac_siggen15_186_2_prime1
4688#define ac_rsassa_vect11_prime2 ac_siggen15_186_2_prime2
4689#define ac_rsassa_vect11_exp1 ac_siggen15_186_2_exp1
4690#define ac_rsassa_vect11_exp2 ac_siggen15_186_2_exp2
4691#define ac_rsassa_vect11_coeff ac_siggen15_186_2_coeff
4692static const uint8_t ac_rsassa_vect11_ptx[] = {
4693 0xe5, 0x67, 0xa3, 0x9a, 0xe4, 0xe5, 0xef, 0x9b, 0x68, 0x01, 0xea, 0x05,
4694 0x61, 0xb7, 0x2a, 0x5d, 0x4b, 0x5f, 0x38, 0x5f, 0x05, 0x32, 0xfc, 0x9f,
4695 0xe1, 0x0a, 0x75, 0x70, 0xf8, 0x69, 0xae, 0x05, 0xc0, 0xbd, 0xed, 0xd6,
4696 0xe0, 0xe2, 0x2d, 0x45, 0x42, 0xe9, 0xce, 0x82, 0x6a, 0x18, 0x8c, 0xac,
4697 0x07, 0x31, 0xae, 0x39, 0xc8, 0xf8, 0x7f, 0x97, 0x71, 0xef, 0x02, 0x13,
4698 0x2e, 0x64, 0xe2, 0xfb, 0x27, 0xad, 0xa8, 0xff, 0x54, 0xb3, 0x30, 0xdd,
4699 0x93, 0xad, 0x5e, 0x3e, 0xf8, 0x2e, 0x0d, 0xda, 0x64, 0x62, 0x48, 0xe3,
4700 0x59, 0x94, 0xbd, 0xa1, 0x0c, 0xf4, 0x6e, 0x5a, 0xbc, 0x98, 0xaa, 0x74,
4701 0x43, 0xc0, 0x3c, 0xdd, 0xeb, 0x5e, 0xe2, 0xab, 0x82, 0xd6, 0x01, 0x00,
4702 0xb1, 0x02, 0x96, 0x31, 0x89, 0x79, 0x70, 0x27, 0x5f, 0x11, 0x9d, 0x05,
4703 0xda, 0xa2, 0x22, 0x0a, 0x4a, 0x0d, 0xef, 0xba
4704};
4705static const uint8_t ac_rsassa_vect11_out[] = {
4706 0xbf, 0x3f, 0xf2, 0xc6, 0x96, 0x75, 0xf1, 0xb8, 0xed, 0x42, 0x10, 0x21,
4707 0x80, 0x1f, 0xb4, 0xce, 0x29, 0xa7, 0x57, 0xf7, 0xf8, 0x86, 0x9c, 0xe4,
4708 0x36, 0xd0, 0xd7, 0x5a, 0xb7, 0x49, 0xef, 0xc8, 0xb9, 0x03, 0xd9, 0xf9,
4709 0xcb, 0x21, 0x46, 0x86, 0x14, 0x7f, 0x12, 0xf3, 0x33, 0x5f, 0xa9, 0x36,
4710 0x68, 0x9c, 0x19, 0x2f, 0x31, 0x0a, 0xe3, 0xc5, 0xd7, 0x54, 0x93, 0xf4,
4711 0x4b, 0x24, 0xbc, 0x1c, 0xd3, 0x50, 0x15, 0x84, 0xaa, 0xa5, 0x00, 0x4b,
4712 0x65, 0xa8, 0x71, 0x6d, 0x1e, 0xda, 0x72, 0x40, 0xad, 0x8a, 0x52, 0x9d,
4713 0x5a, 0x0c, 0xf1, 0x69, 0xf4, 0x05, 0x4b, 0x45, 0x0e, 0x07, 0x6e, 0xe0,
4714 0xd4, 0x1a, 0x00, 0x11, 0xc5, 0x57, 0xaa, 0x69, 0xa8, 0x4a, 0x81, 0x04,
4715 0xc9, 0x09, 0x20, 0x1d, 0x60, 0xfe, 0x39, 0xc7, 0x9e, 0x68, 0x43, 0x47,
4716 0xef, 0x4d, 0x14, 0x4e, 0xa1, 0x8f, 0x7a, 0x4e
4717};
4718
4719
4720/* SigGenPSS_186-2.txt line 9 mod 1024 */
4721static const uint8_t ac_siggenpss_186_2_modulus[] = {
4722 0xbc, 0xb4, 0x7b, 0x2e, 0x0d, 0xaf, 0xcb, 0xa8, 0x1f, 0xf2, 0xa2, 0xb5,
4723 0xcb, 0x11, 0x5c, 0xa7, 0xe7, 0x57, 0x18, 0x4c, 0x9d, 0x72, 0xbc, 0xdc,
4724 0xda, 0x70, 0x7a, 0x14, 0x6b, 0x3b, 0x4e, 0x29, 0x98, 0x9d, 0xdc, 0x66,
4725 0x0b, 0xd6, 0x94, 0x86, 0x5b, 0x93, 0x2b, 0x71, 0xca, 0x24, 0xa3, 0x35,
4726 0xcf, 0x4d, 0x33, 0x9c, 0x71, 0x91, 0x83, 0xe6, 0x22, 0x2e, 0x4c, 0x9e,
4727 0xa6, 0x87, 0x5a, 0xcd, 0x52, 0x8a, 0x49, 0xba, 0x21, 0x86, 0x3f, 0xe0,
4728 0x81, 0x47, 0xc3, 0xa4, 0x7e, 0x41, 0x99, 0x0b, 0x51, 0xa0, 0x3f, 0x77,
4729 0xd2, 0x21, 0x37, 0xf8, 0xd7, 0x4c, 0x43, 0xa5, 0xa4, 0x5f, 0x4e, 0x9e,
4730 0x18, 0xa2, 0xd1, 0x5d, 0xb0, 0x51, 0xdc, 0x89, 0x38, 0x5d, 0xb9, 0xcf,
4731 0x83, 0x74, 0xb6, 0x3a, 0x8c, 0xc8, 0x81, 0x13, 0x71, 0x0e, 0x6d, 0x81,
4732 0x79, 0x07, 0x5b, 0x7d, 0xc7, 0x9e, 0xe7, 0x6b
4733};
4734static const uint8_t ac_siggenpss_186_2_pub_exp[] = {
4735 0x01, 0x00, 0x01
4736};
4737static const uint8_t ac_siggenpss_186_2_priv_exp[] = {
4738 0x38, 0x3a, 0x6f, 0x19, 0xe1, 0xea, 0x27, 0xfd, 0x08, 0xc7, 0xfb, 0xc3,
4739 0xbf, 0xa6, 0x84, 0xbd, 0x63, 0x29, 0x88, 0x8c, 0x0b, 0xbe, 0x4c, 0x98,
4740 0x62, 0x5e, 0x71, 0x81, 0xf4, 0x11, 0xcf, 0xd0, 0x85, 0x31, 0x44, 0xa3,
4741 0x03, 0x94, 0x04, 0xdd, 0xa4, 0x1b, 0xce, 0x2e, 0x31, 0xd5, 0x88, 0xec,
4742 0x57, 0xc0, 0xe1, 0x48, 0x14, 0x6f, 0x0f, 0xa6, 0x5b, 0x39, 0x00, 0x8b,
4743 0xa5, 0x83, 0x5f, 0x82, 0x9b, 0xa3, 0x5a, 0xe2, 0xf1, 0x55, 0xd6, 0x1b,
4744 0x8a, 0x12, 0x58, 0x1b, 0x99, 0xc9, 0x27, 0xfd, 0x2f, 0x22, 0x25, 0x2c,
4745 0x5e, 0x73, 0xcb, 0xa4, 0xa6, 0x10, 0xdb, 0x39, 0x73, 0xe0, 0x19, 0xee,
4746 0x0f, 0x95, 0x13, 0x0d, 0x43, 0x19, 0xed, 0x41, 0x34, 0x32, 0xf2, 0xe5,
4747 0xe2, 0x0d, 0x52, 0x15, 0xcd, 0xd2, 0x7c, 0x21, 0x64, 0x20, 0x6b, 0x3f,
4748 0x80, 0xed, 0xee, 0x51, 0x93, 0x8a, 0x25, 0xc1
4749};
4750static const uint8_t ac_siggenpss_186_2_prime1[] = {
4751 0xE5, 0x56, 0x3B, 0x14, 0x5D, 0xB6, 0xFF, 0x5A, 0x16, 0x28, 0x0D, 0x3E,
4752 0x80, 0xEF, 0xF0, 0x2F, 0x18, 0x1D, 0xBD, 0x03, 0x32, 0x4E, 0xF2, 0x47,
4753 0xF5, 0x96, 0xA4, 0xD4, 0xA7, 0xB8, 0xDA, 0xA3, 0x2B, 0x99, 0x34, 0xE3,
4754 0xC7, 0xF4, 0xDC, 0xF6, 0xA3, 0x10, 0x54, 0x62, 0xDE, 0xC6, 0x38, 0x39,
4755 0x63, 0x86, 0x18, 0x41, 0x8B, 0x51, 0xDB, 0x02, 0x69, 0x3F, 0xAB, 0xB4,
4756 0xE6, 0x83, 0x87, 0x25
4757};
4758static const uint8_t ac_siggenpss_186_2_prime2[] = {
4759 0xD2, 0xA4, 0xEC, 0x0F, 0xA2, 0x22, 0x6C, 0xDE, 0x82, 0xDA, 0x77, 0x65,
4760 0x3B, 0x07, 0x2C, 0xD0, 0x98, 0x53, 0x5D, 0x3E, 0x90, 0xED, 0x4D, 0x72,
4761 0x24, 0xDC, 0xB8, 0xCB, 0x8B, 0x93, 0x14, 0x76, 0x8D, 0xC5, 0x17, 0xE2,
4762 0x2D, 0x7C, 0x8F, 0xA1, 0x3F, 0x25, 0x3D, 0xAA, 0x74, 0x65, 0xA7, 0x99,
4763 0x56, 0x09, 0x8A, 0xA4, 0xCC, 0x3A, 0x6E, 0x35, 0xE8, 0xB1, 0xFC, 0xC4,
4764 0xF9, 0x7E, 0x77, 0x4F
4765};
4766static const uint8_t ac_siggenpss_186_2_exp1[] = {
4767 0x1F, 0x6A, 0xCA, 0xB9, 0x25, 0x85, 0x76, 0x41, 0xCF, 0x1B, 0x39, 0x85,
4768 0x40, 0x80, 0x9E, 0x34, 0xB5, 0x67, 0x0D, 0x87, 0xAC, 0x92, 0xA8, 0x1A,
4769 0x37, 0x88, 0xA5, 0x98, 0x04, 0x4A, 0x0C, 0x99, 0xA1, 0xD5, 0x61, 0x2B,
4770 0x7B, 0x2F, 0x0E, 0x3E, 0x33, 0x64, 0x7F, 0x4A, 0xF4, 0x1D, 0xCF, 0x81,
4771 0xFD, 0x22, 0x57, 0x9C, 0x53, 0x0B, 0xA9, 0xA7, 0x10, 0xE8, 0x0A, 0x0B,
4772 0xC4, 0x30, 0x6C, 0x89
4773};
4774static const uint8_t ac_siggenpss_186_2_exp2[] = {
4775 0x59, 0xF2, 0x84, 0xBE, 0xD4, 0x3C, 0x21, 0x03, 0x0F, 0x1B, 0x5C, 0xDA,
4776 0x84, 0x4F, 0x37, 0x0A, 0xC7, 0xD0, 0xE9, 0x43, 0x3B, 0x3D, 0xA9, 0xD1,
4777 0x70, 0xFE, 0x33, 0x86, 0xEF, 0x4D, 0xD9, 0xF2, 0x19, 0xED, 0xAC, 0x9A,
4778 0x2F, 0x54, 0x3E, 0x3C, 0xDB, 0xAA, 0xFA, 0x5F, 0x1C, 0x1F, 0x00, 0x67,
4779 0x50, 0xBE, 0xF8, 0x4E, 0x10, 0xCB, 0x6E, 0x9E, 0x64, 0x84, 0x04, 0x6C,
4780 0xD4, 0x20, 0xF5, 0xAF
4781};
4782static const uint8_t ac_siggenpss_186_2_coeff[] = {
4783 0x83, 0x5F, 0xC1, 0xB6, 0x52, 0x1C, 0x83, 0xE7, 0x6F, 0x80, 0x64, 0xFF,
4784 0xF8, 0x38, 0x80, 0xE1, 0xC9, 0x8F, 0x81, 0x13, 0x1E, 0xE8, 0x6E, 0x5D,
4785 0xF8, 0x57, 0x6A, 0xDA, 0x7D, 0x75, 0xC2, 0x6F, 0x8D, 0xB8, 0xBA, 0x8B,
4786 0x46, 0xF4, 0x6C, 0x69, 0xA5, 0x9D, 0xC5, 0xF2, 0x11, 0x8A, 0x9A, 0x90,
4787 0x8E, 0xC0, 0x8F, 0x45, 0xB0, 0x50, 0x4D, 0x2A, 0x42, 0x86, 0x49, 0x5E,
4788 0x2A, 0x1B, 0x78, 0x2E
4789};
4790/* Salt: 6f2841166a64471d4f0b8ed0dbb7db32161da13b */
4791#define ac_siggenpss_186_2_salt_len 20
4792
4793
4794/* SigGen15_186-2.txt line 173 SHA-1 */
4795#define ac_rsassa_vect12_modulus ac_siggenpss_186_2_modulus
4796#define ac_rsassa_vect12_pub_exp ac_siggenpss_186_2_pub_exp
4797#define ac_rsassa_vect12_priv_exp ac_siggenpss_186_2_priv_exp
4798#define ac_rsassa_vect12_prime1 ac_siggenpss_186_2_prime1
4799#define ac_rsassa_vect12_prime2 ac_siggenpss_186_2_prime2
4800#define ac_rsassa_vect12_exp1 ac_siggenpss_186_2_exp1
4801#define ac_rsassa_vect12_exp2 ac_siggenpss_186_2_exp2
4802#define ac_rsassa_vect12_coeff ac_siggenpss_186_2_coeff
4803#define ac_rsassa_vect12_salt_len ac_siggenpss_186_2_salt_len
4804static const uint8_t ac_rsassa_vect12_ptx[] = {
4805 0x12, 0x48, 0xf6, 0x2a, 0x43, 0x89, 0xf4, 0x2f, 0x7b, 0x4b, 0xb1, 0x31,
4806 0x05, 0x3d, 0x6c, 0x88, 0xa9, 0x94, 0xdb, 0x20, 0x75, 0xb9, 0x12, 0xcc,
4807 0xbe, 0x3e, 0xa7, 0xdc, 0x61, 0x17, 0x14, 0xf1, 0x4e, 0x07, 0x5c, 0x10,
4808 0x48, 0x58, 0xf2, 0xf6, 0xe6, 0xcf, 0xd6, 0xab, 0xde, 0xdf, 0x01, 0x5a,
4809 0x82, 0x1d, 0x03, 0x60, 0x8b, 0xf4, 0xeb, 0xa3, 0x16, 0x9a, 0x67, 0x25,
4810 0xec, 0x42, 0x2c, 0xd9, 0x06, 0x94, 0x98, 0xb5, 0x51, 0x5a, 0x96, 0x08,
4811 0xae, 0x7c, 0xc3, 0x0e, 0x3d, 0x2e, 0xcf, 0xc1, 0xdb, 0x68, 0x25, 0xf3,
4812 0xe9, 0x96, 0xce, 0x9a, 0x50, 0x92, 0x92, 0x6b, 0xc1, 0xcf, 0x61, 0xaa,
4813 0x42, 0xd7, 0xf2, 0x40, 0xe6, 0xf7, 0xaa, 0x0e, 0xdb, 0x38, 0xbf, 0x81,
4814 0xaa, 0x92, 0x9d, 0x66, 0xbb, 0x5d, 0x89, 0x00, 0x18, 0x08, 0x84, 0x58,
4815 0x72, 0x0d, 0x72, 0xd5, 0x69, 0x24, 0x7b, 0x0c
4816};
4817static const uint8_t ac_rsassa_vect12_out[] = {
4818 0x68, 0x2c, 0xf5, 0x3c, 0x11, 0x45, 0xd2, 0x2a, 0x50, 0xca, 0xa9, 0xeb,
4819 0x1a, 0x9b, 0xa7, 0x06, 0x70, 0xc5, 0x91, 0x5e, 0x0f, 0xdf, 0xde, 0x64,
4820 0x57, 0xa7, 0x65, 0xde, 0x2a, 0x8f, 0xe1, 0x2d, 0xe9, 0x79, 0x41, 0x72,
4821 0xa7, 0x8d, 0x14, 0xe6, 0x68, 0xd4, 0x98, 0xac, 0xed, 0xad, 0x61, 0x65,
4822 0x04, 0xbb, 0x17, 0x64, 0xd0, 0x94, 0x60, 0x70, 0x70, 0x08, 0x05, 0x92,
4823 0xc3, 0xa6, 0x9c, 0x34, 0x3d, 0x98, 0x2b, 0xd7, 0x78, 0x65, 0x87, 0x3d,
4824 0x35, 0xe2, 0x48, 0x22, 0xca, 0xf4, 0x34, 0x43, 0xcc, 0x10, 0x24, 0x9a,
4825 0xf6, 0xa1, 0xe2, 0x6e, 0xf3, 0x44, 0xf2, 0x8b, 0x9e, 0xf6, 0xf1, 0x4e,
4826 0x09, 0xad, 0x83, 0x97, 0x48, 0xe5, 0x14, 0x8b, 0xcc, 0xeb, 0x0f, 0xd2,
4827 0xaa, 0x63, 0x70, 0x9c, 0xb4, 0x89, 0x75, 0xcb, 0xf9, 0xc7, 0xb4, 0x9a,
4828 0xbc, 0x66, 0xa1, 0xdc, 0x6c, 0xb5, 0xb3, 0x1a
4829};
4830
4831/* SigGenPSS_186-2.txt line 66 SHA-224 */
4832#define ac_rsassa_vect17_modulus ac_siggenpss_186_2_modulus
4833#define ac_rsassa_vect17_pub_exp ac_siggenpss_186_2_pub_exp
4834#define ac_rsassa_vect17_priv_exp ac_siggenpss_186_2_priv_exp
4835#define ac_rsassa_vect17_prime1 ac_siggenpss_186_2_prime1
4836#define ac_rsassa_vect17_prime2 ac_siggenpss_186_2_prime2
4837#define ac_rsassa_vect17_exp1 ac_siggenpss_186_2_exp1
4838#define ac_rsassa_vect17_exp2 ac_siggenpss_186_2_exp2
4839#define ac_rsassa_vect17_coeff ac_siggenpss_186_2_coeff
4840#define ac_rsassa_vect17_salt_len ac_siggenpss_186_2_salt_len
4841static const uint8_t ac_rsassa_vect17_ptx[] = {
4842 0x12, 0x48, 0xf6, 0x2a, 0x43, 0x89, 0xf4, 0x2f, 0x7b, 0x4b, 0xb1, 0x31,
4843 0x05, 0x3d, 0x6c, 0x88, 0xa9, 0x94, 0xdb, 0x20, 0x75, 0xb9, 0x12, 0xcc,
4844 0xbe, 0x3e, 0xa7, 0xdc, 0x61, 0x17, 0x14, 0xf1, 0x4e, 0x07, 0x5c, 0x10,
4845 0x48, 0x58, 0xf2, 0xf6, 0xe6, 0xcf, 0xd6, 0xab, 0xde, 0xdf, 0x01, 0x5a,
4846 0x82, 0x1d, 0x03, 0x60, 0x8b, 0xf4, 0xeb, 0xa3, 0x16, 0x9a, 0x67, 0x25,
4847 0xec, 0x42, 0x2c, 0xd9, 0x06, 0x94, 0x98, 0xb5, 0x51, 0x5a, 0x96, 0x08,
4848 0xae, 0x7c, 0xc3, 0x0e, 0x3d, 0x2e, 0xcf, 0xc1, 0xdb, 0x68, 0x25, 0xf3,
4849 0xe9, 0x96, 0xce, 0x9a, 0x50, 0x92, 0x92, 0x6b, 0xc1, 0xcf, 0x61, 0xaa,
4850 0x42, 0xd7, 0xf2, 0x40, 0xe6, 0xf7, 0xaa, 0x0e, 0xdb, 0x38, 0xbf, 0x81,
4851 0xaa, 0x92, 0x9d, 0x66, 0xbb, 0x5d, 0x89, 0x00, 0x18, 0x08, 0x84, 0x58,
4852 0x72, 0x0d, 0x72, 0xd5, 0x69, 0x24, 0x7b, 0x0c,
4853};
4854static const uint8_t ac_rsassa_vect17_out[] = {
4855 0x53, 0xd8, 0x59, 0xc9, 0xf1, 0x0a, 0xbf, 0x1c, 0x00, 0x28, 0x4a, 0x4b,
4856 0x55, 0xbf, 0x2b, 0xd8, 0x4d, 0x8e, 0x31, 0x3b, 0x4f, 0x3c, 0x35, 0xb8,
4857 0xde, 0xc7, 0xbc, 0x3a, 0xfe, 0x39, 0xb9, 0xb8, 0xa1, 0x55, 0x41, 0x8e,
4858 0xad, 0x19, 0x31, 0x89, 0x57, 0x69, 0xce, 0x23, 0x40, 0xbe, 0x20, 0x91,
4859 0xf2, 0x38, 0x5b, 0xbc, 0xf1, 0x0d, 0x9e, 0x92, 0xbc, 0xf5, 0xd0, 0xe2,
4860 0x96, 0x0d, 0x10, 0xe7, 0x92, 0xe7, 0xd8, 0x65, 0xc6, 0x4e, 0x50, 0xd1,
4861 0x9f, 0xfa, 0x13, 0xe5, 0x28, 0x17, 0xd7, 0xd8, 0xd8, 0xdb, 0x34, 0x39,
4862 0x2c, 0x23, 0x74, 0xa2, 0xe9, 0xb6, 0x91, 0x84, 0xf9, 0x2a, 0x4a, 0xd9,
4863 0xb1, 0xb8, 0xba, 0xe9, 0x9c, 0xa6, 0x14, 0xd2, 0x04, 0xb6, 0x5a, 0x43,
4864 0x8e, 0x38, 0xdb, 0xbf, 0xc8, 0xc7, 0xcc, 0x44, 0xed, 0x56, 0x77, 0xaf,
4865 0x70, 0xce, 0x6c, 0x4f, 0x95, 0x1f, 0x02, 0x44,
4866};
4867
4868/* SigGen15_186-2.txt line 114 SHA-256 */
4869#define ac_rsassa_vect13_modulus ac_siggenpss_186_2_modulus
4870#define ac_rsassa_vect13_pub_exp ac_siggenpss_186_2_pub_exp
4871#define ac_rsassa_vect13_priv_exp ac_siggenpss_186_2_priv_exp
4872#define ac_rsassa_vect13_prime1 ac_siggenpss_186_2_prime1
4873#define ac_rsassa_vect13_prime2 ac_siggenpss_186_2_prime2
4874#define ac_rsassa_vect13_exp1 ac_siggenpss_186_2_exp1
4875#define ac_rsassa_vect13_exp2 ac_siggenpss_186_2_exp2
4876#define ac_rsassa_vect13_coeff ac_siggenpss_186_2_coeff
4877#define ac_rsassa_vect13_salt_len ac_siggenpss_186_2_salt_len
4878static const uint8_t ac_rsassa_vect13_ptx[] = {
4879 0x12, 0x48, 0xf6, 0x2a, 0x43, 0x89, 0xf4, 0x2f, 0x7b, 0x4b, 0xb1, 0x31,
4880 0x05, 0x3d, 0x6c, 0x88, 0xa9, 0x94, 0xdb, 0x20, 0x75, 0xb9, 0x12, 0xcc,
4881 0xbe, 0x3e, 0xa7, 0xdc, 0x61, 0x17, 0x14, 0xf1, 0x4e, 0x07, 0x5c, 0x10,
4882 0x48, 0x58, 0xf2, 0xf6, 0xe6, 0xcf, 0xd6, 0xab, 0xde, 0xdf, 0x01, 0x5a,
4883 0x82, 0x1d, 0x03, 0x60, 0x8b, 0xf4, 0xeb, 0xa3, 0x16, 0x9a, 0x67, 0x25,
4884 0xec, 0x42, 0x2c, 0xd9, 0x06, 0x94, 0x98, 0xb5, 0x51, 0x5a, 0x96, 0x08,
4885 0xae, 0x7c, 0xc3, 0x0e, 0x3d, 0x2e, 0xcf, 0xc1, 0xdb, 0x68, 0x25, 0xf3,
4886 0xe9, 0x96, 0xce, 0x9a, 0x50, 0x92, 0x92, 0x6b, 0xc1, 0xcf, 0x61, 0xaa,
4887 0x42, 0xd7, 0xf2, 0x40, 0xe6, 0xf7, 0xaa, 0x0e, 0xdb, 0x38, 0xbf, 0x81,
4888 0xaa, 0x92, 0x9d, 0x66, 0xbb, 0x5d, 0x89, 0x00, 0x18, 0x08, 0x84, 0x58,
4889 0x72, 0x0d, 0x72, 0xd5, 0x69, 0x24, 0x7b, 0x0c
4890};
4891static const uint8_t ac_rsassa_vect13_out[] = {
4892 0x7b, 0x1d, 0x37, 0x27, 0x8e, 0x54, 0x98, 0x98, 0xd4, 0x08, 0x4e, 0x22,
4893 0x10, 0xc4, 0xa9, 0x96, 0x1e, 0xdf, 0xe7, 0xb5, 0x96, 0x35, 0x50, 0xcc,
4894 0xa1, 0x90, 0x42, 0x48, 0xc8, 0x68, 0x15, 0x13, 0x53, 0x90, 0x17, 0x82,
4895 0x0f, 0x0e, 0x9b, 0xd0, 0x74, 0xb9, 0xf8, 0xa0, 0x67, 0xb9, 0xfe, 0xff,
4896 0xf7, 0xf1, 0xfa, 0x20, 0xbf, 0x2d, 0x0c, 0x75, 0x01, 0x5f, 0xf0, 0x20,
4897 0xb2, 0x21, 0x0c, 0xc7, 0xf7, 0x90, 0x34, 0xfe, 0xdf, 0x68, 0xe8, 0xd4,
4898 0x4a, 0x00, 0x7a, 0xbf, 0x4d, 0xd8, 0x2c, 0x26, 0xe8, 0xb0, 0x03, 0x93,
4899 0x72, 0x3a, 0xea, 0x15, 0xab, 0xfb, 0xc2, 0x29, 0x41, 0xc8, 0xcf, 0x79,
4900 0x48, 0x17, 0x18, 0xc0, 0x08, 0xda, 0x71, 0x3f, 0xb8, 0xf5, 0x4c, 0xb3,
4901 0xfc, 0xa8, 0x90, 0xbd, 0xe1, 0x13, 0x73, 0x14, 0x33, 0x4b, 0x9b, 0x0a,
4902 0x18, 0x51, 0x5b, 0xfa, 0x48, 0xe5, 0xcc, 0xd0
4903};
4904
4905/* SigGen15_186-2.txt line 164 SHA-384 */
4906#define ac_rsassa_vect14_modulus ac_siggenpss_186_2_modulus
4907#define ac_rsassa_vect14_pub_exp ac_siggenpss_186_2_pub_exp
4908#define ac_rsassa_vect14_priv_exp ac_siggenpss_186_2_priv_exp
4909#define ac_rsassa_vect14_prime1 ac_siggenpss_186_2_prime1
4910#define ac_rsassa_vect14_prime2 ac_siggenpss_186_2_prime2
4911#define ac_rsassa_vect14_exp1 ac_siggenpss_186_2_exp1
4912#define ac_rsassa_vect14_exp2 ac_siggenpss_186_2_exp2
4913#define ac_rsassa_vect14_coeff ac_siggenpss_186_2_coeff
4914#define ac_rsassa_vect14_salt_len ac_siggenpss_186_2_salt_len
4915static const uint8_t ac_rsassa_vect14_ptx[] = {
4916 0x12, 0x48, 0xf6, 0x2a, 0x43, 0x89, 0xf4, 0x2f, 0x7b, 0x4b, 0xb1, 0x31,
4917 0x05, 0x3d, 0x6c, 0x88, 0xa9, 0x94, 0xdb, 0x20, 0x75, 0xb9, 0x12, 0xcc,
4918 0xbe, 0x3e, 0xa7, 0xdc, 0x61, 0x17, 0x14, 0xf1, 0x4e, 0x07, 0x5c, 0x10,
4919 0x48, 0x58, 0xf2, 0xf6, 0xe6, 0xcf, 0xd6, 0xab, 0xde, 0xdf, 0x01, 0x5a,
4920 0x82, 0x1d, 0x03, 0x60, 0x8b, 0xf4, 0xeb, 0xa3, 0x16, 0x9a, 0x67, 0x25,
4921 0xec, 0x42, 0x2c, 0xd9, 0x06, 0x94, 0x98, 0xb5, 0x51, 0x5a, 0x96, 0x08,
4922 0xae, 0x7c, 0xc3, 0x0e, 0x3d, 0x2e, 0xcf, 0xc1, 0xdb, 0x68, 0x25, 0xf3,
4923 0xe9, 0x96, 0xce, 0x9a, 0x50, 0x92, 0x92, 0x6b, 0xc1, 0xcf, 0x61, 0xaa,
4924 0x42, 0xd7, 0xf2, 0x40, 0xe6, 0xf7, 0xaa, 0x0e, 0xdb, 0x38, 0xbf, 0x81,
4925 0xaa, 0x92, 0x9d, 0x66, 0xbb, 0x5d, 0x89, 0x00, 0x18, 0x08, 0x84, 0x58,
4926 0x72, 0x0d, 0x72, 0xd5, 0x69, 0x24, 0x7b, 0x0c
4927};
4928static const uint8_t ac_rsassa_vect14_out[] = {
4929 0x8f, 0x16, 0xc8, 0x07, 0xbe, 0xf3, 0xed, 0x6f, 0x74, 0xee, 0x7f, 0xf5,
4930 0xc3, 0x60, 0xa5, 0x42, 0x8c, 0x6c, 0x2f, 0x10, 0x51, 0x78, 0xb5, 0x8f,
4931 0xf7, 0xd0, 0x73, 0xe5, 0x66, 0xda, 0xd6, 0xe7, 0x71, 0x8d, 0x31, 0x29,
4932 0xc7, 0x68, 0xcd, 0x5a, 0x96, 0x66, 0xde, 0x2b, 0x6c, 0x94, 0x71, 0x77,
4933 0xb4, 0x57, 0x09, 0xdc, 0x7c, 0xd0, 0xf4, 0x3b, 0x0b, 0xa6, 0xfc, 0x75,
4934 0x57, 0x8e, 0x11, 0x96, 0xac, 0xc1, 0x5c, 0xa3, 0xaf, 0xe4, 0xa7, 0x8c,
4935 0x14, 0x4c, 0xb6, 0x88, 0x5c, 0x1c, 0xc8, 0x15, 0xf7, 0xf9, 0x89, 0x25,
4936 0xbc, 0x04, 0xad, 0x2f, 0xf2, 0x0f, 0xc1, 0x06, 0x8b, 0x04, 0x5d, 0x94,
4937 0x50, 0xe2, 0xa1, 0xdc, 0xf5, 0xa1, 0x61, 0xce, 0xab, 0xba, 0x2b, 0x0b,
4938 0x66, 0xc7, 0x35, 0x4f, 0xdb, 0x80, 0xfa, 0x1d, 0x72, 0x9e, 0x5f, 0x97,
4939 0x63, 0x87, 0xf2, 0x4a, 0x69, 0x7a, 0x7e, 0x56
4940};
4941
4942/* SigGen15_186-2.txt line 214 SHA-512 */
4943#define ac_rsassa_vect15_modulus ac_siggenpss_186_2_modulus
4944#define ac_rsassa_vect15_pub_exp ac_siggenpss_186_2_pub_exp
4945#define ac_rsassa_vect15_priv_exp ac_siggenpss_186_2_priv_exp
4946#define ac_rsassa_vect15_prime1 ac_siggenpss_186_2_prime1
4947#define ac_rsassa_vect15_prime2 ac_siggenpss_186_2_prime2
4948#define ac_rsassa_vect15_exp1 ac_siggenpss_186_2_exp1
4949#define ac_rsassa_vect15_exp2 ac_siggenpss_186_2_exp2
4950#define ac_rsassa_vect15_coeff ac_siggenpss_186_2_coeff
4951#define ac_rsassa_vect15_salt_len ac_siggenpss_186_2_salt_len
4952static const uint8_t ac_rsassa_vect15_ptx[] = {
4953 0x12, 0x48, 0xf6, 0x2a, 0x43, 0x89, 0xf4, 0x2f, 0x7b, 0x4b, 0xb1, 0x31,
4954 0x05, 0x3d, 0x6c, 0x88, 0xa9, 0x94, 0xdb, 0x20, 0x75, 0xb9, 0x12, 0xcc,
4955 0xbe, 0x3e, 0xa7, 0xdc, 0x61, 0x17, 0x14, 0xf1, 0x4e, 0x07, 0x5c, 0x10,
4956 0x48, 0x58, 0xf2, 0xf6, 0xe6, 0xcf, 0xd6, 0xab, 0xde, 0xdf, 0x01, 0x5a,
4957 0x82, 0x1d, 0x03, 0x60, 0x8b, 0xf4, 0xeb, 0xa3, 0x16, 0x9a, 0x67, 0x25,
4958 0xec, 0x42, 0x2c, 0xd9, 0x06, 0x94, 0x98, 0xb5, 0x51, 0x5a, 0x96, 0x08,
4959 0xae, 0x7c, 0xc3, 0x0e, 0x3d, 0x2e, 0xcf, 0xc1, 0xdb, 0x68, 0x25, 0xf3,
4960 0xe9, 0x96, 0xce, 0x9a, 0x50, 0x92, 0x92, 0x6b, 0xc1, 0xcf, 0x61, 0xaa,
4961 0x42, 0xd7, 0xf2, 0x40, 0xe6, 0xf7, 0xaa, 0x0e, 0xdb, 0x38, 0xbf, 0x81,
4962 0xaa, 0x92, 0x9d, 0x66, 0xbb, 0x5d, 0x89, 0x00, 0x18, 0x08, 0x84, 0x58,
4963 0x72, 0x0d, 0x72, 0xd5, 0x69, 0x24, 0x7b, 0x0c
4964};
4965static const uint8_t ac_rsassa_vect15_out[] = {
4966 0xa8, 0x33, 0xba, 0x31, 0x63, 0x4f, 0x87, 0x73, 0xe4, 0xfe, 0x6e, 0xa0,
4967 0xc6, 0x9e, 0x1a, 0x23, 0x76, 0x6a, 0x93, 0x9d, 0x34, 0xb3, 0x2f, 0xc7,
4968 0x8b, 0x77, 0x4b, 0x22, 0xe4, 0x6a, 0x64, 0x6c, 0x25, 0xe6, 0xe1, 0x06,
4969 0x2d, 0x23, 0x4e, 0xd4, 0x8b, 0x1a, 0xba, 0x0f, 0x83, 0x05, 0x29, 0xff,
4970 0x6a, 0xfc, 0x29, 0x6c, 0xc8, 0xdc, 0x20, 0x7b, 0xbc, 0x15, 0x39, 0x16,
4971 0x23, 0xbe, 0xac, 0x5f, 0x6c, 0x3d, 0xb5, 0x57, 0xca, 0x49, 0xd0, 0xe4,
4972 0x2c, 0x96, 0x2d, 0xe9, 0x5b, 0x5f, 0xf5, 0x48, 0xcf, 0xf9, 0x70, 0xf5,
4973 0xc7, 0x3f, 0x43, 0x9c, 0xfe, 0x82, 0xd3, 0x90, 0x7b, 0xe6, 0x02, 0x40,
4974 0xf5, 0x6b, 0x6a, 0x42, 0x59, 0xcc, 0x96, 0xdf, 0xd8, 0xfe, 0x02, 0xa0,
4975 0xbf, 0xa2, 0x6e, 0x02, 0x23, 0xf6, 0x82, 0x14, 0x42, 0x8f, 0xff, 0x0a,
4976 0xe4, 0x01, 0x62, 0x19, 0x8c, 0xc5, 0xcb, 0xd1
4977};
4978
4979/*
Pascal Brandc639ac82015-07-02 08:53:34 +02004980 * Test data from ftp://ftp.rsa.com/pub/rsalabs/tmp/pkcs1v15crypt-vectors.txt
4981 *
4982 * As specified in PKCS#1, the block type for this operation is 2.
4983 * The seed value of each example provides the pseudo random bytes
4984 * to be used for padding. This makes the result predictable.
4985 */
4986
4987/* PKCS#1 v1.5 Signature Example 1 1024-bit RSA key pair */
4988static const uint8_t ac_rsaes_pkcs1_v1_5_example1_modulus[] = {
4989 0xa8, 0xb3, 0xb2, 0x84, 0xaf, 0x8e, 0xb5, 0x0b, 0x38, 0x70, 0x34, 0xa8,
4990 0x60, 0xf1, 0x46, 0xc4, 0x91, 0x9f, 0x31, 0x87, 0x63, 0xcd, 0x6c, 0x55,
4991 0x98, 0xc8, 0xae, 0x48, 0x11, 0xa1, 0xe0, 0xab, 0xc4, 0xc7, 0xe0, 0xb0,
4992 0x82, 0xd6, 0x93, 0xa5, 0xe7, 0xfc, 0xed, 0x67, 0x5c, 0xf4, 0x66, 0x85,
4993 0x12, 0x77, 0x2c, 0x0c, 0xbc, 0x64, 0xa7, 0x42, 0xc6, 0xc6, 0x30, 0xf5,
4994 0x33, 0xc8, 0xcc, 0x72, 0xf6, 0x2a, 0xe8, 0x33, 0xc4, 0x0b, 0xf2, 0x58,
4995 0x42, 0xe9, 0x84, 0xbb, 0x78, 0xbd, 0xbf, 0x97, 0xc0, 0x10, 0x7d, 0x55,
4996 0xbd, 0xb6, 0x62, 0xf5, 0xc4, 0xe0, 0xfa, 0xb9, 0x84, 0x5c, 0xb5, 0x14,
4997 0x8e, 0xf7, 0x39, 0x2d, 0xd3, 0xaa, 0xff, 0x93, 0xae, 0x1e, 0x6b, 0x66,
4998 0x7b, 0xb3, 0xd4, 0x24, 0x76, 0x16, 0xd4, 0xf5, 0xba, 0x10, 0xd4, 0xcf,
4999 0xd2, 0x26, 0xde, 0x88, 0xd3, 0x9f, 0x16, 0xfb
5000};
5001static const uint8_t ac_rsaes_pkcs1_v1_5_example1_pub_exp[] = {
5002 0x01, 0x00, 0x01
5003};
5004static const uint8_t ac_rsaes_pkcs1_v1_5_example1_priv_exp[] = {
5005 0x53, 0x33, 0x9c, 0xfd, 0xb7, 0x9f, 0xc8, 0x46, 0x6a, 0x65, 0x5c, 0x73,
5006 0x16, 0xac, 0xa8, 0x5c, 0x55, 0xfd, 0x8f, 0x6d, 0xd8, 0x98, 0xfd, 0xaf,
5007 0x11, 0x95, 0x17, 0xef, 0x4f, 0x52, 0xe8, 0xfd, 0x8e, 0x25, 0x8d, 0xf9,
5008 0x3f, 0xee, 0x18, 0x0f, 0xa0, 0xe4, 0xab, 0x29, 0x69, 0x3c, 0xd8, 0x3b,
5009 0x15, 0x2a, 0x55, 0x3d, 0x4a, 0xc4, 0xd1, 0x81, 0x2b, 0x8b, 0x9f, 0xa5,
5010 0xaf, 0x0e, 0x7f, 0x55, 0xfe, 0x73, 0x04, 0xdf, 0x41, 0x57, 0x09, 0x26,
5011 0xf3, 0x31, 0x1f, 0x15, 0xc4, 0xd6, 0x5a, 0x73, 0x2c, 0x48, 0x31, 0x16,
5012 0xee, 0x3d, 0x3d, 0x2d, 0x0a, 0xf3, 0x54, 0x9a, 0xd9, 0xbf, 0x7c, 0xbf,
5013 0xb7, 0x8a, 0xd8, 0x84, 0xf8, 0x4d, 0x5b, 0xeb, 0x04, 0x72, 0x4d, 0xc7,
5014 0x36, 0x9b, 0x31, 0xde, 0xf3, 0x7d, 0x0c, 0xf5, 0x39, 0xe9, 0xcf, 0xcd,
5015 0xd3, 0xde, 0x65, 0x37, 0x29, 0xea, 0xd5, 0xd1
5016};
5017static const uint8_t ac_rsaes_pkcs1_v1_5_example1_prime1[] = {
5018 0xd3, 0x27, 0x37, 0xe7, 0x26, 0x7f, 0xfe, 0x13, 0x41, 0xb2, 0xd5, 0xc0,
5019 0xd1, 0x50, 0xa8, 0x1b, 0x58, 0x6f, 0xb3, 0x13, 0x2b, 0xed, 0x2f, 0x8d,
5020 0x52, 0x62, 0x86, 0x4a, 0x9c, 0xb9, 0xf3, 0x0a, 0xf3, 0x8b, 0xe4, 0x48,
5021 0x59, 0x8d, 0x41, 0x3a, 0x17, 0x2e, 0xfb, 0x80, 0x2c, 0x21, 0xac, 0xf1,
5022 0xc1, 0x1c, 0x52, 0x0c, 0x2f, 0x26, 0xa4, 0x71, 0xdc, 0xad, 0x21, 0x2e,
5023 0xac, 0x7c, 0xa3, 0x9d
5024};
5025static const uint8_t ac_rsaes_pkcs1_v1_5_example1_prime2[] = {
5026 0xcc, 0x88, 0x53, 0xd1, 0xd5, 0x4d, 0xa6, 0x30, 0xfa, 0xc0, 0x04, 0xf4,
5027 0x71, 0xf2, 0x81, 0xc7, 0xb8, 0x98, 0x2d, 0x82, 0x24, 0xa4, 0x90, 0xed,
5028 0xbe, 0xb3, 0x3d, 0x3e, 0x3d, 0x5c, 0xc9, 0x3c, 0x47, 0x65, 0x70, 0x3d,
5029 0x1d, 0xd7, 0x91, 0x64, 0x2f, 0x1f, 0x11, 0x6a, 0x0d, 0xd8, 0x52, 0xbe,
5030 0x24, 0x19, 0xb2, 0xaf, 0x72, 0xbf, 0xe9, 0xa0, 0x30, 0xe8, 0x60, 0xb0,
5031 0x28, 0x8b, 0x5d, 0x77
5032};
5033static const uint8_t ac_rsaes_pkcs1_v1_5_example1_exp1[] = {
5034 0x0e, 0x12, 0xbf, 0x17, 0x18, 0xe9, 0xce, 0xf5, 0x59, 0x9b, 0xa1, 0xc3,
5035 0x88, 0x2f, 0xe8, 0x04, 0x6a, 0x90, 0x87, 0x4e, 0xef, 0xce, 0x8f, 0x2c,
5036 0xcc, 0x20, 0xe4, 0xf2, 0x74, 0x1f, 0xb0, 0xa3, 0x3a, 0x38, 0x48, 0xae,
5037 0xc9, 0xc9, 0x30, 0x5f, 0xbe, 0xcb, 0xd2, 0xd7, 0x68, 0x19, 0x96, 0x7d,
5038 0x46, 0x71, 0xac, 0xc6, 0x43, 0x1e, 0x40, 0x37, 0x96, 0x8d, 0xb3, 0x78,
5039 0x78, 0xe6, 0x95, 0xc1
5040};
5041static const uint8_t ac_rsaes_pkcs1_v1_5_example1_exp2[] = {
5042 0x95, 0x29, 0x7b, 0x0f, 0x95, 0xa2, 0xfa, 0x67, 0xd0, 0x07, 0x07, 0xd6,
5043 0x09, 0xdf, 0xd4, 0xfc, 0x05, 0xc8, 0x9d, 0xaf, 0xc2, 0xef, 0x6d, 0x6e,
5044 0xa5, 0x5b, 0xec, 0x77, 0x1e, 0xa3, 0x33, 0x73, 0x4d, 0x92, 0x51, 0xe7,
5045 0x90, 0x82, 0xec, 0xda, 0x86, 0x6e, 0xfe, 0xf1, 0x3c, 0x45, 0x9e, 0x1a,
5046 0x63, 0x13, 0x86, 0xb7, 0xe3, 0x54, 0xc8, 0x99, 0xf5, 0xf1, 0x12, 0xca,
5047 0x85, 0xd7, 0x15, 0x83
5048};
5049static const uint8_t ac_rsaes_pkcs1_v1_5_example1_coeff[] = {
5050 0x4f, 0x45, 0x6c, 0x50, 0x24, 0x93, 0xbd, 0xc0, 0xed, 0x2a, 0xb7, 0x56,
5051 0xa3, 0xa6, 0xed, 0x4d, 0x67, 0x35, 0x2a, 0x69, 0x7d, 0x42, 0x16, 0xe9,
5052 0x32, 0x12, 0xb1, 0x27, 0xa6, 0x3d, 0x54, 0x11, 0xce, 0x6f, 0xa9, 0x8d,
5053 0x5d, 0xbe, 0xfd, 0x73, 0x26, 0x3e, 0x37, 0x28, 0x14, 0x27, 0x43, 0x81,
5054 0x81, 0x66, 0xed, 0x7d, 0xd6, 0x36, 0x87, 0xdd, 0x2a, 0x8c, 0xa1, 0xd2,
5055 0xf4, 0xfb, 0xd8, 0xe1
5056};
5057
5058
5059/* PKCS#1 v1.5 Encrypt Example 1.1 */
5060#define ac_rsaes_pkcs1_v1_5_vect1_modulus ac_rsaes_pkcs1_v1_5_example1_modulus
5061#define ac_rsaes_pkcs1_v1_5_vect1_pub_exp ac_rsaes_pkcs1_v1_5_example1_pub_exp
5062#define ac_rsaes_pkcs1_v1_5_vect1_priv_exp ac_rsaes_pkcs1_v1_5_example1_priv_exp
5063#define ac_rsaes_pkcs1_v1_5_vect1_prime1 ac_rsaes_pkcs1_v1_5_example1_prime1
5064#define ac_rsaes_pkcs1_v1_5_vect1_prime2 ac_rsaes_pkcs1_v1_5_example1_prime2
5065#define ac_rsaes_pkcs1_v1_5_vect1_exp1 ac_rsaes_pkcs1_v1_5_example1_exp1
5066#define ac_rsaes_pkcs1_v1_5_vect1_exp2 ac_rsaes_pkcs1_v1_5_example1_exp2
5067#define ac_rsaes_pkcs1_v1_5_vect1_coeff ac_rsaes_pkcs1_v1_5_example1_coeff
5068static const uint8_t ac_rsaes_pkcs1_v1_5_vect1_ptx[] = {
5069 0x66, 0x28, 0x19, 0x4e, 0x12, 0x07, 0x3d, 0xb0, 0x3b, 0xa9, 0x4c, 0xda,
5070 0x9e, 0xf9, 0x53, 0x23,
5071 0x97, 0xd5, 0x0d, 0xba, 0x79, 0xb9, 0x87, 0x00, 0x4a, 0xfe, 0xfe, 0x34,
5072};
5073static const uint8_t ac_rsaes_pkcs1_v1_5_vect1_out[] = {
5074 0x50, 0xb4, 0xc1, 0x41, 0x36, 0xbd, 0x19, 0x8c, 0x2f, 0x3c, 0x3e, 0xd2,
5075 0x43, 0xfc, 0xe0, 0x36,
5076 0xe1, 0x68, 0xd5, 0x65, 0x17, 0x98, 0x4a, 0x26, 0x3c, 0xd6, 0x64, 0x92,
5077 0xb8, 0x08, 0x04, 0xf1,
5078 0x69, 0xd2, 0x10, 0xf2, 0xb9, 0xbd, 0xfb, 0x48, 0xb1, 0x2f, 0x9e, 0xa0,
5079 0x50, 0x09, 0xc7, 0x7d,
5080 0xa2, 0x57, 0xcc, 0x60, 0x0c, 0xce, 0xfe, 0x3a, 0x62, 0x83, 0x78, 0x9d,
5081 0x8e, 0xa0, 0xe6, 0x07,
5082 0xac, 0x58, 0xe2, 0x69, 0x0e, 0xc4, 0xeb, 0xc1, 0x01, 0x46, 0xe8, 0xcb,
5083 0xaa, 0x5e, 0xd4, 0xd5,
5084 0xcc, 0xe6, 0xfe, 0x7b, 0x0f, 0xf9, 0xef, 0xc1, 0xea, 0xbb, 0x56, 0x4d,
5085 0xbf, 0x49, 0x82, 0x85,
5086 0xf4, 0x49, 0xee, 0x61, 0xdd, 0x7b, 0x42, 0xee, 0x5b, 0x58, 0x92, 0xcb,
5087 0x90, 0x60, 0x1f, 0x30,
5088 0xcd, 0xa0, 0x7b, 0xf2, 0x64, 0x89, 0x31, 0x0b, 0xcd, 0x23, 0xb5, 0x28,
5089 0xce, 0xab, 0x3c, 0x31,
5090};
5091
5092
5093/* PKCS#1 v1.5 Encrypt Example 1.2 */
5094#define ac_rsaes_pkcs1_v1_5_vect2_modulus ac_rsaes_pkcs1_v1_5_example1_modulus
5095#define ac_rsaes_pkcs1_v1_5_vect2_pub_exp ac_rsaes_pkcs1_v1_5_example1_pub_exp
5096#define ac_rsaes_pkcs1_v1_5_vect2_priv_exp ac_rsaes_pkcs1_v1_5_example1_priv_exp
5097#define ac_rsaes_pkcs1_v1_5_vect2_prime1 ac_rsaes_pkcs1_v1_5_example1_prime1
5098#define ac_rsaes_pkcs1_v1_5_vect2_prime2 ac_rsaes_pkcs1_v1_5_example1_prime2
5099#define ac_rsaes_pkcs1_v1_5_vect2_exp1 ac_rsaes_pkcs1_v1_5_example1_exp1
5100#define ac_rsaes_pkcs1_v1_5_vect2_exp2 ac_rsaes_pkcs1_v1_5_example1_exp2
5101#define ac_rsaes_pkcs1_v1_5_vect2_coeff ac_rsaes_pkcs1_v1_5_example1_coeff
5102static const uint8_t ac_rsaes_pkcs1_v1_5_vect2_ptx[] = {
5103 0x75, 0x0c, 0x40, 0x47, 0xf5, 0x47, 0xe8, 0xe4, 0x14, 0x11, 0x85, 0x65,
5104 0x23, 0x29, 0x8a, 0xc9, 0xba, 0xe2, 0x45, 0xef, 0xaf, 0x13, 0x97, 0xfb,
5105 0xe5, 0x6f, 0x9d, 0xd5
5106};
5107static const uint8_t ac_rsaes_pkcs1_v1_5_vect2_out[] = {
5108 0x68, 0x42, 0xe5, 0xe2, 0xcc, 0x00, 0x41, 0xd6, 0xb0, 0xc8, 0x1a, 0x56,
5109 0x2c, 0x39, 0xa6, 0x17, 0x37, 0x9a, 0x51, 0x5c, 0xab, 0x74, 0xab, 0xcb,
5110 0x26, 0x19, 0xc7, 0x74, 0x0a, 0x54, 0x1d, 0x95, 0x55, 0xdd, 0x91, 0x65,
5111 0x97, 0x5b, 0xf8, 0xa3, 0xeb, 0xd0, 0xd0, 0x45, 0x66, 0x61, 0xdf, 0xb1,
5112 0xa6, 0x86, 0x1b, 0xa2, 0x33, 0x22, 0x69, 0x93, 0x0e, 0x0d, 0xb5, 0x14,
5113 0xfc, 0xa0, 0x73, 0x3e, 0xeb, 0x9c, 0x40, 0x57, 0x13, 0xeb, 0x1f, 0x9d,
5114 0x76, 0x80, 0x33, 0xed, 0x29, 0x3e, 0x1e, 0x08, 0x1a, 0x12, 0x5f, 0x32,
5115 0xdd, 0xb9, 0xea, 0x52, 0xed, 0xbe, 0x27, 0x5c, 0x4a, 0xf6, 0x0f, 0x8a,
5116 0x7b, 0xf8, 0x32, 0xbd, 0x22, 0x75, 0x61, 0xc2, 0x08, 0xdc, 0x00, 0x31,
5117 0xa8, 0x4b, 0x50, 0x12, 0xc9, 0xdd, 0x9f, 0x74, 0x45, 0x9d, 0xcb, 0x07,
5118 0x0b, 0xdb, 0xe1, 0x3c, 0xfa, 0x8c, 0x2d, 0x50
5119};
5120
5121/*
5122 * Test data from ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip
5123 *
5124 * The underlying hash function is SHA-1; the mask generation function is
5125 * MGF1 with SHA-1 as specified in PKCS #1 v2.1.
5126 */
5127
5128/* Example 1: A 1024-bit RSA Key Pair */
5129#define ac_rsaes_oaep_example1_modulus ac_rsaes_pkcs1_v1_5_example1_modulus
5130#define ac_rsaes_oaep_example1_pub_exp ac_rsaes_pkcs1_v1_5_example1_pub_exp
5131#define ac_rsaes_oaep_example1_priv_exp ac_rsaes_pkcs1_v1_5_example1_priv_exp
5132#define ac_rsaes_oaep_example1_prime1 ac_rsaes_pkcs1_v1_5_example1_prime1
5133#define ac_rsaes_oaep_example1_prime2 ac_rsaes_pkcs1_v1_5_example1_prime2
5134#define ac_rsaes_oaep_example1_exp1 ac_rsaes_pkcs1_v1_5_example1_exp1
5135#define ac_rsaes_oaep_example1_exp2 ac_rsaes_pkcs1_v1_5_example1_exp2
5136#define ac_rsaes_oaep_example1_coeff ac_rsaes_pkcs1_v1_5_example1_coeff
5137
5138
5139/* RSAES-OAEP Encryption Example 1.1 */
5140#define ac_rsaes_oaep_vect1_modulus ac_rsaes_oaep_example1_modulus
5141#define ac_rsaes_oaep_vect1_pub_exp ac_rsaes_oaep_example1_pub_exp
5142#define ac_rsaes_oaep_vect1_priv_exp ac_rsaes_oaep_example1_priv_exp
5143#define ac_rsaes_oaep_vect1_prime1 ac_rsaes_oaep_example1_prime1
5144#define ac_rsaes_oaep_vect1_prime2 ac_rsaes_oaep_example1_prime2
5145#define ac_rsaes_oaep_vect1_exp1 ac_rsaes_oaep_example1_exp1
5146#define ac_rsaes_oaep_vect1_exp2 ac_rsaes_oaep_example1_exp2
5147#define ac_rsaes_oaep_vect1_coeff ac_rsaes_oaep_example1_coeff
5148static const uint8_t ac_rsaes_oaep_vect1_ptx[] = {
5149 0x66, 0x28, 0x19, 0x4e, 0x12, 0x07, 0x3d, 0xb0, 0x3b, 0xa9, 0x4c, 0xda,
5150 0x9e, 0xf9, 0x53, 0x23, 0x97, 0xd5, 0x0d, 0xba, 0x79, 0xb9, 0x87, 0x00,
5151 0x4a, 0xfe, 0xfe, 0x34,
5152};
5153static const uint8_t ac_rsaes_oaep_vect1_out[] = {
5154 0x35, 0x4f, 0xe6, 0x7b, 0x4a, 0x12, 0x6d, 0x5d, 0x35, 0xfe, 0x36, 0xc7,
5155 0x77, 0x79, 0x1a, 0x3f, 0x7b, 0xa1, 0x3d, 0xef, 0x48, 0x4e, 0x2d, 0x39,
5156 0x08, 0xaf, 0xf7, 0x22, 0xfa, 0xd4, 0x68, 0xfb, 0x21, 0x69, 0x6d, 0xe9,
5157 0x5d, 0x0b, 0xe9, 0x11, 0xc2, 0xd3, 0x17, 0x4f, 0x8a, 0xfc, 0xc2, 0x01,
5158 0x03, 0x5f, 0x7b, 0x6d, 0x8e, 0x69, 0x40, 0x2d, 0xe5, 0x45, 0x16, 0x18,
5159 0xc2, 0x1a, 0x53, 0x5f, 0xa9, 0xd7, 0xbf, 0xc5, 0xb8, 0xdd, 0x9f, 0xc2,
5160 0x43, 0xf8, 0xcf, 0x92, 0x7d, 0xb3, 0x13, 0x22, 0xd6, 0xe8, 0x81, 0xea,
5161 0xa9, 0x1a, 0x99, 0x61, 0x70, 0xe6, 0x57, 0xa0, 0x5a, 0x26, 0x64, 0x26,
5162 0xd9, 0x8c, 0x88, 0x00, 0x3f, 0x84, 0x77, 0xc1, 0x22, 0x70, 0x94, 0xa0,
5163 0xd9, 0xfa, 0x1e, 0x8c, 0x40, 0x24, 0x30, 0x9c, 0xe1, 0xec, 0xcc, 0xb5,
5164 0x21, 0x00, 0x35, 0xd4, 0x7a, 0xc7, 0x2e, 0x8a
5165};
5166
5167/* RSAES-OAEP Encryption Example 1.2 */
5168#define ac_rsaes_oaep_vect2_modulus ac_rsaes_oaep_example1_modulus
5169#define ac_rsaes_oaep_vect2_pub_exp ac_rsaes_oaep_example1_pub_exp
5170#define ac_rsaes_oaep_vect2_priv_exp ac_rsaes_oaep_example1_priv_exp
5171#define ac_rsaes_oaep_vect2_prime1 ac_rsaes_oaep_example1_prime1
5172#define ac_rsaes_oaep_vect2_prime2 ac_rsaes_oaep_example1_prime2
5173#define ac_rsaes_oaep_vect2_exp1 ac_rsaes_oaep_example1_exp1
5174#define ac_rsaes_oaep_vect2_exp2 ac_rsaes_oaep_example1_exp2
5175#define ac_rsaes_oaep_vect2_coeff ac_rsaes_oaep_example1_coeff
5176static const uint8_t ac_rsaes_oaep_vect2_ptx[] = {
5177 0x75, 0x0c, 0x40, 0x47, 0xf5, 0x47, 0xe8, 0xe4, 0x14, 0x11, 0x85, 0x65,
5178 0x23, 0x29, 0x8a, 0xc9, 0xba, 0xe2, 0x45, 0xef, 0xaf, 0x13, 0x97, 0xfb,
5179 0xe5, 0x6f, 0x9d, 0xd5
5180};
5181static const uint8_t ac_rsaes_oaep_vect2_out[] = {
5182 0x64, 0x0d, 0xb1, 0xac, 0xc5, 0x8e, 0x05, 0x68, 0xfe, 0x54, 0x07, 0xe5,
5183 0xf9, 0xb7, 0x01, 0xdf, 0xf8, 0xc3, 0xc9, 0x1e, 0x71, 0x6c, 0x53, 0x6f,
5184 0xc7, 0xfc, 0xec, 0x6c, 0xb5, 0xb7, 0x1c, 0x11, 0x65, 0x98, 0x8d, 0x4a,
5185 0x27, 0x9e, 0x15, 0x77, 0xd7, 0x30, 0xfc, 0x7a, 0x29, 0x93, 0x2e, 0x3f,
5186 0x00, 0xc8, 0x15, 0x15, 0x23, 0x6d, 0x8d, 0x8e, 0x31, 0x01, 0x7a, 0x7a,
5187 0x09, 0xdf, 0x43, 0x52, 0xd9, 0x04, 0xcd, 0xeb, 0x79, 0xaa, 0x58, 0x3a,
5188 0xdc, 0xc3, 0x1e, 0xa6, 0x98, 0xa4, 0xc0, 0x52, 0x83, 0xda, 0xba, 0x90,
5189 0x89, 0xbe, 0x54, 0x91, 0xf6, 0x7c, 0x1a, 0x4e, 0xe4, 0x8d, 0xc7, 0x4b,
5190 0xbb, 0xe6, 0x64, 0x3a, 0xef, 0x84, 0x66, 0x79, 0xb4, 0xcb, 0x39, 0x5a,
5191 0x35, 0x2d, 0x5e, 0xd1, 0x15, 0x91, 0x2d, 0xf6, 0x96, 0xff, 0xe0, 0x70,
5192 0x29, 0x32, 0x94, 0x6d, 0x71, 0x49, 0x2b, 0x44
5193};
5194
5195/*
5196 * PKCS#1 v1.5 Signature Example 15 2048-bit RSA key pair
5197 * from http://armcryptolib.das-labor.org/trac/browser/testvectors/rsa-pkcs-1v2-1-vec/oaep-vect.txt
5198 */
5199static const uint8_t ac_rsaes_pkcs1_v1_5_example15_modulus[] = {
5200 0xdc, 0xfa, 0x10, 0xff, 0xa7, 0x46, 0x65, 0xae, 0xef, 0x87, 0x09, 0x74, 0xea, 0x99, 0xb2, 0xce,
5201 0x54, 0x54, 0x7c, 0x67, 0xf4, 0x2a, 0xaa, 0x6d, 0xd0, 0x1a, 0x2e, 0xd3, 0x1f, 0xd2, 0xc2, 0x42,
5202 0xaf, 0x5d, 0x96, 0x0b, 0x1f, 0x89, 0x6e, 0xfb, 0xa3, 0x54, 0x3d, 0x65, 0x54, 0xb7, 0xb1, 0x26,
5203 0x87, 0xa5, 0xc6, 0x88, 0x56, 0x8f, 0x32, 0xe0, 0x26, 0xc5, 0x32, 0xd2, 0x59, 0x93, 0xb9, 0x7a,
5204 0x7c, 0x28, 0x42, 0xec, 0x2b, 0x8e, 0x12, 0x35, 0xee, 0xe2, 0x41, 0x4d, 0x25, 0x80, 0x6c, 0x6f,
5205 0xba, 0xe4, 0x38, 0x95, 0x4e, 0xba, 0x9d, 0x27, 0x55, 0xdf, 0xfe, 0xeb, 0x1b, 0x47, 0x70, 0x09,
5206 0x57, 0x81, 0x5a, 0x8a, 0x23, 0x3f, 0x97, 0xb1, 0xa2, 0xc7, 0x14, 0xb3, 0xe2, 0xbe, 0x2e, 0x42,
5207 0xd8, 0xbe, 0x30, 0xb1, 0x96, 0x15, 0x82, 0xea, 0x99, 0x48, 0x91, 0x0e, 0x0c, 0x79, 0x7c, 0x50,
5208 0xfc, 0x4b, 0xb4, 0x55, 0xf0, 0xfc, 0x45, 0xe5, 0xe3, 0x4e, 0x63, 0x96, 0xac, 0x5b, 0x2d, 0x46,
5209 0x23, 0x93, 0x65, 0xc7, 0xf3, 0xda, 0xaf, 0x09, 0x09, 0x40, 0x0d, 0x61, 0xcf, 0x9e, 0x0c, 0xa8,
5210 0x08, 0x3e, 0xaf, 0x33, 0x5a, 0x6f, 0xce, 0xb6, 0x86, 0x3c, 0x1c, 0xc0, 0xcf, 0x5a, 0x17, 0x1a,
5211 0xff, 0x35, 0xd9, 0x7e, 0xcb, 0x60, 0xef, 0x25, 0x1c, 0x7e, 0xc2, 0xc8, 0xa5, 0x88, 0x36, 0x1d,
5212 0xc4, 0x12, 0x66, 0xa4, 0xb7, 0xed, 0x38, 0xb0, 0x26, 0xce, 0x0d, 0x53, 0x78, 0x64, 0x49, 0xdb,
5213 0xb1, 0x1a, 0x06, 0xea, 0x33, 0xcc, 0xf1, 0xec, 0xa5, 0x75, 0x20, 0x1e, 0xd1, 0xaa, 0x47, 0x3e,
5214 0xd1, 0x18, 0x7e, 0xc1, 0xd8, 0xa7, 0x44, 0xea, 0x34, 0x5b, 0xed, 0x7e, 0xa0, 0x0e, 0xe4, 0xe8,
5215 0x1b, 0xba, 0x46, 0x48, 0x60, 0x1d, 0xd5, 0x37, 0xdc, 0x91, 0x01, 0x5d, 0x31, 0xf0, 0xc2, 0xc1,
5216};
5217
5218static const uint8_t ac_rsaes_pkcs1_v1_5_example15_pub_exp[] = {
5219 0x01, 0x00, 0x01,
5220};
5221
5222static const uint8_t ac_rsaes_pkcs1_v1_5_example15_priv_exp[] = {
5223 0x21, 0x95, 0x08, 0x51, 0xcd, 0xf2, 0x53, 0x20, 0x31, 0x8b, 0x30, 0x5a, 0xfa, 0x0f, 0x37, 0x1f,
5224 0x07, 0xae, 0x5a, 0x44, 0xb3, 0x14, 0xeb, 0xd7, 0x29, 0xf5, 0xdc, 0xb1, 0x5d, 0xa7, 0xfa, 0x39,
5225 0x47, 0xac, 0xdd, 0x91, 0x5d, 0xae, 0xd5, 0x74, 0xbd, 0x16, 0xdf, 0x88, 0xbf, 0x85, 0xf6, 0x10,
5226 0x60, 0xb3, 0x87, 0x17, 0x2f, 0xae, 0x6e, 0x01, 0x26, 0x2b, 0x38, 0x64, 0xc2, 0xd3, 0xc2, 0x2f,
5227 0x94, 0xe0, 0x4a, 0x81, 0x59, 0x42, 0x2b, 0x4e, 0xd2, 0x79, 0xc4, 0x8a, 0x4c, 0x9d, 0x76, 0x7d,
5228 0x49, 0x66, 0x07, 0x1a, 0x5b, 0xbf, 0x5d, 0x04, 0x3e, 0x16, 0xff, 0x46, 0xec, 0x1b, 0xa0, 0x71,
5229 0x6f, 0x00, 0xbb, 0xc9, 0x7b, 0xff, 0x5d, 0x56, 0x93, 0xe2, 0x14, 0xe9, 0x9c, 0x97, 0x21, 0xf1,
5230 0x2b, 0x3e, 0xc6, 0x28, 0x2a, 0xe2, 0xa4, 0x85, 0x72, 0x1b, 0x96, 0xdd, 0xcf, 0x74, 0x03, 0xfa,
5231 0x03, 0x7d, 0x0c, 0x57, 0xab, 0x46, 0x3c, 0x44, 0x8d, 0xe5, 0xcc, 0x12, 0x26, 0x5a, 0xdd, 0x88,
5232 0x6d, 0x31, 0x1e, 0xa8, 0xd8, 0xa5, 0x90, 0x3f, 0xa5, 0x6c, 0x5f, 0x1c, 0x9c, 0xf2, 0xeb, 0x11,
5233 0xcb, 0x65, 0x7a, 0x1a, 0x7d, 0x3e, 0x41, 0x35, 0x2d, 0xc3, 0xe6, 0x86, 0x89, 0x8c, 0x4c, 0xe4,
5234 0x30, 0x5e, 0x8b, 0x63, 0x8e, 0x1b, 0x08, 0xa2, 0xa8, 0x6c, 0xc9, 0xeb, 0x98, 0x66, 0xf3, 0x49,
5235 0x9a, 0xc7, 0x7b, 0x61, 0x36, 0xb8, 0x1c, 0xb2, 0x76, 0xd6, 0x14, 0xcf, 0xeb, 0x7b, 0x6e, 0xd3,
5236 0xf3, 0xbc, 0x77, 0x5e, 0x46, 0xc0, 0x00, 0x66, 0xeb, 0xee, 0xe2, 0xcf, 0xf7, 0x16, 0x6b, 0x57,
5237 0x52, 0x05, 0x98, 0x94, 0x7f, 0xf6, 0x21, 0x03, 0x20, 0xb2, 0x88, 0xfb, 0x4f, 0x2c, 0x3f, 0x8f,
5238 0xe9, 0x7b, 0x27, 0x94, 0x14, 0xeb, 0xf7, 0x20, 0x30, 0x00, 0xa1, 0x9f, 0xc0, 0x42, 0x48, 0x75,
5239};
5240
5241static const uint8_t ac_rsaes_pkcs1_v1_5_example15_prime1[] = {
5242 0xf1, 0x23, 0xbf, 0xe5, 0x3d, 0xe9, 0x7a, 0x56, 0x9d, 0x91, 0xad, 0xcf, 0x55, 0x6f, 0xa6, 0x25,
5243 0xad, 0x30, 0xf3, 0xfd, 0x3d, 0x81, 0x1f, 0x9e, 0x91, 0xe6, 0xaf, 0x44, 0xb6, 0xe7, 0x80, 0xcb,
5244 0x0f, 0x32, 0x78, 0x29, 0xfb, 0x21, 0x19, 0x0a, 0xe2, 0x80, 0x66, 0x46, 0xd7, 0x28, 0xcd, 0x9b,
5245 0x65, 0x31, 0x13, 0x2b, 0x1e, 0xbf, 0xef, 0x12, 0x72, 0x99, 0x30, 0x60, 0xf1, 0xce, 0x70, 0xb1,
5246 0x24, 0x39, 0x30, 0x91, 0xee, 0x85, 0x93, 0xb7, 0x27, 0x36, 0x7e, 0xdb, 0xba, 0x00, 0x9e, 0xc5,
5247 0xbe, 0x17, 0xc4, 0xac, 0xee, 0x12, 0x0c, 0x84, 0x12, 0x67, 0xd4, 0x76, 0x31, 0xa1, 0x6c, 0x36,
5248 0xa6, 0xd1, 0xc9, 0x99, 0x73, 0xc1, 0xb0, 0xb5, 0xa8, 0x35, 0xbf, 0x39, 0xfe, 0xaf, 0xe8, 0xf6,
5249 0x42, 0x1f, 0xd9, 0xc2, 0xa9, 0x0b, 0xc2, 0x79, 0x76, 0x65, 0x9e, 0x67, 0xbc, 0x83, 0x12, 0x4d,
5250};
5251
5252static const uint8_t ac_rsaes_pkcs1_v1_5_example15_prime2[] = {
5253 0xea, 0x98, 0x39, 0xb7, 0xe3, 0x7e, 0xa8, 0x9b, 0xbd, 0xa2, 0x7e, 0x4c, 0x93, 0x47, 0x1c, 0xb4,
5254 0xfd, 0x92, 0x18, 0x9a, 0x0a, 0x96, 0xbc, 0xb4, 0xd7, 0x56, 0x93, 0xf1, 0x8a, 0x5c, 0x2f, 0x74,
5255 0x2a, 0xf9, 0xe3, 0x6f, 0xde, 0x67, 0x9f, 0xbd, 0x9e, 0xae, 0x34, 0x5f, 0xa2, 0x69, 0x52, 0x7b,
5256 0x69, 0x65, 0x02, 0x1c, 0x4b, 0xdf, 0x54, 0xd6, 0x85, 0xbf, 0x08, 0x96, 0x0c, 0xc9, 0x76, 0xf6,
5257 0x8d, 0xca, 0x21, 0xce, 0xbf, 0x44, 0xf2, 0x68, 0xa5, 0x9d, 0xab, 0x8d, 0x1a, 0x25, 0xe5, 0x19,
5258 0xf5, 0x14, 0x7e, 0x1f, 0x45, 0xfe, 0x28, 0x7d, 0x74, 0xcf, 0x72, 0x5b, 0xec, 0x13, 0x26, 0xd3,
5259 0x42, 0x12, 0xc5, 0x6c, 0xf4, 0xff, 0xfa, 0x20, 0x2f, 0x57, 0xb6, 0x8e, 0xe8, 0xcc, 0xa9, 0x43,
5260 0xf3, 0xc1, 0x38, 0xc4, 0xcd, 0xe3, 0x3b, 0xdf, 0x2c, 0x94, 0x40, 0xdf, 0x65, 0x32, 0x24, 0x45,
5261};
5262
5263static const uint8_t ac_rsaes_pkcs1_v1_5_example15_exp1[] = {
5264 0xca, 0x0c, 0x9b, 0x60, 0xb8, 0xe4, 0xa6, 0x06, 0x67, 0x56, 0xc6, 0x5d, 0x20, 0x88, 0x41, 0x9d,
5265 0xf6, 0x25, 0x3b, 0x7b, 0x68, 0x8a, 0x85, 0xf4, 0xf6, 0xe9, 0x64, 0xd8, 0x5d, 0xad, 0x52, 0xa4,
5266 0x52, 0x62, 0x86, 0x7f, 0x1e, 0x96, 0x18, 0x06, 0x9f, 0xcc, 0xd8, 0x65, 0xe9, 0x28, 0x9e, 0x46,
5267 0xe3, 0x9e, 0x20, 0x22, 0x94, 0x4c, 0x5c, 0x44, 0x87, 0xd3, 0x45, 0xcf, 0x25, 0x2d, 0x46, 0x0d,
5268 0x97, 0x7d, 0x77, 0xed, 0xfe, 0xfe, 0xdb, 0xcb, 0xae, 0x46, 0xa2, 0x3a, 0xf7, 0xfa, 0x47, 0x0f,
5269 0x07, 0x7d, 0xa0, 0xe5, 0x09, 0x42, 0x04, 0x4c, 0xb1, 0xa3, 0x60, 0x49, 0x7c, 0xc2, 0x76, 0x0a,
5270 0xc0, 0xf2, 0xad, 0x4a, 0x2f, 0xcd, 0x0e, 0x84, 0xd7, 0xa1, 0xd9, 0x4d, 0xfd, 0xd2, 0x65, 0x8f,
5271 0xd9, 0xce, 0x18, 0x47, 0x5c, 0x1f, 0xa7, 0x5e, 0xe0, 0xce, 0xba, 0xd0, 0xcf, 0x0a, 0xc0, 0x4d,
5272};
5273
5274static const uint8_t ac_rsaes_pkcs1_v1_5_example15_exp2[] = {
5275 0x52, 0x81, 0x71, 0x23, 0x3c, 0x4e, 0x4a, 0x6c, 0x63, 0xb8, 0x67, 0x64, 0xf5, 0x13, 0x38, 0x84,
5276 0x6a, 0xfd, 0xdb, 0xcb, 0x29, 0x58, 0x34, 0x4c, 0x01, 0xc4, 0x00, 0x4a, 0x1d, 0xd8, 0x28, 0x14,
5277 0x5a, 0x1d, 0x02, 0xa1, 0x50, 0x7d, 0xef, 0x4f, 0x58, 0x24, 0x7a, 0x64, 0xfc, 0x10, 0xc0, 0xa2,
5278 0x88, 0xc1, 0xae, 0x89, 0x57, 0x21, 0xd7, 0x8b, 0x8f, 0x04, 0x4d, 0xb7, 0xc0, 0x0d, 0x86, 0xda,
5279 0x55, 0xa9, 0xb6, 0x54, 0x29, 0x2e, 0xcd, 0x76, 0x82, 0x70, 0xbe, 0x69, 0xe4, 0xbd, 0x59, 0x22,
5280 0xd4, 0xef, 0xfd, 0x1f, 0x70, 0x95, 0x5f, 0x96, 0x27, 0xe3, 0xe1, 0x9b, 0x74, 0x9e, 0x93, 0xb4,
5281 0x0e, 0xf3, 0xdd, 0x1d, 0x61, 0xd9, 0x39, 0x15, 0xe2, 0xb0, 0x9d, 0x93, 0x0b, 0x4b, 0x17, 0x68,
5282 0xbf, 0xac, 0xc0, 0x13, 0x6f, 0x39, 0xb0, 0xcf, 0xdf, 0xb4, 0xd0, 0x50, 0x01, 0x1e, 0x2e, 0x65,
5283};
5284
5285static const uint8_t ac_rsaes_pkcs1_v1_5_example15_coeff[] = {
5286 0xdf, 0x2e, 0xb2, 0x32, 0x2c, 0xc2, 0xda, 0xab, 0xf4, 0xd1, 0x46, 0x55, 0x08, 0xf4, 0x15, 0x21,
5287 0xcd, 0xa7, 0xce, 0xff, 0x23, 0xeb, 0xe6, 0x1d, 0x00, 0xd4, 0x41, 0xee, 0x72, 0x8d, 0xda, 0x5d,
5288 0x16, 0xc7, 0xbf, 0x92, 0x0c, 0xd9, 0x5f, 0x34, 0xbe, 0xb4, 0xfe, 0x32, 0xee, 0x81, 0x7e, 0xf3,
5289 0x36, 0x2e, 0x0b, 0xcd, 0x1d, 0x12, 0x45, 0xf7, 0xb0, 0x77, 0x93, 0xea, 0xa1, 0x90, 0xdc, 0x5a,
5290 0x37, 0xfd, 0xaf, 0x4c, 0x68, 0xe2, 0xca, 0x13, 0x97, 0x2d, 0x7f, 0x51, 0x48, 0xb7, 0x96, 0xb6,
5291 0xfb, 0x6d, 0x7a, 0xdd, 0xa0, 0x7b, 0xd2, 0xcd, 0x13, 0xbe, 0x98, 0xce, 0xbe, 0xd1, 0xed, 0xc6,
5292 0xca, 0x41, 0x2e, 0x39, 0x53, 0x50, 0xc5, 0x9a, 0x1d, 0x84, 0x2b, 0xc4, 0xaa, 0x2f, 0x3c, 0x0b,
5293 0x24, 0x3f, 0xde, 0x7d, 0xfd, 0x95, 0x35, 0x6f, 0x24, 0x39, 0x25, 0x1a, 0x11, 0x72, 0xc4, 0x5e,
5294};
5295
5296/* PKCS#1 v1.5 Encrypt Example 15.9 */
5297#define ac_rsaes_pkcs1_v1_5_vect15_modulus ac_rsaes_pkcs1_v1_5_example15_modulus
5298#define ac_rsaes_pkcs1_v1_5_vect15_pub_exp ac_rsaes_pkcs1_v1_5_example15_pub_exp
5299#define ac_rsaes_pkcs1_v1_5_vect15_priv_exp ac_rsaes_pkcs1_v1_5_example15_priv_exp
5300#define ac_rsaes_pkcs1_v1_5_vect15_prime1 ac_rsaes_pkcs1_v1_5_example15_prime1
5301#define ac_rsaes_pkcs1_v1_5_vect15_prime2 ac_rsaes_pkcs1_v1_5_example15_prime2
5302#define ac_rsaes_pkcs1_v1_5_vect15_exp1 ac_rsaes_pkcs1_v1_5_example15_exp1
5303#define ac_rsaes_pkcs1_v1_5_vect15_exp2 ac_rsaes_pkcs1_v1_5_example15_exp2
5304#define ac_rsaes_pkcs1_v1_5_vect15_coeff ac_rsaes_pkcs1_v1_5_example15_coeff
5305
5306/*
5307 * PKCS#1 v1.5 Encryption Example 15.9
5308 * from ftp://ftp.rsa.com/pub/rsalabs/tmp/pkcs1v15crypt-vectors.txt
5309 */
5310static const uint8_t ac_rsaes_pkcs1_v1_5_vect15_ptx[] = {
5311 0x9a, 0x13, 0x96, 0x62, 0x2d, 0x06, 0x6c, 0x10, 0x56, 0x08, 0x58, 0xc2, 0xc4, 0xcd, 0x5c, 0x04,
5312 0x44, 0x9e, 0x2b, 0x95, 0x50, 0xc5, 0xbc, 0x92, 0x93, 0x76, 0x1a, 0x91, 0x04, 0x41, 0x1d, 0xa1,
5313 0x8a, 0x57, 0xd9, 0xb6, 0xa9, 0x97, 0x33, 0x3c, 0xdb, 0xce, 0x77, 0xe9, 0xfd, 0xbe, 0x6b, 0xb8,
5314 0x31,
5315};
5316
5317static const uint8_t ac_rsaes_pkcs1_v1_5_vect15_out[] = {
5318 0x10, 0x0e, 0xce, 0x63, 0x45, 0x25, 0xd4, 0x67, 0xf6, 0xd4, 0xa6, 0xb6, 0x6e, 0xde, 0x1c, 0xc2,
5319 0x37, 0xf6, 0x1f, 0xb2, 0xb6, 0x70, 0x23, 0xa8, 0x3d, 0xc4, 0x56, 0xb9, 0x2c, 0xda, 0x18, 0x3e,
5320 0xd6, 0x62, 0x0f, 0xe5, 0x7d, 0x5a, 0x67, 0x33, 0x2c, 0x77, 0x23, 0x3a, 0xc1, 0xe8, 0x72, 0x5b,
5321 0x36, 0xf8, 0xe1, 0xb1, 0x08, 0x41, 0x2c, 0xa6, 0xfb, 0x35, 0xdc, 0xd4, 0xd8, 0x16, 0x77, 0xa2,
5322 0xb3, 0x0d, 0x5e, 0xaf, 0x25, 0xe0, 0xb9, 0x19, 0x1b, 0x38, 0xf7, 0xee, 0xf8, 0x3f, 0x91, 0x21,
5323 0xa8, 0x08, 0x43, 0x8c, 0x92, 0xab, 0x03, 0xf5, 0x20, 0x80, 0x7b, 0xc9, 0xa8, 0x94, 0x70, 0x5e,
5324 0xaf, 0x4e, 0xed, 0x06, 0x68, 0x23, 0xa6, 0x7a, 0xa2, 0xa5, 0x59, 0x9c, 0xd9, 0x5e, 0x58, 0xda,
5325 0x7c, 0x09, 0x48, 0x36, 0xd2, 0xaf, 0xeb, 0xa3, 0x9d, 0xd0, 0x09, 0xa6, 0x4a, 0xde, 0x03, 0x05,
5326 0x33, 0x76, 0xf0, 0x29, 0x36, 0xcf, 0x3f, 0x56, 0xbf, 0x64, 0xc1, 0xf3, 0xbd, 0xc0, 0x7c, 0x45,
5327 0xa9, 0x5b, 0x9f, 0xcd, 0x93, 0x96, 0xcd, 0x9a, 0x8d, 0x41, 0xbc, 0xc5, 0x64, 0x24, 0x93, 0x7a,
5328 0x13, 0x71, 0xb3, 0x84, 0x7c, 0x90, 0x5b, 0x9a, 0xb5, 0x84, 0x02, 0x39, 0x3d, 0x40, 0x46, 0xe4,
5329 0xa0, 0x15, 0xc1, 0x47, 0x08, 0xf7, 0x4c, 0xe7, 0x79, 0x0e, 0xba, 0x8a, 0xf7, 0x92, 0x07, 0x24,
5330 0x40, 0xbc, 0xaf, 0xb1, 0x4c, 0x0f, 0x81, 0x08, 0x97, 0x11, 0x87, 0xc8, 0x0f, 0x46, 0x3a, 0x1f,
5331 0xff, 0x25, 0x86, 0x46, 0xea, 0x16, 0xe5, 0x1c, 0x6e, 0xe3, 0x61, 0xb6, 0x61, 0xa1, 0x4f, 0x07,
5332 0xcd, 0x4f, 0x5a, 0x82, 0xc7, 0x09, 0xf4, 0x94, 0xf1, 0xdf, 0x0f, 0x80, 0x3b, 0x6f, 0x64, 0xa7,
5333 0x2f, 0xb9, 0xc4, 0x50, 0xff, 0xe2, 0x68, 0xfc, 0xab, 0x48, 0x7d, 0x4d, 0x63, 0x01, 0x3e, 0x41,
5334};
5335
5336/*
5337 * PKCS#1 v1.5 Encryption Example 10.1
5338 * from http://armcryptolib.das-labor.org/trac/browser/testvectors/rsa-pkcs-1v2-1-vec/oaep-vect.txt
5339 */
5340
5341static const uint8_t ac_rsaes_oaep_vect10_modulus[] = {
5342 0xae, 0x45, 0xed, 0x56, 0x01, 0xce, 0xc6, 0xb8, 0xcc, 0x05, 0xf8, 0x03, 0x93, 0x5c, 0x67, 0x4d,
5343 0xdb, 0xe0, 0xd7, 0x5c, 0x4c, 0x09, 0xfd, 0x79, 0x51, 0xfc, 0x6b, 0x0c, 0xae, 0xc3, 0x13, 0xa8,
5344 0xdf, 0x39, 0x97, 0x0c, 0x51, 0x8b, 0xff, 0xba, 0x5e, 0xd6, 0x8f, 0x3f, 0x0d, 0x7f, 0x22, 0xa4,
5345 0x02, 0x9d, 0x41, 0x3f, 0x1a, 0xe0, 0x7e, 0x4e, 0xbe, 0x9e, 0x41, 0x77, 0xce, 0x23, 0xe7, 0xf5,
5346 0x40, 0x4b, 0x56, 0x9e, 0x4e, 0xe1, 0xbd, 0xcf, 0x3c, 0x1f, 0xb0, 0x3e, 0xf1, 0x13, 0x80, 0x2d,
5347 0x4f, 0x85, 0x5e, 0xb9, 0xb5, 0x13, 0x4b, 0x5a, 0x7c, 0x80, 0x85, 0xad, 0xca, 0xe6, 0xfa, 0x2f,
5348 0xa1, 0x41, 0x7e, 0xc3, 0x76, 0x3b, 0xe1, 0x71, 0xb0, 0xc6, 0x2b, 0x76, 0x0e, 0xde, 0x23, 0xc1,
5349 0x2a, 0xd9, 0x2b, 0x98, 0x08, 0x84, 0xc6, 0x41, 0xf5, 0xa8, 0xfa, 0xc2, 0x6b, 0xda, 0xd4, 0xa0,
5350 0x33, 0x81, 0xa2, 0x2f, 0xe1, 0xb7, 0x54, 0x88, 0x50, 0x94, 0xc8, 0x25, 0x06, 0xd4, 0x01, 0x9a,
5351 0x53, 0x5a, 0x28, 0x6a, 0xfe, 0xb2, 0x71, 0xbb, 0x9b, 0xa5, 0x92, 0xde, 0x18, 0xdc, 0xf6, 0x00,
5352 0xc2, 0xae, 0xea, 0xe5, 0x6e, 0x02, 0xf7, 0xcf, 0x79, 0xfc, 0x14, 0xcf, 0x3b, 0xdc, 0x7c, 0xd8,
5353 0x4f, 0xeb, 0xbb, 0xf9, 0x50, 0xca, 0x90, 0x30, 0x4b, 0x22, 0x19, 0xa7, 0xaa, 0x06, 0x3a, 0xef,
5354 0xa2, 0xc3, 0xc1, 0x98, 0x0e, 0x56, 0x0c, 0xd6, 0x4a, 0xfe, 0x77, 0x95, 0x85, 0xb6, 0x10, 0x76,
5355 0x57, 0xb9, 0x57, 0x85, 0x7e, 0xfd, 0xe6, 0x01, 0x09, 0x88, 0xab, 0x7d, 0xe4, 0x17, 0xfc, 0x88,
5356 0xd8, 0xf3, 0x84, 0xc4, 0xe6, 0xe7, 0x2c, 0x3f, 0x94, 0x3e, 0x0c, 0x31, 0xc0, 0xc4, 0xa5, 0xcc,
5357 0x36, 0xf8, 0x79, 0xd8, 0xa3, 0xac, 0x9d, 0x7d, 0x59, 0x86, 0x0e, 0xaa, 0xda, 0x6b, 0x83, 0xbb,
5358};
5359
5360static const uint8_t ac_rsaes_oaep_vect10_pub_exp[] = {
5361 0x01, 0x00, 0x01,
5362};
5363
5364static const uint8_t ac_rsaes_oaep_vect10_priv_exp[] = {
5365 0x05, 0x6b, 0x04, 0x21, 0x6f, 0xe5, 0xf3, 0x54, 0xac, 0x77, 0x25, 0x0a, 0x4b, 0x6b, 0x0c, 0x85,
5366 0x25, 0xa8, 0x5c, 0x59, 0xb0, 0xbd, 0x80, 0xc5, 0x64, 0x50, 0xa2, 0x2d, 0x5f, 0x43, 0x8e, 0x59,
5367 0x6a, 0x33, 0x3a, 0xa8, 0x75, 0xe2, 0x91, 0xdd, 0x43, 0xf4, 0x8c, 0xb8, 0x8b, 0x9d, 0x5f, 0xc0,
5368 0xd4, 0x99, 0xf9, 0xfc, 0xd1, 0xc3, 0x97, 0xf9, 0xaf, 0xc0, 0x70, 0xcd, 0x9e, 0x39, 0x8c, 0x8d,
5369 0x19, 0xe6, 0x1d, 0xb7, 0xc7, 0x41, 0x0a, 0x6b, 0x26, 0x75, 0xdf, 0xbf, 0x5d, 0x34, 0x5b, 0x80,
5370 0x4d, 0x20, 0x1a, 0xdd, 0x50, 0x2d, 0x5c, 0xe2, 0xdf, 0xcb, 0x09, 0x1c, 0xe9, 0x99, 0x7b, 0xbe,
5371 0xbe, 0x57, 0x30, 0x6f, 0x38, 0x3e, 0x4d, 0x58, 0x81, 0x03, 0xf0, 0x36, 0xf7, 0xe8, 0x5d, 0x19,
5372 0x34, 0xd1, 0x52, 0xa3, 0x23, 0xe4, 0xa8, 0xdb, 0x45, 0x1d, 0x6f, 0x4a, 0x5b, 0x1b, 0x0f, 0x10,
5373 0x2c, 0xc1, 0x50, 0xe0, 0x2f, 0xee, 0xe2, 0xb8, 0x8d, 0xea, 0x4a, 0xd4, 0xc1, 0xba, 0xcc, 0xb2,
5374 0x4d, 0x84, 0x07, 0x2d, 0x14, 0xe1, 0xd2, 0x4a, 0x67, 0x71, 0xf7, 0x40, 0x8e, 0xe3, 0x05, 0x64,
5375 0xfb, 0x86, 0xd4, 0x39, 0x3a, 0x34, 0xbc, 0xf0, 0xb7, 0x88, 0x50, 0x1d, 0x19, 0x33, 0x03, 0xf1,
5376 0x3a, 0x22, 0x84, 0xb0, 0x01, 0xf0, 0xf6, 0x49, 0xea, 0xf7, 0x93, 0x28, 0xd4, 0xac, 0x5c, 0x43,
5377 0x0a, 0xb4, 0x41, 0x49, 0x20, 0xa9, 0x46, 0x0e, 0xd1, 0xb7, 0xbc, 0x40, 0xec, 0x65, 0x3e, 0x87,
5378 0x6d, 0x09, 0xab, 0xc5, 0x09, 0xae, 0x45, 0xb5, 0x25, 0x19, 0x01, 0x16, 0xa0, 0xc2, 0x61, 0x01,
5379 0x84, 0x82, 0x98, 0x50, 0x9c, 0x1c, 0x3b, 0xf3, 0xa4, 0x83, 0xe7, 0x27, 0x40, 0x54, 0xe1, 0x5e,
5380 0x97, 0x07, 0x50, 0x36, 0xe9, 0x89, 0xf6, 0x09, 0x32, 0x80, 0x7b, 0x52, 0x57, 0x75, 0x1e, 0x79,
5381};
5382
5383static const uint8_t ac_rsaes_oaep_vect10_prime1[] = {
5384 0xec, 0xf5, 0xae, 0xcd, 0x1e, 0x55, 0x15, 0xff, 0xfa, 0xcb, 0xd7, 0x5a, 0x28, 0x16, 0xc6, 0xeb,
5385 0xf4, 0x90, 0x18, 0xcd, 0xfb, 0x46, 0x38, 0xe1, 0x85, 0xd6, 0x6a, 0x73, 0x96, 0xb6, 0xf8, 0x09,
5386 0x0f, 0x80, 0x18, 0xc7, 0xfd, 0x95, 0xcc, 0x34, 0xb8, 0x57, 0xdc, 0x17, 0xf0, 0xcc, 0x65, 0x16,
5387 0xbb, 0x13, 0x46, 0xab, 0x4d, 0x58, 0x2c, 0xad, 0xad, 0x7b, 0x41, 0x03, 0x35, 0x23, 0x87, 0xb7,
5388 0x03, 0x38, 0xd0, 0x84, 0x04, 0x7c, 0x9d, 0x95, 0x39, 0xb6, 0x49, 0x62, 0x04, 0xb3, 0xdd, 0x6e,
5389 0xa4, 0x42, 0x49, 0x92, 0x07, 0xbe, 0xc0, 0x1f, 0x96, 0x42, 0x87, 0xff, 0x63, 0x36, 0xc3, 0x98,
5390 0x46, 0x58, 0x33, 0x68, 0x46, 0xf5, 0x6e, 0x46, 0x86, 0x18, 0x81, 0xc1, 0x02, 0x33, 0xd2, 0x17,
5391 0x6b, 0xf1, 0x5a, 0x5e, 0x96, 0xdd, 0xc7, 0x80, 0xbc, 0x86, 0x8a, 0xa7, 0x7d, 0x3c, 0xe7, 0x69,
5392};
5393
5394static const uint8_t ac_rsaes_oaep_vect10_prime2[] = {
5395 0xbc, 0x46, 0xc4, 0x64, 0xfc, 0x6a, 0xc4, 0xca, 0x78, 0x3b, 0x0e, 0xb0, 0x8a, 0x3c, 0x84, 0x1b,
5396 0x77, 0x2f, 0x7e, 0x9b, 0x2f, 0x28, 0xba, 0xbd, 0x58, 0x8a, 0xe8, 0x85, 0xe1, 0xa0, 0xc6, 0x1e,
5397 0x48, 0x58, 0xa0, 0xfb, 0x25, 0xac, 0x29, 0x99, 0x90, 0xf3, 0x5b, 0xe8, 0x51, 0x64, 0xc2, 0x59,
5398 0xba, 0x11, 0x75, 0xcd, 0xd7, 0x19, 0x27, 0x07, 0x13, 0x51, 0x84, 0x99, 0x2b, 0x6c, 0x29, 0xb7,
5399 0x46, 0xdd, 0x0d, 0x2c, 0xab, 0xe1, 0x42, 0x83, 0x5f, 0x7d, 0x14, 0x8c, 0xc1, 0x61, 0x52, 0x4b,
5400 0x4a, 0x09, 0x94, 0x6d, 0x48, 0xb8, 0x28, 0x47, 0x3f, 0x1c, 0xe7, 0x6b, 0x6c, 0xb6, 0x88, 0x6c,
5401 0x34, 0x5c, 0x03, 0xe0, 0x5f, 0x41, 0xd5, 0x1b, 0x5c, 0x3a, 0x90, 0xa3, 0xf2, 0x40, 0x73, 0xc7,
5402 0xd7, 0x4a, 0x4f, 0xe2, 0x5d, 0x9c, 0xf2, 0x1c, 0x75, 0x96, 0x0f, 0x3f, 0xc3, 0x86, 0x31, 0x83,
5403};
5404
5405static const uint8_t ac_rsaes_oaep_vect10_exp1[] = {
5406 0xc7, 0x35, 0x64, 0x57, 0x1d, 0x00, 0xfb, 0x15, 0xd0, 0x8a, 0x3d, 0xe9, 0x95, 0x7a, 0x50, 0x91,
5407 0x5d, 0x71, 0x26, 0xe9, 0x44, 0x2d, 0xac, 0xf4, 0x2b, 0xc8, 0x2e, 0x86, 0x2e, 0x56, 0x73, 0xff,
5408 0x6a, 0x00, 0x8e, 0xd4, 0xd2, 0xe3, 0x74, 0x61, 0x7d, 0xf8, 0x9f, 0x17, 0xa1, 0x60, 0xb4, 0x3b,
5409 0x7f, 0xda, 0x9c, 0xb6, 0xb6, 0xb7, 0x42, 0x18, 0x60, 0x98, 0x15, 0xf7, 0xd4, 0x5c, 0xa2, 0x63,
5410 0xc1, 0x59, 0xaa, 0x32, 0xd2, 0x72, 0xd1, 0x27, 0xfa, 0xf4, 0xbc, 0x8c, 0xa2, 0xd7, 0x73, 0x78,
5411 0xe8, 0xae, 0xb1, 0x9b, 0x0a, 0xd7, 0xda, 0x3c, 0xb3, 0xde, 0x0a, 0xe7, 0x31, 0x49, 0x80, 0xf6,
5412 0x2b, 0x6d, 0x4b, 0x0a, 0x87, 0x5d, 0x1d, 0xf0, 0x3c, 0x1b, 0xae, 0x39, 0xcc, 0xd8, 0x33, 0xef,
5413 0x6c, 0xd7, 0xe2, 0xd9, 0x52, 0x8b, 0xf0, 0x84, 0xd1, 0xf9, 0x69, 0xe7, 0x94, 0xe9, 0xf6, 0xc1,
5414};
5415
5416static const uint8_t ac_rsaes_oaep_vect10_exp2[] = {
5417 0x26, 0x58, 0xb3, 0x7f, 0x6d, 0xf9, 0xc1, 0x03, 0x0b, 0xe1, 0xdb, 0x68, 0x11, 0x7f, 0xa9, 0xd8,
5418 0x7e, 0x39, 0xea, 0x2b, 0x69, 0x3b, 0x7e, 0x6d, 0x3a, 0x2f, 0x70, 0x94, 0x74, 0x13, 0xee, 0xc6,
5419 0x14, 0x2e, 0x18, 0xfb, 0x8d, 0xfc, 0xb6, 0xac, 0x54, 0x5d, 0x7c, 0x86, 0xa0, 0xad, 0x48, 0xf8,
5420 0x45, 0x71, 0x70, 0xf0, 0xef, 0xb2, 0x6b, 0xc4, 0x81, 0x26, 0xc5, 0x3e, 0xfd, 0x1d, 0x16, 0x92,
5421 0x01, 0x98, 0xdc, 0x2a, 0x11, 0x07, 0xdc, 0x28, 0x2d, 0xb6, 0xa8, 0x0c, 0xd3, 0x06, 0x23, 0x60,
5422 0xba, 0x3f, 0xa1, 0x3f, 0x70, 0xe4, 0x31, 0x2f, 0xf1, 0xa6, 0xcd, 0x6b, 0x8f, 0xc4, 0xcd, 0x9c,
5423 0x5c, 0x3d, 0xb1, 0x7c, 0x6d, 0x6a, 0x57, 0x21, 0x2f, 0x73, 0xae, 0x29, 0xf6, 0x19, 0x32, 0x7b,
5424 0xad, 0x59, 0xb1, 0x53, 0x85, 0x85, 0x85, 0xba, 0x4e, 0x28, 0xb6, 0x0a, 0x62, 0xa4, 0x5e, 0x49,
5425};
5426
5427static const uint8_t ac_rsaes_oaep_vect10_coeff[] = {
5428 0x6f, 0x38, 0x52, 0x6b, 0x39, 0x25, 0x08, 0x55, 0x34, 0xef, 0x3e, 0x41, 0x5a, 0x83, 0x6e, 0xde,
5429 0x8b, 0x86, 0x15, 0x8a, 0x2c, 0x7c, 0xbf, 0xec, 0xcb, 0x0b, 0xd8, 0x34, 0x30, 0x4f, 0xec, 0x68,
5430 0x3b, 0xa8, 0xd4, 0xf4, 0x79, 0xc4, 0x33, 0xd4, 0x34, 0x16, 0xe6, 0x32, 0x69, 0x62, 0x3c, 0xea,
5431 0x10, 0x07, 0x76, 0xd8, 0x5a, 0xff, 0x40, 0x1d, 0x3f, 0xff, 0x61, 0x0e, 0xe6, 0x54, 0x11, 0xce,
5432 0x3b, 0x13, 0x63, 0xd6, 0x3a, 0x97, 0x09, 0xee, 0xde, 0x42, 0x64, 0x7c, 0xea, 0x56, 0x14, 0x93,
5433 0xd5, 0x45, 0x70, 0xa8, 0x79, 0xc1, 0x86, 0x82, 0xcd, 0x97, 0x71, 0x0b, 0x96, 0x20, 0x5e, 0xc3,
5434 0x11, 0x17, 0xd7, 0x3b, 0x5f, 0x36, 0x22, 0x3f, 0xad, 0xd6, 0xe8, 0xba, 0x90, 0xdd, 0x7c, 0x0e,
5435 0xe6, 0x1d, 0x44, 0xe1, 0x63, 0x25, 0x1e, 0x20, 0xc7, 0xf6, 0x6e, 0xb3, 0x05, 0x11, 0x7c, 0xb8,
5436};
5437
5438static const uint8_t ac_rsaes_oaep_vect10_ptx[] = {
5439 0x8b, 0xba, 0x6b, 0xf8, 0x2a, 0x6c, 0x0f, 0x86, 0xd5, 0xf1, 0x75, 0x6e, 0x97, 0x95, 0x68, 0x70,
5440 0xb0, 0x89, 0x53, 0xb0, 0x6b, 0x4e, 0xb2, 0x05, 0xbc, 0x16, 0x94, 0xee,
5441};
5442
5443static const uint8_t ac_rsaes_oaep_vect10_out[] = {
5444 0x53, 0xea, 0x5d, 0xc0, 0x8c, 0xd2, 0x60, 0xfb, 0x3b, 0x85, 0x85, 0x67, 0x28, 0x7f, 0xa9, 0x15,
5445 0x52, 0xc3, 0x0b, 0x2f, 0xeb, 0xfb, 0xa2, 0x13, 0xf0, 0xae, 0x87, 0x70, 0x2d, 0x06, 0x8d, 0x19,
5446 0xba, 0xb0, 0x7f, 0xe5, 0x74, 0x52, 0x3d, 0xfb, 0x42, 0x13, 0x9d, 0x68, 0xc3, 0xc5, 0xaf, 0xee,
5447 0xe0, 0xbf, 0xe4, 0xcb, 0x79, 0x69, 0xcb, 0xf3, 0x82, 0xb8, 0x04, 0xd6, 0xe6, 0x13, 0x96, 0x14,
5448 0x4e, 0x2d, 0x0e, 0x60, 0x74, 0x1f, 0x89, 0x93, 0xc3, 0x01, 0x4b, 0x58, 0xb9, 0xb1, 0x95, 0x7a,
5449 0x8b, 0xab, 0xcd, 0x23, 0xaf, 0x85, 0x4f, 0x4c, 0x35, 0x6f, 0xb1, 0x66, 0x2a, 0xa7, 0x2b, 0xfc,
5450 0xc7, 0xe5, 0x86, 0x55, 0x9d, 0xc4, 0x28, 0x0d, 0x16, 0x0c, 0x12, 0x67, 0x85, 0xa7, 0x23, 0xeb,
5451 0xee, 0xbe, 0xff, 0x71, 0xf1, 0x15, 0x94, 0x44, 0x0a, 0xae, 0xf8, 0x7d, 0x10, 0x79, 0x3a, 0x87,
5452 0x74, 0xa2, 0x39, 0xd4, 0xa0, 0x4c, 0x87, 0xfe, 0x14, 0x67, 0xb9, 0xda, 0xf8, 0x52, 0x08, 0xec,
5453 0x6c, 0x72, 0x55, 0x79, 0x4a, 0x96, 0xcc, 0x29, 0x14, 0x2f, 0x9a, 0x8b, 0xd4, 0x18, 0xe3, 0xc1,
5454 0xfd, 0x67, 0x34, 0x4b, 0x0c, 0xd0, 0x82, 0x9d, 0xf3, 0xb2, 0xbe, 0xc6, 0x02, 0x53, 0x19, 0x62,
5455 0x93, 0xc6, 0xb3, 0x4d, 0x3f, 0x75, 0xd3, 0x2f, 0x21, 0x3d, 0xd4, 0x5c, 0x62, 0x73, 0xd5, 0x05,
5456 0xad, 0xf4, 0xcc, 0xed, 0x10, 0x57, 0xcb, 0x75, 0x8f, 0xc2, 0x6a, 0xee, 0xfa, 0x44, 0x12, 0x55,
5457 0xed, 0x4e, 0x64, 0xc1, 0x99, 0xee, 0x07, 0x5e, 0x7f, 0x16, 0x64, 0x61, 0x82, 0xfd, 0xb4, 0x64,
5458 0x73, 0x9b, 0x68, 0xab, 0x5d, 0xaf, 0xf0, 0xe6, 0x3e, 0x95, 0x52, 0x01, 0x68, 0x24, 0xf0, 0x54,
5459 0xbf, 0x4d, 0x3c, 0x8c, 0x90, 0xa9, 0x7b, 0xb6, 0xb6, 0x55, 0x32, 0x84, 0xeb, 0x42, 0x9f, 0xcc,
5460};
5461
5462/* diffie hellman test data */
5463/* p and g testdata generated using the following line:
5464 * for i in {256..2048..64}; do openssl dhparam -C -5 $i; done
5465 */
5466static const uint8_t keygen_dh256_p[] = {
5467 0xB6, 0x73, 0x91, 0xB5, 0xD6, 0xBC, 0x95, 0x73, 0x0D, 0x53, 0x64, 0x13,
5468 0xB0, 0x51, 0xC6, 0xB4, 0xEB, 0x9D, 0x74, 0x57, 0x8D, 0x65, 0x3A, 0x4B,
5469 0x7A, 0xB2, 0x93, 0x27, 0xA6, 0xC1, 0xBC, 0xAB,
5470};
5471
5472static const uint8_t keygen_dh256_g[] = {
5473 0x05,
5474};
5475
5476static const uint8_t keygen_dh320_p[] = {
5477 0x80, 0x72, 0x50, 0x4F, 0x85, 0xD2, 0x32, 0x70, 0xA3, 0x11, 0xF4, 0x46,
5478 0x01, 0x72, 0xD0, 0x72, 0x96, 0xA5, 0x1B, 0xFA, 0x8F, 0x35, 0x49, 0x75,
5479 0x04, 0xA5, 0x5A, 0x62, 0xB6, 0x33, 0xD6, 0x3C, 0x46, 0xD1, 0xED, 0xD7,
5480 0xB1, 0xD4, 0xBA, 0xF3,
5481};
5482
5483static const uint8_t keygen_dh320_g[] = {
5484 0x05,
5485};
5486
5487static const uint8_t keygen_dh384_p[] = {
5488 0xC2, 0x04, 0xC8, 0x0E, 0xE8, 0x3F, 0x02, 0x1F, 0xDE, 0x0C, 0xAA, 0x2E,
5489 0x67, 0x13, 0xF4, 0x33, 0x67, 0x82, 0x59, 0xE7, 0x80, 0xE5, 0x42, 0xEA,
5490 0x2F, 0xC4, 0x71, 0x93, 0xA7, 0x1C, 0x86, 0xEC, 0x8C, 0x39, 0xF8, 0xC7,
5491 0xF1, 0xE3, 0xE0, 0xEE, 0xC4, 0x55, 0xF5, 0x4F, 0xE7, 0x98, 0xF0, 0x47,
5492};
5493
5494static const uint8_t keygen_dh384_g[] = {
5495 0x05,
5496};
5497
5498static const uint8_t keygen_dh448_p[] = {
5499 0x91, 0xB9, 0x28, 0x8F, 0x01, 0x62, 0xA1, 0x40, 0x4D, 0x53, 0xC7, 0xD5,
5500 0xEE, 0x97, 0x40, 0x03, 0x39, 0x39, 0x41, 0x5F, 0x17, 0x0F, 0xA2, 0x78,
5501 0xBF, 0x3D, 0x6B, 0x33, 0x33, 0x39, 0x3B, 0x57, 0x21, 0x5B, 0xF9, 0xB1,
5502 0x6C, 0xE3, 0xB8, 0x19, 0xBE, 0x81, 0xBD, 0xC4, 0xFF, 0x4C, 0xFA, 0x48,
5503 0x63, 0x24, 0x10, 0x33, 0xDE, 0x3A, 0xFD, 0x3B,
5504};
5505
5506static const uint8_t keygen_dh448_g[] = {
5507 0x05,
5508};
5509
5510static const uint8_t keygen_dh512_p[] = {
5511 0xCF, 0x09, 0xB8, 0xCD, 0x0B, 0xC5, 0x9D, 0xBD, 0x7A, 0x34, 0x50, 0x55,
5512 0xEC, 0xD4, 0xED, 0x92, 0x9D, 0x63, 0x92, 0xF9, 0x1D, 0x42, 0xF3, 0x64,
5513 0x04, 0x3D, 0xCC, 0xAA, 0x5F, 0xD1, 0xBB, 0xEA, 0x44, 0x12, 0xFC, 0xF0,
5514 0xFB, 0xFF, 0x26, 0x57, 0xE3, 0x6E, 0xA8, 0x3F, 0x45, 0x43, 0x11, 0x81,
5515 0xC6, 0x79, 0xF0, 0x0B, 0x11, 0x23, 0x1D, 0x7B, 0x1E, 0x59, 0xA8, 0xB8,
5516 0x69, 0x44, 0xA7, 0xE3,
5517};
5518
5519static const uint8_t keygen_dh512_g[] = {
5520 0x05,
5521};
5522
5523static const uint8_t keygen_dh576_p[] = {
5524 0xEF, 0xA2, 0xD7, 0x81, 0x88, 0xAA, 0xBF, 0x70, 0x03, 0x70, 0xD4, 0x75,
5525 0xA6, 0x3E, 0x5B, 0xCF, 0x73, 0xDE, 0x7D, 0x45, 0x67, 0x47, 0xB1, 0xCF,
5526 0xA8, 0x62, 0xA9, 0x13, 0x9F, 0xC3, 0x9B, 0x96, 0xCE, 0xB9, 0x0C, 0x24,
5527 0xAC, 0xCB, 0xB6, 0x40, 0x30, 0x25, 0x26, 0x4E, 0x9D, 0x50, 0xA7, 0x8F,
5528 0x09, 0x1C, 0x9B, 0xDE, 0x77, 0x8A, 0xE8, 0xAA, 0xDA, 0xC2, 0x31, 0x08,
5529 0x55, 0x2C, 0xC1, 0x13, 0x24, 0x6E, 0x5A, 0xE7, 0xA1, 0xBC, 0xE5, 0x5B,
5530};
5531
5532static const uint8_t keygen_dh576_g[] = {
5533 0x05,
5534};
5535
5536static const uint8_t keygen_dh640_p[] = {
5537 0xED, 0xB6, 0x90, 0x9C, 0x72, 0x5C, 0x63, 0x11, 0x17, 0xA9, 0xB6, 0x0E,
5538 0x6C, 0x80, 0xA9, 0xF3, 0x15, 0x36, 0x9D, 0x49, 0x02, 0x2B, 0x4F, 0x12,
5539 0x1A, 0xFD, 0x00, 0xC0, 0x9B, 0x12, 0x10, 0x96, 0x18, 0x55, 0x3F, 0x0C,
5540 0x75, 0x46, 0x6E, 0xDF, 0x0A, 0x58, 0x8E, 0x1B, 0x4B, 0xFF, 0x24, 0x70,
5541 0xFC, 0x29, 0xE8, 0x67, 0x8F, 0x0B, 0x72, 0x14, 0x80, 0x6F, 0xE9, 0xCD,
5542 0x30, 0x3C, 0x16, 0xB9, 0xB0, 0x32, 0xBE, 0x6A, 0x1D, 0x06, 0xEE, 0x6D,
5543 0x15, 0x44, 0x49, 0x55, 0xA8, 0x08, 0x2D, 0x0F,
5544};
5545
5546static const uint8_t keygen_dh640_g[] = {
5547 0x05,
5548};
5549
5550static const uint8_t keygen_dh704_p[] = {
5551 0xA6, 0xBF, 0xA1, 0x02, 0x02, 0xA7, 0x7A, 0x6E, 0xFC, 0x48, 0x55, 0x81,
5552 0x23, 0x3F, 0x08, 0x8E, 0x83, 0xE9, 0x10, 0x92, 0x96, 0x82, 0x5F, 0xB8,
5553 0x88, 0x28, 0x0C, 0x6A, 0x04, 0x41, 0xEF, 0x4C, 0xCC, 0x2F, 0x16, 0xCD,
5554 0xA4, 0x2F, 0x24, 0x3B, 0xB6, 0x8A, 0x45, 0x76, 0xB3, 0xFA, 0x23, 0x83,
5555 0x53, 0xB2, 0x8F, 0x0C, 0xAE, 0xF9, 0xE8, 0xDB, 0x46, 0x5B, 0xBF, 0x7E,
5556 0xC3, 0x6F, 0x4F, 0xE6, 0xE7, 0x51, 0x75, 0x49, 0xB5, 0x4B, 0xBE, 0x48,
5557 0x51, 0x64, 0x9F, 0x5D, 0x56, 0xC7, 0x28, 0x9C, 0xC5, 0xBD, 0x0C, 0xD2,
5558 0x3A, 0x63, 0x49, 0x57,
5559};
5560
5561static const uint8_t keygen_dh704_g[] = {
5562 0x05,
5563};
5564
5565static const uint8_t keygen_dh768_p[] = {
5566 0xEA, 0x9B, 0x0E, 0xD5, 0xDF, 0xC6, 0x9C, 0x8A, 0x26, 0x29, 0xD4, 0x2A,
5567 0x94, 0x4F, 0xD5, 0x3E, 0xEA, 0xEC, 0xCD, 0x89, 0xDA, 0x9C, 0x12, 0x52,
5568 0x94, 0xA7, 0x1A, 0x7D, 0x14, 0x94, 0xB1, 0x89, 0x79, 0xF3, 0x4A, 0xC3,
5569 0xD6, 0xF5, 0x52, 0xA6, 0x65, 0xC6, 0x0C, 0xD2, 0x2B, 0x16, 0xCB, 0x4F,
5570 0x69, 0x4C, 0x41, 0x6C, 0xA6, 0xAF, 0xCE, 0xFD, 0x50, 0x0E, 0x8C, 0x9E,
5571 0xA7, 0x19, 0x46, 0x6E, 0xC2, 0x27, 0xB9, 0xAF, 0x61, 0x4B, 0xDA, 0x3A,
5572 0x60, 0xBA, 0x6D, 0xCE, 0xBA, 0x39, 0x1C, 0x02, 0xBF, 0x09, 0xF0, 0xF9,
5573 0x87, 0xBE, 0xA1, 0xDE, 0x4E, 0x34, 0x7B, 0x28, 0x3A, 0xC2, 0x9E, 0x83,
5574};
5575
5576static const uint8_t keygen_dh768_g[] = {
5577 0x05,
5578};
5579
5580static const uint8_t keygen_dh832_p[] = {
5581 0xB9, 0x0C, 0x79, 0x82, 0x7B, 0x23, 0xB7, 0x2F, 0x5A, 0x7B, 0xB1, 0xB9,
5582 0x63, 0x30, 0x7C, 0xD4, 0x0B, 0xEB, 0x7B, 0x8A, 0x67, 0x3E, 0x3B, 0x67,
5583 0xF1, 0x72, 0x90, 0x0E, 0xBF, 0x67, 0xEF, 0xBB, 0x95, 0xC1, 0x47, 0xED,
5584 0x89, 0x11, 0x79, 0x40, 0x63, 0x02, 0xF0, 0x41, 0x0C, 0xD1, 0x76, 0x15,
5585 0xAA, 0x24, 0x6A, 0xAE, 0x98, 0xFB, 0x19, 0x1F, 0x43, 0xB9, 0x92, 0xC7,
5586 0xB6, 0x33, 0xD8, 0x85, 0xBD, 0x06, 0x7D, 0x68, 0x32, 0xEE, 0xDB, 0x41,
5587 0xEF, 0x7B, 0xBD, 0xB4, 0xFE, 0x53, 0x4F, 0x6C, 0xA8, 0x26, 0xE0, 0x62,
5588 0x7D, 0x06, 0x06, 0xC5, 0xFB, 0x47, 0xD0, 0x3F, 0x4B, 0xC1, 0x7A, 0xC4,
5589 0x2A, 0xF3, 0x69, 0xF2, 0xDE, 0x77, 0xCD, 0x03,
5590};
5591
5592static const uint8_t keygen_dh832_g[] = {
5593 0x05,
5594};
5595
5596static const uint8_t keygen_dh896_p[] = {
5597 0xA8, 0x1A, 0xFB, 0xF4, 0x12, 0xF8, 0x17, 0x16, 0x89, 0x20, 0xAE, 0x6F,
5598 0x07, 0x55, 0x13, 0xCA, 0x99, 0x66, 0xA3, 0x1F, 0x07, 0xAC, 0x32, 0x5C,
5599 0xF5, 0xF0, 0x39, 0xA3, 0xDA, 0xF5, 0x55, 0xF9, 0x3C, 0xF3, 0x15, 0xF8,
5600 0x44, 0xC1, 0x10, 0x6A, 0x3D, 0x2F, 0x97, 0xFD, 0xAC, 0x74, 0x1E, 0xEE,
5601 0xCF, 0xDD, 0xEE, 0x70, 0x57, 0xBA, 0x4B, 0x41, 0xD6, 0x3F, 0xDD, 0x01,
5602 0xFB, 0x0C, 0x26, 0xA9, 0x06, 0xCD, 0x1B, 0xA2, 0xD3, 0x3E, 0xAD, 0x2D,
5603 0x29, 0xFB, 0x79, 0xB8, 0x8E, 0x50, 0xCC, 0xA1, 0x85, 0x37, 0xFA, 0xF1,
5604 0xBB, 0xB1, 0x5D, 0x3B, 0x51, 0x54, 0x16, 0x4C, 0x98, 0x2B, 0x26, 0xAD,
5605 0x70, 0x0B, 0x01, 0x87, 0x5C, 0xF1, 0xE8, 0x02, 0xF3, 0x57, 0xA9, 0x40,
5606 0x5C, 0xC5, 0xE0, 0xFF,
5607};
5608
5609static const uint8_t keygen_dh896_g[] = {
5610 0x05,
5611};
5612
5613static const uint8_t keygen_dh960_p[] = {
5614 0xD9, 0x31, 0xE0, 0xF3, 0x80, 0xED, 0xBD, 0xEC, 0x35, 0x99, 0xC9, 0x28,
5615 0xA8, 0x88, 0x3C, 0x84, 0x41, 0x8A, 0x6C, 0xC7, 0x83, 0x09, 0xCE, 0x07,
5616 0x51, 0x72, 0xBE, 0xE9, 0x21, 0x4F, 0xCB, 0x92, 0xAE, 0xA5, 0xF0, 0x9A,
5617 0x40, 0x9B, 0x02, 0x1D, 0xA5, 0x5E, 0xAB, 0x17, 0x25, 0x5B, 0x70, 0x0F,
5618 0xF9, 0x27, 0xEF, 0x49, 0xCD, 0x7F, 0x6E, 0x9A, 0x62, 0x51, 0xE6, 0xEA,
5619 0x4B, 0x7E, 0xBE, 0xB3, 0x72, 0xFB, 0xAF, 0x98, 0xA1, 0x7D, 0x77, 0x7E,
5620 0x53, 0xF9, 0xFC, 0x7A, 0xEB, 0xC7, 0xB0, 0x84, 0x2F, 0x70, 0xCC, 0xA2,
5621 0x34, 0x52, 0x9F, 0xD3, 0x46, 0xE3, 0x32, 0x2F, 0xE0, 0x6F, 0x83, 0x3B,
5622 0x8B, 0x17, 0x01, 0x0C, 0x1D, 0xEA, 0x04, 0x7D, 0xB1, 0xD4, 0xB2, 0x2D,
5623 0xC7, 0xD3, 0x2D, 0xE0, 0x47, 0x00, 0x6D, 0xE8, 0x1F, 0xAA, 0x39, 0x67,
5624};
5625
5626static const uint8_t keygen_dh960_g[] = {
5627 0x05,
5628};
5629
5630static const uint8_t keygen_dh1024_p[] = {
5631 0xB9, 0xF5, 0xB6, 0xFF, 0x49, 0xA7, 0x31, 0x3C, 0xD3, 0xAA, 0x42, 0xAE,
5632 0x3D, 0xA6, 0xD4, 0xC1, 0x92, 0xB0, 0x1C, 0xD5, 0x24, 0x9D, 0x67, 0x04,
5633 0xFA, 0xED, 0x0B, 0x2D, 0x8B, 0xA1, 0xB8, 0x72, 0x43, 0x48, 0xC2, 0x75,
5634 0x00, 0x9F, 0x43, 0xD7, 0xF0, 0x8F, 0xD8, 0xCD, 0x1C, 0x64, 0x48, 0x82,
5635 0x63, 0x52, 0x89, 0x78, 0x43, 0xEF, 0x00, 0xF6, 0x62, 0x04, 0x26, 0xD5,
5636 0x69, 0x2C, 0x2B, 0x9B, 0x53, 0x72, 0x57, 0xD5, 0x05, 0xA6, 0x53, 0x24,
5637 0x43, 0x81, 0x49, 0xEC, 0xBB, 0x43, 0x58, 0x66, 0x6A, 0xBD, 0xAC, 0xBA,
5638 0xD9, 0xC8, 0xC9, 0x95, 0x93, 0xCB, 0x79, 0x89, 0x86, 0x30, 0x0D, 0x45,
5639 0x3F, 0x89, 0x04, 0xC4, 0xEC, 0x96, 0xBF, 0x4E, 0x8E, 0x88, 0x51, 0xED,
5640 0xEF, 0x91, 0x8A, 0x03, 0xDC, 0x4E, 0x28, 0x69, 0x46, 0xDA, 0x1B, 0xD4,
5641 0x7E, 0xC5, 0xEB, 0x95, 0xBC, 0x9D, 0x14, 0x77,
5642};
5643
5644static const uint8_t keygen_dh1024_g[] = {
5645 0x05,
5646};
5647
5648static const uint8_t keygen_dh1088_p[] = {
5649 0xE3, 0x67, 0x7B, 0x2C, 0x68, 0xE3, 0x7C, 0xDB, 0x30, 0x3A, 0xF3, 0x20,
5650 0x33, 0x02, 0xB5, 0x08, 0x83, 0xC5, 0x8B, 0x07, 0xDD, 0x08, 0x92, 0x82,
5651 0xD6, 0x2A, 0x2B, 0x7F, 0xC6, 0xF0, 0xBD, 0xB8, 0x01, 0xF8, 0xCF, 0x78,
5652 0x4F, 0xFE, 0xE2, 0x9D, 0x2F, 0xF4, 0x2D, 0xC5, 0x48, 0xE0, 0xFD, 0x8A,
5653 0xC2, 0xCF, 0x1B, 0xD9, 0xE1, 0x23, 0xC6, 0xDA, 0xFC, 0x1C, 0x9B, 0xA4,
5654 0x70, 0x91, 0x1A, 0x6A, 0x35, 0x00, 0x5E, 0x63, 0x14, 0x04, 0xAB, 0x3B,
5655 0x00, 0xEE, 0x44, 0xE6, 0xAE, 0x49, 0xDB, 0xB7, 0xEF, 0xE1, 0x6E, 0xF9,
5656 0x88, 0xCC, 0xAB, 0x5E, 0x0A, 0x20, 0x84, 0x09, 0x03, 0xFA, 0xAA, 0x8C,
5657 0xFE, 0xB8, 0xEA, 0x31, 0x78, 0xD2, 0x92, 0xF3, 0x77, 0xCF, 0xEC, 0xB9,
5658 0xF8, 0x3C, 0x79, 0x4A, 0x9B, 0xB6, 0xCC, 0xC0, 0x5E, 0xAB, 0x92, 0xE6,
5659 0x39, 0x74, 0x5E, 0x8D, 0x2B, 0x28, 0x3B, 0x4D, 0x26, 0x6B, 0x2F, 0xF6,
5660 0xA8, 0xB1, 0x01, 0x53,
5661};
5662
5663static const uint8_t keygen_dh1088_g[] = {
5664 0x05,
5665};
5666
5667static const uint8_t keygen_dh1152_p[] = {
5668 0xCA, 0xD6, 0x34, 0x4F, 0xAE, 0x99, 0x47, 0x51, 0x14, 0x5D, 0xF4, 0xCA,
5669 0x47, 0xE2, 0xE7, 0x62, 0x7D, 0xB9, 0xC9, 0xE7, 0xF7, 0xEE, 0xD4, 0xF0,
5670 0x04, 0xC1, 0x93, 0x06, 0xC2, 0xC8, 0x5E, 0x9D, 0xD3, 0x9F, 0x4A, 0x87,
5671 0xF2, 0x22, 0x5A, 0x72, 0x8D, 0xEB, 0x8B, 0x12, 0x26, 0x82, 0x3A, 0xA7,
5672 0x6B, 0xE1, 0x55, 0xB0, 0x9F, 0x97, 0x4C, 0xC5, 0xEC, 0x5C, 0x1C, 0x23,
5673 0xAB, 0x95, 0xDC, 0x17, 0xD5, 0x80, 0x0A, 0xE6, 0x53, 0x9E, 0xD8, 0xC6,
5674 0xB9, 0x9E, 0xFA, 0x62, 0x60, 0x2A, 0x8D, 0xD5, 0x3D, 0x36, 0x5E, 0x4E,
5675 0x42, 0x1F, 0xAF, 0x2B, 0x87, 0x0E, 0xC6, 0x44, 0xB7, 0x55, 0x1C, 0x81,
5676 0x7E, 0x48, 0x96, 0x1B, 0xF9, 0x73, 0x1C, 0x3D, 0x80, 0xDF, 0x43, 0xDB,
5677 0x93, 0xB6, 0x1E, 0xC1, 0x04, 0x12, 0x9E, 0x33, 0x21, 0xCE, 0xF7, 0x49,
5678 0x41, 0x7E, 0x97, 0x31, 0xC3, 0x74, 0x1D, 0x95, 0x85, 0x6F, 0x3A, 0xA1,
5679 0xCF, 0x61, 0xD9, 0xEB, 0x67, 0x67, 0xED, 0x91, 0xDF, 0x23, 0xCD, 0xC3,
5680};
5681
5682static const uint8_t keygen_dh1152_g[] = {
5683 0x05,
5684};
5685
5686static const uint8_t keygen_dh1216_p[] = {
5687 0xB1, 0xFC, 0x4E, 0xF5, 0xDE, 0xC5, 0xDD, 0x33, 0xDD, 0xB2, 0x2E, 0x44,
5688 0x52, 0xDD, 0x74, 0x2F, 0x1F, 0x61, 0x20, 0x21, 0x72, 0x65, 0xC5, 0xEC,
5689 0x5A, 0xAA, 0xF1, 0x24, 0xA1, 0xD0, 0xEB, 0x4B, 0x4C, 0x32, 0x8A, 0xDD,
5690 0x4F, 0x9F, 0xEE, 0xFA, 0x5F, 0x81, 0xD4, 0x18, 0x3D, 0xCD, 0x39, 0x38,
5691 0xDC, 0x3D, 0x2E, 0x37, 0xEB, 0xFE, 0x73, 0xEF, 0x99, 0x53, 0x54, 0xA6,
5692 0xAB, 0x25, 0xFE, 0x9A, 0x10, 0xAE, 0x3E, 0xC9, 0x63, 0x45, 0x75, 0xAF,
5693 0xCA, 0xD9, 0x57, 0xF7, 0x71, 0xE0, 0xBE, 0x0D, 0x90, 0xE9, 0xC5, 0x5A,
5694 0xC6, 0x2E, 0x3D, 0xDE, 0xE4, 0x8B, 0x38, 0x8E, 0x83, 0x06, 0xA6, 0xE2,
5695 0x38, 0xA6, 0x88, 0x81, 0xDE, 0x8E, 0xA6, 0x6A, 0xBF, 0xF4, 0x75, 0xFB,
5696 0xAB, 0xAA, 0x02, 0xEA, 0x0E, 0xCF, 0xCA, 0xEA, 0x45, 0xFE, 0x1C, 0xC2,
5697 0xF9, 0xBE, 0x26, 0x31, 0xA6, 0x8F, 0xFE, 0x07, 0x9E, 0x79, 0x47, 0x11,
5698 0xA1, 0x25, 0xA4, 0xE5, 0xFB, 0xEA, 0xE7, 0xC1, 0xFF, 0x12, 0x12, 0x71,
5699 0x5D, 0xC1, 0x99, 0x44, 0xD1, 0xCE, 0x82, 0xA7,
5700};
5701
5702static const uint8_t keygen_dh1216_g[] = {
5703 0x05,
5704};
5705
5706static const uint8_t keygen_dh1280_p[] = {
5707 0xF0, 0x10, 0x04, 0x04, 0x08, 0x13, 0x79, 0x15, 0x62, 0x5C, 0xFA, 0x2A,
5708 0x6D, 0xFC, 0x3F, 0x23, 0x4C, 0x47, 0x83, 0x45, 0xE7, 0x6F, 0x64, 0x04,
5709 0x1A, 0xFD, 0xBF, 0xD2, 0xB9, 0x0A, 0x98, 0x14, 0x16, 0xA4, 0xB5, 0x03,
5710 0x13, 0xBB, 0xFB, 0x72, 0x1E, 0xF5, 0x23, 0x12, 0xB8, 0x74, 0x49, 0x3F,
5711 0x84, 0xF3, 0x02, 0x3A, 0x50, 0x6F, 0xB7, 0xC7, 0x6F, 0x37, 0x8F, 0x61,
5712 0x88, 0x60, 0x7C, 0xF1, 0xE7, 0x1E, 0xED, 0x55, 0xF1, 0xCD, 0x64, 0x93,
5713 0xA7, 0x12, 0xB7, 0x74, 0x5F, 0x23, 0x20, 0xF7, 0x87, 0xC2, 0x83, 0x2A,
5714 0x86, 0x0C, 0xF3, 0x4B, 0x88, 0x32, 0xF5, 0xB7, 0x86, 0x2F, 0xBF, 0xEE,
5715 0xA1, 0x59, 0xC4, 0xDB, 0x0F, 0xEF, 0x06, 0xC8, 0xF2, 0xEE, 0x39, 0xB4,
5716 0x19, 0x24, 0x8A, 0x2C, 0xE7, 0xF8, 0xA0, 0x34, 0x2A, 0x15, 0xA9, 0x54,
5717 0x4D, 0x04, 0x1B, 0xC0, 0xC5, 0x15, 0xCF, 0x38, 0x96, 0x83, 0x3E, 0xEE,
5718 0xD0, 0xFD, 0xBC, 0x62, 0xD9, 0x84, 0xA3, 0x02, 0x6D, 0x2A, 0x7B, 0x4B,
5719 0x3E, 0xCC, 0xAD, 0xA1, 0xF0, 0xA0, 0x44, 0xDD, 0x7E, 0x4B, 0xBD, 0x75,
5720 0xAD, 0x8F, 0xF1, 0x57,
5721};
5722
5723static const uint8_t keygen_dh1280_g[] = {
5724 0x05,
5725};
5726
5727static const uint8_t keygen_dh1344_p[] = {
5728 0x8E, 0x0F, 0xCC, 0x61, 0x96, 0xCA, 0xF2, 0x3A, 0x13, 0xD5, 0xF9, 0x2A,
5729 0xD0, 0xF0, 0x5A, 0x4C, 0x1B, 0xC2, 0xD2, 0xDE, 0xD6, 0x54, 0x53, 0x83,
5730 0x70, 0x1E, 0x0A, 0x17, 0x6D, 0x4C, 0xBA, 0xCD, 0xEE, 0x32, 0x08, 0x55,
5731 0xD8, 0xD3, 0x80, 0x81, 0x07, 0x04, 0xF3, 0x19, 0xDD, 0x20, 0x30, 0x6A,
5732 0x6C, 0x74, 0x25, 0x56, 0xEB, 0xA0, 0x9E, 0x0A, 0x08, 0x94, 0x88, 0xE8,
5733 0xD2, 0xFD, 0xC3, 0x16, 0x27, 0x51, 0xE2, 0xF8, 0xAE, 0x8B, 0x2B, 0xFF,
5734 0x2A, 0x75, 0xEC, 0x21, 0xEB, 0xA9, 0xE2, 0x24, 0x8A, 0xAE, 0xF9, 0x7D,
5735 0x90, 0x8B, 0x31, 0x10, 0x6B, 0x14, 0x97, 0x2D, 0xB2, 0x93, 0x59, 0xFF,
5736 0x4B, 0x9A, 0x0A, 0x90, 0xA8, 0x0E, 0xDE, 0x19, 0x2B, 0x74, 0xF2, 0xCC,
5737 0x2D, 0x5B, 0x4F, 0x91, 0xBE, 0x43, 0x86, 0xA2, 0x91, 0xDD, 0x01, 0xDD,
5738 0x24, 0x75, 0xD8, 0x9F, 0x85, 0x53, 0xC3, 0xDB, 0x08, 0x5F, 0x01, 0x24,
5739 0xA7, 0x45, 0xAA, 0x6E, 0xB4, 0xFB, 0x05, 0x1C, 0x58, 0x51, 0x3D, 0xFD,
5740 0x39, 0x57, 0xD4, 0xF9, 0x11, 0x81, 0x60, 0x48, 0xF1, 0xD7, 0x7C, 0xAE,
5741 0xDE, 0x58, 0x6E, 0x6A, 0x02, 0xC5, 0x51, 0x69, 0x47, 0xF3, 0xAC, 0x47,
5742};
5743
5744static const uint8_t keygen_dh1344_g[] = {
5745 0x05,
5746};
5747
5748static const uint8_t keygen_dh1408_p[] = {
5749 0xE1, 0xE7, 0xA6, 0xF3, 0x5C, 0x06, 0x00, 0x8B, 0x4B, 0x3C, 0x7A, 0xF9,
5750 0x4D, 0x30, 0x08, 0x73, 0x69, 0xCF, 0x79, 0x6F, 0xAB, 0x66, 0x47, 0x05,
5751 0x65, 0xA8, 0x4A, 0x5C, 0xA6, 0x5E, 0x3D, 0x46, 0x10, 0x0A, 0x58, 0x3E,
5752 0x7C, 0x3F, 0x0F, 0x3A, 0xE1, 0xFF, 0x2C, 0x7D, 0xE1, 0x40, 0x05, 0xED,
5753 0xC3, 0x0B, 0x6C, 0x36, 0x90, 0xDC, 0x10, 0x94, 0x9B, 0xEB, 0xA9, 0x31,
5754 0xD9, 0x1F, 0x46, 0xBF, 0xC0, 0xF4, 0x49, 0x44, 0x39, 0xF2, 0xE9, 0xB8,
5755 0x86, 0x52, 0xCB, 0x60, 0xAC, 0xAF, 0x2C, 0x38, 0x9A, 0x63, 0xCE, 0xB7,
5756 0x30, 0x17, 0x81, 0xA9, 0x1C, 0x3D, 0x73, 0x0D, 0x3F, 0xCE, 0xC8, 0xA6,
5757 0x95, 0x65, 0x8F, 0x9F, 0x5C, 0xE8, 0xEB, 0x5C, 0x69, 0x59, 0x8B, 0xA5,
5758 0x1D, 0x74, 0x23, 0x35, 0x3C, 0x35, 0x08, 0x50, 0x53, 0xE5, 0xDB, 0x93,
5759 0x69, 0x8F, 0x17, 0xF7, 0xA0, 0xBA, 0xED, 0xD6, 0xE9, 0x7C, 0x4F, 0x97,
5760 0xAB, 0x25, 0x26, 0x39, 0xF9, 0xF3, 0x12, 0x0A, 0xB1, 0xE0, 0x7C, 0xCD,
5761 0x60, 0x5C, 0x46, 0x2E, 0x22, 0xAB, 0xEF, 0x8D, 0x09, 0xB8, 0x3D, 0xB1,
5762 0xA6, 0xB0, 0x1C, 0x5D, 0x75, 0x66, 0x02, 0x0E, 0xFD, 0xB9, 0xD6, 0x47,
5763 0x5F, 0x80, 0xF3, 0xAF, 0xB3, 0x39, 0x7B, 0xF7,
5764};
5765
5766static const uint8_t keygen_dh1408_g[] = {
5767 0x05,
5768};
5769
5770static const uint8_t keygen_dh1472_p[] = {
5771 0x9D, 0x8A, 0x3D, 0x5A, 0xC0, 0x90, 0x55, 0x02, 0x4E, 0x28, 0xB7, 0x8F,
5772 0x33, 0x91, 0xDC, 0xEB, 0xD2, 0x81, 0x00, 0x16, 0x2D, 0x89, 0x9A, 0x3C,
5773 0x83, 0xD5, 0xF3, 0x2A, 0x59, 0x5D, 0x63, 0x86, 0xFB, 0xEB, 0xA8, 0xFD,
5774 0x27, 0x1E, 0x18, 0x9F, 0x3C, 0xF7, 0xEF, 0xAE, 0xDE, 0x6C, 0xA5, 0x30,
5775 0x16, 0x93, 0xF0, 0x00, 0xB3, 0x36, 0xD2, 0xF6, 0x2C, 0x95, 0xF1, 0x31,
5776 0x4A, 0x75, 0xA8, 0x4F, 0xF6, 0xA8, 0x0F, 0xE9, 0x0B, 0xB4, 0xAF, 0xEE,
5777 0xFF, 0x50, 0x6D, 0xE8, 0xFC, 0x3A, 0xCC, 0x04, 0x71, 0x21, 0x74, 0x38,
5778 0xEB, 0x7E, 0x66, 0x70, 0x85, 0xA7, 0x35, 0x50, 0x07, 0x21, 0x2D, 0x24,
5779 0x45, 0xCC, 0x00, 0xB1, 0x7F, 0x7A, 0x73, 0x54, 0x9B, 0x96, 0x7B, 0x60,
5780 0x46, 0xDE, 0x57, 0x4B, 0xE3, 0xF5, 0xEA, 0x0E, 0xFC, 0x7A, 0xC1, 0xFE,
5781 0x8D, 0x13, 0xD8, 0x2D, 0xAB, 0xDD, 0xA6, 0x61, 0x5C, 0x95, 0xB4, 0x15,
5782 0x6F, 0x2A, 0x40, 0x6C, 0xB3, 0xC6, 0xC2, 0x1C, 0xC6, 0x74, 0x6F, 0x31,
5783 0x73, 0x47, 0x94, 0x95, 0x23, 0x8D, 0xCD, 0x4F, 0x4D, 0xA8, 0xF3, 0x67,
5784 0x5D, 0xDE, 0x83, 0x49, 0x9C, 0xD3, 0xD9, 0xB5, 0x0D, 0xD4, 0x0E, 0xD1,
5785 0x99, 0xB7, 0x53, 0x2E, 0xE5, 0xFD, 0xB5, 0x75, 0xFD, 0xE6, 0xD6, 0xC6,
5786 0xA2, 0x43, 0x33, 0x83,
5787};
5788
5789static const uint8_t keygen_dh1472_g[] = {
5790 0x05,
5791};
5792
5793static const uint8_t keygen_dh1536_p[] = {
5794 0xE2, 0x5A, 0x3F, 0x8E, 0xE8, 0x72, 0x92, 0x84, 0x2F, 0xB2, 0xC0, 0x01,
5795 0x1F, 0xE9, 0x42, 0x0A, 0x0B, 0x1A, 0x71, 0x27, 0x51, 0xD8, 0xB5, 0xD8,
5796 0x31, 0x7B, 0xEE, 0xEE, 0xAA, 0xA5, 0x67, 0x67, 0x36, 0xAF, 0xAB, 0x55,
5797 0xB9, 0x07, 0xA7, 0xF7, 0x55, 0xE3, 0x08, 0x52, 0x7C, 0x55, 0xF3, 0x28,
5798 0x6F, 0x37, 0x84, 0xC7, 0x26, 0x66, 0x2F, 0x84, 0x8C, 0x09, 0xA5, 0x0C,
5799 0x5A, 0x60, 0x45, 0x7A, 0xDC, 0x11, 0x11, 0xB6, 0xF8, 0x6B, 0x2A, 0x63,
5800 0x6E, 0x86, 0x00, 0x65, 0x92, 0x8F, 0xE8, 0xB8, 0x4A, 0x2F, 0xDC, 0x62,
5801 0xE0, 0x2C, 0x1F, 0x95, 0x8F, 0x16, 0x7D, 0xB9, 0xC2, 0xCE, 0x58, 0x9A,
5802 0x12, 0x55, 0xC2, 0x01, 0xE2, 0xBE, 0xE5, 0xF0, 0x80, 0x04, 0xFD, 0xDD,
5803 0x95, 0x04, 0x11, 0xCA, 0xE3, 0xAA, 0x9E, 0x3F, 0x4C, 0x9A, 0xE9, 0x8C,
5804 0x11, 0xD9, 0x1C, 0x3A, 0x22, 0xEF, 0xEC, 0xB0, 0x9D, 0x73, 0x0C, 0xBB,
5805 0x4E, 0x3F, 0xFC, 0xF4, 0xFF, 0x63, 0x85, 0x7C, 0xE6, 0x5C, 0x22, 0x60,
5806 0x0A, 0x92, 0x32, 0xEC, 0x7C, 0x6B, 0x01, 0x72, 0x93, 0x42, 0x9D, 0x8D,
5807 0xC5, 0x78, 0x88, 0x8F, 0xCB, 0xA8, 0x93, 0xD1, 0x8F, 0x67, 0x74, 0x7A,
5808 0xA2, 0x93, 0x18, 0xDB, 0x84, 0xA5, 0xA6, 0xB9, 0x35, 0x0C, 0xCD, 0x8B,
5809 0x85, 0x2F, 0xC0, 0xBA, 0x27, 0x3D, 0x9C, 0x55, 0xDA, 0xB8, 0x94, 0x1F,
5810};
5811
5812static const uint8_t keygen_dh1536_g[] = {
5813 0x05,
5814};
5815
5816static const uint8_t keygen_dh1600_p[] = {
5817 0xAC, 0xF5, 0x91, 0x7E, 0xA3, 0x07, 0xD1, 0x24, 0x69, 0x38, 0x4D, 0x1B,
5818 0x1D, 0x60, 0x81, 0xF5, 0x22, 0x71, 0xE3, 0xEC, 0x17, 0x7B, 0x22, 0x81,
5819 0x22, 0xC7, 0x55, 0xBC, 0x61, 0x41, 0x03, 0xA5, 0x9D, 0xDC, 0x58, 0x28,
5820 0x6C, 0xE6, 0xF7, 0x9B, 0x0D, 0x2F, 0xD5, 0x4F, 0x3E, 0x4D, 0x6B, 0x26,
5821 0x5B, 0x09, 0x09, 0x79, 0x58, 0xC4, 0x39, 0x33, 0x8C, 0x29, 0x9E, 0x9F,
5822 0x5C, 0x76, 0xA5, 0xC8, 0x99, 0xF8, 0x69, 0xEE, 0x8F, 0xBA, 0x2C, 0xD4,
5823 0x68, 0x4F, 0xB2, 0xDC, 0xE6, 0xD9, 0x20, 0xE8, 0x02, 0xF2, 0x43, 0x9C,
5824 0xDD, 0x31, 0x79, 0xBD, 0x39, 0x78, 0x31, 0xC6, 0x03, 0x66, 0x69, 0x05,
5825 0xD6, 0x1E, 0xFE, 0x11, 0x1D, 0x9E, 0x01, 0xB8, 0xCB, 0xE8, 0xC7, 0x51,
5826 0xD9, 0xCD, 0x49, 0xEA, 0xD6, 0xC3, 0xC7, 0xF1, 0xC0, 0xA2, 0x6B, 0xD1,
5827 0x52, 0xD3, 0x80, 0xFD, 0x52, 0x35, 0x5C, 0x3D, 0xD3, 0x97, 0x61, 0x58,
5828 0x69, 0x1B, 0x4F, 0x9C, 0xF9, 0xC9, 0x34, 0xDA, 0x9B, 0x8B, 0x04, 0x18,
5829 0x12, 0x2F, 0xF1, 0x22, 0x78, 0x0F, 0xD3, 0xAA, 0x85, 0x06, 0xA9, 0xCA,
5830 0x9E, 0x80, 0x39, 0x25, 0x12, 0x41, 0xDD, 0x86, 0x58, 0x1F, 0x4D, 0x1F,
5831 0x9B, 0xDB, 0x63, 0xD0, 0x80, 0x5E, 0x53, 0xAC, 0x86, 0x0C, 0x1E, 0x11,
5832 0xB1, 0x0D, 0xB6, 0x1F, 0xFE, 0x7C, 0x23, 0x6A, 0x71, 0x47, 0xA5, 0xC2,
5833 0x20, 0x23, 0x9F, 0x1D, 0xDF, 0xB9, 0x91, 0x4B,
5834};
5835
5836static const uint8_t keygen_dh1600_g[] = {
5837 0x05,
5838};
5839
5840static const uint8_t keygen_dh1664_p[] = {
5841 0xAB, 0xF8, 0x74, 0x92, 0xCE, 0x1A, 0x3F, 0x89, 0xE1, 0xB7, 0x75, 0x5E,
5842 0x99, 0xBE, 0xFF, 0x73, 0x3E, 0x78, 0x86, 0xB0, 0x5E, 0x2F, 0x5C, 0xA4,
5843 0xB2, 0xE4, 0x72, 0x2C, 0x59, 0xB6, 0x64, 0x6F, 0x63, 0x72, 0xE3, 0x82,
5844 0xA4, 0xFB, 0x03, 0x57, 0x40, 0x6D, 0x6B, 0x1E, 0x2B, 0xB9, 0x8C, 0xB0,
5845 0x19, 0xB0, 0xE8, 0xC3, 0x3D, 0xEC, 0xC2, 0xA0, 0x91, 0x15, 0x02, 0x79,
5846 0x93, 0x31, 0xE4, 0x3A, 0x17, 0x9D, 0x9F, 0x68, 0xCD, 0x73, 0x28, 0x83,
5847 0xC3, 0x07, 0x43, 0x15, 0x05, 0x50, 0x9F, 0x78, 0x91, 0x2A, 0x98, 0x35,
5848 0xA3, 0xE4, 0x84, 0x84, 0x55, 0xDF, 0x32, 0x29, 0x27, 0x91, 0xC8, 0xFF,
5849 0x8B, 0x7B, 0x4E, 0x1B, 0xA1, 0x02, 0xBA, 0x31, 0x33, 0x79, 0x2E, 0x73,
5850 0x1D, 0x00, 0x30, 0xF2, 0x1E, 0x83, 0xB4, 0x7B, 0xD1, 0x76, 0xD4, 0x9E,
5851 0x2E, 0x32, 0xB6, 0xA5, 0x69, 0xB2, 0x28, 0x8E, 0xC4, 0xE3, 0xB0, 0x33,
5852 0x7E, 0x59, 0x90, 0x92, 0x40, 0x3F, 0x2C, 0x98, 0xC6, 0xEE, 0x26, 0xF1,
5853 0xE0, 0xE2, 0xB0, 0xA6, 0x50, 0xB0, 0x2E, 0xF1, 0xE3, 0x2D, 0x4F, 0xB5,
5854 0x58, 0xDA, 0x07, 0xBE, 0x9D, 0x20, 0x7C, 0x10, 0x23, 0x6D, 0x60, 0x96,
5855 0x11, 0xC9, 0xB4, 0xD4, 0x9C, 0xF0, 0x01, 0x8F, 0x9B, 0xC4, 0x83, 0xC6,
5856 0x47, 0x53, 0x74, 0xDD, 0x74, 0x01, 0x03, 0x9C, 0x99, 0xA0, 0x5E, 0xE2,
5857 0xA0, 0x05, 0x6E, 0x66, 0xB0, 0x01, 0xDD, 0x44, 0xFF, 0xA6, 0x65, 0x96,
5858 0x92, 0x2B, 0x89, 0x57,
5859};
5860
5861static const uint8_t keygen_dh1664_g[] = {
5862 0x05,
5863};
5864
5865static const uint8_t keygen_dh1728_p[] = {
5866 0xED, 0x9F, 0xF6, 0x0C, 0xD6, 0x18, 0x33, 0xE8, 0x26, 0x13, 0xF2, 0x56,
5867 0xE7, 0x9D, 0x03, 0x45, 0x99, 0xA0, 0x12, 0xB1, 0xBC, 0x45, 0xAD, 0xA7,
5868 0x14, 0xCC, 0x37, 0x97, 0x4D, 0x21, 0x6D, 0x52, 0x16, 0x6B, 0x20, 0x0B,
5869 0x8D, 0xA6, 0x43, 0xDF, 0x6C, 0x5C, 0x5A, 0xF2, 0x24, 0xBF, 0x04, 0x03,
5870 0x2E, 0xF6, 0xFE, 0x45, 0x30, 0x88, 0x2B, 0x07, 0x5C, 0xAA, 0xAE, 0x7E,
5871 0x33, 0xEF, 0xE6, 0x92, 0xD6, 0xFD, 0x61, 0x5F, 0xEF, 0xAC, 0xFB, 0x64,
5872 0x8D, 0x41, 0xE7, 0x52, 0xD2, 0x56, 0x74, 0x3A, 0xE5, 0x5E, 0x7E, 0x88,
5873 0x8D, 0xCD, 0xEA, 0xA8, 0xEF, 0x09, 0x9E, 0xDC, 0xBB, 0xC2, 0x10, 0xA8,
5874 0xE8, 0x7B, 0x24, 0x1B, 0x28, 0xA7, 0x1C, 0x0C, 0x53, 0xB8, 0xC2, 0xF3,
5875 0x01, 0x32, 0xBA, 0xE5, 0x8B, 0x6F, 0x3B, 0xB9, 0x36, 0x44, 0x5B, 0x3A,
5876 0x73, 0x44, 0x8F, 0xDE, 0x99, 0x69, 0x22, 0xE0, 0x2C, 0x45, 0x71, 0xA9,
5877 0x52, 0x1C, 0xCD, 0x19, 0x02, 0xBD, 0x06, 0xD2, 0x57, 0x45, 0xE3, 0x6C,
5878 0x96, 0x6D, 0x0B, 0x25, 0x56, 0x4C, 0x40, 0x2E, 0x7E, 0x83, 0xEE, 0xE1,
5879 0xB2, 0x65, 0x51, 0x04, 0x8D, 0x6A, 0x08, 0x44, 0xF0, 0x80, 0xB1, 0xFE,
5880 0x13, 0x15, 0x9B, 0x82, 0x65, 0xF0, 0x89, 0xBC, 0x7E, 0x63, 0xF6, 0x08,
5881 0xD3, 0xBA, 0xA9, 0x66, 0x35, 0x5F, 0x0C, 0xF7, 0xE9, 0x52, 0xA3, 0x4D,
5882 0x66, 0x01, 0xE7, 0x28, 0xF4, 0xDC, 0xF2, 0x46, 0xBB, 0x02, 0x95, 0x21,
5883 0x6A, 0x8F, 0x97, 0xA7, 0x3F, 0x06, 0x2E, 0xB2, 0x97, 0xEC, 0x5A, 0xFB,
5884};
5885
5886
5887static const uint8_t keygen_dh1728_g[] = {
5888 0x05,
5889};
5890
5891static const uint8_t keygen_dh1792_p[] = {
5892 0x9A, 0x87, 0x16, 0x1D, 0x23, 0x55, 0xC7, 0x06, 0x55, 0xD7, 0xB1, 0xB3,
5893 0x71, 0x66, 0x9A, 0x16, 0x5A, 0xA6, 0x8F, 0x54, 0x50, 0x99, 0xBD, 0x90,
5894 0x8C, 0x84, 0xB3, 0xBC, 0x02, 0xFE, 0xCB, 0x07, 0x3A, 0x7E, 0x97, 0x12,
5895 0x32, 0xEC, 0xA0, 0x0B, 0xEA, 0x96, 0x51, 0xB4, 0x50, 0x4E, 0x3A, 0xCB,
5896 0x27, 0xA9, 0x42, 0x51, 0x49, 0x35, 0x9F, 0x45, 0x6B, 0xDA, 0xE0, 0x6C,
5897 0x10, 0x80, 0x00, 0x41, 0xC2, 0xFC, 0x91, 0xB6, 0x59, 0xCE, 0x76, 0x7F,
5898 0x21, 0xC6, 0x10, 0x8A, 0x68, 0x68, 0x54, 0x76, 0xCE, 0x33, 0xA6, 0x37,
5899 0xCF, 0x80, 0xDF, 0x37, 0x12, 0x77, 0xBA, 0xBF, 0x15, 0x10, 0x22, 0x4A,
5900 0xA1, 0x9B, 0xA6, 0x6B, 0x8E, 0x14, 0x4F, 0x64, 0xF4, 0x87, 0x64, 0xAA,
5901 0x6E, 0xBC, 0xB5, 0xB2, 0x96, 0x27, 0xD1, 0x1A, 0x6E, 0x6D, 0x4B, 0xC6,
5902 0x43, 0x28, 0xE9, 0xFC, 0xA4, 0xCB, 0x61, 0x8F, 0xEA, 0xE8, 0x40, 0xF2,
5903 0x0A, 0x19, 0xBA, 0x17, 0x49, 0x9A, 0x9F, 0xEF, 0x65, 0xBC, 0x70, 0x85,
5904 0xDD, 0x98, 0xB9, 0x8B, 0x25, 0x2C, 0xE1, 0x89, 0xC4, 0x60, 0xA0, 0xA9,
5905 0x7E, 0xFB, 0xEC, 0xBC, 0x4C, 0x1D, 0x25, 0x5D, 0x70, 0x2E, 0x73, 0x29,
5906 0x22, 0xA7, 0x83, 0x11, 0xC0, 0x64, 0xA9, 0xB6, 0xFA, 0x11, 0xC8, 0xC4,
5907 0x14, 0x30, 0x64, 0xE4, 0x76, 0xBE, 0x41, 0x62, 0xE6, 0x9F, 0xD6, 0x2A,
5908 0xEC, 0x60, 0xCF, 0xBD, 0x25, 0x2E, 0x3C, 0x6C, 0x40, 0x16, 0x32, 0x5C,
5909 0xB5, 0x3D, 0xFB, 0xD7, 0x3C, 0x59, 0x06, 0xBE, 0x37, 0x54, 0x40, 0x90,
5910 0x3D, 0x51, 0x01, 0x9A, 0x1E, 0x87, 0x05, 0xE3,
5911};
5912
5913static const uint8_t keygen_dh1792_g[] = {
5914 0x05,
5915};
5916
5917static const uint8_t keygen_dh1856_p[] = {
5918 0xA8, 0xD1, 0xC4, 0xCA, 0x89, 0xB5, 0xB3, 0x17, 0xEB, 0x4D, 0xB1, 0x58,
5919 0x73, 0x28, 0xDD, 0x7F, 0x67, 0x78, 0x13, 0x7D, 0x0D, 0x0E, 0x77, 0x43,
5920 0xB8, 0xA5, 0xCD, 0x84, 0xD3, 0x29, 0x3F, 0x00, 0xD7, 0xB0, 0x66, 0x95,
5921 0x52, 0x9D, 0x49, 0xAD, 0x9C, 0xCE, 0x83, 0xB1, 0xDB, 0x86, 0x90, 0x9A,
5922 0x40, 0xAD, 0x0A, 0xB0, 0x3A, 0x93, 0x33, 0x07, 0xC8, 0x32, 0x4D, 0x75,
5923 0x1E, 0x7B, 0xDC, 0xD3, 0x23, 0x5C, 0xCB, 0x83, 0x62, 0x79, 0x3A, 0x88,
5924 0xE8, 0xD0, 0x9B, 0x75, 0x4D, 0xA0, 0x1F, 0x3E, 0x08, 0x61, 0x5D, 0xEF,
5925 0x7C, 0xF0, 0x4D, 0xF8, 0xDD, 0x95, 0xEC, 0x31, 0xDD, 0x50, 0xA5, 0x4B,
5926 0xAA, 0x8E, 0xED, 0x45, 0x34, 0xCB, 0x87, 0x09, 0x4F, 0x36, 0xF6, 0xF4,
5927 0xF7, 0x08, 0x0D, 0xBA, 0xBC, 0x06, 0x22, 0x59, 0x83, 0x93, 0xF6, 0x4B,
5928 0xBC, 0x35, 0xAD, 0x48, 0x82, 0x40, 0x55, 0x51, 0xBC, 0xF8, 0xE2, 0x9A,
5929 0x11, 0xF2, 0x08, 0x1E, 0xCA, 0x55, 0x40, 0x36, 0x00, 0xBE, 0x1C, 0xC8,
5930 0x94, 0x2E, 0x35, 0x7D, 0xB0, 0xA4, 0xCD, 0x1C, 0xC1, 0xFF, 0x58, 0xE1,
5931 0xBB, 0x31, 0xE9, 0x13, 0x16, 0x7F, 0x43, 0x88, 0xB2, 0x43, 0x62, 0x2A,
5932 0x79, 0xE3, 0x61, 0xDF, 0xF5, 0xC9, 0x9C, 0x33, 0xDD, 0x93, 0x58, 0xFC,
5933 0x08, 0x51, 0xE8, 0xA8, 0x30, 0x61, 0x64, 0x83, 0xB3, 0x20, 0xC4, 0x53,
5934 0x95, 0xD6, 0xB3, 0x74, 0xB5, 0xFA, 0xB1, 0x65, 0xD1, 0xF9, 0xED, 0xB1,
5935 0x9B, 0x97, 0x86, 0xC6, 0xDE, 0x6E, 0x5F, 0xF4, 0x6A, 0x42, 0xFA, 0x1F,
5936 0x6E, 0xEA, 0x5B, 0x43, 0x4C, 0xCC, 0x62, 0x76, 0xFE, 0x9B, 0xA0, 0xB9,
5937 0x7C, 0x50, 0x5E, 0x8B,
5938};
5939
5940static const uint8_t keygen_dh1856_g[] = {
5941 0x05,
5942};
5943
5944static const uint8_t keygen_dh1920_p[] = {
5945 0xC2, 0x68, 0xB1, 0x2E, 0x41, 0xB7, 0xA3, 0xCC, 0xE8, 0x10, 0x48, 0xE8,
5946 0x80, 0xA5, 0x56, 0x82, 0x3C, 0x05, 0xA3, 0xC4, 0x20, 0xD5, 0xD7, 0x19,
5947 0x54, 0x60, 0xA4, 0x97, 0x95, 0x09, 0x3D, 0xDF, 0x10, 0xFF, 0x21, 0x0D,
5948 0x68, 0x19, 0x15, 0x89, 0xD1, 0x44, 0x14, 0x1E, 0xF2, 0xD8, 0xFD, 0x9D,
5949 0x35, 0x8C, 0xA6, 0x2B, 0x7D, 0x73, 0x9A, 0xEB, 0x86, 0x28, 0x4D, 0x3B,
5950 0x22, 0xEF, 0x1A, 0x35, 0xB6, 0x95, 0xA2, 0xFF, 0x03, 0x40, 0x49, 0x60,
5951 0x59, 0xD2, 0x2D, 0xAD, 0x00, 0xEF, 0x6A, 0x5B, 0xFB, 0xA6, 0x16, 0x01,
5952 0x92, 0x5E, 0x7D, 0x95, 0x2E, 0x18, 0xD5, 0x23, 0x9E, 0x9E, 0x87, 0xF2,
5953 0x2F, 0xFC, 0xE4, 0xF7, 0xC2, 0x28, 0x44, 0x97, 0xAB, 0xB5, 0xC1, 0xD3,
5954 0x8A, 0x53, 0xD7, 0xE5, 0x04, 0x78, 0xF2, 0xD9, 0x21, 0xD5, 0x46, 0x17,
5955 0x8A, 0xFC, 0xDB, 0x57, 0x29, 0xDD, 0x78, 0x5B, 0x05, 0xA9, 0xB0, 0x13,
5956 0x45, 0x1C, 0x84, 0xEE, 0x46, 0x73, 0x1B, 0x8E, 0x80, 0x45, 0x73, 0x04,
5957 0xF9, 0x23, 0x96, 0xBA, 0xBD, 0x51, 0x69, 0x81, 0xE4, 0xAE, 0x0D, 0x0A,
5958 0xC4, 0x93, 0xD9, 0x67, 0x14, 0x92, 0x5A, 0x96, 0x86, 0x9F, 0xCD, 0x6E,
5959 0x9A, 0x2A, 0x17, 0xA9, 0x1A, 0xDD, 0x00, 0x7C, 0x78, 0xD8, 0x06, 0xC5,
5960 0xB4, 0xA4, 0xF6, 0xCF, 0x22, 0xCD, 0xCA, 0x0E, 0x27, 0x97, 0xDD, 0x22,
5961 0x02, 0x31, 0x2B, 0x9C, 0xFF, 0x7E, 0x35, 0x3C, 0xDA, 0xAB, 0x51, 0x68,
5962 0x5A, 0x81, 0xF3, 0xA5, 0xA9, 0x04, 0xDA, 0x45, 0x07, 0xC6, 0x4A, 0xEF,
5963 0x5D, 0x0E, 0xC3, 0x41, 0xD6, 0xAC, 0xD0, 0x8D, 0x56, 0xAC, 0xB4, 0x89,
5964 0x53, 0x41, 0x06, 0x99, 0x83, 0x04, 0xBE, 0x6D, 0x2B, 0x28, 0xEB, 0x47,
5965};
5966
5967static const uint8_t keygen_dh1920_g[] = {
5968 0x05,
5969};
5970
5971static const uint8_t keygen_dh1984_p[] = {
5972 0xD8, 0xF3, 0xDC, 0x89, 0xE0, 0x6E, 0xD4, 0x07, 0xC3, 0x95, 0xC0, 0x17,
5973 0x39, 0xCE, 0xF6, 0xD0, 0x8A, 0xD7, 0x85, 0xD3, 0x83, 0x4D, 0xDC, 0x0B,
5974 0x85, 0x3B, 0xB7, 0x47, 0xEA, 0xDF, 0xE3, 0x34, 0xCA, 0xA9, 0x60, 0x9A,
5975 0x4F, 0x8E, 0x8B, 0xAE, 0x8A, 0xAF, 0xD3, 0x96, 0x56, 0xFC, 0x1D, 0x37,
5976 0x9A, 0x96, 0x57, 0x21, 0x32, 0xF0, 0x22, 0xE8, 0x68, 0x8B, 0x73, 0xAE,
5977 0x1B, 0xAB, 0xFB, 0x79, 0x1B, 0x7E, 0xDC, 0xAD, 0x9D, 0xA2, 0xF3, 0x5E,
5978 0x11, 0x46, 0x54, 0x4E, 0x88, 0x92, 0x2B, 0x79, 0x3B, 0xBB, 0x14, 0xD8,
5979 0x3B, 0x0B, 0xB0, 0x55, 0xE5, 0x9A, 0xA9, 0xA0, 0x94, 0x3C, 0x72, 0xE0,
5980 0x47, 0x58, 0xA5, 0x85, 0xDC, 0x4A, 0x6D, 0x50, 0x98, 0x28, 0x9B, 0xA1,
5981 0xB2, 0x95, 0xBB, 0x1A, 0x41, 0x05, 0xBC, 0x32, 0x02, 0x72, 0xBB, 0xF7,
5982 0x1A, 0x48, 0xC3, 0xD9, 0x4F, 0xBD, 0x32, 0xC8, 0x82, 0xAB, 0xCE, 0xDE,
5983 0x24, 0x6A, 0x0C, 0x92, 0xF8, 0xFB, 0xFF, 0x18, 0x33, 0x48, 0xAC, 0xD7,
5984 0xA3, 0x12, 0x0D, 0x52, 0x15, 0x3A, 0xA4, 0x6D, 0x85, 0x0A, 0xBF, 0x19,
5985 0x63, 0x82, 0x3E, 0xB9, 0x52, 0x98, 0xEA, 0xCC, 0x56, 0x66, 0x0F, 0x96,
5986 0x90, 0x1D, 0x35, 0xD6, 0xE1, 0xF6, 0x2B, 0x5B, 0xF7, 0x75, 0x12, 0xE5,
5987 0xD9, 0xED, 0x2E, 0x20, 0xA0, 0xF5, 0x68, 0xA8, 0xC9, 0x6E, 0x08, 0xD0,
5988 0xD2, 0xE7, 0xB6, 0xCB, 0x51, 0xA2, 0x5A, 0x34, 0x0B, 0xF3, 0x13, 0xAF,
5989 0x5A, 0x46, 0x8B, 0xCB, 0xC9, 0x46, 0x02, 0x15, 0xFE, 0x96, 0x45, 0x25,
5990 0x7D, 0x76, 0x56, 0x16, 0x8C, 0x97, 0xF3, 0x74, 0xFC, 0x2F, 0x5D, 0xFA,
5991 0xCD, 0x62, 0x23, 0x02, 0xF8, 0x19, 0x94, 0xEE, 0xE6, 0x18, 0x09, 0xDE,
5992 0x64, 0xB4, 0x3A, 0xDC, 0x0A, 0x5E, 0x26, 0x83,
5993};
5994
5995static const uint8_t keygen_dh1984_g[] = {
5996 0x05,
5997};
5998
5999static const uint8_t keygen_dh2048_p[] = {
6000 0x8F, 0x3E, 0xC1, 0x36, 0xCA, 0x60, 0xCE, 0xD1, 0xC5, 0xFD, 0x22, 0x05,
6001 0xD6, 0x94, 0x38, 0x20, 0x4F, 0xE1, 0xAF, 0xBC, 0xA6, 0x82, 0xBD, 0x71,
6002 0xFD, 0xD6, 0xC2, 0x61, 0xE8, 0xC1, 0xBD, 0xA9, 0x5E, 0xFD, 0x02, 0x51,
6003 0xB6, 0x1F, 0x38, 0x30, 0x44, 0x76, 0x94, 0xB3, 0x26, 0x79, 0x35, 0xC4,
6004 0xDF, 0x51, 0x80, 0xAF, 0x0D, 0x81, 0xCC, 0xA2, 0x33, 0xD1, 0x1E, 0x77,
6005 0xB8, 0x06, 0xD7, 0xE5, 0x83, 0x34, 0x04, 0xF2, 0x96, 0x24, 0x37, 0xFE,
6006 0xBC, 0x20, 0x9C, 0x66, 0x4C, 0xEB, 0x4F, 0xFD, 0x1F, 0x99, 0x56, 0x40,
6007 0xD9, 0xE8, 0x6B, 0x2A, 0x8D, 0x6B, 0x56, 0xB2, 0xB4, 0x6D, 0x83, 0x47,
6008 0x4C, 0x18, 0x53, 0x8B, 0xB1, 0xA3, 0x51, 0xC2, 0x07, 0xA3, 0x36, 0x43,
6009 0x4B, 0x94, 0x10, 0xFD, 0x24, 0xA3, 0x77, 0x74, 0x77, 0xFA, 0x98, 0x4B,
6010 0x43, 0x0B, 0xB6, 0xEC, 0x7F, 0x5C, 0x7E, 0xBA, 0xB7, 0xC7, 0xAA, 0x72,
6011 0x11, 0x9F, 0x73, 0x14, 0x45, 0x03, 0x7A, 0x4E, 0xE5, 0xE7, 0x5C, 0x64,
6012 0xB8, 0x66, 0x66, 0xCE, 0xEE, 0xF8, 0xFF, 0x61, 0x0F, 0x5D, 0x4E, 0xF6,
6013 0xED, 0xB1, 0xE5, 0x2F, 0x52, 0xAC, 0x2B, 0x8F, 0x34, 0x0D, 0x13, 0xF6,
6014 0x4A, 0x3A, 0x6C, 0x56, 0xB3, 0x3C, 0x52, 0xA8, 0xB9, 0xBC, 0x27, 0xCA,
6015 0x3B, 0xFB, 0x6E, 0xE7, 0x52, 0xFB, 0xB0, 0x2B, 0x4F, 0xC4, 0xBD, 0x24,
6016 0x36, 0xE4, 0x71, 0x07, 0x74, 0x69, 0x5F, 0xE0, 0xB8, 0x59, 0x5F, 0x74,
6017 0x2F, 0xCC, 0x03, 0xB0, 0x6D, 0x90, 0xD8, 0xD3, 0x7C, 0x5A, 0x31, 0x46,
6018 0x5C, 0x7D, 0x1C, 0xC8, 0x0D, 0x18, 0x80, 0x8E, 0x5A, 0xA8, 0x5E, 0x4D,
6019 0x11, 0x2B, 0x76, 0xAC, 0x1E, 0x00, 0x51, 0x80, 0xE3, 0xED, 0x7A, 0xC0,
6020 0x4F, 0x80, 0xFA, 0x5F, 0xD5, 0xD7, 0x4F, 0xA7, 0x14, 0xE1, 0x60, 0x3C,
6021 0x95, 0x77, 0xCA, 0x3B,
6022};
6023
6024static const uint8_t keygen_dh2048_g[] = {
6025 0x05,
6026};
6027
6028static const uint8_t keygen_dh2048_subprime_p[] = {
6029 0x8F, 0x3E, 0xC1, 0x36, 0xCA, 0x60, 0xCE, 0xD1, 0xC5, 0xFD, 0x22, 0x05,
6030 0xD6, 0x94, 0x38, 0x20, 0x4F, 0xE1, 0xAF, 0xBC, 0xA6, 0x82, 0xBD, 0x71,
6031 0xFD, 0xD6, 0xC2, 0x61, 0xE8, 0xC1, 0xBD, 0xA9, 0x5E, 0xFD, 0x02, 0x51,
6032 0xB6, 0x1F, 0x38, 0x30, 0x44, 0x76, 0x94, 0xB3, 0x26, 0x79, 0x35, 0xC4,
6033 0xDF, 0x51, 0x80, 0xAF, 0x0D, 0x81, 0xCC, 0xA2, 0x33, 0xD1, 0x1E, 0x77,
6034 0xB8, 0x06, 0xD7, 0xE5, 0x83, 0x34, 0x04, 0xF2, 0x96, 0x24, 0x37, 0xFE,
6035 0xBC, 0x20, 0x9C, 0x66, 0x4C, 0xEB, 0x4F, 0xFD, 0x1F, 0x99, 0x56, 0x40,
6036 0xD9, 0xE8, 0x6B, 0x2A, 0x8D, 0x6B, 0x56, 0xB2, 0xB4, 0x6D, 0x83, 0x47,
6037 0x4C, 0x18, 0x53, 0x8B, 0xB1, 0xA3, 0x51, 0xC2, 0x07, 0xA3, 0x36, 0x43,
6038 0x4B, 0x94, 0x10, 0xFD, 0x24, 0xA3, 0x77, 0x74, 0x77, 0xFA, 0x98, 0x4B,
6039 0x43, 0x0B, 0xB6, 0xEC, 0x7F, 0x5C, 0x7E, 0xBA, 0xB7, 0xC7, 0xAA, 0x72,
6040 0x11, 0x9F, 0x73, 0x14, 0x45, 0x03, 0x7A, 0x4E, 0xE5, 0xE7, 0x5C, 0x64,
6041 0xB8, 0x66, 0x66, 0xCE, 0xEE, 0xF8, 0xFF, 0x61, 0x0F, 0x5D, 0x4E, 0xF6,
6042 0xED, 0xB1, 0xE5, 0x2F, 0x52, 0xAC, 0x2B, 0x8F, 0x34, 0x0D, 0x13, 0xF6,
6043 0x4A, 0x3A, 0x6C, 0x56, 0xB3, 0x3C, 0x52, 0xA8, 0xB9, 0xBC, 0x27, 0xCA,
6044 0x3B, 0xFB, 0x6E, 0xE7, 0x52, 0xFB, 0xB0, 0x2B, 0x4F, 0xC4, 0xBD, 0x24,
6045 0x36, 0xE4, 0x71, 0x07, 0x74, 0x69, 0x5F, 0xE0, 0xB8, 0x59, 0x5F, 0x74,
6046 0x2F, 0xCC, 0x03, 0xB0, 0x6D, 0x90, 0xD8, 0xD3, 0x7C, 0x5A, 0x31, 0x46,
6047 0x5C, 0x7D, 0x1C, 0xC8, 0x0D, 0x18, 0x80, 0x8E, 0x5A, 0xA8, 0x5E, 0x4D,
6048 0x11, 0x2B, 0x76, 0xAC, 0x1E, 0x00, 0x51, 0x80, 0xE3, 0xED, 0x7A, 0xC0,
6049 0x4F, 0x80, 0xFA, 0x5F, 0xD5, 0xD7, 0x4F, 0xA7, 0x14, 0xE1, 0x60, 0x3C,
6050 0x95, 0x77, 0xCA, 0x3B,
6051};
6052
6053static const uint8_t keygen_dh2048_subprime_g[] = {
6054 0x05,
6055};
6056static const uint32_t keygen_dh256_private_bits;
6057
6058static const uint32_t keygen_dh320_private_bits = 256;
6059
6060static const uint32_t keygen_dh384_private_bits;
6061
6062static const uint32_t keygen_dh448_private_bits = 256;
6063
6064static const uint32_t keygen_dh512_private_bits;
6065
6066static const uint32_t keygen_dh576_private_bits = 288;
6067
6068static const uint32_t keygen_dh640_private_bits;
6069
6070static const uint32_t keygen_dh704_private_bits = 352;
6071
6072static const uint32_t keygen_dh768_private_bits;
6073
6074static const uint32_t keygen_dh832_private_bits = 416;
6075
6076static const uint32_t keygen_dh896_private_bits;
6077
6078static const uint32_t keygen_dh960_private_bits = 480;
6079
6080static const uint32_t keygen_dh1024_private_bits;
6081
6082static const uint32_t keygen_dh1088_private_bits = 544;
6083
6084static const uint32_t keygen_dh1152_private_bits;
6085
6086static const uint32_t keygen_dh1216_private_bits = 608;
6087
6088static const uint32_t keygen_dh1280_private_bits;
6089
6090static const uint32_t keygen_dh1344_private_bits = 672;
6091
6092static const uint32_t keygen_dh1408_private_bits;
6093
6094static const uint32_t keygen_dh1472_private_bits = 736;
6095
6096static const uint32_t keygen_dh1536_private_bits;
6097
6098static const uint32_t keygen_dh1600_private_bits = 800;
6099
6100static const uint32_t keygen_dh1664_private_bits;
6101
6102static const uint32_t keygen_dh1728_private_bits = 864;
6103
6104static const uint32_t keygen_dh1792_private_bits;
6105
6106static const uint32_t keygen_dh1856_private_bits = 928;
6107
6108static const uint32_t keygen_dh1920_private_bits;
6109
6110static const uint32_t keygen_dh1984_private_bits = 992;
6111
6112static const uint32_t keygen_dh2048_private_bits;
6113
6114static const uint32_t keygen_dh2048_subprime_private_bits;
6115
6116static const uint8_t keygen_dh2048_subprime_subprime[] = {
6117 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6118 0x00,
6119 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6120 0x00,
6121 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
6122};
6123
6124/*
6125 * Test data from 186-3dsatestvectors.zip KeyPair.rsp
6126 * http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-3dsatestvectors.zip
6127 */
6128/* [mod = L=1024, N=160] */
6129static const uint8_t keygen_dsa_test1_p[] = {
6130 0xd3, 0x83, 0x11, 0xe2, 0xcd, 0x38, 0x8c, 0x3e, 0xd6, 0x98, 0xe8, 0x2f,
6131 0xdf, 0x88, 0xeb, 0x92, 0xb5, 0xa9, 0xa4, 0x83, 0xdc, 0x88, 0x00, 0x5d,
6132 0x4b, 0x72, 0x5e, 0xf3, 0x41, 0xea, 0xbb, 0x47, 0xcf, 0x8a, 0x7a, 0x8a,
6133 0x41, 0xe7, 0x92, 0xa1, 0x56, 0xb7, 0xce, 0x97, 0x20, 0x6c, 0x4f, 0x9c,
6134 0x5c, 0xe6, 0xfc, 0x5a, 0xe7, 0x91, 0x21, 0x02, 0xb6, 0xb5, 0x02, 0xe5,
6135 0x90, 0x50, 0xb5, 0xb2, 0x1c, 0xe2, 0x63, 0xdd, 0xdb, 0x20, 0x44, 0xb6,
6136 0x52, 0x23, 0x6f, 0x4d, 0x42, 0xab, 0x4b, 0x5d, 0x6a, 0xa7, 0x31, 0x89,
6137 0xce, 0xf1, 0xac, 0xe7, 0x78, 0xd7, 0x84, 0x5a, 0x5c, 0x1c, 0x1c, 0x71,
6138 0x47, 0x12, 0x31, 0x88, 0xf8, 0xdc, 0x55, 0x10, 0x54, 0xee, 0x16, 0x2b,
6139 0x63, 0x4d, 0x60, 0xf0, 0x97, 0xf7, 0x19, 0x07, 0x66, 0x40, 0xe2, 0x09,
6140 0x80, 0xa0, 0x09, 0x31, 0x13, 0xa8, 0xbd, 0x73
6141};
6142
6143static const uint8_t keygen_dsa_test1_q[] = {
6144 0x96, 0xc5, 0x39, 0x0a, 0x8b, 0x61, 0x2c, 0x0e, 0x42, 0x2b, 0xb2, 0xb0,
6145 0xea, 0x19, 0x4a, 0x3e, 0xc9, 0x35, 0xa2, 0x81
6146};
6147
6148static const uint8_t keygen_dsa_test1_g[] = {
6149 0x06, 0xb7, 0x86, 0x1a, 0xbb, 0xd3, 0x5c, 0xc8, 0x9e, 0x79, 0xc5, 0x2f,
6150 0x68, 0xd2, 0x08, 0x75, 0x38, 0x9b, 0x12, 0x73, 0x61, 0xca, 0x66, 0x82,
6151 0x21, 0x38, 0xce, 0x49, 0x91, 0xd2, 0xb8, 0x62, 0x25, 0x9d, 0x6b, 0x45,
6152 0x48, 0xa6, 0x49, 0x5b, 0x19, 0x5a, 0xa0, 0xe0, 0xb6, 0x13, 0x7c, 0xa3,
6153 0x7e, 0xb2, 0x3b, 0x94, 0x07, 0x4d, 0x3c, 0x3d, 0x30, 0x00, 0x42, 0xbd,
6154 0xf1, 0x57, 0x62, 0x81, 0x2b, 0x63, 0x33, 0xef, 0x7b, 0x07, 0xce, 0xba,
6155 0x78, 0x60, 0x76, 0x10, 0xfc, 0xc9, 0xee, 0x68, 0x49, 0x1d, 0xbc, 0x1e,
6156 0x34, 0xcd, 0x12, 0x61, 0x54, 0x74, 0xe5, 0x2b, 0x18, 0xbc, 0x93, 0x4f,
6157 0xb0, 0x0c, 0x61, 0xd3, 0x9e, 0x7d, 0xa8, 0x90, 0x22, 0x91, 0xc4, 0x43,
6158 0x4a, 0x4e, 0x22, 0x24, 0xc3, 0xf4, 0xfd, 0x9f, 0x93, 0xcd, 0x6f, 0x4f,
6159 0x17, 0xfc, 0x07, 0x63, 0x41, 0xa7, 0xe7, 0xd9
6160};
6161
6162/* for i in {512..1024..64}; do openssl dsaparam -C $i; done */
6163static const uint8_t keygen_dsa512_p[] = {
6164 0xC8, 0x6B, 0xB7, 0x91, 0xD6, 0x63, 0xCE, 0xC0, 0xC6, 0xB8, 0xAC, 0x5B,
6165 0xEB, 0xA7, 0xEF, 0x17, 0xBE, 0x1A, 0x1A, 0x36, 0x6B, 0x38, 0x40, 0x0E,
6166 0x69, 0x13, 0x32, 0xD4, 0x4B, 0xBE, 0x00, 0xB5, 0x29, 0x7F, 0x6B, 0x87,
6167 0xAA, 0x1D, 0x98, 0x37, 0xD2, 0xAC, 0x62, 0x26, 0xD7, 0xFD, 0xE1, 0xC9,
6168 0x13, 0x4F, 0x2A, 0xF2, 0x82, 0xEC, 0xA8, 0x83, 0x6F, 0x29, 0xD3, 0xF5,
6169 0x16, 0xB9, 0x13, 0xCD,
6170};
6171
6172static const uint8_t keygen_dsa512_q[] = {
6173 0x8D, 0xF9, 0x8B, 0x8A, 0xDA, 0x3B, 0x0B, 0x1C, 0xFA, 0x1C, 0xA7, 0xE8,
6174 0x9A, 0xA2, 0xD7, 0xC3, 0x2D, 0xD5, 0x9D, 0x1B,
6175};
6176
6177static const uint8_t keygen_dsa512_g[] = {
6178 0xB3, 0xE2, 0xFD, 0x38, 0xE0, 0x9A, 0x21, 0x64, 0x8F, 0x6D, 0x7E, 0x4F,
6179 0xC2, 0x24, 0x18, 0x88, 0xEC, 0xA4, 0xCB, 0xB0, 0x5F, 0x43, 0xD8, 0x2B,
6180 0x5B, 0xDE, 0x01, 0xB4, 0xD2, 0x24, 0x1F, 0x80, 0xE7, 0xFC, 0xF3, 0x15,
6181 0xFA, 0x0C, 0x5B, 0x6F, 0x81, 0x55, 0x8C, 0x80, 0x36, 0xFB, 0x4D, 0xB5,
6182 0x8C, 0x5A, 0x26, 0xBE, 0xFB, 0x78, 0xEA, 0x62, 0x6A, 0x9D, 0x5E, 0xD0,
6183 0x21, 0x0C, 0xD9, 0x4E,
6184};
6185
6186static const uint8_t keygen_dsa576_p[] = {
6187 0xF7, 0x85, 0x23, 0x2C, 0x2C, 0x86, 0xD4, 0x2B, 0xE5, 0x09, 0xAB, 0x60,
6188 0xD6, 0x79, 0x05, 0x13, 0x75, 0x78, 0x1E, 0xAE, 0xEB, 0x5F, 0xBA, 0xFA,
6189 0x6E, 0x05, 0xE7, 0xB3, 0x8D, 0x33, 0x4B, 0xE5, 0xB5, 0xAA, 0xD4, 0xE6,
6190 0xA3, 0x9B, 0xA2, 0xF5, 0x7B, 0xF6, 0x32, 0xE6, 0x31, 0x6F, 0x34, 0x46,
6191 0x16, 0xEA, 0xD8, 0x94, 0x79, 0xD7, 0x69, 0x23, 0xA4, 0x04, 0xE2, 0x25,
6192 0xBB, 0x6D, 0xCC, 0x6E, 0x99, 0xB7, 0x90, 0x90, 0x89, 0xB9, 0x88, 0x19,
6193};
6194
6195static const uint8_t keygen_dsa576_q[] = {
6196 0xF0, 0xD8, 0x71, 0x31, 0xB5, 0x01, 0xC1, 0x6B, 0x09, 0xCE, 0x7D, 0x2F,
6197 0x82, 0x48, 0xB0, 0x21, 0x9C, 0xD6, 0xB5, 0xB1,
6198};
6199
6200static const uint8_t keygen_dsa576_g[] = {
6201 0x33, 0x45, 0xB8, 0x9A, 0x17, 0x4B, 0xBF, 0xD3, 0xB2, 0xBA, 0xD2, 0xE4,
6202 0xAC, 0x54, 0xA0, 0x9B, 0x5F, 0x5D, 0x95, 0x88, 0x9C, 0x0C, 0x59, 0xCE,
6203 0x40, 0x0C, 0x05, 0xFD, 0xC4, 0x9D, 0x22, 0x27, 0xDA, 0xA6, 0xD1, 0x10,
6204 0x61, 0x46, 0x31, 0x5C, 0x7D, 0x4E, 0xF6, 0x01, 0x38, 0x9A, 0x7E, 0x72,
6205 0x4E, 0x7A, 0x07, 0xFB, 0x6D, 0x20, 0x9D, 0x59, 0xC6, 0x33, 0x6A, 0x64,
6206 0xBF, 0x14, 0x30, 0x4E, 0x0C, 0x64, 0x9D, 0x11, 0xCF, 0x64, 0xCE, 0x29,
6207};
6208
6209static const uint8_t keygen_dsa640_p[] = {
6210 0x88, 0x8C, 0x58, 0x99, 0xF4, 0x78, 0xEA, 0x31, 0x56, 0xB7, 0x2C, 0x70,
6211 0xDC, 0x09, 0x5D, 0xB9, 0x13, 0x16, 0xCE, 0xDF, 0xFD, 0x8C, 0x4E, 0xF8,
6212 0x32, 0x59, 0x00, 0x58, 0xD6, 0x44, 0x4F, 0x95, 0xF7, 0x85, 0x14, 0xC3,
6213 0x10, 0x5A, 0xA2, 0x44, 0x2F, 0xA2, 0xC9, 0xB4, 0x88, 0x89, 0xA1, 0xAE,
6214 0x0E, 0x82, 0xE1, 0xC1, 0x45, 0x09, 0x98, 0xF7, 0xCB, 0xF2, 0xD8, 0xA0,
6215 0x6E, 0x32, 0x02, 0xE4, 0x0E, 0x7A, 0x43, 0x3A, 0xE1, 0x04, 0x4C, 0xC5,
6216 0x78, 0x0E, 0x02, 0x27, 0xC4, 0xD0, 0xCA, 0x29,
6217};
6218
6219static const uint8_t keygen_dsa640_q[] = {
6220 0xD7, 0x63, 0x4F, 0x3E, 0x6D, 0x52, 0x93, 0x69, 0xFA, 0xFF, 0xDE, 0x0D,
6221 0x57, 0x3F, 0x24, 0xBB, 0x01, 0xF8, 0x01, 0xAD,
6222};
6223
6224static const uint8_t keygen_dsa640_g[] = {
6225 0x76, 0xCB, 0x07, 0xB9, 0xE9, 0x3F, 0x3C, 0xA5, 0x18, 0x43, 0x83, 0xE6,
6226 0xBC, 0x42, 0x09, 0xD9, 0xC5, 0x1C, 0x56, 0x57, 0x0B, 0x5B, 0x46, 0x65,
6227 0x00, 0x67, 0xCA, 0x33, 0xC0, 0xA6, 0x37, 0xEA, 0x89, 0xAE, 0xDF, 0x1D,
6228 0x79, 0x96, 0xC7, 0x0C, 0xD2, 0xAC, 0xD3, 0x2C, 0x46, 0xC2, 0xA0, 0x9D,
6229 0x4B, 0x06, 0xB5, 0xDF, 0xAE, 0x73, 0xEB, 0x9A, 0x6A, 0x54, 0x39, 0x2C,
6230 0xB1, 0x98, 0xAD, 0x44, 0xF3, 0x29, 0xC9, 0xC5, 0x75, 0xF1, 0x3C, 0xD8,
6231 0x3B, 0xA1, 0x85, 0x29, 0x38, 0xB9, 0x17, 0xA5,
6232};
6233
6234static const uint8_t keygen_dsa704_p[] = {
6235 0xDA, 0xEA, 0x9B, 0x6B, 0x35, 0x06, 0x2E, 0x7E, 0x71, 0xB2, 0x11, 0xD0,
6236 0x37, 0x84, 0x88, 0xC0, 0x50, 0x94, 0x73, 0x78, 0xA8, 0x9C, 0xBD, 0x8C,
6237 0xB1, 0x0A, 0xD5, 0x89, 0x52, 0x39, 0xBF, 0x41, 0xDC, 0xB9, 0xE5, 0x16,
6238 0x1A, 0x86, 0xD5, 0xCF, 0xD6, 0x26, 0x84, 0x95, 0xE9, 0x0D, 0xCD, 0x98,
6239 0x21, 0x6B, 0x3C, 0xFE, 0x6D, 0x2D, 0x42, 0x1A, 0x3F, 0xE0, 0xFF, 0x07,
6240 0x41, 0x82, 0x30, 0x15, 0x17, 0xF3, 0x0F, 0x7B, 0xA0, 0xD3, 0x46, 0xFA,
6241 0x1F, 0x1E, 0xEC, 0xBD, 0x26, 0xCE, 0x4C, 0xE3, 0xBD, 0x73, 0xA3, 0xA6,
6242 0xA0, 0x12, 0xE1, 0xFD,
6243};
6244
6245static const uint8_t keygen_dsa704_q[] = {
6246 0xCE, 0xB3, 0x2E, 0x41, 0xEB, 0xFD, 0x22, 0x2A, 0xCE, 0x9A, 0xAF, 0x24,
6247 0xE3, 0x02, 0x50, 0xDE, 0x47, 0xBC, 0x4C, 0x1F,
6248};
6249
6250static const uint8_t keygen_dsa704_g[] = {
6251 0x08, 0x83, 0x72, 0x6D, 0x0A, 0x8F, 0x19, 0x61, 0xE4, 0x62, 0x40, 0x29,
6252 0x66, 0x6B, 0xDE, 0xBD, 0xAB, 0xE3, 0x5B, 0x58, 0x3F, 0xF5, 0xEA, 0xDE,
6253 0x8E, 0x7A, 0x34, 0xAF, 0x1C, 0x99, 0x03, 0x1A, 0x51, 0x17, 0xFC, 0xE0,
6254 0xA3, 0x22, 0x43, 0x63, 0xB6, 0x7E, 0x29, 0x4B, 0x23, 0x6C, 0xD1, 0xDE,
6255 0x59, 0xEC, 0x1D, 0x67, 0x94, 0xDD, 0x2E, 0x88, 0x86, 0xD3, 0xD6, 0x68,
6256 0x58, 0x36, 0x48, 0xF8, 0xEF, 0x38, 0x3F, 0xF5, 0x87, 0x96, 0x38, 0xD3,
6257 0x48, 0x50, 0x1F, 0xA3, 0x4A, 0xCA, 0xD7, 0x4D, 0xC3, 0x84, 0x83, 0xB1,
6258 0x8A, 0x95, 0xE0, 0xB3,
6259};
6260
6261static const uint8_t keygen_dsa768_p[] = {
6262 0xF0, 0xB1, 0x93, 0xFD, 0x53, 0x98, 0x23, 0x43, 0xFB, 0x04, 0xB1, 0x31,
6263 0x80, 0x3D, 0xD3, 0x95, 0x56, 0x51, 0xCC, 0x32, 0xA4, 0x51, 0x00, 0x8A,
6264 0x80, 0xB6, 0x87, 0x70, 0xD7, 0x77, 0x8D, 0xA6, 0xC2, 0xB5, 0x85, 0xE1,
6265 0xE0, 0x9E, 0x11, 0x28, 0x72, 0xE9, 0x45, 0x5B, 0x4D, 0xC9, 0xDC, 0x46,
6266 0x64, 0x2F, 0x44, 0xD8, 0x24, 0xE3, 0x9B, 0xCC, 0xF9, 0x66, 0x31, 0x9C,
6267 0x40, 0x64, 0xED, 0xC5, 0x48, 0x30, 0x84, 0x0C, 0xF9, 0x1F, 0xBC, 0x75,
6268 0xD8, 0x8C, 0x53, 0x30, 0x25, 0xB6, 0xBD, 0xDA, 0xBE, 0xBC, 0xBA, 0x86,
6269 0xB3, 0x7D, 0x27, 0x74, 0x9D, 0x68, 0xEA, 0xB8, 0xE0, 0x09, 0x3A, 0x7F,
6270};
6271
6272static const uint8_t keygen_dsa768_q[] = {
6273 0xC9, 0x8C, 0x79, 0x7B, 0x98, 0xB5, 0xFD, 0x80, 0x5D, 0x4B, 0x26, 0x30,
6274 0x42, 0x63, 0xDE, 0x37, 0xAB, 0x4B, 0xB7, 0xAF,
6275};
6276
6277static const uint8_t keygen_dsa768_g[] = {
6278 0xD4, 0xE8, 0xF1, 0xB9, 0x6D, 0x40, 0x26, 0x19, 0x72, 0x39, 0x5C, 0x6F,
6279 0x68, 0x4C, 0x8C, 0x18, 0xD8, 0x49, 0x3C, 0xB6, 0x5D, 0x72, 0xE3, 0xF4,
6280 0x89, 0x24, 0x69, 0xC8, 0x76, 0x83, 0x38, 0xA2, 0x23, 0xF5, 0xB3, 0xD5,
6281 0xCB, 0x0F, 0xC4, 0xFE, 0x45, 0x65, 0x2F, 0x2C, 0x3D, 0x32, 0x02, 0x28,
6282 0xE5, 0xCA, 0x34, 0xEC, 0x1A, 0xBB, 0x82, 0x93, 0x2A, 0xD9, 0x64, 0x1E,
6283 0xC5, 0x91, 0x34, 0x60, 0xF2, 0xE2, 0x2D, 0x64, 0x4E, 0x46, 0xAA, 0x00,
6284 0x6F, 0x26, 0xD8, 0x98, 0x97, 0xBF, 0xCC, 0xF1, 0x1B, 0x4A, 0x8A, 0x7D,
6285 0x39, 0xA4, 0xA4, 0x23, 0x82, 0x64, 0x78, 0x40, 0xED, 0x4C, 0x96, 0xB9,
6286};
6287
6288static const uint8_t keygen_dsa832_p[] = {
6289 0x93, 0x47, 0x85, 0x69, 0x79, 0xF2, 0xAA, 0xC2, 0x83, 0xA4, 0x08, 0x2F,
6290 0x3C, 0xE5, 0x4D, 0x3B, 0xFF, 0x4D, 0xC5, 0xF4, 0x03, 0x20, 0xFA, 0x15,
6291 0xA8, 0x27, 0x80, 0x55, 0x29, 0x57, 0x60, 0x0B, 0x75, 0x01, 0x7B, 0x65,
6292 0xCE, 0x4D, 0x7C, 0xF6, 0x7C, 0x4F, 0x1D, 0xC3, 0x67, 0xF2, 0xC1, 0x64,
6293 0x38, 0x49, 0x54, 0x60, 0x57, 0x05, 0xEB, 0x31, 0xFA, 0x7B, 0x50, 0xA1,
6294 0x0F, 0xCB, 0xC4, 0x4E, 0xDF, 0x92, 0x5A, 0x8B, 0x11, 0xBA, 0x6B, 0x7E,
6295 0x7A, 0xB4, 0x80, 0xD0, 0x9A, 0xE2, 0x88, 0x7D, 0x83, 0xA6, 0x81, 0x81,
6296 0x71, 0xD0, 0x06, 0xDE, 0xCC, 0xA4, 0xB9, 0x0A, 0x6B, 0x81, 0x31, 0x28,
6297 0x1D, 0xEF, 0x5F, 0x99, 0xDE, 0xEC, 0xDA, 0x4D,
6298};
6299
6300static const uint8_t keygen_dsa832_q[] = {
6301 0xF8, 0xF5, 0xAF, 0x31, 0x0D, 0xBE, 0x6F, 0x4B, 0x79, 0x87, 0xA2, 0x98,
6302 0xED, 0xF1, 0x2A, 0x93, 0x3D, 0x12, 0x5D, 0x25,
6303};
6304
6305static const uint8_t keygen_dsa832_g[] = {
6306 0x11, 0x21, 0xBC, 0x83, 0x7A, 0xD9, 0x5F, 0x0E, 0xA2, 0xF7, 0x96, 0xB7,
6307 0x6A, 0xDD, 0xAE, 0xBA, 0x11, 0x26, 0x58, 0xF6, 0xB1, 0xCF, 0x94, 0x35,
6308 0x3B, 0xFB, 0x9C, 0x9B, 0x16, 0xB8, 0x58, 0xBA, 0x2F, 0x5C, 0xE5, 0x18,
6309 0xE1, 0x29, 0xA6, 0xA3, 0x1C, 0x0C, 0xA5, 0xC7, 0xAE, 0xE8, 0x31, 0x26,
6310 0x8C, 0xCD, 0xA5, 0x69, 0xB2, 0x74, 0x31, 0x15, 0xCE, 0x82, 0xCD, 0x32,
6311 0xF7, 0xC8, 0x90, 0x60, 0x96, 0x61, 0x07, 0x60, 0x63, 0x6B, 0x48, 0x03,
6312 0xCD, 0x1F, 0x58, 0x7D, 0x8E, 0xAF, 0x26, 0x16, 0x3B, 0xC6, 0xA6, 0x03,
6313 0xB4, 0xE1, 0x3E, 0xBE, 0x5B, 0xC9, 0xD3, 0xBD, 0xB6, 0x31, 0xC9, 0x34,
6314 0x2C, 0x2B, 0x08, 0x3C, 0xE0, 0x1C, 0x1E, 0x01,
6315};
6316
6317static const uint8_t keygen_dsa896_p[] = {
6318 0xCA, 0x16, 0xD2, 0xB2, 0x7C, 0xC5, 0x25, 0x99, 0x3A, 0xCC, 0xCB, 0x3F,
6319 0x72, 0xAE, 0xD4, 0xA0, 0x1E, 0xE0, 0x19, 0x6A, 0x8A, 0xC2, 0xFC, 0xD5,
6320 0xB2, 0xCC, 0xD1, 0x6F, 0xA3, 0x95, 0x30, 0xEC, 0x2B, 0x4A, 0x46, 0x6C,
6321 0x72, 0xC3, 0x31, 0xFD, 0x94, 0x00, 0x55, 0xE7, 0x03, 0xC3, 0xDE, 0xD7,
6322 0xE3, 0xF8, 0xAF, 0x32, 0x0A, 0x29, 0x32, 0xC5, 0x97, 0x93, 0x2A, 0xE6,
6323 0xC6, 0x82, 0x49, 0x5C, 0x76, 0xB3, 0xCB, 0x47, 0xD7, 0xFF, 0xEA, 0xE5,
6324 0x47, 0x87, 0x08, 0x6C, 0xEA, 0x6D, 0x1A, 0xF6, 0x47, 0xBA, 0xE3, 0x94,
6325 0xE9, 0xFE, 0xF6, 0x06, 0xA1, 0x99, 0xDC, 0xCB, 0x3D, 0x7A, 0x06, 0x31,
6326 0xAC, 0x25, 0xD3, 0x3C, 0x35, 0xAD, 0x36, 0x8D, 0x25, 0x41, 0xE9, 0x21,
6327 0xD1, 0xF9, 0xC3, 0xC9,
6328};
6329
6330static const uint8_t keygen_dsa896_q[] = {
6331 0xAE, 0x42, 0x0A, 0x1D, 0x76, 0xA9, 0xFB, 0xF1, 0xCB, 0x2D, 0x73, 0x35,
6332 0x3F, 0x98, 0x63, 0x34, 0xE1, 0xCD, 0x3C, 0xCF,
6333};
6334
6335static const uint8_t keygen_dsa896_g[] = {
6336 0x12, 0xD0, 0x15, 0x32, 0x0B, 0x7D, 0xE3, 0xD0, 0x36, 0x51, 0x79, 0x3E,
6337 0xB4, 0x4E, 0xE2, 0x1E, 0x5E, 0x3E, 0x43, 0x4C, 0x5D, 0x49, 0x9D, 0xD4,
6338 0xA3, 0xE3, 0xC8, 0x1F, 0x46, 0xA2, 0xCE, 0x95, 0xF9, 0x8D, 0xFC, 0xFD,
6339 0x50, 0x48, 0xBF, 0xB5, 0x25, 0xB6, 0xFD, 0xF9, 0xF1, 0x97, 0xD5, 0x82,
6340 0xEE, 0xE7, 0xDF, 0xC6, 0xDD, 0x09, 0x96, 0x15, 0xC0, 0x95, 0x60, 0xF4,
6341 0x53, 0xF6, 0x19, 0xA4, 0x84, 0x53, 0xE4, 0x87, 0xB6, 0x0C, 0x6C, 0x01,
6342 0x31, 0x72, 0x56, 0xA4, 0x2E, 0x25, 0xFC, 0x46, 0xB0, 0x47, 0xF3, 0x5A,
6343 0x90, 0x69, 0xAC, 0x64, 0x02, 0xCB, 0x1F, 0x5F, 0x10, 0x70, 0x2B, 0x71,
6344 0xF7, 0x9B, 0x70, 0x22, 0x7F, 0x05, 0xEB, 0xCB, 0x6D, 0x66, 0xDE, 0xFC,
6345 0xED, 0x51, 0xC2, 0x4D,
6346};
6347
6348static const uint8_t keygen_dsa960_p[] = {
6349 0xCA, 0x86, 0x31, 0x0C, 0x62, 0xC7, 0x25, 0x2F, 0xAA, 0x8D, 0xA5, 0x51,
6350 0x97, 0x81, 0xB8, 0xC5, 0xFD, 0xDB, 0x47, 0xC4, 0x8E, 0xDF, 0x06, 0xAA,
6351 0x76, 0xAD, 0x47, 0xDD, 0x56, 0x6C, 0x97, 0xEB, 0x8C, 0xEC, 0x59, 0x79,
6352 0x1B, 0xBF, 0x96, 0x80, 0x50, 0x72, 0x8E, 0x2F, 0x34, 0x71, 0x5B, 0x03,
6353 0x2D, 0xB0, 0x31, 0x37, 0x8C, 0xC4, 0x62, 0x99, 0x9D, 0xC2, 0xDF, 0x68,
6354 0x35, 0xD5, 0x3F, 0xC1, 0x4B, 0xC4, 0x2F, 0xFA, 0xBD, 0x7E, 0xA5, 0x20,
6355 0x8F, 0xB9, 0x5F, 0x98, 0xA9, 0x1B, 0xAF, 0x8A, 0xF8, 0x29, 0xEB, 0x44,
6356 0xB6, 0x50, 0x96, 0xE2, 0xB4, 0x3D, 0x3C, 0xE6, 0x8B, 0xD5, 0x15, 0x39,
6357 0x4F, 0xF4, 0xC3, 0x32, 0xD3, 0xE6, 0x36, 0x0D, 0x23, 0xFF, 0x76, 0x15,
6358 0x05, 0xC1, 0xDF, 0xC2, 0x82, 0xCE, 0xDD, 0x60, 0x05, 0x92, 0x56, 0xE5,
6359};
6360
6361static const uint8_t keygen_dsa960_q[] = {
6362 0xCE, 0x0A, 0x68, 0xA4, 0xAC, 0x5E, 0x8E, 0x4C, 0xA6, 0x8A, 0xAB, 0xA9,
6363 0x39, 0xC7, 0xB4, 0x10, 0xCC, 0xF6, 0x1E, 0x2F,
6364};
6365
6366static const uint8_t keygen_dsa960_g[] = {
6367 0x8A, 0x50, 0x28, 0x45, 0x69, 0x0E, 0x55, 0xB8, 0x86, 0xB5, 0xCB, 0xBC,
6368 0x49, 0x8D, 0x73, 0x79, 0xE3, 0x26, 0x4E, 0x90, 0x71, 0xF2, 0xBB, 0x50,
6369 0x18, 0xF8, 0x6D, 0x14, 0x8F, 0xCA, 0x20, 0xF7, 0x02, 0x31, 0x71, 0x8A,
6370 0x7E, 0xF0, 0xFE, 0x9C, 0xAD, 0x05, 0x5E, 0x11, 0xB3, 0x40, 0x66, 0xE1,
6371 0x2B, 0x0D, 0x84, 0x15, 0x18, 0x65, 0x00, 0xFA, 0x0D, 0x8A, 0x87, 0xC9,
6372 0xBF, 0x4A, 0x5C, 0x53, 0x29, 0xEB, 0x44, 0xCA, 0xAE, 0x86, 0x50, 0x3B,
6373 0xBB, 0x73, 0x06, 0x83, 0x72, 0x77, 0x17, 0xDB, 0x6E, 0x14, 0xAD, 0xCE,
6374 0xD2, 0x51, 0xE6, 0x1F, 0xA2, 0x64, 0xE4, 0x5F, 0x35, 0x7D, 0x7A, 0xBE,
6375 0x55, 0x9B, 0xB6, 0x0F, 0x3C, 0xA1, 0xD2, 0x45, 0xDD, 0xF8, 0xC4, 0x03,
6376 0x45, 0xAA, 0x12, 0xE4, 0x90, 0x8C, 0xAC, 0x04, 0x45, 0x74, 0x11, 0x28,
6377};
6378
6379static const uint8_t keygen_dsa1024_p[] = {
6380 0xAF, 0xA6, 0x9C, 0x37, 0x47, 0xD4, 0x65, 0xA6, 0xB1, 0x8D, 0xAC, 0x2E,
6381 0xAB, 0xD5, 0x36, 0xCC, 0x83, 0x47, 0xDD, 0xB6, 0x12, 0xCC, 0x93, 0xA5,
6382 0xBF, 0x7B, 0x24, 0xE7, 0x4A, 0xED, 0xEC, 0x63, 0x9E, 0x0B, 0x2D, 0xF8,
6383 0xB3, 0x6B, 0xBB, 0xF9, 0x40, 0x8D, 0x56, 0x26, 0x60, 0xD0, 0xDD, 0x03,
6384 0xF8, 0xC3, 0x82, 0x00, 0x2C, 0x27, 0x82, 0x5E, 0x30, 0x8B, 0x9D, 0xF1,
6385 0xF7, 0xB2, 0x61, 0x01, 0x31, 0x30, 0xF3, 0x05, 0x2F, 0xF4, 0xB7, 0x1C,
6386 0x1C, 0x3C, 0xB0, 0x2D, 0x2F, 0x1F, 0xE6, 0x2E, 0x21, 0x81, 0x0D, 0xFD,
6387 0x66, 0x36, 0x90, 0x39, 0x4D, 0xA0, 0xCF, 0xFA, 0xDD, 0xF7, 0xD5, 0xE4,
6388 0x09, 0xAA, 0x45, 0xDB, 0xE1, 0x55, 0x39, 0xD9, 0xF7, 0xDF, 0x34, 0x67,
6389 0xBF, 0x95, 0x9B, 0xF2, 0x4A, 0x15, 0x42, 0x6F, 0x32, 0x1F, 0xDE, 0xA6,
6390 0xFE, 0x18, 0x46, 0x6B, 0x8C, 0x4E, 0x01, 0x7F,
6391};
6392
6393static const uint8_t keygen_dsa1024_q[] = {
6394 0xCC, 0x18, 0x69, 0xCE, 0x9E, 0x92, 0xE7, 0xCD, 0xBF, 0x94, 0xB5, 0xAD,
6395 0x83, 0x5A, 0x56, 0xD6, 0x4E, 0xC4, 0xF7, 0xED,
6396};
6397
6398static const uint8_t keygen_dsa1024_g[] = {
6399 0x14, 0x1D, 0x91, 0xAB, 0x8F, 0xFF, 0xFB, 0x2D, 0xD3, 0x2A, 0x43, 0xB5,
6400 0x01, 0x40, 0xA4, 0xC7, 0x48, 0x0E, 0xE0, 0x10, 0xA9, 0xF7, 0x8B, 0x7E,
6401 0x45, 0x90, 0xE0, 0x17, 0xC1, 0xB4, 0xE9, 0xBA, 0xC0, 0x04, 0xEF, 0x0F,
6402 0xD6, 0x07, 0x78, 0x05, 0x25, 0xCF, 0x9D, 0x39, 0x66, 0x59, 0x53, 0xF8,
6403 0xCE, 0x1C, 0x61, 0x1B, 0x7F, 0x95, 0x9B, 0xD5, 0xB6, 0xF9, 0xC7, 0xE3,
6404 0xB8, 0x00, 0x78, 0x50, 0xE3, 0x4C, 0x76, 0xF8, 0x0E, 0x96, 0x11, 0xDB,
6405 0x28, 0x53, 0xA5, 0xBB, 0x22, 0xC5, 0x71, 0x97, 0x09, 0xBC, 0xEE, 0x55,
6406 0x9B, 0x6B, 0x22, 0x64, 0xE4, 0x49, 0x2C, 0xCD, 0x9E, 0xA5, 0x86, 0xF0,
6407 0x3F, 0x08, 0xCD, 0x88, 0x07, 0xF6, 0x6E, 0x3F, 0x8E, 0x99, 0x31, 0xBA,
6408 0x1A, 0xB9, 0x8E, 0xEC, 0xA3, 0x13, 0xC2, 0x85, 0xA5, 0xDC, 0xA4, 0xF0,
6409 0x1F, 0xB2, 0xC8, 0xD5, 0x19, 0x79, 0xCA, 0x6A,
6410};
6411
6412/* derive key test data, taken from GP test specifikation */
6413static const uint8_t derive_key_dh_prime[] = {
6414 0xe0, 0x01, 0xe8, 0x96, 0x7d, 0xb4, 0x93, 0x53, 0xe1, 0x6f, 0x8e, 0x89,
6415 0x22, 0x0c, 0xce, 0xfc, 0x5c, 0x5f, 0x12, 0xe3, 0xdf, 0xf8, 0xf1, 0xd1,
6416 0x49, 0x90, 0x12, 0xe6, 0xef, 0x53, 0xe3, 0x1f, 0x02, 0xea, 0xcc, 0x5a,
6417 0xdd, 0xf3, 0x37, 0x89, 0x35, 0xc9, 0x5b, 0x21, 0xea, 0x3d, 0x6f, 0x1c,
6418 0xd7, 0xce, 0x63, 0x75, 0x52, 0xec, 0x38, 0x6c, 0x0e, 0x34, 0xf7, 0x36,
6419 0xad, 0x95, 0x17, 0xef, 0xfe, 0x5e, 0x4d, 0xa7, 0xa8, 0x6a, 0xf9, 0x0e,
6420 0x2c, 0x22, 0x8f, 0xe4, 0xb9, 0xe6, 0xd8, 0xf8, 0xf0, 0x2d, 0x20, 0xaf,
6421 0x78, 0xab, 0xb6, 0x92, 0xac, 0xbc, 0x4b, 0x23, 0xfa, 0xf2, 0xc5, 0xcc,
6422 0xd4, 0x9a, 0x0c, 0x9a, 0x8b, 0xcd, 0x91, 0xac, 0x0c, 0x55, 0x92, 0x01,
6423 0xe6, 0xc2, 0xfd, 0x1f, 0x47, 0xc2, 0xcb, 0x2a, 0x88, 0xa8, 0x3c, 0x21,
6424 0x0f, 0xc0, 0x54, 0xdb, 0x29, 0x2d, 0xbc, 0x45
6425};
6426
6427static const uint8_t derive_key_dh_base[] = {
6428 0x1c, 0xe0, 0xf6, 0x69, 0x26, 0x46, 0x11, 0x97, 0xef, 0x45, 0xc4, 0x65,
6429 0x8b, 0x83, 0xb8, 0xab
6430};
6431
6432static const uint8_t derive_key_dh_public_value[] = {
6433 0xbb, 0xe9, 0x18, 0xdd, 0x4b, 0x2b, 0x94, 0x1b, 0x10, 0x0e, 0x88, 0x35,
6434 0x28, 0x68, 0xfc, 0x62, 0x04, 0x38, 0xa6, 0xdb, 0x32, 0xa6, 0x9e, 0xee,
6435 0x6c, 0x6f, 0x45, 0x1c, 0xa3, 0xa6, 0xd5, 0x37, 0x77, 0x75, 0x5b, 0xc1,
6436 0x37, 0x0a, 0xce, 0xfe, 0x2b, 0x8f, 0x13, 0xa9, 0x14, 0x2c, 0x5b, 0x44,
6437 0x15, 0x78, 0x86, 0x30, 0xd6, 0x95, 0xb1, 0x92, 0x20, 0x63, 0xa3, 0xcf,
6438 0x9d, 0xef, 0x65, 0x61, 0x27, 0x4d, 0x24, 0x01, 0xe7, 0xa1, 0x45, 0xf2,
6439 0xd8, 0xb9, 0x3a, 0x45, 0x17, 0xf4, 0x19, 0xd0, 0x5e, 0xf8, 0xcb, 0x35,
6440 0x59, 0x37, 0x9d, 0x04, 0x20, 0xa3, 0xbf, 0x02, 0xad, 0xfe, 0xa8, 0x60,
6441 0xb2, 0xc3, 0xee, 0x85, 0x58, 0x90, 0xf3, 0xb5, 0x57, 0x2b, 0xb4, 0xef,
6442 0xd7, 0x8f, 0x37, 0x68, 0x78, 0x7c, 0x71, 0x52, 0x9d, 0x5e, 0x0a, 0x61,
6443 0x4f, 0x09, 0x89, 0x92, 0x39, 0xf7, 0x4b, 0x01
6444};
6445
6446static const uint8_t derive_key_dh_private_value[] = {
6447 0x53, 0x8d, 0x3d, 0x64, 0x27, 0x4a, 0x40, 0x05, 0x9b, 0x9c, 0x26, 0xe9,
6448 0x13, 0xe6, 0x91, 0x53, 0x23, 0x7b, 0x55, 0x83
6449};
6450
6451static const uint8_t derive_key_dh_public_value_2[] = {
6452 0xa3, 0xf5, 0x7d, 0xbe, 0x9e, 0x2f, 0x0a, 0xda, 0xa9, 0x4e, 0x4e, 0x6a,
6453 0xf0, 0xe0, 0x71, 0x47, 0x0e, 0x2e, 0x41, 0x2e, 0xde, 0x73, 0x2a, 0x62,
6454 0x14, 0xc3, 0x7c, 0x26, 0xd4, 0xe9, 0x9a, 0x54, 0xba, 0x3d, 0xe7, 0x49,
6455 0x85, 0x95, 0x0e, 0xe9, 0x14, 0xb2, 0x90, 0x22, 0x91, 0xdc, 0xff, 0x61,
6456 0xb2, 0xfc, 0xd1, 0xd0, 0x1b, 0x11, 0x14, 0xb6, 0x02, 0x64, 0x2b, 0x26,
6457 0x5d, 0x88, 0xea, 0x8d, 0xbb, 0xe2, 0x07, 0x0b, 0x48, 0xfb, 0x01, 0x53,
6458 0x55, 0x1e, 0x59, 0x51, 0x36, 0xf2, 0xf9, 0xd1, 0x97, 0xfb, 0x66, 0x12,
6459 0x84, 0x5d, 0xed, 0xb8, 0x9b, 0x2d, 0x3e, 0x2b, 0x8c, 0xeb, 0x2a, 0x72,
6460 0x40, 0x9d, 0x55, 0x4c, 0xed, 0xeb, 0x55, 0x02, 0xff, 0x8c, 0xb0, 0x2e,
6461 0x03, 0x65, 0x3f, 0x41, 0xb1, 0xac, 0xa3, 0x30, 0x6b, 0xff, 0x6d, 0xf4,
6462 0x6d, 0xe6, 0xe1, 0x0f, 0x86, 0x7c, 0x43, 0x64
6463};
6464
6465static const uint8_t derive_key_dh_shared_secret[] = {
6466 0x4e, 0x6a, 0xcf, 0xfd, 0x7d, 0x14, 0x27, 0x65, 0xeb, 0xf4, 0xc7, 0x12,
6467 0x41, 0x4f, 0xe4, 0xb6, 0xab, 0x95, 0x7f, 0x4c, 0xb4, 0x66, 0xb4, 0x66,
6468 0x01, 0x28, 0x9b, 0xb8, 0x20, 0x60, 0x42, 0x82, 0x72, 0x84, 0x2e, 0xe2,
6469 0x8f, 0x11, 0x3c, 0xd1, 0x1f, 0x39, 0x43, 0x1c, 0xbf, 0xfd, 0x82, 0x32,
6470 0x54, 0xce, 0x47, 0x2e, 0x21, 0x05, 0xe4, 0x9b, 0x3d, 0x7f, 0x11, 0x3b,
6471 0x82, 0x50, 0x76, 0xe6, 0x26, 0x45, 0x85, 0x80, 0x7b, 0xc4, 0x64, 0x54,
6472 0x66, 0x5f, 0x27, 0xc5, 0xe4, 0xe1, 0xa4, 0xbd, 0x03, 0x47, 0x04, 0x86,
6473 0x32, 0x29, 0x81, 0xfd, 0xc8, 0x94, 0xcc, 0xa1, 0xe2, 0x93, 0x09, 0x87,
6474 0xc9, 0x2c, 0x15, 0xa3, 0x8b, 0xc4, 0x2e, 0xb3, 0x88, 0x10, 0xe8, 0x67,
6475 0xc4, 0x43, 0x2f, 0x07, 0x25, 0x9e, 0xc0, 0x0c, 0xdb, 0xbb, 0x0f, 0xb9,
6476 0x9e, 0x17, 0x27, 0xc7, 0x06, 0xda, 0x58, 0xdd
6477};
6478
6479static const uint32_t derive_key_max_keysize = 1024;
6480
Pascal Brand2b92b642015-07-16 13:29:42 +02006481static struct derive_key_ecdh_t {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006482 uint32_t level; /* test suite level */
Pascal Brand2b92b642015-07-16 13:29:42 +02006483 uint32_t algo; /* TEE_ALG_ECDH_P192,... */
6484 uint32_t curve; /* TEE_ECC_CURVE_NIST_P192,... */
6485 uint32_t keysize; /* key size, in bits */
6486 const uint8_t *public_x; /* public key - x == QCAVSx */
6487 const uint8_t *public_y; /* public key - y == QCAVSy */
6488 const uint8_t *private; /* private key == dIUT */
6489 const uint8_t *out; /* expected result - ZIUT */
Ruchika Gupta454b0b62020-10-30 13:23:19 +05306490} const derive_key_ecdh[] = {
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006491 /* [P-192] */
Pascal Brand2b92b642015-07-16 13:29:42 +02006492 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006493 .level = 0,
Pascal Brand2b92b642015-07-16 13:29:42 +02006494 .algo = TEE_ALG_ECDH_P192,
6495 .curve = TEE_ECC_CURVE_NIST_P192,
6496 .keysize = 192,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006497 .public_x = nist_kas_ecc_cdh_testvector_1_public_x,
6498 .public_y = nist_kas_ecc_cdh_testvector_1_public_y,
6499 .private = nist_kas_ecc_cdh_testvector_1_private,
6500 .out = nist_kas_ecc_cdh_testvector_1_out,
6501 },
6502 {
Jens Wiklander6a9d15a2016-02-01 10:29:42 +01006503 .level = 1,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006504 .algo = TEE_ALG_ECDH_P192,
6505 .curve = TEE_ECC_CURVE_NIST_P192,
6506 .keysize = 192,
6507 .public_x = nist_kas_ecc_cdh_testvector_2_public_x,
6508 .public_y = nist_kas_ecc_cdh_testvector_2_public_y,
6509 .private = nist_kas_ecc_cdh_testvector_2_private,
6510 .out = nist_kas_ecc_cdh_testvector_2_out,
6511 },
6512 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006513 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006514 .algo = TEE_ALG_ECDH_P192,
6515 .curve = TEE_ECC_CURVE_NIST_P192,
6516 .keysize = 192,
6517 .public_x = nist_kas_ecc_cdh_testvector_3_public_x,
6518 .public_y = nist_kas_ecc_cdh_testvector_3_public_y,
6519 .private = nist_kas_ecc_cdh_testvector_3_private,
6520 .out = nist_kas_ecc_cdh_testvector_3_out,
6521 },
6522 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006523 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006524 .algo = TEE_ALG_ECDH_P192,
6525 .curve = TEE_ECC_CURVE_NIST_P192,
6526 .keysize = 192,
6527 .public_x = nist_kas_ecc_cdh_testvector_4_public_x,
6528 .public_y = nist_kas_ecc_cdh_testvector_4_public_y,
6529 .private = nist_kas_ecc_cdh_testvector_4_private,
6530 .out = nist_kas_ecc_cdh_testvector_4_out,
6531 },
6532 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006533 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006534 .algo = TEE_ALG_ECDH_P192,
6535 .curve = TEE_ECC_CURVE_NIST_P192,
6536 .keysize = 192,
6537 .public_x = nist_kas_ecc_cdh_testvector_5_public_x,
6538 .public_y = nist_kas_ecc_cdh_testvector_5_public_y,
6539 .private = nist_kas_ecc_cdh_testvector_5_private,
6540 .out = nist_kas_ecc_cdh_testvector_5_out,
6541 },
6542 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006543 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006544 .algo = TEE_ALG_ECDH_P192,
6545 .curve = TEE_ECC_CURVE_NIST_P192,
6546 .keysize = 192,
6547 .public_x = nist_kas_ecc_cdh_testvector_6_public_x,
6548 .public_y = nist_kas_ecc_cdh_testvector_6_public_y,
6549 .private = nist_kas_ecc_cdh_testvector_6_private,
6550 .out = nist_kas_ecc_cdh_testvector_6_out,
6551 },
6552 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006553 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006554 .algo = TEE_ALG_ECDH_P192,
6555 .curve = TEE_ECC_CURVE_NIST_P192,
6556 .keysize = 192,
6557 .public_x = nist_kas_ecc_cdh_testvector_7_public_x,
6558 .public_y = nist_kas_ecc_cdh_testvector_7_public_y,
6559 .private = nist_kas_ecc_cdh_testvector_7_private,
6560 .out = nist_kas_ecc_cdh_testvector_7_out,
6561 },
6562 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006563 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006564 .algo = TEE_ALG_ECDH_P192,
6565 .curve = TEE_ECC_CURVE_NIST_P192,
6566 .keysize = 192,
6567 .public_x = nist_kas_ecc_cdh_testvector_8_public_x,
6568 .public_y = nist_kas_ecc_cdh_testvector_8_public_y,
6569 .private = nist_kas_ecc_cdh_testvector_8_private,
6570 .out = nist_kas_ecc_cdh_testvector_8_out,
6571 },
6572 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006573 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006574 .algo = TEE_ALG_ECDH_P192,
6575 .curve = TEE_ECC_CURVE_NIST_P192,
6576 .keysize = 192,
6577 .public_x = nist_kas_ecc_cdh_testvector_9_public_x,
6578 .public_y = nist_kas_ecc_cdh_testvector_9_public_y,
6579 .private = nist_kas_ecc_cdh_testvector_9_private,
6580 .out = nist_kas_ecc_cdh_testvector_9_out,
6581 },
6582 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006583 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006584 .algo = TEE_ALG_ECDH_P192,
6585 .curve = TEE_ECC_CURVE_NIST_P192,
6586 .keysize = 192,
6587 .public_x = nist_kas_ecc_cdh_testvector_10_public_x,
6588 .public_y = nist_kas_ecc_cdh_testvector_10_public_y,
6589 .private = nist_kas_ecc_cdh_testvector_10_private,
6590 .out = nist_kas_ecc_cdh_testvector_10_out,
6591 },
6592 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006593 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006594 .algo = TEE_ALG_ECDH_P192,
6595 .curve = TEE_ECC_CURVE_NIST_P192,
6596 .keysize = 192,
6597 .public_x = nist_kas_ecc_cdh_testvector_11_public_x,
6598 .public_y = nist_kas_ecc_cdh_testvector_11_public_y,
6599 .private = nist_kas_ecc_cdh_testvector_11_private,
6600 .out = nist_kas_ecc_cdh_testvector_11_out,
6601 },
6602 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006603 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006604 .algo = TEE_ALG_ECDH_P192,
6605 .curve = TEE_ECC_CURVE_NIST_P192,
6606 .keysize = 192,
6607 .public_x = nist_kas_ecc_cdh_testvector_12_public_x,
6608 .public_y = nist_kas_ecc_cdh_testvector_12_public_y,
6609 .private = nist_kas_ecc_cdh_testvector_12_private,
6610 .out = nist_kas_ecc_cdh_testvector_12_out,
6611 },
6612 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006613 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006614 .algo = TEE_ALG_ECDH_P192,
6615 .curve = TEE_ECC_CURVE_NIST_P192,
6616 .keysize = 192,
6617 .public_x = nist_kas_ecc_cdh_testvector_13_public_x,
6618 .public_y = nist_kas_ecc_cdh_testvector_13_public_y,
6619 .private = nist_kas_ecc_cdh_testvector_13_private,
6620 .out = nist_kas_ecc_cdh_testvector_13_out,
6621 },
6622 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006623 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006624 .algo = TEE_ALG_ECDH_P192,
6625 .curve = TEE_ECC_CURVE_NIST_P192,
6626 .keysize = 192,
6627 .public_x = nist_kas_ecc_cdh_testvector_14_public_x,
6628 .public_y = nist_kas_ecc_cdh_testvector_14_public_y,
6629 .private = nist_kas_ecc_cdh_testvector_14_private,
6630 .out = nist_kas_ecc_cdh_testvector_14_out,
6631 },
6632 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006633 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006634 .algo = TEE_ALG_ECDH_P192,
6635 .curve = TEE_ECC_CURVE_NIST_P192,
6636 .keysize = 192,
6637 .public_x = nist_kas_ecc_cdh_testvector_15_public_x,
6638 .public_y = nist_kas_ecc_cdh_testvector_15_public_y,
6639 .private = nist_kas_ecc_cdh_testvector_15_private,
6640 .out = nist_kas_ecc_cdh_testvector_15_out,
6641 },
6642 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006643 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006644 .algo = TEE_ALG_ECDH_P192,
6645 .curve = TEE_ECC_CURVE_NIST_P192,
6646 .keysize = 192,
6647 .public_x = nist_kas_ecc_cdh_testvector_16_public_x,
6648 .public_y = nist_kas_ecc_cdh_testvector_16_public_y,
6649 .private = nist_kas_ecc_cdh_testvector_16_private,
6650 .out = nist_kas_ecc_cdh_testvector_16_out,
6651 },
6652 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006653 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006654 .algo = TEE_ALG_ECDH_P192,
6655 .curve = TEE_ECC_CURVE_NIST_P192,
6656 .keysize = 192,
6657 .public_x = nist_kas_ecc_cdh_testvector_17_public_x,
6658 .public_y = nist_kas_ecc_cdh_testvector_17_public_y,
6659 .private = nist_kas_ecc_cdh_testvector_17_private,
6660 .out = nist_kas_ecc_cdh_testvector_17_out,
6661 },
6662 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006663 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006664 .algo = TEE_ALG_ECDH_P192,
6665 .curve = TEE_ECC_CURVE_NIST_P192,
6666 .keysize = 192,
6667 .public_x = nist_kas_ecc_cdh_testvector_18_public_x,
6668 .public_y = nist_kas_ecc_cdh_testvector_18_public_y,
6669 .private = nist_kas_ecc_cdh_testvector_18_private,
6670 .out = nist_kas_ecc_cdh_testvector_18_out,
6671 },
6672 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006673 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006674 .algo = TEE_ALG_ECDH_P192,
6675 .curve = TEE_ECC_CURVE_NIST_P192,
6676 .keysize = 192,
6677 .public_x = nist_kas_ecc_cdh_testvector_19_public_x,
6678 .public_y = nist_kas_ecc_cdh_testvector_19_public_y,
6679 .private = nist_kas_ecc_cdh_testvector_19_private,
6680 .out = nist_kas_ecc_cdh_testvector_19_out,
6681 },
6682 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006683 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006684 .algo = TEE_ALG_ECDH_P192,
6685 .curve = TEE_ECC_CURVE_NIST_P192,
6686 .keysize = 192,
6687 .public_x = nist_kas_ecc_cdh_testvector_20_public_x,
6688 .public_y = nist_kas_ecc_cdh_testvector_20_public_y,
6689 .private = nist_kas_ecc_cdh_testvector_20_private,
6690 .out = nist_kas_ecc_cdh_testvector_20_out,
6691 },
6692 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006693 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006694 .algo = TEE_ALG_ECDH_P192,
6695 .curve = TEE_ECC_CURVE_NIST_P192,
6696 .keysize = 192,
6697 .public_x = nist_kas_ecc_cdh_testvector_21_public_x,
6698 .public_y = nist_kas_ecc_cdh_testvector_21_public_y,
6699 .private = nist_kas_ecc_cdh_testvector_21_private,
6700 .out = nist_kas_ecc_cdh_testvector_21_out,
6701 },
6702 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006703 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006704 .algo = TEE_ALG_ECDH_P192,
6705 .curve = TEE_ECC_CURVE_NIST_P192,
6706 .keysize = 192,
6707 .public_x = nist_kas_ecc_cdh_testvector_22_public_x,
6708 .public_y = nist_kas_ecc_cdh_testvector_22_public_y,
6709 .private = nist_kas_ecc_cdh_testvector_22_private,
6710 .out = nist_kas_ecc_cdh_testvector_22_out,
6711 },
6712 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006713 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006714 .algo = TEE_ALG_ECDH_P192,
6715 .curve = TEE_ECC_CURVE_NIST_P192,
6716 .keysize = 192,
6717 .public_x = nist_kas_ecc_cdh_testvector_23_public_x,
6718 .public_y = nist_kas_ecc_cdh_testvector_23_public_y,
6719 .private = nist_kas_ecc_cdh_testvector_23_private,
6720 .out = nist_kas_ecc_cdh_testvector_23_out,
6721 },
6722 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006723 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006724 .algo = TEE_ALG_ECDH_P192,
6725 .curve = TEE_ECC_CURVE_NIST_P192,
6726 .keysize = 192,
6727 .public_x = nist_kas_ecc_cdh_testvector_24_public_x,
6728 .public_y = nist_kas_ecc_cdh_testvector_24_public_y,
6729 .private = nist_kas_ecc_cdh_testvector_24_private,
6730 .out = nist_kas_ecc_cdh_testvector_24_out,
6731 },
6732 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006733 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006734 .algo = TEE_ALG_ECDH_P192,
6735 .curve = TEE_ECC_CURVE_NIST_P192,
6736 .keysize = 192,
6737 .public_x = nist_kas_ecc_cdh_testvector_25_public_x,
6738 .public_y = nist_kas_ecc_cdh_testvector_25_public_y,
6739 .private = nist_kas_ecc_cdh_testvector_25_private,
6740 .out = nist_kas_ecc_cdh_testvector_25_out,
6741 },
6742 /* [P-224] */
6743 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006744 .level = 0,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006745 .algo = TEE_ALG_ECDH_P224,
6746 .curve = TEE_ECC_CURVE_NIST_P224,
6747 .keysize = 224,
6748 .public_x = nist_kas_ecc_cdh_testvector_26_public_x,
6749 .public_y = nist_kas_ecc_cdh_testvector_26_public_y,
6750 .private = nist_kas_ecc_cdh_testvector_26_private,
6751 .out = nist_kas_ecc_cdh_testvector_26_out,
Pascal Brand2b92b642015-07-16 13:29:42 +02006752 },
6753 {
Jens Wiklander6a9d15a2016-02-01 10:29:42 +01006754 .level = 1,
Pascal Brand2b92b642015-07-16 13:29:42 +02006755 .algo = TEE_ALG_ECDH_P224,
6756 .curve = TEE_ECC_CURVE_NIST_P224,
6757 .keysize = 224,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006758 .public_x = nist_kas_ecc_cdh_testvector_27_public_x,
6759 .public_y = nist_kas_ecc_cdh_testvector_27_public_y,
6760 .private = nist_kas_ecc_cdh_testvector_27_private,
6761 .out = nist_kas_ecc_cdh_testvector_27_out,
6762 },
6763 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006764 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006765 .algo = TEE_ALG_ECDH_P224,
6766 .curve = TEE_ECC_CURVE_NIST_P224,
6767 .keysize = 224,
6768 .public_x = nist_kas_ecc_cdh_testvector_28_public_x,
6769 .public_y = nist_kas_ecc_cdh_testvector_28_public_y,
6770 .private = nist_kas_ecc_cdh_testvector_28_private,
6771 .out = nist_kas_ecc_cdh_testvector_28_out,
6772 },
6773 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006774 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006775 .algo = TEE_ALG_ECDH_P224,
6776 .curve = TEE_ECC_CURVE_NIST_P224,
6777 .keysize = 224,
6778 .public_x = nist_kas_ecc_cdh_testvector_29_public_x,
6779 .public_y = nist_kas_ecc_cdh_testvector_29_public_y,
6780 .private = nist_kas_ecc_cdh_testvector_29_private,
6781 .out = nist_kas_ecc_cdh_testvector_29_out,
6782 },
6783 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006784 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006785 .algo = TEE_ALG_ECDH_P224,
6786 .curve = TEE_ECC_CURVE_NIST_P224,
6787 .keysize = 224,
6788 .public_x = nist_kas_ecc_cdh_testvector_30_public_x,
6789 .public_y = nist_kas_ecc_cdh_testvector_30_public_y,
6790 .private = nist_kas_ecc_cdh_testvector_30_private,
6791 .out = nist_kas_ecc_cdh_testvector_30_out,
6792 },
6793 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006794 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006795 .algo = TEE_ALG_ECDH_P224,
6796 .curve = TEE_ECC_CURVE_NIST_P224,
6797 .keysize = 224,
6798 .public_x = nist_kas_ecc_cdh_testvector_31_public_x,
6799 .public_y = nist_kas_ecc_cdh_testvector_31_public_y,
6800 .private = nist_kas_ecc_cdh_testvector_31_private,
6801 .out = nist_kas_ecc_cdh_testvector_31_out,
6802 },
6803 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006804 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006805 .algo = TEE_ALG_ECDH_P224,
6806 .curve = TEE_ECC_CURVE_NIST_P224,
6807 .keysize = 224,
6808 .public_x = nist_kas_ecc_cdh_testvector_32_public_x,
6809 .public_y = nist_kas_ecc_cdh_testvector_32_public_y,
6810 .private = nist_kas_ecc_cdh_testvector_32_private,
6811 .out = nist_kas_ecc_cdh_testvector_32_out,
6812 },
6813 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006814 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006815 .algo = TEE_ALG_ECDH_P224,
6816 .curve = TEE_ECC_CURVE_NIST_P224,
6817 .keysize = 224,
6818 .public_x = nist_kas_ecc_cdh_testvector_33_public_x,
6819 .public_y = nist_kas_ecc_cdh_testvector_33_public_y,
6820 .private = nist_kas_ecc_cdh_testvector_33_private,
6821 .out = nist_kas_ecc_cdh_testvector_33_out,
6822 },
6823 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006824 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006825 .algo = TEE_ALG_ECDH_P224,
6826 .curve = TEE_ECC_CURVE_NIST_P224,
6827 .keysize = 224,
6828 .public_x = nist_kas_ecc_cdh_testvector_34_public_x,
6829 .public_y = nist_kas_ecc_cdh_testvector_34_public_y,
6830 .private = nist_kas_ecc_cdh_testvector_34_private,
6831 .out = nist_kas_ecc_cdh_testvector_34_out,
6832 },
6833 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006834 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006835 .algo = TEE_ALG_ECDH_P224,
6836 .curve = TEE_ECC_CURVE_NIST_P224,
6837 .keysize = 224,
6838 .public_x = nist_kas_ecc_cdh_testvector_35_public_x,
6839 .public_y = nist_kas_ecc_cdh_testvector_35_public_y,
6840 .private = nist_kas_ecc_cdh_testvector_35_private,
6841 .out = nist_kas_ecc_cdh_testvector_35_out,
6842 },
6843 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006844 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006845 .algo = TEE_ALG_ECDH_P224,
6846 .curve = TEE_ECC_CURVE_NIST_P224,
6847 .keysize = 224,
6848 .public_x = nist_kas_ecc_cdh_testvector_36_public_x,
6849 .public_y = nist_kas_ecc_cdh_testvector_36_public_y,
6850 .private = nist_kas_ecc_cdh_testvector_36_private,
6851 .out = nist_kas_ecc_cdh_testvector_36_out,
6852 },
6853 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006854 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006855 .algo = TEE_ALG_ECDH_P224,
6856 .curve = TEE_ECC_CURVE_NIST_P224,
6857 .keysize = 224,
6858 .public_x = nist_kas_ecc_cdh_testvector_37_public_x,
6859 .public_y = nist_kas_ecc_cdh_testvector_37_public_y,
6860 .private = nist_kas_ecc_cdh_testvector_37_private,
6861 .out = nist_kas_ecc_cdh_testvector_37_out,
6862 },
6863 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006864 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006865 .algo = TEE_ALG_ECDH_P224,
6866 .curve = TEE_ECC_CURVE_NIST_P224,
6867 .keysize = 224,
6868 .public_x = nist_kas_ecc_cdh_testvector_38_public_x,
6869 .public_y = nist_kas_ecc_cdh_testvector_38_public_y,
6870 .private = nist_kas_ecc_cdh_testvector_38_private,
6871 .out = nist_kas_ecc_cdh_testvector_38_out,
6872 },
6873 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006874 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006875 .algo = TEE_ALG_ECDH_P224,
6876 .curve = TEE_ECC_CURVE_NIST_P224,
6877 .keysize = 224,
6878 .public_x = nist_kas_ecc_cdh_testvector_39_public_x,
6879 .public_y = nist_kas_ecc_cdh_testvector_39_public_y,
6880 .private = nist_kas_ecc_cdh_testvector_39_private,
6881 .out = nist_kas_ecc_cdh_testvector_39_out,
6882 },
6883 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006884 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006885 .algo = TEE_ALG_ECDH_P224,
6886 .curve = TEE_ECC_CURVE_NIST_P224,
6887 .keysize = 224,
6888 .public_x = nist_kas_ecc_cdh_testvector_40_public_x,
6889 .public_y = nist_kas_ecc_cdh_testvector_40_public_y,
6890 .private = nist_kas_ecc_cdh_testvector_40_private,
6891 .out = nist_kas_ecc_cdh_testvector_40_out,
6892 },
6893 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006894 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006895 .algo = TEE_ALG_ECDH_P224,
6896 .curve = TEE_ECC_CURVE_NIST_P224,
6897 .keysize = 224,
6898 .public_x = nist_kas_ecc_cdh_testvector_41_public_x,
6899 .public_y = nist_kas_ecc_cdh_testvector_41_public_y,
6900 .private = nist_kas_ecc_cdh_testvector_41_private,
6901 .out = nist_kas_ecc_cdh_testvector_41_out,
6902 },
6903 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006904 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006905 .algo = TEE_ALG_ECDH_P224,
6906 .curve = TEE_ECC_CURVE_NIST_P224,
6907 .keysize = 224,
6908 .public_x = nist_kas_ecc_cdh_testvector_42_public_x,
6909 .public_y = nist_kas_ecc_cdh_testvector_42_public_y,
6910 .private = nist_kas_ecc_cdh_testvector_42_private,
6911 .out = nist_kas_ecc_cdh_testvector_42_out,
6912 },
6913 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006914 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006915 .algo = TEE_ALG_ECDH_P224,
6916 .curve = TEE_ECC_CURVE_NIST_P224,
6917 .keysize = 224,
6918 .public_x = nist_kas_ecc_cdh_testvector_43_public_x,
6919 .public_y = nist_kas_ecc_cdh_testvector_43_public_y,
6920 .private = nist_kas_ecc_cdh_testvector_43_private,
6921 .out = nist_kas_ecc_cdh_testvector_43_out,
6922 },
6923 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006924 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006925 .algo = TEE_ALG_ECDH_P224,
6926 .curve = TEE_ECC_CURVE_NIST_P224,
6927 .keysize = 224,
6928 .public_x = nist_kas_ecc_cdh_testvector_44_public_x,
6929 .public_y = nist_kas_ecc_cdh_testvector_44_public_y,
6930 .private = nist_kas_ecc_cdh_testvector_44_private,
6931 .out = nist_kas_ecc_cdh_testvector_44_out,
6932 },
6933 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006934 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006935 .algo = TEE_ALG_ECDH_P224,
6936 .curve = TEE_ECC_CURVE_NIST_P224,
6937 .keysize = 224,
6938 .public_x = nist_kas_ecc_cdh_testvector_45_public_x,
6939 .public_y = nist_kas_ecc_cdh_testvector_45_public_y,
6940 .private = nist_kas_ecc_cdh_testvector_45_private,
6941 .out = nist_kas_ecc_cdh_testvector_45_out,
6942 },
6943 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006944 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006945 .algo = TEE_ALG_ECDH_P224,
6946 .curve = TEE_ECC_CURVE_NIST_P224,
6947 .keysize = 224,
6948 .public_x = nist_kas_ecc_cdh_testvector_46_public_x,
6949 .public_y = nist_kas_ecc_cdh_testvector_46_public_y,
6950 .private = nist_kas_ecc_cdh_testvector_46_private,
6951 .out = nist_kas_ecc_cdh_testvector_46_out,
6952 },
6953 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006954 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006955 .algo = TEE_ALG_ECDH_P224,
6956 .curve = TEE_ECC_CURVE_NIST_P224,
6957 .keysize = 224,
6958 .public_x = nist_kas_ecc_cdh_testvector_47_public_x,
6959 .public_y = nist_kas_ecc_cdh_testvector_47_public_y,
6960 .private = nist_kas_ecc_cdh_testvector_47_private,
6961 .out = nist_kas_ecc_cdh_testvector_47_out,
6962 },
6963 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006964 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006965 .algo = TEE_ALG_ECDH_P224,
6966 .curve = TEE_ECC_CURVE_NIST_P224,
6967 .keysize = 224,
6968 .public_x = nist_kas_ecc_cdh_testvector_48_public_x,
6969 .public_y = nist_kas_ecc_cdh_testvector_48_public_y,
6970 .private = nist_kas_ecc_cdh_testvector_48_private,
6971 .out = nist_kas_ecc_cdh_testvector_48_out,
6972 },
6973 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006974 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006975 .algo = TEE_ALG_ECDH_P224,
6976 .curve = TEE_ECC_CURVE_NIST_P224,
6977 .keysize = 224,
6978 .public_x = nist_kas_ecc_cdh_testvector_49_public_x,
6979 .public_y = nist_kas_ecc_cdh_testvector_49_public_y,
6980 .private = nist_kas_ecc_cdh_testvector_49_private,
6981 .out = nist_kas_ecc_cdh_testvector_49_out,
6982 },
6983 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006984 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006985 .algo = TEE_ALG_ECDH_P224,
6986 .curve = TEE_ECC_CURVE_NIST_P224,
6987 .keysize = 224,
6988 .public_x = nist_kas_ecc_cdh_testvector_50_public_x,
6989 .public_y = nist_kas_ecc_cdh_testvector_50_public_y,
6990 .private = nist_kas_ecc_cdh_testvector_50_private,
6991 .out = nist_kas_ecc_cdh_testvector_50_out,
6992 },
6993 /* [P-256] */
6994 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02006995 .level = 0,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02006996 .algo = TEE_ALG_ECDH_P256,
6997 .curve = TEE_ECC_CURVE_NIST_P256,
6998 .keysize = 256,
6999 .public_x = nist_kas_ecc_cdh_testvector_51_public_x,
7000 .public_y = nist_kas_ecc_cdh_testvector_51_public_y,
7001 .private = nist_kas_ecc_cdh_testvector_51_private,
7002 .out = nist_kas_ecc_cdh_testvector_51_out,
Pascal Brand2b92b642015-07-16 13:29:42 +02007003 },
7004 {
Jens Wiklander6a9d15a2016-02-01 10:29:42 +01007005 .level = 1,
Pascal Brand2b92b642015-07-16 13:29:42 +02007006 .algo = TEE_ALG_ECDH_P256,
7007 .curve = TEE_ECC_CURVE_NIST_P256,
7008 .keysize = 256,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007009 .public_x = nist_kas_ecc_cdh_testvector_52_public_x,
7010 .public_y = nist_kas_ecc_cdh_testvector_52_public_y,
7011 .private = nist_kas_ecc_cdh_testvector_52_private,
7012 .out = nist_kas_ecc_cdh_testvector_52_out,
7013 },
7014 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007015 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007016 .algo = TEE_ALG_ECDH_P256,
7017 .curve = TEE_ECC_CURVE_NIST_P256,
7018 .keysize = 256,
7019 .public_x = nist_kas_ecc_cdh_testvector_53_public_x,
7020 .public_y = nist_kas_ecc_cdh_testvector_53_public_y,
7021 .private = nist_kas_ecc_cdh_testvector_53_private,
7022 .out = nist_kas_ecc_cdh_testvector_53_out,
7023 },
7024 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007025 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007026 .algo = TEE_ALG_ECDH_P256,
7027 .curve = TEE_ECC_CURVE_NIST_P256,
7028 .keysize = 256,
7029 .public_x = nist_kas_ecc_cdh_testvector_54_public_x,
7030 .public_y = nist_kas_ecc_cdh_testvector_54_public_y,
7031 .private = nist_kas_ecc_cdh_testvector_54_private,
7032 .out = nist_kas_ecc_cdh_testvector_54_out,
7033 },
7034 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007035 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007036 .algo = TEE_ALG_ECDH_P256,
7037 .curve = TEE_ECC_CURVE_NIST_P256,
7038 .keysize = 256,
7039 .public_x = nist_kas_ecc_cdh_testvector_55_public_x,
7040 .public_y = nist_kas_ecc_cdh_testvector_55_public_y,
7041 .private = nist_kas_ecc_cdh_testvector_55_private,
7042 .out = nist_kas_ecc_cdh_testvector_55_out,
7043 },
7044 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007045 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007046 .algo = TEE_ALG_ECDH_P256,
7047 .curve = TEE_ECC_CURVE_NIST_P256,
7048 .keysize = 256,
7049 .public_x = nist_kas_ecc_cdh_testvector_56_public_x,
7050 .public_y = nist_kas_ecc_cdh_testvector_56_public_y,
7051 .private = nist_kas_ecc_cdh_testvector_56_private,
7052 .out = nist_kas_ecc_cdh_testvector_56_out,
7053 },
7054 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007055 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007056 .algo = TEE_ALG_ECDH_P256,
7057 .curve = TEE_ECC_CURVE_NIST_P256,
7058 .keysize = 256,
7059 .public_x = nist_kas_ecc_cdh_testvector_57_public_x,
7060 .public_y = nist_kas_ecc_cdh_testvector_57_public_y,
7061 .private = nist_kas_ecc_cdh_testvector_57_private,
7062 .out = nist_kas_ecc_cdh_testvector_57_out,
7063 },
7064 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007065 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007066 .algo = TEE_ALG_ECDH_P256,
7067 .curve = TEE_ECC_CURVE_NIST_P256,
7068 .keysize = 256,
7069 .public_x = nist_kas_ecc_cdh_testvector_58_public_x,
7070 .public_y = nist_kas_ecc_cdh_testvector_58_public_y,
7071 .private = nist_kas_ecc_cdh_testvector_58_private,
7072 .out = nist_kas_ecc_cdh_testvector_58_out,
7073 },
7074 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007075 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007076 .algo = TEE_ALG_ECDH_P256,
7077 .curve = TEE_ECC_CURVE_NIST_P256,
7078 .keysize = 256,
7079 .public_x = nist_kas_ecc_cdh_testvector_59_public_x,
7080 .public_y = nist_kas_ecc_cdh_testvector_59_public_y,
7081 .private = nist_kas_ecc_cdh_testvector_59_private,
7082 .out = nist_kas_ecc_cdh_testvector_59_out,
7083 },
7084 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007085 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007086 .algo = TEE_ALG_ECDH_P256,
7087 .curve = TEE_ECC_CURVE_NIST_P256,
7088 .keysize = 256,
7089 .public_x = nist_kas_ecc_cdh_testvector_60_public_x,
7090 .public_y = nist_kas_ecc_cdh_testvector_60_public_y,
7091 .private = nist_kas_ecc_cdh_testvector_60_private,
7092 .out = nist_kas_ecc_cdh_testvector_60_out,
7093 },
7094 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007095 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007096 .algo = TEE_ALG_ECDH_P256,
7097 .curve = TEE_ECC_CURVE_NIST_P256,
7098 .keysize = 256,
7099 .public_x = nist_kas_ecc_cdh_testvector_61_public_x,
7100 .public_y = nist_kas_ecc_cdh_testvector_61_public_y,
7101 .private = nist_kas_ecc_cdh_testvector_61_private,
7102 .out = nist_kas_ecc_cdh_testvector_61_out,
7103 },
7104 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007105 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007106 .algo = TEE_ALG_ECDH_P256,
7107 .curve = TEE_ECC_CURVE_NIST_P256,
7108 .keysize = 256,
7109 .public_x = nist_kas_ecc_cdh_testvector_62_public_x,
7110 .public_y = nist_kas_ecc_cdh_testvector_62_public_y,
7111 .private = nist_kas_ecc_cdh_testvector_62_private,
7112 .out = nist_kas_ecc_cdh_testvector_62_out,
7113 },
7114 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007115 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007116 .algo = TEE_ALG_ECDH_P256,
7117 .curve = TEE_ECC_CURVE_NIST_P256,
7118 .keysize = 256,
7119 .public_x = nist_kas_ecc_cdh_testvector_63_public_x,
7120 .public_y = nist_kas_ecc_cdh_testvector_63_public_y,
7121 .private = nist_kas_ecc_cdh_testvector_63_private,
7122 .out = nist_kas_ecc_cdh_testvector_63_out,
7123 },
7124 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007125 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007126 .algo = TEE_ALG_ECDH_P256,
7127 .curve = TEE_ECC_CURVE_NIST_P256,
7128 .keysize = 256,
7129 .public_x = nist_kas_ecc_cdh_testvector_64_public_x,
7130 .public_y = nist_kas_ecc_cdh_testvector_64_public_y,
7131 .private = nist_kas_ecc_cdh_testvector_64_private,
7132 .out = nist_kas_ecc_cdh_testvector_64_out,
7133 },
7134 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007135 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007136 .algo = TEE_ALG_ECDH_P256,
7137 .curve = TEE_ECC_CURVE_NIST_P256,
7138 .keysize = 256,
7139 .public_x = nist_kas_ecc_cdh_testvector_65_public_x,
7140 .public_y = nist_kas_ecc_cdh_testvector_65_public_y,
7141 .private = nist_kas_ecc_cdh_testvector_65_private,
7142 .out = nist_kas_ecc_cdh_testvector_65_out,
7143 },
7144 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007145 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007146 .algo = TEE_ALG_ECDH_P256,
7147 .curve = TEE_ECC_CURVE_NIST_P256,
7148 .keysize = 256,
7149 .public_x = nist_kas_ecc_cdh_testvector_66_public_x,
7150 .public_y = nist_kas_ecc_cdh_testvector_66_public_y,
7151 .private = nist_kas_ecc_cdh_testvector_66_private,
7152 .out = nist_kas_ecc_cdh_testvector_66_out,
7153 },
7154 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007155 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007156 .algo = TEE_ALG_ECDH_P256,
7157 .curve = TEE_ECC_CURVE_NIST_P256,
7158 .keysize = 256,
7159 .public_x = nist_kas_ecc_cdh_testvector_67_public_x,
7160 .public_y = nist_kas_ecc_cdh_testvector_67_public_y,
7161 .private = nist_kas_ecc_cdh_testvector_67_private,
7162 .out = nist_kas_ecc_cdh_testvector_67_out,
7163 },
7164 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007165 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007166 .algo = TEE_ALG_ECDH_P256,
7167 .curve = TEE_ECC_CURVE_NIST_P256,
7168 .keysize = 256,
7169 .public_x = nist_kas_ecc_cdh_testvector_68_public_x,
7170 .public_y = nist_kas_ecc_cdh_testvector_68_public_y,
7171 .private = nist_kas_ecc_cdh_testvector_68_private,
7172 .out = nist_kas_ecc_cdh_testvector_68_out,
7173 },
7174 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007175 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007176 .algo = TEE_ALG_ECDH_P256,
7177 .curve = TEE_ECC_CURVE_NIST_P256,
7178 .keysize = 256,
7179 .public_x = nist_kas_ecc_cdh_testvector_69_public_x,
7180 .public_y = nist_kas_ecc_cdh_testvector_69_public_y,
7181 .private = nist_kas_ecc_cdh_testvector_69_private,
7182 .out = nist_kas_ecc_cdh_testvector_69_out,
7183 },
7184 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007185 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007186 .algo = TEE_ALG_ECDH_P256,
7187 .curve = TEE_ECC_CURVE_NIST_P256,
7188 .keysize = 256,
7189 .public_x = nist_kas_ecc_cdh_testvector_70_public_x,
7190 .public_y = nist_kas_ecc_cdh_testvector_70_public_y,
7191 .private = nist_kas_ecc_cdh_testvector_70_private,
7192 .out = nist_kas_ecc_cdh_testvector_70_out,
7193 },
7194 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007195 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007196 .algo = TEE_ALG_ECDH_P256,
7197 .curve = TEE_ECC_CURVE_NIST_P256,
7198 .keysize = 256,
7199 .public_x = nist_kas_ecc_cdh_testvector_71_public_x,
7200 .public_y = nist_kas_ecc_cdh_testvector_71_public_y,
7201 .private = nist_kas_ecc_cdh_testvector_71_private,
7202 .out = nist_kas_ecc_cdh_testvector_71_out,
7203 },
7204 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007205 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007206 .algo = TEE_ALG_ECDH_P256,
7207 .curve = TEE_ECC_CURVE_NIST_P256,
7208 .keysize = 256,
7209 .public_x = nist_kas_ecc_cdh_testvector_72_public_x,
7210 .public_y = nist_kas_ecc_cdh_testvector_72_public_y,
7211 .private = nist_kas_ecc_cdh_testvector_72_private,
7212 .out = nist_kas_ecc_cdh_testvector_72_out,
7213 },
7214 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007215 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007216 .algo = TEE_ALG_ECDH_P256,
7217 .curve = TEE_ECC_CURVE_NIST_P256,
7218 .keysize = 256,
7219 .public_x = nist_kas_ecc_cdh_testvector_73_public_x,
7220 .public_y = nist_kas_ecc_cdh_testvector_73_public_y,
7221 .private = nist_kas_ecc_cdh_testvector_73_private,
7222 .out = nist_kas_ecc_cdh_testvector_73_out,
7223 },
7224 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007225 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007226 .algo = TEE_ALG_ECDH_P256,
7227 .curve = TEE_ECC_CURVE_NIST_P256,
7228 .keysize = 256,
7229 .public_x = nist_kas_ecc_cdh_testvector_74_public_x,
7230 .public_y = nist_kas_ecc_cdh_testvector_74_public_y,
7231 .private = nist_kas_ecc_cdh_testvector_74_private,
7232 .out = nist_kas_ecc_cdh_testvector_74_out,
7233 },
7234 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007235 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007236 .algo = TEE_ALG_ECDH_P256,
7237 .curve = TEE_ECC_CURVE_NIST_P256,
7238 .keysize = 256,
7239 .public_x = nist_kas_ecc_cdh_testvector_75_public_x,
7240 .public_y = nist_kas_ecc_cdh_testvector_75_public_y,
7241 .private = nist_kas_ecc_cdh_testvector_75_private,
7242 .out = nist_kas_ecc_cdh_testvector_75_out,
7243 },
7244 /* [P-384] */
7245 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007246 .level = 0,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007247 .algo = TEE_ALG_ECDH_P384,
7248 .curve = TEE_ECC_CURVE_NIST_P384,
7249 .keysize = 384,
7250 .public_x = nist_kas_ecc_cdh_testvector_76_public_x,
7251 .public_y = nist_kas_ecc_cdh_testvector_76_public_y,
7252 .private = nist_kas_ecc_cdh_testvector_76_private,
7253 .out = nist_kas_ecc_cdh_testvector_76_out,
Pascal Brand2b92b642015-07-16 13:29:42 +02007254 },
7255 {
Jens Wiklander6a9d15a2016-02-01 10:29:42 +01007256 .level = 1,
Pascal Brand2b92b642015-07-16 13:29:42 +02007257 .algo = TEE_ALG_ECDH_P384,
7258 .curve = TEE_ECC_CURVE_NIST_P384,
7259 .keysize = 384,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007260 .public_x = nist_kas_ecc_cdh_testvector_77_public_x,
7261 .public_y = nist_kas_ecc_cdh_testvector_77_public_y,
7262 .private = nist_kas_ecc_cdh_testvector_77_private,
7263 .out = nist_kas_ecc_cdh_testvector_77_out,
7264 },
7265 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007266 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007267 .algo = TEE_ALG_ECDH_P384,
7268 .curve = TEE_ECC_CURVE_NIST_P384,
7269 .keysize = 384,
7270 .public_x = nist_kas_ecc_cdh_testvector_78_public_x,
7271 .public_y = nist_kas_ecc_cdh_testvector_78_public_y,
7272 .private = nist_kas_ecc_cdh_testvector_78_private,
7273 .out = nist_kas_ecc_cdh_testvector_78_out,
7274 },
7275 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007276 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007277 .algo = TEE_ALG_ECDH_P384,
7278 .curve = TEE_ECC_CURVE_NIST_P384,
7279 .keysize = 384,
7280 .public_x = nist_kas_ecc_cdh_testvector_79_public_x,
7281 .public_y = nist_kas_ecc_cdh_testvector_79_public_y,
7282 .private = nist_kas_ecc_cdh_testvector_79_private,
7283 .out = nist_kas_ecc_cdh_testvector_79_out,
7284 },
7285 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007286 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007287 .algo = TEE_ALG_ECDH_P384,
7288 .curve = TEE_ECC_CURVE_NIST_P384,
7289 .keysize = 384,
7290 .public_x = nist_kas_ecc_cdh_testvector_80_public_x,
7291 .public_y = nist_kas_ecc_cdh_testvector_80_public_y,
7292 .private = nist_kas_ecc_cdh_testvector_80_private,
7293 .out = nist_kas_ecc_cdh_testvector_80_out,
7294 },
7295 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007296 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007297 .algo = TEE_ALG_ECDH_P384,
7298 .curve = TEE_ECC_CURVE_NIST_P384,
7299 .keysize = 384,
7300 .public_x = nist_kas_ecc_cdh_testvector_81_public_x,
7301 .public_y = nist_kas_ecc_cdh_testvector_81_public_y,
7302 .private = nist_kas_ecc_cdh_testvector_81_private,
7303 .out = nist_kas_ecc_cdh_testvector_81_out,
7304 },
7305 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007306 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007307 .algo = TEE_ALG_ECDH_P384,
7308 .curve = TEE_ECC_CURVE_NIST_P384,
7309 .keysize = 384,
7310 .public_x = nist_kas_ecc_cdh_testvector_82_public_x,
7311 .public_y = nist_kas_ecc_cdh_testvector_82_public_y,
7312 .private = nist_kas_ecc_cdh_testvector_82_private,
7313 .out = nist_kas_ecc_cdh_testvector_82_out,
7314 },
7315 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007316 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007317 .algo = TEE_ALG_ECDH_P384,
7318 .curve = TEE_ECC_CURVE_NIST_P384,
7319 .keysize = 384,
7320 .public_x = nist_kas_ecc_cdh_testvector_83_public_x,
7321 .public_y = nist_kas_ecc_cdh_testvector_83_public_y,
7322 .private = nist_kas_ecc_cdh_testvector_83_private,
7323 .out = nist_kas_ecc_cdh_testvector_83_out,
7324 },
7325 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007326 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007327 .algo = TEE_ALG_ECDH_P384,
7328 .curve = TEE_ECC_CURVE_NIST_P384,
7329 .keysize = 384,
7330 .public_x = nist_kas_ecc_cdh_testvector_84_public_x,
7331 .public_y = nist_kas_ecc_cdh_testvector_84_public_y,
7332 .private = nist_kas_ecc_cdh_testvector_84_private,
7333 .out = nist_kas_ecc_cdh_testvector_84_out,
7334 },
7335 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007336 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007337 .algo = TEE_ALG_ECDH_P384,
7338 .curve = TEE_ECC_CURVE_NIST_P384,
7339 .keysize = 384,
7340 .public_x = nist_kas_ecc_cdh_testvector_85_public_x,
7341 .public_y = nist_kas_ecc_cdh_testvector_85_public_y,
7342 .private = nist_kas_ecc_cdh_testvector_85_private,
7343 .out = nist_kas_ecc_cdh_testvector_85_out,
7344 },
7345 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007346 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007347 .algo = TEE_ALG_ECDH_P384,
7348 .curve = TEE_ECC_CURVE_NIST_P384,
7349 .keysize = 384,
7350 .public_x = nist_kas_ecc_cdh_testvector_86_public_x,
7351 .public_y = nist_kas_ecc_cdh_testvector_86_public_y,
7352 .private = nist_kas_ecc_cdh_testvector_86_private,
7353 .out = nist_kas_ecc_cdh_testvector_86_out,
7354 },
7355 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007356 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007357 .algo = TEE_ALG_ECDH_P384,
7358 .curve = TEE_ECC_CURVE_NIST_P384,
7359 .keysize = 384,
7360 .public_x = nist_kas_ecc_cdh_testvector_87_public_x,
7361 .public_y = nist_kas_ecc_cdh_testvector_87_public_y,
7362 .private = nist_kas_ecc_cdh_testvector_87_private,
7363 .out = nist_kas_ecc_cdh_testvector_87_out,
7364 },
7365 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007366 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007367 .algo = TEE_ALG_ECDH_P384,
7368 .curve = TEE_ECC_CURVE_NIST_P384,
7369 .keysize = 384,
7370 .public_x = nist_kas_ecc_cdh_testvector_88_public_x,
7371 .public_y = nist_kas_ecc_cdh_testvector_88_public_y,
7372 .private = nist_kas_ecc_cdh_testvector_88_private,
7373 .out = nist_kas_ecc_cdh_testvector_88_out,
7374 },
7375 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007376 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007377 .algo = TEE_ALG_ECDH_P384,
7378 .curve = TEE_ECC_CURVE_NIST_P384,
7379 .keysize = 384,
7380 .public_x = nist_kas_ecc_cdh_testvector_89_public_x,
7381 .public_y = nist_kas_ecc_cdh_testvector_89_public_y,
7382 .private = nist_kas_ecc_cdh_testvector_89_private,
7383 .out = nist_kas_ecc_cdh_testvector_89_out,
7384 },
7385 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007386 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007387 .algo = TEE_ALG_ECDH_P384,
7388 .curve = TEE_ECC_CURVE_NIST_P384,
7389 .keysize = 384,
7390 .public_x = nist_kas_ecc_cdh_testvector_90_public_x,
7391 .public_y = nist_kas_ecc_cdh_testvector_90_public_y,
7392 .private = nist_kas_ecc_cdh_testvector_90_private,
7393 .out = nist_kas_ecc_cdh_testvector_90_out,
7394 },
7395 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007396 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007397 .algo = TEE_ALG_ECDH_P384,
7398 .curve = TEE_ECC_CURVE_NIST_P384,
7399 .keysize = 384,
7400 .public_x = nist_kas_ecc_cdh_testvector_91_public_x,
7401 .public_y = nist_kas_ecc_cdh_testvector_91_public_y,
7402 .private = nist_kas_ecc_cdh_testvector_91_private,
7403 .out = nist_kas_ecc_cdh_testvector_91_out,
7404 },
7405 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007406 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007407 .algo = TEE_ALG_ECDH_P384,
7408 .curve = TEE_ECC_CURVE_NIST_P384,
7409 .keysize = 384,
7410 .public_x = nist_kas_ecc_cdh_testvector_92_public_x,
7411 .public_y = nist_kas_ecc_cdh_testvector_92_public_y,
7412 .private = nist_kas_ecc_cdh_testvector_92_private,
7413 .out = nist_kas_ecc_cdh_testvector_92_out,
7414 },
7415 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007416 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007417 .algo = TEE_ALG_ECDH_P384,
7418 .curve = TEE_ECC_CURVE_NIST_P384,
7419 .keysize = 384,
7420 .public_x = nist_kas_ecc_cdh_testvector_93_public_x,
7421 .public_y = nist_kas_ecc_cdh_testvector_93_public_y,
7422 .private = nist_kas_ecc_cdh_testvector_93_private,
7423 .out = nist_kas_ecc_cdh_testvector_93_out,
7424 },
7425 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007426 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007427 .algo = TEE_ALG_ECDH_P384,
7428 .curve = TEE_ECC_CURVE_NIST_P384,
7429 .keysize = 384,
7430 .public_x = nist_kas_ecc_cdh_testvector_94_public_x,
7431 .public_y = nist_kas_ecc_cdh_testvector_94_public_y,
7432 .private = nist_kas_ecc_cdh_testvector_94_private,
7433 .out = nist_kas_ecc_cdh_testvector_94_out,
7434 },
7435 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007436 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007437 .algo = TEE_ALG_ECDH_P384,
7438 .curve = TEE_ECC_CURVE_NIST_P384,
7439 .keysize = 384,
7440 .public_x = nist_kas_ecc_cdh_testvector_95_public_x,
7441 .public_y = nist_kas_ecc_cdh_testvector_95_public_y,
7442 .private = nist_kas_ecc_cdh_testvector_95_private,
7443 .out = nist_kas_ecc_cdh_testvector_95_out,
7444 },
7445 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007446 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007447 .algo = TEE_ALG_ECDH_P384,
7448 .curve = TEE_ECC_CURVE_NIST_P384,
7449 .keysize = 384,
7450 .public_x = nist_kas_ecc_cdh_testvector_96_public_x,
7451 .public_y = nist_kas_ecc_cdh_testvector_96_public_y,
7452 .private = nist_kas_ecc_cdh_testvector_96_private,
7453 .out = nist_kas_ecc_cdh_testvector_96_out,
7454 },
7455 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007456 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007457 .algo = TEE_ALG_ECDH_P384,
7458 .curve = TEE_ECC_CURVE_NIST_P384,
7459 .keysize = 384,
7460 .public_x = nist_kas_ecc_cdh_testvector_97_public_x,
7461 .public_y = nist_kas_ecc_cdh_testvector_97_public_y,
7462 .private = nist_kas_ecc_cdh_testvector_97_private,
7463 .out = nist_kas_ecc_cdh_testvector_97_out,
7464 },
7465 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007466 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007467 .algo = TEE_ALG_ECDH_P384,
7468 .curve = TEE_ECC_CURVE_NIST_P384,
7469 .keysize = 384,
7470 .public_x = nist_kas_ecc_cdh_testvector_98_public_x,
7471 .public_y = nist_kas_ecc_cdh_testvector_98_public_y,
7472 .private = nist_kas_ecc_cdh_testvector_98_private,
7473 .out = nist_kas_ecc_cdh_testvector_98_out,
7474 },
7475 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007476 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007477 .algo = TEE_ALG_ECDH_P384,
7478 .curve = TEE_ECC_CURVE_NIST_P384,
7479 .keysize = 384,
7480 .public_x = nist_kas_ecc_cdh_testvector_99_public_x,
7481 .public_y = nist_kas_ecc_cdh_testvector_99_public_y,
7482 .private = nist_kas_ecc_cdh_testvector_99_private,
7483 .out = nist_kas_ecc_cdh_testvector_99_out,
7484 },
7485 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007486 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007487 .algo = TEE_ALG_ECDH_P384,
7488 .curve = TEE_ECC_CURVE_NIST_P384,
7489 .keysize = 384,
7490 .public_x = nist_kas_ecc_cdh_testvector_100_public_x,
7491 .public_y = nist_kas_ecc_cdh_testvector_100_public_y,
7492 .private = nist_kas_ecc_cdh_testvector_100_private,
7493 .out = nist_kas_ecc_cdh_testvector_100_out,
7494 },
7495 /* [P-521] */
7496 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007497 .level = 0,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007498 .algo = TEE_ALG_ECDH_P521,
7499 .curve = TEE_ECC_CURVE_NIST_P521,
7500 .keysize = 521,
7501 .public_x = nist_kas_ecc_cdh_testvector_101_public_x,
7502 .public_y = nist_kas_ecc_cdh_testvector_101_public_y,
7503 .private = nist_kas_ecc_cdh_testvector_101_private,
7504 .out = nist_kas_ecc_cdh_testvector_101_out,
Pascal Brand2b92b642015-07-16 13:29:42 +02007505 },
7506 {
Jens Wiklander6a9d15a2016-02-01 10:29:42 +01007507 .level = 1,
Pascal Brand2b92b642015-07-16 13:29:42 +02007508 .algo = TEE_ALG_ECDH_P521,
7509 .curve = TEE_ECC_CURVE_NIST_P521,
7510 .keysize = 521,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007511 .public_x = nist_kas_ecc_cdh_testvector_102_public_x,
7512 .public_y = nist_kas_ecc_cdh_testvector_102_public_y,
7513 .private = nist_kas_ecc_cdh_testvector_102_private,
7514 .out = nist_kas_ecc_cdh_testvector_102_out,
Pascal Brand2b92b642015-07-16 13:29:42 +02007515 },
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007516 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007517 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007518 .algo = TEE_ALG_ECDH_P521,
7519 .curve = TEE_ECC_CURVE_NIST_P521,
7520 .keysize = 521,
7521 .public_x = nist_kas_ecc_cdh_testvector_103_public_x,
7522 .public_y = nist_kas_ecc_cdh_testvector_103_public_y,
7523 .private = nist_kas_ecc_cdh_testvector_103_private,
7524 .out = nist_kas_ecc_cdh_testvector_103_out,
7525 },
7526 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007527 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007528 .algo = TEE_ALG_ECDH_P521,
7529 .curve = TEE_ECC_CURVE_NIST_P521,
7530 .keysize = 521,
7531 .public_x = nist_kas_ecc_cdh_testvector_104_public_x,
7532 .public_y = nist_kas_ecc_cdh_testvector_104_public_y,
7533 .private = nist_kas_ecc_cdh_testvector_104_private,
7534 .out = nist_kas_ecc_cdh_testvector_104_out,
7535 },
7536 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007537 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007538 .algo = TEE_ALG_ECDH_P521,
7539 .curve = TEE_ECC_CURVE_NIST_P521,
7540 .keysize = 521,
7541 .public_x = nist_kas_ecc_cdh_testvector_105_public_x,
7542 .public_y = nist_kas_ecc_cdh_testvector_105_public_y,
7543 .private = nist_kas_ecc_cdh_testvector_105_private,
7544 .out = nist_kas_ecc_cdh_testvector_105_out,
7545 },
7546 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007547 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007548 .algo = TEE_ALG_ECDH_P521,
7549 .curve = TEE_ECC_CURVE_NIST_P521,
7550 .keysize = 521,
7551 .public_x = nist_kas_ecc_cdh_testvector_106_public_x,
7552 .public_y = nist_kas_ecc_cdh_testvector_106_public_y,
7553 .private = nist_kas_ecc_cdh_testvector_106_private,
7554 .out = nist_kas_ecc_cdh_testvector_106_out,
7555 },
7556 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007557 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007558 .algo = TEE_ALG_ECDH_P521,
7559 .curve = TEE_ECC_CURVE_NIST_P521,
7560 .keysize = 521,
7561 .public_x = nist_kas_ecc_cdh_testvector_107_public_x,
7562 .public_y = nist_kas_ecc_cdh_testvector_107_public_y,
7563 .private = nist_kas_ecc_cdh_testvector_107_private,
7564 .out = nist_kas_ecc_cdh_testvector_107_out,
7565 },
7566 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007567 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007568 .algo = TEE_ALG_ECDH_P521,
7569 .curve = TEE_ECC_CURVE_NIST_P521,
7570 .keysize = 521,
7571 .public_x = nist_kas_ecc_cdh_testvector_108_public_x,
7572 .public_y = nist_kas_ecc_cdh_testvector_108_public_y,
7573 .private = nist_kas_ecc_cdh_testvector_108_private,
7574 .out = nist_kas_ecc_cdh_testvector_108_out,
7575 },
7576 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007577 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007578 .algo = TEE_ALG_ECDH_P521,
7579 .curve = TEE_ECC_CURVE_NIST_P521,
7580 .keysize = 521,
7581 .public_x = nist_kas_ecc_cdh_testvector_109_public_x,
7582 .public_y = nist_kas_ecc_cdh_testvector_109_public_y,
7583 .private = nist_kas_ecc_cdh_testvector_109_private,
7584 .out = nist_kas_ecc_cdh_testvector_109_out,
7585 },
7586 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007587 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007588 .algo = TEE_ALG_ECDH_P521,
7589 .curve = TEE_ECC_CURVE_NIST_P521,
7590 .keysize = 521,
7591 .public_x = nist_kas_ecc_cdh_testvector_110_public_x,
7592 .public_y = nist_kas_ecc_cdh_testvector_110_public_y,
7593 .private = nist_kas_ecc_cdh_testvector_110_private,
7594 .out = nist_kas_ecc_cdh_testvector_110_out,
7595 },
7596 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007597 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007598 .algo = TEE_ALG_ECDH_P521,
7599 .curve = TEE_ECC_CURVE_NIST_P521,
7600 .keysize = 521,
7601 .public_x = nist_kas_ecc_cdh_testvector_111_public_x,
7602 .public_y = nist_kas_ecc_cdh_testvector_111_public_y,
7603 .private = nist_kas_ecc_cdh_testvector_111_private,
7604 .out = nist_kas_ecc_cdh_testvector_111_out,
7605 },
7606 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007607 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007608 .algo = TEE_ALG_ECDH_P521,
7609 .curve = TEE_ECC_CURVE_NIST_P521,
7610 .keysize = 521,
7611 .public_x = nist_kas_ecc_cdh_testvector_112_public_x,
7612 .public_y = nist_kas_ecc_cdh_testvector_112_public_y,
7613 .private = nist_kas_ecc_cdh_testvector_112_private,
7614 .out = nist_kas_ecc_cdh_testvector_112_out,
7615 },
7616 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007617 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007618 .algo = TEE_ALG_ECDH_P521,
7619 .curve = TEE_ECC_CURVE_NIST_P521,
7620 .keysize = 521,
7621 .public_x = nist_kas_ecc_cdh_testvector_113_public_x,
7622 .public_y = nist_kas_ecc_cdh_testvector_113_public_y,
7623 .private = nist_kas_ecc_cdh_testvector_113_private,
7624 .out = nist_kas_ecc_cdh_testvector_113_out,
7625 },
7626 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007627 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007628 .algo = TEE_ALG_ECDH_P521,
7629 .curve = TEE_ECC_CURVE_NIST_P521,
7630 .keysize = 521,
7631 .public_x = nist_kas_ecc_cdh_testvector_114_public_x,
7632 .public_y = nist_kas_ecc_cdh_testvector_114_public_y,
7633 .private = nist_kas_ecc_cdh_testvector_114_private,
7634 .out = nist_kas_ecc_cdh_testvector_114_out,
7635 },
7636 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007637 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007638 .algo = TEE_ALG_ECDH_P521,
7639 .curve = TEE_ECC_CURVE_NIST_P521,
7640 .keysize = 521,
7641 .public_x = nist_kas_ecc_cdh_testvector_115_public_x,
7642 .public_y = nist_kas_ecc_cdh_testvector_115_public_y,
7643 .private = nist_kas_ecc_cdh_testvector_115_private,
7644 .out = nist_kas_ecc_cdh_testvector_115_out,
7645 },
7646 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007647 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007648 .algo = TEE_ALG_ECDH_P521,
7649 .curve = TEE_ECC_CURVE_NIST_P521,
7650 .keysize = 521,
7651 .public_x = nist_kas_ecc_cdh_testvector_116_public_x,
7652 .public_y = nist_kas_ecc_cdh_testvector_116_public_y,
7653 .private = nist_kas_ecc_cdh_testvector_116_private,
7654 .out = nist_kas_ecc_cdh_testvector_116_out,
7655 },
7656 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007657 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007658 .algo = TEE_ALG_ECDH_P521,
7659 .curve = TEE_ECC_CURVE_NIST_P521,
7660 .keysize = 521,
7661 .public_x = nist_kas_ecc_cdh_testvector_117_public_x,
7662 .public_y = nist_kas_ecc_cdh_testvector_117_public_y,
7663 .private = nist_kas_ecc_cdh_testvector_117_private,
7664 .out = nist_kas_ecc_cdh_testvector_117_out,
7665 },
7666 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007667 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007668 .algo = TEE_ALG_ECDH_P521,
7669 .curve = TEE_ECC_CURVE_NIST_P521,
7670 .keysize = 521,
7671 .public_x = nist_kas_ecc_cdh_testvector_118_public_x,
7672 .public_y = nist_kas_ecc_cdh_testvector_118_public_y,
7673 .private = nist_kas_ecc_cdh_testvector_118_private,
7674 .out = nist_kas_ecc_cdh_testvector_118_out,
7675 },
7676 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007677 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007678 .algo = TEE_ALG_ECDH_P521,
7679 .curve = TEE_ECC_CURVE_NIST_P521,
7680 .keysize = 521,
7681 .public_x = nist_kas_ecc_cdh_testvector_119_public_x,
7682 .public_y = nist_kas_ecc_cdh_testvector_119_public_y,
7683 .private = nist_kas_ecc_cdh_testvector_119_private,
7684 .out = nist_kas_ecc_cdh_testvector_119_out,
7685 },
7686 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007687 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007688 .algo = TEE_ALG_ECDH_P521,
7689 .curve = TEE_ECC_CURVE_NIST_P521,
7690 .keysize = 521,
7691 .public_x = nist_kas_ecc_cdh_testvector_120_public_x,
7692 .public_y = nist_kas_ecc_cdh_testvector_120_public_y,
7693 .private = nist_kas_ecc_cdh_testvector_120_private,
7694 .out = nist_kas_ecc_cdh_testvector_120_out,
7695 },
7696 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007697 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007698 .algo = TEE_ALG_ECDH_P521,
7699 .curve = TEE_ECC_CURVE_NIST_P521,
7700 .keysize = 521,
7701 .public_x = nist_kas_ecc_cdh_testvector_121_public_x,
7702 .public_y = nist_kas_ecc_cdh_testvector_121_public_y,
7703 .private = nist_kas_ecc_cdh_testvector_121_private,
7704 .out = nist_kas_ecc_cdh_testvector_121_out,
7705 },
7706 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007707 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007708 .algo = TEE_ALG_ECDH_P521,
7709 .curve = TEE_ECC_CURVE_NIST_P521,
7710 .keysize = 521,
7711 .public_x = nist_kas_ecc_cdh_testvector_122_public_x,
7712 .public_y = nist_kas_ecc_cdh_testvector_122_public_y,
7713 .private = nist_kas_ecc_cdh_testvector_122_private,
7714 .out = nist_kas_ecc_cdh_testvector_122_out,
7715 },
7716 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007717 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007718 .algo = TEE_ALG_ECDH_P521,
7719 .curve = TEE_ECC_CURVE_NIST_P521,
7720 .keysize = 521,
7721 .public_x = nist_kas_ecc_cdh_testvector_123_public_x,
7722 .public_y = nist_kas_ecc_cdh_testvector_123_public_y,
7723 .private = nist_kas_ecc_cdh_testvector_123_private,
7724 .out = nist_kas_ecc_cdh_testvector_123_out,
7725 },
7726 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007727 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007728 .algo = TEE_ALG_ECDH_P521,
7729 .curve = TEE_ECC_CURVE_NIST_P521,
7730 .keysize = 521,
7731 .public_x = nist_kas_ecc_cdh_testvector_124_public_x,
7732 .public_y = nist_kas_ecc_cdh_testvector_124_public_y,
7733 .private = nist_kas_ecc_cdh_testvector_124_private,
7734 .out = nist_kas_ecc_cdh_testvector_124_out,
7735 },
7736 {
Cedric Chaumontc3b6c282015-09-25 03:05:18 +02007737 .level = 15,
Cedric Chaumonteb1f7902015-09-18 12:54:58 +02007738 .algo = TEE_ALG_ECDH_P521,
7739 .curve = TEE_ECC_CURVE_NIST_P521,
7740 .keysize = 521,
7741 .public_x = nist_kas_ecc_cdh_testvector_125_public_x,
7742 .public_y = nist_kas_ecc_cdh_testvector_125_public_y,
7743 .private = nist_kas_ecc_cdh_testvector_125_private,
7744 .out = nist_kas_ecc_cdh_testvector_125_out,
7745 },
7746 /* [K-163] - GP NOT SUPPORTED */
7747 /* [K-233] - GP NOT SUPPORTED */
7748 /* [K-283] - GP NOT SUPPORTED */
7749 /* [K-409] - GP NOT SUPPORTED */
7750 /* [K-571] - GP NOT SUPPORTED */
7751 /* [B-163] - GP NOT SUPPORTED */
7752 /* [B-233] - GP NOT SUPPORTED */
7753 /* [B-283] - GP NOT SUPPORTED */
7754 /* [B-409] - GP NOT SUPPORTED */
7755 /* [B-571] - GP NOT SUPPORTED */
Pascal Brand2b92b642015-07-16 13:29:42 +02007756};
Pascal Brandc639ac82015-07-02 08:53:34 +02007757
Jerome Forissierb6f5ac92019-12-19 16:37:14 +01007758/* G/MT 0003 (SM2) Part 5 Annex C.2 - encryption/decryption */
7759static const uint8_t gmt_0003_part5_c2_sm2_testvector_ptx[19] =
7760/* M */
7761 "encryption standard";
7762static const uint8_t gmt_0003_part5_c2_sm2_testvector_private[] = {
7763/* dB */
7764 0x39, 0x45, 0x20, 0x8F, 0x7B, 0x21, 0x44, 0xB1, 0x3F, 0x36, 0xE3, 0x8A,
7765 0xC6, 0xD3, 0x9F, 0x95, 0x88, 0x93, 0x93, 0x69, 0x28, 0x60, 0xB5, 0x1A,
7766 0x42, 0xFB, 0x81, 0xEF, 0x4D, 0xF7, 0xC5, 0xB8
7767};
7768static const uint8_t gmt_0003_part5_c2_sm2_testvector_public_x[] = {
7769/* xB */
7770 0x09, 0xF9, 0xDF, 0x31, 0x1E, 0x54, 0x21, 0xA1, 0x50, 0xDD, 0x7D, 0x16,
7771 0x1E, 0x4B, 0xC5, 0xC6, 0x72, 0x17, 0x9F, 0xAD, 0x18, 0x33, 0xFC, 0x07,
7772 0x6B, 0xB0, 0x8F, 0xF3, 0x56, 0xF3, 0x50, 0x20
7773};
7774static const uint8_t gmt_0003_part5_c2_sm2_testvector_public_y[] = {
7775/* yB */
7776 0xCC, 0xEA, 0x49, 0x0C, 0xE2, 0x67, 0x75, 0xA5, 0x2D, 0xC6, 0xEA, 0x71,
7777 0x8C, 0xC1, 0xAA, 0x60, 0x0A, 0xED, 0x05, 0xFB, 0xF3, 0x5E, 0x08, 0x4A,
7778 0x66, 0x32, 0xF6, 0x07, 0x2D, 0xA9, 0xAD, 0x13
7779};
7780static const uint8_t gmt_0003_part5_c2_sm2_testvector_out[] = {
7781/* C */
7782 /* C1 */
7783 0x04,
7784 0x04, 0xEB, 0xFC, 0x71, 0x8E, 0x8D, 0x17, 0x98, 0x62, 0x04, 0x32, 0x26,
7785 0x8E, 0x77, 0xFE, 0xB6, 0x41, 0x5E, 0x2E, 0xDE, 0x0E, 0x07, 0x3C, 0x0F,
7786 0x4F, 0x64, 0x0E, 0xCD, 0x2E, 0x14, 0x9A, 0x73, 0xE8, 0x58, 0xF9, 0xD8,
7787 0x1E, 0x54, 0x30, 0xA5, 0x7B, 0x36, 0xDA, 0xAB, 0x8F, 0x95, 0x0A, 0x3C,
7788 0x64, 0xE6, 0xEE, 0x6A, 0x63, 0x09, 0x4D, 0x99, 0x28, 0x3A, 0xFF, 0x76,
7789 0x7E, 0x12, 0x4D, 0xF0,
7790 /* C2 */
7791 0x21, 0x88, 0x6C, 0xA9, 0x89, 0xCA, 0x9C, 0x7D, 0x58, 0x08, 0x73, 0x07,
7792 0xCA, 0x93, 0x09, 0x2D, 0x65, 0x1E, 0xFA,
7793 /* C3 */
7794 0x59, 0x98, 0x3C, 0x18, 0xF8, 0x09, 0xE2, 0x62, 0x92, 0x3C, 0x53, 0xAE,
7795 0xC2, 0x95, 0xD3, 0x03, 0x83, 0xB5, 0x4E, 0x39, 0xD6, 0x09, 0xD1, 0x60,
7796 0xAF, 0xCB, 0x19, 0x08, 0xD0, 0xBD, 0x87, 0x66
7797};
7798
7799/* SM2 encryption/decryption */
7800static const uint8_t sm2_testvector2_ptx[] =
7801/* M */
7802 "This test vector is used to test encryption then decryption. The "
7803 "plain text is longer than 64 characters, so it will exercise parts "
7804 "of the code that are not used for shorter messages.";
7805static const uint8_t sm2_testvector2_private[] = {
7806/* dB */
7807 0x39, 0x45, 0x20, 0x8F, 0x7B, 0x21, 0x44, 0xB1, 0x3F, 0x36, 0xE3, 0x8A,
7808 0xC6, 0xD3, 0x9F, 0x95, 0x88, 0x93, 0x93, 0x69, 0x28, 0x60, 0xB5, 0x1A,
7809 0x42, 0xFB, 0x81, 0xEF, 0x4D, 0xF7, 0xC5, 0xB8
7810};
7811static const uint8_t sm2_testvector2_public_x[] = {
7812/* xB */
7813 0x09, 0xF9, 0xDF, 0x31, 0x1E, 0x54, 0x21, 0xA1, 0x50, 0xDD, 0x7D, 0x16,
7814 0x1E, 0x4B, 0xC5, 0xC6, 0x72, 0x17, 0x9F, 0xAD, 0x18, 0x33, 0xFC, 0x07,
7815 0x6B, 0xB0, 0x8F, 0xF3, 0x56, 0xF3, 0x50, 0x20
7816};
7817static const uint8_t sm2_testvector2_public_y[] = {
7818/* yB */
7819 0xCC, 0xEA, 0x49, 0x0C, 0xE2, 0x67, 0x75, 0xA5, 0x2D, 0xC6, 0xEA, 0x71,
7820 0x8C, 0xC1, 0xAA, 0x60, 0x0A, 0xED, 0x05, 0xFB, 0xF3, 0x5E, 0x08, 0x4A,
7821 0x66, 0x32, 0xF6, 0x07, 0x2D, 0xA9, 0xAD, 0x13
7822};
7823static const uint8_t sm2_testvector2_out[] = {
7824 0x00, /* Not used -- test runs in encrypt/decrypt mode */
7825};
Jerome Forissier849b57e2019-12-19 16:37:14 +01007826
7827/*
7828 * G/MT 0003 (SM2) Part 5 Annex A.2 - SM2 digital signature based on
7829 * elliptic curves
7830 */
7831static const uint8_t gmt_003_part5_a2_ptx[] = {
7832 /* ZA = SM3(ENTLA || IDA || a || b || xG || yG || xA || yA) */
7833 0xB2, 0xE1, 0x4C, 0x5C, 0x79, 0xC6, 0xDF, 0x5B, 0x85, 0xF4, 0xFE, 0x7E,
7834 0xD8, 0xDB, 0x7A, 0x26, 0x2B, 0x9D, 0xA7, 0xE0, 0x7C, 0xCB, 0x0E, 0xA9,
7835 0xF4, 0x74, 0x7B, 0x8C, 0xCD, 0xA8, 0xA4, 0xF3,
7836 /* M */
7837 0x6D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x64, 0x69, 0x67, 0x65,
7838 0x73, 0x74
7839};
7840static const uint8_t gmt_003_part5_a2_private[] = {
7841 /* dA */
7842 0x39, 0x45, 0x20, 0x8F, 0x7B, 0x21, 0x44, 0xB1, 0x3F, 0x36, 0xE3, 0x8A,
7843 0xC6, 0xD3, 0x9F, 0x95, 0x88, 0x93, 0x93, 0x69, 0x28, 0x60, 0xB5, 0x1A,
7844 0x42, 0xFB, 0x81, 0xEF, 0x4D, 0xF7, 0xC5, 0xB8,
7845};
7846static const uint8_t gmt_003_part5_a2_public_x[] = {
7847 /* xA */
7848 0x09, 0xF9, 0xDF, 0x31, 0x1E, 0x54, 0x21, 0xA1, 0x50, 0xDD, 0x7D, 0x16,
7849 0x1E, 0x4B, 0xC5, 0xC6, 0x72, 0x17, 0x9F, 0xAD, 0x18, 0x33, 0xFC, 0x07,
7850 0x6B, 0xB0, 0x8F, 0xF3, 0x56, 0xF3, 0x50, 0x20,
7851};
7852static const uint8_t gmt_003_part5_a2_public_y[] = {
7853 /* yA */
7854 0xCC, 0xEA, 0x49, 0x0C, 0xE2, 0x67, 0x75, 0xA5, 0x2D, 0xC6, 0xEA, 0x71,
7855 0x8C, 0xC1, 0xAA, 0x60, 0x0A, 0xED, 0x05, 0xFB, 0xF3, 0x5E, 0x08, 0x4A,
7856 0x66, 0x32, 0xF6, 0x07, 0x2D, 0xA9, 0xAD, 0x13,
7857};
7858static const uint8_t gmt_003_part5_a2_out[] = {
7859 /* r */
7860 0xF5, 0xA0, 0x3B, 0x06, 0x48, 0xD2, 0xC4, 0x63, 0x0E, 0xEA, 0xC5, 0x13,
7861 0xE1, 0xBB, 0x81, 0xA1, 0x59, 0x44, 0xDA, 0x38, 0x27, 0xD5, 0xB7, 0x41,
7862 0x43, 0xAC, 0x7E, 0xAC, 0xEE, 0xE7, 0x20, 0xB3,
7863 /* s */
7864 0xB1, 0xB6, 0xAA, 0x29, 0xDF, 0x21, 0x2F, 0xD8, 0x76, 0x31, 0x82, 0xBC,
7865 0x0D, 0x42, 0x1C, 0xA1, 0xBB, 0x90, 0x38, 0xFD, 0x1F, 0x7F, 0x42, 0xD4,
7866 0x84, 0x0B, 0x69, 0xC4, 0x85, 0xBB, 0xC1, 0xAA,
7867};
7868
Jerome Forissierf0cf5182020-01-09 17:04:18 +01007869/*
7870 * G/MT 0003 (SM2) Part 5 Annex B.2 - key exchange protocol based on elliptic
7871 * curves
7872 */
7873static const uint8_t gmt_003_part5_b2_private_A[] = {
7874 /* dA */
7875 0x81, 0xEB, 0x26, 0xE9, 0x41, 0xBB, 0x5A, 0xF1, 0x6D, 0xF1, 0x16, 0x49,
7876 0x5F, 0x90, 0x69, 0x52, 0x72, 0xAE, 0x2C, 0xD6, 0x3D, 0x6C, 0x4A, 0xE1,
7877 0x67, 0x84, 0x18, 0xBE, 0x48, 0x23, 0x00, 0x29,
7878};
7879static const uint8_t gmt_003_part5_b2_public_xA[] = {
7880 /* xA */
7881 0x16, 0x0E, 0x12, 0x89, 0x7D, 0xF4, 0xED, 0xB6, 0x1D, 0xD8, 0x12, 0xFE,
7882 0xB9, 0x67, 0x48, 0xFB, 0xD3, 0xCC, 0xF4, 0xFF, 0xE2, 0x6A, 0xA6, 0xF6,
7883 0xDB, 0x95, 0x40, 0xAF, 0x49, 0xC9, 0x42, 0x32,
7884};
7885static const uint8_t gmt_003_part5_b2_public_yA[] = {
7886 /* xA */
7887 0x4A, 0x7D, 0xAD, 0x08, 0xBB, 0x9A, 0x45, 0x95, 0x31, 0x69, 0x4B, 0xEB,
7888 0x20, 0xAA, 0x48, 0x9D, 0x66, 0x49, 0x97, 0x5E, 0x1B, 0xFC, 0xF8, 0xC4,
7889 0x74, 0x1B, 0x78, 0xB4, 0xB2, 0x23, 0x00, 0x7F,
7890};
7891static const uint8_t gmt_003_part5_b2_eph_private_A[] = {
7892 /* rA */
7893 0xD4, 0xDE, 0x15, 0x47, 0x4D, 0xB7, 0x4D, 0x06, 0x49, 0x1C, 0x44, 0x0D,
7894 0x30, 0x5E, 0x01, 0x24, 0x00, 0x99, 0x0F, 0x3E, 0x39, 0x0C, 0x7E, 0x87,
7895 0x15, 0x3C, 0x12, 0xDB, 0x2E, 0xA6, 0x0B, 0xB3,
7896};
7897static const uint8_t gmt_003_part5_b2_eph_public_xA[] = {
7898 /* x1 where (x1, y1) = [rA]G */
7899 0x64, 0xCE, 0xD1, 0xBD, 0xBC, 0x99, 0xD5, 0x90, 0x04, 0x9B, 0x43, 0x4D,
7900 0x0F, 0xD7, 0x34, 0x28, 0xCF, 0x60, 0x8A, 0x5D, 0xB8, 0xFE, 0x5C, 0xE0,
7901 0x7F, 0x15, 0x02, 0x69, 0x40, 0xBA, 0xE4, 0x0E,
7902};
7903static const uint8_t gmt_003_part5_b2_eph_public_yA[] = {
7904 /* y1 where (x1, y1) = [rA]G */
7905 0x37, 0x66, 0x29, 0xC7, 0xAB, 0x21, 0xE7, 0xDB, 0x26, 0x09, 0x22, 0x49,
7906 0x9D, 0xDB, 0x11, 0x8F, 0x07, 0xCE, 0x8E, 0xAA, 0xE3, 0xE7, 0x72, 0x0A,
7907 0xFE, 0xF6, 0xA5, 0xCC, 0x06, 0x20, 0x70, 0xC0,
7908};
7909static const uint8_t gmt_003_part5_b2_public_xB[] = {
7910 /* xB */
7911 0x6A, 0xE8, 0x48, 0xC5, 0x7C, 0x53, 0xC7, 0xB1, 0xB5, 0xFA, 0x99, 0xEB,
7912 0x22, 0x86, 0xAF, 0x07, 0x8B, 0xA6, 0x4C, 0x64, 0x59, 0x1B, 0x8B, 0x56,
7913 0x6F, 0x73, 0x57, 0xD5, 0x76, 0xF1, 0x6D, 0xFB,
7914};
7915static const uint8_t gmt_003_part5_b2_private_B[] = {
7916 /* dB */
7917 0x78, 0x51, 0x29, 0x91, 0x7D, 0x45, 0xA9, 0xEA, 0x54, 0x37, 0xA5, 0x93,
7918 0x56, 0xB8, 0x23, 0x38, 0xEA, 0xAD, 0xDA, 0x6C, 0xEB, 0x19, 0x90, 0x88,
7919 0xF1, 0x4A, 0xE1, 0x0D, 0xEF, 0xA2, 0x29, 0xB5,
7920};
7921static const uint8_t gmt_003_part5_b2_public_yB[] = {
7922 /* yB */
7923 0xEE, 0x48, 0x9D, 0x77, 0x16, 0x21, 0xA2, 0x7B, 0x36, 0xC5, 0xC7, 0x99,
7924 0x20, 0x62, 0xE9, 0xCD, 0x09, 0xA9, 0x26, 0x43, 0x86, 0xF3, 0xFB, 0xEA,
7925 0x54, 0xDF, 0xF6, 0x93, 0x05, 0x62, 0x1C, 0x4D,
7926};
7927static const uint8_t gmt_003_part5_b2_eph_private_B[] = {
7928 /* rB */
7929 0x7E, 0x07, 0x12, 0x48, 0x14, 0xB3, 0x09, 0x48, 0x91, 0x25, 0xEA, 0xED,
7930 0x10, 0x11, 0x13, 0x16, 0x4E, 0xBF, 0x0F, 0x34, 0x58, 0xC5, 0xBD, 0x88,
7931 0x33, 0x5C, 0x1F, 0x9D, 0x59, 0x62, 0x43, 0xD6,
7932};
7933static const uint8_t gmt_003_part5_b2_eph_public_xB[] = {
7934 /* x2 where (x2, y2) = [rB]G */
7935 0xAC, 0xC2, 0x76, 0x88, 0xA6, 0xF7, 0xB7, 0x06, 0x09, 0x8B, 0xC9, 0x1F,
7936 0xF3, 0xAD, 0x1B, 0xFF, 0x7D, 0xC2, 0x80, 0x2C, 0xDB, 0x14, 0xCC, 0xCC,
7937 0xDB, 0x0A, 0x90, 0x47, 0x1F, 0x9B, 0xD7, 0x07,
7938};
7939static const uint8_t gmt_003_part5_b2_eph_public_yB[] = {
7940 /* y2 where (x2, y2) = [rB]G */
7941 0x2F, 0xED, 0xAC, 0x04, 0x94, 0xB2, 0xFF, 0xC4, 0xD6, 0x85, 0x38, 0x76,
7942 0xC7, 0x9B, 0x8F, 0x30, 0x1C, 0x65, 0x73, 0xAD, 0x0A, 0xA5, 0x0F, 0x39,
7943 0xFC, 0x87, 0x18, 0x1E, 0x1A, 0x1B, 0x46, 0xFE,
7944};
7945static const uint8_t gmt_003_part5_b2_id_A[] = {
7946 /* IDA */
7947 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x31, 0x32, 0x33, 0x34,
7948 0x35, 0x36, 0x37, 0x38,
7949};
7950static const uint8_t gmt_003_part5_b2_id_B[] = {
7951 /* IDB */
7952 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x31, 0x32, 0x33, 0x34,
7953 0x35, 0x36, 0x37, 0x38,
7954};
7955static const uint8_t gmt_003_part5_b2_conf_A[] = {
7956 /* S2 = SA */
7957 0x18, 0xC7, 0x89, 0x4B, 0x38, 0x16, 0xDF, 0x16, 0xCF, 0x07, 0xB0, 0x5C,
7958 0x5E, 0xC0, 0xBE, 0xF5, 0xD6, 0x55, 0xD5, 0x8F, 0x77, 0x9C, 0xC1, 0xB4,
7959 0x00, 0xA4, 0xF3, 0x88, 0x46, 0x44, 0xDB, 0x88,
7960};
7961static const uint8_t gmt_003_part5_b2_conf_B[] = {
7962 /* S1 = SB */
7963 0xD3, 0xA0, 0xFE, 0x15, 0xDE, 0xE1, 0x85, 0xCE, 0xAE, 0x90, 0x7A, 0x6B,
7964 0x59, 0x5C, 0xC3, 0x2A, 0x26, 0x6E, 0xD7, 0xB3, 0x36, 0x7E, 0x99, 0x83,
7965 0xA8, 0x96, 0xDC, 0x32, 0xFA, 0x20, 0xF8, 0xEB,
7966};
7967static const uint8_t gmt_003_part5_b2_shared_secret[] = {
7968 /* KA = KB */
7969 0x6C, 0x89, 0x34, 0x73, 0x54, 0xDE, 0x24, 0x84, 0xC6, 0x0B, 0x4A, 0xB1,
7970 0xFD, 0xE4, 0xC6, 0xE5,
7971};
Ruchika Gupta454b0b62020-10-30 13:23:19 +05307972
7973/* MAC Tests Data and Keys */
7974
7975static const uint8_t mac_data_md5_key1[10] = {
7976 0x6B, 0x65, 0x79, /* key */
7977};
7978
7979static const uint8_t mac_data_md5_in1[] = {
7980 0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, /* The quic */
7981 0x6B, 0x20, 0x62, 0x72, 0x6F, 0x77, 0x6E, 0x20, /* k brown */
7982 0x66, 0x6F, 0x78, 0x20, 0x6A, 0x75, 0x6D, 0x70, /* fox jump */
7983 0x73, 0x20, 0x6F, 0x76, 0x65, 0x72, 0x20, 0x74, /* s over t */
7984 0x68, 0x65, 0x20, 0x6C, 0x61, 0x7A, 0x79, 0x20, /* he lazy */
7985 0x64, 0x6F, 0x67, /* dog */
7986};
7987
7988static const uint8_t mac_data_md5_out1[] = {
7989 0x80, 0x07, 0x07, 0x13, 0x46, 0x3e, 0x77, 0x49,
7990 0xb9, 0x0c, 0x2d, 0xc2, 0x49, 0x11, 0xe2, 0x75
7991};
7992
7993
7994/* generated with scripts/digest_hmac.pl */
7995static const uint8_t mac_data_sha1_key1[10] = {
7996 0x6B, 0x65, 0x79, /* key */
7997};
7998
7999static const uint8_t mac_data_sha1_in1[] = {
8000 0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, /* The quic */
8001 0x6B, 0x20, 0x62, 0x72, 0x6F, 0x77, 0x6E, 0x20, /* k brown */
8002 0x66, 0x6F, 0x78, 0x20, 0x6A, 0x75, 0x6D, 0x70, /* fox jump */
8003 0x73, 0x20, 0x6F, 0x76, 0x65, 0x72, 0x20, 0x74, /* s over t */
8004 0x68, 0x65, 0x20, 0x6C, 0x61, 0x7A, 0x79, 0x20, /* he lazy */
8005 0x64, 0x6F, 0x67, /* dog */
8006};
8007
8008static const uint8_t mac_data_sha1_out1[] = {
8009 0xDE, 0x7C, 0x9B, 0x85, 0xB8, 0xB7, 0x8A, 0xA6, /* .|...... */
8010 0xBC, 0x8A, 0x7A, 0x36, 0xF7, 0x0A, 0x90, 0x70, /* ..z6...p */
8011 0x1C, 0x9D, 0xB4, 0xD9, /* .... */
8012};
8013
8014static const uint8_t mac_data_sha224_key1[24] = {
8015 0x6B, 0x65, 0x79, /* key */
8016};
8017
8018static const uint8_t mac_data_sha224_in1[] = {
8019 0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, /* The quic */
8020 0x6B, 0x20, 0x62, 0x72, 0x6F, 0x77, 0x6E, 0x20, /* k brown */
8021 0x66, 0x6F, 0x78, 0x20, 0x6A, 0x75, 0x6D, 0x70, /* fox jump */
8022 0x73, 0x20, 0x6F, 0x76, 0x65, 0x72, 0x20, 0x74, /* s over t */
8023 0x68, 0x65, 0x20, 0x6C, 0x61, 0x7A, 0x79, 0x20, /* he lazy */
8024 0x64, 0x6F, 0x67, /* dog */
8025};
8026
8027static const uint8_t mac_data_sha224_out1[] = {
8028 0x88, 0xFF, 0x8B, 0x54, 0x67, 0x5D, 0x39, 0xB8, /* ...Tg]9. */
8029 0xF7, 0x23, 0x22, 0xE6, 0x5F, 0xF9, 0x45, 0xC5, /* .#"._.E. */
8030 0x2D, 0x96, 0x37, 0x99, 0x88, 0xAD, 0xA2, 0x56, /* -.7....V */
8031 0x39, 0x74, 0x7E, 0x69, /* 9t~i */
8032};
8033
8034
8035static const uint8_t mac_data_sha256_key1[24] = {
8036 'Q', 'W', 'E', 'R', 'T', 'Y'
8037};
8038
8039static const uint8_t mac_data_sha256_in1[] = { 'a', 'b', 'c' };
8040
8041static const uint8_t mac_data_sha256_out1[] = {
8042 0xee, 0x2e, 0x5d, 0x9b, 0x51, 0xe2, 0x9c, 0x1d,
8043 0x49, 0xe9, 0xae, 0x6f, 0x0a, 0xcc, 0x15, 0x18,
8044 0xde, 0x1e, 0xa3, 0x88, 0x8e, 0xee, 0x48, 0xbb,
8045 0x82, 0x77, 0xe9, 0x09, 0x74, 0x4b, 0xa2, 0xf2
8046};
8047
8048/* generated with scripts/digest_hmac.pl */
8049static const uint8_t mac_data_sha256_key2[24] = {
8050 0x6B, 0x65, 0x79, /* key */
8051};
8052
8053static const uint8_t mac_data_sha256_in2[] = {
8054 0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, /* The quic */
8055 0x6B, 0x20, 0x62, 0x72, 0x6F, 0x77, 0x6E, 0x20, /* k brown */
8056 0x66, 0x6F, 0x78, 0x20, 0x6A, 0x75, 0x6D, 0x70, /* fox jump */
8057 0x73, 0x20, 0x6F, 0x76, 0x65, 0x72, 0x20, 0x74, /* s over t */
8058 0x68, 0x65, 0x20, 0x6C, 0x61, 0x7A, 0x79, 0x20, /* he lazy */
8059 0x64, 0x6F, 0x67, /* dog */
8060};
8061
8062static const uint8_t mac_data_sha256_out2[] = {
8063 0xF7, 0xBC, 0x83, 0xF4, 0x30, 0x53, 0x84, 0x24, /* ....0S.$ */
8064 0xB1, 0x32, 0x98, 0xE6, 0xAA, 0x6F, 0xB1, 0x43, /* .2...o.C */
8065 0xEF, 0x4D, 0x59, 0xA1, 0x49, 0x46, 0x17, 0x59, /* .MY.IF.Y */
8066 0x97, 0x47, 0x9D, 0xBC, 0x2D, 0x1A, 0x3C, 0xD8, /* .G..-.<. */
8067};
8068
8069static const uint8_t mac_data_sha384_key1[32] = {
8070 0x6B, 0x65, 0x79, /* key */
8071};
8072
8073static const uint8_t mac_data_sha384_in1[] = {
8074 0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, /* The quic */
8075 0x6B, 0x20, 0x62, 0x72, 0x6F, 0x77, 0x6E, 0x20, /* k brown */
8076 0x66, 0x6F, 0x78, 0x20, 0x6A, 0x75, 0x6D, 0x70, /* fox jump */
8077 0x73, 0x20, 0x6F, 0x76, 0x65, 0x72, 0x20, 0x74, /* s over t */
8078 0x68, 0x65, 0x20, 0x6C, 0x61, 0x7A, 0x79, 0x20, /* he lazy */
8079 0x64, 0x6F, 0x67, /* dog */
8080};
8081
8082static const uint8_t mac_data_sha384_out1[] = {
8083 0xD7, 0xF4, 0x72, 0x7E, 0x2C, 0x0B, 0x39, 0xAE, /* ..r~, .9. */
8084 0x0F, 0x1E, 0x40, 0xCC, 0x96, 0xF6, 0x02, 0x42, /* ..@....B */
8085 0xD5, 0xB7, 0x80, 0x18, 0x41, 0xCE, 0xA6, 0xFC, /* ....A... */
8086 0x59, 0x2C, 0x5D, 0x3E, 0x1A, 0xE5, 0x07, 0x00, /* Y, ]>.... */
8087 0x58, 0x2A, 0x96, 0xCF, 0x35, 0xE1, 0xE5, 0x54, /* X...5..T */
8088 0x99, 0x5F, 0xE4, 0xE0, 0x33, 0x81, 0xC2, 0x37, /* ._..3..7 */
8089};
8090
8091static const uint8_t mac_data_sha512_key1[32] = {
8092 0x6B, 0x65, 0x79, /* key */
8093};
8094
8095static const uint8_t mac_data_sha512_in1[] = {
8096 0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, /* The quic */
8097 0x6B, 0x20, 0x62, 0x72, 0x6F, 0x77, 0x6E, 0x20, /* k brown */
8098 0x66, 0x6F, 0x78, 0x20, 0x6A, 0x75, 0x6D, 0x70, /* fox jump */
8099 0x73, 0x20, 0x6F, 0x76, 0x65, 0x72, 0x20, 0x74, /* s over t */
8100 0x68, 0x65, 0x20, 0x6C, 0x61, 0x7A, 0x79, 0x20, /* he lazy */
8101 0x64, 0x6F, 0x67, /* dog */
8102};
8103
8104static const uint8_t mac_data_sha512_out1[] = {
8105 0xB4, 0x2A, 0xF0, 0x90, 0x57, 0xBA, 0xC1, 0xE2, /* ....W... */
8106 0xD4, 0x17, 0x08, 0xE4, 0x8A, 0x90, 0x2E, 0x09, /* ........ */
8107 0xB5, 0xFF, 0x7F, 0x12, 0xAB, 0x42, 0x8A, 0x4F, /* .....B.O */
8108 0xE8, 0x66, 0x53, 0xC7, 0x3D, 0xD2, 0x48, 0xFB, /* .fS.=.H. */
8109 0x82, 0xF9, 0x48, 0xA5, 0x49, 0xF7, 0xB7, 0x91, /* ..H.I... */
8110 0xA5, 0xB4, 0x19, 0x15, 0xEE, 0x4D, 0x1E, 0xC3, /* .....M.. */
8111 0x93, 0x53, 0x57, 0xE4, 0xE2, 0x31, 0x72, 0x50, /* .SW..1rP */
8112 0xD0, 0x37, 0x2A, 0xFA, 0x2E, 0xBE, 0xEB, 0x3A, /* .7.....: */
8113};
8114
8115/*
8116 * SM3 HMAC
8117 * GM/T 0042-2015
8118 * Section D.3 Test vector 1
8119 */
8120static const uint8_t mac_data_sm3_d31_in[112] =
8121 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomn"
8122 "opnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmn"
8123 "lmnomnopnopq";
8124
8125static const uint8_t mac_data_sm3_d31_key[] = {
8126 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
8127 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
8128 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
8129 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
8130};
8131
8132static const uint8_t mac_data_sm3_d31_out[] = {
8133 0xca, 0x05, 0xe1, 0x44, 0xed, 0x05, 0xd1, 0x85,
8134 0x78, 0x40, 0xd1, 0xf3, 0x18, 0xa4, 0xa8, 0x66,
8135 0x9e, 0x55, 0x9f, 0xc8, 0x39, 0x1f, 0x41, 0x44,
8136 0x85, 0xbf, 0xdf, 0x7b, 0xb4, 0x08, 0x96, 0x3a,
8137};
8138
8139/*
8140 * SM3 HMAC
8141 * GM/T 0042-2015
8142 * Section D.3 Test vector 2
8143 */
8144static const uint8_t mac_data_sm3_d32_in[] = {
8145 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
8146 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
8147 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
8148 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
8149 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
8150 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
8151 0xcd, 0xcd
8152};
8153
8154static const uint8_t mac_data_sm3_d32_key[] = {
8155 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
8156 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
8157 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
8158 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
8159 0x21, 0x22, 0x23, 0x24, 0x25,
8160};
8161
8162static const uint8_t mac_data_sm3_d32_out[] = {
8163 0x22, 0x0b, 0xf5, 0x79, 0xde, 0xd5, 0x55, 0x39,
8164 0x3f, 0x01, 0x59, 0xf6, 0x6c, 0x99, 0x87, 0x78,
8165 0x22, 0xa3, 0xec, 0xf6, 0x10, 0xd1, 0x55, 0x21,
8166 0x54, 0xb4, 0x1d, 0x44, 0xb9, 0x4d, 0xb3, 0xae,
8167};
8168
8169/* AES-CBC-MAC */
8170static const uint8_t mac_cbc_vect1_key[] = {
8171 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
8172 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */
8173};
8174
8175static const uint8_t mac_cbc_vect1_data[] = {
8176 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x20, 0x62, /* Cipher b */
8177 0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x63, 0x68, 0x61, /* lock cha */
8178 0x69, 0x6E, 0x69, 0x6E, 0x67, 0x20, 0x28, 0x43, /* ining (C */
8179 0x42, 0x43, 0x29, 0x20, 0x69, 0x73, 0x20, 0x61, /* BC) is a */
8180 0x20, 0x63, 0x6F, 0x6D, 0x6D, 0x6F, 0x6E, 0x20, /* common */
8181 0x63, 0x68, 0x61, 0x69, 0x6E, 0x69, 0x6E, 0x67, /* chaining */
8182 0x20, 0x6D, 0x6F, 0x64, 0x65, 0x20, 0x69, 0x6E, /* mode in */
8183 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, /* which t */
8184 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x76, 0x69, /* he previ */
8185 0x6F, 0x75, 0x73, 0x20, 0x62, 0x6C, 0x6F, 0x63, /* ous bloc */
8186 0x6B, 0x27, 0x73, 0x20, 0x63, 0x69, 0x70, 0x68, /* k's ciph */
8187 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x20, 0x69, /* ertext i */
8188 0x73, 0x20, 0x78, 0x6F, 0x72, 0x65, 0x64, 0x20, /* s xored */
8189 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, /* with the */
8190 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6E, 0x74, /* current */
8191 0x20, 0x62, 0x6C, 0x6F, 0x63, 0x6B, 0x27, 0x73, /* block's */
8192 0x20, 0x70, 0x6C, 0x61, 0x69, 0x6E, 0x74, 0x65, /* plainte */
8193 0x78, 0x74, 0x20, 0x62, 0x65, 0x66, 0x6F, 0x72, /* xt befor */
8194 0x65, 0x20, 0x65, 0x6E, 0x63, 0x72, 0x79, 0x70, /* e encryp */
8195 0x74, 0x69, 0x6F, 0x6E, 0x2E, 0x2E, 0x2E, 0x2E, /* tion.... */
8196};
8197
8198static const uint8_t mac_cbc_vect1_out[] = {
8199 0xC9, 0x6E, 0x83, 0x7E, 0x35, 0xC8, 0xA7, 0xA0, /* .n.~5... */
8200 0x33, 0xA3, 0xB1, 0x4B, 0x5A, 0x92, 0x51, 0x2E, /* 3..KZ.Q. */
8201};
8202
8203/* DES-CBC-MAC */
8204static const uint8_t mac_cbc_vect2_key[] = {
8205 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
8206};
8207
8208#define mac_cbc_vect2_data mac_cbc_vect1_data
8209static const uint8_t mac_cbc_vect2_out[] = {
8210 0xE9, 0x41, 0x46, 0x30, 0x69, 0x32, 0xBD, 0xD6, /* .AF0i2.. */
8211};
8212
8213/* DES3-CBC-MAC */
8214static const uint8_t mac_cbc_vect3_key[] = {
8215 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
8216 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */
8217 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, /* 12345678 */
8218};
8219
8220#define mac_cbc_vect3_data mac_cbc_vect2_data
8221static const uint8_t mac_cbc_vect3_out[] = {
8222 0x1C, 0x17, 0xB7, 0xB5, 0x9F, 0x54, 0x9C, 0x63, /* .....T.c */
8223};
8224
8225/* AES-CBC-MAC PKCS#5 pad*/
8226static const uint8_t mac_cbc_vect4_key[] = {
8227 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
8228 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */
8229 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
8230 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */
8231};
8232
8233#define mac_cbc_vect4_data mac_cbc_vect1_data
8234static const uint8_t mac_cbc_vect4_out[] = {
8235 0x0B, 0x46, 0xC7, 0xA2, 0xE1, 0x5A, 0xE2, 0x23, /* .F...Z.# */
8236 0x83, 0x34, 0x1C, 0x86, 0x53, 0xF8, 0x51, 0x24, /* .4..S.Q$ */
8237};
8238
8239/* DES-CBC-MAC PKCS#5 pad*/
8240static const uint8_t mac_cbc_vect5_key[] = {
8241 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
8242};
8243
8244#define mac_cbc_vect5_data mac_cbc_vect1_data
8245static const uint8_t mac_cbc_vect5_out[] = {
8246 0x30, 0x81, 0x4F, 0x42, 0x03, 0x7E, 0xD8, 0xA9, /* 0.OB.~.. */
8247};
8248
8249/* DES3-CBC-MAC PKCS#5 pad*/
8250static const uint8_t mac_cbc_vect6_key[] = {
8251 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
8252 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */
8253 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, /* 12345678 */
8254};
8255
8256#define mac_cbc_vect6_data mac_cbc_vect1_data
8257static const uint8_t mac_cbc_vect6_out[] = {
8258 0x6E, 0x37, 0x6E, 0x14, 0x5E, 0x21, 0xDD, 0xF8, /* n7n.^!.. */
8259};
8260
8261/* AES-CBC-MAC PKCS#5 pad*/
8262#define mac_cbc_vect7_key mac_cbc_vect4_key
8263static const uint8_t mac_cbc_vect7_data[] = {
8264 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x20, 0x62, /* Cipher b */
8265 0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x63, 0x68, 0x61, /* lock cha */
8266 0x69, 0x6E, 0x69, 0x6E, 0x67, 0x20, 0x28, 0x43, /* ining (C */
8267 0x42, 0x43, 0x29, 0x20, 0x69, 0x73, 0x20, 0x61, /* BC) is a */
8268 0x20, 0x63, 0x6F, 0x6D, 0x6D, 0x6F, 0x6E, 0x20, /* common */
8269 0x63, 0x68, 0x61, 0x69, 0x6E, 0x69, 0x6E, 0x67, /* chaining */
8270 0x20, 0x6D, 0x6F, 0x64, 0x65, 0x20, 0x69, 0x6E, /* mode in */
8271 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, /* which t */
8272 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x76, 0x69, /* he previ */
8273 0x6F, 0x75, 0x73, 0x20, 0x62, 0x6C, 0x6F, 0x63, /* ous bloc */
8274 0x6B, 0x27, 0x73, 0x20, 0x63, 0x69, 0x70, 0x68, /* k's ciph */
8275 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x20, 0x69, /* ertext i */
8276 0x73, 0x20, 0x78, 0x6F, 0x72, 0x65, 0x64, 0x20, /* s xored */
8277 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, /* with the */
8278 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6E, 0x74, /* current */
8279 0x20, 0x62, 0x6C, 0x6F, 0x63, 0x6B, 0x27, 0x73, /* block's */
8280 0x20, 0x70, 0x6C, 0x61, 0x69, 0x6E, 0x74, 0x65, /* plainte */
8281 0x78, 0x74, 0x20, 0x62, 0x65, 0x66, 0x6F, 0x72, /* xt befor */
8282 0x65, 0x20, 0x65, 0x6E, 0x63, 0x72, 0x79, 0x70, /* e encryp */
8283 0x74, 0x69, 0x6F, 0x6E, 0x2E, /* tion. */
8284};
8285
8286static const uint8_t mac_cbc_vect7_out[] = {
8287 0xFD, 0x89, 0x35, 0xB3, 0x93, 0x7F, 0xBB, 0xA2, /* ..5..... */
8288 0xFB, 0x65, 0x60, 0xC4, 0x0A, 0x62, 0xA0, 0xF9, /* .e`..b.. */
8289};
8290
8291/* DES-CBC-MAC PKCS#5 pad*/
8292#define mac_cbc_vect8_key mac_cbc_vect5_key
8293#define mac_cbc_vect8_data mac_cbc_vect7_data
8294static const uint8_t mac_cbc_vect8_out[] = {
8295 0x02, 0x2A, 0xA8, 0x2E, 0x47, 0xC6, 0xBB, 0x7C, /* ....G..| */
8296};
8297
8298/* DES3-CBC-MAC PKCS#5 pad*/
8299#define mac_cbc_vect9_key mac_cbc_vect6_key
8300#define mac_cbc_vect9_data mac_cbc_vect7_data
8301static const uint8_t mac_cbc_vect9_out[] = {
8302 0xD4, 0xF7, 0x3E, 0x27, 0x78, 0x0E, 0x1C, 0x79, /* ..>'x..y */
8303};
8304
8305/*
8306 * DES3-CBC-MAC, with key size of 112bit
8307 * out obtained with:
8308 * echo -n "Cipher block chaining (CBC) is a common chaining mode in which the previous block's ciphertext is xored with the current block's plaintext before encryption...."|openssl enc -iv 0 -des3 -K 303132333435363738394142434445463031323334353637 |xxd
8309 */
8310/* DES3-CBC-MAC PKCS#5 pad*/
8311static const uint8_t mac_cbc_vect10_key[] = {
8312 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
8313 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */
8314};
8315#define mac_cbc_vect10_data mac_cbc_vect1_data
8316static const uint8_t mac_cbc_vect10_out[] = {
8317 0x30, 0x92, 0x60, 0x99, 0x66, 0xac, 0x8c, 0xa6,
8318};
8319
8320
8321/*
8322 * AES-CMAC
8323 * Test vectors from
8324 * http://csrc.nist.gov/publications/nistpubs/800-38B/SP_800-38B.pdf
8325 */
8326
8327/* AES-128 */
8328static const uint8_t mac_cmac_vect1_key[] = {
8329 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
8330 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c
8331};
8332
8333static const uint8_t mac_cmac_vect1_out[] = {
8334 0xbb, 0x1d, 0x69, 0x29, 0xe9, 0x59, 0x37, 0x28,
8335 0x7f, 0xa3, 0x7d, 0x12, 0x9b, 0x75, 0x67, 0x46
8336};
8337
8338#define mac_cmac_vect2_key mac_cmac_vect1_key
8339static const uint8_t mac_cmac_vect2_data[] = {
8340 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
8341 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
8342};
8343
8344static const uint8_t mac_cmac_vect2_out[] = {
8345 0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44,
8346 0xf7, 0x9b, 0xdd, 0x9d, 0xd0, 0x4a, 0x28, 0x7c
8347};
8348
8349#define mac_cmac_vect3_key mac_cmac_vect1_key
8350static const uint8_t mac_cmac_vect3_data[] = {
8351 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
8352 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
8353 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
8354 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
8355 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11
8356};
8357
8358static const uint8_t mac_cmac_vect3_out[] = {
8359 0xdf, 0xa6, 0x67, 0x47, 0xde, 0x9a, 0xe6, 0x30,
8360 0x30, 0xca, 0x32, 0x61, 0x14, 0x97, 0xc8, 0x27
8361};
8362
8363#define mac_cmac_vect4_key mac_cmac_vect1_key
8364static const uint8_t mac_cmac_vect4_data[] = {
8365 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
8366 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
8367 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
8368 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
8369 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
8370 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
8371 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
8372 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
8373};
8374
8375static const uint8_t mac_cmac_vect4_out[] = {
8376 0x51, 0xf0, 0xbe, 0xbf, 0x7e, 0x3b, 0x9d, 0x92,
8377 0xfc, 0x49, 0x74, 0x17, 0x79, 0x36, 0x3c, 0xfe
8378};
8379
8380/* AES-192 */
8381static const uint8_t mac_cmac_vect5_key[] = {
8382 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
8383 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
8384 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b
8385};
8386
8387static const uint8_t mac_cmac_vect5_out[] = {
8388 0xd1, 0x7d, 0xdf, 0x46, 0xad, 0xaa, 0xcd, 0xe5,
8389 0x31, 0xca, 0xc4, 0x83, 0xde, 0x7a, 0x93, 0x67
8390};
8391
8392
8393#define mac_cmac_vect6_key mac_cmac_vect5_key
8394static const uint8_t mac_cmac_vect6_data[] = {
8395 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
8396 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
8397};
8398
8399static const uint8_t mac_cmac_vect6_out[] = {
8400 0x9e, 0x99, 0xa7, 0xbf, 0x31, 0xe7, 0x10, 0x90,
8401 0x06, 0x62, 0xf6, 0x5e, 0x61, 0x7c, 0x51, 0x84
8402};
8403
8404#define mac_cmac_vect7_key mac_cmac_vect5_key
8405static const uint8_t mac_cmac_vect7_data[] = {
8406 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
8407 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
8408 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
8409 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
8410 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11
8411};
8412
8413static const uint8_t mac_cmac_vect7_out[] = {
8414 0x8a, 0x1d, 0xe5, 0xbe, 0x2e, 0xb3, 0x1a, 0xad,
8415 0x08, 0x9a, 0x82, 0xe6, 0xee, 0x90, 0x8b, 0x0e
8416};
8417
8418#define mac_cmac_vect8_key mac_cmac_vect5_key
8419static const uint8_t mac_cmac_vect8_data[] = {
8420 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
8421 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
8422 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
8423 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
8424 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
8425 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
8426 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
8427 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
8428};
8429
8430static const uint8_t mac_cmac_vect8_out[] = {
8431 0xa1, 0xd5, 0xdf, 0x0e, 0xed, 0x79, 0x0f, 0x79,
8432 0x4d, 0x77, 0x58, 0x96, 0x59, 0xf3, 0x9a, 0x11
8433};
8434
8435/* AES-256 */
8436static const uint8_t mac_cmac_vect9_key[] = {
8437 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
8438 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
8439 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
8440 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4
8441};
8442
8443static const uint8_t mac_cmac_vect9_out[] = {
8444 0x02, 0x89, 0x62, 0xf6, 0x1b, 0x7b, 0xf8, 0x9e,
8445 0xfc, 0x6b, 0x55, 0x1f, 0x46, 0x67, 0xd9, 0x83
8446};
8447
8448#define mac_cmac_vect10_key mac_cmac_vect9_key
8449static const uint8_t mac_cmac_vect10_data[] = {
8450 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
8451 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a
8452};
8453
8454static const uint8_t mac_cmac_vect10_out[] = {
8455 0x28, 0xa7, 0x02, 0x3f, 0x45, 0x2e, 0x8f, 0x82,
8456 0xbd, 0x4b, 0xf2, 0x8d, 0x8c, 0x37, 0xc3, 0x5c
8457};
8458
8459#define mac_cmac_vect11_key mac_cmac_vect9_key
8460static const uint8_t mac_cmac_vect11_data[] = {
8461 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
8462 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
8463 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
8464 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
8465 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11
8466};
8467
8468static const uint8_t mac_cmac_vect11_out[] = {
8469 0xaa, 0xf3, 0xd8, 0xf1, 0xde, 0x56, 0x40, 0xc2,
8470 0x32, 0xf5, 0xb1, 0x69, 0xb9, 0xc9, 0x11, 0xe6
8471};
8472
8473#define mac_cmac_vect12_key mac_cmac_vect9_key
8474static const uint8_t mac_cmac_vect12_data[] = {
8475 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
8476 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
8477 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
8478 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
8479 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
8480 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
8481 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
8482 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
8483};
8484
8485static const uint8_t mac_cmac_vect12_out[] = {
8486 0xe1, 0x99, 0x21, 0x90, 0x54, 0x9f, 0x6e, 0xd5,
8487 0x69, 0x6a, 0x2c, 0x05, 0x6c, 0x31, 0x54, 0x10
8488};
8489
Alexander Zakharov0afe00c2021-02-10 19:06:48 +01008490/*
8491 * DES3-CMAC
8492 * Test vectors from
8493 * https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/cavp-testing-block-cipher-modes
8494 */
8495
8496/* Three Key TDEA */
8497
8498/* CMACGenTDES3.rsp Count = 8 */
8499static const uint8_t mac_des3_cmac_vect1_key[] = {
8500 0xf8, 0x7c, 0x4c, 0x3d, 0xf7, 0x1f, 0xd9, 0x8c,
8501 0xe5, 0x32, 0xf4, 0x1f, 0xfe, 0x31, 0x58, 0x20,
8502 0x51, 0x4f, 0xad, 0x7c, 0x7a, 0xae, 0x2f, 0x46
8503};
8504
8505static const uint8_t mac_des3_cmac_vect1_out[] = {
8506 0x19, 0xfb, 0xd3, 0xdc, 0x15, 0x4b, 0xc1, 0x39
8507};
8508
8509/* CMACVerTDES3.rsp Count = 25 */
8510static const uint8_t mac_des3_cmac_vect2_key[] = {
8511 0xa2, 0x52, 0xda, 0xad, 0x73, 0x1c, 0x10, 0x97,
8512 0x45, 0x46, 0x38, 0xab, 0xf1, 0xf8, 0x40, 0x6d,
8513 0xd0, 0xae, 0xcb, 0xc7, 0x8c, 0x01, 0x8a, 0xa8
8514};
8515
8516static const uint8_t mac_des3_cmac_vect2_data[] = {
8517 0x1d, 0x99, 0x92, 0x0c, 0x59, 0x73, 0x99, 0x7c,
8518 0xc0, 0x59, 0xd4, 0x42, 0x46, 0x7f, 0x76, 0x59
8519};
8520
8521static const uint8_t mac_des3_cmac_vect2_out[] = {
8522 0x7c, 0x14, 0x90, 0x12, 0xd6, 0x12, 0x0e, 0xc6
8523};
8524
8525/* CMACVerTDES3.rsp Count = 40 */
8526static const uint8_t mac_des3_cmac_vect3_key[] = {
8527 0xf2, 0x45, 0xf8, 0xd5, 0x85, 0x13, 0x3e, 0x31,
8528 0x04, 0xd3, 0xfb, 0xc2, 0xd0, 0xec, 0x80, 0xf4,
8529 0x3e, 0xce, 0x1f, 0xd9, 0xa2, 0x8f, 0x5e, 0xd5
8530};
8531
8532static const uint8_t mac_des3_cmac_vect3_data[] = {
8533 0x99, 0x3d, 0xac, 0xbc, 0x22, 0x1e, 0xd3, 0x2a,
8534 0x6f, 0xb3, 0xd9, 0x05, 0x59, 0xc6, 0x74, 0xfb,
8535 0x68, 0x08, 0x9e, 0xea, 0x8d, 0xf9, 0xea, 0xec,
8536 0x14, 0x07, 0x19, 0x91, 0xd4, 0xfa, 0xe8, 0x6b
8537};
8538
8539static const uint8_t mac_des3_cmac_vect3_out[] = {
8540 0x25, 0xfb, 0x96, 0x2e, 0xa9, 0x3b, 0x89, 0x7f
8541};
8542
8543/* CMACVerTDES3.rsp Count = 57 */
8544static const uint8_t mac_des3_cmac_vect4_key[] = {
8545 0xc2, 0x9e, 0xc1, 0x2c, 0xa4, 0x83, 0xc2, 0x61,
8546 0xc1, 0xfe, 0xa7, 0x34, 0xf4, 0xad, 0x08, 0x10,
8547 0x8a, 0xc2, 0x75, 0x02, 0x68, 0x2c, 0x67, 0xdc
8548};
8549
8550static const uint8_t mac_des3_cmac_vect4_data[] = {
8551 0x19, 0x5c, 0x0b, 0x84, 0xba, 0xac, 0xc8, 0x8a, 0x33
8552};
8553
8554static const uint8_t mac_des3_cmac_vect4_out[] = {
8555 0xe3, 0xeb, 0xff, 0x96, 0x12, 0x49, 0x42, 0x45
8556};
8557
8558/* Two Key TDEA */
8559
8560/* CMACVerTDES2.rsp Count = 55 */
8561static const uint8_t mac_des3_cmac_vect5_key[] = {
8562 0xb6, 0xe0, 0xe5, 0x80, 0x20, 0x92, 0x34, 0x94,
8563 0xdc, 0x76, 0x80, 0x08, 0xe9, 0x98, 0x8f, 0xc2,
8564 0xb6, 0xe0, 0xe5, 0x80, 0x20, 0x92, 0x34, 0x94
8565};
8566
8567static const uint8_t mac_des3_cmac_vect5_out[] = {
8568 0x5c, 0x73, 0x43, 0xa4, 0x16, 0x8a, 0x37, 0x0f
8569};
8570
8571/* CMACVerTDES2.rsp Count = 101 */
8572static const uint8_t mac_des3_cmac_vect6_key[] = {
8573 0x61, 0xc4, 0xec, 0x20, 0x70, 0xe9, 0xbf, 0x2a,
8574 0xec, 0x02, 0xd0, 0xb0, 0xe9, 0x9e, 0x8f, 0x01,
8575 0x61, 0xc4, 0xec, 0x20, 0x70, 0xe9, 0xbf, 0x2a
8576};
8577
8578static const uint8_t mac_des3_cmac_vect6_data[] = {
8579 0xff, 0xbd, 0x75, 0x61, 0x93, 0x91, 0x88, 0xbc
8580};
8581
8582static const uint8_t mac_des3_cmac_vect6_out[] = {
8583 0x55, 0xa0, 0x4c, 0x23, 0xd5, 0xb4, 0x3e, 0x49
8584};
8585
8586/* CMACVerTDES2.rsp Count = 223 */
8587static const uint8_t mac_des3_cmac_vect7_key[] = {
8588 0xb6, 0xc8, 0x9d, 0x79, 0x85, 0x70, 0xab, 0x6e,
8589 0xcd, 0x54, 0x54, 0xc1, 0xa7, 0x29, 0xf2, 0xd9,
8590 0xb6, 0xc8, 0x9d, 0x79, 0x85, 0x70, 0xab, 0x6e
8591};
8592
8593static const uint8_t mac_des3_cmac_vect7_data[] = {
8594 0x83, 0xd2, 0xc3, 0x86, 0xe8, 0x73, 0xad, 0xa1,
8595 0x49, 0x76, 0x71, 0x2b, 0x67, 0x27, 0x7c
8596};
8597
8598static const uint8_t mac_des3_cmac_vect7_out[] = {
8599 0x03, 0xbf, 0x2c, 0x9f, 0x49, 0x6e, 0x4f, 0xa9
8600};
8601
8602/* CMACVerTDES2.rsp Count = 358 */
8603static const uint8_t mac_des3_cmac_vect8_key[] = {
8604 0xe0, 0x85, 0xab, 0xa8, 0x58, 0x83, 0xc7, 0x5d,
8605 0x62, 0x76, 0x75, 0x7a, 0x54, 0x31, 0xc8, 0x37,
8606 0xe0, 0x85, 0xab, 0xa8, 0x58, 0x83, 0xc7, 0x5d
8607};
8608
8609static const uint8_t mac_des3_cmac_vect8_data[] = {
8610 0xb0, 0x53, 0x76, 0xdb, 0x71, 0xce, 0x06, 0x66,
8611 0x63, 0x81, 0x95, 0x03, 0xeb, 0x0a, 0xd5, 0xef,
8612 0x63, 0x2d, 0x0c, 0xa4, 0x6c, 0xd4, 0x0e, 0xfe,
8613 0x86, 0x54, 0x69, 0x9d, 0xde, 0xf2, 0xdf, 0x8a,
8614 0x66, 0xa6, 0x19, 0x1d, 0x2b, 0x1f, 0x99, 0x1e
8615};
8616
8617static const uint8_t mac_des3_cmac_vect8_out[] = {
8618 0xd5, 0xe7, 0x9f, 0x0b, 0x3c, 0x67, 0xd7, 0xf3
8619};
8620
Pascal Brandc639ac82015-07-02 08:53:34 +02008621#endif /*XTEST_4000_DATA_H*/