Merge branch 'test/combined_ecc_mpi_hmac_ds_hal_verification_app' into 'master'

Create a combined security peripherals hal verification appliaction

See merge request espressif/esp-idf!23718
This commit is contained in:
Mahavir Jain 2023-05-23 11:27:53 +08:00
commit 8c1369f3aa
35 changed files with 2629 additions and 177 deletions

View File

@ -1,14 +0,0 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
components/hal/test_apps/ecc:
disable:
- if: SOC_ECC_SUPPORTED != 1
disable_test:
- if: IDF_TARGET == "esp32c2"
temporary: true
reason: C2 ECC peripheral has a bug in ECC point verification, if value of K is zero the verification fails
components/hal/test_apps/mpi:
disable:
- if: SOC_MPI_SUPPORTED != 1
reason: Hardware MPI support not available for such targets.

View File

@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.16)
set(COMPONENTS main)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ecc_test)
project(crypto_test)

View File

@ -0,0 +1,102 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
## Crypto peripherals test
This is a combined crypto peripherals verification application using mostly HAL APIs. This application is intentionally kept simple and does not use any higher layer constructs. This application can help in the early verification of the new SoC.
This contains tests for the following features of the crypto peripherals:
- MPI peripheral
- MPI Modular Multiplication
- MPI Multiplication
- MPI Modular Exponentiation
- ECC peripheral
- ECC Point multiplication for P192 and P256 curve
- ECC Point verification for P192 and P256 curve
- ECC Point verify and multiply for P192 and P256 curve
- ECC Inverse multiplication for P192 and P256
If the hardware supports extended work modes then it also tests:
- ECC Jacobian multiplication for P192 and P256 curve
- ECC Jacobian verification for P192 and P256 curve
- ECC Point verification and Jacobian multiplication for P192 and P256 curve
- ECC Point addition for P192 and P256 curve
- Mod addition
- Mod subtraction
- Mod multiplication
- HMAC periperhal
- HMAC 'downstream' JTAG Enable mode
- HMAC 'downstream' JTAG Disable
- HMAC 'upstream' MAC generation with zeroes
- HMAC 'upstream' MAC generation from data
- DS peripheral
- Digital Signature Parameter Encryption
- Digital Signature wrong HMAC key purpose
- Digital Signature Blocking wrong HMAC key purpose
- Digital Signature Operation
- Digital Signature Blocking Operation
- Digital Signature Invalid Data
- ECDSA peripheral
- ECDSA P192 signature generation
- ECDSA P256 signature generation
- ECDSA P192 signature verification
- ECDSA P256 signature verification
> **_NOTE:_** The verification tests for the HMAC and Digital Signature peripherals would get exercised in only in an FPGA environment.
# Burning the HMAC key
The HMAC tests need an HMAC key to be burned in the `BLOCK_KEY3` and `BLOCK_KEY4` of the efuses. As this verification application is independent of the efuse component, the user needs to manually burn the keys and their key purposes using `espefuse.py`.
```bash
espefuse.py -p $ESPPORT burn_key BLOCK_KEY3 hmac_key.bin HMAC_DOWN_JTAG
espefuse.py -p $ESPPORT burn_key BLOCK_KEY4 hmac_key.bin HMAC_UP
```
# Burning the HMAC keys for Digital Signature tests
The tests needs some HMAC keys to be burned in the `BLOCK_KEY1`, `BLOCK_KEY2` and `BLOCK_KEY3` of the efuses. As this verification application is independent of the efuse component, the user needs to manually burn the keys and their key purposes using `espefuse.py`.
```bash
espefuse.py -p $ESPPORT burn_key BLOCK_KEY1 ds_key1.bin HMAC_DOWN_DIGITAL_SIGNATURE --no-read-protect --no-write-protect --do-not-confirm
espefuse.py -p $ESPPORT burn_key BLOCK_KEY2 ds_key2.bin HMAC_DOWN_DIGITAL_SIGNATURE --no-read-protect --no-write-protect --do-not-confirm
espefuse.py -p $ESPPORT burn_key BLOCK_KEY3 ds_key3.bin HMAC_DOWN_DIGITAL_SIGNATURE --no-read-protect --no-write-protect --do-not-confirm
```
# Burning the ECDSA keys
The ECDSA tests need some ECDSA keys to be burned in the `BLOCK_KEY1` and `BLOCK_KEY2` of the efuses. As this verification application is independent of the efuse component, the user needs to manually burn the keys and their key purposes using `espefuse.py`.
```bash
espefuse.py -p $ESPPORT burn_key BLOCK_KEY1 ecdsa192_priv_key.pem ECDSA_KEY --no-read-protect --no-write-protect --do-not-confirm
espefuse.py -p $ESPPORT burn_key BLOCK_KEY2 ecdsa256_priv_key.pem ECDSA_KEY --no-read-protect --no-write-protect --do-not-confirm
```
# Building
```bash
idf.py set-target <TARGET>
idf.py build
```
# Running the app manually
```bash
idf.py flash monitor
```
Enter the test that you want to run locally
# Running tests
```bash
pytest --target <TARGET>
```

View File

@ -0,0 +1,25 @@
set(srcs "app_main.c")
if(CONFIG_SOC_MPI_SUPPORTED)
list(APPEND srcs "mpi/test_mpi.c")
endif()
if(CONFIG_SOC_ECC_SUPPORTED)
list(APPEND srcs "ecc/test_ecc.c")
endif()
if(CONFIG_SOC_HMAC_SUPPORTED)
list(APPEND srcs "hmac/test_hmac.c")
endif()
if(CONFIG_SOC_DIG_SIGN_SUPPORTED)
list(APPEND srcs "ds/test_ds.c")
endif()
if(CONFIG_SOC_ECDSA_SUPPORTED)
list(APPEND srcs "ecdsa/test_ecdsa.c")
endif()
idf_component_register(SRCS ${srcs}
REQUIRES test_utils unity
WHOLE_ARCHIVE)

View File

@ -0,0 +1,40 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include "unity_fixture.h"
#include "unity_fixture_extras.h"
static void run_all_tests(void)
{
#if CONFIG_SOC_MPI_SUPPORTED
RUN_TEST_GROUP(mpi);
#endif
#if CONFIG_SOC_ECC_SUPPORTED
RUN_TEST_GROUP(ecc);
#endif
#if CONFIG_IDF_ENV_FPGA
#if CONFIG_SOC_HMAC_SUPPORTED
RUN_TEST_GROUP(hmac);
#endif
#if CONFIG_SOC_DIG_SIGN_SUPPORTED
RUN_TEST_GROUP(ds);
#endif
#if CONFIG_SOC_ECDSA_SUPPORTED
RUN_TEST_GROUP(ecdsa)
#endif
#endif /* CONFIG_IDF_ENV_FPGA */
}
void app_main(void)
{
UNITY_MAIN_FUNC(run_all_tests);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(^$\“Wu;-€1MoâUN,ÍŐěú“¬čW<C48D>“źKů

Binary file not shown.

View File

@ -0,0 +1 @@
­Hú̸ܰCŐ1sŞëJ‡$t a@‡˛÷Ą!˝‚

View File

@ -0,0 +1,540 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "memory_checks.h"
#include "unity_fixture.h"
#include "soc/soc_caps.h"
typedef enum {
HMAC_KEY0 = 0,
HMAC_KEY1,
HMAC_KEY2,
HMAC_KEY3,
HMAC_KEY4,
HMAC_KEY5,
HMAC_KEY_MAX
} hmac_key_id_t;
#if CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/efuse.h"
#include "esp32s2/rom/digital_signature.h"
#include "esp32s2/rom/aes.h"
#include "esp32s2/rom/sha.h"
#include "esp32s2/rom/hmac.h"
#include "soc/soc_memory_layout.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/efuse.h"
#include "esp32c3/rom/digital_signature.h"
#include "esp32c3/rom/hmac.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/efuse.h"
#include "esp32s3/rom/digital_signature.h"
#include "esp32s3/rom/aes.h"
#include "esp32s3/rom/sha.h"
#elif CONFIG_IDF_TARGET_ESP32C6
#include "esp32c6/rom/efuse.h"
#include "esp32c6/rom/digital_signature.h"
#include "esp32c6/rom/aes.h"
#include "esp32c6/rom/sha.h"
#elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/rom/efuse.h"
#include "esp32h2/rom/digital_signature.h"
#include "esp32h2/rom/aes.h"
#include "esp32h2/rom/sha.h"
#endif
#define ESP_ERR_HW_CRYPTO_DS_HMAC_FAIL (0x1) /*!< HMAC peripheral problem */
#define ESP_ERR_HW_CRYPTO_DS_INVALID_KEY (0x2) /*!< given HMAC key isn't correct, HMAC peripheral problem */
#define ESP_ERR_HW_CRYPTO_DS_INVALID_DIGEST (0x4) /*!< message digest check failed, result is invalid */
#define ESP_ERR_HW_CRYPTO_DS_INVALID_PADDING (0x5) /*!< padding check failed, but result is produced anyway and can be read*/
#define ESP_DS_IV_BIT_LEN 128
#define ESP_DS_IV_LEN (ESP_DS_IV_BIT_LEN / 8)
#define ESP_DS_SIGNATURE_MAX_BIT_LEN SOC_RSA_MAX_BIT_LEN
#define ESP_DS_SIGNATURE_MD_BIT_LEN 256
#define ESP_DS_SIGNATURE_M_PRIME_BIT_LEN 32
#define ESP_DS_SIGNATURE_L_BIT_LEN 32
#define ESP_DS_SIGNATURE_PADDING_BIT_LEN 64
#define ESP_DS_C_LEN (((ESP_DS_SIGNATURE_MAX_BIT_LEN * 3 \
+ ESP_DS_SIGNATURE_MD_BIT_LEN \
+ ESP_DS_SIGNATURE_M_PRIME_BIT_LEN \
+ ESP_DS_SIGNATURE_L_BIT_LEN \
+ ESP_DS_SIGNATURE_PADDING_BIT_LEN) / 8))
typedef enum {
ESP_DS_RSA_1024 = (1024 / 32) - 1,
ESP_DS_RSA_2048 = (2048 / 32) - 1,
ESP_DS_RSA_3072 = (3072 / 32) - 1,
ESP_DS_RSA_4096 = (4096 / 32) - 1
} esp_digital_signature_length_t;
typedef struct esp_digital_signature_data {
esp_digital_signature_length_t rsa_length;
uint32_t iv[ESP_DS_IV_BIT_LEN / 32];
uint8_t c[ESP_DS_C_LEN];
} esp_ds_data_t;
typedef struct {
uint32_t Y[ESP_DS_SIGNATURE_MAX_BIT_LEN / 32];
uint32_t M[ESP_DS_SIGNATURE_MAX_BIT_LEN / 32];
uint32_t Rb[ESP_DS_SIGNATURE_MAX_BIT_LEN / 32];
uint32_t M_prime;
uint32_t length;
} esp_ds_p_data_t;
#define NUM_RESULTS 10
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
#define DS_MAX_BITS (4096)
#else
#define DS_MAX_BITS (ETS_DS_MAX_BITS)
#endif
typedef struct {
uint8_t iv[ETS_DS_IV_LEN];
ets_ds_p_data_t p_data;
uint8_t expected_c[ETS_DS_C_LEN];
uint8_t hmac_key_idx;
uint32_t expected_results[NUM_RESULTS][DS_MAX_BITS / 32];
} encrypt_testcase_t;
#if DS_MAX_BITS == 4096
#define RSA_LEN (ESP_DS_RSA_4096)
#include "digital_signature_test_cases_4096.h"
#elif DS_MAX_BITS == 3072
#define RSA_LEN (ESP_DS_RSA_3072)
#include "digital_signature_test_cases_3072.h"
#endif
_Static_assert(NUM_RESULTS == NUM_MESSAGES, "expected_results size should be the same as NUM_MESSAGES in generated header");
#if !CONFIG_IDF_TARGET_ESP32S2
#include "esp_private/periph_ctrl.h"
#include "hal/ds_hal.h"
#include "hal/ds_ll.h"
#include "hal/hmac_hal.h"
static void ds_acquire_enable(void)
{
periph_module_enable(PERIPH_HMAC_MODULE);
periph_module_enable(PERIPH_SHA_MODULE);
periph_module_enable(PERIPH_DS_MODULE);
hmac_hal_start();
}
static void ds_disable_release(void)
{
ds_hal_finish();
periph_module_disable(PERIPH_DS_MODULE);
periph_module_disable(PERIPH_SHA_MODULE);
periph_module_disable(PERIPH_HMAC_MODULE);
}
static esp_err_t esp_ds_start_sign(const void *message, const esp_ds_data_t *data, hmac_key_id_t key_id)
{
ds_acquire_enable();
uint32_t conf_error = hmac_hal_configure(HMAC_OUTPUT_DS, key_id);
if (conf_error) {
ds_disable_release();
return ESP_ERR_HW_CRYPTO_DS_HMAC_FAIL;
}
ds_hal_start();
while (ds_hal_busy() != 0) { }
size_t rsa_len = (data->rsa_length + 1) * 4;
ds_hal_write_private_key_params(data->c);
ds_hal_configure_iv((uint32_t *)data->iv);
ds_hal_write_message(message, rsa_len);
ds_hal_start_sign();
return ESP_OK;
}
static esp_err_t esp_ds_finish_sign(void *signature, const esp_ds_data_t *data)
{
unsigned rsa_len = (data->rsa_length + 1) * 4;
while (ds_hal_busy()) { }
ds_signature_check_t sig_check_result = ds_hal_read_result((uint8_t *) signature, (size_t) rsa_len);
esp_err_t return_value = ESP_OK;
if (sig_check_result == DS_SIGNATURE_MD_FAIL || sig_check_result == DS_SIGNATURE_PADDING_AND_MD_FAIL) {
return_value = ESP_ERR_HW_CRYPTO_DS_INVALID_DIGEST;
}
if (sig_check_result == DS_SIGNATURE_PADDING_FAIL) {
return_value = ESP_ERR_HW_CRYPTO_DS_INVALID_PADDING;
}
hmac_hal_clean();
ds_disable_release();
return return_value;
}
static esp_err_t esp_ds_sign(const void *message,
const esp_ds_data_t *data,
hmac_key_id_t key_id,
void *signature)
{
esp_err_t result = esp_ds_start_sign(message, data, key_id);
if (result != ESP_OK) {
return result;
}
while (ds_hal_busy()) { }
return esp_ds_finish_sign(signature, data);
}
static esp_err_t esp_ds_encrypt_params(esp_ds_data_t *data,
const void *iv,
const esp_ds_p_data_t *p_data,
const void *key)
{
if (!p_data) {
return ESP_ERR_INVALID_ARG;
}
esp_err_t result = ESP_OK;
periph_module_enable(PERIPH_AES_MODULE);
periph_module_enable(PERIPH_DS_MODULE);
periph_module_enable(PERIPH_SHA_MODULE);
periph_module_enable(PERIPH_HMAC_MODULE);
periph_module_enable(PERIPH_RSA_MODULE);
ets_ds_data_t *ds_data = (ets_ds_data_t *) data;
const ets_ds_p_data_t *ds_plain_data = (const ets_ds_p_data_t *) p_data;
ets_ds_result_t ets_result = ets_ds_encrypt_params(ds_data, iv, ds_plain_data, key, ETS_DS_KEY_HMAC);
if (ets_result == ETS_DS_INVALID_PARAM) {
result = ESP_ERR_INVALID_ARG;
}
periph_module_disable(PERIPH_RSA_MODULE);
periph_module_disable(PERIPH_HMAC_MODULE);
periph_module_disable(PERIPH_SHA_MODULE);
periph_module_disable(PERIPH_DS_MODULE);
periph_module_disable(PERIPH_AES_MODULE);
return result;
}
#else /* !CONFIG_IDF_TARGET_ESP32S2 */
static void ds_acquire_enable(void)
{
ets_hmac_enable();
ets_ds_enable();
}
static void ds_disable_release(void)
{
ets_ds_disable();
ets_hmac_disable();
}
static esp_err_t esp_ds_start_sign(const void *message,
const esp_ds_data_t *data,
hmac_key_id_t key_id)
{
ds_acquire_enable();
int r = ets_hmac_calculate_downstream(ETS_EFUSE_BLOCK_KEY0 + (ets_efuse_block_t) key_id,
ETS_EFUSE_KEY_PURPOSE_HMAC_DOWN_DIGITAL_SIGNATURE);
if (r != ETS_OK) {
ds_disable_release();
return ESP_ERR_HW_CRYPTO_DS_HMAC_FAIL;
}
ets_ds_data_t *ds_data = (ets_ds_data_t *) data;
ets_ds_result_t result = ets_ds_start_sign(message, ds_data);
// ETS_DS_INVALID_PARAM only happens if a parameter is NULL or data->rsa_length is wrong
// We checked all of that already
assert(result != ETS_DS_INVALID_PARAM);
if (result == ETS_DS_INVALID_KEY) {
ds_disable_release();
return ESP_ERR_HW_CRYPTO_DS_INVALID_KEY;
}
return ESP_OK;
}
esp_err_t esp_ds_finish_sign(void *signature, const esp_ds_data_t *data)
{
ets_ds_result_t result = ets_ds_finish_sign(signature, (ets_ds_data_t*) data);
esp_err_t return_value = ESP_OK;
assert(result != ETS_DS_INVALID_PARAM);
if (result == ETS_DS_INVALID_DIGEST) {
return_value = ESP_ERR_HW_CRYPTO_DS_INVALID_DIGEST;
}
if (result == ETS_DS_INVALID_PADDING) {
return_value = ESP_ERR_HW_CRYPTO_DS_INVALID_PADDING;
}
int res = ets_hmac_invalidate_downstream(ETS_EFUSE_KEY_PURPOSE_HMAC_DOWN_DIGITAL_SIGNATURE);
assert(res == ETS_OK); // should not fail if called with correct purpose
(void)res;
ds_disable_release();
return return_value;
}
static esp_err_t esp_ds_sign(const void *message,
const esp_ds_data_t *data,
hmac_key_id_t key_id,
void *signature)
{
esp_err_t result = esp_ds_start_sign(message, data, key_id);
if (result != ESP_OK) {
return result;
}
while (ets_ds_is_busy()) { }
return esp_ds_finish_sign(signature, (void *)data);
}
static esp_err_t esp_ds_encrypt_params(esp_ds_data_t *data,
const void *iv,
const esp_ds_p_data_t *p_data,
const void *key)
{
assert(esp_ptr_internal(p_data) && esp_ptr_word_aligned(p_data));
esp_err_t result = ESP_OK;
ets_aes_enable();
ets_sha_enable();
ets_ds_data_t *ds_data = (ets_ds_data_t *) data;
const ets_ds_p_data_t *ds_plain_data = (const ets_ds_p_data_t *) p_data;
ets_ds_result_t ets_result = ets_ds_encrypt_params(ds_data, iv, ds_plain_data, key, ETS_DS_KEY_HMAC);
if (ets_result == ETS_DS_INVALID_PARAM) {
result = ESP_ERR_INVALID_ARG;
}
ets_sha_disable();
ets_aes_disable();
return result;
}
#endif /* !CONFIG_IDF_TARGET_ESP32S2 */
TEST_GROUP(ds);
TEST_SETUP(ds)
{
test_utils_record_free_mem();
TEST_ESP_OK(test_utils_set_leak_level(0, ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_GENERAL));
}
TEST_TEAR_DOWN(ds)
{
test_utils_finish_and_evaluate_leaks(test_utils_get_leak_level(ESP_LEAK_TYPE_WARNING, ESP_COMP_LEAK_ALL),
test_utils_get_leak_level(ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_ALL));
}
TEST(ds, digital_signature_parameter_encryption)
{
for (int i = 0; i < NUM_CASES; i++) {
printf("Encrypting test case %d...\n", i);
const encrypt_testcase_t *t = &test_cases[i];
esp_ds_data_t result = { };
esp_ds_p_data_t p_data;
memcpy(p_data.Y, t->p_data.Y, DS_MAX_BITS / 8);
memcpy(p_data.M, t->p_data.M, DS_MAX_BITS / 8);
memcpy(p_data.Rb, t->p_data.Rb, DS_MAX_BITS / 8);
p_data.M_prime = t->p_data.M_prime;
p_data.length = t->p_data.length;
esp_err_t r = esp_ds_encrypt_params(&result, t->iv, &p_data,
test_hmac_keys[t->hmac_key_idx]);
printf("Encrypting test case %d done\n", i);
TEST_ASSERT_EQUAL(ESP_OK, r);
TEST_ASSERT_EQUAL(t->p_data.length, result.rsa_length);
TEST_ASSERT_EQUAL_HEX8_ARRAY(t->iv, result.iv, ETS_DS_IV_LEN);
TEST_ASSERT_EQUAL_HEX8_ARRAY(t->expected_c, result.c, ETS_DS_C_LEN);
}
}
// This test uses the HMAC_KEY0 eFuse key which hasn't been burned by burn_hmac_keys().
// HMAC_KEY0 is usually used for HMAC upstream (user access) tests.
TEST(ds, digital_signature_wrong_hmac_key_purpose)
{
esp_ds_data_t ds_data = {};
ds_data.rsa_length = RSA_LEN;
const char *message = "test";
// HMAC fails in that case because it checks for the correct purpose
TEST_ASSERT_EQUAL(ESP_ERR_HW_CRYPTO_DS_HMAC_FAIL, esp_ds_start_sign(message, &ds_data, HMAC_KEY0));
}
// This test uses the HMAC_KEY0 eFuse key which hasn't been burned by burn_hmac_keys().
// HMAC_KEY0 is usually used for HMAC upstream (user access) tests.
TEST(ds, digital_signature_blocking_wrong_hmac_key_purpose)
{
esp_ds_data_t ds_data = {};
ds_data.rsa_length = RSA_LEN;
const char *message = "test";
uint8_t signature_data [128 * 4];
// HMAC fails in that case because it checks for the correct purpose
TEST_ASSERT_EQUAL(ESP_ERR_HW_CRYPTO_DS_HMAC_FAIL, esp_ds_sign(message, &ds_data, HMAC_KEY0, signature_data));
}
TEST(ds, digital_signature_operation)
{
for (int i = 0; i < NUM_CASES; i++) {
printf("Running test case %d...\n", i);
const encrypt_testcase_t *t = &test_cases[i];
// copy encrypt parameter test case into ds_data structure
esp_ds_data_t ds_data = { };
memcpy(ds_data.iv, t->iv, ETS_DS_IV_LEN);
memcpy(ds_data.c, t->expected_c, ETS_DS_C_LEN);
ds_data.rsa_length = t->p_data.length;
for (int j = 0; j < NUM_MESSAGES; j++) {
uint8_t signature[DS_MAX_BITS / 8] = { 0 };
printf(" ... message %d\n", j);
esp_err_t ds_r = esp_ds_start_sign(test_messages[j],
&ds_data,
t->hmac_key_idx + 1);
TEST_ASSERT_EQUAL(ESP_OK, ds_r);
ds_r = esp_ds_finish_sign(signature, &ds_data);
TEST_ASSERT_EQUAL(ESP_OK, ds_r);
TEST_ASSERT_EQUAL_HEX8_ARRAY(t->expected_results[j], signature, sizeof(signature));
}
#if CONFIG_IDF_TARGET_ESP32C3
ets_hmac_invalidate_downstream(ETS_EFUSE_KEY_PURPOSE_HMAC_DOWN_DIGITAL_SIGNATURE);
#endif
}
}
TEST(ds, digital_signature_blocking_operation)
{
for (int i = 0; i < NUM_CASES; i++) {
printf("Running test case %d...\n", i);
const encrypt_testcase_t *t = &test_cases[i];
// copy encrypt parameter test case into ds_data structure
esp_ds_data_t ds_data = { };
memcpy(ds_data.iv, t->iv, ETS_DS_IV_LEN);
memcpy(ds_data.c, t->expected_c, ETS_DS_C_LEN);
ds_data.rsa_length = t->p_data.length;
uint8_t signature[DS_MAX_BITS / 8] = { 0 };
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
esp_err_t ds_r = esp_ds_start_sign(test_messages[0],
&ds_data,
t->hmac_key_idx + 1);
TEST_ASSERT_EQUAL(ESP_OK, ds_r);
ds_r = esp_ds_finish_sign(signature, &ds_data);
TEST_ASSERT_EQUAL(ESP_OK, ds_r);
#elif CONFIG_IDF_TARGET_ESP32C3
esp_err_t ds_r = esp_ds_sign(test_messages[0],
&ds_data,
t->hmac_key_idx + 1,
signature);
TEST_ASSERT_EQUAL(ESP_OK, ds_r);
#endif
TEST_ASSERT_EQUAL_HEX8_ARRAY(t->expected_results[0], signature, sizeof(signature));
}
}
TEST(ds, digital_signature_invalid_data)
{
// Set up a valid test case
const encrypt_testcase_t *t = &test_cases[0];
esp_ds_data_t ds_data = { };
memcpy(ds_data.iv, t->iv, ETS_DS_IV_LEN);
memcpy(ds_data.c, t->expected_c, ETS_DS_C_LEN);
ds_data.rsa_length = t->p_data.length;
uint8_t signature[DS_MAX_BITS / 8] = { 0 };
const uint8_t zero[DS_MAX_BITS / 8] = { 0 };
// Corrupt the IV one bit at a time, rerun and expect failure
for (int bit = 0; bit < 128; bit++) {
printf("Corrupting IV bit %d...\n", bit);
ds_data.iv[bit / 8] ^= 1 << (bit % 8);
esp_err_t ds_r = esp_ds_start_sign(test_messages[0], &ds_data, t->hmac_key_idx + 1);
TEST_ASSERT_EQUAL(ESP_OK, ds_r);
ds_r = esp_ds_finish_sign(signature, &ds_data);
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
TEST_ASSERT_EQUAL(ESP_ERR_HW_CRYPTO_DS_INVALID_DIGEST, ds_r);
#elif CONFIG_IDF_TARGET_ESP32C3
TEST_ASSERT_EQUAL(ESP_ERR_HW_CRYPTO_DS_INVALID_DIGEST, ds_r);
#endif
TEST_ASSERT_EQUAL_HEX8_ARRAY(zero, signature, DS_MAX_BITS / 8);
ds_data.iv[bit / 8] ^= 1 << (bit % 8);
}
// Corrupt encrypted key data one bit at a time, rerun and expect failure
printf("Corrupting C...\n");
for (int bit = 0; bit < ETS_DS_C_LEN * 8; bit++) {
printf("Corrupting C bit %d...\n", bit);
ds_data.c[bit / 8] ^= 1 << (bit % 8);
esp_err_t ds_r = esp_ds_start_sign(test_messages[0], &ds_data, t->hmac_key_idx + 1);
TEST_ASSERT_EQUAL(ESP_OK, ds_r);
ds_r = esp_ds_finish_sign(signature, &ds_data);
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
TEST_ASSERT_EQUAL(ESP_ERR_HW_CRYPTO_DS_INVALID_DIGEST, ds_r);
#elif CONFIG_IDF_TARGET_ESP32C3
TEST_ASSERT_EQUAL(ESP_ERR_HW_CRYPTO_DS_INVALID_DIGEST, ds_r);
#endif
TEST_ASSERT_EQUAL_HEX8_ARRAY(zero, signature, DS_MAX_BITS / 8);
ds_data.c[bit / 8] ^= 1 << (bit % 8);
}
}
TEST_GROUP_RUNNER(ds)
{
RUN_TEST_CASE(ds, digital_siganture_parameter_encryption);
RUN_TEST_CASE(ds, digital_siganture_wrong_hmac_key_purpose);
RUN_TEST_CASE(ds, digital_siganture_blocking_wrong_hmac_key_purpose);
RUN_TEST_CASE(ds, digital_siganture_operation);
RUN_TEST_CASE(ds, digital_siganture_blocking_operation);
RUN_TEST_CASE(ds, digital_siganture_invalid_data);
}

