xref: /dpdk/app/test/test_cryptodev_security_docsis_test_vectors.h (revision 0efea35a2bb0ae9df6e204151c7f96b5eb93e130)
1ea31f2b4SDavid Coyle /* SPDX-License-Identifier: BSD-3-Clause
2ea31f2b4SDavid Coyle  * Copyright(c) 2020 Intel Corporation
3ea31f2b4SDavid Coyle  */
4ea31f2b4SDavid Coyle 
5ea31f2b4SDavid Coyle #ifndef TEST_CRYPTODEV_SECURITY_DOCSIS_TEST_VECTORS_H_
6ea31f2b4SDavid Coyle #define TEST_CRYPTODEV_SECURITY_DOCSIS_TEST_VECTORS_H_
7ea31f2b4SDavid Coyle 
8ea31f2b4SDavid Coyle /*
9ea31f2b4SDavid Coyle  * DOCSIS test data and cases
10ea31f2b4SDavid Coyle  * - encrypt direction: CRC-Crypto
11ea31f2b4SDavid Coyle  * - decrypt direction: Crypto-CRC
12ea31f2b4SDavid Coyle  */
13ea31f2b4SDavid Coyle 
14ea31f2b4SDavid Coyle struct docsis_test_data {
15c1685e2fSRebecca Troy 	const char test_descr_uplink[128];
16c1685e2fSRebecca Troy 	const char test_descr_downlink[128];
17c1685e2fSRebecca Troy 
18ea31f2b4SDavid Coyle 	struct {
19ea31f2b4SDavid Coyle 		uint8_t data[32];
20ea31f2b4SDavid Coyle 		unsigned int len;
21ea31f2b4SDavid Coyle 	} key;
22ea31f2b4SDavid Coyle 
23ea31f2b4SDavid Coyle 	struct {
24*0efea35aSTyler Retzlaff 		alignas(16) uint8_t data[16];
25ea31f2b4SDavid Coyle 		unsigned int len;
26ea31f2b4SDavid Coyle 	} iv;
27ea31f2b4SDavid Coyle 
28ea31f2b4SDavid Coyle 	struct {
29ea31f2b4SDavid Coyle 		uint8_t data[1024];
30ea31f2b4SDavid Coyle 		unsigned int len;
31ea31f2b4SDavid Coyle 		unsigned int cipher_offset;
32ea31f2b4SDavid Coyle 		unsigned int crc_offset;
33ea31f2b4SDavid Coyle 		bool no_cipher;
34ea31f2b4SDavid Coyle 		bool no_crc;
35ea31f2b4SDavid Coyle 	} plaintext;
36ea31f2b4SDavid Coyle 
37ea31f2b4SDavid Coyle 	struct {
38ea31f2b4SDavid Coyle 		uint8_t data[1024];
39ea31f2b4SDavid Coyle 		unsigned int len;
40ea31f2b4SDavid Coyle 		unsigned int cipher_offset;
41ea31f2b4SDavid Coyle 		unsigned int crc_offset;
42ea31f2b4SDavid Coyle 		bool no_cipher;
43ea31f2b4SDavid Coyle 		bool no_crc;
44ea31f2b4SDavid Coyle 	} ciphertext;
45ea31f2b4SDavid Coyle };
46ea31f2b4SDavid Coyle 
47c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_1 = {
48c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (24-byte "
49c1685e2fSRebecca Troy 			"frame, Small offset and runt block decryption)"},
50c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
51c1685e2fSRebecca Troy 			"(24-byte frame, Small offset and runt block encryption)"},
52ea31f2b4SDavid Coyle 	.key = {
53ea31f2b4SDavid Coyle 		.data = {
54ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
55ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
56ea31f2b4SDavid Coyle 		},
57ea31f2b4SDavid Coyle 		.len = 16
58ea31f2b4SDavid Coyle 	},
59ea31f2b4SDavid Coyle 	.iv = {
60ea31f2b4SDavid Coyle 		.data = {
61ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
62ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
63ea31f2b4SDavid Coyle 		},
64ea31f2b4SDavid Coyle 		.len = 16
65ea31f2b4SDavid Coyle 	},
66ea31f2b4SDavid Coyle 	.plaintext = {
67ea31f2b4SDavid Coyle 		.data = {
68ea31f2b4SDavid Coyle 			/* DOCSIS header */
69ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
70ea31f2b4SDavid Coyle 			/* Ethernet frame */
71ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
72ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
73ea31f2b4SDavid Coyle 			/* CRC */
74ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
75ea31f2b4SDavid Coyle 		},
76ea31f2b4SDavid Coyle 		.len = 24,
77ea31f2b4SDavid Coyle 		.cipher_offset = 18,
78ea31f2b4SDavid Coyle 		.crc_offset = 6,
79ea31f2b4SDavid Coyle 		.no_cipher = false,
80ea31f2b4SDavid Coyle 		.no_crc = false
81ea31f2b4SDavid Coyle 	},
82ea31f2b4SDavid Coyle 	.ciphertext = {
83ea31f2b4SDavid Coyle 		.data = {
84ea31f2b4SDavid Coyle 			/* DOCSIS header */
85ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
86ea31f2b4SDavid Coyle 			/* Ethernet frame */
87ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
88ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x7A, 0xF0,
89ea31f2b4SDavid Coyle 			/* CRC */
90ea31f2b4SDavid Coyle 			0x61, 0xF8, 0x63, 0x42
91ea31f2b4SDavid Coyle 		},
92ea31f2b4SDavid Coyle 		.len = 24,
93ea31f2b4SDavid Coyle 		.cipher_offset = 18,
94ea31f2b4SDavid Coyle 		.crc_offset = 6,
95ea31f2b4SDavid Coyle 		.no_cipher = false,
96ea31f2b4SDavid Coyle 		.no_crc = false
97ea31f2b4SDavid Coyle 	}
98ea31f2b4SDavid Coyle };
99ea31f2b4SDavid Coyle 
100c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_2 = {
101c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (25-byte "
102c1685e2fSRebecca Troy 			"frame, Small offset and runt block decryption)"},
103c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
104c1685e2fSRebecca Troy 			"(25-byte frame, Small offset and runt block encryption)"},
105ea31f2b4SDavid Coyle 	.key = {
106ea31f2b4SDavid Coyle 		.data = {
107ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
108ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
109ea31f2b4SDavid Coyle 		},
110ea31f2b4SDavid Coyle 		.len = 16
111ea31f2b4SDavid Coyle 	},
112ea31f2b4SDavid Coyle 	.iv = {
113ea31f2b4SDavid Coyle 		.data = {
114ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
115ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
116ea31f2b4SDavid Coyle 		},
117ea31f2b4SDavid Coyle 		.len = 16
118ea31f2b4SDavid Coyle 	},
119ea31f2b4SDavid Coyle 	.plaintext = {
120ea31f2b4SDavid Coyle 		.data = {
121ea31f2b4SDavid Coyle 			/* DOCSIS header */
122ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
123ea31f2b4SDavid Coyle 			/* Ethernet frame */
124ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
125ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA,
126ea31f2b4SDavid Coyle 			/* CRC */
127ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
128ea31f2b4SDavid Coyle 		},
129ea31f2b4SDavid Coyle 		.len = 25,
130ea31f2b4SDavid Coyle 		.cipher_offset = 18,
131ea31f2b4SDavid Coyle 		.crc_offset = 6,
132ea31f2b4SDavid Coyle 		.no_cipher = false,
133ea31f2b4SDavid Coyle 		.no_crc = false
134ea31f2b4SDavid Coyle 	},
135ea31f2b4SDavid Coyle 	.ciphertext = {
136ea31f2b4SDavid Coyle 		.data = {
137ea31f2b4SDavid Coyle 			/* DOCSIS header */
138ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
139ea31f2b4SDavid Coyle 			/* Ethernet frame */
140ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
141ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x7A, 0xF0, 0xDF,
142ea31f2b4SDavid Coyle 			/* CRC */
143ea31f2b4SDavid Coyle 			0xFE, 0x12, 0x99, 0xE5
144ea31f2b4SDavid Coyle 		},
145ea31f2b4SDavid Coyle 		.len = 25,
146ea31f2b4SDavid Coyle 		.cipher_offset = 18,
147ea31f2b4SDavid Coyle 		.crc_offset = 6,
148ea31f2b4SDavid Coyle 		.no_cipher = false,
149ea31f2b4SDavid Coyle 		.no_crc = false
150ea31f2b4SDavid Coyle 	}
151ea31f2b4SDavid Coyle };
152ea31f2b4SDavid Coyle 
153c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_3 = {
154c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (34-byte "
155c1685e2fSRebecca Troy 			"frame, Small offset and full block decryption)"},
156c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
157c1685e2fSRebecca Troy 			"(34-byte frame, Small offset and full block encryption)"},
158ea31f2b4SDavid Coyle 	.key = {
159ea31f2b4SDavid Coyle 		.data = {
160ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
161ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
162ea31f2b4SDavid Coyle 		},
163ea31f2b4SDavid Coyle 		.len = 16
164ea31f2b4SDavid Coyle 	},
165ea31f2b4SDavid Coyle 	.iv = {
166ea31f2b4SDavid Coyle 		.data = {
167ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
168ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
169ea31f2b4SDavid Coyle 		},
170ea31f2b4SDavid Coyle 		.len = 16
171ea31f2b4SDavid Coyle 	},
172ea31f2b4SDavid Coyle 	.plaintext = {
173ea31f2b4SDavid Coyle 		.data = {
174ea31f2b4SDavid Coyle 			/* DOCSIS header */
175ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
176ea31f2b4SDavid Coyle 			/* Ethernet frame */
177ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
178ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
179ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
180ea31f2b4SDavid Coyle 			/* CRC */
181ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
182ea31f2b4SDavid Coyle 		},
183ea31f2b4SDavid Coyle 		.len = 34,
184ea31f2b4SDavid Coyle 		.cipher_offset = 18,
185ea31f2b4SDavid Coyle 		.crc_offset = 6,
186ea31f2b4SDavid Coyle 		.no_cipher = false,
187ea31f2b4SDavid Coyle 		.no_crc = false
188ea31f2b4SDavid Coyle 	},
189ea31f2b4SDavid Coyle 	.ciphertext = {
190ea31f2b4SDavid Coyle 		.data = {
191ea31f2b4SDavid Coyle 			/* DOCSIS header */
192ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
193ea31f2b4SDavid Coyle 			/* Ethernet frame */
194ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
195ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0xD6, 0xE2, 0x70, 0x5C,
196ea31f2b4SDavid Coyle 			0xE6, 0x4D, 0xCC, 0x8C, 0x47, 0xB7, 0x09, 0xD6,
197ea31f2b4SDavid Coyle 			/* CRC */
198ea31f2b4SDavid Coyle 			0x54, 0x85, 0xF8, 0x32
199ea31f2b4SDavid Coyle 		},
200ea31f2b4SDavid Coyle 		.len = 34,
201ea31f2b4SDavid Coyle 		.cipher_offset = 18,
202ea31f2b4SDavid Coyle 		.crc_offset = 6,
203ea31f2b4SDavid Coyle 		.no_cipher = false,
204ea31f2b4SDavid Coyle 		.no_crc = false
205ea31f2b4SDavid Coyle 	}
206ea31f2b4SDavid Coyle };
207ea31f2b4SDavid Coyle 
208c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_4 = {
209c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (35-byte "
210c1685e2fSRebecca Troy 			"frame, Small offset and uneven decryption)"},
211c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
212c1685e2fSRebecca Troy 			"(35-byte frame, Small offset and uneven encryption)"},
213ea31f2b4SDavid Coyle 	.key = {
214ea31f2b4SDavid Coyle 		.data = {
215ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
216ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
217ea31f2b4SDavid Coyle 		},
218ea31f2b4SDavid Coyle 		.len = 16
219ea31f2b4SDavid Coyle 	},
220ea31f2b4SDavid Coyle 	.iv = {
221ea31f2b4SDavid Coyle 		.data = {
222ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
223ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
224ea31f2b4SDavid Coyle 		},
225ea31f2b4SDavid Coyle 		.len = 16
226ea31f2b4SDavid Coyle 	},
227ea31f2b4SDavid Coyle 	.plaintext = {
228ea31f2b4SDavid Coyle 		.data = {
229ea31f2b4SDavid Coyle 			/* DOCSIS header */
230ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
231ea31f2b4SDavid Coyle 			/* Ethernet frame */
232ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
233ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
234ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
235ea31f2b4SDavid Coyle 			0xAA,
236ea31f2b4SDavid Coyle 			/* CRC */
237ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
238ea31f2b4SDavid Coyle 		},
239ea31f2b4SDavid Coyle 		.len = 35,
240ea31f2b4SDavid Coyle 		.cipher_offset = 18,
241ea31f2b4SDavid Coyle 		.crc_offset = 6,
242ea31f2b4SDavid Coyle 		.no_cipher = false,
243ea31f2b4SDavid Coyle 		.no_crc = false
244ea31f2b4SDavid Coyle 	},
245ea31f2b4SDavid Coyle 	.ciphertext = {
246ea31f2b4SDavid Coyle 		.data = {
247ea31f2b4SDavid Coyle 			/* DOCSIS header */
248ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
249ea31f2b4SDavid Coyle 			/* Ethernet frame */
250ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
251ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x92, 0x6A, 0xC2, 0xDC,
252ea31f2b4SDavid Coyle 			0xEE, 0x3B, 0x31, 0xEC, 0x03, 0xDE, 0x95, 0x33,
253ea31f2b4SDavid Coyle 			0x5E,
254ea31f2b4SDavid Coyle 			/* CRC */
255ea31f2b4SDavid Coyle 			0xFE, 0x47, 0x3E, 0x22
256ea31f2b4SDavid Coyle 		},
257ea31f2b4SDavid Coyle 		.len = 35,
258ea31f2b4SDavid Coyle 		.cipher_offset = 18,
259ea31f2b4SDavid Coyle 		.crc_offset = 6,
260ea31f2b4SDavid Coyle 		.no_cipher = false,
261ea31f2b4SDavid Coyle 		.no_crc = false
262ea31f2b4SDavid Coyle 	}
263ea31f2b4SDavid Coyle };
264ea31f2b4SDavid Coyle 
265c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_5 = {
266c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (82-byte "
267c1685e2fSRebecca Troy 			"frame, Small offset and full block decryption)"},
268c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
269c1685e2fSRebecca Troy 			"(82-byte frame, Small offset and full block encryption)"},
270ea31f2b4SDavid Coyle 	.key = {
271ea31f2b4SDavid Coyle 		.data = {
272ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
273ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
274ea31f2b4SDavid Coyle 		},
275ea31f2b4SDavid Coyle 		.len = 16
276ea31f2b4SDavid Coyle 	},
277ea31f2b4SDavid Coyle 	.iv = {
278ea31f2b4SDavid Coyle 		.data = {
279ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
280ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
281ea31f2b4SDavid Coyle 		},
282ea31f2b4SDavid Coyle 		.len = 16
283ea31f2b4SDavid Coyle 	},
284ea31f2b4SDavid Coyle 	.plaintext = {
285ea31f2b4SDavid Coyle 		.data = {
286ea31f2b4SDavid Coyle 			/* DOCSIS header */
287ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
288ea31f2b4SDavid Coyle 			/* Ethernet frame */
289ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
290ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
291ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
292ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
293ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
294ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
295ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
296ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
297ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
298ea31f2b4SDavid Coyle 			/* CRC */
299ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
300ea31f2b4SDavid Coyle 		},
301ea31f2b4SDavid Coyle 		.len = 82,
302ea31f2b4SDavid Coyle 		.cipher_offset = 18,
303ea31f2b4SDavid Coyle 		.crc_offset = 6,
304ea31f2b4SDavid Coyle 		.no_cipher = false,
305ea31f2b4SDavid Coyle 		.no_crc = false
306ea31f2b4SDavid Coyle 	},
307ea31f2b4SDavid Coyle 	.ciphertext = {
308ea31f2b4SDavid Coyle 		.data = {
309ea31f2b4SDavid Coyle 			/* DOCSIS header */
310ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
311ea31f2b4SDavid Coyle 			/* Ethernet frame */
312ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
313ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x77, 0x74, 0x56, 0x05,
314ea31f2b4SDavid Coyle 			0xD1, 0x14, 0xA2, 0x8D, 0x2C, 0x9A, 0x11, 0xFC,
315ea31f2b4SDavid Coyle 			0x7D, 0xB0, 0xE7, 0x18, 0xCE, 0x75, 0x7C, 0x89,
316ea31f2b4SDavid Coyle 			0x14, 0x56, 0xE2, 0xF2, 0xB7, 0x47, 0x08, 0x27,
317ea31f2b4SDavid Coyle 			0xF7, 0x08, 0x7A, 0x13, 0x90, 0x81, 0x75, 0xB0,
318ea31f2b4SDavid Coyle 			0xC7, 0x91, 0x04, 0x83, 0xAD, 0x11, 0x46, 0x46,
319ea31f2b4SDavid Coyle 			0xF8, 0x54, 0x87, 0xA0, 0x42, 0xF3, 0x71, 0xA9,
320ea31f2b4SDavid Coyle 			0x8A, 0xCD, 0x59, 0x77, 0x67, 0x11, 0x1A, 0x87,
321ea31f2b4SDavid Coyle 			/* CRC */
322ea31f2b4SDavid Coyle 			0xAB, 0xED, 0x2C, 0x26
323ea31f2b4SDavid Coyle 		},
324ea31f2b4SDavid Coyle 		.len = 82,
325ea31f2b4SDavid Coyle 		.cipher_offset = 18,
326ea31f2b4SDavid Coyle 		.crc_offset = 6,
327ea31f2b4SDavid Coyle 		.no_cipher = false,
328ea31f2b4SDavid Coyle 		.no_crc = false
329ea31f2b4SDavid Coyle 	}
330ea31f2b4SDavid Coyle };
331ea31f2b4SDavid Coyle 
332c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_6 = {
333c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (83-byte "
334c1685e2fSRebecca Troy 			"frame, Small offset and uneven decryption)"},
335c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
336c1685e2fSRebecca Troy 			"(83-byte frame, Small offset and uneven encryption)"},
337ea31f2b4SDavid Coyle 	.key = {
338ea31f2b4SDavid Coyle 		.data = {
339ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
340ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
341ea31f2b4SDavid Coyle 		},
342ea31f2b4SDavid Coyle 		.len = 16
343ea31f2b4SDavid Coyle 	},
344ea31f2b4SDavid Coyle 	.iv = {
345ea31f2b4SDavid Coyle 		.data = {
346ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
347ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
348ea31f2b4SDavid Coyle 		},
349ea31f2b4SDavid Coyle 		.len = 16
350ea31f2b4SDavid Coyle 	},
351ea31f2b4SDavid Coyle 	.plaintext = {
352ea31f2b4SDavid Coyle 		.data = {
353ea31f2b4SDavid Coyle 			/* DOCSIS header */
354ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
355ea31f2b4SDavid Coyle 			/* Ethernet frame */
356ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
357ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
358ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
359ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
360ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
361ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
362ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
363ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
364ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
365ea31f2b4SDavid Coyle 			0xAA,
366ea31f2b4SDavid Coyle 			/* CRC */
367ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
368ea31f2b4SDavid Coyle 		},
369ea31f2b4SDavid Coyle 		.len = 83,
370ea31f2b4SDavid Coyle 		.cipher_offset = 18,
371ea31f2b4SDavid Coyle 		.crc_offset = 6,
372ea31f2b4SDavid Coyle 		.no_cipher = false,
373ea31f2b4SDavid Coyle 		.no_crc = false
374ea31f2b4SDavid Coyle 	},
375ea31f2b4SDavid Coyle 	.ciphertext = {
376ea31f2b4SDavid Coyle 		.data = {
377ea31f2b4SDavid Coyle 			/* DOCSIS header */
378ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
379ea31f2b4SDavid Coyle 			/* Ethernet frame */
380ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
381ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x77, 0x74, 0x56, 0x05,
382ea31f2b4SDavid Coyle 			0xD1, 0x14, 0xA2, 0x8D, 0x2C, 0x9A, 0x11, 0xFC,
383ea31f2b4SDavid Coyle 			0x7D, 0xB0, 0xE7, 0x18, 0xCE, 0x75, 0x7C, 0x89,
384ea31f2b4SDavid Coyle 			0x14, 0x56, 0xE2, 0xF2, 0xB7, 0x47, 0x08, 0x27,
385ea31f2b4SDavid Coyle 			0xF7, 0x08, 0x7A, 0x13, 0x90, 0x81, 0x75, 0xB0,
386ea31f2b4SDavid Coyle 			0xC7, 0x91, 0x04, 0x83, 0xAD, 0x11, 0x46, 0x46,
387ea31f2b4SDavid Coyle 			0xF8, 0x54, 0x87, 0xA0, 0xA4, 0x0C, 0xC2, 0xF0,
388ea31f2b4SDavid Coyle 			0x81, 0x49, 0xA8, 0xA6, 0x6C, 0x48, 0xEB, 0x1F,
389ea31f2b4SDavid Coyle 			0x4B,
390ea31f2b4SDavid Coyle 			/* CRC */
391ea31f2b4SDavid Coyle 			0x2F, 0xD4, 0x48, 0x18
392ea31f2b4SDavid Coyle 		},
393ea31f2b4SDavid Coyle 		.len = 83,
394ea31f2b4SDavid Coyle 		.cipher_offset = 18,
395ea31f2b4SDavid Coyle 		.crc_offset = 6,
396ea31f2b4SDavid Coyle 		.no_cipher = false,
397ea31f2b4SDavid Coyle 		.no_crc = false
398ea31f2b4SDavid Coyle 	}
399ea31f2b4SDavid Coyle };
400ea31f2b4SDavid Coyle 
401c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_7 = {
402c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (83-byte "
403c1685e2fSRebecca Troy 			"frame, Big offset and uneven decryption)"},
404c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
405c1685e2fSRebecca Troy 			"(83-byte frame, Big offset and uneven encryption)"},
406ea31f2b4SDavid Coyle 	.key = {
407ea31f2b4SDavid Coyle 		.data = {
408ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
409ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
410ea31f2b4SDavid Coyle 		},
411ea31f2b4SDavid Coyle 		.len = 16
412ea31f2b4SDavid Coyle 	},
413ea31f2b4SDavid Coyle 	.iv = {
414ea31f2b4SDavid Coyle 		.data = {
415ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
416ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
417ea31f2b4SDavid Coyle 		},
418ea31f2b4SDavid Coyle 		.len = 16
419ea31f2b4SDavid Coyle 	},
420ea31f2b4SDavid Coyle 	.plaintext = {
421ea31f2b4SDavid Coyle 		.data = {
422ea31f2b4SDavid Coyle 			/* DOCSIS header */
423ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
424ea31f2b4SDavid Coyle 			/* Ethernet frame */
425ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
426ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
427ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
428ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
429ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
430ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
431ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
432ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
433ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
434ea31f2b4SDavid Coyle 			0xAA,
435ea31f2b4SDavid Coyle 			/* CRC */
436ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
437ea31f2b4SDavid Coyle 		},
438ea31f2b4SDavid Coyle 		.len = 83,
439ea31f2b4SDavid Coyle 		.cipher_offset = 40,
440ea31f2b4SDavid Coyle 		.crc_offset = 6,
441ea31f2b4SDavid Coyle 		.no_cipher = false,
442ea31f2b4SDavid Coyle 		.no_crc = false
443ea31f2b4SDavid Coyle 	},
444ea31f2b4SDavid Coyle 	.ciphertext = {
445ea31f2b4SDavid Coyle 		.data = {
446ea31f2b4SDavid Coyle 			/* DOCSIS header */
447ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
448ea31f2b4SDavid Coyle 			/* Ethernet frame */
449ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
450ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
451ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
452ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
453ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0x3B, 0x9F, 0x72, 0x4C, 0xB5, 0x72,
454ea31f2b4SDavid Coyle 			0x3E, 0x56, 0x54, 0x49, 0x13, 0x53, 0xC4, 0xAA,
455ea31f2b4SDavid Coyle 			0xCD, 0xEA, 0x6A, 0x88, 0x99, 0x07, 0x86, 0xF4,
456ea31f2b4SDavid Coyle 			0xCF, 0x03, 0x4E, 0xDF, 0x65, 0x61, 0x47, 0x5B,
457ea31f2b4SDavid Coyle 			0x2F, 0x81, 0x09, 0x12, 0x9A, 0xC2, 0x24, 0x8C,
458ea31f2b4SDavid Coyle 			0x09,
459ea31f2b4SDavid Coyle 			/* CRC */
460ea31f2b4SDavid Coyle 			0x11, 0xB4, 0x06, 0x33
461ea31f2b4SDavid Coyle 		},
462ea31f2b4SDavid Coyle 		.len = 83,
463ea31f2b4SDavid Coyle 		.cipher_offset = 40,
464ea31f2b4SDavid Coyle 		.crc_offset = 6,
465ea31f2b4SDavid Coyle 		.no_cipher = false,
466ea31f2b4SDavid Coyle 		.no_crc = false
467ea31f2b4SDavid Coyle 	}
468ea31f2b4SDavid Coyle };
469ea31f2b4SDavid Coyle 
470c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_8 = {
471c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (24-byte "
472c1685e2fSRebecca Troy 			"frame, No CRC, Small offset and runt block decryption)"},
473c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
474c1685e2fSRebecca Troy 			"(24-byte frame, No CRC, Small offset and runt block encryption)"},
475ea31f2b4SDavid Coyle 	.key = {
476ea31f2b4SDavid Coyle 		.data = {
477ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
478ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
479ea31f2b4SDavid Coyle 		},
480ea31f2b4SDavid Coyle 		.len = 16
481ea31f2b4SDavid Coyle 	},
482ea31f2b4SDavid Coyle 	.iv = {
483ea31f2b4SDavid Coyle 		.data = {
484ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
485ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
486ea31f2b4SDavid Coyle 		},
487ea31f2b4SDavid Coyle 		.len = 16
488ea31f2b4SDavid Coyle 	},
489ea31f2b4SDavid Coyle 	.plaintext = {
490ea31f2b4SDavid Coyle 		.data = {
491ea31f2b4SDavid Coyle 			/* DOCSIS header */
492ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
493ea31f2b4SDavid Coyle 			/* Ethernet frame */
494ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
495ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
496ea31f2b4SDavid Coyle 			/* CRC */
497ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
498ea31f2b4SDavid Coyle 		},
499ea31f2b4SDavid Coyle 		.len = 24,
500ea31f2b4SDavid Coyle 		.cipher_offset = 18,
501ea31f2b4SDavid Coyle 		.crc_offset = 6,
502ea31f2b4SDavid Coyle 		.no_cipher = false,
503ea31f2b4SDavid Coyle 		.no_crc = true
504ea31f2b4SDavid Coyle 	},
505ea31f2b4SDavid Coyle 	.ciphertext = {
506ea31f2b4SDavid Coyle 		.data = {
507ea31f2b4SDavid Coyle 			/* DOCSIS header */
508ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
509ea31f2b4SDavid Coyle 			/* Ethernet frame */
510ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
511ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x7A, 0xF0,
512ea31f2b4SDavid Coyle 			/* CRC */
513ea31f2b4SDavid Coyle 			0x8A, 0x0F, 0x74, 0xE8
514ea31f2b4SDavid Coyle 		},
515ea31f2b4SDavid Coyle 		.len = 24,
516ea31f2b4SDavid Coyle 		.cipher_offset = 18,
517ea31f2b4SDavid Coyle 		.crc_offset = 6,
518ea31f2b4SDavid Coyle 		.no_cipher = false,
519ea31f2b4SDavid Coyle 		.no_crc = true
520ea31f2b4SDavid Coyle 	}
521ea31f2b4SDavid Coyle };
522ea31f2b4SDavid Coyle 
523c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_9 = {
524c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (83-byte "
525c1685e2fSRebecca Troy 			"frame, No CRC, Big offset and uneven decryption)"},
526c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
527c1685e2fSRebecca Troy 			"(83-byte frame, No CRC, Big offset and uneven encryption)"},
528ea31f2b4SDavid Coyle 	.key = {
529ea31f2b4SDavid Coyle 		.data = {
530ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
531ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
532ea31f2b4SDavid Coyle 		},
533ea31f2b4SDavid Coyle 		.len = 16
534ea31f2b4SDavid Coyle 	},
535ea31f2b4SDavid Coyle 	.iv = {
536ea31f2b4SDavid Coyle 		.data = {
537ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
538ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
539ea31f2b4SDavid Coyle 		},
540ea31f2b4SDavid Coyle 		.len = 16
541ea31f2b4SDavid Coyle 	},
542ea31f2b4SDavid Coyle 	.plaintext = {
543ea31f2b4SDavid Coyle 		.data = {
544ea31f2b4SDavid Coyle 			/* DOCSIS header */
545ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
546ea31f2b4SDavid Coyle 			/* Ethernet frame */
547ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
548ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
549ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
550ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
551ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
552ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
553ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
554ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
555ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
556ea31f2b4SDavid Coyle 			0xAA,
557ea31f2b4SDavid Coyle 			/* CRC */
558ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
559ea31f2b4SDavid Coyle 		},
560ea31f2b4SDavid Coyle 		.len = 83,
561ea31f2b4SDavid Coyle 		.cipher_offset = 40,
562ea31f2b4SDavid Coyle 		.crc_offset = 6,
563ea31f2b4SDavid Coyle 		.no_cipher = false,
564ea31f2b4SDavid Coyle 		.no_crc = true
565ea31f2b4SDavid Coyle 	},
566ea31f2b4SDavid Coyle 	.ciphertext = {
567ea31f2b4SDavid Coyle 		.data = {
568ea31f2b4SDavid Coyle 			/* DOCSIS header */
569ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
570ea31f2b4SDavid Coyle 			/* Ethernet frame */
571ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
572ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
573ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
574ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
575ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0x3B, 0x9F, 0x72, 0x4C, 0xB5, 0x72,
576ea31f2b4SDavid Coyle 			0x3E, 0x56, 0x54, 0x49, 0x13, 0x53, 0xC4, 0xAA,
577ea31f2b4SDavid Coyle 			0xCD, 0xEA, 0x6A, 0x88, 0x99, 0x07, 0x86, 0xF4,
578ea31f2b4SDavid Coyle 			0xCF, 0x03, 0x4E, 0xDF, 0x65, 0x61, 0x47, 0x5B,
579ea31f2b4SDavid Coyle 			0x2F, 0x81, 0x09, 0x12, 0x9A, 0xC2, 0x24, 0x8C,
580ea31f2b4SDavid Coyle 			0x09,
581ea31f2b4SDavid Coyle 			/* CRC */
582ea31f2b4SDavid Coyle 			0x5D, 0x2B, 0x12, 0xF4
583ea31f2b4SDavid Coyle 		},
584ea31f2b4SDavid Coyle 		.len = 83,
585ea31f2b4SDavid Coyle 		.cipher_offset = 40,
586ea31f2b4SDavid Coyle 		.crc_offset = 6,
587ea31f2b4SDavid Coyle 		.no_cipher = false,
588ea31f2b4SDavid Coyle 		.no_crc = true
589ea31f2b4SDavid Coyle 	}
590ea31f2b4SDavid Coyle };
591ea31f2b4SDavid Coyle 
592c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_10 = {
593c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (24-byte "
594c1685e2fSRebecca Troy 			"frame, No decryption)"},
595c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
596c1685e2fSRebecca Troy 			"(24-byte frame, No encryption)"},
597ea31f2b4SDavid Coyle 	.key = {
598ea31f2b4SDavid Coyle 		.data = {
599ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
600ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
601ea31f2b4SDavid Coyle 		},
602ea31f2b4SDavid Coyle 		.len = 16
603ea31f2b4SDavid Coyle 	},
604ea31f2b4SDavid Coyle 	.iv = {
605ea31f2b4SDavid Coyle 		.data = {
606ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
607ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
608ea31f2b4SDavid Coyle 		},
609ea31f2b4SDavid Coyle 		.len = 16
610ea31f2b4SDavid Coyle 	},
611ea31f2b4SDavid Coyle 	.plaintext = {
612ea31f2b4SDavid Coyle 		.data = {
613ea31f2b4SDavid Coyle 			/* DOCSIS header */
614ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
615ea31f2b4SDavid Coyle 			/* Ethernet frame */
616ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
617ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
618ea31f2b4SDavid Coyle 			/* CRC */
619ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
620ea31f2b4SDavid Coyle 		},
621ea31f2b4SDavid Coyle 		.len = 24,
622ea31f2b4SDavid Coyle 		.cipher_offset = 18,
623ea31f2b4SDavid Coyle 		.crc_offset = 6,
624ea31f2b4SDavid Coyle 		.no_cipher = true,
625ea31f2b4SDavid Coyle 		.no_crc = false
626ea31f2b4SDavid Coyle 	},
627ea31f2b4SDavid Coyle 	.ciphertext = {
628ea31f2b4SDavid Coyle 		.data = {
629ea31f2b4SDavid Coyle 			/* DOCSIS header */
630ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
631ea31f2b4SDavid Coyle 			/* Ethernet frame */
632ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
633ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
634ea31f2b4SDavid Coyle 			/* CRC */
635ea31f2b4SDavid Coyle 			0x14, 0x08, 0xE8, 0x55
636ea31f2b4SDavid Coyle 		},
637ea31f2b4SDavid Coyle 		.len = 24,
638ea31f2b4SDavid Coyle 		.cipher_offset = 18,
639ea31f2b4SDavid Coyle 		.crc_offset = 6,
640ea31f2b4SDavid Coyle 		.no_cipher = true,
641ea31f2b4SDavid Coyle 		.no_crc = false
642ea31f2b4SDavid Coyle 	}
643ea31f2b4SDavid Coyle };
644ea31f2b4SDavid Coyle 
645c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_11 = {
646c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (83-byte "
647c1685e2fSRebecca Troy 			"frame, No decryption)"},
648c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
649c1685e2fSRebecca Troy 			"(83-byte frame, No encryption)"},
650ea31f2b4SDavid Coyle 	.key = {
651ea31f2b4SDavid Coyle 		.data = {
652ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
653ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
654ea31f2b4SDavid Coyle 		},
655ea31f2b4SDavid Coyle 		.len = 16
656ea31f2b4SDavid Coyle 	},
657ea31f2b4SDavid Coyle 	.iv = {
658ea31f2b4SDavid Coyle 		.data = {
659ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
660ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
661ea31f2b4SDavid Coyle 		},
662ea31f2b4SDavid Coyle 		.len = 16
663ea31f2b4SDavid Coyle 	},
664ea31f2b4SDavid Coyle 	.plaintext = {
665ea31f2b4SDavid Coyle 		.data = {
666ea31f2b4SDavid Coyle 			/* DOCSIS header */
667ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
668ea31f2b4SDavid Coyle 			/* Ethernet frame */
669ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
670ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
671ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
672ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
673ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
674ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
675ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
676ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
677ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
678ea31f2b4SDavid Coyle 			0xAA,
679ea31f2b4SDavid Coyle 			/* CRC */
680ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
681ea31f2b4SDavid Coyle 		},
682ea31f2b4SDavid Coyle 		.len = 83,
683ea31f2b4SDavid Coyle 		.cipher_offset = 40,
684ea31f2b4SDavid Coyle 		.crc_offset = 6,
685ea31f2b4SDavid Coyle 		.no_cipher = true,
686ea31f2b4SDavid Coyle 		.no_crc = false
687ea31f2b4SDavid Coyle 	},
688ea31f2b4SDavid Coyle 	.ciphertext = {
689ea31f2b4SDavid Coyle 		.data = {
690ea31f2b4SDavid Coyle 			/* DOCSIS header */
691ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
692ea31f2b4SDavid Coyle 			/* Ethernet frame */
693ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
694ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
695ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
696ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
697ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
698ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
699ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
700ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
701ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
702ea31f2b4SDavid Coyle 			0xAA,
703ea31f2b4SDavid Coyle 			/* CRC */
704ea31f2b4SDavid Coyle 			0xB3, 0x60, 0xEB, 0x38
705ea31f2b4SDavid Coyle 		},
706ea31f2b4SDavid Coyle 		.len = 83,
707ea31f2b4SDavid Coyle 		.cipher_offset = 40,
708ea31f2b4SDavid Coyle 		.crc_offset = 6,
709ea31f2b4SDavid Coyle 		.no_cipher = true,
710ea31f2b4SDavid Coyle 		.no_crc = false
711ea31f2b4SDavid Coyle 	}
712ea31f2b4SDavid Coyle };
713ea31f2b4SDavid Coyle 
714c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_12 = {
715c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (24-byte "
716c1685e2fSRebecca Troy 			"frame, No CRC, No decryption)"},
717c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
718c1685e2fSRebecca Troy 		"(24-byte frame, No CRC, No encryption)"},
719ea31f2b4SDavid Coyle 	.key = {
720ea31f2b4SDavid Coyle 		.data = {
721ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
722ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
723ea31f2b4SDavid Coyle 		},
724ea31f2b4SDavid Coyle 		.len = 16
725ea31f2b4SDavid Coyle 	},
726ea31f2b4SDavid Coyle 	.iv = {
727ea31f2b4SDavid Coyle 		.data = {
728ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
729ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
730ea31f2b4SDavid Coyle 		},
731ea31f2b4SDavid Coyle 		.len = 16
732ea31f2b4SDavid Coyle 	},
733ea31f2b4SDavid Coyle 	.plaintext = {
734ea31f2b4SDavid Coyle 		.data = {
735ea31f2b4SDavid Coyle 			/* DOCSIS header */
736ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
737ea31f2b4SDavid Coyle 			/* Ethernet frame */
738ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
739ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
740ea31f2b4SDavid Coyle 			/* CRC */
741ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
742ea31f2b4SDavid Coyle 		},
743ea31f2b4SDavid Coyle 		.len = 24,
744ea31f2b4SDavid Coyle 		.cipher_offset = 18,
745ea31f2b4SDavid Coyle 		.crc_offset = 6,
746ea31f2b4SDavid Coyle 		.no_cipher = true,
747ea31f2b4SDavid Coyle 		.no_crc = true
748ea31f2b4SDavid Coyle 	},
749ea31f2b4SDavid Coyle 	.ciphertext = {
750ea31f2b4SDavid Coyle 		.data = {
751ea31f2b4SDavid Coyle 			/* DOCSIS header */
752ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
753ea31f2b4SDavid Coyle 			/* Ethernet frame */
754ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
755ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
756ea31f2b4SDavid Coyle 			/* CRC */
757ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
758ea31f2b4SDavid Coyle 		},
759ea31f2b4SDavid Coyle 		.len = 24,
760ea31f2b4SDavid Coyle 		.cipher_offset = 18,
761ea31f2b4SDavid Coyle 		.crc_offset = 6,
762ea31f2b4SDavid Coyle 		.no_cipher = true,
763ea31f2b4SDavid Coyle 		.no_crc = true
764ea31f2b4SDavid Coyle 	}
765ea31f2b4SDavid Coyle };
766ea31f2b4SDavid Coyle 
767c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_13 = {
768c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-128 and CRC Verify (83-byte "
769c1685e2fSRebecca Troy 			"frame, No CRC, No decryption)"},
770c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-128 "
771c1685e2fSRebecca Troy 			"(83-byte frame, No CRC, No encryption)"},
772ea31f2b4SDavid Coyle 	.key = {
773ea31f2b4SDavid Coyle 		.data = {
774ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
775ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
776ea31f2b4SDavid Coyle 		},
777ea31f2b4SDavid Coyle 		.len = 16
778ea31f2b4SDavid Coyle 	},
779ea31f2b4SDavid Coyle 	.iv = {
780ea31f2b4SDavid Coyle 		.data = {
781ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
782ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
783ea31f2b4SDavid Coyle 		},
784ea31f2b4SDavid Coyle 		.len = 16
785ea31f2b4SDavid Coyle 	},
786ea31f2b4SDavid Coyle 	.plaintext = {
787ea31f2b4SDavid Coyle 		.data = {
788ea31f2b4SDavid Coyle 			/* DOCSIS header */
789ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
790ea31f2b4SDavid Coyle 			/* Ethernet frame */
791ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
792ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
793ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
794ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
795ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
796ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
797ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
798ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
799ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
800ea31f2b4SDavid Coyle 			0xAA,
801ea31f2b4SDavid Coyle 			/* CRC */
802ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
803ea31f2b4SDavid Coyle 		},
804ea31f2b4SDavid Coyle 		.len = 83,
805ea31f2b4SDavid Coyle 		.cipher_offset = 40,
806ea31f2b4SDavid Coyle 		.crc_offset = 6,
807ea31f2b4SDavid Coyle 		.no_cipher = true,
808ea31f2b4SDavid Coyle 		.no_crc = true
809ea31f2b4SDavid Coyle 	},
810ea31f2b4SDavid Coyle 	.ciphertext = {
811ea31f2b4SDavid Coyle 		.data = {
812ea31f2b4SDavid Coyle 			/* DOCSIS header */
813ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
814ea31f2b4SDavid Coyle 			/* Ethernet frame */
815ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
816ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
817ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
818ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
819ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
820ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
821ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
822ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
823ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
824ea31f2b4SDavid Coyle 			0xAA,
825ea31f2b4SDavid Coyle 			/* CRC */
826ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
827ea31f2b4SDavid Coyle 		},
828ea31f2b4SDavid Coyle 		.len = 83,
829ea31f2b4SDavid Coyle 		.cipher_offset = 40,
830ea31f2b4SDavid Coyle 		.crc_offset = 6,
831ea31f2b4SDavid Coyle 		.no_cipher = true,
832ea31f2b4SDavid Coyle 		.no_crc = true
833ea31f2b4SDavid Coyle 	}
834ea31f2b4SDavid Coyle };
835ea31f2b4SDavid Coyle 
836c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_14 = {
837c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (24-byte "
838c1685e2fSRebecca Troy 			"frame, Small offset and runt block decryption)"},
839c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
840c1685e2fSRebecca Troy 			"(24-byte frame, Small offset and runt block encryption)"},
841ea31f2b4SDavid Coyle 	.key = {
842ea31f2b4SDavid Coyle 		.data = {
843ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
844ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
845ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
846ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
847ea31f2b4SDavid Coyle 		},
848ea31f2b4SDavid Coyle 		.len = 32
849ea31f2b4SDavid Coyle 	},
850ea31f2b4SDavid Coyle 	.iv = {
851ea31f2b4SDavid Coyle 		.data = {
852ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
853ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
854ea31f2b4SDavid Coyle 		},
855ea31f2b4SDavid Coyle 		.len = 16
856ea31f2b4SDavid Coyle 	},
857ea31f2b4SDavid Coyle 	.plaintext = {
858ea31f2b4SDavid Coyle 		.data = {
859ea31f2b4SDavid Coyle 			/* DOCSIS header */
860ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
861ea31f2b4SDavid Coyle 			/* Ethernet frame */
862ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
863ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
864ea31f2b4SDavid Coyle 			/* CRC */
865ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
866ea31f2b4SDavid Coyle 		},
867ea31f2b4SDavid Coyle 		.len = 24,
868ea31f2b4SDavid Coyle 		.cipher_offset = 18,
869ea31f2b4SDavid Coyle 		.crc_offset = 6,
870ea31f2b4SDavid Coyle 		.no_cipher = false,
871ea31f2b4SDavid Coyle 		.no_crc = false
872ea31f2b4SDavid Coyle 	},
873ea31f2b4SDavid Coyle 	.ciphertext = {
874ea31f2b4SDavid Coyle 		.data = {
875ea31f2b4SDavid Coyle 			/* DOCSIS header */
876ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
877ea31f2b4SDavid Coyle 			/* Ethernet frame */
878ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
879ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x6A, 0x86,
880ea31f2b4SDavid Coyle 			/* CRC */
881ea31f2b4SDavid Coyle 			0x9B, 0xB3, 0x1A, 0x26
882ea31f2b4SDavid Coyle 		},
883ea31f2b4SDavid Coyle 		.len = 24,
884ea31f2b4SDavid Coyle 		.cipher_offset = 18,
885ea31f2b4SDavid Coyle 		.crc_offset = 6,
886ea31f2b4SDavid Coyle 		.no_cipher = false,
887ea31f2b4SDavid Coyle 		.no_crc = false
888ea31f2b4SDavid Coyle 	}
889ea31f2b4SDavid Coyle };
890ea31f2b4SDavid Coyle 
891c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_15 = {
892c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (25-byte "
893c1685e2fSRebecca Troy 			"frame, Small offset and runt block decryption)"},
894c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
895c1685e2fSRebecca Troy 			"(25-byte frame, Small offset and runt block encryption)"},
896ea31f2b4SDavid Coyle 	.key = {
897ea31f2b4SDavid Coyle 		.data = {
898ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
899ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
900ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
901ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
902ea31f2b4SDavid Coyle 		},
903ea31f2b4SDavid Coyle 		.len = 32
904ea31f2b4SDavid Coyle 	},
905ea31f2b4SDavid Coyle 	.iv = {
906ea31f2b4SDavid Coyle 		.data = {
907ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
908ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
909ea31f2b4SDavid Coyle 		},
910ea31f2b4SDavid Coyle 		.len = 16
911ea31f2b4SDavid Coyle 	},
912ea31f2b4SDavid Coyle 	.plaintext = {
913ea31f2b4SDavid Coyle 		.data = {
914ea31f2b4SDavid Coyle 			/* DOCSIS header */
915ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
916ea31f2b4SDavid Coyle 			/* Ethernet frame */
917ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
918ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA,
919ea31f2b4SDavid Coyle 			/* CRC */
920ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
921ea31f2b4SDavid Coyle 		},
922ea31f2b4SDavid Coyle 		.len = 25,
923ea31f2b4SDavid Coyle 		.cipher_offset = 18,
924ea31f2b4SDavid Coyle 		.crc_offset = 6,
925ea31f2b4SDavid Coyle 		.no_cipher = false,
926ea31f2b4SDavid Coyle 		.no_crc = false
927ea31f2b4SDavid Coyle 	},
928ea31f2b4SDavid Coyle 	.ciphertext = {
929ea31f2b4SDavid Coyle 		.data = {
930ea31f2b4SDavid Coyle 			/* DOCSIS header */
931ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
932ea31f2b4SDavid Coyle 			/* Ethernet frame */
933ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
934ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x6A, 0x86, 0x25,
935ea31f2b4SDavid Coyle 			/* CRC */
936ea31f2b4SDavid Coyle 			0xB5, 0x6B, 0xFD, 0xCB
937ea31f2b4SDavid Coyle 		},
938ea31f2b4SDavid Coyle 		.len = 25,
939ea31f2b4SDavid Coyle 		.cipher_offset = 18,
940ea31f2b4SDavid Coyle 		.crc_offset = 6,
941ea31f2b4SDavid Coyle 		.no_cipher = false,
942ea31f2b4SDavid Coyle 		.no_crc = false
943ea31f2b4SDavid Coyle 	}
944ea31f2b4SDavid Coyle };
945ea31f2b4SDavid Coyle 
946c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_16 = {
947c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (34-byte "
948c1685e2fSRebecca Troy 			"frame, Small offset and full block decryption)"},
949c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
950c1685e2fSRebecca Troy 			"(34-byte frame, Small offset and full block encryption)"},
951ea31f2b4SDavid Coyle 	.key = {
952ea31f2b4SDavid Coyle 		.data = {
953ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
954ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
955ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
956ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
957ea31f2b4SDavid Coyle 		},
958ea31f2b4SDavid Coyle 		.len = 32
959ea31f2b4SDavid Coyle 	},
960ea31f2b4SDavid Coyle 	.iv = {
961ea31f2b4SDavid Coyle 		.data = {
962ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
963ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
964ea31f2b4SDavid Coyle 		},
965ea31f2b4SDavid Coyle 		.len = 16
966ea31f2b4SDavid Coyle 	},
967ea31f2b4SDavid Coyle 	.plaintext = {
968ea31f2b4SDavid Coyle 		.data = {
969ea31f2b4SDavid Coyle 			/* DOCSIS header */
970ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
971ea31f2b4SDavid Coyle 			/* Ethernet frame */
972ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
973ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
974ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
975ea31f2b4SDavid Coyle 			/* CRC */
976ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
977ea31f2b4SDavid Coyle 		},
978ea31f2b4SDavid Coyle 		.len = 34,
979ea31f2b4SDavid Coyle 		.cipher_offset = 18,
980ea31f2b4SDavid Coyle 		.crc_offset = 6,
981ea31f2b4SDavid Coyle 		.no_cipher = false,
982ea31f2b4SDavid Coyle 		.no_crc = false
983ea31f2b4SDavid Coyle 	},
984ea31f2b4SDavid Coyle 	.ciphertext = {
985ea31f2b4SDavid Coyle 		.data = {
986ea31f2b4SDavid Coyle 			/* DOCSIS header */
987ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
988ea31f2b4SDavid Coyle 			/* Ethernet frame */
989ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
990ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0xF6, 0xA1, 0x2E, 0x0A,
991ea31f2b4SDavid Coyle 			0xBB, 0x27, 0x82, 0x4F, 0x99, 0x0A, 0xE2, 0x3F,
992ea31f2b4SDavid Coyle 			/* CRC */
993ea31f2b4SDavid Coyle 			0xEB, 0xB7, 0x89, 0xB0
994ea31f2b4SDavid Coyle 		},
995ea31f2b4SDavid Coyle 		.len = 34,
996ea31f2b4SDavid Coyle 		.cipher_offset = 18,
997ea31f2b4SDavid Coyle 		.crc_offset = 6,
998ea31f2b4SDavid Coyle 		.no_cipher = false,
999ea31f2b4SDavid Coyle 		.no_crc = false
1000ea31f2b4SDavid Coyle 	}
1001ea31f2b4SDavid Coyle };
1002ea31f2b4SDavid Coyle 
1003c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_17 = {
1004c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (35-byte "
1005c1685e2fSRebecca Troy 			"frame, Small offset and uneven decryption)"},
1006c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
1007c1685e2fSRebecca Troy 			"(35-byte frame, Small offset and uneven encryption)"},
1008ea31f2b4SDavid Coyle 	.key = {
1009ea31f2b4SDavid Coyle 		.data = {
1010ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
1011ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
1012ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
1013ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
1014ea31f2b4SDavid Coyle 		},
1015ea31f2b4SDavid Coyle 		.len = 32
1016ea31f2b4SDavid Coyle 	},
1017ea31f2b4SDavid Coyle 	.iv = {
1018ea31f2b4SDavid Coyle 		.data = {
1019ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
1020ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
1021ea31f2b4SDavid Coyle 		},
1022ea31f2b4SDavid Coyle 		.len = 16
1023ea31f2b4SDavid Coyle 	},
1024ea31f2b4SDavid Coyle 	.plaintext = {
1025ea31f2b4SDavid Coyle 		.data = {
1026ea31f2b4SDavid Coyle 			/* DOCSIS header */
1027ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1028ea31f2b4SDavid Coyle 			/* Ethernet frame */
1029ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1030ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1031ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1032ea31f2b4SDavid Coyle 			0xAA,
1033ea31f2b4SDavid Coyle 			/* CRC */
1034ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1035ea31f2b4SDavid Coyle 		},
1036ea31f2b4SDavid Coyle 		.len = 35,
1037ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1038ea31f2b4SDavid Coyle 		.crc_offset = 6,
1039ea31f2b4SDavid Coyle 		.no_cipher = false,
1040ea31f2b4SDavid Coyle 		.no_crc = false
1041ea31f2b4SDavid Coyle 	},
1042ea31f2b4SDavid Coyle 	.ciphertext = {
1043ea31f2b4SDavid Coyle 		.data = {
1044ea31f2b4SDavid Coyle 			/* DOCSIS header */
1045ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1046ea31f2b4SDavid Coyle 			/* Ethernet frame */
1047ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1048ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0xE1, 0x30, 0x38, 0xC8,
1049ea31f2b4SDavid Coyle 			0xC4, 0x59, 0x8D, 0x43, 0x9A, 0xBE, 0xBE, 0x73,
1050ea31f2b4SDavid Coyle 			0xC3,
1051ea31f2b4SDavid Coyle 			/*CRC */
1052ea31f2b4SDavid Coyle 			0x8C, 0xE1, 0x89, 0x8B
1053ea31f2b4SDavid Coyle 		},
1054ea31f2b4SDavid Coyle 		.len = 35,
1055ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1056ea31f2b4SDavid Coyle 		.crc_offset = 6,
1057ea31f2b4SDavid Coyle 		.no_cipher = false,
1058ea31f2b4SDavid Coyle 		.no_crc = false
1059ea31f2b4SDavid Coyle 	}
1060ea31f2b4SDavid Coyle };
1061ea31f2b4SDavid Coyle 
1062c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_18 = {
1063c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (82-byte "
1064c1685e2fSRebecca Troy 			"frame, Small offset and full block decryption)"},
1065c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
1066c1685e2fSRebecca Troy 			"(82-byte frame, Small offset and full block encryption)"},
1067ea31f2b4SDavid Coyle 	.key = {
1068ea31f2b4SDavid Coyle 		.data = {
1069ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
1070ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
1071ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
1072ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
1073ea31f2b4SDavid Coyle 		},
1074ea31f2b4SDavid Coyle 		.len = 32
1075ea31f2b4SDavid Coyle 	},
1076ea31f2b4SDavid Coyle 	.iv = {
1077ea31f2b4SDavid Coyle 		.data = {
1078ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
1079ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
1080ea31f2b4SDavid Coyle 		},
1081ea31f2b4SDavid Coyle 		.len = 16
1082ea31f2b4SDavid Coyle 	},
1083ea31f2b4SDavid Coyle 	.plaintext = {
1084ea31f2b4SDavid Coyle 		.data = {
1085ea31f2b4SDavid Coyle 			/* DOCSIS header */
1086ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1087ea31f2b4SDavid Coyle 			/* Ethernet frame */
1088ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1089ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1090ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1091ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1092ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1093ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1094ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1095ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1096ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1097ea31f2b4SDavid Coyle 			/* CRC */
1098ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1099ea31f2b4SDavid Coyle 		},
1100ea31f2b4SDavid Coyle 		.len = 82,
1101ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1102ea31f2b4SDavid Coyle 		.crc_offset = 6,
1103ea31f2b4SDavid Coyle 		.no_cipher = false,
1104ea31f2b4SDavid Coyle 		.no_crc = false
1105ea31f2b4SDavid Coyle 	},
1106ea31f2b4SDavid Coyle 	.ciphertext = {
1107ea31f2b4SDavid Coyle 		.data = {
1108ea31f2b4SDavid Coyle 			/* DOCSIS header */
1109ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1110ea31f2b4SDavid Coyle 			/* Ethernet frame */
1111ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1112ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0xE9, 0x12, 0x3B, 0x12,
1113ea31f2b4SDavid Coyle 			0x36, 0x56, 0x95, 0xA6, 0x97, 0xF1, 0x74, 0x68,
1114ea31f2b4SDavid Coyle 			0xBA, 0x58, 0x77, 0xEA, 0x43, 0x11, 0x85, 0xD4,
1115ea31f2b4SDavid Coyle 			0x7A, 0xF8, 0x1C, 0x11, 0x50, 0xD1, 0xF1, 0xBD,
1116ea31f2b4SDavid Coyle 			0x15, 0x4D, 0x99, 0xB5, 0x39, 0x74, 0x84, 0xDF,
1117ea31f2b4SDavid Coyle 			0xD4, 0x8B, 0xDC, 0xB7, 0x58, 0x1B, 0x22, 0xAB,
1118ea31f2b4SDavid Coyle 			0xF3, 0x29, 0xC6, 0xCB, 0x26, 0x07, 0x36, 0x6B,
1119ea31f2b4SDavid Coyle 			0x8C, 0xAC, 0x6E, 0x99, 0x37, 0x94, 0xDF, 0x31,
1120ea31f2b4SDavid Coyle 			/* CRC */
1121ea31f2b4SDavid Coyle 			0xA1, 0x7D, 0x70, 0xBB
1122ea31f2b4SDavid Coyle 		},
1123ea31f2b4SDavid Coyle 		.len = 82,
1124ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1125ea31f2b4SDavid Coyle 		.crc_offset = 6,
1126ea31f2b4SDavid Coyle 		.no_cipher = false,
1127ea31f2b4SDavid Coyle 		.no_crc = false
1128ea31f2b4SDavid Coyle 	}
1129ea31f2b4SDavid Coyle };
1130ea31f2b4SDavid Coyle 
1131c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_19 = {
1132c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (83-byte "
1133c1685e2fSRebecca Troy 			"frame, Small offset and uneven decryption)"},
1134c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
1135c1685e2fSRebecca Troy 			"(83-byte frame, Small offset and uneven encryption)"},
1136ea31f2b4SDavid Coyle 	.key = {
1137ea31f2b4SDavid Coyle 		.data = {
1138ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
1139ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
1140ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
1141ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
1142ea31f2b4SDavid Coyle 		},
1143ea31f2b4SDavid Coyle 		.len = 32
1144ea31f2b4SDavid Coyle 	},
1145ea31f2b4SDavid Coyle 	.iv = {
1146ea31f2b4SDavid Coyle 		.data = {
1147ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
1148ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
1149ea31f2b4SDavid Coyle 		},
1150ea31f2b4SDavid Coyle 		.len = 16
1151ea31f2b4SDavid Coyle 	},
1152ea31f2b4SDavid Coyle 	.plaintext = {
1153ea31f2b4SDavid Coyle 		.data = {
1154ea31f2b4SDavid Coyle 			/* DOCSIS header */
1155ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1156ea31f2b4SDavid Coyle 			/* Ethernet frame */
1157ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1158ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1159ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1160ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1161ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1162ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1163ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1164ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1165ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1166ea31f2b4SDavid Coyle 			0xAA,
1167ea31f2b4SDavid Coyle 			/* CRC */
1168ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1169ea31f2b4SDavid Coyle 		},
1170ea31f2b4SDavid Coyle 		.len = 83,
1171ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1172ea31f2b4SDavid Coyle 		.crc_offset = 6,
1173ea31f2b4SDavid Coyle 		.no_cipher = false,
1174ea31f2b4SDavid Coyle 		.no_crc = false
1175ea31f2b4SDavid Coyle 	},
1176ea31f2b4SDavid Coyle 	.ciphertext = {
1177ea31f2b4SDavid Coyle 		.data = {
1178ea31f2b4SDavid Coyle 			/* DOCSIS header */
1179ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1180ea31f2b4SDavid Coyle 			/* Ethernet frame */
1181ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1182ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0xE9, 0x12, 0x3B, 0x12,
1183ea31f2b4SDavid Coyle 			0x36, 0x56, 0x95, 0xA6, 0x97, 0xF1, 0x74, 0x68,
1184ea31f2b4SDavid Coyle 			0xBA, 0x58, 0x77, 0xEA, 0x43, 0x11, 0x85, 0xD4,
1185ea31f2b4SDavid Coyle 			0x7A, 0xF8, 0x1C, 0x11, 0x50, 0xD1, 0xF1, 0xBD,
1186ea31f2b4SDavid Coyle 			0x15, 0x4D, 0x99, 0xB5, 0x39, 0x74, 0x84, 0xDF,
1187ea31f2b4SDavid Coyle 			0xD4, 0x8B, 0xDC, 0xB7, 0x58, 0x1B, 0x22, 0xAB,
1188ea31f2b4SDavid Coyle 			0xF3, 0x29, 0xC6, 0xCB, 0x13, 0xED, 0x08, 0xF5,
1189ea31f2b4SDavid Coyle 			0x1B, 0x4B, 0xD8, 0x79, 0x93, 0x26, 0x69, 0x03,
1190ea31f2b4SDavid Coyle 			0x23,
1191ea31f2b4SDavid Coyle 			/* CRC */
1192ea31f2b4SDavid Coyle 			0xC8, 0x8E, 0x02, 0x3A
1193ea31f2b4SDavid Coyle 		},
1194ea31f2b4SDavid Coyle 		.len = 83,
1195ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1196ea31f2b4SDavid Coyle 		.crc_offset = 6,
1197ea31f2b4SDavid Coyle 		.no_cipher = false,
1198ea31f2b4SDavid Coyle 		.no_crc = false
1199ea31f2b4SDavid Coyle 	}
1200ea31f2b4SDavid Coyle };
1201ea31f2b4SDavid Coyle 
1202c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_20 = {
1203c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (83-byte "
1204c1685e2fSRebecca Troy 			"frame, Big offset and uneven decryption)"},
1205c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
1206c1685e2fSRebecca Troy 			"(83-byte frame, Big offset and uneven encryption)"},
1207ea31f2b4SDavid Coyle 	.key = {
1208ea31f2b4SDavid Coyle 		.data = {
1209ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
1210ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
1211ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
1212ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
1213ea31f2b4SDavid Coyle 		},
1214ea31f2b4SDavid Coyle 		.len = 32
1215ea31f2b4SDavid Coyle 	},
1216ea31f2b4SDavid Coyle 	.iv = {
1217ea31f2b4SDavid Coyle 		.data = {
1218ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
1219ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
1220ea31f2b4SDavid Coyle 		},
1221ea31f2b4SDavid Coyle 		.len = 16
1222ea31f2b4SDavid Coyle 	},
1223ea31f2b4SDavid Coyle 	.plaintext = {
1224ea31f2b4SDavid Coyle 		.data = {
1225ea31f2b4SDavid Coyle 			/* DOCSIS header */
1226ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1227ea31f2b4SDavid Coyle 			/* Ethernet frame */
1228ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1229ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1230ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1231ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1232ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1233ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1234ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1235ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1236ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1237ea31f2b4SDavid Coyle 			0xAA,
1238ea31f2b4SDavid Coyle 			/* CRC */
1239ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1240ea31f2b4SDavid Coyle 		},
1241ea31f2b4SDavid Coyle 		.len = 83,
1242ea31f2b4SDavid Coyle 		.cipher_offset = 40,
1243ea31f2b4SDavid Coyle 		.crc_offset = 6,
1244ea31f2b4SDavid Coyle 		.no_cipher = false,
1245ea31f2b4SDavid Coyle 		.no_crc = false
1246ea31f2b4SDavid Coyle 	},
1247ea31f2b4SDavid Coyle 	.ciphertext = {
1248ea31f2b4SDavid Coyle 		.data = {
1249ea31f2b4SDavid Coyle 			/* DOCSIS header */
1250ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1251ea31f2b4SDavid Coyle 			/* Ethernet frame */
1252ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1253ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1254ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1255ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1256ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0x54, 0xB4, 0x55, 0x68, 0x06, 0xBF,
1257ea31f2b4SDavid Coyle 			0x00, 0x8B, 0x5F, 0x2C, 0x10, 0x4A, 0xBF, 0x5A,
1258ea31f2b4SDavid Coyle 			0xF2, 0x20, 0xD9, 0x77, 0x7F, 0x2D, 0x2B, 0x11,
1259ea31f2b4SDavid Coyle 			0xAC, 0xAF, 0x21, 0x36, 0xD2, 0xD4, 0x80, 0xF2,
1260ea31f2b4SDavid Coyle 			0x4F, 0x14, 0xA0, 0x3A, 0x66, 0xE5, 0xC5, 0xE2,
1261ea31f2b4SDavid Coyle 			0x15,
1262ea31f2b4SDavid Coyle 			/* CRC */
1263ea31f2b4SDavid Coyle 			0x0C, 0x89, 0x76, 0x26
1264ea31f2b4SDavid Coyle 		},
1265ea31f2b4SDavid Coyle 		.len = 83,
1266ea31f2b4SDavid Coyle 		.cipher_offset = 40,
1267ea31f2b4SDavid Coyle 		.crc_offset = 6,
1268ea31f2b4SDavid Coyle 		.no_cipher = false,
1269ea31f2b4SDavid Coyle 		.no_crc = false
1270ea31f2b4SDavid Coyle 	}
1271ea31f2b4SDavid Coyle };
1272ea31f2b4SDavid Coyle 
1273c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_21 = {
1274c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (24-byte "
1275c1685e2fSRebecca Troy 			"frame, No CRC, Small offset and runt block decryption)"},
1276c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
1277c1685e2fSRebecca Troy 			"(24-byte frame, No CRC, Small offset and runt block encryption)"},
1278ea31f2b4SDavid Coyle 	.key = {
1279ea31f2b4SDavid Coyle 		.data = {
1280ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
1281ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
1282ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
1283ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
1284ea31f2b4SDavid Coyle 		},
1285ea31f2b4SDavid Coyle 		.len = 32
1286ea31f2b4SDavid Coyle 	},
1287ea31f2b4SDavid Coyle 	.iv = {
1288ea31f2b4SDavid Coyle 		.data = {
1289ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
1290ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
1291ea31f2b4SDavid Coyle 		},
1292ea31f2b4SDavid Coyle 		.len = 16
1293ea31f2b4SDavid Coyle 	},
1294ea31f2b4SDavid Coyle 	.plaintext = {
1295ea31f2b4SDavid Coyle 		.data = {
1296ea31f2b4SDavid Coyle 			/* DOCSIS header */
1297ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1298ea31f2b4SDavid Coyle 			/* Ethernet frame */
1299ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1300ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
1301ea31f2b4SDavid Coyle 			/* CRC */
1302ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1303ea31f2b4SDavid Coyle 		},
1304ea31f2b4SDavid Coyle 		.len = 24,
1305ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1306ea31f2b4SDavid Coyle 		.crc_offset = 6,
1307ea31f2b4SDavid Coyle 		.no_cipher = false,
1308ea31f2b4SDavid Coyle 		.no_crc = true
1309ea31f2b4SDavid Coyle 	},
1310ea31f2b4SDavid Coyle 	.ciphertext = {
1311ea31f2b4SDavid Coyle 		.data = {
1312ea31f2b4SDavid Coyle 			/* DOCSIS header */
1313ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1314ea31f2b4SDavid Coyle 			/* Ethernet frame */
1315ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1316ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x6A, 0x86,
1317ea31f2b4SDavid Coyle 			/* CRC */
1318ea31f2b4SDavid Coyle 			0x70, 0x44, 0x0D, 0x8C
1319ea31f2b4SDavid Coyle 		},
1320ea31f2b4SDavid Coyle 		.len = 24,
1321ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1322ea31f2b4SDavid Coyle 		.crc_offset = 6,
1323ea31f2b4SDavid Coyle 		.no_cipher = false,
1324ea31f2b4SDavid Coyle 		.no_crc = true
1325ea31f2b4SDavid Coyle 	}
1326ea31f2b4SDavid Coyle };
1327ea31f2b4SDavid Coyle 
1328c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_22 = {
1329c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (83-byte "
1330c1685e2fSRebecca Troy 			"frame, No CRC, Big offset and uneven decryption)"},
1331c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
1332c1685e2fSRebecca Troy 			"(83-byte frame, No CRC, Big offset and uneven encryption)"},
1333ea31f2b4SDavid Coyle 	.key = {
1334ea31f2b4SDavid Coyle 		.data = {
1335ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
1336ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
1337ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
1338ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
1339ea31f2b4SDavid Coyle 		},
1340ea31f2b4SDavid Coyle 		.len = 32
1341ea31f2b4SDavid Coyle 	},
1342ea31f2b4SDavid Coyle 	.iv = {
1343ea31f2b4SDavid Coyle 		.data = {
1344ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
1345ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
1346ea31f2b4SDavid Coyle 		},
1347ea31f2b4SDavid Coyle 		.len = 16
1348ea31f2b4SDavid Coyle 	},
1349ea31f2b4SDavid Coyle 	.plaintext = {
1350ea31f2b4SDavid Coyle 		.data = {
1351ea31f2b4SDavid Coyle 			/* DOCSIS header */
1352ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1353ea31f2b4SDavid Coyle 			/* Ethernet frame */
1354ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1355ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1356ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1357ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1358ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1359ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1360ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1361ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1362ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1363ea31f2b4SDavid Coyle 			0xAA,
1364ea31f2b4SDavid Coyle 			/* CRC */
1365ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1366ea31f2b4SDavid Coyle 		},
1367ea31f2b4SDavid Coyle 		.len = 83,
1368ea31f2b4SDavid Coyle 		.cipher_offset = 40,
1369ea31f2b4SDavid Coyle 		.crc_offset = 6,
1370ea31f2b4SDavid Coyle 		.no_cipher = false,
1371ea31f2b4SDavid Coyle 		.no_crc = true
1372ea31f2b4SDavid Coyle 	},
1373ea31f2b4SDavid Coyle 	.ciphertext = {
1374ea31f2b4SDavid Coyle 		.data = {
1375ea31f2b4SDavid Coyle 			/* DOCSIS header */
1376ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1377ea31f2b4SDavid Coyle 			/* Ethernet frame */
1378ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1379ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1380ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1381ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1382ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0x54, 0xB4, 0x55, 0x68, 0x06, 0xBF,
1383ea31f2b4SDavid Coyle 			0x00, 0x8B, 0x5F, 0x2C, 0x10, 0x4A, 0xBF, 0x5A,
1384ea31f2b4SDavid Coyle 			0xF2, 0x20, 0xD9, 0x77, 0x7F, 0x2D, 0x2B, 0x11,
1385ea31f2b4SDavid Coyle 			0xAC, 0xAF, 0x21, 0x36, 0xD2, 0xD4, 0x80, 0xF2,
1386ea31f2b4SDavid Coyle 			0x4F, 0x14, 0xA0, 0x3A, 0x66, 0xE5, 0xC5, 0xE2,
1387ea31f2b4SDavid Coyle 			0x15,
1388ea31f2b4SDavid Coyle 			/* CRC */
1389ea31f2b4SDavid Coyle 			0x40, 0x16, 0x62, 0xE1
1390ea31f2b4SDavid Coyle 		},
1391ea31f2b4SDavid Coyle 		.len = 83,
1392ea31f2b4SDavid Coyle 		.cipher_offset = 40,
1393ea31f2b4SDavid Coyle 		.crc_offset = 6,
1394ea31f2b4SDavid Coyle 		.no_cipher = false,
1395ea31f2b4SDavid Coyle 		.no_crc = true
1396ea31f2b4SDavid Coyle 	}
1397ea31f2b4SDavid Coyle };
1398ea31f2b4SDavid Coyle 
1399c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_23 = {
1400c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (24-byte "
1401c1685e2fSRebecca Troy 			"frame, No decryption)"},
1402c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
1403c1685e2fSRebecca Troy 			"(24-byte frame, No encryption)"},
1404ea31f2b4SDavid Coyle 	.key = {
1405ea31f2b4SDavid Coyle 		.data = {
1406ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
1407ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
1408ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
1409ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
1410ea31f2b4SDavid Coyle 		},
1411ea31f2b4SDavid Coyle 		.len = 32
1412ea31f2b4SDavid Coyle 	},
1413ea31f2b4SDavid Coyle 	.iv = {
1414ea31f2b4SDavid Coyle 		.data = {
1415ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
1416ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
1417ea31f2b4SDavid Coyle 		},
1418ea31f2b4SDavid Coyle 		.len = 16
1419ea31f2b4SDavid Coyle 	},
1420ea31f2b4SDavid Coyle 	.plaintext = {
1421ea31f2b4SDavid Coyle 		.data = {
1422ea31f2b4SDavid Coyle 			/* DOCSIS header */
1423ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1424ea31f2b4SDavid Coyle 			/* Ethernet frame */
1425ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1426ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
1427ea31f2b4SDavid Coyle 			/* CRC */
1428ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1429ea31f2b4SDavid Coyle 		},
1430ea31f2b4SDavid Coyle 		.len = 24,
1431ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1432ea31f2b4SDavid Coyle 		.crc_offset = 6,
1433ea31f2b4SDavid Coyle 		.no_cipher = true,
1434ea31f2b4SDavid Coyle 		.no_crc = false
1435ea31f2b4SDavid Coyle 	},
1436ea31f2b4SDavid Coyle 	.ciphertext = {
1437ea31f2b4SDavid Coyle 		.data = {
1438ea31f2b4SDavid Coyle 			/* DOCSIS header */
1439ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1440ea31f2b4SDavid Coyle 			/* Ethernet frame */
1441ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1442ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
1443ea31f2b4SDavid Coyle 			/* CRC */
1444ea31f2b4SDavid Coyle 			0x14, 0x08, 0xE8, 0x55
1445ea31f2b4SDavid Coyle 		},
1446ea31f2b4SDavid Coyle 		.len = 24,
1447ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1448ea31f2b4SDavid Coyle 		.crc_offset = 6,
1449ea31f2b4SDavid Coyle 		.no_cipher = true,
1450ea31f2b4SDavid Coyle 		.no_crc = false
1451ea31f2b4SDavid Coyle 	}
1452ea31f2b4SDavid Coyle };
1453ea31f2b4SDavid Coyle 
1454c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_24 = {
1455c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (83-byte "
1456c1685e2fSRebecca Troy 			"frame, No decryption)"},
1457c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
1458c1685e2fSRebecca Troy 			"(83-byte frame, No encryption)"},
1459ea31f2b4SDavid Coyle 	.key = {
1460ea31f2b4SDavid Coyle 		.data = {
1461ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
1462ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
1463ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
1464ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
1465ea31f2b4SDavid Coyle 		},
1466ea31f2b4SDavid Coyle 		.len = 32
1467ea31f2b4SDavid Coyle 	},
1468ea31f2b4SDavid Coyle 	.iv = {
1469ea31f2b4SDavid Coyle 		.data = {
1470ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
1471ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
1472ea31f2b4SDavid Coyle 		},
1473ea31f2b4SDavid Coyle 		.len = 16
1474ea31f2b4SDavid Coyle 	},
1475ea31f2b4SDavid Coyle 	.plaintext = {
1476ea31f2b4SDavid Coyle 		.data = {
1477ea31f2b4SDavid Coyle 			/* DOCSIS header */
1478ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1479ea31f2b4SDavid Coyle 			/* Ethernet frame */
1480ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1481ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1482ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1483ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1484ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1485ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1486ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1487ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1488ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1489ea31f2b4SDavid Coyle 			0xAA,
1490ea31f2b4SDavid Coyle 			/* CRC */
1491ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1492ea31f2b4SDavid Coyle 		},
1493ea31f2b4SDavid Coyle 		.len = 83,
1494ea31f2b4SDavid Coyle 		.cipher_offset = 40,
1495ea31f2b4SDavid Coyle 		.crc_offset = 6,
1496ea31f2b4SDavid Coyle 		.no_cipher = true,
1497ea31f2b4SDavid Coyle 		.no_crc = false
1498ea31f2b4SDavid Coyle 	},
1499ea31f2b4SDavid Coyle 	.ciphertext = {
1500ea31f2b4SDavid Coyle 		.data = {
1501ea31f2b4SDavid Coyle 			/* DOCSIS header */
1502ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1503ea31f2b4SDavid Coyle 			/* Ethernet frame */
1504ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1505ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1506ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1507ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1508ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1509ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1510ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1511ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1512ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1513ea31f2b4SDavid Coyle 			0xAA,
1514ea31f2b4SDavid Coyle 			/* CRC */
1515ea31f2b4SDavid Coyle 			0xB3, 0x60, 0xEB, 0x38
1516ea31f2b4SDavid Coyle 		},
1517ea31f2b4SDavid Coyle 		.len = 83,
1518ea31f2b4SDavid Coyle 		.cipher_offset = 40,
1519ea31f2b4SDavid Coyle 		.crc_offset = 6,
1520ea31f2b4SDavid Coyle 		.no_cipher = true,
1521ea31f2b4SDavid Coyle 		.no_crc = false
1522ea31f2b4SDavid Coyle 	}
1523ea31f2b4SDavid Coyle };
1524ea31f2b4SDavid Coyle 
1525c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_25 = {
1526c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (24-byte "
1527c1685e2fSRebecca Troy 			"frame, No CRC, No decryption)"},
1528c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
1529c1685e2fSRebecca Troy 			"(24-byte frame, No CRC, No encryption)"},
1530ea31f2b4SDavid Coyle 	.key = {
1531ea31f2b4SDavid Coyle 		.data = {
1532ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
1533ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
1534ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
1535ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
1536ea31f2b4SDavid Coyle 		},
1537ea31f2b4SDavid Coyle 		.len = 32
1538ea31f2b4SDavid Coyle 	},
1539ea31f2b4SDavid Coyle 	.iv = {
1540ea31f2b4SDavid Coyle 		.data = {
1541ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
1542ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
1543ea31f2b4SDavid Coyle 		},
1544ea31f2b4SDavid Coyle 		.len = 16
1545ea31f2b4SDavid Coyle 	},
1546ea31f2b4SDavid Coyle 	.plaintext = {
1547ea31f2b4SDavid Coyle 		.data = {
1548ea31f2b4SDavid Coyle 			/* DOCSIS header */
1549ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1550ea31f2b4SDavid Coyle 			/* Ethernet frame */
1551ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1552ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
1553ea31f2b4SDavid Coyle 			/* CRC */
1554ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1555ea31f2b4SDavid Coyle 		},
1556ea31f2b4SDavid Coyle 		.len = 24,
1557ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1558ea31f2b4SDavid Coyle 		.crc_offset = 6,
1559ea31f2b4SDavid Coyle 		.no_cipher = true,
1560ea31f2b4SDavid Coyle 		.no_crc = true
1561ea31f2b4SDavid Coyle 	},
1562ea31f2b4SDavid Coyle 	.ciphertext = {
1563ea31f2b4SDavid Coyle 		.data = {
1564ea31f2b4SDavid Coyle 			/* DOCSIS header */
1565ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1566ea31f2b4SDavid Coyle 			/* Ethernet frame */
1567ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1568ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
1569ea31f2b4SDavid Coyle 			/* CRC */
1570ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1571ea31f2b4SDavid Coyle 		},
1572ea31f2b4SDavid Coyle 		.len = 24,
1573ea31f2b4SDavid Coyle 		.cipher_offset = 18,
1574ea31f2b4SDavid Coyle 		.crc_offset = 6,
1575ea31f2b4SDavid Coyle 		.no_cipher = true,
1576ea31f2b4SDavid Coyle 		.no_crc = true
1577ea31f2b4SDavid Coyle 	}
1578ea31f2b4SDavid Coyle };
1579ea31f2b4SDavid Coyle 
1580c1685e2fSRebecca Troy const struct docsis_test_data docsis_test_case_26 = {
1581c1685e2fSRebecca Troy 	.test_descr_uplink = {"Uplink AES-DOCSIS-BPI-256 and CRC Verify (83-byte "
1582c1685e2fSRebecca Troy 			"frame, No CRC, No decryption)"},
1583c1685e2fSRebecca Troy 	.test_descr_downlink = {"Downlink CRC Generate and AES-DOCSIS-BPI-256 "
1584c1685e2fSRebecca Troy 			"(83-byte frame, No CRC, No encryption)"},
1585ea31f2b4SDavid Coyle 	.key = {
1586ea31f2b4SDavid Coyle 		.data = {
1587ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
1588ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
1589ea31f2b4SDavid Coyle 			0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
1590ea31f2b4SDavid Coyle 			0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
1591ea31f2b4SDavid Coyle 		},
1592ea31f2b4SDavid Coyle 		.len = 32
1593ea31f2b4SDavid Coyle 	},
1594ea31f2b4SDavid Coyle 	.iv = {
1595ea31f2b4SDavid Coyle 		.data = {
1596ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
1597ea31f2b4SDavid Coyle 			0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
1598ea31f2b4SDavid Coyle 		},
1599ea31f2b4SDavid Coyle 		.len = 16
1600ea31f2b4SDavid Coyle 	},
1601ea31f2b4SDavid Coyle 	.plaintext = {
1602ea31f2b4SDavid Coyle 		.data = {
1603ea31f2b4SDavid Coyle 			/* DOCSIS header */
1604ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1605ea31f2b4SDavid Coyle 			/* Ethernet frame */
1606ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1607ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1608ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1609ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1610ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1611ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1612ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1613ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1614ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1615ea31f2b4SDavid Coyle 			0xAA,
1616ea31f2b4SDavid Coyle 			/* CRC */
1617ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1618ea31f2b4SDavid Coyle 		},
1619ea31f2b4SDavid Coyle 		.len = 83,
1620ea31f2b4SDavid Coyle 		.cipher_offset = 40,
1621ea31f2b4SDavid Coyle 		.crc_offset = 6,
1622ea31f2b4SDavid Coyle 		.no_cipher = true,
1623ea31f2b4SDavid Coyle 		.no_crc = true
1624ea31f2b4SDavid Coyle 	},
1625ea31f2b4SDavid Coyle 	.ciphertext = {
1626ea31f2b4SDavid Coyle 		.data = {
1627ea31f2b4SDavid Coyle 			/* DOCSIS header */
1628ea31f2b4SDavid Coyle 			0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1629ea31f2b4SDavid Coyle 			/* Ethernet frame */
1630ea31f2b4SDavid Coyle 			0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
1631ea31f2b4SDavid Coyle 			0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
1632ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1633ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1634ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1635ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1636ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1637ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1638ea31f2b4SDavid Coyle 			0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
1639ea31f2b4SDavid Coyle 			0xAA,
1640ea31f2b4SDavid Coyle 			/* CRC */
1641ea31f2b4SDavid Coyle 			0xFF, 0xFF, 0xFF, 0xFF
1642ea31f2b4SDavid Coyle 		},
1643ea31f2b4SDavid Coyle 		.len = 83,
1644ea31f2b4SDavid Coyle 		.cipher_offset = 40,
1645ea31f2b4SDavid Coyle 		.crc_offset = 6,
1646ea31f2b4SDavid Coyle 		.no_cipher = true,
1647ea31f2b4SDavid Coyle 		.no_crc = true
1648ea31f2b4SDavid Coyle 	}
1649ea31f2b4SDavid Coyle };
1650ea31f2b4SDavid Coyle 
1651ea31f2b4SDavid Coyle #endif /* TEST_CRYPTODEV_SECURITY_DOCSIS_TEST_VECTORS_H_ */
1652