/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2016 Samsung Electronics Co., Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #ifndef _FMP_TESTVEC_H_ #define _FMP_TESTVEC_H_ #include "fmp_fips_info.h" #define SIM_XTS_TEST_VECTORS 7 static const struct cipher_testvec aes_xts_KAT[] = { { /* XTS-AES 0 */ .key = "\xef\x01\x0c\xa1\xa3\x66\x3e\x32" "\x53\x43\x49\xbc\x0b\xae\x62\x23" "\x2a\x15\x73\x34\x85\x68\xfb\x9e" "\xf4\x17\x68\xa7\x67\x4f\x50\x7a" "\x72\x7f\x98\x75\x53\x97\xd0\xe0" "\xaa\x32\xf8\x30\x33\x8c\xc7\xa9" "\x26\xc7\x73\xf0\x9e\x57\xb3\x57" "\xcd\x15\x6a\xfb\xca\x46\xe1\xa0", .klen = 64, .input = "\xed\x98\xe0\x17\x70\xa8\x53\xb4" "\x9d\xb9\xe6\xaa\xf8\x8f\x0a\x41" "\xb9\xb5\x6e\x91\xa5\xa2\xb1\x1d" "\x40\x52\x92\x54\xf5\x52\x3e\x75", .ilen = 32, .result = "\xca\x20\xc5\x5e\x8d\xc1\x49\x68" "\x7d\x25\x41\xde\x39\xc3\xdf\x63" "\x00\xbb\x5a\x16\x3c\x10\xce\xd3" "\x66\x6b\x13\x57\xdb\x8b\xd3\x9d", .rlen = 32, .DataUnitSeqNumber = 187, }, { /* XTS-AES 1 */ .key = "\xc4\xe6\xb3\x7e\x10\x75\x96\x9d" "\x41\xa7\x60\x1a\xa1\x05\xdd\x41" "\xb1\x82\x00\xa0\x28\xda\x1f\x79" "\xf5\x5c\x4d\x2d\xb4\x78\xc4\xe9" "\x8d\x9e\xd4\x91\xcf\xe5\x2f\x31" "\xec\xb7\xcb\xb4\x89\x1e\xb7\x79" "\xe0\x57\x39\x2b\x3b\x27\xc1\x9c" "\xbe\x9b\x48\x75\xc8\xc3\x1c\x22", .klen = 64, .input = "\x87\xed\xe4\x02\xd0\x56\x13\x59" "\x79\x9a\x41\xbe\x04\x2c\xed\x9a" "\x8e\x15\x63\x91\x65\xef\x1a\x4d" "\x2f\x67\x85\xc3\x94\xd6\x1e\x5f", .ilen = 32, .result = "\xa5\x10\x37\x19\x8f\x3f\x9f\xe5" "\xd0\x5b\xef\x52\x36\x3a\xce\xc4" "\x0e\x86\xe3\xab\xb8\x34\x18\x03" "\x48\xd2\xe0\x86\x27\x73\x3e\x65", .rlen = 32, .DataUnitSeqNumber = 223, }, { /* XTS-AES 2 */ .key = "\xf7\xf7\x94\x6f\x61\x88\xcd\xf6" "\x89\x67\x29\x36\x03\xb8\x2e\xbf" "\x64\x59\x18\x46\x2a\x67\x27\x86" "\x3a\x9f\xf9\xf6\x24\x00\xa7\xd4" "\x14\xdf\x18\xca\xdf\x5f\xbd\x95" "\x73\xf2\xd9\xc1\x81\xaa\xb7\x17" "\xa3\x27\x64\x32\x6f\x19\x2f\x77" "\xac\x36\x85\xb9\x5c\x28\xf8\xeb", .klen = 64, .input = "\x9b\x00\x1e\xff\x6b\xbc\x37\x93" "\xf3\xbe\x6f\x9e\x71\xdf\x42\x5a" "\x68\x28\xbc\x89\x2d\x4a\xac\x93" "\x45\x88\x9a\x4d\x14\x12\xb3\xba", .ilen = 32, .result = "\x94\xd2\x0b\xe2\x4a\x82\x46\x01" "\x02\x81\xc9\x15\x5e\xbf\x3f\xff" "\xd1\x83\x2c\x88\x55\x6d\x89\x01" "\xc5\x1a\x4e\x3c\x4f\xdb\xac\x47", .rlen = 32, .DataUnitSeqNumber = 229, }, { /* XTS-AES 3 */ .key = "\x1d\xd0\xd8\x6d\x63\xea\xfb\xd1" "\x01\x1e\x4a\x44\x93\xf5\x08\xb4" "\xe5\x15\xc4\x7a\xae\x63\xd4\xdb" "\xa1\xde\x1f\x07\xbd\xff\xe5\x59" "\x5f\x01\xf5\xa2\x7b\xff\x84\x41" "\x10\x4e\xc7\x3b\x15\x47\x3f\x72" "\x46\xdb\x7d\x48\x21\x8c\x11\xdc" "\x1c\x9b\xfc\x86\x5f\x3d\x76\x8f", .klen = 64, .input = "\x5d\x54\x0d\xd2\xcc\x12\xf7\xe1" "\xb4\x47\xf5\xc3\x60\x5e\x08\x16" "\xc4\xc9\x46\x16\x64\x85\xe9\xb1" "\x8d\xb3\xe0\x0e\x44\x6c\x49\x0e", .ilen = 32, .result = "\xdf\xe1\x94\x51\x25\xf8\xcc\x77" "\xdf\x69\x37\x9e\xb4\x71\x12\x73" "\x7a\x53\x2c\xe5\xc2\x49\x89\x8b" "\x83\x8a\xee\x68\x60\xb9\xbd\x03", .rlen = 32, .DataUnitSeqNumber = 10, }, { /* XTS-AES 4 */ .key = "\x7f\xdd\xb3\x04\x4f\x1a\x61\x05" "\x05\x2d\x47\x08\x1b\x4e\xca\x23" "\xea\x54\x12\x07\x88\x22\x12\x5e" "\x6f\x9f\x17\x8e\xc4\xa9\xcd\xe0" "\x4f\xe0\x46\xc9\x96\x1d\x83\x5d" "\xd5\x96\x7f\xfe\xb3\x9b\x71\x45" "\x54\x93\x8c\x2b\x93\x26\x05\x34" "\xcc\xd3\xae\xa6\x8d\xbb\x88\x2e", .klen = 64, .input = "\x20\x2e\x98\x47\x0a\x11\x38\x79" "\x81\x52\xe5\xde\x50\xd1\x8b\x13" "\xd1\x6d\xdf\x38\xb8\x38\x26\x06" "\x68\x56\x99\x57\xfd\x5f\x70\xdf", .ilen = 32, .result = "\xbd\x19\xfa\xc7\x60\x5a\xf8\xbe" "\xf6\x3f\x0f\x2e\x80\x95\xd5\x88" "\x3c\x04\xc8\x98\x1d\xe2\x13\x68" "\x49\x03\xa5\x9c\x22\xfc\x2f\xe6", .rlen = 32, .DataUnitSeqNumber = 151, }, { /* XTS-AES 5 */ .key = "\xef\x01\x0c\xa1\xa3\x66\x3e\x32" "\x53\x43\x49\xbc\x0b\xae\x62\x23" "\x2a\x15\x73\x34\x85\x68\xfb\x9e" "\xf4\x17\x68\xa7\x67\x4f\x50\x7a", .klen = 32, .input = "\xed\x98\xe0\x17\x70\xa8\x53\xb4" "\x9d\xb9\xe6\xaa\xf8\x8f\x0a\x41" "\xb9\xb5\x6e\x91\xa5\xa2\xb1\x1d" "\x40\x52\x92\x54\xf5\x52\x3e\x75", .ilen = 32, .result = "\xca\x20\xc5\x5e\x8d\xc1\x49\x68" "\x7d\x25\x41\xde\x39\xc3\xdf\x63" "\x00\xbb\x5a\x16\x3c\x10\xce\xd3" "\x66\x6b\x13\x57\xdb\x8b\xd3\x9d", .rlen = 32, .DataUnitSeqNumber = 187, }, { /* XTS-AES 6 */ .key = "\xef\x01\x0c\xa1\xa3\x66\x3e\x32" "\x53\x43\x49\xbc\x0b\xae\x62\x23" "\x2a\x15\x73\x34\x85\x68\xfb\x9e" "\xf4\x17\x68\xa7\x67\x4f\x50\x7a" "\xef\x01\x0c\xa1\xa3\x66\x3e\x32" "\x53\x43\x49\xbc\x0b\xae\x62\x23" "\x2a\x15\x73\x34\x85\x68\xfb\x9e" "\xf4\x17\x68\xa7\x67\x4f\x50\x7a", .klen = 64, .input = "\xed\x98\xe0\x17\x70\xa8\x53\xb4" "\x9d\xb9\xe6\xaa\xf8\x8f\x0a\x41" "\xb9\xb5\x6e\x91\xa5\xa2\xb1\x1d" "\x40\x52\x92\x54\xf5\x52\x3e\x75", .ilen = 32, .result = "\xca\x20\xc5\x5e\x8d\xc1\x49\x68" "\x7d\x25\x41\xde\x39\xc3\xdf\x63" "\x00\xbb\x5a\x16\x3c\x10\xce\xd3" "\x66\x6b\x13\x57\xdb\x8b\xd3\x9d", .rlen = 32, .DataUnitSeqNumber = 187, } }; #endif /* _FMP_TESTVEC_H_ */