diff options
author | Anas Nashif <anas.nashif@intel.com> | 2016-01-29 09:05:01 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit@zephyrproject.org> | 2016-02-11 18:00:35 +0000 |
commit | 7c35c6b5245dffe8c533519f6ae342a1dff76fd4 (patch) | |
tree | acd7333dfa7aa75259f68f4b4f9cdb4988a806e1 /samples | |
parent | d1951f4f9e61484835c2a5c7b2729d31de0d0ef2 (diff) |
tests: move crypto tests to tests/crypto
Put all tests under tests/crypto
Change-Id: Id64f0f39f7a7c6dba40161db3d8335febf545905
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Diffstat (limited to 'samples')
65 files changed, 0 insertions, 4832 deletions
diff --git a/samples/crypto/test_aes/Makefile b/samples/crypto/test_aes/Makefile deleted file mode 100644 index 6c19478db..000000000 --- a/samples/crypto/test_aes/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -ccflags-y += -I$(srctree)/samples/include -I$(srctree)/lib/crypto/tinycrypt/include -obj-y = test_aes.o diff --git a/samples/crypto/test_aes/test_aes.c b/samples/crypto/test_aes/test_aes.c deleted file mode 100644 index 34b04c850..000000000 --- a/samples/crypto/test_aes/test_aes.c +++ /dev/null @@ -1,2075 +0,0 @@ -/* test_aes.c - TinyCrypt implementation of some AES-128 tests (including NIST tests) */ - -/* - * Copyright (C) 2015 by Intel Corporation, All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - DESCRIPTION - This module tests the following AES routines: - - Scenarios tested include: - - AES128 NIST key schedule test - - AES128 NIST encryption test - - AES128 NIST fixed-key and variable-text - - AES128 NIST variable-key and fixed-text -*/ - -#include <tinycrypt/aes.h> -#include <tinycrypt/constants.h> -#include <test_utils.h> - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include <stdint.h> -#include <stddef.h> -#include <misc/printk.h> - -#define NUM_OF_NIST_KEYS 16 -#define NUM_OF_FIXED_KEYS 128 - -/* - * NIST test key schedule. - */ -uint32_t test_1(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("AES128 %s (NIST key schedule test):\n", __func__); - const uint8_t nist_key[NUM_OF_NIST_KEYS] = { - 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, - 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c - }; - const struct tc_aes_key_sched_struct expected = {{ - 0x2b7e1516, 0x28aed2a6, 0xabf71588, 0x09cf4f3c, - 0xa0fafe17, 0x88542cb1, 0x23a33939, 0x2a6c7605, - 0xf2c295f2, 0x7a96b943, 0x5935807a, 0x7359f67f, - 0x3d80477d, 0x4716fe3e, 0x1e237e44, 0x6d7a883b, - 0xef44a541, 0xa8525b7f, 0xb671253b, 0xdb0bad00, - 0xd4d1c6f8, 0x7c839d87, 0xcaf2b8bc, 0x11f915bc, - 0x6d88a37a, 0x110b3efd, 0xdbf98641, 0xca0093fd, - 0x4e54f70e, 0x5f5fc9f3, 0x84a64fb2, 0x4ea6dc4f, - 0xead27321, 0xb58dbad2, 0x312bf560, 0x7f8d292f, - 0xac7766f3, 0x19fadc21, 0x28d12941, 0x575c006e, - 0xd014f9a8, 0xc9ee2589, 0xe13f0cc8, 0xb6630ca6 - } }; - struct tc_aes_key_sched_struct s; - - if (tc_aes128_set_encrypt_key(&s, nist_key) == 0) { - TC_ERROR("AES128 test %s (NIST key schedule test) failed.\n", - __func__); - result = TC_FAIL; - goto exitTest1; - } - - result = check_result(1, expected.words, - sizeof(expected.words), - s.words, sizeof(s.words), 1); - - exitTest1: - TC_END_RESULT(result); - return result; -} - -/* - * NIST test vectors for encryption. - */ -int32_t test_2(void) -{ - int result = TC_PASS; - - TC_PRINT("AES128 %s (NIST encryption test):\n", __func__); - const uint8_t nist_key[NUM_OF_NIST_KEYS] = { - 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, - 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c - }; - const uint8_t nist_input[NUM_OF_NIST_KEYS] = { - 0x32, 0x43, 0xf6, 0xa8, 0x88, 0x5a, 0x30, 0x8d, - 0x31, 0x31, 0x98, 0xa2, 0xe0, 0x37, 0x07, 0x34 - }; - const uint8_t expected[NUM_OF_NIST_KEYS] = { - 0x39, 0x25, 0x84, 0x1d, 0x02, 0xdc, 0x09, 0xfb, - 0xdc, 0x11, 0x85, 0x97, 0x19, 0x6a, 0x0b, 0x32 - }; - struct tc_aes_key_sched_struct s; - uint8_t ciphertext[NUM_OF_NIST_KEYS]; - - (void)tc_aes128_set_encrypt_key(&s, nist_key); - if (tc_aes_encrypt(ciphertext, nist_input, &s) == 0) { - TC_ERROR("AES128 %s (NIST encryption test) failed.\n", - __func__); - result = TC_FAIL; - goto exitTest2; - } - - result = check_result(2, expected, sizeof(expected), - ciphertext, sizeof(ciphertext), 1); - - exitTest2: - - TC_END_RESULT(result); - return result; -} - -uint32_t var_text_test(uint32_t r, const uint8_t *in, const uint8_t *out, - TCAesKeySched_t s) -{ - uint8_t ciphertext[NUM_OF_NIST_KEYS]; - uint8_t decrypted[NUM_OF_NIST_KEYS]; - uint32_t result = TC_PASS; - - (void)tc_aes_encrypt(ciphertext, in, s); - result = check_result(r, out, NUM_OF_NIST_KEYS, - ciphertext, sizeof(ciphertext), 0); - if (result != TC_FAIL){ - if (tc_aes_decrypt(decrypted, ciphertext, s) == 0) { - TC_ERROR("aes_decrypt failed\n"); - result = TC_FAIL; - } else { - result = check_result(r, in, NUM_OF_NIST_KEYS, - decrypted, sizeof(decrypted), 0); - } - } - return result; -} - -/* - * All NIST tests with fixed key and variable text. - */ -uint32_t test_3(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("AES128 %s (NIST fixed-key and variable-text):\n", __func__); - const uint8_t key[NUM_OF_NIST_KEYS] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - const struct { - uint8_t in[NUM_OF_NIST_KEYS]; - uint8_t out[NUM_OF_NIST_KEYS]; - } kat_tbl[NUM_OF_FIXED_KEYS] = { - {{ - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x3a, 0xd7, 0x8e, 0x72, 0x6c, 0x1e, 0xc0, 0x2b, - 0x7e, 0xbf, 0xe9, 0x2b, 0x23, 0xd9, 0xec, 0x34 - } }, - {{ - 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xaa, 0xe5, 0x93, 0x9c, 0x8e, 0xfd, 0xf2, 0xf0, - 0x4e, 0x60, 0xb9, 0xfe, 0x71, 0x17, 0xb2, 0xc2 - } }, - {{ - 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xf0, 0x31, 0xd4, 0xd7, 0x4f, 0x5d, 0xcb, 0xf3, - 0x9d, 0xaa, 0xf8, 0xca, 0x3a, 0xf6, 0xe5, 0x27 - } }, - {{ - 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x96, 0xd9, 0xfd, 0x5c, 0xc4, 0xf0, 0x74, 0x41, - 0x72, 0x7d, 0xf0, 0xf3, 0x3e, 0x40, 0x1a, 0x36 - } }, - {{ - 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x30, 0xcc, 0xdb, 0x04, 0x46, 0x46, 0xd7, 0xe1, - 0xf3, 0xcc, 0xea, 0x3d, 0xca, 0x08, 0xb8, 0xc0 - } }, - {{ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x16, 0xae, 0x4c, 0xe5, 0x04, 0x2a, 0x67, 0xee, - 0x8e, 0x17, 0x7b, 0x7c, 0x58, 0x7e, 0xcc, 0x82 - } }, - {{ - 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xb6, 0xda, 0x0b, 0xb1, 0x1a, 0x23, 0x85, 0x5d, - 0x9c, 0x5c, 0xb1, 0xb4, 0xc6, 0x41, 0x2e, 0x0a - } }, - {{ - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xdb, 0x4f, 0x1a, 0xa5, 0x30, 0x96, 0x7d, 0x67, - 0x32, 0xce, 0x47, 0x15, 0xeb, 0x0e, 0xe2, 0x4b - } }, - {{ - 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xa8, 0x17, 0x38, 0x25, 0x26, 0x21, 0xdd, 0x18, - 0x0a, 0x34, 0xf3, 0x45, 0x5b, 0x4b, 0xaa, 0x2f - } }, - {{ - 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x77, 0xe2, 0xb5, 0x08, 0xdb, 0x7f, 0xd8, 0x92, - 0x34, 0xca, 0xf7, 0x93, 0x9e, 0xe5, 0x62, 0x1a - } }, - {{ - 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xb8, 0x49, 0x9c, 0x25, 0x1f, 0x84, 0x42, 0xee, - 0x13, 0xf0, 0x93, 0x3b, 0x68, 0x8f, 0xcd, 0x19 - } }, - {{ - 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x96, 0x51, 0x35, 0xf8, 0xa8, 0x1f, 0x25, 0xc9, - 0xd6, 0x30, 0xb1, 0x75, 0x02, 0xf6, 0x8e, 0x53 - } }, - {{ - 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x8b, 0x87, 0x14, 0x5a, 0x01, 0xad, 0x1c, 0x6c, - 0xed, 0xe9, 0x95, 0xea, 0x36, 0x70, 0x45, 0x4f - } }, - {{ - 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x8e, 0xae, 0x3b, 0x10, 0xa0, 0xc8, 0xca, 0x6d, - 0x1d, 0x3b, 0x0f, 0xa6, 0x1e, 0x56, 0xb0, 0xb2 - } }, - {{ - 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x64, 0xb4, 0xd6, 0x29, 0x81, 0x0f, 0xda, 0x6b, - 0xaf, 0xdf, 0x08, 0xf3, 0xb0, 0xd8, 0xd2, 0xc5 - } }, - {{ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xd7, 0xe5, 0xdb, 0xd3, 0x32, 0x45, 0x95, 0xf8, - 0xfd, 0xc7, 0xd7, 0xc5, 0x71, 0xda, 0x6c, 0x2a - } }, - {{ - 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xf3, 0xf7, 0x23, 0x75, 0x26, 0x4e, 0x16, 0x7f, - 0xca, 0x9d, 0xe2, 0xc1, 0x52, 0x7d, 0x96, 0x06 - } }, - {{ - 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x8e, 0xe7, 0x9d, 0xd4, 0xf4, 0x01, 0xff, 0x9b, - 0x7e, 0xa9, 0x45, 0xd8, 0x66, 0x66, 0xc1, 0x3b - } }, - {{ - 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xdd, 0x35, 0xce, 0xa2, 0x79, 0x99, 0x40, 0xb4, - 0x0d, 0xb3, 0xf8, 0x19, 0xcb, 0x94, 0xc0, 0x8b - } }, - {{ - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x69, 0x41, 0xcb, 0x6b, 0x3e, 0x08, 0xc2, 0xb7, - 0xaf, 0xa5, 0x81, 0xeb, 0xdd, 0x60, 0x7b, 0x87 - } }, - {{ - 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x2c, 0x20, 0xf4, 0x39, 0xf6, 0xbb, 0x09, 0x7b, - 0x29, 0xb8, 0xbd, 0x6d, 0x99, 0xaa, 0xd7, 0x99 - } }, - {{ - 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x62, 0x5d, 0x01, 0xf0, 0x58, 0xe5, 0x65, 0xf7, - 0x7a, 0xe8, 0x63, 0x78, 0xbd, 0x2c, 0x49, 0xb3 - } }, - {{ - 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xc0, 0xb5, 0xfd, 0x98, 0x19, 0x0e, 0xf4, 0x5f, - 0xbb, 0x43, 0x01, 0x43, 0x8d, 0x09, 0x59, 0x50 - } }, - {{ - 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x13, 0x00, 0x1f, 0xf5, 0xd9, 0x98, 0x06, 0xef, - 0xd2, 0x5d, 0xa3, 0x4f, 0x56, 0xbe, 0x85, 0x4b - } }, - {{ - 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x3b, 0x59, 0x4c, 0x60, 0xf5, 0xc8, 0x27, 0x7a, - 0x51, 0x13, 0x67, 0x7f, 0x94, 0x20, 0x8d, 0x82 - } }, - {{ - 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xe9, 0xc0, 0xfc, 0x18, 0x18, 0xe4, 0xaa, 0x46, - 0xbd, 0x2e, 0x39, 0xd6, 0x38, 0xf8, 0x9e, 0x05 - } }, - {{ - 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xf8, 0x02, 0x3e, 0xe9, 0xc3, 0xfd, 0xc4, 0x5a, - 0x01, 0x9b, 0x4e, 0x98, 0x5c, 0x7e, 0x1a, 0x54 - } }, - {{ - 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x35, 0xf4, 0x01, 0x82, 0xab, 0x46, 0x62, 0xf3, - 0x02, 0x3b, 0xae, 0xc1, 0xee, 0x79, 0x6b, 0x57 - } }, - {{ - 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x3a, 0xeb, 0xba, 0xd7, 0x30, 0x36, 0x49, 0xb4, - 0x19, 0x4a, 0x69, 0x45, 0xc6, 0xcc, 0x36, 0x94 - } }, - {{ - 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xa2, 0x12, 0x4b, 0xea, 0x53, 0xec, 0x28, 0x34, - 0x27, 0x9b, 0xed, 0x7f, 0x7e, 0xb0, 0xf9, 0x38 - } }, - {{ - 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xb9, 0xfb, 0x43, 0x99, 0xfa, 0x4f, 0xac, 0xc7, - 0x30, 0x9e, 0x14, 0xec, 0x98, 0x36, 0x0b, 0x0a - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xc2, 0x62, 0x77, 0x43, 0x74, 0x20, 0xc5, 0xd6, - 0x34, 0xf7, 0x15, 0xae, 0xa8, 0x1a, 0x91, 0x32 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x17, 0x1a, 0x0e, 0x1b, 0x2d, 0xd4, 0x24, 0xf0, - 0xe0, 0x89, 0xaf, 0x2c, 0x4c, 0x10, 0xf3, 0x2f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x7c, 0xad, 0xbe, 0x40, 0x2d, 0x1b, 0x20, 0x8f, - 0xe7, 0x35, 0xed, 0xce, 0x00, 0xae, 0xe7, 0xce - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x43, 0xb0, 0x2f, 0xf9, 0x29, 0xa1, 0x48, 0x5a, - 0xf6, 0xf5, 0xc6, 0xd6, 0x55, 0x8b, 0xaa, 0x0f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x09, 0x2f, 0xaa, 0xcc, 0x9b, 0xf4, 0x35, 0x08, - 0xbf, 0x8f, 0xa8, 0x61, 0x3c, 0xa7, 0x5d, 0xea - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xcb, 0x2b, 0xf8, 0x28, 0x0f, 0x3f, 0x97, 0x42, - 0xc7, 0xed, 0x51, 0x3f, 0xe8, 0x02, 0x62, 0x9c - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x21, 0x5a, 0x41, 0xee, 0x44, 0x2f, 0xa9, 0x92, - 0xa6, 0xe3, 0x23, 0x98, 0x6d, 0xed, 0x3f, 0x68 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xf2, 0x1e, 0x99, 0xcf, 0x4f, 0x0f, 0x77, 0xce, - 0xa8, 0x36, 0xe1, 0x1a, 0x2f, 0xe7, 0x5f, 0xb1 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x95, 0xe3, 0xa0, 0xca, 0x90, 0x79, 0xe6, 0x46, - 0x33, 0x1d, 0xf8, 0xb4, 0xe7, 0x0d, 0x2c, 0xd6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x4a, 0xfe, 0x7f, 0x12, 0x0c, 0xe7, 0x61, 0x3f, - 0x74, 0xfc, 0x12, 0xa0, 0x1a, 0x82, 0x80, 0x73 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x82, 0x7f, 0x00, 0x0e, 0x75, 0xe2, 0xc8, 0xb9, - 0xd4, 0x79, 0xbe, 0xed, 0x91, 0x3f, 0xe6, 0x78 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x35, 0x83, 0x0c, 0x8e, 0x7a, 0xae, 0xfe, 0x2d, - 0x30, 0x31, 0x0e, 0xf3, 0x81, 0xcb, 0xf6, 0x91 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x19, 0x1a, 0xa0, 0xf2, 0xc8, 0x57, 0x01, 0x44, - 0xf3, 0x86, 0x57, 0xea, 0x40, 0x85, 0xeb, 0xe5 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x85, 0x06, 0x2c, 0x2c, 0x90, 0x9f, 0x15, 0xd9, - 0x26, 0x9b, 0x6c, 0x18, 0xce, 0x99, 0xc4, 0xf0 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x67, 0x80, 0x34, 0xdc, 0x9e, 0x41, 0xb5, 0xa5, - 0x60, 0xed, 0x23, 0x9e, 0xea, 0xb1, 0xbc, 0x78 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xc2, 0xf9, 0x3a, 0x4c, 0xe5, 0xab, 0x6d, 0x5d, - 0x56, 0xf1, 0xb9, 0x3c, 0xf1, 0x99, 0x11, 0xc1 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x1c, 0x31, 0x12, 0xbc, 0xb0, 0xc1, 0xdc, 0xc7, - 0x49, 0xd7, 0x99, 0x74, 0x36, 0x91, 0xbf, 0x82 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x00, 0xc5, 0x5b, 0xd7, 0x5c, 0x7f, 0x9c, 0x88, - 0x19, 0x89, 0xd3, 0xec, 0x19, 0x11, 0xc0, 0xd4 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xea, 0x2e, 0x6b, 0x5e, 0xf1, 0x82, 0xb7, 0xdf, - 0xf3, 0x62, 0x9a, 0xbd, 0x6a, 0x12, 0x04, 0x5f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x22, 0x32, 0x23, 0x27, 0xe0, 0x17, 0x80, 0xb1, - 0x73, 0x97, 0xf2, 0x40, 0x87, 0xf8, 0xcc, 0x6f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xc9, 0xca, 0xcb, 0x5c, 0xd1, 0x16, 0x92, 0xc3, - 0x73, 0xb2, 0x41, 0x17, 0x68, 0x14, 0x9e, 0xe7 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xa1, 0x8e, 0x3d, 0xbb, 0xca, 0x57, 0x78, 0x60, - 0xda, 0xb6, 0xb8, 0x0d, 0xa3, 0x13, 0x92, 0x56 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x79, 0xb6, 0x1c, 0x37, 0xbf, 0x32, 0x8e, 0xcc, - 0xa8, 0xd7, 0x43, 0x26, 0x5a, 0x3d, 0x42, 0x5c - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xd2, 0xd9, 0x9c, 0x6b, 0xcc, 0x1f, 0x06, 0xfd, - 0xa8, 0xe2, 0x7e, 0x8a, 0xe3, 0xf1, 0xcc, 0xc7 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x1b, 0xfd, 0x4b, 0x91, 0xc7, 0x01, 0xfd, 0x6b, - 0x61, 0xb7, 0xf9, 0x97, 0x82, 0x9d, 0x66, 0x3b - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x11, 0x00, 0x5d, 0x52, 0xf2, 0x5f, 0x16, 0xbd, - 0xc9, 0x54, 0x5a, 0x87, 0x6a, 0x63, 0x49, 0x0a - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x3a, 0x4d, 0x35, 0x4f, 0x02, 0xbb, 0x5a, 0x5e, - 0x47, 0xd3, 0x96, 0x66, 0x86, 0x7f, 0x24, 0x6a - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xd4, 0x51, 0xb8, 0xd6, 0xe1, 0xe1, 0xa0, 0xeb, - 0xb1, 0x55, 0xfb, 0xbf, 0x6e, 0x7b, 0x7d, 0xc3 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x68, 0x98, 0xd4, 0xf4, 0x2f, 0xa7, 0xba, 0x6a, - 0x10, 0xac, 0x05, 0xe8, 0x7b, 0x9f, 0x20, 0x80 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xb6, 0x11, 0x29, 0x5e, 0x73, 0x9c, 0xa7, 0xd9, - 0xb5, 0x0f, 0x8e, 0x4c, 0x0e, 0x75, 0x4a, 0x3f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x7d, 0x33, 0xfc, 0x7d, 0x8a, 0xbe, 0x3c, 0xa1, - 0x93, 0x67, 0x59, 0xf8, 0xf5, 0xde, 0xaf, 0x20 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x3b, 0x5e, 0x0f, 0x56, 0x6d, 0xc9, 0x6c, 0x29, - 0x8f, 0x0c, 0x12, 0x63, 0x75, 0x39, 0xb2, 0x5c - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xf8, 0x07, 0xc3, 0xe7, 0x98, 0x5f, 0xe0, 0xf5, - 0xa5, 0x0e, 0x2c, 0xdb, 0x25, 0xc5, 0x10, 0x9e - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x41, 0xf9, 0x92, 0xa8, 0x56, 0xfb, 0x27, 0x8b, - 0x38, 0x9a, 0x62, 0xf5, 0xd2, 0x74, 0xd7, 0xe9 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x10, 0xd3, 0xed, 0x7a, 0x6f, 0xe1, 0x5a, 0xb4, - 0xd9, 0x1a, 0xcb, 0xc7, 0xd0, 0x76, 0x7a, 0xb1 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x21, 0xfe, 0xec, 0xd4, 0x5b, 0x2e, 0x67, 0x59, - 0x73, 0xac, 0x33, 0xbf, 0x0c, 0x54, 0x24, 0xfc - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x14, 0x80, 0xcb, 0x39, 0x55, 0xba, 0x62, 0xd0, - 0x9e, 0xea, 0x66, 0x8f, 0x7c, 0x70, 0x88, 0x17 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x66, 0x40, 0x40, 0x33, 0xd6, 0xb7, 0x2b, 0x60, - 0x93, 0x54, 0xd5, 0x49, 0x6e, 0x7e, 0xb5, 0x11 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x1c, 0x31, 0x7a, 0x22, 0x0a, 0x7d, 0x70, 0x0d, - 0xa2, 0xb1, 0xe0, 0x75, 0xb0, 0x02, 0x66, 0xe1 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xab, 0x3b, 0x89, 0x54, 0x22, 0x33, 0xf1, 0x27, - 0x1b, 0xf8, 0xfd, 0x0c, 0x0f, 0x40, 0x35, 0x45 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xd9, 0x3e, 0xae, 0x96, 0x6f, 0xac, 0x46, 0xdc, - 0xa9, 0x27, 0xd6, 0xb1, 0x14, 0xfa, 0x3f, 0x9e - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x1b, 0xde, 0xc5, 0x21, 0x31, 0x65, 0x03, 0xd9, - 0xd5, 0xee, 0x65, 0xdf, 0x3e, 0xa9, 0x4d, 0xdf - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xee, 0xf4, 0x56, 0x43, 0x1d, 0xea, 0x8b, 0x4a, - 0xcf, 0x83, 0xbd, 0xae, 0x37, 0x17, 0xf7, 0x5f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x06, 0xf2, 0x51, 0x9a, 0x2f, 0xaf, 0xaa, 0x59, - 0x6b, 0xfe, 0xf5, 0xcf, 0xa1, 0x5c, 0x21, 0xb9 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x25, 0x1a, 0x7e, 0xac, 0x7e, 0x2f, 0xe8, 0x09, - 0xe4, 0xaa, 0x8d, 0x0d, 0x70, 0x12, 0x53, 0x1a - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x3b, 0xff, 0xc1, 0x6e, 0x4c, 0x49, 0xb2, 0x68, - 0xa2, 0x0f, 0x8d, 0x96, 0xa6, 0x0b, 0x40, 0x58 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xe8, 0x86, 0xf9, 0x28, 0x19, 0x99, 0xc5, 0xbb, - 0x3b, 0x3e, 0x88, 0x62, 0xe2, 0xf7, 0xc9, 0x88 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x56, 0x3b, 0xf9, 0x0d, 0x61, 0xbe, 0xef, 0x39, - 0xf4, 0x8d, 0xd6, 0x25, 0xfc, 0xef, 0x13, 0x61 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x4d, 0x37, 0xc8, 0x50, 0x64, 0x45, 0x63, 0xc6, - 0x9f, 0xd0, 0xac, 0xd9, 0xa0, 0x49, 0x32, 0x5b - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xb8, 0x7c, 0x92, 0x1b, 0x91, 0x82, 0x9e, 0xf3, - 0xb1, 0x3c, 0xa5, 0x41, 0xee, 0x11, 0x30, 0xa6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x2e, 0x65, 0xeb, 0x6b, 0x6e, 0xa3, 0x83, 0xe1, - 0x09, 0xac, 0xcc, 0xe8, 0x32, 0x6b, 0x03, 0x93 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x9c, 0xa5, 0x47, 0xf7, 0x43, 0x9e, 0xdc, 0x3e, - 0x25, 0x5c, 0x0f, 0x4d, 0x49, 0xaa, 0x89, 0x90 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xa5, 0xe6, 0x52, 0x61, 0x4c, 0x93, 0x00, 0xf3, - 0x78, 0x16, 0xb1, 0xf9, 0xfd, 0x0c, 0x87, 0xf9 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x14, 0x95, 0x4f, 0x0b, 0x46, 0x97, 0x77, 0x6f, - 0x44, 0x49, 0x4f, 0xe4, 0x58, 0xd8, 0x14, 0xed - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x7c, 0x8d, 0x9a, 0xb6, 0xc2, 0x76, 0x17, 0x23, - 0xfe, 0x42, 0xf8, 0xbb, 0x50, 0x6c, 0xbc, 0xf7 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xdb, 0x7e, 0x19, 0x32, 0x67, 0x9f, 0xdd, 0x99, - 0x74, 0x2a, 0xab, 0x04, 0xaa, 0x0d, 0x5a, 0x80 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x4c, 0x6a, 0x1c, 0x83, 0xe5, 0x68, 0xcd, 0x10, - 0xf2, 0x7c, 0x2d, 0x73, 0xde, 0xd1, 0x9c, 0x28 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00 - }, { - 0x90, 0xec, 0xbe, 0x61, 0x77, 0xe6, 0x74, 0xc9, - 0x8d, 0xe4, 0x12, 0x41, 0x3f, 0x7a, 0xc9, 0x15 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00 - }, { - 0x90, 0x68, 0x4a, 0x2a, 0xc5, 0x5f, 0xe1, 0xec, - 0x2b, 0x8e, 0xbd, 0x56, 0x22, 0x52, 0x0b, 0x73 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00 - }, { - 0x74, 0x72, 0xf9, 0xa7, 0x98, 0x86, 0x07, 0xca, - 0x79, 0x70, 0x77, 0x95, 0x99, 0x10, 0x35, 0xe6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00 - }, { - 0x56, 0xaf, 0xf0, 0x89, 0x87, 0x8b, 0xf3, 0x35, - 0x2f, 0x8d, 0xf1, 0x72, 0xa3, 0xae, 0x47, 0xd8 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00 - }, { - 0x65, 0xc0, 0x52, 0x6c, 0xbe, 0x40, 0x16, 0x1b, - 0x80, 0x19, 0xa2, 0xa3, 0x17, 0x1a, 0xbd, 0x23 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00 - }, { - 0x37, 0x7b, 0xe0, 0xbe, 0x33, 0xb4, 0xe3, 0xe3, - 0x10, 0xb4, 0xaa, 0xbd, 0xa1, 0x73, 0xf8, 0x4f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00 - }, { - 0x94, 0x02, 0xe9, 0xaa, 0x6f, 0x69, 0xde, 0x65, - 0x04, 0xda, 0x8d, 0x20, 0xc4, 0xfc, 0xaa, 0x2f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 - }, { - 0x12, 0x3c, 0x1f, 0x4a, 0xf3, 0x13, 0xad, 0x8c, - 0x2c, 0xe6, 0x48, 0xb2, 0xe7, 0x1f, 0xb6, 0xe1 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00 - }, { - 0x1f, 0xfc, 0x62, 0x6d, 0x30, 0x20, 0x3d, 0xcd, - 0xb0, 0x01, 0x9f, 0xb8, 0x0f, 0x72, 0x6c, 0xf4 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00 - }, { - 0x76, 0xda, 0x1f, 0xbe, 0x3a, 0x50, 0x72, 0x8c, - 0x50, 0xfd, 0x2e, 0x62, 0x1b, 0x5a, 0xd8, 0x85 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00 - }, { - 0x08, 0x2e, 0xb8, 0xbe, 0x35, 0xf4, 0x42, 0xfb, - 0x52, 0x66, 0x8e, 0x16, 0xa5, 0x91, 0xd1, 0xd6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 - }, { - 0xe6, 0x56, 0xf9, 0xec, 0xf5, 0xfe, 0x27, 0xec, - 0x3e, 0x4a, 0x73, 0xd0, 0x0c, 0x28, 0x2f, 0xb3 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00 - }, { - 0x2c, 0xa8, 0x20, 0x9d, 0x63, 0x27, 0x4c, 0xd9, - 0xa2, 0x9b, 0xb7, 0x4b, 0xcd, 0x77, 0x68, 0x3a - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00 - }, { - 0x79, 0xbf, 0x5d, 0xce, 0x14, 0xbb, 0x7d, 0xd7, - 0x3a, 0x8e, 0x36, 0x11, 0xde, 0x7c, 0xe0, 0x26 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00 - }, { - 0x3c, 0x84, 0x99, 0x39, 0xa5, 0xd2, 0x93, 0x99, - 0xf3, 0x44, 0xc4, 0xa0, 0xec, 0xa8, 0xa5, 0x76 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 - }, { - 0xed, 0x3c, 0x0a, 0x94, 0xd5, 0x9b, 0xec, 0xe9, - 0x88, 0x35, 0xda, 0x7a, 0xa4, 0xf0, 0x7c, 0xa2 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00 - }, { - 0x63, 0x91, 0x9e, 0xd4, 0xce, 0x10, 0x19, 0x64, - 0x38, 0xb6, 0xad, 0x09, 0xd9, 0x9c, 0xd7, 0x95 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00 - }, { - 0x76, 0x78, 0xf3, 0xa8, 0x33, 0xf1, 0x9f, 0xea, - 0x95, 0xf3, 0xc6, 0x02, 0x9e, 0x2b, 0xc6, 0x10 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00 - }, { - 0x3a, 0xa4, 0x26, 0x83, 0x10, 0x67, 0xd3, 0x6b, - 0x92, 0xbe, 0x7c, 0x5f, 0x81, 0xc1, 0x3c, 0x56 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00 - }, { - 0x92, 0x72, 0xe2, 0xd2, 0xcd, 0xd1, 0x10, 0x50, - 0x99, 0x8c, 0x84, 0x50, 0x77, 0xa3, 0x0e, 0xa0 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00 - }, { - 0x08, 0x8c, 0x4b, 0x53, 0xf5, 0xec, 0x0f, 0xf8, - 0x14, 0xc1, 0x9a, 0xda, 0xe7, 0xf6, 0x24, 0x6c - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00 - }, { - 0x40, 0x10, 0xa5, 0xe4, 0x01, 0xfd, 0xf0, 0xa0, - 0x35, 0x4d, 0xdb, 0xcc, 0x0d, 0x01, 0x2b, 0x17 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00 - }, { - 0xa8, 0x7a, 0x38, 0x57, 0x36, 0xc0, 0xa6, 0x18, - 0x9b, 0xd6, 0x58, 0x9b, 0xd8, 0x44, 0x5a, 0x93 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 - }, { - 0x54, 0x5f, 0x2b, 0x83, 0xd9, 0x61, 0x6d, 0xcc, - 0xf6, 0x0f, 0xa9, 0x83, 0x0e, 0x9c, 0xd2, 0x87 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00 - }, { - 0x4b, 0x70, 0x6f, 0x7f, 0x92, 0x40, 0x63, 0x52, - 0x39, 0x40, 0x37, 0xa6, 0xd4, 0xf4, 0x68, 0x8d - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00 - }, { - 0xb7, 0x97, 0x2b, 0x39, 0x41, 0xc4, 0x4b, 0x90, - 0xaf, 0xa7, 0xb2, 0x64, 0xbf, 0xba, 0x73, 0x87 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00 - }, { - 0x6f, 0x45, 0x73, 0x2c, 0xf1, 0x08, 0x81, 0x54, - 0x6f, 0x0f, 0xd2, 0x38, 0x96, 0xd2, 0xbb, 0x60 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00 - }, { - 0x2e, 0x35, 0x79, 0xca, 0x15, 0xaf, 0x27, 0xf6, - 0x4b, 0x3c, 0x95, 0x5a, 0x5b, 0xfc, 0x30, 0xba - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00 - }, { - 0x34, 0xa2, 0xc5, 0xa9, 0x1a, 0xe2, 0xae, 0xc9, - 0x9b, 0x7d, 0x1b, 0x5f, 0xa6, 0x78, 0x04, 0x47 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00 - }, { - 0xa4, 0xd6, 0x61, 0x6b, 0xd0, 0x4f, 0x87, 0x33, - 0x5b, 0x0e, 0x53, 0x35, 0x12, 0x27, 0xa9, 0xee - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00 - }, { - 0x7f, 0x69, 0x2b, 0x03, 0x94, 0x58, 0x67, 0xd1, - 0x61, 0x79, 0xa8, 0xce, 0xfc, 0x83, 0xea, 0x3f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 - }, { - 0x3b, 0xd1, 0x41, 0xee, 0x84, 0xa0, 0xe6, 0x41, - 0x4a, 0x26, 0xe7, 0xa4, 0xf2, 0x81, 0xf8, 0xa2 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80 - }, { - 0xd1, 0x78, 0x8f, 0x57, 0x2d, 0x98, 0xb2, 0xb1, - 0x6e, 0xc5, 0xd5, 0xf3, 0x92, 0x2b, 0x99, 0xbc - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0 - }, { - 0x08, 0x33, 0xff, 0x6f, 0x61, 0xd9, 0x8a, 0x57, - 0xb2, 0x88, 0xe8, 0xc3, 0x58, 0x6b, 0x85, 0xa6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0 - }, { - 0x85, 0x68, 0x26, 0x17, 0x97, 0xde, 0x17, 0x6b, - 0xf0, 0xb4, 0x3b, 0xec, 0xc6, 0x28, 0x5a, 0xfb - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0 - }, { - 0xf9, 0xb0, 0xfd, 0xa0, 0xc4, 0xa8, 0x98, 0xf5, - 0xb9, 0xe6, 0xf6, 0x61, 0xc4, 0xce, 0x4d, 0x07 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8 - }, { - 0x8a, 0xde, 0x89, 0x59, 0x13, 0x68, 0x5c, 0x67, - 0xc5, 0x26, 0x9f, 0x8a, 0xae, 0x42, 0x98, 0x3e - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc - }, { - 0x39, 0xbd, 0xe6, 0x7d, 0x5c, 0x8e, 0xd8, 0xa8, - 0xb1, 0xc3, 0x7e, 0xb8, 0xfa, 0x9f, 0x5a, 0xc0 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe - }, { - 0x5c, 0x00, 0x5e, 0x72, 0xc1, 0x41, 0x8c, 0x44, - 0xf5, 0x69, 0xf2, 0xea, 0x33, 0xba, 0x54, 0xf3 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - }, { - 0x3f, 0x5b, 0x8c, 0xc9, 0xea, 0x85, 0x5a, 0x0a, - 0xfa, 0x73, 0x47, 0xd2, 0x3e, 0x8d, 0x66, 0x4e - } } - }; - struct tc_aes_key_sched_struct s; - uint32_t i; - - (void)tc_aes128_set_encrypt_key(&s, key); - - for (i = 0; i < 128; ++i) { - result = var_text_test(i, kat_tbl[i].in, kat_tbl[i].out, &s); - if (result == TC_FAIL){ - break; - } - } - - TC_END_RESULT(result); - return result; -} - -uint32_t var_key_test(uint32_t r, const uint8_t *in, const uint8_t *out) -{ - uint32_t result = TC_PASS; - - const uint8_t plaintext[NUM_OF_NIST_KEYS] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - uint8_t ciphertext[NUM_OF_NIST_KEYS]; - struct tc_aes_key_sched_struct s; - - (void)tc_aes128_set_encrypt_key(&s, in); - - (void)tc_aes_encrypt(ciphertext, plaintext, &s); - result = check_result(r, out, NUM_OF_NIST_KEYS, - ciphertext, sizeof(ciphertext), 0); - return result; -} - -/* - * All NIST tests with variable key and fixed text. - */ -uint32_t test_4(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("AES128 test #4 (NIST variable-key and fixed-text):\n"); - const struct { - uint8_t key[NUM_OF_NIST_KEYS]; - uint8_t out[NUM_OF_NIST_KEYS]; - } kat_tbl[NUM_OF_FIXED_KEYS] = { - {{ - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x0e, 0xdd, 0x33, 0xd3, 0xc6, 0x21, 0xe5, 0x46, - 0x45, 0x5b, 0xd8, 0xba, 0x14, 0x18, 0xbe, 0xc8 - } }, - {{ - 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x4b, 0xc3, 0xf8, 0x83, 0x45, 0x0c, 0x11, 0x3c, - 0x64, 0xca, 0x42, 0xe1, 0x11, 0x2a, 0x9e, 0x87 - } }, - {{ - 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x72, 0xa1, 0xda, 0x77, 0x0f, 0x5d, 0x7a, 0xc4, - 0xc9, 0xef, 0x94, 0xd8, 0x22, 0xaf, 0xfd, 0x97 - } }, - {{ - 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x97, 0x00, 0x14, 0xd6, 0x34, 0xe2, 0xb7, 0x65, - 0x07, 0x77, 0xe8, 0xe8, 0x4d, 0x03, 0xcc, 0xd8 - } }, - {{ - 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xf1, 0x7e, 0x79, 0xae, 0xd0, 0xdb, 0x7e, 0x27, - 0x9e, 0x95, 0x5b, 0x5f, 0x49, 0x38, 0x75, 0xa7 - } }, - {{ - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x9e, 0xd5, 0xa7, 0x51, 0x36, 0xa9, 0x40, 0xd0, - 0x96, 0x3d, 0xa3, 0x79, 0xdb, 0x4a, 0xf2, 0x6a - } }, - {{ - 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xc4, 0x29, 0x5f, 0x83, 0x46, 0x5c, 0x77, 0x55, - 0xe8, 0xfa, 0x36, 0x4b, 0xac, 0x6a, 0x7e, 0xa5 - } }, - {{ - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xb1, 0xd7, 0x58, 0x25, 0x6b, 0x28, 0xfd, 0x85, - 0x0a, 0xd4, 0x94, 0x42, 0x08, 0xcf, 0x11, 0x55 - } }, - {{ - 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x42, 0xff, 0xb3, 0x4c, 0x74, 0x3d, 0xe4, 0xd8, - 0x8c, 0xa3, 0x80, 0x11, 0xc9, 0x90, 0x89, 0x0b - } }, - {{ - 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x99, 0x58, 0xf0, 0xec, 0xea, 0x8b, 0x21, 0x72, - 0xc0, 0xc1, 0x99, 0x5f, 0x91, 0x82, 0xc0, 0xf3 - } }, - {{ - 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x95, 0x6d, 0x77, 0x98, 0xfa, 0xc2, 0x0f, 0x82, - 0xa8, 0x82, 0x3f, 0x98, 0x4d, 0x06, 0xf7, 0xf5 - } }, - {{ - 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xa0, 0x1b, 0xf4, 0x4f, 0x2d, 0x16, 0xbe, 0x92, - 0x8c, 0xa4, 0x4a, 0xaf, 0x7b, 0x9b, 0x10, 0x6b - } }, - {{ - 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xb5, 0xf1, 0xa3, 0x3e, 0x50, 0xd4, 0x0d, 0x10, - 0x37, 0x64, 0xc7, 0x6b, 0xd4, 0xc6, 0xb6, 0xf8 - } }, - {{ - 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x26, 0x37, 0x05, 0x0c, 0x9f, 0xc0, 0xd4, 0x81, - 0x7e, 0x2d, 0x69, 0xde, 0x87, 0x8a, 0xee, 0x8d - } }, - {{ - 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x11, 0x3e, 0xcb, 0xe4, 0xa4, 0x53, 0x26, 0x9a, - 0x0d, 0xd2, 0x60, 0x69, 0x46, 0x7f, 0xb5, 0xb5 - } }, - {{ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x97, 0xd0, 0x75, 0x4f, 0xe6, 0x8f, 0x11, 0xb9, - 0xe3, 0x75, 0xd0, 0x70, 0xa6, 0x08, 0xc8, 0x84 - } }, - {{ - 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xc6, 0xa0, 0xb3, 0xe9, 0x98, 0xd0, 0x50, 0x68, - 0xa5, 0x39, 0x97, 0x78, 0x40, 0x52, 0x00, 0xb4 - } }, - {{ - 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xdf, 0x55, 0x6a, 0x33, 0x43, 0x8d, 0xb8, 0x7b, - 0xc4, 0x1b, 0x17, 0x52, 0xc5, 0x5e, 0x5e, 0x49 - } }, - {{ - 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x90, 0xfb, 0x12, 0x8d, 0x3a, 0x1a, 0xf6, 0xe5, - 0x48, 0x52, 0x1b, 0xb9, 0x62, 0xbf, 0x1f, 0x05 - } }, - {{ - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x26, 0x29, 0x8e, 0x9c, 0x1d, 0xb5, 0x17, 0xc2, - 0x15, 0xfa, 0xdf, 0xb7, 0xd2, 0xa8, 0xd6, 0x91 - } }, - {{ - 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xa6, 0xcb, 0x76, 0x1d, 0x61, 0xf8, 0x29, 0x2d, - 0x0d, 0xf3, 0x93, 0xa2, 0x79, 0xad, 0x03, 0x80 - } }, - {{ - 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x12, 0xac, 0xd8, 0x9b, 0x13, 0xcd, 0x5f, 0x87, - 0x26, 0xe3, 0x4d, 0x44, 0xfd, 0x48, 0x61, 0x08 - } }, - {{ - 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x95, 0xb1, 0x70, 0x3f, 0xc5, 0x7b, 0xa0, 0x9f, - 0xe0, 0xc3, 0x58, 0x0f, 0xeb, 0xdd, 0x7e, 0xd4 - } }, - {{ - 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xde, 0x11, 0x72, 0x2d, 0x89, 0x3e, 0x9f, 0x91, - 0x21, 0xc3, 0x81, 0xbe, 0xcc, 0x1d, 0xa5, 0x9a - } }, - {{ - 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x6d, 0x11, 0x4c, 0xcb, 0x27, 0xbf, 0x39, 0x10, - 0x12, 0xe8, 0x97, 0x4c, 0x54, 0x6d, 0x9b, 0xf2 - } }, - {{ - 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x5c, 0xe3, 0x7e, 0x17, 0xeb, 0x46, 0x46, 0xec, - 0xfa, 0xc2, 0x9b, 0x9c, 0xc3, 0x8d, 0x93, 0x40 - } }, - {{ - 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x18, 0xc1, 0xb6, 0xe2, 0x15, 0x71, 0x22, 0x05, - 0x6d, 0x02, 0x43, 0xd8, 0xa1, 0x65, 0xcd, 0xdb - } }, - {{ - 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x99, 0x69, 0x3e, 0x6a, 0x59, 0xd1, 0x36, 0x6c, - 0x74, 0xd8, 0x23, 0x56, 0x2d, 0x7e, 0x14, 0x31 - } }, - {{ - 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x6c, 0x7c, 0x64, 0xdc, 0x84, 0xa8, 0xbb, 0xa7, - 0x58, 0xed, 0x17, 0xeb, 0x02, 0x5a, 0x57, 0xe3 - } }, - {{ - 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xe1, 0x7b, 0xc7, 0x9f, 0x30, 0xea, 0xab, 0x2f, - 0xac, 0x2c, 0xbb, 0xe3, 0x45, 0x8d, 0x68, 0x7a - } }, - {{ - 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x11, 0x14, 0xbc, 0x20, 0x28, 0x00, 0x9b, 0x92, - 0x3f, 0x0b, 0x01, 0x91, 0x5c, 0xe5, 0xe7, 0xc4 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x9c, 0x28, 0x52, 0x4a, 0x16, 0xa1, 0xe1, 0xc1, - 0x45, 0x29, 0x71, 0xca, 0xa8, 0xd1, 0x34, 0x76 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xed, 0x62, 0xe1, 0x63, 0x63, 0x63, 0x83, 0x60, - 0xfd, 0xd6, 0xad, 0x62, 0x11, 0x27, 0x94, 0xf0 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x5a, 0x86, 0x88, 0xf0, 0xb2, 0xa2, 0xc1, 0x62, - 0x24, 0xc1, 0x61, 0x65, 0x8f, 0xfd, 0x40, 0x44 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x23, 0xf7, 0x10, 0x84, 0x2b, 0x9b, 0xb9, 0xc3, - 0x2f, 0x26, 0x64, 0x8c, 0x78, 0x68, 0x07, 0xca - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x44, 0xa9, 0x8b, 0xf1, 0x1e, 0x16, 0x3f, 0x63, - 0x2c, 0x47, 0xec, 0x6a, 0x49, 0x68, 0x3a, 0x89 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x0f, 0x18, 0xaf, 0xf9, 0x42, 0x74, 0x69, 0x6d, - 0x9b, 0x61, 0x84, 0x8b, 0xd5, 0x0a, 0xc5, 0xe5 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x82, 0x40, 0x85, 0x71, 0xc3, 0xe2, 0x42, 0x45, - 0x40, 0x20, 0x7f, 0x83, 0x3b, 0x6d, 0xda, 0x69 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x30, 0x3f, 0xf9, 0x96, 0x94, 0x7f, 0x0c, 0x7d, - 0x1f, 0x43, 0xc8, 0xf3, 0x02, 0x7b, 0x9b, 0x75 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x7d, 0xf4, 0xda, 0xf4, 0xad, 0x29, 0xa3, 0x61, - 0x5a, 0x9b, 0x6e, 0xce, 0x5c, 0x99, 0x51, 0x8a - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xc7, 0x29, 0x54, 0xa4, 0x8d, 0x07, 0x74, 0xdb, - 0x0b, 0x49, 0x71, 0xc5, 0x26, 0x26, 0x04, 0x15 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x1d, 0xf9, 0xb7, 0x61, 0x12, 0xdc, 0x65, 0x31, - 0xe0, 0x7d, 0x2c, 0xfd, 0xa0, 0x44, 0x11, 0xf0 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x8e, 0x4d, 0x8e, 0x69, 0x91, 0x19, 0xe1, 0xfc, - 0x87, 0x54, 0x5a, 0x64, 0x7f, 0xb1, 0xd3, 0x4f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xe6, 0xc4, 0x80, 0x7a, 0xe1, 0x1f, 0x36, 0xf0, - 0x91, 0xc5, 0x7d, 0x9f, 0xb6, 0x85, 0x48, 0xd1 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x8e, 0xbf, 0x73, 0xaa, 0xd4, 0x9c, 0x82, 0x00, - 0x7f, 0x77, 0xa5, 0xc1, 0xcc, 0xec, 0x6a, 0xb4 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x4f, 0xb2, 0x88, 0xcc, 0x20, 0x40, 0x04, 0x90, - 0x01, 0xd2, 0xc7, 0x58, 0x5a, 0xd1, 0x23, 0xfc - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x04, 0x49, 0x71, 0x10, 0xef, 0xb9, 0xdc, 0xeb, - 0x13, 0xe2, 0xb1, 0x3f, 0xb4, 0x46, 0x55, 0x64 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x75, 0x55, 0x0e, 0x6c, 0xb5, 0xa8, 0x8e, 0x49, - 0x63, 0x4c, 0x9a, 0xb6, 0x9e, 0xda, 0x04, 0x30 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xb6, 0x76, 0x84, 0x73, 0xce, 0x98, 0x43, 0xea, - 0x66, 0xa8, 0x14, 0x05, 0xdd, 0x50, 0xb3, 0x45 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xcb, 0x2f, 0x43, 0x03, 0x83, 0xf9, 0x08, 0x4e, - 0x03, 0xa6, 0x53, 0x57, 0x1e, 0x06, 0x5d, 0xe6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xff, 0x4e, 0x66, 0xc0, 0x7b, 0xae, 0x3e, 0x79, - 0xfb, 0x7d, 0x21, 0x08, 0x47, 0xa3, 0xb0, 0xba - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x7b, 0x90, 0x78, 0x51, 0x25, 0x50, 0x5f, 0xad, - 0x59, 0xb1, 0x3c, 0x18, 0x6d, 0xd6, 0x6c, 0xe3 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x8b, 0x52, 0x7a, 0x6a, 0xeb, 0xda, 0xec, 0x9e, - 0xae, 0xf8, 0xed, 0xa2, 0xcb, 0x77, 0x83, 0xe5 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x43, 0xfd, 0xaf, 0x53, 0xeb, 0xbc, 0x98, 0x80, - 0xc2, 0x28, 0x61, 0x7d, 0x6a, 0x9b, 0x54, 0x8b - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x53, 0x78, 0x61, 0x04, 0xb9, 0x74, 0x4b, 0x98, - 0xf0, 0x52, 0xc4, 0x6f, 0x1c, 0x85, 0x0d, 0x0b - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xb5, 0xab, 0x30, 0x13, 0xdd, 0x1e, 0x61, 0xdf, - 0x06, 0xcb, 0xaf, 0x34, 0xca, 0x2a, 0xee, 0x78 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x74, 0x70, 0x46, 0x9b, 0xe9, 0x72, 0x30, 0x30, - 0xfd, 0xcc, 0x73, 0xa8, 0xcd, 0x4f, 0xbb, 0x10 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xa3, 0x5a, 0x63, 0xf5, 0x34, 0x3e, 0xbe, 0x9e, - 0xf8, 0x16, 0x7b, 0xcb, 0x48, 0xad, 0x12, 0x2e - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xfd, 0x86, 0x87, 0xf0, 0x75, 0x7a, 0x21, 0x0e, - 0x9f, 0xdf, 0x18, 0x12, 0x04, 0xc3, 0x08, 0x63 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x7a, 0x18, 0x1e, 0x84, 0xbd, 0x54, 0x57, 0xd2, - 0x6a, 0x88, 0xfb, 0xae, 0x96, 0x01, 0x8f, 0xb0 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x65, 0x33, 0x17, 0xb9, 0x36, 0x2b, 0x6f, 0x9b, - 0x9e, 0x1a, 0x58, 0x0e, 0x68, 0xd4, 0x94, 0xb5 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x99, 0x5c, 0x9d, 0xc0, 0xb6, 0x89, 0xf0, 0x3c, - 0x45, 0x86, 0x7b, 0x5f, 0xaa, 0x5c, 0x18, 0xd1 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x77, 0xa4, 0xd9, 0x6d, 0x56, 0xdd, 0xa3, 0x98, - 0xb9, 0xaa, 0xbe, 0xcf, 0xc7, 0x57, 0x29, 0xfd - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x84, 0xbe, 0x19, 0xe0, 0x53, 0x63, 0x5f, 0x09, - 0xf2, 0x66, 0x5e, 0x7b, 0xae, 0x85, 0xb4, 0x2d - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x32, 0xcd, 0x65, 0x28, 0x42, 0x92, 0x6a, 0xea, - 0x4a, 0xa6, 0x13, 0x7b, 0xb2, 0xbe, 0x2b, 0x5e - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x49, 0x3d, 0x4a, 0x4f, 0x38, 0xeb, 0xb3, 0x37, - 0xd1, 0x0a, 0xa8, 0x4e, 0x91, 0x71, 0xa5, 0x54 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xd9, 0xbf, 0xf7, 0xff, 0x45, 0x4b, 0x0e, 0xc5, - 0xa4, 0xa2, 0xa6, 0x95, 0x66, 0xe2, 0xcb, 0x84 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x35, 0x35, 0xd5, 0x65, 0xac, 0xe3, 0xf3, 0x1e, - 0xb2, 0x49, 0xba, 0x2c, 0xc6, 0x76, 0x5d, 0x7a - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xf6, 0x0e, 0x91, 0xfc, 0x32, 0x69, 0xee, 0xcf, - 0x32, 0x31, 0xc6, 0xe9, 0x94, 0x56, 0x97, 0xc6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xab, 0x69, 0xcf, 0xad, 0xf5, 0x1f, 0x8e, 0x60, - 0x4d, 0x9c, 0xc3, 0x71, 0x82, 0xf6, 0x63, 0x5a - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x78, 0x66, 0x37, 0x3f, 0x24, 0xa0, 0xb6, 0xed, - 0x56, 0xe0, 0xd9, 0x6f, 0xcd, 0xaf, 0xb8, 0x77 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x1e, 0xa4, 0x48, 0xc2, 0xaa, 0xc9, 0x54, 0xf5, - 0xd8, 0x12, 0xe9, 0xd7, 0x84, 0x94, 0x44, 0x6a - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xac, 0xc5, 0x59, 0x9d, 0xd8, 0xac, 0x02, 0x23, - 0x9a, 0x0f, 0xef, 0x4a, 0x36, 0xdd, 0x16, 0x68 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xd8, 0x76, 0x44, 0x68, 0xbb, 0x10, 0x38, 0x28, - 0xcf, 0x7e, 0x14, 0x73, 0xce, 0x89, 0x50, 0x73 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x1b, 0x0d, 0x02, 0x89, 0x36, 0x83, 0xb9, 0xf1, - 0x80, 0x45, 0x8e, 0x4a, 0xa6, 0xb7, 0x39, 0x82 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x96, 0xd9, 0xb0, 0x17, 0xd3, 0x02, 0xdf, 0x41, - 0x0a, 0x93, 0x7d, 0xcd, 0xb8, 0xbb, 0x6e, 0x43 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xef, 0x16, 0x23, 0xcc, 0x44, 0x31, 0x3c, 0xff, - 0x44, 0x0b, 0x15, 0x94, 0xa7, 0xe2, 0x1c, 0xc6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x28, 0x4c, 0xa2, 0xfa, 0x35, 0x80, 0x7b, 0x8b, - 0x0a, 0xe4, 0xd1, 0x9e, 0x11, 0xd7, 0xdb, 0xd7 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xf2, 0xe9, 0x76, 0x87, 0x57, 0x55, 0xf9, 0x40, - 0x1d, 0x54, 0xf3, 0x6e, 0x2a, 0x23, 0xa5, 0x94 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xec, 0x19, 0x8a, 0x18, 0xe1, 0x0e, 0x53, 0x24, - 0x03, 0xb7, 0xe2, 0x08, 0x87, 0xc8, 0xdd, 0x80 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x54, 0x5d, 0x50, 0xeb, 0xd9, 0x19, 0xe4, 0xa6, - 0x94, 0x9d, 0x96, 0xad, 0x47, 0xe4, 0x6a, 0x80 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xdb, 0xdf, 0xb5, 0x27, 0x06, 0x0e, 0x0a, 0x71, - 0x00, 0x9c, 0x7b, 0xb0, 0xc6, 0x8f, 0x1d, 0x44 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x9c, 0xfa, 0x13, 0x22, 0xea, 0x33, 0xda, 0x21, - 0x73, 0xa0, 0x24, 0xf2, 0xff, 0x0d, 0x89, 0x6d - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x87, 0x85, 0xb1, 0xa7, 0x5b, 0x0f, 0x3b, 0xd9, - 0x58, 0xdc, 0xd0, 0xe2, 0x93, 0x18, 0xc5, 0x21 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x38, 0xf6, 0x7b, 0x9e, 0x98, 0xe4, 0xa9, 0x7b, - 0x6d, 0xf0, 0x30, 0xa9, 0xfc, 0xdd, 0x01, 0x04 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x19, 0x2a, 0xff, 0xfb, 0x2c, 0x88, 0x0e, 0x82, - 0xb0, 0x59, 0x26, 0xd0, 0xfc, 0x6c, 0x44, 0x8b - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0x6a, 0x79, 0x80, 0xce, 0x7b, 0x10, 0x5c, 0xf5, - 0x30, 0x95, 0x2d, 0x74, 0xda, 0xaf, 0x79, 0x8c - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 - }, { - 0xea, 0x36, 0x95, 0xe1, 0x35, 0x1b, 0x9d, 0x68, - 0x58, 0xbd, 0x95, 0x8c, 0xf5, 0x13, 0xef, 0x6c - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00 - }, { - 0x6d, 0xa0, 0x49, 0x0b, 0xa0, 0xba, 0x03, 0x43, - 0xb9, 0x35, 0x68, 0x1d, 0x2c, 0xce, 0x5b, 0xa1 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00 - }, { - 0xf0, 0xea, 0x23, 0xaf, 0x08, 0x53, 0x40, 0x11, - 0xc6, 0x00, 0x09, 0xab, 0x29, 0xad, 0xa2, 0xf1 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00 - }, { - 0xff, 0x13, 0x80, 0x6c, 0xf1, 0x9c, 0xc3, 0x87, - 0x21, 0x55, 0x4d, 0x7c, 0x0f, 0xcd, 0xcd, 0x4b - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00 - }, { - 0x68, 0x38, 0xaf, 0x1f, 0x4f, 0x69, 0xba, 0xe9, - 0xd8, 0x5d, 0xd1, 0x88, 0xdc, 0xdf, 0x06, 0x88 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00 - }, { - 0x36, 0xcf, 0x44, 0xc9, 0x2d, 0x55, 0x0b, 0xfb, - 0x1e, 0xd2, 0x8e, 0xf5, 0x83, 0xdd, 0xf5, 0xd7 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00 - }, { - 0xd0, 0x6e, 0x31, 0x95, 0xb5, 0x37, 0x6f, 0x10, - 0x9d, 0x5c, 0x4e, 0xc6, 0xc5, 0xd6, 0x2c, 0xed - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00 - }, { - 0xc4, 0x40, 0xde, 0x01, 0x4d, 0x3d, 0x61, 0x07, - 0x07, 0x27, 0x9b, 0x13, 0x24, 0x2a, 0x5c, 0x36 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 - }, { - 0xf0, 0xc5, 0xc6, 0xff, 0xa5, 0xe0, 0xbd, 0x3a, - 0x94, 0xc8, 0x8f, 0x6b, 0x6f, 0x7c, 0x16, 0xb9 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00 - }, { - 0x3e, 0x40, 0xc3, 0x90, 0x1c, 0xd7, 0xef, 0xfc, - 0x22, 0xbf, 0xfc, 0x35, 0xde, 0xe0, 0xb4, 0xd9 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00 - }, { - 0xb6, 0x33, 0x05, 0xc7, 0x2b, 0xed, 0xfa, 0xb9, - 0x73, 0x82, 0xc4, 0x06, 0xd0, 0xc4, 0x9b, 0xc6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00 - }, { - 0x36, 0xbb, 0xaa, 0xb2, 0x2a, 0x6b, 0xd4, 0x92, - 0x5a, 0x99, 0xa2, 0xb4, 0x08, 0xd2, 0xdb, 0xae - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 - }, { - 0x30, 0x7c, 0x5b, 0x8f, 0xcd, 0x05, 0x33, 0xab, - 0x98, 0xbc, 0x51, 0xe2, 0x7a, 0x6c, 0xe4, 0x61 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00 - }, { - 0x82, 0x9c, 0x04, 0xff, 0x4c, 0x07, 0x51, 0x3c, - 0x0b, 0x3e, 0xf0, 0x5c, 0x03, 0xe3, 0x37, 0xb5 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00 - }, { - 0xf1, 0x7a, 0xf0, 0xe8, 0x95, 0xdd, 0xa5, 0xeb, - 0x98, 0xef, 0xc6, 0x80, 0x66, 0xe8, 0x4c, 0x54 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00 - }, { - 0x27, 0x71, 0x67, 0xf3, 0x81, 0x2a, 0xff, 0xf1, - 0xff, 0xac, 0xb4, 0xa9, 0x34, 0x37, 0x9f, 0xc3 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 - }, { - 0x2c, 0xb1, 0xdc, 0x3a, 0x9c, 0x72, 0x97, 0x2e, - 0x42, 0x5a, 0xe2, 0xef, 0x3e, 0xb5, 0x97, 0xcd - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00 - }, { - 0x36, 0xae, 0xaa, 0x3a, 0x21, 0x3e, 0x96, 0x8d, - 0x4b, 0x5b, 0x67, 0x9d, 0x3a, 0x2c, 0x97, 0xfe - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00 - }, { - 0x92, 0x41, 0xda, 0xca, 0x4f, 0xdd, 0x03, 0x4a, - 0x82, 0x37, 0x2d, 0xb5, 0x0e, 0x1a, 0x0f, 0x3f - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00 - }, { - 0xc1, 0x45, 0x74, 0xd9, 0xcd, 0x00, 0xcf, 0x2b, - 0x5a, 0x7f, 0x77, 0xe5, 0x3c, 0xd5, 0x78, 0x85 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00 - }, { - 0x79, 0x3d, 0xe3, 0x92, 0x36, 0x57, 0x0a, 0xba, - 0x83, 0xab, 0x9b, 0x73, 0x7c, 0xb5, 0x21, 0xc9 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00 - }, { - 0x16, 0x59, 0x1c, 0x0f, 0x27, 0xd6, 0x0e, 0x29, - 0xb8, 0x5a, 0x96, 0xc3, 0x38, 0x61, 0xa7, 0xef - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00 - }, { - 0x44, 0xfb, 0x5c, 0x4d, 0x4f, 0x5c, 0xb7, 0x9b, - 0xe5, 0xc1, 0x74, 0xa3, 0xb1, 0xc9, 0x73, 0x48 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00 - }, { - 0x67, 0x4d, 0x2b, 0x61, 0x63, 0x3d, 0x16, 0x2b, - 0xe5, 0x9d, 0xde, 0x04, 0x22, 0x2f, 0x47, 0x40 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 - }, { - 0xb4, 0x75, 0x0f, 0xf2, 0x63, 0xa6, 0x5e, 0x1f, - 0x9e, 0x92, 0x4c, 0xcf, 0xd9, 0x8f, 0x3e, 0x37 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00 - }, { - 0x62, 0xd0, 0x66, 0x2d, 0x6e, 0xae, 0xdd, 0xed, - 0xeb, 0xae, 0x7f, 0x7e, 0xa3, 0xa4, 0xf6, 0xb6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00 - }, { - 0x70, 0xc4, 0x6b, 0xb3, 0x06, 0x92, 0xbe, 0x65, - 0x7f, 0x7e, 0xaa, 0x93, 0xeb, 0xad, 0x98, 0x97 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00 - }, { - 0x32, 0x39, 0x94, 0xcf, 0xb9, 0xda, 0x28, 0x5a, - 0x5d, 0x96, 0x42, 0xe1, 0x75, 0x9b, 0x22, 0x4a - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00 - }, { - 0x1d, 0xbf, 0x57, 0x87, 0x7b, 0x7b, 0x17, 0x38, - 0x5c, 0x85, 0xd0, 0xb5, 0x48, 0x51, 0xe3, 0x71 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00 - }, { - 0xdf, 0xa5, 0xc0, 0x97, 0xcd, 0xc1, 0x53, 0x2a, - 0xc0, 0x71, 0xd5, 0x7b, 0x1d, 0x28, 0xd1, 0xbd - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00 - }, { - 0x3a, 0x0c, 0x53, 0xfa, 0x37, 0x31, 0x1f, 0xc1, - 0x0b, 0xd2, 0xa9, 0x98, 0x1f, 0x51, 0x31, 0x74 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00 - }, { - 0xba, 0x4f, 0x97, 0x0c, 0x0a, 0x25, 0xc4, 0x18, - 0x14, 0xbd, 0xae, 0x2e, 0x50, 0x6b, 0xe3, 0xb4 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 - }, { - 0x2d, 0xce, 0x3a, 0xcb, 0x72, 0x7c, 0xd1, 0x3c, - 0xcd, 0x76, 0xd4, 0x25, 0xea, 0x56, 0xe4, 0xf6 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80 - }, { - 0x51, 0x60, 0x47, 0x4d, 0x50, 0x4b, 0x9b, 0x3e, - 0xef, 0xb6, 0x8d, 0x35, 0xf2, 0x45, 0xf4, 0xb3 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0 - }, { - 0x41, 0xa8, 0xa9, 0x47, 0x76, 0x66, 0x35, 0xde, - 0xc3, 0x75, 0x53, 0xd9, 0xa6, 0xc0, 0xcb, 0xb7 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0 - }, { - 0x25, 0xd6, 0xcf, 0xe6, 0x88, 0x1f, 0x2b, 0xf4, - 0x97, 0xdd, 0x14, 0xcd, 0x4d, 0xdf, 0x44, 0x5b - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0 - }, { - 0x41, 0xc7, 0x8c, 0x13, 0x5e, 0xd9, 0xe9, 0x8c, - 0x09, 0x66, 0x40, 0x64, 0x72, 0x65, 0xda, 0x1e - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8 - }, { - 0x5a, 0x4d, 0x40, 0x4d, 0x89, 0x17, 0xe3, 0x53, - 0xe9, 0x2a, 0x21, 0x07, 0x2c, 0x3b, 0x23, 0x05 - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc - }, { - 0x02, 0xbc, 0x96, 0x84, 0x6b, 0x3f, 0xdc, 0x71, - 0x64, 0x3f, 0x38, 0x4c, 0xd3, 0xcc, 0x3e, 0xaf - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe - }, { - 0x9b, 0xa4, 0xa9, 0x14, 0x3f, 0x4e, 0x5d, 0x40, - 0x48, 0x52, 0x1c, 0x4f, 0x88, 0x77, 0xd8, 0x8e - } }, - {{ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - }, { - 0xa1, 0xf6, 0x25, 0x8c, 0x87, 0x7d, 0x5f, 0xcd, - 0x89, 0x64, 0x48, 0x45, 0x38, 0xbf, 0xc9, 0x2c - } } - }; - uint32_t i; - - for (i = 0; i < NUM_OF_FIXED_KEYS; ++i) { - result = var_key_test(i, kat_tbl[i].key, kat_tbl[i].out); - if (result == TC_FAIL){ - break; - } - - } - - TC_END_RESULT(result); - return result; -} - -/* - * Main task to test AES - */ - -#ifdef CONFIG_MICROKERNEL -void mainloop(void) -#else -void main(void) -#endif -{ - uint32_t result = TC_PASS; - - TC_START("Performing AES128 tests:"); - - result = test_1(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("AES128 test #1 (NIST key schedule test) failed.\n"); - goto exitTest; - } - result = test_2(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("AES128 test #2 (NIST encryption test) failed.\n"); - goto exitTest; - } - result = test_3(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("AES128 test #3 (NIST fixed-key and variable-text) failed.\n"); - goto exitTest; - } - result = test_4(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("AES128 test #4 (NIST variable-key and fixed-text) failed.\n"); - goto exitTest; - } - - TC_PRINT("All AES128 tests succeeded!\n"); - - exitTest: - TC_END_RESULT(result); - TC_END_REPORT(result); -} diff --git a/samples/crypto/test_cbc/Makefile b/samples/crypto/test_cbc/Makefile deleted file mode 100644 index 4997bfd5d..000000000 --- a/samples/crypto/test_cbc/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -ccflags-y += -I$(srctree)/samples/include -I$(srctree)/lib/crypto/tinycrypt/include -obj-y = test_cbc_mode.o diff --git a/samples/crypto/test_cbc/test_cbc_mode.c b/samples/crypto/test_cbc/test_cbc_mode.c deleted file mode 100644 index 8a42d53d3..000000000 --- a/samples/crypto/test_cbc/test_cbc_mode.c +++ /dev/null @@ -1,177 +0,0 @@ -/* test_cbc_mode.c - TinyCrypt implementation of some AES-CBC tests */ - -/* - * Copyright (C) 2015 by Intel Corporation, All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* - DESCRIPTION - This module tests the following AES-CBC Mode routines: - - Scenarios tested include: - - AES128 CBC mode encryption SP 800-38a tests -*/ - -#include <tinycrypt/cbc_mode.h> -#include <tinycrypt/constants.h> -#include "test_utils.h" - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -/* - * NIST test vectors from SP 800-38a: - * - * Block #1 - * Plaintext 6bc1bee22e409f96e93d7e117393172a - * Input Block 6bc0bce12a459991e134741a7f9e1925 - * Output Block 7649abac8119b246cee98e9b12e9197d - * Ciphertext 7649abac8119b246cee98e9b12e9197d - * Block #2 - * Plaintext ae2d8a571e03ac9c9eb76fac45af8e51 - * Input Block d86421fb9f1a1eda505ee1375746972c - * Output Block 5086cb9b507219ee95db113a917678b2 - * Ciphertext 5086cb9b507219ee95db113a917678b2 - * Block #3 - * Plaintext 30c81c46a35ce411e5fbc1191a0a52ef - * Input Block 604ed7ddf32efdff7020d0238b7c2a5d - * Output Block 73bed6b8e3c1743b7116e69e22229516 - * Ciphertext 73bed6b8e3c1743b7116e69e22229516 - * Block #4 - * Plaintext f69f2445df4f9b17ad2b417be66c3710 - * Input Block 8521f2fd3c8eef2cdc3da7e5c44ea206 - * Output Block 3ff1caa1681fac09120eca307586e1a7 - * Ciphertext 3ff1caa1681fac09120eca307586e1a7 - */ -const uint8_t key[16] = { - 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, - 0x09, 0xcf, 0x4f, 0x3c -}; -const uint8_t iv[16] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f -}; -const uint8_t plaintext[64] = { - 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, - 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, - 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, - 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, - 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, - 0xe6, 0x6c, 0x37, 0x10 -}; -const uint8_t ciphertext[80] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f, 0x76, 0x49, 0xab, 0xac, 0x81, 0x19, 0xb2, 0x46, - 0xce, 0xe9, 0x8e, 0x9b, 0x12, 0xe9, 0x19, 0x7d, 0x50, 0x86, 0xcb, 0x9b, - 0x50, 0x72, 0x19, 0xee, 0x95, 0xdb, 0x11, 0x3a, 0x91, 0x76, 0x78, 0xb2, - 0x73, 0xbe, 0xd6, 0xb8, 0xe3, 0xc1, 0x74, 0x3b, 0x71, 0x16, 0xe6, 0x9e, - 0x22, 0x22, 0x95, 0x16, 0x3f, 0xf1, 0xca, 0xa1, 0x68, 0x1f, 0xac, 0x09, - 0x12, 0x0e, 0xca, 0x30, 0x75, 0x86, 0xe1, 0xa7 -}; - -/* - * NIST SP 800-38a CBC Test for encryption and decryption. - */ -uint32_t test_1_and_2(void) -{ - struct tc_aes_key_sched_struct a; - uint8_t iv_buffer[16]; - uint8_t encrypted[80]; - uint8_t decrypted[64]; - uint8_t *p; - uint32_t length; - int result = TC_PASS; - - (void)tc_aes128_set_encrypt_key(&a, key); - - (void)memcpy(iv_buffer, iv, TC_AES_BLOCK_SIZE); - - TC_PRINT("CBC test #1 (encryption SP 800-38a tests):\n"); - if (tc_cbc_mode_encrypt(encrypted, - sizeof(plaintext) + TC_AES_BLOCK_SIZE, - plaintext, sizeof(plaintext), - iv_buffer, &a) == 0) { - TC_ERROR("CBC test #1 (encryption SP 800-38a tests) failed in %s.\n", __func__); - result = TC_FAIL; - goto exitTest1; - } - - result = check_result(1, ciphertext, sizeof(encrypted), - encrypted, sizeof(encrypted), 1); - TC_END_RESULT(result); - - TC_PRINT("CBC test #2 (decryption SP 800-38a tests):\n"); - (void)tc_aes128_set_decrypt_key(&a, key); - - p = &encrypted[TC_AES_BLOCK_SIZE]; - length = ((uint32_t) sizeof(encrypted)) - TC_AES_BLOCK_SIZE; - - if (tc_cbc_mode_decrypt(decrypted, length - TC_AES_BLOCK_SIZE, p, - length, encrypted, &a) == 0) { - TC_ERROR("CBC test #2 (decryption SP 800-38a tests) failed in.\n", __func__); - result = TC_FAIL; - goto exitTest1; - } - - result = check_result(2, plaintext, sizeof(decrypted), - decrypted, sizeof(decrypted), 1); - - exitTest1: - TC_END_RESULT(result); - return result; -} - -/* - * Main task to test AES - */ - -#ifdef CONFIG_MICROKERNEL -void mainloop(void) -#else -void main(void) -#endif -{ - uint32_t result = TC_PASS; - - TC_START("Performing AES128 tests:"); - - TC_PRINT("Performing CBC tests:\n"); - result = test_1_and_2(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CBC test #1 failed.\n"); - goto exitTest; - } - - TC_PRINT("All CBC tests succeeded!\n"); - - exitTest: - TC_END_RESULT(result); - TC_END_REPORT(result); -} - diff --git a/samples/crypto/test_ccm_mode/Makefile b/samples/crypto/test_ccm_mode/Makefile deleted file mode 100644 index 0fd65c751..000000000 --- a/samples/crypto/test_ccm_mode/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -ccflags-y += -I$(srctree)/samples/include -I$(srctree)/lib/crypto/tinycrypt/include -obj-y = test_ccm_mode.o diff --git a/samples/crypto/test_ccm_mode/test_ccm_mode.c b/samples/crypto/test_ccm_mode/test_ccm_mode.c deleted file mode 100644 index 6646c8317..000000000 --- a/samples/crypto/test_ccm_mode/test_ccm_mode.c +++ /dev/null @@ -1,509 +0,0 @@ -/* test_ccm_mode.c - TinyCrypt AES-CCM tests (RFC 3610 tests) */ - -/* - * Copyright (C) 2015 by Intel Corporation, All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * DESCRIPTION - * This module tests the following AES-CCM Mode routines: - * - * Scenarios tested include: - * - AES128 CCM mode encryption RFC 3610 test vector #1 - * - AES128 CCM mode encryption RFC 3610 test vector #2 - * - AES128 CCM mode encryption RFC 3610 test vector #3 - * - AES128 CCM mode encryption RFC 3610 test vector #7 - * - AES128 CCM mode encryption RFC 3610 test vector #8 - * - AES128 CCM mode encryption RFC 3610 test vector #9 - * - AES128 CCM mode encryption No associated data - * - AES128 CCM mode encryption No payhoad data -*/ - -#include <tinycrypt/ccm_mode.h> -#include <tinycrypt/constants.h> -#include <test_utils.h> - -#include <string.h> - -#define CIPHERTEXT_LEN 50 -#define DECRYPTED_LEN 25 -#define NUM_NIST_KEYS 16 -#define NONCE_LEN 13 -#define HEADER_LEN 8 -#define M_LEN8 8 -#define M_LEN10 10 -#define DATA_BUF_LEN23 23 -#define DATA_BUF_LEN24 24 -#define DATA_BUF_LEN25 25 -#define EXPECTED_BUF_LEN31 31 -#define EXPECTED_BUF_LEN32 32 -#define EXPECTED_BUF_LEN33 33 -#define EXPECTED_BUF_LEN34 34 -#define EXPECTED_BUF_LEN35 35 - -uint32_t do_test(const uint8_t *key, uint8_t *nonce, size_t nlen, - const uint8_t *hdr, size_t hlen, const uint8_t *data, size_t dlen, - const uint8_t *expected, size_t elen, const int mlen) -{ - - uint32_t result = TC_PASS; - uint8_t ciphertext[CIPHERTEXT_LEN]; - uint8_t decrypted[DECRYPTED_LEN]; - struct tc_ccm_mode_struct c; - struct tc_aes_key_sched_struct sched; - - tc_aes128_set_encrypt_key(&sched, key); - if (tc_ccm_config(&c, &sched, nonce, nlen, mlen) == 0) { - TC_ERROR("CCM config failed in %s.\n", __func__); - result = TC_FAIL; - goto exitTest1; - } - - - if (tc_ccm_generation_encryption(ciphertext, hdr, hlen, data, dlen, &c) == 0) { - TC_ERROR("ccm_encrypt failed in %s.\n", __func__); - result = TC_FAIL; - goto exitTest1; - } - - - if (memcmp(expected, ciphertext, elen) != 0) { - TC_ERROR("ccm_encrypt produced wrong ciphertext in %s.\n", __func__); - show_str("\t\tExpected", expected, elen); - show_str("\t\tComputed", ciphertext, elen); - result = TC_FAIL; - goto exitTest1; - } - - if (tc_ccm_decryption_verification(decrypted, hdr, hlen, ciphertext, dlen+mlen, &c) == 0) { - TC_ERROR("ccm_decrypt failed in %s.\n", __func__); - show_str("\t\tExpected", data, sizeof(data)); - show_str("\t\tComputed", decrypted, sizeof(decrypted)); - result = TC_FAIL; - goto exitTest1; - } - -exitTest1: - TC_END_RESULT(result); - return result; -} - -uint32_t test_vector_1(void) -{ - - uint32_t result = TC_PASS; - - TC_PRINT("Performing CCM test #1 (RFC 3610 test vector #1):\n", __func__); - - /* RFC 3610 test vector #1 */ - const uint8_t key[NUM_NIST_KEYS] = { - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, - 0xcc, 0xcd, 0xce, 0xcf - }; - uint8_t nonce[NONCE_LEN] = { - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, - 0xa5 - }; - const uint8_t hdr[HEADER_LEN] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - }; - const uint8_t data[DATA_BUF_LEN23] = { - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e - }; - const uint8_t expected[EXPECTED_BUF_LEN31] = { - 0x58, 0x8c, 0x97, 0x9a, 0x61, 0xc6, 0x63, 0xd2, 0xf0, 0x66, 0xd0, 0xc2, - 0xc0, 0xf9, 0x89, 0x80, 0x6d, 0x5f, 0x6b, 0x61, 0xda, 0xc3, 0x84, 0x17, - 0xe8, 0xd1, 0x2c, 0xfd, 0xf9, 0x26, 0xe0 - }; - - uint16_t mlen = M_LEN8; - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), data, sizeof(data), expected, - sizeof(expected), mlen); - - return result; -} - -uint32_t test_vector_2(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CCM test #2 (RFC 3610 test vector #2):\n"); - /* RFC 3610 test vector #2 */ - const uint8_t key[NUM_NIST_KEYS] = { - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, - 0xcc, 0xcd, 0xce, 0xcf - }; - uint8_t nonce[NONCE_LEN] = { - 0x00, 0x00, 0x00, 0x04, 0x03, 0x02, 0x01, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, - 0xa5 - }; - const uint8_t hdr[HEADER_LEN] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - }; - const uint8_t data[DATA_BUF_LEN24] = { - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f - }; - const uint8_t expected[EXPECTED_BUF_LEN32] = { - 0x72, 0xc9, 0x1a, 0x36, 0xe1, 0x35, 0xf8, 0xcf, 0x29, 0x1c, 0xa8, 0x94, - 0x08, 0x5c, 0x87, 0xe3, 0xcc, 0x15, 0xc4, 0x39, 0xc9, 0xe4, 0x3a, 0x3b, - 0xa0, 0x91, 0xd5, 0x6e, 0x10, 0x40, 0x09, 0x16 - }; - - uint16_t mlen = M_LEN8; - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), data, sizeof(data), expected, - sizeof(expected), mlen); - - return result; -} - -uint32_t test_vector_3(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CCM test #3 (RFC 3610 test vector #3):\n"); - - /* RFC 3610 test vector #3 */ - const uint8_t key[NUM_NIST_KEYS] = { - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, - 0xcc, 0xcd, 0xce, 0xcf - }; - uint8_t nonce[NONCE_LEN] = { - 0x00, 0x00, 0x00, 0x05, 0x04, 0x03, 0x02, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, - 0xa5 - }; - const uint8_t hdr[HEADER_LEN] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - }; - const uint8_t data[DATA_BUF_LEN25] = { - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, - 0x20 - }; - const uint8_t expected[EXPECTED_BUF_LEN33] = { - 0x51, 0xb1, 0xe5, 0xf4, 0x4a, 0x19, 0x7d, 0x1d, 0xa4, 0x6b, 0x0f, 0x8e, - 0x2d, 0x28, 0x2a, 0xe8, 0x71, 0xe8, 0x38, 0xbb, 0x64, 0xda, 0x85, 0x96, - 0x57, 0x4a, 0xda, 0xa7, 0x6f, 0xbd, 0x9f, 0xb0, 0xc5 - }; - - uint16_t mlen = M_LEN8; - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), data, sizeof(data), expected, - sizeof(expected), mlen); - - return result; -} - -uint32_t test_vector_4(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CCM test #4 (RFC 3610 test vector #7):\n"); - - /* RFC 3610 test vector #7 */ - const uint8_t key[NUM_NIST_KEYS] = { - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, - 0xcc, 0xcd, 0xce, 0xcf - }; - uint8_t nonce[NONCE_LEN] = { - 0x00, 0x00, 0x00, 0x09, 0x08, 0x07, 0x06, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, - 0xa5 - }; - const uint8_t hdr[HEADER_LEN] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - }; - const uint8_t data[DATA_BUF_LEN23] = { - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e - }; - const uint8_t expected[EXPECTED_BUF_LEN33] = { - 0x01, 0x35, 0xD1, 0xB2, 0xC9, 0x5F, 0x41, 0xD5, - 0xD1, 0xD4, 0xFE, 0xC1, 0x85, 0xD1, 0x66, 0xB8, - 0x09, 0x4E, 0x99, 0x9D, 0xFE, 0xD9, 0x6C, 0x04, - 0x8C, 0x56, 0x60, 0x2C, 0x97, 0xAC, 0xBB, 0x74, 0x90 - }; - - uint16_t mlen = M_LEN10; - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), data, sizeof(data), expected, - sizeof(expected), mlen); - - return result; -} - -uint32_t test_vector_5(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CCM test #5 (RFC 3610 test vector #8):\n"); - - /* RFC 3610 test vector #8 */ - const uint8_t key[NUM_NIST_KEYS] = { - 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, - 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF - }; - uint8_t nonce[NONCE_LEN] = { - 0x00, 0x00, 0x00, 0x0A, 0x09, 0x08, 0x07, 0xA0, - 0xA1, 0xA2, 0xA3, 0xA4, 0xA5 - }; - const uint8_t hdr[HEADER_LEN] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - }; - const uint8_t data[DATA_BUF_LEN24] = { - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f - }; - const uint8_t expected[EXPECTED_BUF_LEN34] = { - 0x7B, 0x75, 0x39, 0x9A, 0xC0, 0x83, 0x1D, 0xD2, - 0xF0, 0xBB, 0xD7, 0x58, 0x79, 0xA2, 0xFD, 0x8F, - 0x6C, 0xAE, 0x6B, 0x6C, 0xD9, 0xB7, 0xDB, 0x24, - 0xC1, 0x7B, 0x44, 0x33, 0xF4, 0x34, 0x96, 0x3F, 0x34, 0xB4 - }; - - uint16_t mlen = M_LEN10; - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), data, sizeof(data), expected, - sizeof(expected), mlen); - - return result; -} - -uint32_t test_vector_6(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CCM test #6 (RFC 3610 test vector #9):\n"); - - /* RFC 3610 test vector #9 */ - const uint8_t key[NUM_NIST_KEYS] = { - 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, - 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF - }; - uint8_t nonce[NONCE_LEN] = { - 0x00, 0x00, 0x00, 0x0B, 0x0A, 0x09, 0x08, 0xA0, - 0xA1, 0xA2, 0xA3, 0xA4, 0xA5 - }; - const uint8_t hdr[HEADER_LEN] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - }; - const uint8_t data[DATA_BUF_LEN25] = { - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20 - }; - const uint8_t expected[EXPECTED_BUF_LEN35] = { - 0x82, 0x53, 0x1a, 0x60, 0xCC, 0x24, 0x94, 0x5a, - 0x4b, 0x82, 0x79, 0x18, 0x1a, 0xb5, 0xc8, 0x4d, - 0xf2, 0x1c, 0xe7, 0xf9, 0xb7, 0x3f, 0x42, 0xe1, - 0x97, 0xea, 0x9c, 0x07, 0xe5, 0x6b, 0x5e, 0xb1, 0x7e, 0x5f, 0x4e - }; - - uint16_t mlen = M_LEN10; - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), data, sizeof(data), expected, - sizeof(expected), mlen); - - return result; -} - -uint32_t test_vector_7(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CCM test #7 (no associated data):\n"); - - /* Test based on RFC 3610 test vector #9 but with no associated data */ - const uint8_t key[NUM_NIST_KEYS] = { - 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, - 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF - }; - uint8_t nonce[NONCE_LEN] = { - 0x00, 0x00, 0x00, 0x0B, 0x0A, 0x09, 0x08, 0xA0, - 0xA1, 0xA2, 0xA3, 0xA4, 0xA5 - }; - uint8_t *hdr = NULL; - - uint8_t data[DATA_BUF_LEN25] = { - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, - 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20 - }; - - struct tc_ccm_mode_struct c; - struct tc_aes_key_sched_struct sched; - uint8_t decrypted[DECRYPTED_LEN]; - uint8_t ciphertext[CIPHERTEXT_LEN]; - - uint16_t mlen = M_LEN10; - - tc_aes128_set_encrypt_key(&sched, key); - if (tc_ccm_config(&c, &sched, nonce, sizeof(nonce), mlen) == 0) { - TC_ERROR("ccm_config failed in %s.\n", __func__); - result = TC_FAIL; - goto exitTest1; - } - - if (tc_ccm_generation_encryption(ciphertext, hdr, 0, data, sizeof(data), &c) == 0) { - TC_ERROR("ccm_encryption failed in %s.\n", __func__); - result = TC_FAIL; - goto exitTest1; - } - - if (tc_ccm_decryption_verification(decrypted, hdr, 0, ciphertext, - sizeof(data)+mlen, &c) == 0) { - TC_ERROR("ccm_decrypt failed in %s.\n", __func__); - show_str("\t\tExpected", data, sizeof(data)); - show_str("\t\tComputed", decrypted, sizeof(decrypted)); - result = TC_FAIL; - goto exitTest1; - } -exitTest1: - TC_END_RESULT(result); - return result; - -} - -uint32_t test_vector_8(void) -{ - - uint32_t result = TC_PASS; - - TC_PRINT("Performing CCM test #8 (no payload data):\n"); - - /* Test based on RFC 3610 test vector #9 but with no payload data */ - const uint8_t key[NUM_NIST_KEYS] = { - 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, - 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF - }; - uint8_t nonce[NONCE_LEN] = { - 0x00, 0x00, 0x00, 0x0B, 0x0A, 0x09, 0x08, 0xA0, - 0xA1, 0xA2, 0xA3, 0xA4, 0xA5 - }; - const uint8_t hdr[8] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 - }; - - uint8_t *data = NULL; - - struct tc_ccm_mode_struct c; - struct tc_aes_key_sched_struct sched; - uint8_t decrypted[DECRYPTED_LEN]; - uint8_t ciphertext[CIPHERTEXT_LEN]; - - uint16_t mlen = M_LEN10; - - tc_aes128_set_encrypt_key(&sched, key); - if (tc_ccm_config(&c, &sched, nonce, sizeof(nonce), mlen) == 0) { - TC_ERROR("CCM config failed in %s.\n", __func__); - result = TC_FAIL; - goto exitTest1; - } - - if (tc_ccm_generation_encryption(ciphertext, hdr, sizeof(hdr), data, 0, &c) == 0) { - TC_ERROR("ccm_encrypt failed in %s.\n", __func__); - result = TC_FAIL; - goto exitTest1; - } - - if (tc_ccm_decryption_verification(decrypted, hdr, sizeof(hdr), - ciphertext, mlen, &c) == 0) { - TC_ERROR("ccm_decrypt failed in %s.\n", __func__); - show_str("\t\tExpected", data, sizeof(data)); - show_str("\t\tComputed", decrypted, sizeof(decrypted)); - result = TC_FAIL; - goto exitTest1; - } - -exitTest1: - TC_END_RESULT(result); - return result; -} - -/* - * Main task to test CCM - */ - -#ifdef CONFIG_MICROKERNEL -void mainloop(void) -#else - void main(void) -#endif -{ - uint32_t result = TC_PASS; - - TC_START("Performing CCM tests:"); - - result = test_vector_1(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CCM test #1 (RFC 3610 test vector #1) failed.\n"); - goto exitTest; - } - result = test_vector_2(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CCM test #2 failed.\n"); - goto exitTest; - } - result = test_vector_3(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CCM test #3 failed.\n"); - goto exitTest; - } - result = test_vector_4(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CCM test #4 failed.\n"); - goto exitTest; - } - result = test_vector_5(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CCM test #5 failed.\n"); - goto exitTest; - } - result = test_vector_6(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CCM test #6 failed.\n"); - goto exitTest; - } - result = test_vector_7(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CCM test #7 failed.\n"); - goto exitTest; - } - result = test_vector_8(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CCM test #8 (no payload data) failed.\n"); - goto exitTest; - } - - TC_PRINT("All CCM tests succeeded!\n"); - -exitTest: - TC_END_RESULT(result); - TC_END_REPORT(result); -} diff --git a/samples/crypto/test_cmac_mode/Makefile b/samples/crypto/test_cmac_mode/Makefile deleted file mode 100644 index 83d9cb5cd..000000000 --- a/samples/crypto/test_cmac_mode/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -ccflags-y += -I$(srctree)/samples/include -I$(srctree)/lib/crypto/tinycrypt/include -obj-y = test_cmac_mode.o diff --git a/samples/crypto/test_cmac_mode/test_cmac_mode.c b/samples/crypto/test_cmac_mode/test_cmac_mode.c deleted file mode 100644 index 4ea6214cc..000000000 --- a/samples/crypto/test_cmac_mode/test_cmac_mode.c +++ /dev/null @@ -1,309 +0,0 @@ -/* test_cmac_mode.c - TinyCrypt AES-CMAC tests (including SP 800-38B tests) */ - -/* - * Copyright (C) 2015 by Intel Corporation, All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* - * DESCRIPTION - * This module tests the following AES-CMAC test (including SP 800-38B): - * - * Scenarios tested include: - * - CMAC test #1 (GF(2^128) double)) - * - CMAC test #2 null msg (SP 800-38B test vector #1) - * - CMAC test #3 1 block msg (SP 800-38B test vector #2) - * - CMAC test #4 320 bit msg (SP 800-38B test vector #3) - * - CMAC test #5 512 bit msg(SP 800-38B test vector #4) - */ - -#include <tinycrypt/cmac_mode.h> -#include <tinycrypt/constants.h> -#include <tinycrypt/aes.h> -#include <test_utils.h> - -#include <stdio.h> -#include <string.h> - -#define BUF_LEN 16 - -static void show(const char *label, const uint8_t *s, size_t slen) -{ - uint32_t i; - - TC_PRINT("%s\t", label); - for (i = 0; i < slen; ++i) { - TC_PRINT("%02x", s[i]); - } - TC_PRINT("\n"); -} - -extern void gf_double(uint8_t *out, uint8_t *in); - -static uint32_t verify_gf_2_128_double(uint8_t *K1, uint8_t *K2, struct tc_cmac_struct s) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CMAC test #1 (GF(2^128) double):\n"); - - uint8_t zero[BUF_LEN]; - uint8_t L[BUF_LEN]; - const uint8_t l[BUF_LEN] = { - 0x7d, 0xf7, 0x6b, 0x0c, 0x1a, 0xb8, 0x99, 0xb3, - 0x3e, 0x42, 0xf0, 0x47, 0xb9, 0x1b, 0x54, 0x6f - }; - const uint8_t k1[BUF_LEN] = { - 0xfb, 0xee, 0xd6, 0x18, 0x35, 0x71, 0x33, 0x66, - 0x7c, 0x85, 0xe0, 0x8f, 0x72, 0x36, 0xa8, 0xde - }; - const uint8_t k2[BUF_LEN] = { - 0xf7, 0xdd, 0xac, 0x30, 0x6a, 0xe2, 0x66, 0xcc, - 0xf9, 0x0b, 0xc1, 0x1e, 0xe4, 0x6d, 0x51, 0x3b - }; - - (void) memset(zero, '\0', sizeof(zero)); - tc_aes_encrypt(L, zero, s.sched); - if (memcmp(L, l, BUF_LEN) != 0) { - TC_ERROR("AES encryption failed in %s.\n", __func__); - show("expected L =", l, sizeof(l)); - show("computed L =", L, sizeof(L)); - return TC_FAIL; - } - - gf_double(K1, L); - if (memcmp(K1, k1, BUF_LEN) != 0) { - TC_ERROR("gf_2_128_double failed when msb = 0\n", __func__); - show("expected K1 =", k1, sizeof(k1)); - show("computed K1 =", K1, sizeof(k1)); - return TC_FAIL; - } - - gf_double(K2, K1); - if (memcmp(K2, k2, BUF_LEN) != 0) { - TC_ERROR("gf_2_128_double failed when msb = 1\n", __func__); - show("expected K2 =", k2, sizeof(k2)); - show("computed K2 =", K2, sizeof(k2)); - return TC_FAIL; - } - - TC_END_RESULT(result); - return result; -} - -static uint32_t verify_cmac_null_msg(TCCmacState_t s) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CMAC test #2 (SP 800-38B test vector #1):\n"); - - const uint8_t tag[BUF_LEN] = { - 0xbb, 0x1d, 0x69, 0x29, 0xe9, 0x59, 0x37, 0x28, - 0x7f, 0xa3, 0x7d, 0x12, 0x9b, 0x75, 0x67, 0x46 - }; - uint8_t Tag[BUF_LEN]; - - (void) tc_cmac_init(s); - (void) tc_cmac_update(s, (const uint8_t *) 0, 0); - (void) tc_cmac_final(Tag, s); - - if (memcmp(Tag, tag, BUF_LEN) != 0) { - TC_ERROR("aes_cmac failed with null msg = 1\n", __func__); - show("expected Tag =", tag, sizeof(tag)); - show("computed Tag =", Tag, sizeof(Tag)); - return TC_FAIL; - } - - TC_END_RESULT(result); - return result; -} - -static uint32_t verify_cmac_1_block_msg(TCCmacState_t s) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CMAC test #3 (SP 800-38B test vector #2):\n"); - - const uint8_t msg[BUF_LEN] = { - 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, - 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a - }; - const uint8_t tag[BUF_LEN] = { - 0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44, - 0xf7, 0x9b, 0xdd, 0x9d, 0xd0, 0x4a, 0x28, 0x7c - }; - uint8_t Tag[BUF_LEN]; - - (void) tc_cmac_init(s); - (void) tc_cmac_update(s, msg, sizeof(msg)); - (void) tc_cmac_final(Tag, s); - - if (memcmp(Tag, tag, BUF_LEN) != 0) { - TC_ERROR("aes_cmac failed with 1 block msg\n", __func__); - show("aes_cmac failed with 1 block msg =", msg, sizeof(msg)); - show("expected Tag =", tag, sizeof(tag)); - show("computed Tag =", Tag, sizeof(Tag)); - return TC_FAIL; - } - - TC_END_RESULT(result); - return result; -} - -static uint32_t verify_cmac_320_bit_msg(TCCmacState_t s) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CMAC test #4 (SP 800-38B test vector #3):\n"); - - const uint8_t msg[40] = { - 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, - 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, - 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, - 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, - 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11 - }; - const uint8_t tag[BUF_LEN] = { - 0xdf, 0xa6, 0x67, 0x47, 0xde, 0x9a, 0xe6, 0x30, - 0x30, 0xca, 0x32, 0x61, 0x14, 0x97, 0xc8, 0x27 - }; - uint8_t Tag[BUF_LEN]; - - (void) tc_cmac_init(s); - (void) tc_cmac_update(s, msg, sizeof(msg)); - (void) tc_cmac_final(Tag, s); - - if (memcmp(Tag, tag, BUF_LEN) != 0) { - TC_ERROR("aes_cmac failed with 320 bit msg\n", __func__); - show("aes_cmac failed with 320 bit msg =", msg, sizeof(msg)); - show("expected Tag =", tag, sizeof(tag)); - show("computed Tag =", Tag, sizeof(Tag)); - return TC_FAIL; - } - - TC_END_RESULT(result); - return result; -} - -static uint32_t verify_cmac_512_bit_msg(TCCmacState_t s) -{ - uint32_t result = TC_PASS; - - TC_PRINT("Performing CMAC test #5 (SP 800-38B test vector #4)\n"); - - const uint8_t msg[64] = { - 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, - 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, - 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, - 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, - 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, - 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, - 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, - 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 - }; - const uint8_t tag[BUF_LEN] = { - 0x51, 0xf0, 0xbe, 0xbf, 0x7e, 0x3b, 0x9d, 0x92, - 0xfc, 0x49, 0x74, 0x17, 0x79, 0x36, 0x3c, 0xfe - }; - uint8_t Tag[BUF_LEN]; - - (void)tc_cmac_init(s); - (void)tc_cmac_update(s, msg, sizeof(msg)); - (void)tc_cmac_final(Tag, s); - - if (memcmp(Tag, tag, BUF_LEN) != 0) { - TC_ERROR("aes_cmac failed with 512 bit msg\n", __func__); - show("aes_cmac failed with 512 bit msg =", msg, sizeof(msg)); - show("expected Tag =", tag, sizeof(tag)); - show("computed Tag =", Tag, sizeof(Tag)); - return TC_FAIL; - } - - TC_END_RESULT(result); - return result; -} - -/* - * Main task to test CMAC - */ - -#ifdef CONFIG_MICROKERNEL -void mainloop(void) -#else - void main(void) -#endif -{ - - uint32_t result = TC_PASS; - - struct tc_cmac_struct state; - struct tc_aes_key_sched_struct sched; - - const uint8_t key[BUF_LEN] = { - 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, - 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c - }; - uint8_t K1[BUF_LEN], K2[BUF_LEN]; - - TC_START("Performing CMAC tests:"); - - (void) tc_cmac_setup(&state, key, &sched); - result = verify_gf_2_128_double(K1, K2, state); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CMAC test #1 (128 double) failed.\n"); - goto exitTest; - } - (void) tc_cmac_setup(&state, key, &sched); - result = verify_cmac_null_msg(&state); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CMAC test #2 (null msg) failed.\n"); - goto exitTest; - } - (void) tc_cmac_setup(&state, key, &sched); - result = verify_cmac_1_block_msg(&state); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CMAC test #3 (1 block msg)failed.\n"); - goto exitTest; - } - (void) tc_cmac_setup(&state, key, &sched); - result = verify_cmac_320_bit_msg(&state); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CMAC test #4 (320 bit msg) failed.\n"); - goto exitTest; - } - (void) tc_cmac_setup(&state, key, &sched); - result = verify_cmac_512_bit_msg(&state); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CMAC test #5 (512 bit msg)failed.\n"); - goto exitTest; - } - - TC_PRINT("All CMAC tests succeeded!\n"); - -exitTest: - TC_END_RESULT(result); - TC_END_REPORT(result); -} diff --git a/samples/crypto/test_ctr/Makefile b/samples/crypto/test_ctr/Makefile deleted file mode 100644 index e21da9c8a..000000000 --- a/samples/crypto/test_ctr/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -ccflags-y += -I$(srctree)/samples/include -I$(srctree)/lib/crypto/tinycrypt/include -obj-y = test_ctr_mode.o diff --git a/samples/crypto/test_ctr/test_ctr_mode.c b/samples/crypto/test_ctr/test_ctr_mode.c deleted file mode 100644 index d49874a7b..000000000 --- a/samples/crypto/test_ctr/test_ctr_mode.c +++ /dev/null @@ -1,141 +0,0 @@ -/* test_ctr_mode.c - TinyCrypt implementation of some AES-CTR tests */ - -/* - * Copyright (C) 2015 by Intel Corporation, All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - DESCRIPTION - This module tests the following AES-CTR Mode routines: - - Scenarios tested include: - - AES128 CTR mode encryption SP 800-38a tests -*/ - -#include <tinycrypt/ctr_mode.h> -#include <tinycrypt/constants.h> -#include <test_utils.h> - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -/* - * NIST SP 800-38a CTR Test for encryption and decryption. - */ -uint32_t test_1_and_2(void) -{ - const uint8_t key[16] = { - 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, - 0x09, 0xcf, 0x4f, 0x3c - }; - uint8_t ctr[16] = { - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, - 0xfc, 0xfd, 0xfe, 0xff - }; - const uint8_t plaintext[64] = { - 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, - 0x73, 0x93, 0x17, 0x2a, 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, - 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, 0x30, 0xc8, 0x1c, 0x46, - 0xa3, 0x5c, 0xe4, 0x11, 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, - 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, 0xad, 0x2b, 0x41, 0x7b, - 0xe6, 0x6c, 0x37, 0x10 - }; - const uint8_t ciphertext[80] = { - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, - 0xfc, 0xfd, 0xfe, 0xff, 0x87, 0x4d, 0x61, 0x91, 0xb6, 0x20, 0xe3, 0x26, - 0x1b, 0xef, 0x68, 0x64, 0x99, 0x0d, 0xb6, 0xce, 0x98, 0x06, 0xf6, 0x6b, - 0x79, 0x70, 0xfd, 0xff, 0x86, 0x17, 0x18, 0x7b, 0xb9, 0xff, 0xfd, 0xff, - 0x5a, 0xe4, 0xdf, 0x3e, 0xdb, 0xd5, 0xd3, 0x5e, 0x5b, 0x4f, 0x09, 0x02, - 0x0d, 0xb0, 0x3e, 0xab, 0x1e, 0x03, 0x1d, 0xda, 0x2f, 0xbe, 0x03, 0xd1, - 0x79, 0x21, 0x70, 0xa0, 0xf3, 0x00, 0x9c, 0xee - }; - struct tc_aes_key_sched_struct sched; - uint8_t out[80]; - uint8_t decrypted[64]; - uint32_t result = TC_PASS; - - TC_PRINT("CTR test #1 (encryption SP 800-38a tests):\n"); - (void)tc_aes128_set_encrypt_key(&sched, key); - - (void)memcpy(out, ctr, sizeof(ctr)); - if (tc_ctr_mode(&out[TC_AES_BLOCK_SIZE], sizeof(plaintext), plaintext, - sizeof(plaintext), ctr, &sched) == 0) { - TC_ERROR("CTR test #1 (encryption SP 800-38a tests) failed in %s.\n", __func__); - result = TC_FAIL; - goto exitTest1; - } - - result = check_result(1, ciphertext, sizeof(out), out, sizeof(out), 1); - TC_END_RESULT(result); - - TC_PRINT("CTR test #2 (decryption SP 800-38a tests):\n"); - (void) memcpy(ctr, out, sizeof(ctr)); - if (tc_ctr_mode(decrypted, sizeof(decrypted), &out[TC_AES_BLOCK_SIZE], - sizeof(decrypted), ctr, &sched) == 0) { - TC_ERROR("CTR test #2 (decryption SP 800-38a tests) failed in.\n", __func__); - result = TC_FAIL; - goto exitTest1; - } - - result = check_result(2, plaintext, sizeof(plaintext), - decrypted, sizeof(plaintext), 1); - - exitTest1: - TC_END_RESULT(result); - return result; -} - -/* - * Main task to test AES - */ - -#ifdef CONFIG_MICROKERNEL -void mainloop(void) -#else -void main(void) -#endif -{ - uint32_t result = TC_PASS; - - TC_START("Performing AES128-CTR mode tests:"); - - TC_PRINT("Performing CTR tests:\n"); - result = test_1_and_2(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("CBC test #1 failed.\n"); - goto exitTest; - } - - TC_PRINT("All CTR tests succeeded!\n"); - - exitTest: - TC_END_RESULT(result); - TC_END_REPORT(result); -} diff --git a/samples/crypto/test_hmac/Makefile b/samples/crypto/test_hmac/Makefile deleted file mode 100644 index 0472a2d3b..000000000 --- a/samples/crypto/test_hmac/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -ccflags-y += -I$(srctree)/samples/include -I$(srctree)/lib/crypto/tinycrypt/include -obj-y = test_hmac.o diff --git a/samples/crypto/test_hmac/test_hmac.c b/samples/crypto/test_hmac/test_hmac.c deleted file mode 100644 index 2a110a2ef..000000000 --- a/samples/crypto/test_hmac/test_hmac.c +++ /dev/null @@ -1,358 +0,0 @@ -/* test_hmac.c - TinyCrypt implementation of some HMAC tests */ - -/* - * Copyright (C) 2015 by Intel Corporation, All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - DESCRIPTION - This module tests the following HMAC routines: - - Scenarios tested include: - - HMAC tests (RFC 4231 test vectors) -*/ - -#include <tinycrypt/hmac.h> -#include <tinycrypt/constants.h> -#include <test_utils.h> - -uint32_t do_hmac_test(TCHmacState_t h, uint32_t testnum, const uint8_t *data, - size_t datalen, const uint8_t *expected, - size_t expectedlen) -{ - uint8_t digest[32]; - uint32_t result = TC_PASS; - - (void)tc_hmac_init(h); - (void)tc_hmac_update(h, data, datalen); - (void)tc_hmac_final(digest, TC_SHA256_DIGEST_SIZE, h); - result = check_result(testnum, expected, expectedlen, - digest, sizeof(digest), 1); - return result; -} - -/* - * NIST test vectors for encryption. - */ -uint32_t test_1(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("HMAC %s:\n", __func__); - - const uint8_t key[20] = { - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b - }; - const uint8_t data[8] = { - 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65 - }; - const uint8_t expected[32] = { - 0xb0, 0x34, 0x4c, 0x61, 0xd8, 0xdb, 0x38, 0x53, 0x5c, 0xa8, 0xaf, 0xce, - 0xaf, 0x0b, 0xf1, 0x2b, 0x88, 0x1d, 0xc2, 0x00, 0xc9, 0x83, 0x3d, 0xa7, - 0x26, 0xe9, 0x37, 0x6c, 0x2e, 0x32, 0xcf, 0xf7 - }; - struct tc_hmac_state_struct h; - - (void)memset(&h, 0x00, sizeof(h)); - (void)tc_hmac_set_key(&h, key, sizeof(key)); - result = do_hmac_test(&h, 1, data, sizeof(data), - expected, sizeof(expected)); - TC_END_RESULT(result); - return result; -} - -uint32_t test_2(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("HMAC %s:\n", __func__); - const uint8_t key[4] = { - 0x4a, 0x65, 0x66, 0x65 - }; - const uint8_t data[28] = { - 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20, 0x79, 0x61, 0x20, 0x77, - 0x61, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68, - 0x69, 0x6e, 0x67, 0x3f - }; - const uint8_t expected[32] = { - 0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e, 0x6a, 0x04, 0x24, 0x26, - 0x08, 0x95, 0x75, 0xc7, 0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83, - 0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43 - }; - struct tc_hmac_state_struct h; - - (void)memset(&h, 0x00, sizeof(h)); - (void)tc_hmac_set_key(&h, key, sizeof(key)); - - result = do_hmac_test(&h, 2, data, sizeof(data), - expected, sizeof(expected)); - TC_END_RESULT(result); - return result; -} - -uint32_t test_3(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("HMAC %s:\n", __func__); - const uint8_t key[20] = { - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa - }; - const uint8_t data[50] = { - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd - }; - const uint8_t expected[32] = { - 0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46, 0x85, 0x4d, 0xb8, 0xeb, - 0xd0, 0x91, 0x81, 0xa7, 0x29, 0x59, 0x09, 0x8b, 0x3e, 0xf8, 0xc1, 0x22, - 0xd9, 0x63, 0x55, 0x14, 0xce, 0xd5, 0x65, 0xfe - }; - struct tc_hmac_state_struct h; - - (void)memset(&h, 0x00, sizeof(h)); - (void)tc_hmac_set_key(&h, key, sizeof(key)); - - result = do_hmac_test(&h, 3, data, sizeof(data), - expected, sizeof(expected)); - TC_END_RESULT(result); - return result; -} - -uint32_t test_4(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("HMAC %s:\n", __func__); - const uint8_t key[25] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, - 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19 - }; - const uint8_t data[50] = { - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, - 0xcd, 0xcd - }; - const uint8_t expected[32] = { - 0x82, 0x55, 0x8a, 0x38, 0x9a, 0x44, 0x3c, 0x0e, 0xa4, 0xcc, 0x81, 0x98, - 0x99, 0xf2, 0x08, 0x3a, 0x85, 0xf0, 0xfa, 0xa3, 0xe5, 0x78, 0xf8, 0x07, - 0x7a, 0x2e, 0x3f, 0xf4, 0x67, 0x29, 0x66, 0x5b - }; - struct tc_hmac_state_struct h; - - (void)memset(&h, 0x00, sizeof(h)); - (void)tc_hmac_set_key(&h, key, sizeof(key)); - - result = do_hmac_test(&h, 4, data, sizeof(data), - expected, sizeof(expected)); - TC_END_RESULT(result); - return result; -} - -uint32_t test_5(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("HMAC %s:\n", __func__); - const uint8_t key[20] = { - 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, - 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c - }; - const uint8_t data[20] = { - 0x54, 0x65, 0x73, 0x74, 0x20, 0x57, 0x69, 0x74, 0x68, 0x20, 0x54, 0x72, - 0x75, 0x6e, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e - }; - const uint8_t expected[32] = { - 0xa3, 0xb6, 0x16, 0x74, 0x73, 0x10, 0x0e, 0xe0, 0x6e, 0x0c, 0x79, 0x6c, - 0x29, 0x55, 0x55, 0x2b, 0xfa, 0x6f, 0x7c, 0x0a, 0x6a, 0x8a, 0xef, 0x8b, - 0x93, 0xf8, 0x60, 0xaa, 0xb0, 0xcd, 0x20, 0xc5 - }; - struct tc_hmac_state_struct h; - - (void)memset(&h, 0x00, sizeof(h)); - (void)tc_hmac_set_key(&h, key, sizeof(key)); - - result = do_hmac_test(&h, 5, data, sizeof(data), - expected, sizeof(expected)); - TC_END_RESULT(result); - return result; -} - -uint32_t test_6(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("HMAC %s:\n", __func__); - const uint8_t key[131] = { - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa - }; - const uint8_t data[54] = { - 0x54, 0x65, 0x73, 0x74, 0x20, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x4c, - 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x54, 0x68, 0x61, 0x6e, 0x20, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x2d, 0x53, 0x69, 0x7a, 0x65, 0x20, 0x4b, 0x65, - 0x79, 0x20, 0x2d, 0x20, 0x48, 0x61, 0x73, 0x68, 0x20, 0x4b, 0x65, 0x79, - 0x20, 0x46, 0x69, 0x72, 0x73, 0x74 - }; - const uint8_t expected[32] = { - 0x60, 0xe4, 0x31, 0x59, 0x1e, 0xe0, 0xb6, 0x7f, 0x0d, 0x8a, 0x26, 0xaa, - 0xcb, 0xf5, 0xb7, 0x7f, 0x8e, 0x0b, 0xc6, 0x21, 0x37, 0x28, 0xc5, 0x14, - 0x05, 0x46, 0x04, 0x0f, 0x0e, 0xe3, 0x7f, 0x54 - }; - struct tc_hmac_state_struct h; - - (void)memset(&h, 0x00, sizeof(h)); - (void)tc_hmac_set_key(&h, key, sizeof(key)); - - result = do_hmac_test(&h, 6, data, sizeof(data), - expected, sizeof(expected)); - TC_END_RESULT(result); - return result; -} - -uint32_t test_7(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("HMAC %s:\n", __func__); - const uint8_t key[131] = { - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa - }; - const uint8_t data[152] = { - 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x65, - 0x73, 0x74, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x6c, - 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x6b, 0x65, - 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x6c, 0x61, 0x72, 0x67, - 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x20, 0x54, 0x68, 0x65, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x6e, 0x65, 0x65, - 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x68, 0x61, 0x73, - 0x68, 0x65, 0x64, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x62, - 0x65, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x62, 0x79, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x48, 0x4d, 0x41, 0x43, 0x20, 0x61, 0x6c, - 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x2e - }; - const uint8_t expected[32] = { - 0x9b, 0x09, 0xff, 0xa7, 0x1b, 0x94, 0x2f, 0xcb, 0x27, 0x63, 0x5f, 0xbc, - 0xd5, 0xb0, 0xe9, 0x44, 0xbf, 0xdc, 0x63, 0x64, 0x4f, 0x07, 0x13, 0x93, - 0x8a, 0x7f, 0x51, 0x53, 0x5c, 0x3a, 0x35, 0xe2 - }; - struct tc_hmac_state_struct h; - - (void)memset(&h, 0x00, sizeof(h)); - (void)tc_hmac_set_key(&h, key, sizeof(key)); - - result = do_hmac_test(&h, 7, data, sizeof(data), - expected, sizeof(expected)); - TC_END_RESULT(result); - return result; -} - -/* - * Main task to test AES - */ -#ifdef CONFIG_MICROKERNEL -void mainloop(void) -#else -void main(void) -#endif -{ - uint32_t result = TC_PASS; - - TC_START("Performing HMAC tests (RFC4231 test vectors):"); - - result = test_1(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("HMAC test #1 failed.\n"); - goto exitTest; - } - result = test_2(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("HMAC test #2 failed.\n"); - goto exitTest; - } - result = test_3(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("HMAC test #3 failed.\n"); - goto exitTest; - } - result = test_4(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("HMAC test #4 failed.\n"); - goto exitTest; - } - result = test_5(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("HMAC test #5 failed.\n"); - goto exitTest; - } - result = test_6(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("HMAC #6 test failed.\n"); - goto exitTest; - } - result = test_7(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("HMAC test #7 failed.\n"); - goto exitTest; - } - - TC_PRINT("All HMAC tests succeeded!\n"); - -exitTest: - TC_END_RESULT(result); - TC_END_REPORT(result); -} diff --git a/samples/crypto/test_prng/Makefile b/samples/crypto/test_prng/Makefile deleted file mode 100644 index a3ddad15b..000000000 --- a/samples/crypto/test_prng/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -I$(srctree)/samples/include -I$(srctree)/lib/crypto/tinycrypt/include -obj-y = test_hmac_prng.o - diff --git a/samples/crypto/test_prng/test_hmac_prng.c b/samples/crypto/test_prng/test_hmac_prng.c deleted file mode 100644 index 795c09243..000000000 --- a/samples/crypto/test_prng/test_hmac_prng.c +++ /dev/null @@ -1,113 +0,0 @@ -/* test_hmac_prng.c - TinyCrypt implementation of some HMAC-PRNG tests */ - -/* - * Copyright (C) 2015 by Intel Corporation, All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - DESCRIPTION - This module tests the following PRNG routines: - - Scenarios tested include: - - HMAC-PRNG init - - HMAC-PRNG reseed - - HMAC-PRNG generate) -*/ - -#include <tinycrypt/hmac_prng.h> -#include <tinycrypt/constants.h> - -#include <stdio.h> -#include <tc_util.h> -#include <drivers/system_timer.h> - -/* - * Main task to test AES - */ - -#ifdef CONFIG_MICROKERNEL -void mainloop(void) -#else -void main(void) -#endif -{ - uint8_t seed[128]; - struct tc_hmac_prng_struct h; - uint32_t size = (1 << 15); - uint8_t random[size]; - uint32_t i; - uint32_t result = TC_PASS; - - TC_START("Performing HMAC-PRNG tests:"); - TC_PRINT("HMAC-PRNG test#1 (init, reseed, generate):\n"); - - /* Fake seed (replace by a a truly random seed): */ - for (i = 0; i < (uint32_t) sizeof(seed); ++i) { - seed[i] = i; - } - - /* Fake personalization and additional_input (replace by appropriate - * values): */ - /* e.g.: hostname+timestamp */ - uint8_t *personalization = (uint8_t *) "HOSTNAME"; - uint8_t *additional_input = (uint8_t *) "additional input"; - - TC_PRINT("HMAC-PRNG test#1 (init):\n"); - if (tc_hmac_prng_init(&h, personalization, - sizeof(personalization)) == 0) { - TC_ERROR("HMAC-PRNG initialization failed.\n"); - result = TC_FAIL; - goto exitTest; - } - TC_END_RESULT(result); - - TC_PRINT("HMAC-PRNG test#1 (reseed):\n"); - if (tc_hmac_prng_reseed(&h, seed, sizeof(seed), additional_input, - sizeof(additional_input)) == 0) { - TC_ERROR("HMAC-PRNG reseed failed.\n"); - result = TC_FAIL; - goto exitTest; - } - - TC_END_RESULT(result); - - TC_PRINT("HMAC-PRNG test#1 (generate):\n"); - if (tc_hmac_prng_generate(random, size, &h) < 1) { - TC_ERROR("HMAC-PRNG generate failed.\n"); - result = TC_FAIL; - goto exitTest; - } - TC_END_RESULT(result); - - TC_PRINT("All HMAC tests succeeded!\n"); - - exitTest: - TC_END_RESULT(result); - TC_END_REPORT(result); -} diff --git a/samples/crypto/test_sha256/Makefile b/samples/crypto/test_sha256/Makefile deleted file mode 100644 index bf765f329..000000000 --- a/samples/crypto/test_sha256/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ccflags-y += -I$(srctree)/samples/include -I$(srctree)/lib/crypto/tinycrypt/include -obj-y = test_sha256.o - diff --git a/samples/crypto/test_sha256/test_sha256.c b/samples/crypto/test_sha256/test_sha256.c deleted file mode 100644 index 271f7ec55..000000000 --- a/samples/crypto/test_sha256/test_sha256.c +++ /dev/null @@ -1,510 +0,0 @@ -/* test_sha256.c - TinyCrypt implementation of some SHA-256 tests */ - -/* - * Copyright (C) 2015 by Intel Corporation, All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - DESCRIPTION - This module tests the following SHA256 routines: - - Scenarios tested include: - - NIST SHA256 test vectors -*/ - -#include <tinycrypt/sha256.h> -#include <tinycrypt/constants.h> -#include <test_utils.h> - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdint.h> - -/* - * NIST SHA256 test vector 1. - */ -uint32_t test_1(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #1:\n"); - const uint8_t expected[32] = { - 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea, 0x41, 0x41, 0x40, 0xde, - 0x5d, 0xae, 0x22, 0x23, 0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c, - 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad - }; - const char *m = "abc"; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, (const uint8_t *) m, strlen(m)); - (void)tc_sha256_final(digest, &s); - result = check_result(1, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -/* - * NIST SHA256 test vector 2. - */ -uint32_t test_2(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #2:\n"); - const uint8_t expected[32] = { - 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8, 0xe5, 0xc0, 0x26, 0x93, - 0x0c, 0x3e, 0x60, 0x39, 0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67, - 0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1 - }; - const char *m = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, (const uint8_t *) m, strlen(m)); - (void) tc_sha256_final(digest, &s); - - result = check_result(2, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_3(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #3:\n"); - const uint8_t expected[32] = { - 0x68, 0x32, 0x57, 0x20, 0xaa, 0xbd, 0x7c, 0x82, 0xf3, 0x0f, 0x55, 0x4b, - 0x31, 0x3d, 0x05, 0x70, 0xc9, 0x5a, 0xcc, 0xbb, 0x7d, 0xc4, 0xb5, 0xaa, - 0xe1, 0x12, 0x04, 0xc0, 0x8f, 0xfe, 0x73, 0x2b - }; - const uint8_t m[1] = { 0xbd }; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, m, sizeof(m)); - (void)tc_sha256_final(digest, &s); - - result = check_result(3, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_4(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #4:\n"); - const uint8_t expected[32] = { - 0x7a, 0xbc, 0x22, 0xc0, 0xae, 0x5a, 0xf2, 0x6c, 0xe9, 0x3d, 0xbb, 0x94, - 0x43, 0x3a, 0x0e, 0x0b, 0x2e, 0x11, 0x9d, 0x01, 0x4f, 0x8e, 0x7f, 0x65, - 0xbd, 0x56, 0xc6, 0x1c, 0xcc, 0xcd, 0x95, 0x04 - }; - const uint8_t m[4] = { 0xc9, 0x8c, 0x8e, 0x55 }; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, m, sizeof(m)); - (void)tc_sha256_final(digest, &s); - - result = check_result(4, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_5(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #5:\n"); - const uint8_t expected[32] = { - 0x02, 0x77, 0x94, 0x66, 0xcd, 0xec, 0x16, 0x38, 0x11, 0xd0, 0x78, 0x81, - 0x5c, 0x63, 0x3f, 0x21, 0x90, 0x14, 0x13, 0x08, 0x14, 0x49, 0x00, 0x2f, - 0x24, 0xaa, 0x3e, 0x80, 0xf0, 0xb8, 0x8e, 0xf7 - }; - uint8_t m[55]; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)memset(m, 0x00, sizeof(m)); - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, m, sizeof(m)); - (void)tc_sha256_final(digest, &s); - - result = check_result(5, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_6(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #6:\n"); - const uint8_t expected[32] = { - 0xd4, 0x81, 0x7a, 0xa5, 0x49, 0x76, 0x28, 0xe7, 0xc7, 0x7e, 0x6b, 0x60, - 0x61, 0x07, 0x04, 0x2b, 0xbb, 0xa3, 0x13, 0x08, 0x88, 0xc5, 0xf4, 0x7a, - 0x37, 0x5e, 0x61, 0x79, 0xbe, 0x78, 0x9f, 0xbb - }; - uint8_t m[56]; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)memset(m, 0x00, sizeof(m)); - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, m, sizeof(m)); - (void)tc_sha256_final(digest, &s); - - result = check_result(6, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_7(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #7:\n"); - const uint8_t expected[32] = { - 0x65, 0xa1, 0x6c, 0xb7, 0x86, 0x13, 0x35, 0xd5, 0xac, 0xe3, 0xc6, 0x07, - 0x18, 0xb5, 0x05, 0x2e, 0x44, 0x66, 0x07, 0x26, 0xda, 0x4c, 0xd1, 0x3b, - 0xb7, 0x45, 0x38, 0x1b, 0x23, 0x5a, 0x17, 0x85 - }; - uint8_t m[57]; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)memset(m, 0x00, sizeof(m)); - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, m, sizeof(m)); - (void)tc_sha256_final(digest, &s); - - result = check_result(7, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_8(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #8:\n"); - const uint8_t expected[32] = { - 0xf5, 0xa5, 0xfd, 0x42, 0xd1, 0x6a, 0x20, 0x30, 0x27, 0x98, 0xef, 0x6e, - 0xd3, 0x09, 0x97, 0x9b, 0x43, 0x00, 0x3d, 0x23, 0x20, 0xd9, 0xf0, 0xe8, - 0xea, 0x98, 0x31, 0xa9, 0x27, 0x59, 0xfb, 0x4b - }; - uint8_t m[64]; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)memset(m, 0x00, sizeof(m)); - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, m, sizeof(m)); - (void)tc_sha256_final(digest, &s); - - result = check_result(8, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_9(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #9:\n"); - const uint8_t expected[32] = { - 0x54, 0x1b, 0x3e, 0x9d, 0xaa, 0x09, 0xb2, 0x0b, 0xf8, 0x5f, 0xa2, 0x73, - 0xe5, 0xcb, 0xd3, 0xe8, 0x01, 0x85, 0xaa, 0x4e, 0xc2, 0x98, 0xe7, 0x65, - 0xdb, 0x87, 0x74, 0x2b, 0x70, 0x13, 0x8a, 0x53 - }; - uint8_t m[1000]; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)memset(m, 0x00, sizeof(m)); - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, m, sizeof(m)); - (void)tc_sha256_final(digest, &s); - - result = check_result(9, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_10(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #10:\n"); - const uint8_t expected[32] = { - 0xc2, 0xe6, 0x86, 0x82, 0x34, 0x89, 0xce, 0xd2, 0x01, 0x7f, 0x60, 0x59, - 0xb8, 0xb2, 0x39, 0x31, 0x8b, 0x63, 0x64, 0xf6, 0xdc, 0xd8, 0x35, 0xd0, - 0xa5, 0x19, 0x10, 0x5a, 0x1e, 0xad, 0xd6, 0xe4 - }; - uint8_t m[1000]; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)memset(m, 0x41, sizeof(m)); - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, m, sizeof(m)); - (void)tc_sha256_final(digest, &s); - - result = check_result(10, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_11(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #11:\n"); - const uint8_t expected[32] = { - 0xf4, 0xd6, 0x2d, 0xde, 0xc0, 0xf3, 0xdd, 0x90, 0xea, 0x13, 0x80, 0xfa, - 0x16, 0xa5, 0xff, 0x8d, 0xc4, 0xc5, 0x4b, 0x21, 0x74, 0x06, 0x50, 0xf2, - 0x4a, 0xfc, 0x41, 0x20, 0x90, 0x35, 0x52, 0xb0 - }; - uint8_t m[1005]; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - - (void)memset(m, 0x55, sizeof(m)); - - (void)tc_sha256_init(&s); - tc_sha256_update(&s, m, sizeof(m)); - (void)tc_sha256_final(digest, &s); - - result = check_result(11, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_12(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #12:\n"); - const uint8_t expected[32] = { - 0xd2, 0x97, 0x51, 0xf2, 0x64, 0x9b, 0x32, 0xff, 0x57, 0x2b, 0x5e, 0x0a, - 0x9f, 0x54, 0x1e, 0xa6, 0x60, 0xa5, 0x0f, 0x94, 0xff, 0x0b, 0xee, 0xdf, - 0xb0, 0xb6, 0x92, 0xb9, 0x24, 0xcc, 0x80, 0x25 - }; - uint8_t m[1000]; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - uint32_t i; - - (void)memset(m, 0x00, sizeof(m)); - - (void)tc_sha256_init(&s); - for (i = 0; i < 1000; ++i) { - tc_sha256_update(&s, m, sizeof(m)); - } - (void)tc_sha256_final(digest, &s); - - result = check_result(12, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_13(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #13:\n"); - const uint8_t expected[32] = { - 0x15, 0xa1, 0x86, 0x8c, 0x12, 0xcc, 0x53, 0x95, 0x1e, 0x18, 0x23, 0x44, - 0x27, 0x74, 0x47, 0xcd, 0x09, 0x79, 0x53, 0x6b, 0xad, 0xcc, 0x51, 0x2a, - 0xd2, 0x4c, 0x67, 0xe9, 0xb2, 0xd4, 0xf3, 0xdd - }; - uint8_t m[32768]; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - uint32_t i; - - (void)memset(m, 0x5a, sizeof(m)); - - (void)tc_sha256_init(&s); - for (i = 0; i < 16384; ++i) { - tc_sha256_update(&s, m, sizeof(m)); - } - (void)tc_sha256_final(digest, &s); - - result = check_result(13, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -uint32_t test_14(void) -{ - uint32_t result = TC_PASS; - - TC_PRINT("SHA256 test #14:\n"); - const uint8_t expected[32] = { - 0x46, 0x1c, 0x19, 0xa9, 0x3b, 0xd4, 0x34, 0x4f, 0x92, 0x15, 0xf5, 0xec, - 0x64, 0x35, 0x70, 0x90, 0x34, 0x2b, 0xc6, 0x6b, 0x15, 0xa1, 0x48, 0x31, - 0x7d, 0x27, 0x6e, 0x31, 0xcb, 0xc2, 0x0b, 0x53 - }; - uint8_t m[32768]; - uint8_t digest[32]; - struct tc_sha256_state_struct s; - uint32_t i; - - (void)memset(m, 0x00, sizeof(m)); - - (void) tc_sha256_init(&s); - for (i = 0; i < 33280; ++i) { - tc_sha256_update(&s, m, sizeof(m)); - } - (void) tc_sha256_final(digest, &s); - - result = check_result(14, expected, sizeof(expected), - digest, sizeof(digest), 1); - TC_END_RESULT(result); - return result; -} - -/* - * Main task to test AES - */ - -#ifdef CONFIG_MICROKERNEL -void mainloop(void) -#else -void main(void) -#endif -{ - uint32_t result = TC_PASS; - - TC_START("Performing SHA256 tests (NIST tests vectors):"); - - result = test_1(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #1 failed.\n"); - goto exitTest; - } - result = test_2(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #2 failed.\n"); - goto exitTest; - } - result = test_3(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #3 failed.\n"); - goto exitTest; - } - result = test_4(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #4 failed.\n"); - goto exitTest; - } - result = test_5(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #5 failed.\n"); - goto exitTest; - } - result = test_6(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #6 failed.\n"); - goto exitTest; - } - result = test_7(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #7 failed.\n"); - goto exitTest; - } - result = test_8(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #8 failed.\n"); - goto exitTest; - } - result = test_9(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #9 failed.\n"); - goto exitTest; - } - result = test_10(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #10 failed.\n"); - goto exitTest; - } - result = test_11(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #11 failed.\n"); - goto exitTest; - } - result = test_12(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #12 failed.\n"); - goto exitTest; - } - result = test_13(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #13 failed.\n"); - goto exitTest; - } - result = test_14(); - if (result == TC_FAIL) { /* terminate test */ - TC_ERROR("SHA256 test #14 failed.\n"); - goto exitTest; - } - - TC_PRINT("All SHA256 tests succeeded!\n"); - -exitTest: - TC_END_RESULT(result); - TC_END_REPORT(result); -} diff --git a/samples/microkernel/test/test_aes/Makefile b/samples/microkernel/test/test_aes/Makefile deleted file mode 100644 index 24f8e3f68..000000000 --- a/samples/microkernel/test/test_aes/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -BOARD ?= qemu_x86 -MDEF_FILE = prj.mdef -KERNEL_TYPE = micro -CONF_FILE = prj_$(ARCH).conf -SOURCE_DIR = $(ZEPHYR_BASE)/samples/crypto/test_aes/ - -include $(ZEPHYR_BASE)/Makefile.inc diff --git a/samples/microkernel/test/test_aes/README.txt b/samples/microkernel/test/test_aes/README.txt deleted file mode 100644 index 2b9660ca4..000000000 --- a/samples/microkernel/test/test_aes/README.txt +++ /dev/null @@ -1,48 +0,0 @@ -Title: test_aes - -Description: - -This test verifies that the TinyCrypt AES APIs operate as expected. - --------------------------------------------------------------------------------- -Building and Running Project: - -This microkernel project outputs to the console. It can be built and executed -on QEMU as follows: - - make qemu - --------------------------------------------------------------------------------- - -Troubleshooting: - -Problems caused by out-dated project information can be addressed by -issuing one of the following commands then rebuilding the project: - - make clean # discard results of previous builds - # but keep existing configuration info -or - make pristine # discard results of previous builds - # and restore pre-defined configuration info - --------------------------------------------------------------------------------- - -Sample Output: -tc_start() - Performing AES128 tests: -AES128 test_1 (NIST key schedule test): -=================================================================== -PASS - test_1. -AES128 test_2 (NIST encryption test): -=================================================================== -PASS - test_2. -AES128 test_3 (NIST fixed-key and variable-text): -=================================================================== -PASS - test_3. -AES128 test #4 (NIST variable-key and fixed-text): -=================================================================== -PASS - test_4. -All AES128 tests succeeded! -=================================================================== -PASS - RegressionTask. -=================================================================== -PROJECT EXECUTION SUCCESSFUL diff --git a/samples/microkernel/test/test_aes/prj.mdef b/samples/microkernel/test/test_aes/prj.mdef deleted file mode 100644 index d657d1888..000000000 --- a/samples/microkernel/test/test_aes/prj.mdef +++ /dev/null @@ -1,5 +0,0 @@ -% Application : test AES128 TinyCrypt APIs - -% TASK NAME PRIO ENTRY STACK GROUPS -% ==================================================== - TASK tStartTask 7 mainloop 5120 [EXE] diff --git a/samples/microkernel/test/test_aes/prj_arm.conf b/samples/microkernel/test/test_aes/prj_arm.conf deleted file mode 100644 index cd711875c..000000000 --- a/samples/microkernel/test/test_aes/prj_arm.conf +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y diff --git a/samples/microkernel/test/test_aes/prj_x86.conf b/samples/microkernel/test/test_aes/prj_x86.conf deleted file mode 100644 index cd711875c..000000000 --- a/samples/microkernel/test/test_aes/prj_x86.conf +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y diff --git a/samples/microkernel/test/test_aes/testcase.ini b/samples/microkernel/test/test_aes/testcase.ini deleted file mode 100644 index cd45d51eb..000000000 --- a/samples/microkernel/test/test_aes/testcase.ini +++ /dev/null @@ -1,3 +0,0 @@ -[test] -tags = crypto aes -build_only = false diff --git a/samples/microkernel/test/test_cbc/Makefile b/samples/microkernel/test/test_cbc/Makefile deleted file mode 100644 index 0f33d52cf..000000000 --- a/samples/microkernel/test/test_cbc/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -BOARD ?= qemu_x86 -MDEF_FILE = prj.mdef -KERNEL_TYPE = micro -CONF_FILE = prj_$(ARCH).conf -SOURCE_DIR = $(ZEPHYR_BASE)/samples/crypto/test_cbc/ - -include $(ZEPHYR_BASE)/Makefile.inc diff --git a/samples/microkernel/test/test_cbc/README.txt b/samples/microkernel/test/test_cbc/README.txt deleted file mode 100644 index 9a9702331..000000000 --- a/samples/microkernel/test/test_cbc/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -Title: test_cbc - -Description: - -This test verifies that the TinyCrypt AES-CBC Mode APIs operate as expected. - --------------------------------------------------------------------------------- -Building and Running Project: - -This microkernel project outputs to the console. It can be built and executed -on QEMU as follows: - - make qemu - --------------------------------------------------------------------------------- - -Troubleshooting: - -Problems caused by out-dated project information can be addressed by -issuing one of the following commands then rebuilding the project: - - make clean # discard results of previous builds - # but keep existing configuration info -or - make pristine # discard results of previous builds - # and restore pre-defined configuration info - --------------------------------------------------------------------------------- - -Sample Output: -tc_start() - Performing AES128 tests: -Performing CBC tests: -CBC test #1 (encryption SP 800-38a tests): -=================================================================== -PASS - test_1_and_2. -CBC test #2 (decryption SP 800-38a tests): -=================================================================== -PASS - test_1_and_2. -All CBC tests succeeded! -=================================================================== -PASS - mainloop. -=================================================================== -PROJECT EXECUTION SUCCESSFUL diff --git a/samples/microkernel/test/test_cbc/prj.mdef b/samples/microkernel/test/test_cbc/prj.mdef deleted file mode 100644 index c99932bb3..000000000 --- a/samples/microkernel/test/test_cbc/prj.mdef +++ /dev/null @@ -1,5 +0,0 @@ -% Application : test AES128-CBCMode TinyCrypt APIs - -% TASK NAME PRIO ENTRY STACK GROUPS -% ==================================================== - TASK tStartTask 5 mainloop 1024 [EXE] diff --git a/samples/microkernel/test/test_cbc/prj_arm.conf b/samples/microkernel/test/test_cbc/prj_arm.conf deleted file mode 100644 index 256d435bc..000000000 --- a/samples/microkernel/test/test_cbc/prj_arm.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y -CONFIG_TINYCRYPT_AES_CBC=y diff --git a/samples/microkernel/test/test_cbc/prj_x86.conf b/samples/microkernel/test/test_cbc/prj_x86.conf deleted file mode 100644 index 256d435bc..000000000 --- a/samples/microkernel/test/test_cbc/prj_x86.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y -CONFIG_TINYCRYPT_AES_CBC=y diff --git a/samples/microkernel/test/test_cbc/testcase.ini b/samples/microkernel/test/test_cbc/testcase.ini deleted file mode 100644 index 8902ef650..000000000 --- a/samples/microkernel/test/test_cbc/testcase.ini +++ /dev/null @@ -1,4 +0,0 @@ -[test] -tags = crypto aes cbc -build_only = false -arch_whitelist = x86 arm diff --git a/samples/microkernel/test/test_ccm_mode/Makefile b/samples/microkernel/test/test_ccm_mode/Makefile deleted file mode 100644 index 7c571e794..000000000 --- a/samples/microkernel/test/test_ccm_mode/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -BOARD ?= qemu_x86 -MDEF_FILE = prj.mdef -KERNEL_TYPE = micro -CONF_FILE = prj_$(ARCH).conf -SOURCE_DIR = $(ZEPHYR_BASE)/samples/crypto/test_ccm_mode/ - -include $(ZEPHYR_BASE)/Makefile.inc diff --git a/samples/microkernel/test/test_ccm_mode/README.txt b/samples/microkernel/test/test_ccm_mode/README.txt deleted file mode 100644 index b8afa4470..000000000 --- a/samples/microkernel/test/test_ccm_mode/README.txt +++ /dev/null @@ -1,60 +0,0 @@ -Title: test_aes_ccm - -Description: - -This test verifies that the TinyCrypt AES APIs operate as expected. - --------------------------------------------------------------------------------- -Building and Running Project: - -This microkernel project outputs to the console. It can be built and executed -on QEMU as follows: - - make qemu - --------------------------------------------------------------------------------- - -Troubleshooting: - -Problems caused by out-dated project information can be addressed by -issuing one of the following commands then rebuilding the project: - - make clean # discard results of previous builds - # but keep existing configuration info -or - make pristine # discard results of previous builds - # and restore pre-defined configuration info - --------------------------------------------------------------------------------- - -Sample Output: -tc_start() - Performing CCM tests: -Performing CCM test #1 (RFC 3610 test vector #1): -=================================================================== -PASS - do_test. -Performing CCM test #2 (RFC 3610 test vector #2): -=================================================================== -PASS - do_test. -Performing CCM test #3 (RFC 3610 test vector #3): -=================================================================== -PASS - do_test. -Performing CCM test #4 (RFC 3610 test vector #7): -=================================================================== -PASS - do_test. -Performing CCM test #5 (RFC 3610 test vector #8): -=================================================================== -PASS - do_test. -Performing CCM test #6 (RFC 3610 test vector #9): -=================================================================== -PASS - do_test. -Performing CCM test #7 (no associated data): -=================================================================== -PASS - test_vector_7. -Performing CCM test #8 (no payload data): -=================================================================== -PASS - test_vector_8. -All CCM tests succeeded! -=================================================================== -PASS - mainloop. -=================================================================== -PROJECT EXECUTION SUCCESSFUL diff --git a/samples/microkernel/test/test_ccm_mode/prj.mdef b/samples/microkernel/test/test_ccm_mode/prj.mdef deleted file mode 100644 index 3ca375d09..000000000 --- a/samples/microkernel/test/test_ccm_mode/prj.mdef +++ /dev/null @@ -1,5 +0,0 @@ -% Application : test AES128-CCM mode TinyCrypt APIs - -% TASK NAME PRIO ENTRY STACK GROUPS -% ==================================================== - TASK tStartTask 5 mainloop 1024 [EXE] diff --git a/samples/microkernel/test/test_ccm_mode/prj_arm.conf b/samples/microkernel/test/test_ccm_mode/prj_arm.conf deleted file mode 100644 index 6ba75de51..000000000 --- a/samples/microkernel/test/test_ccm_mode/prj_arm.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y -CONFIG_TINYCRYPT_AES_CCM=y diff --git a/samples/microkernel/test/test_ccm_mode/prj_x86.conf b/samples/microkernel/test/test_ccm_mode/prj_x86.conf deleted file mode 100644 index 6ba75de51..000000000 --- a/samples/microkernel/test/test_ccm_mode/prj_x86.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y -CONFIG_TINYCRYPT_AES_CCM=y diff --git a/samples/microkernel/test/test_ccm_mode/testcase.ini b/samples/microkernel/test/test_ccm_mode/testcase.ini deleted file mode 100644 index 5a0a01543..000000000 --- a/samples/microkernel/test/test_ccm_mode/testcase.ini +++ /dev/null @@ -1,4 +0,0 @@ -[test] -tags = crypto aes ccm -build_only = false -arch_whitelist = x86 arm diff --git a/samples/microkernel/test/test_cmac_mode/Makefile b/samples/microkernel/test/test_cmac_mode/Makefile deleted file mode 100644 index a0f6ef94e..000000000 --- a/samples/microkernel/test/test_cmac_mode/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -BOARD ?= qemu_x86 -MDEF_FILE = prj.mdef -KERNEL_TYPE = micro -CONF_FILE = prj_$(ARCH).conf -SOURCE_DIR = $(ZEPHYR_BASE)/samples/crypto/test_cmac_mode/ - -include $(ZEPHYR_BASE)/Makefile.inc diff --git a/samples/microkernel/test/test_cmac_mode/README.txt b/samples/microkernel/test/test_cmac_mode/README.txt deleted file mode 100644 index a046c588c..000000000 --- a/samples/microkernel/test/test_cmac_mode/README.txt +++ /dev/null @@ -1,51 +0,0 @@ -Title: test_aes_cmac - -Description: - -This test verifies that the TinyCrypt AES APIs operate as expected. - --------------------------------------------------------------------------------- -Building and Running Project: - -This microkernel project outputs to the console. It can be built and executed -on QEMU as follows: - - make qemu - --------------------------------------------------------------------------------- - -Troubleshooting: - -Problems caused by out-dated project information can be addressed by -issuing one of the following commands then rebuilding the project: - - make clean # discard results of previous builds - # but keep existing configuration info -or - make pristine # discard results of previous builds - # and restore pre-defined configuration info - --------------------------------------------------------------------------------- - -Sample Output: -tc_start() - Performing CMAC tests: -Performing CMAC test #1 (GF(2^128) double): -=================================================================== -PASS - verify_gf_2_128_double. -Performing CMAC test #2 (SP 800-38B test vector #1): -=================================================================== -PASS - verify_cmac_null_msg. -Performing CMAC test #3 (SP 800-38B test vector #2): -=================================================================== -PASS - verify_cmac_1_block_msg. -Performing CMAC test #4 (SP 800-38B test vector #3): -=================================================================== -PASS - verify_cmac_320_bit_msg. -Performing CMAC test #5 (SP 800-38B test vector #4) -=================================================================== -PASS - verify_cmac_512_bit_msg. -All CMAC tests succeeded! -=================================================================== -PASS - mainloop. -=================================================================== -PROJECT EXECUTION SUCCESSFUL diff --git a/samples/microkernel/test/test_cmac_mode/prj.mdef b/samples/microkernel/test/test_cmac_mode/prj.mdef deleted file mode 100644 index 1d5653ca6..000000000 --- a/samples/microkernel/test/test_cmac_mode/prj.mdef +++ /dev/null @@ -1,5 +0,0 @@ -% Application : test AES-CMAC mode TinyCrypt APIs - -% TASK NAME PRIO ENTRY STACK GROUPS -% ==================================================== - TASK tStartTask 5 mainloop 1024 [EXE] diff --git a/samples/microkernel/test/test_cmac_mode/prj_arm.conf b/samples/microkernel/test/test_cmac_mode/prj_arm.conf deleted file mode 100644 index 63f018c6f..000000000 --- a/samples/microkernel/test/test_cmac_mode/prj_arm.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y -CONFIG_TINYCRYPT_AES_CMAC=y diff --git a/samples/microkernel/test/test_cmac_mode/prj_x86.conf b/samples/microkernel/test/test_cmac_mode/prj_x86.conf deleted file mode 100644 index 63f018c6f..000000000 --- a/samples/microkernel/test/test_cmac_mode/prj_x86.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y -CONFIG_TINYCRYPT_AES_CMAC=y diff --git a/samples/microkernel/test/test_cmac_mode/testcase.ini b/samples/microkernel/test/test_cmac_mode/testcase.ini deleted file mode 100644 index cf0370146..000000000 --- a/samples/microkernel/test/test_cmac_mode/testcase.ini +++ /dev/null @@ -1,4 +0,0 @@ -[test] -tags = crypto aes cmac -build_only = false -arch_whitelist = x86 arm diff --git a/samples/microkernel/test/test_ctr/Makefile b/samples/microkernel/test/test_ctr/Makefile deleted file mode 100644 index 1bae3f5fb..000000000 --- a/samples/microkernel/test/test_ctr/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -BOARD ?= qemu_x86 -MDEF_FILE = prj.mdef -KERNEL_TYPE = micro -CONF_FILE = prj_$(ARCH).conf -SOURCE_DIR = $(ZEPHYR_BASE)/samples/crypto/test_ctr/ - -include $(ZEPHYR_BASE)/Makefile.inc diff --git a/samples/microkernel/test/test_ctr/README.txt b/samples/microkernel/test/test_ctr/README.txt deleted file mode 100644 index bf18dc9ef..000000000 --- a/samples/microkernel/test/test_ctr/README.txt +++ /dev/null @@ -1,43 +0,0 @@ -Title: test_aes - -Description: - -This test verifies that the TinyCrypt AES APIs operate as expected. - --------------------------------------------------------------------------------- -Building and Running Project: - -This microkernel project outputs to the console. It can be built and executed -on QEMU as follows: - - make qemu - --------------------------------------------------------------------------------- - -Troubleshooting: - -Problems caused by out-dated project information can be addressed by -issuing one of the following commands then rebuilding the project: - - make clean # discard results of previous builds - # but keep existing configuration info -or - make pristine # discard results of previous builds - # and restore pre-defined configuration info - --------------------------------------------------------------------------------- - -Sample Output: -tc_start() - Performing AES128-CTR mode tests: -Performing CTR tests: -CTR test #1 (encryption SP 800-38a tests): -=================================================================== -PASS - test_1_and_2. -CTR test #2 (decryption SP 800-38a tests): -=================================================================== -PASS - test_1_and_2. -All CTR tests succeeded! -=================================================================== -PASS - mainloop. -=================================================================== -PROJECT EXECUTION SUCCESSFUL diff --git a/samples/microkernel/test/test_ctr/prj.mdef b/samples/microkernel/test/test_ctr/prj.mdef deleted file mode 100644 index 46959cc82..000000000 --- a/samples/microkernel/test/test_ctr/prj.mdef +++ /dev/null @@ -1,5 +0,0 @@ -% Application : test AES128-CTR mode TinyCrypt APIs - -% TASK NAME PRIO ENTRY STACK GROUPS -% ==================================================== - TASK tStartTask 5 mainloop 1024 [EXE] diff --git a/samples/microkernel/test/test_ctr/prj_arm.conf b/samples/microkernel/test/test_ctr/prj_arm.conf deleted file mode 100644 index 31d80e2a2..000000000 --- a/samples/microkernel/test/test_ctr/prj_arm.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y -CONFIG_TINYCRYPT_AES_CTR=y diff --git a/samples/microkernel/test/test_ctr/prj_x86.conf b/samples/microkernel/test/test_ctr/prj_x86.conf deleted file mode 100644 index 31d80e2a2..000000000 --- a/samples/microkernel/test/test_ctr/prj_x86.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y -CONFIG_TINYCRYPT_AES_CTR=y diff --git a/samples/microkernel/test/test_ctr/testcase.ini b/samples/microkernel/test/test_ctr/testcase.ini deleted file mode 100644 index 33e319ef8..000000000 --- a/samples/microkernel/test/test_ctr/testcase.ini +++ /dev/null @@ -1,4 +0,0 @@ -[test] -tags = crypto aes ctr -build_only = false -arch_whitelist = x86 arm diff --git a/samples/microkernel/test/test_hmac/Makefile b/samples/microkernel/test/test_hmac/Makefile deleted file mode 100644 index dd5069ea3..000000000 --- a/samples/microkernel/test/test_hmac/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -BOARD ?= qemu_x86 -MDEF_FILE = prj.mdef -KERNEL_TYPE = micro -CONF_FILE = prj_$(ARCH).conf -SOURCE_DIR = $(ZEPHYR_BASE)/samples/crypto/test_hmac/ - -include $(ZEPHYR_BASE)/Makefile.inc diff --git a/samples/microkernel/test/test_hmac/README.txt b/samples/microkernel/test/test_hmac/README.txt deleted file mode 100644 index 3c19225e5..000000000 --- a/samples/microkernel/test/test_hmac/README.txt +++ /dev/null @@ -1,57 +0,0 @@ -Title: test_hmac - -Description: - -This test verifies that the TinyCrypt HMAC APIs operate as expected. - --------------------------------------------------------------------------------- -Building and Running Project: - -This microkernel project outputs to the console. It can be built and executed -on QEMU as follows: - - make qemu - --------------------------------------------------------------------------------- - -Troubleshooting: - -Problems caused by out-dated project information can be addressed by -issuing one of the following commands then rebuilding the project: - - make clean # discard results of previous builds - # but keep existing configuration info -or - make pristine # discard results of previous builds - # and restore pre-defined configuration info - --------------------------------------------------------------------------------- - -Sample Output: -tc_start() - Performing HMAC tests (RFC4231 test vectors): -HMAC test_1: -=================================================================== -PASS - test_1. -HMAC test_2: -=================================================================== -PASS - test_2. -HMAC test_3: -=================================================================== -PASS - test_3. -HMAC test_4: -=================================================================== -PASS - test_4. -HMAC test_5: -=================================================================== -PASS - test_5. -HMAC test_6: -=================================================================== -PASS - test_6. -HMAC test_7: -=================================================================== -PASS - test_7. -All HMAC tests succeeded! -=================================================================== -PASS - mainloop. -=================================================================== -PROJECT EXECUTION SUCCESSFUL diff --git a/samples/microkernel/test/test_hmac/pjr_arm.conf b/samples/microkernel/test/test_hmac/pjr_arm.conf deleted file mode 100644 index 6d38ab41e..000000000 --- a/samples/microkernel/test/test_hmac/pjr_arm.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_SHA256=y -CONFIG_TINYCRYPT_HMAC_SHA256=y diff --git a/samples/microkernel/test/test_hmac/prj.mdef b/samples/microkernel/test/test_hmac/prj.mdef deleted file mode 100644 index d829c2b36..000000000 --- a/samples/microkernel/test/test_hmac/prj.mdef +++ /dev/null @@ -1,5 +0,0 @@ -% Application : test HMAC TinyCrypt APIs - -% TASK NAME PRIO ENTRY STACK GROUPS -% ==================================================== - TASK tStartTask 5 mainloop 10240 [EXE] diff --git a/samples/microkernel/test/test_hmac/prj_arm.conf b/samples/microkernel/test/test_hmac/prj_arm.conf deleted file mode 100644 index 30e85e3dc..000000000 --- a/samples/microkernel/test/test_hmac/prj_arm.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_SHA256=y -CONFIG_TINYCRYPT_SHA256_HMAC=y diff --git a/samples/microkernel/test/test_hmac/prj_x86.conf b/samples/microkernel/test/test_hmac/prj_x86.conf deleted file mode 100644 index 30e85e3dc..000000000 --- a/samples/microkernel/test/test_hmac/prj_x86.conf +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_SHA256=y -CONFIG_TINYCRYPT_SHA256_HMAC=y diff --git a/samples/microkernel/test/test_hmac/testcase.ini b/samples/microkernel/test/test_hmac/testcase.ini deleted file mode 100644 index 3bd578aae..000000000 --- a/samples/microkernel/test/test_hmac/testcase.ini +++ /dev/null @@ -1,4 +0,0 @@ -[test] -tags = crypto sha256 hmac -build_only = false -arch_whitelist = x86 arm diff --git a/samples/microkernel/test/test_prng/Makefile b/samples/microkernel/test/test_prng/Makefile deleted file mode 100644 index 09cb6cdbc..000000000 --- a/samples/microkernel/test/test_prng/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -BOARD ?= qemu_x86 -MDEF_FILE = prj.mdef -KERNEL_TYPE = micro -CONF_FILE = prj_$(ARCH).conf -SOURCE_DIR = $(ZEPHYR_BASE)/samples/crypto/test_prng/ - -include $(ZEPHYR_BASE)/Makefile.inc diff --git a/samples/microkernel/test/test_prng/README.txt b/samples/microkernel/test/test_prng/README.txt deleted file mode 100644 index 7a52c64c5..000000000 --- a/samples/microkernel/test/test_prng/README.txt +++ /dev/null @@ -1,46 +0,0 @@ -Title: test_prng - -Description: - -This test verifies that the TinyCrypt PRNG APIs operate as expected. - --------------------------------------------------------------------------------- -Building and Running Project: - -This microkernel project outputs to the console. It can be built and executed -on QEMU as follows: - - make qemu - --------------------------------------------------------------------------------- - -Troubleshooting: - -Problems caused by out-dated project information can be addressed by -issuing one of the following commands then rebuilding the project: - - make clean # discard results of previous builds - # but keep existing configuration info -or - make pristine # discard results of previous builds - # and restore pre-defined configuration info - --------------------------------------------------------------------------------- - -Sample Output: -tc_start() - Performing HMAC-PRNG tests: -HMAC-PRNG test#1 (init, reseed, generate): -HMAC-PRNG test#1 (init): -=================================================================== -PASS - mainloop. -HMAC-PRNG test#1 (reseed): -=================================================================== -PASS - mainloop. -HMAC-PRNG test#1 (generate): -=================================================================== -PASS - mainloop. -All HMAC tests succeeded! -=================================================================== -PASS - mainloop. -=================================================================== -PROJECT EXECUTION SUCCESSFUL diff --git a/samples/microkernel/test/test_prng/prj.mdef b/samples/microkernel/test/test_prng/prj.mdef deleted file mode 100644 index 003b5ccb5..000000000 --- a/samples/microkernel/test/test_prng/prj.mdef +++ /dev/null @@ -1,5 +0,0 @@ -% Application : test PRNG TinyCrypt APIs - -% TASK NAME PRIO ENTRY STACK GROUPS -% ==================================================== - TASK tStartTask 5 mainloop 51200 [EXE] diff --git a/samples/microkernel/test/test_prng/prj_arm.conf b/samples/microkernel/test/test_prng/prj_arm.conf deleted file mode 100644 index c5cd3b81a..000000000 --- a/samples/microkernel/test/test_prng/prj_arm.conf +++ /dev/null @@ -1,5 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_SHA256=y -CONFIG_TINYCRYPT_SHA256_HMAC=y -CONFIG_TINYCRYPT_SHA256_HMAC_PRNG=y diff --git a/samples/microkernel/test/test_prng/prj_x86.conf b/samples/microkernel/test/test_prng/prj_x86.conf deleted file mode 100644 index c5cd3b81a..000000000 --- a/samples/microkernel/test/test_prng/prj_x86.conf +++ /dev/null @@ -1,5 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_SHA256=y -CONFIG_TINYCRYPT_SHA256_HMAC=y -CONFIG_TINYCRYPT_SHA256_HMAC_PRNG=y diff --git a/samples/microkernel/test/test_prng/testcase.ini b/samples/microkernel/test/test_prng/testcase.ini deleted file mode 100644 index 95c86179a..000000000 --- a/samples/microkernel/test/test_prng/testcase.ini +++ /dev/null @@ -1,5 +0,0 @@ -[test] -tags = crypto sha256 hmac prng -build_only = false -arch_whitelist = x86 arm -config_whitelist = !CONFIG_SOC_QUARK_SE diff --git a/samples/microkernel/test/test_sha256/Makefile b/samples/microkernel/test/test_sha256/Makefile deleted file mode 100644 index c5ad2b6ed..000000000 --- a/samples/microkernel/test/test_sha256/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -BOARD ?= qemu_x86 -MDEF_FILE = prj.mdef -KERNEL_TYPE = micro -CONF_FILE = prj_$(ARCH).conf -SOURCE_DIR = $(ZEPHYR_BASE)/samples/crypto/test_sha256/ - -include $(ZEPHYR_BASE)/Makefile.inc diff --git a/samples/microkernel/test/test_sha256/README.txt b/samples/microkernel/test/test_sha256/README.txt deleted file mode 100644 index be11b4210..000000000 --- a/samples/microkernel/test/test_sha256/README.txt +++ /dev/null @@ -1,79 +0,0 @@ -Title: test_sha256 - -Description: - -This test verifies that the TinyCrypt SHA256 APIs operate as expected. - --------------------------------------------------------------------------------- -Building and Running Project: - -This microkernel project outputs to the console. It can be built and executed -on QEMU as follows: - - make qemu - --------------------------------------------------------------------------------- - -Troubleshooting: - -Problems caused by out-dated project information can be addressed by -issuing one of the following commands then rebuilding the project: - - make clean # discard results of previous builds - # but keep existing configuration info -or - make pristine # discard results of previous builds - # and restore pre-defined configuration info - --------------------------------------------------------------------------------- - -Sample Output: -tc_start() - Performing SHA256 tests (NIST tests vectors): -SHA256 test #1: -=================================================================== -PASS - test_1. -SHA256 test #2: -=================================================================== -PASS - test_2. -SHA256 test #3: -=================================================================== -PASS - test_3. -SHA256 test #4: -=================================================================== -PASS - test_4. -SHA256 test #5: -=================================================================== -PASS - test_5. -SHA256 test #6: -=================================================================== -PASS - test_6. -SHA256 test #7: -=================================================================== -PASS - test_7. -SHA256 test #8: -=================================================================== -PASS - test_8. -SHA256 test #9: -=================================================================== -PASS - test_9. -SHA256 test #10: -=================================================================== -PASS - test_10. -SHA256 test #11: -=================================================================== -PASS - test_11. -SHA256 test #12: -=================================================================== -PASS - test_12. -SHA256 test #13: -=================================================================== -PASS - test_13. -SHA256 test #14: -=================================================================== -PASS - test_14. -All SHA256 tests succeeded! -=================================================================== -PASS - mainloop. -=================================================================== -PROJECT EXECUTION SUCCESSFUL - diff --git a/samples/microkernel/test/test_sha256/prj.mdef b/samples/microkernel/test/test_sha256/prj.mdef deleted file mode 100644 index cd0e5812d..000000000 --- a/samples/microkernel/test/test_sha256/prj.mdef +++ /dev/null @@ -1,5 +0,0 @@ -% Application : test SHA256 TinyCrypt APIs - -% TASK NAME PRIO ENTRY STACK GROUPS -% ==================================================== - TASK tStartTask 5 mainloop 40960 [EXE] diff --git a/samples/microkernel/test/test_sha256/prj_arm.conf b/samples/microkernel/test/test_sha256/prj_arm.conf deleted file mode 100644 index c5ee24319..000000000 --- a/samples/microkernel/test/test_sha256/prj_arm.conf +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_SHA256=y diff --git a/samples/microkernel/test/test_sha256/prj_x86.conf b/samples/microkernel/test/test_sha256/prj_x86.conf deleted file mode 100644 index c5ee24319..000000000 --- a/samples/microkernel/test/test_sha256/prj_x86.conf +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_SHA256=y diff --git a/samples/microkernel/test/test_sha256/testcase.ini b/samples/microkernel/test/test_sha256/testcase.ini deleted file mode 100644 index c1f6b2040..000000000 --- a/samples/microkernel/test/test_sha256/testcase.ini +++ /dev/null @@ -1,5 +0,0 @@ -[test] -tags = crypto sha256 -build_only = false -timeout = 10800 -slow = True |