1a9de470cSBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause 2a9de470cSBruce Richardson * Copyright(c) 2016-2017 Intel Corporation 3a9de470cSBruce Richardson */ 4a9de470cSBruce Richardson 5a9de470cSBruce Richardson #ifndef TEST_CRYPTODEV_KASUMI_TEST_VECTORS_H_ 6a9de470cSBruce Richardson #define TEST_CRYPTODEV_KASUMI_TEST_VECTORS_H_ 7a9de470cSBruce Richardson 8a9de470cSBruce Richardson struct kasumi_test_data { 9a9de470cSBruce Richardson struct { 10a9de470cSBruce Richardson uint8_t data[64]; 1172cd8f68SDamian Nowak unsigned int len; 12a9de470cSBruce Richardson } key; 13a9de470cSBruce Richardson 14a9de470cSBruce Richardson struct { 15*0efea35aSTyler Retzlaff alignas(16) uint8_t data[64]; 1672cd8f68SDamian Nowak unsigned int len; 17a9de470cSBruce Richardson } cipher_iv; 18a9de470cSBruce Richardson 19a9de470cSBruce Richardson /* 20a9de470cSBruce Richardson * Data may include COUNT (4 bytes), FRESH (4 bytes), 21a9de470cSBruce Richardson * DIRECTION (1 bit), plus 1 0*, with enough 0s, 22a9de470cSBruce Richardson * so total length is multiple of 8 or 64 bits 23a9de470cSBruce Richardson */ 24a9de470cSBruce Richardson struct { 25a9de470cSBruce Richardson uint8_t data[1024]; 2672cd8f68SDamian Nowak unsigned int len; /* length must be in Bits */ 27a9de470cSBruce Richardson } plaintext; 28a9de470cSBruce Richardson 29a9de470cSBruce Richardson struct { 3072cd8f68SDamian Nowak unsigned int len; 31a9de470cSBruce Richardson } validDataLenInBits; 32a9de470cSBruce Richardson 33a9de470cSBruce Richardson struct { 34a9de470cSBruce Richardson uint8_t data[1024]; 3572cd8f68SDamian Nowak unsigned int len; /* length must be in Bits */ 36a9de470cSBruce Richardson } ciphertext; 37a9de470cSBruce Richardson 38a9de470cSBruce Richardson struct { 3972cd8f68SDamian Nowak unsigned int len; 40a9de470cSBruce Richardson } validCipherLenInBits; 41a9de470cSBruce Richardson 42a9de470cSBruce Richardson struct { 43a9de470cSBruce Richardson unsigned int len; 44a9de470cSBruce Richardson } validCipherOffsetInBits; 45a9de470cSBruce Richardson 46a9de470cSBruce Richardson /* Actual length of data to be hashed */ 47a9de470cSBruce Richardson struct { 4872cd8f68SDamian Nowak unsigned int len; 49a9de470cSBruce Richardson } validAuthLenInBits; 50a9de470cSBruce Richardson 51a9de470cSBruce Richardson struct { 52a9de470cSBruce Richardson uint8_t data[64]; 5372cd8f68SDamian Nowak unsigned int len; 5472cd8f68SDamian Nowak unsigned int offset_bytes; /* offset must be in Bytes */ 55a9de470cSBruce Richardson } digest; 56a9de470cSBruce Richardson 57a9de470cSBruce Richardson }; 58a9de470cSBruce Richardson 59a9de470cSBruce Richardson struct kasumi_test_data kasumi_test_case_1 = { 60a9de470cSBruce Richardson .key = { 61a9de470cSBruce Richardson .data = { 62a9de470cSBruce Richardson 0x2B, 0xD6, 0x45, 0x9F, 0x82, 0xC5, 0xB3, 0x00, 63a9de470cSBruce Richardson 0x95, 0x2C, 0x49, 0x10, 0x48, 0x81, 0xFF, 0x48 64a9de470cSBruce Richardson }, 65a9de470cSBruce Richardson .len = 16 66a9de470cSBruce Richardson }, 67a9de470cSBruce Richardson .cipher_iv = { 68a9de470cSBruce Richardson .data = { 69a9de470cSBruce Richardson 0x72, 0xA4, 0xF2, 0x0F, 0x64, 0x00, 0x00, 0x00 70a9de470cSBruce Richardson }, 71a9de470cSBruce Richardson .len = 8 72a9de470cSBruce Richardson }, 73a9de470cSBruce Richardson .plaintext = { 74a9de470cSBruce Richardson .data = { 75a9de470cSBruce Richardson 0x7E, 0xC6, 0x12, 0x72, 0x74, 0x3B, 0xF1, 0x61, 76a9de470cSBruce Richardson 0x47, 0x26, 0x44, 0x6A, 0x6C, 0x38, 0xCE, 0xD1, 77a9de470cSBruce Richardson 0x66, 0xF6, 0xCA, 0x76, 0xEB, 0x54, 0x30, 0x04, 78a9de470cSBruce Richardson 0x42, 0x86, 0x34, 0x6C, 0xEF, 0x13, 0x0F, 0x92, 79a9de470cSBruce Richardson 0x92, 0x2B, 0x03, 0x45, 0x0D, 0x3A, 0x99, 0x75, 80a9de470cSBruce Richardson 0xE5, 0xBD, 0x2E, 0xA0, 0xEB, 0x55, 0xAD, 0x8E, 81a9de470cSBruce Richardson 0x1B, 0x19, 0x9E, 0x3E, 0xC4, 0x31, 0x60, 0x20, 82a9de470cSBruce Richardson 0xE9, 0xA1, 0xB2, 0x85, 0xE7, 0x62, 0x79, 0x53, 83a9de470cSBruce Richardson 0x59, 0xB7, 0xBD, 0xFD, 0x39, 0xBE, 0xF4, 0xB2, 84a9de470cSBruce Richardson 0x48, 0x45, 0x83, 0xD5, 0xAF, 0xE0, 0x82, 0xAE, 85a9de470cSBruce Richardson 0xE6, 0x38, 0xBF, 0x5F, 0xD5, 0xA6, 0x06, 0x19, 86a9de470cSBruce Richardson 0x39, 0x01, 0xA0, 0x8F, 0x4A, 0xB4, 0x1A, 0xAB, 87a9de470cSBruce Richardson 0x9B, 0x13, 0x48, 0x80 88a9de470cSBruce Richardson }, 89a9de470cSBruce Richardson .len = 800 90a9de470cSBruce Richardson }, 91a9de470cSBruce Richardson .ciphertext = { 92a9de470cSBruce Richardson .data = { 93a9de470cSBruce Richardson 0xD1, 0xE2, 0xDE, 0x70, 0xEE, 0xF8, 0x6C, 0x69, 94a9de470cSBruce Richardson 0x64, 0xFB, 0x54, 0x2B, 0xC2, 0xD4, 0x60, 0xAA, 95a9de470cSBruce Richardson 0xBF, 0xAA, 0x10, 0xA4, 0xA0, 0x93, 0x26, 0x2B, 96a9de470cSBruce Richardson 0x7D, 0x19, 0x9E, 0x70, 0x6F, 0xC2, 0xD4, 0x89, 97a9de470cSBruce Richardson 0x15, 0x53, 0x29, 0x69, 0x10, 0xF3, 0xA9, 0x73, 98a9de470cSBruce Richardson 0x01, 0x26, 0x82, 0xE4, 0x1C, 0x4E, 0x2B, 0x02, 99a9de470cSBruce Richardson 0xBE, 0x20, 0x17, 0xB7, 0x25, 0x3B, 0xBF, 0x93, 100a9de470cSBruce Richardson 0x09, 0xDE, 0x58, 0x19, 0xCB, 0x42, 0xE8, 0x19, 101a9de470cSBruce Richardson 0x56, 0xF4, 0xC9, 0x9B, 0xC9, 0x76, 0x5C, 0xAF, 102a9de470cSBruce Richardson 0x53, 0xB1, 0xD0, 0xBB, 0x82, 0x79, 0x82, 0x6A, 103a9de470cSBruce Richardson 0xDB, 0xBC, 0x55, 0x22, 0xE9, 0x15, 0xC1, 0x20, 104a9de470cSBruce Richardson 0xA6, 0x18, 0xA5, 0xA7, 0xF5, 0xE8, 0x97, 0x08, 105a9de470cSBruce Richardson 0x93, 0x39, 0x65, 0x0F 106a9de470cSBruce Richardson }, 107a9de470cSBruce Richardson .len = 800 108a9de470cSBruce Richardson }, 109a9de470cSBruce Richardson .validCipherLenInBits = { 110a9de470cSBruce Richardson .len = 798 111a9de470cSBruce Richardson }, 112a9de470cSBruce Richardson .validCipherOffsetInBits = { 113a9de470cSBruce Richardson .len = 0 114a9de470cSBruce Richardson } 115a9de470cSBruce Richardson }; 116a9de470cSBruce Richardson 117a9de470cSBruce Richardson struct kasumi_test_data kasumi_test_case_2 = { 118a9de470cSBruce Richardson .key = { 119a9de470cSBruce Richardson .data = { 120a9de470cSBruce Richardson 0xEF, 0xA8, 0xB2, 0x22, 0x9E, 0x72, 0x0C, 0x2A, 121a9de470cSBruce Richardson 0x7C, 0x36, 0xEA, 0x55, 0xE9, 0x60, 0x56, 0x95 122a9de470cSBruce Richardson }, 123a9de470cSBruce Richardson .len = 16 124a9de470cSBruce Richardson }, 125a9de470cSBruce Richardson .cipher_iv = { 126a9de470cSBruce Richardson .data = { 127a9de470cSBruce Richardson 0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00 128a9de470cSBruce Richardson }, 129a9de470cSBruce Richardson .len = 8 130a9de470cSBruce Richardson }, 131a9de470cSBruce Richardson .plaintext = { 132a9de470cSBruce Richardson .data = { 133a9de470cSBruce Richardson 0x10, 0x11, 0x12, 0x31, 0xE0, 0x60, 0x25, 0x3A, 134a9de470cSBruce Richardson 0x43, 0xFD, 0x3F, 0x57, 0xE3, 0x76, 0x07, 0xAB, 135a9de470cSBruce Richardson 0x28, 0x27, 0xB5, 0x99, 0xB6, 0xB1, 0xBB, 0xDA, 136a9de470cSBruce Richardson 0x37, 0xA8, 0xAB, 0xCC, 0x5A, 0x8C, 0x55, 0x0D, 137a9de470cSBruce Richardson 0x1B, 0xFB, 0x2F, 0x49, 0x46, 0x24, 0xFB, 0x50, 138a9de470cSBruce Richardson 0x36, 0x7F, 0xA3, 0x6C, 0xE3, 0xBC, 0x68, 0xF1, 139a9de470cSBruce Richardson 0x1C, 0xF9, 0x3B, 0x15, 0x10, 0x37, 0x6B, 0x02, 140a9de470cSBruce Richardson 0x13, 0x0F, 0x81, 0x2A, 0x9F, 0xA1, 0x69, 0xD8 141a9de470cSBruce Richardson }, 142a9de470cSBruce Richardson .len = 512 143a9de470cSBruce Richardson }, 144a9de470cSBruce Richardson .ciphertext = { 145a9de470cSBruce Richardson .data = { 146a9de470cSBruce Richardson 0x3D, 0xEA, 0xCC, 0x7C, 0x15, 0x82, 0x1C, 0xAA, 147a9de470cSBruce Richardson 0x89, 0xEE, 0xCA, 0xDE, 0x9B, 0x5B, 0xD3, 0x61, 148a9de470cSBruce Richardson 0x4B, 0xD0, 0xC8, 0x41, 0x9D, 0x71, 0x03, 0x85, 149a9de470cSBruce Richardson 0xDD, 0xBE, 0x58, 0x49, 0xEF, 0x1B, 0xAC, 0x5A, 150a9de470cSBruce Richardson 0xE8, 0xB1, 0x4A, 0x5B, 0x0A, 0x67, 0x41, 0x52, 151a9de470cSBruce Richardson 0x1E, 0xB4, 0xE0, 0x0B, 0xB9, 0xEC, 0xF3, 0xE9, 152a9de470cSBruce Richardson 0xF7, 0xCC, 0xB9, 0xCA, 0xE7, 0x41, 0x52, 0xD7, 153a9de470cSBruce Richardson 0xF4, 0xE2, 0xA0, 0x34, 0xB6, 0xEA, 0x00, 0xEC 154a9de470cSBruce Richardson }, 155a9de470cSBruce Richardson .len = 512 156a9de470cSBruce Richardson }, 157a9de470cSBruce Richardson .validCipherLenInBits = { 158a9de470cSBruce Richardson .len = 510 159a9de470cSBruce Richardson }, 160a9de470cSBruce Richardson .validCipherOffsetInBits = { 161a9de470cSBruce Richardson .len = 0 162a9de470cSBruce Richardson } 163a9de470cSBruce Richardson }; 164a9de470cSBruce Richardson 165a9de470cSBruce Richardson struct kasumi_test_data kasumi_test_case_3 = { 166a9de470cSBruce Richardson .key = { 167a9de470cSBruce Richardson .data = { 168a9de470cSBruce Richardson 0x5A, 0xCB, 0x1D, 0x64, 0x4C, 0x0D, 0x51, 0x20, 169a9de470cSBruce Richardson 0x4E, 0xA5, 0xF1, 0x45, 0x10, 0x10, 0xD8, 0x52 170a9de470cSBruce Richardson }, 171a9de470cSBruce Richardson .len = 16 172a9de470cSBruce Richardson }, 173a9de470cSBruce Richardson .cipher_iv = { 174a9de470cSBruce Richardson .data = { 175a9de470cSBruce Richardson 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 176a9de470cSBruce Richardson }, 177a9de470cSBruce Richardson .len = 8 178a9de470cSBruce Richardson }, 179a9de470cSBruce Richardson .plaintext = { 180a9de470cSBruce Richardson .data = { 181a9de470cSBruce Richardson 0x38, 0xA6, 0xF0, 0x56, 0x05, 0xD2, 0xEC, 0x49, 182a9de470cSBruce Richardson 0xAD, 0x9C, 0x44, 0x1F, 0x89, 0x0B, 0x38, 0xC4, 183a9de470cSBruce Richardson 0x57, 0xA4, 0x9D, 0x42, 0x14, 0x07, 0xE8, 0xC0 184a9de470cSBruce Richardson }, 185a9de470cSBruce Richardson .len = 192 186a9de470cSBruce Richardson }, 187a9de470cSBruce Richardson .ciphertext = { 188a9de470cSBruce Richardson .data = { 189a9de470cSBruce Richardson 0x38, 0xA6, 0xF0, 0x56, 0x05, 0xD2, 0xEC, 0x49, 190a9de470cSBruce Richardson 0x9B, 0xC9, 0x2C, 0xA8, 0x03, 0xC6, 0x7B, 0x28, 191a9de470cSBruce Richardson 0xA1, 0x1A, 0x4B, 0xEE, 0x5A, 0x0C, 0x25, 0xC0 192a9de470cSBruce Richardson }, 193a9de470cSBruce Richardson .len = 192 194a9de470cSBruce Richardson }, 195a9de470cSBruce Richardson .validDataLenInBits = { 196a9de470cSBruce Richardson .len = 192 197a9de470cSBruce Richardson }, 198a9de470cSBruce Richardson .validCipherLenInBits = { 199a9de470cSBruce Richardson .len = 120 200a9de470cSBruce Richardson }, 201a9de470cSBruce Richardson .validAuthLenInBits = { 202a9de470cSBruce Richardson .len = 192 203a9de470cSBruce Richardson }, 204a9de470cSBruce Richardson .validCipherOffsetInBits = { 205a9de470cSBruce Richardson .len = 64 206a9de470cSBruce Richardson }, 207a9de470cSBruce Richardson .digest = { 208a9de470cSBruce Richardson .data = {0x87, 0x5F, 0xE4, 0x89}, 20972cd8f68SDamian Nowak .len = 4, 21072cd8f68SDamian Nowak .offset_bytes = 0 211a9de470cSBruce Richardson } 212a9de470cSBruce Richardson }; 213a9de470cSBruce Richardson 214a9de470cSBruce Richardson struct kasumi_test_data kasumi_test_case_4 = { 215a9de470cSBruce Richardson .key = { 216a9de470cSBruce Richardson .data = { 217a9de470cSBruce Richardson 0xD3, 0xC5, 0xD5, 0x92, 0x32, 0x7F, 0xB1, 0x1C, 218a9de470cSBruce Richardson 0x40, 0x35, 0xC6, 0x68, 0x0A, 0xF8, 0xC6, 0xD1 219a9de470cSBruce Richardson }, 220a9de470cSBruce Richardson .len = 16 221a9de470cSBruce Richardson }, 222a9de470cSBruce Richardson .cipher_iv = { 223a9de470cSBruce Richardson .data = { 224a9de470cSBruce Richardson 0x39, 0x8A, 0x59, 0xB4, 0x2C, 0x00, 0x00, 0x00, 225a9de470cSBruce Richardson }, 226a9de470cSBruce Richardson .len = 8 227a9de470cSBruce Richardson }, 228a9de470cSBruce Richardson .plaintext = { 229a9de470cSBruce Richardson .data = { 230a9de470cSBruce Richardson 0x98, 0x1B, 0xA6, 0x82, 0x4C, 0x1B, 0xFB, 0x1A, 231a9de470cSBruce Richardson 0xB4, 0x85, 0x47, 0x20, 0x29, 0xB7, 0x1D, 0x80, 232a9de470cSBruce Richardson 0x8C, 0xE3, 0x3E, 0x2C, 0xC3, 0xC0, 0xB5, 0xFC, 233a9de470cSBruce Richardson 0x1F, 0x3D, 0xE8, 0xA6, 0xDC, 0x66, 0xB1, 0xF0 234a9de470cSBruce Richardson }, 235a9de470cSBruce Richardson .len = 256 236a9de470cSBruce Richardson }, 237a9de470cSBruce Richardson .ciphertext = { 238a9de470cSBruce Richardson .data = { 239a9de470cSBruce Richardson 0x5B, 0xB9, 0x43, 0x1B, 0xB1, 0xE9, 0x8B, 0xD1, 240a9de470cSBruce Richardson 0x1B, 0x93, 0xDB, 0x7C, 0x3D, 0x45, 0x13, 0x65, 241a9de470cSBruce Richardson 0x59, 0xBB, 0x86, 0xA2, 0x95, 0xAA, 0x20, 0x4E, 242a9de470cSBruce Richardson 0xCB, 0xEB, 0xF6, 0xF7, 0xA5, 0x10, 0x15, 0x10 243a9de470cSBruce Richardson }, 244a9de470cSBruce Richardson .len = 256 245a9de470cSBruce Richardson }, 246a9de470cSBruce Richardson .validCipherLenInBits = { 247a9de470cSBruce Richardson .len = 253 248a9de470cSBruce Richardson }, 249a9de470cSBruce Richardson .validCipherOffsetInBits = { 250a9de470cSBruce Richardson .len = 0 251a9de470cSBruce Richardson } 252a9de470cSBruce Richardson }; 253a9de470cSBruce Richardson 254a9de470cSBruce Richardson struct kasumi_test_data kasumi_test_case_5 = { 255a9de470cSBruce Richardson .key = { 256a9de470cSBruce Richardson .data = { 257a9de470cSBruce Richardson 0x60, 0x90, 0xEA, 0xE0, 0x4C, 0x83, 0x70, 0x6E, 258a9de470cSBruce Richardson 0xEC, 0xBF, 0x65, 0x2B, 0xE8, 0xE3, 0x65, 0x66 259a9de470cSBruce Richardson }, 260a9de470cSBruce Richardson .len = 16 261a9de470cSBruce Richardson }, 262a9de470cSBruce Richardson .cipher_iv = { 263a9de470cSBruce Richardson .data = { 264a9de470cSBruce Richardson 0x72, 0xA4, 0xF2, 0x0F, 0x48, 0x00, 0x00, 0x00 265a9de470cSBruce Richardson }, 266a9de470cSBruce Richardson .len = 8 267a9de470cSBruce Richardson }, 268a9de470cSBruce Richardson .plaintext = { 269a9de470cSBruce Richardson .data = { 270a9de470cSBruce Richardson 0x40, 0x98, 0x1B, 0xA6, 0x82, 0x4C, 0x1B, 0xFB, 271a9de470cSBruce Richardson 0x42, 0x86, 0xB2, 0x99, 0x78, 0x3D, 0xAF, 0x44, 272a9de470cSBruce Richardson 0x2C, 0x09, 0x9F, 0x7A, 0xB0, 0xF5, 0x8D, 0x5C, 273a9de470cSBruce Richardson 0x8E, 0x46, 0xB1, 0x04, 0xF0, 0x8F, 0x01, 0xB4, 274a9de470cSBruce Richardson 0x1A, 0xB4, 0x85, 0x47, 0x20, 0x29, 0xB7, 0x1D, 275a9de470cSBruce Richardson 0x36, 0xBD, 0x1A, 0x3D, 0x90, 0xDC, 0x3A, 0x41, 276a9de470cSBruce Richardson 0xB4, 0x6D, 0x51, 0x67, 0x2A, 0xC4, 0xC9, 0x66, 277a9de470cSBruce Richardson 0x3A, 0x2B, 0xE0, 0x63, 0xDA, 0x4B, 0xC8, 0xD2, 278a9de470cSBruce Richardson 0x80, 0x8C, 0xE3, 0x3E, 0x2C, 0xCC, 0xBF, 0xC6, 279a9de470cSBruce Richardson 0x34, 0xE1, 0xB2, 0x59, 0x06, 0x08, 0x76, 0xA0, 280a9de470cSBruce Richardson 0xFB, 0xB5, 0xA4, 0x37, 0xEB, 0xCC, 0x8D, 0x31, 281a9de470cSBruce Richardson 0xC1, 0x9E, 0x44, 0x54, 0x31, 0x87, 0x45, 0xE3, 282a9de470cSBruce Richardson 0x98, 0x76, 0x45, 0x98, 0x7A, 0x98, 0x6F, 0x2C, 283a9de470cSBruce Richardson 0xB0 284a9de470cSBruce Richardson }, 285a9de470cSBruce Richardson .len = 840 286a9de470cSBruce Richardson }, 287a9de470cSBruce Richardson .ciphertext = { 288a9de470cSBruce Richardson .data = { 289a9de470cSBruce Richardson 0xDD, 0xB3, 0x64, 0xDD, 0x2A, 0xAE, 0xC2, 0x4D, 290a9de470cSBruce Richardson 0xFF, 0x29, 0x19, 0x57, 0xB7, 0x8B, 0xAD, 0x06, 291a9de470cSBruce Richardson 0x3A, 0xC5, 0x79, 0xCD, 0x90, 0x41, 0xBA, 0xBE, 292a9de470cSBruce Richardson 0x89, 0xFD, 0x19, 0x5C, 0x05, 0x78, 0xCB, 0x9F, 293a9de470cSBruce Richardson 0xDE, 0x42, 0x17, 0x56, 0x61, 0x78, 0xD2, 0x02, 294a9de470cSBruce Richardson 0x40, 0x20, 0x6D, 0x07, 0xCF, 0xA6, 0x19, 0xEC, 295a9de470cSBruce Richardson 0x05, 0x9F, 0x63, 0x51, 0x44, 0x59, 0xFC, 0x10, 296a9de470cSBruce Richardson 0xD4, 0x2D, 0xC9, 0x93, 0x4E, 0x56, 0xEB, 0xC0, 297a9de470cSBruce Richardson 0xCB, 0xC6, 0x0D, 0x4D, 0x2D, 0xF1, 0x74, 0x77, 298a9de470cSBruce Richardson 0x4C, 0xBD, 0xCD, 0x5D, 0xA4, 0xA3, 0x50, 0x31, 299a9de470cSBruce Richardson 0x7A, 0x7F, 0x12, 0xE1, 0x94, 0x94, 0x71, 0xF8, 300a9de470cSBruce Richardson 0xA2, 0x95, 0xF2, 0x72, 0xE6, 0x8F, 0xC0, 0x71, 301a9de470cSBruce Richardson 0x59, 0xB0, 0x7D, 0x8E, 0x2D, 0x26, 0xE4, 0x59, 302a9de470cSBruce Richardson 0x9E 303a9de470cSBruce Richardson }, 304a9de470cSBruce Richardson .len = 840 305a9de470cSBruce Richardson }, 306a9de470cSBruce Richardson .validCipherLenInBits = { 307a9de470cSBruce Richardson .len = 837 308a9de470cSBruce Richardson }, 309a9de470cSBruce Richardson .validCipherOffsetInBits = { 310a9de470cSBruce Richardson .len = 0 311a9de470cSBruce Richardson } 312a9de470cSBruce Richardson }; 313a9de470cSBruce Richardson 314a9de470cSBruce Richardson struct kasumi_test_data kasumi_test_case_6 = { 315a9de470cSBruce Richardson .key = { 316a9de470cSBruce Richardson .data = { 317a9de470cSBruce Richardson 0x5A, 0xCB, 0x1D, 0x64, 0x4C, 0x0D, 0x51, 0x20, 318a9de470cSBruce Richardson 0x4E, 0xA5, 0xF1, 0x45, 0x10, 0x10, 0xD8, 0x52 319a9de470cSBruce Richardson }, 320a9de470cSBruce Richardson .len = 16 321a9de470cSBruce Richardson }, 322a9de470cSBruce Richardson .cipher_iv = { 323a9de470cSBruce Richardson .data = { 324a9de470cSBruce Richardson 0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00 325a9de470cSBruce Richardson }, 326a9de470cSBruce Richardson .len = 8 327a9de470cSBruce Richardson }, 328a9de470cSBruce Richardson .plaintext = { 329a9de470cSBruce Richardson .data = { 330a9de470cSBruce Richardson 0x38, 0xA6, 0xF0, 0x56, 0x05, 0xD2, 0xEC, 0x49, 331a9de470cSBruce Richardson 0xAD, 0x9C, 0x44, 0x1F, 0x89, 0x0B, 0x38, 0xC4, 332a9de470cSBruce Richardson 0x57, 0xA4, 0x9D, 0x42, 0x14, 0x07, 0xE8, 0xC0 333a9de470cSBruce Richardson }, 334a9de470cSBruce Richardson .len = 192 335a9de470cSBruce Richardson }, 336a9de470cSBruce Richardson .ciphertext = { 337a9de470cSBruce Richardson .data = { 338a9de470cSBruce Richardson 0x38, 0xA6, 0xF0, 0x56, 0x05, 0xD2, 0xEC, 0x49, 339a9de470cSBruce Richardson 0x9B, 0xC9, 0x2C, 0xA8, 0x03, 0xC6, 0x7B, 0x28, 340a9de470cSBruce Richardson 0xA1, 0x1A, 0x4B, 0xEE, 0x5A, 0x0C, 0x25, 0xC0 341a9de470cSBruce Richardson }, 342a9de470cSBruce Richardson .len = 192 343a9de470cSBruce Richardson }, 344a9de470cSBruce Richardson .validDataLenInBits = { 345a9de470cSBruce Richardson .len = 192 346a9de470cSBruce Richardson }, 347a9de470cSBruce Richardson .validCipherLenInBits = { 348a9de470cSBruce Richardson .len = 120 349a9de470cSBruce Richardson }, 350a9de470cSBruce Richardson .validCipherOffsetInBits = { 351a9de470cSBruce Richardson .len = 64 352a9de470cSBruce Richardson }, 353a9de470cSBruce Richardson .validAuthLenInBits = { 354a9de470cSBruce Richardson .len = 192 355a9de470cSBruce Richardson }, 356a9de470cSBruce Richardson .digest = { 357a9de470cSBruce Richardson .data = {0x0F, 0xD2, 0xAA, 0xB5}, 35872cd8f68SDamian Nowak .len = 4, 35972cd8f68SDamian Nowak .offset_bytes = 0 36072cd8f68SDamian Nowak } 36172cd8f68SDamian Nowak }; 36272cd8f68SDamian Nowak 36372cd8f68SDamian Nowak struct kasumi_test_data kasumi_auth_cipher_test_case_2 = { 36472cd8f68SDamian Nowak .key = { 36572cd8f68SDamian Nowak .data = { 36672cd8f68SDamian Nowak 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 36772cd8f68SDamian Nowak 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10 36872cd8f68SDamian Nowak }, 36972cd8f68SDamian Nowak .len = 16 37072cd8f68SDamian Nowak }, 37172cd8f68SDamian Nowak .cipher_iv = { 37272cd8f68SDamian Nowak .data = { 37372cd8f68SDamian Nowak 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 37472cd8f68SDamian Nowak }, 37572cd8f68SDamian Nowak .len = 8 37672cd8f68SDamian Nowak }, 37772cd8f68SDamian Nowak .plaintext = { 37872cd8f68SDamian Nowak .data = { 37972cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 38072cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 38172cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 38272cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 38372cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 38472cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 38572cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 38672cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 38772cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 38872cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 38972cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 39072cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 39172cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 39272cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 39372cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 39472cd8f68SDamian Nowak 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A 39572cd8f68SDamian Nowak }, 39672cd8f68SDamian Nowak .len = 128 << 3 39772cd8f68SDamian Nowak }, 39872cd8f68SDamian Nowak .ciphertext = { 39972cd8f68SDamian Nowak .data = { 40072cd8f68SDamian Nowak 0x5A, 0x5A, 0xFA, 0xC6, 0xA9, 0x09, 0x91, 0x74, 40172cd8f68SDamian Nowak 0x35, 0xAA, 0x85, 0xB0, 0xE0, 0x07, 0x78, 0xDA, 40272cd8f68SDamian Nowak 0x05, 0x88, 0x4E, 0x8D, 0xEC, 0x41, 0xF3, 0xBC, 40372cd8f68SDamian Nowak 0x0D, 0x9F, 0xE3, 0xEF, 0x8E, 0x33, 0x22, 0xF3, 40472cd8f68SDamian Nowak 0x15, 0x4B, 0x12, 0xC2, 0x22, 0x12, 0xD6, 0x46, 40572cd8f68SDamian Nowak 0xD7, 0x27, 0x20, 0x1D, 0x50, 0x60, 0x9D, 0x42, 40672cd8f68SDamian Nowak 0xF6, 0x73, 0xF5, 0x28, 0x88, 0xBE, 0x60, 0xEC, 40772cd8f68SDamian Nowak 0x9C, 0x18, 0x81, 0xC4, 0x0A, 0xF4, 0xD5, 0x7A, 40872cd8f68SDamian Nowak 0xB5, 0x3F, 0x1A, 0x79, 0xAB, 0x79, 0xDB, 0x24, 40972cd8f68SDamian Nowak 0xF9, 0x6E, 0x86, 0x78, 0x10, 0x19, 0xAE, 0xD8, 41072cd8f68SDamian Nowak 0xB2, 0xCA, 0x32, 0x8D, 0xD8, 0x28, 0x8B, 0x2F, 41172cd8f68SDamian Nowak 0x5B, 0x3C, 0xE3, 0x7D, 0xD3, 0x70, 0x11, 0xDE, 41272cd8f68SDamian Nowak 0x2C, 0xDC, 0xC1, 0xC6, 0xB6, 0xFD, 0xF3, 0x7D, 41372cd8f68SDamian Nowak 0x38, 0x97, 0x8B, 0x81, 0x02, 0x88, 0x62, 0x3C, 41472cd8f68SDamian Nowak 0x1E, 0x1A, 0x93, 0x21, 0xE3, 0x6D, 0xD7, 0x20, 41572cd8f68SDamian Nowak 0x80, 0xA8, 0xDA, 0x18, 0x8F, 0x58, 0x0F, 0x4E 41672cd8f68SDamian Nowak }, 41772cd8f68SDamian Nowak .len = 128 << 3 41872cd8f68SDamian Nowak }, 41972cd8f68SDamian Nowak .validDataLenInBits = { 42072cd8f68SDamian Nowak .len = 128 << 3 42172cd8f68SDamian Nowak }, 42272cd8f68SDamian Nowak .validCipherLenInBits = { 42372cd8f68SDamian Nowak .len = 126 << 3 42472cd8f68SDamian Nowak }, 42572cd8f68SDamian Nowak .validAuthLenInBits = { 42672cd8f68SDamian Nowak .len = 124 << 3 42772cd8f68SDamian Nowak }, 42872cd8f68SDamian Nowak .validCipherOffsetInBits = { 42972cd8f68SDamian Nowak .len = 2 << 3 43072cd8f68SDamian Nowak }, 43172cd8f68SDamian Nowak .digest = { 43272cd8f68SDamian Nowak .data = {0x8F, 0x58, 0x0F, 0x4E}, 43372cd8f68SDamian Nowak .len = 4, 43472cd8f68SDamian Nowak .offset_bytes = 124 435a9de470cSBruce Richardson } 436a9de470cSBruce Richardson }; 437a9de470cSBruce Richardson #endif /* TEST_CRYPTODEV_KASUMI_TEST_VECTORS_H_ */ 438