diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index 240b34c9a0d0e..81804a94f10e9 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -5645,13 +5645,6 @@ West: tests: - thrift -"West project: tinycrypt": - status: odd fixes - files: - - modules/Kconfig.tinycrypt - labels: - - "area: Crypto / RNG" - "West project: trusted-firmware-m": status: maintained maintainers: diff --git a/boards/st/stm32mp257f_ev1/stm32mp257f_ev1_stm32mp257fxx_m33.yaml b/boards/st/stm32mp257f_ev1/stm32mp257f_ev1_stm32mp257fxx_m33.yaml index 3f8f8068cd331..69eb02d4964b5 100644 --- a/boards/st/stm32mp257f_ev1/stm32mp257f_ev1_stm32mp257fxx_m33.yaml +++ b/boards/st/stm32mp257f_ev1/stm32mp257f_ev1_stm32mp257fxx_m33.yaml @@ -14,7 +14,6 @@ testing: - cmsis_rtos_v2 - net - mpu - - tinycrypt - crypto - aes - cmm diff --git a/doc/_scripts/redirects.py b/doc/_scripts/redirects.py index 67ecc7849db0c..99b302a7c9eab 100644 --- a/doc/_scripts/redirects.py +++ b/doc/_scripts/redirects.py @@ -96,7 +96,6 @@ ('guides/coccinelle', 'develop/tools/coccinelle'), ('guides/code-relocation', 'kernel/code-relocation'), ('guides/crypto/index', 'services/crypto/index'), - ('guides/crypto/tinycrypt', 'services/crypto/tinycrypt'), ('guides/device_mgmt/dfu', 'services/device_mgmt/dfu'), ('guides/device_mgmt/index', 'services/device_mgmt/index'), ('guides/device_mgmt/mcumgr', 'services/device_mgmt/mcumgr'), @@ -307,7 +306,6 @@ ('samples/subsys/video/capture/README', 'samples/drivers/video/capture/README'), ('samples/subsys/video/tcpserversink/README', 'samples/drivers/video/tcpserversink/README'), ('samples/subsys/video/video', 'samples/drivers/video/video'), - ('services/crypto/tinycrypt', 'services/crypto/psa_crypto'), ('services/portability/posix', 'services/portability/posix/index'), ('services/secure_storage', 'services/storage/secure_storage/index'), ('services/settings/index', 'services/storage/settings/index'), diff --git a/doc/releases/migration-guide-4.3.rst b/doc/releases/migration-guide-4.3.rst index f668d9ef6f561..5ab2c7648dea7 100644 --- a/doc/releases/migration-guide-4.3.rst +++ b/doc/releases/migration-guide-4.3.rst @@ -44,5 +44,8 @@ Other subsystems Modules ******* +* The TinyCrypt library was removed as the upstream version is no longer maintained. + PSA Crypto API is now the recommended cryptographic library for Zephyr. + Architectures ************* diff --git a/doc/releases/release-notes-4.3.rst b/doc/releases/release-notes-4.3.rst index 71aea3a12018e..d6a880e2f377c 100644 --- a/doc/releases/release-notes-4.3.rst +++ b/doc/releases/release-notes-4.3.rst @@ -51,6 +51,9 @@ API Changes Removed APIs and options ======================== +* The TinyCrypt library was removed as the upstream version is no longer maintained. + PSA Crypto API is now the recommended cryptographic library for Zephyr. + Deprecated APIs and options =========================== diff --git a/doc/services/crypto/random/index.rst b/doc/services/crypto/random/index.rst index 0e281c5b08300..1634173278c5f 100644 --- a/doc/services/crypto/random/index.rst +++ b/doc/services/crypto/random/index.rst @@ -14,9 +14,8 @@ FIPS 140-2 [NIST02]_ recommended algorithms. Hardware based random-number generators (RNG) can be used on platforms with appropriate hardware support. Platforms without hardware RNG support shall use the `CTR-DRBG algorithm `_. -The algorithm can be provided by `TinyCrypt `_ -or `mbedTLS `_ depending on -your application performance and resource requirements. + +The algorithm can be provided by `mbedTLS `_. .. note:: diff --git a/modules/Kconfig b/modules/Kconfig index eda6daa16095e..0714026caaaba 100644 --- a/modules/Kconfig +++ b/modules/Kconfig @@ -41,7 +41,6 @@ source "modules/Kconfig.stm32" source "modules/Kconfig.syst" source "modules/Kconfig.telink" source "modules/thrift/Kconfig" -source "modules/Kconfig.tinycrypt" source "modules/Kconfig.vega" source "modules/Kconfig.wurthelektronik" source "modules/Kconfig.xtensa" diff --git a/modules/Kconfig.tinycrypt b/modules/Kconfig.tinycrypt deleted file mode 100644 index b54ad7641285e..0000000000000 --- a/modules/Kconfig.tinycrypt +++ /dev/null @@ -1,89 +0,0 @@ -# Cryptography primitive options for TinyCrypt version 2.0 - -# Copyright (c) 2015 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -config ZEPHYR_TINYCRYPT_MODULE - bool - -config TINYCRYPT - bool "TinyCrypt Support" - depends on ZEPHYR_TINYCRYPT_MODULE - select DEPRECATED - help - This option enables the TinyCrypt cryptography library. - -if TINYCRYPT -config TINYCRYPT_CTR_PRNG - bool "PRNG in counter mode" - help - This option enables support for the pseudo-random number - generator in counter mode. - -config TINYCRYPT_SHA256 - bool "SHA-256 Hash function support" - help - This option enables support for SHA-256 - hash function primitive. - -config TINYCRYPT_SHA256_HMAC - bool "HMAC (via SHA256) message auth support" - depends on TINYCRYPT_SHA256 - help - This option enables support for HMAC using SHA-256 - message authentication code. - -config TINYCRYPT_SHA256_HMAC_PRNG - bool "PRNG (via HMAC-SHA256) support" - depends on TINYCRYPT_SHA256_HMAC - help - This option enables support for pseudo-random number - generator. - -config TINYCRYPT_ECC_DH - bool "ECC_DH anonymous key agreement protocol" - help - This option enables support for the Elliptic curve - Diffie-Hellman anonymous key agreement protocol. - - Enabling ECC requires a cryptographically secure random number - generator. - -config TINYCRYPT_ECC_DSA - bool "ECC_DSA digital signature algorithm" - help - This option enables support for the Elliptic Curve Digital - Signature Algorithm (ECDSA). - - Enabling ECC requires a cryptographically secure random number - generator. - -config TINYCRYPT_AES - bool "AES-128 decrypt/encrypt" - help - This option enables support for AES-128 decrypt and encrypt. - -config TINYCRYPT_AES_CBC - bool "AES-128 block cipher" - depends on TINYCRYPT_AES - help - This option enables support for AES-128 block cipher mode. - -config TINYCRYPT_AES_CTR - bool "AES-128 counter mode" - depends on TINYCRYPT_AES - help - This option enables support for AES-128 counter mode. - -config TINYCRYPT_AES_CCM - bool "AES-128 CCM mode" - depends on TINYCRYPT_AES - help - This option enables support for AES-128 CCM mode. - -config TINYCRYPT_AES_CMAC - bool "AES-128 CMAC mode" - depends on TINYCRYPT_AES - help - This option enables support for AES-128 CMAC mode. -endif diff --git a/subsys/testsuite/include/zephyr/test_utils.h b/subsys/testsuite/include/zephyr/test_utils.h deleted file mode 100644 index 110d0306e31f8..0000000000000 --- a/subsys/testsuite/include/zephyr/test_utils.h +++ /dev/null @@ -1,85 +0,0 @@ -/* test_utils.h - TinyCrypt interface to common functions for 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. - */ - -#ifndef __TEST_UTILS_H__ -#define __TEST_UTILS_H__ - -#include -#include - -static inline void show_str(const char *label, const uint8_t *s, size_t len) -{ - uint32_t i; - - TC_PRINT("%s = ", label); - for (i = 0U; i < (uint32_t)len; ++i) { - TC_PRINT("%02x", s[i]); - } - TC_PRINT("\n"); -} - -static inline -void fatal(uint32_t testnum, const void *expected, size_t expectedlen, - const void *computed, size_t computedlen) -{ - TC_ERROR("\tTest #%d Failed!\n", testnum); - show_str("\t\tExpected", expected, expectedlen); - show_str("\t\tComputed ", computed, computedlen); - TC_PRINT("\n"); -} - -static inline -uint32_t check_result(uint32_t testnum, const void *expected, - size_t expectedlen, const void *computed, - size_t computedlen, uint32_t verbose) -{ - uint32_t result = TC_PASS; - - ARG_UNUSED(verbose); - - if (expectedlen != computedlen) { - TC_ERROR("The length of the computed buffer (%zu)", - computedlen); - TC_ERROR("does not match the expected length (%zu).", - expectedlen); - result = TC_FAIL; - } else { - if (memcmp(computed, expected, computedlen) != 0) { - fatal(testnum, expected, expectedlen, - computed, computedlen); - result = TC_FAIL; - } - } - - return result; -} - -#endif diff --git a/tests/crypto/tinycrypt/CMakeLists.txt b/tests/crypto/tinycrypt/CMakeLists.txt deleted file mode 100644 index 77cc0e5f85c5c..0000000000000 --- a/tests/crypto/tinycrypt/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -cmake_minimum_required(VERSION 3.20.0) -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -project(tinycrypt) - -FILE(GLOB app_sources src/*.c) -target_sources(app PRIVATE ${app_sources}) diff --git a/tests/crypto/tinycrypt/README.txt b/tests/crypto/tinycrypt/README.txt deleted file mode 100644 index 049f20ebc9e41..0000000000000 --- a/tests/crypto/tinycrypt/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 project outputs to the console. It can be built and executed -on QEMU as follows: - - make run - --------------------------------------------------------------------------------- - -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_ccm_vector_7. -Performing CCM test #8 (no payload data): -=================================================================== -PASS - test_ccm_vector_8. -All CCM tests succeeded! -=================================================================== -PASS - main. -=================================================================== -PROJECT EXECUTION SUCCESSFUL diff --git a/tests/crypto/tinycrypt/prj.conf b/tests/crypto/tinycrypt/prj.conf deleted file mode 100644 index 4cb73548b4f70..0000000000000 --- a/tests/crypto/tinycrypt/prj.conf +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_AES=y -CONFIG_TINYCRYPT_SHA256=y -CONFIG_TINYCRYPT_SHA256_HMAC=y -CONFIG_TINYCRYPT_AES_CCM=y -CONFIG_TINYCRYPT_AES_CTR=y -CONFIG_TINYCRYPT_AES_CBC=y -CONFIG_TINYCRYPT_AES_CMAC=y -CONFIG_TINYCRYPT_CTR_PRNG=y -CONFIG_ENTROPY_GENERATOR=y -CONFIG_TEST_RANDOM_GENERATOR=y -CONFIG_TINYCRYPT_ECC_DH=y -CONFIG_TINYCRYPT_ECC_DSA=y -CONFIG_ZTEST_STACK_SIZE=5120 -CONFIG_ZTEST=y diff --git a/tests/crypto/tinycrypt/src/aes.c b/tests/crypto/tinycrypt/src/aes.c deleted file mode 100644 index 7557f06456de6..0000000000000 --- a/tests/crypto/tinycrypt/src/aes.c +++ /dev/null @@ -1,2032 +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 -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#define NUM_OF_NIST_KEYS 16 -#define NUM_OF_FIXED_KEYS 128 - - -struct kat_table { - uint8_t in[NUM_OF_NIST_KEYS]; - uint8_t out[NUM_OF_NIST_KEYS]; -}; - -/* - * NIST test key schedule. - */ -void test_aes_key_chain(void) -{ - uint32_t result = TC_PASS; - 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; - - TC_PRINT("AES128 %s (NIST key schedule test):\n", __func__); - - /**TESTPOINT: Check NIST_key*/ - zassert_true(tc_aes128_set_encrypt_key(&s, nist_key), - "NIST key schedule test failed."); - - result = check_result(1, expected.words, - sizeof(expected.words), - s.words, sizeof(s.words), 1); - - /**TESTPOINT: Check result*/ - zassert_false(result, - "AES128 test #1 (NIST key schedule test) failed."); -} - -/* - * NIST test vectors for encryption. - */ -void test_aes_vectors(void) -{ - int result = TC_PASS; - 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]; - - TC_PRINT("AES128 %s (NIST encryption test):\n", __func__); - - (void)tc_aes128_set_encrypt_key(&s, nist_key); - - /**TESTPOINT: Check NIST input*/ - zassert_true(tc_aes_encrypt(ciphertext, nist_input, &s), - "NIST encryption test failed."); - - result = check_result(2, expected, sizeof(expected), - ciphertext, sizeof(ciphertext), 1); - - /**TESTPOINT: Check result*/ - zassert_false(result, - "AES128 test #2 (NIST encryption test) failed."); -} - -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. - */ -ZTEST(tinycrypt, test_aes_fixed_key_variable_text) -{ - uint32_t result = TC_PASS; - 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 kat_table 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; - - TC_PRINT("AES128 %s (NIST fixed-key and variable-text):\n", __func__); - - (void)tc_aes128_set_encrypt_key(&s, key); - - for (i = 0U; i < 128; ++i) { - result = var_text_test(i, kat_tbl[i].in, kat_tbl[i].out, &s); - if (result == TC_FAIL) { - break; - } - } - - /**TESTPOINT: Check result*/ - zassert_false(result, - "AES128 test #3 (NIST fixed-key and variable-text) failed."); -} - -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. - */ -ZTEST(tinycrypt, test_aes_variable_key_fixed_text) -{ - uint32_t result = TC_PASS; - const struct kat_table 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; - - TC_PRINT("AES128 test #4 (NIST variable-key and fixed-text):\n"); - - for (i = 0U; i < NUM_OF_FIXED_KEYS; ++i) { - result = var_key_test(i, kat_tbl[i].in, kat_tbl[i].out); - if (result == TC_FAIL) { - break; - } - - } - - /**TESTPOINT: Check result*/ - zassert_false(result, - "AES128 test #4 (NIST variable-key and fixed-text) failed."); -} diff --git a/tests/crypto/tinycrypt/src/cbc_mode.c b/tests/crypto/tinycrypt/src/cbc_mode.c deleted file mode 100644 index bf309244c685a..0000000000000 --- a/tests/crypto/tinycrypt/src/cbc_mode.c +++ /dev/null @@ -1,149 +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 -#include -#include - -#include -#include -#include -#include - -/* - * 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. - */ -ZTEST(tinycrypt, test_cbc_sp_800_38a_encrypt_decrypt) -{ - - TC_PRINT("Performing CBC tests:\n"); - - 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"); - - /**TESTPOINT: Check test 1*/ - zassert_true(tc_cbc_mode_encrypt(encrypted, - sizeof(plaintext) + TC_AES_BLOCK_SIZE, - plaintext, sizeof(plaintext), iv_buffer, &a), - "CBC test #1 (encryption SP 800-38a tests) failed"); - - result = check_result(1, ciphertext, sizeof(encrypted), - encrypted, sizeof(encrypted), 1); - zassert_false(result, "CBC test #1 failed."); - - 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; - - /**TESTPOINT: Check test 2*/ - zassert_true(tc_cbc_mode_decrypt(decrypted, - length, p, length, encrypted, - &a), "CBC test #2 (decryption SP 800-38a tests) failed"); - - result = check_result(2, plaintext, sizeof(decrypted), - decrypted, sizeof(decrypted), 1); - - /**TESTPOINT: Check result*/ - zassert_false(result, "CBC test #2 failed."); -} diff --git a/tests/crypto/tinycrypt/src/ccm_mode.c b/tests/crypto/tinycrypt/src/ccm_mode.c deleted file mode 100644 index 415a3bbc9f818..0000000000000 --- a/tests/crypto/tinycrypt/src/ccm_mode.c +++ /dev/null @@ -1,470 +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 payload data - */ - -#include -#include -#include -#include - -#include - -#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); - - result = tc_ccm_config(&c, &sched, nonce, nlen, mlen); - - /**TESTPOINT: Check CCM config*/ - zassert_true(result, "CCM config failed"); - - result = tc_ccm_generation_encryption(ciphertext, sizeof(ciphertext), - hdr, hlen, data, dlen, &c); - - /**TESTPOINT: Check CCM encrypt*/ - zassert_true(result, "ccm_encrypt failed"); - - /**TESTPOINT: Verify ciphertext*/ - if (memcmp(expected, ciphertext, elen) != 0) { - show_str("\t\tExpected", expected, elen); - show_str("\t\tComputed", ciphertext, elen); - - /**ASSERTION: Signal wrong output and assert*/ - zassert_true(0, "ccm_encrypt produced wrong ciphertext"); - } - - result = tc_ccm_decryption_verification(decrypted, sizeof(decrypted), - hdr, hlen, ciphertext, - dlen + mlen, &c); - - /**TESTPOINT: Check decryption*/ - if (result == 0U) { - show_str("\t\tExpected", data, dlen); - show_str("\t\tComputed", decrypted, sizeof(decrypted)); - - /**ASSERTION: Decrypt failed, so exit by assert*/ - zassert_true(0, "ccm_decrypt failed"); - } - - result = TC_PASS; - return result; -} - -ZTEST(tinycrypt, test_ccm_vector_1) -{ - uint32_t result = TC_PASS; - /* 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; - - TC_PRINT("%s: Performing CCM test #1 (RFC 3610 test vector #1):\n", - __func__); - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), - data, sizeof(data), expected, sizeof(expected), mlen); - - /**TESTPOINT: Check result*/ - zassert_false(result, "CCM test #1 (RFC 3610 test vector #1) failed."); -} - -ZTEST(tinycrypt, test_ccm_vector_2) -{ - uint32_t result = TC_PASS; - /* 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; - - TC_PRINT("%s: Performing CCM test #2 (RFC 3610 test vector #2):\n", - __func__); - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), - data, sizeof(data), expected, sizeof(expected), mlen); - - /**TESTPOINT: Check result*/ - zassert_false(result, "CCM test #2 failed."); -} - -ZTEST(tinycrypt, test_ccm_vector_3) -{ - uint32_t result = TC_PASS; - /* 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; - - TC_PRINT("%s: Performing CCM test #3 (RFC 3610 test vector #3):\n", - __func__); - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), data, - sizeof(data), expected, sizeof(expected), mlen); - - /**TESTPOINT: Check result*/ - zassert_false(result, "CCM test #3 failed."); -} - -ZTEST(tinycrypt, test_ccm_vector_4) -{ - uint32_t result = TC_PASS; - /* 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; - - TC_PRINT("%s: Performing CCM test #4 (RFC 3610 test vector #7):\n", - __func__); - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), - data, sizeof(data), expected, sizeof(expected), mlen); - - /**TESTPOINT: Check result*/ - zassert_false(result, "CCM test #4 failed."); -} - -ZTEST(tinycrypt, test_ccm_vector_5) -{ - uint32_t result = TC_PASS; - /* 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; - - TC_PRINT("%s: Performing CCM test #5 (RFC 3610 test vector #8):\n", - __func__); - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), - data, sizeof(data), expected, sizeof(expected), mlen); - - /**TESTPOINT: Check result*/ - zassert_false(result, "CCM test #5 failed."); -} - -ZTEST(tinycrypt, test_ccm_vector_6) -{ - uint32_t result = TC_PASS; - /* 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; - - TC_PRINT("%s: Performing CCM test #6 (RFC 3610 test vector #9):\n", - __func__); - - result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), - data, sizeof(data), expected, sizeof(expected), mlen); - - /**TESTPOINT: Check result*/ - zassert_false(result, "CCM test #6 failed."); -} - -ZTEST(tinycrypt, test_ccm_vector_7) -{ - uint32_t result = TC_PASS; - /* 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_PRINT("%s: Performing CCM test #7 (no associated data):\n", - __func__); - - tc_aes128_set_encrypt_key(&sched, key); - - /**TESTPOINT: Check CCM configuration*/ - zassert_true(tc_ccm_config(&c, &sched, nonce, sizeof(nonce), mlen), - "ccm_config failed"); - - result = tc_ccm_generation_encryption(ciphertext, sizeof(ciphertext), - hdr, 0, data, sizeof(data), &c); - /**TESTPOINT: Check CCM encryption*/ - zassert_true(result, "ccm_encryption failed"); - - result = tc_ccm_decryption_verification(decrypted, sizeof(decrypted), - hdr, 0, ciphertext, - sizeof(data) + mlen, &c); - - if (result == 0U) { - TC_ERROR("ccm_decrypt failed in %s.\n", __func__); - show_str("\t\tExpected", data, sizeof(data)); - show_str("\t\tComputed", decrypted, sizeof(decrypted)); - - /**TESTPOINT: Check CCM decryption, and assert*/ - zassert_true(result, "ccm_decryption failed"); - - } - - result = TC_PASS; - - /**TESTPOINT: Check result*/ - zassert_false(result, "CCM test #7 failed."); - -} - -ZTEST(tinycrypt, test_ccm_vector_8) -{ - uint32_t result = TC_PASS; - /* 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[] = {}; - 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_PRINT("%s: Performing CCM test #8 (no payload data):\n", __func__); - - tc_aes128_set_encrypt_key(&sched, key); - - /**TESTPOINT: Check CCM configuration*/ - zassert_true(tc_ccm_config(&c, &sched, nonce, sizeof(nonce), mlen), - "CCM config failed"); - - result = tc_ccm_generation_encryption(ciphertext, sizeof(ciphertext), - hdr, sizeof(hdr), data, - sizeof(data), &c); - /**TESTPOINT: Check CCM encryption*/ - zassert_true(result, "ccm_encrypt failed"); - - result = tc_ccm_decryption_verification(decrypted, sizeof(decrypted), - hdr, sizeof(hdr), - ciphertext, mlen, &c); - /**TESTPOINT: Check CCM decryption*/ - if (result == 0U) { - show_str("\t\tExpected", data, sizeof(data)); - show_str("\t\tComputed", decrypted, sizeof(decrypted)); - - /**ASSERTION: Decrypt failed, so exit by assert*/ - zassert_true(0, "ccm_decrypt failed"); - } - - result = TC_PASS; - - /**TESTPOINT: Check result*/ - zassert_false(result, "CCM test #8 (no payload data) failed."); -} diff --git a/tests/crypto/tinycrypt/src/cmac_mode.c b/tests/crypto/tinycrypt/src/cmac_mode.c deleted file mode 100644 index 888897643d645..0000000000000 --- a/tests/crypto/tinycrypt/src/cmac_mode.c +++ /dev/null @@ -1,295 +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 -#include -#include -#include - -#include -#include -#include - -#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 = 0U; 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("%s: AES encryption failed\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("%s: 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("%s: 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; - } - - 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("%s: aes_cmac failed with null msg = 1\n", __func__); - show("expected Tag =", tag, sizeof(tag)); - show("computed Tag =", Tag, sizeof(Tag)); - return TC_FAIL; - } - - 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("%s: 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; - } - - 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("%s: 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; - } - - 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("%s: 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; - } - - return result; -} - -/* - * Main task to test CMAC - */ - -ZTEST(tinycrypt, test_cmac_mode) -{ - - 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]; - - - (void) tc_cmac_setup(&state, key, &sched); - result = verify_gf_2_128_double(K1, K2, state); - - /**TESTPOINT: Check result - test 1*/ - zassert_false(result, "CMAC test #1 (128 double) failed"); - - (void) tc_cmac_setup(&state, key, &sched); - result = verify_cmac_null_msg(&state); - - /**TESTPOINT: Check result - test 2*/ - zassert_false(result, "CMAC test #2 (null msg) failed"); - - (void) tc_cmac_setup(&state, key, &sched); - result = verify_cmac_1_block_msg(&state); - - /**TESTPOINT: Check result - test 3*/ - zassert_false(result, "CMAC test #1 (1 block msg) failed"); - - (void) tc_cmac_setup(&state, key, &sched); - result = verify_cmac_320_bit_msg(&state); - - /**TESTPOINT: Check result - test 4*/ - zassert_false(result, "CMAC test #1 (320 bit msg) failed"); - - (void) tc_cmac_setup(&state, key, &sched); - result = verify_cmac_512_bit_msg(&state); - - /**TESTPOINT: Check result - test 5*/ - zassert_false(result, "CMAC test #1 (512 bit msg) failed"); - - TC_PRINT("All CMAC tests succeeded!\n"); -} diff --git a/tests/crypto/tinycrypt/src/ctr_mode.c b/tests/crypto/tinycrypt/src/ctr_mode.c deleted file mode 100644 index 8e74f63c2bc77..0000000000000 --- a/tests/crypto/tinycrypt/src/ctr_mode.c +++ /dev/null @@ -1,128 +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 -#include -#include - -#include -#include -#include -#include - -/* - * NIST SP 800-38a CTR Test for encryption and decryption. - */ -void test_ctr_sp_800_38a_encrypt_decrypt(void) -{ - - TC_PRINT("Performing CTR tests:\n"); - - 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)); - - /**TESTPOINT: Check test 1 result*/ - zassert_true(tc_ctr_mode(&out[TC_AES_BLOCK_SIZE], - sizeof(plaintext), plaintext, sizeof(plaintext), - ctr, &sched), - "CTR test #1 (encryption SP 800-38a tests) failed"); - - result = check_result(1, ciphertext, sizeof(out), out, sizeof(out), 1); - - TC_PRINT("CTR test #2 (decryption SP 800-38a tests):\n"); - (void)memcpy(ctr, out, sizeof(ctr)); - - /**TESTPOINT: Check test 2 result*/ - zassert_true(tc_ctr_mode(decrypted, sizeof(decrypted), - &out[TC_AES_BLOCK_SIZE], sizeof(decrypted), - ctr, &sched), - "CTR test #2 (decryption SP 800-38a tests) failed"); - - result = check_result(2, plaintext, sizeof(plaintext), - decrypted, sizeof(plaintext), 1); - - /**TESTPOINT: Check result*/ - zassert_false(result, "CBC test #1 failed"); - TC_PRINT("All CTR tests succeeded!\n"); -} diff --git a/tests/crypto/tinycrypt/src/ctr_prng.c b/tests/crypto/tinycrypt/src/ctr_prng.c deleted file mode 100644 index 84fb979f76b7d..0000000000000 --- a/tests/crypto/tinycrypt/src/ctr_prng.c +++ /dev/null @@ -1,558 +0,0 @@ -/* test_ctr_prng.c - TinyCrypt implementation of some CTR-PRNG tests */ - -/* - * Copyright (c) 2016, Chris Morrison, 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. - * - * 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 CTR-PRNG routines - */ - -#include -#include -#include -#include - -#include -#include -#include - -#define MAX_EXPECTED_STRING 128 -#define MAX_BIN_SIZE (MAX_EXPECTED_STRING / 2) - -uint8_t per[MAX_BIN_SIZE]; -uint8_t ai1[MAX_BIN_SIZE]; -uint8_t ai2[MAX_BIN_SIZE]; - -struct prng_vector { - char *entropy; - char *personal; /* may be null */ - char *extra1; /* may be null */ - char *extra2; /* may be null */ - char *expected; -}; - -/* vectors taken from NIST CAVS 14.3 CTR_DRBG.rsp */ -struct prng_vector vectors[] = { - /* - * AES-128 no df, PredictionResistance = False, EntropyInputLen = 256, - * NonceLen = 0, PersonalizationStringLen = 0, AdditionalInputLen = 0, - * ReturnedBitsLen = 512 - */ - { /* Count 0 */ - "ce50f33da5d4c1d3d4004eb35244b7f2cd7f2e5076fbf6780a7ff634b249a5fc", - 0, - 0, - 0, - "6545c0529d372443b392ceb3ae3a99a30f963eaf313280f1d1a1e87f9db373d361e75d" - "18018266499cccd64d9bbb8de0185f213383080faddec46bae1f784e5a", - }, - - { /* Count 1 */ - "a385f70a4d450321dfd18d8379ef8e7736fee5fbf0a0aea53b76696094e8aa93", - 0, - 0, - 0, - "1a062553ab60457ed1f1c52f5aca5a3be564a27545358c112ed92c6eae2cb7597cfcc2" - "e0a5dd81c5bfecc941da5e8152a9010d4845170734676c8c1b6b3073a5", - }, - - /* - * AES-128 no df, PredictionResistance = False, EntropyInputLen = 256, - * NonceLen = 0, PersonalizationStringLen = 0, AdditionalInputLen = 256, - * ReturnedBitsLen = 512 - */ - { /* Count 0 */ - "6bd4f2ae649fc99350951ff0c5d460c1a9214154e7384975ee54b34b7cae0704", - 0, - "ecd4893b979ac92db1894ae3724518a2f78cf2dbe2f6bbc6fda596df87c7a4ae", - "b23e9188687c88768b26738862c4791fa52f92502e1f94bf66af017c4228a0dc", - "5b2bf7a5c60d8ab6591110cbd61cd387b02de19784f496d1a109123d8b3562a5de2dd6" - "d5d1aef957a6c4f371cecd93c15799d82e34d6a0dba7e915a27d8e65f3", - }, - - { /* Count 1 */ - "e2addbde2a76e769fc7aa3f45b31402f482b73bbe7067ad6254621f06d3ef68b", - 0, - "ad11643b019e31245e4ea41f18f7680458310580fa6efad275c5833e7f800dae", - "b5d849616b3123c9725d188cd0005003220768d1200f9e7cc29ef6d88afb7b9a", - "132d0d50c8477a400bb8935be5928f916a85da9ffcf1a8f6e9f9a14cca861036cda14c" - "f66d8953dab456b632cf687cd539b4b807926561d0b3562b9d3334fb61", - }, - - /* - * AES-128 no df, PredictionResistance = False, EntropyInputLen = 256, - * NonceLen = 0, PersonalizationStringLen = 256, AdditionalInputLen = 0, - * ReturnedBitsLen = 512 - */ - { /* Count 0 */ - "cee23de86a69c7ef57f6e1e12bd16e35e51624226fa19597bf93ec476a44b0f2", - "a2ef16f226ea324f23abd59d5e3c660561c25e73638fe21c87566e86a9e04c3e", - 0, - 0, - "2a76d71b329f449c98dc08fff1d205a2fbd9e4ade120c7611c225c984eac8531288dd3" - "049f3dc3bb3671501ab8fbf9ad49c86cce307653bd8caf29cb0cf07764", - }, - - { /* Count 1 */ - "b09eb4a82a39066ec945bb7c6aef6a0682a62c3e674bd900297d4271a5f25b49", - "a3b768adcfe76d61c972d900da8dffeeb2a42e740247aa719ed1c924d2d10bd4", - 0, - 0, - "5a1c26803f3ffd4daf32042fdcc32c3812bb5ef13bc208cef82ea047d2890a6f5dcecf" - "32bcc32a2585775ac5e1ffaa8de00664c54fe00a7674b985619e953c3a", - }, - - /* - * AES-128 no df, PredictionResistance = False, EntropyInputLen = 256, - * NonceLen = 0, PersonalizationStringLen = 256, - * AdditionalInputLen = 256, - * ReturnedBitsLen = 512 - */ - { /* Count 0 */ - "50b96542a1f2b8b05074051fe8fb0e45adbbd5560e3594e12d485fe1bfcb741f", - "820c3030f97b3ead81a93b88b871937278fd3d711d2085d9280cba394673b17e", - "1f1632058806d6d8e231288f3b15a3c324e90ccef4891bd595f09c3e80e27469", - "5cadc8bfd86d2a5d44f921f64c7d153001b9bdd7caa6618639b948ebfad5cb8a", - "02b76a66f103e98d450e25e09c35337747d987471d2b3d81e03be24c7e985417a32acd" - "72bc0a6eddd9871410dacb921c659249b4e2b368c4ac8580fb5db559bc", - }, - - { /* Count 1 */ - "ff5f4b754e8b364f6df0c5effba5f1c036de49c4b38cd8d230ee1f14d7234ef5", - "994eb339f64034005d2e18352899e77df446e285c3430631d557498aac4f4280", - "e1824832d5fc2a6dea544cac2ab73306d6566bde98cc8f9425d064b860a9b218", - "c08b42433a78fd393a34ffc24724d479af08c36882799c134165d98b2866dc0a", - "1efa34aed07dd57bde9741b8d1907d28e8c1ac71601df37ef4295e6ffb67f6a1c4c13e" - "5def65d505e2408aeb82948999ca1f9c9113b99a6b59ff7f0cc3dc6e92", - }, - - /* - * AES-128 no df, PredictionResistance = False, EntropyInputLen = 256, - * NonceLen = 0, PersonalizationStringLen = 0, AdditionalInputLen = 0, - * ReturnedBitsLen = 512 - */ - { /* Count 0 */ - "69a09f6bf5dda15cd4af29e14cf5e0cddd7d07ac39bba587f8bc331104f9c448", - 0, - 0, - 0, - "f78a4919a6ec899f7b6c69381febbbe083315f3d289e70346db0e4ec4360473ae0b3d9" - "16e9b6b964309f753ed66ae59de48da316cc1944bc8dfd0e2575d0ff6d", - }, - - { /* Count 1 */ - "80bfbd340d79888f34f043ed6807a9f28b72b6644d9d9e9d777109482b80788a", - 0, - 0, - 0, - "80db048d2f130d864b19bfc547c92503e580cb1a8e1f74f3d97fdda6501fb1aa81fced" - "ac0dd18b6ccfdc183ca28a44fc9f3a08834ba8751a2f4495367c54a185", - }, - - /* - * AES-128 no df, PredictionResistance = False, EntropyInputLen = 256, - * NonceLen = 0, PersonalizationStringLen = 0, AdditionalInputLen = 256, - * ReturnedBitsLen = 512 - */ - { /* Count 0 */ - "7f40804693552e317523fda6935a5bc814353b1fbb7d334964ac4d1d12ddccce", - 0, - "95c04259f64fcd1fe00c183aa3fb76b8a73b4d1243b800d770e38515bc41143c", - "5523102dbd7fe1228436b91a765b165ae6405eb0236e237afad4759cf0888941", - "1abf6bccb4c2d64e5187b1e2e34e493eca204ee4eef0d964267e38228f5f20efba3764" - "30a266f3832916d0a45b2703f46401dfd145e447a0a1667ebd8b6ee748", - }, - - { /* Count 1 */ - "350df677409a1dc297d01d3716a2abdfa6272cd030ab75f76839648582b47113", - 0, - "ba5709a12ae6634a5436b7ea06838b48f7b847a237f6654a0e27c776ebee9511", - "f1b2c717c5e3a934127e10471d67accc65f4a45010ca53b35f54c88833dbd8e7", - "1ef1ea279812e8abe54f7ffd12d04c80ae40741f4ccfe232a5fba3a78dfd3e2ed419b8" - "8ee9188df724160cbb3aea0f276e84a3c0ff01e3b89fe30ebcfa64cb86", - }, - - /* - * AES-128 no df, PredictionResistance = False, EntropyInputLen = 256, - * NonceLen = 0, PersonalizationStringLen = 256, AdditionalInputLen = 0, - * ReturnedBitsLen = 512 - */ - { /* Count 0 */ - "3fef762f0aa0677f61c65d749eeb10b013ff68ccc6314f150cfee752dcd8f987", - "f56db099240c7590dac396372b8737404d418b2864a3df96a8a397967245735f", - 0, - 0, - "af0afe0837442136fbb1959a1c91a9291c1d8188ede07c67d0e4dd6541303415e7a679" - "99c302ba0df555324c26077514592a9b6db6be2f153fad2250161164e4", - }, - - { /* Count 1 */ - "3eebe77db4631862e3eb7e39370515b8baa1cdd71a5b1b0cda79c14d0b5f48ea", - "4be56a9b9c21242739c985ef12aa4d98e8c7da07c4c1dc6829f2e06833cfa148", - 0, - 0, - "be9e18a753df261927473c8bb5fb7c3ea6e821df5ab49adc566a4ebf44f75fa825b1f9" - "d8c154bcd469134c0bb688e07e3c3e45407ca350d540e1528cc2e64068", - }, - - /* - * AES-128 no df, PredictionResistance = False, EntropyInputLen = 256, - * NonceLen = 0, PersonalizationStringLen = 256, - * AdditionalInputLen = 256, - * ReturnedBitsLen = 512 - */ - { /* Count 0 */ - "c129c2732003bbf1d1dec244a933cd04cb47199bbce98fe080a1be880afb2155", - "64e2b9ac5c20642e3e3ee454b7463861a7e93e0dd1bbf8c4a0c28a6cb3d811ba", - "f94f0975760d52f47bd490d1623a9907e4df701f601cf2d573aba803a29d2b51", - "6f99720b186e2028a5fcc586b3ea518458e437ff449c7c5a318e6d13f75b5db7", - "7b8b3378b9031ab3101cec8af5b8ba5a9ca2a9af41432cd5f2e5e19716140bb219ed7f" - "4ba88fc37b2d7e146037d2cac1128ffe14131c8691e581067a29cacf80", - }, - - { /* Count 1 */ - "7667643670254b3530e80a17b16b22406e84efa6a4b5ceef3ebc877495fc6048", - "40b92969953acde756747005117e46eff6893d7132a8311ffb1062280367326b", - "797a02ffbe8ff2c94ed0e5d39ebdc7847adaa762a88238242ed8f71f5635b194", - "d617f0f0e609e90d814192ba2e5214293d485402cdf9f789cc78b05e8c374f18", - "e8d6f89dca9825aed8927b43187492a98ca8648db30f0ac709556d401a8ac2b959c813" - "50fc64332c4c0deb559a286a72e65dbb462bd872f9b28c0728f353dc10", - } -}; - -/* utility function to convert hex character representation - * to their nibble (4 bit) values - */ -static uint8_t char_to_nibble(char c) -{ - if (c >= '0' && c <= '9') { - return c - '0'; - } - if (c >= 'a' && c <= 'f') { - return c - 'a' + 10U; - } - if (c >= 'A' && c <= 'F') { - return c - 'A' + 10U; - } - return 255U; -} - -/* - * Convert a string of characters representing a hex buffer into a series of - * bytes of that real value - */ -static void hex_str_to_num(uint8_t *buf, char *in) -{ - int len; - int i; - - len = strlen(in) / 2; - for (i = 0; i < len; i++) { - buf[i] = (char_to_nibble(*in) << 4) | char_to_nibble(*(in+1)); - in += 2; - } -} - -static int test_prng_vector(struct prng_vector *v) -{ - TCCtrPrng_t ctx; - - uint8_t entropy[MAX_BIN_SIZE]; - uint8_t expected[MAX_BIN_SIZE]; - uint8_t output[MAX_BIN_SIZE]; - uint8_t *personal = NULL; - uint8_t *extra1 = NULL; - uint8_t *extra2 = NULL; - - int extra1_len = 0; - int extra2_len = 0; - int plen = 0; - int ent_len; - int exp_len; - int rc; - - hex_str_to_num(entropy, v->entropy); - hex_str_to_num(expected, v->expected); - - ent_len = strlen(v->entropy) / 2; - exp_len = strlen(v->expected) / 2; - - if (v->personal != 0) { - personal = per; - hex_str_to_num(personal, v->personal); - plen = strlen(v->personal) / 2; - } - - if (v->extra1 != 0) { - extra1 = ai1; - hex_str_to_num(extra1, v->extra1); - extra1_len = strlen(v->extra1) / 2; - } - - if (v->extra2 != 0) { - extra2 = ai2; - hex_str_to_num(extra2, v->extra2); - extra2_len = strlen(v->extra2) / 2; - } - - rc = tc_ctr_prng_init(&ctx, entropy, ent_len, personal, plen); - - /**TESTPOINT: Check if init works*/ - zassert_equal(rc, TC_CRYPTO_SUCCESS, "CTR PRNG init failed"); - - rc = tc_ctr_prng_generate(&ctx, extra1, extra1_len, output, exp_len); - - /**TESTPOINT: Check if generate works*/ - zassert_equal(rc, TC_CRYPTO_SUCCESS, "CTR PRNG generate failed"); - - rc = tc_ctr_prng_generate(&ctx, extra2, extra2_len, output, exp_len); - - /**TESTPOINT: Check if generate works*/ - zassert_equal(rc, TC_CRYPTO_SUCCESS, "CTR PRNG generate failed"); - - rc = memcmp(output, expected, exp_len); - - /**TESTPOINT: Check results*/ - zassert_false(rc, "expected value different - check failed"); - - rc = TC_PASS; - return rc; -} - -ZTEST(tinycrypt, test_ctr_prng_reseed) -{ - uint8_t expectedV1[] = {0x7E, 0xE3, 0xA0, 0xCB, 0x6D, 0x5C, 0x4B, 0xC2, - 0x4B, 0x7E, 0x3C, 0x48, 0x88, 0xC3, 0x69, 0x70}; - uint8_t expectedV2[] = {0x5E, 0xC1, 0x84, 0xED, 0x45, 0x76, 0x67, 0xEC, - 0x7B, 0x4C, 0x08, 0x7E, 0xB0, 0xF9, 0x55, 0x4E}; - uint8_t extra_input[32] = {0}; - uint8_t entropy[32] = {0}; /* value not important */ - uint8_t output[32]; - TCCtrPrng_t ctx; - uint32_t i; - int rc; - - rc = tc_ctr_prng_init(&ctx, entropy, sizeof(entropy), 0, 0U); - - /**TESTPOINT: Check if init works*/ - zassert_equal(rc, TC_CRYPTO_SUCCESS, "CTR PRNG init failed"); - - /* force internal state to max allowed count */ - ctx.reseedCount = 0x1000000000000ULL; - - rc = tc_ctr_prng_generate(&ctx, 0, 0, output, sizeof(output)); - - /**TESTPOINT: Check if generate works*/ - zassert_equal(rc, TC_CRYPTO_SUCCESS, "CTR PRNG generate failed"); - - /* expect further attempts to fail due to reaching reseed threshold */ - rc = tc_ctr_prng_generate(&ctx, 0, 0, output, sizeof(output)); - - /**TESTPOINT: Check if generate works*/ - zassert_equal(rc, TC_CTR_PRNG_RESEED_REQ, "CTR PRNG generate failed"); - - /* reseed and confirm generate works again - * make entropy different from original value - not really important - * for the purpose of this test - */ - (void)memset(entropy, 0xFF, sizeof(entropy)); - rc = tc_ctr_prng_reseed(&ctx, entropy, sizeof(entropy), extra_input, - sizeof(extra_input)); - - /**TESTPOINT: Recheck if the functions work*/ - zassert_equal(rc, TC_CRYPTO_SUCCESS, "CTR PRNG reseed failed"); - - rc = tc_ctr_prng_generate(&ctx, 0, 0, output, sizeof(output)); - - /**TESTPOINT: Check if generate works again*/ - zassert_equal(rc, TC_CRYPTO_SUCCESS, "CTR PRNG generate failed"); - - /* confirm entropy and additional_input are being used correctly - * first, entropy only - */ - (void)memset(&ctx, 0x0, sizeof(ctx)); - for (i = 0U; i < sizeof(entropy); i++) { - entropy[i] = i; - } - - rc = tc_ctr_prng_reseed(&ctx, entropy, sizeof(entropy), 0, 0); - - /**TESTPOINT: Check if reseed works*/ - zassert_equal(rc, 1, "CTR PRNG reseed failed"); - - /**TESTPOINT: Check results*/ - zassert_false(memcmp(ctx.V, expectedV1, sizeof(expectedV1)), - "expected value different - check failed"); - - /* now, entropy and additional_input */ - (void)memset(&ctx, 0x00, sizeof(ctx)); - for (i = 0U; i < sizeof(extra_input); i++) { - extra_input[i] = i * 2U; - } - - rc = tc_ctr_prng_reseed(&ctx, entropy, sizeof(entropy), - extra_input, sizeof(extra_input)); - - /**TESTPOINT: Check if reseed works*/ - zassert_equal(rc, 1, "CTR PRNG reseed failed"); - - /**TESTPOINT: Check results*/ - zassert_false(memcmp(ctx.V, expectedV2, sizeof(expectedV2)), - "expected value different - check failed"); - - TC_PRINT("CTR PRNG reseed test succeeded\n"); -} - -ZTEST(tinycrypt, test_ctr_prng_uninstantiate) -{ - uint8_t entropy[32] = {0}; /* value not important */ - TCCtrPrng_t ctx; - size_t words; - size_t i; - int rc; - - rc = tc_ctr_prng_init(&ctx, entropy, sizeof(entropy), 0, 0); - - /**TESTPOINT: Check if init works*/ - zassert_equal(rc, TC_CRYPTO_SUCCESS, "CTR PRNG init failed"); - - tc_ctr_prng_uninstantiate(&ctx); - /* show that state has been zeroised */ - for (i = 0; i < sizeof(ctx.V); i++) { - - /**TESTPOINT: Check if states have been zeroised*/ - zassert_false(ctx.V[i], "some states have not been zeroised"); - } - - words = sizeof(ctx.key.words) / sizeof(ctx.key.words[0]); - for (i = 0; i < words; i++) { - - /**TESTPOINT: Check words*/ - zassert_false(ctx.key.words[i], - "expected value wrong - check failed"); - } - - /**TESTPOINT: Check if uninstantiation passed*/ - zassert_false(ctx.reseedCount, "CTR PRNG uninstantiate test failed"); - - TC_PRINT("CTR PRNG uninstantiate test succeeded\n"); -} - -ZTEST(tinycrypt, test_ctr_prng_robustness) -{ - uint8_t entropy[32] = {0}; /* value not important */ - uint8_t output[32]; - TCCtrPrng_t ctx; - int rc; - - /* show that the CTR PRNG is robust to invalid inputs */ - tc_ctr_prng_uninstantiate(0); - - rc = tc_ctr_prng_generate(&ctx, 0, 0, 0, 0); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - rc = tc_ctr_prng_generate(0, 0, 0, output, sizeof(output)); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - rc = tc_ctr_prng_generate(0, 0, 0, 0, 0); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - rc = tc_ctr_prng_reseed(&ctx, 0, 0, 0, 0); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - /* too little entropy */ - rc = tc_ctr_prng_reseed(&ctx, entropy, sizeof(entropy) - 1, 0, 0); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - - rc = tc_ctr_prng_reseed(0, entropy, sizeof(entropy), 0, 0); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - - rc = tc_ctr_prng_reseed(0, 0, 0, 0, 0); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - - rc = tc_ctr_prng_init(&ctx, 0, 0, 0, 0); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - /* too little entropy */ - rc = tc_ctr_prng_init(&ctx, entropy, sizeof(entropy) - 1, 0, 0); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - rc = tc_ctr_prng_init(0, entropy, sizeof(entropy), 0, 0); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - rc = tc_ctr_prng_init(0, 0, 0, 0, 0); - - /**TESTPOINT: Check if invalid input test works*/ - zassert_equal(rc, TC_CRYPTO_FAIL, "CTR PRNG invalid input test failed"); - - TC_PRINT("CTR PRNG robustness test succeeded\n"); -} - -/* - * Main task to test CTR PRNG - */ -ZTEST(tinycrypt, test_ctr_prng_vector) -{ - int elements; - int rc; - int i; - - - elements = (int)sizeof(vectors) / sizeof(vectors[0]); - for (i = 0; i < elements; i++) { - rc = test_prng_vector(&vectors[i]); - TC_PRINT("[%s] test_prng_vector #%d\n", - TC_RESULT_TO_STR(rc), i); - - /**TESTPOINT: Check if test passed*/ - zassert_false(rc, "CTR PRNG vector test failed"); - } - TC_PRINT("CTR PRNG vector test succeeded\n"); -} diff --git a/tests/crypto/tinycrypt/src/ecc_dh.c b/tests/crypto/tinycrypt/src/ecc_dh.c deleted file mode 100644 index 955e072301545..0000000000000 --- a/tests/crypto/tinycrypt/src/ecc_dh.c +++ /dev/null @@ -1,484 +0,0 @@ -/* test_ecc_dh.c - TinyCrypt implementation of some EC-DH tests */ - -/* Copyright (c) 2014, Kenneth MacKay - * 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. - * - * 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 HOLDER 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. - */ - -/* - * Copyright (C) 2017 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. - * - * test_ecc_ecdh.c -- Implementation of some EC-DH tests - * - */ -#include -#include -#include -#include "test_ecc_utils.h" -#include -#include - -#include -#include -#include -#include - -int ecdh_vectors(char **qx_vec, char **qy_vec, char **d_vec, char **z_vec, - int tests, int verbose) -{ - - unsigned int pub[2 * NUM_ECC_WORDS]; - unsigned int prv[NUM_ECC_WORDS]; - unsigned int z[NUM_ECC_WORDS]; - unsigned int result = TC_PASS; - - int rc; - unsigned int exp_z[NUM_ECC_WORDS]; - - const struct uECC_Curve_t *curve = uECC_secp256r1(); - - for (int i = 0; i < tests; i++) { - - string2scalar(pub + NUM_ECC_WORDS, NUM_ECC_WORDS, qx_vec[i]); - string2scalar(pub, NUM_ECC_WORDS, qy_vec[i]); - string2scalar(exp_z, NUM_ECC_WORDS, z_vec[i]); - string2scalar(prv, NUM_ECC_WORDS, d_vec[i]); - - uint8_t pub_bytes[2 * NUM_ECC_BYTES]; - uECC_vli_nativeToBytes(pub_bytes, 2 * NUM_ECC_BYTES, pub); - uint8_t private_bytes[NUM_ECC_BYTES]; - uECC_vli_nativeToBytes(private_bytes, NUM_ECC_BYTES, prv); - uint8_t z_bytes[NUM_ECC_BYTES]; - uECC_vli_nativeToBytes(z_bytes, NUM_ECC_BYTES, exp_z); - - rc = uECC_shared_secret(pub_bytes, private_bytes, z_bytes, curve); - - /**TESTPOINT: Check for ECDH failure*/ - zassert_equal(rc, TC_CRYPTO_SUCCESS, "ECDH failure, exit"); - - uECC_vli_bytesToNative(z, z_bytes, NUM_ECC_BYTES); - - result = check_ecc_result(i, "Z", exp_z, z, NUM_ECC_WORDS, verbose); - - /**TESTPOINT: Check result*/ - zassert_false(result, "ECDH test failed"); - } - return result; -} - -int cavp_ecdh(bool verbose) -{ - unsigned int result = TC_PASS; - /* - * P-256 - */ - char *d[] = { - "7d7dc5f71eb29ddaf80d6214632eeae03d9058af1fb6d22ed80badb62bc1a534", - "38f65d6dce47676044d58ce5139582d568f64bb16098d179dbab07741dd5caf5", - "1accfaf1b97712b85a6f54b148985a1bdc4c9bec0bd258cad4b3d603f49f32c8", - "207c43a79bfee03db6f4b944f53d2fb76cc49ef1c9c4d34d51b6c65c4db6932d", - "59137e38152350b195c9718d39673d519838055ad908dd4757152fd8255c09bf", - "f5f8e0174610a661277979b58ce5c90fee6c9b3bb346a90a7196255e40b132ef", - "3b589af7db03459c23068b64f63f28d3c3c6bc25b5bf76ac05f35482888b5190", - "d8bf929a20ea7436b2461b541a11c80e61d826c0a4c9d322b31dd54e7f58b9c8", - "0f9883ba0ef32ee75ded0d8bda39a5146a29f1f2507b3bd458dbea0b2bb05b4d", - "2beedb04b05c6988f6a67500bb813faf2cae0d580c9253b6339e4a3337bb6c08", - "77c15dcf44610e41696bab758943eff1409333e4d5a11bbe72c8f6c395e9f848", - "42a83b985011d12303db1a800f2610f74aa71cdf19c67d54ce6c9ed951e9093e", - "ceed35507b5c93ead5989119b9ba342cfe38e6e638ba6eea343a55475de2800b", - "43e0e9d95af4dc36483cdd1968d2b7eeb8611fcce77f3a4e7d059ae43e509604", - "b2f3600df3368ef8a0bb85ab22f41fc0e5f4fdd54be8167a5c3cd4b08db04903", - "4002534307f8b62a9bf67ff641ddc60fef593b17c3341239e95bdb3e579bfdc8", - "4dfa12defc60319021b681b3ff84a10a511958c850939ed45635934ba4979147", - "1331f6d874a4ed3bc4a2c6e9c74331d3039796314beee3b7152fcdba5556304e", - "dd5e9f70ae740073ca0204df60763fb6036c45709bf4a7bb4e671412fad65da3", - "5ae026cfc060d55600717e55b8a12e116d1d0df34af831979057607c2d9c2f76", - "b601ac425d5dbf9e1735c5e2d5bdb79ca98b3d5be4a2cfd6f2273f150e064d9d", - "fefb1dda1845312b5fce6b81b2be205af2f3a274f5a212f66c0d9fc33d7ae535", - "334ae0c4693d23935a7e8e043ebbde21e168a7cba3fa507c9be41d7681e049ce", - "2c4bde40214fcc3bfc47d4cf434b629acbe9157f8fd0282540331de7942cf09d", - "85a268f9d7772f990c36b42b0a331adc92b5941de0b862d5d89a347cbf8faab0", - }; - - char *x[] = { - "700c48f77f56584c5cc632ca65640db91b6bacce3a4df6b42ce7cc838833d287", - "809f04289c64348c01515eb03d5ce7ac1a8cb9498f5caa50197e58d43a86a7ae", - "a2339c12d4a03c33546de533268b4ad667debf458b464d77443636440ee7fec3", - "df3989b9fa55495719b3cf46dccd28b5153f7808191dd518eff0c3cff2b705ed", - "41192d2813e79561e6a1d6f53c8bc1a433a199c835e141b05a74a97b0faeb922", - "33e82092a0f1fb38f5649d5867fba28b503172b7035574bf8e5b7100a3052792", - "6a9e0c3f916e4e315c91147be571686d90464e8bf981d34a90b6353bca6eeba7", - "a9c0acade55c2a73ead1a86fb0a9713223c82475791cd0e210b046412ce224bb", - "94e94f16a98255fff2b9ac0c9598aac35487b3232d3231bd93b7db7df36f9eb9", - "e099bf2a4d557460b5544430bbf6da11004d127cb5d67f64ab07c94fcdf5274f", - "f75a5fe56bda34f3c1396296626ef012dc07e4825838778a645c8248cff01658", - "2db4540d50230756158abf61d9835712b6486c74312183ccefcaef2797b7674d", - "cd94fc9497e8990750309e9a8534fd114b0a6e54da89c4796101897041d14ecb", - "15b9e467af4d290c417402e040426fe4cf236bae72baa392ed89780dfccdb471", - "49c503ba6c4fa605182e186b5e81113f075bc11dcfd51c932fb21e951eee2fa1", - "19b38de39fdd2f70f7091631a4f75d1993740ba9429162c2a45312401636b29c", - "2c91c61f33adfe9311c942fdbff6ba47020feff416b7bb63cec13faf9b099954", - "a28a2edf58025668f724aaf83a50956b7ac1cfbbff79b08c3bf87dfd2828d767", - "a2ef857a081f9d6eb206a81c4cf78a802bdf598ae380c8886ecd85fdc1ed7644", - "ccd8a2d86bc92f2e01bce4d6922cf7fe1626aed044685e95e2eebd464505f01f", - "c188ffc8947f7301fb7b53e36746097c2134bf9cc981ba74b4e9c4361f595e4e", - "317e1020ff53fccef18bf47bb7f2dd7707fb7b7a7578e04f35b3beed222a0eb6", - "45fb02b2ceb9d7c79d9c2fa93e9c7967c2fa4df5789f9640b24264b1e524fcb1", - "a19ef7bff98ada781842fbfc51a47aff39b5935a1c7d9625c8d323d511c92de6", - "356c5a444c049a52fee0adeb7e5d82ae5aa83030bfff31bbf8ce2096cf161c4b", - }; - - char *y[] = { - "db71e509e3fd9b060ddb20ba5c51dcc5948d46fbf640dfe0441782cab85fa4ac", - "b29d84e811197f25eba8f5194092cb6ff440e26d4421011372461f579271cda3", - "ef48a3ab26e20220bcda2c1851076839dae88eae962869a497bf73cb66faf536", - "422294ff46003429d739a33206c8752552c8ba54a270defc06e221e0feaf6ac4", - "1af98cc45e98a7e041b01cf35f462b7562281351c8ebf3ffa02e33a0722a1328", - "f2cf6b601e0a05945e335550bf648d782f46186c772c0f20d3cd0d6b8ca14b2f", - "40f9bead39c2f2bcc2602f75b8a73ec7bdffcbcead159d0174c6c4d3c5357f05", - "f6de0afa20e93e078467c053d241903edad734c6b403ba758c2b5ff04c9d4229", - "d8049a43579cfa90b8093a94416cbefbf93386f15b3f6e190b6e3455fedfe69a", - "d9c50dbe70d714edb5e221f4e020610eeb6270517e688ca64fb0e98c7ef8c1c5", - "33bbdf1b1772d8059df568b061f3f1122f28a8d819167c97be448e3dc3fb0c3c", - "62f57f314e3f3495dc4e099012f5e0ba71770f9660a1eada54104cdfde77243e", - "c3def4b5fe04faee0a11932229fff563637bfdee0e79c6deeaf449f85401c5c4", - "cdf4e9170fb904302b8fd93a820ba8cc7ed4efd3a6f2d6b05b80b2ff2aee4e77", - "8af706ff0922d87b3f0c5e4e31d8b259aeb260a9269643ed520a13bb25da5924", - "09aed7232b28e060941741b6828bcdfa2bc49cc844f3773611504f82a390a5ae", - "6cab31b06419e5221fca014fb84ec870622a1b12bab5ae43682aa7ea73ea08d0", - "dfa7bfffd4c766b86abeaf5c99b6e50cb9ccc9d9d00b7ffc7804b0491b67bc03", - "563c4c20419f07bc17d0539fade1855e34839515b892c0f5d26561f97fa04d1a", - "e9ddd583a9635a667777d5b8a8f31b0f79eba12c75023410b54b8567dddc0f38", - "bf7d2f2056e72421ef393f0c0f2b0e00130e3cac4abbcc00286168e85ec55051", - "09420ce5a19d77c6fe1ee587e6a49fbaf8f280e8df033d75403302e5a27db2ae", - "5c6e8ecf1f7d3023893b7b1ca1e4d178972ee2a230757ddc564ffe37f5c5a321", - "e9c184df75c955e02e02e400ffe45f78f339e1afe6d056fb3245f4700ce606ef", - "57d128de8b2a57a094d1a001e572173f96e8866ae352bf29cddaf92fc85b2f92", - }; - - char *Z[] = { - "46fc62106420ff012e54a434fbdd2d25ccc5852060561e68040dd7778997bd7b", - "057d636096cb80b67a8c038c890e887d1adfa4195e9b3ce241c8a778c59cda67", - "2d457b78b4614132477618a5b077965ec90730a8c81a1c75d6d4ec68005d67ec", - "96441259534b80f6aee3d287a6bb17b5094dd4277d9e294f8fe73e48bf2a0024", - "19d44c8d63e8e8dd12c22a87b8cd4ece27acdde04dbf47f7f27537a6999a8e62", - "664e45d5bba4ac931cd65d52017e4be9b19a515f669bea4703542a2c525cd3d3", - "ca342daa50dc09d61be7c196c85e60a80c5cb04931746820be548cdde055679d", - "35aa9b52536a461bfde4e85fc756be928c7de97923f0416c7a3ac8f88b3d4489", - "605c16178a9bc875dcbff54d63fe00df699c03e8a888e9e94dfbab90b25f39b4", - "f96e40a1b72840854bb62bc13c40cc2795e373d4e715980b261476835a092e0b", - "8388fa79c4babdca02a8e8a34f9e43554976e420a4ad273c81b26e4228e9d3a3", - "72877cea33ccc4715038d4bcbdfe0e43f42a9e2c0c3b017fc2370f4b9acbda4a", - "e4e7408d85ff0e0e9c838003f28cdbd5247cdce31f32f62494b70e5f1bc36307", - "ed56bcf695b734142c24ecb1fc1bb64d08f175eb243a31f37b3d9bb4407f3b96", - "bc5c7055089fc9d6c89f83c1ea1ada879d9934b2ea28fcf4e4a7e984b28ad2cf", - "9a4e8e657f6b0e097f47954a63c75d74fcba71a30d83651e3e5a91aa7ccd8343", - "3ca1fc7ad858fb1a6aba232542f3e2a749ffc7203a2374a3f3d3267f1fc97b78", - "1aaabe7ee6e4a6fa732291202433a237df1b49bc53866bfbe00db96a0f58224f", - "430e6a4fba4449d700d2733e557f66a3bf3d50517c1271b1ddae1161b7ac798c", - "1ce9e6740529499f98d1f1d71329147a33df1d05e4765b539b11cf615d6974d3", - "4690e3743c07d643f1bc183636ab2a9cb936a60a802113c49bb1b3f2d0661660", - "30c2261bd0004e61feda2c16aa5e21ffa8d7e7f7dbf6ec379a43b48e4b36aeb0", - "2adae4a138a239dcd93c243a3803c3e4cf96e37fe14e6a9b717be9599959b11c", - "2e277ec30f5ea07d6ce513149b9479b96e07f4b6913b1b5c11305c1444a1bc0b", - "1e51373bd2c6044c129c436e742a55be2a668a85ae08441b6756445df5493857", - }; - - TC_PRINT("Test #1: ECDH"); - TC_PRINT("NIST-p256\n"); - - result = ecdh_vectors(x, y, d, Z, 25, verbose); - - /**TESTPOINT: Check result*/ - zassert_false(result, "ECDH test failed"); - return result; -} - -int cavp_keygen(bool verbose) -{ - unsigned int result = TC_PASS; - /* - * [P-256, B.4.2 Key Pair Generation by Testing Candidates] - */ - char *d[] = { - "c9806898a0334916c860748880a541f093b579a9b1f32934d86c363c39800357", - "710735c8388f48c684a97bd66751cc5f5a122d6b9a96a2dbe73662f78217446d", - "78d5d8b7b3e2c16b3e37e7e63becd8ceff61e2ce618757f514620ada8a11f6e4", - "2a61a0703860585fe17420c244e1de5a6ac8c25146b208ef88ad51ae34c8cb8c", - "01b965b45ff386f28c121c077f1d7b2710acc6b0cb58d8662d549391dcf5a883", - "fac92c13d374c53a085376fe4101618e1e181b5a63816a84a0648f3bdc24e519", - "f257a192dde44227b3568008ff73bcf599a5c45b32ab523b5b21ca582fef5a0a", - "add67e57c42a3d28708f0235eb86885a4ea68e0d8cfd76eb46134c596522abfd", - "4494860fd2c805c5c0d277e58f802cff6d731f76314eb1554142a637a9bc5538", - "d40b07b1ea7b86d4709ef9dc634c61229feb71abd63dc7fc85ef46711a87b210", - }; - - char *x[] = { - "d0720dc691aa80096ba32fed1cb97c2b620690d06de0317b8618d5ce65eb728f", - "f6836a8add91cb182d8d258dda6680690eb724a66dc3bb60d2322565c39e4ab9", - "76711126cbb2af4f6a5fe5665dad4c88d27b6cb018879e03e54f779f203a854e", - "e1aa7196ceeac088aaddeeba037abb18f67e1b55c0a5c4e71ec70ad666fcddc8", - "1f038c5422e88eec9e88b815e8f6b3e50852333fc423134348fc7d79ef8e8a10", - "7258f2ab96fc84ef6ccb33e308cd392d8b568ea635730ceb4ebd72fa870583b9", - "d2e01411817b5512b79bbbe14d606040a4c90deb09e827d25b9f2fc068997872", - "55bed2d9c029b7f230bde934c7124ed52b1330856f13cbac65a746f9175f85d7", - "5190277a0c14d8a3d289292f8a544ce6ea9183200e51aec08440e0c1a463a4e4", - "fbcea7c2827e0e8085d7707b23a3728823ea6f4878b24747fb4fd2842d406c73", - }; - - char *y[] = { - "9681b517b1cda17d0d83d335d9c4a8a9a9b0b1b3c7106d8f3c72bc5093dc275f", - "1f837aa32864870cb8e8d0ac2ff31f824e7beddc4bb7ad72c173ad974b289dc2", - "a26df39960ab5248fd3620fd018398e788bd89a3cea509b352452b69811e6856", - "d7d35bdce6dedc5de98a7ecb27a9cd066a08f586a733b59f5a2cdb54f971d5c8", - "43a047cb20e94b4ffb361ef68952b004c0700b2962e0c0635a70269bc789b849", - "489807ca55bdc29ca5c8fe69b94f227b0345cccdbe89975e75d385cc2f6bb1e2", - "503f138f8bab1df2c4507ff663a1fdf7f710e7adb8e7841eaa902703e314e793", - "32805e311d583b4e007c40668185e85323948e21912b6b0d2cda8557389ae7b0", - "ecd98514821bd5aaf3419ab79b71780569470e4fed3da3c1353b28fe137f36eb", - "2393c85f1f710c5afc115a39ba7e18abe03f19c9d4bb3d47d19468b818efa535", - }; - - TC_PRINT("Test #2: ECC KeyGen "); - TC_PRINT("NIST-p256\n"); - - result = keygen_vectors(d, x, y, 10, verbose); - - /**TESTPOINT: Check result*/ - zassert_false(result, "ECC KeyGen test failed"); - return result; -} - -/* Test ecc_make_keys, and also as keygen part of other tests */ -int pkv_vectors(char **qx_vec, char **qy_vec, int res_vec[], int tests, - bool verbose) -{ - - unsigned int pub[2 * NUM_ECC_WORDS]; - uint8_t _public[2 * NUM_ECC_BYTES]; - int rc; - int exp_rc; - unsigned int result = TC_PASS; - const struct uECC_Curve_t *curve = uECC_secp256r1(); - - for (int i = 0; i < tests; i++) { - exp_rc = res_vec[i]; - - if (strlen(qx_vec[i]) > 2 * NUM_ECC_BYTES || - strlen(qy_vec[i]) > 2 * NUM_ECC_BYTES) { - /* invalid input to ECC digit conversion (string2native()) */ - rc = -2; - } else { - string2scalar(pub, NUM_ECC_WORDS, qx_vec[i]); - string2scalar(pub + NUM_ECC_WORDS, NUM_ECC_WORDS, qy_vec[i]); - - uECC_vli_nativeToBytes(_public, NUM_ECC_BYTES, pub); - uECC_vli_nativeToBytes(_public + NUM_ECC_BYTES, - NUM_ECC_BYTES, pub + NUM_ECC_WORDS); - - rc = uECC_valid_public_key(_public, curve); - } - - /* - * map to CAVP error codes - * 0 => 0 - success - * -1 => ? - (x,y) = (0,0) (not covered) - * -2 => 1 - out of bounds (pubverify or ecc import) - * -3 => 2 - not on curve - * -4 => ? - public key is the group generator - */ - - if (rc == -3) { - rc = 2; - } - if (rc == -2) { - rc = 1; - } - - result = check_code(i, exp_rc, rc, verbose); - - /**TESTPOINT: Check result*/ - zassert_false(result, "PubKey verification failed"); - } - return result; -} - -int cavp_pkv(bool verbose) -{ - /* - * [P-256] - */ - char *x[] = { - "e0f7449c5588f24492c338f2bc8f7865f755b958d48edb0f2d0056e50c3fd5b7", - "d17c446237d9df87266ba3a91ff27f45abfdcb77bfd83536e92903efb861a9a9", - "17875397ae87369365656d490e8ce956911bd97607f2aff41b56f6f3a61989826", - "f2d1c0dc0852c3d8a2a2500a23a44813ccce1ac4e58444175b440469ffc12273", - "10b0ca230fff7c04768f4b3d5c75fa9f6c539bea644dffbec5dc796a213061b58", - "2c1052f25360a15062d204a056274e93cbe8fc4c4e9b9561134ad5c15ce525da", - "a40d077a87dae157d93dcccf3fe3aca9c6479a75aa2669509d2ef05c7de6782f", - "2633d398a3807b1895548adbb0ea2495ef4b930f91054891030817df87d4ac0a", - "14bf57f76c260b51ec6bbc72dbd49f02a56eaed070b774dc4bad75a54653c3d56", - "2fa74931ae816b426f484180e517f5050c92decfc8daf756cd91f54d51b302f1", - "f8c6dd3181a76aa0e36c2790bba47041acbe7b1e473ff71eee39a824dc595ff0", - "7a81a7e0b015252928d8b36e4ca37e92fdc328eb25c774b4f872693028c4be38", - }; - - char *y[] = { - "86d7e9255d0f4b6f44fa2cd6f8ba3c0aa828321d6d8cc430ca6284ce1d5b43a0", - "1eabb6a349ce2cd447d777b6739c5fc066add2002d2029052c408d0701066231c", - "980a3c4f61b9692633fbba5ef04c9cb546dd05cdec9fa8428b8849670e2fba92", - "32bfe992831b305d8c37b9672df5d29fcb5c29b4a40534683e3ace23d24647dd", - "f5edf37c11052b75f771b7f9fa050e353e464221fec916684ed45b6fead38205", - "ced9783713a8a2a09eff366987639c625753295d9a85d0f5325e32dedbcada0b", - "503d86b87d743ba20804fd7e7884aa017414a7b5b5963e0d46e3a9611419ddf3", - "d6b2f738e3873cc8364a2d364038ce7d0798bb092e3dd77cbdae7c263ba618d2", - "7a231a23bf8b3aa31d9600d888a0678677a30e573decd3dc56b33f365cc11236", - "5b994346137988c58c14ae2152ac2f6ad96d97decb33099bd8a0210114cd1141", - "9c965f227f281b3072b95b8daf29e88b35284f3574462e268e529bbdc50e9e52", - "08862f7335147261e7b1c3d055f9a316e4cab7daf99cc09d1c647f5dd6e7d5bb", - }; - - int results[] = { 0, 1, 1, 2, 1, 0, 2, 0, 1, 0, 2, 2 }; - - TC_PRINT("Test #3: PubKeyVerify "); - TC_PRINT("NIST-p256-SHA2-256\n"); - - return pkv_vectors(x, y, results, 12, verbose); -} - -int montecarlo_ecdh(int num_tests, bool verbose) -{ - int i; - uint8_t private1[NUM_ECC_BYTES] = { 0 }; - uint8_t private2[NUM_ECC_BYTES] = { 0 }; - uint8_t public1[2 * NUM_ECC_BYTES] = { 0 }; - uint8_t public2[2 * NUM_ECC_BYTES] = { 0 }; - uint8_t secret1[NUM_ECC_BYTES] = { 0 }; - uint8_t secret2[NUM_ECC_BYTES] = { 0 }; - - const struct uECC_Curve_t *curve = uECC_secp256r1(); - - TC_PRINT("Test #4: Monte Carlo (%d Randomized EC-DH key-exchange) ", num_tests); - TC_PRINT("NIST-p256\n "); - - for (i = 0; i < num_tests; ++i) { - if (verbose) { - TC_PRINT("."); - } - - if (!uECC_make_key(public1, private1, curve) || - !uECC_make_key(public2, private2, curve)) { - zassert_true(0, "uECC_make_key() failed"); - } - - if (!uECC_shared_secret(public2, private1, secret1, curve)) { - zassert_true(0, "shared_secret() failed (1)"); - } - - if (!uECC_shared_secret(public1, private2, secret2, curve)) { - zassert_true(0, "shared_secret() failed (2)"); - } - - if (memcmp(secret1, secret2, sizeof(secret1)) != 0) { - TC_PRINT("Shared secrets are not identical!\n"); - TC_PRINT("Private key 1 = "); - vli_print_bytes(private1, 32); - TC_PRINT("\nPrivate key 2 = "); - vli_print_bytes(private2, 32); - TC_PRINT("\nPublic key 1 = "); - vli_print_bytes(public1, 64); - TC_PRINT("\nPublic key 2 = "); - vli_print_bytes(public2, 64); - TC_PRINT("\nShared secret 1 = "); - vli_print_bytes(secret1, 32); - TC_PRINT("\nShared secret 2 = "); - vli_print_bytes(secret2, 32); - TC_PRINT("\n"); - } - } - - TC_PRINT("\n"); - return TC_PASS; -} - -ZTEST(tinycrypt, test_ecc_dh) -{ - unsigned int result = TC_PASS; - - - /* Setup of the Cryptographically Secure PRNG. */ - uECC_set_rng(&default_CSPRNG); - - bool verbose = true; - - TC_PRINT("Performing cavp_ecdh test:\n"); - result = cavp_ecdh(verbose); - - /**TESTPOINT: Check cavp_ecdh*/ - zassert_false(result, "cavp_ecdh test failed"); - - TC_PRINT("Performing cavp_keygen test:\n"); - result = cavp_keygen(verbose); - - /**TESTPOINT: Check cavp_keygen*/ - zassert_false(result, "cavp_keygen test failed"); - - TC_PRINT("Performing cavp_pkv test:\n"); - result = cavp_pkv(verbose); - - /**TESTPOINT: Check cavp_pkv*/ - zassert_false(result, "cavp_pkv test failed"); - - TC_PRINT("Performing montecarlo_ecdh test:\n"); - result = montecarlo_ecdh(10, verbose); - - /**TESTPOINT: Check cavp_ecdh*/ - zassert_false(result, "montecarlo_ecdh test failed"); - - TC_PRINT("All EC-DH tests succeeded!\n"); -} diff --git a/tests/crypto/tinycrypt/src/ecc_dsa.c b/tests/crypto/tinycrypt/src/ecc_dsa.c deleted file mode 100644 index 4423bdfa54207..0000000000000 --- a/tests/crypto/tinycrypt/src/ecc_dsa.c +++ /dev/null @@ -1,652 +0,0 @@ -/* test_ecc_ecdsa.c - TinyCrypt implementation of some EC-DSA tests */ - -/* Copyright (c) 2014, Kenneth MacKay - * 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. - * - * 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 HOLDER 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.*/ - -/* - * Copyright (C) 2017 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. - * - * test_ecc_ecdsa.c -- Implementation of some EC-DSA tests - * - */ - -#define ENABLE_TESTS 1 - -#include -#include -#include -#include -#include -#include -#include -#include "test_ecc_utils.h" -#include -#include - -#include -#include -#include -#include - -/* Maximum size of message to be signed. */ -#define BUF_SIZE 256 - -int sign_vectors(TCSha256State_t hash, char **d_vec, char **k_vec, - char **msg_vec, char **qx_vec, char **qy_vec, char **r_vec, - char **s_vec, int tests, bool verbose) -{ - - unsigned int k[NUM_ECC_WORDS]; - unsigned int private[NUM_ECC_WORDS]; - uint8_t private_bytes[NUM_ECC_BYTES]; - unsigned int sig[2 * NUM_ECC_WORDS]; - uint8_t sig_bytes[2 * NUM_ECC_BYTES]; - unsigned int digest[TC_SHA256_DIGEST_SIZE / 4]; - uint8_t digest_bytes[TC_SHA256_DIGEST_SIZE]; - unsigned int result = TC_PASS; - - /* expected outputs (converted input vectors) */ - unsigned int exp_r[NUM_ECC_WORDS]; - unsigned int exp_s[NUM_ECC_WORDS]; - - uint8_t msg[BUF_SIZE]; - size_t msglen; - - for (int i = 0; i < tests; i++) { - - /* use keygen test to generate and validate pubkey */ - keygen_vectors(d_vec + i, qx_vec + i, qy_vec + i, 1, false); - string2scalar(private, NUM_ECC_WORDS, d_vec[i]); - uECC_vli_nativeToBytes(private_bytes, NUM_ECC_BYTES, private); - - /* validate ECDSA: hash message, sign digest, check r+s */ - (void)memset(k, 0, NUM_ECC_BYTES); - string2scalar(k, NUM_ECC_WORDS, k_vec[i]); - string2scalar(exp_r, NUM_ECC_WORDS, r_vec[i]); - string2scalar(exp_s, NUM_ECC_WORDS, s_vec[i]); - - msglen = hex2bin(msg_vec[i], strlen(msg_vec[i]), msg, BUF_SIZE); - - /**TESTPOINT: Check if msg imported*/ - zassert_true(msglen, "failed to import message!"); - - tc_sha256_init(hash); - tc_sha256_update(hash, msg, msglen); - tc_sha256_final(digest_bytes, hash); - - /* if digest larger than ECC scalar, drop the end - * if digest smaller than ECC scalar, zero-pad front */ - int hash_dwords = TC_SHA256_DIGEST_SIZE / 4; - if (NUM_ECC_WORDS < hash_dwords) { - hash_dwords = NUM_ECC_WORDS; - } - - (void)memset(digest, 0, NUM_ECC_BYTES - 4 * hash_dwords); - uECC_vli_bytesToNative(digest + (NUM_ECC_WORDS - hash_dwords), - digest_bytes, TC_SHA256_DIGEST_SIZE); - - /**TESTPOINT: Check ECDSA_sign*/ - zassert_true(uECC_sign_with_k(private_bytes, digest_bytes, - sizeof(digest_bytes), k, sig_bytes, uECC_secp256r1()), - "ECDSA_sign failed!"); - - uECC_vli_bytesToNative(sig, sig_bytes, NUM_ECC_BYTES); - uECC_vli_bytesToNative(sig + NUM_ECC_WORDS, sig_bytes + NUM_ECC_BYTES, NUM_ECC_BYTES); - - result = check_ecc_result(i, "sig.r", exp_r, sig, NUM_ECC_WORDS, verbose); - - /**TESTPOINT: Check ECC result*/ - zassert_false(result, "ECC check failed"); - - result = check_ecc_result(i, "sig.s", exp_s, sig + NUM_ECC_WORDS, NUM_ECC_WORDS, verbose); - - /**TESTPOINT: Check ECC result*/ - zassert_false(result, "ECC check failed"); - } - - result = TC_PASS; - return result; -} - -int cavp_sign(bool verbose) -{ - - /* - * [P-256,SHA-256] - */ - char *d[] = { - "519b423d715f8b581f4fa8ee59f4771a5b44c8130b4e3eacca54a56dda72b464", - "0f56db78ca460b055c500064824bed999a25aaf48ebb519ac201537b85479813", - "e283871239837e13b95f789e6e1af63bf61c918c992e62bca040d64cad1fc2ef", - "a3d2d3b7596f6592ce98b4bfe10d41837f10027a90d7bb75349490018cf72d07", - "53a0e8a8fe93db01e7ae94e1a9882a102ebd079b3a535827d583626c272d280d", - "4af107e8e2194c830ffb712a65511bc9186a133007855b49ab4b3833aefc4a1d", - "78dfaa09f1076850b3e206e477494cddcfb822aaa0128475053592c48ebaf4ab", - "80e692e3eb9fcd8c7d44e7de9f7a5952686407f90025a1d87e52c7096a62618a", - "5e666c0db0214c3b627a8e48541cc84a8b6fd15f300da4dff5d18aec6c55b881", - "f73f455271c877c4d5334627e37c278f68d143014b0a05aa62f308b2101c5308", - "b20d705d9bd7c2b8dc60393a5357f632990e599a0975573ac67fd89b49187906", - "d4234bebfbc821050341a37e1240efe5e33763cbbb2ef76a1c79e24724e5a5e7", - "b58f5211dff440626bb56d0ad483193d606cf21f36d9830543327292f4d25d8c", - "54c066711cdb061eda07e5275f7e95a9962c6764b84f6f1f3ab5a588e0a2afb1", - "34fa4682bf6cb5b16783adcd18f0e6879b92185f76d7c920409f904f522db4b1", - }; - - char *k[] = { - "94a1bbb14b906a61a280f245f9e93c7f3b4a6247824f5d33b9670787642a68de", - "6d3e71882c3b83b156bb14e0ab184aa9fb728068d3ae9fac421187ae0b2f34c6", - "ad5e887eb2b380b8d8280ad6e5ff8a60f4d26243e0124c2f31a297b5d0835de2", - "24fc90e1da13f17ef9fe84cc96b9471ed1aaac17e3a4bae33a115df4e5834f18", - "5d833e8d24cc7a402d7ee7ec852a3587cddeb48358cea71b0bedb8fabe84e0c4", - "e18f96f84dfa2fd3cdfaec9159d4c338cd54ad314134f0b31e20591fc238d0ab", - "295544dbb2da3da170741c9b2c6551d40af7ed4e891445f11a02b66a5c258a77", - "7c80fd66d62cc076cef2d030c17c0a69c99611549cb32c4ff662475adbe84b22", - "2e7625a48874d86c9e467f890aaa7cd6ebdf71c0102bfdcfa24565d6af3fdce9", - "62f8665fd6e26b3fa069e85281777a9b1f0dfd2c0b9f54a086d0c109ff9fd615", - "72b656f6b35b9ccbc712c9f1f3b1a14cbbebaec41c4bca8da18f492a062d6f6f", - "d926fe10f1bfd9855610f4f5a3d666b1a149344057e35537373372ead8b1a778", - "e158bf4a2d19a99149d9cdb879294ccb7aaeae03d75ddd616ef8ae51a6dc1071", - "646fe933e96c3b8f9f507498e907fdd201f08478d0202c752a7c2cfebf4d061a", - "a6f463ee72c9492bc792fe98163112837aebd07bab7a84aaed05be64db3086f4", - }; - - char *Msg[] = { - "5905238877c77421f73e43ee3da6f2d9e2ccad5fc942dcec0cbd25482935faaf416983fe16" - "5b1a045ee2bcd2e6dca3bdf46c4310a7461f9a37960ca672d3feb5473e253605fb1ddfd280" - "65b53cb5858a8ad28175bf9bd386a5e471ea7a65c17cc934a9d791e91491eb3754d0379979" - "0fe2d308d16146d5c9b0d0debd97d79ce8", - "c35e2f092553c55772926bdbe87c9796827d17024dbb9233a545366e2e5987dd344deb72df" - "987144b8c6c43bc41b654b94cc856e16b96d7a821c8ec039b503e3d86728c494a967d83011" - "a0e090b5d54cd47f4e366c0912bc808fbb2ea96efac88fb3ebec9342738e225f7c7c2b011c" - "e375b56621a20642b4d36e060db4524af1", - "3c054e333a94259c36af09ab5b4ff9beb3492f8d5b4282d16801daccb29f70fe61a0b37ffe" - "f5c04cd1b70e85b1f549a1c4dc672985e50f43ea037efa9964f096b5f62f7ffdf8d6bfb2cc" - "859558f5a393cb949dbd48f269343b5263dcdb9c556eca074f2e98e6d94c2c29a677afaf80" - "6edf79b15a3fcd46e7067b7669f83188ee", - "0989122410d522af64ceb07da2c865219046b4c3d9d99b01278c07ff63eaf1039cb787ae9e" - "2dd46436cc0415f280c562bebb83a23e639e476a02ec8cff7ea06cd12c86dcc3adefbf1a9e" - "9a9b6646c7599ec631b0da9a60debeb9b3e19324977f3b4f36892c8a38671c8e1cc8e50fcd" - "50f9e51deaf98272f9266fc702e4e57c30", - "dc66e39f9bbfd9865318531ffe9207f934fa615a5b285708a5e9c46b7775150e818d7f24d2" - "a123df3672fff2094e3fd3df6fbe259e3989dd5edfcccbe7d45e26a775a5c4329a084f057c" - "42c13f3248e3fd6f0c76678f890f513c32292dd306eaa84a59abe34b16cb5e38d0e885525d" - "10336ca443e1682aa04a7af832b0eee4e7", - "600974e7d8c5508e2c1aab0783ad0d7c4494ab2b4da265c2fe496421c4df238b0be25f2565" - "9157c8a225fb03953607f7df996acfd402f147e37aee2f1693e3bf1c35eab3ae360a2bd91d" - "04622ea47f83d863d2dfecb618e8b8bdc39e17d15d672eee03bb4ce2cc5cf6b217e5faf3f3" - "36fdd87d972d3a8b8a593ba85955cc9d71", - "dfa6cb9b39adda6c74cc8b2a8b53a12c499ab9dee01b4123642b4f11af336a91a5c9ce0520" - "eb2395a6190ecbf6169c4cba81941de8e76c9c908eb843b98ce95e0da29c5d4388040264e0" - "5e07030a577cc5d176387154eabae2af52a83e85c61c7c61da930c9b19e45d7e34c8516dc3" - "c238fddd6e450a77455d534c48a152010b", - "51d2547cbff92431174aa7fc7302139519d98071c755ff1c92e4694b58587ea560f72f32fc" - "6dd4dee7d22bb7387381d0256e2862d0644cdf2c277c5d740fa089830eb52bf79d1e75b859" - "6ecf0ea58a0b9df61e0c9754bfcd62efab6ea1bd216bf181c5593da79f10135a9bc6e164f1" - "854bc8859734341aad237ba29a81a3fc8b", - "558c2ac13026402bad4a0a83ebc9468e50f7ffab06d6f981e5db1d082098065bcff6f21a7a" - "74558b1e8612914b8b5a0aa28ed5b574c36ac4ea5868432a62bb8ef0695d27c1e3ceaf75c7" - "b251c65ddb268696f07c16d2767973d85beb443f211e6445e7fe5d46f0dce70d58a4cd9fe7" - "0688c035688ea8c6baec65a5fc7e2c93e8", - "4d55c99ef6bd54621662c3d110c3cb627c03d6311393b264ab97b90a4b15214a5593ba2510" - "a53d63fb34be251facb697c973e11b665cb7920f1684b0031b4dd370cb927ca7168b0bf8ad" - "285e05e9e31e34bc24024739fdc10b78586f29eff94412034e3b606ed850ec2c1900e8e681" - "51fc4aee5adebb066eb6da4eaa5681378e", - "f8248ad47d97c18c984f1f5c10950dc1404713c56b6ea397e01e6dd925e903b4fadfe2c9e8" - "77169e71ce3c7fe5ce70ee4255d9cdc26f6943bf48687874de64f6cf30a012512e787b8805" - "9bbf561162bdcc23a3742c835ac144cc14167b1bd6727e940540a9c99f3cbb41fb1dcb00d7" - "6dda04995847c657f4c19d303eb09eb48a", - "3b6ee2425940b3d240d35b97b6dcd61ed3423d8e71a0ada35d47b322d17b35ea0472f35edd" - "1d252f87b8b65ef4b716669fc9ac28b00d34a9d66ad118c9d94e7f46d0b4f6c2b2d339fd6b" - "cd351241a387cc82609057048c12c4ec3d85c661975c45b300cb96930d89370a327c98b67d" - "efaa89497aa8ef994c77f1130f752f94a4", - "c5204b81ec0a4df5b7e9fda3dc245f98082ae7f4efe81998dcaa286bd4507ca840a53d21b0" - "1e904f55e38f78c3757d5a5a4a44b1d5d4e480be3afb5b394a5d2840af42b1b4083d40afbf" - "e22d702f370d32dbfd392e128ea4724d66a3701da41ae2f03bb4d91bb946c7969404cb544f" - "71eb7a49eb4c4ec55799bda1eb545143a7", - "72e81fe221fb402148d8b7ab03549f1180bcc03d41ca59d7653801f0ba853add1f6d29edd7" - "f9abc621b2d548f8dbf8979bd16608d2d8fc3260b4ebc0dd42482481d548c7075711b57596" - "49c41f439fad69954956c9326841ea6492956829f9e0dc789f73633b40f6ac77bcae6dfc79" - "30cfe89e526d1684365c5b0be2437fdb01", - "21188c3edd5de088dacc1076b9e1bcecd79de1003c2414c3866173054dc82dde85169baa77" - "993adb20c269f60a5226111828578bcc7c29e6e8d2dae81806152c8ba0c6ada1986a1983eb" - "eec1473a73a04795b6319d48662d40881c1723a706f516fe75300f92408aa1dc6ae4288d20" - "46f23c1aa2e54b7fb6448a0da922bd7f34", - }; - - char *Qx[] = { - "1ccbe91c075fc7f4f033bfa248db8fccd3565de94bbfb12f3c59ff46c271bf83", - "e266ddfdc12668db30d4ca3e8f7749432c416044f2d2b8c10bf3d4012aeffa8a", - "74ccd8a62fba0e667c50929a53f78c21b8ff0c3c737b0b40b1750b2302b0bde8", - "322f80371bf6e044bc49391d97c1714ab87f990b949bc178cb7c43b7c22d89e1", - "1bcec4570e1ec2436596b8ded58f60c3b1ebc6a403bc5543040ba82963057244", - "a32e50be3dae2c8ba3f5e4bdae14cf7645420d425ead94036c22dd6c4fc59e00", - "8bcfe2a721ca6d753968f564ec4315be4857e28bef1908f61a366b1f03c97479", - "a88bc8430279c8c0400a77d751f26c0abc93e5de4ad9a4166357952fe041e767", - "1bc487570f040dc94196c9befe8ab2b6de77208b1f38bdaae28f9645c4d2bc3a", - "b8188bd68701fc396dab53125d4d28ea33a91daf6d21485f4770f6ea8c565dde", - "51f99d2d52d4a6e734484a018b7ca2f895c2929b6754a3a03224d07ae61166ce", - "8fb287f0202ad57ae841aea35f29b2e1d53e196d0ddd9aec24813d64c0922fb7", - "68229b48c2fe19d3db034e4c15077eb7471a66031f28a980821873915298ba76", - "0a7dbb8bf50cb605eb2268b081f26d6b08e012f952c4b70a5a1e6e7d46af98bb", - "105d22d9c626520faca13e7ced382dcbe93498315f00cc0ac39c4821d0d73737", - }; - - char *Qy[] = { - "ce4014c68811f9a21a1fdb2c0e6113e06db7ca93b7404e78dc7ccd5ca89a4ca9", - "bfa86404a2e9ffe67d47c587ef7a97a7f456b863b4d02cfc6928973ab5b1cb39", - "29074e21f3a0ef88b9efdf10d06aa4c295cc1671f758ca0e4cd108803d0f2614", - "3c15d54a5cc6b9f09de8457e873eb3deb1fceb54b0b295da6050294fae7fd999", - "8af62a4c683f096b28558320737bf83b9959a46ad2521004ef74cf85e67494e1", - "d623bf641160c289d6742c6257ae6ba574446dd1d0e74db3aaa80900b78d4ae9", - "0f67576a30b8e20d4232d8530b52fb4c89cbc589ede291e499ddd15fe870ab96", - "2d365a1eef25ead579cc9a069b6abc1b16b81c35f18785ce26a10ba6d1381185", - "ec81602abd8345e71867c8210313737865b8aa186851e1b48eaca140320f5d8f", - "423f058810f277f8fe076f6db56e9285a1bf2c2a1dae145095edd9c04970bc4a", - "4737da963c6ef7247fb88d19f9b0c667cac7fe12837fdab88c66f10d3c14cad1", - "1f6daff1aa2dd2d6d3741623eecb5e7b612997a1039aab2e5cf2de969cfea573", - "303e8ee3742a893f78b810991da697083dd8f11128c47651c27a56740a80c24c", - "f26dd7d799930062480849962ccf5004edcfd307c044f4e8f667c9baa834eeae", - "6c47f3cbbfa97dfcebe16270b8c7d5d3a5900b888c42520d751e8faf3b401ef4", - }; - - char *R[] = { - "f3ac8061b514795b8843e3d6629527ed2afd6b1f6a555a7acabb5e6f79c8c2ac", - "976d3a4e9d23326dc0baa9fa560b7c4e53f42864f508483a6473b6a11079b2db", - "35fb60f5ca0f3ca08542fb3cc641c8263a2cab7a90ee6a5e1583fac2bb6f6bd1", - "d7c562370af617b581c84a2468cc8bd50bb1cbf322de41b7887ce07c0e5884ca", - "18caaf7b663507a8bcd992b836dec9dc5703c080af5e51dfa3a9a7c387182604", - "8524c5024e2d9a73bde8c72d9129f57873bbad0ed05215a372a84fdbc78f2e68", - "c5a186d72df452015480f7f338970bfe825087f05c0088d95305f87aacc9b254", - "9d0c6afb6df3bced455b459cc21387e14929392664bb8741a3693a1795ca6902", - "2f9e2b4e9f747c657f705bffd124ee178bbc5391c86d056717b140c153570fd9", - "1cc628533d0004b2b20e7f4baad0b8bb5e0673db159bbccf92491aef61fc9620", - "9886ae46c1415c3bc959e82b760ad760aab66885a84e620aa339fdf102465c42", - "490efd106be11fc365c7467eb89b8d39e15d65175356775deab211163c2504cb", - "e67a9717ccf96841489d6541f4f6adb12d17b59a6bef847b6183b8fcf16a32eb", - "b53ce4da1aa7c0dc77a1896ab716b921499aed78df725b1504aba1597ba0c64b", - "542c40a18140a6266d6f0286e24e9a7bad7650e72ef0e2131e629c076d962663", - }; - - char *S[] = { - "8bf77819ca05a6b2786c76262bf7371cef97b218e96f175a3ccdda2acc058903", - "1b766e9ceb71ba6c01dcd46e0af462cd4cfa652ae5017d4555b8eeefe36e1932", - "ee59d81bc9db1055cc0ed97b159d8784af04e98511d0a9a407b99bb292572e96", - "b46d9f2d8c4bf83546ff178f1d78937c008d64e8ecc5cbb825cb21d94d670d89", - "77c68928ac3b88d985fb43fb615fb7ff45c18ba5c81af796c613dfa98352d29c", - "d18c2caf3b1072f87064ec5e8953f51301cada03469c640244760328eb5a05cb", - "84a58f9e9d9e735344b316b1aa1ab5185665b85147dc82d92e969d7bee31ca30", - "d7f9ddd191f1f412869429209ee3814c75c72fa46a9cccf804a2f5cc0b7e739f", - "f5413bfd85949da8d83de83ab0d19b2986613e224d1901d76919de23ccd03199", - "880e0bbf82a8cf818ed46ba03cf0fc6c898e36fca36cc7fdb1d2db7503634430", - "2bf3a80bc04faa35ebecc0f4864ac02d349f6f126e0f988501b8d3075409a26c", - "644300fc0da4d40fb8c6ead510d14f0bd4e1321a469e9c0a581464c7186b7aa7", - "9ae6ba6d637706849a6a9fc388cf0232d85c26ea0d1fe7437adb48de58364333", - "d7c246dc7ad0e67700c373edcfdd1c0a0495fc954549ad579df6ed1438840851", - "4f7f65305e24a6bbb5cff714ba8f5a2cee5bdc89ba8d75dcbf21966ce38eb66f", - }; - - struct tc_sha256_state_struct sha256_ctx; - - TC_PRINT("Test #1: ECDSAsign "); - TC_PRINT("NIST-p256, SHA2-256\n"); - - return sign_vectors(&sha256_ctx, d, k, Msg, Qx, Qy, R, S, 15, verbose); -} - -int vrfy_vectors(TCSha256State_t hash, char **msg_vec, char **qx_vec, char **qy_vec, - char **r_vec, char **s_vec, int res_vec[], int tests, bool verbose) -{ - - const struct uECC_Curve_t *curve = uECC_secp256r1(); - unsigned int pub[2 * NUM_ECC_WORDS]; - uint8_t pub_bytes[2 * NUM_ECC_BYTES]; - unsigned int sig[2 * NUM_ECC_WORDS]; - uint8_t sig_bytes[2 * NUM_ECC_BYTES]; - uint8_t digest_bytes[TC_SHA256_DIGEST_SIZE]; - unsigned int digest[TC_SHA256_DIGEST_SIZE / 4]; - unsigned int result = TC_PASS; - - int rc; - int exp_rc; - - uint8_t msg[BUF_SIZE]; - size_t msglen; - - for (int i = 0; i < tests; i++) { - - string2scalar(pub, NUM_ECC_WORDS, qx_vec[i]); - string2scalar(pub + NUM_ECC_WORDS, NUM_ECC_WORDS, qy_vec[i]); - string2scalar(sig, NUM_ECC_WORDS, r_vec[i]); - string2scalar(sig + NUM_ECC_WORDS, NUM_ECC_WORDS, s_vec[i]); - - exp_rc = res_vec[i]; - - /* validate ECDSA: hash message, verify r+s */ - msglen = hex2bin(msg_vec[i], strlen(msg_vec[i]), msg, BUF_SIZE); - - /**TESTPOINT: Check if msg imported*/ - zassert_true(msglen, "failed to import message!"); - - tc_sha256_init(hash); - tc_sha256_update(hash, msg, msglen); - tc_sha256_final(digest_bytes, hash); - - /* if digest larger than ECC scalar, drop the end - * if digest smaller than ECC scalar, zero-pad front */ - int hash_dwords = TC_SHA256_DIGEST_SIZE / 4; - if (NUM_ECC_WORDS < hash_dwords) { - hash_dwords = NUM_ECC_WORDS; - } - - (void)memset(digest, 0, NUM_ECC_BYTES - 4 * hash_dwords); - uECC_vli_bytesToNative(digest + (NUM_ECC_WORDS - hash_dwords), digest_bytes, - TC_SHA256_DIGEST_SIZE); - - uECC_vli_nativeToBytes(pub_bytes, NUM_ECC_BYTES, pub); - uECC_vli_nativeToBytes(pub_bytes + NUM_ECC_BYTES, NUM_ECC_BYTES, - pub + NUM_ECC_WORDS); - - /* adapt return codes to match CAVP error: */ - if (0 != uECC_valid_public_key(pub_bytes, curve)) { - /* error 4 - Q changed */ - rc = 4; - } else { - uECC_vli_nativeToBytes(sig_bytes, NUM_ECC_BYTES, sig); - uECC_vli_nativeToBytes(sig_bytes + NUM_ECC_BYTES, NUM_ECC_BYTES, - sig + NUM_ECC_WORDS); - - rc = uECC_verify(pub_bytes, digest_bytes, sizeof(digest_bytes), sig_bytes, - uECC_secp256r1()); - /* CAVP expects 0 for success, others for fail */ - rc = !rc; - if (exp_rc != 0 && rc != 0) { - /* mimic CAVP code on errors. */ - rc = exp_rc; - } - } - - result = check_code(i, exp_rc, rc, verbose); - - /**TESTPOINT: Check result*/ - zassert_false(result, "check_code failed"); - } - return result; -} - -int cavp_verify(bool verbose) -{ - - /* - * [P-256,SHA-256] - */ - char *Msg[] = { - "e4796db5f785f207aa30d311693b3702821dff1168fd2e04c0836825aefd850d9aa60326d8" - "8cde1a23c7745351392ca2288d632c264f197d05cd424a30336c19fd09bb229654f0222fcb" - "881a4b35c290a093ac159ce13409111ff0358411133c24f5b8e2090d6db6558afc36f06ca1" - "f6ef779785adba68db27a409859fc4c4a0", - "069a6e6b93dfee6df6ef6997cd80dd2182c36653cef10c655d524585655462d683877f95ec" - "c6d6c81623d8fac4e900ed0019964094e7de91f1481989ae1873004565789cbf5dc56c62ae" - "dc63f62f3b894c9c6f7788c8ecaadc9bd0e81ad91b2b3569ea12260e93924fdddd3972af52" - "73198f5efda0746219475017557616170e", - "df04a346cf4d0e331a6db78cca2d456d31b0a000aa51441defdb97bbeb20b94d8d746429a3" - "93ba88840d661615e07def615a342abedfa4ce912e562af714959896858af817317a840dcf" - "f85a057bb91a3c2bf90105500362754a6dd321cdd86128cfc5f04667b57aa78c112411e42d" - "a304f1012d48cd6a7052d7de44ebcc01de", - "e1130af6a38ccb412a9c8d13e15dbfc9e69a16385af3c3f1e5da954fd5e7c45fd75e2b8c36" - "699228e92840c0562fbf3772f07e17f1add56588dd45f7450e1217ad239922dd9c32695dc7" - "1ff2424ca0dec1321aa47064a044b7fe3c2b97d03ce470a592304c5ef21eed9f93da56bb23" - "2d1eeb0035f9bf0dfafdcc4606272b20a3", - "73c5f6a67456ae48209b5f85d1e7de7758bf235300c6ae2bdceb1dcb27a7730fb68c950b7f" - "cada0ecc4661d3578230f225a875e69aaa17f1e71c6be5c831f22663bac63d0c7a9635edb0" - "043ff8c6f26470f02a7bc56556f1437f06dfa27b487a6c4290d8bad38d4879b334e341ba09" - "2dde4e4ae694a9c09302e2dbf443581c08", - "666036d9b4a2426ed6585a4e0fd931a8761451d29ab04bd7dc6d0c5b9e38e6c2b263ff6cb8" - "37bd04399de3d757c6c7005f6d7a987063cf6d7e8cb38a4bf0d74a282572bd01d0f41e3fd0" - "66e3021575f0fa04f27b700d5b7ddddf50965993c3f9c7118ed78888da7cb221849b326059" - "2b8e632d7c51e935a0ceae15207bedd548", - "7e80436bce57339ce8da1b5660149a20240b146d108deef3ec5da4ae256f8f894edcbbc57b" - "34ce37089c0daa17f0c46cd82b5a1599314fd79d2fd2f446bd5a25b8e32fcf05b76d644573" - "a6df4ad1dfea707b479d97237a346f1ec632ea5660efb57e8717a8628d7f82af50a4e84b11" - "f21bdff6839196a880ae20b2a0918d58cd", - "1669bfb657fdc62c3ddd63269787fc1c969f1850fb04c933dda063ef74a56ce13e3a649700" - "820f0061efabf849a85d474326c8a541d99830eea8131eaea584f22d88c353965dabcdc4bf" - "6b55949fd529507dfb803ab6b480cd73ca0ba00ca19c438849e2cea262a1c57d8f81cd257f" - "b58e19dec7904da97d8386e87b84948169", - "3fe60dd9ad6caccf5a6f583b3ae65953563446c4510b70da115ffaa0ba04c076115c7043ab" - "8733403cd69c7d14c212c655c07b43a7c71b9a4cffe22c2684788ec6870dc2013f269172c8" - "22256f9e7cc674791bf2d8486c0f5684283e1649576efc982ede17c7b74b214754d70402fb" - "4bb45ad086cf2cf76b3d63f7fce39ac970", - "983a71b9994d95e876d84d28946a041f8f0a3f544cfcc055496580f1dfd4e312a2ad418fe6" - "9dbc61db230cc0c0ed97e360abab7d6ff4b81ee970a7e97466acfd9644f828ffec538abc38" - "3d0e92326d1c88c55e1f46a668a039beaa1be631a89129938c00a81a3ae46d4aecbf9707f7" - "64dbaccea3ef7665e4c4307fa0b0a3075c", - "4a8c071ac4fd0d52faa407b0fe5dab759f7394a5832127f2a3498f34aac287339e043b4ffa" - "79528faf199dc917f7b066ad65505dab0e11e6948515052ce20cfdb892ffb8aa9bf3f1aa5b" - "e30a5bbe85823bddf70b39fd7ebd4a93a2f75472c1d4f606247a9821f1a8c45a6cb80545de" - "2e0c6c0174e2392088c754e9c8443eb5af", - "0a3a12c3084c865daf1d302c78215d39bfe0b8bf28272b3c0b74beb4b7409db0718239de70" - "0785581514321c6440a4bbaea4c76fa47401e151e68cb6c29017f0bce4631290af5ea5e2bf" - "3ed742ae110b04ade83a5dbd7358f29a85938e23d87ac8233072b79c94670ff0959f9c7f45" - "17862ff829452096c78f5f2e9a7e4e9216", - "785d07a3c54f63dca11f5d1a5f496ee2c2f9288e55007e666c78b007d95cc28581dce51f49" - "0b30fa73dc9e2d45d075d7e3a95fb8a9e1465ad191904124160b7c60fa720ef4ef1c5d2998" - "f40570ae2a870ef3e894c2bc617d8a1dc85c3c55774928c38789b4e661349d3f84d2441a3b" - "856a76949b9f1f80bc161648a1cad5588e", - "76f987ec5448dd72219bd30bf6b66b0775c80b394851a43ff1f537f140a6e7229ef8cd72ad" - "58b1d2d20298539d6347dd5598812bc65323aceaf05228f738b5ad3e8d9fe4100fd767c2f0" - "98c77cb99c2992843ba3eed91d32444f3b6db6cd212dd4e5609548f4bb62812a920f6e2bf1" - "581be1ebeebdd06ec4e971862cc42055ca", - "60cd64b2cd2be6c33859b94875120361a24085f3765cb8b2bf11e026fa9d8855dbe435acf7" - "882e84f3c7857f96e2baab4d9afe4588e4a82e17a78827bfdb5ddbd1c211fbc2e6d884cddd" - "7cb9d90d5bf4a7311b83f352508033812c776a0e00c003c7e0d628e50736c7512df0acfa9f" - "2320bd102229f46495ae6d0857cc452a84", - }; - - char *Qx[] = { - "87f8f2b218f49845f6f10eec3877136269f5c1a54736dbdf69f89940cad41555", - "5cf02a00d205bdfee2016f7421807fc38ae69e6b7ccd064ee689fc1a94a9f7d2", - "2ddfd145767883ffbb0ac003ab4a44346d08fa2570b3120dcce94562422244cb", - "e424dc61d4bb3cb7ef4344a7f8957a0c5134e16f7a67c074f82e6e12f49abf3c", - "e0fc6a6f50e1c57475673ee54e3a57f9a49f3328e743bf52f335e3eeaa3d2864", - "a849bef575cac3c6920fbce675c3b787136209f855de19ffe2e8d29b31a5ad86", - "3dfb6f40f2471b29b77fdccba72d37c21bba019efa40c1c8f91ec405d7dcc5df", - "69b7667056e1e11d6caf6e45643f8b21e7a4bebda463c7fdbc13bc98efbd0214", - "bf02cbcf6d8cc26e91766d8af0b164fc5968535e84c158eb3bc4e2d79c3cc682", - "224a4d65b958f6d6afb2904863efd2a734b31798884801fcab5a590f4d6da9de", - "43691c7795a57ead8c5c68536fe934538d46f12889680a9cb6d055a066228369", - "9157dbfcf8cf385f5bb1568ad5c6e2a8652ba6dfc63bc1753edf5268cb7eb596", - "072b10c081a4c1713a294f248aef850e297991aca47fa96a7470abe3b8acfdda", - "09308ea5bfad6e5adf408634b3d5ce9240d35442f7fe116452aaec0d25be8c24", - "2d98ea01f754d34bbc3003df5050200abf445ec728556d7ed7d5c54c55552b6d", - }; - - char *Qy[] = { - "e15f369036f49842fac7a86c8a2b0557609776814448b8f5e84aa9f4395205e9", - "ec530ce3cc5c9d1af463f264d685afe2b4db4b5828d7e61b748930f3ce622a85", - "5f70c7d11ac2b7a435ccfbbae02c3df1ea6b532cc0e9db74f93fffca7c6f9a64", - "970eed7aa2bc48651545949de1dddaf0127e5965ac85d1243d6f60e7dfaee927", - "7f59d689c91e463607d9194d99faf316e25432870816dde63f5d4b373f12f22a", - "bf5fe4f7858f9b805bd8dcc05ad5e7fb889de2f822f3d8b41694e6c55c16b471", - "f22f953f1e395a52ead7f3ae3fc47451b438117b1e04d613bc8555b7d6e6d1bb", - "d3f9b12eb46c7c6fda0da3fc85bc1fd831557f9abc902a3be3cb3e8be7d1aa2f", - "069ba6cb06b49d60812066afa16ecf7b51352f2c03bd93ec220822b1f3dfba03", - "178d51fddada62806f097aa615d33b8f2404e6b1479f5fd4859d595734d6d2b9", - "f8790110b3c3b281aa1eae037d4f1234aff587d903d93ba3af225c27ddc9ccac", - "972570f4313d47fc96f7c02d5594d77d46f91e949808825b3d31f029e8296405", - "9581145cca04a0fb94cedce752c8f0370861916d2a94e7c647c5373ce6a4c8f5", - "f40c93e023ef494b1c3079b2d10ef67f3170740495ce2cc57f8ee4b0618b8ee5", - "9b52672742d637a32add056dfd6d8792f2a33c2e69dafabea09b960bc61e230a", - }; - - char *R[] = { - "d19ff48b324915576416097d2544f7cbdf8768b1454ad20e0baac50e211f23b0", - "dc23d130c6117fb5751201455e99f36f59aba1a6a21cf2d0e7481a97451d6693", - "9913111cff6f20c5bf453a99cd2c2019a4e749a49724a08774d14e4c113edda8", - "bf96b99aa49c705c910be33142017c642ff540c76349b9dab72f981fd9347f4f", - "1d75830cd36f4c9aa181b2c4221e87f176b7f05b7c87824e82e396c88315c407", - "25acc3aa9d9e84c7abf08f73fa4195acc506491d6fc37cb9074528a7db87b9d6", - "548886278e5ec26bed811dbb72db1e154b6f17be70deb1b210107decb1ec2a5a", - "288f7a1cd391842cce21f00e6f15471c04dc182fe4b14d92dc18910879799790", - "f5acb06c59c2b4927fb852faa07faf4b1852bbb5d06840935e849c4d293d1bad", - "87b93ee2fecfda54deb8dff8e426f3c72c8864991f8ec2b3205bb3b416de93d2", - "8acd62e8c262fa50dd9840480969f4ef70f218ebf8ef9584f199031132c6b1ce", - "dfaea6f297fa320b707866125c2a7d5d515b51a503bee817de9faa343cc48eeb", - "09f5483eccec80f9d104815a1be9cc1a8e5b12b6eb482a65c6907b7480cf4f19", - "5cc8aa7c35743ec0c23dde88dabd5e4fcd0192d2116f6926fef788cddb754e73", - "06108e525f845d0155bf60193222b3219c98e3d49424c2fb2a0987f825c17959", - }; - - int results[] = { 3, 2, 4, 0, 0, 2, 4, 1, 3, 2, 3, 1, 4, 1, 0 }; - - char *S[] = { - "a3e81e59311cdfff2d4784949f7a2cb50ba6c3a91fa54710568e61aca3e847c6", - "d6ce7708c18dbf35d4f8aa7240922dc6823f2e7058cbc1484fcad1599db5018c", - "9467cd4cd21ecb56b0cab0a9a453b43386845459127a952421f5c6382866c5cc", - "17c55095819089c2e03b9cd415abdf12444e323075d98f31920b9e0f57ec871c", - "cb2acb01dac96efc53a32d4a0d85d0c2e48955214783ecf50a4f0414a319c05a", - "9b21d5b5259ed3f2ef07dfec6cc90d3a37855d1ce122a85ba6a333f307d31537", - "e93bfebd2f14f3d827ca32b464be6e69187f5edbd52def4f96599c37d58eee75", - "247b3c4e89a3bcadfea73c7bfd361def43715fa382b8c3edf4ae15d6e55e9979", - "049dab79c89cc02f1484c437f523e080a75f134917fda752f2d5ca397addfe5d", - "4044a24df85be0cc76f21a4430b75b8e77b932a87f51e4eccbc45c263ebf8f66", - "cfca7ed3d4347fb2a29e526b43c348ae1ce6c60d44f3191b6d8ea3a2d9c92154", - "8f780ad713f9c3e5a4f7fa4c519833dfefc6a7432389b1e4af463961f09764f2", - "a4f90e560c5e4eb8696cb276e5165b6a9d486345dedfb094a76e8442d026378d", - "9c9c045ebaa1b828c32f82ace0d18daebf5e156eb7cbfdc1eff4399a8a900ae7", - "62b5cdd591e5b507e560167ba8f6f7cda74673eb315680cb89ccbc4eec477dce", - }; - - struct tc_sha256_state_struct sha256_ctx; - - printf("Test #2: ECDSAvrfy "); - printf("NIST-p256, SHA2-256\n"); - - return vrfy_vectors(&sha256_ctx, Msg, Qx, Qy, R, S, results, 15, verbose); -} - -int montecarlo_signverify(int num_tests, bool verbose) -{ - printf("Test #3: Monte Carlo (%d Randomized EC-DSA signatures) ", num_tests); - printf("NIST-p256, SHA2-256\n "); - int i; - uint8_t private[NUM_ECC_BYTES]; - uint8_t public[2 * NUM_ECC_BYTES]; - uint8_t hash[NUM_ECC_BYTES]; - unsigned int hash_words[NUM_ECC_WORDS]; - uint8_t sig[2 * NUM_ECC_BYTES]; - - const struct uECC_Curve_t *curve = uECC_secp256r1(); - - for (i = 0; i < num_tests; ++i) { - if (verbose) { - TC_PRINT("."); - } - - uECC_generate_random_int(hash_words, curve->n, BITS_TO_WORDS(curve->num_n_bits)); - uECC_vli_nativeToBytes(hash, NUM_ECC_BYTES, hash_words); - - /**TESTPOINT: Check uECC_make_key*/ - zassert_true(uECC_make_key(public, private, curve), - "uECC_make_key() failed"); - - /**TESTPOINT: Check uECC_sign*/ - zassert_true(uECC_sign(private, hash, sizeof(hash), sig, curve), - "uECC_sign() failed"); - - /**TESTPOINT: Check uECC_verify*/ - zassert_true(uECC_verify(public, hash, sizeof(hash), sig, curve), - "uECC_verify() failed"); - - if (verbose) { - printf("."); - } - } - TC_PRINT("\n"); - return TC_PASS; -} - -int default_CSPRNG(uint8_t *dest, unsigned int size) -{ - /* This is not a CSPRNG, but it's the only thing available in the - * system at this point in time. */ - - sys_rand_get(dest, size); - - return 1; -} - -ZTEST(tinycrypt, test_ecc_dsa) -{ - unsigned int result = TC_PASS; - - /* Setup of the Cryptographically Secure PRNG. */ - uECC_set_rng(&default_CSPRNG); - - bool verbose = true; - - TC_PRINT("Performing cavp_sign test:\n"); - result = cavp_sign(verbose); - - /**TESTPOINT: Verify cavp_sign*/ - zassert_false(result, "cavp_sign test failed."); - - TC_PRINT("Performing cavp_verify test:\n"); - result = cavp_verify(verbose); - - /**TESTPOINT: Verify cavp_verify*/ - zassert_false(result, "cavp_verify test failed."); - - TC_PRINT("Performing montecarlo_signverify test:\n"); - result = montecarlo_signverify(10, verbose); - - /**TESTPOINT: Verify montecarlo_signverify*/ - zassert_false(result, "montecarlo_signverify test failed."); - - TC_PRINT("\nAll ECC-DSA tests succeeded.\n"); -} diff --git a/tests/crypto/tinycrypt/src/hmac.c b/tests/crypto/tinycrypt/src/hmac.c deleted file mode 100644 index 95279ad0a80be..0000000000000 --- a/tests/crypto/tinycrypt/src/hmac.c +++ /dev/null @@ -1,376 +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 -#include -#include -#include - -static 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. - */ -ZTEST(tinycrypt, test_hmac_1) -{ - 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)); - - /**TESTPOINT: Check result*/ - zassert_false(result, "HMAC test #7 failed"); -} - -ZTEST(tinycrypt, test_hmac_2) -{ - 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)); - - /**TESTPOINT: Check result*/ - zassert_false(result, "HMAC test #7 failed"); -} - -ZTEST(tinycrypt, test_hmac_3) -{ - 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)); - - /**TESTPOINT: Check result*/ - zassert_false(result, "HMAC test #3 failed"); -} - -ZTEST(tinycrypt, test_hmac_4) -{ - 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)); - - /**TESTPOINT: Check result*/ - zassert_false(result, "HMAC test #4 failed"); -} - -ZTEST(tinycrypt, test_hmac_5) -{ - 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)); - - /**TESTPOINT: Check result*/ - zassert_false(result, "HMAC test #5 failed"); -} - -ZTEST(tinycrypt, test_hmac_6) -{ - 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)); - - /**TESTPOINT: Check result*/ - zassert_false(result, "HMAC test #6 failed"); -} - -ZTEST(tinycrypt, test_hmac_7) -{ - 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)); - - /**TESTPOINT: Check result*/ - zassert_false(result, "HMAC test #7 failed"); -} diff --git a/tests/crypto/tinycrypt/src/main.c b/tests/crypto/tinycrypt/src/main.c deleted file mode 100644 index de80452757c3e..0000000000000 --- a/tests/crypto/tinycrypt/src/main.c +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) 2017 Intel Corporation - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include - -ZTEST_SUITE(tinycrypt, NULL, NULL, NULL, NULL, NULL); diff --git a/tests/crypto/tinycrypt/src/sha256.c b/tests/crypto/tinycrypt/src/sha256.c deleted file mode 100644 index 85b856c7e26df..0000000000000 --- a/tests/crypto/tinycrypt/src/sha256.c +++ /dev/null @@ -1,482 +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 -#include -#include - -#include -#include -#include -#include -#include - -/* - * NIST SHA256 test vector 1. - */ -ZTEST(tinycrypt, test_sha256_1) -{ - - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #1 failed."); -} - -/* - * NIST SHA256 test vector 2. - */ -ZTEST(tinycrypt, test_sha256_2) -{ - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #2 failed."); -} - -ZTEST(tinycrypt, test_sha256_3) -{ - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #3 failed."); - -} - -ZTEST(tinycrypt, test_sha256_4) -{ - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #4 failed."); - -} - -ZTEST(tinycrypt, test_sha256_5) -{ - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #5 failed."); - -} - -ZTEST(tinycrypt, test_sha256_6) -{ - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #6 failed."); - -} - -ZTEST(tinycrypt, test_sha256_7) -{ - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #7 failed."); - -} - -ZTEST(tinycrypt, test_sha256_8) -{ - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #8 failed."); - -} - -ZTEST(tinycrypt, test_sha256_9) -{ - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #9 failed."); - -} - -ZTEST(tinycrypt, test_sha256_10) -{ - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #10 failed."); - -} - -ZTEST(tinycrypt, test_sha256_11) -{ - 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #11 failed."); - -} - -ZTEST(tinycrypt, test_sha256_12) -{ - 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 = 0U; 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #12 failed."); -} -#if EXTREME_SLOW -ZTEST(tinycrypt, test_sha256_13) -{ - 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 = 0U; 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #13 failed."); - -} - -ZTEST(tinycrypt, test_sha256_14) -{ - 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 = 0U; 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); - - /**TESTPOINT: Check result*/ - zassert_false(result, "SHA256 test #14 failed."); - -} -#endif - -ZTEST(tinycrypt, test_sha256_13_and_14) -{ -#if EXTREME_SLOW - result = test_sha256_13(); - result = test_sha256_14(); -#endif -} diff --git a/tests/crypto/tinycrypt/src/test_ecc_utils.c b/tests/crypto/tinycrypt/src/test_ecc_utils.c deleted file mode 100644 index 25a700a320176..0000000000000 --- a/tests/crypto/tinycrypt/src/test_ecc_utils.c +++ /dev/null @@ -1,210 +0,0 @@ -/* test_ecc_utils.c - TinyCrypt common functions for ECC tests */ - -/* Copyright (c) 2014, Kenneth MacKay - * 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. - * - * 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 HOLDER 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.*/ - -/* - * Copyright (C) 2017 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. - * - * test_ecc_utils.c -- Implementation of some common functions for ECC tests. - * - */ - -#include "test_ecc_utils.h" -#include -#include - -#include -#include -#include -#include - -/* - * Convert hex string to zero-padded nanoECC scalar - */ -void string2scalar(unsigned int *scalar, unsigned int num_word32, char *str) -{ - - unsigned int num_bytes = num_word32 * 4U; - uint8_t tmp[num_bytes]; - size_t hexlen = strlen(str); - - int padding; - - padding = num_bytes * 2U - strlen(str); - if (0 > padding) { - printf("Error: 2 * num_bytes(%d) < strlen(hex) (%zu)\n", - num_bytes * 2U, strlen(str)); - k_panic(); - } - - (void)memset(tmp, 0, padding / 2); - - if (hex2bin(str, hexlen, tmp + padding / 2, num_bytes) == 0) { - k_panic(); - } - uECC_vli_bytesToNative(scalar, tmp, num_bytes); - -} - -void vli_print_bytes(uint8_t *vli, unsigned int size) -{ - for (unsigned i = 0; i < size; ++i) { - printf("%02X ", (unsigned)vli[i]); - } -} - -void print_ecc_scalar(const char *label, const unsigned int *p_vli, - unsigned int num_word32) -{ - unsigned int i; - - if (label) { - printf("%s = { ", label); - } - - for (i = 0U; i < num_word32 - 1; ++i) { - printf("0x%08lX, ", (unsigned long)p_vli[i]); - } - printf("0x%08lX", (unsigned long)p_vli[i]); - - if (label) { - printf(" };\n"); - } -} - -int check_ecc_result(const int num, const char *name, - const unsigned int *expected, - const unsigned int *computed, - const unsigned int num_word32, const bool verbose) -{ - uint32_t num_bytes = num_word32 * 4U; - - if (memcmp(computed, expected, num_bytes)) { - TC_PRINT("\n Vector #%02d check %s - FAILURE:\n\n", num, name); - print_ecc_scalar("Expected", expected, num_word32); - print_ecc_scalar("Computed", computed, num_word32); - TC_PRINT("\n"); - return TC_FAIL; - } - if (verbose) { - TC_PRINT(" Vector #%02d check %s - success\n", num, name); - } - return TC_PASS; -} - -int check_code(const int num, const int expected, - const int computed, const int verbose) -{ - - if (expected != computed) { - TC_ERROR("\n Vector #%02d check - FAILURE:\n", num); - TC_ERROR("\n Expected: %d, computed: %d\n\n", expected, computed); - return TC_FAIL; - } - - if (verbose) { - TC_PRINT(" Vector #%02d check - success (%d=%d)\n", num, - expected, computed); - } - - return TC_PASS; -} - -/* Test ecc_make_keys, and also as keygen part of other tests */ -int keygen_vectors(char **d_vec, char **qx_vec, char **qy_vec, int tests, - bool verbose) -{ - - unsigned int pub[2 * NUM_ECC_WORDS]; - unsigned int d[NUM_ECC_WORDS]; - unsigned int prv[NUM_ECC_WORDS]; - unsigned int result = TC_PASS; - - /* expected outputs (converted input vectors) */ - unsigned int exp_pub[2 * NUM_ECC_WORDS]; - unsigned int exp_prv[NUM_ECC_WORDS]; - - for (int i = 0; i < tests; i++) { - string2scalar(exp_prv, NUM_ECC_WORDS, d_vec[i]); - string2scalar(exp_pub, NUM_ECC_WORDS, qx_vec[i]); - string2scalar(exp_pub + NUM_ECC_WORDS, NUM_ECC_WORDS, qy_vec[i]); - - /* - * Feed prvkey vector as padded random seed into ecc_make_key. - * Internal mod-reduction will be zero-op and generate correct prv/pub - */ - (void)memset(d, 0, sizeof(d)); - string2scalar(d, NUM_ECC_WORDS, d_vec[i]); - - uint8_t pub_bytes[2 * NUM_ECC_BYTES]; - uint8_t prv_bytes[NUM_ECC_BYTES]; - - uECC_make_key_with_d(pub_bytes, prv_bytes, d, uECC_secp256r1()); - - uECC_vli_bytesToNative(prv, prv_bytes, NUM_ECC_BYTES); - uECC_vli_bytesToNative(pub, pub_bytes, NUM_ECC_BYTES); - uECC_vli_bytesToNative(pub + NUM_ECC_WORDS, pub_bytes + NUM_ECC_BYTES, NUM_ECC_BYTES); - - /* validate correctness of vector conversion and make_key() */ - result = check_ecc_result(i, "prv ", exp_prv, prv, NUM_ECC_WORDS, verbose); - if (result == TC_FAIL) { - return result; - } - result = check_ecc_result(i, "pub.x", exp_pub, pub, NUM_ECC_WORDS, verbose); - if (result == TC_FAIL) { - return result; - } - result = check_ecc_result(i, "pub.y", exp_pub + NUM_ECC_WORDS, pub + NUM_ECC_WORDS, NUM_ECC_WORDS, verbose); - if (result == TC_FAIL) { - return result; - } - } - return result; -} diff --git a/tests/crypto/tinycrypt/src/test_ecc_utils.h b/tests/crypto/tinycrypt/src/test_ecc_utils.h deleted file mode 100644 index 73f92f9fd41fe..0000000000000 --- a/tests/crypto/tinycrypt/src/test_ecc_utils.h +++ /dev/null @@ -1,91 +0,0 @@ -/* test_ecc_utils.h - TinyCrypt interface to common functions for ECC tests */ - -/* Copyright (c) 2014, Kenneth MacKay - * 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. - * - * 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 HOLDER 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.*/ - -/* - * Copyright (C) 2017 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. - * - * test_ecc_utils.h -- Interface to common functions for ECC tests. - */ - -#ifndef __TEST_ECC_UTILS_H__ -#define __TEST_ECC_UTILS_H__ - -#define ENABLE_TESTS 1 - -#include -#include -#include - -/* - * Convert hex string to zero-padded nanoECC scalar - */ -void string2scalar(unsigned int *scalar, unsigned int num_word32, char *str); - - -void print_ecc_scalar(const char *label, const unsigned int *p_vli, - unsigned int num_word32); - -int check_ecc_result(const int num, const char *name, - const unsigned int *expected, - const unsigned int *computed, - const unsigned int num_word32, const bool verbose); - -/* Test ecc_make_keys, and also as keygen part of other tests */ -int keygen_vectors(char **d_vec, char **qx_vec, char **qy_vec, int tests, bool verbose); - -void vli_print_bytes(uint8_t *vli, unsigned int size); - - -int check_code(const int num, const int expected, - const int computed, const int verbose); - - -#endif /* __TEST_ECC_UTILS_H__ */ diff --git a/tests/crypto/tinycrypt/testcase.yaml b/tests/crypto/tinycrypt/testcase.yaml deleted file mode 100644 index 74c4853a9cca7..0000000000000 --- a/tests/crypto/tinycrypt/testcase.yaml +++ /dev/null @@ -1,15 +0,0 @@ -tests: - crypto.tinycrypt: - tags: - - tinycrypt - - crypto - - aes - - ccm - platform_exclude: - - qemu_arc/qemu_arc_em - - qemu_arc/qemu_arc_hs - - m2gl025_miv - timeout: 500 - integration_platforms: - - native_sim - toolchain_exclude: xcc diff --git a/tests/crypto/tinycrypt_hmac_prng/CMakeLists.txt b/tests/crypto/tinycrypt_hmac_prng/CMakeLists.txt deleted file mode 100644 index 9e02bd1d2c651..0000000000000 --- a/tests/crypto/tinycrypt_hmac_prng/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -cmake_minimum_required(VERSION 3.20.0) -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -project(tinycrypt_hmac_prng) - -FILE(GLOB app_sources src/*.c) -target_sources(app PRIVATE ${app_sources}) diff --git a/tests/crypto/tinycrypt_hmac_prng/README.txt b/tests/crypto/tinycrypt_hmac_prng/README.txt deleted file mode 100644 index bfd929bfdb627..0000000000000 --- a/tests/crypto/tinycrypt_hmac_prng/README.txt +++ /dev/null @@ -1,46 +0,0 @@ -Title: test_hmac_prng - -Description: - -This test verifies that the TinyCrypt PRNG APIs operate as expected. - --------------------------------------------------------------------------------- -Building and Running Project: - -This project outputs to the console. It can be built and executed -on QEMU as follows: - - make run - --------------------------------------------------------------------------------- - -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 - main. -HMAC-PRNG test#1 (reseed): -=================================================================== -PASS - main. -HMAC-PRNG test#1 (generate): -=================================================================== -PASS - main. -All HMAC tests succeeded! -=================================================================== -PASS - main. -=================================================================== -PROJECT EXECUTION SUCCESSFUL diff --git a/tests/crypto/tinycrypt_hmac_prng/prj.conf b/tests/crypto/tinycrypt_hmac_prng/prj.conf deleted file mode 100644 index 8e3d3dbd04272..0000000000000 --- a/tests/crypto/tinycrypt_hmac_prng/prj.conf +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_ZTEST_STACK_SIZE=40960 -CONFIG_TINYCRYPT=y -CONFIG_TINYCRYPT_SHA256=y -CONFIG_TINYCRYPT_SHA256_HMAC=y -CONFIG_TINYCRYPT_SHA256_HMAC_PRNG=y -CONFIG_ZTEST=y diff --git a/tests/crypto/tinycrypt_hmac_prng/src/hmac_prng.c b/tests/crypto/tinycrypt_hmac_prng/src/hmac_prng.c deleted file mode 100644 index e405ba32aef28..0000000000000 --- a/tests/crypto/tinycrypt_hmac_prng/src/hmac_prng.c +++ /dev/null @@ -1,7916 +0,0 @@ -/* test_hmac_prng.c - TinyCrypt implementation of some HMAC-PRNG tests */ - -/* - * Copyright (C) 2017 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 -#include - -#include -#include -#include -#include - -struct hmac_prng_test_vector { - uint8_t entropyinputlen; - uint8_t noncelen; - uint8_t personalizationstringlen; - uint8_t additionalinputlen; - uint8_t returnedbitslen; - uint8_t entropyinput[32]; - uint8_t nonce[16]; - uint8_t personalizationstring[32]; - uint8_t entropyinputreseed[32]; - uint8_t additionalinputreseed[32]; - uint8_t returnedbits[128]; -}; - -unsigned int do_hmac_prng_pr_false_test(unsigned int testnum, const struct - hmac_prng_test_vector * vec) -{ - struct tc_hmac_prng_struct h; - uint8_t random[128]; - uint32_t seed_material_size; - /* entropyinput || nonce || personalizationstring */ - uint8_t seed_material[32 + 16 + 32]; - unsigned int result = TC_PASS; - - uint8_t *p = seed_material; - - memset(&h, 0x0, sizeof(h)); - - if (vec->entropyinputlen > 0) { - memcpy(p, vec->entropyinput, vec->entropyinputlen); - p += vec->entropyinputlen; - } - - if (vec->noncelen > 0) { - memcpy(p, vec->nonce, vec->noncelen); - p += vec->noncelen; - } - - if (vec->personalizationstringlen > 0) { - memcpy(p, vec->personalizationstring, - vec->personalizationstringlen); - } - - seed_material_size = vec->entropyinputlen + vec->noncelen + - vec->personalizationstringlen; - (void)tc_hmac_prng_init(&h, seed_material, seed_material_size); - (void)tc_hmac_prng_reseed(&h, vec->entropyinputreseed, - vec->entropyinputlen, 0, 0); - (void)tc_hmac_prng_generate(random, vec->returnedbitslen, &h); - (void)tc_hmac_prng_generate(random, vec->returnedbitslen, &h); - result = check_result(testnum, vec->returnedbits, vec->returnedbitslen, - random, vec->returnedbitslen, 1); - return result; -} - -unsigned int test_1(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x06, 0x03, 0x2c, 0xd5, 0xee, 0xd3, 0x3f, 0x39, 0x26, - 0x5f, 0x49, 0xec, 0xb1, 0x42, 0xc5, 0x11, 0xda, 0x9a, - 0xff, 0x2a, 0xf7, 0x12, 0x03, 0xbf, 0xfa, 0xf3, 0x4a, - 0x9c, 0xa5, 0xbd, 0x9c, 0x0d, - }, - { - 0x0e, 0x66, 0xf7, 0x1e, 0xdc, 0x43, 0xe4, 0x2a, 0x45, - 0xad, 0x3c, 0x6f, 0xc6, 0xcd, 0xc4, 0xdf, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x01, 0x92, 0x0a, 0x4e, 0x66, 0x9e, 0xd3, 0xa8, 0x5a, - 0xe8, 0xa3, 0x3b, 0x35, 0xa7, 0x4a, 0xd7, 0xfb, 0x2a, - 0x6b, 0xb4, 0xcf, 0x39, 0x5c, 0xe0, 0x03, 0x34, 0xa9, - 0xc9, 0xa5, 0xa5, 0xd5, 0x52, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x76, 0xfc, 0x79, 0xfe, 0x9b, 0x50, 0xbe, 0xcc, 0xc9, - 0x91, 0xa1, 0x1b, 0x56, 0x35, 0x78, 0x3a, 0x83, 0x53, - 0x6a, 0xdd, 0x03, 0xc1, 0x57, 0xfb, 0x30, 0x64, 0x5e, - 0x61, 0x1c, 0x28, 0x98, 0xbb, 0x2b, 0x1b, 0xc2, 0x15, - 0x00, 0x02, 0x09, 0x20, 0x8c, 0xd5, 0x06, 0xcb, 0x28, - 0xda, 0x2a, 0x51, 0xbd, 0xb0, 0x38, 0x26, 0xaa, 0xf2, - 0xbd, 0x23, 0x35, 0xd5, 0x76, 0xd5, 0x19, 0x16, 0x08, - 0x42, 0xe7, 0x15, 0x8a, 0xd0, 0x94, 0x9d, 0x1a, 0x9e, - 0xc3, 0xe6, 0x6e, 0xa1, 0xb1, 0xa0, 0x64, 0xb0, 0x05, - 0xde, 0x91, 0x4e, 0xac, 0x2e, 0x9d, 0x4f, 0x2d, 0x72, - 0xa8, 0x61, 0x6a, 0x80, 0x22, 0x54, 0x22, 0x91, 0x82, - 0x50, 0xff, 0x66, 0xa4, 0x1b, 0xd2, 0xf8, 0x64, 0xa6, - 0xa3, 0x8c, 0xc5, 0xb6, 0x49, 0x9d, 0xc4, 0x3f, 0x7f, - 0x2b, 0xd0, 0x9e, 0x1e, 0x0f, 0x8f, 0x58, 0x85, 0x93, - 0x51, 0x24, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(1, &vec); - - return result; -} - -unsigned int test_2(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xaa, 0xdc, 0xf3, 0x37, 0x78, 0x8b, 0xb8, 0xac, 0x01, - 0x97, 0x66, 0x40, 0x72, 0x6b, 0xc5, 0x16, 0x35, 0xd4, - 0x17, 0x77, 0x7f, 0xe6, 0x93, 0x9e, 0xde, 0xd9, 0xcc, - 0xc8, 0xa3, 0x78, 0xc7, 0x6a, - }, - { - 0x9c, 0xcc, 0x9d, 0x80, 0xc8, 0x9a, 0xc5, 0x5a, 0x8c, - 0xfe, 0x0f, 0x99, 0x94, 0x2f, 0x5a, 0x4d, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x03, 0xa5, 0x77, 0x92, 0x54, 0x7e, 0x0c, 0x98, 0xea, - 0x17, 0x76, 0xe4, 0xba, 0x80, 0xc0, 0x07, 0x34, 0x62, - 0x96, 0xa5, 0x6a, 0x27, 0x0a, 0x35, 0xfd, 0x9e, 0xa2, - 0x84, 0x5c, 0x7e, 0x81, 0xe2, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x17, 0xd0, 0x9f, 0x40, 0xa4, 0x37, 0x71, 0xf4, 0xa2, - 0xf0, 0xdb, 0x32, 0x7d, 0xf6, 0x37, 0xde, 0xa9, 0x72, - 0xbf, 0xff, 0x30, 0xc9, 0x8e, 0xbc, 0x88, 0x42, 0xdc, - 0x7a, 0x9e, 0x3d, 0x68, 0x1c, 0x61, 0x90, 0x2f, 0x71, - 0xbf, 0xfa, 0xf5, 0x09, 0x36, 0x07, 0xfb, 0xfb, 0xa9, - 0x67, 0x4a, 0x70, 0xd0, 0x48, 0xe5, 0x62, 0xee, 0x88, - 0xf0, 0x27, 0xf6, 0x30, 0xa7, 0x85, 0x22, 0xec, 0x6f, - 0x70, 0x6b, 0xb4, 0x4a, 0xe1, 0x30, 0xe0, 0x5c, 0x8d, - 0x7e, 0xac, 0x66, 0x8b, 0xf6, 0x98, 0x0d, 0x99, 0xb4, - 0xc0, 0x24, 0x29, 0x46, 0x45, 0x23, 0x99, 0xcb, 0x03, - 0x2c, 0xc6, 0xf9, 0xfd, 0x96, 0x28, 0x47, 0x09, 0xbd, - 0x2f, 0xa5, 0x65, 0xb9, 0xeb, 0x9f, 0x20, 0x04, 0xbe, - 0x6c, 0x9e, 0xa9, 0xff, 0x91, 0x28, 0xc3, 0xf9, 0x3b, - 0x60, 0xdc, 0x30, 0xc5, 0xfc, 0x85, 0x87, 0xa1, 0x0d, - 0xe6, 0x8c, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(2, &vec); - - return result; -} - -unsigned int test_3(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x62, 0xcd, 0xa4, 0x41, 0xdd, 0x80, 0x2c, 0x76, 0x52, - 0xc0, 0x0b, 0x99, 0xca, 0xc3, 0x65, 0x2a, 0x64, 0xfc, - 0x75, 0x38, 0x8d, 0xc9, 0xad, 0xcf, 0x76, 0x35, 0x30, - 0xac, 0x31, 0xdf, 0x92, 0x14, - }, - { - 0x5f, 0xdc, 0x89, 0x7a, 0x0c, 0x1c, 0x48, 0x22, 0x04, - 0xef, 0x07, 0xe0, 0x80, 0x5c, 0x01, 0x4b, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xbd, 0x9b, 0xbf, 0x71, 0x74, 0x67, 0xbf, 0x4b, 0x5d, - 0xb2, 0xaa, 0x34, 0x4d, 0xd0, 0xd9, 0x09, 0x97, 0xc8, - 0x20, 0x1b, 0x22, 0x65, 0xf4, 0x45, 0x12, 0x70, 0x12, - 0x8f, 0x5a, 0xc0, 0x5a, 0x1a, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x7e, 0x41, 0xf9, 0x64, 0x7a, 0x5e, 0x67, 0x50, 0xeb, - 0x8a, 0xcf, 0x13, 0xa0, 0x2f, 0x23, 0xf3, 0xbe, 0x77, - 0x61, 0x1e, 0x51, 0x99, 0x2c, 0xed, 0xb6, 0x60, 0x2c, - 0x31, 0x45, 0x31, 0xaf, 0xf2, 0xa6, 0xe4, 0xc5, 0x57, - 0xda, 0x07, 0x77, 0xd4, 0xe8, 0x5f, 0xae, 0xfc, 0xb1, - 0x43, 0xf1, 0xa9, 0x2e, 0x0d, 0xba, 0xc8, 0xde, 0x8b, - 0x88, 0x5c, 0xed, 0x62, 0xa1, 0x24, 0xf0, 0xb1, 0x06, - 0x20, 0xf1, 0x40, 0x9a, 0xe8, 0x7e, 0x22, 0x89, 0x94, - 0xb8, 0x30, 0xec, 0xa6, 0x38, 0xcc, 0xdc, 0xee, 0xdd, - 0x3f, 0xcd, 0x07, 0xd0, 0x24, 0xb6, 0x46, 0x70, 0x4f, - 0x44, 0xd5, 0xd9, 0xc4, 0xc3, 0xa7, 0xb7, 0x05, 0xf3, - 0x71, 0x04, 0xb4, 0x5b, 0x9c, 0xfc, 0x2d, 0x93, 0x3a, - 0xe4, 0x3c, 0x12, 0xf5, 0x3e, 0x3e, 0x6f, 0x79, 0x8c, - 0x51, 0xbe, 0x5f, 0x64, 0x01, 0x15, 0xd4, 0x5c, 0xf9, - 0x19, 0xa4, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(3, &vec); - - return result; -} - -unsigned int test_4(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x6b, 0xdc, 0x6c, 0xa8, 0xee, 0xf0, 0xe3, 0x53, 0x3a, - 0xbd, 0x02, 0x58, 0x0e, 0xbb, 0xc8, 0xa9, 0x2f, 0x38, - 0x2c, 0x5b, 0x1c, 0x8e, 0x3e, 0xaa, 0x12, 0x56, 0x6e, - 0xcf, 0xb9, 0x03, 0x89, 0xa3, - }, - { - 0x8f, 0x84, 0x81, 0xcc, 0x77, 0x35, 0x82, 0x74, 0x77, - 0xe0, 0xe4, 0xac, 0xb7, 0xf4, 0xa0, 0xfa, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x72, 0xec, 0xa6, 0xf1, 0x56, 0x07, 0x20, 0xe6, 0xbd, - 0x1f, 0xf0, 0x15, 0x2c, 0x12, 0xee, 0xff, 0x1f, 0x95, - 0x94, 0x62, 0xfd, 0x62, 0xc7, 0x2b, 0x7d, 0xde, 0x96, - 0xab, 0xcb, 0x7f, 0x79, 0xfb, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xd5, 0xa2, 0xe2, 0xf2, 0x54, 0xb5, 0xae, 0x65, 0x59, - 0x0d, 0x4f, 0xd1, 0xff, 0x5c, 0x75, 0x8e, 0x42, 0x5b, - 0xe4, 0xba, 0xcd, 0xee, 0xde, 0x79, 0x89, 0x66, 0x9f, - 0x0a, 0x22, 0xd3, 0x42, 0x74, 0xfd, 0xfc, 0x2b, 0xf8, - 0x71, 0x35, 0xe3, 0x0a, 0xbd, 0xae, 0x26, 0x91, 0x62, - 0x9c, 0x2f, 0x6f, 0x42, 0x5b, 0xd4, 0xe1, 0x19, 0x90, - 0x4d, 0x47, 0x85, 0xec, 0xd9, 0x32, 0x8f, 0x15, 0x25, - 0x95, 0x63, 0xe5, 0xa7, 0x1f, 0x91, 0x5e, 0xc0, 0xc0, - 0x2b, 0x66, 0x65, 0x54, 0x71, 0x06, 0x7b, 0x01, 0x01, - 0x6f, 0xdf, 0x93, 0x4a, 0x47, 0xb0, 0x17, 0xe0, 0x7c, - 0x21, 0x33, 0x26, 0x41, 0x40, 0x0b, 0xbe, 0x57, 0x19, - 0x05, 0x0d, 0xba, 0x22, 0xc0, 0x20, 0xb9, 0xb2, 0xd2, - 0xcd, 0xb9, 0x33, 0xdb, 0xc7, 0x0f, 0x76, 0xfe, 0xc4, - 0xb1, 0xd8, 0x39, 0x80, 0xfd, 0x1a, 0x13, 0xc4, 0x56, - 0x58, 0x36, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(4, &vec); - - return result; -} - -unsigned int test_5(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x09, 0x6e, 0xf3, 0x72, 0x94, 0xd3, 0x69, 0xfa, 0xce, - 0x1a, 0xdd, 0x3e, 0xb8, 0xb4, 0x25, 0x89, 0x5e, 0x92, - 0x16, 0x26, 0x49, 0x57, 0x05, 0xc5, 0xa0, 0x3e, 0xe5, - 0x66, 0xb3, 0x41, 0x58, 0xec, - }, - { - 0x6e, 0x2e, 0x08, 0x25, 0x53, 0x4d, 0x29, 0x89, 0x71, - 0x5c, 0xc8, 0x59, 0x56, 0xe0, 0x14, 0x8d, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x1b, 0x4f, 0x71, 0x25, 0xf4, 0x72, 0xc2, 0x53, 0x83, - 0x7f, 0xa7, 0x87, 0xd5, 0xac, 0xf0, 0x38, 0x2a, 0x3b, - 0x89, 0xc3, 0xf4, 0x1c, 0x21, 0x1d, 0x26, 0x30, 0x52, - 0x40, 0x2d, 0xcc, 0x62, 0xc5, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x45, 0x41, 0xf2, 0x4f, 0x75, 0x9b, 0x5f, 0x2a, 0xc2, - 0xb5, 0x7b, 0x51, 0x12, 0x50, 0x77, 0xcc, 0x74, 0x0b, - 0x38, 0x59, 0xa7, 0x19, 0xa9, 0xba, 0xb1, 0x19, 0x6e, - 0x6c, 0x0c, 0xa2, 0xbd, 0x05, 0x7a, 0xf9, 0xd3, 0x89, - 0x23, 0x86, 0xa1, 0x81, 0x3f, 0xc8, 0x87, 0x5d, 0x8d, - 0x36, 0x4f, 0x15, 0xe7, 0xfd, 0x69, 0xd1, 0xcc, 0x66, - 0x59, 0x47, 0x04, 0x15, 0x27, 0x81, 0x64, 0xdf, 0x65, - 0x62, 0x95, 0xba, 0x9c, 0xfc, 0xee, 0x79, 0xf6, 0xcb, - 0xe2, 0x6e, 0xe1, 0x36, 0xe6, 0xb4, 0x5e, 0xc2, 0x24, - 0xad, 0x37, 0x9c, 0x60, 0x79, 0xb1, 0x0a, 0x2e, 0x0c, - 0xb5, 0xf7, 0xf7, 0x85, 0xef, 0x0a, 0xb7, 0xa7, 0xc3, - 0xfc, 0xd9, 0xcb, 0x65, 0x06, 0x05, 0x4d, 0x20, 0xe2, - 0xf3, 0xec, 0x61, 0x0c, 0xbb, 0xa9, 0xb0, 0x45, 0xa2, - 0x48, 0xaf, 0x56, 0xe4, 0xf6, 0xd3, 0xf0, 0xc8, 0xd9, - 0x6a, 0x23, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(5, &vec); - - return result; -} - -unsigned int test_6(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xa7, 0xdc, 0xcd, 0xd4, 0x31, 0xae, 0x57, 0x26, 0xb8, - 0x35, 0x85, 0xb5, 0x4e, 0xae, 0x41, 0x08, 0xf7, 0xb7, - 0xa2, 0x5c, 0x70, 0x18, 0x7c, 0x0a, 0xcb, 0xb9, 0x4c, - 0x96, 0xcc, 0x27, 0x7a, 0xa8, - }, - { - 0x94, 0xc8, 0xf4, 0xb8, 0xe1, 0x95, 0xa4, 0x73, 0x56, - 0xa8, 0x9a, 0x50, 0xd1, 0x38, 0x9a, 0xb5, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x51, 0x73, 0x3e, 0xee, 0x2e, 0x92, 0x2f, 0x40, 0x55, - 0xe5, 0x39, 0x39, 0xe2, 0x22, 0xe7, 0x1f, 0xae, 0x73, - 0x0e, 0xb0, 0x37, 0x44, 0x3d, 0xb2, 0xc7, 0x67, 0x97, - 0x08, 0xab, 0xb8, 0x6a, 0x65, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x99, 0xba, 0x26, 0x91, 0xa6, 0x22, 0xaf, 0xec, 0xc9, - 0x47, 0x24, 0x18, 0xe6, 0xa8, 0xf9, 0xf1, 0xcd, 0xc1, - 0xe3, 0x58, 0x3c, 0x3b, 0xc7, 0xa2, 0xa6, 0x50, 0xa1, - 0xab, 0x79, 0xdc, 0xbc, 0xcb, 0xd6, 0x56, 0x63, 0x6c, - 0x57, 0x31, 0x79, 0x27, 0x6e, 0x78, 0x25, 0x69, 0x42, - 0x0c, 0x97, 0x43, 0x8c, 0x06, 0xbe, 0x89, 0x88, 0x67, - 0xf6, 0x28, 0xb1, 0xc0, 0x1e, 0xb5, 0x70, 0x26, 0x3d, - 0x2c, 0x0f, 0x09, 0xc7, 0xaa, 0xb5, 0x36, 0xf6, 0xfb, - 0xa7, 0xdf, 0x6a, 0xad, 0x19, 0xe0, 0x5c, 0x23, 0x6b, - 0x64, 0x56, 0x74, 0x66, 0x7c, 0x03, 0xd1, 0xb6, 0xa0, - 0x4d, 0x7f, 0xc1, 0x11, 0x77, 0xfe, 0x78, 0x93, 0x3b, - 0x30, 0x96, 0x79, 0xf5, 0xbf, 0x26, 0xa4, 0x63, 0x2b, - 0x9a, 0x13, 0xe3, 0x14, 0xc4, 0xbf, 0x45, 0x32, 0x42, - 0x8d, 0x3d, 0x95, 0xc6, 0x89, 0x00, 0x2b, 0x6d, 0xc1, - 0xfb, 0xb1, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(6, &vec); - - return result; -} - -unsigned int test_7(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xc2, 0x86, 0x42, 0x5e, 0xcf, 0x54, 0x3a, 0x49, 0xbc, - 0xc9, 0x19, 0x6b, 0x0d, 0xb1, 0xa8, 0x0b, 0xc5, 0x4e, - 0x49, 0x48, 0xad, 0xba, 0x6f, 0x41, 0x71, 0x2a, 0x35, - 0x0a, 0x02, 0x89, 0x1f, 0xa6, - }, - { - 0x95, 0x7a, 0x65, 0x9a, 0x4e, 0xc2, 0xe0, 0xb7, 0xad, - 0x18, 0x54, 0x83, 0xc2, 0x20, 0xfd, 0x61, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x08, 0xc2, 0x12, 0x98, 0x13, 0xee, 0xa0, 0x77, 0x6f, - 0xba, 0x72, 0x78, 0x8f, 0xdf, 0x27, 0x18, 0x75, 0x9c, - 0xc3, 0xc4, 0x20, 0x7f, 0xa2, 0x0a, 0x5f, 0xe2, 0x3a, - 0xc6, 0xe3, 0x2c, 0xc2, 0x8e, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x8e, 0x10, 0x20, 0xa4, 0xfd, 0x84, 0xc9, 0x9e, 0x0f, - 0xc7, 0xe3, 0xf7, 0xce, 0x48, 0xde, 0x5e, 0xd9, 0xec, - 0x9a, 0x5c, 0x2c, 0xcd, 0x62, 0x4d, 0xbe, 0x6f, 0x30, - 0xe2, 0xf6, 0x88, 0xa3, 0x1d, 0xc5, 0x59, 0x57, 0x63, - 0x03, 0x57, 0xa5, 0xd4, 0x8c, 0xa2, 0xa4, 0x56, 0x24, - 0x1a, 0x28, 0xbf, 0xb1, 0x6d, 0x8b, 0xb0, 0x00, 0x87, - 0x76, 0x97, 0xa7, 0xce, 0x24, 0xd9, 0xad, 0x4d, 0x22, - 0xb0, 0xc1, 0x51, 0x17, 0x99, 0x6f, 0x1f, 0x27, 0x0b, - 0x94, 0xf4, 0x6d, 0x7a, 0x9b, 0xdf, 0xa7, 0x60, 0x8f, - 0xa1, 0xdd, 0x84, 0x91, 0x77, 0xa9, 0xb8, 0x04, 0x9e, - 0x51, 0xb6, 0xb7, 0xa2, 0x74, 0x26, 0x23, 0x85, 0x4a, - 0x1f, 0xdd, 0xb5, 0xef, 0xc4, 0x47, 0xee, 0xd1, 0xea, - 0x1a, 0xed, 0x6f, 0x02, 0xb4, 0xb2, 0x75, 0x4e, 0xcf, - 0x71, 0xea, 0x05, 0x09, 0xda, 0x2e, 0x54, 0xf5, 0x24, - 0xa7, 0xe7, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(7, &vec); - - return result; -} - -unsigned int test_8(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x02, 0x81, 0x8b, 0xd7, 0xc1, 0xec, 0x45, 0x6a, 0xce, - 0x55, 0xbe, 0xeb, 0xa9, 0x9f, 0x64, 0x6a, 0x6d, 0x3a, - 0xa0, 0xea, 0x78, 0x35, 0x6e, 0xa7, 0x26, 0xb7, 0x63, - 0xff, 0x0d, 0xd2, 0xd6, 0x56, - }, - { - 0xc4, 0x82, 0x68, 0x7d, 0x50, 0x8c, 0x9b, 0x5c, 0x2a, - 0x75, 0xf7, 0xce, 0x39, 0x00, 0x14, 0xe8, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xcf, 0x31, 0x9b, 0xfa, 0x63, 0x98, 0x0e, 0x3c, 0xb9, - 0x97, 0xfd, 0x28, 0x77, 0x1b, 0xb5, 0x61, 0x4e, 0x3a, - 0xcb, 0x11, 0x49, 0xba, 0x45, 0xc1, 0x33, 0xff, 0xbb, - 0xab, 0x17, 0x43, 0x31, 0x93, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x19, 0xa2, 0x31, 0xff, 0x26, 0xc1, 0x86, 0x5c, 0xe7, - 0x5d, 0x7a, 0x71, 0x85, 0xc3, 0x0d, 0xd0, 0xb3, 0x33, - 0x12, 0x64, 0x33, 0xd0, 0xc8, 0xcb, 0xf1, 0xbe, 0x0d, - 0x2b, 0x38, 0x4d, 0x4e, 0xb3, 0xa8, 0xaf, 0xf0, 0x35, - 0x40, 0xfb, 0xfa, 0x5f, 0x54, 0x96, 0x52, 0x1a, 0x4e, - 0x4a, 0x64, 0x07, 0x1b, 0x44, 0xc7, 0x8b, 0xd0, 0xb7, - 0xe6, 0x8f, 0xac, 0x9e, 0x56, 0x95, 0xc5, 0xc1, 0x3f, - 0xd3, 0xb9, 0xdb, 0xe7, 0xf7, 0x73, 0x97, 0x81, 0xa4, - 0xc8, 0xf0, 0xb9, 0x80, 0xf1, 0xb1, 0x7d, 0x99, 0xbc, - 0xe1, 0x7c, 0xeb, 0x52, 0xb5, 0x68, 0x66, 0xae, 0x02, - 0x45, 0x6f, 0xfe, 0xf8, 0x33, 0x99, 0xc8, 0xcf, 0x78, - 0x26, 0xf3, 0xc4, 0x5c, 0x8a, 0x19, 0x31, 0x58, 0x90, - 0x91, 0x9d, 0x20, 0xf4, 0x0f, 0xc4, 0xe1, 0x8d, 0x07, - 0xe9, 0xc8, 0xcc, 0xd1, 0x6c, 0x33, 0x27, 0xb5, 0x98, - 0x8f, 0x71, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(8, &vec); - - return result; -} - -unsigned int test_9(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x77, 0xa5, 0xc8, 0x6d, 0x99, 0xbe, 0x7b, 0xc2, 0x50, - 0x28, 0x70, 0xf4, 0x02, 0x5f, 0x9f, 0x75, 0x63, 0xe9, - 0x17, 0x4e, 0xc6, 0x7c, 0x5f, 0x48, 0x1f, 0x21, 0xfc, - 0xf2, 0xb4, 0x1c, 0xae, 0x4b, - }, - { - 0xed, 0x04, 0x4a, 0xd7, 0x2e, 0xe8, 0x22, 0x50, 0x6a, - 0x6d, 0x0b, 0x12, 0x11, 0x50, 0x29, 0x67, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x77, 0x81, 0x00, 0x74, 0x9f, 0x01, 0xa4, 0xd3, 0x5c, - 0x3b, 0x4a, 0x95, 0x8a, 0xaf, 0xe2, 0x96, 0x87, 0x7e, - 0x0a, 0xca, 0xfd, 0x08, 0x9f, 0x50, 0xbc, 0x77, 0x97, - 0xa4, 0x2a, 0x33, 0xab, 0x71, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x83, 0x1a, 0x4d, 0xa5, 0x66, 0xf4, 0x62, 0x89, 0x90, - 0x48, 0x93, 0xef, 0x1c, 0xc1, 0xcd, 0x4a, 0xd1, 0x9e, - 0xe4, 0x8f, 0x38, 0x57, 0xe2, 0xb6, 0x9e, 0x93, 0x6d, - 0x10, 0xaf, 0xbd, 0xc2, 0x98, 0x22, 0xe8, 0x5d, 0x02, - 0x66, 0x3d, 0x34, 0x6e, 0xf3, 0xe0, 0x9a, 0x84, 0x8b, - 0x1d, 0x9c, 0xc0, 0x4f, 0x4c, 0x4c, 0x6e, 0x3b, 0x3b, - 0x0e, 0x56, 0xa0, 0x34, 0xe2, 0x33, 0x4d, 0x34, 0xca, - 0x08, 0xf8, 0x09, 0x7b, 0xe3, 0x07, 0xba, 0x41, 0xd0, - 0x20, 0xbc, 0x94, 0xf8, 0xc1, 0x93, 0x7f, 0xe8, 0x56, - 0x44, 0xee, 0xb5, 0x59, 0x2c, 0x2b, 0x5a, 0x21, 0x38, - 0xf7, 0xde, 0xd9, 0xa5, 0xb4, 0x4b, 0x20, 0x0c, 0x8b, - 0x5b, 0xeb, 0x27, 0x59, 0x7c, 0x79, 0x0f, 0x94, 0xd6, - 0x60, 0xeb, 0x61, 0xe8, 0x24, 0x83, 0x91, 0xed, 0xc3, - 0xae, 0x2d, 0x77, 0x65, 0x6c, 0xbe, 0x83, 0x54, 0x27, - 0x5b, 0x13, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(9, &vec); - - return result; -} - -unsigned int test_10(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x0e, 0xa4, 0x58, 0xcf, 0xf8, 0xbf, 0xd1, 0xdd, 0x8b, - 0x1a, 0xdd, 0xcb, 0xa9, 0xc0, 0x13, 0x17, 0xd5, 0x30, - 0x39, 0xe5, 0x33, 0x10, 0x4e, 0x32, 0xf9, 0x6e, 0x7d, - 0x34, 0x2e, 0x6c, 0x7b, 0x9b, - }, - { - 0x93, 0x5a, 0x4b, 0x66, 0xfc, 0x74, 0xc2, 0xa4, 0x87, - 0x57, 0xa9, 0x9c, 0x39, 0x9e, 0x64, 0xe3, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x6c, 0x5f, 0x37, 0x08, 0xe7, 0xb7, 0x14, 0xc4, 0xed, - 0x13, 0x9b, 0x4f, 0xa9, 0xe8, 0xc7, 0x63, 0xaf, 0x01, - 0x77, 0x34, 0x84, 0x00, 0x51, 0x09, 0xa8, 0x5e, 0x33, - 0x65, 0x3b, 0xb0, 0xce, 0x98, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x37, 0x3a, 0x37, 0xaf, 0x84, 0xfd, 0xde, 0xc1, 0x36, - 0x45, 0xa9, 0x76, 0x8d, 0x6a, 0x78, 0x5a, 0xe5, 0xa2, - 0x58, 0x9d, 0x64, 0xcd, 0x9b, 0x37, 0x98, 0x0d, 0xde, - 0x25, 0x41, 0x49, 0x92, 0x10, 0xc4, 0xf4, 0x08, 0x33, - 0x5d, 0xe1, 0xd5, 0x85, 0x34, 0x90, 0x64, 0xf3, 0xf5, - 0x3a, 0x2b, 0x4c, 0x5e, 0xc6, 0xdc, 0x2a, 0x09, 0x59, - 0x1f, 0x99, 0xad, 0x9f, 0xad, 0x52, 0x8a, 0xc8, 0x34, - 0x74, 0x16, 0x4b, 0x45, 0x49, 0x7b, 0xf1, 0x67, 0xf8, - 0x1e, 0x66, 0xfa, 0x08, 0x46, 0x3f, 0xfe, 0xa9, 0x17, - 0xf6, 0x89, 0x1e, 0x48, 0xf1, 0x49, 0xfa, 0xfc, 0x20, - 0x62, 0x2b, 0xb1, 0x17, 0x2f, 0x34, 0x88, 0x6f, 0xeb, - 0x45, 0xc2, 0x6f, 0xd4, 0x46, 0xa4, 0xa4, 0xe2, 0x89, - 0x1b, 0x4b, 0xc5, 0x94, 0x18, 0x68, 0x96, 0x14, 0x1a, - 0xaa, 0xee, 0xb3, 0x01, 0xb4, 0x9e, 0x7c, 0x1a, 0x26, - 0xfe, 0xc7, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(10, &vec); - - return result; -} - -unsigned int test_11(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xbf, 0xb6, 0x8b, 0xe4, 0xce, 0x17, 0x56, 0xd2, 0x5b, - 0xdf, 0xad, 0x5e, 0x0c, 0x2f, 0x8b, 0xec, 0x29, 0x36, - 0x09, 0x01, 0xcc, 0x4d, 0xa5, 0x1d, 0x42, 0x3d, 0x15, - 0x91, 0xcc, 0x57, 0xe1, 0xba, - }, - { - 0x98, 0xaf, 0xe4, 0xbd, 0x19, 0x4c, 0x14, 0x3e, 0x09, - 0x96, 0x80, 0xc5, 0x04, 0xcc, 0xea, 0xab, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb9, 0x7c, 0xaf, 0x21, 0x0e, 0x82, 0x49, 0x8c, 0x34, - 0x08, 0x79, 0x0d, 0x41, 0xc3, 0x20, 0xdd, 0x4a, 0x72, - 0x00, 0x77, 0x78, 0x38, 0x9b, 0x44, 0xb7, 0xbc, 0x3c, - 0x1c, 0x4b, 0x8c, 0x53, 0xf8, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x40, 0x9e, 0x0a, 0xa9, 0x49, 0xfb, 0x3b, 0x38, 0x23, - 0x1b, 0xf8, 0x73, 0x2e, 0x79, 0x59, 0xe9, 0x43, 0xa3, - 0x38, 0xea, 0x39, 0x90, 0x26, 0xb7, 0x44, 0xdf, 0x15, - 0xcb, 0xfe, 0xff, 0x8d, 0x71, 0xb3, 0xda, 0x02, 0x3d, - 0xcc, 0xe0, 0x59, 0xa8, 0x8c, 0xf0, 0xd4, 0xb7, 0x47, - 0x5f, 0x62, 0x8e, 0x47, 0x64, 0xc8, 0xbe, 0xf1, 0x3c, - 0x70, 0xcf, 0xbb, 0xbb, 0x6d, 0xa2, 0xa1, 0x8a, 0xab, - 0xca, 0xd9, 0x19, 0xdb, 0x09, 0xd0, 0x4f, 0xc5, 0x97, - 0x65, 0xed, 0xb1, 0x65, 0x14, 0x7c, 0x88, 0xdd, 0x47, - 0x3a, 0x0f, 0x3c, 0x5e, 0xe1, 0x92, 0x37, 0xca, 0x95, - 0x56, 0x97, 0xe0, 0x01, 0xba, 0x65, 0x4c, 0x5e, 0xe0, - 0xbd, 0x26, 0x76, 0x1b, 0x49, 0x33, 0x31, 0x54, 0x42, - 0x6b, 0xc6, 0x32, 0x86, 0x29, 0x8a, 0x8b, 0xe6, 0x34, - 0xfe, 0x0d, 0x72, 0xcf, 0xde, 0xef, 0x0f, 0x3f, 0xc4, - 0x8e, 0xca, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(11, &vec); - - return result; -} - -unsigned int test_12(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x4f, 0x68, 0x80, 0xa6, 0x46, 0x10, 0x00, 0x44, 0x63, - 0x03, 0x1d, 0x67, 0xd7, 0x92, 0x4f, 0xa4, 0x46, 0xc3, - 0x91, 0x38, 0xd4, 0xd4, 0x10, 0x07, 0xe8, 0xdf, 0x3d, - 0x65, 0x69, 0x1a, 0x93, 0x67, - }, - { - 0x6b, 0x33, 0xb2, 0xc1, 0x36, 0x00, 0xf4, 0xb1, 0xdf, - 0x6c, 0xa3, 0xd1, 0x96, 0x0e, 0x8d, 0xd4, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x57, 0xb8, 0x7b, 0x8c, 0x8f, 0x48, 0x31, 0x2b, 0x53, - 0x33, 0xd4, 0x3b, 0x36, 0x77, 0x30, 0xc0, 0xa5, 0xad, - 0x47, 0x25, 0xa1, 0x67, 0x78, 0xfc, 0xb5, 0x3f, 0xe1, - 0x36, 0xd1, 0x36, 0xcb, 0xfd, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x73, 0xd0, 0xf3, 0x24, 0xed, 0x18, 0x6e, 0x2a, 0xd0, - 0x6b, 0xd1, 0x80, 0x0e, 0x26, 0x2b, 0xdb, 0xda, 0x79, - 0xba, 0x54, 0xe6, 0x26, 0x76, 0x1b, 0xd6, 0x0f, 0x74, - 0xf4, 0x3e, 0x3b, 0xb6, 0x29, 0x58, 0xec, 0x1e, 0x2f, - 0x1d, 0x94, 0x0a, 0xf1, 0x63, 0xe1, 0xca, 0xdc, 0x12, - 0x4e, 0x7e, 0xba, 0xba, 0x2f, 0x72, 0xe6, 0x7e, 0xfd, - 0x74, 0x6c, 0x7f, 0x6d, 0x0c, 0xad, 0x53, 0xef, 0x03, - 0xd8, 0x59, 0xd9, 0x3c, 0xff, 0x77, 0x8a, 0x32, 0xee, - 0x5b, 0xe1, 0x72, 0xfe, 0x7f, 0xdb, 0xdc, 0x23, 0x2d, - 0xed, 0x36, 0x0d, 0x70, 0x4a, 0x6f, 0xa0, 0xf7, 0x0b, - 0xeb, 0xe9, 0x42, 0xe5, 0x64, 0x78, 0x34, 0x54, 0x92, - 0xf4, 0x9d, 0xc5, 0xc6, 0xfc, 0x34, 0x6b, 0x88, 0xa5, - 0x89, 0x47, 0xad, 0x25, 0x0e, 0x68, 0x8e, 0x8c, 0x62, - 0x6f, 0xe1, 0xef, 0xe7, 0x62, 0x46, 0x20, 0xe5, 0x71, - 0x97, 0x6e, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(12, &vec); - - return result; -} - -unsigned int test_13(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xaa, 0xe3, 0x52, 0xe1, 0x11, 0x84, 0x32, 0x19, 0xca, - 0xe8, 0xf7, 0x0e, 0x7b, 0x8f, 0x6e, 0xb9, 0xbb, 0x53, - 0xd2, 0x46, 0xcb, 0xec, 0x1e, 0x4f, 0x07, 0xd4, 0x27, - 0x57, 0x14, 0x32, 0x95, 0xb4, - }, - { - 0xb8, 0x44, 0x85, 0xdc, 0xcd, 0x1b, 0xf9, 0x32, 0x10, - 0xe3, 0x22, 0xea, 0xfc, 0xbe, 0xbc, 0xd9, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xf9, 0x23, 0x7f, 0x00, 0xd7, 0x44, 0xd8, 0xfb, 0xff, - 0x21, 0xb9, 0xd0, 0x04, 0x3c, 0x25, 0x8e, 0x87, 0x31, - 0x81, 0x7e, 0x6a, 0x5f, 0xb7, 0xb4, 0xbf, 0x50, 0x11, - 0x68, 0x0e, 0x5b, 0xc6, 0x42, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xcf, 0xb2, 0x8b, 0x93, 0x52, 0x2c, 0x7d, 0x61, 0xd8, - 0xd3, 0xce, 0x3f, 0x08, 0x0e, 0x43, 0x5e, 0x4c, 0x83, - 0xc7, 0xe1, 0x3a, 0x9d, 0xab, 0x78, 0x8d, 0xb8, 0xfe, - 0xf0, 0x40, 0x72, 0x67, 0xa1, 0x4f, 0xbc, 0x93, 0x24, - 0xe0, 0x90, 0xe2, 0x4d, 0xf5, 0x49, 0x1f, 0xed, 0xfa, - 0x81, 0x11, 0x68, 0x69, 0x98, 0x39, 0x38, 0xd4, 0xd4, - 0xd7, 0x32, 0x4a, 0x31, 0x0c, 0x3a, 0xf3, 0x3a, 0x6f, - 0x79, 0x38, 0xf6, 0x02, 0xc5, 0xe4, 0xe6, 0x3f, 0x17, - 0x71, 0xcd, 0xaa, 0xbd, 0xab, 0x07, 0x82, 0xb5, 0xaf, - 0xfb, 0x54, 0xeb, 0x53, 0x04, 0x7c, 0x10, 0x9a, 0x96, - 0x06, 0x73, 0x9d, 0xd0, 0x06, 0x5b, 0xd2, 0x1e, 0xca, - 0x33, 0x13, 0x29, 0x86, 0x55, 0x48, 0x78, 0x35, 0x4f, - 0x5f, 0x9f, 0x85, 0x2e, 0x67, 0x4d, 0xd6, 0x90, 0x16, - 0x3b, 0x0f, 0xf7, 0x4c, 0x7a, 0x25, 0xe6, 0xba, 0xe8, - 0xce, 0x39, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(13, &vec); - - return result; -} - -unsigned int test_14(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x58, 0x9e, 0x79, 0xe3, 0x39, 0xb7, 0xd2, 0xa1, 0xb8, - 0x79, 0xf0, 0xb0, 0xe1, 0xa7, 0xd1, 0xad, 0x24, 0x74, - 0xea, 0xa8, 0x02, 0x5b, 0x07, 0x0f, 0x1f, 0xfa, 0x87, - 0x7b, 0x71, 0x24, 0xd4, 0xff, - }, - { - 0x09, 0x61, 0xed, 0x64, 0xdb, 0xd6, 0x20, 0x65, 0xd9, - 0x6e, 0x75, 0xde, 0x6d, 0x2f, 0xf9, 0xd6, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xe9, 0x28, 0x38, 0x8d, 0x3a, 0xf4, 0x8c, 0x29, 0x68, - 0x52, 0x7a, 0x4d, 0x2f, 0x9c, 0x26, 0x26, 0xfb, 0xc3, - 0xf3, 0xf5, 0xa5, 0xd8, 0x4e, 0x05, 0x83, 0xab, 0x6f, - 0x78, 0xe7, 0xf8, 0xb0, 0x81, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xfc, 0xe6, 0xce, 0xd1, 0xec, 0xf4, 0x74, 0xd1, 0x81, - 0xab, 0x33, 0x1f, 0x79, 0xc3, 0xd2, 0xcc, 0x8a, 0x76, - 0x8e, 0xc2, 0x81, 0x8d, 0xe5, 0xb3, 0xfc, 0x7c, 0xf4, - 0x18, 0x32, 0x27, 0x16, 0xd6, 0xa6, 0x85, 0x37, 0x33, - 0x56, 0x1a, 0x49, 0x7c, 0x0c, 0x25, 0xcb, 0x28, 0x8d, - 0x2c, 0x9f, 0xcf, 0xbc, 0xa8, 0x91, 0xba, 0xfd, 0x5a, - 0x83, 0x4c, 0x85, 0xf3, 0x60, 0x3f, 0x40, 0x2a, 0xcf, - 0x1a, 0x7b, 0x1e, 0xa9, 0x2d, 0xb8, 0x47, 0xed, 0x5c, - 0x25, 0x2a, 0x86, 0x2a, 0xd4, 0xab, 0x5e, 0x25, 0x97, - 0x15, 0xf1, 0xfc, 0x81, 0xda, 0x67, 0xf5, 0x23, 0x0b, - 0xf8, 0xbe, 0x50, 0xee, 0x80, 0x69, 0x75, 0x80, 0x95, - 0xf7, 0xd0, 0xe5, 0x59, 0xe0, 0x3f, 0x2c, 0x60, 0x72, - 0x29, 0x0e, 0x61, 0x79, 0x44, 0x58, 0x43, 0x76, 0x09, - 0xe4, 0x73, 0xeb, 0x66, 0x58, 0x0c, 0xdd, 0xaa, 0xd1, - 0x9b, 0x71, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(14, &vec); - - return result; -} - -unsigned int test_15(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x71, 0x42, 0x77, 0xd4, 0x08, 0xad, 0x87, 0xfd, 0xe3, - 0x17, 0xf0, 0xa9, 0x47, 0x32, 0xfc, 0xe6, 0x2f, 0x13, - 0x52, 0xbd, 0xc9, 0x09, 0x36, 0x67, 0x3b, 0x4f, 0x1d, - 0xaa, 0x09, 0x25, 0xaa, 0x26, - }, - { - 0xd1, 0x65, 0x82, 0xa9, 0x9f, 0x23, 0x01, 0x0b, 0x42, - 0x48, 0xb8, 0x8d, 0x86, 0x48, 0x54, 0x19, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xbd, 0x9f, 0xc7, 0xcb, 0x2f, 0xd5, 0x06, 0x3b, 0x2c, - 0x3c, 0x0c, 0x4f, 0x34, 0x6a, 0xd2, 0xe3, 0x87, 0x93, - 0x71, 0xa9, 0xc8, 0x05, 0xe5, 0x9b, 0x9f, 0x2c, 0xd2, - 0xcc, 0x2a, 0x40, 0x89, 0x4f, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x62, 0xef, 0x7a, 0x43, 0x12, 0x88, 0x25, 0x2e, 0x0d, - 0x73, 0x6c, 0x1d, 0x4e, 0x36, 0xcc, 0x9a, 0xc3, 0x71, - 0x07, 0xdc, 0xd0, 0xd0, 0xe9, 0x71, 0xa2, 0x24, 0x44, - 0xa4, 0xad, 0xae, 0x73, 0xa4, 0x1e, 0xff, 0x0b, 0x11, - 0xc8, 0x62, 0x5e, 0x11, 0x8d, 0xbc, 0x92, 0x26, 0x14, - 0x2f, 0xd0, 0xa6, 0xaa, 0x10, 0xac, 0x9b, 0x19, 0x09, - 0x19, 0xbd, 0xa4, 0x4e, 0x72, 0x48, 0xd6, 0xc8, 0x88, - 0x74, 0x61, 0x2a, 0xbd, 0x77, 0xfb, 0x37, 0x16, 0xea, - 0x51, 0x5a, 0x2d, 0x56, 0x32, 0x37, 0xc4, 0x46, 0xe2, - 0xa2, 0x82, 0xe7, 0xc3, 0xb0, 0xa3, 0xae, 0xf2, 0x7d, - 0x34, 0x27, 0xcc, 0x7d, 0x0a, 0x7d, 0x38, 0x71, 0x46, - 0x59, 0xc3, 0x40, 0x1d, 0xbc, 0x91, 0xd3, 0x59, 0x51, - 0x59, 0x31, 0x8e, 0xbc, 0xa0, 0x1a, 0xe7, 0xd7, 0xfd, - 0x1c, 0x89, 0xf6, 0xad, 0x6b, 0x60, 0x41, 0x73, 0xb0, - 0xc7, 0x44, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(15, &vec); - - return result; -} - -unsigned int test_16(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xfa, 0x0e, 0xe1, 0xfe, 0x39, 0xc7, 0xc3, 0x90, 0xaa, - 0x94, 0x15, 0x9d, 0x0d, 0xe9, 0x75, 0x64, 0x34, 0x2b, - 0x59, 0x17, 0x77, 0xf3, 0xe5, 0xf6, 0xa4, 0xba, 0x2a, - 0xea, 0x34, 0x2e, 0xc8, 0x40, - }, - { - 0xdd, 0x08, 0x20, 0x65, 0x5c, 0xb2, 0xff, 0xdb, 0x0d, - 0xa9, 0xe9, 0x31, 0x0a, 0x67, 0xc9, 0xe5, - }, - { - 0xf2, 0xe5, 0x8f, 0xe6, 0x0a, 0x3a, 0xfc, 0x59, 0xda, - 0xd3, 0x75, 0x95, 0x41, 0x5f, 0xfd, 0x31, 0x8c, 0xcf, - 0x69, 0xd6, 0x77, 0x80, 0xf6, 0xfa, 0x07, 0x97, 0xdc, - 0x9a, 0xa4, 0x3e, 0x14, 0x4c, - }, - { - 0xe0, 0x62, 0x9b, 0x6d, 0x79, 0x75, 0xdd, 0xfa, 0x96, - 0xa3, 0x99, 0x64, 0x87, 0x40, 0xe6, 0x0f, 0x1f, 0x95, - 0x57, 0xdc, 0x58, 0xb3, 0xd7, 0x41, 0x5f, 0x9b, 0xa9, - 0xd4, 0xdb, 0xb5, 0x01, 0xf6, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xf9, 0x2d, 0x4c, 0xf9, 0x9a, 0x53, 0x5b, 0x20, 0x22, - 0x2a, 0x52, 0xa6, 0x8d, 0xb0, 0x4c, 0x5a, 0xf6, 0xf5, - 0xff, 0xc7, 0xb6, 0x6a, 0x47, 0x3a, 0x37, 0xa2, 0x56, - 0xbd, 0x8d, 0x29, 0x8f, 0x9b, 0x4a, 0xa4, 0xaf, 0x7e, - 0x8d, 0x18, 0x1e, 0x02, 0x36, 0x79, 0x03, 0xf9, 0x3b, - 0xdb, 0x74, 0x4c, 0x6c, 0x2f, 0x3f, 0x34, 0x72, 0x62, - 0x6b, 0x40, 0xce, 0x9b, 0xd6, 0xa7, 0x0e, 0x7b, 0x8f, - 0x93, 0x99, 0x2a, 0x16, 0xa7, 0x6f, 0xab, 0x6b, 0x5f, - 0x16, 0x25, 0x68, 0xe0, 0x8e, 0xe6, 0xc3, 0xe8, 0x04, - 0xae, 0xfd, 0x95, 0x2d, 0xdd, 0x3a, 0xcb, 0x79, 0x1c, - 0x50, 0xf2, 0xad, 0x69, 0xe9, 0xa0, 0x40, 0x28, 0xa0, - 0x6a, 0x9c, 0x01, 0xd3, 0xa6, 0x2a, 0xca, 0x2a, 0xaf, - 0x6e, 0xfe, 0x69, 0xed, 0x97, 0xa0, 0x16, 0x21, 0x3a, - 0x2d, 0xd6, 0x42, 0xb4, 0x88, 0x67, 0x64, 0x07, 0x2d, - 0x9c, 0xbe, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(16, &vec); - - return result; -} - -unsigned int test_17(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xcf, 0xf7, 0x2f, 0x34, 0x51, 0x15, 0x37, 0x6a, 0x57, - 0xf4, 0xdb, 0x8a, 0x5c, 0x9f, 0x64, 0x05, 0x3e, 0x73, - 0x79, 0x17, 0x1a, 0x5a, 0x1e, 0x81, 0xe8, 0x2a, 0xad, - 0x34, 0x48, 0xd1, 0x7d, 0x44, - }, - { - 0xd1, 0xe9, 0x71, 0xec, 0x79, 0x5d, 0x09, 0x8b, 0x3d, - 0xae, 0x14, 0xff, 0xcb, 0xee, 0xcf, 0xd9, - }, - { - 0x6e, 0xc0, 0xc7, 0x98, 0xc2, 0x40, 0xf2, 0x27, 0x40, - 0xca, 0xd7, 0xe2, 0x7b, 0x41, 0xf5, 0xe4, 0x2d, 0xcc, - 0xaf, 0x66, 0xde, 0xf3, 0xb7, 0xf3, 0x41, 0xc4, 0xd8, - 0x27, 0x29, 0x4f, 0x83, 0xc9, - }, - { - 0x45, 0xec, 0x80, 0xf0, 0xc0, 0x0c, 0xad, 0x0f, 0xf0, - 0xb7, 0x61, 0x6d, 0x2a, 0x93, 0x0a, 0xf3, 0xf5, 0xcf, - 0x23, 0xcd, 0x61, 0xbe, 0x7f, 0xbf, 0x7c, 0x65, 0xbe, - 0x00, 0x31, 0xe9, 0x3e, 0x38, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x17, 0xa7, 0x90, 0x1e, 0x25, 0x50, 0xde, 0x08, 0x8f, - 0x47, 0x25, 0x18, 0xd3, 0x77, 0xcc, 0x4c, 0xc6, 0x97, - 0x9f, 0x4a, 0x64, 0xf4, 0x97, 0x5c, 0x74, 0x34, 0x42, - 0x15, 0xe4, 0x80, 0x7a, 0x12, 0x34, 0xee, 0xfe, 0xf9, - 0x9f, 0x64, 0xcb, 0x8a, 0xbc, 0x3f, 0xb8, 0x62, 0x09, - 0xf6, 0xfc, 0x7d, 0xdd, 0x03, 0xe9, 0x4f, 0x83, 0x74, - 0x6c, 0x5a, 0xbe, 0x53, 0x60, 0xcd, 0xde, 0x4f, 0x25, - 0x25, 0xcc, 0xf7, 0x16, 0x7e, 0x6f, 0x0b, 0xef, 0xae, - 0x05, 0xb3, 0x8f, 0xd6, 0x08, 0x9a, 0x2a, 0xb8, 0x37, - 0x19, 0x87, 0x4c, 0xe8, 0xf6, 0x70, 0x48, 0x0d, 0x5f, - 0x3e, 0xd9, 0xbf, 0x40, 0x53, 0x8a, 0x15, 0xaa, 0xad, - 0x11, 0x2d, 0xb1, 0x61, 0x8a, 0x58, 0xb1, 0x06, 0x87, - 0xb6, 0x88, 0x75, 0xf0, 0x0f, 0x13, 0x9a, 0x72, 0xbd, - 0xf0, 0x43, 0xf7, 0x36, 0xe4, 0xa3, 0x20, 0xc0, 0x6e, - 0xfd, 0x2c, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(17, &vec); - - return result; -} - -unsigned int test_18(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xb7, 0x09, 0x9b, 0x06, 0xfc, 0x7a, 0x8a, 0x74, 0xc5, - 0x82, 0x19, 0x72, 0x9d, 0xb6, 0xb0, 0xf7, 0x80, 0xd7, - 0xb4, 0xfa, 0x30, 0x7b, 0xc3, 0xd3, 0xf9, 0xf2, 0x2b, - 0xfb, 0x76, 0x35, 0x96, 0xa3, - }, - { - 0xb8, 0x77, 0x20, 0x59, 0xa1, 0x35, 0xa6, 0xb6, 0x1d, - 0xa7, 0x2f, 0x37, 0x54, 0x11, 0xde, 0x26, - }, - { - 0x2a, 0xc1, 0xbf, 0xb2, 0x4e, 0x0b, 0x8c, 0x6a, 0xc2, - 0x80, 0x3e, 0x89, 0x26, 0x18, 0x22, 0xb7, 0xf7, 0x2a, - 0x03, 0x20, 0xdf, 0x2b, 0x19, 0x91, 0x71, 0xb7, 0x9b, - 0xcb, 0xdb, 0x40, 0xb7, 0x19, - }, - { - 0x9a, 0xec, 0x4f, 0x56, 0xec, 0x5e, 0x96, 0xfb, 0xd9, - 0x60, 0x48, 0xb9, 0xa6, 0x3a, 0xc8, 0xd0, 0x47, 0xae, - 0xdb, 0xbe, 0xea, 0x77, 0x12, 0xe2, 0x41, 0x13, 0x3b, - 0x1a, 0x35, 0x7e, 0xcf, 0xc4, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x0e, 0x1f, 0x2b, 0xfe, 0xf7, 0x78, 0xf5, 0xe5, 0xbe, - 0x67, 0x1e, 0xcb, 0x49, 0x71, 0x62, 0x4e, 0xc7, 0x84, - 0xed, 0x27, 0x32, 0xab, 0xc4, 0xfb, 0xb9, 0x8a, 0x8b, - 0x48, 0x2f, 0xb6, 0x87, 0x37, 0xdf, 0x91, 0xfd, 0x15, - 0xac, 0xfa, 0xd2, 0x95, 0x14, 0x03, 0xac, 0x77, 0xc5, - 0xca, 0x3e, 0xdf, 0xfc, 0x1e, 0x03, 0x39, 0x8a, 0xe6, - 0xcf, 0x6a, 0xc2, 0x4a, 0x91, 0x67, 0x8d, 0xb5, 0xc7, - 0x29, 0x0a, 0xbc, 0x3f, 0xa0, 0x01, 0xaa, 0x02, 0xd5, - 0x03, 0x99, 0x32, 0x6f, 0x85, 0xd2, 0xb8, 0x94, 0x21, - 0x99, 0xa1, 0x57, 0x5f, 0x67, 0x46, 0x36, 0x47, 0x40, - 0xa5, 0x91, 0x05, 0x52, 0xc6, 0x39, 0x80, 0x4d, 0x75, - 0x30, 0xc0, 0xd4, 0x13, 0x39, 0x34, 0x5a, 0x58, 0xff, - 0x00, 0x80, 0xec, 0xcf, 0x17, 0x11, 0x89, 0x51, 0x92, - 0xa3, 0x81, 0x7a, 0x8d, 0xc3, 0xf0, 0x0f, 0x28, 0xcc, - 0x10, 0xcc, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(18, &vec); - - return result; -} - -unsigned int test_19(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x7b, 0xa0, 0x2a, 0x73, 0x4c, 0x87, 0x44, 0xb1, 0x5e, - 0xf8, 0xb4, 0x07, 0x4f, 0xe6, 0x39, 0xb3, 0x2e, 0x44, - 0x31, 0x76, 0x2a, 0xb5, 0xb7, 0xcd, 0x4d, 0x5d, 0xf6, - 0x75, 0xea, 0x90, 0x67, 0x2b, - }, - { - 0x8a, 0x42, 0x4f, 0x32, 0x10, 0x86, 0x07, 0xc8, 0xf1, - 0xf4, 0x5d, 0x97, 0xf5, 0x00, 0xee, 0x12, - }, - { - 0x3a, 0xd6, 0x27, 0x43, 0x3f, 0x46, 0x51, 0x87, 0xc4, - 0x81, 0x41, 0xe3, 0x0c, 0x26, 0x78, 0x10, 0x60, 0x91, - 0xe7, 0xa6, 0x80, 0x22, 0x9a, 0x53, 0x4b, 0x85, 0x1b, - 0x8d, 0x46, 0xfe, 0xb9, 0x57, - }, - { - 0xd8, 0xf0, 0x2b, 0x59, 0xb6, 0xa3, 0xdd, 0x27, 0x6b, - 0xc6, 0x9c, 0xba, 0x68, 0xef, 0xcf, 0x11, 0xab, 0x83, - 0xea, 0xd1, 0x39, 0x7a, 0xfd, 0x98, 0x41, 0x78, 0x6b, - 0xd1, 0xbb, 0x5d, 0xa9, 0x7a, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x1f, 0xb9, 0x11, 0x86, 0xba, 0x4b, 0x44, 0x59, 0xd9, - 0x94, 0xb4, 0xb9, 0xf4, 0xca, 0x25, 0x2c, 0x7b, 0xe6, - 0x29, 0x4d, 0x6c, 0xdb, 0x5f, 0xe5, 0x6f, 0x8f, 0xf7, - 0x84, 0xd4, 0xb1, 0x90, 0xa1, 0xc6, 0x45, 0x6e, 0x0a, - 0x41, 0x22, 0x3b, 0xbb, 0xdf, 0x83, 0xed, 0x8e, 0x7c, - 0xfb, 0xfa, 0x76, 0x5d, 0x9d, 0x8b, 0xc7, 0xea, 0x5f, - 0x4d, 0x79, 0xea, 0x7e, 0xcc, 0xb4, 0x92, 0x80, 0x81, - 0xa2, 0x1d, 0xe4, 0xcc, 0xa3, 0x66, 0x20, 0xd6, 0x26, - 0x7f, 0x55, 0xd9, 0xa3, 0x52, 0xb7, 0x6f, 0xc0, 0xa5, - 0x73, 0x75, 0x88, 0x41, 0x12, 0xc3, 0x1f, 0x65, 0xff, - 0x28, 0xe7, 0x6d, 0x31, 0x56, 0x98, 0xc2, 0x9e, 0x6c, - 0x4c, 0x05, 0xcb, 0x58, 0xb0, 0xa0, 0x7a, 0xe6, 0x61, - 0x43, 0xb4, 0xab, 0xc7, 0x8b, 0x9d, 0x25, 0xc7, 0x8b, - 0x41, 0x21, 0xe1, 0xe4, 0x5b, 0xef, 0x1a, 0x6c, 0x17, - 0x93, 0xe2, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(19, &vec); - - return result; -} - -unsigned int test_20(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x9a, 0x88, 0x65, 0xdf, 0xe0, 0x53, 0xae, 0x77, 0xcb, - 0x6a, 0x93, 0x65, 0xb8, 0x8f, 0x34, 0xee, 0xc1, 0x7e, - 0xa5, 0xcb, 0xfb, 0x0b, 0x1f, 0x04, 0xd1, 0x45, 0x9e, - 0x7f, 0xa9, 0xc4, 0xf3, 0xcb, - }, - { - 0x18, 0x0c, 0x0a, 0x74, 0xda, 0x3e, 0xc4, 0x64, 0xdf, - 0x11, 0xfa, 0xc1, 0x72, 0xd1, 0xc6, 0x32, - }, - { - 0x33, 0x63, 0x72, 0xec, 0x82, 0xd0, 0xd6, 0x8b, 0xef, - 0xad, 0x83, 0x69, 0x19, 0x66, 0xef, 0x6f, 0xfc, 0x65, - 0x10, 0x53, 0x88, 0xeb, 0x2d, 0x6e, 0xed, 0x82, 0x6c, - 0x22, 0x85, 0x03, 0x7c, 0x77, - }, - { - 0x75, 0xb9, 0x51, 0x08, 0xef, 0xf1, 0xfa, 0xbe, 0x83, - 0x61, 0x3e, 0x1c, 0x4d, 0xe5, 0x75, 0xe7, 0x2a, 0x5c, - 0xdc, 0x4b, 0xb9, 0x31, 0x1d, 0xd0, 0x06, 0xf9, 0x71, - 0xa0, 0x52, 0x38, 0x66, 0x92, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x3c, 0x68, 0x3f, 0x6d, 0x4f, 0x8f, 0x5a, 0x40, 0x18, - 0xd0, 0x16, 0x33, 0xdf, 0xee, 0x74, 0x26, 0x6a, 0xaa, - 0x68, 0xed, 0x6f, 0xc6, 0x49, 0xe8, 0x1b, 0x64, 0xdf, - 0xdf, 0x5f, 0x75, 0xe7, 0x5d, 0x5c, 0x05, 0x8d, 0x66, - 0xcf, 0x5f, 0xd0, 0x1a, 0x4f, 0x14, 0x3a, 0x6f, 0xf6, - 0x95, 0x51, 0x7a, 0x4a, 0x43, 0xbd, 0x3a, 0xdf, 0xd1, - 0xfb, 0x2c, 0x28, 0xba, 0x9a, 0x41, 0x06, 0x31, 0x40, - 0xbe, 0xdb, 0xff, 0xdb, 0x4d, 0x21, 0xb1, 0xac, 0xe1, - 0x55, 0x0d, 0x59, 0x20, 0x9e, 0xc6, 0x1f, 0x1e, 0x2d, - 0xba, 0xcb, 0x2a, 0x91, 0x16, 0xa7, 0x9c, 0xb1, 0x41, - 0x0b, 0xf2, 0xde, 0xca, 0x52, 0x18, 0x08, 0x0a, 0xac, - 0xd9, 0xc6, 0x8e, 0x1d, 0x65, 0x57, 0x72, 0x1a, 0x89, - 0x13, 0xe2, 0x3f, 0x61, 0x7e, 0x30, 0xf2, 0xe5, 0x94, - 0xf6, 0x12, 0x67, 0xd5, 0xed, 0x81, 0x46, 0x4e, 0xe7, - 0x30, 0xb2, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(20, &vec); - - return result; -} - -unsigned int test_21(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x22, 0xc1, 0xaf, 0x2f, 0x2a, 0x4c, 0x88, 0x5f, 0x06, - 0x98, 0x85, 0x67, 0xda, 0x9f, 0xc9, 0x0f, 0x34, 0xf8, - 0x0f, 0x6d, 0xd5, 0x10, 0x1c, 0x28, 0x1b, 0xee, 0xf4, - 0x97, 0xa6, 0xa1, 0xb2, 0xf8, - }, - { - 0x3f, 0xaf, 0xde, 0xcf, 0x79, 0xa4, 0x17, 0x48, 0x01, - 0xf1, 0x33, 0x13, 0x16, 0x29, 0x03, 0x7b, - }, - { - 0x80, 0x32, 0x7d, 0xac, 0x48, 0x61, 0x11, 0xb8, 0xa8, - 0xb2, 0xc8, 0xe8, 0x38, 0x1f, 0xb2, 0xd7, 0x13, 0xa6, - 0x76, 0x95, 0xc2, 0xe6, 0x60, 0xb2, 0xb0, 0xd4, 0xaf, - 0x69, 0x6c, 0xc3, 0xe1, 0xde, - }, - { - 0xf9, 0x5a, 0x0e, 0x4b, 0xd2, 0x4f, 0x0e, 0x2e, 0x9e, - 0x44, 0x4f, 0x51, 0x1b, 0x76, 0x32, 0x86, 0x8e, 0xad, - 0x0d, 0x5b, 0xb3, 0x84, 0x67, 0x71, 0x26, 0x4e, 0x03, - 0xf8, 0xab, 0x8e, 0xd0, 0x74, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x77, 0xa7, 0xfe, 0xa2, 0xf3, 0x5a, 0x18, 0x8f, 0x6d, - 0x1b, 0xfd, 0xd4, 0x9b, 0x56, 0x9d, 0x8c, 0x45, 0xe2, - 0xdd, 0x43, 0x1d, 0x35, 0xa1, 0x8c, 0x6f, 0x43, 0x2c, - 0x72, 0x4f, 0x1e, 0x33, 0xae, 0x92, 0xcb, 0x89, 0xa9, - 0xcf, 0x91, 0x51, 0x9e, 0x50, 0x70, 0x5a, 0x53, 0x19, - 0x9f, 0x5b, 0x57, 0x2d, 0xc8, 0x5c, 0x1a, 0xef, 0x8f, - 0x28, 0xfb, 0x52, 0xdc, 0x79, 0x86, 0x22, 0x8f, 0x66, - 0x95, 0x4d, 0x54, 0xed, 0xa8, 0x4a, 0x86, 0x96, 0x2c, - 0xf2, 0x5c, 0xf7, 0x65, 0xbd, 0x99, 0x49, 0x87, 0x63, - 0x49, 0x29, 0x1b, 0x1a, 0xae, 0x5f, 0x88, 0xfc, 0xf4, - 0xb3, 0x76, 0x91, 0x2d, 0x20, 0x5a, 0xdd, 0x4f, 0x53, - 0xb2, 0x77, 0x0c, 0x65, 0x79, 0x46, 0xc0, 0xd8, 0x24, - 0x28, 0x1f, 0x44, 0x15, 0x09, 0x15, 0x3f, 0x48, 0x35, - 0x6d, 0x9d, 0x43, 0xf8, 0xa9, 0x27, 0xe0, 0x69, 0x3d, - 0xb8, 0xfc, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(21, &vec); - - return result; -} - -unsigned int test_22(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xd0, 0x84, 0x0e, 0x3a, 0x8d, 0x62, 0x9d, 0x5b, 0x88, - 0x3d, 0x33, 0xe0, 0x53, 0xa3, 0x41, 0xb2, 0x1c, 0x67, - 0x4e, 0x67, 0xe1, 0x99, 0x9f, 0x06, 0x8c, 0x49, 0x7e, - 0xcf, 0xaa, 0xbf, 0xd6, 0xf6, - }, - { - 0x07, 0x1d, 0xe7, 0x24, 0x4e, 0xcb, 0x2f, 0xdf, 0x7a, - 0xb2, 0x7f, 0x2d, 0x84, 0xaa, 0x7b, 0x7a, - }, - { - 0x90, 0xd6, 0x09, 0x52, 0x7f, 0xad, 0x96, 0xff, 0xe6, - 0x4a, 0xb1, 0x53, 0x86, 0x03, 0x46, 0xf3, 0xd2, 0x37, - 0xc8, 0x94, 0x05, 0x55, 0xae, 0x17, 0xb4, 0x78, 0x42, - 0xd8, 0x2d, 0x3b, 0x09, 0x43, - }, - { - 0x1d, 0xd1, 0xa8, 0xb5, 0x98, 0x56, 0xc4, 0x9a, 0x38, - 0x8f, 0x59, 0x4c, 0x5f, 0x42, 0xcc, 0x2e, 0x4a, 0x56, - 0xb3, 0xcc, 0xb8, 0xa6, 0x5e, 0x70, 0x66, 0xe4, 0x4c, - 0x12, 0xf4, 0x34, 0x4d, 0x50, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x7a, 0xb2, 0x8a, 0x9b, 0x2d, 0x3a, 0xe9, 0x99, 0x19, - 0x55, 0x53, 0xe6, 0x55, 0x0c, 0xce, 0xd4, 0xc2, 0xda, - 0xcc, 0xbe, 0x7e, 0xc9, 0xdc, 0xbb, 0x0d, 0x46, 0x7f, - 0xab, 0xba, 0x18, 0x5b, 0x72, 0x7f, 0xbf, 0xd9, 0x83, - 0x02, 0x42, 0xcd, 0x09, 0x8f, 0x4d, 0xb3, 0xcf, 0x4a, - 0x85, 0xe8, 0xbf, 0x8e, 0x8d, 0x59, 0x74, 0xb6, 0x2b, - 0x28, 0x55, 0x09, 0x22, 0xb3, 0x2e, 0xd5, 0xbf, 0xc1, - 0xa5, 0x22, 0xb6, 0x60, 0x5c, 0xf9, 0x3b, 0xf8, 0xd9, - 0x0b, 0xde, 0xc1, 0xc5, 0xb9, 0xe5, 0x9c, 0x6f, 0xc3, - 0x7a, 0x81, 0x7d, 0x43, 0x70, 0x68, 0xa8, 0x72, 0x54, - 0xbe, 0x1f, 0x7c, 0x46, 0x18, 0xad, 0xa4, 0x6f, 0xbc, - 0x3a, 0x2e, 0xfb, 0x02, 0xe4, 0x45, 0x24, 0xe2, 0x1d, - 0x91, 0xbe, 0x75, 0x34, 0xcf, 0x05, 0xfb, 0xfd, 0x85, - 0x83, 0x04, 0xb7, 0x06, 0xd6, 0xa9, 0x1e, 0xa1, 0xcc, - 0x6a, 0xd5, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(22, &vec); - - return result; -} - -unsigned int test_23(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x2e, 0x2d, 0xd5, 0x68, 0x69, 0x10, 0x44, 0x92, 0x76, - 0x7a, 0x59, 0x77, 0x86, 0x52, 0x83, 0x19, 0x19, 0xe1, - 0xc8, 0xb9, 0x70, 0xf8, 0x4e, 0x82, 0x4a, 0xe4, 0x11, - 0x65, 0x97, 0xa0, 0xab, 0x7f, - }, - { - 0x01, 0xc4, 0x2a, 0x7e, 0x98, 0x36, 0x41, 0xde, 0x46, - 0xc8, 0x2f, 0xd0, 0x9b, 0x4f, 0x2f, 0x76, - }, - { - 0xbc, 0xd9, 0xe1, 0x50, 0x8f, 0xcc, 0x22, 0x82, 0x0a, - 0x8b, 0xe0, 0x71, 0x80, 0xfe, 0xa5, 0x04, 0x53, 0x67, - 0x33, 0x3b, 0x56, 0x9e, 0x11, 0x1b, 0x01, 0x1c, 0xd5, - 0x7d, 0xc1, 0x85, 0x87, 0x65, - }, - { - 0x73, 0x06, 0x50, 0x7c, 0xd3, 0xca, 0x7e, 0xec, 0x66, - 0x7e, 0x64, 0x0d, 0x27, 0x0c, 0xfb, 0xb0, 0x33, 0x06, - 0x3d, 0x97, 0x52, 0x0b, 0x6b, 0x7e, 0x38, 0xff, 0x3c, - 0xea, 0x0e, 0x79, 0xd1, 0x2b, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb9, 0x15, 0x72, 0x6c, 0x7b, 0x8c, 0x5d, 0xc3, 0x97, - 0x5f, 0x1a, 0x33, 0x46, 0x84, 0xb9, 0x73, 0xab, 0xf6, - 0xa9, 0x49, 0x5d, 0x93, 0x00, 0x88, 0xcf, 0x5d, 0x07, - 0x15, 0x48, 0xe4, 0xfd, 0x29, 0xa6, 0x7b, 0x55, 0xcc, - 0x56, 0x1e, 0xd6, 0x94, 0x9a, 0xd2, 0x81, 0x50, 0xa9, - 0xfb, 0x43, 0x07, 0xc1, 0xfa, 0x5f, 0x78, 0x3a, 0x7e, - 0xa8, 0x72, 0xe8, 0xd7, 0xc7, 0xe6, 0x7f, 0xf0, 0xc2, - 0x90, 0x60, 0x81, 0xee, 0x91, 0x57, 0x37, 0xd8, 0x13, - 0xc2, 0x5b, 0xe5, 0xc3, 0x0b, 0x95, 0x2a, 0x36, 0xf3, - 0x93, 0xe6, 0xba, 0xa5, 0x6a, 0xb0, 0x1a, 0xdc, 0x2b, - 0x47, 0x76, 0xad, 0x7b, 0x5d, 0x03, 0x6a, 0x53, 0x65, - 0x98, 0x77, 0xc7, 0xa4, 0xe5, 0x22, 0x0a, 0x89, 0x7d, - 0x6c, 0x07, 0x99, 0xaf, 0x37, 0xbe, 0xee, 0xd9, 0x11, - 0x73, 0xfb, 0xe9, 0xc6, 0x13, 0xc3, 0xb6, 0xb9, 0xbb, - 0x28, 0xe5, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(23, &vec); - - return result; -} - -unsigned int test_24(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xd1, 0xaa, 0xb0, 0xf1, 0x6b, 0xd4, 0x7a, 0x5c, 0xcd, - 0x67, 0xc2, 0x2e, 0x09, 0x4d, 0xaa, 0x37, 0x35, 0xea, - 0xe2, 0x1a, 0xa5, 0x7f, 0x0b, 0xcd, 0x9e, 0x05, 0x3d, - 0x9d, 0x0d, 0x54, 0x5c, 0xb8, - }, - { - 0x19, 0x93, 0x10, 0xdf, 0xe1, 0xb0, 0x12, 0x65, 0xb8, - 0xc0, 0xd2, 0xb4, 0x6d, 0x6c, 0x7c, 0x9f, - }, - { - 0x62, 0x5b, 0x4b, 0x8f, 0x4d, 0xe7, 0x2e, 0xa9, 0xcb, - 0x6f, 0x70, 0x55, 0x63, 0x22, 0xdc, 0x2a, 0x19, 0xd6, - 0xb2, 0xb3, 0x2d, 0xe6, 0x23, 0xf5, 0x57, 0xe4, 0x19, - 0xa0, 0x84, 0xba, 0x60, 0xfd, - }, - { - 0xf5, 0x0c, 0xab, 0xae, 0x4e, 0x06, 0x0f, 0x39, 0x71, - 0x09, 0x6b, 0x78, 0xe5, 0x50, 0xcd, 0xa2, 0x83, 0x7a, - 0x26, 0xa6, 0x93, 0xd9, 0x05, 0xdb, 0x2d, 0x99, 0x2d, - 0x58, 0x9b, 0x26, 0x8f, 0x44, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x98, 0x7e, 0x1f, 0xdf, 0xe0, 0x04, 0xc6, 0x19, 0xcf, - 0x1e, 0x90, 0x34, 0x57, 0x67, 0x07, 0xec, 0xcd, 0x84, - 0x94, 0x00, 0xe1, 0x9c, 0x87, 0xa1, 0xfe, 0xf5, 0xb0, - 0x17, 0x9e, 0xc5, 0x1c, 0x42, 0xa2, 0xf8, 0xc4, 0x5d, - 0x79, 0x42, 0xd0, 0x02, 0x3a, 0x02, 0x3c, 0x89, 0xf1, - 0x88, 0xb2, 0x63, 0x43, 0x62, 0x70, 0x39, 0x85, 0x69, - 0x53, 0x69, 0x86, 0x33, 0x22, 0xf5, 0x86, 0x19, 0xc5, - 0x0a, 0x73, 0x85, 0xa2, 0xdc, 0x91, 0xfc, 0x78, 0xf9, - 0x4b, 0x59, 0xf0, 0x13, 0x1d, 0xc2, 0xb5, 0x6a, 0x0d, - 0x7c, 0x69, 0x9d, 0x42, 0x72, 0x85, 0xda, 0x1c, 0x10, - 0x4b, 0x0a, 0xd1, 0x73, 0x9d, 0xa1, 0x0d, 0x80, 0x71, - 0xc2, 0x39, 0x93, 0x78, 0x70, 0x45, 0xdc, 0x21, 0xf0, - 0x07, 0x0e, 0x1e, 0x9a, 0xa1, 0x65, 0x8f, 0xc8, 0xe3, - 0xad, 0xd7, 0x3d, 0xac, 0x72, 0x62, 0xe8, 0x0e, 0x0a, - 0xa2, 0xee, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(24, &vec); - - return result; -} - -unsigned int test_25(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x44, 0x94, 0x80, 0xea, 0xa1, 0x00, 0xaf, 0xf6, 0xf4, - 0x8d, 0xc6, 0x28, 0x6a, 0x5a, 0x81, 0xb9, 0x72, 0x8b, - 0x08, 0x48, 0x64, 0xf7, 0x8a, 0x9d, 0xa9, 0x8f, 0x60, - 0x6a, 0x00, 0xa6, 0xa4, 0x1f, - }, - { - 0xe5, 0x3c, 0x6c, 0x5a, 0xc3, 0xda, 0x9f, 0x47, 0x26, - 0x38, 0x9a, 0x03, 0xf9, 0x7b, 0xb6, 0x40, - }, - { - 0x6b, 0x8f, 0xed, 0xc0, 0x84, 0xd8, 0xe2, 0x8d, 0x33, - 0x3a, 0xef, 0x6d, 0xb3, 0x70, 0x2b, 0x63, 0x51, 0xf0, - 0xd2, 0x4e, 0x30, 0x90, 0x8c, 0xcc, 0xb6, 0x37, 0x94, - 0x28, 0x26, 0x55, 0x88, 0x6b, - }, - { - 0x73, 0xa6, 0xd6, 0x4e, 0x19, 0x66, 0xae, 0x32, 0x43, - 0x88, 0xdc, 0x12, 0xc1, 0x45, 0x44, 0xe9, 0xdc, 0x5a, - 0xe4, 0xfc, 0xb3, 0x31, 0xe9, 0x9d, 0x35, 0x0c, 0x45, - 0x6f, 0xf1, 0x6f, 0x9a, 0xa0, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xa0, 0x69, 0x12, 0xd3, 0x62, 0xda, 0x7e, 0xb2, 0x55, - 0x98, 0x85, 0x7f, 0x6d, 0x65, 0x34, 0x4c, 0x3e, 0x23, - 0xec, 0x3d, 0xeb, 0x80, 0xc6, 0xe4, 0x31, 0x58, 0x84, - 0x5b, 0x95, 0xea, 0xec, 0xa2, 0x41, 0xc0, 0xbb, 0xbd, - 0x67, 0xac, 0x38, 0x5e, 0x24, 0x69, 0x34, 0x44, 0x45, - 0x5c, 0xc1, 0xc2, 0xc0, 0x8c, 0x11, 0x34, 0xd9, 0x56, - 0xb8, 0xbc, 0x93, 0xb2, 0x8b, 0xe9, 0xc2, 0xd3, 0x32, - 0x2b, 0x3e, 0x09, 0x25, 0x29, 0x79, 0xdf, 0xb8, 0xd3, - 0x9d, 0x04, 0xc9, 0x4f, 0x81, 0xbe, 0xbd, 0xa5, 0xc7, - 0x31, 0x10, 0x60, 0x5a, 0x23, 0x7b, 0x56, 0x12, 0x16, - 0xbd, 0xa9, 0xee, 0x9b, 0xde, 0xe1, 0xcc, 0x0c, 0x77, - 0x28, 0xbc, 0xc8, 0x30, 0x46, 0x82, 0x33, 0x4c, 0xa9, - 0x44, 0xe4, 0x67, 0xa2, 0x7a, 0x85, 0x31, 0x3f, 0xa5, - 0x39, 0x5a, 0x9c, 0x79, 0x0e, 0x35, 0xde, 0xfd, 0x2e, - 0xdb, 0x12, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(25, &vec); - - return result; -} - -unsigned int test_26(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x9a, 0x61, 0x74, 0x16, 0x6e, 0x97, 0xaa, 0x49, 0x81, - 0xdd, 0xf5, 0x80, 0xbc, 0x01, 0xc9, 0x67, 0x54, 0xb9, - 0xf0, 0xba, 0x04, 0x27, 0x50, 0xaa, 0xbf, 0xda, 0x1c, - 0xff, 0xe5, 0x6e, 0x85, 0x81, - }, - { - 0xd7, 0x51, 0x2f, 0xf6, 0xb7, 0xdb, 0x7c, 0xe1, 0x41, - 0xb2, 0xbb, 0x01, 0xdc, 0xd0, 0x42, 0x5e, - }, - { - 0xed, 0x75, 0x28, 0x8f, 0x23, 0x27, 0x5f, 0x94, 0x22, - 0x44, 0x4d, 0xa5, 0xd3, 0xb5, 0x3c, 0xcb, 0x3c, 0x4a, - 0xc8, 0xac, 0xfb, 0x65, 0x9a, 0x1e, 0x9b, 0x76, 0x55, - 0xc2, 0xdb, 0x52, 0xf8, 0x79, - }, - { - 0x68, 0x88, 0xb9, 0x27, 0x7e, 0x57, 0xdc, 0x57, 0x66, - 0x3d, 0x40, 0x2e, 0xba, 0x8d, 0x03, 0xcf, 0x56, 0xa0, - 0x70, 0xdc, 0x86, 0x8e, 0x6a, 0x12, 0x8b, 0x18, 0x04, - 0x00, 0x02, 0xba, 0xf6, 0x90, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x03, 0x51, 0x9d, 0xfb, 0x2f, 0xf8, 0x8c, 0xc2, 0xb5, - 0x3e, 0xec, 0xc4, 0x8a, 0xe2, 0xa1, 0x8d, 0xdc, 0xf9, - 0x1a, 0x5d, 0x69, 0xd5, 0xae, 0xfc, 0xdd, 0xa8, 0x44, - 0x4e, 0x6d, 0xf7, 0x90, 0xa5, 0x24, 0x0e, 0x67, 0xb2, - 0xa4, 0xde, 0x75, 0xb4, 0xbb, 0x8a, 0x31, 0xf0, 0xf8, - 0xae, 0xb5, 0xe7, 0x85, 0xff, 0xb7, 0xa1, 0x34, 0x1b, - 0xb5, 0x2f, 0xe0, 0x0a, 0x05, 0xee, 0x66, 0xfa, 0x2d, - 0x44, 0xea, 0x99, 0x56, 0xe0, 0x55, 0xf9, 0xff, 0xa6, - 0x64, 0x7c, 0x3b, 0xfe, 0x85, 0x1a, 0xb3, 0x64, 0xad, - 0xe7, 0x1a, 0x0d, 0x35, 0x6d, 0xe7, 0x10, 0xdd, 0xaf, - 0xb7, 0x62, 0x2b, 0x1d, 0xa1, 0xbc, 0x53, 0xfd, 0x4d, - 0x32, 0x10, 0x40, 0x72, 0x89, 0xc6, 0x8d, 0x8a, 0xeb, - 0x34, 0x6b, 0xf1, 0x58, 0x06, 0xdb, 0xe7, 0x87, 0xe7, - 0x81, 0xb9, 0x4f, 0x63, 0xda, 0x3e, 0x1f, 0x61, 0xb5, - 0xac, 0x60, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(26, &vec); - - return result; -} - -unsigned int test_27(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x9c, 0x6a, 0xe1, 0x00, 0x2e, 0xe1, 0xb0, 0xad, 0xd0, - 0xbe, 0x56, 0x3c, 0xe5, 0x0f, 0x89, 0x9d, 0xa9, 0x36, - 0xe1, 0x3e, 0xfa, 0x62, 0x0d, 0x08, 0xc2, 0x68, 0x8c, - 0x19, 0x25, 0x14, 0x76, 0x3a, - }, - { - 0xfd, 0xe7, 0xdb, 0x51, 0x60, 0xc7, 0x30, 0x44, 0xbe, - 0x73, 0xe9, 0xd4, 0xc1, 0xb2, 0x2d, 0x86, - }, - { - 0x8f, 0xda, 0xae, 0xff, 0xd6, 0x4e, 0x53, 0xf7, 0xb4, - 0x37, 0x4d, 0x90, 0x2d, 0x44, 0x12, 0x09, 0x96, 0x4e, - 0x12, 0xb6, 0x5d, 0x29, 0xaf, 0xec, 0x25, 0x8e, 0x65, - 0xdb, 0x6d, 0xe1, 0x67, 0xca, - }, - { - 0xbc, 0xc2, 0x8f, 0xd5, 0x8e, 0x39, 0x7f, 0x53, 0xf4, - 0x94, 0xad, 0x81, 0x32, 0xdf, 0x82, 0xc5, 0xd8, 0xc4, - 0xc2, 0x2e, 0xa0, 0xb7, 0x13, 0x9b, 0xd8, 0x1e, 0xeb, - 0xa6, 0x56, 0x67, 0xbb, 0x69, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x02, 0x1d, 0x93, 0x8c, 0x9b, 0x4d, 0xb7, 0x80, 0xc7, - 0xd8, 0x13, 0x4a, 0xef, 0xf1, 0x05, 0x3e, 0x5b, 0x88, - 0x43, 0x37, 0x0b, 0x8a, 0xe9, 0xa6, 0x74, 0x9f, 0xca, - 0x71, 0x99, 0xd8, 0x09, 0x81, 0x0f, 0x1b, 0xc8, 0xdf, - 0xa4, 0x94, 0x26, 0x47, 0x0c, 0x30, 0xc3, 0x61, 0x6f, - 0x90, 0x3e, 0x35, 0xfb, 0xac, 0xb2, 0x34, 0x20, 0xa3, - 0x2f, 0x1b, 0xee, 0x56, 0x7c, 0xc3, 0x23, 0x00, 0xf7, - 0x04, 0x24, 0x6d, 0xdc, 0x02, 0x17, 0xf2, 0x36, 0xef, - 0x52, 0xc3, 0xec, 0x9e, 0x24, 0x33, 0xca, 0x66, 0xf0, - 0x5c, 0x25, 0x72, 0x1f, 0x76, 0x61, 0xc4, 0x3f, 0x22, - 0xc1, 0xa1, 0x25, 0xed, 0x5d, 0xb5, 0x31, 0xbd, 0x08, - 0x36, 0xeb, 0x43, 0x5c, 0x27, 0xee, 0xfc, 0x74, 0x24, - 0xce, 0x9d, 0x84, 0x5e, 0x1d, 0x4c, 0xc4, 0xc5, 0x03, - 0x09, 0x7b, 0x4f, 0xfc, 0xa7, 0x88, 0xe6, 0x74, 0xa5, - 0xcb, 0x53, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(27, &vec); - - return result; -} - -unsigned int test_28(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xfe, 0x96, 0xa8, 0x5b, 0x69, 0xd4, 0x6b, 0x54, 0x09, - 0x18, 0x92, 0x7b, 0xb6, 0x09, 0xdc, 0x57, 0x64, 0x2e, - 0xea, 0xef, 0xd4, 0x6b, 0xb5, 0xda, 0x21, 0x63, 0xa0, - 0xbc, 0x60, 0x29, 0x4b, 0x58, - }, - { - 0x22, 0x19, 0x5a, 0x41, 0x0d, 0x24, 0xdb, 0x45, 0x58, - 0x94, 0x48, 0xdf, 0xe9, 0x79, 0xd3, 0xfd, - }, - { - 0x20, 0xf6, 0x98, 0x83, 0x3a, 0x44, 0x72, 0xfd, 0x7b, - 0x78, 0xfb, 0x9b, 0x0c, 0x4e, 0xb6, 0x86, 0x04, 0xf1, - 0x66, 0xa2, 0x69, 0x4c, 0x4a, 0xf4, 0x8d, 0xac, 0x2b, - 0x23, 0x76, 0x79, 0x0e, 0x1e, - }, - { - 0x09, 0xcb, 0x87, 0x08, 0x79, 0xd3, 0xf7, 0x34, 0x21, - 0x4f, 0x6a, 0x4b, 0xd2, 0xe0, 0x8c, 0x62, 0xa2, 0xa9, - 0x54, 0xbe, 0xbe, 0x55, 0x94, 0x16, 0xd8, 0xc3, 0x55, - 0x1a, 0xaf, 0xe7, 0x1d, 0x6a, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xd3, 0xe9, 0x6d, 0xbe, 0x29, 0xe1, 0xfc, 0xb8, 0xed, - 0x83, 0xb1, 0x9d, 0xbf, 0xb2, 0x40, 0xe6, 0xf4, 0x16, - 0x79, 0xfb, 0xe8, 0x38, 0x53, 0xaa, 0x71, 0x44, 0x66, - 0x17, 0xe6, 0x3e, 0x5a, 0xf7, 0x8c, 0xf9, 0x8b, 0x33, - 0x1d, 0x15, 0xbc, 0xcb, 0x8c, 0x67, 0x3c, 0x4e, 0x5d, - 0x5d, 0xce, 0xc4, 0x67, 0xa1, 0xfe, 0x26, 0xa6, 0xcd, - 0x16, 0x96, 0xd0, 0xc9, 0xbc, 0x49, 0xf7, 0x81, 0x39, - 0xd0, 0x51, 0x28, 0x7d, 0xf7, 0xf3, 0xae, 0x0d, 0xbb, - 0x4b, 0xbf, 0x58, 0x1c, 0xb8, 0x21, 0x19, 0x31, 0x06, - 0x3c, 0x3f, 0x46, 0x12, 0xce, 0xd5, 0x3f, 0x59, 0xd1, - 0xb4, 0xeb, 0xb8, 0x75, 0x72, 0x91, 0x39, 0xf5, 0xd2, - 0xa7, 0xd6, 0x06, 0x42, 0xe8, 0xf2, 0x83, 0x5e, 0xed, - 0x88, 0x8b, 0x7e, 0x3e, 0x49, 0xc0, 0xdf, 0xfd, 0x01, - 0x2c, 0xd7, 0x46, 0xab, 0xfa, 0x3e, 0x1c, 0x5c, 0x23, - 0x08, 0xc6, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(28, &vec); - - return result; -} - -unsigned int test_29(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xa4, 0xfd, 0x69, 0x3f, 0xf0, 0xa8, 0xaf, 0x24, 0xbc, - 0xec, 0x35, 0x2d, 0x31, 0x96, 0x54, 0x9f, 0xd0, 0xda, - 0x5e, 0xe5, 0xd9, 0x9c, 0xa5, 0x84, 0x16, 0xca, 0x03, - 0xce, 0x4c, 0x50, 0xf3, 0x8e, - }, - { - 0x8c, 0xd6, 0x7f, 0x2b, 0xf7, 0x1d, 0x43, 0x66, 0xce, - 0x61, 0x39, 0x66, 0x42, 0x53, 0x1f, 0xf5, - }, - { - 0x36, 0x89, 0x69, 0xc1, 0x5a, 0x48, 0x49, 0xd7, 0x59, - 0x3b, 0xe8, 0xb1, 0x62, 0x11, 0x3b, 0x92, 0x98, 0xa5, - 0x35, 0xc1, 0x48, 0xff, 0x66, 0x8a, 0x9e, 0x8b, 0x14, - 0x7f, 0xb3, 0xaf, 0x4e, 0xba, - }, - { - 0x83, 0xd2, 0xbe, 0x9a, 0x0d, 0x74, 0xe6, 0xa4, 0x21, - 0x59, 0xae, 0x63, 0x0a, 0xce, 0xbf, 0x4e, 0x15, 0x27, - 0x1e, 0xf7, 0xf1, 0x4f, 0x3d, 0xe1, 0x47, 0x52, 0xbe, - 0x0e, 0x0e, 0x82, 0x2b, 0x11, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xe9, 0x18, 0x8f, 0xc0, 0xea, 0xec, 0x74, 0xb2, 0x60, - 0x8e, 0x21, 0xe3, 0xa4, 0x0b, 0xe9, 0x4a, 0xaf, 0x4a, - 0xe0, 0x8e, 0xb6, 0x84, 0xde, 0x8f, 0x8b, 0xba, 0x2d, - 0x5f, 0xd3, 0xb0, 0x73, 0xaa, 0x55, 0x31, 0xc9, 0x38, - 0xc0, 0xfc, 0x62, 0x8d, 0xa6, 0x57, 0x25, 0xc5, 0x4b, - 0x5c, 0x68, 0xbb, 0x91, 0xd7, 0xd3, 0x26, 0x56, 0x5e, - 0x96, 0x68, 0x5e, 0x0a, 0x4e, 0x7b, 0x22, 0x0c, 0x50, - 0xe0, 0xca, 0xf1, 0x62, 0x8e, 0xdb, 0xa5, 0xbd, 0x75, - 0x5b, 0x31, 0x89, 0x4f, 0x8c, 0xb9, 0x0a, 0xfa, 0x76, - 0xe8, 0x8c, 0x5e, 0xb9, 0xe6, 0x1b, 0x49, 0x32, 0x44, - 0x4c, 0x13, 0x97, 0xde, 0xe3, 0xe3, 0x22, 0x41, 0xa3, - 0xfb, 0x70, 0xa3, 0x92, 0x9e, 0x49, 0xf6, 0xda, 0x02, - 0xee, 0xa5, 0x48, 0x12, 0xab, 0xb3, 0xd6, 0xb5, 0xce, - 0xe1, 0x8f, 0x03, 0xaf, 0x1e, 0x0b, 0x49, 0x58, 0x43, - 0x0a, 0xb3, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(29, &vec); - - return result; -} - -unsigned int test_30(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x25, 0x4f, 0xf5, 0x68, 0x7a, 0x6d, 0xad, 0x3f, 0x1d, - 0x23, 0x7d, 0xc7, 0x62, 0xf5, 0x8d, 0x24, 0xef, 0x2e, - 0x2c, 0x08, 0x4d, 0x0a, 0x48, 0xd2, 0x6a, 0x3d, 0xc8, - 0x1e, 0x54, 0x90, 0xcd, 0xa3, - }, - { - 0xf2, 0xec, 0x39, 0x2a, 0xcc, 0xa4, 0x91, 0xe0, 0x3c, - 0xe4, 0x7b, 0x95, 0x96, 0x3a, 0x49, 0xfc, - }, - { - 0xf8, 0x06, 0xb9, 0xb4, 0xa5, 0x66, 0x82, 0xc6, 0x1b, - 0x55, 0xcb, 0x6a, 0x33, 0x4c, 0xaf, 0x87, 0xff, 0xe1, - 0x35, 0xad, 0xfe, 0xa6, 0xd0, 0xc3, 0xfc, 0x22, 0xb3, - 0x98, 0x98, 0xfb, 0xd0, 0x78, - }, - { - 0xb8, 0x49, 0x4b, 0x1c, 0x1f, 0x17, 0x52, 0xfb, 0x6f, - 0x80, 0xd7, 0x32, 0xa8, 0x9b, 0x08, 0x11, 0x58, 0x57, - 0xf7, 0xcc, 0x96, 0xe7, 0xdf, 0xf0, 0x5e, 0xbb, 0x82, - 0x27, 0x06, 0x88, 0x99, 0x17, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x0e, 0x52, 0x7e, 0x00, 0x49, 0x4d, 0x55, 0x56, 0x4f, - 0x9d, 0x9b, 0x28, 0xe7, 0x11, 0x0f, 0x9a, 0x61, 0xce, - 0x36, 0xc8, 0x83, 0xb5, 0xbe, 0x2d, 0xcb, 0x05, 0x54, - 0x44, 0x16, 0x4c, 0xdd, 0xdd, 0x1a, 0x9f, 0x27, 0x31, - 0x71, 0x6f, 0x22, 0xd6, 0xff, 0x47, 0x6c, 0xe4, 0x13, - 0xc7, 0x7a, 0xbf, 0xc0, 0xe9, 0x46, 0x87, 0x1d, 0x54, - 0x81, 0x34, 0x5c, 0x2e, 0x97, 0xb4, 0xbf, 0xdd, 0x12, - 0xac, 0x03, 0xdf, 0x60, 0x6f, 0xc5, 0x6b, 0xdb, 0x99, - 0xac, 0x7b, 0x71, 0xa6, 0x9b, 0x5b, 0x91, 0x60, 0x37, - 0x3b, 0xbe, 0xc3, 0xe9, 0xdd, 0xe4, 0x77, 0x18, 0x0a, - 0xf4, 0x54, 0xe7, 0xac, 0xc6, 0xbc, 0x58, 0xdc, 0x0a, - 0xfb, 0x42, 0x81, 0xc0, 0xde, 0x43, 0x54, 0xc1, 0xbf, - 0x59, 0x90, 0x54, 0xe3, 0x80, 0x0c, 0x6d, 0x60, 0xd8, - 0x92, 0x85, 0x88, 0x65, 0xb5, 0x36, 0x1f, 0x50, 0xbf, - 0xca, 0x9b, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(30, &vec); - - return result; -} - -unsigned int test_31(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xff, 0x0c, 0xdd, 0x55, 0x5c, 0x60, 0x46, 0x47, 0x60, - 0xb2, 0x89, 0xb7, 0xbc, 0x1f, 0x81, 0x1a, 0x41, 0xff, - 0xf7, 0x2d, 0xe5, 0x90, 0x83, 0x85, 0x8c, 0x02, 0x0a, - 0x10, 0x53, 0xbd, 0xc7, 0x4a, - }, - { - 0x7b, 0xc0, 0x99, 0x28, 0x5a, 0xd5, 0x62, 0x19, 0x93, - 0xb6, 0x39, 0xc4, 0xa9, 0x4c, 0x37, 0x6b, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x14, 0xfc, 0x6c, 0x9b, 0x17, 0x8d, 0xb6, 0x44, 0xa8, - 0xcd, 0x71, 0x30, 0xa4, 0xcf, 0x05, 0x16, 0x78, 0xc8, - 0xf4, 0xfa, 0x8f, 0x24, 0xc2, 0x7b, 0x0a, 0x53, 0x13, - 0x38, 0xa5, 0xce, 0x85, 0x89, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x2f, 0x26, 0x20, 0x34, 0x7b, 0xdd, 0xca, 0xa2, 0x94, - 0x36, 0x85, 0x34, 0x6b, 0xbf, 0x31, 0xc4, 0x40, 0x81, - 0xf8, 0x66, 0x5f, 0x3d, 0xdb, 0x2b, 0x42, 0xae, 0x14, - 0x16, 0xa7, 0x4c, 0x4b, 0x77, 0xfa, 0xb3, 0xfa, 0x19, - 0xae, 0xec, 0xc5, 0x47, 0xe7, 0x6c, 0x8c, 0xbe, 0x6a, - 0xd1, 0xf1, 0x00, 0xa3, 0xfc, 0x8b, 0x2c, 0xe2, 0xa1, - 0xea, 0x3a, 0x3d, 0xd7, 0xcf, 0xad, 0x46, 0xc1, 0xb2, - 0x78, 0x30, 0xb9, 0x40, 0xba, 0x18, 0xd0, 0x9e, 0x9b, - 0x7f, 0xa9, 0x02, 0xbb, 0x76, 0x06, 0x69, 0xb1, 0x73, - 0x5c, 0xc7, 0xb7, 0xbd, 0x39, 0x05, 0x2d, 0xa7, 0xf2, - 0x62, 0x6f, 0xa8, 0x70, 0x00, 0xcf, 0xfa, 0xda, 0x41, - 0x00, 0x19, 0xd0, 0x53, 0x38, 0x6a, 0xd8, 0x08, 0xbd, - 0x3c, 0x0c, 0xfc, 0xf5, 0x6b, 0x91, 0x87, 0x9e, 0xb8, - 0xd3, 0xf9, 0x32, 0xee, 0x2d, 0x18, 0x5e, 0x54, 0xf3, - 0x1b, 0x74, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(31, &vec); - - return result; -} - -unsigned int test_32(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xf6, 0x1b, 0x9a, 0x29, 0x3d, 0x18, 0x95, 0x2c, 0x74, - 0x65, 0xa5, 0x11, 0x38, 0x2c, 0x03, 0x1b, 0x86, 0x0b, - 0xcc, 0x85, 0x86, 0xa7, 0xec, 0x99, 0xd7, 0x52, 0x3e, - 0xad, 0x8a, 0xca, 0xd0, 0xcb, - }, - { - 0xe3, 0x32, 0xa1, 0x0e, 0x88, 0xf0, 0x0d, 0x95, 0x1d, - 0xdf, 0xd4, 0xc7, 0xb0, 0xb5, 0x96, 0x58, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x10, 0xf2, 0x3a, 0xfe, 0xbe, 0x72, 0x60, 0x93, 0xde, - 0x81, 0x70, 0x03, 0x6a, 0x9f, 0x69, 0x4e, 0x80, 0x84, - 0xc0, 0x9c, 0x6e, 0x62, 0x0e, 0x98, 0xbb, 0x45, 0xf1, - 0x6e, 0xe5, 0x60, 0x31, 0xce, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xd3, 0x43, 0x84, 0x89, 0x3e, 0xf4, 0xcb, 0x3e, 0x42, - 0x38, 0x6a, 0x42, 0xef, 0xbd, 0xce, 0x46, 0x7c, 0xd4, - 0x11, 0xa7, 0x6e, 0x6a, 0x32, 0xe1, 0xd6, 0x34, 0xa5, - 0xa3, 0x67, 0x0a, 0x95, 0x97, 0x39, 0x85, 0x85, 0x1b, - 0x5f, 0x36, 0x9a, 0x1b, 0xe6, 0x5a, 0xdd, 0x3e, 0xd6, - 0x1f, 0x7c, 0x6a, 0x11, 0x98, 0x64, 0x85, 0xb7, 0xe1, - 0x6b, 0x57, 0x26, 0x3e, 0xed, 0x71, 0xff, 0xc5, 0xa8, - 0x97, 0x56, 0xcb, 0x42, 0xb7, 0xbd, 0xfd, 0xf9, 0x2b, - 0x2e, 0x31, 0xc3, 0x6b, 0x4d, 0x7b, 0x7c, 0xbd, 0x2e, - 0x65, 0x0c, 0xcb, 0xd6, 0xc0, 0xb5, 0xdf, 0xc9, 0x5c, - 0xd8, 0x93, 0x7e, 0xf1, 0xe8, 0xeb, 0xc7, 0x1a, 0x04, - 0xcf, 0x33, 0xc3, 0x98, 0xf7, 0xf9, 0x08, 0x6f, 0x0b, - 0xae, 0x57, 0xee, 0x9a, 0xf8, 0xf9, 0x3f, 0x3b, 0x8e, - 0xc1, 0xc9, 0x81, 0x69, 0x17, 0xf6, 0x99, 0xd8, 0xf4, - 0x32, 0x72, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(32, &vec); - - return result; -} - -unsigned int test_33(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x1b, 0x6b, 0x52, 0xb7, 0xba, 0x19, 0xc2, 0x6e, 0x62, - 0xbd, 0x0a, 0xc9, 0xb2, 0x33, 0xbc, 0xf0, 0x04, 0xbb, - 0xc9, 0xfd, 0x9e, 0x1e, 0x73, 0x7c, 0xcf, 0x88, 0x4a, - 0x76, 0x08, 0x29, 0xcd, 0x10, - }, - { - 0xd3, 0x81, 0xc8, 0xbe, 0x20, 0x32, 0x74, 0xf1, 0x76, - 0x69, 0x18, 0xb4, 0x5e, 0x08, 0xdd, 0xc6, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x2f, 0x50, 0x4e, 0xb2, 0x9f, 0x8e, 0xc0, 0x70, 0x4f, - 0x07, 0x0b, 0x59, 0xc0, 0x20, 0x76, 0xf4, 0xa4, 0xe5, - 0xc8, 0xe7, 0xb6, 0x45, 0x68, 0xb2, 0x2c, 0x5f, 0xf5, - 0xba, 0xe1, 0x96, 0xd5, 0xeb, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xa4, 0x15, 0x00, 0xfc, 0x54, 0xcc, 0xf5, 0x49, 0xfe, - 0x21, 0xb3, 0x69, 0x34, 0x28, 0xe0, 0x3c, 0xcd, 0xff, - 0xbf, 0x42, 0xff, 0x79, 0x0d, 0x47, 0xdf, 0xf3, 0x4f, - 0xd8, 0x8f, 0xce, 0x01, 0xaf, 0xd4, 0x9a, 0x26, 0xd3, - 0x00, 0xad, 0x66, 0xa3, 0x4c, 0xd3, 0xd1, 0xae, 0xc7, - 0x3d, 0xd0, 0x02, 0xdc, 0x83, 0xc1, 0xb8, 0x6c, 0x43, - 0x2d, 0x72, 0x17, 0x66, 0xfb, 0x90, 0x36, 0x61, 0x30, - 0xa3, 0xa2, 0x88, 0x88, 0xa6, 0x3a, 0x5d, 0x0b, 0x8b, - 0xef, 0xa8, 0x95, 0x61, 0x1c, 0x25, 0xbf, 0xa8, 0x81, - 0x75, 0x36, 0xeb, 0x0b, 0x20, 0xb9, 0x98, 0x2c, 0x7d, - 0x97, 0x6f, 0x47, 0x07, 0x56, 0x3b, 0x16, 0xb4, 0x9c, - 0xcb, 0xd4, 0x35, 0xcf, 0x04, 0x9b, 0x6a, 0x6e, 0x11, - 0xdf, 0x12, 0xe5, 0xfa, 0xf0, 0xd2, 0x0f, 0xc9, 0xde, - 0xab, 0x39, 0x5a, 0xc6, 0x93, 0x03, 0x60, 0x1b, 0xa3, - 0x1f, 0xe3, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(33, &vec); - - return result; -} - -unsigned int test_34(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x36, 0x36, 0x7f, 0xa9, 0x73, 0xaa, 0x4e, 0x2e, 0xc7, - 0xbc, 0xef, 0x33, 0x99, 0x00, 0xdd, 0x95, 0x94, 0x16, - 0xbd, 0x63, 0xe7, 0x46, 0xaa, 0x3c, 0x14, 0xa9, 0xb6, - 0x6e, 0x83, 0x8f, 0xc7, 0x80, - }, - { - 0xfb, 0xa0, 0x71, 0x24, 0xe6, 0xd5, 0x7f, 0x3c, 0x81, - 0xba, 0x59, 0x6d, 0x25, 0x6e, 0x43, 0x3c, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xf3, 0x0b, 0xd1, 0x1a, 0x1f, 0x2b, 0xc9, 0x7d, 0xd8, - 0xd4, 0x82, 0x9f, 0x75, 0xd5, 0x9d, 0x55, 0x77, 0xe7, - 0x26, 0x82, 0x5e, 0x23, 0x64, 0xd2, 0x04, 0xe9, 0x07, - 0x7d, 0xf4, 0x8f, 0x65, 0xa9, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x6a, 0x5b, 0xdf, 0xdf, 0x37, 0x31, 0x9c, 0x2e, 0x6b, - 0xd2, 0xbc, 0x44, 0x93, 0x84, 0x55, 0xe0, 0x3a, 0x2e, - 0x83, 0x0b, 0x23, 0xee, 0x8e, 0xbd, 0x6f, 0x98, 0x2f, - 0xf8, 0x38, 0xb4, 0x99, 0xd6, 0xd3, 0x7b, 0x44, 0xef, - 0x0a, 0x59, 0x41, 0xba, 0x42, 0xfe, 0x02, 0x45, 0xe6, - 0x4b, 0x28, 0xee, 0x1a, 0x2f, 0xa3, 0xe8, 0xd2, 0x24, - 0x69, 0xce, 0xb4, 0xc6, 0xf6, 0x75, 0x62, 0x9c, 0x3c, - 0x6a, 0xbf, 0x61, 0xaa, 0xb6, 0xb1, 0xe8, 0x87, 0xc8, - 0xcf, 0x66, 0x44, 0x80, 0x3f, 0x5d, 0x51, 0x16, 0xbe, - 0x11, 0xff, 0x42, 0x69, 0x8d, 0x42, 0xac, 0x36, 0x86, - 0x80, 0x70, 0x36, 0xf5, 0x1a, 0xf4, 0xae, 0x34, 0x4a, - 0x36, 0x5e, 0x8a, 0xd8, 0xeb, 0xc3, 0xa6, 0x23, 0xde, - 0x1b, 0xcc, 0x68, 0xe0, 0x64, 0xd9, 0xfa, 0x82, 0xb6, - 0xc8, 0x0f, 0xb0, 0x57, 0x00, 0x60, 0xbc, 0x58, 0xe8, - 0x7e, 0xbd, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(34, &vec); - - return result; -} - -unsigned int test_35(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x24, 0x85, 0xcf, 0xc6, 0x15, 0xd7, 0xfa, 0xb6, 0x0f, - 0x46, 0x57, 0xe4, 0x70, 0xc8, 0x12, 0x1e, 0xdd, 0x6b, - 0xc1, 0xfa, 0x22, 0x47, 0xb2, 0x05, 0xce, 0x40, 0x40, - 0xee, 0x13, 0xc3, 0x6f, 0x17, - }, - { - 0x08, 0x7e, 0x6b, 0x4b, 0xf1, 0xe7, 0x75, 0xa4, 0xc9, - 0xf1, 0x82, 0xdf, 0x61, 0x80, 0x13, 0x43, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x9a, 0xee, 0x0e, 0xbe, 0xd8, 0xda, 0xf7, 0x03, 0x36, - 0x0a, 0xa1, 0xfa, 0x2e, 0x17, 0xfa, 0xc6, 0xb7, 0x94, - 0x5a, 0xc4, 0x5c, 0xda, 0xaa, 0xcb, 0xcc, 0x9f, 0xce, - 0x22, 0xd2, 0x8c, 0x0d, 0x1d, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xca, 0x4e, 0x2c, 0x4b, 0x63, 0xbb, 0x7f, 0x08, 0x43, - 0x8b, 0x82, 0x5c, 0xde, 0xb6, 0xa8, 0x83, 0xa2, 0xca, - 0xf3, 0x0d, 0xdb, 0xcc, 0xeb, 0x05, 0xc9, 0x1d, 0x37, - 0xc0, 0x56, 0x76, 0xf6, 0x3c, 0xc4, 0xde, 0x0b, 0xd6, - 0x80, 0xa8, 0x21, 0xa9, 0x95, 0x56, 0x4e, 0xcd, 0x12, - 0xe5, 0x4f, 0xc0, 0x56, 0xa3, 0x9e, 0x4e, 0xc5, 0xfe, - 0x33, 0x73, 0xb4, 0xd6, 0x62, 0x04, 0x02, 0xb6, 0xa5, - 0x37, 0x76, 0x2f, 0x95, 0xa2, 0xd4, 0x90, 0x95, 0x81, - 0xc8, 0x98, 0x5d, 0xf8, 0x01, 0xc7, 0x2f, 0x32, 0x23, - 0xbd, 0x94, 0x67, 0x96, 0xac, 0x71, 0xdc, 0x8f, 0xc1, - 0xb2, 0x83, 0x8e, 0xa5, 0xaa, 0x68, 0x64, 0x49, 0x08, - 0xcc, 0x74, 0xcd, 0x81, 0x84, 0x86, 0x1b, 0x88, 0x94, - 0xe0, 0x74, 0x92, 0x2e, 0x85, 0xa5, 0xe2, 0x58, 0xfb, - 0x6e, 0xd3, 0xec, 0x10, 0xe3, 0xff, 0xe2, 0x40, 0xb6, - 0x73, 0x8c, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(35, &vec); - - return result; -} - -unsigned int test_36(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xd1, 0x09, 0xe7, 0x55, 0xa7, 0x25, 0xc9, 0x64, 0x8d, - 0x33, 0x71, 0xff, 0xbf, 0x2c, 0xe0, 0x80, 0x45, 0xd1, - 0x71, 0x75, 0xbb, 0x1e, 0x77, 0x7a, 0xaa, 0x73, 0xfc, - 0x6f, 0x9e, 0xc2, 0xac, 0xf6, - }, - { - 0xc1, 0x42, 0xf6, 0xe0, 0x4d, 0xc8, 0x87, 0xd0, 0x2d, - 0x57, 0xb1, 0xc2, 0x7c, 0x1c, 0x77, 0xae, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x09, 0x1f, 0xd9, 0xe5, 0xb5, 0xb7, 0x41, 0x5f, 0x87, - 0x3f, 0x2c, 0xb1, 0xe5, 0x54, 0xea, 0xbd, 0xd9, 0x1f, - 0x96, 0xb6, 0x84, 0xc1, 0x0c, 0xd0, 0x02, 0x4f, 0xb3, - 0x2e, 0x48, 0x1d, 0x4c, 0xb0, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x1d, 0x6f, 0xd5, 0x0a, 0x84, 0x38, 0x69, 0xbb, 0x8a, - 0x9b, 0x83, 0xcc, 0xb4, 0xd1, 0x00, 0xaf, 0x18, 0xee, - 0xfc, 0xbd, 0xcb, 0x98, 0xaf, 0xa2, 0x73, 0x73, 0x7c, - 0x68, 0x7b, 0x50, 0x40, 0x22, 0x73, 0xb9, 0x88, 0x6c, - 0xa1, 0x32, 0x0e, 0xca, 0x2c, 0x55, 0x8e, 0xd2, 0x64, - 0xa4, 0x2e, 0x02, 0xe1, 0xa7, 0xdc, 0xbc, 0xa2, 0x67, - 0xa3, 0x85, 0xdc, 0x70, 0xd6, 0xe1, 0x5a, 0xc4, 0x27, - 0x6a, 0x6a, 0xd5, 0x91, 0x07, 0xd6, 0x3b, 0x2d, 0x07, - 0x73, 0x91, 0xee, 0xe7, 0x62, 0xd9, 0xfb, 0xe2, 0x29, - 0x46, 0xc7, 0xd6, 0xe3, 0x75, 0x78, 0xd4, 0xdd, 0xcc, - 0xfa, 0xe9, 0x78, 0x96, 0x28, 0xa6, 0x05, 0x37, 0xa3, - 0x93, 0x3c, 0xf7, 0xcf, 0xcb, 0x12, 0x71, 0xa2, 0x92, - 0x15, 0x99, 0x1b, 0xd3, 0x41, 0xdf, 0xf3, 0x9b, 0x2c, - 0x9b, 0x6c, 0x24, 0x3a, 0x03, 0xdd, 0xde, 0x0b, 0x73, - 0xff, 0xb1, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(36, &vec); - - return result; -} - -unsigned int test_37(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x8b, 0xc4, 0x7b, 0x94, 0xd0, 0x69, 0x19, 0xa1, 0x7b, - 0x23, 0xfc, 0xcb, 0xd4, 0xd2, 0x34, 0x94, 0xbe, 0x25, - 0x87, 0xe0, 0xb5, 0xd2, 0xb8, 0x23, 0x95, 0x59, 0x3d, - 0xd4, 0x2a, 0x28, 0x37, 0xa5, - }, - { - 0xbf, 0x4d, 0x19, 0xfd, 0xfa, 0xf2, 0xd5, 0xee, 0x48, - 0x39, 0x11, 0x95, 0x82, 0x8a, 0xcb, 0xed, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x08, 0x19, 0x0c, 0xb3, 0x1d, 0x8f, 0x20, 0xe8, 0xdf, - 0x5e, 0x5a, 0x64, 0x8e, 0xda, 0x89, 0x63, 0x68, 0xff, - 0x3b, 0xae, 0x1b, 0x60, 0xf7, 0xca, 0x1c, 0x93, 0xf8, - 0xbc, 0xdc, 0xdf, 0xbd, 0xcb, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x61, 0x05, 0x19, 0x7b, 0x7f, 0xd3, 0xa3, 0x12, 0x17, - 0x27, 0x89, 0x95, 0x50, 0x14, 0x4f, 0x8b, 0x9f, 0x03, - 0xcf, 0x9b, 0x1a, 0x57, 0x0e, 0x97, 0x2a, 0xd2, 0x3f, - 0x0e, 0xa7, 0x14, 0xdb, 0x42, 0x4a, 0x0b, 0xdc, 0xba, - 0x04, 0x5b, 0x6a, 0xeb, 0x12, 0x37, 0xc7, 0xab, 0xe9, - 0x0b, 0xcf, 0x84, 0x3d, 0x42, 0x53, 0xb3, 0x75, 0x72, - 0x49, 0x53, 0xc3, 0xf7, 0x26, 0xa9, 0xad, 0x8b, 0x25, - 0xba, 0x91, 0x3e, 0x4d, 0xb3, 0x74, 0x18, 0x5a, 0xf9, - 0x36, 0x37, 0xf3, 0xdc, 0xdf, 0x97, 0x3b, 0x98, 0x67, - 0x23, 0xf5, 0x90, 0xee, 0x76, 0x69, 0x16, 0x05, 0x2c, - 0x5e, 0xaa, 0x41, 0x91, 0x51, 0xf0, 0x9d, 0x12, 0x41, - 0x0e, 0x48, 0x28, 0x4a, 0xc8, 0xee, 0x87, 0xf2, 0x5e, - 0xd9, 0x67, 0x1b, 0x23, 0x5c, 0xd7, 0xac, 0xaa, 0x44, - 0x0a, 0xd4, 0xb6, 0xad, 0xa8, 0x64, 0xed, 0x62, 0xfb, - 0x98, 0x23, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(37, &vec); - - return result; -} - -unsigned int test_38(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x8b, 0x95, 0xec, 0xfe, 0x9f, 0xd0, 0x90, 0xa0, 0x92, - 0x10, 0x17, 0x2b, 0x4c, 0xc1, 0x99, 0xef, 0x1b, 0xfa, - 0x73, 0xed, 0xdd, 0xe5, 0x0d, 0x3d, 0x41, 0x47, 0xc7, - 0x5b, 0x6e, 0x0e, 0x76, 0xeb, - }, - { - 0x13, 0x0c, 0x18, 0xae, 0xc9, 0x41, 0x5a, 0x2a, 0x54, - 0xd6, 0xcf, 0xa4, 0x33, 0x44, 0x08, 0x33, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x82, 0x5f, 0x0b, 0x1d, 0xd1, 0xa1, 0x57, 0x0f, 0xb7, - 0x10, 0x23, 0x15, 0x12, 0xcc, 0x28, 0x86, 0x81, 0xfc, - 0xba, 0x15, 0xa0, 0xa4, 0x5c, 0xef, 0x45, 0xaa, 0x1f, - 0x26, 0x82, 0xcf, 0x37, 0xf8, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x5e, 0xec, 0xa5, 0x1c, 0x5a, 0x05, 0x8f, 0x08, 0xbc, - 0xdc, 0xf8, 0x3c, 0x1d, 0x90, 0x44, 0xb5, 0x20, 0x3b, - 0x77, 0xb5, 0x36, 0xf8, 0x66, 0x23, 0x15, 0x3e, 0x67, - 0xf0, 0x5f, 0x3a, 0xdb, 0x28, 0xee, 0xb8, 0x92, 0x5b, - 0x61, 0x07, 0xd7, 0xa8, 0xac, 0xca, 0x77, 0x8b, 0xc4, - 0x52, 0x6e, 0xf1, 0xcf, 0xf5, 0xac, 0x5f, 0xdd, 0x02, - 0x39, 0x52, 0x2f, 0xa1, 0x75, 0xd3, 0xe0, 0x65, 0xd7, - 0x8c, 0x19, 0xa6, 0xda, 0xba, 0x56, 0xe2, 0x0b, 0x28, - 0x4b, 0x43, 0x3e, 0xa8, 0x1c, 0xba, 0xe8, 0x13, 0x9c, - 0xa7, 0x94, 0x45, 0xb8, 0x87, 0x74, 0x99, 0x49, 0xda, - 0xe8, 0xb9, 0xf0, 0x3e, 0x55, 0x9f, 0xcf, 0x5f, 0x71, - 0x07, 0x22, 0x83, 0x1e, 0xfa, 0x92, 0xad, 0xe0, 0xcd, - 0x0c, 0xab, 0x5c, 0x34, 0x3d, 0xfd, 0x4b, 0xcd, 0xd8, - 0xd6, 0xbc, 0xef, 0xba, 0xf0, 0x53, 0x1a, 0x8d, 0xed, - 0x69, 0x3c, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(38, &vec); - - return result; -} - -unsigned int test_39(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xe8, 0x43, 0x6e, 0x86, 0x22, 0xea, 0x34, 0x5d, 0xcb, - 0x94, 0x31, 0x64, 0x0a, 0xff, 0x32, 0x8c, 0x21, 0xbe, - 0x83, 0x83, 0x21, 0xda, 0xf0, 0x89, 0x51, 0x0d, 0x27, - 0xaa, 0x4d, 0x3d, 0x64, 0x0c, - }, - { - 0xd6, 0x9a, 0xe9, 0xda, 0xe2, 0x16, 0xae, 0x6c, 0xf3, - 0x6f, 0x48, 0xcf, 0x3f, 0x97, 0xbd, 0x3a, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xd9, 0x12, 0xaa, 0xb4, 0x83, 0x68, 0xed, 0xe1, 0xc5, - 0xf9, 0xc1, 0x11, 0x6c, 0xb4, 0xe2, 0xe9, 0x91, 0xfb, - 0xaf, 0x26, 0x24, 0xd9, 0xf8, 0x1a, 0xf4, 0x7e, 0x8d, - 0x74, 0x67, 0x46, 0x01, 0x05, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xc3, 0xcb, 0x77, 0x89, 0xf6, 0x9f, 0x6a, 0x99, 0xc3, - 0x8c, 0xcd, 0x8d, 0x73, 0xb6, 0x27, 0xc5, 0xa2, 0x4d, - 0xa7, 0x11, 0x6f, 0x9d, 0x1b, 0x11, 0xb4, 0xa9, 0xfe, - 0x34, 0x48, 0xa6, 0x83, 0x7d, 0x21, 0x90, 0x99, 0xb3, - 0x39, 0xf0, 0x6f, 0x18, 0x5d, 0x9f, 0x4c, 0x3d, 0x1b, - 0x9a, 0x47, 0x4b, 0xbd, 0x2c, 0x63, 0x3a, 0xcc, 0x09, - 0xfd, 0x54, 0x0a, 0xb8, 0xdf, 0x42, 0x3b, 0x95, 0x15, - 0xd5, 0x2c, 0x68, 0xc5, 0x39, 0x06, 0x8f, 0xcb, 0xa5, - 0x31, 0xb8, 0x85, 0xc2, 0x6c, 0xcc, 0x4f, 0x57, 0x6e, - 0x34, 0x71, 0xf7, 0xe0, 0x88, 0x6f, 0x39, 0x72, 0x51, - 0x31, 0xc2, 0xf1, 0x25, 0x6b, 0x45, 0x02, 0x20, 0x47, - 0x3b, 0xcd, 0x07, 0xdd, 0xd9, 0x0a, 0xc8, 0x63, 0x05, - 0x9e, 0xb1, 0x8c, 0x69, 0x82, 0x70, 0x3c, 0xa4, 0x21, - 0x9c, 0x74, 0x7d, 0x84, 0x58, 0x00, 0x92, 0x09, 0x6a, - 0x55, 0xc1, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(39, &vec); - - return result; -} - -unsigned int test_40(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x61, 0x30, 0x87, 0x33, 0xc0, 0x88, 0x36, 0x27, 0xae, - 0x93, 0x19, 0xe1, 0x86, 0x57, 0x07, 0x24, 0x40, 0xc7, - 0x58, 0x8f, 0x58, 0x13, 0x1e, 0xda, 0x02, 0x81, 0xa4, - 0xe6, 0xc6, 0x3e, 0xc6, 0xf4, - }, - { - 0x37, 0x38, 0x4d, 0x9f, 0x08, 0xc4, 0x25, 0x70, 0x35, - 0xf7, 0x30, 0xdb, 0x48, 0xa2, 0xc1, 0x53, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xec, 0x66, 0x81, 0xc5, 0x28, 0x13, 0x99, 0xbf, 0xb3, - 0xad, 0x4f, 0x5c, 0x6d, 0x73, 0xde, 0x97, 0x26, 0x35, - 0x1e, 0x18, 0x9c, 0x46, 0xba, 0x94, 0x30, 0x42, 0x50, - 0xb7, 0x10, 0x52, 0xf9, 0x04, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb3, 0xf6, 0x42, 0xcd, 0x6f, 0xfb, 0x6d, 0xea, 0xa1, - 0x1c, 0x07, 0x4e, 0x76, 0x72, 0x99, 0xd9, 0x3d, 0x24, - 0x11, 0xfe, 0x4d, 0xbd, 0xe2, 0xad, 0xc0, 0x46, 0x30, - 0x90, 0x4e, 0x3b, 0xd5, 0xe6, 0x1b, 0x53, 0x44, 0x0f, - 0x9d, 0x51, 0x39, 0x8a, 0xf3, 0xeb, 0x8e, 0x95, 0x12, - 0x33, 0xe5, 0x85, 0xd8, 0x89, 0x75, 0x73, 0x7e, 0x3f, - 0x45, 0xe2, 0x3f, 0x5d, 0x63, 0xbb, 0xd4, 0x2a, 0x28, - 0x62, 0xe8, 0x27, 0xa8, 0xa4, 0x9c, 0xed, 0xd8, 0xec, - 0xf8, 0xfd, 0x82, 0x56, 0xa4, 0x75, 0x73, 0xd3, 0x5c, - 0x26, 0x22, 0xd7, 0xe8, 0x7d, 0x83, 0xe5, 0x35, 0x72, - 0x05, 0xe0, 0xdc, 0xe5, 0x31, 0xf9, 0x2e, 0x8f, 0xa3, - 0x25, 0x77, 0x82, 0xf1, 0xdb, 0x47, 0xcf, 0x70, 0xdb, - 0xe9, 0x44, 0x01, 0xcd, 0x50, 0xe2, 0x7d, 0xcc, 0xe1, - 0x83, 0x69, 0x3a, 0xd5, 0x01, 0xdb, 0x7b, 0x0a, 0xeb, - 0x55, 0xb2, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(40, &vec); - - return result; -} - -unsigned int test_41(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x7c, 0x6b, 0x15, 0xd4, 0x47, 0x7c, 0x5d, 0xdf, 0xf3, - 0xea, 0xfa, 0xd5, 0x56, 0x90, 0xe0, 0x21, 0xf8, 0xbf, - 0x5d, 0x34, 0x3b, 0xc6, 0xdc, 0x2d, 0x58, 0xd2, 0x9a, - 0x97, 0x9a, 0xa9, 0x21, 0xc3, - }, - { - 0x79, 0x38, 0x80, 0x4e, 0xeb, 0xf0, 0x61, 0x38, 0x8d, - 0x3c, 0x34, 0x61, 0x44, 0xf4, 0x92, 0x11, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x7d, 0x8b, 0x82, 0xd9, 0xee, 0x9a, 0x99, 0xaf, 0x59, - 0x34, 0x7d, 0xa7, 0x67, 0x78, 0x05, 0x14, 0x42, 0xbe, - 0x40, 0x98, 0xa3, 0x00, 0xa4, 0xc6, 0x06, 0xa3, 0x24, - 0x73, 0x14, 0xea, 0x46, 0x18, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x62, 0xac, 0xe9, 0x9f, 0xe2, 0xdb, 0x12, 0xe9, 0x3c, - 0x2c, 0x91, 0x55, 0xd7, 0x0a, 0x58, 0x1b, 0x2b, 0xac, - 0xb8, 0xf1, 0xed, 0x90, 0x9a, 0x24, 0xde, 0x1b, 0x36, - 0x5f, 0xde, 0xec, 0xc6, 0x71, 0x35, 0x60, 0x7a, 0x44, - 0x79, 0x2b, 0x00, 0x4e, 0x50, 0x7d, 0x07, 0xf5, 0xb3, - 0x61, 0x48, 0x0c, 0xe4, 0xb2, 0xf1, 0xf6, 0xd3, 0x2b, - 0xb2, 0x53, 0x69, 0x33, 0xec, 0xe2, 0x81, 0x6d, 0x47, - 0xa9, 0x46, 0x77, 0xcd, 0x82, 0x3e, 0xf6, 0x4a, 0x17, - 0xba, 0xaa, 0x33, 0x59, 0x87, 0x72, 0x2b, 0x0e, 0x1c, - 0x02, 0x39, 0x94, 0x0b, 0x0f, 0x3d, 0x00, 0x52, 0x19, - 0xd8, 0xd3, 0x78, 0x15, 0x7c, 0xcf, 0x17, 0xc1, 0x41, - 0x62, 0x16, 0x5a, 0x8e, 0xf3, 0x8f, 0xd4, 0x08, 0xa4, - 0xe9, 0xac, 0x85, 0xa7, 0x08, 0x04, 0xd5, 0x73, 0x53, - 0xc7, 0x5f, 0xb1, 0x87, 0xbe, 0x0d, 0x72, 0xcf, 0x69, - 0x9c, 0xc8, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(41, &vec); - - return result; -} - -unsigned int test_42(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x71, 0x59, 0xc7, 0xae, 0xa9, 0x6d, 0xa8, 0xab, 0x86, - 0x48, 0xf8, 0xf8, 0x54, 0xf3, 0x51, 0xbe, 0x9b, 0x28, - 0x45, 0x66, 0x90, 0xb7, 0x88, 0xc4, 0x9c, 0x3d, 0xce, - 0x74, 0xb2, 0x31, 0x1e, 0x63, - }, - { - 0x6a, 0xed, 0x95, 0x1f, 0xc6, 0xe1, 0x55, 0x7f, 0x5f, - 0x1c, 0xb6, 0xad, 0xbe, 0xc5, 0x46, 0x86, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xce, 0x6d, 0xe3, 0xb5, 0x21, 0x17, 0x77, 0xf9, 0x05, - 0x66, 0x69, 0xd0, 0x46, 0x01, 0x84, 0x00, 0x3e, 0x87, - 0x97, 0x84, 0xdf, 0xff, 0x86, 0xd7, 0xeb, 0xf0, 0x8a, - 0x23, 0x3e, 0x6a, 0x54, 0x82, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x13, 0x33, 0xd1, 0x21, 0x11, 0xb9, 0x59, 0xc5, 0x11, - 0x74, 0xca, 0x21, 0x88, 0xed, 0x84, 0xca, 0x7d, 0xfd, - 0xa3, 0x0d, 0x5f, 0xf2, 0x53, 0x27, 0xcd, 0x19, 0xf7, - 0x37, 0x79, 0x59, 0x0b, 0x19, 0xc0, 0xb5, 0x24, 0x75, - 0x60, 0x33, 0x00, 0x8b, 0x64, 0x06, 0xab, 0xe6, 0x31, - 0xcc, 0xa6, 0xb8, 0x2e, 0xbd, 0xda, 0x5c, 0xe7, 0xb9, - 0xe2, 0x96, 0x8a, 0x8a, 0xde, 0xe3, 0xe4, 0xa6, 0xb3, - 0xea, 0xa8, 0x07, 0x9a, 0x64, 0xe7, 0x62, 0x2f, 0x66, - 0x28, 0xc3, 0x62, 0xb5, 0xc6, 0xdc, 0xb6, 0x1b, 0x7c, - 0xf6, 0x45, 0x67, 0xe6, 0xec, 0x5a, 0xe3, 0x12, 0x04, - 0x72, 0x50, 0x51, 0x3e, 0xc5, 0x65, 0x91, 0x60, 0xeb, - 0xa5, 0xc7, 0x58, 0x35, 0x2f, 0x74, 0x16, 0xa0, 0x39, - 0x86, 0x37, 0x90, 0x2a, 0x4d, 0x7e, 0x86, 0xad, 0xf9, - 0x84, 0x50, 0xdf, 0x11, 0x1e, 0xf4, 0x33, 0x11, 0x1f, - 0xf2, 0xd1, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(42, &vec); - - return result; -} - -unsigned int test_43(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xeb, 0xcf, 0xe2, 0x5c, 0xea, 0x69, 0x66, 0x45, 0xc7, - 0x9e, 0x77, 0x29, 0x22, 0xdf, 0x04, 0xd4, 0x84, 0x17, - 0xf9, 0xcf, 0x2e, 0xce, 0xf7, 0x27, 0xcc, 0xcb, 0x3e, - 0x89, 0x98, 0x89, 0x3c, 0x59, - }, - { - 0x13, 0x6e, 0x0c, 0x8e, 0x8f, 0xad, 0x1c, 0x49, 0x43, - 0x5e, 0x6e, 0xac, 0x76, 0x3c, 0x77, 0x6f, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x38, 0xb4, 0x8d, 0xb1, 0x1f, 0xf3, 0x1c, 0xe5, 0xe0, - 0xa0, 0xcb, 0x62, 0x79, 0x86, 0xb8, 0x8b, 0xea, 0xd7, - 0x4b, 0xe8, 0x34, 0xa4, 0xe3, 0x47, 0xde, 0x17, 0x07, - 0x4c, 0xe1, 0x17, 0x24, 0x4c, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xd9, 0x0c, 0xb0, 0x83, 0x5b, 0x0c, 0xa6, 0x4c, 0x8d, - 0x1d, 0xec, 0x23, 0xf2, 0x77, 0x3b, 0x6d, 0xd8, 0x35, - 0xbe, 0xe7, 0xe2, 0x7c, 0x91, 0x82, 0x2d, 0xbf, 0x08, - 0x98, 0xd1, 0x81, 0xde, 0x5b, 0xe4, 0xe4, 0xf6, 0xa1, - 0xd5, 0x97, 0x12, 0xe3, 0xb4, 0x72, 0x00, 0xcb, 0x14, - 0xe1, 0x22, 0x52, 0xe9, 0xd7, 0xc5, 0x62, 0x4c, 0x84, - 0x1e, 0x4c, 0x05, 0xc7, 0x37, 0x2a, 0x5e, 0x70, 0xe8, - 0x3a, 0x1d, 0x86, 0xd0, 0xc0, 0x69, 0xbf, 0xb2, 0x9a, - 0x21, 0xf5, 0x11, 0xc4, 0xcc, 0x8c, 0x4c, 0xd9, 0xf6, - 0x6b, 0xa3, 0xa0, 0x81, 0x02, 0x44, 0xdf, 0x25, 0x18, - 0xbf, 0x37, 0x85, 0xb3, 0x03, 0xe7, 0xae, 0xbe, 0x9f, - 0x19, 0x06, 0xbc, 0xff, 0x55, 0xa4, 0x54, 0x5d, 0x53, - 0xd2, 0xfb, 0x8d, 0xd7, 0x2e, 0xee, 0x00, 0x3f, 0x10, - 0x00, 0x9e, 0x9b, 0x41, 0x82, 0x52, 0x11, 0xf2, 0x35, - 0x2b, 0xe9, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(43, &vec); - - return result; -} - -unsigned int test_44(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xb0, 0xcc, 0xe5, 0xac, 0xf0, 0xd3, 0x30, 0x5c, 0xf5, - 0xeb, 0xdb, 0x55, 0x87, 0x0a, 0xf9, 0x31, 0x68, 0x20, - 0x0d, 0xa5, 0x6f, 0xa2, 0xfa, 0x68, 0x85, 0xbf, 0x1c, - 0x2a, 0x93, 0x28, 0x95, 0x6f, - }, - { - 0x6d, 0x79, 0x66, 0x19, 0x8e, 0xc2, 0x34, 0x18, 0x08, - 0x97, 0x39, 0x00, 0xa9, 0xfc, 0xf0, 0x44, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x2c, 0x0b, 0xb1, 0xbd, 0xa5, 0xa0, 0x12, 0x57, 0x57, - 0xb6, 0x4d, 0x57, 0x3a, 0xd0, 0x4c, 0xf3, 0x6d, 0x47, - 0xee, 0x46, 0x15, 0x58, 0x3f, 0xa8, 0xfe, 0x5a, 0x2d, - 0xec, 0x8b, 0x80, 0x59, 0x21, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb4, 0x17, 0xb4, 0x47, 0x0e, 0xa9, 0x50, 0x77, 0x2c, - 0xbe, 0xda, 0x48, 0x5d, 0xe1, 0xe9, 0x45, 0xd2, 0x31, - 0x9a, 0x6a, 0x35, 0x00, 0xd8, 0x8f, 0xd5, 0x22, 0x08, - 0x0a, 0x26, 0x44, 0xcf, 0x7c, 0x18, 0x61, 0xd4, 0x28, - 0x1d, 0xbe, 0xab, 0x81, 0x51, 0x8b, 0x59, 0x24, 0x50, - 0x50, 0xb1, 0xb4, 0xa5, 0xf8, 0x9e, 0x9a, 0x61, 0xbe, - 0x4c, 0x5a, 0x43, 0x72, 0xb4, 0x97, 0x2f, 0x1c, 0x17, - 0xb9, 0x83, 0x35, 0x99, 0x07, 0xa4, 0x4d, 0x88, 0xb5, - 0xbb, 0x12, 0x84, 0x84, 0x28, 0xef, 0xea, 0x84, 0x40, - 0x78, 0x93, 0x64, 0x0f, 0xb0, 0x36, 0x3b, 0x23, 0x71, - 0xe1, 0x48, 0x91, 0x24, 0x8a, 0xfd, 0x61, 0xab, 0xb5, - 0xac, 0x04, 0x74, 0xc5, 0x00, 0xe1, 0xc8, 0xef, 0x2c, - 0x11, 0x41, 0x84, 0xd7, 0xea, 0x47, 0x66, 0xd4, 0x6b, - 0x78, 0xd2, 0x74, 0x29, 0x86, 0xbb, 0x34, 0xe6, 0x2c, - 0x49, 0xde, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(44, &vec); - - return result; -} - -unsigned int test_45(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x10, 0x3e, 0x04, 0xdc, 0x6c, 0x88, 0x5d, 0xe4, 0x22, - 0x50, 0x67, 0xc8, 0xdd, 0x67, 0xce, 0xc5, 0xa3, 0xdd, - 0x7c, 0x45, 0x58, 0x6d, 0x2a, 0xdf, 0x59, 0xb5, 0x4b, - 0x54, 0x6c, 0xdc, 0x15, 0x91, - }, - { - 0x5e, 0x37, 0xbf, 0x8f, 0x45, 0x5a, 0x28, 0x35, 0xcf, - 0x44, 0x8d, 0xa6, 0x83, 0xd6, 0x36, 0xb4, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x93, 0x6f, 0xfb, 0x8c, 0xb0, 0x83, 0x33, 0x24, 0xbe, - 0x82, 0x3a, 0xe7, 0x23, 0x92, 0x99, 0x96, 0xbc, 0x45, - 0x0f, 0x81, 0x57, 0x6f, 0x2c, 0x43, 0xb4, 0x82, 0x9e, - 0xa8, 0x50, 0x44, 0xcb, 0x55, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x14, 0xef, 0xb3, 0xf1, 0x2f, 0xa0, 0x3b, 0xd2, 0x0b, - 0x94, 0xb9, 0x79, 0x4e, 0xee, 0xd7, 0xde, 0x9e, 0x7f, - 0x7f, 0xc9, 0xf1, 0x06, 0xd6, 0x80, 0x36, 0x63, 0x22, - 0xe7, 0x10, 0x28, 0x5c, 0x1e, 0xb8, 0xc1, 0x43, 0x60, - 0x76, 0x41, 0xe0, 0xc4, 0x4f, 0xe9, 0xdb, 0x92, 0xc0, - 0xab, 0xb5, 0xfd, 0xa3, 0x80, 0x6b, 0xef, 0x59, 0x61, - 0x28, 0x9e, 0x3e, 0xd7, 0x2b, 0x67, 0xb1, 0x4f, 0x1e, - 0x98, 0xdc, 0x3b, 0xd9, 0xb9, 0x38, 0x86, 0x3d, 0x5c, - 0xd9, 0xe4, 0x5f, 0xff, 0x3e, 0x7c, 0x5e, 0xb2, 0x56, - 0xb4, 0x87, 0xf0, 0x29, 0x64, 0x3a, 0x0a, 0x27, 0xc0, - 0x9b, 0xcb, 0x6f, 0x5e, 0xec, 0x83, 0x63, 0xc4, 0xde, - 0xbe, 0xd6, 0x17, 0x52, 0xdf, 0x88, 0x40, 0xcd, 0x34, - 0xe6, 0xae, 0x7f, 0x5e, 0xe3, 0xfb, 0x53, 0xb7, 0x26, - 0x76, 0x78, 0xd1, 0x5e, 0x01, 0x72, 0xa6, 0x99, 0xfa, - 0xbd, 0x8d, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(45, &vec); - - return result; -} - -unsigned int test_46(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x28, 0xba, 0x1a, 0x66, 0x16, 0x32, 0xef, 0xc8, 0xec, - 0xce, 0xd5, 0xf5, 0x1b, 0x79, 0x13, 0x00, 0xfb, 0x3b, - 0x55, 0xb0, 0x5d, 0x04, 0x17, 0x08, 0x63, 0x8d, 0xe4, - 0xbe, 0xb7, 0x57, 0xa9, 0xe5, - }, - { - 0x76, 0x82, 0x87, 0x96, 0xaf, 0xf0, 0x7f, 0x55, 0x79, - 0x5c, 0xb5, 0x47, 0x13, 0xc7, 0x7e, 0xd4, - }, - { - 0x40, 0x93, 0x3f, 0xdc, 0xce, 0x41, 0x59, 0xb0, 0x95, - 0x51, 0x11, 0xf8, 0x44, 0x47, 0x1b, 0x0d, 0xb8, 0x5b, - 0x73, 0xbd, 0xd2, 0xb7, 0x8c, 0x46, 0x8d, 0xd3, 0x9e, - 0x2a, 0x9b, 0x29, 0xae, 0xf2, - }, - { - 0xa5, 0xf5, 0x42, 0xb0, 0x4a, 0xaa, 0x5d, 0xbc, 0x93, - 0x1e, 0x47, 0x01, 0x9f, 0xeb, 0x38, 0x96, 0x26, 0x16, - 0xc5, 0x7a, 0xf0, 0x9b, 0x7c, 0x1d, 0xf8, 0x3f, 0x2b, - 0x86, 0x0f, 0xf7, 0x65, 0x86, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x65, 0xe5, 0xaa, 0x47, 0xb3, 0x85, 0xf1, 0xea, 0x42, - 0xb2, 0x31, 0xb9, 0xfe, 0x74, 0x42, 0x53, 0xb8, 0x59, - 0x88, 0x59, 0xd7, 0x01, 0x1e, 0x52, 0x5f, 0x5a, 0x2a, - 0x1a, 0xd3, 0x2a, 0x97, 0x2a, 0x85, 0x08, 0x02, 0xc6, - 0x0a, 0x2b, 0xe1, 0x9b, 0xe2, 0x70, 0x06, 0x3a, 0x3c, - 0xfb, 0xea, 0xae, 0x95, 0x4f, 0x10, 0xb1, 0x22, 0x35, - 0x2d, 0xe6, 0xa0, 0x8a, 0xc4, 0x10, 0xe0, 0x99, 0x16, - 0x53, 0xaa, 0xb2, 0x71, 0xb3, 0x60, 0xfe, 0x91, 0x91, - 0xcf, 0x5a, 0xdd, 0xcc, 0xcc, 0xed, 0x8c, 0x4a, 0xcf, - 0xb6, 0x14, 0x57, 0x04, 0x99, 0x92, 0x98, 0x8f, 0xd7, - 0xa9, 0xac, 0xca, 0x1f, 0x1b, 0xca, 0x35, 0xf1, 0x47, - 0x58, 0x13, 0x69, 0x4a, 0x39, 0x98, 0x8e, 0x5f, 0xac, - 0x9f, 0x4a, 0xc0, 0x57, 0x22, 0x86, 0xbc, 0x46, 0x25, - 0x82, 0xad, 0x0a, 0xf7, 0x8a, 0xb3, 0xb8, 0x5e, 0xc1, - 0x7a, 0x25, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(46, &vec); - - return result; -} - -unsigned int test_47(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xcf, 0xd5, 0x49, 0xc8, 0x08, 0x0a, 0x50, 0x2e, 0x3e, - 0xdd, 0x79, 0x05, 0x58, 0x4e, 0x5b, 0xe1, 0x4d, 0x7e, - 0xf5, 0x59, 0x10, 0xd2, 0x82, 0xd8, 0x1d, 0x34, 0x5c, - 0x53, 0xca, 0x34, 0xe0, 0x7b, - }, - { - 0xa5, 0x65, 0xe4, 0xbc, 0x2f, 0x46, 0x17, 0x69, 0xc0, - 0xa8, 0xf2, 0x11, 0xa6, 0x7d, 0xc9, 0xa7, - }, - { - 0xd4, 0xad, 0xd6, 0x4c, 0x86, 0x03, 0x41, 0x56, 0x29, - 0xda, 0x5c, 0xd5, 0x8c, 0x51, 0x89, 0x58, 0xc8, 0x4d, - 0x43, 0xad, 0xa7, 0x1b, 0xd1, 0xbd, 0x57, 0x8f, 0xbe, - 0x67, 0x74, 0x4b, 0x24, 0x76, - }, - { - 0x27, 0x12, 0xa4, 0x16, 0x15, 0xf2, 0xb4, 0xaf, 0x37, - 0xd6, 0x41, 0xc3, 0xa7, 0x34, 0x07, 0xad, 0x62, 0xb4, - 0x3e, 0xeb, 0xd0, 0x43, 0x9b, 0xc7, 0x0f, 0xaf, 0x2b, - 0x7f, 0x25, 0x25, 0xe2, 0xf1, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb5, 0x22, 0x5f, 0xa8, 0xb7, 0xb1, 0xff, 0x05, 0x8f, - 0x3e, 0xd4, 0x92, 0xcc, 0x7f, 0x66, 0xcb, 0xc3, 0x93, - 0x47, 0x74, 0x03, 0x14, 0x47, 0x12, 0x5a, 0xf8, 0x20, - 0xcf, 0xe9, 0x42, 0x9c, 0x19, 0x5d, 0xf9, 0xb3, 0xcc, - 0x9a, 0x11, 0xb0, 0x2c, 0xf3, 0x80, 0x06, 0x13, 0xeb, - 0x53, 0x4d, 0xc2, 0xce, 0x13, 0x65, 0xbc, 0x40, 0x9b, - 0x2b, 0x13, 0xd6, 0x5b, 0xed, 0xe5, 0x4c, 0xd2, 0x13, - 0xa5, 0x49, 0xf2, 0xef, 0x9e, 0x3d, 0x17, 0xc4, 0xfb, - 0x99, 0x55, 0x1e, 0xea, 0x53, 0x9b, 0x91, 0x25, 0x48, - 0x83, 0xca, 0xd8, 0x6f, 0x5c, 0x38, 0x53, 0xa8, 0x03, - 0x56, 0x6a, 0xc1, 0xea, 0x86, 0x4a, 0x08, 0xbf, 0x6e, - 0x80, 0x29, 0x58, 0x8f, 0xf8, 0x58, 0x0f, 0x7d, 0x26, - 0x57, 0xdc, 0x8f, 0x38, 0x9f, 0x72, 0xca, 0xb4, 0x25, - 0x1a, 0x19, 0xc4, 0xfa, 0x2e, 0x53, 0x9a, 0xfa, 0xc7, - 0xc1, 0xc1, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(47, &vec); - - return result; -} - -unsigned int test_48(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x5c, 0xc9, 0x13, 0xe1, 0x26, 0x29, 0x48, 0x12, 0x62, - 0xad, 0x31, 0x7f, 0xb8, 0xd3, 0x98, 0x70, 0xb4, 0xf7, - 0x26, 0x0c, 0xca, 0xcd, 0xce, 0xbd, 0x91, 0x31, 0x71, - 0x0a, 0xe7, 0x1e, 0x0c, 0x98, - }, - { - 0xd4, 0x6d, 0xe6, 0xc6, 0xf4, 0xa5, 0x43, 0xfe, 0x5f, - 0x47, 0x3c, 0x2c, 0x2d, 0x0e, 0x21, 0x4a, - }, - { - 0xca, 0x7f, 0x2f, 0x65, 0x01, 0xe6, 0xde, 0xa1, 0xbf, - 0x7f, 0x54, 0xe6, 0xbd, 0x50, 0x30, 0x47, 0x97, 0xab, - 0x80, 0xea, 0x02, 0x28, 0x81, 0x3e, 0xb3, 0x84, 0x98, - 0x42, 0xf2, 0x17, 0x27, 0x3f, - }, - { - 0xe7, 0xf0, 0x08, 0xab, 0xd0, 0x0d, 0x52, 0x52, 0x97, - 0xff, 0x6e, 0x2c, 0x39, 0xa3, 0x58, 0xe6, 0xc7, 0x5c, - 0x4a, 0x64, 0xf6, 0xac, 0x68, 0xde, 0xfd, 0x27, 0x56, - 0x23, 0xf4, 0x96, 0xca, 0x07, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x8c, 0xa7, 0xdd, 0x3d, 0x3b, 0x82, 0xf6, 0x40, 0xb3, - 0x3c, 0xf1, 0x76, 0xb2, 0x2d, 0xe7, 0x13, 0x0c, 0x1d, - 0xc5, 0x4c, 0x68, 0x4d, 0xdf, 0x8b, 0xc7, 0xb0, 0x8a, - 0x18, 0x17, 0x53, 0xad, 0x7a, 0xf8, 0xc4, 0x63, 0x82, - 0x87, 0xf7, 0x24, 0xdf, 0x8f, 0xf9, 0x91, 0x43, 0x1f, - 0x99, 0xa3, 0x10, 0x51, 0x73, 0xb1, 0x07, 0xf0, 0x64, - 0x54, 0x1d, 0xd9, 0x24, 0x40, 0xfd, 0x4c, 0xee, 0x65, - 0x9e, 0x93, 0x22, 0xb5, 0x15, 0x41, 0x68, 0xf4, 0x9d, - 0xb3, 0x6f, 0x32, 0x24, 0x5a, 0xe4, 0xd9, 0x83, 0x15, - 0x59, 0xeb, 0x83, 0x9b, 0x28, 0xb9, 0xa3, 0x88, 0xae, - 0x49, 0x80, 0xce, 0xea, 0xdd, 0x99, 0x03, 0xd4, 0xfe, - 0xbc, 0x66, 0x2b, 0xb7, 0xd2, 0x46, 0x01, 0x74, 0x63, - 0xe8, 0x43, 0xe7, 0x72, 0x56, 0x72, 0x66, 0x22, 0xcd, - 0x1f, 0x10, 0x25, 0xc5, 0x1b, 0x66, 0x24, 0xce, 0x84, - 0x77, 0x16, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(48, &vec); - - return result; -} - -unsigned int test_49(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xb8, 0xbc, 0x5e, 0x67, 0x20, 0xa4, 0x14, 0xb7, 0xf7, - 0xa2, 0x13, 0xd4, 0x55, 0xd4, 0x3e, 0xc5, 0x5c, 0x77, - 0x3e, 0xdf, 0x24, 0x03, 0x31, 0x97, 0x16, 0xde, 0xf9, - 0xee, 0xc1, 0x29, 0x39, 0x75, - }, - { - 0x2d, 0xa2, 0x86, 0x29, 0x23, 0x31, 0x05, 0x6d, 0xcf, - 0x88, 0x4d, 0xe8, 0x94, 0x4e, 0x02, 0x6b, - }, - { - 0x51, 0x4e, 0xb0, 0xc6, 0x9b, 0xbe, 0xa5, 0xb9, 0x95, - 0x32, 0x49, 0x76, 0xca, 0x12, 0x33, 0x37, 0xe2, 0x6f, - 0x63, 0x9b, 0x06, 0xa7, 0xa3, 0x62, 0xff, 0x57, 0x67, - 0x35, 0x20, 0xcb, 0x70, 0xdb, - }, - { - 0x3c, 0x1b, 0xba, 0x68, 0x1b, 0x3e, 0x04, 0x08, 0xd0, - 0x8b, 0x92, 0xfd, 0xd3, 0x25, 0x2d, 0xda, 0x67, 0x68, - 0x5d, 0x86, 0x5f, 0xe8, 0x28, 0x6d, 0x6c, 0x4f, 0xd6, - 0x69, 0xc3, 0x3c, 0x09, 0x20, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb9, 0x41, 0x60, 0x02, 0xc5, 0x44, 0xe0, 0x79, 0x99, - 0x84, 0x64, 0xd5, 0x18, 0x1a, 0xfe, 0x70, 0xc1, 0x06, - 0xd4, 0x4b, 0x87, 0x6d, 0x16, 0xb3, 0x9f, 0x93, 0x6a, - 0xff, 0x36, 0xec, 0x86, 0xdd, 0xef, 0x5f, 0xb2, 0x68, - 0x8a, 0x0a, 0xad, 0xf6, 0x69, 0xc3, 0x9b, 0x6f, 0x67, - 0x24, 0xff, 0x3e, 0xea, 0xac, 0x90, 0xb7, 0x06, 0x74, - 0xc1, 0x4d, 0x97, 0xe9, 0x94, 0xbd, 0xec, 0x0f, 0xd5, - 0x23, 0x73, 0xcf, 0x7a, 0x21, 0x25, 0x0c, 0x83, 0x5e, - 0x93, 0xc7, 0x3d, 0x7c, 0x49, 0x79, 0x0b, 0x59, 0x30, - 0x0d, 0xb4, 0x85, 0xf0, 0x21, 0xb1, 0x35, 0x93, 0xa3, - 0x2d, 0x72, 0xb7, 0x05, 0x7d, 0xa0, 0xd5, 0x5f, 0x63, - 0xa6, 0xca, 0xe5, 0x18, 0x35, 0x40, 0xe8, 0x17, 0x29, - 0x0d, 0x8b, 0x91, 0xce, 0x55, 0xf4, 0x5f, 0xeb, 0x77, - 0x30, 0x73, 0x2f, 0xa9, 0x15, 0x6d, 0xa8, 0x27, 0x6d, - 0x67, 0x32, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(49, &vec); - - return result; -} - -unsigned int test_50(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x28, 0xdc, 0x2f, 0x25, 0xb2, 0x63, 0x4c, 0x06, 0x72, - 0xa0, 0xfa, 0x03, 0x37, 0x85, 0x63, 0xde, 0x21, 0x45, - 0x00, 0xfa, 0xa7, 0x7e, 0xe4, 0x07, 0x64, 0x09, 0xaa, - 0x16, 0xbc, 0x85, 0x12, 0xd2, - }, - { - 0x85, 0xd5, 0x2e, 0xd3, 0x4e, 0x06, 0x29, 0x09, 0xbb, - 0x5e, 0x61, 0x75, 0xdf, 0xa1, 0x87, 0xb8, - }, - { - 0x5b, 0xb0, 0xe4, 0x22, 0xce, 0xec, 0x47, 0xaa, 0xf4, - 0x80, 0x82, 0x90, 0x9f, 0x11, 0xc9, 0x98, 0xa5, 0xa7, - 0x7d, 0x54, 0x32, 0x0b, 0x28, 0xea, 0xea, 0xab, 0x71, - 0x32, 0x21, 0xc9, 0x54, 0x19, - }, - { - 0x43, 0x93, 0xb2, 0x0d, 0x7d, 0xd1, 0x5d, 0x67, 0xa2, - 0xf7, 0x8e, 0x74, 0x37, 0xe1, 0xe7, 0xa9, 0x51, 0x10, - 0xdc, 0x2d, 0xf6, 0x46, 0xdb, 0x22, 0x34, 0x2a, 0x71, - 0x1a, 0xe1, 0x02, 0xd1, 0xd6, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x66, 0xdb, 0xf2, 0xb1, 0x21, 0xbf, 0xd4, 0xa7, 0x25, - 0x84, 0xb5, 0x61, 0xc6, 0x50, 0xf5, 0x09, 0x95, 0xd2, - 0x2f, 0x0f, 0x37, 0x7d, 0xf2, 0xf6, 0x0c, 0xd2, 0x6e, - 0x03, 0x77, 0xb7, 0xd1, 0xae, 0x7b, 0x1a, 0xfc, 0x72, - 0xd2, 0x2f, 0x9a, 0xb5, 0xb5, 0x42, 0x76, 0x4a, 0x21, - 0x9c, 0xbb, 0x66, 0xf3, 0x25, 0x3e, 0x60, 0x2e, 0x93, - 0x80, 0x7d, 0x3e, 0xc2, 0xbe, 0xe5, 0xab, 0x13, 0x1f, - 0x00, 0xfb, 0x4e, 0xd3, 0x28, 0x8b, 0xb1, 0xb6, 0xf5, - 0x2d, 0xd3, 0x9d, 0x79, 0xc8, 0x17, 0xab, 0x73, 0xd9, - 0xb1, 0x1f, 0x81, 0xe3, 0x01, 0x31, 0xd1, 0xf3, 0xca, - 0xb9, 0x60, 0x44, 0x1d, 0x07, 0xec, 0x23, 0xbe, 0xa0, - 0xee, 0xd7, 0x71, 0x88, 0xd7, 0x14, 0x07, 0x87, 0x39, - 0xd8, 0x1c, 0x42, 0xcb, 0x22, 0x4b, 0xc5, 0xad, 0x0b, - 0x65, 0xc8, 0xc9, 0xc5, 0xa8, 0x08, 0xb6, 0x05, 0xf1, - 0x92, 0x3c, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(50, &vec); - - return result; -} - -unsigned int test_51(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xaf, 0x84, 0x05, 0x9f, 0x96, 0xed, 0x19, 0xb2, 0xe5, - 0x3f, 0x09, 0x12, 0x28, 0xe7, 0x09, 0x67, 0x86, 0x47, - 0x35, 0xdc, 0x83, 0x17, 0x8e, 0x15, 0x9f, 0x57, 0x7c, - 0x57, 0xbc, 0x12, 0x1c, 0xbf, - }, - { - 0x84, 0xc6, 0x51, 0x5f, 0xcb, 0x88, 0x13, 0x6a, 0xdc, - 0x23, 0x9f, 0x53, 0x7f, 0xca, 0xbf, 0x4d, - }, - { - 0x9f, 0xab, 0xe3, 0x0a, 0xdb, 0x15, 0xa1, 0x45, 0x2f, - 0xba, 0xf2, 0xb6, 0x27, 0xc0, 0xe4, 0x7a, 0xdc, 0x60, - 0xce, 0x6e, 0x9b, 0x10, 0xa5, 0x6a, 0x33, 0x8f, 0x08, - 0xe8, 0x85, 0x8f, 0x82, 0xa1, - }, - { - 0xf5, 0xfd, 0xb3, 0xb3, 0xaa, 0x2e, 0xde, 0xf8, 0xca, - 0x8d, 0x31, 0xc9, 0x91, 0x2e, 0xb4, 0x3a, 0x3a, 0xdc, - 0x48, 0x25, 0xc8, 0x8d, 0x46, 0x32, 0x30, 0xb1, 0x13, - 0x91, 0x3f, 0x1d, 0x01, 0x17, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x18, 0x1c, 0x7a, 0x02, 0x26, 0x4e, 0x5a, 0x6a, 0x1f, - 0xf4, 0xd9, 0x7d, 0xbc, 0xe0, 0x74, 0x28, 0xe4, 0xb2, - 0xb4, 0x49, 0xa2, 0xb8, 0x61, 0xeb, 0x0a, 0x61, 0x72, - 0x93, 0xfb, 0x84, 0x7e, 0x2a, 0xa1, 0x23, 0x4d, 0x21, - 0x4d, 0x50, 0x92, 0x07, 0x3f, 0x9d, 0xbb, 0x49, 0xfa, - 0xe8, 0xb9, 0x63, 0x56, 0x9b, 0xf4, 0xb7, 0xfe, 0x20, - 0xe6, 0xaa, 0x35, 0x5e, 0x56, 0x5d, 0xb4, 0xc7, 0x5d, - 0x62, 0x3b, 0x47, 0xcb, 0x62, 0x7a, 0x7f, 0xde, 0x90, - 0x08, 0xd0, 0x29, 0xd2, 0x0c, 0x09, 0xbb, 0x50, 0xe8, - 0x3a, 0xb0, 0x37, 0xf3, 0x70, 0x8f, 0xc5, 0x18, 0x3f, - 0xe0, 0xf2, 0x2a, 0x73, 0x2b, 0x89, 0xf3, 0x9c, 0x3a, - 0x45, 0xf1, 0xf1, 0x61, 0x68, 0x76, 0xf8, 0x72, 0x03, - 0xce, 0xef, 0x06, 0x05, 0xf0, 0x3c, 0x28, 0xb2, 0x65, - 0x4d, 0xf0, 0x0a, 0x4d, 0x55, 0xa0, 0xc0, 0x11, 0xb9, - 0x39, 0x16, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(51, &vec); - - return result; -} - -unsigned int test_52(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x4a, 0xf2, 0xbb, 0xf3, 0x6d, 0x2a, 0x30, 0x25, 0x95, - 0xde, 0x66, 0x7e, 0x42, 0xe0, 0x8a, 0xbb, 0x5e, 0x44, - 0xcb, 0xde, 0x9b, 0x1b, 0xe2, 0xee, 0xd0, 0x33, 0x8a, - 0xac, 0xb4, 0x86, 0x73, 0xbc, - }, - { - 0xe0, 0xb9, 0x43, 0xf5, 0x5f, 0xc1, 0x34, 0x16, 0x86, - 0x9a, 0x62, 0x4a, 0x9a, 0x38, 0x3f, 0xcf, - }, - { - 0xde, 0xa4, 0xc6, 0xb2, 0x49, 0x0f, 0x18, 0x72, 0xe6, - 0x1a, 0x9b, 0xf7, 0x7c, 0x3f, 0x3b, 0x67, 0xaf, 0xa8, - 0xe8, 0x92, 0xbe, 0x0c, 0x3c, 0x1a, 0xb8, 0x9e, 0x92, - 0xa2, 0x70, 0x45, 0xe1, 0xa7, - }, - { - 0xbb, 0x6a, 0x04, 0xce, 0x7f, 0x81, 0xef, 0x18, 0xbb, - 0x34, 0x55, 0xc9, 0x25, 0xb8, 0xd5, 0x76, 0xdf, 0x2b, - 0xbf, 0x68, 0xc0, 0xfe, 0x4e, 0x65, 0xc6, 0x80, 0x22, - 0xaa, 0x69, 0xdc, 0x0e, 0xc2, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x31, 0x05, 0x2a, 0x14, 0xc9, 0x11, 0xb6, 0x92, 0x64, - 0x57, 0xf5, 0x62, 0xfc, 0x27, 0xd1, 0x9f, 0x22, 0xa3, - 0xde, 0x7d, 0xd1, 0x45, 0xaa, 0x75, 0xb9, 0xb6, 0x03, - 0xa6, 0x10, 0x9f, 0xe1, 0xc1, 0xfe, 0xa3, 0xff, 0x2e, - 0x37, 0xe9, 0xd9, 0x84, 0x14, 0x50, 0x2e, 0x2d, 0xfe, - 0xf0, 0x13, 0x77, 0x88, 0x18, 0x7e, 0x42, 0xa7, 0x1c, - 0xd6, 0x94, 0x75, 0xa8, 0xbb, 0x00, 0x40, 0xac, 0x6d, - 0xb2, 0x3a, 0xed, 0x06, 0x92, 0x74, 0x95, 0x95, 0x4a, - 0xaa, 0x23, 0x19, 0x3d, 0xb8, 0x32, 0x89, 0xf7, 0x5f, - 0x96, 0x6e, 0xef, 0x0a, 0x7c, 0xed, 0x68, 0xe8, 0x87, - 0x1a, 0xb2, 0xa4, 0x7d, 0x38, 0x92, 0xf5, 0x94, 0xa9, - 0x8c, 0x90, 0xae, 0x51, 0xcf, 0x11, 0xbc, 0xf6, 0xed, - 0x87, 0x9d, 0x45, 0x8d, 0x17, 0x1f, 0x33, 0x4c, 0x04, - 0x92, 0x34, 0xdc, 0xe7, 0x94, 0x1f, 0x34, 0xb4, 0x83, - 0x9f, 0xcb, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(52, &vec); - - return result; -} - -unsigned int test_53(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xd6, 0x66, 0xa2, 0xe7, 0x0a, 0xf2, 0x77, 0x12, 0x69, - 0x42, 0x5c, 0x4d, 0xc1, 0xec, 0xa8, 0x7f, 0xe1, 0x77, - 0x31, 0x38, 0x43, 0xb8, 0xb6, 0xb9, 0xc3, 0xd4, 0xda, - 0x9d, 0x46, 0x54, 0x0c, 0xaf, - }, - { - 0xd5, 0x48, 0x6a, 0x3b, 0x88, 0x1c, 0x35, 0xbe, 0x94, - 0x4d, 0xd2, 0x35, 0x9b, 0x88, 0xd6, 0xa2, - }, - { - 0x5f, 0x0c, 0xcf, 0x34, 0xc2, 0x57, 0x60, 0x8e, 0xbf, - 0x9e, 0x5f, 0xcb, 0xb9, 0x79, 0xc1, 0xd8, 0xf6, 0x69, - 0x04, 0x7e, 0x71, 0x8c, 0x76, 0x0d, 0x0a, 0x9b, 0xe0, - 0xbe, 0xe7, 0xc9, 0x4d, 0x79, - }, - { - 0x1a, 0x6c, 0xf1, 0xd8, 0xf6, 0xa1, 0x7a, 0xd9, 0xdb, - 0xa6, 0x89, 0x8f, 0x7f, 0x82, 0xd3, 0x3d, 0xba, 0x59, - 0x6e, 0xac, 0xcc, 0x20, 0x11, 0xd1, 0x55, 0xac, 0x6e, - 0x39, 0xd5, 0x9a, 0x75, 0x58, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x58, 0xfd, 0xe4, 0xf4, 0xe1, 0x08, 0xa5, 0x40, 0x22, - 0x6f, 0x40, 0x84, 0x6b, 0xce, 0x66, 0xda, 0xb6, 0x08, - 0x2e, 0xfb, 0x63, 0x6e, 0x89, 0x87, 0xe1, 0x85, 0x42, - 0xdd, 0x6e, 0x28, 0x40, 0xa8, 0x8b, 0xe0, 0x45, 0x01, - 0x94, 0x02, 0xb2, 0x03, 0x71, 0xe0, 0x8e, 0x41, 0x52, - 0x38, 0x92, 0x5a, 0x44, 0x0a, 0x49, 0x3e, 0xd8, 0xe1, - 0x03, 0x55, 0xfc, 0x16, 0x46, 0x85, 0xe4, 0x99, 0x60, - 0x0e, 0xe1, 0x92, 0xed, 0x0b, 0x95, 0x31, 0x59, 0x2d, - 0x4a, 0x52, 0xf4, 0xd7, 0x0a, 0xc0, 0xa0, 0xaa, 0xe1, - 0x2c, 0x17, 0x05, 0xe9, 0xc1, 0xec, 0xa2, 0x6b, 0x36, - 0xc0, 0x90, 0x6e, 0x21, 0x6f, 0xda, 0xe4, 0x79, 0xae, - 0xf2, 0xdc, 0xa8, 0x46, 0x0d, 0x05, 0x58, 0xbd, 0xf7, - 0x68, 0xd7, 0xc0, 0x00, 0x2f, 0xc7, 0x1d, 0x6a, 0x5e, - 0xb0, 0x6f, 0xd6, 0x60, 0x56, 0x42, 0x57, 0xa1, 0x58, - 0xdb, 0x53, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(53, &vec); - - return result; -} - -unsigned int test_54(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x20, 0x8b, 0x9e, 0xf5, 0x00, 0xb0, 0x49, 0x3b, 0x7f, - 0x2d, 0xed, 0x5f, 0x3a, 0xf6, 0xbd, 0x56, 0x8f, 0x5d, - 0xff, 0x0e, 0xbe, 0xfd, 0x19, 0x98, 0xd3, 0x48, 0x03, - 0x7e, 0xc3, 0x63, 0xdf, 0x80, - }, - { - 0x13, 0xeb, 0x96, 0x9c, 0xea, 0xc8, 0x94, 0x56, 0xab, - 0x22, 0xd8, 0x69, 0x33, 0xa1, 0x81, 0x81, - }, - { - 0xcc, 0xae, 0xbe, 0xad, 0x9e, 0x2b, 0x91, 0x1e, 0xf9, - 0x27, 0xf3, 0x06, 0x9d, 0xa5, 0xe3, 0x58, 0x2a, 0x78, - 0x86, 0xd9, 0x56, 0x57, 0x0d, 0x2e, 0xdf, 0x2a, 0xf4, - 0x34, 0xb9, 0x47, 0x3d, 0xba, - }, - { - 0x06, 0x9b, 0x76, 0x7a, 0xc6, 0x12, 0x3f, 0x9c, 0x55, - 0x1d, 0x3b, 0xbd, 0x43, 0x22, 0x8d, 0xf5, 0x4f, 0x37, - 0x9c, 0xa6, 0xb4, 0x18, 0x96, 0x77, 0x22, 0x82, 0x5f, - 0xad, 0x33, 0x34, 0x3f, 0x9c, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xec, 0xc7, 0x58, 0xfd, 0x31, 0x6a, 0x75, 0xe5, 0xf9, - 0x7a, 0x14, 0x80, 0x3a, 0xe5, 0x1f, 0x8c, 0x0a, 0x80, - 0xec, 0xba, 0x95, 0x4b, 0x54, 0xec, 0x8b, 0x9d, 0xa8, - 0x08, 0x1f, 0x0b, 0xe9, 0x68, 0x0b, 0x11, 0xac, 0xdc, - 0xb9, 0xfc, 0x65, 0xc6, 0xef, 0x45, 0x87, 0x87, 0x54, - 0x61, 0x37, 0xfa, 0xdb, 0xbf, 0x07, 0x7a, 0x60, 0x02, - 0x52, 0x88, 0x35, 0xca, 0x3c, 0x80, 0x8f, 0xa5, 0x93, - 0xd8, 0x20, 0xa0, 0x65, 0x01, 0x59, 0x2d, 0x85, 0x7a, - 0xb0, 0xa6, 0x7b, 0x80, 0x3e, 0xcb, 0x63, 0x15, 0xba, - 0x1a, 0xa0, 0xc9, 0x0c, 0xaf, 0xed, 0xe0, 0x24, 0x80, - 0xb9, 0x8a, 0x07, 0xcf, 0x9b, 0xb8, 0x67, 0xdc, 0xe3, - 0xb1, 0x57, 0x5b, 0x6b, 0x46, 0xd4, 0x04, 0x6f, 0x44, - 0x08, 0xdd, 0xc7, 0x12, 0x82, 0xfa, 0x43, 0xac, 0xc7, - 0x38, 0xa2, 0x76, 0x65, 0xb3, 0x3a, 0xfc, 0xcf, 0x97, - 0x40, 0x77, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(54, &vec); - - return result; -} - -unsigned int test_55(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x01, 0x46, 0x9d, 0xfd, 0xc9, 0x93, 0xba, 0x87, 0x0c, - 0x34, 0x87, 0xf9, 0x3b, 0xec, 0x20, 0x81, 0x97, 0x4d, - 0xe5, 0xf4, 0x19, 0x3d, 0x10, 0x5b, 0xd8, 0xaf, 0x41, - 0xcf, 0x00, 0x1f, 0x69, 0x9c, - }, - { - 0x76, 0x15, 0x4e, 0xbb, 0xfe, 0xe0, 0x89, 0x51, 0xcf, - 0xfc, 0x61, 0xc1, 0xc2, 0x2c, 0x96, 0x85, - }, - { - 0x4e, 0x5f, 0xa3, 0x38, 0x43, 0x45, 0xb6, 0x6b, 0x7d, - 0xd4, 0xfe, 0x9f, 0xc7, 0x88, 0xa0, 0x3a, 0x38, 0x05, - 0xc5, 0xe8, 0xac, 0xb4, 0x70, 0x7e, 0x6d, 0x24, 0x41, - 0x2c, 0x49, 0x27, 0xe8, 0xff, - }, - { - 0x5e, 0x74, 0x35, 0xf0, 0x0f, 0x59, 0x38, 0x7b, 0xf0, - 0x97, 0x7a, 0x6d, 0x79, 0xc9, 0x5b, 0x83, 0x18, 0x84, - 0xe8, 0xed, 0x26, 0x1b, 0xdd, 0x09, 0x58, 0x87, 0x16, - 0x91, 0xc7, 0x0a, 0x3f, 0xe2, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x26, 0xdf, 0xf7, 0x9a, 0xd2, 0xe7, 0x29, 0x32, 0xcc, - 0xb0, 0x0a, 0xfe, 0x66, 0x90, 0x5f, 0xb9, 0x66, 0xfc, - 0x7a, 0x05, 0x7b, 0x49, 0x1c, 0x37, 0x5a, 0x31, 0x54, - 0x0a, 0x79, 0xe3, 0x0a, 0x47, 0x80, 0x70, 0x8a, 0x1e, - 0x92, 0x8d, 0x7c, 0x6e, 0xf9, 0x59, 0x43, 0x3b, 0x9a, - 0x0d, 0xbd, 0x19, 0xcc, 0x73, 0x08, 0x2c, 0xf5, 0xd3, - 0x04, 0xff, 0x2e, 0x9a, 0xcb, 0xc5, 0x62, 0x20, 0x02, - 0x50, 0xe7, 0x37, 0x6d, 0x7d, 0x35, 0xf2, 0x2b, 0xfa, - 0x25, 0x7c, 0x86, 0xb0, 0xda, 0x74, 0x83, 0x79, 0x1f, - 0x8f, 0x82, 0xe7, 0x95, 0x59, 0xe5, 0xb4, 0xb9, 0xbf, - 0xe0, 0xe1, 0xfe, 0xc5, 0x2a, 0xc4, 0x09, 0x33, 0xb3, - 0x93, 0x4b, 0x13, 0xdd, 0x65, 0x0e, 0xd5, 0xcc, 0x18, - 0x3e, 0x79, 0x6b, 0xe3, 0x5f, 0xc5, 0x9f, 0xaf, 0x51, - 0x3c, 0x40, 0xf1, 0x24, 0x9b, 0xc8, 0xfe, 0xc4, 0xf2, - 0xf6, 0x11, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(55, &vec); - - return result; -} - -unsigned int test_56(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xf1, 0x9f, 0x4d, 0xd4, 0x01, 0xe7, 0xfb, 0x21, 0xb3, - 0xf7, 0xf7, 0x3c, 0x8b, 0x39, 0x0e, 0xb6, 0x76, 0xf8, - 0x95, 0xda, 0xab, 0x86, 0x0b, 0x49, 0x1c, 0xb2, 0xfa, - 0xc8, 0x51, 0x97, 0xc1, 0x49, - }, - { - 0x25, 0x38, 0xe6, 0xbe, 0x68, 0x44, 0x1f, 0x15, 0xac, - 0x6f, 0xd0, 0xa3, 0x4e, 0xf3, 0xb8, 0xb8, - }, - { - 0x12, 0x35, 0x2e, 0x74, 0xb9, 0x12, 0xc5, 0xc6, 0x37, - 0xaf, 0x35, 0xb1, 0x90, 0x47, 0x77, 0x5f, 0x9c, 0xae, - 0x26, 0xc1, 0xad, 0x49, 0xc5, 0xd5, 0x6c, 0xd2, 0x87, - 0xc7, 0xb4, 0x11, 0x76, 0x22, - }, - { - 0x05, 0x1f, 0xfc, 0xc7, 0x64, 0x79, 0xa5, 0x67, 0x0c, - 0xb0, 0xfb, 0xba, 0x2b, 0xdc, 0x83, 0x79, 0x33, 0x1d, - 0x8d, 0xba, 0xd0, 0x60, 0x69, 0xf9, 0xa5, 0xe3, 0x6c, - 0xb8, 0xf7, 0xaf, 0xb3, 0x98, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x8c, 0x44, 0xe3, 0xd5, 0xd0, 0xfe, 0xe7, 0x9b, 0x1a, - 0x25, 0x8f, 0x3e, 0x30, 0xe3, 0xcd, 0x9a, 0x0e, 0xbd, - 0x12, 0xcf, 0x68, 0x97, 0x8c, 0xca, 0x5e, 0xd0, 0x53, - 0x44, 0x76, 0x57, 0xff, 0x41, 0x05, 0x77, 0x8b, 0x4d, - 0xd8, 0x72, 0xfd, 0xe9, 0x2f, 0x98, 0x80, 0x4a, 0x72, - 0x42, 0xea, 0x57, 0xe1, 0x3b, 0x0d, 0x6a, 0x8d, 0x49, - 0x37, 0x37, 0x48, 0xc4, 0x95, 0xa7, 0x7d, 0xe8, 0x0e, - 0xfe, 0x24, 0xfa, 0xe7, 0x68, 0x60, 0x4d, 0x1c, 0xbb, - 0x94, 0xeb, 0xd0, 0x8f, 0x37, 0x91, 0x40, 0xea, 0x52, - 0x08, 0xdb, 0x58, 0x9d, 0x1d, 0x1d, 0xdc, 0xb6, 0x9e, - 0xcc, 0x76, 0x4b, 0x51, 0xfc, 0x08, 0x25, 0x08, 0xac, - 0xd6, 0x93, 0xce, 0xdb, 0xc7, 0x07, 0x0f, 0x55, 0x2d, - 0x29, 0x4b, 0x6b, 0x2b, 0xab, 0x9c, 0x7b, 0x6c, 0x9c, - 0x0e, 0x06, 0x88, 0x8b, 0xab, 0xbd, 0x75, 0x68, 0x8c, - 0xf5, 0x36, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(56, &vec); - - return result; -} - -unsigned int test_57(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xa0, 0x24, 0x5f, 0x99, 0x08, 0xf6, 0xc6, 0x64, 0xde, - 0xa7, 0x68, 0x9e, 0x97, 0x1a, 0x1f, 0xf2, 0xc1, 0x89, - 0xee, 0xe4, 0x22, 0xea, 0x15, 0x7d, 0x40, 0xa4, 0x44, - 0xd8, 0x3c, 0x94, 0x19, 0x80, - }, - { - 0xf5, 0x69, 0xf2, 0xaf, 0x4d, 0x5f, 0xbb, 0xb7, 0x81, - 0x3f, 0x3e, 0x24, 0x4e, 0x4d, 0x3d, 0xc4, - }, - { - 0x88, 0x7e, 0x6c, 0x40, 0x26, 0x35, 0x97, 0xd7, 0x56, - 0xc2, 0x5b, 0x40, 0x15, 0xe7, 0x09, 0xa9, 0x66, 0x3e, - 0x48, 0xd5, 0xa9, 0xfb, 0xb4, 0x81, 0x3b, 0x85, 0xa5, - 0x3b, 0x99, 0x7a, 0x64, 0xb6, - }, - { - 0x2b, 0x85, 0x59, 0x8a, 0x4f, 0x92, 0xa0, 0x0f, 0x4c, - 0xb4, 0xc1, 0xfa, 0xd1, 0x82, 0x9e, 0xd6, 0xf8, 0xf0, - 0x2a, 0x8a, 0x81, 0x02, 0x7d, 0x14, 0xb6, 0x57, 0x4c, - 0x91, 0x78, 0x3c, 0x1d, 0xc4, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb4, 0xc4, 0xf4, 0x13, 0x96, 0x70, 0x6c, 0xf3, 0x6d, - 0x6c, 0xd9, 0xff, 0xb6, 0xf8, 0xa9, 0x4c, 0x46, 0x82, - 0xa8, 0x69, 0x2a, 0xe9, 0xd8, 0xea, 0xd8, 0x0a, 0xe8, - 0x9d, 0x96, 0x4a, 0x01, 0xa5, 0xde, 0xc1, 0x49, 0x3d, - 0x96, 0xe7, 0x64, 0xb9, 0x49, 0x35, 0xf8, 0x8d, 0xfd, - 0x95, 0xe7, 0xb5, 0xfd, 0x19, 0x6e, 0xed, 0xa8, 0xc2, - 0xaf, 0xe9, 0x94, 0x6d, 0xca, 0x07, 0x25, 0xff, 0x51, - 0x7d, 0x7b, 0xa3, 0xd8, 0xf7, 0xe0, 0x17, 0x41, 0x19, - 0x23, 0xfa, 0xa9, 0x28, 0x9f, 0x68, 0xb7, 0xf7, 0xba, - 0x6e, 0x29, 0xe3, 0xde, 0x65, 0x2f, 0xa4, 0xd6, 0x0e, - 0x8c, 0xac, 0xf5, 0x82, 0xef, 0xa2, 0x15, 0x7a, 0x23, - 0xe9, 0x53, 0xb5, 0x03, 0x98, 0x1c, 0x48, 0x5c, 0xf5, - 0x23, 0xbd, 0x14, 0x56, 0xbb, 0x7e, 0x8c, 0x32, 0x2f, - 0x7b, 0xf0, 0x06, 0x22, 0x3e, 0x37, 0x74, 0x69, 0x75, - 0x00, 0xfd, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(57, &vec); - - return result; -} - -unsigned int test_58(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xee, 0x8f, 0x7a, 0x02, 0x9a, 0xa7, 0xd2, 0x20, 0xa5, - 0xa1, 0x9d, 0x28, 0x5f, 0xff, 0x41, 0x1f, 0x2e, 0xd5, - 0x66, 0xa1, 0x2e, 0xc3, 0xc8, 0x13, 0xf9, 0x55, 0x9d, - 0x22, 0x1d, 0xa3, 0x8e, 0x81, - }, - { - 0xb0, 0x28, 0xd4, 0xb9, 0x6d, 0x9a, 0x61, 0x80, 0x1d, - 0x24, 0x53, 0xc4, 0xb4, 0x2f, 0xaf, 0xdb, - }, - { - 0x28, 0x2c, 0xf8, 0x31, 0x13, 0x75, 0x83, 0x7c, 0x25, - 0x77, 0xd3, 0x1c, 0x50, 0x3e, 0xc0, 0x60, 0x23, 0xf8, - 0xe2, 0xa5, 0xa0, 0xa2, 0xe5, 0xcf, 0x9c, 0xb7, 0xd9, - 0x11, 0x89, 0x9f, 0x2b, 0x5a, - }, - { - 0x4c, 0x7b, 0x59, 0xe4, 0xdf, 0xd6, 0x9c, 0x36, 0xfe, - 0xd4, 0xa1, 0x28, 0xd7, 0xe6, 0x3d, 0x5e, 0x76, 0x47, - 0x14, 0x3f, 0x5d, 0x4a, 0xab, 0x55, 0x51, 0x6e, 0xad, - 0x95, 0x9c, 0x05, 0x94, 0x6a, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb6, 0xe8, 0x89, 0xd0, 0x2d, 0x5d, 0x4c, 0xd5, 0xa9, - 0x37, 0xc7, 0x94, 0x94, 0xe9, 0x92, 0x8c, 0x38, 0x3d, - 0x5a, 0x3b, 0xb1, 0x1f, 0x6c, 0xea, 0xa1, 0x80, 0xc7, - 0x96, 0x47, 0x96, 0xac, 0x59, 0xfc, 0xc2, 0x46, 0x61, - 0x71, 0xd6, 0x1f, 0x53, 0x3c, 0xea, 0xee, 0x81, 0xb0, - 0xdc, 0x76, 0x3f, 0x0c, 0x62, 0xc4, 0x49, 0xb7, 0x79, - 0xcd, 0x30, 0x3d, 0xdf, 0x56, 0xe1, 0xce, 0x01, 0xdc, - 0x12, 0x7b, 0xf1, 0xbb, 0x52, 0x67, 0x23, 0xfd, 0x7f, - 0x2f, 0x05, 0x46, 0x76, 0xd6, 0x51, 0xc9, 0x4d, 0xfb, - 0x06, 0x23, 0xf9, 0x72, 0x22, 0xe3, 0x42, 0x41, 0xb5, - 0x65, 0x4d, 0x5d, 0x9f, 0x23, 0x1b, 0x99, 0x41, 0x1c, - 0x0f, 0x36, 0xd5, 0x7f, 0xcb, 0xd0, 0xed, 0x49, 0xe2, - 0xea, 0xc4, 0x7d, 0xb3, 0xf2, 0xa1, 0x22, 0x17, 0x8e, - 0x11, 0x6d, 0x68, 0xf0, 0x4f, 0xe0, 0x89, 0x88, 0x54, - 0xe6, 0x95, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(58, &vec); - - return result; -} - -unsigned int test_59(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x10, 0xb8, 0x78, 0x9c, 0xdb, 0xd6, 0x77, 0x84, 0x42, - 0xa4, 0x5e, 0xdf, 0x22, 0x8b, 0x99, 0x23, 0xf4, 0x52, - 0x63, 0x1a, 0xd0, 0xfe, 0x9e, 0x60, 0x8d, 0x10, 0x82, - 0x6b, 0xa7, 0x1d, 0xa7, 0xca, - }, - { - 0x15, 0x9f, 0xc5, 0xd8, 0xe5, 0x0e, 0xb5, 0x6e, 0x22, - 0x97, 0x47, 0x89, 0xb1, 0xdc, 0x20, 0xd1, - }, - { - 0x2d, 0xd5, 0x9e, 0x37, 0x76, 0x6c, 0x66, 0x75, 0x71, - 0xb7, 0x79, 0xc0, 0x6e, 0x12, 0xba, 0x21, 0x91, 0x88, - 0x48, 0x97, 0x72, 0xf4, 0x86, 0x31, 0xa6, 0x72, 0x8b, - 0x5b, 0x86, 0x7e, 0x3c, 0xf4, - }, - { - 0x96, 0x6d, 0x94, 0x20, 0x38, 0x03, 0x05, 0x09, 0xb2, - 0x0e, 0x61, 0x00, 0x62, 0x04, 0x2b, 0x6b, 0xf1, 0x04, - 0x81, 0x28, 0x18, 0x89, 0x32, 0x92, 0xa6, 0x8d, 0x57, - 0xd1, 0xce, 0x86, 0x51, 0x51, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x3e, 0x6a, 0xcd, 0x8b, 0x4e, 0x85, 0xb4, 0xa0, 0xf7, - 0x92, 0x8f, 0x6b, 0xd4, 0x1a, 0x8e, 0x6b, 0x52, 0x52, - 0x4f, 0xe7, 0x27, 0x23, 0xa0, 0x50, 0x96, 0x37, 0xd3, - 0x3f, 0x15, 0xaf, 0xe7, 0xd8, 0xda, 0x6a, 0x15, 0x20, - 0x9b, 0x9e, 0x41, 0x49, 0x57, 0x6f, 0xbb, 0x1f, 0xd8, - 0x31, 0xf7, 0x84, 0xc0, 0x44, 0x39, 0xab, 0xda, 0x46, - 0x05, 0xd0, 0x65, 0x56, 0xdc, 0x30, 0x02, 0x05, 0x5b, - 0x58, 0x55, 0xfb, 0xa2, 0x01, 0xf6, 0xda, 0xef, 0x79, - 0xf7, 0x8d, 0x00, 0x1e, 0xd6, 0x9e, 0xca, 0x8a, 0x41, - 0x85, 0x13, 0xd0, 0x24, 0x64, 0xe8, 0xd7, 0x42, 0xc2, - 0x79, 0x9c, 0xd6, 0x8e, 0xdf, 0xbe, 0x88, 0xae, 0x9b, - 0x35, 0xa0, 0xaa, 0x06, 0x5c, 0x42, 0xa4, 0x77, 0x00, - 0x58, 0xc4, 0xb0, 0x26, 0xd0, 0x35, 0x0a, 0x7a, 0xfa, - 0x9c, 0x52, 0xc3, 0xc7, 0xfa, 0x05, 0x4f, 0x8a, 0x96, - 0xd8, 0x87, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(59, &vec); - - return result; -} - -unsigned int test_60(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x98, 0x29, 0xd2, 0xe5, 0x40, 0x96, 0x29, 0xd9, 0xc5, - 0x3c, 0x7d, 0xbb, 0x16, 0xc6, 0x19, 0xb6, 0x16, 0xb0, - 0xd1, 0x73, 0x94, 0xa3, 0xe0, 0x55, 0xbf, 0x6f, 0xae, - 0x9f, 0xcb, 0xbb, 0xaf, 0xd4, - }, - { - 0xe1, 0x5d, 0x27, 0x62, 0x63, 0x15, 0x16, 0x80, 0x7c, - 0x1f, 0x07, 0x33, 0x82, 0xe8, 0x52, 0x12, - }, - { - 0x25, 0x56, 0xe3, 0xd7, 0x5e, 0xef, 0xe6, 0xb6, 0x17, - 0x13, 0x28, 0xe6, 0x60, 0xbb, 0x65, 0x58, 0xda, 0xdf, - 0xfa, 0xa1, 0xe0, 0x32, 0xe7, 0xeb, 0xb6, 0xb3, 0x26, - 0x2a, 0xdd, 0xe0, 0xdd, 0xeb, - }, - { - 0xa4, 0xf4, 0xe2, 0x8b, 0x33, 0x0b, 0x73, 0x38, 0x2f, - 0xcc, 0x5c, 0x85, 0x7e, 0xd6, 0x2e, 0x94, 0x5f, 0xd9, - 0x71, 0x55, 0x40, 0x64, 0x54, 0x54, 0x37, 0xa5, 0xd2, - 0x2d, 0xdc, 0xbf, 0xf3, 0xee, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x74, 0x74, 0x02, 0xc5, 0x0d, 0xcc, 0xc3, 0xa6, 0x66, - 0xd9, 0x4d, 0x2d, 0x6f, 0x6f, 0x43, 0xfd, 0x2b, 0x50, - 0x53, 0x84, 0x73, 0x3c, 0x97, 0x62, 0xc2, 0xef, 0x84, - 0x93, 0x6f, 0xb3, 0x29, 0xc3, 0x66, 0x54, 0x12, 0x88, - 0xfb, 0xc5, 0x78, 0xe9, 0x39, 0x7b, 0x5b, 0x11, 0x98, - 0xf1, 0x66, 0x5f, 0x8c, 0x37, 0x3d, 0xe8, 0x55, 0x6d, - 0x3c, 0x08, 0xc6, 0x61, 0x9a, 0xa3, 0xb3, 0x55, 0xdb, - 0x20, 0x6f, 0x84, 0x0b, 0x6a, 0xa4, 0xcc, 0x72, 0x20, - 0x6d, 0x7f, 0xef, 0xb2, 0x43, 0x5d, 0x6b, 0x02, 0x4e, - 0x4c, 0x15, 0x68, 0xe9, 0xab, 0x31, 0xf7, 0x11, 0x0f, - 0x43, 0x11, 0xb0, 0x5d, 0x79, 0x96, 0xce, 0xba, 0x6e, - 0x5e, 0x6b, 0xb9, 0x00, 0xf8, 0xe7, 0x21, 0xae, 0x10, - 0x6a, 0x95, 0x11, 0xf8, 0x92, 0x6d, 0xe2, 0xf8, 0x48, - 0x71, 0x00, 0x69, 0x8a, 0xa8, 0xfe, 0x99, 0x53, 0x88, - 0xa0, 0x72, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(60, &vec); - - return result; -} - -unsigned int test_61(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x6a, 0xe8, 0x03, 0x03, 0x29, 0x23, 0x91, 0x33, 0x5b, - 0xf9, 0xc9, 0x38, 0x7f, 0xbd, 0x3b, 0xf6, 0x15, 0x75, - 0x6c, 0x9c, 0x27, 0xc3, 0x47, 0x8c, 0x87, 0xe2, 0x60, - 0xcf, 0x97, 0xd4, 0x71, 0x10, - }, - { - 0x01, 0xe1, 0x62, 0x47, 0xdd, 0x4c, 0xae, 0x64, 0x99, - 0x33, 0x7d, 0x82, 0x78, 0x4e, 0xa5, 0x7f, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x03, 0x57, 0x02, 0xef, 0x4e, 0x11, 0x2b, 0x17, 0x31, - 0x12, 0xc5, 0x85, 0x1d, 0x07, 0xb2, 0x79, 0x30, 0x98, - 0x63, 0x74, 0x0d, 0x38, 0xd0, 0xd0, 0x72, 0x02, 0x23, - 0xe2, 0x40, 0x17, 0xbb, 0xc0, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xcf, 0x43, 0x15, 0x59, 0x8f, 0xcd, 0x6a, 0xf1, 0x31, - 0x55, 0x18, 0xc4, 0xbf, 0xba, 0xc0, 0x54, 0x0c, 0x58, - 0x96, 0x35, 0x27, 0x35, 0x48, 0xa7, 0xb5, 0x07, 0xe7, - 0xd2, 0xe6, 0x85, 0xe5, 0x94, 0x7b, 0x87, 0xae, 0x25, - 0x7e, 0x58, 0xfa, 0xf2, 0x14, 0xf2, 0xb5, 0x8e, 0xd1, - 0x0c, 0x3b, 0xd3, 0x5f, 0x75, 0xf6, 0xc3, 0x5d, 0xd6, - 0xd4, 0x41, 0xc9, 0x3b, 0xcd, 0x42, 0xe7, 0x17, 0x20, - 0x10, 0x26, 0x31, 0xb1, 0xa6, 0xa4, 0xba, 0x24, 0x7c, - 0x17, 0x5e, 0xd8, 0x00, 0xcf, 0xca, 0x6e, 0x1e, 0x83, - 0x9b, 0x5a, 0xa9, 0x07, 0x60, 0x4c, 0xcf, 0xe6, 0xf9, - 0x84, 0xf6, 0x82, 0x2e, 0x00, 0x1a, 0xb0, 0x2d, 0xd6, - 0x63, 0x49, 0x64, 0xf7, 0x89, 0xcb, 0x10, 0x7a, 0x97, - 0x73, 0x46, 0x69, 0x3f, 0x32, 0x44, 0xc8, 0x95, 0xe8, - 0x40, 0xdf, 0xa0, 0xed, 0xf7, 0xf1, 0x4d, 0xc6, 0x1d, - 0x79, 0x4f, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(61, &vec); - - return result; -} - -unsigned int test_62(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xda, 0x2c, 0x40, 0x6c, 0x1a, 0x40, 0xf1, 0xbe, 0x98, - 0xfd, 0xb2, 0x86, 0x07, 0x8a, 0x92, 0x7f, 0x60, 0x6a, - 0xe8, 0xec, 0x91, 0xab, 0x3a, 0x66, 0x3f, 0xe2, 0x13, - 0xfd, 0x8f, 0x05, 0x23, 0xf9, - }, - { - 0x4b, 0x49, 0x85, 0x7c, 0x62, 0x5f, 0x7a, 0x6c, 0xa2, - 0x66, 0x9a, 0xba, 0x21, 0x3d, 0x79, 0xcb, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x52, 0xc1, 0xc0, 0x06, 0xc5, 0x77, 0x96, 0x91, 0x79, - 0xcc, 0x1f, 0xef, 0xff, 0x1b, 0xb0, 0xdc, 0x42, 0x25, - 0x5c, 0x35, 0x8b, 0x68, 0x6c, 0x73, 0x21, 0x6d, 0xa1, - 0x21, 0x6f, 0x82, 0xff, 0xfb, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x5b, 0x6e, 0x8e, 0xf0, 0x30, 0x07, 0x12, 0xaa, 0xeb, - 0x44, 0xa5, 0x2f, 0x91, 0xca, 0x2f, 0x3d, 0xee, 0xfc, - 0xee, 0xa9, 0x5c, 0xe2, 0x8e, 0x8c, 0x4d, 0x93, 0x10, - 0x12, 0x5a, 0x7d, 0x25, 0x9c, 0x34, 0x23, 0xb2, 0xcd, - 0x66, 0x2b, 0x33, 0x37, 0xae, 0xdf, 0x7d, 0xf1, 0x27, - 0x19, 0xaf, 0x7b, 0xe6, 0xca, 0xcb, 0x3a, 0x65, 0x65, - 0x07, 0x0f, 0xaf, 0xc9, 0x86, 0xc3, 0x36, 0x83, 0x6a, - 0xa2, 0xe1, 0x8c, 0x23, 0x7b, 0x23, 0xff, 0x19, 0x33, - 0x9b, 0x4b, 0x5e, 0xf7, 0x04, 0x63, 0x4f, 0x16, 0x26, - 0xd6, 0x6b, 0xce, 0x9e, 0x72, 0x55, 0x51, 0x83, 0x74, - 0x2b, 0x59, 0x13, 0x35, 0x82, 0x1c, 0xe9, 0xc3, 0xa9, - 0x5f, 0x2a, 0x1b, 0xea, 0xb6, 0xb0, 0x65, 0x9f, 0xfe, - 0x6e, 0x94, 0x0b, 0x55, 0x9d, 0xfb, 0x8a, 0x8d, 0xf1, - 0xa4, 0x73, 0x30, 0x8c, 0x31, 0x54, 0x58, 0x4e, 0xbf, - 0x96, 0x22, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(62, &vec); - - return result; -} - -unsigned int test_63(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x5b, 0x77, 0xe8, 0x85, 0x05, 0x6b, 0x4f, 0xaf, 0x9d, - 0x8e, 0xf9, 0xc8, 0x57, 0x30, 0xfd, 0x50, 0x75, 0xf0, - 0xa0, 0x70, 0x15, 0xc6, 0xdb, 0xd7, 0x32, 0x3c, 0xe6, - 0x3e, 0xa5, 0xd7, 0x1e, 0x42, - }, - { - 0x9a, 0xc3, 0xae, 0x89, 0xcf, 0xb2, 0x86, 0xb3, 0x11, - 0x49, 0xe7, 0x8b, 0xce, 0xd8, 0xcf, 0xf0, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x0d, 0xa5, 0xab, 0x25, 0x7b, 0x38, 0x96, 0x73, 0x85, - 0x2c, 0xde, 0x48, 0x00, 0xc0, 0x5a, 0xca, 0x59, 0x6e, - 0xc5, 0x7c, 0x25, 0xd7, 0xda, 0x45, 0x19, 0x11, 0x48, - 0x7a, 0x5b, 0xa6, 0xbd, 0xaa, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x1d, 0x60, 0x4f, 0x4d, 0x5b, 0xb1, 0x0e, 0x11, 0x4a, - 0xed, 0x67, 0x8a, 0x51, 0x39, 0xbb, 0x46, 0xee, 0x69, - 0x55, 0xd8, 0x6e, 0x06, 0x3d, 0x17, 0xca, 0x5e, 0xf6, - 0xdb, 0x38, 0x71, 0x51, 0x43, 0x0d, 0xb2, 0x3a, 0xa0, - 0xb4, 0x8a, 0x34, 0x3b, 0x2d, 0x35, 0x00, 0x3d, 0x29, - 0x5f, 0xd0, 0x24, 0xfc, 0x34, 0x4e, 0x7c, 0x01, 0x06, - 0x49, 0x24, 0x84, 0x69, 0xda, 0x7d, 0x9a, 0xb7, 0xe2, - 0x50, 0x97, 0xbe, 0x35, 0xfe, 0xda, 0xd1, 0xba, 0x89, - 0xad, 0x66, 0xaf, 0x96, 0x80, 0x9c, 0x64, 0xba, 0x3b, - 0x2e, 0xfe, 0x60, 0x1c, 0x1d, 0x6c, 0x20, 0x1c, 0xa5, - 0x5e, 0xa8, 0x2d, 0x90, 0x1a, 0xf1, 0x46, 0xf2, 0x00, - 0x29, 0x1b, 0x11, 0x3f, 0xbb, 0x05, 0x9a, 0x20, 0x43, - 0x28, 0x5a, 0x8d, 0x88, 0xee, 0x65, 0x5d, 0xa7, 0x6f, - 0x83, 0x79, 0x08, 0xec, 0xfc, 0x9b, 0xc0, 0xbb, 0xae, - 0xc1, 0xc3, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(63, &vec); - - return result; -} - -unsigned int test_64(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x40, 0x30, 0xb2, 0xa9, 0x83, 0xa8, 0xe2, 0x14, 0xc9, - 0xb6, 0x05, 0x3f, 0x47, 0x4d, 0xeb, 0xb1, 0x35, 0x52, - 0x2e, 0x2b, 0x0d, 0x50, 0xae, 0x98, 0x44, 0x1b, 0xef, - 0x99, 0xb9, 0x3e, 0x63, 0xb4, - }, - { - 0xd6, 0x29, 0x2c, 0x76, 0x33, 0xac, 0xc7, 0xa1, 0x7e, - 0x79, 0x7a, 0x14, 0x99, 0x43, 0xe6, 0xe4, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xea, 0x9f, 0xf3, 0x34, 0x4c, 0xba, 0x86, 0x34, 0xe8, - 0x05, 0x8f, 0x09, 0x35, 0x10, 0x51, 0x9c, 0x4c, 0xb9, - 0x3a, 0x1a, 0xb4, 0x7c, 0x31, 0x23, 0x67, 0x42, 0x95, - 0x28, 0x0a, 0x26, 0x30, 0x9c, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xe9, 0x8a, 0x2d, 0x67, 0xd2, 0xd5, 0x2d, 0xc6, 0x12, - 0x43, 0x7c, 0x57, 0x87, 0xad, 0xad, 0x2f, 0x5d, 0xaa, - 0x82, 0x90, 0x42, 0x3c, 0x45, 0xe5, 0x90, 0x94, 0x55, - 0xe7, 0x55, 0xf2, 0xd4, 0xa7, 0x29, 0xa6, 0xe6, 0xcb, - 0x42, 0xf3, 0x6b, 0x0e, 0x40, 0x57, 0x1f, 0x1d, 0x77, - 0x21, 0xb4, 0x0e, 0x3d, 0x4f, 0x77, 0x3d, 0x84, 0x5e, - 0x72, 0x6e, 0x8e, 0x1e, 0x5b, 0xd9, 0x50, 0x4a, 0x94, - 0x59, 0x43, 0xf3, 0x34, 0x60, 0x3f, 0x28, 0x2b, 0xfc, - 0x7c, 0x5d, 0x8b, 0x2a, 0x6a, 0x1c, 0x82, 0xcc, 0xa1, - 0xee, 0x94, 0x3b, 0xe6, 0xc4, 0x64, 0xbc, 0xf8, 0xa4, - 0xdf, 0x47, 0x0d, 0x3d, 0xdc, 0xd7, 0xea, 0xb1, 0xe8, - 0xbb, 0xa0, 0x09, 0x0e, 0x53, 0x7c, 0x36, 0x70, 0xf4, - 0x24, 0x43, 0x8e, 0x3a, 0x0b, 0x19, 0x72, 0x97, 0xa7, - 0xa1, 0x6d, 0x12, 0xa2, 0x82, 0x55, 0x8d, 0x55, 0x6f, - 0x3b, 0x5e, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(64, &vec); - - return result; -} - -unsigned int test_65(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x94, 0x7b, 0x3f, 0x93, 0xa6, 0x01, 0xda, 0x15, 0xaa, - 0xec, 0x58, 0x07, 0x8d, 0x19, 0x8c, 0x20, 0xc9, 0x13, - 0x79, 0xd5, 0xbf, 0x1c, 0x0d, 0xea, 0x32, 0x96, 0x91, - 0xf4, 0x7b, 0x3c, 0xdb, 0x40, - }, - { - 0x97, 0x69, 0x2e, 0xbc, 0x8c, 0x9b, 0x04, 0x5b, 0x73, - 0xe8, 0x23, 0x50, 0x0e, 0xba, 0x50, 0x77, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x59, 0x9f, 0xe8, 0x4d, 0x8a, 0x84, 0xc3, 0x06, 0xee, - 0x33, 0x4a, 0x3b, 0x44, 0x30, 0x05, 0xe3, 0x3b, 0xa0, - 0xf8, 0xf5, 0x9b, 0x63, 0x6e, 0x67, 0xd7, 0x4f, 0x8c, - 0x59, 0x65, 0x58, 0xcf, 0x8e, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x38, 0x8d, 0xe4, 0xee, 0x5c, 0x19, 0xad, 0x97, 0x2c, - 0x65, 0x0c, 0x86, 0x5e, 0xc3, 0x4f, 0x7d, 0xb6, 0x69, - 0x66, 0x9d, 0x32, 0x6f, 0x0c, 0x55, 0x89, 0xc5, 0xab, - 0x24, 0x10, 0xd6, 0x4f, 0x2d, 0x27, 0x14, 0x84, 0x3c, - 0xf5, 0xa2, 0x28, 0x8e, 0x37, 0x95, 0xfa, 0xe7, 0xf5, - 0x41, 0xfd, 0xa4, 0xbd, 0x4d, 0x48, 0x84, 0x01, 0x4c, - 0xc7, 0x75, 0x8e, 0xc2, 0x97, 0x3b, 0xce, 0x26, 0xa6, - 0xb4, 0xc4, 0xda, 0x09, 0x11, 0xde, 0xba, 0x01, 0x64, - 0x24, 0x63, 0x0d, 0x30, 0xd5, 0xf3, 0x53, 0x6e, 0x4e, - 0x79, 0x77, 0xdf, 0xc7, 0x0f, 0x40, 0xb5, 0x30, 0x8f, - 0x38, 0xef, 0x6e, 0x5a, 0x3d, 0xd7, 0xa0, 0x60, 0xda, - 0x5c, 0x68, 0xcc, 0xe2, 0x75, 0x05, 0x74, 0x5f, 0x57, - 0x68, 0x24, 0x5a, 0xb3, 0xc3, 0x1f, 0xdc, 0xc5, 0x40, - 0xd3, 0x76, 0x7b, 0x9f, 0xa6, 0x2d, 0x41, 0x71, 0xc7, - 0x15, 0xc7, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(65, &vec); - - return result; -} - -unsigned int test_66(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xc8, 0x68, 0xe7, 0x22, 0x1f, 0xe5, 0x65, 0xc1, 0x3e, - 0x46, 0xba, 0x78, 0x14, 0x17, 0xda, 0x8c, 0xf4, 0x2b, - 0xed, 0xc9, 0xbf, 0x5e, 0xca, 0xb8, 0x98, 0xf6, 0x4f, - 0x53, 0xa8, 0xe5, 0xbe, 0x2f, - }, - { - 0x49, 0x24, 0x05, 0x87, 0xc2, 0xf9, 0xe2, 0xc9, 0xaf, - 0xae, 0x3a, 0x7a, 0xa7, 0x06, 0x20, 0x80, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xa6, 0x98, 0x20, 0x3c, 0x5f, 0x5e, 0x55, 0x9d, 0x5f, - 0x08, 0xdf, 0x28, 0x23, 0x0a, 0xb3, 0xb1, 0xff, 0x40, - 0x59, 0xce, 0x8e, 0x8b, 0x2b, 0x96, 0x76, 0x88, 0x03, - 0x13, 0xd1, 0x34, 0xf7, 0xfd, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x64, 0xe6, 0x9b, 0x9c, 0xdd, 0x82, 0x94, 0x57, 0x3c, - 0x67, 0xe0, 0x6c, 0xd6, 0x62, 0x66, 0x2e, 0x98, 0xcb, - 0xca, 0xb9, 0xb8, 0xfc, 0x8c, 0x9a, 0xd7, 0xd3, 0x66, - 0xc3, 0xf9, 0x78, 0xf1, 0x0a, 0xf1, 0xbb, 0xd9, 0x93, - 0x4a, 0xdb, 0x9a, 0x31, 0x22, 0x8d, 0x0c, 0x51, 0xa2, - 0x68, 0xac, 0xb7, 0x76, 0xe3, 0xdf, 0x0d, 0x9a, 0x5d, - 0xc4, 0x13, 0xda, 0x62, 0x36, 0xe7, 0x7c, 0x15, 0xf2, - 0x2d, 0xff, 0x41, 0x09, 0x11, 0x5e, 0x2e, 0x7a, 0x09, - 0xd4, 0x5d, 0x43, 0xf5, 0xa2, 0x69, 0x10, 0x4a, 0x71, - 0x7e, 0x10, 0x1f, 0x2c, 0x84, 0x27, 0x04, 0x9a, 0xb6, - 0x58, 0x8d, 0xaf, 0x89, 0x07, 0xe3, 0x31, 0x68, 0xee, - 0xbe, 0xde, 0xcc, 0x47, 0x01, 0x90, 0x65, 0x57, 0xf9, - 0x7f, 0xd3, 0x4b, 0x72, 0x46, 0x42, 0xf2, 0x85, 0xc0, - 0xb0, 0x6a, 0xbc, 0x3c, 0xa1, 0x5b, 0xe6, 0x87, 0xc9, - 0xbe, 0x1d, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(66, &vec); - - return result; -} - -unsigned int test_67(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x5b, 0x75, 0xc3, 0xc8, 0x00, 0x0a, 0x81, 0x72, 0x18, - 0x24, 0xe9, 0x67, 0x66, 0x62, 0x85, 0x12, 0x57, 0xff, - 0x31, 0x5b, 0x9f, 0x20, 0x65, 0x63, 0x1e, 0x4b, 0x1c, - 0x31, 0xa8, 0x24, 0xed, 0x0f, - }, - { - 0x18, 0x71, 0xbf, 0x15, 0xff, 0x16, 0xe9, 0x4c, 0x9c, - 0x8d, 0x93, 0xda, 0x29, 0x51, 0x55, 0x66, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x99, 0x48, 0x67, 0xb4, 0x13, 0x45, 0x9c, 0x17, 0xa1, - 0xe5, 0x07, 0x69, 0xcb, 0x2d, 0xc3, 0x0a, 0x00, 0x12, - 0xc8, 0xd5, 0x94, 0x74, 0x2e, 0xd4, 0xea, 0x2c, 0x2a, - 0xc4, 0x34, 0xbe, 0x33, 0x86, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x2b, 0x40, 0xdb, 0x08, 0xa5, 0xe1, 0x5e, 0xb1, 0x81, - 0x7f, 0x05, 0x14, 0x1c, 0xb0, 0xb5, 0x86, 0x46, 0x84, - 0xea, 0x4e, 0x10, 0x04, 0xc2, 0x60, 0x98, 0xb4, 0x83, - 0x11, 0x9b, 0xde, 0x01, 0x75, 0x26, 0xdf, 0x8d, 0x39, - 0x3a, 0xbd, 0x6a, 0x26, 0x02, 0xf4, 0x2f, 0xe3, 0x52, - 0x24, 0xea, 0x7d, 0xee, 0xd2, 0xf6, 0x40, 0x3d, 0x92, - 0xc4, 0x1d, 0xf8, 0x01, 0xab, 0x93, 0x65, 0xce, 0x24, - 0xa6, 0xa9, 0xae, 0xa9, 0x08, 0xdc, 0xf6, 0x11, 0x3e, - 0x02, 0xcb, 0x67, 0xae, 0x13, 0x01, 0x5b, 0x61, 0x74, - 0xf2, 0x2c, 0xd9, 0x43, 0x31, 0xa4, 0x79, 0xab, 0x03, - 0xb7, 0xa1, 0x9d, 0xe2, 0x81, 0xe0, 0x69, 0xa1, 0x7b, - 0x60, 0x0c, 0x66, 0x49, 0xd7, 0xb8, 0x8e, 0x5b, 0xa3, - 0xf3, 0x40, 0xfb, 0xdb, 0x53, 0x7a, 0x9e, 0x45, 0x81, - 0x49, 0x6c, 0x8e, 0xaa, 0x40, 0xe5, 0xb8, 0x88, 0x62, - 0xc4, 0xb0, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(67, &vec); - - return result; -} - -unsigned int test_68(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xbb, 0x44, 0x58, 0xcc, 0xeb, 0x0d, 0xce, 0x73, 0x32, - 0xf3, 0x0c, 0xe9, 0x0f, 0x69, 0xd8, 0x28, 0x25, 0xb5, - 0x47, 0xbb, 0x51, 0x2a, 0xfb, 0xae, 0x3e, 0x1c, 0xba, - 0xaa, 0x4c, 0x17, 0x2b, 0x7b, - }, - { - 0x60, 0xbd, 0x6a, 0x33, 0xbe, 0xe6, 0x1d, 0x1a, 0x9b, - 0xbf, 0xdd, 0xfe, 0xe6, 0x0f, 0x7a, 0x18, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xe8, 0x8a, 0x2a, 0xee, 0x17, 0xcc, 0x49, 0x16, 0x40, - 0xf2, 0xe0, 0xa6, 0x93, 0xf0, 0x3e, 0xbc, 0x48, 0xa9, - 0x57, 0x90, 0x31, 0x86, 0x1d, 0xf3, 0x1c, 0xdb, 0x42, - 0x64, 0x99, 0x7f, 0x8a, 0x64, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x5b, 0xea, 0x97, 0xa6, 0xda, 0xae, 0xe5, 0x40, 0xab, - 0x6d, 0x41, 0x7c, 0xa4, 0x58, 0x7c, 0x19, 0x8f, 0x58, - 0x9d, 0xb5, 0xac, 0x72, 0xb4, 0xf1, 0x38, 0x4b, 0x1b, - 0x1d, 0x8c, 0x03, 0xec, 0x73, 0xb2, 0x97, 0x93, 0x9f, - 0x5a, 0x8b, 0x82, 0x40, 0xfd, 0x10, 0x33, 0xca, 0xce, - 0x0e, 0x97, 0x1e, 0x3c, 0x3f, 0x49, 0x23, 0x9b, 0x16, - 0x85, 0x76, 0xf8, 0x3d, 0xce, 0x89, 0x53, 0x37, 0x87, - 0xfc, 0xb7, 0x25, 0x37, 0xb3, 0x2f, 0x58, 0x5d, 0xf1, - 0x35, 0x50, 0x64, 0xf7, 0xd7, 0x37, 0xb6, 0xc2, 0x52, - 0x59, 0x5f, 0x16, 0xc4, 0x2d, 0x77, 0xb8, 0x37, 0xfb, - 0x7d, 0x4d, 0x44, 0xbd, 0x84, 0xdb, 0xe8, 0x4d, 0x0b, - 0xb5, 0xa4, 0x22, 0x44, 0x87, 0xfa, 0xe3, 0xca, 0x26, - 0xe9, 0x30, 0xe5, 0x4c, 0x27, 0xe2, 0xeb, 0xdd, 0xe9, - 0x92, 0xe7, 0x6d, 0xc4, 0xc4, 0x07, 0x77, 0x7a, 0xa4, - 0xbd, 0x11, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(68, &vec); - - return result; -} - -unsigned int test_69(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x7e, 0x70, 0x38, 0x1b, 0xfb, 0xa7, 0x80, 0x7b, 0xc7, - 0x73, 0xe2, 0xcd, 0x68, 0x3f, 0x90, 0xc7, 0xad, 0x60, - 0x6d, 0xcf, 0x46, 0x27, 0x67, 0x98, 0x8b, 0x3f, 0x6c, - 0x75, 0x8f, 0x5c, 0x79, 0x5d, - }, - { - 0x7e, 0x5a, 0xb4, 0x42, 0x70, 0x29, 0xe9, 0x9d, 0xf2, - 0x20, 0x1d, 0x81, 0xc3, 0xff, 0x28, 0x4e, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xe0, 0xdd, 0x5b, 0x4e, 0x7c, 0xa7, 0x2a, 0xfd, 0xe5, - 0x3c, 0x16, 0xb8, 0x22, 0x54, 0x03, 0xbb, 0x6e, 0x74, - 0x97, 0x42, 0xf3, 0xe3, 0x88, 0x96, 0xfb, 0xf8, 0xf1, - 0x8b, 0x7c, 0xe6, 0xf7, 0x99, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x8a, 0xf2, 0x7c, 0x16, 0x3d, 0x25, 0xec, 0xf4, 0xf5, - 0x39, 0x94, 0x4d, 0x94, 0x50, 0xf5, 0x11, 0x6e, 0xa8, - 0xaa, 0x7f, 0x97, 0x36, 0x1c, 0x69, 0x6f, 0x8d, 0xc7, - 0xd8, 0xb3, 0xaf, 0xe6, 0xff, 0xc0, 0x20, 0x14, 0x59, - 0xa1, 0x73, 0x3d, 0x9e, 0xe0, 0x9b, 0x2e, 0x45, 0xf3, - 0xb6, 0xcd, 0x5f, 0x45, 0xd9, 0xf9, 0xf4, 0x5f, 0xdc, - 0x66, 0x2b, 0x56, 0x90, 0x59, 0x89, 0x1f, 0x2e, 0x9e, - 0xbc, 0x74, 0x0f, 0x78, 0x40, 0x4a, 0x0b, 0xb1, 0xc4, - 0x6a, 0x6b, 0xfe, 0xee, 0xed, 0x9c, 0x6b, 0x55, 0x2c, - 0x5c, 0x46, 0x8a, 0x49, 0x96, 0xad, 0x41, 0xcf, 0xff, - 0x77, 0xae, 0x4d, 0x98, 0x96, 0xcb, 0x80, 0xaf, 0x27, - 0x63, 0x5a, 0x4e, 0x2a, 0x1b, 0x5c, 0x07, 0xc1, 0xb5, - 0x8b, 0x49, 0xc9, 0xa7, 0x68, 0x51, 0x14, 0x4e, 0x69, - 0x03, 0x7e, 0x14, 0xf7, 0xb8, 0x05, 0x16, 0x13, 0x29, - 0xca, 0x15, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(69, &vec); - - return result; -} - -unsigned int test_70(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x2e, 0x54, 0x32, 0xac, 0xda, 0xb8, 0xca, 0x81, 0xee, - 0x56, 0xf3, 0xe6, 0x9a, 0x0c, 0x74, 0x8a, 0x72, 0xf8, - 0x3e, 0x11, 0xd1, 0x8c, 0x2e, 0xf8, 0xfc, 0x8a, 0xad, - 0x56, 0x8e, 0x19, 0xe9, 0x1c, - }, - { - 0xca, 0x5f, 0x6e, 0xb3, 0x25, 0xe4, 0xa2, 0xb2, 0x4c, - 0x00, 0x91, 0x5b, 0xc3, 0x7d, 0x99, 0x41, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xae, 0x3d, 0x7a, 0xc0, 0x62, 0x2f, 0x7d, 0xc0, 0x69, - 0xe5, 0x2c, 0xbd, 0x15, 0x84, 0x47, 0x29, 0x79, 0xe1, - 0xc8, 0xa9, 0x6b, 0xf4, 0x61, 0xc8, 0xd3, 0x97, 0x6d, - 0x8d, 0x53, 0x5c, 0x10, 0xec, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xfd, 0xa5, 0xdb, 0x4b, 0x28, 0xbb, 0xc5, 0xd2, 0xf6, - 0xbd, 0x33, 0xac, 0x98, 0x39, 0x9b, 0xcf, 0xcf, 0xa4, - 0x60, 0x37, 0x47, 0x8c, 0xf2, 0x69, 0xbf, 0x35, 0x9d, - 0xb2, 0x28, 0x28, 0x06, 0x62, 0x71, 0x8f, 0x6d, 0x4c, - 0xa4, 0x77, 0xbb, 0x1c, 0xac, 0xa5, 0x67, 0x30, 0x9a, - 0xba, 0xab, 0x08, 0x32, 0xe7, 0x88, 0x58, 0x84, 0xe8, - 0x6c, 0x4e, 0x0b, 0x01, 0x7e, 0x86, 0x77, 0x74, 0x9c, - 0x5d, 0xb2, 0xc3, 0x3e, 0x65, 0xfa, 0x53, 0x8d, 0xf4, - 0xae, 0xc4, 0x46, 0xc7, 0xca, 0x72, 0x4a, 0xf1, 0x8e, - 0x45, 0x98, 0x36, 0x01, 0x78, 0x5f, 0x98, 0x00, 0xa0, - 0xc5, 0xb2, 0x3f, 0xea, 0xfb, 0xbd, 0x34, 0x9d, 0x20, - 0x4a, 0xe5, 0x4b, 0x40, 0xa0, 0x19, 0xa5, 0x7a, 0x83, - 0x68, 0xf0, 0x7d, 0x70, 0x94, 0x5f, 0x22, 0xbe, 0x24, - 0xaa, 0x99, 0x2f, 0x93, 0x0f, 0x92, 0xa6, 0x26, 0xbb, - 0x22, 0xb6, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(70, &vec); - - return result; -} - -unsigned int test_71(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xef, 0xfa, 0xaf, 0x06, 0xcd, 0x99, 0x7b, 0x99, 0x78, - 0x33, 0x72, 0xc5, 0x15, 0x67, 0x2e, 0xde, 0x1a, 0x74, - 0x16, 0x22, 0xa2, 0x04, 0x39, 0x53, 0x45, 0x1c, 0x33, - 0x66, 0x8e, 0x8d, 0xf4, 0x65, - }, - { - 0xfb, 0x92, 0x29, 0x10, 0xbc, 0x6c, 0x2a, 0xd0, 0x46, - 0x1c, 0x98, 0x09, 0xd1, 0x8a, 0x23, 0xf9, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x53, 0xce, 0x26, 0xba, 0xbc, 0x29, 0x4d, 0x2f, 0x1b, - 0x48, 0xb5, 0x8a, 0xec, 0xad, 0xab, 0x33, 0x08, 0xd8, - 0x71, 0x18, 0x92, 0xcf, 0xa3, 0x93, 0xf3, 0x58, 0x33, - 0x5f, 0xc0, 0xf4, 0x67, 0x4e, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x8a, 0xe5, 0x35, 0xa3, 0xcc, 0x00, 0xda, 0x2c, 0x81, - 0x7e, 0x7f, 0x38, 0x9a, 0x9b, 0xc9, 0x97, 0xd8, 0xe7, - 0x20, 0xe3, 0x94, 0xbc, 0xd3, 0xa6, 0xc2, 0x3e, 0xc6, - 0x78, 0xed, 0x9d, 0xa4, 0x8d, 0x3d, 0x83, 0xe3, 0x2f, - 0x73, 0xd8, 0x96, 0xda, 0x58, 0x2a, 0x5c, 0x2b, 0x0f, - 0x44, 0x12, 0x7b, 0x3f, 0x7e, 0xd3, 0x6d, 0x91, 0xfc, - 0x87, 0x7b, 0xbe, 0x91, 0x33, 0x90, 0x64, 0x89, 0x0a, - 0x4c, 0x2d, 0xb0, 0x5f, 0x16, 0xb5, 0x53, 0x61, 0x1d, - 0x68, 0x72, 0xc8, 0xbf, 0x40, 0x84, 0x34, 0x4c, 0x5d, - 0xae, 0x08, 0xca, 0x48, 0x17, 0x2f, 0x98, 0x22, 0x24, - 0x4d, 0x4f, 0xf3, 0x72, 0xe0, 0x4c, 0xe9, 0x9a, 0xed, - 0x28, 0xc3, 0x94, 0x4c, 0x47, 0xfa, 0x43, 0x4e, 0x20, - 0xe9, 0x97, 0x30, 0xba, 0xf2, 0xbe, 0x9e, 0xe8, 0x52, - 0x47, 0xf1, 0xb9, 0x4b, 0x12, 0x9c, 0x3f, 0x6c, 0x3e, - 0x0f, 0xe0, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(71, &vec); - - return result; -} - -unsigned int test_72(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x4a, 0x35, 0x42, 0xce, 0xa1, 0xb5, 0xa7, 0xb8, 0x93, - 0x85, 0x15, 0x32, 0x54, 0x98, 0x84, 0xa9, 0xeb, 0xa9, - 0x36, 0x95, 0xbe, 0x8d, 0x76, 0x76, 0x1d, 0xb6, 0x98, - 0x31, 0xbd, 0x10, 0x53, 0xee, - }, - { - 0xff, 0x03, 0x20, 0xc4, 0x7e, 0x47, 0xb4, 0x40, 0x71, - 0x8b, 0x80, 0xab, 0x61, 0x6d, 0x7f, 0xff, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x86, 0x9a, 0xe8, 0xff, 0x94, 0x9a, 0x10, 0xc9, 0x3c, - 0x05, 0xd6, 0x20, 0xe4, 0xc4, 0xf1, 0x3d, 0x03, 0x76, - 0xee, 0x1e, 0x00, 0xc7, 0x1b, 0xba, 0x58, 0x83, 0xb3, - 0xbc, 0x41, 0xf5, 0x24, 0x7b, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xad, 0xda, 0x83, 0xc6, 0x11, 0x88, 0x3e, 0x01, 0xf9, - 0x58, 0xfe, 0xbf, 0xf1, 0x05, 0x2b, 0x65, 0x8b, 0x0c, - 0x84, 0xf8, 0x57, 0xad, 0x8d, 0x7d, 0x18, 0xde, 0x89, - 0x7d, 0xe2, 0xa8, 0xee, 0xaf, 0x39, 0x53, 0xd9, 0x40, - 0x7c, 0xbc, 0x4c, 0x05, 0x9c, 0x9f, 0xf9, 0xbf, 0xe6, - 0x77, 0x44, 0xe1, 0x34, 0x06, 0xcb, 0xfb, 0x09, 0xed, - 0x31, 0xdc, 0x2f, 0xbc, 0xd9, 0x62, 0x61, 0x29, 0xd0, - 0xb6, 0xe4, 0xa8, 0x0a, 0xc3, 0xc1, 0xb2, 0x86, 0xd8, - 0x1f, 0x6f, 0x28, 0x18, 0x3a, 0x3e, 0x8c, 0xe2, 0x66, - 0x68, 0x60, 0x05, 0x60, 0x08, 0x4f, 0x3a, 0xde, 0xd9, - 0x4e, 0xe5, 0x7d, 0xe1, 0x86, 0x57, 0xf4, 0x43, 0x50, - 0xf9, 0x75, 0x32, 0xa7, 0xc2, 0x5d, 0xcb, 0x99, 0xa8, - 0x68, 0x3a, 0xc3, 0xd6, 0x32, 0xa3, 0x76, 0x18, 0xeb, - 0x9e, 0x2b, 0x18, 0x54, 0x5c, 0x00, 0xb0, 0xc2, 0xcd, - 0xc3, 0xc0, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(72, &vec); - - return result; -} - -unsigned int test_73(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xc5, 0x02, 0xa0, 0x09, 0xeb, 0x41, 0xc8, 0xf8, 0x22, - 0x06, 0x66, 0xd4, 0xe2, 0x33, 0x54, 0xb3, 0xd0, 0x86, - 0xc8, 0xf6, 0xe0, 0x96, 0x28, 0xd2, 0xa9, 0xbb, 0xe0, - 0x72, 0x77, 0x0c, 0x99, 0xee, - }, - { - 0xbb, 0xfc, 0xb4, 0x61, 0x3c, 0x45, 0x03, 0x26, 0x8b, - 0xc9, 0x07, 0x45, 0xdf, 0x3c, 0xc8, 0x90, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x6d, 0xa4, 0xc1, 0x2b, 0x0a, 0xa1, 0x28, 0xa5, 0x8f, - 0xee, 0xb8, 0x7a, 0xbb, 0xea, 0x04, 0xee, 0xcf, 0xb2, - 0xb4, 0x3c, 0x62, 0x93, 0xb8, 0x86, 0x3d, 0xe3, 0x16, - 0xae, 0x6e, 0xd2, 0x22, 0x21, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xc2, 0xa8, 0x78, 0x4f, 0xbc, 0xe4, 0xfa, 0x6e, 0x15, - 0x84, 0x4f, 0xdd, 0x8a, 0x84, 0x41, 0xd6, 0xb5, 0x6e, - 0xbe, 0x6c, 0x0d, 0xb5, 0x76, 0xd6, 0x81, 0xe0, 0x2b, - 0xdb, 0x45, 0x9e, 0x4b, 0xaa, 0xdd, 0xe1, 0x7b, 0xd0, - 0xb8, 0x7d, 0xfa, 0xfc, 0x9f, 0x92, 0x94, 0x1d, 0x7c, - 0xa8, 0x99, 0xa1, 0x3f, 0x7e, 0x19, 0xeb, 0xd4, 0x92, - 0xb3, 0x47, 0xf7, 0x75, 0x0d, 0x7c, 0x43, 0xe6, 0x70, - 0x28, 0x65, 0x47, 0x48, 0x57, 0x2d, 0xc9, 0x1d, 0x20, - 0x02, 0xb1, 0x44, 0x27, 0x18, 0x7c, 0xf3, 0x3d, 0x42, - 0x1a, 0x56, 0xef, 0xef, 0xbd, 0x62, 0x1a, 0x84, 0xde, - 0x1e, 0x56, 0x64, 0xdf, 0x1c, 0xb2, 0xe7, 0xef, 0xc3, - 0x6b, 0xce, 0xf0, 0x3a, 0xca, 0xe1, 0x3b, 0x05, 0xea, - 0x10, 0x59, 0x76, 0xf8, 0x40, 0xea, 0x75, 0x9d, 0x68, - 0x00, 0x4b, 0x40, 0x43, 0xe8, 0xca, 0x76, 0xd5, 0x2c, - 0x73, 0x66, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(73, &vec); - - return result; -} - -unsigned int test_74(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x30, 0x4f, 0x12, 0x9a, 0xfb, 0x5b, 0xa1, 0xe0, 0x62, - 0xbd, 0x6c, 0x0d, 0x85, 0x9e, 0x71, 0x61, 0xe3, 0xb9, - 0xea, 0x53, 0xef, 0x52, 0x6f, 0x00, 0x32, 0x95, 0x33, - 0xb6, 0xbe, 0x12, 0xfa, 0xaf, - }, - { - 0x58, 0x56, 0x5e, 0x9d, 0x77, 0x6c, 0x89, 0xab, 0xf6, - 0xcd, 0xa5, 0xe7, 0x7c, 0xe7, 0xd2, 0x7b, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x19, 0x80, 0xa2, 0xd6, 0x5b, 0x26, 0xb7, 0xed, 0x3b, - 0xfc, 0x2b, 0xa9, 0x76, 0xf1, 0x4f, 0x14, 0x7d, 0xdb, - 0x7f, 0xb1, 0x8c, 0x85, 0x43, 0xd0, 0x46, 0x86, 0xe6, - 0xad, 0xc0, 0x20, 0xcf, 0x72, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x8c, 0xda, 0x68, 0xca, 0xf5, 0x7c, 0x12, 0xdd, 0x0a, - 0x2b, 0x62, 0x8f, 0xe8, 0x75, 0xd5, 0xe0, 0xbb, 0xa5, - 0x09, 0x81, 0x41, 0x5a, 0x4a, 0xe2, 0xd5, 0x88, 0x06, - 0xaf, 0x4c, 0x23, 0xf0, 0x59, 0x78, 0xe3, 0x9e, 0x56, - 0x62, 0x69, 0x07, 0x6c, 0xd4, 0x3e, 0x36, 0xea, 0xa1, - 0x02, 0x5e, 0x35, 0x13, 0x95, 0x51, 0x4a, 0xe5, 0x07, - 0x11, 0xb1, 0x87, 0xed, 0xe5, 0xcf, 0xd8, 0x45, 0x8a, - 0x7b, 0x8a, 0x7d, 0x97, 0x88, 0xc2, 0x12, 0x0d, 0x1d, - 0x71, 0xf6, 0x1e, 0xa9, 0x5d, 0x84, 0xa7, 0xff, 0x1e, - 0x04, 0xf5, 0x14, 0xe8, 0x44, 0x8b, 0xa2, 0xea, 0x6b, - 0x95, 0x6a, 0xea, 0xfd, 0xc3, 0xeb, 0xb6, 0xc1, 0xcd, - 0x0c, 0x7b, 0x7e, 0xc7, 0x6b, 0x95, 0x8e, 0xef, 0xb8, - 0x12, 0xec, 0xb3, 0xe8, 0x6b, 0x33, 0xa4, 0xd3, 0xa7, - 0xb2, 0x97, 0x7f, 0x66, 0xb2, 0x14, 0x08, 0x96, 0x62, - 0xd1, 0x4a, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(74, &vec); - - return result; -} - -unsigned int test_75(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xc5, 0x58, 0x92, 0x6a, 0x4d, 0xbb, 0x9f, 0x41, 0xe7, - 0x56, 0x89, 0xd9, 0xc8, 0xae, 0xc8, 0x67, 0x97, 0xc2, - 0x9f, 0x8c, 0x77, 0xe3, 0x56, 0xf0, 0x33, 0x1b, 0xed, - 0x78, 0x8b, 0x76, 0xe9, 0xb7, - }, - { - 0xcf, 0x83, 0xe7, 0x71, 0x58, 0x26, 0xfd, 0x14, 0x89, - 0xcc, 0x30, 0x54, 0xd3, 0xcd, 0x57, 0x37, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xd1, 0x20, 0x7c, 0x7b, 0x91, 0x4f, 0x5e, 0x87, 0x3e, - 0xa0, 0xcf, 0x6f, 0x06, 0xdb, 0xd0, 0x2d, 0x59, 0x49, - 0x4f, 0x6c, 0x8d, 0x4c, 0x9a, 0xef, 0x5a, 0xd1, 0x80, - 0xc9, 0xbb, 0xbe, 0xe2, 0x08, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xd3, 0xa7, 0xd7, 0x8c, 0xfe, 0x76, 0xff, 0x97, 0xbc, - 0x54, 0xf7, 0xf6, 0x94, 0xf7, 0x2f, 0x31, 0x24, 0x41, - 0xd8, 0x60, 0x8d, 0x3c, 0x15, 0x13, 0xfd, 0x28, 0xe9, - 0x47, 0x42, 0xcb, 0x19, 0x68, 0x3a, 0x02, 0x70, 0x83, - 0x9b, 0x02, 0x6c, 0xee, 0x52, 0xe4, 0x92, 0x4d, 0xee, - 0x99, 0x9e, 0xe8, 0xcd, 0x7d, 0xd0, 0x1e, 0xa4, 0x45, - 0xcf, 0x91, 0x00, 0x87, 0x98, 0xb8, 0xed, 0x64, 0xc8, - 0x45, 0x8d, 0x86, 0x78, 0xc3, 0x44, 0xd4, 0xe3, 0xfe, - 0x32, 0x01, 0xc1, 0xaf, 0x2f, 0xae, 0x3b, 0xea, 0x82, - 0xea, 0x3a, 0xf0, 0xcd, 0xac, 0x8e, 0x77, 0xb5, 0xe4, - 0xd7, 0xc2, 0xb0, 0x84, 0xe4, 0x16, 0xe5, 0x32, 0x23, - 0x66, 0xad, 0x13, 0xe3, 0x6b, 0x45, 0x5f, 0x04, 0x7b, - 0xa4, 0x64, 0xcf, 0xf2, 0x87, 0xaf, 0x37, 0x22, 0x97, - 0xc6, 0x8b, 0x51, 0xaa, 0x47, 0x01, 0x90, 0x19, 0x43, - 0xaa, 0xc8, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(75, &vec); - - return result; -} - -unsigned int test_76(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x63, 0x3d, 0x32, 0xe3, 0x00, 0x5f, 0x78, 0x11, 0x47, - 0x23, 0xb3, 0xea, 0x5a, 0xc1, 0x21, 0xba, 0x74, 0xaa, - 0x00, 0xc5, 0x2d, 0x93, 0x96, 0x67, 0xe3, 0x0c, 0x33, - 0x51, 0xb3, 0x85, 0x49, 0xf7, - }, - { - 0x37, 0xaf, 0xff, 0x50, 0x4a, 0x2d, 0x8a, 0xc1, 0x68, - 0xc6, 0x8e, 0x24, 0xd0, 0xfe, 0x66, 0xf6, - }, - { - 0x9f, 0x16, 0x99, 0xc9, 0x9d, 0x60, 0xb0, 0x85, 0xbc, - 0x61, 0xcb, 0x11, 0x0e, 0xf8, 0xab, 0x59, 0x0d, 0x82, - 0xa9, 0x70, 0x02, 0x1c, 0x3c, 0x6a, 0x5d, 0x48, 0x02, - 0x1c, 0x45, 0xde, 0x49, 0x56, - }, - { - 0x3e, 0x33, 0x47, 0xc5, 0x47, 0xf1, 0x7f, 0x4d, 0x0b, - 0x9f, 0x46, 0x40, 0x5a, 0x54, 0xee, 0xdd, 0x7e, 0x98, - 0x0d, 0x06, 0xa2, 0x15, 0xec, 0x15, 0xe8, 0x93, 0x16, - 0xab, 0x74, 0x3b, 0x75, 0x47, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x6e, 0x38, 0xe8, 0x29, 0x62, 0xd7, 0x07, 0xce, 0x9a, - 0x6a, 0xc3, 0x83, 0xa7, 0x38, 0xa7, 0x48, 0xf9, 0x75, - 0xeb, 0x78, 0x56, 0x11, 0xfa, 0xd5, 0xe3, 0xf5, 0xa4, - 0xfe, 0x44, 0xd7, 0xb5, 0x9a, 0x98, 0x13, 0x7a, 0x2b, - 0xcd, 0xc3, 0x5f, 0x9e, 0xe9, 0xa1, 0xe2, 0x1b, 0xb1, - 0x7d, 0xf1, 0x66, 0x5c, 0xd1, 0x39, 0x76, 0x25, 0xa1, - 0x77, 0x24, 0x7e, 0x2e, 0x32, 0x9a, 0x66, 0x01, 0x40, - 0x63, 0x61, 0x41, 0x56, 0x06, 0x10, 0xa3, 0x68, 0xbf, - 0xd4, 0x99, 0xc2, 0xe2, 0x5b, 0xe3, 0x18, 0xaa, 0x4d, - 0xa9, 0xe7, 0xa3, 0x52, 0xd1, 0x15, 0xdb, 0x82, 0x82, - 0xed, 0x8d, 0x79, 0xec, 0xf9, 0xcd, 0x82, 0x03, 0x60, - 0xd3, 0xd2, 0xd1, 0xa5, 0x8a, 0x93, 0xe0, 0x40, 0xf5, - 0x55, 0x48, 0x87, 0xce, 0x6c, 0x98, 0x58, 0xbc, 0x2b, - 0xb1, 0x02, 0x24, 0x99, 0x80, 0xa8, 0x58, 0x49, 0x8a, - 0xbc, 0xda, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(76, &vec); - - return result; -} - -unsigned int test_77(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xcb, 0x20, 0x15, 0x2e, 0x99, 0xd8, 0xca, 0x5e, 0x80, - 0x95, 0xa1, 0x3e, 0x72, 0xe0, 0xc1, 0xbb, 0x9e, 0x6c, - 0xbe, 0xad, 0xbd, 0x0b, 0xf4, 0xe7, 0x0f, 0xc6, 0xfa, - 0x3c, 0x81, 0xec, 0x5d, 0x0f, - }, - { - 0x0a, 0x55, 0xd4, 0x33, 0xd3, 0x74, 0x4a, 0x2f, 0x38, - 0x19, 0x39, 0xbe, 0x85, 0xc9, 0x7a, 0x98, - }, - { - 0xb5, 0xbd, 0x74, 0x29, 0x59, 0x1e, 0x5e, 0x29, 0x14, - 0x53, 0x2a, 0x7d, 0xea, 0x75, 0xff, 0x76, 0xca, 0xa3, - 0x9f, 0x15, 0x27, 0x9c, 0x73, 0x09, 0x2c, 0x2c, 0xac, - 0x3b, 0x0d, 0x28, 0xc1, 0x3b, - }, - { - 0xd0, 0x8c, 0xa9, 0x6d, 0x74, 0x5f, 0x7e, 0x3a, 0x9f, - 0x2a, 0xcb, 0xc1, 0xe8, 0x00, 0xa9, 0x81, 0x95, 0x52, - 0x2a, 0x4f, 0x7c, 0x60, 0x7a, 0xad, 0x62, 0xf3, 0x8b, - 0x1f, 0x63, 0x35, 0x4b, 0xd1, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x03, 0xe8, 0xcd, 0x60, 0x76, 0x82, 0x62, 0xcf, 0x4c, - 0xc2, 0xf2, 0x95, 0x50, 0x6c, 0x24, 0xf0, 0x6f, 0xb3, - 0xfd, 0x3a, 0x88, 0x9c, 0x71, 0x52, 0x14, 0x51, 0xdf, - 0x6f, 0x2e, 0xfa, 0x07, 0x47, 0xff, 0xb8, 0x75, 0x78, - 0xb7, 0x1b, 0xcf, 0xc3, 0x7d, 0x3a, 0x43, 0xf8, 0x5a, - 0xb4, 0xe5, 0xfc, 0x02, 0xd2, 0x1a, 0x90, 0xe8, 0x5a, - 0xf1, 0x8d, 0x6d, 0x75, 0xe9, 0xfa, 0x95, 0xf7, 0xf9, - 0x29, 0x42, 0xa2, 0x93, 0xda, 0x5d, 0x31, 0xa6, 0xb7, - 0x77, 0xf1, 0x10, 0xff, 0x86, 0x27, 0x91, 0x42, 0x8b, - 0xa0, 0x1b, 0x3c, 0x1b, 0x2f, 0xb4, 0xb2, 0x36, 0x63, - 0x18, 0xd2, 0x44, 0xa9, 0x1e, 0xc1, 0x30, 0xf4, 0xc0, - 0xbd, 0xb8, 0xc4, 0x0c, 0xb7, 0xa6, 0x23, 0xe5, 0xed, - 0x02, 0x0b, 0xb3, 0x05, 0xa3, 0x8b, 0x13, 0x47, 0x12, - 0x15, 0x1b, 0x48, 0x91, 0xda, 0x7f, 0xfb, 0x06, 0x91, - 0x2f, 0x4b, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(77, &vec); - - return result; -} - -unsigned int test_78(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xbd, 0xcb, 0xcf, 0x6d, 0x34, 0x75, 0xac, 0x89, 0x03, - 0xdd, 0x32, 0xcb, 0x12, 0x54, 0x36, 0xa6, 0xf4, 0xce, - 0x74, 0x64, 0x49, 0x60, 0x43, 0xa1, 0x80, 0xb2, 0x60, - 0xd2, 0xa0, 0x0e, 0xed, 0xa1, - }, - { - 0x4e, 0x63, 0xef, 0x1d, 0xd0, 0x4d, 0x3e, 0x6c, 0xa8, - 0xa8, 0x09, 0x9d, 0x7e, 0x3d, 0xa0, 0x95, - }, - { - 0xe0, 0xb7, 0x81, 0x6c, 0xae, 0x86, 0x74, 0xb8, 0x73, - 0x08, 0x54, 0x1f, 0xdd, 0x65, 0xc0, 0xf8, 0x11, 0xb7, - 0x80, 0x8f, 0x3f, 0x2f, 0xc1, 0x5f, 0x57, 0x7d, 0x64, - 0x74, 0x8e, 0xe3, 0x6d, 0x4b, - }, - { - 0x04, 0x1d, 0x73, 0x1b, 0x34, 0x97, 0xb4, 0x19, 0x09, - 0xde, 0xec, 0xaf, 0xff, 0x8b, 0x71, 0x16, 0x08, 0x5d, - 0x8e, 0xf2, 0x8c, 0x32, 0xf4, 0x23, 0x3f, 0x6c, 0x66, - 0x0e, 0x77, 0xa9, 0x9b, 0xb6, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xd1, 0x0f, 0x8e, 0x09, 0xba, 0x93, 0x52, 0x69, 0xd8, - 0xc3, 0x87, 0x62, 0xad, 0xca, 0xf2, 0x83, 0x08, 0xd2, - 0x5d, 0xce, 0xcc, 0x19, 0xff, 0xdb, 0xf7, 0x93, 0xa9, - 0xc6, 0x75, 0x85, 0xcb, 0x79, 0x1d, 0xf6, 0x5a, 0x24, - 0xda, 0x8b, 0xa2, 0xb7, 0x79, 0x41, 0xf7, 0x01, 0xde, - 0x86, 0x3b, 0xe3, 0xd6, 0xf3, 0xc9, 0xd1, 0x3f, 0x44, - 0x45, 0x97, 0x19, 0x38, 0x7b, 0x51, 0x36, 0x53, 0x46, - 0x63, 0x86, 0x2b, 0x70, 0xc7, 0xdc, 0xf9, 0x91, 0x31, - 0xde, 0x59, 0x25, 0x30, 0xb3, 0xce, 0xdc, 0x61, 0x68, - 0x98, 0xd3, 0x65, 0x6e, 0x20, 0x64, 0xd8, 0x79, 0x14, - 0x9d, 0xb2, 0x54, 0xd2, 0x6e, 0x72, 0xc5, 0x46, 0x6a, - 0xd5, 0x5b, 0x1a, 0xc6, 0xfe, 0x52, 0x43, 0x86, 0xa0, - 0x99, 0xaa, 0x64, 0x2a, 0xd0, 0x96, 0xa0, 0x93, 0x3f, - 0x92, 0xdb, 0x03, 0xe9, 0x41, 0x70, 0xe0, 0x5d, 0xa5, - 0x00, 0xe5, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(78, &vec); - - return result; -} - -unsigned int test_79(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x0c, 0xf0, 0x73, 0x1c, 0x47, 0xca, 0x73, 0xe8, 0xc4, - 0x29, 0x42, 0xcc, 0x61, 0xf9, 0x98, 0xf5, 0x34, 0x2e, - 0x31, 0x8c, 0xb8, 0xed, 0x3b, 0x18, 0x69, 0x02, 0x0e, - 0x3d, 0xab, 0x1e, 0x12, 0x67, - }, - { - 0x60, 0x4c, 0x64, 0x15, 0x4f, 0x91, 0x4e, 0xd0, 0xcf, - 0x63, 0xc8, 0x61, 0x65, 0x3b, 0x78, 0xd4, - }, - { - 0x30, 0x50, 0xb2, 0xdf, 0x2f, 0x59, 0x76, 0x3e, 0x44, - 0x3c, 0xaa, 0x92, 0x5a, 0x54, 0xde, 0x1e, 0x5c, 0xed, - 0x87, 0x59, 0xb5, 0x54, 0xb5, 0xf0, 0xf6, 0x8c, 0xb0, - 0x1b, 0x41, 0x50, 0xf9, 0x99, - }, - { - 0xed, 0xa0, 0x82, 0xed, 0xfa, 0xf4, 0xf9, 0x76, 0x6d, - 0xe2, 0x9a, 0xe2, 0xcb, 0x93, 0x0f, 0xb1, 0xbc, 0x26, - 0xbd, 0xe6, 0xd1, 0x8a, 0xb1, 0x6f, 0x66, 0xfb, 0xf4, - 0xb0, 0x6d, 0x3e, 0x74, 0x80, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x39, 0xb3, 0xf4, 0x7c, 0x02, 0x4b, 0xc8, 0x4a, 0xad, - 0x80, 0x91, 0x13, 0x6d, 0x34, 0x1e, 0xba, 0x3a, 0x89, - 0xd0, 0x65, 0x77, 0xaa, 0x4f, 0xd3, 0xd2, 0x4f, 0x8b, - 0x7a, 0x5b, 0xe4, 0x28, 0x0f, 0xdf, 0x62, 0x35, 0x34, - 0x90, 0xd5, 0xf6, 0x6c, 0x1a, 0x7d, 0x57, 0xcf, 0x19, - 0x8a, 0x63, 0x37, 0x56, 0xc0, 0x90, 0x71, 0x86, 0xa7, - 0x1a, 0x4f, 0xea, 0x41, 0xc3, 0xfa, 0x42, 0xef, 0xee, - 0xfb, 0x0a, 0xc2, 0x85, 0xea, 0x85, 0x87, 0xf1, 0xa8, - 0xd8, 0xfb, 0xb7, 0x83, 0xae, 0x62, 0x7c, 0x1e, 0x85, - 0x8f, 0xfb, 0xe0, 0x51, 0xd6, 0xb7, 0xa2, 0xa5, 0x18, - 0xa2, 0x4e, 0x71, 0xd5, 0x54, 0xe8, 0xa0, 0xda, 0x3d, - 0x54, 0xbc, 0x69, 0xe4, 0xca, 0x94, 0x0b, 0x7c, 0xa3, - 0x20, 0xc4, 0xbc, 0x44, 0xdf, 0x1e, 0x47, 0x6e, 0x05, - 0xe4, 0x89, 0xa2, 0xc6, 0x68, 0x70, 0x2b, 0x0b, 0xb8, - 0x91, 0x3d, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(79, &vec); - - return result; -} - -unsigned int test_80(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x97, 0x15, 0x5a, 0x62, 0x4e, 0xe4, 0x2b, 0x97, 0x4c, - 0x4b, 0xc9, 0xe0, 0xb9, 0xa7, 0x37, 0xeb, 0x79, 0x0c, - 0xde, 0x2f, 0x0a, 0x93, 0xf8, 0xef, 0x2c, 0x6f, 0xe7, - 0x20, 0x15, 0xc5, 0x27, 0x6b, - }, - { - 0x44, 0x4d, 0xf2, 0xbe, 0xae, 0x4a, 0xe6, 0xe9, 0xa6, - 0x40, 0x41, 0x6f, 0xc3, 0x94, 0x8d, 0xde, - }, - { - 0x62, 0x5c, 0x7e, 0xf0, 0xfa, 0x30, 0xe0, 0xcb, 0x5c, - 0x28, 0xff, 0x3a, 0x23, 0x96, 0x63, 0x93, 0x24, 0x29, - 0x2b, 0x20, 0x06, 0x9e, 0xcb, 0x1c, 0x01, 0x63, 0xd9, - 0x66, 0xf2, 0x52, 0x0e, 0x61, - }, - { - 0x40, 0x1b, 0x91, 0xbb, 0xd7, 0x26, 0xeb, 0x24, 0xeb, - 0x19, 0xb4, 0xf3, 0x62, 0x88, 0x19, 0x2a, 0xe0, 0x71, - 0x35, 0x91, 0x7d, 0xec, 0x75, 0xb7, 0xf7, 0x75, 0x81, - 0x77, 0x76, 0x72, 0x98, 0xb7, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x8b, 0x1c, 0x56, 0xcd, 0x41, 0x5d, 0xdf, 0x12, 0x3b, - 0xc5, 0xbb, 0x32, 0x7f, 0x0e, 0xc4, 0xcf, 0x53, 0xa6, - 0x49, 0x83, 0x1d, 0x7c, 0x09, 0x20, 0xe7, 0x42, 0x03, - 0x3c, 0xe1, 0x83, 0xa4, 0x42, 0x3c, 0x4b, 0x16, 0x2e, - 0xac, 0xa3, 0x15, 0x7c, 0xb1, 0x94, 0xdc, 0xe0, 0x6a, - 0x54, 0x3b, 0xf1, 0x55, 0x16, 0x4c, 0x70, 0x41, 0x75, - 0x0f, 0xb3, 0xaf, 0xc7, 0x78, 0x92, 0xbd, 0x7b, 0x45, - 0x2a, 0x20, 0xb6, 0x48, 0x90, 0x18, 0xe5, 0x36, 0x9f, - 0xce, 0x4e, 0x7e, 0xb7, 0x93, 0x54, 0xea, 0x8a, 0x03, - 0x38, 0x80, 0xa6, 0xdb, 0x0a, 0x79, 0xee, 0x0c, 0x1c, - 0xa1, 0x5d, 0x80, 0x75, 0x12, 0x31, 0x2c, 0x3f, 0x2d, - 0x82, 0xbd, 0xf0, 0x06, 0x83, 0x64, 0xcc, 0x3e, 0xae, - 0x76, 0x3b, 0xe2, 0x4e, 0xdb, 0x39, 0x35, 0x6d, 0xc1, - 0xa6, 0xd1, 0xc5, 0xeb, 0x09, 0x3c, 0xde, 0x4b, 0xf9, - 0xa5, 0x89, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(80, &vec); - - return result; -} - -unsigned int test_81(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x88, 0xe9, 0xbc, 0x0e, 0x56, 0xbb, 0xbf, 0xe8, 0xc0, - 0x7f, 0x31, 0x1b, 0x95, 0x5d, 0x2b, 0x87, 0x7f, 0xe7, - 0x04, 0x7f, 0x3f, 0x85, 0xac, 0x83, 0xf9, 0xda, 0x68, - 0xac, 0x2a, 0xbe, 0x36, 0xe2, - }, - { - 0x2c, 0xf7, 0x59, 0x3a, 0x98, 0x12, 0x25, 0x25, 0xc2, - 0x81, 0xd3, 0xce, 0xc1, 0xe2, 0xb9, 0x4c, - }, - { - 0x0d, 0x28, 0x96, 0x1b, 0x6a, 0xba, 0xd3, 0x01, 0x91, - 0xb2, 0x14, 0x70, 0xba, 0x1e, 0xe0, 0x0d, 0xa1, 0x70, - 0x37, 0x90, 0xdd, 0x8a, 0x15, 0x53, 0x73, 0x97, 0xc7, - 0x3e, 0x80, 0xeb, 0x7f, 0xbc, - }, - { - 0xe3, 0x28, 0x52, 0xb8, 0x1c, 0x80, 0xf3, 0x7d, 0x79, - 0xcf, 0xfd, 0x3c, 0xae, 0x78, 0x59, 0x10, 0xe7, 0x92, - 0x32, 0x81, 0x3d, 0x17, 0x4a, 0x2d, 0x14, 0xf0, 0xbf, - 0x27, 0x5f, 0x31, 0x29, 0x4b, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x4a, 0x6b, 0x13, 0xbd, 0xe6, 0xcb, 0xf8, 0x66, 0xd1, - 0xb6, 0x09, 0x42, 0x48, 0x8c, 0xef, 0x40, 0x86, 0x36, - 0x7f, 0xd4, 0xe2, 0x44, 0x5f, 0x73, 0xed, 0xef, 0x03, - 0x28, 0xf6, 0x94, 0x1d, 0x40, 0x84, 0xa4, 0x46, 0x98, - 0x62, 0x81, 0x2f, 0xf6, 0xe4, 0xd9, 0xe4, 0x19, 0x2e, - 0x29, 0xd5, 0x9d, 0x56, 0x2e, 0x5d, 0xaf, 0xa0, 0xae, - 0x10, 0x94, 0x4f, 0x8b, 0x62, 0xad, 0x15, 0xa8, 0xf4, - 0x83, 0xd6, 0xd1, 0x0e, 0xed, 0x6c, 0x4f, 0xe4, 0x26, - 0x45, 0x58, 0x7b, 0x61, 0x25, 0xd8, 0x63, 0x65, 0x37, - 0x10, 0xbd, 0x6a, 0x21, 0x27, 0x7a, 0xe4, 0x49, 0xb7, - 0xd2, 0xa9, 0x79, 0x78, 0x29, 0x74, 0xa7, 0x31, 0xda, - 0x60, 0x1b, 0x29, 0xbc, 0x8e, 0x31, 0xfa, 0x12, 0x1b, - 0x8b, 0x7e, 0x95, 0xd1, 0xeb, 0x30, 0xa7, 0x5b, 0x3d, - 0x4f, 0xb2, 0x13, 0x1e, 0x17, 0xfd, 0xea, 0xa0, 0x39, - 0x5e, 0xa6, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(81, &vec); - - return result; -} - -unsigned int test_82(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xdf, 0x81, 0x88, 0xfe, 0x2b, 0x7b, 0xc5, 0xed, 0x26, - 0xf7, 0x47, 0xc9, 0x3e, 0xd4, 0x80, 0x24, 0xe3, 0xed, - 0x62, 0x75, 0x30, 0x10, 0x7d, 0x94, 0x90, 0x6b, 0xb2, - 0xde, 0xbd, 0x4f, 0xb9, 0x2b, - }, - { - 0x0d, 0xd7, 0x50, 0xc7, 0x4f, 0x83, 0x63, 0xc1, 0x4c, - 0x17, 0x2b, 0x40, 0x98, 0xf5, 0x20, 0x58, - }, - { - 0x8a, 0x9b, 0xa6, 0xbd, 0xb3, 0x05, 0x9e, 0xc8, 0x8b, - 0xb2, 0x9e, 0x1c, 0x51, 0x60, 0x51, 0xf8, 0xf9, 0x58, - 0xb3, 0xc7, 0x75, 0x1f, 0xb3, 0x7a, 0x61, 0x6e, 0x9d, - 0x4a, 0x6c, 0xf1, 0x7a, 0x79, - }, - { - 0x1b, 0x21, 0x45, 0xc0, 0xeb, 0x75, 0x77, 0x50, 0x30, - 0xd1, 0x68, 0x1c, 0x84, 0x8b, 0x92, 0x49, 0xda, 0xcb, - 0x81, 0x37, 0xa3, 0xa0, 0xfe, 0x26, 0x54, 0x4d, 0x17, - 0xa2, 0x37, 0x4a, 0x51, 0x82, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb9, 0x25, 0xc2, 0x7c, 0x1b, 0x2a, 0x82, 0xe6, 0x96, - 0x9a, 0x90, 0xfe, 0x4e, 0x4b, 0x6f, 0x27, 0xc3, 0x69, - 0xe8, 0x2b, 0x4b, 0x03, 0x47, 0x9a, 0x9a, 0x15, 0x2a, - 0xca, 0x12, 0x88, 0xb2, 0x62, 0x42, 0x0f, 0xaa, 0x6c, - 0x62, 0xda, 0x1f, 0x22, 0x5d, 0xc7, 0xf3, 0x12, 0x5d, - 0x42, 0x88, 0x58, 0x50, 0x78, 0x8b, 0x26, 0x44, 0x10, - 0xc8, 0x14, 0x9e, 0xab, 0xf6, 0xba, 0x16, 0x4c, 0x17, - 0x32, 0xa2, 0xb6, 0x0b, 0x77, 0xa5, 0x25, 0xec, 0x74, - 0x5b, 0xac, 0x6e, 0xda, 0x51, 0xec, 0x7d, 0x88, 0xd1, - 0x1b, 0x40, 0xc2, 0xe1, 0x28, 0x54, 0xd3, 0x92, 0xe7, - 0xc6, 0xaf, 0x2f, 0xff, 0x7a, 0xaf, 0x15, 0x44, 0xab, - 0x30, 0x6a, 0xc3, 0x1b, 0x6d, 0x97, 0x1b, 0x70, 0xa8, - 0x2a, 0x67, 0x2c, 0x81, 0xe9, 0x28, 0x20, 0x4d, 0x04, - 0x96, 0x0e, 0xbf, 0xf5, 0xbf, 0x5e, 0x38, 0xaa, 0x89, - 0x7f, 0x23, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(82, &vec); - - return result; -} - -unsigned int test_83(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x6a, 0xeb, 0x84, 0xcf, 0x5f, 0x72, 0x98, 0x2b, 0xf7, - 0xb1, 0xef, 0x4c, 0xa1, 0x6f, 0x8a, 0x27, 0x96, 0x5c, - 0x35, 0xb2, 0xa5, 0x55, 0x61, 0x94, 0x6c, 0x6d, 0x2c, - 0xf6, 0xa6, 0xf9, 0xe4, 0x1e, - }, - { - 0x82, 0x76, 0x07, 0xb8, 0x06, 0xdf, 0x2c, 0x42, 0x37, - 0x41, 0x20, 0x9b, 0xed, 0x59, 0xb4, 0xeb, - }, - { - 0xc2, 0x53, 0x73, 0xb6, 0x1d, 0x8d, 0x58, 0x2f, 0xc2, - 0x68, 0xcb, 0xd6, 0x49, 0x3a, 0x91, 0x61, 0xee, 0xbe, - 0xde, 0x96, 0xc4, 0x3b, 0x02, 0x95, 0x28, 0x1c, 0xc8, - 0xac, 0x47, 0x38, 0x24, 0xe7, - }, - { - 0x57, 0x54, 0x81, 0x26, 0x38, 0x1e, 0xd8, 0x62, 0x67, - 0x05, 0xd3, 0x53, 0x71, 0x22, 0x80, 0x0c, 0x4c, 0xd9, - 0xef, 0x81, 0x32, 0x04, 0x4d, 0xfd, 0x0f, 0x8d, 0x27, - 0xd5, 0xeb, 0xce, 0x55, 0xd1, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb2, 0x0c, 0x3a, 0xe8, 0x13, 0x3b, 0x87, 0x20, 0x49, - 0x8c, 0x17, 0xfc, 0xa0, 0xb9, 0xa2, 0xf7, 0x04, 0x57, - 0x26, 0xfd, 0xc1, 0x5e, 0x71, 0xa6, 0xd3, 0x9e, 0x18, - 0x95, 0x49, 0xb0, 0x2d, 0x39, 0x92, 0xa7, 0x4b, 0xfa, - 0x9d, 0x68, 0xec, 0xca, 0x5f, 0xf1, 0x71, 0x89, 0x0e, - 0xe5, 0xba, 0xfc, 0x4e, 0x59, 0xbf, 0xc6, 0x62, 0xfd, - 0xb2, 0x45, 0x8e, 0xf2, 0x44, 0xe5, 0x4e, 0x03, 0xfa, - 0x43, 0xa0, 0x61, 0x67, 0x97, 0xbd, 0xca, 0x83, 0xb6, - 0xef, 0x8f, 0x36, 0xda, 0xd2, 0x80, 0xc9, 0xdf, 0xb1, - 0xca, 0x56, 0xd3, 0xaa, 0x5e, 0x2d, 0xa3, 0x2a, 0xaf, - 0xe2, 0xf6, 0x89, 0xf5, 0x1a, 0x43, 0xc7, 0x54, 0x7d, - 0x24, 0xed, 0x94, 0xd0, 0x2a, 0x56, 0x7f, 0x78, 0x55, - 0xaa, 0xaf, 0xc8, 0xb6, 0x94, 0xea, 0x5f, 0x0b, 0xb5, - 0x60, 0x2f, 0x72, 0xda, 0xbf, 0x86, 0x56, 0xe7, 0x43, - 0x58, 0xb2, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(83, &vec); - - return result; -} - -unsigned int test_84(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x49, 0xce, 0xab, 0x47, 0xef, 0x95, 0x58, 0x5a, 0xaa, - 0xeb, 0x98, 0x06, 0x4c, 0x61, 0xe8, 0xa2, 0x89, 0xee, - 0xe5, 0x41, 0x2f, 0x4a, 0xf1, 0xfb, 0x6e, 0x48, 0xa1, - 0x23, 0x58, 0xf9, 0xcf, 0x67, - }, - { - 0xd4, 0x8e, 0x4a, 0x8a, 0x61, 0x2c, 0xac, 0x57, 0xfe, - 0x7b, 0xc1, 0x78, 0x8c, 0x64, 0x83, 0x6b, - }, - { - 0x62, 0x1e, 0x31, 0x3b, 0x13, 0x34, 0x80, 0xd5, 0xc4, - 0x71, 0xba, 0xe8, 0xda, 0x09, 0x7a, 0x03, 0x33, 0xb2, - 0xb2, 0xea, 0x23, 0xf8, 0x3c, 0x1b, 0x10, 0x28, 0x50, - 0xd4, 0x11, 0xd1, 0x51, 0x5c, - }, - { - 0x84, 0x40, 0x7b, 0x20, 0xd0, 0xad, 0xc2, 0x2c, 0x07, - 0xbf, 0x24, 0x94, 0x08, 0x0a, 0xd2, 0x86, 0x93, 0x8b, - 0x21, 0x28, 0xf8, 0x24, 0xda, 0xe3, 0xe4, 0x4d, 0x3c, - 0x71, 0x81, 0x87, 0x02, 0xc0, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xdf, 0xb9, 0xcc, 0xd2, 0x74, 0x93, 0x63, 0xfd, 0x99, - 0x3d, 0xf5, 0xdb, 0x53, 0x82, 0x6d, 0xc3, 0x6a, 0xdf, - 0x4e, 0x04, 0x08, 0x78, 0xf6, 0x85, 0x15, 0x14, 0x46, - 0x6d, 0xd7, 0x21, 0x4b, 0xa7, 0x0d, 0x35, 0xf4, 0x74, - 0xb2, 0x2d, 0x5d, 0x18, 0x0d, 0x71, 0xf8, 0xca, 0x00, - 0x49, 0xfc, 0x90, 0x15, 0x6d, 0x6d, 0x79, 0x67, 0x08, - 0x28, 0x0c, 0xe1, 0xd2, 0x25, 0x18, 0x4b, 0x06, 0xdb, - 0xe3, 0xd7, 0x98, 0xb7, 0xb9, 0x02, 0x85, 0x62, 0xd2, - 0x22, 0xf1, 0x1e, 0xe8, 0xfe, 0xd9, 0xa9, 0x55, 0x87, - 0xa6, 0x53, 0x6e, 0x90, 0x7a, 0xde, 0xe3, 0x10, 0x2b, - 0x2f, 0x3d, 0x92, 0xdb, 0x24, 0x67, 0x37, 0xa9, 0xbc, - 0x71, 0xaa, 0xaa, 0x4f, 0x40, 0xcd, 0xa3, 0x3d, 0x33, - 0xa3, 0x37, 0x9d, 0x2e, 0x8b, 0xfe, 0xd1, 0x76, 0x0e, - 0xc1, 0x28, 0x01, 0xe7, 0x2a, 0x38, 0x4b, 0x74, 0x8f, - 0xfa, 0xf5, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(84, &vec); - - return result; -} - -unsigned int test_85(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xf3, 0x22, 0xb2, 0x58, 0xc6, 0x29, 0x51, 0xd3, 0x7b, - 0xa6, 0x80, 0xab, 0xc4, 0x9a, 0x61, 0x98, 0x3f, 0x3f, - 0xd8, 0x99, 0x73, 0x94, 0x0c, 0x1d, 0x4f, 0x07, 0x65, - 0xc9, 0x5d, 0x0d, 0x70, 0x78, - }, - { - 0x0b, 0x79, 0xd5, 0xbe, 0xfe, 0x42, 0x85, 0xa7, 0x3e, - 0xa4, 0xb4, 0x8e, 0x2b, 0xa1, 0x85, 0xc1, - }, - { - 0x05, 0x32, 0xbc, 0x7e, 0x99, 0x70, 0x90, 0x06, 0xaa, - 0x19, 0x1b, 0x37, 0x9a, 0xce, 0xfa, 0x16, 0x45, 0xc6, - 0x7d, 0x2f, 0x5b, 0x61, 0xf1, 0x3f, 0x36, 0xf8, 0x68, - 0xbc, 0xe4, 0x44, 0xa5, 0x29, - }, - { - 0x2e, 0x4e, 0x16, 0x74, 0x8e, 0xbf, 0x36, 0x59, 0x02, - 0xd9, 0x10, 0xa0, 0x1d, 0x9c, 0xa2, 0x4a, 0xeb, 0x8e, - 0x3e, 0x54, 0x58, 0xed, 0xfd, 0x88, 0xf6, 0xb9, 0x09, - 0xc1, 0xff, 0xc7, 0x46, 0x8c, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x85, 0x5e, 0xe8, 0xe0, 0x06, 0x0c, 0xb8, 0xb4, 0xfc, - 0x56, 0x92, 0x07, 0x3f, 0x62, 0xcc, 0x3e, 0x19, 0xa1, - 0x9b, 0x89, 0xdf, 0x2d, 0xf9, 0x7c, 0x2a, 0x21, 0x87, - 0x9d, 0x74, 0x57, 0x1d, 0x33, 0x62, 0xec, 0xdd, 0x1a, - 0xd9, 0xe4, 0x64, 0x58, 0xe3, 0x5f, 0x5f, 0x35, 0x80, - 0xe7, 0x66, 0x06, 0x7e, 0x3d, 0x8f, 0x72, 0x58, 0xd8, - 0xee, 0xcb, 0x17, 0xa0, 0x75, 0xf7, 0xdc, 0x75, 0x23, - 0xa4, 0x78, 0xb5, 0xd1, 0x77, 0xf6, 0x73, 0x65, 0x9e, - 0x38, 0x87, 0x67, 0x0e, 0xdf, 0x6e, 0x8f, 0x0f, 0xf7, - 0x5e, 0x26, 0xd4, 0x1a, 0xdf, 0xee, 0x6a, 0xe2, 0x8f, - 0xbe, 0x5c, 0x2e, 0x24, 0x7e, 0x10, 0x36, 0x24, 0x1e, - 0x1f, 0x5b, 0xf3, 0x16, 0xfb, 0xd9, 0xad, 0xb3, 0xc1, - 0x59, 0x30, 0xe8, 0x42, 0x5a, 0xe7, 0x50, 0x24, 0xc2, - 0x77, 0x02, 0x99, 0x72, 0xf0, 0xd6, 0xc6, 0x45, 0xb4, - 0xa1, 0x17, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(85, &vec); - - return result; -} - -unsigned int test_86(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x33, 0xa6, 0x8b, 0xad, 0x0f, 0xa3, 0x44, 0xfd, 0x6a, - 0x46, 0xf7, 0x5f, 0x04, 0x28, 0xcb, 0xdf, 0x27, 0x11, - 0xd3, 0xf0, 0xc7, 0xef, 0x0f, 0x6a, 0x39, 0x50, 0x73, - 0xed, 0x70, 0x89, 0x7b, 0xaa, - }, - { - 0x18, 0x92, 0x79, 0x9f, 0xeb, 0x41, 0x0b, 0x9d, 0xd6, - 0xe6, 0x9b, 0xf4, 0x40, 0x3e, 0xfc, 0x20, - }, - { - 0x67, 0x7e, 0xcc, 0xd0, 0xc6, 0xe0, 0x1a, 0x26, 0x3f, - 0xc7, 0xd2, 0xe2, 0xc2, 0xd0, 0xc6, 0x29, 0x4a, 0x30, - 0x7b, 0xf3, 0xee, 0x1b, 0xa3, 0x53, 0x72, 0xc2, 0x16, - 0x6d, 0x04, 0x04, 0x29, 0x72, - }, - { - 0xa6, 0x44, 0x7d, 0xdb, 0xfa, 0xf7, 0xea, 0x07, 0xe1, - 0x0a, 0x95, 0xdb, 0x1f, 0xae, 0x3e, 0xa8, 0x6d, 0x10, - 0x3c, 0xfc, 0xdd, 0xa5, 0x50, 0xf1, 0x10, 0x1b, 0x02, - 0xdd, 0xc5, 0xac, 0x46, 0x0c, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x22, 0x91, 0x43, 0x3d, 0xf6, 0xfa, 0x57, 0x25, 0x89, - 0xc3, 0xa6, 0x51, 0x3f, 0x38, 0x1a, 0xf4, 0x21, 0x27, - 0x87, 0x49, 0x9b, 0xad, 0x08, 0x64, 0xcb, 0x36, 0xd0, - 0xeb, 0xee, 0x3b, 0x56, 0xe3, 0x40, 0xab, 0x7b, 0xdb, - 0x9f, 0x3b, 0x0e, 0x0d, 0x61, 0xdb, 0xa6, 0xb0, 0x14, - 0x35, 0x77, 0x21, 0x08, 0xbd, 0x89, 0x21, 0xcf, 0xc0, - 0x0b, 0xeb, 0xd2, 0x07, 0x66, 0x94, 0x41, 0x84, 0x04, - 0x6a, 0x84, 0xf5, 0x6c, 0x43, 0x19, 0x69, 0x58, 0x80, - 0xd2, 0x43, 0x45, 0xac, 0xc6, 0x4f, 0x85, 0x79, 0xd3, - 0xca, 0x30, 0xc1, 0xf5, 0x4e, 0x41, 0x1c, 0xff, 0x51, - 0x5e, 0xd7, 0x2a, 0x8f, 0xca, 0xa5, 0xd2, 0xa1, 0x5f, - 0xc2, 0x52, 0x6d, 0x5d, 0x11, 0x6f, 0xa1, 0x78, 0x3f, - 0xff, 0x6d, 0x70, 0xd1, 0x56, 0xb6, 0xe3, 0x3b, 0xf3, - 0x1d, 0x21, 0x0d, 0x3e, 0xe7, 0x9c, 0x44, 0xb7, 0x3e, - 0xaa, 0x7e, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(86, &vec); - - return result; -} - -unsigned int test_87(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x31, 0x36, 0xf4, 0x42, 0xdd, 0x3c, 0xdc, 0x24, 0x95, - 0x38, 0xbd, 0x5f, 0x0e, 0xb3, 0x55, 0xc7, 0x67, 0x0a, - 0xdd, 0x64, 0x27, 0xd1, 0xe1, 0x80, 0x31, 0x7b, 0x7d, - 0x64, 0x96, 0x78, 0x0b, 0x83, - }, - { - 0x83, 0x65, 0x57, 0x29, 0x4d, 0x84, 0x4f, 0x21, 0x80, - 0xd3, 0x7a, 0xc0, 0x57, 0xcb, 0xb8, 0x69, - }, - { - 0x48, 0x34, 0xc6, 0x8e, 0x72, 0xe2, 0x5a, 0xce, 0xc7, - 0xce, 0x57, 0x7e, 0xfd, 0x4d, 0xc9, 0x74, 0x6b, 0x8a, - 0xbb, 0x89, 0xa4, 0x46, 0xad, 0x39, 0xdb, 0x70, 0x42, - 0xce, 0xb6, 0xda, 0x9c, 0xde, - }, - { - 0xc6, 0x6a, 0x48, 0x65, 0xfb, 0x9b, 0x0f, 0x86, 0xf0, - 0x69, 0x6d, 0x4a, 0x2e, 0x1e, 0xa5, 0xf7, 0xa3, 0x93, - 0x15, 0x7d, 0x09, 0x69, 0x29, 0xdf, 0xf4, 0x5f, 0x64, - 0xe7, 0x45, 0xd0, 0x6a, 0x3c, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xed, 0xb8, 0x11, 0x68, 0x13, 0x0e, 0xc4, 0x33, 0x01, - 0x6e, 0x07, 0x42, 0x93, 0x74, 0x07, 0x31, 0x37, 0xe0, - 0xec, 0x1d, 0x14, 0x64, 0xe6, 0x3a, 0xd2, 0xdd, 0x24, - 0xbf, 0xe5, 0xcb, 0x76, 0x3a, 0xa8, 0x79, 0x3d, 0x8f, - 0xb3, 0x2e, 0xb2, 0xc7, 0x0e, 0xb6, 0x70, 0x53, 0x7f, - 0xce, 0x9f, 0x7e, 0x53, 0xc4, 0x2d, 0x4b, 0xd8, 0x5d, - 0xbe, 0x0b, 0x2f, 0x50, 0xf4, 0x40, 0xcb, 0x13, 0x2c, - 0xe6, 0xcc, 0x46, 0xfa, 0xe1, 0x08, 0x69, 0xda, 0x2a, - 0xe6, 0xab, 0x8c, 0x10, 0xc3, 0xa1, 0xff, 0x2e, 0x45, - 0x29, 0xe4, 0x6c, 0x8f, 0x84, 0x3e, 0x0c, 0xf9, 0x31, - 0xb7, 0x70, 0xec, 0xf0, 0xd0, 0x63, 0x9f, 0x1a, 0x5d, - 0x93, 0x94, 0x29, 0x96, 0x01, 0x71, 0x4c, 0xdd, 0xab, - 0xea, 0x3d, 0x00, 0x4d, 0x24, 0xda, 0x00, 0x56, 0x66, - 0x51, 0x48, 0x48, 0xd2, 0xfe, 0x0a, 0x1c, 0x07, 0xc7, - 0x8f, 0x11, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(87, &vec); - - return result; -} - -unsigned int test_88(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x2e, 0x9b, 0xeb, 0x64, 0xfb, 0x0f, 0xd6, 0xfe, 0xa5, - 0x9b, 0x58, 0x73, 0xdc, 0x0a, 0x94, 0x6e, 0x8a, 0xf6, - 0x8a, 0xfb, 0xf8, 0xf1, 0x63, 0x58, 0x12, 0x4b, 0x4a, - 0x56, 0x79, 0xa1, 0xa8, 0xdb, - }, - { - 0x05, 0xfa, 0xc5, 0x86, 0xd8, 0x8f, 0x7d, 0xdd, 0x6f, - 0xd8, 0x49, 0xe5, 0xbd, 0x93, 0x32, 0xe1, - }, - { - 0x81, 0xa6, 0x57, 0xd8, 0x96, 0xe2, 0x94, 0xdb, 0x49, - 0x77, 0xb5, 0x26, 0x53, 0xb8, 0xea, 0x29, 0xc8, 0x9e, - 0xb2, 0xcd, 0xfd, 0xd9, 0x95, 0x67, 0x6c, 0x81, 0x35, - 0xba, 0x6e, 0x8d, 0xd3, 0x1f, - }, - { - 0x0c, 0xc8, 0x1f, 0x75, 0x7d, 0x01, 0x42, 0x73, 0x66, - 0xbb, 0x76, 0x4b, 0x40, 0x37, 0x8c, 0x10, 0x24, 0xcf, - 0x88, 0x13, 0x6b, 0xcc, 0x36, 0x24, 0x3c, 0xdf, 0x11, - 0x1c, 0x28, 0xd9, 0x76, 0xf8, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xde, 0x24, 0x72, 0x30, 0xbc, 0x5e, 0x80, 0x5a, 0x67, - 0x88, 0xa4, 0xce, 0x2b, 0xdd, 0x42, 0x87, 0x04, 0xc0, - 0x76, 0x68, 0x63, 0x1f, 0x85, 0x91, 0x78, 0x12, 0xcb, - 0x04, 0xef, 0x3b, 0x76, 0x92, 0xe7, 0x26, 0x3a, 0x43, - 0x3a, 0x66, 0xcb, 0x78, 0x50, 0x4a, 0xdb, 0x04, 0xf5, - 0xb6, 0x03, 0x95, 0x68, 0x47, 0x83, 0xf4, 0x1a, 0x3c, - 0x93, 0x7a, 0xd0, 0xe1, 0x0c, 0xb6, 0x9c, 0x4e, 0x80, - 0x95, 0x47, 0x7f, 0xf4, 0x37, 0x8b, 0x8a, 0x3a, 0xe0, - 0x6c, 0x9a, 0x03, 0xe9, 0x85, 0xbf, 0x14, 0xb9, 0x99, - 0xd2, 0x76, 0xa4, 0x5c, 0x27, 0x76, 0x2b, 0x4c, 0x09, - 0xc5, 0x38, 0x72, 0xfe, 0xfc, 0xff, 0xf0, 0x34, 0x96, - 0xc1, 0xc8, 0x83, 0x3d, 0xaa, 0x4b, 0xb6, 0x09, 0x28, - 0xb4, 0x4a, 0x6c, 0x63, 0xaa, 0x44, 0x04, 0x03, 0x51, - 0x53, 0x65, 0x90, 0x7e, 0xd4, 0xd6, 0xcc, 0x87, 0x87, - 0xb8, 0x92, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(88, &vec); - - return result; -} - -unsigned int test_89(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x51, 0x15, 0xf6, 0x8f, 0xf0, 0x85, 0x32, 0xab, 0xc3, - 0x07, 0x7b, 0x0a, 0x49, 0xf9, 0xeb, 0x9c, 0x29, 0x02, - 0xfa, 0xb5, 0x23, 0x43, 0x9f, 0xb6, 0x89, 0x15, 0x7f, - 0xf9, 0xf0, 0x39, 0x97, 0xaf, - }, - { - 0x41, 0xdf, 0x1a, 0xc0, 0x1f, 0x8c, 0xa0, 0x29, 0xff, - 0xf6, 0x03, 0x4d, 0x57, 0xd0, 0x93, 0xd0, - }, - { - 0x1e, 0x92, 0xf8, 0xea, 0xb8, 0x16, 0x68, 0x25, 0x91, - 0x5a, 0x56, 0xbb, 0xb0, 0x0c, 0x4b, 0x25, 0x77, 0xcd, - 0xc9, 0x9c, 0x36, 0x12, 0x62, 0x69, 0xfc, 0xfe, 0xd6, - 0x82, 0xb1, 0x2b, 0x06, 0xed, - }, - { - 0x0b, 0x24, 0x5e, 0x6e, 0x6e, 0xd2, 0x3e, 0x17, 0x1a, - 0x02, 0xd5, 0x2f, 0x1f, 0x1a, 0x52, 0x0e, 0xd5, 0x0d, - 0x67, 0xae, 0xdc, 0xf9, 0x99, 0xa9, 0x06, 0x3e, 0xae, - 0x51, 0xb3, 0xb3, 0x3e, 0x08, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x5b, 0x1e, 0xde, 0x46, 0xc5, 0x8a, 0x3d, 0x79, 0xcf, - 0x63, 0x05, 0xae, 0x59, 0xfc, 0xde, 0xdd, 0x1f, 0x88, - 0xf1, 0xfe, 0x35, 0x14, 0xf6, 0xb8, 0x16, 0x67, 0xeb, - 0x65, 0x91, 0x72, 0xa1, 0x20, 0xb7, 0x0d, 0x12, 0x8d, - 0x23, 0xcd, 0xcf, 0x2a, 0xdd, 0xb9, 0xb9, 0x7c, 0xda, - 0x13, 0x7a, 0xe3, 0x02, 0xbc, 0x99, 0x3e, 0x9e, 0x40, - 0x5b, 0x50, 0x85, 0xd8, 0xa0, 0xdf, 0x2e, 0x4b, 0x9e, - 0x0f, 0x4a, 0xcc, 0x64, 0x4a, 0x0b, 0xd4, 0x9c, 0xf6, - 0x0d, 0xd2, 0x17, 0x0c, 0x0e, 0xab, 0x8d, 0xf5, 0x37, - 0x39, 0x78, 0xd8, 0x9e, 0x41, 0x5f, 0xf6, 0x89, 0x10, - 0x80, 0xae, 0xed, 0xed, 0xe6, 0x26, 0x6e, 0xf1, 0x22, - 0xd4, 0x48, 0xa0, 0xb2, 0x05, 0x74, 0xcc, 0x51, 0x1c, - 0x3b, 0xdf, 0x35, 0x38, 0x4f, 0x58, 0x87, 0x8a, 0x04, - 0xeb, 0xcc, 0x86, 0x2f, 0x2f, 0x1d, 0xd3, 0xc9, 0x3a, - 0x10, 0x1a, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(89, &vec); - - return result; -} - -unsigned int test_90(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xdc, 0x59, 0x04, 0xbd, 0x75, 0x2c, 0x66, 0xe0, 0x25, - 0x07, 0x26, 0x22, 0x82, 0x4e, 0x4e, 0x78, 0x9d, 0xfa, - 0xfe, 0xdc, 0xba, 0xad, 0x33, 0x56, 0xa3, 0x44, 0x95, - 0x3e, 0x00, 0x2f, 0xf8, 0x45, - }, - { - 0x1a, 0xa5, 0x63, 0x88, 0x3b, 0xba, 0x44, 0x4c, 0x88, - 0x50, 0x0e, 0xcf, 0xcc, 0xa2, 0xaf, 0x94, - }, - { - 0xab, 0x75, 0x4f, 0x51, 0xc0, 0x3f, 0x29, 0xeb, 0x77, - 0x03, 0xca, 0x5e, 0x4c, 0x8b, 0x10, 0xe1, 0x68, 0x49, - 0x4a, 0x1f, 0x09, 0xb5, 0x44, 0x17, 0x5b, 0xd8, 0x7b, - 0x68, 0x7b, 0xf6, 0x9f, 0x7d, - }, - { - 0xbb, 0xba, 0x28, 0x0c, 0x3e, 0x22, 0x07, 0x21, 0x2f, - 0x18, 0xf7, 0x8d, 0xba, 0x28, 0x62, 0x92, 0x0c, 0x2e, - 0x1b, 0x69, 0xb8, 0xc9, 0x53, 0x1d, 0xcf, 0x8a, 0x5c, - 0x98, 0x1b, 0xf4, 0x38, 0x65, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x2f, 0x7d, 0x00, 0x53, 0xb5, 0x08, 0x3a, 0xe0, 0x49, - 0x52, 0x4f, 0x18, 0xa2, 0x5d, 0x07, 0x83, 0xdb, 0xff, - 0xd2, 0xe5, 0x31, 0xf6, 0x73, 0xf8, 0x7b, 0xbc, 0x28, - 0x71, 0xc0, 0xc4, 0xbf, 0xcc, 0xbe, 0xb5, 0x44, 0xa0, - 0x9d, 0xc2, 0x08, 0xcf, 0xc7, 0x58, 0x2b, 0x48, 0x84, - 0xc9, 0x94, 0xbf, 0x84, 0xaa, 0xed, 0x1b, 0x55, 0xcd, - 0x88, 0xe9, 0x56, 0x43, 0x02, 0x08, 0x8c, 0xb5, 0x49, - 0x92, 0xc4, 0x00, 0x26, 0xca, 0xcd, 0xd0, 0x28, 0x31, - 0x92, 0x6d, 0x11, 0xbf, 0x19, 0x94, 0xe0, 0x8e, 0xf2, - 0xe9, 0x40, 0xf1, 0xa7, 0xac, 0xc1, 0xcb, 0x3b, 0xdd, - 0x4a, 0x3a, 0xfb, 0x2e, 0xe3, 0xa7, 0xde, 0xfe, 0xfb, - 0x6b, 0xa8, 0x7a, 0x5e, 0xf1, 0x82, 0x8c, 0x84, 0x02, - 0x86, 0x63, 0x1c, 0xf1, 0xc8, 0x84, 0x22, 0xba, 0x90, - 0xe3, 0x95, 0x4b, 0x42, 0x1b, 0x0a, 0x86, 0x9a, 0x9f, - 0xde, 0xe1, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(90, &vec); - - return result; -} - -unsigned int test_91(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xea, 0x28, 0x92, 0x6c, 0xd5, 0xdf, 0x4f, 0xef, 0xd5, - 0x72, 0xc9, 0x10, 0x3d, 0x87, 0xff, 0xb0, 0x4f, 0x59, - 0x9d, 0xa9, 0x5e, 0x1e, 0x6f, 0xec, 0xb8, 0x4f, 0x53, - 0xf7, 0x3f, 0xd0, 0x0d, 0x6c, - }, - { - 0xcb, 0x40, 0xe1, 0x66, 0x55, 0xb9, 0xa2, 0xc7, 0x1e, - 0x8e, 0x36, 0x77, 0xb9, 0xea, 0x6c, 0x6f, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x3d, 0x2d, 0x1d, 0xb8, 0x8b, 0x84, 0x62, 0x78, 0x7a, - 0x55, 0x76, 0xc9, 0x5f, 0xd6, 0x60, 0x73, 0x4f, 0xb6, - 0x81, 0xf8, 0x94, 0xe8, 0xef, 0xc4, 0x7e, 0x3b, 0xe3, - 0xbf, 0xc3, 0x09, 0x8e, 0x40, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xe9, 0x29, 0xc6, 0xe7, 0x49, 0xc5, 0x17, 0x50, 0x31, - 0xdc, 0xc9, 0x26, 0xbc, 0xe8, 0xd5, 0x29, 0x14, 0x7b, - 0x5e, 0x94, 0x0f, 0x61, 0xd0, 0xba, 0x1f, 0x02, 0x83, - 0x1c, 0x80, 0xc2, 0x7a, 0x23, 0xcd, 0x4b, 0x5f, 0xfb, - 0x50, 0x7c, 0x7d, 0x09, 0xa7, 0x7e, 0x4c, 0x84, 0x27, - 0xe2, 0x90, 0x10, 0xcf, 0x1c, 0x80, 0x21, 0xa8, 0x0c, - 0xa2, 0x95, 0x04, 0xca, 0xa3, 0x50, 0xa2, 0x7d, 0x6c, - 0xa4, 0x55, 0x4f, 0xe4, 0xd8, 0xb0, 0x23, 0x55, 0x54, - 0xf2, 0x51, 0xa5, 0x9e, 0xc6, 0x72, 0x9d, 0x80, 0x2b, - 0x47, 0x30, 0x83, 0xb0, 0xbd, 0x6c, 0xa8, 0x3f, 0x6d, - 0x94, 0x5b, 0x3d, 0x1d, 0xe2, 0xb7, 0x06, 0xbd, 0xcc, - 0x3b, 0x50, 0xdd, 0xef, 0x57, 0x84, 0x7f, 0xff, 0x88, - 0xa4, 0x49, 0x85, 0x86, 0xca, 0x6a, 0xfe, 0x65, 0xe7, - 0x6c, 0x2d, 0x97, 0xf8, 0x7d, 0xde, 0xa6, 0x6f, 0x55, - 0x63, 0xe3, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(91, &vec); - - return result; -} - -unsigned int test_92(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xbc, 0x3c, 0x34, 0x69, 0x28, 0x92, 0x91, 0x69, 0xc7, - 0xa0, 0x0c, 0x6f, 0x53, 0x2f, 0x7e, 0xb1, 0xc4, 0xa7, - 0x7d, 0x42, 0x19, 0x3b, 0x65, 0x69, 0x7b, 0xdd, 0xe5, - 0xfe, 0x59, 0xae, 0x45, 0x20, - }, - { - 0x1b, 0x2b, 0xa3, 0x3d, 0xa4, 0x9d, 0x3f, 0x6c, 0xf8, - 0x40, 0x39, 0xcd, 0x99, 0xcc, 0xe5, 0x0f, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb4, 0x25, 0x4a, 0xab, 0x62, 0xc4, 0x15, 0xd8, 0x32, - 0x3d, 0x55, 0x6a, 0xec, 0xa6, 0x14, 0x17, 0xb4, 0x1b, - 0x09, 0x04, 0x65, 0x48, 0x0d, 0xb8, 0xfb, 0x86, 0x4f, - 0x57, 0x8f, 0x56, 0x7b, 0x3d, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x26, 0x02, 0xfc, 0xc0, 0xfc, 0xdb, 0x71, 0x04, 0x6d, - 0xa4, 0x22, 0x6e, 0x12, 0x77, 0xd5, 0xdf, 0x89, 0x22, - 0x54, 0x73, 0xe4, 0x56, 0x4f, 0x04, 0x7e, 0x60, 0x61, - 0x0d, 0x98, 0x1a, 0x18, 0xe2, 0xb4, 0x4d, 0x79, 0xa9, - 0x3c, 0xd8, 0x64, 0xb8, 0x0f, 0xd3, 0x77, 0x68, 0x5f, - 0xb4, 0x19, 0x8e, 0xce, 0x5b, 0x22, 0x11, 0xae, 0xba, - 0x57, 0xff, 0x49, 0xfd, 0xb6, 0x12, 0x82, 0x62, 0xe2, - 0x83, 0x6e, 0x7e, 0x81, 0x66, 0xf3, 0xc3, 0xd5, 0xa9, - 0x3c, 0x68, 0x6a, 0x9b, 0x70, 0xaa, 0x73, 0x9c, 0x66, - 0xf8, 0x5f, 0x84, 0xc4, 0x4c, 0x31, 0x46, 0x62, 0xd7, - 0xaf, 0x17, 0xad, 0x62, 0x5e, 0x55, 0xb6, 0xb4, 0x80, - 0x1f, 0x0d, 0xda, 0xd8, 0xe6, 0x36, 0x85, 0x4d, 0x22, - 0x8f, 0x01, 0xba, 0x8f, 0x2f, 0x81, 0x20, 0x76, 0x20, - 0x52, 0xd2, 0x89, 0x48, 0x19, 0xa9, 0xfb, 0xc7, 0x6d, - 0x6e, 0x6f, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(92, &vec); - - return result; -} - -unsigned int test_93(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x0b, 0xa0, 0x38, 0xbd, 0xb7, 0xad, 0x7b, 0xbe, 0x77, - 0xa6, 0xc7, 0xda, 0xa3, 0x3a, 0x2b, 0xdf, 0xd9, 0xa1, - 0xa5, 0xf3, 0x1c, 0xd2, 0xe7, 0x53, 0x77, 0xc7, 0x78, - 0xf4, 0x92, 0xf5, 0xb3, 0xcb, - }, - { - 0x17, 0xa1, 0x34, 0x23, 0x4a, 0x30, 0xe0, 0x91, 0x70, - 0x89, 0x9c, 0x11, 0x5b, 0x43, 0xca, 0x16, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xdb, 0x02, 0x0e, 0x00, 0xba, 0xce, 0x41, 0x7b, 0xa7, - 0x68, 0x7e, 0x82, 0x9c, 0x1f, 0xfc, 0x91, 0xd2, 0x2e, - 0xf9, 0x3b, 0x27, 0xbf, 0xe1, 0x10, 0x77, 0x32, 0xcf, - 0xe0, 0x82, 0xa0, 0x5c, 0xf6, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x01, 0x79, 0x2f, 0x59, 0xd0, 0xa6, 0x3d, 0xef, 0xd8, - 0x7d, 0x13, 0x18, 0x8b, 0x1a, 0xec, 0xa9, 0x8c, 0x03, - 0xb1, 0x1b, 0x7d, 0xd6, 0x69, 0x83, 0x28, 0x17, 0x2d, - 0xfb, 0x65, 0xcc, 0xb6, 0x95, 0xa1, 0xba, 0xa5, 0x8e, - 0x44, 0xfd, 0x75, 0x23, 0xfd, 0x17, 0x6d, 0x27, 0x06, - 0x64, 0x33, 0x7e, 0x59, 0x8a, 0xa4, 0x53, 0x64, 0x3c, - 0xe3, 0xc6, 0xeb, 0xad, 0xed, 0xec, 0x63, 0x11, 0xe2, - 0xe1, 0xa6, 0xed, 0x22, 0x52, 0x47, 0x74, 0x01, 0x04, - 0x12, 0x53, 0xd3, 0xaf, 0xba, 0xda, 0xc0, 0x6e, 0x4d, - 0x06, 0xf4, 0x6d, 0xc3, 0xd7, 0xac, 0xe2, 0x87, 0xee, - 0x3e, 0x23, 0x28, 0x6b, 0x28, 0x85, 0x2e, 0xe0, 0xcf, - 0x1e, 0x7a, 0xb3, 0xad, 0xb0, 0xff, 0x10, 0x07, 0xd0, - 0x77, 0x16, 0xb0, 0x9c, 0x22, 0xeb, 0x13, 0x80, 0xbb, - 0xd0, 0xe8, 0xda, 0xc4, 0x82, 0xdf, 0x48, 0x0d, 0x41, - 0x58, 0x1d, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(93, &vec); - - return result; -} - -unsigned int test_94(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x2b, 0x37, 0xc7, 0x0c, 0x56, 0xa2, 0xa1, 0xc3, 0xd5, - 0x15, 0x0e, 0xdc, 0x4c, 0x31, 0x80, 0x7e, 0x17, 0x97, - 0x3f, 0x4a, 0xfd, 0x85, 0x32, 0x18, 0xe9, 0x94, 0x03, - 0xd8, 0xdd, 0x9f, 0x19, 0x5f, - }, - { - 0xa5, 0x11, 0x0c, 0x3a, 0x0f, 0x45, 0xba, 0x13, 0xb8, - 0xea, 0x3f, 0x77, 0xf3, 0x33, 0x58, 0x49, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x14, 0x50, 0xbb, 0xf9, 0xf6, 0xb6, 0x83, 0x30, 0xfa, - 0x6c, 0x3e, 0xeb, 0x20, 0x18, 0x5e, 0xcb, 0xb3, 0x0c, - 0x4c, 0xcb, 0x4b, 0x7b, 0x5e, 0xe3, 0x27, 0x12, 0x63, - 0xa6, 0x43, 0xd4, 0xf3, 0xe9, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x57, 0x14, 0xe0, 0x8e, 0xcb, 0x34, 0xe5, 0x1c, 0x1b, - 0x5b, 0x91, 0x40, 0x5c, 0x81, 0x2e, 0x80, 0x10, 0x72, - 0x9b, 0x69, 0x95, 0xb6, 0xcc, 0x90, 0x14, 0x80, 0x9c, - 0x47, 0xc3, 0xb6, 0xba, 0xf1, 0x10, 0x13, 0x45, 0x75, - 0x14, 0x6c, 0x6b, 0xb4, 0x3d, 0x20, 0xfe, 0x16, 0x38, - 0x6d, 0x10, 0x05, 0xb5, 0x64, 0x1b, 0xdc, 0x12, 0xb6, - 0x45, 0x4f, 0x3b, 0xb7, 0x45, 0x88, 0xb6, 0x16, 0xc6, - 0x54, 0xbd, 0xca, 0x84, 0xf0, 0x71, 0x36, 0x4e, 0xfd, - 0x8d, 0x1e, 0xe6, 0x66, 0xcd, 0x60, 0xe4, 0xe2, 0xa8, - 0xa3, 0xde, 0x99, 0xe3, 0xf5, 0x6a, 0x72, 0x71, 0x4d, - 0xb0, 0x4f, 0x15, 0xaa, 0x03, 0x76, 0xac, 0xa8, 0xb1, - 0x2d, 0x50, 0x31, 0x8c, 0x12, 0x8e, 0x1f, 0x4c, 0xe2, - 0x58, 0x40, 0x09, 0xed, 0x4d, 0x7e, 0x57, 0x54, 0x4a, - 0xba, 0x9d, 0x63, 0x12, 0x69, 0xef, 0xf9, 0x95, 0x31, - 0x99, 0x23, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(94, &vec); - - return result; -} - -unsigned int test_95(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xab, 0x79, 0xf1, 0xff, 0x8a, 0x69, 0xc7, 0xf7, 0xeb, - 0x33, 0xe5, 0x7f, 0x03, 0xc5, 0xfd, 0x84, 0x58, 0xc0, - 0xaf, 0xa9, 0xd2, 0x73, 0x88, 0xb7, 0x84, 0x20, 0xa1, - 0xac, 0x8d, 0x98, 0xbe, 0x68, - }, - { - 0xb3, 0x6b, 0x72, 0xa0, 0x4b, 0xbd, 0xd2, 0x85, 0x96, - 0x8d, 0x73, 0x05, 0xd3, 0x56, 0xf8, 0xff, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x5c, 0xe8, 0x78, 0x3b, 0x45, 0x3b, 0xa8, 0x56, 0x7e, - 0x7b, 0x6d, 0x7a, 0x63, 0xac, 0xe5, 0xb4, 0xea, 0xf8, - 0x75, 0x62, 0x42, 0x0e, 0x72, 0x9f, 0xae, 0x94, 0x39, - 0xce, 0x3a, 0x68, 0xdc, 0x86, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x9d, 0x10, 0x40, 0x4b, 0x95, 0x2e, 0x37, 0xc1, 0xd7, - 0x00, 0x7b, 0xea, 0xb7, 0xf8, 0xf1, 0xfa, 0xf2, 0x36, - 0x17, 0x00, 0xf1, 0x38, 0x8b, 0xeb, 0xfa, 0x83, 0xd8, - 0x57, 0xac, 0xbd, 0x65, 0x20, 0x94, 0x7a, 0x4a, 0x06, - 0x9f, 0x80, 0x27, 0x8d, 0xae, 0x1d, 0x5a, 0x8e, 0xef, - 0xf9, 0xd6, 0x9f, 0x63, 0x30, 0x18, 0x31, 0x0e, 0x2a, - 0x16, 0xac, 0xb9, 0x08, 0xb3, 0xb0, 0x29, 0xb5, 0xbb, - 0xef, 0x71, 0xf2, 0xa0, 0x59, 0x70, 0xf5, 0x44, 0xad, - 0xcf, 0xa6, 0xe7, 0x07, 0x79, 0x9f, 0xc1, 0xe6, 0xb7, - 0x8b, 0x96, 0xea, 0x1a, 0x57, 0x4f, 0x34, 0xd4, 0x49, - 0x94, 0xe6, 0x8d, 0x1c, 0x40, 0xbc, 0x2f, 0x39, 0x7a, - 0xe1, 0xa4, 0x87, 0x28, 0xa9, 0x2b, 0x8b, 0x4d, 0x46, - 0xe3, 0x47, 0x22, 0xdd, 0xf2, 0x4d, 0xd3, 0xa0, 0x35, - 0x26, 0x2e, 0x90, 0xc5, 0xbf, 0xfe, 0x04, 0x89, 0x6b, - 0x56, 0x58, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(95, &vec); - - return result; -} - -unsigned int test_96(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x05, 0xfa, 0xe5, 0xa2, 0x08, 0x03, 0xa1, 0x44, 0x21, - 0x11, 0xac, 0x0b, 0xd1, 0x81, 0x01, 0x86, 0x31, 0x9d, - 0x72, 0x1d, 0x29, 0x46, 0xec, 0xa2, 0x64, 0xfb, 0x31, - 0xac, 0x8d, 0x8c, 0xbd, 0xa8, - }, - { - 0x97, 0xc4, 0x1c, 0xa6, 0x69, 0xe2, 0x23, 0xee, 0xcf, - 0xb2, 0x65, 0x99, 0x41, 0xff, 0xa1, 0xbc, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xdf, 0x4f, 0x01, 0xea, 0x4a, 0x91, 0xaa, 0x2e, 0xb6, - 0x51, 0x55, 0xf1, 0x53, 0xdc, 0xa7, 0x0a, 0xfc, 0xe9, - 0x8f, 0xf5, 0x6b, 0xff, 0x2a, 0x1c, 0x94, 0x11, 0x78, - 0xc2, 0xc2, 0xdb, 0xe9, 0x18, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xf3, 0xeb, 0x85, 0xc1, 0x68, 0x37, 0x79, 0x31, 0xa2, - 0xf6, 0x77, 0xf1, 0x06, 0x4c, 0x82, 0xde, 0x81, 0x5e, - 0xff, 0x75, 0x70, 0x1b, 0x03, 0x16, 0x06, 0x09, 0x87, - 0x94, 0xee, 0xa7, 0x16, 0x96, 0x80, 0x54, 0x85, 0xf7, - 0x77, 0xad, 0xe2, 0xf2, 0x50, 0xe4, 0x8f, 0xd5, 0x8d, - 0x23, 0x58, 0xaa, 0x8e, 0xeb, 0xff, 0x59, 0x7d, 0x39, - 0x6a, 0x7a, 0xfc, 0xf3, 0x8b, 0xe6, 0x5e, 0x0e, 0x78, - 0x40, 0x5d, 0x35, 0xee, 0x3d, 0x8d, 0xd2, 0x98, 0x5c, - 0xd6, 0x2c, 0x26, 0xca, 0xc1, 0xbd, 0x0d, 0x9c, 0x6e, - 0x67, 0xac, 0xcf, 0xbb, 0xe2, 0xbf, 0xda, 0x87, 0xd5, - 0x0d, 0xe6, 0x41, 0x5a, 0x4a, 0x9b, 0xaa, 0x27, 0x3f, - 0x99, 0x7b, 0xdc, 0xe9, 0x03, 0x27, 0x1a, 0x05, 0x82, - 0xbe, 0xfc, 0x40, 0x2f, 0x33, 0xfc, 0xab, 0xb6, 0xdb, - 0x6f, 0x14, 0x52, 0x52, 0xd8, 0x70, 0x55, 0x4d, 0x78, - 0x91, 0xd2, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(96, &vec); - - return result; -} - -unsigned int test_97(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xf0, 0x7a, 0xce, 0x29, 0x9e, 0xa3, 0xc1, 0x04, 0x9d, - 0x88, 0x37, 0x8e, 0x3a, 0x64, 0xd6, 0xfe, 0x78, 0x1b, - 0x87, 0x72, 0xcb, 0xd1, 0x92, 0xc9, 0x69, 0x2a, 0x4d, - 0x8e, 0x7a, 0xec, 0x19, 0x87, - }, - { - 0x87, 0xcd, 0x0d, 0x8f, 0xff, 0x8d, 0xad, 0xec, 0x5b, - 0x8b, 0xcc, 0xd0, 0x85, 0xf4, 0x1a, 0x1e, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x42, 0xfb, 0x6e, 0x92, 0xee, 0x26, 0x3b, 0x1c, 0x03, - 0xa6, 0x3e, 0x5b, 0xea, 0xf8, 0x06, 0x62, 0xad, 0x67, - 0xb1, 0x95, 0xe1, 0x55, 0xd0, 0xac, 0xb7, 0x47, 0x8a, - 0x82, 0x93, 0x83, 0x1f, 0xc6, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x3e, 0x3e, 0xeb, 0x53, 0x80, 0x0b, 0x48, 0x74, 0xbd, - 0xda, 0x33, 0x1c, 0x1e, 0x9b, 0x98, 0xc5, 0x77, 0x00, - 0xe7, 0xc2, 0x06, 0xf5, 0xf3, 0xd0, 0xf4, 0x21, 0xe3, - 0xc4, 0x90, 0x79, 0x70, 0x84, 0xc0, 0x9e, 0xd6, 0xb4, - 0xbd, 0x58, 0x85, 0xbc, 0xaa, 0x42, 0xe0, 0x36, 0x87, - 0x0d, 0x63, 0x3d, 0xf8, 0xb3, 0xbf, 0x1d, 0x1b, 0xaf, - 0xf5, 0x88, 0xac, 0x9b, 0x24, 0xe0, 0x82, 0x7c, 0x26, - 0xed, 0x4f, 0x06, 0x18, 0xd9, 0x12, 0xd3, 0x90, 0x04, - 0xcc, 0xa9, 0x73, 0x9e, 0x0b, 0x99, 0x46, 0xf8, 0x92, - 0x7b, 0x58, 0x0b, 0xb2, 0xf3, 0x2c, 0x9f, 0x14, 0x2a, - 0x7b, 0x1c, 0x09, 0xb3, 0x2a, 0x40, 0x5e, 0x1e, 0xf5, - 0x20, 0x9c, 0xae, 0x79, 0x0b, 0x07, 0x11, 0xd1, 0x49, - 0x93, 0x51, 0x09, 0x53, 0x01, 0x8f, 0x27, 0x9c, 0x8c, - 0x8d, 0xfd, 0x06, 0x64, 0x8c, 0xd1, 0xb1, 0xa5, 0x8b, - 0xdf, 0x93, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(97, &vec); - - return result; -} - -unsigned int test_98(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x96, 0xc3, 0xe7, 0xe5, 0xfe, 0xcc, 0xc0, 0x61, 0x80, - 0x59, 0x00, 0x6c, 0x73, 0x5a, 0x6c, 0xe0, 0xb5, 0x11, - 0x4d, 0x20, 0x8c, 0x79, 0x14, 0x3e, 0x1c, 0x9f, 0x8e, - 0xf5, 0x03, 0x6e, 0x33, 0x0d, - }, - { - 0x6b, 0xbb, 0x09, 0xc4, 0x16, 0x51, 0xc1, 0xc7, 0x8c, - 0x36, 0xc2, 0x5e, 0x4c, 0xee, 0x8a, 0xa9, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xab, 0xa5, 0x10, 0x86, 0x57, 0x7c, 0x69, 0x48, 0xb8, - 0x92, 0xcf, 0x52, 0x54, 0x52, 0x0b, 0xf8, 0xd2, 0x40, - 0xc2, 0xe3, 0xb0, 0x92, 0x4a, 0xfe, 0x69, 0x65, 0xac, - 0xfa, 0xbd, 0x7e, 0x0a, 0xbf, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x1d, 0x7e, 0xc4, 0x82, 0x34, 0xbb, 0x2a, 0xaa, 0xf5, - 0x4f, 0xbd, 0x55, 0xff, 0x06, 0x63, 0xf0, 0xfc, 0x82, - 0x82, 0x25, 0x31, 0xf6, 0x66, 0xee, 0x7f, 0x7f, 0x5e, - 0x25, 0x70, 0x07, 0xf3, 0x04, 0x62, 0x42, 0x8a, 0x51, - 0x9d, 0x86, 0xa8, 0x76, 0x4b, 0xa0, 0xd6, 0xa2, 0x33, - 0x1c, 0xb1, 0x29, 0x23, 0x2d, 0x9a, 0x5c, 0x03, 0x18, - 0x3b, 0x0f, 0x41, 0x9d, 0x81, 0x3f, 0x4c, 0x0e, 0x00, - 0xe4, 0xbe, 0x5d, 0xd1, 0x6a, 0x87, 0xa9, 0xfa, 0xec, - 0x89, 0x15, 0xa3, 0x9f, 0xd2, 0xd4, 0x06, 0xc5, 0x4e, - 0xb8, 0xaa, 0xf2, 0x28, 0xa0, 0x9a, 0x46, 0xdb, 0x55, - 0xfd, 0xa8, 0xa9, 0x0b, 0x27, 0xef, 0xc9, 0x6c, 0x46, - 0x1e, 0x9e, 0x9b, 0xe0, 0x8e, 0x27, 0xaf, 0x86, 0xb0, - 0x17, 0x50, 0xdb, 0xbf, 0xb4, 0x02, 0x45, 0xe9, 0x98, - 0xf0, 0x67, 0x96, 0x86, 0xe1, 0x8d, 0x80, 0x17, 0x02, - 0xff, 0xa2, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(98, &vec); - - return result; -} - -unsigned int test_99(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x21, 0x07, 0x25, 0xc6, 0x08, 0x39, 0x78, 0x2d, 0x36, - 0x65, 0xa3, 0x00, 0xad, 0xcf, 0x81, 0xc6, 0xd5, 0x14, - 0x78, 0xb1, 0xf1, 0x2e, 0x5d, 0x53, 0x10, 0x4b, 0xeb, - 0x38, 0x5c, 0xe1, 0x50, 0x24, - }, - { - 0x12, 0x9a, 0x70, 0x5c, 0x88, 0xe4, 0xfd, 0xb1, 0x67, - 0xd3, 0x47, 0x94, 0xf6, 0xf7, 0x39, 0xb4, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xe1, 0x2e, 0x9c, 0xc5, 0x23, 0xd6, 0x18, 0xae, 0x6c, - 0xb6, 0x67, 0xec, 0xa7, 0xed, 0xd3, 0x54, 0x58, 0x18, - 0x7b, 0xd1, 0x9e, 0x90, 0x79, 0xb5, 0xc5, 0xe1, 0xcb, - 0x97, 0x1e, 0x38, 0x03, 0x09, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x34, 0x5b, 0x3b, 0x8c, 0x01, 0x1c, 0x78, 0x7e, 0x90, - 0x63, 0xf8, 0x11, 0xd5, 0x1f, 0x09, 0x6a, 0x31, 0xcc, - 0x1e, 0xa9, 0xfa, 0xa0, 0xb8, 0xf2, 0x9d, 0x91, 0x6b, - 0xe1, 0xb9, 0x25, 0xa4, 0xb7, 0x1f, 0x8e, 0x6d, 0xb5, - 0x6e, 0x0e, 0x22, 0xab, 0xfd, 0xe3, 0xf0, 0x35, 0xf2, - 0xd5, 0xa6, 0xfc, 0xde, 0x02, 0xe5, 0xdf, 0x8c, 0x0b, - 0xef, 0xe0, 0xc0, 0x04, 0x38, 0xfa, 0xa4, 0x27, 0x7c, - 0xa7, 0x90, 0xe6, 0x32, 0x31, 0x80, 0x61, 0xfb, 0xab, - 0xbb, 0x83, 0xdc, 0x83, 0xf7, 0x19, 0xf3, 0xce, 0xab, - 0x43, 0x1e, 0x3f, 0xe8, 0x06, 0x95, 0xbc, 0x44, 0xd7, - 0x4d, 0x09, 0x35, 0xc8, 0x42, 0x25, 0x21, 0xce, 0x78, - 0x4a, 0x92, 0x3c, 0xac, 0xc3, 0x75, 0x17, 0xb9, 0xdd, - 0x93, 0xc7, 0xc0, 0x60, 0x8f, 0x95, 0x5e, 0x5b, 0x48, - 0x68, 0x0b, 0x53, 0x71, 0x42, 0x45, 0x9a, 0x6d, 0x7b, - 0x79, 0xe8, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(99, &vec); - - return result; -} - -unsigned int test_100(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xf8, 0x7e, 0x04, 0x74, 0x38, 0xc6, 0xf5, 0xdc, 0x41, - 0xa5, 0xe3, 0xbd, 0x0d, 0xdb, 0x38, 0x6c, 0x99, 0x40, - 0x7b, 0xf2, 0x76, 0xb5, 0x78, 0x24, 0xd4, 0x36, 0x6e, - 0x09, 0x73, 0xef, 0x65, 0xf2, - }, - { - 0x73, 0x00, 0x2b, 0x5a, 0xc3, 0xcd, 0xb5, 0x61, 0x5a, - 0x2e, 0x17, 0x92, 0xb9, 0x63, 0x86, 0xe2, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xca, 0x22, 0xf8, 0x53, 0xf4, 0x37, 0x1e, 0xd3, 0x34, - 0xab, 0x94, 0x44, 0x4b, 0x58, 0xa4, 0xf9, 0xcb, 0xda, - 0xcf, 0xda, 0x96, 0xe4, 0xa9, 0xe4, 0x6c, 0x9c, 0xf7, - 0x76, 0xa9, 0x03, 0x99, 0x0d, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x5d, 0x54, 0x82, 0x7f, 0xb3, 0x7f, 0xd8, 0x64, 0x41, - 0xab, 0x4e, 0xb3, 0x79, 0x60, 0x89, 0xde, 0x39, 0xf1, - 0x13, 0x24, 0x41, 0x58, 0x23, 0x6e, 0xc1, 0x62, 0x99, - 0x69, 0xf9, 0x29, 0x5f, 0x37, 0x83, 0x6b, 0x2d, 0x7d, - 0x4d, 0x6e, 0x59, 0xe0, 0xbd, 0xce, 0xfd, 0x92, 0x3c, - 0x2c, 0x44, 0x21, 0x18, 0xc8, 0xca, 0x3b, 0x00, 0xa2, - 0x58, 0xbe, 0xec, 0xad, 0x7d, 0x28, 0xd7, 0xe1, 0x21, - 0x62, 0xa4, 0x20, 0x21, 0x29, 0x18, 0x93, 0x7a, 0x4d, - 0x0d, 0xa5, 0xea, 0x7c, 0x0b, 0x96, 0x02, 0x81, 0x32, - 0x66, 0x01, 0x5f, 0x38, 0x5e, 0xd5, 0xc6, 0x9a, 0x48, - 0x37, 0x5e, 0x9b, 0x37, 0x38, 0x81, 0x4f, 0x16, 0xc0, - 0x85, 0xd5, 0xcf, 0xd1, 0xd2, 0xe6, 0x26, 0x7e, 0x1c, - 0x5d, 0x7b, 0xad, 0x88, 0xf2, 0x0b, 0x3a, 0xb0, 0xab, - 0x27, 0x9f, 0xcb, 0x65, 0x10, 0x20, 0xec, 0xfc, 0x15, - 0x07, 0x63, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(100, &vec); - - return result; -} - -unsigned int test_101(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x50, 0xeb, 0xb3, 0x84, 0x61, 0xd3, 0xf2, 0x6c, 0x5a, - 0xc2, 0xec, 0xf5, 0x3a, 0x03, 0x41, 0x78, 0x42, 0x52, - 0x5b, 0xad, 0x57, 0x7f, 0x05, 0x7e, 0xd9, 0x20, 0xc1, - 0xc4, 0x97, 0x0e, 0x55, 0x29, - }, - { - 0x99, 0x6c, 0x6b, 0x9d, 0xb4, 0xa1, 0xaa, 0xb9, 0xd3, - 0x1c, 0x75, 0x4a, 0xf4, 0x9a, 0x54, 0x45, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xea, 0x89, 0x85, 0x50, 0xce, 0xe3, 0x88, 0x88, 0xc0, - 0x38, 0xf6, 0x7b, 0x49, 0x12, 0xe4, 0x8a, 0xa9, 0xe3, - 0x78, 0xff, 0x3a, 0xdc, 0x9c, 0xc6, 0xc5, 0xba, 0xee, - 0x8c, 0x37, 0x6f, 0xc7, 0x08, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x77, 0x37, 0x71, 0xf1, 0xf3, 0x90, 0x37, 0x63, 0xf4, - 0xf9, 0xd6, 0xb2, 0x16, 0x73, 0xd2, 0xa9, 0x3f, 0x6e, - 0x4d, 0x03, 0x63, 0x6d, 0x38, 0x1b, 0xc2, 0x68, 0x64, - 0xb4, 0x64, 0x96, 0xe9, 0x58, 0x8a, 0x06, 0x4b, 0x00, - 0xe8, 0x46, 0xa8, 0xd9, 0x1e, 0x30, 0x2c, 0x47, 0xda, - 0xcd, 0xab, 0x73, 0x88, 0xf5, 0xcd, 0x00, 0x93, 0xd2, - 0x17, 0x4e, 0x33, 0x32, 0x7f, 0x9d, 0xf6, 0x53, 0x71, - 0x24, 0xab, 0x91, 0xcf, 0x35, 0xcb, 0xee, 0xce, 0x38, - 0xf6, 0x37, 0x3a, 0x8b, 0x85, 0x1d, 0xa2, 0x64, 0x5d, - 0xad, 0x5c, 0xf0, 0x1a, 0x59, 0xf5, 0x31, 0x80, 0xa0, - 0xfb, 0xfe, 0xb9, 0x28, 0xa7, 0x10, 0x90, 0xd1, 0x99, - 0x7b, 0x05, 0x5f, 0xa2, 0x0f, 0x14, 0xf4, 0x9c, 0x28, - 0xdc, 0x06, 0x5d, 0xdd, 0x84, 0xa1, 0x4d, 0x93, 0x23, - 0x19, 0x2b, 0x24, 0x28, 0xae, 0xc6, 0xf9, 0x15, 0xf9, - 0x04, 0x91, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(101, &vec); - - return result; -} - -unsigned int test_102(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0xc1, 0x3d, 0x6c, 0xd6, 0x3b, 0xb7, 0x93, 0x11, 0x74, - 0x69, 0x6f, 0x3e, 0x04, 0xa0, 0xc4, 0x1c, 0xb0, 0xb2, - 0x56, 0x11, 0x34, 0xe8, 0x47, 0xce, 0x03, 0xe3, 0x63, - 0x26, 0xb8, 0x03, 0xf8, 0xab, - }, - { - 0x20, 0x84, 0xab, 0x32, 0x37, 0x43, 0x92, 0xea, 0x9f, - 0x6e, 0x8a, 0x47, 0x4f, 0x18, 0xe9, 0xd7, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xae, 0xc5, 0xa6, 0xa7, 0x23, 0x2a, 0x52, 0xb8, 0x1c, - 0xe7, 0xe9, 0x81, 0xa3, 0x59, 0xce, 0xf1, 0xbb, 0xd2, - 0xf1, 0xef, 0xf8, 0x48, 0x83, 0x71, 0x46, 0x8c, 0xd1, - 0xf4, 0x14, 0x7a, 0x89, 0xc2, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xda, 0xea, 0x78, 0x88, 0x17, 0x37, 0xcb, 0x26, 0xd6, - 0x0c, 0x36, 0xce, 0xb9, 0xfe, 0xc3, 0xd2, 0x81, 0xc7, - 0xae, 0xc5, 0x4b, 0x4b, 0x98, 0x50, 0x93, 0x7b, 0x37, - 0x3b, 0x2b, 0x26, 0x21, 0xfe, 0x07, 0x75, 0x85, 0xa1, - 0xfe, 0x88, 0x26, 0x5d, 0x84, 0xf2, 0x25, 0x55, 0x2e, - 0x5c, 0x85, 0xcb, 0xec, 0x8d, 0x00, 0x06, 0x96, 0x48, - 0x06, 0x5a, 0xc1, 0x20, 0x73, 0xae, 0xdc, 0xe8, 0xc9, - 0x40, 0x46, 0x09, 0x49, 0xb5, 0x97, 0x66, 0x7e, 0xcf, - 0xce, 0xda, 0xbd, 0x7a, 0x86, 0xa9, 0x79, 0xb9, 0x04, - 0xa2, 0x4d, 0x32, 0xdb, 0x10, 0x22, 0x3e, 0xae, 0x5a, - 0x98, 0xa0, 0xd1, 0xb6, 0x57, 0x1b, 0x86, 0x43, 0xdf, - 0x2c, 0x62, 0x65, 0xa5, 0xd6, 0x6c, 0xee, 0x9f, 0x4a, - 0xbf, 0xc5, 0x77, 0x81, 0x46, 0xd6, 0xfb, 0x2b, 0x85, - 0x3d, 0x82, 0x63, 0x6c, 0x13, 0x25, 0xb2, 0xd1, 0xef, - 0x45, 0x76, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(102, &vec); - - return result; -} - -unsigned int test_103(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x67, 0xf9, 0x8d, 0x4d, 0x9f, 0x35, 0xa8, 0xda, 0xc0, - 0x3d, 0x19, 0x92, 0x22, 0xb0, 0x7c, 0x78, 0x5f, 0x11, - 0xdc, 0x51, 0x7a, 0x8d, 0x88, 0x40, 0xf5, 0xfe, 0xa4, - 0xb6, 0xfd, 0x68, 0x44, 0x8e, - }, - { - 0x1d, 0xcd, 0x3a, 0x1b, 0xbb, 0x4f, 0x94, 0xad, 0x78, - 0x35, 0x58, 0x42, 0x89, 0x3d, 0xe0, 0x35, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xf1, 0xf9, 0xca, 0xee, 0x31, 0x03, 0x6a, 0x2a, 0x20, - 0x0a, 0x05, 0x2d, 0x8a, 0x1e, 0x06, 0x59, 0x20, 0xb8, - 0x36, 0x3f, 0xbb, 0xf1, 0xc3, 0x71, 0xa2, 0x32, 0x44, - 0xc6, 0x83, 0x51, 0x13, 0xd3, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x9f, 0x24, 0xa5, 0x6f, 0x98, 0x58, 0x51, 0x26, 0x2d, - 0x0c, 0xfd, 0xf1, 0x22, 0xb8, 0x9b, 0x3b, 0x93, 0xa1, - 0xdf, 0xd9, 0x7a, 0x29, 0x7f, 0xb1, 0xf6, 0xfc, 0x39, - 0xd6, 0xc7, 0x19, 0x94, 0x2e, 0x28, 0x97, 0x7b, 0xde, - 0x91, 0xcb, 0x39, 0x41, 0xc0, 0x35, 0xe3, 0xec, 0x45, - 0x4d, 0xbf, 0x9d, 0xbb, 0x43, 0x57, 0x69, 0x20, 0xdc, - 0x47, 0x27, 0x3d, 0x3f, 0x82, 0xcc, 0xc8, 0xa8, 0xfa, - 0xbc, 0x1b, 0x53, 0x2f, 0x9d, 0x1c, 0x48, 0x7d, 0xb3, - 0x1e, 0x7e, 0xaa, 0xc3, 0x32, 0x5e, 0xdd, 0x1f, 0xd8, - 0x08, 0x70, 0xcf, 0x30, 0xcc, 0xdc, 0x87, 0xa1, 0xfa, - 0x4b, 0x88, 0xeb, 0x7a, 0x1c, 0x46, 0x4d, 0x0b, 0x68, - 0xef, 0xc3, 0xdd, 0x76, 0x0a, 0x32, 0x59, 0xad, 0x28, - 0x0d, 0x49, 0x64, 0x2b, 0xeb, 0xde, 0xbc, 0x1a, 0x58, - 0x29, 0xf3, 0x2f, 0x09, 0xfb, 0x77, 0x7a, 0xfb, 0x40, - 0x9a, 0xee, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(103, &vec); - - return result; -} - -unsigned int test_104(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x0f, 0x4a, 0x78, 0xc8, 0x62, 0x3d, 0x30, 0x31, 0x54, - 0x39, 0x8c, 0xb9, 0x34, 0x08, 0x57, 0xba, 0x93, 0x73, - 0x88, 0xf9, 0x5b, 0x01, 0x97, 0xec, 0xba, 0x48, 0x7c, - 0x4c, 0xf0, 0x21, 0xb3, 0xca, - }, - { - 0x6c, 0x02, 0xe6, 0x93, 0x98, 0xab, 0x7b, 0x7d, 0xfc, - 0x4a, 0xd8, 0x3e, 0x7f, 0x3c, 0xa8, 0xff, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x03, 0x02, 0x0b, 0x45, 0x11, 0xb2, 0x52, 0x9b, 0x2a, - 0x33, 0x48, 0x07, 0x8a, 0xd0, 0x31, 0x8b, 0xa5, 0xf8, - 0x25, 0xa1, 0xbb, 0x06, 0x72, 0xdc, 0x89, 0x4c, 0xb4, - 0xd1, 0xdd, 0x3e, 0x29, 0x4d, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xf5, 0xb9, 0xa5, 0x26, 0x29, 0x70, 0xb8, 0xcd, 0x94, - 0x48, 0x2a, 0xc6, 0xe4, 0xde, 0xdd, 0x8f, 0xfd, 0xca, - 0xca, 0x0f, 0xc3, 0x7e, 0x6d, 0x0f, 0xa7, 0x1a, 0xb1, - 0x0e, 0x5a, 0xe0, 0x74, 0x87, 0xc6, 0x88, 0x01, 0x7d, - 0xc0, 0x15, 0x14, 0xf8, 0x57, 0x70, 0x2b, 0x28, 0xcd, - 0x8e, 0x4f, 0x1b, 0x08, 0x39, 0xb9, 0xec, 0x4d, 0x6f, - 0x9e, 0x07, 0xe4, 0x55, 0x1e, 0x15, 0x0c, 0x91, 0xcd, - 0x4f, 0x4a, 0xa2, 0x2a, 0xa7, 0xe8, 0xa5, 0xe1, 0x07, - 0x78, 0x69, 0xb2, 0x45, 0x4b, 0xb8, 0xcd, 0xda, 0xee, - 0x69, 0xa0, 0x67, 0xc6, 0xb0, 0xdc, 0xc1, 0x78, 0xfe, - 0x1d, 0xa6, 0xed, 0xe5, 0xd5, 0x32, 0x69, 0x37, 0x25, - 0x36, 0xf3, 0x4b, 0xed, 0x37, 0x85, 0x66, 0xcb, 0xd8, - 0x98, 0x6d, 0xc1, 0xae, 0x08, 0x48, 0xbe, 0x74, 0x90, - 0x79, 0xdd, 0x57, 0x2d, 0x4d, 0x62, 0xe5, 0x1f, 0xe6, - 0x59, 0xca, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(104, &vec); - - return result; -} - -unsigned int test_105(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 0, - 0, - 128, - { - 0x00, 0x1c, 0xf2, 0xbb, 0x87, 0xee, 0x4a, 0xa1, 0x45, - 0x01, 0x19, 0x08, 0xce, 0x79, 0x92, 0x07, 0x00, 0xff, - 0x40, 0xce, 0x76, 0x50, 0x99, 0x29, 0x2b, 0x7b, 0x7a, - 0xec, 0x68, 0xee, 0xb0, 0x5e, - }, - { - 0xb1, 0x01, 0x15, 0xcc, 0xfe, 0xfe, 0xc7, 0x48, 0x7c, - 0x87, 0x24, 0x12, 0x97, 0x70, 0x67, 0xa9, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x9b, 0x5d, 0xcf, 0xa4, 0x0b, 0x5c, 0x5a, 0x9d, 0xca, - 0xe4, 0xe8, 0xcd, 0xf1, 0x6e, 0x14, 0x58, 0xd4, 0x91, - 0x64, 0xb3, 0x17, 0xce, 0xfc, 0xe6, 0x3f, 0x28, 0xc1, - 0x0d, 0x29, 0x22, 0x99, 0x74, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xe0, 0xf0, 0x73, 0xc0, 0xbb, 0x40, 0x24, 0xc4, 0x6c, - 0xed, 0xd5, 0x6f, 0x6d, 0xde, 0x44, 0x67, 0x7d, 0x8d, - 0xcd, 0xaf, 0x8d, 0xf9, 0x39, 0xe2, 0xcb, 0xfa, 0xaf, - 0x0f, 0xc3, 0x81, 0x0f, 0x62, 0x1b, 0x29, 0xdd, 0xaa, - 0x78, 0x10, 0xee, 0x3c, 0xfc, 0x25, 0x12, 0x32, 0xc4, - 0xf8, 0xb0, 0x1c, 0x56, 0x64, 0xe4, 0xaf, 0x5e, 0xa0, - 0xa7, 0xa2, 0x0c, 0x76, 0x8a, 0xae, 0x83, 0x92, 0x18, - 0x63, 0xd7, 0xe0, 0xff, 0x12, 0x77, 0x8e, 0xe1, 0xe6, - 0xe4, 0xef, 0xee, 0xa6, 0x32, 0x0f, 0x9c, 0x8d, 0xd4, - 0x39, 0xe7, 0x98, 0x7e, 0x62, 0x0a, 0xc2, 0xee, 0x40, - 0x96, 0x52, 0xba, 0x7f, 0x07, 0x70, 0x8c, 0xa1, 0x9a, - 0x2e, 0x16, 0xf4, 0xd3, 0x24, 0xba, 0x1a, 0xcc, 0xa3, - 0xa4, 0xd2, 0x44, 0x30, 0x24, 0x38, 0x60, 0x8b, 0xa3, - 0xb6, 0x4c, 0xae, 0x05, 0x54, 0x5a, 0xd8, 0x67, 0x19, - 0x49, 0x51, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(105, &vec); - - return result; -} - -unsigned int test_106(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x22, 0xd8, 0xc6, 0x2b, 0xcd, 0xdf, 0x5d, 0xa1, 0xdb, - 0xdb, 0x09, 0x3d, 0x6b, 0x1f, 0x66, 0x3d, 0xde, 0x33, - 0x73, 0x43, 0xc5, 0x6c, 0xcf, 0xd4, 0x0a, 0xcb, 0xe3, - 0x30, 0x23, 0x09, 0xea, 0xe0, - }, - { - 0x2a, 0x4b, 0x8e, 0x66, 0xde, 0xaa, 0xc3, 0x8b, 0x70, - 0xd9, 0xff, 0xc2, 0x0c, 0x58, 0x5d, 0xa5, - }, - { - 0x0a, 0x33, 0x70, 0x38, 0xf4, 0xb4, 0x57, 0x3f, 0xf4, - 0x3a, 0x43, 0x21, 0xa5, 0x86, 0xca, 0x77, 0x7c, 0x30, - 0x30, 0x12, 0x67, 0xd8, 0x2f, 0xdf, 0x93, 0x71, 0x98, - 0xac, 0x56, 0xc7, 0x06, 0x2c, - }, - { - 0x0b, 0x6f, 0xd1, 0x79, 0xe4, 0x4f, 0x14, 0x9f, 0x06, - 0x2d, 0xa4, 0xf6, 0x6f, 0x82, 0x9c, 0x3c, 0x58, 0xc4, - 0xa0, 0xa4, 0xf7, 0x5a, 0xc2, 0xa9, 0xe0, 0x24, 0x0d, - 0x43, 0xbe, 0xc3, 0x0e, 0x44, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x04, 0x6e, 0x19, 0xb4, 0xd8, 0xab, 0x38, 0xdd, 0x08, - 0xde, 0xfd, 0xd0, 0xd7, 0xc3, 0x0c, 0x8c, 0x75, 0xd5, - 0x68, 0x9c, 0xa2, 0x6f, 0x2b, 0xc9, 0x94, 0xac, 0x7f, - 0xca, 0x4f, 0xdb, 0xee, 0x80, 0x67, 0x7d, 0xfb, 0xdd, - 0x85, 0x1e, 0x77, 0x22, 0x83, 0x58, 0x44, 0xdc, 0xa7, - 0x9d, 0xec, 0x4a, 0x3f, 0xa8, 0x2f, 0xeb, 0x88, 0x4d, - 0xf7, 0xd4, 0x74, 0xbd, 0x97, 0x2e, 0x12, 0x61, 0x9b, - 0xd5, 0xd6, 0xcb, 0x1b, 0x95, 0x1e, 0xac, 0x47, 0xee, - 0xc2, 0x58, 0x11, 0x95, 0xb5, 0x31, 0x53, 0x4e, 0xde, - 0x50, 0x7a, 0xf6, 0xf7, 0x41, 0x7f, 0xca, 0x84, 0x53, - 0x2b, 0xe7, 0xef, 0x5d, 0xa6, 0x73, 0x8d, 0xbf, 0x7a, - 0xad, 0xfc, 0xd7, 0xcb, 0x88, 0x88, 0x62, 0xb5, 0x2e, - 0xc7, 0x73, 0xcf, 0x3f, 0xd0, 0x0e, 0x6d, 0x4e, 0xfb, - 0x30, 0x71, 0xaf, 0x9b, 0x70, 0xa4, 0x99, 0x35, 0xa3, - 0xba, 0x38, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(106, &vec); - - return result; -} - -unsigned int test_107(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x64, 0x11, 0x75, 0x6d, 0xc7, 0xaa, 0x3b, 0xe0, 0x96, - 0xad, 0x41, 0x9c, 0xe8, 0x38, 0x1c, 0x09, 0x10, 0xd2, - 0xa2, 0xaf, 0x5e, 0x94, 0x4d, 0x8f, 0xf2, 0x1f, 0x2f, - 0xc5, 0x66, 0x6a, 0xcb, 0x87, - }, - { - 0x73, 0xb6, 0x8f, 0x5c, 0x74, 0x9f, 0xac, 0x09, 0xf0, - 0x1b, 0xa5, 0x65, 0xa7, 0x57, 0x89, 0xf8, - }, - { - 0x3c, 0xa3, 0xd9, 0x14, 0x6e, 0x2e, 0xbf, 0xf2, 0x1a, - 0x28, 0x7d, 0x38, 0x5c, 0x42, 0x24, 0xed, 0x23, 0x59, - 0x6d, 0x74, 0x50, 0x17, 0xf3, 0xb8, 0x11, 0x48, 0xc9, - 0x2f, 0x3b, 0x9b, 0x27, 0xa1, - }, - { - 0xd7, 0x70, 0x12, 0x8e, 0x71, 0x1a, 0x8d, 0xf1, 0x63, - 0xf4, 0xe2, 0x89, 0xe7, 0x75, 0x03, 0x2f, 0xdb, 0x47, - 0x3a, 0xa3, 0x8f, 0x7e, 0x1d, 0x29, 0x17, 0x26, 0x12, - 0x13, 0x78, 0xe9, 0xa8, 0xde, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xcd, 0x72, 0xf8, 0x09, 0xd9, 0xcd, 0x1a, 0xe1, 0x3d, - 0x99, 0x5d, 0x1c, 0xac, 0x36, 0x8e, 0xdb, 0xff, 0xf4, - 0x56, 0x97, 0xde, 0xb1, 0xd1, 0xb7, 0x95, 0xff, 0xcf, - 0x35, 0x49, 0x36, 0xf0, 0xbf, 0x61, 0xcf, 0x55, 0x0d, - 0x04, 0x3f, 0x9d, 0x2f, 0xa4, 0x62, 0x81, 0xa1, 0x39, - 0x3e, 0xac, 0xe3, 0x84, 0x7d, 0x5e, 0x4c, 0x63, 0x35, - 0x18, 0x2f, 0x87, 0xf4, 0x65, 0x80, 0x29, 0x89, 0xb2, - 0x55, 0x70, 0x1f, 0x9d, 0xae, 0xe0, 0x3f, 0x59, 0x1b, - 0xa5, 0xc0, 0x80, 0xd1, 0xf0, 0x58, 0x4b, 0x02, 0x7a, - 0xb3, 0xb1, 0xda, 0x57, 0x35, 0xc9, 0x36, 0x11, 0xd9, - 0xbe, 0x11, 0xa7, 0x9c, 0x0f, 0xde, 0x3b, 0xd4, 0x20, - 0x4e, 0xa3, 0x67, 0x40, 0x75, 0xea, 0x96, 0x7a, 0x24, - 0x4a, 0xb1, 0xdc, 0xac, 0xa6, 0xf0, 0x7b, 0x48, 0xbb, - 0xb0, 0xb7, 0xe2, 0x7d, 0x8a, 0x1a, 0x68, 0x0f, 0xa0, - 0x79, 0x4c, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(107, &vec); - - return result; -} - -unsigned int test_108(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x68, 0xae, 0xa6, 0x3a, 0xa5, 0xd6, 0xa8, 0x3a, 0x5f, - 0x71, 0xe3, 0x32, 0x68, 0xd1, 0x62, 0xa5, 0x8d, 0x8e, - 0xd1, 0x2f, 0xfb, 0x26, 0xc8, 0x25, 0x70, 0x3e, 0xd0, - 0xd1, 0x00, 0xdf, 0xd1, 0xeb, - }, - { - 0xfa, 0x79, 0x9c, 0x67, 0x7c, 0x36, 0x1c, 0x3e, 0x3e, - 0xb3, 0x21, 0xb0, 0x73, 0x08, 0xf2, 0xfd, - }, - { - 0xfd, 0x42, 0x73, 0xdf, 0xd5, 0xb3, 0xbc, 0x1c, 0x6a, - 0x12, 0x46, 0xf5, 0x43, 0x75, 0xe9, 0xa0, 0x02, 0x28, - 0x64, 0xdc, 0x40, 0x08, 0xf1, 0x94, 0x22, 0xec, 0x9c, - 0x0f, 0xf8, 0xa9, 0x56, 0x44, - }, - { - 0xc6, 0x73, 0x35, 0x99, 0x70, 0x4a, 0xb7, 0x20, 0x44, - 0xfd, 0x28, 0x6e, 0x3f, 0x32, 0x7b, 0x53, 0xe2, 0xf0, - 0x4c, 0x33, 0xb1, 0x75, 0x44, 0xa4, 0x2c, 0x39, 0x90, - 0x59, 0x43, 0xce, 0x20, 0xe7, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x38, 0x92, 0x53, 0xf7, 0x3e, 0x2e, 0xd3, 0xf9, 0x10, - 0x9e, 0x6f, 0x98, 0xd8, 0x89, 0xb1, 0x55, 0x4f, 0x3b, - 0xee, 0xdc, 0xf9, 0xd4, 0x12, 0xae, 0xbc, 0x07, 0xba, - 0x9a, 0xc8, 0x50, 0xaf, 0x07, 0x91, 0x3f, 0xe1, 0xc9, - 0x9c, 0xc8, 0x24, 0xe9, 0x4e, 0x55, 0xcb, 0xe9, 0x9e, - 0xe2, 0x30, 0x66, 0xe8, 0xe0, 0x18, 0x83, 0x90, 0xaf, - 0xd8, 0x8d, 0xc3, 0xe1, 0x2d, 0x41, 0xb5, 0xb2, 0x77, - 0x62, 0xa9, 0x6b, 0x2d, 0xb3, 0x05, 0xbf, 0x7c, 0x12, - 0x06, 0x53, 0x09, 0xaa, 0xb5, 0x71, 0xad, 0xf3, 0x5b, - 0x26, 0x9b, 0xfb, 0x64, 0x79, 0x39, 0x79, 0x4c, 0x2e, - 0x7d, 0x1d, 0xae, 0xf3, 0x5d, 0x85, 0x74, 0x55, 0xde, - 0xb0, 0xfe, 0x12, 0x45, 0x1c, 0x41, 0x7e, 0x95, 0x55, - 0x30, 0x11, 0x81, 0x2e, 0xad, 0x9b, 0x81, 0x38, 0xf7, - 0xac, 0xeb, 0x75, 0xa5, 0x5e, 0xdc, 0xbf, 0x96, 0x8e, - 0x1f, 0x68, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(108, &vec); - - return result; -} - -unsigned int test_109(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xf9, 0xaa, 0xbb, 0x49, 0x60, 0x0f, 0xef, 0x8a, 0x93, - 0x11, 0xc0, 0x28, 0x80, 0xb3, 0xab, 0x2d, 0xf9, 0x0a, - 0xbb, 0xe0, 0x7f, 0x51, 0x43, 0x63, 0x2c, 0x6c, 0x35, - 0xb5, 0x73, 0xff, 0xdb, 0x8d, - }, - { - 0x7c, 0x64, 0xac, 0xa5, 0xa1, 0x21, 0x11, 0x4f, 0x6e, - 0xbf, 0x5f, 0x62, 0x9b, 0x08, 0x2b, 0x61, - }, - { - 0xf5, 0x55, 0x69, 0xa6, 0xdf, 0xb8, 0x77, 0x69, 0xcf, - 0x69, 0xb0, 0x2b, 0x40, 0x43, 0xa0, 0xe9, 0x05, 0x5b, - 0x5a, 0xec, 0x53, 0xa3, 0x1d, 0x24, 0x59, 0x55, 0x66, - 0xd5, 0x22, 0xf7, 0x6c, 0xd5, - }, - { - 0x11, 0xdc, 0x58, 0x43, 0xc5, 0x5d, 0x03, 0x3b, 0x18, - 0x01, 0x01, 0x6b, 0xd0, 0xcf, 0x5d, 0x79, 0x9d, 0x76, - 0x8c, 0xdc, 0x1e, 0xe3, 0xe2, 0x1d, 0xa6, 0x1a, 0x02, - 0x27, 0xb9, 0x83, 0x15, 0x8c, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x3b, 0x6a, 0xa6, 0x99, 0xd9, 0x6f, 0x4f, 0x1d, 0xd2, - 0x9c, 0x19, 0xc5, 0x58, 0xd0, 0x3d, 0xb3, 0x00, 0xdb, - 0x1c, 0xc9, 0x2f, 0xb1, 0xa0, 0x56, 0x52, 0x79, 0xdb, - 0x1d, 0x05, 0x56, 0x67, 0xa7, 0x84, 0x49, 0x34, 0xf0, - 0x4d, 0xb0, 0x00, 0x59, 0x4c, 0xc0, 0x66, 0xb0, 0x4b, - 0xe5, 0x68, 0xc0, 0xde, 0xa8, 0xe4, 0xeb, 0xe5, 0x46, - 0x7e, 0x1f, 0xf9, 0xaf, 0x2c, 0x62, 0x72, 0x3b, 0x90, - 0xd4, 0xf2, 0xc2, 0x2a, 0x6c, 0xba, 0x2a, 0xfe, 0x15, - 0xf5, 0x50, 0x45, 0x03, 0xc8, 0xe4, 0x54, 0xdb, 0xc0, - 0xe8, 0x0a, 0x20, 0x33, 0x15, 0xa8, 0xf4, 0x59, 0xf9, - 0xea, 0xfb, 0x71, 0x11, 0x64, 0x53, 0x9d, 0xef, 0xa4, - 0x42, 0xb8, 0xf3, 0x52, 0x0e, 0xbe, 0xd4, 0xa5, 0xfc, - 0x4a, 0x84, 0x46, 0x10, 0x69, 0xee, 0xc4, 0x42, 0x5a, - 0xa3, 0xeb, 0x88, 0xae, 0x6d, 0x83, 0xad, 0x7a, 0x23, - 0x98, 0x50, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(109, &vec); - - return result; -} - -unsigned int test_110(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x88, 0xa7, 0x6c, 0x16, 0xd3, 0x27, 0x0e, 0xd3, 0xfc, - 0xd1, 0x76, 0xf9, 0xd7, 0x93, 0xfa, 0x0c, 0x35, 0x51, - 0x65, 0x74, 0xc1, 0xce, 0xf4, 0x25, 0xb6, 0x00, 0x76, - 0x28, 0xaf, 0xa3, 0x5e, 0x2b, - }, - { - 0xff, 0x16, 0xcf, 0x7c, 0xb8, 0xe4, 0x9d, 0x48, 0x2c, - 0xfd, 0x39, 0x94, 0xab, 0xc5, 0xef, 0x8a, - }, - { - 0x92, 0x13, 0xc5, 0x4e, 0x3d, 0x00, 0x2d, 0xf8, 0x74, - 0x11, 0x63, 0xab, 0x9d, 0x7e, 0x07, 0x57, 0xcd, 0x51, - 0x2c, 0x69, 0x1a, 0xd6, 0x4b, 0xaf, 0xef, 0x95, 0xcb, - 0x72, 0x53, 0x9b, 0x0a, 0xc6, - }, - { - 0x49, 0x3b, 0x64, 0x7f, 0xf0, 0xb3, 0xfa, 0xa2, 0x92, - 0x1f, 0x12, 0xf8, 0xf5, 0x7b, 0x91, 0x93, 0x29, 0xf2, - 0xaf, 0x2f, 0xc1, 0xf1, 0x45, 0x76, 0xd9, 0xdf, 0x2f, - 0x8c, 0xc2, 0xad, 0xa7, 0xa6, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xf1, 0x33, 0x0a, 0x85, 0xf9, 0x00, 0x37, 0x87, 0x6b, - 0x37, 0x49, 0x20, 0x3e, 0x84, 0x92, 0x87, 0x44, 0x4a, - 0x82, 0x7f, 0x0a, 0x58, 0xc2, 0x49, 0xff, 0x86, 0x8f, - 0xc1, 0xad, 0xba, 0x4d, 0xce, 0x28, 0x5e, 0x07, 0x6a, - 0x1f, 0x8a, 0xe1, 0xda, 0x8c, 0xf9, 0xfe, 0x14, 0x93, - 0x1e, 0x81, 0x64, 0x18, 0x6c, 0x97, 0xa8, 0xfe, 0xaf, - 0x24, 0x58, 0x34, 0x51, 0xf1, 0x16, 0xe6, 0x5f, 0x8e, - 0x43, 0x2e, 0x7e, 0xd5, 0x5a, 0x36, 0x68, 0x31, 0x20, - 0x37, 0x7e, 0x23, 0x12, 0x8d, 0xca, 0x15, 0x40, 0xfe, - 0xfb, 0xf3, 0xaf, 0x1b, 0x56, 0xd5, 0xc7, 0x41, 0x87, - 0xf5, 0x28, 0x6d, 0x0a, 0x95, 0xfb, 0x55, 0x93, 0x17, - 0x70, 0x54, 0x30, 0x60, 0xce, 0x8d, 0xf0, 0x8f, 0x3c, - 0x19, 0x59, 0xa1, 0xf4, 0xfc, 0x36, 0xb6, 0x46, 0x71, - 0xe0, 0x65, 0x4f, 0xff, 0xe7, 0x0d, 0x96, 0xd5, 0x21, - 0xbe, 0x21, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(110, &vec); - - return result; -} - -unsigned int test_111(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xf8, 0xf2, 0xc3, 0x19, 0x4e, 0x8c, 0x4e, 0x90, 0x9e, - 0x6f, 0x05, 0x27, 0x95, 0x03, 0x07, 0x18, 0xcd, 0xd6, - 0x23, 0x53, 0x03, 0xbd, 0xe5, 0x37, 0xea, 0x3c, 0x70, - 0x53, 0x05, 0x62, 0x26, 0xe1, - }, - { - 0xd5, 0x0e, 0xf4, 0xd0, 0x6d, 0x00, 0x74, 0x54, 0x65, - 0xce, 0x7b, 0x08, 0xcd, 0x03, 0x51, 0x76, - }, - { - 0xed, 0x89, 0x7e, 0xc3, 0x3a, 0xe3, 0xf4, 0xb0, 0xc2, - 0x0b, 0x12, 0x8d, 0x94, 0x61, 0x5f, 0xe3, 0x87, 0x27, - 0x0f, 0x8f, 0x0d, 0x66, 0x5e, 0x11, 0x9b, 0x9b, 0x5a, - 0xd1, 0x0f, 0xd3, 0x65, 0x7a, - }, - { - 0x91, 0x78, 0x49, 0x2a, 0x92, 0x51, 0x12, 0x80, 0x6b, - 0x27, 0x80, 0x2e, 0x0c, 0x9b, 0x0e, 0x70, 0xaf, 0x3f, - 0xd5, 0xb6, 0xdb, 0x9a, 0xf8, 0x70, 0x40, 0x28, 0x02, - 0x56, 0x35, 0xc5, 0xed, 0x27, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x0e, 0x50, 0xd9, 0xdb, 0x9a, 0x5e, 0xb2, 0xd0, 0xb0, - 0xd5, 0xc4, 0x53, 0x01, 0x70, 0x7e, 0xe2, 0x81, 0x86, - 0x68, 0x79, 0xe0, 0x72, 0xe5, 0x16, 0x96, 0xe3, 0x28, - 0x19, 0xb3, 0x3a, 0x44, 0xf0, 0xd0, 0x0b, 0x88, 0xab, - 0x5d, 0x6c, 0x31, 0xd9, 0x19, 0x88, 0xb1, 0x75, 0x7c, - 0xee, 0xa8, 0x93, 0x6e, 0xd5, 0xd0, 0xad, 0x67, 0x29, - 0x90, 0xf4, 0x95, 0x1d, 0xfa, 0xea, 0x99, 0x4d, 0xc0, - 0x0f, 0x32, 0x65, 0x09, 0x5b, 0xdb, 0xef, 0xaf, 0x1d, - 0x42, 0x24, 0xda, 0x61, 0x68, 0x88, 0xa8, 0x06, 0x60, - 0x9d, 0x28, 0x05, 0xcf, 0x0f, 0x51, 0x83, 0xd5, 0xe9, - 0x25, 0x26, 0x1e, 0x6b, 0x24, 0x90, 0xdd, 0x85, 0x24, - 0x2f, 0xc9, 0xfb, 0xd4, 0x26, 0xd7, 0x7a, 0xe8, 0x33, - 0x9a, 0xea, 0xc1, 0x83, 0x94, 0xbb, 0xf3, 0x51, 0xe0, - 0x61, 0xe4, 0x95, 0x61, 0x38, 0x36, 0x1d, 0x11, 0xb3, - 0x57, 0x72, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(111, &vec); - - return result; -} - -unsigned int test_112(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x2a, 0x65, 0xb1, 0x29, 0x9d, 0x03, 0x4b, 0x95, 0x40, - 0x07, 0xae, 0x77, 0x34, 0x03, 0xf5, 0x09, 0xec, 0x8d, - 0xf5, 0x2b, 0x25, 0xff, 0x57, 0x79, 0x19, 0xd3, 0x3e, - 0x97, 0x6f, 0xfd, 0x21, 0xa5, - }, - { - 0x80, 0x80, 0xab, 0xa8, 0xc9, 0xf7, 0xa0, 0x4a, 0xd4, - 0x1c, 0x41, 0xde, 0xbc, 0x8d, 0x6b, 0x02, - }, - { - 0x31, 0xa4, 0x66, 0x17, 0xe8, 0xee, 0xc9, 0x15, 0x70, - 0x7b, 0x75, 0xf7, 0xba, 0x78, 0x81, 0xf9, 0x63, 0x4e, - 0x7b, 0x01, 0x5e, 0xf2, 0xa2, 0xfb, 0x51, 0xf5, 0x92, - 0xfd, 0xda, 0x27, 0xfb, 0x20, - }, - { - 0xe3, 0xc8, 0x81, 0x51, 0x72, 0xec, 0xee, 0x13, 0xe6, - 0x49, 0xff, 0x62, 0x4c, 0x62, 0x43, 0xaf, 0xbb, 0x46, - 0x60, 0x2b, 0xbf, 0xc3, 0xbd, 0x28, 0xd0, 0x31, 0x7b, - 0xad, 0x68, 0x56, 0xc6, 0x6f, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x5b, 0x1c, 0x01, 0xab, 0x1d, 0xf4, 0x42, 0x30, 0x5d, - 0xaa, 0x89, 0x98, 0x72, 0x8e, 0x1e, 0x99, 0x97, 0x5b, - 0x32, 0x32, 0x7d, 0xa7, 0x27, 0xf1, 0x62, 0xaf, 0xf5, - 0xec, 0xbb, 0x01, 0xd4, 0xd6, 0xe8, 0xb8, 0x55, 0x1f, - 0x7a, 0xbe, 0x18, 0x92, 0x62, 0x50, 0x12, 0xc2, 0x48, - 0x17, 0x8b, 0x2e, 0xc1, 0x2d, 0x64, 0xd8, 0x40, 0x63, - 0xf8, 0x7f, 0x12, 0x79, 0x28, 0xeb, 0xab, 0x06, 0xcf, - 0xc3, 0x77, 0xfd, 0x96, 0x55, 0xaa, 0xdb, 0xa3, 0x61, - 0xb9, 0x3f, 0x97, 0x6e, 0x51, 0x33, 0xb6, 0xfb, 0x87, - 0x45, 0xf1, 0x30, 0xd8, 0xc5, 0xea, 0xe6, 0xf0, 0xd3, - 0x85, 0x7f, 0xe5, 0xc6, 0x89, 0x04, 0xad, 0xea, 0xa2, - 0x24, 0xcc, 0xb9, 0x3a, 0x96, 0x0e, 0xd7, 0x9e, 0xcf, - 0x55, 0xd6, 0xaf, 0x30, 0x7d, 0x28, 0x73, 0x66, 0xb8, - 0xa2, 0xd4, 0x66, 0xb9, 0x5e, 0xdb, 0xa1, 0x42, 0xe8, - 0x6d, 0x12, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(112, &vec); - - return result; -} - -unsigned int test_113(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x85, 0xb6, 0x0f, 0xaa, 0x4e, 0xbf, 0xde, 0x82, 0x5f, - 0x0a, 0x49, 0x70, 0xc8, 0x0c, 0x78, 0xe3, 0x77, 0xa5, - 0x1d, 0xce, 0xbb, 0x09, 0x45, 0x3a, 0x03, 0xb6, 0x46, - 0xcb, 0xdc, 0x1c, 0x2f, 0x0e, - }, - { - 0xfb, 0x4d, 0xff, 0x7e, 0x1a, 0xd3, 0x7f, 0x1d, 0x00, - 0xa1, 0x00, 0xde, 0x0a, 0x9d, 0x5d, 0x2b, - }, - { - 0x46, 0x10, 0xc5, 0x65, 0x63, 0x72, 0x6c, 0x7b, 0xaa, - 0x3a, 0x21, 0x12, 0x90, 0x4a, 0xd8, 0x03, 0x62, 0x55, - 0xc9, 0x2f, 0xe7, 0x48, 0xd6, 0x5f, 0x12, 0x33, 0x35, - 0x48, 0x96, 0xfe, 0xe7, 0x2a, - }, - { - 0x85, 0x40, 0x56, 0x92, 0x7b, 0x35, 0x05, 0x3b, 0x57, - 0x44, 0x8a, 0x2e, 0x0b, 0x6c, 0x7c, 0xf3, 0x71, 0xce, - 0x10, 0x79, 0x7e, 0xab, 0x1c, 0x0a, 0x00, 0x9d, 0x7a, - 0xbd, 0x1a, 0x06, 0x7c, 0xcc, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x19, 0x42, 0xa4, 0xdc, 0x08, 0xfe, 0x8d, 0x92, 0xf5, - 0xfa, 0x58, 0x17, 0x56, 0xdd, 0xc3, 0xf7, 0xa3, 0x21, - 0xcb, 0x96, 0x93, 0x3c, 0xc1, 0x93, 0x71, 0x1a, 0x0f, - 0x64, 0x40, 0xa7, 0x6b, 0x6c, 0x5a, 0x5d, 0xb8, 0x06, - 0x9c, 0x5c, 0x82, 0xfe, 0x3e, 0x1c, 0xdf, 0x3f, 0x35, - 0x20, 0xde, 0xb1, 0x65, 0x2a, 0x96, 0x98, 0xf9, 0x72, - 0x6f, 0xd4, 0x04, 0x8b, 0xab, 0xaf, 0x07, 0x05, 0x0e, - 0x93, 0x7d, 0x56, 0x54, 0x28, 0x99, 0xee, 0xa5, 0xec, - 0x2c, 0x16, 0x91, 0x9a, 0x36, 0x0d, 0xe5, 0xcc, 0xf4, - 0x9e, 0xee, 0xd1, 0x15, 0xee, 0x02, 0xc0, 0x67, 0xb7, - 0x25, 0x52, 0xbc, 0x4d, 0x4e, 0xef, 0xb6, 0xaa, 0x91, - 0xa2, 0x33, 0xdd, 0x73, 0x17, 0x95, 0x9a, 0x7e, 0x80, - 0xe1, 0x6b, 0x17, 0x37, 0x91, 0x84, 0x50, 0x3c, 0xbf, - 0x39, 0x31, 0xa6, 0x9e, 0x90, 0x2d, 0x97, 0xf8, 0x20, - 0xf8, 0x03, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(113, &vec); - - return result; -} - -unsigned int test_114(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xbb, 0x71, 0x47, 0xf6, 0x74, 0x54, 0x51, 0x7b, 0x2f, - 0x2b, 0x10, 0x37, 0x90, 0xb4, 0x42, 0x47, 0xef, 0xb5, - 0x28, 0xa7, 0x7a, 0x05, 0xaa, 0x22, 0x0c, 0x8f, 0xe4, - 0x0b, 0x32, 0x3a, 0x1f, 0x0a, - }, - { - 0x33, 0xb4, 0x2b, 0x70, 0xeb, 0x65, 0xd9, 0x85, 0xf2, - 0x47, 0x61, 0x36, 0xc9, 0x49, 0xca, 0x18, - }, - { - 0x7e, 0xaa, 0x52, 0xf6, 0xd4, 0x35, 0x29, 0x8f, 0xda, - 0x70, 0xef, 0x9a, 0xba, 0xe9, 0x0e, 0xb5, 0x49, 0x68, - 0xbd, 0x2b, 0x4c, 0xe7, 0x49, 0x83, 0x6c, 0xb2, 0xb1, - 0x1e, 0x45, 0x2f, 0x67, 0x68, - }, - { - 0x4c, 0x26, 0x86, 0xe2, 0xed, 0xc7, 0xa2, 0x5b, 0xc9, - 0x27, 0x46, 0x42, 0xb8, 0x86, 0xf1, 0x51, 0x0c, 0x4d, - 0x0f, 0x00, 0x71, 0x5b, 0x75, 0x90, 0x1a, 0x40, 0xf3, - 0xd1, 0x53, 0x77, 0x88, 0xfc, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x50, 0xdc, 0x60, 0xbf, 0x8d, 0xf4, 0xb7, 0x3e, 0x0c, - 0x95, 0xb3, 0xe1, 0x73, 0x64, 0x11, 0x1d, 0xde, 0xff, - 0x81, 0x44, 0x24, 0x60, 0xd6, 0xc9, 0x35, 0xe1, 0xfc, - 0x5d, 0x2e, 0xd2, 0x95, 0xc2, 0x54, 0xc5, 0xc9, 0xf3, - 0x9d, 0x18, 0xf6, 0x54, 0x0e, 0x69, 0x7a, 0x1a, 0x7f, - 0xc5, 0x88, 0xb3, 0x7e, 0x8f, 0xc4, 0x5f, 0x31, 0x4c, - 0x06, 0xe9, 0xeb, 0x04, 0x45, 0x8f, 0x3b, 0xd1, 0x8d, - 0x23, 0xfb, 0x33, 0xdb, 0x2a, 0x31, 0x85, 0xa0, 0xcb, - 0x2b, 0x2d, 0x9b, 0xa6, 0x09, 0x15, 0x38, 0xe8, 0x5c, - 0x2d, 0x6f, 0xba, 0xc0, 0x20, 0x1f, 0xec, 0xd3, 0x37, - 0xd2, 0x68, 0x34, 0x7a, 0xd8, 0xf3, 0x04, 0x21, 0x3c, - 0x3a, 0xf9, 0x45, 0xca, 0x31, 0xed, 0xf8, 0xbe, 0x84, - 0x7a, 0x7b, 0x56, 0xd7, 0xbd, 0xcd, 0x30, 0x83, 0x99, - 0xb0, 0x65, 0x02, 0x79, 0x44, 0x43, 0xf7, 0x38, 0xf6, - 0xee, 0x55, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(114, &vec); - - return result; -} - -unsigned int test_115(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xd7, 0xdc, 0xdf, 0xaa, 0x81, 0xc3, 0x51, 0x19, 0xa4, - 0x69, 0x51, 0xae, 0xd8, 0xd8, 0x89, 0x95, 0x02, 0xfc, - 0x21, 0xb9, 0x09, 0xc8, 0xde, 0x8c, 0xf3, 0xa5, 0x67, - 0xc1, 0xae, 0x81, 0x16, 0x1d, - }, - { - 0x4c, 0x24, 0x49, 0x56, 0x7c, 0x08, 0x67, 0xc9, 0xf4, - 0x3b, 0x75, 0x28, 0x60, 0xe3, 0x4b, 0xde, - }, - { - 0x09, 0x41, 0x7a, 0x19, 0x12, 0xef, 0xc0, 0x14, 0x65, - 0xa8, 0x68, 0x2f, 0xf7, 0x13, 0x78, 0x70, 0x65, 0x24, - 0xb4, 0x6a, 0x0c, 0x27, 0x22, 0x0e, 0x9e, 0x40, 0xec, - 0x43, 0x07, 0x3c, 0x56, 0x3c, - }, - { - 0x54, 0x8a, 0x97, 0xb1, 0x12, 0xab, 0x6c, 0xcb, 0x57, - 0x8d, 0xd7, 0x75, 0x99, 0xdf, 0x0c, 0xac, 0xde, 0x33, - 0x2a, 0xc1, 0xa6, 0x00, 0x88, 0xdc, 0x01, 0x8d, 0x18, - 0x38, 0x75, 0xb6, 0x1c, 0x51, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb2, 0x00, 0xd6, 0x98, 0xfc, 0x72, 0xf0, 0x1e, 0x97, - 0x09, 0xe5, 0x3a, 0x0c, 0xa4, 0x82, 0xed, 0x3b, 0xe1, - 0x0e, 0x27, 0x72, 0x96, 0x42, 0x4c, 0xef, 0xd1, 0x10, - 0x72, 0xc7, 0xb1, 0x9b, 0xdd, 0xf7, 0x0f, 0xf1, 0x37, - 0xc9, 0x56, 0xe4, 0xd1, 0x1d, 0x8e, 0xb1, 0xeb, 0x29, - 0xbb, 0xe4, 0x97, 0x9c, 0xba, 0x9e, 0x2e, 0xb9, 0x41, - 0xf5, 0x29, 0xea, 0x96, 0x84, 0xce, 0xc6, 0x61, 0x4a, - 0x5f, 0x8c, 0x30, 0x95, 0x0d, 0x95, 0x44, 0x14, 0x8f, - 0xc4, 0xc9, 0x2b, 0xb8, 0xb7, 0xba, 0x89, 0x9e, 0x72, - 0x17, 0x48, 0xa1, 0xd6, 0xbf, 0x5e, 0x8b, 0xb6, 0x42, - 0x9b, 0xa9, 0x02, 0x0e, 0x08, 0x9a, 0x7c, 0x1e, 0x91, - 0x0c, 0x8f, 0xc7, 0x08, 0xe0, 0x2b, 0xe7, 0x5e, 0xfb, - 0x89, 0xf0, 0x0d, 0x6f, 0x8b, 0x52, 0x05, 0x40, 0x62, - 0xe4, 0x33, 0x43, 0xa6, 0x0d, 0xee, 0xd3, 0x9c, 0xd8, - 0x75, 0x6a, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(115, &vec); - - return result; -} - -unsigned int test_116(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x79, 0xad, 0xc5, 0xce, 0xae, 0xf7, 0x71, 0x10, 0x24, - 0x01, 0xac, 0xc2, 0xfc, 0xb3, 0xd0, 0x1d, 0x9b, 0xf7, - 0x54, 0x1e, 0xd8, 0x6e, 0x8a, 0xa1, 0x6c, 0x93, 0x8d, - 0x95, 0x56, 0x82, 0x9a, 0x8e, - }, - { - 0x37, 0x9d, 0x9a, 0xeb, 0xe0, 0xbd, 0xbc, 0xa0, 0x7c, - 0x77, 0x4b, 0x5e, 0xf1, 0xee, 0x73, 0x2d, - }, - { - 0x8b, 0x13, 0x32, 0x6a, 0x52, 0x19, 0x57, 0xed, 0xe0, - 0x04, 0x23, 0x5c, 0xd1, 0x38, 0x76, 0x7b, 0x7f, 0x45, - 0xf5, 0x50, 0xf2, 0xfc, 0x55, 0xb1, 0xf6, 0x7c, 0xdc, - 0xc7, 0x09, 0x23, 0x81, 0x1d, - }, - { - 0xe2, 0x68, 0xce, 0xa9, 0xdd, 0xeb, 0x0c, 0xca, 0x53, - 0x88, 0xe1, 0x24, 0x17, 0xd9, 0x0c, 0x7f, 0xab, 0x62, - 0x9b, 0x2b, 0x2c, 0x14, 0x4d, 0xdc, 0x80, 0x54, 0xd0, - 0x42, 0x10, 0x58, 0x67, 0x14, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0x00, 0x8f, 0xed, 0xe4, 0x41, 0xe5, 0x50, 0x95, 0x5d, - 0x75, 0x9c, 0x89, 0x22, 0x93, 0x59, 0xf6, 0xa0, 0x6e, - 0xc2, 0xc0, 0x6c, 0xe2, 0xdc, 0xf4, 0x2b, 0xb7, 0x2f, - 0x25, 0x5c, 0x28, 0xed, 0x75, 0x8b, 0x38, 0xa5, 0xf7, - 0xf7, 0xea, 0x94, 0x51, 0xa1, 0xc9, 0xb7, 0xa6, 0x88, - 0xd3, 0x79, 0xc9, 0xd3, 0x6f, 0xa7, 0xc8, 0x6e, 0xb1, - 0x1b, 0x67, 0xf4, 0xe3, 0xb9, 0x83, 0xfe, 0x4b, 0x42, - 0x15, 0x9f, 0xa6, 0x23, 0xf5, 0x5e, 0xea, 0x9f, 0xb1, - 0xff, 0x36, 0x76, 0xad, 0x54, 0x7d, 0xf4, 0x69, 0x60, - 0x7a, 0x03, 0xe8, 0xf8, 0x32, 0x26, 0x79, 0x68, 0xc8, - 0x38, 0x8b, 0x2d, 0xb8, 0x49, 0x16, 0x6a, 0x98, 0xa9, - 0x8a, 0xef, 0x8d, 0x9e, 0x25, 0x88, 0x8b, 0x1f, 0x6a, - 0xec, 0x3d, 0x66, 0xa0, 0x26, 0x35, 0x32, 0x59, 0xbd, - 0xa9, 0x02, 0xdf, 0x45, 0x5e, 0x6d, 0x2d, 0x52, 0x2c, - 0xde, 0xd4, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(116, &vec); - - return result; -} - -unsigned int test_117(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x37, 0x6d, 0xfb, 0x59, 0x42, 0x41, 0x45, 0x42, 0x0a, - 0xc6, 0x59, 0x67, 0x14, 0x5f, 0x6f, 0xa5, 0x1a, 0xac, - 0xec, 0x27, 0xbe, 0xa1, 0xd3, 0xf9, 0xf8, 0xb7, 0x61, - 0x6f, 0xcb, 0x36, 0xf7, 0x3b, - }, - { - 0x56, 0x4c, 0x1c, 0xb8, 0x2b, 0xef, 0x2b, 0xdc, 0x2c, - 0x69, 0x99, 0x55, 0xbd, 0x2b, 0x07, 0x77, - }, - { - 0xa0, 0x83, 0x9d, 0xaa, 0xac, 0xe6, 0xff, 0x20, 0x9f, - 0xba, 0x71, 0xc6, 0xbb, 0xba, 0x05, 0x84, 0x49, 0x7c, - 0xff, 0x77, 0x5d, 0x86, 0x50, 0x72, 0x28, 0x71, 0x7b, - 0x57, 0x6f, 0x3d, 0x5e, 0xd2, - }, - { - 0x23, 0x0d, 0xa7, 0x2e, 0x74, 0x36, 0x7d, 0x92, 0x10, - 0x77, 0xb7, 0xc3, 0x8c, 0x11, 0xeb, 0x9e, 0x17, 0x13, - 0x1f, 0x7e, 0xe4, 0xff, 0x58, 0x0e, 0xd8, 0x83, 0x53, - 0x0d, 0xac, 0xf3, 0x41, 0x99, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xa7, 0xfe, 0xff, 0x8c, 0x68, 0x59, 0xff, 0x3d, 0x69, - 0x54, 0x3b, 0xe6, 0x16, 0x57, 0xc8, 0xc1, 0x9b, 0xe1, - 0x2b, 0x9f, 0x2b, 0x53, 0x48, 0xb9, 0x4f, 0x23, 0x70, - 0x04, 0x43, 0x7a, 0x20, 0xc6, 0xbe, 0x86, 0x19, 0xd5, - 0x31, 0x00, 0x5f, 0xc4, 0x7f, 0xcd, 0x6a, 0x1f, 0x07, - 0x38, 0x0f, 0xca, 0x90, 0x75, 0xfb, 0x11, 0x48, 0xf5, - 0xe3, 0xe1, 0x57, 0x16, 0x99, 0x8c, 0x12, 0x68, 0xba, - 0xc9, 0x72, 0xf9, 0x4e, 0x1b, 0x3e, 0xdb, 0x89, 0xe2, - 0x86, 0xa7, 0xb3, 0x6a, 0x53, 0xc0, 0x21, 0xfc, 0xa6, - 0x04, 0x53, 0xd7, 0xfb, 0x03, 0xa4, 0xeb, 0x00, 0x96, - 0x0d, 0xe3, 0x1c, 0x45, 0x8b, 0x37, 0x79, 0x86, 0xaf, - 0x33, 0xfc, 0xfc, 0xef, 0xa7, 0xf6, 0xc9, 0x38, 0xc7, - 0xfc, 0x61, 0x83, 0x37, 0xd4, 0xec, 0x8b, 0xd9, 0x42, - 0xb2, 0x3a, 0xb0, 0x1b, 0xb3, 0xb3, 0xde, 0x27, 0x0c, - 0xc9, 0xa9, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(117, &vec); - - return result; -} - -unsigned int test_118(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0xfd, 0xbe, 0xe9, 0xba, 0xff, 0x0d, 0x02, 0x17, 0x18, - 0xbc, 0x07, 0x32, 0xce, 0x5b, 0x2e, 0x0b, 0xba, 0x13, - 0x3b, 0xd3, 0x19, 0xb4, 0xc5, 0x37, 0x5c, 0xbe, 0x32, - 0xda, 0x82, 0x74, 0xef, 0x72, - }, - { - 0x68, 0x48, 0xa7, 0x8d, 0xac, 0x81, 0x74, 0x3c, 0x0a, - 0xc4, 0xc1, 0xd7, 0xa0, 0x8b, 0x21, 0xf3, - }, - { - 0xeb, 0xc1, 0xf9, 0x76, 0x83, 0x42, 0x63, 0x2f, 0x57, - 0x6f, 0x7a, 0xf5, 0x03, 0x69, 0x95, 0x98, 0xd1, 0x3b, - 0xba, 0x5f, 0xcc, 0x8f, 0xfb, 0xe2, 0x94, 0xbd, 0xd1, - 0x6b, 0x8c, 0x86, 0x5f, 0xad, - }, - { - 0xcc, 0x39, 0x27, 0x64, 0x5f, 0x65, 0xf5, 0x46, 0x60, - 0xc1, 0x69, 0xfd, 0x33, 0x94, 0xa3, 0x6a, 0x98, 0x9c, - 0x76, 0x0a, 0x28, 0x7f, 0x23, 0xee, 0x8b, 0xe2, 0x3d, - 0x0b, 0xcd, 0xb2, 0xbf, 0x6c, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xb4, 0x58, 0xae, 0xd8, 0x8a, 0x53, 0xcb, 0x5a, 0x1a, - 0x15, 0x71, 0x97, 0xb3, 0x80, 0x79, 0xcd, 0xa4, 0x55, - 0xbe, 0xdb, 0xc0, 0xe6, 0x9f, 0x7c, 0x66, 0xc1, 0xca, - 0x67, 0xad, 0xec, 0x05, 0xa4, 0x11, 0x71, 0x53, 0x09, - 0x58, 0x2c, 0x7a, 0x2d, 0x57, 0x09, 0xa4, 0xd6, 0xf2, - 0x7c, 0x70, 0x68, 0x66, 0x27, 0xad, 0xec, 0xc6, 0x8f, - 0x3a, 0x20, 0x45, 0xb8, 0xe7, 0xce, 0xd5, 0xb9, 0x2b, - 0x5d, 0xfa, 0x4a, 0x36, 0xe5, 0x55, 0xfd, 0x42, 0x12, - 0xf1, 0xe0, 0x33, 0xd9, 0x4a, 0x52, 0x3b, 0x16, 0xf1, - 0xa4, 0xfb, 0x15, 0xb6, 0x95, 0xd5, 0x8d, 0xf4, 0xa5, - 0xbe, 0x8e, 0xe7, 0xa2, 0xb9, 0xcb, 0xa0, 0xaf, 0x05, - 0xf2, 0x94, 0xcf, 0x0d, 0xaf, 0x54, 0xca, 0xba, 0x5b, - 0xfc, 0xd2, 0x89, 0xc6, 0xf7, 0xd9, 0x78, 0xef, 0xb4, - 0x12, 0x63, 0xc1, 0xba, 0x0d, 0xeb, 0xb0, 0x6b, 0x56, - 0xf3, 0xdc, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(118, &vec); - - return result; -} - -unsigned int test_119(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x0d, 0x10, 0x15, 0xbc, 0xe0, 0xf7, 0xba, 0xc3, 0xc0, - 0x74, 0x20, 0xb4, 0xf3, 0xf9, 0xbe, 0xca, 0x05, 0x64, - 0x87, 0x89, 0x7a, 0xb2, 0x6e, 0x8a, 0xd5, 0xc3, 0x39, - 0x03, 0x6c, 0x87, 0xa7, 0xce, - }, - { - 0xad, 0x72, 0x17, 0x94, 0x44, 0x30, 0x6c, 0x67, 0x7b, - 0xb2, 0x70, 0x9d, 0x1d, 0x46, 0x4e, 0xfc, - }, - { - 0xe8, 0xce, 0x89, 0xf4, 0xb7, 0xe0, 0xcb, 0xb3, 0xa2, - 0xfb, 0x74, 0x79, 0xd9, 0x5e, 0x80, 0xb3, 0x6e, 0xae, - 0x5c, 0x62, 0xd7, 0x23, 0x2f, 0x26, 0xc5, 0xa9, 0x10, - 0x35, 0x99, 0xa4, 0x9b, 0xdd, - }, - { - 0x15, 0x58, 0x98, 0x57, 0x01, 0x04, 0x68, 0xca, 0x37, - 0xcb, 0x83, 0xad, 0xd5, 0x9c, 0xfc, 0x73, 0x3f, 0x6e, - 0x97, 0xf9, 0x53, 0xe2, 0xf8, 0xb8, 0xb9, 0x8f, 0xab, - 0xb8, 0x1f, 0x60, 0x8e, 0x47, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xcd, 0xb7, 0xa1, 0x15, 0x16, 0x1c, 0x33, 0x2a, 0x97, - 0xca, 0xee, 0xa6, 0xeb, 0x7a, 0x6b, 0xfd, 0x29, 0x9a, - 0x76, 0x8a, 0x8f, 0x78, 0x27, 0xdf, 0x16, 0x30, 0x48, - 0xf4, 0xdb, 0xf1, 0x75, 0x0e, 0xe1, 0xe8, 0x4d, 0x52, - 0x1b, 0x80, 0x01, 0xad, 0x7d, 0xbf, 0x97, 0xa8, 0x67, - 0xfb, 0x2b, 0x99, 0xd2, 0x1f, 0x99, 0x52, 0x4b, 0x84, - 0x11, 0x36, 0x36, 0x36, 0xe2, 0xd4, 0x40, 0xe9, 0x4f, - 0x26, 0xf2, 0xdd, 0x93, 0x51, 0x6e, 0x08, 0x96, 0x4d, - 0x29, 0x1f, 0x49, 0x96, 0x1a, 0xd2, 0xf3, 0xfa, 0x21, - 0xf6, 0xac, 0x7a, 0x00, 0xda, 0x08, 0xdb, 0xd8, 0x3c, - 0x52, 0x02, 0x31, 0xa9, 0x7e, 0x48, 0x29, 0xf6, 0x76, - 0xfb, 0xc1, 0x87, 0x17, 0xab, 0xce, 0xdc, 0x4d, 0xee, - 0x2a, 0x41, 0x44, 0x0d, 0x57, 0x97, 0xab, 0x01, 0x45, - 0x37, 0xa4, 0x2f, 0x59, 0x53, 0xa9, 0x59, 0x53, 0x5b, - 0x3c, 0x81, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(119, &vec); - - return result; -} - -unsigned int test_120(void) -{ - unsigned int result = TC_PASS; - const struct hmac_prng_test_vector vec = { - 32, - 16, - 32, - 0, - 128, - { - 0x92, 0x84, 0xfd, 0x46, 0x60, 0xbe, 0xb7, 0xa1, 0x54, - 0x34, 0x9d, 0x74, 0xe2, 0xad, 0x84, 0x42, 0xa5, 0xac, - 0x06, 0x67, 0xac, 0x4d, 0x28, 0xda, 0xf0, 0x52, 0x9d, - 0xac, 0x5c, 0x80, 0x5a, 0x21, - }, - { - 0xaf, 0xe9, 0x6e, 0x33, 0xc6, 0xd5, 0xbe, 0xf1, 0x65, - 0x28, 0x21, 0xde, 0xdb, 0x96, 0x41, 0x83, - }, - { - 0x1b, 0x34, 0x19, 0xbe, 0xc2, 0x51, 0x35, 0x31, 0xfa, - 0x5f, 0xaf, 0xb4, 0x27, 0x85, 0xeb, 0x07, 0xec, 0x01, - 0xb6, 0x1a, 0x1e, 0x06, 0x45, 0x28, 0x08, 0xb2, 0x27, - 0xf5, 0xf5, 0xc8, 0x73, 0xcf, - }, - { - 0xf4, 0x94, 0x2b, 0x20, 0xa4, 0x25, 0x89, 0xa2, 0x2e, - 0x1b, 0x3b, 0x22, 0x14, 0x33, 0x6d, 0x1b, 0xa3, 0xb1, - 0x17, 0x53, 0x93, 0x7b, 0x93, 0xf1, 0xd7, 0xc3, 0x63, - 0x6b, 0x34, 0x6d, 0x70, 0xa1, - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - }, - { - 0xf0, 0xb8, 0x7f, 0x8c, 0x3c, 0x67, 0xf4, 0xdf, 0x3c, - 0xc6, 0x13, 0xc3, 0xc6, 0x79, 0x99, 0x67, 0x59, 0x51, - 0x17, 0x7c, 0x2d, 0x7d, 0x64, 0x6e, 0xc0, 0x3e, 0x52, - 0x22, 0x67, 0xea, 0x1d, 0x39, 0xd4, 0x20, 0x60, 0xd8, - 0xb1, 0x57, 0x77, 0x4a, 0xf7, 0xad, 0x7f, 0xd7, 0xf8, - 0x51, 0xf9, 0xc1, 0x3a, 0xaf, 0xa5, 0x6a, 0x64, 0xd7, - 0xc0, 0xff, 0x86, 0xc8, 0xdd, 0x95, 0x88, 0xf6, 0x9c, - 0x6e, 0x7a, 0x96, 0x80, 0x75, 0x9b, 0xc1, 0xb6, 0x02, - 0x79, 0x8b, 0x23, 0x95, 0x9f, 0xe5, 0x4f, 0xf4, 0xbd, - 0x2c, 0xe2, 0xd8, 0xed, 0xe7, 0x29, 0x8f, 0x68, 0x80, - 0x1a, 0xad, 0x61, 0x97, 0x74, 0x85, 0xe0, 0xac, 0xba, - 0xde, 0xec, 0xf4, 0x7b, 0x7e, 0xb3, 0x0e, 0x92, 0xf4, - 0x06, 0xd9, 0x73, 0xe3, 0x26, 0x51, 0x8d, 0xb3, 0xaf, - 0x0e, 0xa0, 0x6e, 0xa5, 0x74, 0xba, 0x7b, 0x01, 0x61, - 0xab, 0xf2, - } - }; - - TC_PRINT("."); - result = do_hmac_prng_pr_false_test(120, &vec); - - return result; -} - - -ZTEST(hmac_prng_fn, test_hmac_prng) -{ - unsigned int result = TC_PASS; - - - result = test_1(); - zassert_false(result == TC_FAIL, "HMAC test 1 failed"); - - result = test_2(); - zassert_false(result == TC_FAIL, "HMAC test 2 failed"); - - result = test_3(); - zassert_false(result == TC_FAIL, "HMAC test 3 failed"); - - result = test_4(); - zassert_false(result == TC_FAIL, "HMAC test 4 failed"); - - result = test_5(); - zassert_false(result == TC_FAIL, "HMAC test 5 failed"); - - result = test_6(); - zassert_false(result == TC_FAIL, "HMAC test 6 failed"); - - result = test_7(); - zassert_false(result == TC_FAIL, "HMAC test 7 failed"); - - result = test_8(); - zassert_false(result == TC_FAIL, "HMAC test 8 failed"); - - result = test_9(); - zassert_false(result == TC_FAIL, "HMAC test 9 failed"); - - result = test_10(); - zassert_false(result == TC_FAIL, "HMAC test 10 failed"); - - result = test_11(); - zassert_false(result == TC_FAIL, "HMAC test 11 failed"); - - result = test_12(); - zassert_false(result == TC_FAIL, "HMAC test 12 failed"); - - result = test_13(); - zassert_false(result == TC_FAIL, "HMAC test 13 failed"); - - result = test_14(); - zassert_false(result == TC_FAIL, "HMAC test 14 failed"); - - result = test_15(); - zassert_false(result == TC_FAIL, "HMAC test 15 failed"); - - result = test_16(); - zassert_false(result == TC_FAIL, "HMAC test 16 failed"); - - result = test_17(); - zassert_false(result == TC_FAIL, "HMAC test 17 failed"); - - result = test_18(); - zassert_false(result == TC_FAIL, "HMAC test 18 failed"); - - result = test_19(); - zassert_false(result == TC_FAIL, "HMAC test 19 failed"); - - result = test_20(); - zassert_false(result == TC_FAIL, "HMAC test 20 failed"); - - result = test_21(); - zassert_false(result == TC_FAIL, "HMAC test 21 failed"); - - result = test_22(); - zassert_false(result == TC_FAIL, "HMAC test 22 failed"); - - result = test_23(); - zassert_false(result == TC_FAIL, "HMAC test 23 failed"); - - result = test_24(); - zassert_false(result == TC_FAIL, "HMAC test 24 failed"); - - result = test_25(); - zassert_false(result == TC_FAIL, "HMAC test 25 failed"); - - result = test_26(); - zassert_false(result == TC_FAIL, "HMAC test 26 failed"); - - result = test_27(); - zassert_false(result == TC_FAIL, "HMAC test 27 failed"); - - result = test_28(); - zassert_false(result == TC_FAIL, "HMAC test 28 failed"); - - result = test_29(); - zassert_false(result == TC_FAIL, "HMAC test 29 failed"); - - result = test_30(); - zassert_false(result == TC_FAIL, "HMAC test 30 failed"); - - result = test_31(); - zassert_false(result == TC_FAIL, "HMAC test 31 failed"); - - result = test_32(); - zassert_false(result == TC_FAIL, "HMAC test 32 failed"); - - result = test_33(); - zassert_false(result == TC_FAIL, "HMAC test 33 failed"); - - result = test_34(); - zassert_false(result == TC_FAIL, "HMAC test 34 failed"); - - result = test_35(); - zassert_false(result == TC_FAIL, "HMAC test 35 failed"); - - result = test_36(); - zassert_false(result == TC_FAIL, "HMAC test 36 failed"); - - result = test_37(); - zassert_false(result == TC_FAIL, "HMAC test 37 failed"); - - result = test_38(); - zassert_false(result == TC_FAIL, "HMAC test 38 failed"); - - result = test_39(); - zassert_false(result == TC_FAIL, "HMAC test 39 failed"); - - result = test_40(); - zassert_false(result == TC_FAIL, "HMAC test 40 failed"); - - result = test_41(); - zassert_false(result == TC_FAIL, "HMAC test 41 failed"); - - result = test_42(); - zassert_false(result == TC_FAIL, "HMAC test 42 failed"); - - result = test_43(); - zassert_false(result == TC_FAIL, "HMAC test 43 failed"); - - result = test_44(); - zassert_false(result == TC_FAIL, "HMAC test 44 failed"); - - result = test_45(); - zassert_false(result == TC_FAIL, "HMAC test 45 failed"); - - result = test_46(); - zassert_false(result == TC_FAIL, "HMAC test 46 failed"); - - result = test_47(); - zassert_false(result == TC_FAIL, "HMAC test 47 failed"); - - result = test_48(); - zassert_false(result == TC_FAIL, "HMAC test 48 failed"); - - result = test_49(); - zassert_false(result == TC_FAIL, "HMAC test 49 failed"); - - result = test_50(); - zassert_false(result == TC_FAIL, "HMAC test 50 failed"); - - result = test_51(); - zassert_false(result == TC_FAIL, "HMAC test 51 failed"); - - result = test_52(); - zassert_false(result == TC_FAIL, "HMAC test 52 failed"); - - result = test_53(); - zassert_false(result == TC_FAIL, "HMAC test 53 failed"); - - result = test_54(); - zassert_false(result == TC_FAIL, "HMAC test 54 failed"); - - result = test_55(); - zassert_false(result == TC_FAIL, "HMAC test 55 failed"); - - result = test_56(); - zassert_false(result == TC_FAIL, "HMAC test 56 failed"); - - result = test_57(); - zassert_false(result == TC_FAIL, "HMAC test 57 failed"); - - result = test_58(); - zassert_false(result == TC_FAIL, "HMAC test 58 failed"); - - result = test_59(); - zassert_false(result == TC_FAIL, "HMAC test 59 failed"); - - result = test_60(); - zassert_false(result == TC_FAIL, "HMAC test 60 failed"); - - result = test_61(); - zassert_false(result == TC_FAIL, "HMAC test 61 failed"); - - result = test_62(); - zassert_false(result == TC_FAIL, "HMAC test 62 failed"); - - result = test_63(); - zassert_false(result == TC_FAIL, "HMAC test 63 failed"); - - result = test_64(); - zassert_false(result == TC_FAIL, "HMAC test 64 failed"); - - result = test_65(); - zassert_false(result == TC_FAIL, "HMAC test 65 failed"); - - result = test_66(); - zassert_false(result == TC_FAIL, "HMAC test 66 failed"); - - result = test_67(); - zassert_false(result == TC_FAIL, "HMAC test 67 failed"); - - result = test_68(); - zassert_false(result == TC_FAIL, "HMAC test 68 failed"); - - result = test_69(); - zassert_false(result == TC_FAIL, "HMAC test 69 failed"); - - result = test_70(); - zassert_false(result == TC_FAIL, "HMAC test 70 failed"); - - result = test_71(); - zassert_false(result == TC_FAIL, "HMAC test 71 failed"); - - result = test_72(); - zassert_false(result == TC_FAIL, "HMAC test 72 failed"); - - result = test_73(); - zassert_false(result == TC_FAIL, "HMAC test 73 failed"); - - result = test_74(); - zassert_false(result == TC_FAIL, "HMAC test 74 failed"); - - result = test_75(); - zassert_false(result == TC_FAIL, "HMAC test 75 failed"); - - result = test_76(); - zassert_false(result == TC_FAIL, "HMAC test 76 failed"); - - result = test_77(); - zassert_false(result == TC_FAIL, "HMAC test 77 failed"); - - result = test_78(); - zassert_false(result == TC_FAIL, "HMAC test 78 failed"); - - result = test_79(); - zassert_false(result == TC_FAIL, "HMAC test 79 failed"); - - result = test_80(); - zassert_false(result == TC_FAIL, "HMAC test 80 failed"); - - result = test_81(); - zassert_false(result == TC_FAIL, "HMAC test 81 failed"); - - result = test_82(); - zassert_false(result == TC_FAIL, "HMAC test 82 failed"); - - result = test_83(); - zassert_false(result == TC_FAIL, "HMAC test 83 failed"); - - result = test_84(); - zassert_false(result == TC_FAIL, "HMAC test 84 failed"); - - result = test_85(); - zassert_false(result == TC_FAIL, "HMAC test 85 failed"); - - result = test_86(); - zassert_false(result == TC_FAIL, "HMAC test 86 failed"); - - result = test_87(); - zassert_false(result == TC_FAIL, "HMAC test 87 failed"); - - result = test_88(); - zassert_false(result == TC_FAIL, "HMAC test 88 failed"); - - result = test_89(); - zassert_false(result == TC_FAIL, "HMAC test 89 failed"); - - result = test_90(); - zassert_false(result == TC_FAIL, "HMAC test 90 failed"); - - result = test_91(); - zassert_false(result == TC_FAIL, "HMAC test 91 failed"); - - result = test_92(); - zassert_false(result == TC_FAIL, "HMAC test 92 failed"); - - result = test_93(); - zassert_false(result == TC_FAIL, "HMAC test 93 failed"); - - result = test_94(); - zassert_false(result == TC_FAIL, "HMAC test 94 failed"); - - result = test_95(); - zassert_false(result == TC_FAIL, "HMAC test 95 failed"); - - result = test_96(); - zassert_false(result == TC_FAIL, "HMAC test 96 failed"); - - result = test_97(); - zassert_false(result == TC_FAIL, "HMAC test 97 failed"); - - result = test_98(); - zassert_false(result == TC_FAIL, "HMAC test 98 failed"); - - result = test_99(); - zassert_false(result == TC_FAIL, "HMAC test 99 failed"); - - result = test_100(); - zassert_false(result == TC_FAIL, "HMAC test 100 failed"); - - result = test_101(); - zassert_false(result == TC_FAIL, "HMAC test 101 failed"); - - result = test_102(); - zassert_false(result == TC_FAIL, "HMAC test 102 failed"); - - result = test_103(); - zassert_false(result == TC_FAIL, "HMAC test 103 failed"); - - result = test_104(); - zassert_false(result == TC_FAIL, "HMAC test 104 failed"); - - result = test_105(); - zassert_false(result == TC_FAIL, "HMAC test 105 failed"); - - result = test_106(); - zassert_false(result == TC_FAIL, "HMAC test 106 failed"); - - result = test_107(); - zassert_false(result == TC_FAIL, "HMAC test 107 failed"); - - result = test_108(); - zassert_false(result == TC_FAIL, "HMAC test 108 failed"); - - result = test_109(); - zassert_false(result == TC_FAIL, "HMAC test 109 failed"); - - result = test_110(); - zassert_false(result == TC_FAIL, "HMAC test 110 failed"); - - result = test_111(); - zassert_false(result == TC_FAIL, "HMAC test 111 failed"); - - result = test_112(); - zassert_false(result == TC_FAIL, "HMAC test 112 failed"); - - result = test_113(); - zassert_false(result == TC_FAIL, "HMAC test 113 failed"); - - result = test_114(); - zassert_false(result == TC_FAIL, "HMAC test 114 failed"); - - result = test_115(); - zassert_false(result == TC_FAIL, "HMAC test 115 failed"); - - result = test_116(); - zassert_false(result == TC_FAIL, "HMAC test 116 failed"); - - result = test_117(); - zassert_false(result == TC_FAIL, "HMAC test 117 failed"); - - result = test_118(); - zassert_false(result == TC_FAIL, "HMAC test 118 failed"); - - result = test_119(); - zassert_false(result == TC_FAIL, "HMAC test 119 failed"); - - result = test_120(); - zassert_false(result == TC_FAIL, "HMAC test 120 failed"); - - TC_PRINT("\n"); - TC_PRINT("All HMAC-PRNG tests succeeded!\n"); -} - -ZTEST_SUITE(hmac_prng_fn, NULL, NULL, NULL, NULL, NULL); diff --git a/tests/crypto/tinycrypt_hmac_prng/testcase.yaml b/tests/crypto/tinycrypt_hmac_prng/testcase.yaml deleted file mode 100644 index 62f7eee9d9395..0000000000000 --- a/tests/crypto/tinycrypt_hmac_prng/testcase.yaml +++ /dev/null @@ -1,15 +0,0 @@ -tests: - crypto.tinycrypt.hmac_prng: - tags: - - tinycrypt - - crypto - - sha256 - - hmac - - prng - platform_exclude: - - mec15xxevb_assy6853 - - mec1501modular_assy6885 - - m2gl025_miv - integration_platforms: - - native_sim - toolchain_exclude: xcc diff --git a/west.yml b/west.yml index 1482b3b3e42ca..b878ec4fce44e 100644 --- a/west.yml +++ b/west.yml @@ -310,7 +310,7 @@ manifest: groups: - crypto - name: mcuboot - revision: 4eba8087fa606db801455f14d185255bc8c49467 + revision: pull/132/head path: bootloader/mcuboot groups: - bootloader @@ -349,11 +349,6 @@ manifest: path: modules/debug/segger groups: - debug - - name: tinycrypt - revision: 1012a3ebee18c15ede5efc8332ee2fc37817670f - path: modules/crypto/tinycrypt - groups: - - crypto - name: trusted-firmware-a revision: 713ffbf96c5bcbdeab757423f10f73eb304eff07 path: modules/tee/tf-a/trusted-firmware-a