View File

@ -9,12 +9,13 @@
#include <string.h>
#include "sdkconfig.h"
#include "esp_log.h"
#include "test_params.h"
#include "ecc_params.h"
#include "soc/soc_caps.h"
#include "hal/ecc_hal.h"
#include "hal/clk_gate_ll.h"
#include "unity.h"
#include "memory_checks.h"
#include "unity_fixture.h"
#define _DEBUG_ 0
#define SOC_ECC_SUPPORT_POINT_MULT 1
@ -45,6 +46,21 @@ static void ecc_enable_and_reset(void)
periph_ll_enable_clk_clear_rst(PERIPH_ECC_MODULE);
}
TEST_GROUP(ecc);
TEST_SETUP(ecc)
{
test_utils_record_free_mem();
TEST_ESP_OK(test_utils_set_leak_level(0, ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_GENERAL));
}
TEST_TEAR_DOWN(ecc)
{
test_utils_finish_and_evaluate_leaks(test_utils_get_leak_level(ESP_LEAK_TYPE_WARNING, ESP_COMP_LEAK_ALL),
test_utils_get_leak_level(ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_ALL));
}
#if SOC_ECC_SUPPORT_POINT_MULT
static void ecc_point_mul(const uint8_t *k_le, const uint8_t *x_le, const uint8_t *y_le, uint8_t len, bool verify_first,
uint8_t *res_x_le, uint8_t *res_y_le)
@ -126,13 +142,13 @@ static void test_ecc_point_mul_inner(bool verify_first)
TEST_ASSERT_EQUAL_MEMORY_MESSAGE(y_mul_le, y_res_le, 24, "Y coordinate of P192 point multiplication ");
}
TEST_CASE("ECC point multiplication on SECP192R1 and SECP256R1", "[ecc][hal]")
TEST(ecc, ecc_point_multiplication_on_SECP192R1_and_SECP256R1)
{
test_ecc_point_mul_inner(false);
}
#endif
#if SOC_ECC_SUPPORT_POINT_VERIFY
#if SOC_ECC_SUPPORT_POINT_VERIFY && !defined(SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK)
static int ecc_point_verify(const uint8_t *x_le, const uint8_t *y_le, uint8_t len)
{
ecc_enable_and_reset();
@ -148,7 +164,7 @@ static int ecc_point_verify(const uint8_t *x_le, const uint8_t *y_le, uint8_t le
return ecc_hal_read_verify_result();
}
TEST_CASE("ECC point verification on SECP192R1 and SECP256R1", "[ecc][hal]")
TEST(ecc, ecc_point_verification_on_SECP192R1_and_SECP256R1)
{
int res;
uint8_t x_le[32];
@ -182,8 +198,8 @@ TEST_CASE("ECC point verification on SECP192R1 and SECP256R1", "[ecc][hal]")
}
#endif
#if SOC_ECC_SUPPORT_POINT_MULT && SOC_ECC_SUPPORT_POINT_VERIFY
TEST_CASE("ECC point verification and multiplication on SECP192R1 and SECP256R1", "[ecc][hal]")
#if SOC_ECC_SUPPORT_POINT_MULT && SOC_ECC_SUPPORT_POINT_VERIFY && !defined(SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK)
TEST(ecc, ecc_point_verification_and_multiplication_on_SECP192R1_and_SECP256R1)
{
test_ecc_point_mul_inner(true);
}
@ -208,7 +224,7 @@ static void ecc_point_inv_mul(const uint8_t *num_le, const uint8_t *deno_le, uin
ecc_hal_read_mul_result(zero, res_le, len);
}
TEST_CASE("ECC inverse multiplication (or mod division) using SECP192R1 and SECP256R1 order of curve", "[ecc][hal]")
TEST(ecc, ecc_inverse_multiplication_or_mod_division_using_SECP192R1_and_SECP256R1_order_of_curve)
{
uint8_t res[32] = {0};
ecc_point_inv_mul(ecc256_num, ecc256_den, 32, res);
@ -277,7 +293,7 @@ static void test_ecc_jacob_mul_inner(bool verify_first)
TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc_p192_jacob_mul_res_z_le, z_res_le, 24, "Z coordinate of P192 point jacobian multiplication ");
}
TEST_CASE("ECC jacobian point multiplication on SECP192R1 and SECP256R1", "[ecc][hal]")
TEST(ecc, ecc_jacobian_point_multiplication_on_SECP192R1_and_SECP256R1)
{
test_ecc_jacob_mul_inner(false);
}
@ -301,7 +317,7 @@ static int ecc_jacob_verify(const uint8_t *x_le, const uint8_t *y_le, const uint
return ecc_hal_read_verify_result();
}
TEST_CASE("ECC jacobian point verification on SECP192R1 and SECP256R1", "[ecc][hal]")
TEST(ecc, ecc_jacobian_point_verification_on_SECP192R1_and_SECP256R1)
{
int res;
/* P256 */
@ -315,7 +331,7 @@ TEST_CASE("ECC jacobian point verification on SECP192R1 and SECP256R1", "[ecc][h
#endif
#if SOC_ECC_SUPPORT_JACOB_POINT_MULT && SOC_ECC_SUPPORT_JACOB_POINT_VERIFY
TEST_CASE("ECC point verification and Jacobian point multiplication on SECP192R1 and SECP256R1", "[ecc][hal]")
TEST(ecc, ecc_point_verification_and_jacobian_point_multiplication_on_SECP192R1_and_SECP256R1)
{
test_ecc_jacob_mul_inner(true);
}
@ -341,7 +357,7 @@ static void ecc_point_addition(uint8_t *px_le, uint8_t *py_le, uint8_t *qx_le, u
ecc_hal_read_point_add_result(x_res_le, y_res_le, z_res_le, len, jacob_output);
}
TEST_CASE("ECC point addition on SECP192R1 and SECP256R1", "[ecc][hal]")
TEST(ecc, ecc_point_addition_on_SECP192R1_and_SECP256R1)
{
uint8_t scalar_le[32] = {0};
uint8_t x_le[32] = {0};
@ -414,7 +430,7 @@ static void ecc_mod_op(ecc_mode_t mode, const uint8_t *a, const uint8_t *b, uint
#endif
#if SOC_ECC_SUPPORT_MOD_ADD
TEST_CASE("ECC mod addition using SECP192R1 and SECP256R1 order of curve", "[ecc][hal]")
TEST(ecc, ecc_mod_addition_using_SECP192R1_and_SECP256R1_order_of_curve)
{
uint8_t res[32] = {0};
ecc_mod_op(ECC_MODE_MOD_ADD, ecc256_x, ecc256_y, 32, res);
@ -426,7 +442,7 @@ TEST_CASE("ECC mod addition using SECP192R1 and SECP256R1 order of curve", "[ecc
#endif
#if SOC_ECC_SUPPORT_MOD_SUB
TEST_CASE("ECC mod subtraction using SECP192R1 and SECP256R1 order of curve", "[ecc][hal]")
TEST(ecc, ecc_mod_subtraction_using_SECP192R1_and_SECP256R1_order_of_curve)
{
uint8_t res[32] = {0};
ecc_mod_op(ECC_MODE_MOD_SUB, ecc256_x, ecc256_y, 32, res);
@ -438,7 +454,7 @@ TEST_CASE("ECC mod subtraction using SECP192R1 and SECP256R1 order of curve", "[
#endif
#if SOC_ECC_SUPPORT_MOD_MUL
TEST_CASE("ECC mod multiplication using SECP192R1 and SECP256R1 order of curve", "[ecc][hal]")
TEST(ecc, ecc_mod_multiplication_using_SECP192R1_and_SECP256R1_order_of_curve)
{
uint8_t res[32] = {0};
ecc_mod_op(ECC_MODE_MOD_MUL, ecc256_x, ecc256_y, 32, res);
@ -448,3 +464,51 @@ TEST_CASE("ECC mod multiplication using SECP192R1 and SECP256R1 order of curve",
TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc192_mul_res, res, 24, "P192 mod multiplication");
}
#endif
TEST_GROUP_RUNNER(ecc)
{
#if SOC_ECC_SUPPORT_POINT_MULT
RUN_TEST_CASE(ecc, ecc_point_multiplication_on_SECP192R1_and_SECP256R1);
#endif
#if SOC_ECC_SUPPORT_POINT_VERIFY && !defined(SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK)
RUN_TEST_CASE(ecc, ecc_point_verification_on_SECP192R1_and_SECP256R1);
#endif
#if SOC_ECC_SUPPORT_POINT_MULT && SOC_ECC_SUPPORT_POINT_VERIFY && !defined(SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK)
RUN_TEST_CASE(ecc, ecc_point_verification_and_multiplication_on_SECP192R1_and_SECP256R1);
#endif
#if SOC_ECC_SUPPORT_POINT_DIVISION
RUN_TEST_CASE(ecc, ecc_inverse_multiplication_or_mod_division_using_SECP192R1_and_SECP256R1_order_of_curve);
#endif
#if SOC_ECC_SUPPORT_JACOB_POINT_MULT
RUN_TEST_CASE(ecc, ecc_jacobian_point_multiplication_on_SECP192R1_and_SECP256R1);
#endif
#if SOC_ECC_SUPPORT_JACOB_POINT_VERIFY
RUN_TEST_CASE(ecc, ecc_jacobian_point_verification_on_SECP192R1_and_SECP256R1);
#endif
#if SOC_ECC_SUPPORT_JACOB_POINT_MULT && SOC_ECC_SUPPORT_JACOB_POINT_VERIFY
RUN_TEST_CASE(ecc, ecc_point_verification_and_jacobian_point_multiplication_on_SECP192R1_and_SECP256R1);
#endif
#if SOC_ECC_SUPPORT_POINT_ADDITION
RUN_TEST_CASE(ecc, ecc_point_addition_on_SECP192R1_and_SECP256R1);
#endif
#if SOC_ECC_SUPPORT_MOD_ADD
RUN_TEST_CASE(ecc, ecc_mod_addition_using_SECP192R1_and_SECP256R1_order_of_curve);
#endif
#if SOC_ECC_SUPPORT_MOD_SUB
RUN_TEST_CASE(ecc, ecc_mod_subtraction_using_SECP192R1_and_SECP256R1_order_of_curve);
#endif
#if SOC_ECC_SUPPORT_MOD_MUL
RUN_TEST_CASE(ecc, ecc_mod_multiplication_using_SECP192R1_and_SECP256R1_order_of_curve);
#endif
}

View File

@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MF8CAQEEGPswTe6IsRRpS/xbXdWj+HbzKV79UPNuFqAKBggqhkjOPQMBAaE0AzIA
BNA/b+ddqvTAHmN7gqsjMzR0WVZdIRCcsYX8dstlvMS+dAn983Tcwt5+SyOtRlyH
wg==
-----END EC PRIVATE KEY-----

View File

@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIKLY3NrF5q4bw/TqTE0a4MGI70bitMzz2AoLIIcMeHi8oAoGCCqGSM49
AwEHoUQDQgAETd9kH9hu1IunygTHEbhF2gz/X3rOWhH5lVUIJoWI6agksE3Mv86a
bqCKthpA8nFqUKj9qiyAoLxzoejsrywlNA==
-----END EC PRIVATE KEY-----

View File

@ -0,0 +1,88 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#pragma once
#include <stdint.h>
const uint8_t ecc_p256_k[] = {
0xB2, 0xC5, 0x9E, 0x92, 0x64, 0xCD, 0x5F, 0x66,
0x9E, 0xC8, 0x83, 0x6D, 0x99, 0x61, 0x18, 0x72,
0xC8, 0x60, 0x83, 0x1E, 0xE5, 0x79, 0xCC, 0x73,
0xA9, 0xB4, 0x74, 0x85, 0x70, 0x11, 0x2D, 0xA2,
};
const uint8_t ecc_p192_k[] = {
0x6f, 0x18, 0x34, 0xeb, 0x16, 0xb7, 0xac, 0x9f,
0x3c, 0x77, 0x71, 0xb3, 0x02, 0x30, 0x70, 0x48,
0x75, 0x87, 0xbb, 0x6f, 0x80, 0x34, 0x8d, 0x5e
};
uint8_t sha[] = {
0x0c, 0xaa, 0x08, 0xb4, 0xf0, 0x89, 0xd3, 0x45,
0xbb, 0x55, 0x98, 0xd9, 0xc2, 0xe9, 0x65, 0x5d,
0x7e, 0xa3, 0xa9, 0xc3, 0xcd, 0x69, 0xb1, 0xcf,
0x91, 0xbe, 0x58, 0x10, 0xfe, 0x80, 0x65, 0x6e
};
/* Little endian */
uint8_t ecdsa256_r[] = {
0xff, 0x94, 0xf7, 0x5a, 0xce, 0x81, 0x05, 0xfc,
0x98, 0x17, 0xd5, 0x0a, 0x94, 0x53, 0xab, 0x54,
0xa8, 0x21, 0x8b, 0xe6, 0xf2, 0x6e, 0xa0, 0x7b,
0x20, 0x36, 0x27, 0xd2, 0x60, 0x5d, 0xa3, 0x2e
};
/* Little endian */
uint8_t ecdsa256_s[] = {
0x50, 0x78, 0x0e, 0x41, 0xe3, 0x03, 0xd2, 0x5b,
0xaf, 0x74, 0x31, 0xb8, 0x74, 0xc9, 0xb3, 0x89,
0x8d, 0xb5, 0x40, 0x3e, 0x5b, 0x2a, 0x4b, 0xe2,
0x5e, 0xf8, 0x96, 0xd4, 0xf9, 0x22, 0xf9, 0xb4
};
/* Little endian */
uint8_t ecdsa256_pub_x[] = {
0xa8, 0xe9, 0x88, 0x85, 0x26, 0x08, 0x55, 0x95,
0xf9, 0x11, 0x5a, 0xce, 0x7a, 0x5f, 0xff, 0x0c,
0xda, 0x45, 0xb8, 0x11, 0xc7, 0x04, 0xca, 0xa7,
0x8b, 0xd4, 0x6e, 0xd8, 0x1f, 0x64, 0xdf, 0x4d
};
/* Little endian */
uint8_t ecdsa256_pub_y[] = {
0x34, 0x25, 0x2c, 0xaf, 0xec, 0xe8, 0xa1, 0x73,
0xbc, 0xa0, 0x80, 0x2c, 0xaa, 0xfd, 0xa8, 0x50,
0x6a, 0x71, 0xf2, 0x40, 0x1a, 0xb6, 0x8a, 0xa0,
0x6e, 0x9a, 0xce, 0xbf, 0xcc, 0x4d, 0xb0, 0x24
};
/* Little endian */
uint8_t ecdsa192_r[] = {
0x9f, 0xee, 0xb7, 0x4f, 0x09, 0xd5, 0xc8, 0x42,
0x2c, 0x74, 0xe7, 0xaa, 0x6d, 0xe2, 0xe1, 0x1c,
0xb7, 0x26, 0x75, 0xb2, 0x2f, 0x18, 0x8a, 0x2b
};
/* Little endian */
uint8_t ecdsa192_s[] = {
0x12, 0x5b, 0x30, 0x24, 0x59, 0x24, 0xeb, 0xf6,
0x2f, 0x06, 0x60, 0xa8, 0xff, 0xa5, 0xed, 0xce,
0xb6, 0xa5, 0x28, 0xf4, 0x05, 0xb4, 0x74, 0x1a
};
/* Little endian */
uint8_t ecdsa192_pub_x[] = {
0xb1, 0x9c, 0x10, 0x21, 0x5d, 0x56, 0x59, 0x74,
0x34, 0x33, 0x23, 0xab, 0x82, 0x7b, 0x63, 0x1e,
0xc0, 0xf4, 0xaa, 0x5d, 0xe7, 0x6f, 0x3f, 0xd0
};
/* Little endian */
uint8_t ecdsa192_pub_y[] = {
0xc2, 0x87, 0x5c, 0x46, 0xad, 0x23, 0x4b, 0x7e,
0xde, 0xc2, 0xdc, 0x74, 0xf3, 0xfd, 0x09, 0x74,
0xbe, 0xc4, 0xbc, 0x65, 0xcb, 0x76, 0xfc, 0x85
};

View File

@ -0,0 +1,210 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: CC0-1.0
*/
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include "esp_private/periph_ctrl.h"
#include "esp_random.h"
#include "hal/clk_gate_ll.h"
#include "hal/ecdsa_hal.h"
#include "hal/ecdsa_types.h"
#include "memory_checks.h"
#include "unity_fixture.h"
#include "ecdsa_params.h"
static void ecdsa_enable_and_reset(void)
{
periph_ll_enable_clk_clear_rst(PERIPH_ECDSA_MODULE);
}
static void ecdsa_disable_and_reset(void)
{
periph_ll_disable_clk_set_rst(PERIPH_ECDSA_MODULE);
}
static void ecc_be_to_le(const uint8_t* be_point, uint8_t *le_point, uint8_t len)
{
memset(le_point, 0x0, 32);
for (int i = 0; i < len; i++) {
le_point[i] = be_point[len - i - 1];
}
}
static int test_ecdsa_verify(bool is_p256, uint8_t* sha, uint8_t* r_le, uint8_t* s_le, uint8_t *pub_x, uint8_t *pub_y)
{
uint16_t len;
uint8_t sha_le[32];
ecdsa_hal_config_t conf = {
.mode = ECDSA_MODE_SIGN_VERIFY,
.k_mode = ECDSA_K_USE_TRNG,
.sha_mode = ECDSA_Z_USER_PROVIDED,
};
if (is_p256) {
conf.curve = ECDSA_CURVE_SECP256R1;
len = 32;
} else {
conf.curve = ECDSA_CURVE_SECP192R1;
len = 24;
}
/* Set HASH */
ecc_be_to_le(sha, sha_le, len);
ecdsa_enable_and_reset();
int ret = ecdsa_hal_verify_signature(&conf, sha_le, r_le, s_le, pub_x, pub_y, len);
ecdsa_disable_and_reset();
return ret;
}
static void test_ecdsa_corrupt_data(bool is_p256, uint8_t* sha, uint8_t* r_le, uint8_t* s_le, uint8_t *pub_x, uint8_t *pub_y)
{
int len;
if (is_p256) {
len = 32;
} else {
len = 24;
}
// Randomly select a bit and corrupt its correpsonding value
uint16_t r_bit = esp_random() % len * 8;
printf("Corrupting SHA bit %d...\n", r_bit);
sha[r_bit / 8] ^= 1 << (r_bit % 8);
TEST_ASSERT_EQUAL(-1, test_ecdsa_verify(1, sha, r_le, s_le, pub_x, pub_y));
sha[r_bit / 8] ^= 1 << (r_bit % 8);
printf("Corrupting R bit %d...\n", r_bit);
r_le[r_bit / 8] ^= 1 << (r_bit % 8);
TEST_ASSERT_EQUAL(-1, test_ecdsa_verify(1, sha, r_le, s_le, pub_x, pub_y));
r_le[r_bit / 8] ^= 1 << (r_bit % 8);
printf("Corrupting S bit %d...\n", r_bit);
s_le[r_bit / 8] ^= 1 << (r_bit % 8);
TEST_ASSERT_EQUAL(-1, test_ecdsa_verify(1, sha, r_le, s_le, pub_x, pub_y));
s_le[r_bit / 8] ^= 1 << (r_bit % 8);
printf("Corrupting pub_x bit %d...\n", r_bit);
pub_x[r_bit / 8] ^= 1 << (r_bit % 8);
TEST_ASSERT_EQUAL(-1, test_ecdsa_verify(1, sha, r_le, s_le, pub_x, pub_y));
pub_x[r_bit / 8] ^= 1 << (r_bit % 8);
printf("Corrupting pub_y bit %d...\n", r_bit);
pub_y[r_bit / 8] ^= 1 << (r_bit % 8);
TEST_ASSERT_EQUAL(-1, test_ecdsa_verify(1, sha, r_le, s_le, pub_x, pub_y));
pub_y[r_bit / 8] ^= 1 << (r_bit % 8);
}
static void test_ecdsa_sign(bool is_p256, uint8_t* sha, uint8_t* r_le, uint8_t* s_le)
{
uint8_t sha_le[32] = {0};
uint8_t zeroes[32] = {0};
uint16_t len;
ecdsa_hal_config_t conf = {
.mode = ECDSA_MODE_SIGN_GEN,
.k_mode = ECDSA_K_USE_TRNG,
.sha_mode = ECDSA_Z_USER_PROVIDED,
};
if (is_p256) {
conf.curve = ECDSA_CURVE_SECP256R1;
conf.efuse_key_blk = 5;
len = 32;
} else {
conf.curve = ECDSA_CURVE_SECP192R1;
conf.efuse_key_blk = 6;
len = 24;
}
/* Set HASH */
ecc_be_to_le(sha, sha_le, len);
ecdsa_enable_and_reset();
do {
ecdsa_hal_gen_signature(&conf, NULL, sha_le, r_le, s_le, len);
} while(!memcmp(r_le, zeroes, len) || !memcmp(s_le, zeroes, len));
ecdsa_disable_and_reset();
}
static void test_ecdsa_sign_and_verify(bool is_p256, uint8_t* sha, uint8_t* pub_x, uint8_t* pub_y)
{
uint8_t r_le[32] = {0};
uint8_t s_le[32] = {0};
test_ecdsa_sign(is_p256, sha, r_le, s_le);
TEST_ASSERT_EQUAL(0, test_ecdsa_verify(is_p256, sha, r_le, s_le, pub_x, pub_y));
}
TEST_GROUP(ecdsa);
TEST_SETUP(ecdsa)
{
test_utils_record_free_mem();
TEST_ESP_OK(test_utils_set_leak_level(0, ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_GENERAL));
}
TEST_TEAR_DOWN(ecdsa)
{
test_utils_finish_and_evaluate_leaks(test_utils_get_leak_level(ESP_LEAK_TYPE_WARNING, ESP_COMP_LEAK_ALL),
test_utils_get_leak_level(ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_ALL));
}
TEST(ecdsa, ecdsa_SECP192R1_signature_verification)
{
TEST_ASSERT_EQUAL(0, test_ecdsa_verify(0, sha, ecdsa192_r, ecdsa192_s, ecdsa192_pub_x, ecdsa192_pub_y));
}
TEST(ecdsa, ecdsa_SECP192R1_sign_and_verify)
{
test_ecdsa_sign_and_verify(0, sha, ecdsa192_pub_x, ecdsa192_pub_y);
}
TEST(ecdsa, ecdsa_SECP192R1_corrupt_signature)
{
test_ecdsa_corrupt_data(0, sha, ecdsa192_r, ecdsa192_s, ecdsa192_pub_x, ecdsa192_pub_y);
}
TEST(ecdsa, ecdsa_SECP256R1_signature_verification)
{
TEST_ASSERT_EQUAL(0, test_ecdsa_verify(1, sha, ecdsa256_r, ecdsa256_s, ecdsa256_pub_x, ecdsa256_pub_y));
}
TEST(ecdsa, ecdsa_SECP256R1_sign_and_verify)
{
test_ecdsa_sign_and_verify(1, sha, ecdsa256_pub_x, ecdsa256_pub_y);
}
TEST(ecdsa, ecdsa_SECP256R1_corrupt_signature)
{
test_ecdsa_corrupt_data(1, sha, ecdsa256_r, ecdsa256_s, ecdsa256_pub_x, ecdsa256_pub_y);
}
TEST_GROUP_RUNNER(ecdsa)
{
RUN_TEST_CASE(ecdsa, ecdsa_SECP192R1_signature_verification)
RUN_TEST_CASE(ecdsa, ecdsa_SECP192R1_sign_and_verify)
RUN_TEST_CASE(ecdsa, ecdsa_SECP192R1_corrupt_signature)
RUN_TEST_CASE(ecdsa, ecdsa_SECP256R1_signature_verification)
RUN_TEST_CASE(ecdsa, ecdsa_SECP256R1_sign_and_verify)
RUN_TEST_CASE(ecdsa, ecdsa_SECP256R1_corrupt_signature)
}

View File

@ -0,0 +1,2 @@



View File

@ -0,0 +1,863 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#include <stdint.h>
typedef struct {
int msglen;
uint8_t result[32];
} hmac_result;
const uint8_t jtag_enable_token_data[32] = {
0xb2, 0xa4, 0x9b, 0x1c, 0xce, 0x1b, 0xe9, 0x22, 0xbb, 0x7e, 0x43, 0x12, 0x77, 0x41, 0x3e, 0x3e,
0x8e, 0x6c, 0x3e, 0x8e, 0x6e, 0x17, 0x62, 0x5c, 0x50, 0xac, 0x66, 0xa9, 0xa8, 0x57, 0x94, 0x9b
};
const char *message = "Deleniti voluptas explicabo et assumenda. Sed et aliquid minus quis. Praesentium cupiditate quia nemo est. Laboriosam pariatur ut distinctio tenetur. Sunt architecto iure aspernatur soluta ut recusandae. Ut quibusdam occaecati ut qui sit dignissimos eaque..";
const uint8_t zeroes[128] = { };
static const hmac_result zero_results[] = {
{ .msglen = 64,
.result = { 0x4f, 0x34, 0x31, 0x8a, 0x45, 0x74, 0x4d, 0x71, 0x53, 0xb7, 0x18, 0xf4, 0x78, 0x1c, 0xbb, 0x10,
0x19, 0x60, 0xba, 0x9c, 0x8c, 0xe2, 0x3b, 0xc1, 0x1d, 0x79, 0xb6, 0x3c, 0xae, 0x0f, 0x30, 0xc8, },
},
{ .msglen = 128,
.result = { 0x40, 0xd5, 0xb9, 0xe6, 0x25, 0x8f, 0x3c, 0xd0, 0x3f, 0xb9, 0x6c, 0xa3, 0xa7, 0x2b, 0x84, 0xe3,
0x1d, 0x4b, 0x4e, 0x65, 0xf8, 0x7b, 0x3e, 0x3, 0x26, 0x2, 0xcd, 0x49, 0x73, 0xf0, 0xac, 0x25 },
},
{ .msglen = 48,
.result = { 0x84, 0x4e, 0x45, 0xcd, 0xb3, 0x8f, 0xf8, 0x96, 0xe7, 0xe7, 0x80, 0x48, 0x31, 0x89, 0x79, 0xa7,
0x5d, 0x80, 0xd1, 0xbf, 0x3, 0xca, 0x9b, 0x78, 0x4f, 0x3b, 0x42, 0x80, 0xb9, 0x6, 0x19, 0x7d },
},
{ .msglen = 32,
.result = { 0xb2, 0xa4, 0x9b, 0x1c, 0xce, 0x1b, 0xe9, 0x22, 0xbb, 0x7e, 0x43, 0x12, 0x77, 0x41, 0x3e, 0x3e,
0x8e, 0x6c, 0x3e, 0x8e, 0x6e, 0x17, 0x62, 0x5c, 0x50, 0xac, 0x66, 0xa9, 0xa8, 0x57, 0x94, 0x9b },
},
{ .msglen = 33,
.result = { 0x98, 0xd7, 0x44, 0xab, 0xbb, 0x89, 0xca, 0x51, 0x3e, 0x2, 0x8e, 0x5c, 0xa1, 0x61, 0x25, 0xd2,
0x93, 0x3e, 0x85, 0x4b, 0x9f, 0x73, 0x63, 0x57, 0xab, 0xbc, 0x7a, 0x66, 0x51, 0xd2, 0x39, 0xb9 },
},
{ .msglen = 1,
.result = { 0xab, 0x7d, 0x90, 0x85, 0x8, 0xb3, 0xf3, 0x7, 0x45, 0x6c, 0x85, 0x40, 0xbf, 0xcd, 0xb4, 0x52,
0x54, 0x2c, 0x2, 0xe0, 0x53, 0xdc, 0x16, 0x12, 0x90, 0xf1, 0x5b, 0x5b, 0xf8, 0x71, 0x65, 0x44 },
},
{ .msglen = 127,
.result = { 0x19, 0x38, 0x88, 0xb, 0x30, 0xac, 0xef, 0x4e, 0xd, 0x38, 0x7d, 0x7e, 0x42, 0x5c, 0x90, 0xc4,
0x9b, 0xc1, 0xbd, 0x9e, 0x30, 0xc6, 0x16, 0x1f, 0x36, 0x7e, 0x46, 0xcd, 0xb2, 0xd7, 0x37, 0x70 },
},
{ .msglen = 126,
.result = { 0xf, 0xa4, 0xb5, 0x16, 0x3b, 0xf5, 0xe8, 0x6e, 0xaf, 0x38, 0xc6, 0x27, 0x9a, 0xc, 0x88, 0xaf,
0xb5, 0x10, 0x75, 0x3d, 0x4a, 0x85, 0x10, 0x4e, 0x60, 0xe4, 0x61, 0x30, 0x8, 0x46, 0x98, 0xc7 },
},
{ .msglen = 125,
.result = { 0x3f, 0x1a, 0x90, 0x47, 0xeb, 0x44, 0xcc, 0x27, 0xfa, 0x22, 0xb3, 0x5d, 0xa2, 0x22, 0x30, 0x54,
0x61, 0x15, 0xe5, 0x54, 0x55, 0x13, 0x7c, 0xb8, 0xc7, 0xc0, 0x28, 0xa4, 0xd4, 0xbc, 0x1c, 0xad },
},
{ .msglen = 124,
.result = { 0x14, 0xdf, 0x13, 0xa2, 0xe4, 0xfd, 0xa3, 0xa8, 0x9b, 0x71, 0x78, 0x2e, 0x24, 0xb6, 0x61, 0x13,
0xff, 0x6c, 0x6d, 0xe8, 0x95, 0xf9, 0x68, 0xb4, 0x92, 0x7c, 0xc9, 0xf7, 0x5e, 0x14, 0x44, 0x8 },
},
{ .msglen = 123,
.result = { 0x6, 0xd0, 0xe, 0xbe, 0x90, 0x3b, 0x52, 0x85, 0xd4, 0x25, 0x7e, 0xbe, 0x71, 0x92, 0xd0, 0xf0,
0x6a, 0x99, 0x93, 0x64, 0xe6, 0x9a, 0x27, 0xfa, 0x57, 0xcb, 0x6f, 0x9f, 0x44, 0x30, 0xf5, 0xcc },
},
{ .msglen = 122,
.result = { 0x76, 0x7a, 0x86, 0x80, 0x1e, 0x54, 0x11, 0xef, 0x2f, 0x4e, 0xf9, 0x7, 0xda, 0x42, 0xd6, 0x71,
0x3b, 0xb9, 0x92, 0xfb, 0x8, 0x1d, 0xf2, 0x41, 0x96, 0x5f, 0x28, 0x10, 0x20, 0x1a, 0x7b, 0xef },
},
{ .msglen = 121,
.result = { 0x59, 0xb0, 0xdb, 0x73, 0xee, 0x43, 0xb9, 0x63, 0x82, 0x36, 0x11, 0x5a, 0x6b, 0x46, 0x8, 0xbb,
0x18, 0xdd, 0x74, 0x82, 0x8f, 0xf3, 0xb3, 0x5d, 0xd1, 0xad, 0xe, 0x8e, 0x77, 0x90, 0xde, 0x70 },
},
{ .msglen = 120,
.result = { 0xe0, 0x24, 0xc5, 0x2, 0x6b, 0xe, 0xe3, 0x9b, 0x1, 0x95, 0x6, 0x21, 0xc6, 0xad, 0x0, 0x72,
0x36, 0x9, 0x75, 0xcd, 0x10, 0xa3, 0xf, 0xa2, 0xe5, 0xcd, 0x27, 0x6b, 0x95, 0x23, 0x6, 0x72 },
},
{ .msglen = 119,
.result = { 0x70, 0x4, 0x2c, 0x78, 0xc5, 0x40, 0x3f, 0xfb, 0x71, 0xfb, 0x3e, 0xbd, 0x9f, 0x4e, 0x2f, 0xf8,
0x3c, 0x9b, 0xd1, 0xad, 0xee, 0xc8, 0x4f, 0x40, 0xec, 0x29, 0x5a, 0xb9, 0x9a, 0xa7, 0xe9, 0x51 },
},
{ .msglen = 118,
.result = { 0x1a, 0x4b, 0x49, 0xd3, 0x6, 0x1, 0x75, 0xca, 0x3, 0x12, 0x2e, 0x9a, 0xd4, 0xda, 0xb8, 0x23,
0xf9, 0xa0, 0xa6, 0xbc, 0xbc, 0xcc, 0xa1, 0x6f, 0xd8, 0x3b, 0x2a, 0x37, 0xd3, 0xc3, 0xca, 0x5f },
},
{ .msglen = 0,
.result = { 0x46, 0x24, 0x76, 0xa8, 0x97, 0xdd, 0xfd, 0xbd, 0x40, 0xd1, 0x42, 0xe, 0x8, 0xa5, 0xbc, 0xfe,
0xeb, 0x25, 0xc3, 0xe2, 0xad, 0xe6, 0xa0, 0xa9, 0x8, 0x3b, 0x32, 0x7b, 0x9e, 0xf9, 0xfc, 0xa1 },
},
};
static const hmac_result results[] = {
{ .msglen = 1,
.result = { 0xf2, 0x1a, 0x8e, 0x60, 0xea, 0xd9, 0x36, 0xd1, 0xc2, 0x74, 0x24, 0xae, 0x6, 0x2d, 0x81, 0x28, 0x16, 0xa6, 0x33, 0xca, 0x9d, 0x55, 0xc0, 0x82, 0x28, 0xd9, 0x79, 0x8f, 0x5a, 0xaa, 0xfd, 0x25 },
},
{ .msglen = 2,
.result = { 0x1f, 0x6, 0xfc, 0x68, 0x5c, 0xa8, 0xbf, 0x3e, 0x57, 0x6d, 0x2, 0x56, 0x4a, 0x35, 0x31, 0xbd, 0xeb, 0xf4, 0x5d, 0xd5, 0x71, 0xf9, 0x65, 0x7d, 0xa9, 0x32, 0x1d, 0x68, 0x21, 0xd2, 0x9b, 0xaf },
},
{ .msglen = 3,
.result = { 0x2b, 0xb4, 0x4e, 0x80, 0x6e, 0xd2, 0xcb, 0xee, 0x4b, 0x40, 0xfb, 0xf9, 0x61, 0x76, 0x78, 0x2a, 0xb1, 0xc8, 0xea, 0xa3, 0x3e, 0xf7, 0x24, 0x86, 0xa0, 0x73, 0xda, 0xe, 0xaf, 0x98, 0xb, 0xf0 },
},
{ .msglen = 4,
.result = { 0xf, 0x39, 0xd1, 0x1a, 0x3a, 0xe9, 0xa9, 0xf8, 0xe9, 0x39, 0xed, 0x1b, 0x32, 0x3, 0xbc, 0x24, 0x32, 0xe8, 0x12, 0xd7, 0xc4, 0xed, 0x2a, 0x8a, 0xed, 0x46, 0xbf, 0xa7, 0x21, 0x31, 0x37, 0xb5 },
},
{ .msglen = 5,
.result = { 0x6c, 0xfc, 0xf8, 0x9a, 0x56, 0xce, 0xe6, 0x1, 0x36, 0xca, 0x36, 0x37, 0xa8, 0xb9, 0xca, 0x99, 0x3b, 0xb1, 0xf8, 0x24, 0xa5, 0xf6, 0x20, 0x4d, 0xff, 0x8c, 0x60, 0xd3, 0x9, 0x92, 0xef, 0xb3 },
},
{ .msglen = 6,
.result = { 0x86, 0x99, 0x7, 0xd7, 0x5b, 0xb3, 0x93, 0x95, 0x3a, 0x9e, 0xf5, 0x95, 0x9d, 0x5e, 0x7b, 0xaf, 0x9b, 0x4b, 0x19, 0x35, 0x31, 0x34, 0xba, 0x29, 0xa, 0x56, 0xb, 0xe4, 0xa4, 0xbf, 0xb8, 0x9f },
},
{ .msglen = 7,
.result = { 0xa9, 0x9, 0x85, 0x26, 0x7b, 0x92, 0x23, 0xe7, 0x3d, 0x44, 0xa1, 0xcc, 0xba, 0x5c, 0xda, 0xdb, 0x5a, 0xe2, 0x76, 0x78, 0xd7, 0x42, 0x77, 0x4a, 0x8e, 0x2b, 0x79, 0x73, 0x4c, 0x29, 0x6, 0x1c },
},
{ .msglen = 8,
.result = { 0x26, 0x15, 0x1f, 0xe3, 0x53, 0xd9, 0x8, 0xc5, 0xf0, 0x11, 0x7, 0x7, 0x5f, 0x8c, 0xf6, 0x61, 0xd2, 0x21, 0x16, 0xe4, 0xb9, 0x61, 0x29, 0x1c, 0x4d, 0x2b, 0x6d, 0x9a, 0x88, 0x8c, 0xdc, 0xa9 },
},
{ .msglen = 9,
.result = { 0x2, 0xf2, 0xe6, 0xc8, 0x9c, 0xdc, 0x1b, 0x64, 0xd6, 0x32, 0xc2, 0x48, 0x62, 0x51, 0x9c, 0x0, 0x90, 0xf4, 0xf1, 0x2a, 0x0, 0x2, 0xce, 0x32, 0xbb, 0x8f, 0x38, 0x9c, 0x8b, 0xaa, 0xdd, 0x5d },
},
{ .msglen = 10,
.result = { 0x44, 0x76, 0x8a, 0x53, 0xcf, 0xbb, 0xc1, 0xd0, 0x36, 0x96, 0xb5, 0xe9, 0xe, 0xfb, 0xce, 0xb3, 0x47, 0x21, 0xaa, 0xea, 0xac, 0x76, 0x54, 0x91, 0xc1, 0xcb, 0x88, 0x32, 0xb1, 0xea, 0xd5, 0x4c },
},
{ .msglen = 11,
.result = { 0x95, 0xf9, 0x78, 0x12, 0xe5, 0x7a, 0xf4, 0xc5, 0xee, 0x5e, 0x27, 0xe7, 0x5e, 0x8, 0x56, 0x60, 0x97, 0xc1, 0xee, 0xf, 0xf5, 0x24, 0x5c, 0x20, 0xbe, 0x95, 0x3c, 0xa2, 0xf5, 0x68, 0x69, 0x6f },
},
{ .msglen = 12,
.result = { 0x8e, 0x71, 0xa8, 0x23, 0x7a, 0x8, 0x6a, 0xf4, 0x2e, 0xab, 0x58, 0x56, 0x37, 0x55, 0x26, 0x57, 0x13, 0xc, 0x6b, 0x6b, 0x65, 0xb6, 0x4f, 0xec, 0xde, 0xc2, 0xe6, 0xb0, 0x34, 0xc0, 0x4a, 0xba },
},
{ .msglen = 13,
.result = { 0x75, 0xc8, 0x29, 0x60, 0x89, 0xb7, 0xba, 0xc7, 0x40, 0x18, 0x73, 0x8a, 0xa3, 0x92, 0xb2, 0x2c, 0x79, 0x74, 0x1c, 0xdc, 0xc0, 0x97, 0x14, 0xdb, 0x26, 0xcc, 0xad, 0x7f, 0x9d, 0x2f, 0xd, 0x5 },
},
{ .msglen = 14,
.result = { 0xe9, 0xf2, 0x97, 0x12, 0x4d, 0xc3, 0x22, 0xca, 0x7, 0xc, 0xac, 0xae, 0xcb, 0x63, 0xe2, 0x88, 0xa2, 0xf8, 0xb0, 0x94, 0xfc, 0x21, 0xf4, 0x69, 0x8e, 0xa0, 0x95, 0x3, 0x54, 0xa1, 0x61, 0xed },
},
{ .msglen = 15,
.result = { 0x34, 0xd4, 0x3e, 0xcd, 0xcc, 0xa, 0x5f, 0xaf, 0xf5, 0x3d, 0xb8, 0xaa, 0x18, 0x4a, 0x18, 0xef, 0x22, 0x75, 0x29, 0x17, 0x1b, 0x33, 0xf2, 0x50, 0x4e, 0x90, 0xd5, 0xa3, 0x10, 0xff, 0x79, 0xbc },
},
{ .msglen = 16,
.result = { 0xcf, 0x6, 0x59, 0x8d, 0x2d, 0x7b, 0xb, 0x3d, 0x1a, 0xa3, 0x9c, 0xfa, 0xa2, 0xf1, 0x88, 0x6, 0xd2, 0xb4, 0xb5, 0x2d, 0x4c, 0x56, 0x7, 0xf5, 0x20, 0xce, 0x9a, 0x79, 0x3a, 0x2e, 0x11, 0xfa },
},
{ .msglen = 17,
.result = { 0x55, 0x5f, 0x37, 0xd9, 0x7, 0x3a, 0x3a, 0x6b, 0x22, 0xf8, 0x1c, 0x8f, 0xd8, 0xf6, 0xf7, 0x18, 0x77, 0xf3, 0x52, 0x32, 0xc6, 0x9b, 0xe0, 0xc7, 0xa6, 0xf0, 0x6b, 0xb0, 0x6a, 0xad, 0xb2, 0x7e },
},
{ .msglen = 18,
.result = { 0xa0, 0x60, 0x25, 0x34, 0xd7, 0xe1, 0x66, 0x7e, 0xdd, 0xec, 0x8, 0x95, 0xb5, 0xd9, 0x2d, 0x4e, 0x29, 0x89, 0x39, 0xb9, 0xc1, 0xe4, 0xc1, 0x86, 0x10, 0x16, 0x5, 0x17, 0xd0, 0x6, 0x91, 0x2d },
},
{ .msglen = 19,
.result = { 0xb4, 0x45, 0xbc, 0xae, 0xb3, 0x5b, 0x61, 0xd3, 0x50, 0x8c, 0x38, 0x7a, 0x4c, 0x4c, 0xbc, 0x38, 0x89, 0x98, 0x75, 0x23, 0xa9, 0x92, 0xa4, 0xea, 0xfe, 0xe6, 0x88, 0x61, 0xb0, 0xf0, 0x8, 0x7b },
},
{ .msglen = 20,
.result = { 0x1d, 0x2e, 0x5c, 0x69, 0x7b, 0x2a, 0xa0, 0x9d, 0xe6, 0x5b, 0xc, 0x3, 0x53, 0x9, 0x66, 0x74, 0xd8, 0xf6, 0xe8, 0x87, 0x5d, 0xc7, 0x1, 0xf0, 0xce, 0xaf, 0xb1, 0x15, 0x34, 0x22, 0x8e, 0x83 },
},
{ .msglen = 21,
.result = { 0x8e, 0xd9, 0xb1, 0xc7, 0x99, 0x91, 0x1, 0x9a, 0xe, 0xfa, 0xd2, 0xed, 0xc4, 0xae, 0x47, 0xf2, 0xa2, 0x48, 0x53, 0xa8, 0x92, 0xff, 0xe4, 0xcc, 0x95, 0x5e, 0x25, 0x1a, 0x2a, 0x49, 0x6c, 0xfd },
},
{ .msglen = 22,
.result = { 0x14, 0xba, 0x32, 0xbe, 0x21, 0x6, 0x6e, 0x6a, 0x28, 0x2b, 0x4e, 0xfc, 0x97, 0xa5, 0x6, 0x32, 0x62, 0x7, 0xf3, 0x61, 0x41, 0x43, 0x5e, 0x34, 0x93, 0x0, 0xa8, 0xb3, 0x9, 0x55, 0x37, 0x3f },
},
{ .msglen = 23,
.result = { 0xa1, 0xf0, 0xe6, 0xf1, 0x9d, 0x5d, 0x30, 0x10, 0x17, 0xce, 0x39, 0x5e, 0x93, 0x2b, 0xe6, 0xeb, 0x6b, 0x5b, 0x64, 0x47, 0x65, 0xe8, 0x93, 0x2e, 0x39, 0x74, 0x6a, 0x71, 0xf3, 0xdb, 0xb6, 0x8d },
},
{ .msglen = 24,
.result = { 0xab, 0xf4, 0xe1, 0x78, 0xc1, 0x63, 0x95, 0xf2, 0x6c, 0x54, 0xc, 0xac, 0xce, 0x88, 0x17, 0xf6, 0x1c, 0x84, 0x5b, 0x26, 0xa3, 0x5c, 0xea, 0xf7, 0x66, 0xcb, 0x84, 0xed, 0xbe, 0x52, 0xd, 0x25 },
},
{ .msglen = 25,
.result = { 0xd8, 0x94, 0x77, 0xa7, 0x6c, 0x51, 0x30, 0x3c, 0xd7, 0x4f, 0xc4, 0x6e, 0x1a, 0x25, 0xf8, 0x87, 0x93, 0x49, 0x28, 0x6b, 0x1b, 0x3, 0x79, 0x5, 0x14, 0x15, 0xd1, 0xee, 0x51, 0x7b, 0x9f, 0x94 },
},
{ .msglen = 26,
.result = { 0xbb, 0x8a, 0x5f, 0x73, 0x8d, 0x4e, 0x8a, 0x11, 0x95, 0x5d, 0xf5, 0xcf, 0x25, 0xea, 0x79, 0x38, 0xc4, 0x4b, 0xb4, 0x6f, 0xa3, 0x1f, 0x18, 0x23, 0x73, 0x1e, 0x46, 0xcb, 0x5d, 0x97, 0xcf, 0x6c },
},
{ .msglen = 27,
.result = { 0xe2, 0xad, 0x4b, 0x4e, 0x43, 0xf1, 0x6d, 0x62, 0x1a, 0xb4, 0x65, 0xbb, 0xb3, 0x34, 0x8, 0xf7, 0x14, 0x14, 0xd2, 0x6f, 0x41, 0x8f, 0xa7, 0x6f, 0xab, 0x6e, 0x61, 0xe2, 0x5, 0x5b, 0x2a, 0xe6 },
},
{ .msglen = 28,
.result = { 0xd9, 0xea, 0x5, 0x72, 0x59, 0x12, 0xff, 0xb, 0x33, 0x87, 0x17, 0x9d, 0xb2, 0x9, 0x4f, 0xfc, 0xba, 0xd7, 0xc, 0x45, 0x3b, 0xbe, 0x6a, 0x12, 0x59, 0x38, 0x40, 0x30, 0x8c, 0xa4, 0xf, 0x7d },
},
{ .msglen = 29,
.result = { 0x29, 0xe, 0x6d, 0x59, 0x2a, 0xaf, 0x5f, 0x93, 0xc7, 0x97, 0xbb, 0x29, 0x92, 0x2c, 0xba, 0x6b, 0xa5, 0xcb, 0x7e, 0x88, 0x5b, 0xcd, 0xd4, 0xfe, 0xb4, 0xc7, 0x65, 0xae, 0x6b, 0x7f, 0x78, 0xb6 },
},
{ .msglen = 30,
.result = { 0x5e, 0xea, 0x58, 0xb5, 0x93, 0x4b, 0xb7, 0x32, 0x50, 0xcb, 0xc6, 0x6c, 0x63, 0x9d, 0x5d, 0xa9, 0x3f, 0x80, 0xc4, 0x91, 0xbc, 0xe3, 0x2a, 0xd6, 0x20, 0xfb, 0xf9, 0x43, 0x59, 0xcf, 0x86, 0x1d },
},
{ .msglen = 31,
.result = { 0x46, 0xee, 0x3a, 0x2a, 0x1, 0xf6, 0x43, 0xe, 0xbb, 0xc6, 0x90, 0x4f, 0x66, 0xa5, 0xe9, 0xd7, 0xa8, 0x29, 0x7e, 0x16, 0x4, 0x57, 0xee, 0x5c, 0xf4, 0x6c, 0xc8, 0x4a, 0x92, 0x27, 0x83, 0x42 },
},
{ .msglen = 32,
.result = { 0x82, 0x36, 0xe6, 0xf, 0xa, 0x37, 0x2d, 0x7b, 0x2, 0x75, 0xc4, 0x48, 0x36, 0xbf, 0xdf, 0x79, 0x35, 0xdf, 0xcb, 0x65, 0x25, 0xae, 0x11, 0x2c, 0xfa, 0x54, 0x4a, 0x99, 0xfe, 0x2a, 0x63, 0xbd },
},
{ .msglen = 33,
.result = { 0x9e, 0x35, 0xc8, 0x6c, 0xa7, 0xe8, 0x8b, 0xb2, 0x0, 0x4c, 0x41, 0x51, 0x5b, 0xd2, 0x4b, 0x9f, 0x10, 0xea, 0xfe, 0xd7, 0xc1, 0xd1, 0x36, 0xfb, 0x52, 0xd6, 0xe3, 0xe2, 0x23, 0xc9, 0x53, 0x33 },
},
{ .msglen = 34,
.result = { 0x52, 0xe9, 0x15, 0x90, 0x65, 0xb, 0x75, 0x89, 0xb3, 0xed, 0x7a, 0xb6, 0x12, 0xe6, 0xe, 0xeb, 0x7c, 0x25, 0xb4, 0xf3, 0x2a, 0xf6, 0xfe, 0x6a, 0x3c, 0xd9, 0xf0, 0x2a, 0xaf, 0xc7, 0x1b, 0xbc },
},
{ .msglen = 35,
.result = { 0xfc, 0xa5, 0xf1, 0x9a, 0xa0, 0xfa, 0x42, 0x7b, 0x49, 0xf, 0xd7, 0x76, 0xe0, 0xf9, 0x31, 0x17, 0x87, 0x70, 0x19, 0x90, 0x26, 0x96, 0xcd, 0xd6, 0xf, 0xa8, 0xb, 0x1f, 0x31, 0x45, 0x9c, 0xd0 },
},
{ .msglen = 36,
.result = { 0x85, 0x76, 0xf4, 0xfc, 0x96, 0xfb, 0x69, 0x31, 0x6, 0x5c, 0x6e, 0xd9, 0x75, 0xda, 0xf0, 0x14, 0xba, 0x4b, 0x74, 0x96, 0xf7, 0xe6, 0xd0, 0x3d, 0x36, 0x9b, 0x94, 0x8c, 0x1a, 0xb9, 0x7a, 0x88 },
},
{ .msglen = 37,
.result = { 0x8b, 0xc7, 0xad, 0xb8, 0xce, 0xc6, 0xd7, 0x8e, 0xd6, 0xfa, 0xa5, 0xd3, 0x59, 0x3d, 0x39, 0xdc, 0x74, 0x56, 0x3c, 0xd9, 0xc8, 0x0, 0xd2, 0xb0, 0x21, 0x7b, 0x93, 0xcb, 0x18, 0xec, 0x5f, 0xdd },
},
{ .msglen = 38,
.result = { 0x95, 0x7a, 0xf3, 0x9c, 0x5b, 0x40, 0x86, 0xdf, 0xa6, 0xf7, 0x34, 0x40, 0xb0, 0x7a, 0x34, 0x6c, 0xd5, 0x3d, 0x6, 0x9d, 0xc7, 0x9f, 0x11, 0x32, 0x98, 0x78, 0xee, 0xed, 0xb6, 0xb4, 0x1f, 0x34 },
},
{ .msglen = 39,
.result = { 0xf3, 0x50, 0x40, 0xd2, 0xbb, 0x54, 0xb3, 0xcf, 0x37, 0x55, 0xff, 0xc8, 0x41, 0x30, 0xde, 0x33, 0x2f, 0x4, 0xe3, 0xe7, 0x42, 0x31, 0x68, 0xe6, 0x6d, 0x5d, 0xdc, 0x14, 0x5a, 0x58, 0xf4, 0x46 },
},
{ .msglen = 40,
.result = { 0xda, 0x9d, 0xeb, 0xf7, 0xa7, 0xa1, 0x4, 0xd1, 0xfb, 0xe3, 0xd8, 0x11, 0x8d, 0x54, 0x88, 0x65, 0x42, 0x6e, 0x78, 0x7a, 0x8f, 0x1b, 0xc5, 0x13, 0x98, 0x53, 0x38, 0x26, 0xf3, 0x3d, 0xd2, 0xff },
},
{ .msglen = 41,
.result = { 0x9c, 0x23, 0x67, 0xa3, 0xeb, 0xed, 0xca, 0x21, 0x4b, 0x4c, 0x68, 0x95, 0xaf, 0xfb, 0x9b, 0x17, 0xf0, 0x2a, 0x5c, 0x78, 0x58, 0x65, 0xf1, 0x20, 0xfd, 0x3c, 0xd9, 0x66, 0x94, 0x66, 0x4d, 0xcc },
},
{ .msglen = 42,
.result = { 0xfa, 0x61, 0xf5, 0xd7, 0x58, 0xd2, 0x32, 0xb0, 0xb, 0x95, 0x88, 0xfc, 0x8a, 0x79, 0x15, 0x61, 0x1e, 0xa7, 0xf7, 0xf2, 0xf1, 0x91, 0xe7, 0xb3, 0x55, 0xa0, 0x65, 0x3c, 0xca, 0xf6, 0xac, 0x19 },
},
{ .msglen = 43,
.result = { 0xae, 0xc1, 0xb4, 0xa9, 0x88, 0xf3, 0x6d, 0xfe, 0xc2, 0x48, 0x19, 0x2a, 0x68, 0x41, 0x5e, 0x3f, 0xbe, 0x32, 0x20, 0xc7, 0x90, 0x6f, 0x23, 0x6d, 0x42, 0xaa, 0x38, 0xbb, 0xd5, 0x34, 0x7e, 0x21 },
},
{ .msglen = 44,
.result = { 0x12, 0xb0, 0xb, 0x1, 0xcf, 0xc9, 0x20, 0x8d, 0x59, 0xc1, 0xb7, 0xe9, 0x23, 0x53, 0x12, 0xd4, 0x41, 0x99, 0x7f, 0xb9, 0x57, 0x11, 0x5d, 0x9c, 0x60, 0xa8, 0x0, 0x3, 0x68, 0x9, 0x4d, 0x1d },
},
{ .msglen = 45,
.result = { 0xee, 0x85, 0x2, 0xed, 0xa1, 0x41, 0x71, 0xd4, 0x32, 0x2, 0x33, 0xec, 0x26, 0x31, 0x7b, 0xb8, 0xd0, 0xb0, 0xd6, 0xb0, 0x60, 0x52, 0xe1, 0xd9, 0xd7, 0x33, 0x72, 0x5c, 0xb9, 0xc3, 0x6c, 0x9f },
},
{ .msglen = 46,
.result = { 0x90, 0x3e, 0x7, 0x17, 0xa2, 0x18, 0xd, 0xa1, 0x71, 0xfe, 0x4b, 0x6d, 0x24, 0x40, 0x5e, 0xe2, 0xd1, 0x45, 0xd6, 0x18, 0xe8, 0xa3, 0x2d, 0x12, 0xe8, 0x11, 0xae, 0x1, 0xc4, 0x77, 0xa9, 0xab },
},
{ .msglen = 47,
.result = { 0x4a, 0x4f, 0x5a, 0xd1, 0xd0, 0xfb, 0xf7, 0x60, 0x9c, 0xbf, 0x23, 0x99, 0x95, 0xea, 0x51, 0xdb, 0x70, 0xc4, 0xa, 0xaf, 0x41, 0x13, 0x7d, 0x3d, 0xd1, 0x50, 0xa7, 0x13, 0x4f, 0xa0, 0xbf, 0xf4 },
},
{ .msglen = 48,
.result = { 0x63, 0x50, 0x7a, 0x54, 0xd8, 0xa5, 0xf, 0x96, 0x45, 0x3a, 0x85, 0x8e, 0x8e, 0xc6, 0x5d, 0xe0, 0xe8, 0xfd, 0xce, 0xa8, 0x3f, 0x59, 0x19, 0x81, 0x13, 0xd1, 0xf7, 0xd, 0x45, 0xe3, 0xf3, 0x31 },
},
{ .msglen = 49,
.result = { 0x3c, 0x7a, 0x1, 0xdd, 0x3a, 0x96, 0xae, 0x2, 0x2e, 0x6a, 0x7f, 0xd, 0x1e, 0x2f, 0x32, 0xfd, 0x5, 0x33, 0xae, 0x54, 0xa2, 0xa6, 0x89, 0x32, 0x9a, 0x7, 0xb7, 0xe9, 0x66, 0xaf, 0xf8, 0xc },
},
{ .msglen = 50,
.result = { 0x57, 0xd8, 0xed, 0xc4, 0xec, 0x23, 0xf, 0xf9, 0x55, 0xc1, 0x36, 0xde, 0xc3, 0xbd, 0x54, 0x53, 0x2f, 0xfa, 0xd1, 0xb3, 0xe1, 0x87, 0xc2, 0x39, 0x54, 0x59, 0xa9, 0xb9, 0xac, 0xed, 0xa0, 0x49 },
},
{ .msglen = 51,
.result = { 0xdf, 0xd5, 0x2e, 0xd2, 0xd2, 0xb0, 0x90, 0x12, 0x71, 0x37, 0x51, 0xba, 0x79, 0xd4, 0x43, 0xc7, 0x74, 0x12, 0xf3, 0x71, 0x74, 0x63, 0xc, 0x4d, 0x59, 0x2e, 0x5, 0xb5, 0xa2, 0x17, 0xe, 0xe9 },
},
{ .msglen = 52,
.result = { 0xbd, 0xa3, 0x12, 0x94, 0xea, 0xa7, 0xc4, 0xd3, 0x1f, 0x99, 0xcb, 0xbc, 0x53, 0x80, 0x45, 0xfd, 0x17, 0x13, 0xd7, 0x2b, 0x26, 0x5b, 0x23, 0x3d, 0x2d, 0xd8, 0x7f, 0x9, 0xcc, 0x9c, 0xa7, 0xfd },
},
{ .msglen = 53,
.result = { 0x66, 0x3a, 0xc1, 0x3b, 0x1f, 0x7d, 0x0, 0xf5, 0x9a, 0x5e, 0x92, 0x61, 0x16, 0xad, 0x2b, 0x15, 0x2f, 0x65, 0x89, 0xd2, 0xa3, 0xbd, 0x33, 0x71, 0x31, 0xe8, 0x37, 0x3c, 0xb0, 0x6d, 0x13, 0xc9 },
},
{ .msglen = 54,
.result = { 0xff, 0x17, 0xef, 0x42, 0x67, 0xba, 0xcf, 0xe7, 0xfe, 0xf5, 0x76, 0x96, 0x9e, 0xf0, 0x61, 0xe5, 0xd, 0xc3, 0xbb, 0x63, 0xd3, 0xcd, 0x4a, 0x10, 0x63, 0xa3, 0x3c, 0xe, 0xf2, 0xfc, 0xa, 0x33 },
},
{ .msglen = 55,
.result = { 0x78, 0xa8, 0xe5, 0x15, 0x18, 0x49, 0x4, 0xba, 0x34, 0xb6, 0xb3, 0x96, 0x3a, 0x6, 0xaa, 0x93, 0xad, 0x82, 0x5b, 0x87, 0x0, 0x3f, 0x5, 0x1, 0xe7, 0xe1, 0x22, 0x16, 0x3d, 0xb5, 0x5b, 0xb8 },
},
{ .msglen = 56,
.result = { 0x0, 0xad, 0xbf, 0x7d, 0x51, 0xc4, 0xed, 0x5, 0x6c, 0x81, 0x15, 0x5c, 0xa5, 0xe3, 0x6b, 0x39, 0x59, 0x10, 0x8e, 0xbc, 0x3f, 0xb8, 0x21, 0xbc, 0xd9, 0x9e, 0x35, 0x7d, 0x23, 0x48, 0x5, 0x8a },
},
{ .msglen = 57,
.result = { 0xf7, 0x5e, 0xa3, 0x88, 0x1f, 0x82, 0xf0, 0xc4, 0x39, 0x7e, 0xed, 0x22, 0x78, 0xd6, 0x65, 0x94, 0x4f, 0x8, 0x2e, 0x96, 0x7e, 0x44, 0x8f, 0x0, 0x3b, 0x92, 0xf9, 0xea, 0x83, 0x72, 0xc7, 0xe2 },
},
{ .msglen = 58,
.result = { 0x84, 0xa5, 0x85, 0x95, 0x0, 0x7e, 0xc4, 0x98, 0x36, 0xc9, 0xe5, 0xd4, 0xda, 0x59, 0xab, 0x22, 0x2f, 0xa8, 0xb7, 0x46, 0x55, 0x91, 0x2, 0xc, 0x5b, 0x64, 0x5c, 0x5b, 0x42, 0x8b, 0x7e, 0xa },
},
{ .msglen = 59,
.result = { 0x4e, 0x1c, 0x16, 0x99, 0xd8, 0x4, 0xb, 0x6, 0x91, 0x98, 0x87, 0xb0, 0xa3, 0x63, 0x9, 0xdf, 0xfb, 0xa6, 0xd6, 0xe4, 0x58, 0x27, 0xf5, 0x73, 0x9, 0x81, 0x4f, 0x5d, 0x88, 0x2c, 0xb8, 0x7 },
},
{ .msglen = 60,
.result = { 0x2f, 0x97, 0xbf, 0x70, 0x70, 0x4b, 0xfe, 0x5a, 0x2f, 0x91, 0x8f, 0x28, 0x8b, 0xee, 0xf6, 0xee, 0x41, 0x7d, 0x36, 0x14, 0x86, 0x69, 0x42, 0x9c, 0x4d, 0x5, 0xcc, 0x53, 0x71, 0x61, 0x78, 0xe },
},
{ .msglen = 61,
.result = { 0xe6, 0xba, 0x7f, 0x8, 0xb3, 0xdc, 0x7b, 0x95, 0xcb, 0xd1, 0x33, 0x64, 0x25, 0x5a, 0xa3, 0x70, 0x10, 0x4a, 0xe6, 0x2c, 0x54, 0x25, 0xfa, 0x7e, 0xd0, 0x47, 0x65, 0x8d, 0xa1, 0xa8, 0x80, 0x5 },
},
{ .msglen = 62,
.result = { 0x9b, 0x48, 0x8d, 0x79, 0x16, 0xe8, 0x32, 0x63, 0x89, 0xaa, 0x4b, 0x7d, 0xdb, 0x46, 0xcd, 0x80, 0x40, 0x9d, 0x8c, 0x6, 0xa5, 0xed, 0xb4, 0xe1, 0xdd, 0x87, 0x6b, 0xb3, 0x90, 0x2b, 0x77, 0xc8 },
},
{ .msglen = 63,
.result = { 0x72, 0xfb, 0x8c, 0xf1, 0xb9, 0xb3, 0x50, 0x55, 0x5c, 0xac, 0x93, 0x38, 0x73, 0x1c, 0xd0, 0x93, 0x6, 0x5e, 0xcd, 0x0, 0x24, 0x83, 0x4b, 0xef, 0xdc, 0xfd, 0x27, 0x58, 0xfc, 0xa1, 0x4a, 0x32 },
},
{ .msglen = 64,
.result = { 0x19, 0x5b, 0x88, 0x8d, 0x75, 0x97, 0x8a, 0x8c, 0x5d, 0xd4, 0xe7, 0xe4, 0xa, 0x4d, 0x5e, 0xcd, 0xe7, 0x88, 0xab, 0xb9, 0x6b, 0xd8, 0xd3, 0x80, 0x25, 0x3e, 0xa4, 0xfd, 0xc1, 0x83, 0x6e, 0x74 },
},
{ .msglen = 65,
.result = { 0x14, 0x3, 0xcc, 0x1f, 0xa5, 0xed, 0x5e, 0x3c, 0x45, 0x2d, 0x66, 0x9a, 0x36, 0xb7, 0x9a, 0xb, 0x1c, 0x83, 0x4d, 0xbe, 0xc9, 0x41, 0x7e, 0x7, 0x54, 0x97, 0x76, 0x25, 0x96, 0x76, 0xce, 0xd4 },
},
{ .msglen = 66,
.result = { 0x44, 0x62, 0x56, 0x7e, 0x68, 0x10, 0xed, 0xd9, 0x35, 0x8a, 0xe3, 0xd, 0x20, 0xf, 0xe6, 0x45, 0x89, 0x6c, 0x8c, 0x18, 0x13, 0xe5, 0xef, 0x28, 0x2d, 0xc1, 0x6a, 0x95, 0x9e, 0x3d, 0x81, 0x51 },
},
{ .msglen = 67,
.result = { 0x94, 0xac, 0xc2, 0xe0, 0x8, 0xb7, 0xe5, 0xe2, 0x18, 0xf0, 0x59, 0x47, 0xda, 0xf4, 0xb4, 0xb1, 0xfe, 0x11, 0xe4, 0x3c, 0x2c, 0xa8, 0x1, 0x30, 0x5e, 0x8e, 0x89, 0x4, 0xff, 0xf2, 0xc1, 0x88 },
},
{ .msglen = 68,
.result = { 0xa2, 0x73, 0x97, 0x2, 0xd7, 0xc4, 0x9b, 0x39, 0x20, 0xdc, 0xac, 0x6d, 0xca, 0x81, 0xdd, 0x83, 0xac, 0xd4, 0xf, 0x89, 0x94, 0x10, 0x8b, 0xf6, 0xb9, 0x10, 0xab, 0x24, 0xd3, 0xf9, 0xc8, 0x4f },
},
{ .msglen = 69,
.result = { 0x68, 0xa9, 0x9b, 0xc2, 0xb6, 0x1e, 0x4c, 0xe3, 0xc6, 0x89, 0xc7, 0x40, 0x2f, 0xee, 0x8f, 0x50, 0xf4, 0x9d, 0x56, 0x5, 0xba, 0x0, 0x30, 0xaa, 0xd6, 0xa6, 0x4d, 0x94, 0x46, 0xc, 0x3c, 0x3 },
},
{ .msglen = 70,
.result = { 0x4f, 0x71, 0x4e, 0x2f, 0x89, 0xce, 0x84, 0x3b, 0x9a, 0xab, 0x6c, 0x93, 0xac, 0xa8, 0x51, 0xf7, 0x72, 0x91, 0xd5, 0xad, 0xf7, 0x91, 0x5a, 0x3a, 0xa6, 0x16, 0x61, 0x6b, 0x9f, 0xba, 0xe3, 0x51 },
},
{ .msglen = 71,
.result = { 0x25, 0x50, 0x50, 0x55, 0x50, 0x6a, 0x55, 0x8d, 0x54, 0x61, 0x60, 0x44, 0x5a, 0xb0, 0x4f, 0x77, 0x7, 0xbe, 0xcf, 0x49, 0xb6, 0x68, 0x9b, 0x6d, 0x79, 0xd5, 0xb9, 0xb1, 0x45, 0x29, 0xcc, 0xc1 },
},
{ .msglen = 72,
.result = { 0x59, 0x47, 0xf5, 0x99, 0xad, 0xac, 0x9, 0x15, 0xdc, 0x67, 0x2f, 0x4e, 0x38, 0x83, 0xab, 0x53, 0x8d, 0xc2, 0x71, 0xf5, 0xb9, 0x4e, 0x59, 0xd5, 0x32, 0x10, 0x90, 0xd8, 0x5b, 0xb6, 0x5, 0xc0 },
},
{ .msglen = 73,
.result = { 0x68, 0x9, 0x2a, 0x7d, 0x49, 0x8f, 0xc1, 0xd4, 0x93, 0xc9, 0xf8, 0xe9, 0xd8, 0xc4, 0xc2, 0x34, 0xc8, 0xac, 0xc9, 0xb4, 0x9, 0x5d, 0x46, 0x51, 0xd4, 0x2e, 0x4, 0xbb, 0x8f, 0x66, 0x75, 0x15 },
},
{ .msglen = 74,
.result = { 0xc, 0xf, 0x3c, 0x79, 0x8b, 0x80, 0x93, 0xd9, 0x7f, 0x3, 0xb4, 0x5f, 0xfe, 0x66, 0xcf, 0xbe, 0xea, 0xe1, 0xa0, 0xfd, 0xf0, 0x49, 0x3d, 0x19, 0x54, 0xdc, 0x38, 0x73, 0x11, 0xb3, 0x8, 0xa3 },
},
{ .msglen = 75,
.result = { 0x33, 0xae, 0x39, 0xab, 0x8, 0x54, 0x48, 0x9e, 0x2b, 0xbe, 0x89, 0x7a, 0x32, 0xdb, 0x81, 0xc5, 0xbd, 0x39, 0x19, 0xc1, 0x87, 0x6f, 0x64, 0xb3, 0x70, 0xea, 0x9, 0xd2, 0xea, 0x72, 0x53, 0x6e },
},
{ .msglen = 76,
.result = { 0x37, 0xae, 0xae, 0xed, 0x35, 0xd1, 0x97, 0x88, 0x78, 0x57, 0x19, 0xdd, 0xbc, 0x3c, 0xa3, 0x10, 0x79, 0x21, 0x3a, 0xf9, 0xce, 0x34, 0xf3, 0xad, 0x85, 0x4f, 0xf2, 0xac, 0xd7, 0x24, 0x7b, 0x80 },
},
{ .msglen = 77,
.result = { 0xc0, 0xd0, 0xb7, 0xff, 0x19, 0x7a, 0xfe, 0x6c, 0x6, 0x4b, 0xf6, 0x12, 0x4c, 0xe6, 0xe8, 0x2, 0xf3, 0x32, 0xc3, 0x77, 0xf, 0x10, 0xab, 0x89, 0xde, 0x18, 0xc5, 0xe, 0x25, 0xab, 0x23, 0xdb },
},
{ .msglen = 78,
.result = { 0x5e, 0xe7, 0x3b, 0xa0, 0x6, 0x8e, 0x40, 0x26, 0xaf, 0x6f, 0xba, 0xf9, 0xa6, 0x23, 0xab, 0x49, 0x89, 0x15, 0xd4, 0x15, 0xc0, 0x6c, 0x1f, 0xfc, 0x6d, 0x3e, 0x51, 0x3a, 0x6e, 0xef, 0x3d, 0x17 },
},
{ .msglen = 79,
.result = { 0x2, 0xfd, 0xd7, 0x48, 0x76, 0x5b, 0x25, 0x26, 0xd4, 0x87, 0x94, 0x14, 0x9b, 0x13, 0x91, 0xa4, 0x39, 0x5, 0x4c, 0x4e, 0x6a, 0xdd, 0x60, 0x66, 0x4e, 0x23, 0xeb, 0xa5, 0xfd, 0xad, 0x5a, 0xda },
},
{ .msglen = 80,
.result = { 0x84, 0xf3, 0x92, 0xf1, 0xc0, 0xc0, 0x5a, 0x63, 0xec, 0x16, 0xf4, 0xfc, 0x4c, 0xc6, 0xb6, 0x62, 0x1e, 0x9f, 0xdd, 0xcb, 0xd8, 0x4a, 0x12, 0xf2, 0x9, 0x11, 0x88, 0x66, 0x4e, 0x85, 0xef, 0x9f },
},
{ .msglen = 81,
.result = { 0x8b, 0x28, 0x66, 0x9d, 0xe2, 0x96, 0x58, 0x21, 0x3f, 0xcd, 0xd7, 0xe0, 0xce, 0x9b, 0x51, 0x32, 0x68, 0xac, 0x1c, 0x9e, 0x38, 0x7d, 0x60, 0x5a, 0x32, 0xe1, 0x14, 0x91, 0xee, 0x36, 0x39, 0xbd },
},
{ .msglen = 82,
.result = { 0x5c, 0x16, 0xe3, 0xff, 0x6b, 0x51, 0xc2, 0x59, 0x8a, 0x24, 0xc2, 0xba, 0xc0, 0xd7, 0xd4, 0xac, 0xd9, 0x3e, 0x38, 0x1f, 0x7f, 0x2d, 0xb7, 0x85, 0x8b, 0xf1, 0xd2, 0x42, 0x28, 0xa9, 0xd7, 0x94 },
},
{ .msglen = 83,
.result = { 0xde, 0x40, 0xe0, 0xde, 0xf9, 0xe4, 0x75, 0x3d, 0x61, 0x91, 0x38, 0xac, 0x31, 0xa9, 0xba, 0x31, 0x18, 0x41, 0x57, 0x2e, 0x89, 0xdf, 0x26, 0x83, 0x40, 0x71, 0xce, 0xdc, 0x18, 0x3f, 0xe7, 0xd7 },
},
{ .msglen = 84,
.result = { 0x85, 0xf, 0x58, 0x5f, 0x4d, 0x81, 0x5b, 0x54, 0x6a, 0xa4, 0xd4, 0xfb, 0x3, 0x4e, 0x71, 0xa7, 0xc5, 0x11, 0xf, 0x1a, 0xa8, 0x44, 0x10, 0x15, 0x2e, 0xdf, 0x1e, 0xea, 0x4d, 0x86, 0x31, 0x33 },
},
{ .msglen = 85,
.result = { 0x7f, 0xe2, 0x1b, 0x95, 0x7b, 0x19, 0x2f, 0x4e, 0x72, 0x1d, 0x6c, 0x2c, 0xf3, 0x74, 0x6e, 0x99, 0x2b, 0x10, 0x76, 0x55, 0x25, 0xe4, 0x89, 0x19, 0x98, 0xb4, 0xdc, 0xea, 0xfa, 0x68, 0xec, 0x3 },
},
{ .msglen = 86,
.result = { 0x5c, 0x95, 0x3d, 0xcc, 0x6, 0x58, 0x9b, 0xc4, 0x71, 0x61, 0xc2, 0x5a, 0xac, 0xaf, 0x54, 0xbf, 0xcc, 0x93, 0x3d, 0x2e, 0xdf, 0x99, 0x74, 0xc8, 0xc8, 0x36, 0xe9, 0x44, 0x7e, 0x6d, 0x3d, 0xe7 },
},
{ .msglen = 87,
.result = { 0xf2, 0x33, 0xbc, 0x61, 0xc6, 0x2c, 0x19, 0x26, 0x80, 0x9e, 0x1e, 0x76, 0x8e, 0x9, 0x61, 0x6, 0xfb, 0xc3, 0xc8, 0xcb, 0x35, 0x9d, 0xaa, 0x73, 0xa8, 0xe6, 0xd2, 0x89, 0xc5, 0x5d, 0xee, 0xa4 },
},
{ .msglen = 88,
.result = { 0x3f, 0x13, 0xf7, 0x63, 0x67, 0x8d, 0x65, 0xcd, 0xa8, 0x5b, 0xcd, 0xc4, 0xb7, 0x25, 0x35, 0xbe, 0xd3, 0xc1, 0x6d, 0x36, 0xb9, 0x8c, 0x8c, 0x6a, 0x79, 0xd1, 0x12, 0xe8, 0xdc, 0x6c, 0xe3, 0x6d },
},
{ .msglen = 89,
.result = { 0x8f, 0x21, 0x5a, 0x7a, 0x84, 0x79, 0x7d, 0x33, 0xa, 0x7e, 0x7a, 0x7, 0x2a, 0xa9, 0xa6, 0x58, 0x33, 0xdf, 0xec, 0x40, 0x88, 0xf2, 0x9f, 0x8d, 0x12, 0xb5, 0x5e, 0xb2, 0x88, 0x2d, 0xc1, 0x7c },
},
{ .msglen = 90,
.result = { 0x73, 0xfc, 0xc6, 0x9, 0x5f, 0xc2, 0xab, 0x2d, 0xd5, 0x84, 0x6c, 0xdd, 0x1f, 0x70, 0x9e, 0x5c, 0x30, 0x36, 0xb4, 0xe7, 0x86, 0xab, 0x89, 0xc6, 0xc9, 0xed, 0x7d, 0x2e, 0x26, 0x13, 0x37, 0x4a },
},
{ .msglen = 91,
.result = { 0x3e, 0x41, 0x8a, 0x37, 0xbd, 0xec, 0x53, 0x52, 0x47, 0xd2, 0x71, 0xa4, 0x5b, 0xc7, 0x11, 0x8e, 0x8c, 0xb8, 0x2c, 0x36, 0xc9, 0xa7, 0x15, 0x21, 0x15, 0xde, 0x7f, 0x54, 0xc7, 0xb3, 0x8d, 0x34 },
},
{ .msglen = 92,
.result = { 0xca, 0x1a, 0xf9, 0xfd, 0xf4, 0xb9, 0xd, 0xdd, 0x91, 0xd8, 0x7b, 0x7c, 0xf4, 0x82, 0xe7, 0x57, 0xc0, 0xb9, 0xfe, 0x2f, 0x3c, 0xc7, 0x5a, 0x3d, 0xb, 0x79, 0xb3, 0x7a, 0x7e, 0xfd, 0x25, 0x20 },
},
{ .msglen = 93,
.result = { 0xf6, 0x54, 0xd6, 0x3a, 0x93, 0xe3, 0x7b, 0x42, 0x11, 0xa8, 0xda, 0xa4, 0x2f, 0xbf, 0xcb, 0xd0, 0x58, 0x59, 0xf8, 0xda, 0x8c, 0x5e, 0xdc, 0x1e, 0xb0, 0x64, 0x15, 0x31, 0x92, 0xe6, 0xcc, 0xc8 },
},
{ .msglen = 94,
.result = { 0x7b, 0x8f, 0x93, 0xa3, 0x55, 0x11, 0x1e, 0x18, 0x77, 0xd9, 0x12, 0x7c, 0x54, 0x4e, 0x3f, 0x36, 0x18, 0x2f, 0xc7, 0xba, 0xd3, 0xe7, 0xc, 0xa3, 0xb2, 0xb1, 0x66, 0x7a, 0xfe, 0x30, 0x1b, 0x4e },
},
{ .msglen = 95,
.result = { 0x16, 0xea, 0xe9, 0xae, 0x5d, 0x2f, 0x88, 0x87, 0x41, 0x43, 0x3d, 0xfc, 0x35, 0x7f, 0x2c, 0x4c, 0x63, 0x36, 0xf3, 0x36, 0x51, 0x84, 0xb1, 0x64, 0xc5, 0x19, 0xc0, 0xd6, 0x57, 0xef, 0x2a, 0xa4 },
},
{ .msglen = 96,
.result = { 0xc9, 0x79, 0x20, 0xa1, 0x14, 0xba, 0xbe, 0x88, 0x7d, 0x6f, 0x4, 0xe3, 0xfd, 0x2d, 0xfd, 0xc3, 0x8a, 0x1, 0xea, 0x12, 0x9d, 0x4c, 0x14, 0xc3, 0x82, 0x7f, 0xb6, 0x1e, 0x8d, 0xcc, 0x11, 0x84 },
},
{ .msglen = 97,
.result = { 0x20, 0xa9, 0xb7, 0x5a, 0x5b, 0x76, 0xaa, 0x7b, 0xed, 0x70, 0x16, 0xfb, 0xea, 0x93, 0x55, 0xd1, 0x9f, 0x95, 0xa, 0xe0, 0x79, 0x51, 0x12, 0x2c, 0xfd, 0x7d, 0x6c, 0x94, 0x4f, 0xb6, 0x5f, 0x14 },
},
{ .msglen = 98,
.result = { 0xfc, 0xf4, 0x1, 0xcc, 0x9f, 0xce, 0xc2, 0x50, 0x0, 0x1f, 0xf8, 0x3f, 0xe4, 0x87, 0x2e, 0x79, 0x94, 0xdb, 0x86, 0x85, 0x8a, 0x7d, 0xb4, 0x6a, 0x84, 0xb8, 0x6c, 0x32, 0xad, 0x8c, 0x20, 0x63 },
},
{ .msglen = 99,
.result = { 0x17, 0xa1, 0xf5, 0x6, 0xaa, 0xb0, 0xe3, 0x82, 0x2e, 0x9c, 0xf2, 0xb9, 0x75, 0x75, 0xe9, 0x36, 0x90, 0xa9, 0xb2, 0xb9, 0x97, 0xb0, 0x10, 0xbb, 0xdd, 0x65, 0xd0, 0xa8, 0xbf, 0x69, 0x1d, 0x43 },
},
{ .msglen = 100,
.result = { 0xb5, 0x6c, 0xca, 0xca, 0xe1, 0xc5, 0x74, 0x19, 0xb0, 0x89, 0x58, 0x5e, 0x2e, 0x61, 0xcb, 0xa1, 0x23, 0xd0, 0x25, 0x37, 0x47, 0xe3, 0xac, 0x3e, 0x9a, 0xf6, 0x5d, 0x0, 0x77, 0xc2, 0xdc, 0x47 },
},
{ .msglen = 101,
.result = { 0x8, 0xa4, 0x3b, 0xe7, 0x1e, 0xeb, 0x4c, 0x3a, 0x82, 0xf1, 0xe4, 0x9d, 0xb1, 0xcc, 0xbc, 0x30, 0xb7, 0xa6, 0xfe, 0x47, 0x43, 0x86, 0xb8, 0x10, 0x33, 0xef, 0x8e, 0x35, 0x34, 0xf1, 0x52, 0xae },
},
{ .msglen = 102,
.result = { 0x0, 0xdb, 0x9b, 0xb7, 0xfc, 0x8a, 0x55, 0x81, 0x49, 0x94, 0x5c, 0xc2, 0x63, 0xd2, 0x56, 0x85, 0xab, 0x5a, 0xa1, 0x89, 0x66, 0xa1, 0x4d, 0x39, 0x1b, 0xe2, 0x12, 0x9a, 0x51, 0x79, 0xc0, 0x1c },
},
{ .msglen = 103,
.result = { 0x4c, 0xeb, 0xaa, 0xec, 0xb8, 0x31, 0xef, 0xb6, 0x89, 0x8e, 0x42, 0xdf, 0x9d, 0x57, 0x42, 0xf7, 0x53, 0x5d, 0x11, 0xc0, 0x29, 0xf7, 0x64, 0x30, 0x42, 0x32, 0x23, 0xda, 0x19, 0xe, 0x8d, 0xf3 },
},
{ .msglen = 104,
.result = { 0x32, 0xf5, 0x6, 0x53, 0xf8, 0x18, 0x94, 0x3d, 0xaa, 0x5e, 0xb9, 0x9e, 0x95, 0x8, 0x4, 0x29, 0xea, 0x76, 0xa1, 0xe5, 0x60, 0xa, 0x29, 0xd0, 0x78, 0x7e, 0x0, 0x27, 0x4e, 0x63, 0xc3, 0x69 },
},
{ .msglen = 105,
.result = { 0xa9, 0xf1, 0x2b, 0xaa, 0x5e, 0xb3, 0xc9, 0xf3, 0x25, 0x6e, 0x6f, 0x8, 0xc3, 0xb4, 0xab, 0xd1, 0x20, 0x3c, 0xb1, 0x82, 0x6b, 0xfa, 0x8, 0x62, 0xaf, 0x7a, 0xa9, 0x0, 0x79, 0x9a, 0x2b, 0x12 },
},
{ .msglen = 106,
.result = { 0xc2, 0x5e, 0x53, 0x66, 0x14, 0x5, 0x26, 0x6a, 0xf1, 0x70, 0x50, 0xb3, 0x9b, 0x40, 0x99, 0x7a, 0x73, 0xe2, 0xed, 0x3d, 0x4c, 0xcc, 0xf9, 0xf6, 0x1b, 0x4c, 0x6, 0xdc, 0x9, 0x7a, 0xc2, 0x4a },
},
{ .msglen = 107,
.result = { 0x68, 0xeb, 0x96, 0xb6, 0x9, 0x7b, 0xe2, 0x4a, 0x18, 0x3a, 0xe8, 0xf8, 0xe8, 0xc7, 0x4e, 0x27, 0x8c, 0x18, 0x8a, 0xa6, 0x23, 0xfe, 0xc2, 0xb, 0xbd, 0x72, 0x1, 0x56, 0x21, 0x6b, 0x6c, 0x56 },
},
{ .msglen = 108,
.result = { 0xe1, 0x7, 0xeb, 0xc3, 0x3a, 0x5e, 0x28, 0x65, 0x14, 0xcb, 0x73, 0x19, 0xef, 0x32, 0x78, 0x96, 0xf3, 0xda, 0x1e, 0x5a, 0x89, 0xf4, 0x29, 0x7c, 0xa0, 0xfd, 0x3b, 0xe8, 0xb, 0xf0, 0x72, 0xf1 },
},
{ .msglen = 109,
.result = { 0x88, 0xac, 0xe5, 0xe7, 0xdb, 0x26, 0xa5, 0xa5, 0xef, 0x66, 0x92, 0xb4, 0xab, 0x6b, 0xed, 0x4b, 0x1a, 0x9e, 0x19, 0xb0, 0xb6, 0xd6, 0x11, 0xb1, 0x33, 0x40, 0x50, 0x69, 0x48, 0x75, 0x4, 0xe5 },
},
{ .msglen = 110,
.result = { 0x7d, 0x25, 0x12, 0x5, 0x37, 0x8c, 0x89, 0x8a, 0x43, 0xd9, 0x97, 0x26, 0xb8, 0xaf, 0xb3, 0x21, 0x4d, 0xde, 0x24, 0x58, 0x4f, 0xc8, 0xd, 0x31, 0x22, 0xb2, 0xdf, 0x34, 0xd5, 0xb, 0x25, 0xb9 },
},
{ .msglen = 111,
.result = { 0x4e, 0xfa, 0x3f, 0x64, 0x15, 0xf8, 0xe2, 0xb9, 0x10, 0x70, 0xeb, 0x6a, 0xf6, 0xf2, 0x14, 0x33, 0x0, 0xd1, 0x19, 0xf2, 0x8c, 0x50, 0x57, 0x17, 0xf0, 0xc5, 0x5d, 0xa1, 0xe, 0x22, 0xa0, 0x53 },
},
{ .msglen = 112,
.result = { 0x12, 0xac, 0x71, 0xa0, 0x72, 0x7a, 0x45, 0x74, 0x82, 0xf6, 0xde, 0x75, 0xe, 0xb9, 0xb2, 0x65, 0x76, 0x86, 0x13, 0x77, 0x4a, 0x30, 0xbe, 0xfa, 0x1, 0x38, 0x74, 0x49, 0xc9, 0x7f, 0x43, 0x9a },
},
{ .msglen = 113,
.result = { 0xfe, 0x25, 0x6b, 0xbf, 0x17, 0x61, 0x29, 0xce, 0x9e, 0xc2, 0x42, 0x9a, 0xb8, 0x29, 0xdb, 0x88, 0xef, 0x75, 0x3b, 0xad, 0xba, 0x9c, 0xd5, 0x9, 0x40, 0x2f, 0x49, 0xbd, 0x3, 0x43, 0xa7, 0x3 },
},
{ .msglen = 114,
.result = { 0xe5, 0x36, 0x48, 0xb5, 0x9e, 0xb3, 0x3c, 0x5f, 0x86, 0xab, 0x5, 0xe4, 0xc0, 0xe3, 0x94, 0xe4, 0x4c, 0x90, 0xcd, 0xa1, 0x97, 0x12, 0xdf, 0x33, 0x7a, 0x1a, 0x1e, 0xcd, 0xd4, 0x61, 0xa8, 0x3c },
},
{ .msglen = 115,
.result = { 0x52, 0xbd, 0xc6, 0x84, 0x65, 0x32, 0x88, 0x1, 0x85, 0x64, 0xfd, 0xc9, 0x98, 0x18, 0x27, 0x52, 0xe9, 0x30, 0xa2, 0x9e, 0xc2, 0xcf, 0xa9, 0x98, 0xbc, 0x47, 0x3a, 0xc7, 0xd5, 0xb1, 0x81, 0x78 },
},
{ .msglen = 116,
.result = { 0xab, 0xb1, 0xb3, 0xa5, 0x23, 0xea, 0x45, 0xe8, 0xe0, 0xa9, 0x3d, 0xe9, 0xe9, 0x86, 0x15, 0x10, 0x90, 0xca, 0xf7, 0xcc, 0x92, 0x64, 0x10, 0x3d, 0x63, 0x2f, 0x17, 0xec, 0x54, 0x9e, 0xbd, 0x3b },
},
{ .msglen = 117,
.result = { 0x82, 0xf8, 0x45, 0xcd, 0x8b, 0xfc, 0xd8, 0x81, 0x6b, 0x1f, 0x91, 0x30, 0x6d, 0xbb, 0x91, 0x70, 0x8b, 0xfe, 0x8d, 0x33, 0x35, 0x4f, 0x62, 0x7f, 0xba, 0xb6, 0x99, 0x3b, 0x79, 0xe6, 0x8f, 0x58 },
},
{ .msglen = 118,
.result = { 0xa6, 0x59, 0x67, 0x5e, 0x49, 0xe2, 0x95, 0x28, 0xa3, 0x4b, 0x4a, 0x10, 0x20, 0xd1, 0xd6, 0x7b, 0x86, 0x8a, 0x5c, 0x81, 0x31, 0x68, 0xea, 0xb7, 0x61, 0xbb, 0xb6, 0x3a, 0x6d, 0x78, 0xaa, 0x37 },
},
{ .msglen = 119,
.result = { 0x64, 0x9, 0xaf, 0x42, 0xff, 0xb1, 0xc7, 0xe6, 0xbf, 0x6f, 0xa1, 0xbb, 0x5a, 0x6, 0xea, 0xd, 0x57, 0x7d, 0x24, 0x41, 0x2b, 0xf9, 0x63, 0x82, 0x1f, 0x9, 0xa5, 0xa7, 0x58, 0xc, 0x4, 0x55 },
},
{ .msglen = 120,
.result = { 0x43, 0x33, 0x90, 0x81, 0xb6, 0x23, 0x50, 0xdf, 0xa2, 0x7e, 0x41, 0xa2, 0x40, 0x40, 0xa9, 0x34, 0xd6, 0x5, 0x6c, 0x44, 0x8, 0x3f, 0x2b, 0xaa, 0xff, 0x3, 0xc3, 0x49, 0x1b, 0x15, 0x5e, 0x7c },
},
{ .msglen = 121,
.result = { 0xe, 0xd7, 0x6d, 0x29, 0xdd, 0x8, 0xee, 0x2f, 0x1d, 0x5a, 0xb2, 0x70, 0x90, 0x8d, 0xa9, 0xf2, 0x5c, 0x5b, 0xc5, 0xe1, 0x7c, 0xec, 0x49, 0x8f, 0x46, 0x94, 0xe1, 0xc8, 0xd4, 0x68, 0xa2, 0x34 },
},
{ .msglen = 122,
.result = { 0x4f, 0x25, 0x61, 0xb1, 0x29, 0xb7, 0x41, 0x50, 0xc7, 0xfa, 0xab, 0x6c, 0x92, 0xff, 0x4, 0xc, 0xa3, 0xa1, 0x10, 0xf6, 0xa6, 0xa4, 0x5a, 0xbf, 0xe, 0x9a, 0x61, 0xa8, 0x24, 0xa3, 0x93, 0x1e },
},
{ .msglen = 123,
.result = { 0x7c, 0x8c, 0xf4, 0x5d, 0x45, 0xcf, 0x61, 0x22, 0xc9, 0x8e, 0x3a, 0xeb, 0x85, 0x55, 0x66, 0x2e, 0x1e, 0x33, 0x88, 0xab, 0x74, 0xf2, 0x66, 0x4f, 0x43, 0xfa, 0x3e, 0x25, 0xcc, 0xd2, 0x0, 0x71 },
},
{ .msglen = 124,
.result = { 0x8b, 0x51, 0x99, 0x90, 0x84, 0xda, 0x7a, 0xb3, 0xb1, 0x31, 0x1b, 0x1a, 0x66, 0xe2, 0x53, 0xac, 0x45, 0x94, 0x5c, 0xa6, 0x8c, 0x44, 0x45, 0x4, 0x58, 0x13, 0xcb, 0x44, 0x9e, 0x6c, 0x6a, 0x10 },
},
{ .msglen = 125,
.result = { 0xc5, 0xb0, 0x36, 0x55, 0x4d, 0x15, 0xf0, 0x67, 0xf8, 0x26, 0x45, 0x48, 0xa7, 0x65, 0xcc, 0xa8, 0x14, 0x1e, 0x63, 0x22, 0x36, 0xc3, 0xf3, 0x99, 0x5b, 0x77, 0xb2, 0xa8, 0xc3, 0x62, 0xb4, 0xdd },
},
{ .msglen = 126,
.result = { 0x38, 0xcb, 0x97, 0x81, 0x62, 0xde, 0x32, 0x5f, 0xc5, 0x27, 0x39, 0x82, 0x36, 0x77, 0x5a, 0xc4, 0xbf, 0x45, 0xf4, 0xe8, 0x17, 0xa9, 0x17, 0xfc, 0x34, 0xb, 0xa1, 0x11, 0x79, 0xf5, 0xc, 0x79 },
},
{ .msglen = 127,
.result = { 0x2e, 0x16, 0xab, 0xf4, 0x56, 0xea, 0x6a, 0x7e, 0x97, 0x25, 0xf9, 0x9a, 0x0, 0x5d, 0xe3, 0x70, 0x76, 0xa9, 0x2a, 0xab, 0xae, 0x32, 0xe5, 0xe8, 0xb6, 0xe1, 0x22, 0xc8, 0x74, 0xe1, 0x1f, 0x22 },
},
{ .msglen = 128,
.result = { 0x6e, 0x54, 0xeb, 0x50, 0x85, 0x7b, 0xd2, 0x64, 0x32, 0x2c, 0xb0, 0xd0, 0xc2, 0x3, 0x31, 0x95, 0xa8, 0x6a, 0x50, 0x49, 0xf4, 0x77, 0x27, 0x1a, 0x89, 0x10, 0x3e, 0x98, 0x45, 0x1e, 0xe7, 0xeb },
},
{ .msglen = 129,
.result = { 0x7, 0x2e, 0xdf, 0xe9, 0x2e, 0x73, 0xf4, 0x1e, 0x65, 0x31, 0x64, 0x25, 0xc1, 0x59, 0x46, 0xd7, 0xf9, 0x12, 0xfe, 0xc7, 0x9f, 0x24, 0xa, 0xd9, 0xfb, 0x8, 0xcb, 0x5f, 0xf2, 0x77, 0x11, 0xce },
},
{ .msglen = 130,
.result = { 0x6, 0x46, 0xc7, 0x42, 0xc2, 0xc3, 0xf2, 0x4c, 0x82, 0x7d, 0x1c, 0x2c, 0x68, 0xfd, 0x29, 0x6d, 0xc2, 0xac, 0x4f, 0xbc, 0x8d, 0xb2, 0xf7, 0x78, 0xb7, 0x8f, 0x4, 0x3f, 0x49, 0xb5, 0xc5, 0xd },
},
{ .msglen = 131,
.result = { 0x9c, 0x1f, 0xdb, 0x89, 0x3b, 0x8b, 0x5c, 0x3d, 0x1e, 0xd2, 0x9f, 0x74, 0x63, 0xb, 0x4f, 0x59, 0x72, 0x13, 0x4f, 0x40, 0x59, 0x35, 0xc6, 0x64, 0x5a, 0xb5, 0x43, 0xaf, 0x43, 0x7a, 0x13, 0xb0 },
},
{ .msglen = 132,
.result = { 0x25, 0xa9, 0x97, 0x9e, 0x4f, 0x52, 0xe6, 0xe7, 0xf, 0x38, 0xc6, 0xfb, 0x9e, 0x77, 0xe7, 0x1c, 0xb9, 0x8a, 0xf3, 0x4d, 0x76, 0xb3, 0x58, 0x8e, 0xab, 0x7d, 0xd6, 0xbb, 0x78, 0x26, 0xb1, 0x7f },
},
{ .msglen = 133,
.result = { 0x2b, 0x8, 0xfa, 0x23, 0x7d, 0xb2, 0xa1, 0x16, 0x85, 0x7b, 0x3c, 0xa4, 0xde, 0x19, 0xf7, 0x81, 0xb6, 0xaf, 0xbc, 0x11, 0x31, 0x10, 0x6f, 0x14, 0x4a, 0x62, 0x48, 0x1e, 0x43, 0x95, 0xa4, 0xb4 },
},
{ .msglen = 134,
.result = { 0x9c, 0x93, 0x30, 0x3f, 0x4c, 0x8f, 0xa7, 0x56, 0xd1, 0x6c, 0x9a, 0x28, 0xa1, 0x21, 0x7d, 0x5b, 0x12, 0x6b, 0x5a, 0xd4, 0xb9, 0x62, 0x5, 0xe2, 0xd5, 0xc8, 0x2a, 0xd1, 0xb0, 0x46, 0x2a, 0x2c },
},
{ .msglen = 135,
.result = { 0xd7, 0x17, 0xd, 0xc0, 0x46, 0x24, 0x9e, 0x14, 0x21, 0xac, 0xf3, 0xd0, 0xda, 0xf4, 0xd9, 0xf1, 0xf2, 0x96, 0xbd, 0x55, 0xff, 0x3c, 0x8d, 0x90, 0xc8, 0x2f, 0x1e, 0x87, 0xad, 0xd7, 0x8a, 0x8a },
},
{ .msglen = 136,
.result = { 0x90, 0xd6, 0xa4, 0x46, 0x75, 0x8c, 0xc3, 0xda, 0x26, 0x8a, 0xe1, 0xb7, 0xa4, 0xe, 0xef, 0x33, 0x65, 0x41, 0xa3, 0x60, 0x6a, 0xce, 0xfb, 0xc4, 0x1c, 0xa4, 0x95, 0x6d, 0x43, 0x49, 0x69, 0xd5 },
},
{ .msglen = 137,
.result = { 0xd6, 0xf5, 0xfe, 0xb0, 0x9a, 0xca, 0xec, 0xeb, 0xbe, 0x4b, 0xbd, 0x96, 0x65, 0xfe, 0x65, 0x31, 0xef, 0x36, 0x3a, 0xfc, 0x3a, 0x8, 0x3, 0xb0, 0xbf, 0xeb, 0xd, 0x2c, 0xd9, 0x27, 0x14, 0x4f },
},
{ .msglen = 138,
.result = { 0x97, 0x4f, 0x86, 0x11, 0xf9, 0x61, 0xad, 0xc, 0xba, 0x2d, 0xfa, 0xa4, 0x6f, 0x19, 0xb3, 0x66, 0xf8, 0xcc, 0x74, 0x2c, 0x76, 0x29, 0xdd, 0x6b, 0x5, 0xa3, 0x3a, 0x3b, 0xa6, 0xec, 0x81, 0xc0 },
},
{ .msglen = 139,
.result = { 0x9a, 0xe3, 0xc, 0x22, 0x5d, 0xb3, 0x71, 0x5d, 0x30, 0xcf, 0x6, 0xc1, 0x86, 0xf6, 0x84, 0xac, 0x25, 0x45, 0xb2, 0xa0, 0xd2, 0x93, 0x8b, 0x9e, 0x77, 0x55, 0x16, 0x51, 0x61, 0x4a, 0x91, 0xcd },
},
{ .msglen = 140,
.result = { 0xf1, 0x30, 0xf4, 0xc7, 0x6c, 0xe3, 0x8d, 0x63, 0x41, 0x62, 0x64, 0xe1, 0xc3, 0x97, 0xf0, 0xd6, 0xf3, 0xfd, 0x17, 0xe, 0xca, 0xd8, 0x9e, 0x6d, 0xa0, 0xa1, 0x27, 0x60, 0xff, 0xf, 0x7a, 0xca },
},
{ .msglen = 141,
.result = { 0x5, 0xab, 0x87, 0x58, 0xa8, 0x5e, 0x7d, 0xec, 0x23, 0x90, 0xd8, 0xfa, 0x87, 0x1, 0x4b, 0x32, 0xe9, 0x0, 0x7b, 0x92, 0x3b, 0x51, 0x44, 0x86, 0xa2, 0x55, 0xf0, 0xb7, 0x13, 0x3b, 0x58, 0x70 },
},
{ .msglen = 142,
.result = { 0xff, 0x4e, 0x8a, 0xca, 0xce, 0xe0, 0x84, 0x2a, 0x70, 0x82, 0x52, 0x1e, 0x67, 0xc, 0x67, 0x36, 0x76, 0x74, 0xed, 0x49, 0x21, 0x44, 0x0, 0x1a, 0x75, 0xcd, 0x4f, 0x17, 0xb8, 0xa9, 0xdf, 0xb9 },
},
{ .msglen = 143,
.result = { 0xf2, 0x36, 0x6f, 0xf3, 0x8e, 0xf3, 0xbd, 0x51, 0xec, 0xc4, 0x96, 0xc1, 0x88, 0xfe, 0x68, 0x5e, 0x1b, 0xdf, 0x71, 0x6b, 0xf3, 0x78, 0x84, 0x16, 0x11, 0xac, 0x37, 0x4d, 0x8f, 0x6e, 0x7b, 0x40 },
},
{ .msglen = 144,
.result = { 0x24, 0x20, 0x1d, 0x2, 0x16, 0x1, 0xc4, 0xe5, 0xdf, 0x81, 0xca, 0xa9, 0xf2, 0x4d, 0xe2, 0x77, 0x11, 0xf6, 0x43, 0xd3, 0x36, 0x36, 0x1c, 0xe6, 0x6c, 0x96, 0xc9, 0x74, 0x8e, 0x39, 0x1c, 0xb1 },
},
{ .msglen = 145,
.result = { 0xfc, 0x13, 0x13, 0x5c, 0x87, 0x9a, 0x95, 0xcd, 0x66, 0xac, 0x85, 0xda, 0x8c, 0x28, 0x38, 0x3f, 0x43, 0xe1, 0x40, 0x8e, 0x8f, 0x49, 0x17, 0xda, 0x75, 0xd0, 0xc4, 0xf5, 0x9e, 0x3, 0xf0, 0x62 },
},
{ .msglen = 146,
.result = { 0xcc, 0x3e, 0x74, 0x6a, 0x82, 0xb0, 0x67, 0x77, 0xcf, 0x6e, 0x93, 0x40, 0x84, 0xc7, 0xa1, 0x85, 0xa5, 0x38, 0x23, 0xa5, 0x4f, 0x9e, 0xee, 0x3d, 0xa7, 0xab, 0x88, 0x3b, 0x3, 0x1d, 0xdb, 0xbd },
},
{ .msglen = 147,
.result = { 0xaa, 0x4f, 0x52, 0xf0, 0xe8, 0x49, 0x80, 0x5e, 0xe4, 0xd4, 0x8f, 0xc1, 0x5c, 0x7d, 0x36, 0x2, 0xdb, 0xda, 0x45, 0xab, 0x6e, 0x90, 0xc1, 0x55, 0x4f, 0x8, 0xaf, 0x55, 0x4d, 0x45, 0x6b, 0x91 },
},
{ .msglen = 148,
.result = { 0xfb, 0x92, 0xef, 0x68, 0xc4, 0xa, 0xd9, 0xd8, 0x86, 0xb5, 0x63, 0x34, 0xa7, 0x42, 0x5a, 0xef, 0x13, 0xc0, 0xc9, 0x44, 0x8f, 0x9e, 0x40, 0x51, 0x1b, 0xcf, 0xbb, 0x8c, 0xb0, 0x2c, 0x56, 0xc },
},
{ .msglen = 149,
.result = { 0x88, 0xdb, 0x71, 0x51, 0x85, 0x63, 0xb6, 0xb4, 0xeb, 0x7c, 0x11, 0xaa, 0x96, 0x8, 0x9e, 0x60, 0x70, 0xa5, 0x19, 0xa4, 0x2, 0xf1, 0xa0, 0x4f, 0x16, 0xde, 0xd6, 0x8d, 0xd3, 0xc5, 0xc, 0x6c },
},
{ .msglen = 150,
.result = { 0x4a, 0xad, 0x96, 0xea, 0x90, 0xb7, 0x76, 0x9d, 0x92, 0x60, 0x35, 0x59, 0x1c, 0x89, 0x67, 0x54, 0xfd, 0x50, 0x20, 0x97, 0xc8, 0x16, 0xc8, 0xc2, 0x50, 0x40, 0x63, 0xba, 0xfb, 0xbc, 0x5e, 0xcd },
},
{ .msglen = 151,
.result = { 0xca, 0x4c, 0x3d, 0x26, 0x75, 0x82, 0x48, 0x5b, 0xa4, 0xd3, 0x28, 0x9, 0x8d, 0xe0, 0x67, 0x6d, 0xe1, 0x5, 0x8a, 0xbf, 0x17, 0xbb, 0x6e, 0x48, 0x2e, 0xd, 0xcd, 0x90, 0x7c, 0x4e, 0xa4, 0x94 },
},
{ .msglen = 152,
.result = { 0x6d, 0x27, 0x5e, 0x91, 0xeb, 0xc7, 0x1a, 0x31, 0x42, 0xfa, 0x2c, 0x91, 0xdc, 0x6a, 0xdc, 0x1b, 0x2b, 0x66, 0xf2, 0x9a, 0xf6, 0x11, 0x36, 0x96, 0x2a, 0xfc, 0x73, 0x89, 0x7e, 0xd4, 0x55, 0x3d },
},
{ .msglen = 153,
.result = { 0x76, 0xba, 0x1d, 0x4b, 0xc1, 0xa2, 0x1b, 0x56, 0xbe, 0x5, 0x38, 0x90, 0x47, 0xe9, 0x9, 0xc2, 0xd1, 0x2, 0x6d, 0x44, 0x81, 0xf7, 0x6e, 0x28, 0x88, 0x79, 0xb5, 0x10, 0x75, 0xfb, 0xc6, 0xe7 },
},
{ .msglen = 154,
.result = { 0x6d, 0xbc, 0x90, 0xa6, 0x2f, 0xb5, 0x45, 0x5f, 0x4a, 0xcb, 0x85, 0x32, 0x90, 0x57, 0x86, 0x75, 0x51, 0xa5, 0x7e, 0x4b, 0x6b, 0xb3, 0xeb, 0xfe, 0xba, 0x75, 0xfc, 0x55, 0x1a, 0x85, 0x3, 0x54 },
},
{ .msglen = 155,
.result = { 0x7d, 0x59, 0x19, 0xb6, 0xf2, 0x7f, 0x7, 0x7a, 0xaa, 0xf7, 0xdf, 0x2e, 0x2d, 0xfb, 0x57, 0x14, 0xd6, 0x9f, 0x9c, 0xcc, 0x56, 0x88, 0xe, 0x85, 0xcc, 0x30, 0x6, 0x32, 0x1f, 0x70, 0x47, 0x59 },
},
{ .msglen = 156,
.result = { 0xea, 0xfa, 0x44, 0x81, 0x83, 0xec, 0x2d, 0x63, 0xa6, 0xea, 0xf0, 0x6, 0x5d, 0x15, 0x32, 0x89, 0xed, 0x52, 0xf, 0x23, 0x66, 0x8b, 0x1c, 0x7c, 0x13, 0xd0, 0x35, 0xc1, 0x7d, 0x27, 0xfe, 0x80 },
},
{ .msglen = 157,
.result = { 0xab, 0x31, 0xe1, 0x44, 0x3d, 0x3a, 0xf5, 0x6a, 0x8b, 0x5d, 0xa6, 0xd5, 0x63, 0x23, 0x7e, 0x17, 0x24, 0xc9, 0x41, 0x53, 0x86, 0x90, 0xb7, 0x6f, 0xbc, 0x39, 0x5d, 0x1b, 0x19, 0xd9, 0xef, 0x9c },
},
{ .msglen = 158,
.result = { 0x3e, 0x34, 0xec, 0xd9, 0x26, 0xe7, 0x27, 0x3b, 0xc5, 0xc3, 0x8e, 0x11, 0xba, 0x58, 0xcf, 0x2b, 0x29, 0xc4, 0x49, 0xfc, 0xf6, 0x9d, 0xcc, 0x2a, 0x0, 0xff, 0xe6, 0xbc, 0x7d, 0x2a, 0x48, 0x22 },
},
{ .msglen = 159,
.result = { 0xc8, 0x59, 0x27, 0xa2, 0x58, 0x9e, 0xfe, 0x8c, 0x5a, 0x7f, 0x99, 0xd0, 0x58, 0xd4, 0x8c, 0xae, 0xa9, 0x4, 0x24, 0x50, 0x34, 0x23, 0x45, 0xfe, 0x87, 0xa7, 0x53, 0x5a, 0x27, 0x9d, 0x1b, 0x4f },
},
{ .msglen = 160,
.result = { 0xd7, 0x76, 0xaa, 0x3b, 0x97, 0x5e, 0xac, 0xbe, 0x46, 0x45, 0x80, 0x8e, 0x2c, 0xa2, 0xe1, 0xd4, 0x75, 0xb5, 0xe0, 0xd2, 0x4c, 0x59, 0xf0, 0xc3, 0xe8, 0x8c, 0x96, 0xbd, 0x85, 0x23, 0x8b, 0x40 },
},
{ .msglen = 161,
.result = { 0x40, 0x8e, 0xa5, 0xbd, 0x32, 0x7, 0x19, 0xc8, 0x31, 0x22, 0x32, 0xdf, 0xe0, 0xf5, 0xe2, 0x5f, 0x91, 0xf4, 0x95, 0x7a, 0xa7, 0x91, 0x9d, 0xed, 0x35, 0x2f, 0x0, 0x4, 0x62, 0x63, 0x4, 0x80 },
},
{ .msglen = 162,
.result = { 0xa6, 0x1b, 0x63, 0x3, 0xbf, 0x2, 0xbd, 0xbb, 0x69, 0x1b, 0xac, 0x54, 0x99, 0xee, 0x8b, 0xe, 0xb, 0x41, 0x78, 0xda, 0x8f, 0x72, 0x97, 0xdf, 0x9, 0xfa, 0x35, 0xe1, 0x8a, 0xb3, 0x80, 0xc3 },
},
{ .msglen = 163,
.result = { 0x7d, 0xd3, 0x5e, 0x1a, 0x9, 0x94, 0x6e, 0x30, 0xc6, 0xbb, 0xda, 0xe7, 0x92, 0x49, 0xf6, 0x37, 0xe, 0xb3, 0x30, 0x96, 0xb2, 0xaf, 0x57, 0x22, 0xe4, 0x8d, 0x9f, 0x83, 0x51, 0xbf, 0x98, 0xb0 },
},
{ .msglen = 164,
.result = { 0x3e, 0x10, 0xe4, 0x81, 0xa2, 0x1d, 0x92, 0x7a, 0x1a, 0x73, 0xfe, 0xd4, 0x8b, 0x28, 0x4c, 0x85, 0xcc, 0xfe, 0xe0, 0x4f, 0x55, 0xfd, 0x47, 0x95, 0x1f, 0x1b, 0x60, 0x38, 0x7, 0xe9, 0xc9, 0x4f },
},
{ .msglen = 165,
.result = { 0x75, 0x68, 0x14, 0xf8, 0x3c, 0x94, 0x2b, 0xe9, 0x6c, 0x49, 0xfc, 0x77, 0xa8, 0x6a, 0x5d, 0xf6, 0x4e, 0x45, 0xa0, 0x45, 0x2c, 0xfc, 0xec, 0xb1, 0xaf, 0xf5, 0x77, 0x6d, 0xbf, 0x96, 0x2b, 0x88 },
},
{ .msglen = 166,
.result = { 0x81, 0x1e, 0x33, 0x1c, 0xeb, 0xcf, 0x34, 0x58, 0x18, 0xa7, 0x2c, 0x60, 0x9, 0x36, 0x6e, 0xba, 0x46, 0x27, 0xee, 0x25, 0x60, 0xa9, 0x9f, 0x90, 0x4, 0x65, 0xa6, 0x92, 0x48, 0x4a, 0xf7, 0x1b },
},
{ .msglen = 167,
.result = { 0xdc, 0x3d, 0x6, 0x9e, 0x2c, 0x8c, 0x2d, 0x84, 0xf7, 0x97, 0xa, 0xeb, 0xe3, 0x68, 0xa7, 0x59, 0x3d, 0xa, 0xba, 0x6f, 0xfb, 0x11, 0x5a, 0xf8, 0x99, 0xae, 0x84, 0x1f, 0x43, 0xf8, 0xfd, 0xac },
},
{ .msglen = 168,
.result = { 0x4e, 0xd7, 0x72, 0x7d, 0xfe, 0x4d, 0x8a, 0x9a, 0xfa, 0x39, 0xb7, 0x74, 0x83, 0x61, 0xd5, 0xb6, 0xd1, 0x56, 0x88, 0xe7, 0x85, 0x15, 0xcf, 0x2d, 0x91, 0x73, 0xa4, 0xc9, 0xad, 0x76, 0x47, 0x2f },
},
{ .msglen = 169,
.result = { 0x33, 0x25, 0x94, 0xbc, 0xa4, 0xd, 0x39, 0x84, 0x4a, 0xe5, 0x30, 0x1f, 0x70, 0x41, 0xf0, 0xa7, 0x6d, 0x52, 0x3f, 0xa9, 0x17, 0x83, 0x46, 0xe, 0x26, 0x77, 0xe9, 0xfd, 0xe, 0x46, 0x21, 0xee },
},
{ .msglen = 170,
.result = { 0x84, 0xb8, 0x3c, 0x8d, 0x89, 0xd6, 0x55, 0x75, 0xbd, 0x5d, 0xcb, 0x76, 0xfe, 0x42, 0x98, 0xf9, 0xff, 0x8b, 0x4d, 0xe6, 0xe8, 0xd6, 0x1f, 0x37, 0xa6, 0xe0, 0xa8, 0x37, 0x28, 0xed, 0xf4, 0x38 },
},
{ .msglen = 171,
.result = { 0xf, 0x48, 0x6c, 0x1f, 0x99, 0x6d, 0x3c, 0x11, 0xd9, 0x7a, 0x33, 0xa, 0xdf, 0xb1, 0xa3, 0x59, 0x3f, 0xe3, 0xf0, 0x3, 0xab, 0x5e, 0x3f, 0x68, 0xe5, 0xa5, 0xd1, 0xbb, 0x8, 0x85, 0x50, 0x45 },
},
{ .msglen = 172,
.result = { 0x58, 0x25, 0xc1, 0x9e, 0x9d, 0x79, 0xa9, 0x71, 0xe7, 0xc5, 0x6, 0x8d, 0x23, 0x65, 0xf4, 0xbc, 0x9e, 0xa8, 0xab, 0xcc, 0x2f, 0x93, 0xac, 0x64, 0xb5, 0x6d, 0x28, 0x34, 0xe, 0x78, 0x9a, 0xfa },
},
{ .msglen = 173,
.result = { 0x10, 0xc6, 0xca, 0x3a, 0xc9, 0xe3, 0x82, 0x6e, 0x76, 0x5b, 0x8d, 0x42, 0x56, 0x4c, 0xc5, 0xf2, 0x2c, 0xaa, 0x95, 0x4, 0xc4, 0xef, 0x5f, 0xda, 0x10, 0xd3, 0x77, 0x9b, 0xc5, 0x95, 0x72, 0x14 },
},
{ .msglen = 174,
.result = { 0x7b, 0x64, 0xa, 0x83, 0xbf, 0x35, 0x85, 0xbf, 0xc2, 0xee, 0xdd, 0x95, 0xca, 0x5c, 0xa0, 0xee, 0xca, 0xa2, 0xb8, 0x33, 0xc1, 0x7d, 0xf3, 0x4d, 0x35, 0x2e, 0x27, 0xb8, 0x56, 0x5, 0x7a, 0x73 },
},
{ .msglen = 175,
.result = { 0xdb, 0x32, 0x29, 0x7c, 0xfd, 0xa5, 0x91, 0xae, 0x9b, 0xb0, 0xbd, 0xb4, 0x34, 0x4f, 0x60, 0x98, 0x65, 0x35, 0xe4, 0x60, 0xf8, 0x8b, 0x57, 0x47, 0x55, 0x14, 0xa4, 0x5e, 0xcc, 0xa6, 0xbd, 0xf4 },
},
{ .msglen = 176,
.result = { 0x7c, 0x6f, 0xd4, 0x3f, 0xd0, 0xa7, 0x7d, 0xd5, 0x34, 0xe0, 0x8d, 0x91, 0x5d, 0xbe, 0x92, 0xb8, 0x67, 0xbe, 0xf5, 0x80, 0xa4, 0xd5, 0x1b, 0x86, 0x12, 0xa7, 0x6, 0x43, 0x1c, 0x61, 0xa3, 0xd5 },
},
{ .msglen = 177,
.result = { 0x39, 0x4e, 0x86, 0xdf, 0xbd, 0x7f, 0x6a, 0x8d, 0xe7, 0x55, 0xce, 0x4b, 0x69, 0x90, 0xbc, 0x20, 0xf7, 0xd1, 0xba, 0x93, 0x2b, 0x57, 0x16, 0x5d, 0xc3, 0x16, 0xa, 0xf3, 0x62, 0x7, 0x66, 0xac },
},
{ .msglen = 178,
.result = { 0x5f, 0xfd, 0x40, 0x99, 0xa8, 0xdc, 0xe5, 0x2, 0x9e, 0x36, 0xf, 0x5d, 0x47, 0x53, 0xe4, 0x48, 0xcf, 0xd5, 0x5f, 0xd5, 0x29, 0x95, 0x5d, 0x92, 0x6d, 0x41, 0x22, 0x7d, 0x10, 0x8a, 0xc9, 0x88 },
},
{ .msglen = 179,
.result = { 0x58, 0x91, 0x6b, 0x40, 0x4d, 0x99, 0xf7, 0x78, 0xa5, 0xc7, 0x62, 0x49, 0x6c, 0x37, 0xd5, 0x90, 0x93, 0x3c, 0x59, 0x34, 0x36, 0xd1, 0x97, 0xcd, 0x85, 0x7d, 0x7a, 0x6d, 0x65, 0xce, 0x7f, 0xdb },
},
{ .msglen = 180,
.result = { 0x86, 0xc3, 0xa0, 0xa4, 0x46, 0x8a, 0xa8, 0x69, 0x8e, 0x6d, 0x5e, 0x79, 0x9f, 0xca, 0x9c, 0x2a, 0x94, 0xb0, 0xf8, 0x3f, 0xad, 0xa0, 0xfc, 0x50, 0x68, 0x39, 0x6c, 0xb5, 0xfc, 0x31, 0xaf, 0x74 },
},
{ .msglen = 181,
.result = { 0xce, 0x7, 0x9, 0x65, 0x72, 0xf3, 0x8c, 0x51, 0x6b, 0xf7, 0x2d, 0x46, 0xfc, 0xbc, 0xa6, 0xdd, 0x75, 0xe4, 0xd9, 0x54, 0x70, 0xcd, 0xa5, 0x5c, 0xa1, 0xb6, 0xd4, 0x3a, 0xe5, 0x4c, 0x18, 0x9e },
},
{ .msglen = 182,
.result = { 0x96, 0xbc, 0xcc, 0xbd, 0xb5, 0xf8, 0xd7, 0xef, 0xc7, 0x85, 0x44, 0x89, 0x6b, 0xd5, 0xbf, 0x78, 0xb7, 0x9d, 0xde, 0xf8, 0x72, 0xd1, 0xd9, 0xb3, 0xb0, 0xfd, 0x7f, 0x4e, 0x2a, 0xaa, 0x3d, 0x7c },
},
{ .msglen = 183,
.result = { 0x0, 0xdf, 0xb9, 0xd2, 0x99, 0x8e, 0x5c, 0xed, 0x85, 0x8b, 0x3d, 0x35, 0xdf, 0x35, 0x8c, 0x82, 0x3a, 0x20, 0x36, 0x60, 0x48, 0x7e, 0x9e, 0x8b, 0x60, 0xf9, 0x88, 0xb1, 0x8d, 0x5c, 0x41, 0xef },
},
{ .msglen = 184,
.result = { 0x99, 0xdf, 0xe5, 0xf6, 0xdf, 0xb3, 0x88, 0x88, 0x45, 0x34, 0x4a, 0x61, 0xc8, 0x87, 0x49, 0x20, 0xdf, 0xe0, 0x84, 0x5b, 0x35, 0xfe, 0x8c, 0xf8, 0x4a, 0x9c, 0xb1, 0x2d, 0x30, 0x5f, 0xfe, 0x3c },
},
{ .msglen = 185,
.result = { 0xfc, 0x53, 0x78, 0x1f, 0x4d, 0x43, 0xf4, 0xe9, 0xdc, 0x74, 0x8, 0xc3, 0xb5, 0xfc, 0x82, 0x88, 0x53, 0x25, 0xc, 0x81, 0x14, 0xa7, 0xff, 0xff, 0x9f, 0xda, 0xc8, 0x45, 0x38, 0x71, 0xdc, 0xd9 },
},
{ .msglen = 186,
.result = { 0xa5, 0x3f, 0x40, 0x24, 0x78, 0x12, 0xfc, 0xa7, 0x5b, 0x8a, 0xea, 0x5f, 0x83, 0xf9, 0x42, 0xc6, 0x21, 0xd, 0xa1, 0x46, 0x3, 0x3a, 0x62, 0xb9, 0x39, 0x39, 0xad, 0x6d, 0x70, 0x8e, 0xa2, 0x97 },
},
{ .msglen = 187,
.result = { 0x52, 0x23, 0x8a, 0xe, 0x32, 0xd5, 0x99, 0xd2, 0x7e, 0x77, 0x89, 0x70, 0x75, 0xdf, 0xf1, 0x90, 0x92, 0x1d, 0x14, 0xf7, 0xea, 0xa9, 0xdf, 0x5, 0x72, 0xf5, 0x8a, 0xd0, 0xdc, 0xee, 0x40, 0xd0 },
},
{ .msglen = 188,
.result = { 0x56, 0x86, 0xee, 0xbb, 0xde, 0xcc, 0x9d, 0xb2, 0x26, 0xa7, 0xb4, 0xef, 0x3d, 0x3f, 0x3e, 0x7d, 0xe3, 0x27, 0xea, 0x79, 0xd5, 0x82, 0x8f, 0x2f, 0x44, 0xa0, 0xe1, 0x4c, 0x67, 0xa6, 0x6b, 0x8f },
},
{ .msglen = 189,
.result = { 0xc0, 0x4c, 0xf2, 0x5c, 0x93, 0x4b, 0x36, 0xcb, 0xff, 0xc2, 0x15, 0x9, 0x77, 0x2f, 0xc1, 0xb0, 0x9, 0x98, 0x2b, 0x48, 0x3e, 0xcf, 0x6f, 0x4f, 0xe, 0x7d, 0xd9, 0xae, 0xdb, 0xeb, 0xd8, 0xe1 },
},
{ .msglen = 190,
.result = { 0x1f, 0xf1, 0x1c, 0x2c, 0x4e, 0xd0, 0x9c, 0x5e, 0x8e, 0xb4, 0x71, 0x88, 0xc8, 0xcc, 0xd8, 0x4b, 0x25, 0x6d, 0xad, 0xe7, 0x6d, 0x8d, 0x3b, 0x4d, 0x3a, 0xe9, 0xd, 0xa7, 0x69, 0xa8, 0x98, 0xde },
},
{ .msglen = 191,
.result = { 0x27, 0x4, 0x31, 0x8, 0x73, 0xf1, 0x5f, 0x15, 0x61, 0x2c, 0x62, 0x49, 0xa9, 0xe8, 0x11, 0xf3, 0xac, 0x54, 0x48, 0x98, 0x62, 0xf2, 0x7d, 0xd6, 0x12, 0xcf, 0x4, 0x1, 0x4e, 0xa9, 0x24, 0xc8 },
},
{ .msglen = 192,
.result = { 0xe4, 0x39, 0x59, 0x7e, 0x60, 0x5a, 0x45, 0x4b, 0x89, 0xa8, 0x97, 0x74, 0xfe, 0xb7, 0xeb, 0xd5, 0x6, 0xdb, 0xdc, 0x4d, 0x85, 0x3a, 0x38, 0x4c, 0x5e, 0x74, 0x86, 0xeb, 0xf0, 0xc4, 0x5, 0x32 },
},
{ .msglen = 193,
.result = { 0x9a, 0x14, 0xf6, 0x6f, 0xce, 0x82, 0xa0, 0xbb, 0xde, 0xb8, 0x24, 0x2b, 0xaf, 0xae, 0x18, 0xd4, 0xbb, 0x45, 0x9e, 0xe4, 0x87, 0x3b, 0x35, 0xca, 0xeb, 0x37, 0xd1, 0x52, 0x6, 0x6e, 0x84, 0x3b },
},
{ .msglen = 194,
.result = { 0x64, 0x9f, 0xab, 0x84, 0xaf, 0x83, 0xa6, 0xcb, 0x23, 0x0, 0xd5, 0x4c, 0xd3, 0x76, 0x4b, 0x57, 0x76, 0x70, 0xdb, 0xea, 0x3a, 0xcb, 0xb7, 0x9c, 0x16, 0x80, 0xbf, 0x66, 0x2b, 0x56, 0xc, 0x2c },
},
{ .msglen = 195,
.result = { 0xab, 0xa8, 0x11, 0x2b, 0x2, 0x99, 0xb0, 0x15, 0x36, 0x4d, 0x5b, 0x5d, 0x55, 0xc3, 0xa5, 0xbc, 0x70, 0x9, 0x36, 0xd9, 0x9f, 0xfe, 0x49, 0x3d, 0x5a, 0x2b, 0x8d, 0x69, 0xe2, 0x6, 0x1a, 0x6f },
},
{ .msglen = 196,
.result = { 0xd7, 0x6b, 0x15, 0x6c, 0xc1, 0x21, 0x84, 0x78, 0x7c, 0x5e, 0xbe, 0x16, 0x70, 0xe2, 0x83, 0x7f, 0x2c, 0x3, 0x5f, 0xb9, 0x2f, 0x17, 0x46, 0xb0, 0x5a, 0xaf, 0xac, 0x2b, 0x80, 0xcf, 0xa5, 0x9c },
},
{ .msglen = 197,
.result = { 0x15, 0x9c, 0x70, 0x75, 0x5a, 0x4e, 0xd2, 0x94, 0x7b, 0x6, 0xe8, 0xdd, 0x55, 0x21, 0xe9, 0x1b, 0x97, 0xe, 0x95, 0x5b, 0x18, 0xa7, 0x26, 0xc0, 0x0, 0xed, 0xe7, 0x55, 0xc8, 0x3d, 0xf3, 0xe7 },
},
{ .msglen = 198,
.result = { 0x2c, 0xdf, 0x2e, 0x88, 0xf, 0xee, 0xcf, 0x19, 0x1e, 0x72, 0x8b, 0x15, 0x7d, 0x18, 0xa1, 0xcf, 0x6, 0xa6, 0xc2, 0xec, 0x35, 0xe5, 0x2a, 0x0, 0x7f, 0x75, 0x9b, 0x63, 0x99, 0x9e, 0x2f, 0x66 },
},
{ .msglen = 199,
.result = { 0x28, 0xeb, 0xc7, 0x79, 0x5d, 0x7c, 0x29, 0xb9, 0x8a, 0xe8, 0x7b, 0xe4, 0x74, 0x3d, 0x3a, 0x74, 0xab, 0x2e, 0x67, 0xde, 0xe4, 0x28, 0x1b, 0xd0, 0xe3, 0x1b, 0xc9, 0xd0, 0xc0, 0x6c, 0xda, 0xba },
},
{ .msglen = 200,
.result = { 0x72, 0x17, 0x1e, 0xca, 0x67, 0xed, 0x83, 0xe9, 0x8d, 0x9b, 0x44, 0xe, 0xd4, 0x27, 0x2c, 0x6b, 0x7d, 0xe2, 0x22, 0x54, 0xf3, 0x72, 0xd1, 0x2, 0xaf, 0x47, 0x20, 0xc0, 0x47, 0x8a, 0x5, 0x9c },
},
{ .msglen = 201,
.result = { 0xb8, 0x2c, 0xea, 0xd9, 0xc4, 0x17, 0x66, 0xa6, 0x5a, 0xc1, 0xb8, 0x24, 0xf5, 0x5e, 0x1a, 0x2c, 0x85, 0xf0, 0xa3, 0xcd, 0xd3, 0x7e, 0xfa, 0x23, 0xd2, 0x90, 0x4f, 0xf3, 0x55, 0xfa, 0x17, 0x5c },
},
{ .msglen = 202,
.result = { 0x9d, 0x7f, 0x23, 0x8c, 0x92, 0xe5, 0x37, 0xb, 0xc7, 0x97, 0xa4, 0x68, 0xe5, 0xc, 0xd8, 0xfe, 0xb0, 0x4d, 0xc7, 0x79, 0x25, 0xd, 0xe6, 0xa6, 0xe6, 0x4, 0xc5, 0xfd, 0x2d, 0x25, 0x3f, 0xd2 },
},
{ .msglen = 203,
.result = { 0xdf, 0xdf, 0x13, 0xc0, 0x82, 0x73, 0x7b, 0xec, 0x2a, 0x4d, 0x9e, 0x62, 0xfc, 0x88, 0xa9, 0x47, 0xfd, 0x47, 0x59, 0xf2, 0x58, 0x5, 0xf9, 0x2e, 0xce, 0x5b, 0x1, 0xae, 0x37, 0x9e, 0xa8, 0x3f },
},
{ .msglen = 204,
.result = { 0x60, 0x10, 0x29, 0xc3, 0x82, 0x91, 0x8b, 0x74, 0xa5, 0x6a, 0x3f, 0x6a, 0x76, 0xaf, 0x50, 0x9e, 0xf1, 0x38, 0xf5, 0xd2, 0xdc, 0xe5, 0x5a, 0x3d, 0xa9, 0x8a, 0x56, 0xca, 0xeb, 0x57, 0x79, 0x5a },
},
{ .msglen = 205,
.result = { 0xd2, 0x71, 0x22, 0xe1, 0x91, 0x69, 0x5d, 0x9f, 0x6, 0xff, 0x51, 0xea, 0x7e, 0x8a, 0x5d, 0xb2, 0xae, 0x66, 0xf5, 0x22, 0x65, 0xa7, 0xfe, 0xf0, 0xce, 0xf5, 0x2c, 0xbf, 0x4e, 0x41, 0x19, 0x72 },
},
{ .msglen = 206,
.result = { 0x66, 0x41, 0x4d, 0xd9, 0xff, 0x1, 0x27, 0xda, 0xae, 0xee, 0x41, 0x34, 0x41, 0xd1, 0xb9, 0xac, 0x11, 0xf3, 0x5b, 0xc4, 0xa2, 0xd5, 0x3, 0x47, 0x87, 0xf4, 0x88, 0xee, 0x61, 0x22, 0x1, 0x6a },
},
{ .msglen = 207,
.result = { 0x59, 0xaf, 0xa5, 0x9a, 0xac, 0x1, 0x0, 0x73, 0x57, 0xa4, 0xdb, 0x22, 0x9, 0x3b, 0x3a, 0x66, 0x19, 0xd6, 0xe4, 0xf7, 0x1d, 0x2a, 0x37, 0x5f, 0x71, 0xc5, 0x54, 0x8e, 0xb, 0x73, 0xd5, 0x3c },
},
{ .msglen = 208,
.result = { 0xd1, 0xa7, 0x61, 0x34, 0xc5, 0x65, 0xb8, 0xa4, 0x8e, 0x3a, 0x9f, 0x5b, 0x11, 0x8b, 0x21, 0x5e, 0x7c, 0x9c, 0xfb, 0xd3, 0xe2, 0xe5, 0x92, 0x41, 0x6f, 0x4, 0x61, 0x30, 0x79, 0xf2, 0x8, 0xc4 },
},
{ .msglen = 209,
.result = { 0x84, 0x79, 0x2, 0x39, 0x2d, 0x2a, 0x11, 0xa5, 0xff, 0xa1, 0x3a, 0xfd, 0x70, 0x90, 0xb4, 0xa5, 0x85, 0xda, 0xd5, 0x4c, 0x8d, 0xaa, 0x97, 0x5e, 0x3b, 0x45, 0x89, 0xd0, 0xfd, 0x85, 0x57, 0xf3 },
},
{ .msglen = 210,
.result = { 0xc6, 0x3b, 0x4b, 0xbd, 0x70, 0x65, 0x2, 0x2f, 0xfc, 0xc2, 0x42, 0x4e, 0x77, 0xa0, 0xc8, 0x4d, 0x3d, 0x65, 0x4a, 0xb3, 0x47, 0xf5, 0x21, 0x39, 0xb0, 0x61, 0x8a, 0xae, 0x58, 0x18, 0x7e, 0xbe },
},
{ .msglen = 211,
.result = { 0x3c, 0x50, 0xdb, 0xa6, 0x45, 0x69, 0x8b, 0x58, 0x22, 0x1f, 0x3c, 0xa3, 0x1a, 0x79, 0x90, 0xef, 0xd4, 0x21, 0xf6, 0x9e, 0xfd, 0xe5, 0xb9, 0xb2, 0xbb, 0xef, 0x27, 0x36, 0x35, 0xd8, 0x6f, 0x69 },
},
{ .msglen = 212,
.result = { 0xd1, 0x5b, 0x4f, 0x10, 0xc6, 0x1, 0x2b, 0xe5, 0x4b, 0x8f, 0xba, 0x55, 0x36, 0x60, 0x26, 0xf3, 0x93, 0x40, 0xb7, 0xd, 0xbd, 0xf6, 0x80, 0x51, 0xbe, 0x52, 0x9, 0xdd, 0x78, 0x30, 0x47, 0xbd },
},
{ .msglen = 213,
.result = { 0xe6, 0x2e, 0x97, 0xbc, 0x93, 0xaf, 0x61, 0xb8, 0x40, 0x9d, 0x70, 0x90, 0xdc, 0x34, 0xb0, 0x7e, 0xad, 0x1d, 0x50, 0x55, 0x9e, 0x42, 0x92, 0x92, 0xaf, 0x54, 0x5c, 0x57, 0xa, 0x49, 0x39, 0xd },
},
{ .msglen = 214,
.result = { 0x6d, 0x72, 0xde, 0xd8, 0x72, 0x65, 0xc9, 0xaf, 0x36, 0x3b, 0x75, 0xf6, 0xf7, 0x71, 0x15, 0xa6, 0xad, 0x73, 0xa2, 0x9b, 0x1c, 0x86, 0xf3, 0xc1, 0xc1, 0x7a, 0x85, 0x87, 0x70, 0x44, 0x83, 0xe8 },
},
{ .msglen = 215,
.result = { 0x6c, 0xfb, 0xa2, 0xb9, 0xc1, 0xf0, 0xbf, 0xef, 0x33, 0x60, 0x55, 0x30, 0x5b, 0x2b, 0x4, 0x7b, 0xfb, 0x8f, 0xe0, 0x5d, 0x11, 0x90, 0x3c, 0x28, 0xcf, 0xd4, 0x5, 0x70, 0x88, 0x1a, 0x53, 0xa },
},
{ .msglen = 216,
.result = { 0xe6, 0x2a, 0x80, 0x77, 0xb, 0x8d, 0xc8, 0x79, 0x72, 0x32, 0xf9, 0xd, 0x41, 0xcc, 0x6e, 0x77, 0xe5, 0x5f, 0x22, 0xd2, 0xdb, 0x1, 0xf9, 0x96, 0xce, 0x13, 0x95, 0x51, 0x6, 0x95, 0x51, 0x24 },
},
{ .msglen = 217,
.result = { 0xf1, 0x79, 0x81, 0xb2, 0x3b, 0xb7, 0xc1, 0x12, 0x24, 0x6e, 0x97, 0xed, 0xe4, 0x87, 0xf4, 0xcf, 0x62, 0xf8, 0xb8, 0xa9, 0xb8, 0x9d, 0xf4, 0x5d, 0x17, 0xc7, 0x27, 0xe7, 0x84, 0x7, 0xb9, 0x56 },
},
{ .msglen = 218,
.result = { 0x6c, 0xe2, 0x55, 0x53, 0x36, 0x41, 0xe2, 0x99, 0xac, 0xb2, 0x67, 0xc1, 0xfe, 0x63, 0xb4, 0x93, 0x26, 0x50, 0x2e, 0xe, 0xac, 0xf7, 0x66, 0x20, 0x6, 0xb7, 0xb9, 0x98, 0x20, 0x17, 0xfa, 0x2d },
},
{ .msglen = 219,
.result = { 0xef, 0x47, 0xb1, 0x44, 0x60, 0xf2, 0x1a, 0xa5, 0x99, 0x8d, 0xd8, 0x7c, 0x80, 0x22, 0x2a, 0xac, 0x9, 0x27, 0xf, 0xc9, 0xb8, 0xa8, 0xfb, 0xec, 0x41, 0x23, 0x2b, 0x9b, 0x20, 0xed, 0xef, 0x5e },
},
{ .msglen = 220,
.result = { 0xea, 0x10, 0xab, 0xd, 0x8a, 0x2f, 0xff, 0xe2, 0x21, 0xb7, 0x8b, 0xff, 0x13, 0xa0, 0xa9, 0x4c, 0x78, 0x85, 0x35, 0xdf, 0x8c, 0xb8, 0x82, 0x57, 0x98, 0x5e, 0xc8, 0xe5, 0x95, 0x43, 0x14, 0x7e },
},
{ .msglen = 221,
.result = { 0xb6, 0x3b, 0x58, 0x81, 0xab, 0x62, 0xa9, 0xf3, 0x19, 0x1f, 0x3c, 0xe1, 0x21, 0x2f, 0x2, 0xc9, 0xdb, 0x8d, 0xd4, 0x7f, 0x38, 0x11, 0x1b, 0x18, 0x5c, 0xb, 0xa3, 0xa8, 0x38, 0xe4, 0xc4, 0x55 },
},
{ .msglen = 222,
.result = { 0xb, 0xc3, 0x3f, 0xaa, 0x9c, 0xff, 0x53, 0xb8, 0xe1, 0xa6, 0xd3, 0x43, 0x8e, 0xa6, 0x48, 0x7b, 0x5b, 0x4, 0x31, 0xc1, 0xad, 0x9d, 0x8, 0x39, 0xac, 0xee, 0x1, 0x87, 0xd3, 0x91, 0x7e, 0x7b },
},
{ .msglen = 223,
.result = { 0xb3, 0xd0, 0x23, 0x54, 0xc2, 0x1d, 0xd6, 0x23, 0x70, 0xe0, 0xc2, 0x61, 0x52, 0xa2, 0xbc, 0x3b, 0x6, 0x11, 0x80, 0xb2, 0xfa, 0x17, 0x26, 0x74, 0x90, 0x61, 0x46, 0x35, 0x66, 0x1a, 0xe9, 0x51 },
},
{ .msglen = 224,
.result = { 0x0, 0xab, 0x82, 0xf2, 0xaf, 0x44, 0x95, 0x58, 0x31, 0x2a, 0x20, 0x4c, 0x2c, 0xdc, 0x80, 0xfd, 0x71, 0x7a, 0xf4, 0x34, 0xe6, 0x7e, 0xe2, 0xff, 0x6e, 0xc2, 0xf, 0x82, 0x65, 0x1e, 0x6d, 0xe6 },
},
{ .msglen = 225,
.result = { 0x6, 0x67, 0x32, 0x34, 0x96, 0xb5, 0x7a, 0x86, 0xda, 0x89, 0xd6, 0x9b, 0x1e, 0x23, 0x40, 0xfb, 0xd, 0xdf, 0xce, 0xdf, 0x83, 0x14, 0xb3, 0xe2, 0x2c, 0xd, 0x70, 0x18, 0xde, 0x87, 0xc6, 0x65 },
},
{ .msglen = 226,
.result = { 0x7b, 0x2a, 0x1c, 0xc5, 0xc6, 0x2e, 0xb4, 0xed, 0x19, 0x75, 0x50, 0x8d, 0xe5, 0x74, 0xe9, 0x31, 0x32, 0x88, 0x36, 0x6a, 0x61, 0x10, 0x6c, 0xad, 0x25, 0xb5, 0x72, 0x8a, 0x4a, 0x9, 0x18, 0x7c },
},
{ .msglen = 227,
.result = { 0xa6, 0x34, 0x75, 0xcb, 0x1a, 0xbb, 0x6d, 0x4a, 0xfb, 0x81, 0x67, 0xd1, 0x46, 0xac, 0x59, 0xd, 0x86, 0x5b, 0xd5, 0x71, 0xb6, 0x52, 0xd2, 0xca, 0xdb, 0x31, 0x45, 0x97, 0x61, 0x5f, 0x77, 0x62 },
},
{ .msglen = 228,
.result = { 0x4, 0x7d, 0x3a, 0x50, 0x35, 0x1f, 0x7e, 0x94, 0x18, 0xe0, 0xeb, 0xc, 0xe7, 0x27, 0x85, 0x54, 0x4c, 0x33, 0x51, 0xf5, 0x51, 0x2e, 0x40, 0x88, 0x67, 0x36, 0x6b, 0x5d, 0x7c, 0xb1, 0x6, 0xc7 },
},
{ .msglen = 229,
.result = { 0x59, 0x7f, 0x6c, 0x70, 0x8c, 0x79, 0xf8, 0x9f, 0xb2, 0xb1, 0x5e, 0xc4, 0xe9, 0x26, 0x8c, 0xae, 0xc0, 0xfc, 0x48, 0x18, 0xe0, 0xa5, 0xab, 0xb4, 0x68, 0x23, 0x2c, 0x11, 0xf9, 0x1e, 0x11, 0x62 },
},
{ .msglen = 230,
.result = { 0x16, 0xe9, 0x5, 0x1c, 0xfd, 0x35, 0x95, 0xda, 0xad, 0xb4, 0xbd, 0xdc, 0x7b, 0xdb, 0xc3, 0x19, 0x56, 0x88, 0x42, 0x38, 0x58, 0x2f, 0x63, 0x5b, 0x73, 0x6e, 0xfd, 0x68, 0x24, 0x27, 0xce, 0xa3 },
},
{ .msglen = 231,
.result = { 0x7b, 0xba, 0x9e, 0x1a, 0xdb, 0xbb, 0x9b, 0x17, 0xe, 0x7, 0xbc, 0x8b, 0xbd, 0xdf, 0xab, 0x8b, 0xe7, 0xea, 0x39, 0xba, 0x20, 0xce, 0xd5, 0x83, 0x89, 0xe3, 0x27, 0xa3, 0xbe, 0x25, 0xb0, 0x4 },
},
{ .msglen = 232,
.result = { 0x11, 0x4a, 0xc5, 0xc9, 0x7f, 0x98, 0xeb, 0x92, 0xd3, 0x76, 0x4f, 0xc0, 0xd8, 0x8c, 0xfd, 0xe7, 0xf3, 0x1d, 0xfd, 0xbd, 0x36, 0x88, 0x48, 0xd6, 0xc7, 0x8c, 0x9f, 0x2c, 0xb2, 0x72, 0x14, 0xb9 },
},
{ .msglen = 233,
.result = { 0xb0, 0x67, 0xf9, 0x62, 0xb9, 0xa1, 0xc0, 0xe5, 0xb, 0x22, 0x4b, 0xe7, 0x84, 0x6b, 0x8c, 0xa9, 0xa, 0xfa, 0xd7, 0xe7, 0x5b, 0x7b, 0xc, 0xe0, 0x6e, 0x47, 0x24, 0xf8, 0xc7, 0xf5, 0x6b, 0x14 },
},
{ .msglen = 234,
.result = { 0x77, 0x25, 0x61, 0xfd, 0xc8, 0x39, 0x3a, 0x72, 0x74, 0x9, 0x8b, 0x49, 0x7d, 0xa3, 0x42, 0x66, 0xb, 0x5a, 0xa5, 0x53, 0x70, 0xbe, 0x69, 0x96, 0x69, 0xbb, 0x7a, 0x8a, 0x12, 0xa, 0x7, 0x14 },
},
{ .msglen = 235,
.result = { 0x10, 0x16, 0xbb, 0x95, 0x96, 0xb3, 0x87, 0xf6, 0x12, 0x5d, 0xcc, 0x9, 0xd3, 0xcd, 0xf8, 0x44, 0x2, 0x62, 0x96, 0xde, 0x7c, 0xa2, 0x66, 0x12, 0x4e, 0x86, 0x32, 0x11, 0xf1, 0x18, 0x38, 0x79 },
},
{ .msglen = 236,
.result = { 0x42, 0x91, 0x46, 0x5c, 0xa6, 0xae, 0x5c, 0x68, 0xc8, 0xb9, 0xa8, 0x38, 0xea, 0x18, 0x71, 0x63, 0xae, 0x9c, 0xc6, 0xd9, 0x22, 0xe4, 0xfa, 0x85, 0x9c, 0x94, 0xd4, 0xb8, 0xab, 0x98, 0xe, 0xf0 },
},
{ .msglen = 237,
.result = { 0x2b, 0x6b, 0xc, 0x10, 0x13, 0x80, 0x8e, 0xc3, 0x8a, 0xcd, 0xe7, 0xf0, 0x21, 0x1c, 0x1c, 0x7e, 0x61, 0x5e, 0x5, 0x37, 0xde, 0x5e, 0x9f, 0x2f, 0x8a, 0xe4, 0x31, 0x0, 0x63, 0x90, 0xc8, 0xa3 },
},
{ .msglen = 238,
.result = { 0xf5, 0x12, 0xb6, 0x60, 0xfe, 0x6c, 0xe5, 0xd2, 0x8b, 0x2e, 0xc9, 0x37, 0x66, 0xf8, 0xd5, 0x52, 0x28, 0x76, 0x35, 0xba, 0x4b, 0xf0, 0x2c, 0xbd, 0x47, 0x14, 0x3, 0x6b, 0x47, 0x58, 0xf8, 0x16 },
},
{ .msglen = 239,
.result = { 0xfa, 0x6c, 0x94, 0x22, 0xb, 0x98, 0x3b, 0x74, 0x18, 0xfa, 0xb8, 0xda, 0x55, 0x6c, 0xa2, 0xf5, 0x5b, 0xe4, 0x8, 0x99, 0xfa, 0xf7, 0xb4, 0x57, 0xfa, 0x7d, 0x8a, 0xc, 0x6a, 0xe1, 0xca, 0xc2 },
},
{ .msglen = 240,
.result = { 0x2b, 0x59, 0x71, 0x1e, 0x37, 0x8b, 0x24, 0x39, 0x98, 0x50, 0x79, 0x3b, 0xde, 0x2c, 0xce, 0xc6, 0xd, 0xf7, 0x53, 0xb6, 0x12, 0x2d, 0x70, 0x53, 0xdf, 0xbe, 0x57, 0x56, 0x87, 0xee, 0x9f, 0x12 },
},
{ .msglen = 241,
.result = { 0x38, 0xf6, 0x60, 0x9d, 0x7, 0x23, 0x85, 0xcc, 0x8e, 0x4a, 0xe5, 0xf1, 0xaf, 0x31, 0x9b, 0x97, 0xda, 0x34, 0x80, 0x6c, 0x23, 0x79, 0x69, 0x33, 0x87, 0xa6, 0x2d, 0x8d, 0xd4, 0x8e, 0x66, 0x2e },
},
{ .msglen = 242,
.result = { 0x88, 0x5d, 0xc8, 0x2, 0xf4, 0x76, 0xe4, 0x4e, 0xae, 0xcc, 0x9, 0x49, 0xc, 0x56, 0x7, 0x22, 0xd, 0x8f, 0xb0, 0xb4, 0x68, 0x1d, 0xb5, 0xaf, 0x89, 0xb0, 0xab, 0x3b, 0x37, 0x39, 0x88, 0x37 },
},
{ .msglen = 243,
.result = { 0x10, 0xb1, 0x44, 0x4a, 0xe2, 0xfc, 0x17, 0xc0, 0x7d, 0x39, 0x62, 0xb3, 0x45, 0x9b, 0xbe, 0xf8, 0x79, 0x2e, 0xe2, 0xfd, 0x59, 0x8e, 0xb5, 0x6c, 0x1d, 0xf5, 0x8b, 0x50, 0xad, 0x28, 0x93, 0xf },
},
{ .msglen = 244,
.result = { 0xf6, 0x5d, 0xce, 0x54, 0x13, 0x2, 0x3f, 0x5b, 0x4e, 0x72, 0xc8, 0xe1, 0x42, 0x83, 0xe7, 0x52, 0xde, 0x6f, 0xe6, 0x93, 0x15, 0xab, 0xe8, 0x1f, 0x53, 0x1d, 0xc5, 0xcd, 0xf3, 0x98, 0xf0, 0x9e },
},
{ .msglen = 245,
.result = { 0x56, 0xf1, 0x6f, 0xe1, 0xd7, 0x0, 0x33, 0x65, 0xe1, 0x61, 0x79, 0x15, 0x78, 0x5f, 0x98, 0x32, 0x4d, 0x11, 0x99, 0xf1, 0x14, 0xf2, 0xdc, 0x10, 0x7, 0x0, 0xaf, 0xea, 0x4, 0xd, 0x99, 0x33 },
},
{ .msglen = 246,
.result = { 0xfc, 0xcc, 0x27, 0x84, 0xc0, 0xbf, 0xf4, 0x52, 0xf2, 0x39, 0x1f, 0xb5, 0x5e, 0x8a, 0x17, 0xd2, 0x53, 0xff, 0x3c, 0x9b, 0x53, 0x25, 0x14, 0xed, 0xca, 0x1c, 0x88, 0xa9, 0x86, 0x5c, 0x50, 0xfe },
},
{ .msglen = 247,
.result = { 0xf3, 0x9f, 0x18, 0x4a, 0x35, 0xf4, 0xb3, 0x6, 0xac, 0xc4, 0x8c, 0x8e, 0xe7, 0x87, 0x0, 0x11, 0x63, 0xea, 0xba, 0x6a, 0x3f, 0x12, 0xa1, 0x4b, 0xf5, 0x6d, 0xbd, 0xeb, 0xcf, 0xfe, 0x6, 0x6d },
},
{ .msglen = 248,
.result = { 0x78, 0x69, 0xfc, 0x51, 0x5e, 0x48, 0xda, 0xb3, 0x81, 0xcb, 0x88, 0xf1, 0xc, 0x7, 0xeb, 0x16, 0x18, 0x2e, 0x6d, 0x85, 0x9d, 0xc0, 0x80, 0xea, 0xab, 0x39, 0xd3, 0x6a, 0xa8, 0x10, 0xe3, 0x26 },
},
{ .msglen = 249,
.result = { 0xee, 0xfb, 0xd, 0x72, 0x20, 0x48, 0x71, 0x10, 0x46, 0xc2, 0xb0, 0x5c, 0x11, 0xcf, 0x82, 0x2e, 0x6e, 0x3e, 0x3f, 0x16, 0xfa, 0x71, 0x80, 0x5f, 0x51, 0x50, 0x3e, 0xa2, 0x5d, 0xa1, 0x66, 0xbe },
},
{ .msglen = 250,
.result = { 0x72, 0x9c, 0x3, 0xe9, 0x25, 0xda, 0xaf, 0x7b, 0x40, 0x10, 0xe2, 0x85, 0xe0, 0x5b, 0xce, 0x55, 0x72, 0x1f, 0xfa, 0x54, 0x1c, 0x96, 0x48, 0xb, 0x55, 0x26, 0x53, 0x7d, 0xa9, 0xc5, 0x27, 0xd0 },
},
{ .msglen = 251,
.result = { 0x6f, 0x40, 0xd5, 0x72, 0x3b, 0x1f, 0x99, 0x9e, 0x7, 0x57, 0xbb, 0x57, 0x6c, 0x7e, 0x47, 0xb2, 0x76, 0x37, 0x5e, 0x64, 0x21, 0x51, 0x3c, 0xe8, 0x16, 0xda, 0x5f, 0x9f, 0xc9, 0x5b, 0xc3, 0x70 },
},
{ .msglen = 252,
.result = { 0x77, 0x3b, 0x47, 0x74, 0x0, 0xfd, 0x74, 0x95, 0xe, 0x59, 0xf6, 0xf, 0xcf, 0x9a, 0xb3, 0xbc, 0x9f, 0xd9, 0x3c, 0x3a, 0x30, 0x1c, 0x1f, 0x4d, 0x53, 0xbe, 0xce, 0x4c, 0xa1, 0x8b, 0xc1, 0x22 },
},
{ .msglen = 253,
.result = { 0xd0, 0xbe, 0x9, 0xb3, 0xa9, 0xa4, 0xb2, 0x46, 0x99, 0x40, 0x40, 0x6b, 0x52, 0x54, 0x3b, 0xfe, 0x94, 0x37, 0xf9, 0xc, 0xc2, 0xc2, 0x66, 0x3, 0xa5, 0x8c, 0x42, 0xae, 0x9d, 0xf8, 0x47, 0x87 },
},
{ .msglen = 254,
.result = { 0x85, 0x78, 0x21, 0xf4, 0xa, 0xee, 0xa3, 0x59, 0xe0, 0xb2, 0xd7, 0x7, 0x34, 0x5e, 0x57, 0xdc, 0xdd, 0x9a, 0xfa, 0x2c, 0xfd, 0xb6, 0xee, 0xa9, 0x14, 0xc0, 0x17, 0x86, 0xbf, 0x7b, 0xfe, 0x4b },
},
{ .msglen = 255,
.result = { 0x59, 0x52, 0x50, 0x4, 0xb6, 0x28, 0xf9, 0x28, 0x7f, 0x6c, 0x37, 0xba, 0xfb, 0xb2, 0x58, 0xe7, 0xa, 0xac, 0x6c, 0x4a, 0xef, 0x66, 0x6, 0x7b, 0x1, 0x1f, 0x4c, 0xa4, 0xe5, 0xe5, 0x29, 0x5d },
},
{ .msglen = 256,
.result = { 0x52, 0x1a, 0x14, 0xc3, 0xb4, 0x85, 0xf0, 0xb5, 0x82, 0xe9, 0x40, 0xc2, 0xc, 0x6d, 0x59, 0x64, 0x86, 0x7d, 0xa, 0x3b, 0x7f, 0x85, 0x78, 0xea, 0xea, 0x66, 0x48, 0xfa, 0x4a, 0xde, 0x5c, 0xd3 },
},
};

View File

@ -0,0 +1,235 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <string.h>
#include "esp_log.h"
#include "memory_checks.h"
#include "unity_fixture.h"
#include "rom/efuse.h"
#include "rom/hmac.h"
#include "rom/ets_sys.h"
#include "soc/hwcrypto_reg.h"
#include "soc/system_reg.h"
#include "hmac_params.h"
typedef enum {
HMAC_KEY0 = 0,
HMAC_KEY1,
HMAC_KEY2,
HMAC_KEY3,
HMAC_KEY4,
HMAC_KEY5,
HMAC_KEY_MAX
} hmac_key_id_t;
static ets_efuse_block_t convert_key_type(hmac_key_id_t key_id) {
return ETS_EFUSE_BLOCK_KEY0 + (ets_efuse_block_t) key_id;
}
static esp_err_t hmac_jtag_disable(void)
{
REG_WRITE(HMAC_SET_INVALIDATE_JTAG_REG, 1);
return ESP_OK;
}
#if !CONFIG_IDF_TARGET_ESP32S2
#include "hal/hmac_hal.h"
#include "esp_private/periph_ctrl.h"
#define SHA256_BLOCK_SZ 64
#define SHA256_PAD_SZ 8
static esp_err_t hmac_jtag_enable(hmac_key_id_t key_id, const uint8_t *token)
{
int ets_status;
esp_err_t err = ESP_OK;
ets_status = ets_jtag_enable_temporarily(token, convert_key_type(key_id));
if (ets_status != ETS_OK) {
err = ESP_FAIL;
}
ets_hmac_disable();
return err;
}
static void write_and_padd(uint8_t *block, const uint8_t *data, uint16_t data_len)
{
memcpy(block, data, data_len);
block[data_len] = 0x80;
bzero(block + data_len + 1, SHA256_BLOCK_SZ - data_len - 1);
}
static esp_err_t hmac_calculate(hmac_key_id_t key_id, const void *message, size_t message_len, uint8_t *hmac)
{
const uint8_t *message_bytes = (const uint8_t *)message;
periph_module_enable(PERIPH_HMAC_MODULE);
periph_module_enable(PERIPH_SHA_MODULE);
periph_module_enable(PERIPH_DS_MODULE);
hmac_hal_start();
uint32_t conf_error = hmac_hal_configure(HMAC_OUTPUT_USER, key_id);
if (conf_error) {
return ESP_FAIL;
}
if (message_len + 1 + SHA256_PAD_SZ <= SHA256_BLOCK_SZ) {
uint8_t block[SHA256_BLOCK_SZ];
uint64_t bit_len = __builtin_bswap64(message_len * 8 + 512);
write_and_padd(block, message_bytes, message_len);
memcpy(block + SHA256_BLOCK_SZ - sizeof(bit_len),
&bit_len, sizeof(bit_len));
hmac_hal_write_one_block_512(block);
} else {
size_t remaining_blocks = message_len / SHA256_BLOCK_SZ;
for (int i = 1; i < remaining_blocks; i++) {
hmac_hal_write_block_512(message_bytes);
message_bytes += SHA256_BLOCK_SZ;
hmac_hal_next_block_normal();
}
if (remaining_blocks) {
hmac_hal_write_block_512(message_bytes);
message_bytes += SHA256_BLOCK_SZ;
}
size_t remaining = message_len % SHA256_BLOCK_SZ;
uint8_t block[SHA256_BLOCK_SZ];
uint64_t bit_len = __builtin_bswap64(message_len * 8 + 512);
if (remaining >= SHA256_BLOCK_SZ - SHA256_PAD_SZ) {
write_and_padd(block, message_bytes, remaining);
hmac_hal_next_block_normal();
hmac_hal_write_block_512(block);
bzero(block, SHA256_BLOCK_SZ);
} else {
write_and_padd(block, message_bytes, remaining);
}
memcpy(block + SHA256_BLOCK_SZ - sizeof(bit_len),
&bit_len, sizeof(bit_len));
hmac_hal_next_block_padding();
hmac_hal_write_block_512(block);
}
hmac_hal_read_result_256(hmac);
periph_module_disable(PERIPH_DS_MODULE);
periph_module_disable(PERIPH_SHA_MODULE);
periph_module_disable(PERIPH_HMAC_MODULE);
return ESP_OK;
}
#else /* !CONFIG_IDF_TARGET_ESP32S2 */
static esp_err_t hmac_calculate(hmac_key_id_t key_id,
const void *message,
size_t message_len,
uint8_t *hmac)
{
int hmac_ret;
ets_hmac_enable();
hmac_ret = ets_hmac_calculate_message(convert_key_type(key_id), message, message_len, hmac);
ets_hmac_disable();
if (hmac_ret != 0) {
return ESP_FAIL;
} else {
return ESP_OK;
}
}
static esp_err_t hmac_jtag_enable(hmac_key_id_t key_id, const uint8_t *token)
{
int ets_status;
esp_err_t err = ESP_OK;
ets_hmac_enable();
/* Token updating into HMAC module. */
for (int i = 0; i < 32; i += 4) {
uint32_t key_word;
memcpy(&key_word, &token[i], 4);
REG_WRITE(DPORT_JTAG_CTRL_0_REG + i, __builtin_bswap32(key_word));
}
ets_status = ets_hmac_calculate_downstream(convert_key_type(key_id), ETS_EFUSE_KEY_PURPOSE_HMAC_DOWN_JTAG);
if (ets_status != ETS_OK) {
err = ESP_FAIL;
}
ets_hmac_disable();
return err;
}
#endif /* !CONFIG_IDF_TARGET_ESP32S2 */
TEST_GROUP(hmac);
TEST_SETUP(hmac)
{
test_utils_record_free_mem();
TEST_ESP_OK(test_utils_set_leak_level(0, ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_GENERAL));
}
TEST_TEAR_DOWN(hmac)
{
test_utils_finish_and_evaluate_leaks(test_utils_get_leak_level(ESP_LEAK_TYPE_WARNING, ESP_COMP_LEAK_ALL),
test_utils_get_leak_level(ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_ALL));
}
TEST(hmac, hmac_downstream_jtag_enable_mode)
{
TEST_ASSERT_EQUAL_HEX32_MESSAGE(ESP_OK, hmac_jtag_enable(HMAC_KEY3, jtag_enable_token_data),
"JTAG should be re-enabled now, please manually verify");
}
TEST(hmac, hmac_downstream_jtag_disable)
{
TEST_ASSERT_EQUAL_HEX32_MESSAGE(ESP_OK, hmac_jtag_disable(), "JTAG should be disabled now, please manually verify");
}
TEST(hmac, hmac_upstream_mac_generation_with_zeroes)
{
uint8_t hmac[32];
const size_t num_zero_results = sizeof(zero_results) / sizeof(hmac_result);
for (int i = 0; i < num_zero_results; i++) {
TEST_ESP_OK(hmac_calculate(HMAC_KEY4, zeroes, zero_results[i].msglen, hmac));
TEST_ASSERT_EQUAL_HEX8_ARRAY(zero_results[i].result, hmac, sizeof(hmac));
}
}
TEST(hmac, hmac_upstream_MAC_generation_from_data)
{
uint8_t hmac[32];
for (int i = 0; i < sizeof(results)/sizeof(hmac_result); i++) {
TEST_ESP_OK(hmac_calculate(HMAC_KEY4, message, results[i].msglen, hmac));
TEST_ASSERT_EQUAL_HEX8_ARRAY(results[i].result, hmac, sizeof(hmac));
}
}
TEST_GROUP_RUNNER(hmac)
{
RUN_TEST_CASE(hmac, hmac_downstream_jtag_enable_mode);
RUN_TEST_CASE(hmac, hmac_downstream_jtag_disable);
RUN_TEST_CASE(hmac, hmac_upstream_mac_generation_with_zeroes);
RUN_TEST_CASE(hmac, hmac_upstream_MAC_generation_from_data);
}

View File

@ -8,14 +8,15 @@
#include "esp_log.h"
#include "esp_private/periph_ctrl.h"
#include "unity.h"
#include "memory_checks.h"
#include "unity_fixture.h"
#if CONFIG_IDF_TARGET_ESP32
#define ESP_MPI_USE_MONT_EXP
#endif
#include "hal/mpi_hal.h"
#include "test_params.h"
#include "mpi_params.h"
#define _DEBUG_ 0
@ -81,6 +82,7 @@ static void mpi_mul_mpi_mod_hw_op(void)
TEST_ASSERT_EQUAL_HEX32_ARRAY_MESSAGE(test_cases_Z_p[i], Z_p, test_cases_Z_words[i], "Result");
printf("PASS\n");
free(Z_p);
}
esp_mpi_disable_hardware_hw_op();
}
@ -131,15 +133,36 @@ static void mpi_exp_mpi_mod_hw_op(void)
TEST_ASSERT_EQUAL_HEX32_ARRAY_MESSAGE(exp_test_cases_Z_p[i], Z_p, exp_test_cases_m_words[i], "Result");
printf("PASS\n");
free(Z_p);
}
}
TEST_CASE("Test MPI multiplication", "[mpi][hal]")
TEST_GROUP(mpi);
TEST_SETUP(mpi)
{
test_utils_record_free_mem();
TEST_ESP_OK(test_utils_set_leak_level(0, ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_GENERAL));
}
TEST_TEAR_DOWN(mpi)
{
test_utils_finish_and_evaluate_leaks(test_utils_get_leak_level(ESP_LEAK_TYPE_WARNING, ESP_COMP_LEAK_ALL),
test_utils_get_leak_level(ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_ALL));
}
TEST(mpi, mpi_multiplication)
{
mpi_mul_mpi_mod_hw_op();
}
TEST_CASE("Test MPI exponentiation", "[mpi][hal]")
TEST(mpi, mpi_exponentiation)
{
mpi_exp_mpi_mod_hw_op();
}
TEST_GROUP_RUNNER(mpi)
{
RUN_TEST_CASE(mpi, mpi_multiplication);
RUN_TEST_CASE(mpi, mpi_exponentiation);
}

View File

@ -5,8 +5,7 @@ import pytest
from pytest_embedded import Dut
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.supported_targets
@pytest.mark.generic
def test_ecc(dut: Dut) -> None:
dut.run_all_single_board_cases()
def test_crypto(dut: Dut) -> None:
dut.expect('main_task: Returned from app_main()')

View File

@ -1,2 +1,3 @@
CONFIG_ESP_TASK_WDT_EN=y
CONFIG_ESP_TASK_WDT_INIT=n
CONFIG_UNITY_ENABLE_FIXTURE=y

View File

@ -1,43 +0,0 @@
| Supported Targets | ESP32-C2 | ESP32-C6 | ESP32-H2 |
| ----------------- | -------- | -------- | -------- |
## ECC peripheral test
This application contains basic test cases for the ECC peripheral without using any OS functionality or higher abstraction layer.
This contains tests for the following features of ECC peripheral:
- ECC Point multiplication for P192 and P256 curve
- ECC Point verification for P192 and P256 curve
- ECC Point verify and multiply for P192 and P256 curve
- ECC Inverse multiplication for P192 and P256
If the hardware supports extended work modes then it also tests:
- ECC Jacobian multiplication for P192 and P256 curve
- ECC Jacobian verification for P192 and P256 curve
- ECC Point verification and Jacobian multiplication for P192 and P256 curve
- ECC Point addition for P192 and P256 curve
- Mod addition
- Mod subtraction
- Mod multiplication
# Building
```bash
idf.py set-target <TARGET>
idf.py build
```
# Running the app manually
```bash
idf.py flash monitor
```
Enter the test that you want to run locally
# Running tests
```bash
pytest --target <TARGET>
```

View File

@ -1,6 +0,0 @@
set(srcs "app_main.c"
"test_ecc.c")
idf_component_register(SRCS ${srcs}
REQUIRES unity
WHOLE_ARCHIVE)

View File

@ -1,13 +0,0 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include "unity.h"
#include "unity_test_runner.h"
void app_main(void)
{
unity_run_menu();
}

View File

@ -1,7 +0,0 @@
cmake_minimum_required(VERSION 3.16)
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mpi_test)

View File

@ -1,33 +0,0 @@
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
## MPI peripheral test
This application contains basic test cases for the MPI peripheral without using any OS functionality or higher abstraction layer.
This contains tests for the following features of MPI peripheral:
- MPI Modular Multiplication
- MPI Multiplication
- MPI Modular Exponentiation
# Building
```bash
idf.py set-target <TARGET>
idf.py build
```
# Running the app manually
```bash
idf.py flash monitor
```
Enter the test that you want to run locally
# Running tests
```bash
pytest --target <TARGET>
```

View File

@ -1,6 +0,0 @@
set(srcs "app_main.c"
"test_mpi.c")
idf_component_register(SRCS ${srcs}
REQUIRES unity
WHOLE_ARCHIVE)

View File

@ -1,13 +0,0 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include "unity.h"
#include "unity_test_runner.h"
void app_main(void)
{
unity_run_menu();
}

View File

@ -1,16 +0,0 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import pytest
from pytest_embedded import Dut
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.generic
def test_bignum(dut: Dut) -> None:
dut.run_all_single_board_cases()

View File

@ -1,2 +0,0 @@
CONFIG_ESP_TASK_WDT_EN=y
CONFIG_ESP_TASK_WDT_INIT=n

View File

@ -203,6 +203,10 @@ config SOC_CPU_IDRAM_SPLIT_USING_PMP
bool
default y
config SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK
bool
default y
config SOC_GDMA_GROUPS
int
default 1

View File

@ -98,6 +98,9 @@
#define SOC_CPU_IDRAM_SPLIT_USING_PMP 1
/*-------------------------- ECC CAPS --------------------------*/
#define SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK 1 // C2 ECC peripheral has a bug in ECC point verification, if value of K is zero the verification fails
/*-------------------------- GDMA CAPS -------------------------------------*/
#define SOC_GDMA_GROUPS (1U) // Number of GDMA groups
#define SOC_GDMA_PAIRS_PER_GROUP (1U) // Number of GDMA pairs in each group