kernel: 5.4: import wireguard backport
[openwrt/openwrt.git] / target / linux / generic / backport-5.4 / 080-wireguard-0047-crypto-chacha20poly1305-add-back-missing-test-vector.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: "Jason A. Donenfeld" <Jason@zx2c4.com>
3 Date: Thu, 16 Jan 2020 21:26:34 +0100
4 Subject: [PATCH] crypto: chacha20poly1305 - add back missing test vectors and
5 test chunking
6
7 commit 72c7943792c9e7788ddd182337bcf8f650cf56f5 upstream.
8
9 When this was originally ported, the 12-byte nonce vectors were left out
10 to keep things simple. I agree that we don't need nor want a library
11 interface for 12-byte nonces. But these test vectors were specially
12 crafted to look at issues in the underlying primitives and related
13 interactions. Therefore, we actually want to keep around all of the
14 test vectors, and simply have a helper function to test them with.
15
16 Secondly, the sglist-based chunking code in the library interface is
17 rather complicated, so this adds a developer-only test for ensuring that
18 all the book keeping is correct, across a wide array of possibilities.
19
20 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
21 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
22 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
23 ---
24 lib/crypto/chacha20poly1305-selftest.c | 1712 +++++++++++++++++++++++-
25 1 file changed, 1698 insertions(+), 14 deletions(-)
26
27 --- a/lib/crypto/chacha20poly1305-selftest.c
28 +++ b/lib/crypto/chacha20poly1305-selftest.c
29 @@ -4,6 +4,7 @@
30 */
31
32 #include <crypto/chacha20poly1305.h>
33 +#include <crypto/chacha.h>
34 #include <crypto/poly1305.h>
35
36 #include <asm/unaligned.h>
37 @@ -1926,6 +1927,1104 @@ static const u8 enc_key012[] __initconst
38 0x65, 0x91, 0x6e, 0x2a, 0x79, 0x22, 0xda, 0x64
39 };
40
41 +/* wycheproof - rfc7539 */
42 +static const u8 enc_input013[] __initconst = {
43 + 0x4c, 0x61, 0x64, 0x69, 0x65, 0x73, 0x20, 0x61,
44 + 0x6e, 0x64, 0x20, 0x47, 0x65, 0x6e, 0x74, 0x6c,
45 + 0x65, 0x6d, 0x65, 0x6e, 0x20, 0x6f, 0x66, 0x20,
46 + 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x73,
47 + 0x73, 0x20, 0x6f, 0x66, 0x20, 0x27, 0x39, 0x39,
48 + 0x3a, 0x20, 0x49, 0x66, 0x20, 0x49, 0x20, 0x63,
49 + 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x66,
50 + 0x65, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6f,
51 + 0x6e, 0x6c, 0x79, 0x20, 0x6f, 0x6e, 0x65, 0x20,
52 + 0x74, 0x69, 0x70, 0x20, 0x66, 0x6f, 0x72, 0x20,
53 + 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x74, 0x75,
54 + 0x72, 0x65, 0x2c, 0x20, 0x73, 0x75, 0x6e, 0x73,
55 + 0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x77, 0x6f,
56 + 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69,
57 + 0x74, 0x2e
58 +};
59 +static const u8 enc_output013[] __initconst = {
60 + 0xd3, 0x1a, 0x8d, 0x34, 0x64, 0x8e, 0x60, 0xdb,
61 + 0x7b, 0x86, 0xaf, 0xbc, 0x53, 0xef, 0x7e, 0xc2,
62 + 0xa4, 0xad, 0xed, 0x51, 0x29, 0x6e, 0x08, 0xfe,
63 + 0xa9, 0xe2, 0xb5, 0xa7, 0x36, 0xee, 0x62, 0xd6,
64 + 0x3d, 0xbe, 0xa4, 0x5e, 0x8c, 0xa9, 0x67, 0x12,
65 + 0x82, 0xfa, 0xfb, 0x69, 0xda, 0x92, 0x72, 0x8b,
66 + 0x1a, 0x71, 0xde, 0x0a, 0x9e, 0x06, 0x0b, 0x29,
67 + 0x05, 0xd6, 0xa5, 0xb6, 0x7e, 0xcd, 0x3b, 0x36,
68 + 0x92, 0xdd, 0xbd, 0x7f, 0x2d, 0x77, 0x8b, 0x8c,
69 + 0x98, 0x03, 0xae, 0xe3, 0x28, 0x09, 0x1b, 0x58,
70 + 0xfa, 0xb3, 0x24, 0xe4, 0xfa, 0xd6, 0x75, 0x94,
71 + 0x55, 0x85, 0x80, 0x8b, 0x48, 0x31, 0xd7, 0xbc,
72 + 0x3f, 0xf4, 0xde, 0xf0, 0x8e, 0x4b, 0x7a, 0x9d,
73 + 0xe5, 0x76, 0xd2, 0x65, 0x86, 0xce, 0xc6, 0x4b,
74 + 0x61, 0x16, 0x1a, 0xe1, 0x0b, 0x59, 0x4f, 0x09,
75 + 0xe2, 0x6a, 0x7e, 0x90, 0x2e, 0xcb, 0xd0, 0x60,
76 + 0x06, 0x91
77 +};
78 +static const u8 enc_assoc013[] __initconst = {
79 + 0x50, 0x51, 0x52, 0x53, 0xc0, 0xc1, 0xc2, 0xc3,
80 + 0xc4, 0xc5, 0xc6, 0xc7
81 +};
82 +static const u8 enc_nonce013[] __initconst = {
83 + 0x07, 0x00, 0x00, 0x00, 0x40, 0x41, 0x42, 0x43,
84 + 0x44, 0x45, 0x46, 0x47
85 +};
86 +static const u8 enc_key013[] __initconst = {
87 + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
88 + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
89 + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
90 + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
91 +};
92 +
93 +/* wycheproof - misc */
94 +static const u8 enc_input014[] __initconst = { };
95 +static const u8 enc_output014[] __initconst = {
96 + 0x76, 0xac, 0xb3, 0x42, 0xcf, 0x31, 0x66, 0xa5,
97 + 0xb6, 0x3c, 0x0c, 0x0e, 0xa1, 0x38, 0x3c, 0x8d
98 +};
99 +static const u8 enc_assoc014[] __initconst = { };
100 +static const u8 enc_nonce014[] __initconst = {
101 + 0x4d, 0xa5, 0xbf, 0x8d, 0xfd, 0x58, 0x52, 0xc1,
102 + 0xea, 0x12, 0x37, 0x9d
103 +};
104 +static const u8 enc_key014[] __initconst = {
105 + 0x80, 0xba, 0x31, 0x92, 0xc8, 0x03, 0xce, 0x96,
106 + 0x5e, 0xa3, 0x71, 0xd5, 0xff, 0x07, 0x3c, 0xf0,
107 + 0xf4, 0x3b, 0x6a, 0x2a, 0xb5, 0x76, 0xb2, 0x08,
108 + 0x42, 0x6e, 0x11, 0x40, 0x9c, 0x09, 0xb9, 0xb0
109 +};
110 +
111 +/* wycheproof - misc */
112 +static const u8 enc_input015[] __initconst = { };
113 +static const u8 enc_output015[] __initconst = {
114 + 0x90, 0x6f, 0xa6, 0x28, 0x4b, 0x52, 0xf8, 0x7b,
115 + 0x73, 0x59, 0xcb, 0xaa, 0x75, 0x63, 0xc7, 0x09
116 +};
117 +static const u8 enc_assoc015[] __initconst = {
118 + 0xbd, 0x50, 0x67, 0x64, 0xf2, 0xd2, 0xc4, 0x10
119 +};
120 +static const u8 enc_nonce015[] __initconst = {
121 + 0xa9, 0x2e, 0xf0, 0xac, 0x99, 0x1d, 0xd5, 0x16,
122 + 0xa3, 0xc6, 0xf6, 0x89
123 +};
124 +static const u8 enc_key015[] __initconst = {
125 + 0x7a, 0x4c, 0xd7, 0x59, 0x17, 0x2e, 0x02, 0xeb,
126 + 0x20, 0x4d, 0xb2, 0xc3, 0xf5, 0xc7, 0x46, 0x22,
127 + 0x7d, 0xf5, 0x84, 0xfc, 0x13, 0x45, 0x19, 0x63,
128 + 0x91, 0xdb, 0xb9, 0x57, 0x7a, 0x25, 0x07, 0x42
129 +};
130 +
131 +/* wycheproof - misc */
132 +static const u8 enc_input016[] __initconst = {
133 + 0x2a
134 +};
135 +static const u8 enc_output016[] __initconst = {
136 + 0x3a, 0xca, 0xc2, 0x7d, 0xec, 0x09, 0x68, 0x80,
137 + 0x1e, 0x9f, 0x6e, 0xde, 0xd6, 0x9d, 0x80, 0x75,
138 + 0x22
139 +};
140 +static const u8 enc_assoc016[] __initconst = { };
141 +static const u8 enc_nonce016[] __initconst = {
142 + 0x99, 0xe2, 0x3e, 0xc4, 0x89, 0x85, 0xbc, 0xcd,
143 + 0xee, 0xab, 0x60, 0xf1
144 +};
145 +static const u8 enc_key016[] __initconst = {
146 + 0xcc, 0x56, 0xb6, 0x80, 0x55, 0x2e, 0xb7, 0x50,
147 + 0x08, 0xf5, 0x48, 0x4b, 0x4c, 0xb8, 0x03, 0xfa,
148 + 0x50, 0x63, 0xeb, 0xd6, 0xea, 0xb9, 0x1f, 0x6a,
149 + 0xb6, 0xae, 0xf4, 0x91, 0x6a, 0x76, 0x62, 0x73
150 +};
151 +
152 +/* wycheproof - misc */
153 +static const u8 enc_input017[] __initconst = {
154 + 0x51
155 +};
156 +static const u8 enc_output017[] __initconst = {
157 + 0xc4, 0x16, 0x83, 0x10, 0xca, 0x45, 0xb1, 0xf7,
158 + 0xc6, 0x6c, 0xad, 0x4e, 0x99, 0xe4, 0x3f, 0x72,
159 + 0xb9
160 +};
161 +static const u8 enc_assoc017[] __initconst = {
162 + 0x91, 0xca, 0x6c, 0x59, 0x2c, 0xbc, 0xca, 0x53
163 +};
164 +static const u8 enc_nonce017[] __initconst = {
165 + 0xab, 0x0d, 0xca, 0x71, 0x6e, 0xe0, 0x51, 0xd2,
166 + 0x78, 0x2f, 0x44, 0x03
167 +};
168 +static const u8 enc_key017[] __initconst = {
169 + 0x46, 0xf0, 0x25, 0x49, 0x65, 0xf7, 0x69, 0xd5,
170 + 0x2b, 0xdb, 0x4a, 0x70, 0xb4, 0x43, 0x19, 0x9f,
171 + 0x8e, 0xf2, 0x07, 0x52, 0x0d, 0x12, 0x20, 0xc5,
172 + 0x5e, 0x4b, 0x70, 0xf0, 0xfd, 0xa6, 0x20, 0xee
173 +};
174 +
175 +/* wycheproof - misc */
176 +static const u8 enc_input018[] __initconst = {
177 + 0x5c, 0x60
178 +};
179 +static const u8 enc_output018[] __initconst = {
180 + 0x4d, 0x13, 0x91, 0xe8, 0xb6, 0x1e, 0xfb, 0x39,
181 + 0xc1, 0x22, 0x19, 0x54, 0x53, 0x07, 0x7b, 0x22,
182 + 0xe5, 0xe2
183 +};
184 +static const u8 enc_assoc018[] __initconst = { };
185 +static const u8 enc_nonce018[] __initconst = {
186 + 0x46, 0x1a, 0xf1, 0x22, 0xe9, 0xf2, 0xe0, 0x34,
187 + 0x7e, 0x03, 0xf2, 0xdb
188 +};
189 +static const u8 enc_key018[] __initconst = {
190 + 0x2f, 0x7f, 0x7e, 0x4f, 0x59, 0x2b, 0xb3, 0x89,
191 + 0x19, 0x49, 0x89, 0x74, 0x35, 0x07, 0xbf, 0x3e,
192 + 0xe9, 0xcb, 0xde, 0x17, 0x86, 0xb6, 0x69, 0x5f,
193 + 0xe6, 0xc0, 0x25, 0xfd, 0x9b, 0xa4, 0xc1, 0x00
194 +};
195 +
196 +/* wycheproof - misc */
197 +static const u8 enc_input019[] __initconst = {
198 + 0xdd, 0xf2
199 +};
200 +static const u8 enc_output019[] __initconst = {
201 + 0xb6, 0x0d, 0xea, 0xd0, 0xfd, 0x46, 0x97, 0xec,
202 + 0x2e, 0x55, 0x58, 0x23, 0x77, 0x19, 0xd0, 0x24,
203 + 0x37, 0xa2
204 +};
205 +static const u8 enc_assoc019[] __initconst = {
206 + 0x88, 0x36, 0x4f, 0xc8, 0x06, 0x05, 0x18, 0xbf
207 +};
208 +static const u8 enc_nonce019[] __initconst = {
209 + 0x61, 0x54, 0x6b, 0xa5, 0xf1, 0x72, 0x05, 0x90,
210 + 0xb6, 0x04, 0x0a, 0xc6
211 +};
212 +static const u8 enc_key019[] __initconst = {
213 + 0xc8, 0x83, 0x3d, 0xce, 0x5e, 0xa9, 0xf2, 0x48,
214 + 0xaa, 0x20, 0x30, 0xea, 0xcf, 0xe7, 0x2b, 0xff,
215 + 0xe6, 0x9a, 0x62, 0x0c, 0xaf, 0x79, 0x33, 0x44,
216 + 0xe5, 0x71, 0x8f, 0xe0, 0xd7, 0xab, 0x1a, 0x58
217 +};
218 +
219 +/* wycheproof - misc */
220 +static const u8 enc_input020[] __initconst = {
221 + 0xab, 0x85, 0xe9, 0xc1, 0x57, 0x17, 0x31
222 +};
223 +static const u8 enc_output020[] __initconst = {
224 + 0x5d, 0xfe, 0x34, 0x40, 0xdb, 0xb3, 0xc3, 0xed,
225 + 0x7a, 0x43, 0x4e, 0x26, 0x02, 0xd3, 0x94, 0x28,
226 + 0x1e, 0x0a, 0xfa, 0x9f, 0xb7, 0xaa, 0x42
227 +};
228 +static const u8 enc_assoc020[] __initconst = { };
229 +static const u8 enc_nonce020[] __initconst = {
230 + 0x3c, 0x4e, 0x65, 0x4d, 0x66, 0x3f, 0xa4, 0x59,
231 + 0x6d, 0xc5, 0x5b, 0xb7
232 +};
233 +static const u8 enc_key020[] __initconst = {
234 + 0x55, 0x56, 0x81, 0x58, 0xd3, 0xa6, 0x48, 0x3f,
235 + 0x1f, 0x70, 0x21, 0xea, 0xb6, 0x9b, 0x70, 0x3f,
236 + 0x61, 0x42, 0x51, 0xca, 0xdc, 0x1a, 0xf5, 0xd3,
237 + 0x4a, 0x37, 0x4f, 0xdb, 0xfc, 0x5a, 0xda, 0xc7
238 +};
239 +
240 +/* wycheproof - misc */
241 +static const u8 enc_input021[] __initconst = {
242 + 0x4e, 0xe5, 0xcd, 0xa2, 0x0d, 0x42, 0x90
243 +};
244 +static const u8 enc_output021[] __initconst = {
245 + 0x4b, 0xd4, 0x72, 0x12, 0x94, 0x1c, 0xe3, 0x18,
246 + 0x5f, 0x14, 0x08, 0xee, 0x7f, 0xbf, 0x18, 0xf5,
247 + 0xab, 0xad, 0x6e, 0x22, 0x53, 0xa1, 0xba
248 +};
249 +static const u8 enc_assoc021[] __initconst = {
250 + 0x84, 0xe4, 0x6b, 0xe8, 0xc0, 0x91, 0x90, 0x53
251 +};
252 +static const u8 enc_nonce021[] __initconst = {
253 + 0x58, 0x38, 0x93, 0x75, 0xc6, 0x9e, 0xe3, 0x98,
254 + 0xde, 0x94, 0x83, 0x96
255 +};
256 +static const u8 enc_key021[] __initconst = {
257 + 0xe3, 0xc0, 0x9e, 0x7f, 0xab, 0x1a, 0xef, 0xb5,
258 + 0x16, 0xda, 0x6a, 0x33, 0x02, 0x2a, 0x1d, 0xd4,
259 + 0xeb, 0x27, 0x2c, 0x80, 0xd5, 0x40, 0xc5, 0xda,
260 + 0x52, 0xa7, 0x30, 0xf3, 0x4d, 0x84, 0x0d, 0x7f
261 +};
262 +
263 +/* wycheproof - misc */
264 +static const u8 enc_input022[] __initconst = {
265 + 0xbe, 0x33, 0x08, 0xf7, 0x2a, 0x2c, 0x6a, 0xed
266 +};
267 +static const u8 enc_output022[] __initconst = {
268 + 0x8e, 0x94, 0x39, 0xa5, 0x6e, 0xee, 0xc8, 0x17,
269 + 0xfb, 0xe8, 0xa6, 0xed, 0x8f, 0xab, 0xb1, 0x93,
270 + 0x75, 0x39, 0xdd, 0x6c, 0x00, 0xe9, 0x00, 0x21
271 +};
272 +static const u8 enc_assoc022[] __initconst = { };
273 +static const u8 enc_nonce022[] __initconst = {
274 + 0x4f, 0x07, 0xaf, 0xed, 0xfd, 0xc3, 0xb6, 0xc2,
275 + 0x36, 0x18, 0x23, 0xd3
276 +};
277 +static const u8 enc_key022[] __initconst = {
278 + 0x51, 0xe4, 0xbf, 0x2b, 0xad, 0x92, 0xb7, 0xaf,
279 + 0xf1, 0xa4, 0xbc, 0x05, 0x55, 0x0b, 0xa8, 0x1d,
280 + 0xf4, 0xb9, 0x6f, 0xab, 0xf4, 0x1c, 0x12, 0xc7,
281 + 0xb0, 0x0e, 0x60, 0xe4, 0x8d, 0xb7, 0xe1, 0x52
282 +};
283 +
284 +/* wycheproof - misc */
285 +static const u8 enc_input023[] __initconst = {
286 + 0xa4, 0xc9, 0xc2, 0x80, 0x1b, 0x71, 0xf7, 0xdf
287 +};
288 +static const u8 enc_output023[] __initconst = {
289 + 0xb9, 0xb9, 0x10, 0x43, 0x3a, 0xf0, 0x52, 0xb0,
290 + 0x45, 0x30, 0xf5, 0x1a, 0xee, 0xe0, 0x24, 0xe0,
291 + 0xa4, 0x45, 0xa6, 0x32, 0x8f, 0xa6, 0x7a, 0x18
292 +};
293 +static const u8 enc_assoc023[] __initconst = {
294 + 0x66, 0xc0, 0xae, 0x70, 0x07, 0x6c, 0xb1, 0x4d
295 +};
296 +static const u8 enc_nonce023[] __initconst = {
297 + 0xb4, 0xea, 0x66, 0x6e, 0xe1, 0x19, 0x56, 0x33,
298 + 0x66, 0x48, 0x4a, 0x78
299 +};
300 +static const u8 enc_key023[] __initconst = {
301 + 0x11, 0x31, 0xc1, 0x41, 0x85, 0x77, 0xa0, 0x54,
302 + 0xde, 0x7a, 0x4a, 0xc5, 0x51, 0x95, 0x0f, 0x1a,
303 + 0x05, 0x3f, 0x9a, 0xe4, 0x6e, 0x5b, 0x75, 0xfe,
304 + 0x4a, 0xbd, 0x56, 0x08, 0xd7, 0xcd, 0xda, 0xdd
305 +};
306 +
307 +/* wycheproof - misc */
308 +static const u8 enc_input024[] __initconst = {
309 + 0x42, 0xba, 0xae, 0x59, 0x78, 0xfe, 0xaf, 0x5c,
310 + 0x36, 0x8d, 0x14, 0xe0
311 +};
312 +static const u8 enc_output024[] __initconst = {
313 + 0xff, 0x7d, 0xc2, 0x03, 0xb2, 0x6c, 0x46, 0x7a,
314 + 0x6b, 0x50, 0xdb, 0x33, 0x57, 0x8c, 0x0f, 0x27,
315 + 0x58, 0xc2, 0xe1, 0x4e, 0x36, 0xd4, 0xfc, 0x10,
316 + 0x6d, 0xcb, 0x29, 0xb4
317 +};
318 +static const u8 enc_assoc024[] __initconst = { };
319 +static const u8 enc_nonce024[] __initconst = {
320 + 0x9a, 0x59, 0xfc, 0xe2, 0x6d, 0xf0, 0x00, 0x5e,
321 + 0x07, 0x53, 0x86, 0x56
322 +};
323 +static const u8 enc_key024[] __initconst = {
324 + 0x99, 0xb6, 0x2b, 0xd5, 0xaf, 0xbe, 0x3f, 0xb0,
325 + 0x15, 0xbd, 0xe9, 0x3f, 0x0a, 0xbf, 0x48, 0x39,
326 + 0x57, 0xa1, 0xc3, 0xeb, 0x3c, 0xa5, 0x9c, 0xb5,
327 + 0x0b, 0x39, 0xf7, 0xf8, 0xa9, 0xcc, 0x51, 0xbe
328 +};
329 +
330 +/* wycheproof - misc */
331 +static const u8 enc_input025[] __initconst = {
332 + 0xfd, 0xc8, 0x5b, 0x94, 0xa4, 0xb2, 0xa6, 0xb7,
333 + 0x59, 0xb1, 0xa0, 0xda
334 +};
335 +static const u8 enc_output025[] __initconst = {
336 + 0x9f, 0x88, 0x16, 0xde, 0x09, 0x94, 0xe9, 0x38,
337 + 0xd9, 0xe5, 0x3f, 0x95, 0xd0, 0x86, 0xfc, 0x6c,
338 + 0x9d, 0x8f, 0xa9, 0x15, 0xfd, 0x84, 0x23, 0xa7,
339 + 0xcf, 0x05, 0x07, 0x2f
340 +};
341 +static const u8 enc_assoc025[] __initconst = {
342 + 0xa5, 0x06, 0xe1, 0xa5, 0xc6, 0x90, 0x93, 0xf9
343 +};
344 +static const u8 enc_nonce025[] __initconst = {
345 + 0x58, 0xdb, 0xd4, 0xad, 0x2c, 0x4a, 0xd3, 0x5d,
346 + 0xd9, 0x06, 0xe9, 0xce
347 +};
348 +static const u8 enc_key025[] __initconst = {
349 + 0x85, 0xf3, 0x5b, 0x62, 0x82, 0xcf, 0xf4, 0x40,
350 + 0xbc, 0x10, 0x20, 0xc8, 0x13, 0x6f, 0xf2, 0x70,
351 + 0x31, 0x11, 0x0f, 0xa6, 0x3e, 0xc1, 0x6f, 0x1e,
352 + 0x82, 0x51, 0x18, 0xb0, 0x06, 0xb9, 0x12, 0x57
353 +};
354 +
355 +/* wycheproof - misc */
356 +static const u8 enc_input026[] __initconst = {
357 + 0x51, 0xf8, 0xc1, 0xf7, 0x31, 0xea, 0x14, 0xac,
358 + 0xdb, 0x21, 0x0a, 0x6d, 0x97, 0x3e, 0x07
359 +};
360 +static const u8 enc_output026[] __initconst = {
361 + 0x0b, 0x29, 0x63, 0x8e, 0x1f, 0xbd, 0xd6, 0xdf,
362 + 0x53, 0x97, 0x0b, 0xe2, 0x21, 0x00, 0x42, 0x2a,
363 + 0x91, 0x34, 0x08, 0x7d, 0x67, 0xa4, 0x6e, 0x79,
364 + 0x17, 0x8d, 0x0a, 0x93, 0xf5, 0xe1, 0xd2
365 +};
366 +static const u8 enc_assoc026[] __initconst = { };
367 +static const u8 enc_nonce026[] __initconst = {
368 + 0x68, 0xab, 0x7f, 0xdb, 0xf6, 0x19, 0x01, 0xda,
369 + 0xd4, 0x61, 0xd2, 0x3c
370 +};
371 +static const u8 enc_key026[] __initconst = {
372 + 0x67, 0x11, 0x96, 0x27, 0xbd, 0x98, 0x8e, 0xda,
373 + 0x90, 0x62, 0x19, 0xe0, 0x8c, 0x0d, 0x0d, 0x77,
374 + 0x9a, 0x07, 0xd2, 0x08, 0xce, 0x8a, 0x4f, 0xe0,
375 + 0x70, 0x9a, 0xf7, 0x55, 0xee, 0xec, 0x6d, 0xcb
376 +};
377 +
378 +/* wycheproof - misc */
379 +static const u8 enc_input027[] __initconst = {
380 + 0x97, 0x46, 0x9d, 0xa6, 0x67, 0xd6, 0x11, 0x0f,
381 + 0x9c, 0xbd, 0xa1, 0xd1, 0xa2, 0x06, 0x73
382 +};
383 +static const u8 enc_output027[] __initconst = {
384 + 0x32, 0xdb, 0x66, 0xc4, 0xa3, 0x81, 0x9d, 0x81,
385 + 0x55, 0x74, 0x55, 0xe5, 0x98, 0x0f, 0xed, 0xfe,
386 + 0xae, 0x30, 0xde, 0xc9, 0x4e, 0x6a, 0xd3, 0xa9,
387 + 0xee, 0xa0, 0x6a, 0x0d, 0x70, 0x39, 0x17
388 +};
389 +static const u8 enc_assoc027[] __initconst = {
390 + 0x64, 0x53, 0xa5, 0x33, 0x84, 0x63, 0x22, 0x12
391 +};
392 +static const u8 enc_nonce027[] __initconst = {
393 + 0xd9, 0x5b, 0x32, 0x43, 0xaf, 0xae, 0xf7, 0x14,
394 + 0xc5, 0x03, 0x5b, 0x6a
395 +};
396 +static const u8 enc_key027[] __initconst = {
397 + 0xe6, 0xf1, 0x11, 0x8d, 0x41, 0xe4, 0xb4, 0x3f,
398 + 0xb5, 0x82, 0x21, 0xb7, 0xed, 0x79, 0x67, 0x38,
399 + 0x34, 0xe0, 0xd8, 0xac, 0x5c, 0x4f, 0xa6, 0x0b,
400 + 0xbc, 0x8b, 0xc4, 0x89, 0x3a, 0x58, 0x89, 0x4d
401 +};
402 +
403 +/* wycheproof - misc */
404 +static const u8 enc_input028[] __initconst = {
405 + 0x54, 0x9b, 0x36, 0x5a, 0xf9, 0x13, 0xf3, 0xb0,
406 + 0x81, 0x13, 0x1c, 0xcb, 0x6b, 0x82, 0x55, 0x88
407 +};
408 +static const u8 enc_output028[] __initconst = {
409 + 0xe9, 0x11, 0x0e, 0x9f, 0x56, 0xab, 0x3c, 0xa4,
410 + 0x83, 0x50, 0x0c, 0xea, 0xba, 0xb6, 0x7a, 0x13,
411 + 0x83, 0x6c, 0xca, 0xbf, 0x15, 0xa6, 0xa2, 0x2a,
412 + 0x51, 0xc1, 0x07, 0x1c, 0xfa, 0x68, 0xfa, 0x0c
413 +};
414 +static const u8 enc_assoc028[] __initconst = { };
415 +static const u8 enc_nonce028[] __initconst = {
416 + 0x2f, 0xcb, 0x1b, 0x38, 0xa9, 0x9e, 0x71, 0xb8,
417 + 0x47, 0x40, 0xad, 0x9b
418 +};
419 +static const u8 enc_key028[] __initconst = {
420 + 0x59, 0xd4, 0xea, 0xfb, 0x4d, 0xe0, 0xcf, 0xc7,
421 + 0xd3, 0xdb, 0x99, 0xa8, 0xf5, 0x4b, 0x15, 0xd7,
422 + 0xb3, 0x9f, 0x0a, 0xcc, 0x8d, 0xa6, 0x97, 0x63,
423 + 0xb0, 0x19, 0xc1, 0x69, 0x9f, 0x87, 0x67, 0x4a
424 +};
425 +
426 +/* wycheproof - misc */
427 +static const u8 enc_input029[] __initconst = {
428 + 0x55, 0xa4, 0x65, 0x64, 0x4f, 0x5b, 0x65, 0x09,
429 + 0x28, 0xcb, 0xee, 0x7c, 0x06, 0x32, 0x14, 0xd6
430 +};
431 +static const u8 enc_output029[] __initconst = {
432 + 0xe4, 0xb1, 0x13, 0xcb, 0x77, 0x59, 0x45, 0xf3,
433 + 0xd3, 0xa8, 0xae, 0x9e, 0xc1, 0x41, 0xc0, 0x0c,
434 + 0x7c, 0x43, 0xf1, 0x6c, 0xe0, 0x96, 0xd0, 0xdc,
435 + 0x27, 0xc9, 0x58, 0x49, 0xdc, 0x38, 0x3b, 0x7d
436 +};
437 +static const u8 enc_assoc029[] __initconst = {
438 + 0x03, 0x45, 0x85, 0x62, 0x1a, 0xf8, 0xd7, 0xff
439 +};
440 +static const u8 enc_nonce029[] __initconst = {
441 + 0x11, 0x8a, 0x69, 0x64, 0xc2, 0xd3, 0xe3, 0x80,
442 + 0x07, 0x1f, 0x52, 0x66
443 +};
444 +static const u8 enc_key029[] __initconst = {
445 + 0xb9, 0x07, 0xa4, 0x50, 0x75, 0x51, 0x3f, 0xe8,
446 + 0xa8, 0x01, 0x9e, 0xde, 0xe3, 0xf2, 0x59, 0x14,
447 + 0x87, 0xb2, 0xa0, 0x30, 0xb0, 0x3c, 0x6e, 0x1d,
448 + 0x77, 0x1c, 0x86, 0x25, 0x71, 0xd2, 0xea, 0x1e
449 +};
450 +
451 +/* wycheproof - misc */
452 +static const u8 enc_input030[] __initconst = {
453 + 0x3f, 0xf1, 0x51, 0x4b, 0x1c, 0x50, 0x39, 0x15,
454 + 0x91, 0x8f, 0x0c, 0x0c, 0x31, 0x09, 0x4a, 0x6e,
455 + 0x1f
456 +};
457 +static const u8 enc_output030[] __initconst = {
458 + 0x02, 0xcc, 0x3a, 0xcb, 0x5e, 0xe1, 0xfc, 0xdd,
459 + 0x12, 0xa0, 0x3b, 0xb8, 0x57, 0x97, 0x64, 0x74,
460 + 0xd3, 0xd8, 0x3b, 0x74, 0x63, 0xa2, 0xc3, 0x80,
461 + 0x0f, 0xe9, 0x58, 0xc2, 0x8e, 0xaa, 0x29, 0x08,
462 + 0x13
463 +};
464 +static const u8 enc_assoc030[] __initconst = { };
465 +static const u8 enc_nonce030[] __initconst = {
466 + 0x45, 0xaa, 0xa3, 0xe5, 0xd1, 0x6d, 0x2d, 0x42,
467 + 0xdc, 0x03, 0x44, 0x5d
468 +};
469 +static const u8 enc_key030[] __initconst = {
470 + 0x3b, 0x24, 0x58, 0xd8, 0x17, 0x6e, 0x16, 0x21,
471 + 0xc0, 0xcc, 0x24, 0xc0, 0xc0, 0xe2, 0x4c, 0x1e,
472 + 0x80, 0xd7, 0x2f, 0x7e, 0xe9, 0x14, 0x9a, 0x4b,
473 + 0x16, 0x61, 0x76, 0x62, 0x96, 0x16, 0xd0, 0x11
474 +};
475 +
476 +/* wycheproof - misc */
477 +static const u8 enc_input031[] __initconst = {
478 + 0x63, 0x85, 0x8c, 0xa3, 0xe2, 0xce, 0x69, 0x88,
479 + 0x7b, 0x57, 0x8a, 0x3c, 0x16, 0x7b, 0x42, 0x1c,
480 + 0x9c
481 +};
482 +static const u8 enc_output031[] __initconst = {
483 + 0x35, 0x76, 0x64, 0x88, 0xd2, 0xbc, 0x7c, 0x2b,
484 + 0x8d, 0x17, 0xcb, 0xbb, 0x9a, 0xbf, 0xad, 0x9e,
485 + 0x6d, 0x1f, 0x39, 0x1e, 0x65, 0x7b, 0x27, 0x38,
486 + 0xdd, 0xa0, 0x84, 0x48, 0xcb, 0xa2, 0x81, 0x1c,
487 + 0xeb
488 +};
489 +static const u8 enc_assoc031[] __initconst = {
490 + 0x9a, 0xaf, 0x29, 0x9e, 0xee, 0xa7, 0x8f, 0x79
491 +};
492 +static const u8 enc_nonce031[] __initconst = {
493 + 0xf0, 0x38, 0x4f, 0xb8, 0x76, 0x12, 0x14, 0x10,
494 + 0x63, 0x3d, 0x99, 0x3d
495 +};
496 +static const u8 enc_key031[] __initconst = {
497 + 0xf6, 0x0c, 0x6a, 0x1b, 0x62, 0x57, 0x25, 0xf7,
498 + 0x6c, 0x70, 0x37, 0xb4, 0x8f, 0xe3, 0x57, 0x7f,
499 + 0xa7, 0xf7, 0xb8, 0x7b, 0x1b, 0xd5, 0xa9, 0x82,
500 + 0x17, 0x6d, 0x18, 0x23, 0x06, 0xff, 0xb8, 0x70
501 +};
502 +
503 +/* wycheproof - misc */
504 +static const u8 enc_input032[] __initconst = {
505 + 0x10, 0xf1, 0xec, 0xf9, 0xc6, 0x05, 0x84, 0x66,
506 + 0x5d, 0x9a, 0xe5, 0xef, 0xe2, 0x79, 0xe7, 0xf7,
507 + 0x37, 0x7e, 0xea, 0x69, 0x16, 0xd2, 0xb1, 0x11
508 +};
509 +static const u8 enc_output032[] __initconst = {
510 + 0x42, 0xf2, 0x6c, 0x56, 0xcb, 0x4b, 0xe2, 0x1d,
511 + 0x9d, 0x8d, 0x0c, 0x80, 0xfc, 0x99, 0xdd, 0xe0,
512 + 0x0d, 0x75, 0xf3, 0x80, 0x74, 0xbf, 0xe7, 0x64,
513 + 0x54, 0xaa, 0x7e, 0x13, 0xd4, 0x8f, 0xff, 0x7d,
514 + 0x75, 0x57, 0x03, 0x94, 0x57, 0x04, 0x0a, 0x3a
515 +};
516 +static const u8 enc_assoc032[] __initconst = { };
517 +static const u8 enc_nonce032[] __initconst = {
518 + 0xe6, 0xb1, 0xad, 0xf2, 0xfd, 0x58, 0xa8, 0x76,
519 + 0x2c, 0x65, 0xf3, 0x1b
520 +};
521 +static const u8 enc_key032[] __initconst = {
522 + 0x02, 0x12, 0xa8, 0xde, 0x50, 0x07, 0xed, 0x87,
523 + 0xb3, 0x3f, 0x1a, 0x70, 0x90, 0xb6, 0x11, 0x4f,
524 + 0x9e, 0x08, 0xce, 0xfd, 0x96, 0x07, 0xf2, 0xc2,
525 + 0x76, 0xbd, 0xcf, 0xdb, 0xc5, 0xce, 0x9c, 0xd7
526 +};
527 +
528 +/* wycheproof - misc */
529 +static const u8 enc_input033[] __initconst = {
530 + 0x92, 0x22, 0xf9, 0x01, 0x8e, 0x54, 0xfd, 0x6d,
531 + 0xe1, 0x20, 0x08, 0x06, 0xa9, 0xee, 0x8e, 0x4c,
532 + 0xc9, 0x04, 0xd2, 0x9f, 0x25, 0xcb, 0xa1, 0x93
533 +};
534 +static const u8 enc_output033[] __initconst = {
535 + 0x12, 0x30, 0x32, 0x43, 0x7b, 0x4b, 0xfd, 0x69,
536 + 0x20, 0xe8, 0xf7, 0xe7, 0xe0, 0x08, 0x7a, 0xe4,
537 + 0x88, 0x9e, 0xbe, 0x7a, 0x0a, 0xd0, 0xe9, 0x00,
538 + 0x3c, 0xf6, 0x8f, 0x17, 0x95, 0x50, 0xda, 0x63,
539 + 0xd3, 0xb9, 0x6c, 0x2d, 0x55, 0x41, 0x18, 0x65
540 +};
541 +static const u8 enc_assoc033[] __initconst = {
542 + 0x3e, 0x8b, 0xc5, 0xad, 0xe1, 0x82, 0xff, 0x08
543 +};
544 +static const u8 enc_nonce033[] __initconst = {
545 + 0x6b, 0x28, 0x2e, 0xbe, 0xcc, 0x54, 0x1b, 0xcd,
546 + 0x78, 0x34, 0xed, 0x55
547 +};
548 +static const u8 enc_key033[] __initconst = {
549 + 0xc5, 0xbc, 0x09, 0x56, 0x56, 0x46, 0xe7, 0xed,
550 + 0xda, 0x95, 0x4f, 0x1f, 0x73, 0x92, 0x23, 0xda,
551 + 0xda, 0x20, 0xb9, 0x5c, 0x44, 0xab, 0x03, 0x3d,
552 + 0x0f, 0xae, 0x4b, 0x02, 0x83, 0xd1, 0x8b, 0xe3
553 +};
554 +
555 +/* wycheproof - misc */
556 +static const u8 enc_input034[] __initconst = {
557 + 0xb0, 0x53, 0x99, 0x92, 0x86, 0xa2, 0x82, 0x4f,
558 + 0x42, 0xcc, 0x8c, 0x20, 0x3a, 0xb2, 0x4e, 0x2c,
559 + 0x97, 0xa6, 0x85, 0xad, 0xcc, 0x2a, 0xd3, 0x26,
560 + 0x62, 0x55, 0x8e, 0x55, 0xa5, 0xc7, 0x29
561 +};
562 +static const u8 enc_output034[] __initconst = {
563 + 0x45, 0xc7, 0xd6, 0xb5, 0x3a, 0xca, 0xd4, 0xab,
564 + 0xb6, 0x88, 0x76, 0xa6, 0xe9, 0x6a, 0x48, 0xfb,
565 + 0x59, 0x52, 0x4d, 0x2c, 0x92, 0xc9, 0xd8, 0xa1,
566 + 0x89, 0xc9, 0xfd, 0x2d, 0xb9, 0x17, 0x46, 0x56,
567 + 0x6d, 0x3c, 0xa1, 0x0e, 0x31, 0x1b, 0x69, 0x5f,
568 + 0x3e, 0xae, 0x15, 0x51, 0x65, 0x24, 0x93
569 +};
570 +static const u8 enc_assoc034[] __initconst = { };
571 +static const u8 enc_nonce034[] __initconst = {
572 + 0x04, 0xa9, 0xbe, 0x03, 0x50, 0x8a, 0x5f, 0x31,
573 + 0x37, 0x1a, 0x6f, 0xd2
574 +};
575 +static const u8 enc_key034[] __initconst = {
576 + 0x2e, 0xb5, 0x1c, 0x46, 0x9a, 0xa8, 0xeb, 0x9e,
577 + 0x6c, 0x54, 0xa8, 0x34, 0x9b, 0xae, 0x50, 0xa2,
578 + 0x0f, 0x0e, 0x38, 0x27, 0x11, 0xbb, 0xa1, 0x15,
579 + 0x2c, 0x42, 0x4f, 0x03, 0xb6, 0x67, 0x1d, 0x71
580 +};
581 +
582 +/* wycheproof - misc */
583 +static const u8 enc_input035[] __initconst = {
584 + 0xf4, 0x52, 0x06, 0xab, 0xc2, 0x55, 0x52, 0xb2,
585 + 0xab, 0xc9, 0xab, 0x7f, 0xa2, 0x43, 0x03, 0x5f,
586 + 0xed, 0xaa, 0xdd, 0xc3, 0xb2, 0x29, 0x39, 0x56,
587 + 0xf1, 0xea, 0x6e, 0x71, 0x56, 0xe7, 0xeb
588 +};
589 +static const u8 enc_output035[] __initconst = {
590 + 0x46, 0xa8, 0x0c, 0x41, 0x87, 0x02, 0x47, 0x20,
591 + 0x08, 0x46, 0x27, 0x58, 0x00, 0x80, 0xdd, 0xe5,
592 + 0xa3, 0xf4, 0xa1, 0x10, 0x93, 0xa7, 0x07, 0x6e,
593 + 0xd6, 0xf3, 0xd3, 0x26, 0xbc, 0x7b, 0x70, 0x53,
594 + 0x4d, 0x4a, 0xa2, 0x83, 0x5a, 0x52, 0xe7, 0x2d,
595 + 0x14, 0xdf, 0x0e, 0x4f, 0x47, 0xf2, 0x5f
596 +};
597 +static const u8 enc_assoc035[] __initconst = {
598 + 0x37, 0x46, 0x18, 0xa0, 0x6e, 0xa9, 0x8a, 0x48
599 +};
600 +static const u8 enc_nonce035[] __initconst = {
601 + 0x47, 0x0a, 0x33, 0x9e, 0xcb, 0x32, 0x19, 0xb8,
602 + 0xb8, 0x1a, 0x1f, 0x8b
603 +};
604 +static const u8 enc_key035[] __initconst = {
605 + 0x7f, 0x5b, 0x74, 0xc0, 0x7e, 0xd1, 0xb4, 0x0f,
606 + 0xd1, 0x43, 0x58, 0xfe, 0x2f, 0xf2, 0xa7, 0x40,
607 + 0xc1, 0x16, 0xc7, 0x70, 0x65, 0x10, 0xe6, 0xa4,
608 + 0x37, 0xf1, 0x9e, 0xa4, 0x99, 0x11, 0xce, 0xc4
609 +};
610 +
611 +/* wycheproof - misc */
612 +static const u8 enc_input036[] __initconst = {
613 + 0xb9, 0xc5, 0x54, 0xcb, 0xc3, 0x6a, 0xc1, 0x8a,
614 + 0xe8, 0x97, 0xdf, 0x7b, 0xee, 0xca, 0xc1, 0xdb,
615 + 0xeb, 0x4e, 0xaf, 0xa1, 0x56, 0xbb, 0x60, 0xce,
616 + 0x2e, 0x5d, 0x48, 0xf0, 0x57, 0x15, 0xe6, 0x78
617 +};
618 +static const u8 enc_output036[] __initconst = {
619 + 0xea, 0x29, 0xaf, 0xa4, 0x9d, 0x36, 0xe8, 0x76,
620 + 0x0f, 0x5f, 0xe1, 0x97, 0x23, 0xb9, 0x81, 0x1e,
621 + 0xd5, 0xd5, 0x19, 0x93, 0x4a, 0x44, 0x0f, 0x50,
622 + 0x81, 0xac, 0x43, 0x0b, 0x95, 0x3b, 0x0e, 0x21,
623 + 0x22, 0x25, 0x41, 0xaf, 0x46, 0xb8, 0x65, 0x33,
624 + 0xc6, 0xb6, 0x8d, 0x2f, 0xf1, 0x08, 0xa7, 0xea
625 +};
626 +static const u8 enc_assoc036[] __initconst = { };
627 +static const u8 enc_nonce036[] __initconst = {
628 + 0x72, 0xcf, 0xd9, 0x0e, 0xf3, 0x02, 0x6c, 0xa2,
629 + 0x2b, 0x7e, 0x6e, 0x6a
630 +};
631 +static const u8 enc_key036[] __initconst = {
632 + 0xe1, 0x73, 0x1d, 0x58, 0x54, 0xe1, 0xb7, 0x0c,
633 + 0xb3, 0xff, 0xe8, 0xb7, 0x86, 0xa2, 0xb3, 0xeb,
634 + 0xf0, 0x99, 0x43, 0x70, 0x95, 0x47, 0x57, 0xb9,
635 + 0xdc, 0x8c, 0x7b, 0xc5, 0x35, 0x46, 0x34, 0xa3
636 +};
637 +
638 +/* wycheproof - misc */
639 +static const u8 enc_input037[] __initconst = {
640 + 0x6b, 0x26, 0x04, 0x99, 0x6c, 0xd3, 0x0c, 0x14,
641 + 0xa1, 0x3a, 0x52, 0x57, 0xed, 0x6c, 0xff, 0xd3,
642 + 0xbc, 0x5e, 0x29, 0xd6, 0xb9, 0x7e, 0xb1, 0x79,
643 + 0x9e, 0xb3, 0x35, 0xe2, 0x81, 0xea, 0x45, 0x1e
644 +};
645 +static const u8 enc_output037[] __initconst = {
646 + 0x6d, 0xad, 0x63, 0x78, 0x97, 0x54, 0x4d, 0x8b,
647 + 0xf6, 0xbe, 0x95, 0x07, 0xed, 0x4d, 0x1b, 0xb2,
648 + 0xe9, 0x54, 0xbc, 0x42, 0x7e, 0x5d, 0xe7, 0x29,
649 + 0xda, 0xf5, 0x07, 0x62, 0x84, 0x6f, 0xf2, 0xf4,
650 + 0x7b, 0x99, 0x7d, 0x93, 0xc9, 0x82, 0x18, 0x9d,
651 + 0x70, 0x95, 0xdc, 0x79, 0x4c, 0x74, 0x62, 0x32
652 +};
653 +static const u8 enc_assoc037[] __initconst = {
654 + 0x23, 0x33, 0xe5, 0xce, 0x0f, 0x93, 0xb0, 0x59
655 +};
656 +static const u8 enc_nonce037[] __initconst = {
657 + 0x26, 0x28, 0x80, 0xd4, 0x75, 0xf3, 0xda, 0xc5,
658 + 0x34, 0x0d, 0xd1, 0xb8
659 +};
660 +static const u8 enc_key037[] __initconst = {
661 + 0x27, 0xd8, 0x60, 0x63, 0x1b, 0x04, 0x85, 0xa4,
662 + 0x10, 0x70, 0x2f, 0xea, 0x61, 0xbc, 0x87, 0x3f,
663 + 0x34, 0x42, 0x26, 0x0c, 0xad, 0xed, 0x4a, 0xbd,
664 + 0xe2, 0x5b, 0x78, 0x6a, 0x2d, 0x97, 0xf1, 0x45
665 +};
666 +
667 +/* wycheproof - misc */
668 +static const u8 enc_input038[] __initconst = {
669 + 0x97, 0x3d, 0x0c, 0x75, 0x38, 0x26, 0xba, 0xe4,
670 + 0x66, 0xcf, 0x9a, 0xbb, 0x34, 0x93, 0x15, 0x2e,
671 + 0x9d, 0xe7, 0x81, 0x9e, 0x2b, 0xd0, 0xc7, 0x11,
672 + 0x71, 0x34, 0x6b, 0x4d, 0x2c, 0xeb, 0xf8, 0x04,
673 + 0x1a, 0xa3, 0xce, 0xdc, 0x0d, 0xfd, 0x7b, 0x46,
674 + 0x7e, 0x26, 0x22, 0x8b, 0xc8, 0x6c, 0x9a
675 +};
676 +static const u8 enc_output038[] __initconst = {
677 + 0xfb, 0xa7, 0x8a, 0xe4, 0xf9, 0xd8, 0x08, 0xa6,
678 + 0x2e, 0x3d, 0xa4, 0x0b, 0xe2, 0xcb, 0x77, 0x00,
679 + 0xc3, 0x61, 0x3d, 0x9e, 0xb2, 0xc5, 0x29, 0xc6,
680 + 0x52, 0xe7, 0x6a, 0x43, 0x2c, 0x65, 0x8d, 0x27,
681 + 0x09, 0x5f, 0x0e, 0xb8, 0xf9, 0x40, 0xc3, 0x24,
682 + 0x98, 0x1e, 0xa9, 0x35, 0xe5, 0x07, 0xf9, 0x8f,
683 + 0x04, 0x69, 0x56, 0xdb, 0x3a, 0x51, 0x29, 0x08,
684 + 0xbd, 0x7a, 0xfc, 0x8f, 0x2a, 0xb0, 0xa9
685 +};
686 +static const u8 enc_assoc038[] __initconst = { };
687 +static const u8 enc_nonce038[] __initconst = {
688 + 0xe7, 0x4a, 0x51, 0x5e, 0x7e, 0x21, 0x02, 0xb9,
689 + 0x0b, 0xef, 0x55, 0xd2
690 +};
691 +static const u8 enc_key038[] __initconst = {
692 + 0xcf, 0x0d, 0x40, 0xa4, 0x64, 0x4e, 0x5f, 0x51,
693 + 0x81, 0x51, 0x65, 0xd5, 0x30, 0x1b, 0x22, 0x63,
694 + 0x1f, 0x45, 0x44, 0xc4, 0x9a, 0x18, 0x78, 0xe3,
695 + 0xa0, 0xa5, 0xe8, 0xe1, 0xaa, 0xe0, 0xf2, 0x64
696 +};
697 +
698 +/* wycheproof - misc */
699 +static const u8 enc_input039[] __initconst = {
700 + 0xa9, 0x89, 0x95, 0x50, 0x4d, 0xf1, 0x6f, 0x74,
701 + 0x8b, 0xfb, 0x77, 0x85, 0xff, 0x91, 0xee, 0xb3,
702 + 0xb6, 0x60, 0xea, 0x9e, 0xd3, 0x45, 0x0c, 0x3d,
703 + 0x5e, 0x7b, 0x0e, 0x79, 0xef, 0x65, 0x36, 0x59,
704 + 0xa9, 0x97, 0x8d, 0x75, 0x54, 0x2e, 0xf9, 0x1c,
705 + 0x45, 0x67, 0x62, 0x21, 0x56, 0x40, 0xb9
706 +};
707 +static const u8 enc_output039[] __initconst = {
708 + 0xa1, 0xff, 0xed, 0x80, 0x76, 0x18, 0x29, 0xec,
709 + 0xce, 0x24, 0x2e, 0x0e, 0x88, 0xb1, 0x38, 0x04,
710 + 0x90, 0x16, 0xbc, 0xa0, 0x18, 0xda, 0x2b, 0x6e,
711 + 0x19, 0x98, 0x6b, 0x3e, 0x31, 0x8c, 0xae, 0x8d,
712 + 0x80, 0x61, 0x98, 0xfb, 0x4c, 0x52, 0x7c, 0xc3,
713 + 0x93, 0x50, 0xeb, 0xdd, 0xea, 0xc5, 0x73, 0xc4,
714 + 0xcb, 0xf0, 0xbe, 0xfd, 0xa0, 0xb7, 0x02, 0x42,
715 + 0xc6, 0x40, 0xd7, 0xcd, 0x02, 0xd7, 0xa3
716 +};
717 +static const u8 enc_assoc039[] __initconst = {
718 + 0xb3, 0xe4, 0x06, 0x46, 0x83, 0xb0, 0x2d, 0x84
719 +};
720 +static const u8 enc_nonce039[] __initconst = {
721 + 0xd4, 0xd8, 0x07, 0x34, 0x16, 0x83, 0x82, 0x5b,
722 + 0x31, 0xcd, 0x4d, 0x95
723 +};
724 +static const u8 enc_key039[] __initconst = {
725 + 0x6c, 0xbf, 0xd7, 0x1c, 0x64, 0x5d, 0x18, 0x4c,
726 + 0xf5, 0xd2, 0x3c, 0x40, 0x2b, 0xdb, 0x0d, 0x25,
727 + 0xec, 0x54, 0x89, 0x8c, 0x8a, 0x02, 0x73, 0xd4,
728 + 0x2e, 0xb5, 0xbe, 0x10, 0x9f, 0xdc, 0xb2, 0xac
729 +};
730 +
731 +/* wycheproof - misc */
732 +static const u8 enc_input040[] __initconst = {
733 + 0xd0, 0x96, 0x80, 0x31, 0x81, 0xbe, 0xef, 0x9e,
734 + 0x00, 0x8f, 0xf8, 0x5d, 0x5d, 0xdc, 0x38, 0xdd,
735 + 0xac, 0xf0, 0xf0, 0x9e, 0xe5, 0xf7, 0xe0, 0x7f,
736 + 0x1e, 0x40, 0x79, 0xcb, 0x64, 0xd0, 0xdc, 0x8f,
737 + 0x5e, 0x67, 0x11, 0xcd, 0x49, 0x21, 0xa7, 0x88,
738 + 0x7d, 0xe7, 0x6e, 0x26, 0x78, 0xfd, 0xc6, 0x76,
739 + 0x18, 0xf1, 0x18, 0x55, 0x86, 0xbf, 0xea, 0x9d,
740 + 0x4c, 0x68, 0x5d, 0x50, 0xe4, 0xbb, 0x9a, 0x82
741 +};
742 +static const u8 enc_output040[] __initconst = {
743 + 0x9a, 0x4e, 0xf2, 0x2b, 0x18, 0x16, 0x77, 0xb5,
744 + 0x75, 0x5c, 0x08, 0xf7, 0x47, 0xc0, 0xf8, 0xd8,
745 + 0xe8, 0xd4, 0xc1, 0x8a, 0x9c, 0xc2, 0x40, 0x5c,
746 + 0x12, 0xbb, 0x51, 0xbb, 0x18, 0x72, 0xc8, 0xe8,
747 + 0xb8, 0x77, 0x67, 0x8b, 0xec, 0x44, 0x2c, 0xfc,
748 + 0xbb, 0x0f, 0xf4, 0x64, 0xa6, 0x4b, 0x74, 0x33,
749 + 0x2c, 0xf0, 0x72, 0x89, 0x8c, 0x7e, 0x0e, 0xdd,
750 + 0xf6, 0x23, 0x2e, 0xa6, 0xe2, 0x7e, 0xfe, 0x50,
751 + 0x9f, 0xf3, 0x42, 0x7a, 0x0f, 0x32, 0xfa, 0x56,
752 + 0x6d, 0x9c, 0xa0, 0xa7, 0x8a, 0xef, 0xc0, 0x13
753 +};
754 +static const u8 enc_assoc040[] __initconst = { };
755 +static const u8 enc_nonce040[] __initconst = {
756 + 0xd6, 0x10, 0x40, 0xa3, 0x13, 0xed, 0x49, 0x28,
757 + 0x23, 0xcc, 0x06, 0x5b
758 +};
759 +static const u8 enc_key040[] __initconst = {
760 + 0x5b, 0x1d, 0x10, 0x35, 0xc0, 0xb1, 0x7e, 0xe0,
761 + 0xb0, 0x44, 0x47, 0x67, 0xf8, 0x0a, 0x25, 0xb8,
762 + 0xc1, 0xb7, 0x41, 0xf4, 0xb5, 0x0a, 0x4d, 0x30,
763 + 0x52, 0x22, 0x6b, 0xaa, 0x1c, 0x6f, 0xb7, 0x01
764 +};
765 +
766 +/* wycheproof - misc */
767 +static const u8 enc_input041[] __initconst = {
768 + 0x94, 0xee, 0x16, 0x6d, 0x6d, 0x6e, 0xcf, 0x88,
769 + 0x32, 0x43, 0x71, 0x36, 0xb4, 0xae, 0x80, 0x5d,
770 + 0x42, 0x88, 0x64, 0x35, 0x95, 0x86, 0xd9, 0x19,
771 + 0x3a, 0x25, 0x01, 0x62, 0x93, 0xed, 0xba, 0x44,
772 + 0x3c, 0x58, 0xe0, 0x7e, 0x7b, 0x71, 0x95, 0xec,
773 + 0x5b, 0xd8, 0x45, 0x82, 0xa9, 0xd5, 0x6c, 0x8d,
774 + 0x4a, 0x10, 0x8c, 0x7d, 0x7c, 0xe3, 0x4e, 0x6c,
775 + 0x6f, 0x8e, 0xa1, 0xbe, 0xc0, 0x56, 0x73, 0x17
776 +};
777 +static const u8 enc_output041[] __initconst = {
778 + 0x5f, 0xbb, 0xde, 0xcc, 0x34, 0xbe, 0x20, 0x16,
779 + 0x14, 0xf6, 0x36, 0x03, 0x1e, 0xeb, 0x42, 0xf1,
780 + 0xca, 0xce, 0x3c, 0x79, 0xa1, 0x2c, 0xff, 0xd8,
781 + 0x71, 0xee, 0x8e, 0x73, 0x82, 0x0c, 0x82, 0x97,
782 + 0x49, 0xf1, 0xab, 0xb4, 0x29, 0x43, 0x67, 0x84,
783 + 0x9f, 0xb6, 0xc2, 0xaa, 0x56, 0xbd, 0xa8, 0xa3,
784 + 0x07, 0x8f, 0x72, 0x3d, 0x7c, 0x1c, 0x85, 0x20,
785 + 0x24, 0xb0, 0x17, 0xb5, 0x89, 0x73, 0xfb, 0x1e,
786 + 0x09, 0x26, 0x3d, 0xa7, 0xb4, 0xcb, 0x92, 0x14,
787 + 0x52, 0xf9, 0x7d, 0xca, 0x40, 0xf5, 0x80, 0xec
788 +};
789 +static const u8 enc_assoc041[] __initconst = {
790 + 0x71, 0x93, 0xf6, 0x23, 0x66, 0x33, 0x21, 0xa2
791 +};
792 +static const u8 enc_nonce041[] __initconst = {
793 + 0xd3, 0x1c, 0x21, 0xab, 0xa1, 0x75, 0xb7, 0x0d,
794 + 0xe4, 0xeb, 0xb1, 0x9c
795 +};
796 +static const u8 enc_key041[] __initconst = {
797 + 0x97, 0xd6, 0x35, 0xc4, 0xf4, 0x75, 0x74, 0xd9,
798 + 0x99, 0x8a, 0x90, 0x87, 0x5d, 0xa1, 0xd3, 0xa2,
799 + 0x84, 0xb7, 0x55, 0xb2, 0xd3, 0x92, 0x97, 0xa5,
800 + 0x72, 0x52, 0x35, 0x19, 0x0e, 0x10, 0xa9, 0x7e
801 +};
802 +
803 +/* wycheproof - misc */
804 +static const u8 enc_input042[] __initconst = {
805 + 0xb4, 0x29, 0xeb, 0x80, 0xfb, 0x8f, 0xe8, 0xba,
806 + 0xed, 0xa0, 0xc8, 0x5b, 0x9c, 0x33, 0x34, 0x58,
807 + 0xe7, 0xc2, 0x99, 0x2e, 0x55, 0x84, 0x75, 0x06,
808 + 0x9d, 0x12, 0xd4, 0x5c, 0x22, 0x21, 0x75, 0x64,
809 + 0x12, 0x15, 0x88, 0x03, 0x22, 0x97, 0xef, 0xf5,
810 + 0x67, 0x83, 0x74, 0x2a, 0x5f, 0xc2, 0x2d, 0x74,
811 + 0x10, 0xff, 0xb2, 0x9d, 0x66, 0x09, 0x86, 0x61,
812 + 0xd7, 0x6f, 0x12, 0x6c, 0x3c, 0x27, 0x68, 0x9e,
813 + 0x43, 0xb3, 0x72, 0x67, 0xca, 0xc5, 0xa3, 0xa6,
814 + 0xd3, 0xab, 0x49, 0xe3, 0x91, 0xda, 0x29, 0xcd,
815 + 0x30, 0x54, 0xa5, 0x69, 0x2e, 0x28, 0x07, 0xe4,
816 + 0xc3, 0xea, 0x46, 0xc8, 0x76, 0x1d, 0x50, 0xf5,
817 + 0x92
818 +};
819 +static const u8 enc_output042[] __initconst = {
820 + 0xd0, 0x10, 0x2f, 0x6c, 0x25, 0x8b, 0xf4, 0x97,
821 + 0x42, 0xce, 0xc3, 0x4c, 0xf2, 0xd0, 0xfe, 0xdf,
822 + 0x23, 0xd1, 0x05, 0xfb, 0x4c, 0x84, 0xcf, 0x98,
823 + 0x51, 0x5e, 0x1b, 0xc9, 0xa6, 0x4f, 0x8a, 0xd5,
824 + 0xbe, 0x8f, 0x07, 0x21, 0xbd, 0xe5, 0x06, 0x45,
825 + 0xd0, 0x00, 0x83, 0xc3, 0xa2, 0x63, 0xa3, 0x10,
826 + 0x53, 0xb7, 0x60, 0x24, 0x5f, 0x52, 0xae, 0x28,
827 + 0x66, 0xa5, 0xec, 0x83, 0xb1, 0x9f, 0x61, 0xbe,
828 + 0x1d, 0x30, 0xd5, 0xc5, 0xd9, 0xfe, 0xcc, 0x4c,
829 + 0xbb, 0xe0, 0x8f, 0xd3, 0x85, 0x81, 0x3a, 0x2a,
830 + 0xa3, 0x9a, 0x00, 0xff, 0x9c, 0x10, 0xf7, 0xf2,
831 + 0x37, 0x02, 0xad, 0xd1, 0xe4, 0xb2, 0xff, 0xa3,
832 + 0x1c, 0x41, 0x86, 0x5f, 0xc7, 0x1d, 0xe1, 0x2b,
833 + 0x19, 0x61, 0x21, 0x27, 0xce, 0x49, 0x99, 0x3b,
834 + 0xb0
835 +};
836 +static const u8 enc_assoc042[] __initconst = { };
837 +static const u8 enc_nonce042[] __initconst = {
838 + 0x17, 0xc8, 0x6a, 0x8a, 0xbb, 0xb7, 0xe0, 0x03,
839 + 0xac, 0xde, 0x27, 0x99
840 +};
841 +static const u8 enc_key042[] __initconst = {
842 + 0xfe, 0x6e, 0x55, 0xbd, 0xae, 0xd1, 0xf7, 0x28,
843 + 0x4c, 0xa5, 0xfc, 0x0f, 0x8c, 0x5f, 0x2b, 0x8d,
844 + 0xf5, 0x6d, 0xc0, 0xf4, 0x9e, 0x8c, 0xa6, 0x6a,
845 + 0x41, 0x99, 0x5e, 0x78, 0x33, 0x51, 0xf9, 0x01
846 +};
847 +
848 +/* wycheproof - misc */
849 +static const u8 enc_input043[] __initconst = {
850 + 0xce, 0xb5, 0x34, 0xce, 0x50, 0xdc, 0x23, 0xff,
851 + 0x63, 0x8a, 0xce, 0x3e, 0xf6, 0x3a, 0xb2, 0xcc,
852 + 0x29, 0x73, 0xee, 0xad, 0xa8, 0x07, 0x85, 0xfc,
853 + 0x16, 0x5d, 0x06, 0xc2, 0xf5, 0x10, 0x0f, 0xf5,
854 + 0xe8, 0xab, 0x28, 0x82, 0xc4, 0x75, 0xaf, 0xcd,
855 + 0x05, 0xcc, 0xd4, 0x9f, 0x2e, 0x7d, 0x8f, 0x55,
856 + 0xef, 0x3a, 0x72, 0xe3, 0xdc, 0x51, 0xd6, 0x85,
857 + 0x2b, 0x8e, 0x6b, 0x9e, 0x7a, 0xec, 0xe5, 0x7b,
858 + 0xe6, 0x55, 0x6b, 0x0b, 0x6d, 0x94, 0x13, 0xe3,
859 + 0x3f, 0xc5, 0xfc, 0x24, 0xa9, 0xa2, 0x05, 0xad,
860 + 0x59, 0x57, 0x4b, 0xb3, 0x9d, 0x94, 0x4a, 0x92,
861 + 0xdc, 0x47, 0x97, 0x0d, 0x84, 0xa6, 0xad, 0x31,
862 + 0x76
863 +};
864 +static const u8 enc_output043[] __initconst = {
865 + 0x75, 0x45, 0x39, 0x1b, 0x51, 0xde, 0x01, 0xd5,
866 + 0xc5, 0x3d, 0xfa, 0xca, 0x77, 0x79, 0x09, 0x06,
867 + 0x3e, 0x58, 0xed, 0xee, 0x4b, 0xb1, 0x22, 0x7e,
868 + 0x71, 0x10, 0xac, 0x4d, 0x26, 0x20, 0xc2, 0xae,
869 + 0xc2, 0xf8, 0x48, 0xf5, 0x6d, 0xee, 0xb0, 0x37,
870 + 0xa8, 0xdc, 0xed, 0x75, 0xaf, 0xa8, 0xa6, 0xc8,
871 + 0x90, 0xe2, 0xde, 0xe4, 0x2f, 0x95, 0x0b, 0xb3,
872 + 0x3d, 0x9e, 0x24, 0x24, 0xd0, 0x8a, 0x50, 0x5d,
873 + 0x89, 0x95, 0x63, 0x97, 0x3e, 0xd3, 0x88, 0x70,
874 + 0xf3, 0xde, 0x6e, 0xe2, 0xad, 0xc7, 0xfe, 0x07,
875 + 0x2c, 0x36, 0x6c, 0x14, 0xe2, 0xcf, 0x7c, 0xa6,
876 + 0x2f, 0xb3, 0xd3, 0x6b, 0xee, 0x11, 0x68, 0x54,
877 + 0x61, 0xb7, 0x0d, 0x44, 0xef, 0x8c, 0x66, 0xc5,
878 + 0xc7, 0xbb, 0xf1, 0x0d, 0xca, 0xdd, 0x7f, 0xac,
879 + 0xf6
880 +};
881 +static const u8 enc_assoc043[] __initconst = {
882 + 0xa1, 0x1c, 0x40, 0xb6, 0x03, 0x76, 0x73, 0x30
883 +};
884 +static const u8 enc_nonce043[] __initconst = {
885 + 0x46, 0x36, 0x2f, 0x45, 0xd6, 0x37, 0x9e, 0x63,
886 + 0xe5, 0x22, 0x94, 0x60
887 +};
888 +static const u8 enc_key043[] __initconst = {
889 + 0xaa, 0xbc, 0x06, 0x34, 0x74, 0xe6, 0x5c, 0x4c,
890 + 0x3e, 0x9b, 0xdc, 0x48, 0x0d, 0xea, 0x97, 0xb4,
891 + 0x51, 0x10, 0xc8, 0x61, 0x88, 0x46, 0xff, 0x6b,
892 + 0x15, 0xbd, 0xd2, 0xa4, 0xa5, 0x68, 0x2c, 0x4e
893 +};
894 +
895 +/* wycheproof - misc */
896 +static const u8 enc_input044[] __initconst = {
897 + 0xe5, 0xcc, 0xaa, 0x44, 0x1b, 0xc8, 0x14, 0x68,
898 + 0x8f, 0x8f, 0x6e, 0x8f, 0x28, 0xb5, 0x00, 0xb2
899 +};
900 +static const u8 enc_output044[] __initconst = {
901 + 0x7e, 0x72, 0xf5, 0xa1, 0x85, 0xaf, 0x16, 0xa6,
902 + 0x11, 0x92, 0x1b, 0x43, 0x8f, 0x74, 0x9f, 0x0b,
903 + 0x12, 0x42, 0xc6, 0x70, 0x73, 0x23, 0x34, 0x02,
904 + 0x9a, 0xdf, 0xe1, 0xc5, 0x00, 0x16, 0x51, 0xe4
905 +};
906 +static const u8 enc_assoc044[] __initconst = {
907 + 0x02
908 +};
909 +static const u8 enc_nonce044[] __initconst = {
910 + 0x87, 0x34, 0x5f, 0x10, 0x55, 0xfd, 0x9e, 0x21,
911 + 0x02, 0xd5, 0x06, 0x56
912 +};
913 +static const u8 enc_key044[] __initconst = {
914 + 0x7d, 0x00, 0xb4, 0x80, 0x95, 0xad, 0xfa, 0x32,
915 + 0x72, 0x05, 0x06, 0x07, 0xb2, 0x64, 0x18, 0x50,
916 + 0x02, 0xba, 0x99, 0x95, 0x7c, 0x49, 0x8b, 0xe0,
917 + 0x22, 0x77, 0x0f, 0x2c, 0xe2, 0xf3, 0x14, 0x3c
918 +};
919 +
920 +/* wycheproof - misc */
921 +static const u8 enc_input045[] __initconst = {
922 + 0x02, 0xcd, 0xe1, 0x68, 0xfb, 0xa3, 0xf5, 0x44,
923 + 0xbb, 0xd0, 0x33, 0x2f, 0x7a, 0xde, 0xad, 0xa8
924 +};
925 +static const u8 enc_output045[] __initconst = {
926 + 0x85, 0xf2, 0x9a, 0x71, 0x95, 0x57, 0xcd, 0xd1,
927 + 0x4d, 0x1f, 0x8f, 0xff, 0xab, 0x6d, 0x9e, 0x60,
928 + 0x73, 0x2c, 0xa3, 0x2b, 0xec, 0xd5, 0x15, 0xa1,
929 + 0xed, 0x35, 0x3f, 0x54, 0x2e, 0x99, 0x98, 0x58
930 +};
931 +static const u8 enc_assoc045[] __initconst = {
932 + 0xb6, 0x48
933 +};
934 +static const u8 enc_nonce045[] __initconst = {
935 + 0x87, 0xa3, 0x16, 0x3e, 0xc0, 0x59, 0x8a, 0xd9,
936 + 0x5b, 0x3a, 0xa7, 0x13
937 +};
938 +static const u8 enc_key045[] __initconst = {
939 + 0x64, 0x32, 0x71, 0x7f, 0x1d, 0xb8, 0x5e, 0x41,
940 + 0xac, 0x78, 0x36, 0xbc, 0xe2, 0x51, 0x85, 0xa0,
941 + 0x80, 0xd5, 0x76, 0x2b, 0x9e, 0x2b, 0x18, 0x44,
942 + 0x4b, 0x6e, 0xc7, 0x2c, 0x3b, 0xd8, 0xe4, 0xdc
943 +};
944 +
945 +/* wycheproof - misc */
946 +static const u8 enc_input046[] __initconst = {
947 + 0x16, 0xdd, 0xd2, 0x3f, 0xf5, 0x3f, 0x3d, 0x23,
948 + 0xc0, 0x63, 0x34, 0x48, 0x70, 0x40, 0xeb, 0x47
949 +};
950 +static const u8 enc_output046[] __initconst = {
951 + 0xc1, 0xb2, 0x95, 0x93, 0x6d, 0x56, 0xfa, 0xda,
952 + 0xc0, 0x3e, 0x5f, 0x74, 0x2b, 0xff, 0x73, 0xa1,
953 + 0x39, 0xc4, 0x57, 0xdb, 0xab, 0x66, 0x38, 0x2b,
954 + 0xab, 0xb3, 0xb5, 0x58, 0x00, 0xcd, 0xa5, 0xb8
955 +};
956 +static const u8 enc_assoc046[] __initconst = {
957 + 0xbd, 0x4c, 0xd0, 0x2f, 0xc7, 0x50, 0x2b, 0xbd,
958 + 0xbd, 0xf6, 0xc9, 0xa3, 0xcb, 0xe8, 0xf0
959 +};
960 +static const u8 enc_nonce046[] __initconst = {
961 + 0x6f, 0x57, 0x3a, 0xa8, 0x6b, 0xaa, 0x49, 0x2b,
962 + 0xa4, 0x65, 0x96, 0xdf
963 +};
964 +static const u8 enc_key046[] __initconst = {
965 + 0x8e, 0x34, 0xcf, 0x73, 0xd2, 0x45, 0xa1, 0x08,
966 + 0x2a, 0x92, 0x0b, 0x86, 0x36, 0x4e, 0xb8, 0x96,
967 + 0xc4, 0x94, 0x64, 0x67, 0xbc, 0xb3, 0xd5, 0x89,
968 + 0x29, 0xfc, 0xb3, 0x66, 0x90, 0xe6, 0x39, 0x4f
969 +};
970 +
971 +/* wycheproof - misc */
972 +static const u8 enc_input047[] __initconst = {
973 + 0x62, 0x3b, 0x78, 0x50, 0xc3, 0x21, 0xe2, 0xcf,
974 + 0x0c, 0x6f, 0xbc, 0xc8, 0xdf, 0xd1, 0xaf, 0xf2
975 +};
976 +static const u8 enc_output047[] __initconst = {
977 + 0xc8, 0x4c, 0x9b, 0xb7, 0xc6, 0x1c, 0x1b, 0xcb,
978 + 0x17, 0x77, 0x2a, 0x1c, 0x50, 0x0c, 0x50, 0x95,
979 + 0xdb, 0xad, 0xf7, 0xa5, 0x13, 0x8c, 0xa0, 0x34,
980 + 0x59, 0xa2, 0xcd, 0x65, 0x83, 0x1e, 0x09, 0x2f
981 +};
982 +static const u8 enc_assoc047[] __initconst = {
983 + 0x89, 0xcc, 0xe9, 0xfb, 0x47, 0x44, 0x1d, 0x07,
984 + 0xe0, 0x24, 0x5a, 0x66, 0xfe, 0x8b, 0x77, 0x8b
985 +};
986 +static const u8 enc_nonce047[] __initconst = {
987 + 0x1a, 0x65, 0x18, 0xf0, 0x2e, 0xde, 0x1d, 0xa6,
988 + 0x80, 0x92, 0x66, 0xd9
989 +};
990 +static const u8 enc_key047[] __initconst = {
991 + 0xcb, 0x55, 0x75, 0xf5, 0xc7, 0xc4, 0x5c, 0x91,
992 + 0xcf, 0x32, 0x0b, 0x13, 0x9f, 0xb5, 0x94, 0x23,
993 + 0x75, 0x60, 0xd0, 0xa3, 0xe6, 0xf8, 0x65, 0xa6,
994 + 0x7d, 0x4f, 0x63, 0x3f, 0x2c, 0x08, 0xf0, 0x16
995 +};
996 +
997 +/* wycheproof - misc */
998 +static const u8 enc_input048[] __initconst = {
999 + 0x87, 0xb3, 0xa4, 0xd7, 0xb2, 0x6d, 0x8d, 0x32,
1000 + 0x03, 0xa0, 0xde, 0x1d, 0x64, 0xef, 0x82, 0xe3
1001 +};
1002 +static const u8 enc_output048[] __initconst = {
1003 + 0x94, 0xbc, 0x80, 0x62, 0x1e, 0xd1, 0xe7, 0x1b,
1004 + 0x1f, 0xd2, 0xb5, 0xc3, 0xa1, 0x5e, 0x35, 0x68,
1005 + 0x33, 0x35, 0x11, 0x86, 0x17, 0x96, 0x97, 0x84,
1006 + 0x01, 0x59, 0x8b, 0x96, 0x37, 0x22, 0xf5, 0xb3
1007 +};
1008 +static const u8 enc_assoc048[] __initconst = {
1009 + 0xd1, 0x9f, 0x2d, 0x98, 0x90, 0x95, 0xf7, 0xab,
1010 + 0x03, 0xa5, 0xfd, 0xe8, 0x44, 0x16, 0xe0, 0x0c,
1011 + 0x0e
1012 +};
1013 +static const u8 enc_nonce048[] __initconst = {
1014 + 0x56, 0x4d, 0xee, 0x49, 0xab, 0x00, 0xd2, 0x40,
1015 + 0xfc, 0x10, 0x68, 0xc3
1016 +};
1017 +static const u8 enc_key048[] __initconst = {
1018 + 0xa5, 0x56, 0x9e, 0x72, 0x9a, 0x69, 0xb2, 0x4b,
1019 + 0xa6, 0xe0, 0xff, 0x15, 0xc4, 0x62, 0x78, 0x97,
1020 + 0x43, 0x68, 0x24, 0xc9, 0x41, 0xe9, 0xd0, 0x0b,
1021 + 0x2e, 0x93, 0xfd, 0xdc, 0x4b, 0xa7, 0x76, 0x57
1022 +};
1023 +
1024 +/* wycheproof - misc */
1025 +static const u8 enc_input049[] __initconst = {
1026 + 0xe6, 0x01, 0xb3, 0x85, 0x57, 0x79, 0x7d, 0xa2,
1027 + 0xf8, 0xa4, 0x10, 0x6a, 0x08, 0x9d, 0x1d, 0xa6
1028 +};
1029 +static const u8 enc_output049[] __initconst = {
1030 + 0x29, 0x9b, 0x5d, 0x3f, 0x3d, 0x03, 0xc0, 0x87,
1031 + 0x20, 0x9a, 0x16, 0xe2, 0x85, 0x14, 0x31, 0x11,
1032 + 0x4b, 0x45, 0x4e, 0xd1, 0x98, 0xde, 0x11, 0x7e,
1033 + 0x83, 0xec, 0x49, 0xfa, 0x8d, 0x85, 0x08, 0xd6
1034 +};
1035 +static const u8 enc_assoc049[] __initconst = {
1036 + 0x5e, 0x64, 0x70, 0xfa, 0xcd, 0x99, 0xc1, 0xd8,
1037 + 0x1e, 0x37, 0xcd, 0x44, 0x01, 0x5f, 0xe1, 0x94,
1038 + 0x80, 0xa2, 0xa4, 0xd3, 0x35, 0x2a, 0x4f, 0xf5,
1039 + 0x60, 0xc0, 0x64, 0x0f, 0xdb, 0xda
1040 +};
1041 +static const u8 enc_nonce049[] __initconst = {
1042 + 0xdf, 0x87, 0x13, 0xe8, 0x7e, 0xc3, 0xdb, 0xcf,
1043 + 0xad, 0x14, 0xd5, 0x3e
1044 +};
1045 +static const u8 enc_key049[] __initconst = {
1046 + 0x56, 0x20, 0x74, 0x65, 0xb4, 0xe4, 0x8e, 0x6d,
1047 + 0x04, 0x63, 0x0f, 0x4a, 0x42, 0xf3, 0x5c, 0xfc,
1048 + 0x16, 0x3a, 0xb2, 0x89, 0xc2, 0x2a, 0x2b, 0x47,
1049 + 0x84, 0xf6, 0xf9, 0x29, 0x03, 0x30, 0xbe, 0xe0
1050 +};
1051 +
1052 +/* wycheproof - misc */
1053 +static const u8 enc_input050[] __initconst = {
1054 + 0xdc, 0x9e, 0x9e, 0xaf, 0x11, 0xe3, 0x14, 0x18,
1055 + 0x2d, 0xf6, 0xa4, 0xeb, 0xa1, 0x7a, 0xec, 0x9c
1056 +};
1057 +static const u8 enc_output050[] __initconst = {
1058 + 0x60, 0x5b, 0xbf, 0x90, 0xae, 0xb9, 0x74, 0xf6,
1059 + 0x60, 0x2b, 0xc7, 0x78, 0x05, 0x6f, 0x0d, 0xca,
1060 + 0x38, 0xea, 0x23, 0xd9, 0x90, 0x54, 0xb4, 0x6b,
1061 + 0x42, 0xff, 0xe0, 0x04, 0x12, 0x9d, 0x22, 0x04
1062 +};
1063 +static const u8 enc_assoc050[] __initconst = {
1064 + 0xba, 0x44, 0x6f, 0x6f, 0x9a, 0x0c, 0xed, 0x22,
1065 + 0x45, 0x0f, 0xeb, 0x10, 0x73, 0x7d, 0x90, 0x07,
1066 + 0xfd, 0x69, 0xab, 0xc1, 0x9b, 0x1d, 0x4d, 0x90,
1067 + 0x49, 0xa5, 0x55, 0x1e, 0x86, 0xec, 0x2b, 0x37
1068 +};
1069 +static const u8 enc_nonce050[] __initconst = {
1070 + 0x8d, 0xf4, 0xb1, 0x5a, 0x88, 0x8c, 0x33, 0x28,
1071 + 0x6a, 0x7b, 0x76, 0x51
1072 +};
1073 +static const u8 enc_key050[] __initconst = {
1074 + 0x39, 0x37, 0x98, 0x6a, 0xf8, 0x6d, 0xaf, 0xc1,
1075 + 0xba, 0x0c, 0x46, 0x72, 0xd8, 0xab, 0xc4, 0x6c,
1076 + 0x20, 0x70, 0x62, 0x68, 0x2d, 0x9c, 0x26, 0x4a,
1077 + 0xb0, 0x6d, 0x6c, 0x58, 0x07, 0x20, 0x51, 0x30
1078 +};
1079 +
1080 +/* wycheproof - misc */
1081 +static const u8 enc_input051[] __initconst = {
1082 + 0x81, 0xce, 0x84, 0xed, 0xe9, 0xb3, 0x58, 0x59,
1083 + 0xcc, 0x8c, 0x49, 0xa8, 0xf6, 0xbe, 0x7d, 0xc6
1084 +};
1085 +static const u8 enc_output051[] __initconst = {
1086 + 0x7b, 0x7c, 0xe0, 0xd8, 0x24, 0x80, 0x9a, 0x70,
1087 + 0xde, 0x32, 0x56, 0x2c, 0xcf, 0x2c, 0x2b, 0xbd,
1088 + 0x15, 0xd4, 0x4a, 0x00, 0xce, 0x0d, 0x19, 0xb4,
1089 + 0x23, 0x1f, 0x92, 0x1e, 0x22, 0xbc, 0x0a, 0x43
1090 +};
1091 +static const u8 enc_assoc051[] __initconst = {
1092 + 0xd4, 0x1a, 0x82, 0x8d, 0x5e, 0x71, 0x82, 0x92,
1093 + 0x47, 0x02, 0x19, 0x05, 0x40, 0x2e, 0xa2, 0x57,
1094 + 0xdc, 0xcb, 0xc3, 0xb8, 0x0f, 0xcd, 0x56, 0x75,
1095 + 0x05, 0x6b, 0x68, 0xbb, 0x59, 0xe6, 0x2e, 0x88,
1096 + 0x73
1097 +};
1098 +static const u8 enc_nonce051[] __initconst = {
1099 + 0xbe, 0x40, 0xe5, 0xf1, 0xa1, 0x18, 0x17, 0xa0,
1100 + 0xa8, 0xfa, 0x89, 0x49
1101 +};
1102 +static const u8 enc_key051[] __initconst = {
1103 + 0x36, 0x37, 0x2a, 0xbc, 0xdb, 0x78, 0xe0, 0x27,
1104 + 0x96, 0x46, 0xac, 0x3d, 0x17, 0x6b, 0x96, 0x74,
1105 + 0xe9, 0x15, 0x4e, 0xec, 0xf0, 0xd5, 0x46, 0x9c,
1106 + 0x65, 0x1e, 0xc7, 0xe1, 0x6b, 0x4c, 0x11, 0x99
1107 +};
1108 +
1109 +/* wycheproof - misc */
1110 +static const u8 enc_input052[] __initconst = {
1111 + 0xa6, 0x67, 0x47, 0xc8, 0x9e, 0x85, 0x7a, 0xf3,
1112 + 0xa1, 0x8e, 0x2c, 0x79, 0x50, 0x00, 0x87, 0xed
1113 +};
1114 +static const u8 enc_output052[] __initconst = {
1115 + 0xca, 0x82, 0xbf, 0xf3, 0xe2, 0xf3, 0x10, 0xcc,
1116 + 0xc9, 0x76, 0x67, 0x2c, 0x44, 0x15, 0xe6, 0x9b,
1117 + 0x57, 0x63, 0x8c, 0x62, 0xa5, 0xd8, 0x5d, 0xed,
1118 + 0x77, 0x4f, 0x91, 0x3c, 0x81, 0x3e, 0xa0, 0x32
1119 +};
1120 +static const u8 enc_assoc052[] __initconst = {
1121 + 0x3f, 0x2d, 0xd4, 0x9b, 0xbf, 0x09, 0xd6, 0x9a,
1122 + 0x78, 0xa3, 0xd8, 0x0e, 0xa2, 0x56, 0x66, 0x14,
1123 + 0xfc, 0x37, 0x94, 0x74, 0x19, 0x6c, 0x1a, 0xae,
1124 + 0x84, 0x58, 0x3d, 0xa7, 0x3d, 0x7f, 0xf8, 0x5c,
1125 + 0x6f, 0x42, 0xca, 0x42, 0x05, 0x6a, 0x97, 0x92,
1126 + 0xcc, 0x1b, 0x9f, 0xb3, 0xc7, 0xd2, 0x61
1127 +};
1128 +static const u8 enc_nonce052[] __initconst = {
1129 + 0x84, 0xc8, 0x7d, 0xae, 0x4e, 0xee, 0x27, 0x73,
1130 + 0x0e, 0xc3, 0x5d, 0x12
1131 +};
1132 +static const u8 enc_key052[] __initconst = {
1133 + 0x9f, 0x14, 0x79, 0xed, 0x09, 0x7d, 0x7f, 0xe5,
1134 + 0x29, 0xc1, 0x1f, 0x2f, 0x5a, 0xdd, 0x9a, 0xaf,
1135 + 0xf4, 0xa1, 0xca, 0x0b, 0x68, 0x99, 0x7a, 0x2c,
1136 + 0xb7, 0xf7, 0x97, 0x49, 0xbd, 0x90, 0xaa, 0xf4
1137 +};
1138 +
1139 /* wycheproof - misc */
1140 static const u8 enc_input053[] __initconst = {
1141 0x25, 0x6d, 0x40, 0x88, 0x80, 0x94, 0x17, 0x83,
1142 @@ -2760,6 +3859,126 @@ static const u8 enc_key073[] __initconst
1143 };
1144
1145 /* wycheproof - checking for int overflows */
1146 +static const u8 enc_input074[] __initconst = {
1147 + 0xd4, 0x50, 0x0b, 0xf0, 0x09, 0x49, 0x35, 0x51,
1148 + 0xc3, 0x80, 0xad, 0xf5, 0x2c, 0x57, 0x3a, 0x69,
1149 + 0xdf, 0x7e, 0x8b, 0x76, 0x24, 0x63, 0x33, 0x0f,
1150 + 0xac, 0xc1, 0x6a, 0x57, 0x26, 0xbe, 0x71, 0x90,
1151 + 0xc6, 0x3c, 0x5a, 0x1c, 0x92, 0x65, 0x84, 0xa0,
1152 + 0x96, 0x75, 0x68, 0x28, 0xdc, 0xdc, 0x64, 0xac,
1153 + 0xdf, 0x96, 0x3d, 0x93, 0x1b, 0xf1, 0xda, 0xe2,
1154 + 0x38, 0xf3, 0xf1, 0x57, 0x22, 0x4a, 0xc4, 0xb5,
1155 + 0x42, 0xd7, 0x85, 0xb0, 0xdd, 0x84, 0xdb, 0x6b,
1156 + 0xe3, 0xbc, 0x5a, 0x36, 0x63, 0xe8, 0x41, 0x49,
1157 + 0xff, 0xbe, 0xd0, 0x9e, 0x54, 0xf7, 0x8f, 0x16,
1158 + 0xa8, 0x22, 0x3b, 0x24, 0xcb, 0x01, 0x9f, 0x58,
1159 + 0xb2, 0x1b, 0x0e, 0x55, 0x1e, 0x7a, 0xa0, 0x73,
1160 + 0x27, 0x62, 0x95, 0x51, 0x37, 0x6c, 0xcb, 0xc3,
1161 + 0x93, 0x76, 0x71, 0xa0, 0x62, 0x9b, 0xd9, 0x5c,
1162 + 0x99, 0x15, 0xc7, 0x85, 0x55, 0x77, 0x1e, 0x7a
1163 +};
1164 +static const u8 enc_output074[] __initconst = {
1165 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1166 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1167 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1168 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1169 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1170 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1171 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1172 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1173 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1174 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1175 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1176 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1177 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1178 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1179 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1180 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1181 + 0x0b, 0x30, 0x0d, 0x8d, 0xa5, 0x6c, 0x21, 0x85,
1182 + 0x75, 0x52, 0x79, 0x55, 0x3c, 0x4c, 0x82, 0xca
1183 +};
1184 +static const u8 enc_assoc074[] __initconst = {
1185 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1186 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1187 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1188 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1189 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1190 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1191 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1192 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
1193 +};
1194 +static const u8 enc_nonce074[] __initconst = {
1195 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
1196 + 0x00, 0x02, 0x50, 0x6e
1197 +};
1198 +static const u8 enc_key074[] __initconst = {
1199 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
1200 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
1201 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
1202 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30
1203 +};
1204 +
1205 +/* wycheproof - checking for int overflows */
1206 +static const u8 enc_input075[] __initconst = {
1207 + 0x7d, 0xe8, 0x7f, 0x67, 0x29, 0x94, 0x52, 0x75,
1208 + 0xd0, 0x65, 0x5d, 0xa4, 0xc7, 0xfd, 0xe4, 0x56,
1209 + 0x9e, 0x16, 0xf1, 0x11, 0xb5, 0xeb, 0x26, 0xc2,
1210 + 0x2d, 0x85, 0x9e, 0x3f, 0xf8, 0x22, 0xec, 0xed,
1211 + 0x3a, 0x6d, 0xd9, 0xa6, 0x0f, 0x22, 0x95, 0x7f,
1212 + 0x7b, 0x7c, 0x85, 0x7e, 0x88, 0x22, 0xeb, 0x9f,
1213 + 0xe0, 0xb8, 0xd7, 0x02, 0x21, 0x41, 0xf2, 0xd0,
1214 + 0xb4, 0x8f, 0x4b, 0x56, 0x12, 0xd3, 0x22, 0xa8,
1215 + 0x8d, 0xd0, 0xfe, 0x0b, 0x4d, 0x91, 0x79, 0x32,
1216 + 0x4f, 0x7c, 0x6c, 0x9e, 0x99, 0x0e, 0xfb, 0xd8,
1217 + 0x0e, 0x5e, 0xd6, 0x77, 0x58, 0x26, 0x49, 0x8b,
1218 + 0x1e, 0xfe, 0x0f, 0x71, 0xa0, 0xf3, 0xec, 0x5b,
1219 + 0x29, 0xcb, 0x28, 0xc2, 0x54, 0x0a, 0x7d, 0xcd,
1220 + 0x51, 0xb7, 0xda, 0xae, 0xe0, 0xff, 0x4a, 0x7f,
1221 + 0x3a, 0xc1, 0xee, 0x54, 0xc2, 0x9e, 0xe4, 0xc1,
1222 + 0x70, 0xde, 0x40, 0x8f, 0x66, 0x69, 0x21, 0x94
1223 +};
1224 +static const u8 enc_output075[] __initconst = {
1225 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1226 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1227 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1228 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1229 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1230 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1231 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1232 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1233 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1234 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1235 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1236 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1237 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1238 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1239 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1240 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1241 + 0xc5, 0x78, 0xe2, 0xaa, 0x44, 0xd3, 0x09, 0xb7,
1242 + 0xb6, 0xa5, 0x19, 0x3b, 0xdc, 0x61, 0x18, 0xf5
1243 +};
1244 +static const u8 enc_assoc075[] __initconst = {
1245 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1246 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1247 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1248 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1249 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1250 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1251 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1252 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
1253 +};
1254 +static const u8 enc_nonce075[] __initconst = {
1255 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
1256 + 0x00, 0x03, 0x18, 0xa5
1257 +};
1258 +static const u8 enc_key075[] __initconst = {
1259 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
1260 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
1261 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
1262 + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30
1263 +};
1264 +
1265 +/* wycheproof - checking for int overflows */
1266 static const u8 enc_input076[] __initconst = {
1267 0x1b, 0x99, 0x6f, 0x9a, 0x3c, 0xcc, 0x67, 0x85,
1268 0xde, 0x22, 0xff, 0x5b, 0x8a, 0xdd, 0x95, 0x02,
1269 @@ -3349,6 +4568,286 @@ static const u8 enc_key085[] __initconst
1270 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
1271 };
1272
1273 +/* wycheproof - special case tag */
1274 +static const u8 enc_input086[] __initconst = {
1275 + 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6,
1276 + 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd,
1277 + 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b,
1278 + 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2,
1279 + 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19,
1280 + 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4,
1281 + 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63,
1282 + 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d
1283 +};
1284 +static const u8 enc_output086[] __initconst = {
1285 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1286 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1287 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1288 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1289 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1290 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1291 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1292 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1293 + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1294 + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
1295 +};
1296 +static const u8 enc_assoc086[] __initconst = {
1297 + 0x85, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1298 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1299 + 0xa6, 0x90, 0x2f, 0xcb, 0xc8, 0x83, 0xbb, 0xc1,
1300 + 0x80, 0xb2, 0x56, 0xae, 0x34, 0xad, 0x7f, 0x00
1301 +};
1302 +static const u8 enc_nonce086[] __initconst = {
1303 + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1304 + 0x08, 0x09, 0x0a, 0x0b
1305 +};
1306 +static const u8 enc_key086[] __initconst = {
1307 + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1308 + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1309 + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1310 + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
1311 +};
1312 +
1313 +/* wycheproof - special case tag */
1314 +static const u8 enc_input087[] __initconst = {
1315 + 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6,
1316 + 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd,
1317 + 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b,
1318 + 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2,
1319 + 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19,
1320 + 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4,
1321 + 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63,
1322 + 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d
1323 +};
1324 +static const u8 enc_output087[] __initconst = {
1325 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1326 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1327 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1328 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1329 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1330 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1331 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1332 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1333 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1334 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
1335 +};
1336 +static const u8 enc_assoc087[] __initconst = {
1337 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1338 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1339 + 0x24, 0x7e, 0x50, 0x64, 0x2a, 0x1c, 0x0a, 0x2f,
1340 + 0x8f, 0x77, 0x21, 0x96, 0x09, 0xdb, 0xa9, 0x58
1341 +};
1342 +static const u8 enc_nonce087[] __initconst = {
1343 + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1344 + 0x08, 0x09, 0x0a, 0x0b
1345 +};
1346 +static const u8 enc_key087[] __initconst = {
1347 + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1348 + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1349 + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1350 + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
1351 +};
1352 +
1353 +/* wycheproof - special case tag */
1354 +static const u8 enc_input088[] __initconst = {
1355 + 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6,
1356 + 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd,
1357 + 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b,
1358 + 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2,
1359 + 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19,
1360 + 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4,
1361 + 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63,
1362 + 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d
1363 +};
1364 +static const u8 enc_output088[] __initconst = {
1365 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1366 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1367 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1368 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1369 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1370 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1371 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1372 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1373 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1374 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
1375 +};
1376 +static const u8 enc_assoc088[] __initconst = {
1377 + 0x7c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1378 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1379 + 0xd9, 0xe7, 0x2c, 0x06, 0x4a, 0xc8, 0x96, 0x1f,
1380 + 0x3f, 0xa5, 0x85, 0xe0, 0xe2, 0xab, 0xd6, 0x00
1381 +};
1382 +static const u8 enc_nonce088[] __initconst = {
1383 + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1384 + 0x08, 0x09, 0x0a, 0x0b
1385 +};
1386 +static const u8 enc_key088[] __initconst = {
1387 + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1388 + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1389 + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1390 + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
1391 +};
1392 +
1393 +/* wycheproof - special case tag */
1394 +static const u8 enc_input089[] __initconst = {
1395 + 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6,
1396 + 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd,
1397 + 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b,
1398 + 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2,
1399 + 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19,
1400 + 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4,
1401 + 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63,
1402 + 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d
1403 +};
1404 +static const u8 enc_output089[] __initconst = {
1405 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1406 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1407 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1408 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1409 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1410 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1411 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1412 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1413 + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80,
1414 + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80
1415 +};
1416 +static const u8 enc_assoc089[] __initconst = {
1417 + 0x65, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1418 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1419 + 0x95, 0xaf, 0x0f, 0x4d, 0x0b, 0x68, 0x6e, 0xae,
1420 + 0xcc, 0xca, 0x43, 0x07, 0xd5, 0x96, 0xf5, 0x02
1421 +};
1422 +static const u8 enc_nonce089[] __initconst = {
1423 + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1424 + 0x08, 0x09, 0x0a, 0x0b
1425 +};
1426 +static const u8 enc_key089[] __initconst = {
1427 + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1428 + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1429 + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1430 + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
1431 +};
1432 +
1433 +/* wycheproof - special case tag */
1434 +static const u8 enc_input090[] __initconst = {
1435 + 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6,
1436 + 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd,
1437 + 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b,
1438 + 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2,
1439 + 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19,
1440 + 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4,
1441 + 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63,
1442 + 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d
1443 +};
1444 +static const u8 enc_output090[] __initconst = {
1445 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1446 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1447 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1448 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1449 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1450 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1451 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1452 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1453 + 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f,
1454 + 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f
1455 +};
1456 +static const u8 enc_assoc090[] __initconst = {
1457 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1458 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1459 + 0x85, 0x40, 0xb4, 0x64, 0x35, 0x77, 0x07, 0xbe,
1460 + 0x3a, 0x39, 0xd5, 0x5c, 0x34, 0xf8, 0xbc, 0xb3
1461 +};
1462 +static const u8 enc_nonce090[] __initconst = {
1463 + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1464 + 0x08, 0x09, 0x0a, 0x0b
1465 +};
1466 +static const u8 enc_key090[] __initconst = {
1467 + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1468 + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1469 + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1470 + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
1471 +};
1472 +
1473 +/* wycheproof - special case tag */
1474 +static const u8 enc_input091[] __initconst = {
1475 + 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6,
1476 + 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd,
1477 + 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b,
1478 + 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2,
1479 + 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19,
1480 + 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4,
1481 + 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63,
1482 + 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d
1483 +};
1484 +static const u8 enc_output091[] __initconst = {
1485 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1486 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1487 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1488 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1489 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1490 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1491 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1492 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1493 + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1494 + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
1495 +};
1496 +static const u8 enc_assoc091[] __initconst = {
1497 + 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1498 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1499 + 0x66, 0x23, 0xd9, 0x90, 0xb8, 0x98, 0xd8, 0x30,
1500 + 0xd2, 0x12, 0xaf, 0x23, 0x83, 0x33, 0x07, 0x01
1501 +};
1502 +static const u8 enc_nonce091[] __initconst = {
1503 + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1504 + 0x08, 0x09, 0x0a, 0x0b
1505 +};
1506 +static const u8 enc_key091[] __initconst = {
1507 + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1508 + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1509 + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1510 + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
1511 +};
1512 +
1513 +/* wycheproof - special case tag */
1514 +static const u8 enc_input092[] __initconst = {
1515 + 0x9a, 0x49, 0xc4, 0x0f, 0x8b, 0x48, 0xd7, 0xc6,
1516 + 0x6d, 0x1d, 0xb4, 0xe5, 0x3f, 0x20, 0xf2, 0xdd,
1517 + 0x4a, 0xaa, 0x24, 0x1d, 0xda, 0xb2, 0x6b, 0x5b,
1518 + 0xc0, 0xe2, 0x18, 0xb7, 0x2c, 0x33, 0x90, 0xf2,
1519 + 0xdf, 0x3e, 0xbd, 0x01, 0x76, 0x70, 0x44, 0x19,
1520 + 0x97, 0x2b, 0xcd, 0xbc, 0x6b, 0xbc, 0xb3, 0xe4,
1521 + 0xe7, 0x4a, 0x71, 0x52, 0x8e, 0xf5, 0x12, 0x63,
1522 + 0xce, 0x24, 0xe0, 0xd5, 0x75, 0xe0, 0xe4, 0x4d
1523 +};
1524 +static const u8 enc_output092[] __initconst = {
1525 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1526 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1527 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1528 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1529 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1530 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1531 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1532 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1533 + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
1534 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
1535 +};
1536 +static const u8 enc_assoc092[] __initconst = {
1537 + 0x83, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1538 + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1539 + 0x5f, 0x16, 0xd0, 0x9f, 0x17, 0x78, 0x72, 0x11,
1540 + 0xb7, 0xd4, 0x84, 0xe0, 0x24, 0xf8, 0x97, 0x01
1541 +};
1542 +static const u8 enc_nonce092[] __initconst = {
1543 + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
1544 + 0x08, 0x09, 0x0a, 0x0b
1545 +};
1546 +static const u8 enc_key092[] __initconst = {
1547 + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
1548 + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
1549 + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
1550 + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
1551 +};
1552 +
1553 /* wycheproof - edge case intermediate sums in poly1305 */
1554 static const u8 enc_input093[] __initconst = {
1555 0x00, 0x52, 0x35, 0xd2, 0xa9, 0x19, 0xf2, 0x8d,
1556 @@ -4455,6 +5954,86 @@ chacha20poly1305_enc_vectors[] __initcon
1557 sizeof(enc_input011), sizeof(enc_assoc011), sizeof(enc_nonce011) },
1558 { enc_input012, enc_output012, enc_assoc012, enc_nonce012, enc_key012,
1559 sizeof(enc_input012), sizeof(enc_assoc012), sizeof(enc_nonce012) },
1560 + { enc_input013, enc_output013, enc_assoc013, enc_nonce013, enc_key013,
1561 + sizeof(enc_input013), sizeof(enc_assoc013), sizeof(enc_nonce013) },
1562 + { enc_input014, enc_output014, enc_assoc014, enc_nonce014, enc_key014,
1563 + sizeof(enc_input014), sizeof(enc_assoc014), sizeof(enc_nonce014) },
1564 + { enc_input015, enc_output015, enc_assoc015, enc_nonce015, enc_key015,
1565 + sizeof(enc_input015), sizeof(enc_assoc015), sizeof(enc_nonce015) },
1566 + { enc_input016, enc_output016, enc_assoc016, enc_nonce016, enc_key016,
1567 + sizeof(enc_input016), sizeof(enc_assoc016), sizeof(enc_nonce016) },
1568 + { enc_input017, enc_output017, enc_assoc017, enc_nonce017, enc_key017,
1569 + sizeof(enc_input017), sizeof(enc_assoc017), sizeof(enc_nonce017) },
1570 + { enc_input018, enc_output018, enc_assoc018, enc_nonce018, enc_key018,
1571 + sizeof(enc_input018), sizeof(enc_assoc018), sizeof(enc_nonce018) },
1572 + { enc_input019, enc_output019, enc_assoc019, enc_nonce019, enc_key019,
1573 + sizeof(enc_input019), sizeof(enc_assoc019), sizeof(enc_nonce019) },
1574 + { enc_input020, enc_output020, enc_assoc020, enc_nonce020, enc_key020,
1575 + sizeof(enc_input020), sizeof(enc_assoc020), sizeof(enc_nonce020) },
1576 + { enc_input021, enc_output021, enc_assoc021, enc_nonce021, enc_key021,
1577 + sizeof(enc_input021), sizeof(enc_assoc021), sizeof(enc_nonce021) },
1578 + { enc_input022, enc_output022, enc_assoc022, enc_nonce022, enc_key022,
1579 + sizeof(enc_input022), sizeof(enc_assoc022), sizeof(enc_nonce022) },
1580 + { enc_input023, enc_output023, enc_assoc023, enc_nonce023, enc_key023,
1581 + sizeof(enc_input023), sizeof(enc_assoc023), sizeof(enc_nonce023) },
1582 + { enc_input024, enc_output024, enc_assoc024, enc_nonce024, enc_key024,
1583 + sizeof(enc_input024), sizeof(enc_assoc024), sizeof(enc_nonce024) },
1584 + { enc_input025, enc_output025, enc_assoc025, enc_nonce025, enc_key025,
1585 + sizeof(enc_input025), sizeof(enc_assoc025), sizeof(enc_nonce025) },
1586 + { enc_input026, enc_output026, enc_assoc026, enc_nonce026, enc_key026,
1587 + sizeof(enc_input026), sizeof(enc_assoc026), sizeof(enc_nonce026) },
1588 + { enc_input027, enc_output027, enc_assoc027, enc_nonce027, enc_key027,
1589 + sizeof(enc_input027), sizeof(enc_assoc027), sizeof(enc_nonce027) },
1590 + { enc_input028, enc_output028, enc_assoc028, enc_nonce028, enc_key028,
1591 + sizeof(enc_input028), sizeof(enc_assoc028), sizeof(enc_nonce028) },
1592 + { enc_input029, enc_output029, enc_assoc029, enc_nonce029, enc_key029,
1593 + sizeof(enc_input029), sizeof(enc_assoc029), sizeof(enc_nonce029) },
1594 + { enc_input030, enc_output030, enc_assoc030, enc_nonce030, enc_key030,
1595 + sizeof(enc_input030), sizeof(enc_assoc030), sizeof(enc_nonce030) },
1596 + { enc_input031, enc_output031, enc_assoc031, enc_nonce031, enc_key031,
1597 + sizeof(enc_input031), sizeof(enc_assoc031), sizeof(enc_nonce031) },
1598 + { enc_input032, enc_output032, enc_assoc032, enc_nonce032, enc_key032,
1599 + sizeof(enc_input032), sizeof(enc_assoc032), sizeof(enc_nonce032) },
1600 + { enc_input033, enc_output033, enc_assoc033, enc_nonce033, enc_key033,
1601 + sizeof(enc_input033), sizeof(enc_assoc033), sizeof(enc_nonce033) },
1602 + { enc_input034, enc_output034, enc_assoc034, enc_nonce034, enc_key034,
1603 + sizeof(enc_input034), sizeof(enc_assoc034), sizeof(enc_nonce034) },
1604 + { enc_input035, enc_output035, enc_assoc035, enc_nonce035, enc_key035,
1605 + sizeof(enc_input035), sizeof(enc_assoc035), sizeof(enc_nonce035) },
1606 + { enc_input036, enc_output036, enc_assoc036, enc_nonce036, enc_key036,
1607 + sizeof(enc_input036), sizeof(enc_assoc036), sizeof(enc_nonce036) },
1608 + { enc_input037, enc_output037, enc_assoc037, enc_nonce037, enc_key037,
1609 + sizeof(enc_input037), sizeof(enc_assoc037), sizeof(enc_nonce037) },
1610 + { enc_input038, enc_output038, enc_assoc038, enc_nonce038, enc_key038,
1611 + sizeof(enc_input038), sizeof(enc_assoc038), sizeof(enc_nonce038) },
1612 + { enc_input039, enc_output039, enc_assoc039, enc_nonce039, enc_key039,
1613 + sizeof(enc_input039), sizeof(enc_assoc039), sizeof(enc_nonce039) },
1614 + { enc_input040, enc_output040, enc_assoc040, enc_nonce040, enc_key040,
1615 + sizeof(enc_input040), sizeof(enc_assoc040), sizeof(enc_nonce040) },
1616 + { enc_input041, enc_output041, enc_assoc041, enc_nonce041, enc_key041,
1617 + sizeof(enc_input041), sizeof(enc_assoc041), sizeof(enc_nonce041) },
1618 + { enc_input042, enc_output042, enc_assoc042, enc_nonce042, enc_key042,
1619 + sizeof(enc_input042), sizeof(enc_assoc042), sizeof(enc_nonce042) },
1620 + { enc_input043, enc_output043, enc_assoc043, enc_nonce043, enc_key043,
1621 + sizeof(enc_input043), sizeof(enc_assoc043), sizeof(enc_nonce043) },
1622 + { enc_input044, enc_output044, enc_assoc044, enc_nonce044, enc_key044,
1623 + sizeof(enc_input044), sizeof(enc_assoc044), sizeof(enc_nonce044) },
1624 + { enc_input045, enc_output045, enc_assoc045, enc_nonce045, enc_key045,
1625 + sizeof(enc_input045), sizeof(enc_assoc045), sizeof(enc_nonce045) },
1626 + { enc_input046, enc_output046, enc_assoc046, enc_nonce046, enc_key046,
1627 + sizeof(enc_input046), sizeof(enc_assoc046), sizeof(enc_nonce046) },
1628 + { enc_input047, enc_output047, enc_assoc047, enc_nonce047, enc_key047,
1629 + sizeof(enc_input047), sizeof(enc_assoc047), sizeof(enc_nonce047) },
1630 + { enc_input048, enc_output048, enc_assoc048, enc_nonce048, enc_key048,
1631 + sizeof(enc_input048), sizeof(enc_assoc048), sizeof(enc_nonce048) },
1632 + { enc_input049, enc_output049, enc_assoc049, enc_nonce049, enc_key049,
1633 + sizeof(enc_input049), sizeof(enc_assoc049), sizeof(enc_nonce049) },
1634 + { enc_input050, enc_output050, enc_assoc050, enc_nonce050, enc_key050,
1635 + sizeof(enc_input050), sizeof(enc_assoc050), sizeof(enc_nonce050) },
1636 + { enc_input051, enc_output051, enc_assoc051, enc_nonce051, enc_key051,
1637 + sizeof(enc_input051), sizeof(enc_assoc051), sizeof(enc_nonce051) },
1638 + { enc_input052, enc_output052, enc_assoc052, enc_nonce052, enc_key052,
1639 + sizeof(enc_input052), sizeof(enc_assoc052), sizeof(enc_nonce052) },
1640 { enc_input053, enc_output053, enc_assoc053, enc_nonce053, enc_key053,
1641 sizeof(enc_input053), sizeof(enc_assoc053), sizeof(enc_nonce053) },
1642 { enc_input054, enc_output054, enc_assoc054, enc_nonce054, enc_key054,
1643 @@ -4497,6 +6076,10 @@ chacha20poly1305_enc_vectors[] __initcon
1644 sizeof(enc_input072), sizeof(enc_assoc072), sizeof(enc_nonce072) },
1645 { enc_input073, enc_output073, enc_assoc073, enc_nonce073, enc_key073,
1646 sizeof(enc_input073), sizeof(enc_assoc073), sizeof(enc_nonce073) },
1647 + { enc_input074, enc_output074, enc_assoc074, enc_nonce074, enc_key074,
1648 + sizeof(enc_input074), sizeof(enc_assoc074), sizeof(enc_nonce074) },
1649 + { enc_input075, enc_output075, enc_assoc075, enc_nonce075, enc_key075,
1650 + sizeof(enc_input075), sizeof(enc_assoc075), sizeof(enc_nonce075) },
1651 { enc_input076, enc_output076, enc_assoc076, enc_nonce076, enc_key076,
1652 sizeof(enc_input076), sizeof(enc_assoc076), sizeof(enc_nonce076) },
1653 { enc_input077, enc_output077, enc_assoc077, enc_nonce077, enc_key077,
1654 @@ -4517,6 +6100,20 @@ chacha20poly1305_enc_vectors[] __initcon
1655 sizeof(enc_input084), sizeof(enc_assoc084), sizeof(enc_nonce084) },
1656 { enc_input085, enc_output085, enc_assoc085, enc_nonce085, enc_key085,
1657 sizeof(enc_input085), sizeof(enc_assoc085), sizeof(enc_nonce085) },
1658 + { enc_input086, enc_output086, enc_assoc086, enc_nonce086, enc_key086,
1659 + sizeof(enc_input086), sizeof(enc_assoc086), sizeof(enc_nonce086) },
1660 + { enc_input087, enc_output087, enc_assoc087, enc_nonce087, enc_key087,
1661 + sizeof(enc_input087), sizeof(enc_assoc087), sizeof(enc_nonce087) },
1662 + { enc_input088, enc_output088, enc_assoc088, enc_nonce088, enc_key088,
1663 + sizeof(enc_input088), sizeof(enc_assoc088), sizeof(enc_nonce088) },
1664 + { enc_input089, enc_output089, enc_assoc089, enc_nonce089, enc_key089,
1665 + sizeof(enc_input089), sizeof(enc_assoc089), sizeof(enc_nonce089) },
1666 + { enc_input090, enc_output090, enc_assoc090, enc_nonce090, enc_key090,
1667 + sizeof(enc_input090), sizeof(enc_assoc090), sizeof(enc_nonce090) },
1668 + { enc_input091, enc_output091, enc_assoc091, enc_nonce091, enc_key091,
1669 + sizeof(enc_input091), sizeof(enc_assoc091), sizeof(enc_nonce091) },
1670 + { enc_input092, enc_output092, enc_assoc092, enc_nonce092, enc_key092,
1671 + sizeof(enc_input092), sizeof(enc_assoc092), sizeof(enc_nonce092) },
1672 { enc_input093, enc_output093, enc_assoc093, enc_nonce093, enc_key093,
1673 sizeof(enc_input093), sizeof(enc_assoc093), sizeof(enc_nonce093) },
1674 { enc_input094, enc_output094, enc_assoc094, enc_nonce094, enc_key094,
1675 @@ -7224,6 +8821,43 @@ xchacha20poly1305_dec_vectors[] __initco
1676 sizeof(xdec_input001), sizeof(xdec_assoc001), sizeof(xdec_nonce001) }
1677 };
1678
1679 +/* This is for the selftests-only, since it is only useful for the purpose of
1680 + * testing the underlying primitives and interactions.
1681 + */
1682 +static void __init
1683 +chacha20poly1305_encrypt_bignonce(u8 *dst, const u8 *src, const size_t src_len,
1684 + const u8 *ad, const size_t ad_len,
1685 + const u8 nonce[12],
1686 + const u8 key[CHACHA20POLY1305_KEY_SIZE])
1687 +{
1688 + const u8 *pad0 = page_address(ZERO_PAGE(0));
1689 + struct poly1305_desc_ctx poly1305_state;
1690 + u32 chacha20_state[CHACHA_STATE_WORDS];
1691 + union {
1692 + u8 block0[POLY1305_KEY_SIZE];
1693 + __le64 lens[2];
1694 + } b = {{ 0 }};
1695 + u8 bottom_row[16] = { 0 };
1696 + u32 le_key[8];
1697 + int i;
1698 +
1699 + memcpy(&bottom_row[4], nonce, 12);
1700 + for (i = 0; i < 8; ++i)
1701 + le_key[i] = get_unaligned_le32(key + sizeof(le_key[i]) * i);
1702 + chacha_init(chacha20_state, le_key, bottom_row);
1703 + chacha20_crypt(chacha20_state, b.block0, b.block0, sizeof(b.block0));
1704 + poly1305_init(&poly1305_state, b.block0);
1705 + poly1305_update(&poly1305_state, ad, ad_len);
1706 + poly1305_update(&poly1305_state, pad0, (0x10 - ad_len) & 0xf);
1707 + chacha20_crypt(chacha20_state, dst, src, src_len);
1708 + poly1305_update(&poly1305_state, dst, src_len);
1709 + poly1305_update(&poly1305_state, pad0, (0x10 - src_len) & 0xf);
1710 + b.lens[0] = cpu_to_le64(ad_len);
1711 + b.lens[1] = cpu_to_le64(src_len);
1712 + poly1305_update(&poly1305_state, (u8 *)b.lens, sizeof(b.lens));
1713 + poly1305_final(&poly1305_state, dst + src_len);
1714 +}
1715 +
1716 static void __init
1717 chacha20poly1305_selftest_encrypt(u8 *dst, const u8 *src, const size_t src_len,
1718 const u8 *ad, const size_t ad_len,
1719 @@ -7233,6 +8867,9 @@ chacha20poly1305_selftest_encrypt(u8 *ds
1720 if (nonce_len == 8)
1721 chacha20poly1305_encrypt(dst, src, src_len, ad, ad_len,
1722 get_unaligned_le64(nonce), key);
1723 + else if (nonce_len == 12)
1724 + chacha20poly1305_encrypt_bignonce(dst, src, src_len, ad,
1725 + ad_len, nonce, key);
1726 else
1727 BUG();
1728 }
1729 @@ -7248,14 +8885,14 @@ decryption_success(bool func_ret, bool e
1730 bool __init chacha20poly1305_selftest(void)
1731 {
1732 enum { MAXIMUM_TEST_BUFFER_LEN = 1UL << 12 };
1733 - size_t i;
1734 - u8 *computed_output = NULL, *heap_src = NULL;
1735 - struct scatterlist sg_src;
1736 + size_t i, j, k, total_len;
1737 + u8 *computed_output = NULL, *input = NULL;
1738 bool success = true, ret;
1739 + struct scatterlist sg_src[3];
1740
1741 - heap_src = kmalloc(MAXIMUM_TEST_BUFFER_LEN, GFP_KERNEL);
1742 computed_output = kmalloc(MAXIMUM_TEST_BUFFER_LEN, GFP_KERNEL);
1743 - if (!heap_src || !computed_output) {
1744 + input = kmalloc(MAXIMUM_TEST_BUFFER_LEN, GFP_KERNEL);
1745 + if (!computed_output || !input) {
1746 pr_err("chacha20poly1305 self-test malloc: FAIL\n");
1747 success = false;
1748 goto out;
1749 @@ -7284,17 +8921,17 @@ bool __init chacha20poly1305_selftest(vo
1750 for (i = 0; i < ARRAY_SIZE(chacha20poly1305_enc_vectors); ++i) {
1751 if (chacha20poly1305_enc_vectors[i].nlen != 8)
1752 continue;
1753 - memcpy(heap_src, chacha20poly1305_enc_vectors[i].input,
1754 + memcpy(computed_output, chacha20poly1305_enc_vectors[i].input,
1755 chacha20poly1305_enc_vectors[i].ilen);
1756 - sg_init_one(&sg_src, heap_src,
1757 + sg_init_one(sg_src, computed_output,
1758 chacha20poly1305_enc_vectors[i].ilen + POLY1305_DIGEST_SIZE);
1759 - chacha20poly1305_encrypt_sg_inplace(&sg_src,
1760 + ret = chacha20poly1305_encrypt_sg_inplace(sg_src,
1761 chacha20poly1305_enc_vectors[i].ilen,
1762 chacha20poly1305_enc_vectors[i].assoc,
1763 chacha20poly1305_enc_vectors[i].alen,
1764 get_unaligned_le64(chacha20poly1305_enc_vectors[i].nonce),
1765 chacha20poly1305_enc_vectors[i].key);
1766 - if (memcmp(heap_src,
1767 + if (!ret || memcmp(computed_output,
1768 chacha20poly1305_enc_vectors[i].output,
1769 chacha20poly1305_enc_vectors[i].ilen +
1770 POLY1305_DIGEST_SIZE)) {
1771 @@ -7326,11 +8963,11 @@ bool __init chacha20poly1305_selftest(vo
1772 }
1773
1774 for (i = 0; i < ARRAY_SIZE(chacha20poly1305_dec_vectors); ++i) {
1775 - memcpy(heap_src, chacha20poly1305_dec_vectors[i].input,
1776 + memcpy(computed_output, chacha20poly1305_dec_vectors[i].input,
1777 chacha20poly1305_dec_vectors[i].ilen);
1778 - sg_init_one(&sg_src, heap_src,
1779 + sg_init_one(sg_src, computed_output,
1780 chacha20poly1305_dec_vectors[i].ilen);
1781 - ret = chacha20poly1305_decrypt_sg_inplace(&sg_src,
1782 + ret = chacha20poly1305_decrypt_sg_inplace(sg_src,
1783 chacha20poly1305_dec_vectors[i].ilen,
1784 chacha20poly1305_dec_vectors[i].assoc,
1785 chacha20poly1305_dec_vectors[i].alen,
1786 @@ -7338,7 +8975,7 @@ bool __init chacha20poly1305_selftest(vo
1787 chacha20poly1305_dec_vectors[i].key);
1788 if (!decryption_success(ret,
1789 chacha20poly1305_dec_vectors[i].failure,
1790 - memcmp(heap_src, chacha20poly1305_dec_vectors[i].output,
1791 + memcmp(computed_output, chacha20poly1305_dec_vectors[i].output,
1792 chacha20poly1305_dec_vectors[i].ilen -
1793 POLY1305_DIGEST_SIZE))) {
1794 pr_err("chacha20poly1305 sg decryption self-test %zu: FAIL\n",
1795 @@ -7365,6 +9002,7 @@ bool __init chacha20poly1305_selftest(vo
1796 success = false;
1797 }
1798 }
1799 +
1800 for (i = 0; i < ARRAY_SIZE(xchacha20poly1305_dec_vectors); ++i) {
1801 memset(computed_output, 0, MAXIMUM_TEST_BUFFER_LEN);
1802 ret = xchacha20poly1305_decrypt(computed_output,
1803 @@ -7386,8 +9024,54 @@ bool __init chacha20poly1305_selftest(vo
1804 }
1805 }
1806
1807 + for (total_len = POLY1305_DIGEST_SIZE; IS_ENABLED(DEBUG_CHACHA20POLY1305_SLOW_CHUNK_TEST)
1808 + && total_len <= 1 << 10; ++total_len) {
1809 + for (i = 0; i <= total_len; ++i) {
1810 + for (j = i; j <= total_len; ++j) {
1811 + sg_init_table(sg_src, 3);
1812 + sg_set_buf(&sg_src[0], input, i);
1813 + sg_set_buf(&sg_src[1], input + i, j - i);
1814 + sg_set_buf(&sg_src[2], input + j, total_len - j);
1815 + memset(computed_output, 0, total_len);
1816 + memset(input, 0, total_len);
1817 +
1818 + if (!chacha20poly1305_encrypt_sg_inplace(sg_src,
1819 + total_len - POLY1305_DIGEST_SIZE, NULL, 0,
1820 + 0, enc_key001))
1821 + goto chunkfail;
1822 + chacha20poly1305_encrypt(computed_output,
1823 + computed_output,
1824 + total_len - POLY1305_DIGEST_SIZE, NULL, 0, 0,
1825 + enc_key001);
1826 + if (memcmp(computed_output, input, total_len))
1827 + goto chunkfail;
1828 + if (!chacha20poly1305_decrypt(computed_output,
1829 + input, total_len, NULL, 0, 0, enc_key001))
1830 + goto chunkfail;
1831 + for (k = 0; k < total_len - POLY1305_DIGEST_SIZE; ++k) {
1832 + if (computed_output[k])
1833 + goto chunkfail;
1834 + }
1835 + if (!chacha20poly1305_decrypt_sg_inplace(sg_src,
1836 + total_len, NULL, 0, 0, enc_key001))
1837 + goto chunkfail;
1838 + for (k = 0; k < total_len - POLY1305_DIGEST_SIZE; ++k) {
1839 + if (input[k])
1840 + goto chunkfail;
1841 + }
1842 + continue;
1843 +
1844 + chunkfail:
1845 + pr_err("chacha20poly1305 chunked self-test %zu/%zu/%zu: FAIL\n",
1846 + total_len, i, j);
1847 + success = false;
1848 + }
1849 +
1850 + }
1851 + }
1852 +
1853 out:
1854 - kfree(heap_src);
1855 kfree(computed_output);
1856 + kfree(input);
1857 return success;
1858 }