diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index e19ed1157b..d555c90e38 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -98,6 +98,7 @@ /components/esp_hal_ieee802154/ @esp-idf-codeowners/ieee802154 /components/esp_hal_pmu/ @esp-idf-codeowners/power-management @esp-idf-codeowners/peripherals /components/esp_hal_rtc_timer/ @esp-idf-codeowners/power-management @esp-idf-codeowners/peripherals +/components/esp_hal_security/ @esp-idf-codeowners/security @esp-idf-codeowners/peripherals /components/esp_hid/ @esp-idf-codeowners/bluetooth /components/esp_http_client/ @esp-idf-codeowners/app-utilities /components/esp_http_server/ @esp-idf-codeowners/app-utilities @@ -133,8 +134,6 @@ /components/fatfs/ @esp-idf-codeowners/storage /components/freertos/ @esp-idf-codeowners/system /components/hal/ @esp-idf-codeowners/peripherals -/components/hal/test_apps/crypto/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/security -/components/hal/test_apps/tee/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/security /components/heap/ @esp-idf-codeowners/system /components/http_parser/ @esp-idf-codeowners/app-utilities /components/ieee802154/ @esp-idf-codeowners/ieee802154 diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt index aa7726c166..aec2c7c0f0 100644 --- a/components/bootloader/subproject/CMakeLists.txt +++ b/components/bootloader/subproject/CMakeLists.txt @@ -20,6 +20,7 @@ set(COMPONENTS bootloader esptool_py esp_hw_support + esp_hal_security esp_system freertos hal diff --git a/components/bootloader/subproject/main/ld/esp32c5/bootloader.ld.in b/components/bootloader/subproject/main/ld/esp32c5/bootloader.ld.in index aad2b39b2d..51f81f094a 100644 --- a/components/bootloader/subproject/main/ld/esp32c5/bootloader.ld.in +++ b/components/bootloader/subproject/main/ld/esp32c5/bootloader.ld.in @@ -91,8 +91,8 @@ SECTIONS *libhal.a:cache_hal.*(.literal .text .literal.* .text.*) *libhal.a:efuse_hal.*(.literal .text .literal.* .text.*) *libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*) - *libhal.a:huk_hal.*(.literal .text .literal.* .text.*) - *libhal.a:key_mgr_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:huk_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:key_mgr_hal.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_key_mgr.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_periph_clk.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_lock.*(.literal .text .literal.* .text.*) diff --git a/components/bootloader/subproject/main/ld/esp32p4/bootloader.ld.in b/components/bootloader/subproject/main/ld/esp32p4/bootloader.ld.in index 1d763d2d22..7837346e9d 100644 --- a/components/bootloader/subproject/main/ld/esp32p4/bootloader.ld.in +++ b/components/bootloader/subproject/main/ld/esp32p4/bootloader.ld.in @@ -89,7 +89,8 @@ SECTIONS *libhal.a:mmu_hal.*(.literal .text .literal.* .text.*) *libhal.a:cache_hal.*(.literal .text .literal.* .text.*) *libhal.a:efuse_hal.*(.literal .text .literal.* .text.*) - *libhal.a:key_mgr_hal.*(.literal.key_mgr_hal_set_key_usage .text.key_mgr_hal_set_key_usage) + *libesp_hal_security.a:huk_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:key_mgr_hal.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_periph_clk.*(.literal .text .literal.* .text.*) *libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*) *libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*) diff --git a/components/bootloader/subproject/main/ld/esp32p4/bootloader.rev3.ld.in b/components/bootloader/subproject/main/ld/esp32p4/bootloader.rev3.ld.in index f51c5e63af..8bf17b9974 100644 --- a/components/bootloader/subproject/main/ld/esp32p4/bootloader.rev3.ld.in +++ b/components/bootloader/subproject/main/ld/esp32p4/bootloader.rev3.ld.in @@ -90,8 +90,8 @@ SECTIONS *libhal.a:cache_hal.*(.literal .text .literal.* .text.*) *libhal.a:efuse_hal.*(.literal .text .literal.* .text.*) *libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*) - *libhal.a:huk_hal.*(.literal .text .literal.* .text.*) - *libhal.a:key_mgr_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:huk_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:key_mgr_hal.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_key_mgr.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_periph_clk.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_lock.*(.literal .text .literal.* .text.*) diff --git a/components/bootloader/subproject/main/ld/esp32s31/bootloader.ld.in b/components/bootloader/subproject/main/ld/esp32s31/bootloader.ld.in index 27a8d0276e..c221ac304f 100644 --- a/components/bootloader/subproject/main/ld/esp32s31/bootloader.ld.in +++ b/components/bootloader/subproject/main/ld/esp32s31/bootloader.ld.in @@ -90,8 +90,8 @@ SECTIONS *libhal.a:cache_hal.*(.literal .text .literal.* .text.*) *libhal.a:efuse_hal.*(.literal .text .literal.* .text.*) *libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*) - *libhal.a:huk_hal.*(.literal .text .literal.* .text.*) - *libhal.a:key_mgr_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:huk_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:key_mgr_hal.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_key_mgr.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_periph_clk.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_lock.*(.literal .text .literal.* .text.*) diff --git a/components/bootloader_support/CMakeLists.txt b/components/bootloader_support/CMakeLists.txt index 25dee5f026..d823d9d220 100644 --- a/components/bootloader_support/CMakeLists.txt +++ b/components/bootloader_support/CMakeLists.txt @@ -28,7 +28,7 @@ if(esp_tee_build) idf_component_register(SRCS ${tee_srcs} INCLUDE_DIRS ${tee_inc_dirs} - PRIV_REQUIRES efuse esp_app_format esptool_py) + PRIV_REQUIRES efuse esp_app_format esptool_py esp_hal_security) return() endif() @@ -74,7 +74,8 @@ if(BOOTLOADER_BUILD OR CONFIG_APP_BUILD_TYPE_RAM) "private_include") set(priv_requires micro-ecc spi_flash efuse esp_bootloader_format esp_app_format esptool_py) # `esp_hal_ana_conv` is required by bootloader_random_esp32xx.c - list(APPEND priv_requires esp_hal_wdt esp_hal_gpio esp_hal_uart esp_hal_ana_conv esp_hal_rtc_timer esp_hal_clock) + list(APPEND priv_requires esp_hal_wdt esp_hal_gpio esp_hal_uart esp_hal_ana_conv esp_hal_rtc_timer + esp_hal_clock esp_hal_security) list(APPEND srcs "src/bootloader_init.c" "src/bootloader_clock_loader.c" @@ -92,7 +93,8 @@ else() # heap is required for `heap_memory_layout.h` header set(priv_requires spi_flash mbedtls efuse heap esp_bootloader_format esp_app_format esptool_py) # `esp_hal_ana_conv` is required by bootloader_random_esp32xx.c - list(APPEND priv_requires esp_hal_wdt esp_hal_gpio esp_hal_uart esp_hal_ana_conv esp_hal_rtc_timer esp_hal_clock) + list(APPEND priv_requires esp_hal_wdt esp_hal_gpio esp_hal_uart esp_hal_ana_conv esp_hal_rtc_timer + esp_hal_clock esp_hal_security) endif() if(BOOTLOADER_BUILD) diff --git a/components/bootloader_support/src/bootloader_mem.c b/components/bootloader_support/src/bootloader_mem.c index 6ae07f70e6..916a003de6 100644 --- a/components/bootloader_support/src/bootloader_mem.c +++ b/components/bootloader_support/src/bootloader_mem.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/efuse/CMakeLists.txt b/components/efuse/CMakeLists.txt index 8b5d587213..66413755b9 100644 --- a/components/efuse/CMakeLists.txt +++ b/components/efuse/CMakeLists.txt @@ -31,15 +31,15 @@ list(APPEND srcs "src/esp_efuse_api.c" if(non_os_build) idf_component_register(SRCS "${srcs}" - PRIV_REQUIRES bootloader_support soc spi_flash + PRIV_REQUIRES bootloader_support soc spi_flash esp_hal_security INCLUDE_DIRS "${include_dirs}" PRIV_INCLUDE_DIRS "${private_include}") else() list(APPEND srcs "src/esp_efuse_startup.c") if(${target} STREQUAL "linux") - set(priv_requires soc spi_flash esp_system esp_partition) + set(priv_requires soc spi_flash esp_system esp_partition esp_hal_security) else() - set(priv_requires bootloader_support soc spi_flash esp_system esp_partition esp_app_format) + set(priv_requires bootloader_support soc spi_flash esp_system esp_partition esp_app_format esp_hal_security) endif() idf_component_register(SRCS "${srcs}" PRIV_REQUIRES "${priv_requires}" diff --git a/components/esp_hal_security/.build-test-rules.yml b/components/esp_hal_security/.build-test-rules.yml new file mode 100644 index 0000000000..b6a813da52 --- /dev/null +++ b/components/esp_hal_security/.build-test-rules.yml @@ -0,0 +1,11 @@ +# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps + +components/esp_hal_security/test_apps/crypto: + depends_components: + - efuse + - mbedtls + - esp_security + +components/esp_hal_security/test_apps/tee: + disable: + - if: IDF_TARGET not in ["esp32c6", "esp32h2", "esp32c5", "esp32c61"] diff --git a/components/esp_hal_security/CMakeLists.txt b/components/esp_hal_security/CMakeLists.txt new file mode 100644 index 0000000000..805c58455a --- /dev/null +++ b/components/esp_hal_security/CMakeLists.txt @@ -0,0 +1,87 @@ +idf_build_get_property(target IDF_TARGET) +idf_build_get_property(esp_tee_build ESP_TEE_BUILD) + +set(srcs) +set(includes) + +# target specific include must be added before the generic one +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include") + list(APPEND includes "${target}/include") +endif() +list(APPEND includes "include") + +# Security HAL source files +if(esp_tee_build) + if(CONFIG_SOC_AES_SUPPORTED) + list(APPEND srcs "aes_hal.c") + endif() + + if(CONFIG_SOC_SHA_SUPPORTED) + list(APPEND srcs "sha_hal.c") + endif() + + if(CONFIG_SOC_HMAC_SUPPORTED) + list(APPEND srcs "hmac_hal.c") + endif() + + if(CONFIG_SOC_DIG_SIGN_SUPPORTED) + list(APPEND srcs "ds_hal.c") + endif() + + if(CONFIG_SOC_ECC_SUPPORTED) + list(APPEND srcs "ecc_hal.c") + endif() + + if(CONFIG_SOC_APM_SUPPORTED) + list(APPEND srcs "apm_hal.c") + endif() +elseif(NOT BOOTLOADER_BUILD) + if(CONFIG_SOC_ECC_SUPPORTED) + list(APPEND srcs "ecc_hal.c") + endif() + + if(CONFIG_SOC_ECDSA_SUPPORTED) + list(APPEND srcs "ecdsa_hal.c") + endif() + + if(CONFIG_SOC_MPI_SUPPORTED) + list(APPEND srcs "mpi_hal.c") + endif() + + if(CONFIG_SOC_SHA_SUPPORTED) + list(APPEND srcs "sha_hal.c") + endif() + + if(CONFIG_SOC_AES_SUPPORTED) + list(APPEND srcs "aes_hal.c") + endif() + + if(CONFIG_SOC_HMAC_SUPPORTED AND NOT CONFIG_IDF_TARGET_ESP32S2) + # For ESP32-S2 we do not have HMAC HAL layer implementation yet + list(APPEND srcs "hmac_hal.c") + endif() + + if(CONFIG_SOC_DIG_SIGN_SUPPORTED AND NOT CONFIG_IDF_TARGET_ESP32S2) + # For ESP32-S2 we do not have DS HAL layer implementation yet + list(APPEND srcs "ds_hal.c") + endif() + + if(CONFIG_SOC_APM_SUPPORTED) + list(APPEND srcs "apm_hal.c") + endif() +endif() + +# Key Manager and HUK HAL (available in both bootloader and app builds) +if(CONFIG_SOC_KEY_MANAGER_SUPPORTED) + list(APPEND srcs "key_mgr_hal.c") + list(APPEND srcs "huk_hal.c") +endif() + +# MPU HAL (available in both bootloader and app builds) +if(CONFIG_SOC_MPU_SUPPORTED) + list(APPEND srcs "mpu_hal.c") +endif() + +idf_component_register(SRCS ${srcs} + INCLUDE_DIRS ${includes} + REQUIRES soc hal) diff --git a/components/esp_hal_security/Kconfig.hal_security b/components/esp_hal_security/Kconfig.hal_security new file mode 100644 index 0000000000..96f5922d96 --- /dev/null +++ b/components/esp_hal_security/Kconfig.hal_security @@ -0,0 +1,9 @@ +config HAL_ECDSA_GEN_SIG_CM + bool "Enable countermeasure for ECDSA signature generation" + depends on IDF_TARGET_ESP32H2 + default n + help + Enable this option to apply the countermeasure for ECDSA signature operation + This countermeasure masks the real ECDSA sign operation + under dummy sign operations to add randomness in the generated power signature. + This countermeasure is only necessary for ESP32-H2 < v1.2. diff --git a/components/esp_hal_security/README.md b/components/esp_hal_security/README.md new file mode 100644 index 0000000000..17c4f79a95 --- /dev/null +++ b/components/esp_hal_security/README.md @@ -0,0 +1,39 @@ +# `esp_hal_security` (G1 component) + +The `esp_hal_security` component provides a **Hardware Abstraction Layer** for security-related peripherals across all targets supported by ESP-IDF. + +This component contains HAL implementations for the following security peripherals: + +- **AES** (Advanced Encryption Standard) +- **SHA** (Secure Hash Algorithm) +- **HMAC** (Hash-based Message Authentication Code) +- **MPI** (Modular Polynomial Integer - RSA operations) +- **ECC** (Elliptic Curve Cryptography) +- **ECDSA** (Elliptic Curve Digital Signature Algorithm) +- **DS** (Digital Signature) +- **Key Manager** (Hardware key management) +- **HUK** (Hardware Unique Key) +- **APM** (Access Permission Manager) +- **MPU** (Memory Protection Unit) + +## Structure + +Similar to the main `hal` component, this component follows the same structure: + +- **HAL layer** (`include/esp_hal_security/_hal.h`): High-level abstraction for peripheral operations +- **LL layer** (`/include/esp_hal_security/_ll.h`): Low-level register access functions +- **Types** (`include/esp_hal_security/_types.h`): Type definitions and constants shared across layers + +## Usage + +This component is automatically included when you depend on components that use security peripherals, such as: +- `esp_security` +- `mbedtls` +- `bootloader_support` (for secure boot and flash encryption) + +You typically don't need to explicitly add this component to your `CMakeLists.txt` unless you're directly using security HAL APIs. + +## Note + +This component was split from the main `hal` component to better organize security-related functionality and manage dependencies. Components that previously depended on `hal` for security features should now depend on `esp_hal_security` instead. + diff --git a/components/hal/aes_hal.c b/components/esp_hal_security/aes_hal.c similarity index 99% rename from components/hal/aes_hal.c rename to components/esp_hal_security/aes_hal.c index f70ed1b987..75b3534c1d 100644 --- a/components/hal/aes_hal.c +++ b/components/esp_hal_security/aes_hal.c @@ -39,7 +39,6 @@ void aes_hal_transform_block(const void *input_block, void *output_block) aes_ll_read_block(output_block); } - #ifdef SOC_AES_SUPPORT_PSEUDO_ROUND_FUNCTION void aes_hal_enable_pseudo_rounds(bool enable, uint8_t base, uint8_t increment, uint8_t key_rng_cnt) { @@ -129,5 +128,4 @@ void aes_hal_gcm_read_tag(uint8_t *tag, size_t tag_len) memcpy(tag, tag_res, tag_len); } - #endif //SOC_AES_SUPPORT_GCM diff --git a/components/esp_hal_security/apm_hal.c b/components/esp_hal_security/apm_hal.c new file mode 100644 index 0000000000..6cc45772a9 --- /dev/null +++ b/components/esp_hal_security/apm_hal.c @@ -0,0 +1,526 @@ +/* + * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "soc/soc_caps.h" +#include "hal/assert.h" +#include "hal/apm_hal.h" +#include "hal/apm_ll.h" +#include "hal/log.h" + +#if SOC_IS(ESP32P4) +void apm_hal_hp_peri_access_enable(apm_ll_master_id_t master_id, apm_ll_hp_peri_t hp_peri, + apm_ll_secure_mode_t sec_mode, bool enable) +{ + apm_ll_hp_peri_access_enable(master_id, hp_peri, sec_mode, enable); +} + +void apm_hal_lp_peri_access_enable(apm_ll_lp_peri_t lp_peri, bool enable) +{ + apm_ll_lp_peri_access_enable(lp_peri, enable); +} + +void apm_hal_peri_region_config(uint32_t regn_num, uint32_t regn_low_addr, uint32_t regn_high_addr) +{ + apm_ll_peri_region_config(regn_num, regn_low_addr, regn_high_addr); +} + +int apm_hal_peri_region_pms(apm_ll_master_id_t master_id, apm_ll_secure_mode_t sec_mode, + uint32_t regn_num, uint32_t regn_pms) +{ + return apm_ll_peri_region_pms(master_id, sec_mode, regn_num, regn_pms); +} + +int apm_hal_apm_ctrl_clk_gating_enable(apm_ll_apm_ctrl_t apm_ctrl, bool enable) +{ + return apm_ll_apm_ctrl_clk_gating_enable(apm_ctrl, enable); +} + +void apm_hal_dma_region_config(uint32_t regn_num, uint32_t regn_low_addr, uint32_t regn_high_addr) +{ + apm_ll_dma_region_set_low_address(regn_num, regn_low_addr); + apm_ll_dma_region_set_high_address(regn_num, regn_high_addr); +} + +void apm_hal_dma_region_pms(apm_hal_dma_region_config_data_t *pms_data) +{ + HAL_ASSERT(pms_data); + + apm_ll_dma_region_r_pms(pms_data->dma_master, pms_data->pms_r_mask); + apm_ll_dma_region_w_pms(pms_data->dma_master, pms_data->pms_w_mask); +} +#else + +void apm_hal_set_master_sec_mode(uint32_t master_mask, apm_security_mode_t mode) +{ + master_mask &= APM_MASTER_MASK_ALL; + while (master_mask) { + uint32_t master = __builtin_ctz(master_mask); + master_mask &= ~(1U << master); + apm_ll_hp_tee_set_master_sec_mode(master, mode); +#if SOC_APM_SUPPORT_LP_TEE_CTRL + if (master == APM_MASTER_LPCORE) { + apm_ll_lp_tee_set_master_sec_mode(master, mode); + } +#endif + } +} + +void apm_hal_set_master_sec_mode_all(apm_security_mode_t mode) +{ + apm_hal_set_master_sec_mode(APM_MASTER_MASK_ALL, mode); +} + +#if SOC_APM_SUPPORT_CTRL_CFG_LOCK +void apm_hal_lock_master_sec_mode(uint32_t master_mask) +{ + master_mask &= APM_MASTER_MASK_ALL; + while (master_mask) { + uint32_t master = __builtin_ctz(master_mask); + master_mask &= ~(1U << master); + apm_ll_hp_tee_lock_master_sec_mode(master); +#if SOC_APM_SUPPORT_LP_TEE_CTRL + if (master == APM_MASTER_LPCORE) { + apm_ll_lp_tee_lock_master_sec_mode(master); + } +#endif + } +} + +void apm_hal_lock_master_sec_mode_all(void) +{ + apm_hal_lock_master_sec_mode(APM_MASTER_MASK_ALL); +} +#endif + +#if SOC_APM_SUPPORT_TEE_PERI_ACCESS_CTRL +void apm_hal_tee_set_peri_access(apm_tee_ctrl_module_t ctrl_mod, uint64_t periph_mask, apm_security_mode_t mode, apm_perm_t pms) +{ + switch (ctrl_mod) { + case APM_TEE_CTRL_HP: + uint64_t hp_tee_peri_mask = periph_mask & APM_TEE_HP_PERIPH_MASK_ALL; + for (uint32_t periph = 0; periph < APM_TEE_HP_PERIPH_MAX; periph++) { + if (hp_tee_peri_mask & (1ULL << periph)) { + apm_ll_hp_tee_set_peri_access((apm_tee_hp_periph_t)periph, mode, pms); + } + } + apm_ll_hp_tee_enable_bus_err_resp(true); + break; +#if SOC_APM_SUPPORT_LP_TEE_CTRL + case APM_TEE_CTRL_LP: + uint32_t lp_tee_peri_mask = (uint32_t)periph_mask & (uint32_t)APM_TEE_LP_PERIPH_MASK_ALL; + while (lp_tee_peri_mask) { + uint32_t periph = __builtin_ctz(lp_tee_peri_mask); + apm_ll_lp_tee_set_peri_access((apm_tee_lp_periph_t)periph, mode, pms); + lp_tee_peri_mask &= ~(1U << periph); + } + apm_ll_lp_tee_enable_bus_err_resp(true); + break; +#endif + default: + break; + } +} + +void apm_hal_tee_set_peri_access_all(apm_tee_ctrl_module_t ctrl_mod, apm_security_mode_t mode, apm_perm_t pms) +{ + switch (ctrl_mod) { + case APM_TEE_CTRL_HP: + apm_hal_tee_set_peri_access(APM_TEE_CTRL_HP, (uint64_t)(APM_TEE_HP_PERIPH_MASK_ALL), mode, pms); + break; +#if SOC_APM_SUPPORT_LP_TEE_CTRL + case APM_TEE_CTRL_LP: + apm_hal_tee_set_peri_access(APM_TEE_CTRL_LP, (uint64_t)(APM_TEE_LP_PERIPH_MASK_ALL), mode, pms); + break; +#endif + default: + break; + } +} +#endif + +void apm_hal_tee_enable_clk_gating(apm_tee_ctrl_module_t ctrl_mod, bool enable) +{ + switch (ctrl_mod) { + case APM_TEE_CTRL_HP: + apm_ll_hp_tee_enable_clk_gating(enable); + break; +#if SOC_APM_SUPPORT_LP_TEE_CTRL + case APM_TEE_CTRL_LP: + apm_ll_lp_tee_enable_clk_gating(enable); + break; +#endif + default: + break; + } +} + +void apm_hal_enable_ctrl_filter(apm_ctrl_module_t ctrl_mod, apm_ctrl_access_path_t path, bool enable) +{ + switch (ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_enable_ctrl_filter(path, enable); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_enable_ctrl_filter(path, enable); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_enable_ctrl_filter(path, enable); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_enable_ctrl_filter(path, enable); + break; +#endif + default: + break; + } +} + +void apm_hal_enable_ctrl_filter_all(bool enable) +{ + apm_ll_hp_apm_enable_ctrl_filter_all(enable); +#if SOC_APM_LP_APM0_SUPPORTED + apm_ll_lp_apm0_enable_ctrl_filter_all(enable); +#endif + apm_ll_lp_apm_enable_ctrl_filter_all(enable); +#if SOC_APM_CPU_APM_SUPPORTED + apm_ll_cpu_apm_enable_ctrl_filter_all(enable); +#endif +} + +void apm_hal_enable_region_filter(apm_ctrl_module_t ctrl_mod, uint32_t regn_num, bool enable) +{ + switch (ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_enable_region_filter(regn_num, enable); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_enable_region_filter(regn_num, enable); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_enable_region_filter(regn_num, enable); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_enable_region_filter(regn_num, enable); + break; +#endif + default: + break; + } +} + +void apm_hal_set_region_start_addr(apm_ctrl_module_t ctrl_mod, uint32_t regn_num, uint32_t addr) +{ + switch (ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_set_region_start_addr(regn_num, addr); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_set_region_start_addr(regn_num, addr); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_set_region_start_addr(regn_num, addr); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_set_region_start_addr(regn_num, addr); + break; +#endif + default: + break; + } +} + +void apm_hal_set_region_end_addr(apm_ctrl_module_t ctrl_mod, uint32_t regn_num, uint32_t addr) +{ + switch (ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_set_region_end_addr(regn_num, addr); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_set_region_end_addr(regn_num, addr); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_set_region_end_addr(regn_num, addr); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_set_region_end_addr(regn_num, addr); + break; +#endif + default: + break; + } +} + +void apm_hal_set_sec_mode_region_attr(apm_ctrl_module_t ctrl_mod, uint32_t regn_num, apm_security_mode_t mode, uint32_t regn_pms) +{ + HAL_ASSERT(mode != APM_SEC_MODE_TEE); + + switch (ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_set_sec_mode_region_attr(regn_num, mode, regn_pms); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_set_sec_mode_region_attr(regn_num, mode, regn_pms); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_set_sec_mode_region_attr(regn_num, mode, regn_pms); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_set_sec_mode_region_attr(regn_num, mode, regn_pms); + break; +#endif + default: + break; + } +} + +void apm_hal_set_region_filter_cfg(apm_ctrl_module_t ctrl_mod, apm_security_mode_t mode, const apm_hal_ctrl_region_cfg_t *regn_cfg) +{ + HAL_ASSERT(regn_cfg); + HAL_ASSERT(mode != APM_SEC_MODE_TEE); + + switch (ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_set_region_start_addr(regn_cfg->regn_num, regn_cfg->regn_start_addr); + apm_ll_hp_apm_set_region_end_addr(regn_cfg->regn_num, regn_cfg->regn_end_addr); + apm_ll_hp_apm_set_sec_mode_region_attr(regn_cfg->regn_num, mode, regn_cfg->regn_pms); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_set_region_start_addr(regn_cfg->regn_num, regn_cfg->regn_start_addr); + apm_ll_lp_apm0_set_region_end_addr(regn_cfg->regn_num, regn_cfg->regn_end_addr); + apm_ll_lp_apm0_set_sec_mode_region_attr(regn_cfg->regn_num, mode, regn_cfg->regn_pms); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_set_region_start_addr(regn_cfg->regn_num, regn_cfg->regn_start_addr); + apm_ll_lp_apm_set_region_end_addr(regn_cfg->regn_num, regn_cfg->regn_end_addr); + apm_ll_lp_apm_set_sec_mode_region_attr(regn_cfg->regn_num, mode, regn_cfg->regn_pms); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_set_region_start_addr(regn_cfg->regn_num, regn_cfg->regn_start_addr); + apm_ll_cpu_apm_set_region_end_addr(regn_cfg->regn_num, regn_cfg->regn_end_addr); + apm_ll_cpu_apm_set_sec_mode_region_attr(regn_cfg->regn_num, mode, regn_cfg->regn_pms); + break; +#endif + default: + break; + } +} + +#if SOC_APM_SUPPORT_CTRL_CFG_LOCK +void apm_hal_lock_region_filter_cfg(apm_ctrl_module_t ctrl_mod, uint32_t regn_num) +{ + switch (ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_lock_sec_mode_region_attr(regn_num); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_lock_sec_mode_region_attr(regn_num); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_lock_sec_mode_region_attr(regn_num); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_lock_sec_mode_region_attr(regn_num); + break; +#endif + default: + break; + } +} +#endif + +void apm_hal_set_ctrl_sec_mode_cfg(const apm_hal_ctrl_sec_mode_cfg_t *cfg) +{ + HAL_ASSERT(cfg); + HAL_ASSERT(cfg->regions); + + for (uint32_t regn_idx = 0; regn_idx < cfg->regn_count; regn_idx++) { + const apm_hal_ctrl_region_cfg_t *region = &cfg->regions[regn_idx]; + apm_hal_set_region_filter_cfg(cfg->ctrl_mod, cfg->mode, region); + apm_hal_enable_region_filter(cfg->ctrl_mod, region->regn_num, region->filter_en); +#if SOC_APM_SUPPORT_CTRL_CFG_LOCK + if (region->lock_en) { + apm_hal_lock_region_filter_cfg(cfg->ctrl_mod, region->regn_num); + } +#endif + apm_hal_enable_ctrl_filter(cfg->ctrl_mod, region->path_id, true); + } +} + +uint32_t apm_hal_get_exception_type(apm_hal_ctrl_info_t *ctrl_info) +{ + HAL_ASSERT(ctrl_info); + + switch (ctrl_info->ctrl_mod) { + case APM_CTRL_HP_APM: + return apm_ll_hp_apm_get_excp_type(ctrl_info->path); +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + return apm_ll_lp_apm0_get_excp_type(ctrl_info->path); +#endif + case APM_CTRL_LP_APM: + return apm_ll_lp_apm_get_excp_type(ctrl_info->path); +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + return apm_ll_cpu_apm_get_excp_type(ctrl_info->path); +#endif + default: + return UINT8_MAX; + } +} + +void apm_hal_clear_exception_status(apm_hal_ctrl_info_t *ctrl_info) +{ + HAL_ASSERT(ctrl_info); + + switch (ctrl_info->ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_clear_ctrl_excp_status(ctrl_info->path); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_clear_ctrl_excp_status(ctrl_info->path); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_clear_ctrl_excp_status(ctrl_info->path); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_clear_ctrl_excp_status(ctrl_info->path); + break; +#endif + default: + break; + } +} + +void apm_hal_get_exception_info(apm_hal_ctrl_info_t *ctrl_info, apm_ctrl_exception_info_t *excp_info) +{ + HAL_ASSERT(ctrl_info); + HAL_ASSERT(excp_info); + + switch (ctrl_info->ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_get_excp_info(ctrl_info->path, excp_info); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_get_excp_info(ctrl_info->path, excp_info); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_get_excp_info(ctrl_info->path, excp_info); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_get_excp_info(ctrl_info->path, excp_info); + break; +#endif + default: + break; + } +} + +void apm_hal_enable_intr(apm_hal_ctrl_info_t *ctrl_info, bool enable) +{ + HAL_ASSERT(ctrl_info); + + switch (ctrl_info->ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_enable_ctrl_intr(ctrl_info->path, enable); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_enable_ctrl_intr(ctrl_info->path, enable); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_enable_ctrl_intr(ctrl_info->path, enable); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_enable_ctrl_intr(ctrl_info->path, enable); + break; +#endif + default: + break; + } +} + +int apm_hal_get_intr_src_num(apm_hal_ctrl_info_t *ctrl_info) +{ + HAL_ASSERT(ctrl_info); + + switch (ctrl_info->ctrl_mod) { + case APM_CTRL_HP_APM: + return apm_ll_hp_apm_get_ctrl_intr_src(ctrl_info->path); +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + return apm_ll_lp_apm0_get_ctrl_intr_src(ctrl_info->path); +#endif + case APM_CTRL_LP_APM: + return apm_ll_lp_apm_get_ctrl_intr_src(ctrl_info->path); +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + return apm_ll_cpu_apm_get_ctrl_intr_src(ctrl_info->path); +#endif + default: + return -1; + } +} + +void apm_hal_enable_reset_event_bypass(bool enable) +{ + apm_ll_enable_reset_event_bypass(enable); +} + +void apm_hal_enable_ctrl_clk_gating(apm_ctrl_module_t ctrl_mod, bool enable) +{ + switch (ctrl_mod) { + case APM_CTRL_HP_APM: + apm_ll_hp_apm_enable_ctrl_clk_gating(enable); + break; +#if SOC_APM_LP_APM0_SUPPORTED + case APM_CTRL_LP_APM0: + apm_ll_lp_apm0_enable_ctrl_clk_gating(enable); + break; +#endif + case APM_CTRL_LP_APM: + apm_ll_lp_apm_enable_ctrl_clk_gating(enable); + break; +#if SOC_APM_CPU_APM_SUPPORTED + case APM_CTRL_CPU_APM: + apm_ll_cpu_apm_enable_ctrl_clk_gating(enable); + break; +#endif + default: + break; + } +} + +#endif //SOC_IS(ESP32P4) diff --git a/components/hal/ds_hal.c b/components/esp_hal_security/ds_hal.c similarity index 100% rename from components/hal/ds_hal.c rename to components/esp_hal_security/ds_hal.c diff --git a/components/hal/ecc_hal.c b/components/esp_hal_security/ecc_hal.c similarity index 100% rename from components/hal/ecc_hal.c rename to components/esp_hal_security/ecc_hal.c diff --git a/components/hal/ecdsa_hal.c b/components/esp_hal_security/ecdsa_hal.c similarity index 91% rename from components/hal/ecdsa_hal.c rename to components/esp_hal_security/ecdsa_hal.c index 5d7da7e663..0b027be1b7 100644 --- a/components/hal/ecdsa_hal.c +++ b/components/esp_hal_security/ecdsa_hal.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -85,11 +85,11 @@ bool ecdsa_hal_get_operation_result(void) } static void ecdsa_hal_gen_signature_inner(const uint8_t *hash, uint8_t *r_out, - uint8_t *s_out, uint16_t len) + uint8_t *s_out, uint16_t len) { ecdsa_ll_set_stage(ECDSA_STAGE_START_CALC); - while(ecdsa_ll_get_state() != ECDSA_STATE_LOAD) { + while (ecdsa_ll_get_state() != ECDSA_STATE_LOAD) { ; } @@ -113,7 +113,7 @@ static void ecdsa_hal_gen_signature_inner(const uint8_t *hash, uint8_t *r_out, #if HAL_CONFIG(ECDSA_GEN_SIG_CM) __attribute__((optimize("O0"))) static void ecdsa_hal_gen_signature_with_countermeasure(const uint8_t *hash, uint8_t *r_out, - uint8_t *s_out, uint16_t len) + uint8_t *s_out, uint16_t len) { uint8_t tmp_r_out[32] = {}; uint8_t tmp_s_out[32] = {}; @@ -141,16 +141,14 @@ __attribute__((optimize("O0"))) static void ecdsa_hal_gen_signature_with_counter } #endif /* HAL_CONFIG_ECDSA_GEN_SIG_CM */ - - void ecdsa_hal_gen_signature(ecdsa_hal_config_t *conf, const uint8_t *hash, - uint8_t *r_out, uint8_t *s_out, uint16_t len) + uint8_t *r_out, uint8_t *s_out, uint16_t len) { if (len != ECDSA_HAL_P192_COMPONENT_LEN && len != ECDSA_HAL_P256_COMPONENT_LEN #if SOC_ECDSA_SUPPORT_CURVE_P384 - && len != ECDSA_HAL_P384_COMPONENT_LEN + && len != ECDSA_HAL_P384_COMPONENT_LEN #endif /* SOC_ECDSA_SUPPORT_CURVE_P384 */ - ) { + ) { HAL_ASSERT(false && "Incorrect length"); } @@ -183,9 +181,9 @@ int ecdsa_hal_verify_signature(ecdsa_hal_config_t *conf, const uint8_t *hash, co { if (len != ECDSA_HAL_P192_COMPONENT_LEN && len != ECDSA_HAL_P256_COMPONENT_LEN #if SOC_ECDSA_SUPPORT_CURVE_P384 - && len != ECDSA_HAL_P384_COMPONENT_LEN + && len != ECDSA_HAL_P384_COMPONENT_LEN #endif /* SOC_ECDSA_SUPPORT_CURVE_P384 */ - ) { + ) { HAL_ASSERT(false && "Incorrect length"); } @@ -197,7 +195,7 @@ int ecdsa_hal_verify_signature(ecdsa_hal_config_t *conf, const uint8_t *hash, co ecdsa_ll_set_stage(ECDSA_STAGE_START_CALC); - while(ecdsa_ll_get_state() != ECDSA_STATE_LOAD) { + while (ecdsa_ll_get_state() != ECDSA_STATE_LOAD) { ; } @@ -223,9 +221,9 @@ void ecdsa_hal_export_pubkey(ecdsa_hal_config_t *conf, uint8_t *pub_x, uint8_t * { if (len != ECDSA_HAL_P192_COMPONENT_LEN && len != ECDSA_HAL_P256_COMPONENT_LEN #if SOC_ECDSA_SUPPORT_CURVE_P384 - && len != ECDSA_HAL_P384_COMPONENT_LEN + && len != ECDSA_HAL_P384_COMPONENT_LEN #endif /* SOC_ECDSA_SUPPORT_CURVE_P384 */ - ) { + ) { HAL_ASSERT(false && "Incorrect length"); } @@ -237,7 +235,7 @@ void ecdsa_hal_export_pubkey(ecdsa_hal_config_t *conf, uint8_t *pub_x, uint8_t * ecdsa_ll_set_stage(ECDSA_STAGE_START_CALC); - while(ecdsa_ll_get_state() != ECDSA_STATE_LOAD) { + while (ecdsa_ll_get_state() != ECDSA_STATE_LOAD) { ; } diff --git a/components/hal/esp32/include/hal/aes_ll.h b/components/esp_hal_security/esp32/include/hal/aes_ll.h similarity index 99% rename from components/hal/esp32/include/hal/aes_ll.h rename to components/esp_hal_security/esp32/include/hal/aes_ll.h index aaf3467c17..5d4a865c54 100644 --- a/components/hal/esp32/include/hal/aes_ll.h +++ b/components/esp_hal_security/esp32/include/hal/aes_ll.h @@ -17,7 +17,6 @@ extern "C" { #endif - /** * @brief State of AES accelerator, busy or idle * @@ -149,7 +148,6 @@ static inline void aes_ll_read_block(void *output) esp_dport_access_read_buffer(output_words, AES_TEXT_BASE, AES_BLOCK_WORDS); } - /** * @brief Starts block transform * @@ -159,7 +157,6 @@ static inline void aes_ll_start_transform(void) DPORT_REG_WRITE(AES_START_REG, 1); } - /** * @brief Read state of AES accelerator * diff --git a/components/hal/esp32/include/hal/mpi_ll.h b/components/esp_hal_security/esp32/include/hal/mpi_ll.h similarity index 99% rename from components/hal/esp32/include/hal/mpi_ll.h rename to components/esp_hal_security/esp32/include/hal/mpi_ll.h index 75a2515ae1..a8e0f565ee 100644 --- a/components/hal/esp32/include/hal/mpi_ll.h +++ b/components/esp_hal_security/esp32/include/hal/mpi_ll.h @@ -18,7 +18,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for MPI peripheral module * diff --git a/components/hal/esp32/include/hal/mpu_ll.h b/components/esp_hal_security/esp32/include/hal/mpu_ll.h similarity index 100% rename from components/hal/esp32/include/hal/mpu_ll.h rename to components/esp_hal_security/esp32/include/hal/mpu_ll.h diff --git a/components/hal/esp32/include/hal/sha_ll.h b/components/esp_hal_security/esp32/include/hal/sha_ll.h similarity index 100% rename from components/hal/esp32/include/hal/sha_ll.h rename to components/esp_hal_security/esp32/include/hal/sha_ll.h diff --git a/components/hal/esp32c2/include/hal/ecc_ll.h b/components/esp_hal_security/esp32c2/include/hal/ecc_ll.h similarity index 69% rename from components/hal/esp32c2/include/hal/ecc_ll.h rename to components/esp_hal_security/esp32c2/include/hal/ecc_ll.h index efe4285061..886a21f207 100644 --- a/components/hal/esp32c2/include/hal/ecc_ll.h +++ b/components/esp_hal_security/esp32c2/include/hal/ecc_ll.h @@ -75,34 +75,34 @@ static inline void ecc_ll_clear_interrupt(void) static inline void ecc_ll_set_mode(ecc_mode_t mode) { - switch(mode) { - case ECC_MODE_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); - break; - case ECC_MODE_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); - break; - case ECC_MODE_VERIFY_THEN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + switch (mode) { + case ECC_MODE_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); + break; + case ECC_MODE_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); + break; + case ECC_MODE_VERIFY_THEN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } static inline void ecc_ll_set_curve(ecc_curve_t curve) { - switch(curve) { - case ECC_CURVE_SECP256R1: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); - break; - case ECC_CURVE_SECP192R1: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (curve) { + case ECC_CURVE_SECP256R1: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); + break; + case ECC_CURVE_SECP192R1: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -111,18 +111,18 @@ static inline void ecc_ll_write_param(ecc_ll_param_t param, const uint8_t *buf, uint32_t reg; uint32_t word; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_1_REG; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_1_REG; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_1_REG; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_1_REG; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_1_REG; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_1_REG; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -160,18 +160,18 @@ static inline void ecc_ll_read_param(ecc_ll_param_t param, uint8_t *buf, uint16_ { uint32_t reg; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_1_REG; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_1_REG; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_1_REG; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_1_REG; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_1_REG; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_1_REG; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32c2/include/hal/sha_ll.h b/components/esp_hal_security/esp32c2/include/hal/sha_ll.h similarity index 99% rename from components/hal/esp32c2/include/hal/sha_ll.h rename to components/esp_hal_security/esp32c2/include/hal/sha_ll.h index 29f37f3bb7..a353e70d19 100644 --- a/components/hal/esp32c2/include/hal/sha_ll.h +++ b/components/esp_hal_security/esp32c2/include/hal/sha_ll.h @@ -14,7 +14,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for SHA peripheral module * @@ -181,7 +180,6 @@ static inline void sha_ll_write_digest(esp_sha_type sha_type, void *digest_state } } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32c3/include/hal/aes_ll.h b/components/esp_hal_security/esp32c3/include/hal/aes_ll.h similarity index 98% rename from components/hal/esp32c3/include/hal/aes_ll.h rename to components/esp_hal_security/esp32c3/include/hal/aes_ll.h index 1ebb5ee2a7..bbfe795a90 100644 --- a/components/hal/esp32c3/include/hal/aes_ll.h +++ b/components/esp_hal_security/esp32c3/include/hal/aes_ll.h @@ -127,7 +127,7 @@ static inline void aes_ll_read_block(void *output) for (size_t i = 0; i < AES_BLOCK_WORDS; i++) { output_word = REG_READ(AES_TEXT_OUT_BASE + (i * REG_WIDTH)); /* Memcpy to avoid potential unaligned access */ - memcpy( (uint8_t*)output + i * 4, &output_word, sizeof(output_word)); + memcpy((uint8_t*)output + i * 4, &output_word, sizeof(output_word)); } } @@ -140,7 +140,6 @@ static inline void aes_ll_start_transform(void) REG_WRITE(AES_TRIGGER_REG, 1); } - /** * @brief Read state of AES accelerator * @@ -151,7 +150,6 @@ static inline esp_aes_state_t aes_ll_get_state(void) return (esp_aes_state_t)REG_READ(AES_STATE_REG); } - /** * @brief Set mode of operation * @@ -204,7 +202,7 @@ static inline void aes_ll_set_iv(const uint8_t *iv) uint32_t *reg_addr_buf = (uint32_t *)(AES_IV_BASE); uint32_t iv_word; - for (int i = 0; i < IV_WORDS; i++ ) { + for (int i = 0; i < IV_WORDS; i++) { /* Memcpy to avoid potential unaligned access */ memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); REG_WRITE(®_addr_buf[i], iv_word); @@ -255,7 +253,6 @@ static inline void aes_ll_interrupt_clear(void) REG_WRITE(AES_INT_CLEAR_REG, 1); } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32c3/include/hal/ds_ll.h b/components/esp_hal_security/esp32c3/include/hal/ds_ll.h similarity index 90% rename from components/hal/esp32c3/include/hal/ds_ll.h rename to components/esp_hal_security/esp32c3/include/hal/ds_ll.h index ac12b9bee3..3b4b6fd602 100644 --- a/components/hal/esp32c3/include/hal/ds_ll.h +++ b/components/esp_hal_security/esp32c3/include/hal/ds_ll.h @@ -97,7 +97,7 @@ static inline ds_key_check_t ds_ll_key_error_source(void) static inline void ds_ll_configure_iv(const uint32_t *iv) { for (size_t i = 0; i < (SOC_DS_KEY_PARAM_MD_IV_LENGTH / sizeof(uint32_t)); i++) { - REG_WRITE(DS_IV_BASE + (i * 4) , iv[i]); + REG_WRITE(DS_IV_BASE + (i * 4), iv[i]); } } @@ -111,7 +111,7 @@ static inline void ds_ll_write_message(const uint8_t *msg, size_t size) { memcpy((uint8_t*) DS_X_BASE, msg, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** @@ -125,19 +125,22 @@ static inline void ds_ll_write_private_key_params(const uint8_t *encrypted_key_p (note if ETS_DS_MAX_BITS == 4096, this should be the same as copying data->c to hardware in one fragment) */ - typedef struct { uint32_t addr; size_t len; } frag_t; + typedef struct { + uint32_t addr; + size_t len; + } frag_t; const frag_t frags[] = { - {DS_C_Y_BASE, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_C_M_BASE, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_C_RB_BASE, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_C_BOX_BASE, DS_IV_BASE - DS_C_BOX_BASE}, + {DS_C_Y_BASE, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_C_M_BASE, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_C_RB_BASE, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_C_BOX_BASE, DS_IV_BASE - DS_C_BOX_BASE}, }; - const size_t NUM_FRAGS = sizeof(frags)/sizeof(frag_t); + const size_t NUM_FRAGS = sizeof(frags) / sizeof(frag_t); const uint8_t *from = encrypted_key_params; for (int i = 0; i < NUM_FRAGS; i++) { memcpy((uint8_t *)frags[i].addr, from, frags[i].len); - asm volatile ("fence"); + asm volatile("fence"); // Fence ensures all memory operations are completed before proceeding further from += frags[i].len; } @@ -164,7 +167,7 @@ static inline void ds_ll_start_sign(void) static inline ds_signature_check_t ds_ll_check_signature(void) { uint32_t result = REG_READ(DS_QUERY_CHECK_REG); - switch(result) { + switch (result) { case 0: return DS_SIGNATURE_OK; case 1: @@ -186,7 +189,7 @@ static inline void ds_ll_read_result(uint8_t *result, size_t size) { memcpy(result, (uint8_t*) DS_Z_BASE, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** diff --git a/components/hal/esp32c3/include/hal/hmac_ll.h b/components/esp_hal_security/esp32c3/include/hal/hmac_ll.h similarity index 99% rename from components/hal/esp32c3/include/hal/hmac_ll.h rename to components/esp_hal_security/esp32c3/include/hal/hmac_ll.h index 7992d30055..4482464536 100644 --- a/components/hal/esp32c3/include/hal/hmac_ll.h +++ b/components/esp_hal_security/esp32c3/include/hal/hmac_ll.h @@ -81,7 +81,7 @@ static inline void hmac_ll_start(void) */ static inline void hmac_ll_config_output(hmac_hal_output_t config) { - switch(config) { + switch (config) { case HMAC_OUTPUT_USER: REG_WRITE(HMAC_SET_PARA_PURPOSE_REG, EFUSE_KEY_PURPOSE_HMAC_UP); break; @@ -138,7 +138,7 @@ static inline void hmac_ll_wait_idle(void) uint32_t query; do { query = REG_READ(HMAC_QUERY_BUSY_REG); - } while(query != 0); + } while (query != 0); } /** diff --git a/components/hal/esp32c3/include/hal/mpi_ll.h b/components/esp_hal_security/esp32c3/include/hal/mpi_ll.h similarity index 99% rename from components/hal/esp32c3/include/hal/mpi_ll.h rename to components/esp_hal_security/esp32c3/include/hal/mpi_ll.h index faefd7496d..c8eeae7b55 100644 --- a/components/hal/esp32c3/include/hal/mpi_ll.h +++ b/components/esp_hal_security/esp32c3/include/hal/mpi_ll.h @@ -19,7 +19,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for MPI peripheral module * diff --git a/components/hal/esp32c3/include/hal/sha_ll.h b/components/esp_hal_security/esp32c3/include/hal/sha_ll.h similarity index 99% rename from components/hal/esp32c3/include/hal/sha_ll.h rename to components/esp_hal_security/esp32c3/include/hal/sha_ll.h index 76849cfb4f..6970f1ccbe 100644 --- a/components/hal/esp32c3/include/hal/sha_ll.h +++ b/components/esp_hal_security/esp32c3/include/hal/sha_ll.h @@ -184,7 +184,6 @@ static inline void sha_ll_write_digest(esp_sha_type sha_type, void *digest_state } } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32c5/include/hal/aes_ll.h b/components/esp_hal_security/esp32c5/include/hal/aes_ll.h similarity index 98% rename from components/hal/esp32c5/include/hal/aes_ll.h rename to components/esp_hal_security/esp32c5/include/hal/aes_ll.h index 1a34c54c2e..4284612742 100644 --- a/components/hal/esp32c5/include/hal/aes_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/aes_ll.h @@ -113,7 +113,7 @@ static inline void aes_ll_read_block(void *output) for (size_t i = 0; i < AES_BLOCK_WORDS; i++) { output_word = REG_READ(AES_TEXT_OUT_0_REG + (i * REG_WIDTH)); /* Memcpy to avoid potential unaligned access */ - memcpy( (uint8_t*)output + i * 4, &output_word, sizeof(output_word)); + memcpy((uint8_t*)output + i * 4, &output_word, sizeof(output_word)); } } @@ -126,7 +126,6 @@ static inline void aes_ll_start_transform(void) REG_WRITE(AES_TRIGGER_REG, 1); } - /** * @brief Read state of AES accelerator * @@ -137,7 +136,6 @@ static inline esp_aes_state_t aes_ll_get_state(void) return (esp_aes_state_t)REG_READ(AES_STATE_REG); } - /** * @brief Set mode of operation * @@ -190,7 +188,7 @@ static inline void aes_ll_set_iv(const uint8_t *iv) uint32_t *reg_addr_buf = (uint32_t *)(AES_IV_MEM); uint32_t iv_word; - for (int i = 0; i < IV_WORDS; i++ ) { + for (int i = 0; i < IV_WORDS; i++) { /* Memcpy to avoid potential unaligned access */ memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); REG_WRITE(®_addr_buf[i], iv_word); diff --git a/components/hal/esp32c5/include/hal/apm_ll.h b/components/esp_hal_security/esp32c5/include/hal/apm_ll.h similarity index 100% rename from components/hal/esp32c5/include/hal/apm_ll.h rename to components/esp_hal_security/esp32c5/include/hal/apm_ll.h diff --git a/components/hal/esp32c5/include/hal/ds_ll.h b/components/esp_hal_security/esp32c5/include/hal/ds_ll.h similarity index 89% rename from components/hal/esp32c5/include/hal/ds_ll.h rename to components/esp_hal_security/esp32c5/include/hal/ds_ll.h index 61ebbc4870..b9bd401d6d 100644 --- a/components/hal/esp32c5/include/hal/ds_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/ds_ll.h @@ -20,7 +20,6 @@ #include "soc/pcr_struct.h" #include "hal/ds_types.h" - #ifdef __cplusplus extern "C" { #endif @@ -92,7 +91,7 @@ static inline void ds_ll_set_key_source(ds_key_source_t key_source) static inline void ds_ll_configure_iv(const uint32_t *iv) { for (size_t i = 0; i < (SOC_DS_KEY_PARAM_MD_IV_LENGTH / sizeof(uint32_t)); i++) { - REG_WRITE(DS_IV_MEM + (i * 4) , iv[i]); + REG_WRITE(DS_IV_MEM + (i * 4), iv[i]); } } @@ -106,7 +105,7 @@ static inline void ds_ll_write_message(const uint8_t *msg, size_t size) { memcpy((uint8_t*) DS_X_MEM, msg, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** @@ -120,20 +119,23 @@ static inline void ds_ll_write_private_key_params(const uint8_t *encrypted_key_p (note if ETS_DS_MAX_BITS == 4096, this should be the same as copying data->c to hardware in one fragment) */ - typedef struct { uint32_t addr; size_t len; } frag_t; + typedef struct { + uint32_t addr; + size_t len; + } frag_t; const frag_t frags[] = { - {DS_Y_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_M_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_RB_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_BOX_MEM, DS_IV_MEM - DS_BOX_MEM}, + {DS_Y_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_M_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_RB_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_BOX_MEM, DS_IV_MEM - DS_BOX_MEM}, }; - const size_t NUM_FRAGS = sizeof(frags)/sizeof(frag_t); + const size_t NUM_FRAGS = sizeof(frags) / sizeof(frag_t); const uint8_t *from = encrypted_key_params; for (int i = 0; i < NUM_FRAGS; i++) { memcpy((uint8_t *)frags[i].addr, from, frags[i].len); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); from += frags[i].len; } } @@ -159,7 +161,7 @@ static inline void ds_ll_start_sign(void) static inline ds_signature_check_t ds_ll_check_signature(void) { uint32_t result = REG_READ(DS_QUERY_CHECK_REG); - switch(result) { + switch (result) { case 0: return DS_SIGNATURE_OK; case 1: @@ -181,7 +183,7 @@ static inline void ds_ll_read_result(uint8_t *result, size_t size) { memcpy(result, (uint8_t*) DS_Z_MEM, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** diff --git a/components/hal/esp32c5/include/hal/ecc_ll.h b/components/esp_hal_security/esp32c5/include/hal/ecc_ll.h similarity index 52% rename from components/hal/esp32c5/include/hal/ecc_ll.h rename to components/esp_hal_security/esp32c5/include/hal/ecc_ll.h index 54c7b8bc2d..b5a5bca2e2 100644 --- a/components/hal/esp32c5/include/hal/ecc_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/ecc_ll.h @@ -78,73 +78,73 @@ static inline void ecc_ll_clear_interrupt(void) static inline void ecc_ll_set_mode(ecc_mode_t mode) { - switch(mode) { - case ECC_MODE_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); - break; - case ECC_MODE_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); - break; - case ECC_MODE_VERIFY_THEN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); - break; - case ECC_MODE_JACOBIAN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); - break; - case ECC_MODE_POINT_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); - break; - case ECC_MODE_JACOBIAN_POINT_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); - break; - case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); - break; - case ECC_MODE_MOD_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); - break; - case ECC_MODE_MOD_SUB: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); - break; - case ECC_MODE_MOD_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); - break; - case ECC_MODE_INVERSE_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + switch (mode) { + case ECC_MODE_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); + break; + case ECC_MODE_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); + break; + case ECC_MODE_VERIFY_THEN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); + break; + case ECC_MODE_JACOBIAN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); + break; + case ECC_MODE_POINT_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); + break; + case ECC_MODE_JACOBIAN_POINT_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); + break; + case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); + break; + case ECC_MODE_MOD_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); + break; + case ECC_MODE_MOD_SUB: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); + break; + case ECC_MODE_MOD_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); + break; + case ECC_MODE_INVERSE_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } static inline void ecc_ll_set_curve(ecc_curve_t curve) { - switch(curve) { - case ECC_CURVE_SECP192R1: - case ECC_CURVE_SECP256R1: - case ECC_CURVE_SECP384R1: - case ECC_CURVE_SM2: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH, curve); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (curve) { + case ECC_CURVE_SECP192R1: + case ECC_CURVE_SECP256R1: + case ECC_CURVE_SECP384R1: + case ECC_CURVE_SM2: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH, curve); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } static inline void ecc_ll_set_mod_base(ecc_mod_base_t base) { - switch(base) { - case ECC_MOD_N: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - case ECC_MOD_P: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (base) { + case ECC_MOD_N: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + case ECC_MOD_P: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -167,27 +167,27 @@ static inline void ecc_ll_write_param(ecc_ll_param_t param, const uint8_t *buf, uint32_t reg; uint32_t word; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -230,27 +230,27 @@ static inline void ecc_ll_read_param(ecc_ll_param_t param, uint8_t *buf, uint16_ { uint32_t reg; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32c5/include/hal/ecdsa_ll.h b/components/esp_hal_security/esp32c5/include/hal/ecdsa_ll.h similarity index 51% rename from components/hal/esp32c5/include/hal/ecdsa_ll.h rename to components/esp_hal_security/esp32c5/include/hal/ecdsa_ll.h index 1f2ce8189c..57466e861f 100644 --- a/components/hal/esp32c5/include/hal/ecdsa_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/ecdsa_ll.h @@ -112,15 +112,15 @@ static inline void ecdsa_ll_reset_register(void) static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_CALC_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -132,15 +132,15 @@ static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_CALC_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -152,15 +152,15 @@ static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_CLR, 1); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_CALC_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_CLR, 1); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -172,18 +172,18 @@ static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) { switch (mode) { - case ECDSA_MODE_SIGN_VERIFY: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); - break; - case ECDSA_MODE_SIGN_GEN: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); - break; - case ECDSA_MODE_EXPORT_PUBKEY: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 2); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + case ECDSA_MODE_SIGN_VERIFY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); + break; + case ECDSA_MODE_SIGN_GEN: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); + break; + case ECDSA_MODE_EXPORT_PUBKEY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } @@ -195,15 +195,15 @@ static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) { switch (curve) { - case ECDSA_CURVE_SECP192R1: - case ECDSA_CURVE_SECP256R1: - case ECDSA_CURVE_SECP384R1: - case ECDSA_CURVE_SM2: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_ECC_CURVE, curve); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + case ECDSA_CURVE_SECP192R1: + case ECDSA_CURVE_SECP256R1: + case ECDSA_CURVE_SECP384R1: + case ECDSA_CURVE_SM2: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_ECC_CURVE, curve); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -215,15 +215,15 @@ static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) { switch (mode) { - case ECDSA_Z_USE_SHA_PERI: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); - break; - case ECDSA_Z_USER_PROVIDED: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - break; + case ECDSA_Z_USE_SHA_PERI: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + case ECDSA_Z_USER_PROVIDED: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + break; } } @@ -235,17 +235,17 @@ static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) static inline void ecdsa_ll_set_k_type(ecdsa_sign_type_t type) { switch (type) { - case ECDSA_K_TYPE_TRNG: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); - break; + case ECDSA_K_TYPE_TRNG: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; #ifdef SOC_ECDSA_SUPPORT_DETERMINISTIC_MODE - case ECDSA_K_TYPE_DETERMINISITIC: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); - break; + case ECDSA_K_TYPE_DETERMINISITIC: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; #endif - default: - HAL_ASSERT(false && "Unsupported K type"); - break; + default: + HAL_ASSERT(false && "Unsupported K type"); + break; } } @@ -257,18 +257,18 @@ static inline void ecdsa_ll_set_k_type(ecdsa_sign_type_t type) static inline void ecdsa_ll_set_stage(ecdsa_ll_stage_t stage) { switch (stage) { - case ECDSA_STAGE_START_CALC: - REG_SET_BIT(ECDSA_START_REG, ECDSA_START); - break; - case ECDSA_STAGE_LOAD_DONE: - REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); - break; - case ECDSA_STAGE_GET_DONE: - REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); - break; - default: - HAL_ASSERT(false && "Unsupported state"); - break; + case ECDSA_STAGE_START_CALC: + REG_SET_BIT(ECDSA_START_REG, ECDSA_START); + break; + case ECDSA_STAGE_LOAD_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); + break; + case ECDSA_STAGE_GET_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); + break; + default: + HAL_ASSERT(false && "Unsupported state"); + break; } } @@ -280,15 +280,15 @@ static inline void ecdsa_ll_set_stage(ecdsa_ll_stage_t stage) static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) { switch (type) { - case ECDSA_SHA_224: - REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); - break; - case ECDSA_SHA_256: - REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); - break; - default: - HAL_ASSERT(false && "Unsupported type"); - break; + case ECDSA_SHA_224: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); + break; + case ECDSA_SHA_256: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; } } @@ -300,15 +300,15 @@ static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) static inline void ecdsa_ll_sha_set_mode(ecdsa_ll_sha_mode_t mode) { switch (mode) { - case ECDSA_MODE_SHA_START: - REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); - break; - case ECDSA_MODE_SHA_CONTINUE: - REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); - break; - default: - HAL_ASSERT(false && "Unsupported type"); - break; + case ECDSA_MODE_SHA_START: + REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); + break; + case ECDSA_MODE_SHA_CONTINUE: + REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; } } @@ -335,24 +335,24 @@ static inline void ecdsa_ll_write_param(ecdsa_ll_param_t param, const uint8_t *b uint32_t reg; uint32_t word; switch (param) { - case ECDSA_PARAM_R: - reg = ECDSA_R_MEM; - break; - case ECDSA_PARAM_S: - reg = ECDSA_S_MEM; - break; - case ECDSA_PARAM_Z: - reg = ECDSA_Z_MEM; - break; - case ECDSA_PARAM_QAX: - reg = ECDSA_QAX_MEM; - break; - case ECDSA_PARAM_QAY: - reg = ECDSA_QAY_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -372,24 +372,24 @@ static inline void ecdsa_ll_read_param(ecdsa_ll_param_t param, uint8_t *buf, uin { uint32_t reg; switch (param) { - case ECDSA_PARAM_R: - reg = ECDSA_R_MEM; - break; - case ECDSA_PARAM_S: - reg = ECDSA_S_MEM; - break; - case ECDSA_PARAM_Z: - reg = ECDSA_Z_MEM; - break; - case ECDSA_PARAM_QAX: - reg = ECDSA_QAX_MEM; - break; - case ECDSA_PARAM_QAY: - reg = ECDSA_QAY_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); @@ -426,22 +426,22 @@ __attribute__((always_inline)) static inline void ecdsa_ll_set_ecdsa_key_blk(ecd uint8_t efuse_blk_high = 0; switch (curve) { - case ECDSA_CURVE_SECP192R1: - EFUSE.ecdsa.cfg_ecdsa_p192_blk = efuse_blk; - break; - case ECDSA_CURVE_SECP256R1: - EFUSE.ecdsa.cfg_ecdsa_p256_blk = efuse_blk; - break; - case ECDSA_CURVE_SECP384R1: - // ECDSA-p384 uses two efuse blocks to store the key. These two blocks are stored in a single integer - // where the least significant 4 bits store the low key block number and the next 4 more significant bits store the high key block number. - HAL_ECDSA_EXTRACT_KEY_BLOCKS(efuse_blk, efuse_blk_high, efuse_blk_low); - EFUSE.ecdsa.cfg_ecdsa_p384_h_blk = efuse_blk_high; - EFUSE.ecdsa.cfg_ecdsa_p384_l_blk = efuse_blk_low; - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - break; + case ECDSA_CURVE_SECP192R1: + EFUSE.ecdsa.cfg_ecdsa_p192_blk = efuse_blk; + break; + case ECDSA_CURVE_SECP256R1: + EFUSE.ecdsa.cfg_ecdsa_p256_blk = efuse_blk; + break; + case ECDSA_CURVE_SECP384R1: + // ECDSA-p384 uses two efuse blocks to store the key. These two blocks are stored in a single integer + // where the least significant 4 bits store the low key block number and the next 4 more significant bits store the high key block number. + HAL_ECDSA_EXTRACT_KEY_BLOCKS(efuse_blk, efuse_blk_high, efuse_blk_low); + EFUSE.ecdsa.cfg_ecdsa_p384_h_blk = efuse_blk_high; + EFUSE.ecdsa.cfg_ecdsa_p384_l_blk = efuse_blk_low; + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + break; } } @@ -454,7 +454,6 @@ static inline bool ecdsa_ll_is_supported(void) return true; } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32c5/include/hal/hmac_ll.h b/components/esp_hal_security/esp32c5/include/hal/hmac_ll.h similarity index 99% rename from components/hal/esp32c5/include/hal/hmac_ll.h rename to components/esp_hal_security/esp32c5/include/hal/hmac_ll.h index 0dc902f945..c96bb609e2 100644 --- a/components/hal/esp32c5/include/hal/hmac_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/hmac_ll.h @@ -67,7 +67,7 @@ static inline void hmac_ll_start(void) */ static inline void hmac_ll_config_output(hmac_hal_output_t config) { - switch(config) { + switch (config) { case HMAC_OUTPUT_USER: REG_WRITE(HMAC_SET_PARA_PURPOSE_REG, EFUSE_KEY_PURPOSE_HMAC_UP); break; @@ -124,7 +124,7 @@ static inline void hmac_ll_wait_idle(void) uint32_t query; do { query = REG_READ(HMAC_QUERY_BUSY_REG); - } while(query != 0); + } while (query != 0); } /** diff --git a/components/hal/esp32c5/include/hal/huk_ll.h b/components/esp_hal_security/esp32c5/include/hal/huk_ll.h similarity index 78% rename from components/hal/esp32c5/include/hal/huk_ll.h rename to components/esp_hal_security/esp32c5/include/hal/huk_ll.h index d66eed2e41..8444e04e6f 100644 --- a/components/hal/esp32c5/include/hal/huk_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/huk_ll.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -68,30 +68,36 @@ static inline void huk_ll_continue(void) /* @bried Enable or Disable the HUK interrupts */ static inline void huk_ll_configure_interrupt(const esp_huk_interrupt_type_t intr, const bool en) { - switch(intr) { - case ESP_HUK_INT_PREP_DONE: - REG_SET_FIELD(HUK_INT_ENA_REG, HUK_PREP_DONE_INT_ENA, en); - case ESP_HUK_INT_PROC_DONE: - REG_SET_FIELD(HUK_INT_ENA_REG, HUK_PROC_DONE_INT_ENA, en); - case ESP_HUK_INT_POST_DONE: - REG_SET_FIELD(HUK_INT_ENA_REG, HUK_POST_DONE_INT_ENA, en); - default: - return; + switch (intr) { + case ESP_HUK_INT_PREP_DONE: + REG_SET_FIELD(HUK_INT_ENA_REG, HUK_PREP_DONE_INT_ENA, en); + break; + case ESP_HUK_INT_PROC_DONE: + REG_SET_FIELD(HUK_INT_ENA_REG, HUK_PROC_DONE_INT_ENA, en); + break; + case ESP_HUK_INT_POST_DONE: + REG_SET_FIELD(HUK_INT_ENA_REG, HUK_POST_DONE_INT_ENA, en); + break; + default: + return; } } /* @bried Clear the HUK interrupts */ static inline void huk_ll_clear_int(const esp_huk_interrupt_type_t intr) { - switch(intr) { - case ESP_HUK_INT_PREP_DONE: - REG_SET_FIELD(HUK_INT_CLR_REG, HUK_PREP_DONE_INT_CLR, 1); - case ESP_HUK_INT_PROC_DONE: - REG_SET_FIELD(HUK_INT_CLR_REG, HUK_PROC_DONE_INT_CLR, 1); - case ESP_HUK_INT_POST_DONE: - REG_SET_FIELD(HUK_INT_CLR_REG, HUK_POST_DONE_INT_CLR, 1); - default: - return; + switch (intr) { + case ESP_HUK_INT_PREP_DONE: + REG_SET_FIELD(HUK_INT_CLR_REG, HUK_PREP_DONE_INT_CLR, 1); + break; + case ESP_HUK_INT_PROC_DONE: + REG_SET_FIELD(HUK_INT_CLR_REG, HUK_PROC_DONE_INT_CLR, 1); + break; + case ESP_HUK_INT_POST_DONE: + REG_SET_FIELD(HUK_INT_CLR_REG, HUK_POST_DONE_INT_CLR, 1); + break; + default: + return; } } @@ -113,7 +119,6 @@ static inline esp_huk_gen_status_t huk_ll_get_gen_status(void) return (esp_huk_gen_status_t) REG_GET_FIELD(HUK_STATUS_REG, HUK_STATUS); } - static inline void __attribute__((always_inline)) huk_ll_recharge_huk_memory(void) { REG_CLR_BIT(LP_AON_MEM_CTRL_REG, LP_AON_HUK_MEM_FORCE_PD); diff --git a/components/hal/esp32c5/include/hal/key_mgr_ll.h b/components/esp_hal_security/esp32c5/include/hal/key_mgr_ll.h similarity index 62% rename from components/hal/esp32c5/include/hal/key_mgr_ll.h rename to components/esp_hal_security/esp32c5/include/hal/key_mgr_ll.h index 5b08f6c6e6..26352914bc 100644 --- a/components/hal/esp32c5/include/hal/key_mgr_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/key_mgr_ll.h @@ -115,36 +115,36 @@ static inline void key_mgr_ll_continue(void) /* @brief Enable or Disable the KEY_MGR interrupts */ static inline void key_mgr_ll_configure_interrupt(const esp_key_mgr_interrupt_type_t intr, bool en) { - switch(intr) { - case ESP_KEY_MGR_INT_PREP_DONE: - REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_PREP_DONE_INT_ENA, en); - break; - case ESP_KEY_MGR_INT_PROC_DONE: - REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_PROC_DONE_INT_ENA, en); - break; - case ESP_KEY_MGR_INT_POST_DONE: - REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_POST_DONE_INT_ENA, en); - break; - default: - return; + switch (intr) { + case ESP_KEY_MGR_INT_PREP_DONE: + REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_PREP_DONE_INT_ENA, en); + break; + case ESP_KEY_MGR_INT_PROC_DONE: + REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_PROC_DONE_INT_ENA, en); + break; + case ESP_KEY_MGR_INT_POST_DONE: + REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_POST_DONE_INT_ENA, en); + break; + default: + return; } } /* @brief Clear the KEY_MGR interrupts */ static inline void key_mgr_ll_clear_int(const esp_key_mgr_interrupt_type_t intr) { - switch(intr) { - case ESP_KEY_MGR_INT_PREP_DONE: - REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_PREP_DONE_INT_CLR, 1); - break; - case ESP_KEY_MGR_INT_PROC_DONE: - REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_PROC_DONE_INT_CLR, 1); - break; - case ESP_KEY_MGR_INT_POST_DONE: - REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_POST_DONE_INT_CLR, 1); - break; - default: - return; + switch (intr) { + case ESP_KEY_MGR_INT_PREP_DONE: + REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_PREP_DONE_INT_CLR, 1); + break; + case ESP_KEY_MGR_INT_PROC_DONE: + REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_PROC_DONE_INT_CLR, 1); + break; + case ESP_KEY_MGR_INT_POST_DONE: + REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_POST_DONE_INT_CLR, 1); + break; + default: + return; } } @@ -163,72 +163,72 @@ static inline void key_mgr_ll_use_sw_init_key(void) static inline void key_mgr_ll_set_key_usage(const esp_key_mgr_key_type_t key_type, const esp_key_mgr_key_usage_t key_usage) { switch (key_type) { - case ESP_KEY_MGR_ECDSA_KEY: - if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { - REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA); - } else { - REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA); - } - break; + case ESP_KEY_MGR_ECDSA_KEY: + if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { + REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA); + } else { + REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA); + } + break; - case ESP_KEY_MGR_FLASH_XTS_AES_KEY: - if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { - REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH); - } else { - REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH); - } - break; + case ESP_KEY_MGR_FLASH_XTS_AES_KEY: + if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { + REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH); + } else { + REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH); + } + break; - case ESP_KEY_MGR_HMAC_KEY: - if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { - REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC); - } else { - REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC); - } - break; + case ESP_KEY_MGR_HMAC_KEY: + if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { + REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC); + } else { + REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC); + } + break; - case ESP_KEY_MGR_DS_KEY: - if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { - REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS); - } else { - REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS); - } - break; + case ESP_KEY_MGR_DS_KEY: + if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { + REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS); + } else { + REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS); + } + break; - case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: - if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { - REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM); - } else { - REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM); - } - break; - default: - HAL_ASSERT(false && "Unsupported key type"); - return; + case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: + if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { + REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM); + } else { + REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM); + } + break; + default: + HAL_ASSERT(false && "Unsupported key type"); + return; } } static inline esp_key_mgr_key_usage_t key_mgr_ll_get_key_usage(esp_key_mgr_key_type_t key_type) { switch (key_type) { - case ESP_KEY_MGR_ECDSA_KEY: - return (esp_key_mgr_key_usage_t) (REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA)); + case ESP_KEY_MGR_ECDSA_KEY: + return (esp_key_mgr_key_usage_t)(REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA)); - case ESP_KEY_MGR_FLASH_XTS_AES_KEY: - return (esp_key_mgr_key_usage_t) (REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH)); + case ESP_KEY_MGR_FLASH_XTS_AES_KEY: + return (esp_key_mgr_key_usage_t)(REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH)); - case ESP_KEY_MGR_HMAC_KEY: - return (esp_key_mgr_key_usage_t) (REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC)); + case ESP_KEY_MGR_HMAC_KEY: + return (esp_key_mgr_key_usage_t)(REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC)); - case ESP_KEY_MGR_DS_KEY: - return (esp_key_mgr_key_usage_t) (REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS)); + case ESP_KEY_MGR_DS_KEY: + return (esp_key_mgr_key_usage_t)(REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS)); - case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: - return (esp_key_mgr_key_usage_t) (REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM)); + case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: + return (esp_key_mgr_key_usage_t)(REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM)); - default: - HAL_ASSERT(false && "Unsupported key type"); - return ESP_KEY_MGR_USAGE_INVALID; + default: + HAL_ASSERT(false && "Unsupported key type"); + return ESP_KEY_MGR_USAGE_INVALID; } } @@ -249,30 +249,30 @@ static inline void key_mgr_ll_lock_use_sw_init_key_reg(void) */ static inline void key_mgr_ll_lock_use_efuse_key_reg(esp_key_mgr_key_type_t key_type) { - switch(key_type) { - case ESP_KEY_MGR_ECDSA_KEY: - REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_ECDSA); - break; + switch (key_type) { + case ESP_KEY_MGR_ECDSA_KEY: + REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_ECDSA); + break; - case ESP_KEY_MGR_FLASH_XTS_AES_KEY: - REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_FLASH); - break; + case ESP_KEY_MGR_FLASH_XTS_AES_KEY: + REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_FLASH); + break; - case ESP_KEY_MGR_HMAC_KEY: - REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_HMAC); - break; + case ESP_KEY_MGR_HMAC_KEY: + REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_HMAC); + break; - case ESP_KEY_MGR_DS_KEY: - REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_DS); - break; + case ESP_KEY_MGR_DS_KEY: + REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_DS); + break; - case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: - REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_PSRAM); - break; + case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: + REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_PSRAM); + break; - default: - HAL_ASSERT(false && "Unsupported key type"); - return; + default: + HAL_ASSERT(false && "Unsupported key type"); + return; } } @@ -308,47 +308,47 @@ static inline bool key_mgr_ll_is_result_success(void) static inline bool key_mgr_ll_is_key_deployment_valid(const esp_key_mgr_key_type_t key_type, const esp_key_mgr_key_len_t key_len) { switch (key_type) { - case ESP_KEY_MGR_ECDSA_KEY: - switch (key_len) { - case ESP_KEY_MGR_ECDSA_LEN_192: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_192_VLD); - case ESP_KEY_MGR_ECDSA_LEN_256: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_256_VLD); - case ESP_KEY_MGR_ECDSA_LEN_384: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_384_VLD); - default: - HAL_ASSERT(false && "Unsupported key type"); - return 0; - } - case ESP_KEY_MGR_FLASH_XTS_AES_KEY: - switch (key_len) { - case ESP_KEY_MGR_XTS_AES_LEN_128: - case ESP_KEY_MGR_XTS_AES_LEN_256: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_FLASH_VLD); - default: - HAL_ASSERT(false && "Unsupported key type"); - return 0; - } - - case ESP_KEY_MGR_HMAC_KEY: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_HMAC_VLD); - - case ESP_KEY_MGR_DS_KEY: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_DS_VLD); - - case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: - switch (key_len) { - case ESP_KEY_MGR_XTS_AES_LEN_128: - case ESP_KEY_MGR_XTS_AES_LEN_256: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_PSRAM_VLD); - default: - HAL_ASSERT(false && "Unsupported key type"); - return 0; - } - + case ESP_KEY_MGR_ECDSA_KEY: + switch (key_len) { + case ESP_KEY_MGR_ECDSA_LEN_192: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_192_VLD); + case ESP_KEY_MGR_ECDSA_LEN_256: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_256_VLD); + case ESP_KEY_MGR_ECDSA_LEN_384: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_384_VLD); default: - HAL_ASSERT(false && "Unsupported mode"); + HAL_ASSERT(false && "Unsupported key type"); return 0; + } + case ESP_KEY_MGR_FLASH_XTS_AES_KEY: + switch (key_len) { + case ESP_KEY_MGR_XTS_AES_LEN_128: + case ESP_KEY_MGR_XTS_AES_LEN_256: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_FLASH_VLD); + default: + HAL_ASSERT(false && "Unsupported key type"); + return 0; + } + + case ESP_KEY_MGR_HMAC_KEY: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_HMAC_VLD); + + case ESP_KEY_MGR_DS_KEY: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_DS_VLD); + + case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: + switch (key_len) { + case ESP_KEY_MGR_XTS_AES_LEN_128: + case ESP_KEY_MGR_XTS_AES_LEN_256: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_PSRAM_VLD); + default: + HAL_ASSERT(false && "Unsupported key type"); + return 0; + } + + default: + HAL_ASSERT(false && "Unsupported mode"); + return 0; } } @@ -382,7 +382,7 @@ static inline void key_mgr_ll_write_assist_info(const uint8_t *assist_info_buf, * @input * assist_info_buf Assist info buffer, this should be a writable buffer of size KEY_MGR_ASSIST_INFO_LEN. The buffer must be 32 bit aligned */ -static inline void key_mgr_ll_read_assist_info( uint8_t *assist_info_buf) +static inline void key_mgr_ll_read_assist_info(uint8_t *assist_info_buf) { memcpy(assist_info_buf, (uint8_t *)KEYMNG_ASSIST_INFO_MEM, KEY_MGR_ASSIST_INFO_LEN); } @@ -429,15 +429,15 @@ static inline void key_mgr_ll_set_xts_aes_key_len(const esp_key_mgr_key_type_t k } switch (key_len) { - case ESP_KEY_MGR_XTS_AES_LEN_128: - REG_CLR_BIT(KEYMNG_STATIC_REG, key_len_bit_mask); - break; - case ESP_KEY_MGR_XTS_AES_LEN_256: - REG_SET_BIT(KEYMNG_STATIC_REG, key_len_bit_mask); - break; - default: - HAL_ASSERT(false && "Unsupported key length"); - return; + case ESP_KEY_MGR_XTS_AES_LEN_128: + REG_CLR_BIT(KEYMNG_STATIC_REG, key_len_bit_mask); + break; + case ESP_KEY_MGR_XTS_AES_LEN_256: + REG_SET_BIT(KEYMNG_STATIC_REG, key_len_bit_mask); + break; + default: + HAL_ASSERT(false && "Unsupported key length"); + return; } } @@ -456,13 +456,13 @@ static inline esp_key_mgr_key_len_t key_mgr_ll_get_xts_aes_key_len(const esp_key } switch (key_len_bit) { - case 0: - return ESP_KEY_MGR_XTS_AES_LEN_128; - case 1: - return ESP_KEY_MGR_XTS_AES_LEN_256; - default: - HAL_ASSERT(false && "Unsupported key length"); - return (esp_key_mgr_key_len_t) key_len_bit; + case 0: + return ESP_KEY_MGR_XTS_AES_LEN_128; + case 1: + return ESP_KEY_MGR_XTS_AES_LEN_256; + default: + HAL_ASSERT(false && "Unsupported key length"); + return (esp_key_mgr_key_len_t) key_len_bit; } } diff --git a/components/hal/esp32c5/include/hal/mpi_ll.h b/components/esp_hal_security/esp32c5/include/hal/mpi_ll.h similarity index 99% rename from components/hal/esp32c5/include/hal/mpi_ll.h rename to components/esp_hal_security/esp32c5/include/hal/mpi_ll.h index c04ed6e6f5..b329402fd6 100644 --- a/components/hal/esp32c5/include/hal/mpi_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/mpi_ll.h @@ -20,7 +20,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for MPI peripheral module * diff --git a/components/hal/esp32c5/include/hal/sha_ll.h b/components/esp_hal_security/esp32c5/include/hal/sha_ll.h similarity index 99% rename from components/hal/esp32c5/include/hal/sha_ll.h rename to components/esp_hal_security/esp32c5/include/hal/sha_ll.h index e1cb5f503c..28c66a0bcc 100644 --- a/components/hal/esp32c5/include/hal/sha_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/sha_ll.h @@ -14,7 +14,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for SHA peripheral module * diff --git a/components/hal/esp32c6/include/hal/aes_ll.h b/components/esp_hal_security/esp32c6/include/hal/aes_ll.h similarity index 97% rename from components/hal/esp32c6/include/hal/aes_ll.h rename to components/esp_hal_security/esp32c6/include/hal/aes_ll.h index 76fd96c93b..826fb36332 100644 --- a/components/hal/esp32c6/include/hal/aes_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/aes_ll.h @@ -113,7 +113,7 @@ static inline void aes_ll_read_block(void *output) for (size_t i = 0; i < AES_BLOCK_WORDS; i++) { output_word = REG_READ(AES_TEXT_OUT_0_REG + (i * REG_WIDTH)); /* Memcpy to avoid potential unaligned access */ - memcpy( (uint8_t*)output + i * 4, &output_word, sizeof(output_word)); + memcpy((uint8_t*)output + i * 4, &output_word, sizeof(output_word)); } } @@ -126,7 +126,6 @@ static inline void aes_ll_start_transform(void) REG_WRITE(AES_TRIGGER_REG, 1); } - /** * @brief Read state of AES accelerator * @@ -137,7 +136,6 @@ static inline esp_aes_state_t aes_ll_get_state(void) return (esp_aes_state_t)REG_READ(AES_STATE_REG); } - /** * @brief Set mode of operation * @@ -190,7 +188,7 @@ static inline void aes_ll_set_iv(const uint8_t *iv) uint32_t *reg_addr_buf = (uint32_t *)(AES_IV_MEM); uint32_t iv_word; - for (int i = 0; i < IV_WORDS; i++ ) { + for (int i = 0; i < IV_WORDS; i++) { /* Memcpy to avoid potential unaligned access */ memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); REG_WRITE(®_addr_buf[i], iv_word); @@ -241,7 +239,6 @@ static inline void aes_ll_interrupt_clear(void) REG_WRITE(AES_INT_CLEAR_REG, 1); } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32c6/include/hal/apm_ll.h b/components/esp_hal_security/esp32c6/include/hal/apm_ll.h similarity index 100% rename from components/hal/esp32c6/include/hal/apm_ll.h rename to components/esp_hal_security/esp32c6/include/hal/apm_ll.h diff --git a/components/hal/esp32h2/include/hal/ds_ll.h b/components/esp_hal_security/esp32c6/include/hal/ds_ll.h similarity index 89% rename from components/hal/esp32h2/include/hal/ds_ll.h rename to components/esp_hal_security/esp32c6/include/hal/ds_ll.h index c679fcef2c..ed9f940aa0 100644 --- a/components/hal/esp32h2/include/hal/ds_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/ds_ll.h @@ -83,7 +83,7 @@ static inline ds_key_check_t ds_ll_key_error_source(void) static inline void ds_ll_configure_iv(const uint32_t *iv) { for (size_t i = 0; i < (SOC_DS_KEY_PARAM_MD_IV_LENGTH / sizeof(uint32_t)); i++) { - REG_WRITE(DS_IV_MEM + (i * 4) , iv[i]); + REG_WRITE(DS_IV_MEM + (i * 4), iv[i]); } } @@ -97,7 +97,7 @@ static inline void ds_ll_write_message(const uint8_t *msg, size_t size) { memcpy((uint8_t*) DS_X_MEM, msg, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** @@ -111,20 +111,23 @@ static inline void ds_ll_write_private_key_params(const uint8_t *encrypted_key_p (note if ETS_DS_MAX_BITS == 4096, this should be the same as copying data->c to hardware in one fragment) */ - typedef struct { uint32_t addr; size_t len; } frag_t; + typedef struct { + uint32_t addr; + size_t len; + } frag_t; const frag_t frags[] = { - {DS_Y_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_M_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_RB_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_BOX_MEM, DS_IV_MEM - DS_BOX_MEM}, + {DS_Y_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_M_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_RB_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_BOX_MEM, DS_IV_MEM - DS_BOX_MEM}, }; - const size_t NUM_FRAGS = sizeof(frags)/sizeof(frag_t); + const size_t NUM_FRAGS = sizeof(frags) / sizeof(frag_t); const uint8_t *from = encrypted_key_params; for (int i = 0; i < NUM_FRAGS; i++) { memcpy((uint8_t *)frags[i].addr, from, frags[i].len); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); from += frags[i].len; } } @@ -150,7 +153,7 @@ static inline void ds_ll_start_sign(void) static inline ds_signature_check_t ds_ll_check_signature(void) { uint32_t result = REG_READ(DS_QUERY_CHECK_REG); - switch(result) { + switch (result) { case 0: return DS_SIGNATURE_OK; case 1: @@ -172,7 +175,7 @@ static inline void ds_ll_read_result(uint8_t *result, size_t size) { memcpy(result, (uint8_t*) DS_Z_MEM, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** diff --git a/components/hal/esp32c6/include/hal/ecc_ll.h b/components/esp_hal_security/esp32c6/include/hal/ecc_ll.h similarity index 66% rename from components/hal/esp32c6/include/hal/ecc_ll.h rename to components/esp_hal_security/esp32c6/include/hal/ecc_ll.h index d144dbff29..264e89958a 100644 --- a/components/hal/esp32c6/include/hal/ecc_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/ecc_ll.h @@ -71,34 +71,34 @@ static inline void ecc_ll_clear_interrupt(void) static inline void ecc_ll_set_mode(ecc_mode_t mode) { - switch(mode) { - case ECC_MODE_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); - break; - case ECC_MODE_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); - break; - case ECC_MODE_VERIFY_THEN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + switch (mode) { + case ECC_MODE_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); + break; + case ECC_MODE_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); + break; + case ECC_MODE_VERIFY_THEN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } static inline void ecc_ll_set_curve(ecc_curve_t curve) { - switch(curve) { - case ECC_CURVE_SECP256R1: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); - break; - case ECC_CURVE_SECP192R1: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (curve) { + case ECC_CURVE_SECP256R1: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); + break; + case ECC_CURVE_SECP192R1: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -107,18 +107,18 @@ static inline void ecc_ll_write_param(ecc_ll_param_t param, const uint8_t *buf, uint32_t reg; uint32_t word; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -156,18 +156,18 @@ static inline void ecc_ll_read_param(ecc_ll_param_t param, uint8_t *buf, uint16_ { uint32_t reg; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32c6/include/hal/hmac_ll.h b/components/esp_hal_security/esp32c6/include/hal/hmac_ll.h similarity index 99% rename from components/hal/esp32c6/include/hal/hmac_ll.h rename to components/esp_hal_security/esp32c6/include/hal/hmac_ll.h index 1b690a0c6f..75b90ad736 100644 --- a/components/hal/esp32c6/include/hal/hmac_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/hmac_ll.h @@ -67,7 +67,7 @@ static inline void hmac_ll_start(void) */ static inline void hmac_ll_config_output(hmac_hal_output_t config) { - switch(config) { + switch (config) { case HMAC_OUTPUT_USER: REG_WRITE(HMAC_SET_PARA_PURPOSE_REG, EFUSE_KEY_PURPOSE_HMAC_UP); break; @@ -124,7 +124,7 @@ static inline void hmac_ll_wait_idle(void) uint32_t query; do { query = REG_READ(HMAC_QUERY_BUSY_REG); - } while(query != 0); + } while (query != 0); } /** diff --git a/components/hal/esp32c6/include/hal/mpi_ll.h b/components/esp_hal_security/esp32c6/include/hal/mpi_ll.h similarity index 99% rename from components/hal/esp32c6/include/hal/mpi_ll.h rename to components/esp_hal_security/esp32c6/include/hal/mpi_ll.h index 84bf411dfa..04b4d55a17 100644 --- a/components/hal/esp32c6/include/hal/mpi_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/mpi_ll.h @@ -19,7 +19,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for MPI peripheral module * diff --git a/components/hal/esp32c6/include/hal/sha_ll.h b/components/esp_hal_security/esp32c6/include/hal/sha_ll.h similarity index 99% rename from components/hal/esp32c6/include/hal/sha_ll.h rename to components/esp_hal_security/esp32c6/include/hal/sha_ll.h index 7108e2d608..1c727408d4 100644 --- a/components/hal/esp32c6/include/hal/sha_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/sha_ll.h @@ -170,7 +170,6 @@ static inline void sha_ll_write_digest(esp_sha_type sha_type, void *digest_state } } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32c61/include/hal/apm_ll.h b/components/esp_hal_security/esp32c61/include/hal/apm_ll.h similarity index 100% rename from components/hal/esp32c61/include/hal/apm_ll.h rename to components/esp_hal_security/esp32c61/include/hal/apm_ll.h diff --git a/components/hal/esp32c61/include/hal/ecc_ll.h b/components/esp_hal_security/esp32c61/include/hal/ecc_ll.h similarity index 51% rename from components/hal/esp32c61/include/hal/ecc_ll.h rename to components/esp_hal_security/esp32c61/include/hal/ecc_ll.h index 9e56f188b8..14c74e5316 100644 --- a/components/hal/esp32c61/include/hal/ecc_ll.h +++ b/components/esp_hal_security/esp32c61/include/hal/ecc_ll.h @@ -78,73 +78,73 @@ static inline void ecc_ll_clear_interrupt(void) static inline void ecc_ll_set_mode(ecc_mode_t mode) { - switch(mode) { - case ECC_MODE_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); - break; - case ECC_MODE_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); - break; - case ECC_MODE_VERIFY_THEN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); - break; - case ECC_MODE_JACOBIAN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); - break; - case ECC_MODE_POINT_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); - break; - case ECC_MODE_JACOBIAN_POINT_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); - break; - case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); - break; - case ECC_MODE_MOD_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); - break; - case ECC_MODE_MOD_SUB: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); - break; - case ECC_MODE_MOD_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); - break; - case ECC_MODE_INVERSE_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + switch (mode) { + case ECC_MODE_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); + break; + case ECC_MODE_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); + break; + case ECC_MODE_VERIFY_THEN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); + break; + case ECC_MODE_JACOBIAN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); + break; + case ECC_MODE_POINT_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); + break; + case ECC_MODE_JACOBIAN_POINT_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); + break; + case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); + break; + case ECC_MODE_MOD_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); + break; + case ECC_MODE_MOD_SUB: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); + break; + case ECC_MODE_MOD_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); + break; + case ECC_MODE_INVERSE_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } static inline void ecc_ll_set_curve(ecc_curve_t curve) { - switch(curve) { - case ECC_CURVE_SECP256R1: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); - break; - case ECC_CURVE_SECP192R1: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (curve) { + case ECC_CURVE_SECP256R1: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); + break; + case ECC_CURVE_SECP192R1: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } static inline void ecc_ll_set_mod_base(ecc_mod_base_t base) { - switch(base) { - case ECC_MOD_N: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - case ECC_MOD_P: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (base) { + case ECC_MOD_N: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + case ECC_MOD_P: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -162,27 +162,27 @@ static inline void ecc_ll_write_param(ecc_ll_param_t param, const uint8_t *buf, uint32_t reg; uint32_t word; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -225,27 +225,27 @@ static inline void ecc_ll_read_param(ecc_ll_param_t param, uint8_t *buf, uint16_ { uint32_t reg; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32c61/include/hal/ecdsa_ll.h b/components/esp_hal_security/esp32c61/include/hal/ecdsa_ll.h similarity index 58% rename from components/hal/esp32c61/include/hal/ecdsa_ll.h rename to components/esp_hal_security/esp32c61/include/hal/ecdsa_ll.h index 5754c81904..3c63ad90f1 100644 --- a/components/hal/esp32c61/include/hal/ecdsa_ll.h +++ b/components/esp_hal_security/esp32c61/include/hal/ecdsa_ll.h @@ -112,15 +112,15 @@ static inline void ecdsa_ll_reset_register(void) static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_CALC_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -132,15 +132,15 @@ static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_CALC_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -152,15 +152,15 @@ static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_CLR, 1); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_CALC_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_CLR, 1); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -172,18 +172,18 @@ static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) { switch (mode) { - case ECDSA_MODE_SIGN_VERIFY: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); - break; - case ECDSA_MODE_SIGN_GEN: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); - break; - case ECDSA_MODE_EXPORT_PUBKEY: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 2); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + case ECDSA_MODE_SIGN_VERIFY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); + break; + case ECDSA_MODE_SIGN_GEN: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); + break; + case ECDSA_MODE_EXPORT_PUBKEY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } @@ -195,15 +195,15 @@ static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) { switch (curve) { - case ECDSA_CURVE_SECP256R1: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); - break; - case ECDSA_CURVE_SECP192R1: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + case ECDSA_CURVE_SECP256R1: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); + break; + case ECDSA_CURVE_SECP192R1: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -215,15 +215,15 @@ static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) { switch (mode) { - case ECDSA_Z_USE_SHA_PERI: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); - break; - case ECDSA_Z_USER_PROVIDED: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - break; + case ECDSA_Z_USE_SHA_PERI: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + case ECDSA_Z_USER_PROVIDED: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + break; } } @@ -235,15 +235,15 @@ static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) static inline void ecdsa_ll_set_k_type(ecdsa_sign_type_t type) { switch (type) { - case ECDSA_K_TYPE_TRNG: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); - break; - case ECDSA_K_TYPE_DETERMINISITIC: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); - break; - default: - HAL_ASSERT(false && "Unsupported K type"); - break; + case ECDSA_K_TYPE_TRNG: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; + case ECDSA_K_TYPE_DETERMINISITIC: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; + default: + HAL_ASSERT(false && "Unsupported K type"); + break; } } @@ -265,18 +265,18 @@ static inline void ecdsa_ll_set_deterministic_loop(uint16_t loop_number) static inline void ecdsa_ll_set_stage(ecdsa_ll_stage_t stage) { switch (stage) { - case ECDSA_STAGE_START_CALC: - REG_SET_BIT(ECDSA_START_REG, ECDSA_START); - break; - case ECDSA_STAGE_LOAD_DONE: - REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); - break; - case ECDSA_STAGE_GET_DONE: - REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); - break; - default: - HAL_ASSERT(false && "Unsupported state"); - break; + case ECDSA_STAGE_START_CALC: + REG_SET_BIT(ECDSA_START_REG, ECDSA_START); + break; + case ECDSA_STAGE_LOAD_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); + break; + case ECDSA_STAGE_GET_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); + break; + default: + HAL_ASSERT(false && "Unsupported state"); + break; } } @@ -288,15 +288,15 @@ static inline void ecdsa_ll_set_stage(ecdsa_ll_stage_t stage) static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) { switch (type) { - case ECDSA_SHA_224: - REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); - break; - case ECDSA_SHA_256: - REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); - break; - default: - HAL_ASSERT(false && "Unsupported type"); - break; + case ECDSA_SHA_224: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); + break; + case ECDSA_SHA_256: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; } } @@ -308,15 +308,15 @@ static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) static inline void ecdsa_ll_sha_set_mode(ecdsa_ll_sha_mode_t mode) { switch (mode) { - case ECDSA_MODE_SHA_START: - REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); - break; - case ECDSA_MODE_SHA_CONTINUE: - REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); - break; - default: - HAL_ASSERT(false && "Unsupported type"); - break; + case ECDSA_MODE_SHA_START: + REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); + break; + case ECDSA_MODE_SHA_CONTINUE: + REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; } } @@ -343,24 +343,24 @@ static inline void ecdsa_ll_write_param(ecdsa_ll_param_t param, const uint8_t *b uint32_t reg; uint32_t word; switch (param) { - case ECDSA_PARAM_R: - reg = ECDSA_R_MEM; - break; - case ECDSA_PARAM_S: - reg = ECDSA_S_MEM; - break; - case ECDSA_PARAM_Z: - reg = ECDSA_Z_MEM; - break; - case ECDSA_PARAM_QAX: - reg = ECDSA_QAX_MEM; - break; - case ECDSA_PARAM_QAY: - reg = ECDSA_QAY_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -380,24 +380,24 @@ static inline void ecdsa_ll_read_param(ecdsa_ll_param_t param, uint8_t *buf, uin { uint32_t reg; switch (param) { - case ECDSA_PARAM_R: - reg = ECDSA_R_MEM; - break; - case ECDSA_PARAM_S: - reg = ECDSA_S_MEM; - break; - case ECDSA_PARAM_Z: - reg = ECDSA_Z_MEM; - break; - case ECDSA_PARAM_QAX: - reg = ECDSA_QAX_MEM; - break; - case ECDSA_PARAM_QAY: - reg = ECDSA_QAY_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32c61/include/hal/sha_ll.h b/components/esp_hal_security/esp32c61/include/hal/sha_ll.h similarity index 99% rename from components/hal/esp32c61/include/hal/sha_ll.h rename to components/esp_hal_security/esp32c61/include/hal/sha_ll.h index 7f9b945b47..8ad73c1463 100644 --- a/components/hal/esp32c61/include/hal/sha_ll.h +++ b/components/esp_hal_security/esp32c61/include/hal/sha_ll.h @@ -14,7 +14,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for SHA peripheral module * @@ -172,7 +171,6 @@ static inline void sha_ll_write_digest(esp_sha_type sha_type, void *digest_state } } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32h2/include/hal/aes_ll.h b/components/esp_hal_security/esp32h2/include/hal/aes_ll.h similarity index 98% rename from components/hal/esp32h2/include/hal/aes_ll.h rename to components/esp_hal_security/esp32h2/include/hal/aes_ll.h index f7a54450e6..284d4a70b2 100644 --- a/components/hal/esp32h2/include/hal/aes_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/aes_ll.h @@ -116,7 +116,7 @@ static inline void aes_ll_read_block(void *output) for (size_t i = 0; i < AES_BLOCK_WORDS; i++) { output_word = REG_READ(AES_TEXT_OUT_0_REG + (i * REG_WIDTH)); /* Memcpy to avoid potential unaligned access */ - memcpy( (uint8_t*)output + i * 4, &output_word, sizeof(output_word)); + memcpy((uint8_t*)output + i * 4, &output_word, sizeof(output_word)); } } @@ -129,7 +129,6 @@ static inline void aes_ll_start_transform(void) REG_WRITE(AES_TRIGGER_REG, 1); } - /** * @brief Read state of AES accelerator * @@ -140,7 +139,6 @@ static inline esp_aes_state_t aes_ll_get_state(void) return (esp_aes_state_t)REG_READ(AES_STATE_REG); } - /** * @brief Set mode of operation * @@ -193,7 +191,7 @@ static inline void aes_ll_set_iv(const uint8_t *iv) uint32_t *reg_addr_buf = (uint32_t *)(AES_IV_MEM); uint32_t iv_word; - for (int i = 0; i < IV_WORDS; i++ ) { + for (int i = 0; i < IV_WORDS; i++) { /* Memcpy to avoid potential unaligned access */ memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); REG_WRITE(®_addr_buf[i], iv_word); diff --git a/components/hal/esp32h2/include/hal/apm_ll.h b/components/esp_hal_security/esp32h2/include/hal/apm_ll.h similarity index 100% rename from components/hal/esp32h2/include/hal/apm_ll.h rename to components/esp_hal_security/esp32h2/include/hal/apm_ll.h diff --git a/components/hal/esp32c6/include/hal/ds_ll.h b/components/esp_hal_security/esp32h2/include/hal/ds_ll.h similarity index 89% rename from components/hal/esp32c6/include/hal/ds_ll.h rename to components/esp_hal_security/esp32h2/include/hal/ds_ll.h index 2985f4004b..ed9f940aa0 100644 --- a/components/hal/esp32c6/include/hal/ds_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/ds_ll.h @@ -20,7 +20,6 @@ #include "soc/pcr_struct.h" #include "hal/ds_types.h" - #ifdef __cplusplus extern "C" { #endif @@ -84,7 +83,7 @@ static inline ds_key_check_t ds_ll_key_error_source(void) static inline void ds_ll_configure_iv(const uint32_t *iv) { for (size_t i = 0; i < (SOC_DS_KEY_PARAM_MD_IV_LENGTH / sizeof(uint32_t)); i++) { - REG_WRITE(DS_IV_MEM + (i * 4) , iv[i]); + REG_WRITE(DS_IV_MEM + (i * 4), iv[i]); } } @@ -98,7 +97,7 @@ static inline void ds_ll_write_message(const uint8_t *msg, size_t size) { memcpy((uint8_t*) DS_X_MEM, msg, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** @@ -112,20 +111,23 @@ static inline void ds_ll_write_private_key_params(const uint8_t *encrypted_key_p (note if ETS_DS_MAX_BITS == 4096, this should be the same as copying data->c to hardware in one fragment) */ - typedef struct { uint32_t addr; size_t len; } frag_t; + typedef struct { + uint32_t addr; + size_t len; + } frag_t; const frag_t frags[] = { - {DS_Y_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_M_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_RB_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_BOX_MEM, DS_IV_MEM - DS_BOX_MEM}, + {DS_Y_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_M_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_RB_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_BOX_MEM, DS_IV_MEM - DS_BOX_MEM}, }; - const size_t NUM_FRAGS = sizeof(frags)/sizeof(frag_t); + const size_t NUM_FRAGS = sizeof(frags) / sizeof(frag_t); const uint8_t *from = encrypted_key_params; for (int i = 0; i < NUM_FRAGS; i++) { memcpy((uint8_t *)frags[i].addr, from, frags[i].len); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); from += frags[i].len; } } @@ -151,7 +153,7 @@ static inline void ds_ll_start_sign(void) static inline ds_signature_check_t ds_ll_check_signature(void) { uint32_t result = REG_READ(DS_QUERY_CHECK_REG); - switch(result) { + switch (result) { case 0: return DS_SIGNATURE_OK; case 1: @@ -173,7 +175,7 @@ static inline void ds_ll_read_result(uint8_t *result, size_t size) { memcpy(result, (uint8_t*) DS_Z_MEM, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** diff --git a/components/hal/esp32h2/include/hal/ecc_ll.h b/components/esp_hal_security/esp32h2/include/hal/ecc_ll.h similarity index 51% rename from components/hal/esp32h2/include/hal/ecc_ll.h rename to components/esp_hal_security/esp32h2/include/hal/ecc_ll.h index c57200f627..3ad0a815b7 100644 --- a/components/hal/esp32h2/include/hal/ecc_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/ecc_ll.h @@ -79,73 +79,73 @@ static inline void ecc_ll_clear_interrupt(void) static inline void ecc_ll_set_mode(ecc_mode_t mode) { - switch(mode) { - case ECC_MODE_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); - break; - case ECC_MODE_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); - break; - case ECC_MODE_VERIFY_THEN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); - break; - case ECC_MODE_JACOBIAN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); - break; - case ECC_MODE_POINT_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); - break; - case ECC_MODE_JACOBIAN_POINT_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); - break; - case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); - break; - case ECC_MODE_MOD_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); - break; - case ECC_MODE_MOD_SUB: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); - break; - case ECC_MODE_MOD_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); - break; - case ECC_MODE_INVERSE_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + switch (mode) { + case ECC_MODE_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); + break; + case ECC_MODE_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); + break; + case ECC_MODE_VERIFY_THEN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); + break; + case ECC_MODE_JACOBIAN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); + break; + case ECC_MODE_POINT_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); + break; + case ECC_MODE_JACOBIAN_POINT_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); + break; + case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); + break; + case ECC_MODE_MOD_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); + break; + case ECC_MODE_MOD_SUB: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); + break; + case ECC_MODE_MOD_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); + break; + case ECC_MODE_INVERSE_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } static inline void ecc_ll_set_curve(ecc_curve_t curve) { - switch(curve) { - case ECC_CURVE_SECP256R1: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); - break; - case ECC_CURVE_SECP192R1: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (curve) { + case ECC_CURVE_SECP256R1: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); + break; + case ECC_CURVE_SECP192R1: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } static inline void ecc_ll_set_mod_base(ecc_mod_base_t base) { - switch(base) { - case ECC_MOD_N: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - case ECC_MOD_P: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (base) { + case ECC_MOD_N: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + case ECC_MOD_P: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -154,27 +154,27 @@ static inline void ecc_ll_write_param(ecc_ll_param_t param, const uint8_t *buf, uint32_t reg; uint32_t word; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -216,7 +216,7 @@ static inline ecc_mod_base_t ecc_ll_get_mod_base(void) static inline void ecc_ll_enable_constant_time_point_mul(bool enable) { // ECC constant time point multiplication is supported only on rev 1.2 and above - if (ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 102)){ + if (ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 102)) { if (enable) { REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_SECURITY_MODE); } else { @@ -229,27 +229,27 @@ static inline void ecc_ll_read_param(ecc_ll_param_t param, uint8_t *buf, uint16_ { uint32_t reg; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32h2/include/hal/ecdsa_ll.h b/components/esp_hal_security/esp32h2/include/hal/ecdsa_ll.h similarity index 58% rename from components/hal/esp32h2/include/hal/ecdsa_ll.h rename to components/esp_hal_security/esp32h2/include/hal/ecdsa_ll.h index d8ed2f5a38..ea89ce1576 100644 --- a/components/hal/esp32h2/include/hal/ecdsa_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/ecdsa_ll.h @@ -100,15 +100,15 @@ static inline void ecdsa_ll_reset_register(void) static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_PREP_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_PREP_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -120,15 +120,15 @@ static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_PREP_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_PREP_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -140,15 +140,15 @@ static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_PREP_DONE: - REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_PREP_DONE_INT_CLR, 1); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_PREP_DONE: + REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_PREP_DONE_INT_CLR, 1); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -160,15 +160,15 @@ static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) { switch (mode) { - case ECDSA_MODE_SIGN_VERIFY: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); - break; - case ECDSA_MODE_SIGN_GEN: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + case ECDSA_MODE_SIGN_VERIFY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); + break; + case ECDSA_MODE_SIGN_GEN: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } @@ -180,15 +180,15 @@ static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) { switch (curve) { - case ECDSA_CURVE_SECP256R1: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); - break; - case ECDSA_CURVE_SECP192R1: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + case ECDSA_CURVE_SECP256R1: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); + break; + case ECDSA_CURVE_SECP192R1: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -200,15 +200,15 @@ static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) { switch (mode) { - case ECDSA_Z_USE_SHA_PERI: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); - break; - case ECDSA_Z_USER_PROVIDED: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - break; + case ECDSA_Z_USE_SHA_PERI: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + case ECDSA_Z_USER_PROVIDED: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + break; } } @@ -220,15 +220,15 @@ static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) static inline void ecdsa_ll_set_k_type(ecdsa_sign_type_t type) { switch (type) { - case ECDSA_K_TYPE_TRNG: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); - break; - case ECDSA_K_TYPE_DETERMINISITIC: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); - break; - default: - HAL_ASSERT(false && "Unsupported K type"); - break; + case ECDSA_K_TYPE_TRNG: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; + case ECDSA_K_TYPE_DETERMINISITIC: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; + default: + HAL_ASSERT(false && "Unsupported K type"); + break; } } @@ -240,18 +240,18 @@ static inline void ecdsa_ll_set_k_type(ecdsa_sign_type_t type) static inline void ecdsa_ll_set_stage(ecdsa_ll_stage_t stage) { switch (stage) { - case ECDSA_STAGE_START_CALC: - REG_SET_BIT(ECDSA_START_REG, ECDSA_START); - break; - case ECDSA_STAGE_LOAD_DONE: - REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); - break; - case ECDSA_STAGE_GET_DONE: - REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); - break; - default: - HAL_ASSERT(false && "Unsupported state"); - break; + case ECDSA_STAGE_START_CALC: + REG_SET_BIT(ECDSA_START_REG, ECDSA_START); + break; + case ECDSA_STAGE_LOAD_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); + break; + case ECDSA_STAGE_GET_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); + break; + default: + HAL_ASSERT(false && "Unsupported state"); + break; } } @@ -273,15 +273,15 @@ static inline ecdsa_ll_state_t ecdsa_ll_get_state(void) static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) { switch (type) { - case ECDSA_SHA_224: - REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); - break; - case ECDSA_SHA_256: - REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); - break; - default: - HAL_ASSERT(false && "Unsupported type"); - break; + case ECDSA_SHA_224: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); + break; + case ECDSA_SHA_256: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; } } @@ -293,15 +293,15 @@ static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) static inline void ecdsa_ll_sha_set_mode(ecdsa_ll_sha_mode_t mode) { switch (mode) { - case ECDSA_MODE_SHA_START: - REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); - break; - case ECDSA_MODE_SHA_CONTINUE: - REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); - break; - default: - HAL_ASSERT(false && "Unsupported type"); - break; + case ECDSA_MODE_SHA_START: + REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); + break; + case ECDSA_MODE_SHA_CONTINUE: + REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; } } @@ -328,24 +328,24 @@ static inline void ecdsa_ll_write_param(ecdsa_ll_param_t param, const uint8_t *b uint32_t reg; uint32_t word; switch (param) { - case ECDSA_PARAM_R: - reg = ECDSA_R_MEM; - break; - case ECDSA_PARAM_S: - reg = ECDSA_S_MEM; - break; - case ECDSA_PARAM_Z: - reg = ECDSA_Z_MEM; - break; - case ECDSA_PARAM_QAX: - reg = ECDSA_QAX_MEM; - break; - case ECDSA_PARAM_QAY: - reg = ECDSA_QAY_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -365,24 +365,24 @@ static inline void ecdsa_ll_read_param(ecdsa_ll_param_t param, uint8_t *buf, uin { uint32_t reg; switch (param) { - case ECDSA_PARAM_R: - reg = ECDSA_R_MEM; - break; - case ECDSA_PARAM_S: - reg = ECDSA_S_MEM; - break; - case ECDSA_PARAM_Z: - reg = ECDSA_Z_MEM; - break; - case ECDSA_PARAM_QAX: - reg = ECDSA_QAX_MEM; - break; - case ECDSA_PARAM_QAY: - reg = ECDSA_QAY_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32h2/include/hal/hmac_ll.h b/components/esp_hal_security/esp32h2/include/hal/hmac_ll.h similarity index 99% rename from components/hal/esp32h2/include/hal/hmac_ll.h rename to components/esp_hal_security/esp32h2/include/hal/hmac_ll.h index 1b690a0c6f..75b90ad736 100644 --- a/components/hal/esp32h2/include/hal/hmac_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/hmac_ll.h @@ -67,7 +67,7 @@ static inline void hmac_ll_start(void) */ static inline void hmac_ll_config_output(hmac_hal_output_t config) { - switch(config) { + switch (config) { case HMAC_OUTPUT_USER: REG_WRITE(HMAC_SET_PARA_PURPOSE_REG, EFUSE_KEY_PURPOSE_HMAC_UP); break; @@ -124,7 +124,7 @@ static inline void hmac_ll_wait_idle(void) uint32_t query; do { query = REG_READ(HMAC_QUERY_BUSY_REG); - } while(query != 0); + } while (query != 0); } /** diff --git a/components/hal/esp32h2/include/hal/mpi_ll.h b/components/esp_hal_security/esp32h2/include/hal/mpi_ll.h similarity index 99% rename from components/hal/esp32h2/include/hal/mpi_ll.h rename to components/esp_hal_security/esp32h2/include/hal/mpi_ll.h index b970e8051c..b2015b3966 100644 --- a/components/hal/esp32h2/include/hal/mpi_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/mpi_ll.h @@ -19,7 +19,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for MPI peripheral module * diff --git a/components/hal/esp32h2/include/hal/sha_ll.h b/components/esp_hal_security/esp32h2/include/hal/sha_ll.h similarity index 99% rename from components/hal/esp32h2/include/hal/sha_ll.h rename to components/esp_hal_security/esp32h2/include/hal/sha_ll.h index 2363c768d1..32ece1b085 100644 --- a/components/hal/esp32h2/include/hal/sha_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/sha_ll.h @@ -171,7 +171,6 @@ static inline void sha_ll_write_digest(esp_sha_type sha_type, void *digest_state } } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32h21/include/hal/aes_ll.h b/components/esp_hal_security/esp32h21/include/hal/aes_ll.h similarity index 98% rename from components/hal/esp32h21/include/hal/aes_ll.h rename to components/esp_hal_security/esp32h21/include/hal/aes_ll.h index 3e8e3e0105..54bd4066ff 100644 --- a/components/hal/esp32h21/include/hal/aes_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/aes_ll.h @@ -113,7 +113,7 @@ static inline void aes_ll_read_block(void *output) for (size_t i = 0; i < AES_BLOCK_WORDS; i++) { output_word = REG_READ(AES_TEXT_OUT_0_REG + (i * REG_WIDTH)); /* Memcpy to avoid potential unaligned access */ - memcpy( (uint8_t*)output + i * 4, &output_word, sizeof(output_word)); + memcpy((uint8_t*)output + i * 4, &output_word, sizeof(output_word)); } } @@ -126,7 +126,6 @@ static inline void aes_ll_start_transform(void) REG_WRITE(AES_TRIGGER_REG, 1); } - /** * @brief Read state of AES accelerator * @@ -137,7 +136,6 @@ static inline esp_aes_state_t aes_ll_get_state(void) return (esp_aes_state_t)REG_READ(AES_STATE_REG); } - /** * @brief Set mode of operation * @@ -190,7 +188,7 @@ static inline void aes_ll_set_iv(const uint8_t *iv) uint32_t *reg_addr_buf = (uint32_t *)(AES_IV_MEM); uint32_t iv_word; - for (int i = 0; i < IV_WORDS; i++ ) { + for (int i = 0; i < IV_WORDS; i++) { /* Memcpy to avoid potential unaligned access */ memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); REG_WRITE(®_addr_buf[i], iv_word); diff --git a/components/hal/esp32h21/include/hal/ds_ll.h b/components/esp_hal_security/esp32h21/include/hal/ds_ll.h similarity index 89% rename from components/hal/esp32h21/include/hal/ds_ll.h rename to components/esp_hal_security/esp32h21/include/hal/ds_ll.h index d755ac1c36..4f3d0e19ce 100644 --- a/components/hal/esp32h21/include/hal/ds_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/ds_ll.h @@ -83,7 +83,7 @@ static inline ds_key_check_t ds_ll_key_error_source(void) static inline void ds_ll_configure_iv(const uint32_t *iv) { for (size_t i = 0; i < (SOC_DS_KEY_PARAM_MD_IV_LENGTH / sizeof(uint32_t)); i++) { - REG_WRITE(DS_IV_MEM + (i * 4) , iv[i]); + REG_WRITE(DS_IV_MEM + (i * 4), iv[i]); } } @@ -97,7 +97,7 @@ static inline void ds_ll_write_message(const uint8_t *msg, size_t size) { memcpy((uint8_t*) DS_X_MEM, msg, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** @@ -111,20 +111,23 @@ static inline void ds_ll_write_private_key_params(const uint8_t *encrypted_key_p (note if ETS_DS_MAX_BITS == 4096, this should be the same as copying data->c to hardware in one fragment) */ - typedef struct { uint32_t addr; size_t len; } frag_t; + typedef struct { + uint32_t addr; + size_t len; + } frag_t; const frag_t frags[] = { - {DS_Y_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_M_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_RB_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_BOX_MEM, DS_IV_MEM - DS_BOX_MEM}, + {DS_Y_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_M_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_RB_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_BOX_MEM, DS_IV_MEM - DS_BOX_MEM}, }; - const size_t NUM_FRAGS = sizeof(frags)/sizeof(frag_t); + const size_t NUM_FRAGS = sizeof(frags) / sizeof(frag_t); const uint8_t *from = encrypted_key_params; for (int i = 0; i < NUM_FRAGS; i++) { memcpy((uint8_t *)frags[i].addr, from, frags[i].len); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); from += frags[i].len; } } @@ -150,7 +153,7 @@ static inline void ds_ll_start_sign(void) static inline ds_signature_check_t ds_ll_check_signature(void) { uint32_t result = REG_READ(DS_QUERY_CHECK_REG); - switch(result) { + switch (result) { case 0: return DS_SIGNATURE_OK; case 1: @@ -172,7 +175,7 @@ static inline void ds_ll_read_result(uint8_t *result, size_t size) { memcpy(result, (uint8_t*) DS_Z_MEM, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** diff --git a/components/hal/esp32h21/include/hal/ecc_ll.h b/components/esp_hal_security/esp32h21/include/hal/ecc_ll.h similarity index 50% rename from components/hal/esp32h21/include/hal/ecc_ll.h rename to components/esp_hal_security/esp32h21/include/hal/ecc_ll.h index 75ac321369..6ac32c21aa 100644 --- a/components/hal/esp32h21/include/hal/ecc_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/ecc_ll.h @@ -77,73 +77,73 @@ static inline void ecc_ll_clear_interrupt(void) static inline void ecc_ll_set_mode(ecc_mode_t mode) { - switch(mode) { - case ECC_MODE_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); - break; - case ECC_MODE_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); - break; - case ECC_MODE_VERIFY_THEN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); - break; - case ECC_MODE_JACOBIAN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); - break; - case ECC_MODE_POINT_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); - break; - case ECC_MODE_JACOBIAN_POINT_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); - break; - case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); - break; - case ECC_MODE_MOD_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); - break; - case ECC_MODE_MOD_SUB: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); - break; - case ECC_MODE_MOD_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); - break; - case ECC_MODE_INVERSE_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + switch (mode) { + case ECC_MODE_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); + break; + case ECC_MODE_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); + break; + case ECC_MODE_VERIFY_THEN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); + break; + case ECC_MODE_JACOBIAN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); + break; + case ECC_MODE_POINT_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); + break; + case ECC_MODE_JACOBIAN_POINT_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); + break; + case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); + break; + case ECC_MODE_MOD_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); + break; + case ECC_MODE_MOD_SUB: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); + break; + case ECC_MODE_MOD_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); + break; + case ECC_MODE_INVERSE_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } static inline void ecc_ll_set_curve(ecc_curve_t curve) { - switch(curve) { - case ECC_CURVE_SECP256R1: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); - break; - case ECC_CURVE_SECP192R1: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (curve) { + case ECC_CURVE_SECP256R1: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); + break; + case ECC_CURVE_SECP192R1: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } static inline void ecc_ll_set_mod_base(ecc_mod_base_t base) { - switch(base) { - case ECC_MOD_N: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - case ECC_MOD_P: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (base) { + case ECC_MOD_N: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + case ECC_MOD_P: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -161,27 +161,27 @@ static inline void ecc_ll_write_param(ecc_ll_param_t param, const uint8_t *buf, uint32_t reg; uint32_t word; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -224,27 +224,27 @@ static inline void ecc_ll_read_param(ecc_ll_param_t param, uint8_t *buf, uint16_ { uint32_t reg; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32h21/include/hal/ecdsa_ll.h b/components/esp_hal_security/esp32h21/include/hal/ecdsa_ll.h similarity index 55% rename from components/hal/esp32h21/include/hal/ecdsa_ll.h rename to components/esp_hal_security/esp32h21/include/hal/ecdsa_ll.h index 485f2e6e32..095e01b88c 100644 --- a/components/hal/esp32h21/include/hal/ecdsa_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/ecdsa_ll.h @@ -108,15 +108,15 @@ static inline void ecdsa_ll_reset_register(void) static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_CALC_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -128,15 +128,15 @@ static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_CALC_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -148,15 +148,15 @@ static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_CLR, 1); - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + case ECDSA_INT_CALC_DONE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_CLR, 1); + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -168,18 +168,18 @@ static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) { switch (mode) { - case ECDSA_MODE_SIGN_VERIFY: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); - break; - case ECDSA_MODE_SIGN_GEN: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); - break; - case ECDSA_MODE_EXPORT_PUBKEY: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 2); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + case ECDSA_MODE_SIGN_VERIFY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); + break; + case ECDSA_MODE_SIGN_GEN: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); + break; + case ECDSA_MODE_EXPORT_PUBKEY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } @@ -191,15 +191,15 @@ static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) { switch (curve) { - case ECDSA_CURVE_SECP256R1: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); - break; - case ECDSA_CURVE_SECP192R1: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + case ECDSA_CURVE_SECP256R1: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); + break; + case ECDSA_CURVE_SECP192R1: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_ECC_CURVE); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -211,15 +211,15 @@ static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) { switch (mode) { - case ECDSA_Z_USE_SHA_PERI: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); - break; - case ECDSA_Z_USER_PROVIDED: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - break; + case ECDSA_Z_USE_SHA_PERI: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + case ECDSA_Z_USER_PROVIDED: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + break; } } @@ -231,15 +231,15 @@ static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) static inline void ecdsa_ll_set_k_type(ecdsa_sign_type_t type) { switch (type) { - case ECDSA_K_TYPE_TRNG: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); - break; - case ECDSA_K_TYPE_DETERMINISITIC: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); - break; - default: - HAL_ASSERT(false && "Unsupported K type"); - break; + case ECDSA_K_TYPE_TRNG: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; + case ECDSA_K_TYPE_DETERMINISITIC: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; + default: + HAL_ASSERT(false && "Unsupported K type"); + break; } } @@ -251,18 +251,18 @@ static inline void ecdsa_ll_set_k_type(ecdsa_sign_type_t type) static inline void ecdsa_ll_set_stage(ecdsa_ll_stage_t stage) { switch (stage) { - case ECDSA_STAGE_START_CALC: - REG_SET_BIT(ECDSA_START_REG, ECDSA_START); - break; - case ECDSA_STAGE_LOAD_DONE: - REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); - break; - case ECDSA_STAGE_GET_DONE: - REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); - break; - default: - HAL_ASSERT(false && "Unsupported state"); - break; + case ECDSA_STAGE_START_CALC: + REG_SET_BIT(ECDSA_START_REG, ECDSA_START); + break; + case ECDSA_STAGE_LOAD_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); + break; + case ECDSA_STAGE_GET_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); + break; + default: + HAL_ASSERT(false && "Unsupported state"); + break; } } @@ -274,15 +274,15 @@ static inline void ecdsa_ll_set_stage(ecdsa_ll_stage_t stage) static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) { switch (type) { - case ECDSA_SHA_224: - REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); - break; - case ECDSA_SHA_256: - REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); - break; - default: - HAL_ASSERT(false && "Unsupported type"); - break; + case ECDSA_SHA_224: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); + break; + case ECDSA_SHA_256: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; } } @@ -294,15 +294,15 @@ static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) static inline void ecdsa_ll_sha_set_mode(ecdsa_ll_sha_mode_t mode) { switch (mode) { - case ECDSA_MODE_SHA_START: - REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); - break; - case ECDSA_MODE_SHA_CONTINUE: - REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); - break; - default: - HAL_ASSERT(false && "Unsupported type"); - break; + case ECDSA_MODE_SHA_START: + REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); + break; + case ECDSA_MODE_SHA_CONTINUE: + REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; } } @@ -329,24 +329,24 @@ static inline void ecdsa_ll_write_param(ecdsa_ll_param_t param, const uint8_t *b uint32_t reg; uint32_t word; switch (param) { - case ECDSA_PARAM_R: - reg = ECDSA_R_MEM; - break; - case ECDSA_PARAM_S: - reg = ECDSA_S_MEM; - break; - case ECDSA_PARAM_Z: - reg = ECDSA_Z_MEM; - break; - case ECDSA_PARAM_QAX: - reg = ECDSA_QAX_MEM; - break; - case ECDSA_PARAM_QAY: - reg = ECDSA_QAY_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -366,24 +366,24 @@ static inline void ecdsa_ll_read_param(ecdsa_ll_param_t param, uint8_t *buf, uin { uint32_t reg; switch (param) { - case ECDSA_PARAM_R: - reg = ECDSA_R_MEM; - break; - case ECDSA_PARAM_S: - reg = ECDSA_S_MEM; - break; - case ECDSA_PARAM_Z: - reg = ECDSA_Z_MEM; - break; - case ECDSA_PARAM_QAX: - reg = ECDSA_QAX_MEM; - break; - case ECDSA_PARAM_QAY: - reg = ECDSA_QAY_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32h21/include/hal/hmac_ll.h b/components/esp_hal_security/esp32h21/include/hal/hmac_ll.h similarity index 99% rename from components/hal/esp32h21/include/hal/hmac_ll.h rename to components/esp_hal_security/esp32h21/include/hal/hmac_ll.h index cc3eadcc04..f8214c422b 100644 --- a/components/hal/esp32h21/include/hal/hmac_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/hmac_ll.h @@ -67,7 +67,7 @@ static inline void hmac_ll_start(void) */ static inline void hmac_ll_config_output(hmac_hal_output_t config) { - switch(config) { + switch (config) { case HMAC_OUTPUT_USER: REG_WRITE(HMAC_SET_PARA_PURPOSE_REG, EFUSE_KEY_PURPOSE_HMAC_UP); break; @@ -124,7 +124,7 @@ static inline void hmac_ll_wait_idle(void) uint32_t query; do { query = REG_READ(HMAC_QUERY_BUSY_REG); - } while(query != 0); + } while (query != 0); } /** diff --git a/components/hal/esp32h21/include/hal/mpi_ll.h b/components/esp_hal_security/esp32h21/include/hal/mpi_ll.h similarity index 99% rename from components/hal/esp32h21/include/hal/mpi_ll.h rename to components/esp_hal_security/esp32h21/include/hal/mpi_ll.h index fc4d03bc81..bb6e336eef 100644 --- a/components/hal/esp32h21/include/hal/mpi_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/mpi_ll.h @@ -19,7 +19,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for MPI peripheral module * diff --git a/components/hal/esp32h21/include/hal/sha_ll.h b/components/esp_hal_security/esp32h21/include/hal/sha_ll.h similarity index 99% rename from components/hal/esp32h21/include/hal/sha_ll.h rename to components/esp_hal_security/esp32h21/include/hal/sha_ll.h index 177acc686e..2b6dc3d6aa 100644 --- a/components/hal/esp32h21/include/hal/sha_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/sha_ll.h @@ -171,7 +171,6 @@ static inline void sha_ll_write_digest(esp_sha_type sha_type, void *digest_state } } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32h4/include/hal/ecc_ll.h b/components/esp_hal_security/esp32h4/include/hal/ecc_ll.h similarity index 51% rename from components/hal/esp32h4/include/hal/ecc_ll.h rename to components/esp_hal_security/esp32h4/include/hal/ecc_ll.h index 1910097722..e5a8958497 100644 --- a/components/hal/esp32h4/include/hal/ecc_ll.h +++ b/components/esp_hal_security/esp32h4/include/hal/ecc_ll.h @@ -79,73 +79,73 @@ static inline void ecc_ll_clear_interrupt(void) static inline void ecc_ll_set_mode(ecc_mode_t mode) { - switch(mode) { - case ECC_MODE_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); - break; - case ECC_MODE_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); - break; - case ECC_MODE_VERIFY_THEN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); - break; - case ECC_MODE_JACOBIAN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); - break; - case ECC_MODE_POINT_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); - break; - case ECC_MODE_JACOBIAN_POINT_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); - break; - case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); - break; - case ECC_MODE_MOD_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); - break; - case ECC_MODE_MOD_SUB: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); - break; - case ECC_MODE_MOD_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); - break; - case ECC_MODE_INVERSE_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + switch (mode) { + case ECC_MODE_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); + break; + case ECC_MODE_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); + break; + case ECC_MODE_VERIFY_THEN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); + break; + case ECC_MODE_JACOBIAN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); + break; + case ECC_MODE_POINT_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); + break; + case ECC_MODE_JACOBIAN_POINT_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); + break; + case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); + break; + case ECC_MODE_MOD_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); + break; + case ECC_MODE_MOD_SUB: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); + break; + case ECC_MODE_MOD_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); + break; + case ECC_MODE_INVERSE_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } static inline void ecc_ll_set_curve(ecc_curve_t curve) { - switch(curve) { - case ECC_CURVE_SECP192R1: - case ECC_CURVE_SECP256R1: - case ECC_CURVE_SECP384R1: - case ECC_CURVE_SM2: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH, curve); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (curve) { + case ECC_CURVE_SECP192R1: + case ECC_CURVE_SECP256R1: + case ECC_CURVE_SECP384R1: + case ECC_CURVE_SM2: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH, curve); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } static inline void ecc_ll_set_mod_base(ecc_mod_base_t base) { - switch(base) { - case ECC_MOD_N: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - case ECC_MOD_P: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (base) { + case ECC_MOD_N: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + case ECC_MOD_P: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -163,27 +163,27 @@ static inline void ecc_ll_write_param(ecc_ll_param_t param, const uint8_t *buf, uint32_t reg; uint32_t word; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -226,27 +226,27 @@ static inline void ecc_ll_read_param(ecc_ll_param_t param, uint8_t *buf, uint16_ { uint32_t reg; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32h4/include/hal/ecdsa_ll.h b/components/esp_hal_security/esp32h4/include/hal/ecdsa_ll.h similarity index 100% rename from components/hal/esp32h4/include/hal/ecdsa_ll.h rename to components/esp_hal_security/esp32h4/include/hal/ecdsa_ll.h diff --git a/components/hal/esp32p4/include/hal/aes_ll.h b/components/esp_hal_security/esp32p4/include/hal/aes_ll.h similarity index 98% rename from components/hal/esp32p4/include/hal/aes_ll.h rename to components/esp_hal_security/esp32p4/include/hal/aes_ll.h index 75a2cfe650..fd7fe0dbcf 100644 --- a/components/hal/esp32p4/include/hal/aes_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/aes_ll.h @@ -129,7 +129,7 @@ static inline void aes_ll_read_block(void *output) for (size_t i = 0; i < AES_BLOCK_WORDS; i++) { output_word = REG_READ(AES_TEXT_OUT_0_REG + (i * REG_WIDTH)); /* Memcpy to avoid potential unaligned access */ - memcpy( (uint8_t*)output + i * 4, &output_word, sizeof(output_word)); + memcpy((uint8_t*)output + i * 4, &output_word, sizeof(output_word)); } } @@ -142,7 +142,6 @@ static inline void aes_ll_start_transform(void) REG_WRITE(AES_TRIGGER_REG, 1); } - /** * @brief Read state of AES accelerator * @@ -153,7 +152,6 @@ static inline esp_aes_state_t aes_ll_get_state(void) return (esp_aes_state_t)REG_READ(AES_STATE_REG); } - /** * @brief Set mode of operation * @@ -206,7 +204,7 @@ static inline void aes_ll_set_iv(const uint8_t *iv) uint32_t *reg_addr_buf = (uint32_t *)(AES_IV_MEM); uint32_t iv_word; - for (int i = 0; i < IV_WORDS; i++ ) { + for (int i = 0; i < IV_WORDS; i++) { /* Memcpy to avoid potential unaligned access */ memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); REG_WRITE(®_addr_buf[i], iv_word); diff --git a/components/hal/esp32p4/include/hal/apm_ll.h b/components/esp_hal_security/esp32p4/include/hal/apm_ll.h similarity index 85% rename from components/hal/esp32p4/include/hal/apm_ll.h rename to components/esp_hal_security/esp32p4/include/hal/apm_ll.h index a97776f87b..8cdf5412f8 100644 --- a/components/hal/esp32p4/include/hal/apm_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/apm_ll.h @@ -37,7 +37,6 @@ typedef enum { APM_LL_MASTER_DMA, } apm_ll_master_id_t; - /** * @brief APM Controller */ @@ -108,9 +107,9 @@ typedef enum { PMS_COREn_XM_HP_UART2_ALLOW, PMS_COREn_XM_HP_UART3_ALLOW, PMS_COREn_XM_HP_UART4_ALLOW, - PMS_COREn_XM_HP_PARLIO_ALLOW269 , - PMS_COREn_XM_HP_GPSPI2_ALLOW270 , - PMS_COREn_XM_HP_GPSPI3_ALLOW271 , + PMS_COREn_XM_HP_PARLIO_ALLOW269, + PMS_COREn_XM_HP_GPSPI2_ALLOW270, + PMS_COREn_XM_HP_GPSPI3_ALLOW271, PMS_COREn_XM_HP_USBDEVICE_ALLOW, PMS_COREn_XM_HP_LEDC_ALLOW, PMS_COREn_XM_HP_ETM_ALLOW = 85, @@ -132,7 +131,6 @@ typedef enum { PMS_COREn_XM_HP_PERI_MAX, } apm_ll_hp_peri_t; - /** * @brief LP CPU Peripherals. */ @@ -163,7 +161,6 @@ typedef enum { PMS_LP_MM_PERI_MAX, } apm_ll_lp_peri_t; - /** * @brief LP CPU Peripherals. */ @@ -216,7 +213,6 @@ typedef enum { (PMS_PERI_REGION0_LOW_REG + (regn_num * 8)); \ }) - #define PMS_PERI_REGION_HIGH_REG(regn_num) \ ({\ (PMS_PERI_REGION0_HIGH_REG + (regn_num * 8)); \ @@ -232,7 +228,6 @@ typedef enum { (PMS_DMA_GDMA_CH0_W_PMS_REG + (dma_master * 8)); \ }) - /** * @brief Configure HP peripherals access permission for the HP CPU0/1. * @@ -241,15 +236,15 @@ typedef enum { * @param enable Permission enable/disable */ static inline void apm_ll_hp_peri_access_enable(apm_ll_master_id_t master_id, apm_ll_hp_peri_t hp_peri, - apm_ll_secure_mode_t sec_mode, bool enable) + apm_ll_secure_mode_t sec_mode, bool enable) { HAL_ASSERT((master_id > APM_LL_MASTER_LPCPU) && (master_id < APM_LL_MASTER_DMA) - && (hp_peri < PMS_COREn_XM_HP_PERI_MAX) && (sec_mode < APM_LL_SECURE_MODE_INV)); + && (hp_peri < PMS_COREn_XM_HP_PERI_MAX) && (sec_mode < APM_LL_SECURE_MODE_INV)); if (enable) { - REG_SET_BIT(PMS_COREn_XM_PMS_REGn_REG(master_id, sec_mode, hp_peri), BIT(hp_peri%32)); + REG_SET_BIT(PMS_COREn_XM_PMS_REGn_REG(master_id, sec_mode, hp_peri), BIT(hp_peri % 32)); } else { - REG_CLR_BIT(PMS_COREn_XM_PMS_REGn_REG(master_id, sec_mode, hp_peri), BIT(hp_peri%32)); + REG_CLR_BIT(PMS_COREn_XM_PMS_REGn_REG(master_id, sec_mode, hp_peri), BIT(hp_peri % 32)); } } @@ -278,7 +273,7 @@ static inline void apm_ll_lp_peri_access_enable(apm_ll_lp_peri_t lp_peri, bool e * @param regn_high_addr Configurable address range end address. */ static inline void apm_ll_peri_region_config(uint32_t regn_num, uint32_t regn_low_addr, - uint32_t regn_high_addr) + uint32_t regn_high_addr) { HAL_ASSERT(regn_num < PMS_PERI_MAX_REGION_NUM); @@ -298,32 +293,32 @@ static inline void apm_ll_peri_region_config(uint32_t regn_num, uint32_t regn_lo * @return Configuration performed successfully? */ static inline int apm_ll_peri_region_pms(apm_ll_master_id_t master_id, apm_ll_secure_mode_t sec_mode, - uint32_t regn_num, uint32_t regn_pms) + uint32_t regn_num, uint32_t regn_pms) { HAL_ASSERT((master_id < APM_LL_MASTER_DMA) && (sec_mode < APM_LL_SECURE_MODE_INV)); regn_pms &= 0x3; - switch(master_id) { - case APM_LL_MASTER_LPCPU: - REG_SET_FIELD(PMS_PERI_REGION_PMS_REG, PMS_LP_CORE_REGION_PMS, regn_pms); - break; - case APM_LL_MASTER_HPCPU0: - if (sec_mode) { - REG_SET_FIELD(PMS_PERI_REGION_PMS_REG, PMS_HP_CORE0_UM_REGION_PMS, regn_pms); - } else { - REG_SET_FIELD(PMS_PERI_REGION_PMS_REG, PMS_HP_CORE0_MM_REGION_PMS, regn_pms); - } - break; - case APM_LL_MASTER_HPCPU1: - if (sec_mode) { - REG_SET_FIELD(PMS_PERI_REGION_PMS_REG, PMS_HP_CORE1_UM_REGION_PMS, regn_pms); - } else { - REG_SET_FIELD(PMS_PERI_REGION_PMS_REG, PMS_HP_CORE1_MM_REGION_PMS, regn_pms); - } - break; - default: - return -1; + switch (master_id) { + case APM_LL_MASTER_LPCPU: + REG_SET_FIELD(PMS_PERI_REGION_PMS_REG, PMS_LP_CORE_REGION_PMS, regn_pms); + break; + case APM_LL_MASTER_HPCPU0: + if (sec_mode) { + REG_SET_FIELD(PMS_PERI_REGION_PMS_REG, PMS_HP_CORE0_UM_REGION_PMS, regn_pms); + } else { + REG_SET_FIELD(PMS_PERI_REGION_PMS_REG, PMS_HP_CORE0_MM_REGION_PMS, regn_pms); + } + break; + case APM_LL_MASTER_HPCPU1: + if (sec_mode) { + REG_SET_FIELD(PMS_PERI_REGION_PMS_REG, PMS_HP_CORE1_UM_REGION_PMS, regn_pms); + } else { + REG_SET_FIELD(PMS_PERI_REGION_PMS_REG, PMS_HP_CORE1_MM_REGION_PMS, regn_pms); + } + break; + default: + return -1; } return 0; @@ -343,24 +338,24 @@ static inline int apm_ll_apm_ctrl_clk_gating_enable(apm_ll_apm_ctrl_t apm_ctrl, HAL_ASSERT(apm_ctrl < MAX_APM_CTRL); - switch(apm_ctrl) { - case LP_APM_CTRL: - reg = PMS_LP_PERI_PMS_CLK_EN_REG; - break; - case HP2LP_APM_CTRL: - reg = PMS_HP2LP_PERI_PMS_CLK_EN_REG; - break; - case HP_APM_CTRL: - reg = PMS_HP_PERI_PMS_CLK_EN_REG; - break; - case LP2HP_APM_CTRL: - reg = PMS_LP2HP_PERI_PMS_CLK_EN_REG; - break; - case DMA_APM_CTRL: - reg = PMS_DMA_CLK_EN_REG; - break; - default: - return -1; + switch (apm_ctrl) { + case LP_APM_CTRL: + reg = PMS_LP_PERI_PMS_CLK_EN_REG; + break; + case HP2LP_APM_CTRL: + reg = PMS_HP2LP_PERI_PMS_CLK_EN_REG; + break; + case HP_APM_CTRL: + reg = PMS_HP_PERI_PMS_CLK_EN_REG; + break; + case LP2HP_APM_CTRL: + reg = PMS_LP2HP_PERI_PMS_CLK_EN_REG; + break; + case DMA_APM_CTRL: + reg = PMS_DMA_CLK_EN_REG; + break; + default: + return -1; } if (enable) { diff --git a/components/hal/esp32p4/include/hal/ds_ll.h b/components/esp_hal_security/esp32p4/include/hal/ds_ll.h similarity index 91% rename from components/hal/esp32p4/include/hal/ds_ll.h rename to components/esp_hal_security/esp32p4/include/hal/ds_ll.h index c219b40e12..c2cd170a64 100644 --- a/components/hal/esp32p4/include/hal/ds_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/ds_ll.h @@ -111,7 +111,7 @@ static inline void ds_ll_set_key_source(ds_key_source_t key_source) static inline void ds_ll_configure_iv(const uint32_t *iv) { for (size_t i = 0; i < (SOC_DS_KEY_PARAM_MD_IV_LENGTH / sizeof(uint32_t)); i++) { - REG_WRITE(DS_IV_MEM + (i * 4) , iv[i]); + REG_WRITE(DS_IV_MEM + (i * 4), iv[i]); } } @@ -125,7 +125,7 @@ static inline void ds_ll_write_message(const uint8_t *msg, size_t size) { memcpy((uint8_t*) DS_X_MEM, msg, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** @@ -139,20 +139,23 @@ static inline void ds_ll_write_private_key_params(const uint8_t *encrypted_key_p (note if ETS_DS_MAX_BITS == 4096, this should be the same as copying data->c to hardware in one fragment) */ - typedef struct { uint32_t addr; size_t len; } frag_t; + typedef struct { + uint32_t addr; + size_t len; + } frag_t; const frag_t frags[] = { - {DS_Y_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_M_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_RB_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, - {DS_BOX_MEM, DS_IV_MEM - DS_BOX_MEM}, + {DS_Y_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_M_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_RB_MEM, SOC_DS_SIGNATURE_MAX_BIT_LEN / 8}, + {DS_BOX_MEM, DS_IV_MEM - DS_BOX_MEM}, }; - const size_t NUM_FRAGS = sizeof(frags)/sizeof(frag_t); + const size_t NUM_FRAGS = sizeof(frags) / sizeof(frag_t); const uint8_t *from = encrypted_key_params; for (int i = 0; i < NUM_FRAGS; i++) { memcpy((uint8_t *)frags[i].addr, from, frags[i].len); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); from += frags[i].len; } } @@ -178,7 +181,7 @@ static inline void ds_ll_start_sign(void) static inline ds_signature_check_t ds_ll_check_signature(void) { uint32_t result = REG_READ(DS_QUERY_CHECK_REG); - switch(result) { + switch (result) { case 0: return DS_SIGNATURE_OK; case 1: @@ -200,7 +203,7 @@ static inline void ds_ll_read_result(uint8_t *result, size_t size) { memcpy(result, (uint8_t*) DS_Z_MEM, size); // Fence ensures all memory operations are completed before proceeding further - asm volatile ("fence"); + asm volatile("fence"); } /** diff --git a/components/hal/esp32p4/include/hal/ecc_ll.h b/components/esp_hal_security/esp32p4/include/hal/ecc_ll.h similarity index 56% rename from components/hal/esp32p4/include/hal/ecc_ll.h rename to components/esp_hal_security/esp32p4/include/hal/ecc_ll.h index 8e56f508cf..ab4b65d187 100644 --- a/components/hal/esp32p4/include/hal/ecc_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/ecc_ll.h @@ -85,72 +85,72 @@ static inline void ecc_ll_clear_interrupt(void) static inline void ecc_ll_set_mode(ecc_mode_t mode) { - switch(mode) { - case ECC_MODE_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); - break; - case ECC_MODE_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); - break; - case ECC_MODE_VERIFY_THEN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); - break; - case ECC_MODE_JACOBIAN_POINT_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); - break; - case ECC_MODE_POINT_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); - break; - case ECC_MODE_JACOBIAN_POINT_VERIFY: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); - break; - case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); - break; - case ECC_MODE_MOD_ADD: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); - break; - case ECC_MODE_MOD_SUB: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); - break; - case ECC_MODE_MOD_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); - break; - case ECC_MODE_INVERSE_MUL: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + switch (mode) { + case ECC_MODE_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 0); + break; + case ECC_MODE_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 2); + break; + case ECC_MODE_VERIFY_THEN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 3); + break; + case ECC_MODE_JACOBIAN_POINT_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 4); + break; + case ECC_MODE_POINT_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 5); + break; + case ECC_MODE_JACOBIAN_POINT_VERIFY: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 6); + break; + case ECC_MODE_POINT_VERIFY_JACOBIAN_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 7); + break; + case ECC_MODE_MOD_ADD: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 8); + break; + case ECC_MODE_MOD_SUB: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 9); + break; + case ECC_MODE_MOD_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 10); + break; + case ECC_MODE_INVERSE_MUL: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_WORK_MODE, 11); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } static inline void ecc_ll_set_curve(ecc_curve_t curve) { switch (curve) { - case ECC_CURVE_SECP192R1: - case ECC_CURVE_SECP256R1: - case ECC_CURVE_SECP384R1: - case ECC_CURVE_SM2: - REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH, curve); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); + case ECC_CURVE_SECP192R1: + case ECC_CURVE_SECP256R1: + case ECC_CURVE_SECP384R1: + case ECC_CURVE_SM2: + REG_SET_FIELD(ECC_MULT_CONF_REG, ECC_MULT_KEY_LENGTH, curve); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); } } static inline void ecc_ll_set_mod_base(ecc_mod_base_t base) { - switch(base) { - case ECC_MOD_N: - REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - case ECC_MOD_P: - REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + switch (base) { + case ECC_MOD_N: + REG_CLR_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + case ECC_MOD_P: + REG_SET_BIT(ECC_MULT_CONF_REG, ECC_MULT_MOD_BASE); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -159,27 +159,27 @@ static inline void ecc_ll_write_param(ecc_ll_param_t param, const uint8_t *buf, uint32_t reg; uint32_t word; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -222,27 +222,27 @@ static inline void ecc_ll_read_param(ecc_ll_param_t param, uint8_t *buf, uint16_ { uint32_t reg; switch (param) { - case ECC_PARAM_PX: - reg = ECC_MULT_PX_MEM; - break; - case ECC_PARAM_PY: - reg = ECC_MULT_PY_MEM; - break; - case ECC_PARAM_K: - reg = ECC_MULT_K_MEM; - break; - case ECC_PARAM_QX: - reg = ECC_MULT_QX_MEM; - break; - case ECC_PARAM_QY: - reg = ECC_MULT_QY_MEM; - break; - case ECC_PARAM_QZ: - reg = ECC_MULT_QZ_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECC_PARAM_PX: + reg = ECC_MULT_PX_MEM; + break; + case ECC_PARAM_PY: + reg = ECC_MULT_PY_MEM; + break; + case ECC_PARAM_K: + reg = ECC_MULT_K_MEM; + break; + case ECC_PARAM_QX: + reg = ECC_MULT_QX_MEM; + break; + case ECC_PARAM_QY: + reg = ECC_MULT_QY_MEM; + break; + case ECC_PARAM_QZ: + reg = ECC_MULT_QZ_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); diff --git a/components/hal/esp32p4/include/hal/ecdsa_ll.h b/components/esp_hal_security/esp32p4/include/hal/ecdsa_ll.h similarity index 57% rename from components/hal/esp32p4/include/hal/ecdsa_ll.h rename to components/esp_hal_security/esp32p4/include/hal/ecdsa_ll.h index b024e350d6..b09e1d57b0 100644 --- a/components/hal/esp32p4/include/hal/ecdsa_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/ecdsa_ll.h @@ -126,19 +126,19 @@ static inline void ecdsa_ll_reset_register(void) static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: + case ECDSA_INT_CALC_DONE: #if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300 - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); #else - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_CALC_DONE_INT_ENA, 1); + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_CALC_DONE_INT_ENA, 1); #endif - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -150,19 +150,19 @@ static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: + case ECDSA_INT_CALC_DONE: #if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300 - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); #else - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_CALC_DONE_INT_ENA, 0); + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_CALC_DONE_INT_ENA, 0); #endif - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -174,19 +174,19 @@ static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) { switch (type) { - case ECDSA_INT_CALC_DONE: + case ECDSA_INT_CALC_DONE: #if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300 - REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_CLR, 1); + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_CLR, 1); #else - REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_CALC_DONE_INT_CLR, 1); + REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_CALC_DONE_INT_CLR, 1); #endif - break; - case ECDSA_INT_SHA_RELEASE: - REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); - break; - default: - HAL_ASSERT(false && "Unsupported interrupt type"); - break; + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; } } @@ -198,18 +198,18 @@ static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) { switch (mode) { - case ECDSA_MODE_SIGN_VERIFY: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); - break; - case ECDSA_MODE_SIGN_GEN: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); - break; - case ECDSA_MODE_EXPORT_PUBKEY: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 2); - break; - default: - HAL_ASSERT(false && "Unsupported mode"); - break; + case ECDSA_MODE_SIGN_VERIFY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); + break; + case ECDSA_MODE_SIGN_GEN: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); + break; + case ECDSA_MODE_EXPORT_PUBKEY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; } } @@ -221,15 +221,15 @@ static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) { switch (curve) { - case ECDSA_CURVE_SECP192R1: - case ECDSA_CURVE_SECP256R1: - case ECDSA_CURVE_SECP384R1: - case ECDSA_CURVE_SM2: - REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_ECC_CURVE, curve); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - return; + case ECDSA_CURVE_SECP192R1: + case ECDSA_CURVE_SECP256R1: + case ECDSA_CURVE_SECP384R1: + case ECDSA_CURVE_SM2: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_ECC_CURVE, curve); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; } } @@ -241,15 +241,15 @@ static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) { switch (mode) { - case ECDSA_Z_USE_SHA_PERI: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); - break; - case ECDSA_Z_USER_PROVIDED: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - break; + case ECDSA_Z_USE_SHA_PERI: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + case ECDSA_Z_USER_PROVIDED: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + break; } } @@ -261,15 +261,15 @@ static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) static inline void ecdsa_ll_set_k_type(ecdsa_sign_type_t type) { switch (type) { - case ECDSA_K_TYPE_TRNG: - REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); - break; - case ECDSA_K_TYPE_DETERMINISITIC: - REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); - break; - default: - HAL_ASSERT(false && "Unsupported K type"); - break; + case ECDSA_K_TYPE_TRNG: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; + case ECDSA_K_TYPE_DETERMINISITIC: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; + default: + HAL_ASSERT(false && "Unsupported K type"); + break; } } @@ -293,18 +293,18 @@ static inline void ecdsa_ll_set_deterministic_loop(uint16_t loop_number) static inline void ecdsa_ll_set_stage(ecdsa_ll_stage_t stage) { switch (stage) { - case ECDSA_STAGE_START_CALC: - REG_SET_BIT(ECDSA_START_REG, ECDSA_START); - break; - case ECDSA_STAGE_LOAD_DONE: - REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); - break; - case ECDSA_STAGE_GET_DONE: - REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); - break; - default: - HAL_ASSERT(false && "Unsupported state"); - break; + case ECDSA_STAGE_START_CALC: + REG_SET_BIT(ECDSA_START_REG, ECDSA_START); + break; + case ECDSA_STAGE_LOAD_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); + break; + case ECDSA_STAGE_GET_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); + break; + default: + HAL_ASSERT(false && "Unsupported state"); + break; } } @@ -316,15 +316,15 @@ static inline void ecdsa_ll_set_stage(ecdsa_ll_stage_t stage) static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) { switch (type) { - case ECDSA_SHA_224: - REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); - break; - case ECDSA_SHA_256: - REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); - break; - default: - HAL_ASSERT(false && "Unsupported type"); - break; + case ECDSA_SHA_224: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); + break; + case ECDSA_SHA_256: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; } } @@ -336,15 +336,15 @@ static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) static inline void ecdsa_ll_sha_set_mode(ecdsa_ll_sha_mode_t mode) { switch (mode) { - case ECDSA_MODE_SHA_START: - REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); - break; - case ECDSA_MODE_SHA_CONTINUE: - REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); - break; - default: - HAL_ASSERT(false && "Unsupported type"); - break; + case ECDSA_MODE_SHA_START: + REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); + break; + case ECDSA_MODE_SHA_CONTINUE: + REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; } } @@ -371,24 +371,24 @@ static inline void ecdsa_ll_write_param(ecdsa_ll_param_t param, const uint8_t *b uint32_t reg; uint32_t word; switch (param) { - case ECDSA_PARAM_R: - reg = ECDSA_R_MEM; - break; - case ECDSA_PARAM_S: - reg = ECDSA_S_MEM; - break; - case ECDSA_PARAM_Z: - reg = ECDSA_Z_MEM; - break; - case ECDSA_PARAM_QAX: - reg = ECDSA_QAX_MEM; - break; - case ECDSA_PARAM_QAY: - reg = ECDSA_QAY_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } for (int i = 0; i < len; i += 4) { @@ -408,24 +408,24 @@ static inline void ecdsa_ll_read_param(ecdsa_ll_param_t param, uint8_t *buf, uin { uint32_t reg; switch (param) { - case ECDSA_PARAM_R: - reg = ECDSA_R_MEM; - break; - case ECDSA_PARAM_S: - reg = ECDSA_S_MEM; - break; - case ECDSA_PARAM_Z: - reg = ECDSA_Z_MEM; - break; - case ECDSA_PARAM_QAX: - reg = ECDSA_QAX_MEM; - break; - case ECDSA_PARAM_QAY: - reg = ECDSA_QAY_MEM; - break; - default: - HAL_ASSERT(false && "Invalid parameter"); - return; + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; } memcpy(buf, (void *)reg, len); @@ -480,22 +480,22 @@ __attribute__((always_inline)) static inline void ecdsa_ll_set_ecdsa_key_blk(ecd uint8_t efuse_blk_low = 0; uint8_t efuse_blk_high = 0; switch (curve) { - case ECDSA_CURVE_SECP192R1: - EFUSE.ecdsa.cfg_ecdsa_p192_blk = efuse_blk; - break; - case ECDSA_CURVE_SECP256R1: - EFUSE.ecdsa.cfg_ecdsa_p256_blk = efuse_blk; - break; - case ECDSA_CURVE_SECP384R1: - // ECDSA-p384 uses two efuse blocks to store the key. These two blocks are stored in a single integer - // where the least significant 4 bits store the low key block number and the next 4 more significant bits store the high key block number. - HAL_ECDSA_EXTRACT_KEY_BLOCKS(efuse_blk, efuse_blk_high, efuse_blk_low); - EFUSE.ecdsa.cfg_ecdsa_p384_h_blk = efuse_blk_high; - EFUSE.ecdsa.cfg_ecdsa_p384_l_blk = efuse_blk_low; - break; - default: - HAL_ASSERT(false && "Unsupported curve"); - break; + case ECDSA_CURVE_SECP192R1: + EFUSE.ecdsa.cfg_ecdsa_p192_blk = efuse_blk; + break; + case ECDSA_CURVE_SECP256R1: + EFUSE.ecdsa.cfg_ecdsa_p256_blk = efuse_blk; + break; + case ECDSA_CURVE_SECP384R1: + // ECDSA-p384 uses two efuse blocks to store the key. These two blocks are stored in a single integer + // where the least significant 4 bits store the low key block number and the next 4 more significant bits store the high key block number. + HAL_ECDSA_EXTRACT_KEY_BLOCKS(efuse_blk, efuse_blk_high, efuse_blk_low); + EFUSE.ecdsa.cfg_ecdsa_p384_h_blk = efuse_blk_high; + EFUSE.ecdsa.cfg_ecdsa_p384_l_blk = efuse_blk_low; + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + break; } #endif } diff --git a/components/hal/esp32p4/include/hal/hmac_ll.h b/components/esp_hal_security/esp32p4/include/hal/hmac_ll.h similarity index 99% rename from components/hal/esp32p4/include/hal/hmac_ll.h rename to components/esp_hal_security/esp32p4/include/hal/hmac_ll.h index f9bd6a650a..037c9b7a28 100644 --- a/components/hal/esp32p4/include/hal/hmac_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/hmac_ll.h @@ -84,7 +84,7 @@ static inline void hmac_ll_start(void) */ static inline void hmac_ll_config_output(hmac_hal_output_t config) { - switch(config) { + switch (config) { case HMAC_OUTPUT_USER: REG_WRITE(HMAC_SET_PARA_PURPOSE_REG, EFUSE_KEY_PURPOSE_HMAC_UP); break; @@ -141,7 +141,7 @@ static inline void hmac_ll_wait_idle(void) uint32_t query; do { query = REG_READ(HMAC_QUERY_BUSY_REG); - } while(query != 0); + } while (query != 0); } /** diff --git a/components/hal/esp32p4/include/hal/huk_ll.h b/components/esp_hal_security/esp32p4/include/hal/huk_ll.h similarity index 100% rename from components/hal/esp32p4/include/hal/huk_ll.h rename to components/esp_hal_security/esp32p4/include/hal/huk_ll.h diff --git a/components/hal/esp32p4/include/hal/key_mgr_ll.h b/components/esp_hal_security/esp32p4/include/hal/key_mgr_ll.h similarity index 66% rename from components/hal/esp32p4/include/hal/key_mgr_ll.h rename to components/esp_hal_security/esp32p4/include/hal/key_mgr_ll.h index 08a1d4610c..e22a9bb033 100644 --- a/components/hal/esp32p4/include/hal/key_mgr_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/key_mgr_ll.h @@ -137,36 +137,36 @@ static inline void key_mgr_ll_continue(void) /* @brief Enable or Disable the KEY_MGR interrupts */ static inline void key_mgr_ll_configure_interrupt(const esp_key_mgr_interrupt_type_t intr, bool en) { - switch(intr) { - case ESP_KEY_MGR_INT_PREP_DONE: - REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_PREP_DONE_INT_ENA, en); - break; - case ESP_KEY_MGR_INT_PROC_DONE: - REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_PROC_DONE_INT_ENA, en); - break; - case ESP_KEY_MGR_INT_POST_DONE: - REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_POST_DONE_INT_ENA, en); - break; - default: - return; + switch (intr) { + case ESP_KEY_MGR_INT_PREP_DONE: + REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_PREP_DONE_INT_ENA, en); + break; + case ESP_KEY_MGR_INT_PROC_DONE: + REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_PROC_DONE_INT_ENA, en); + break; + case ESP_KEY_MGR_INT_POST_DONE: + REG_SET_FIELD(KEYMNG_INT_ENA_REG, KEYMNG_POST_DONE_INT_ENA, en); + break; + default: + return; } } /* @brief Clear the KEY_MGR interrupts */ static inline void key_mgr_ll_clear_int(const esp_key_mgr_interrupt_type_t intr) { - switch(intr) { - case ESP_KEY_MGR_INT_PREP_DONE: - REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_PREP_DONE_INT_CLR, 1); - break; - case ESP_KEY_MGR_INT_PROC_DONE: - REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_PROC_DONE_INT_CLR, 1); - break; - case ESP_KEY_MGR_INT_POST_DONE: - REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_POST_DONE_INT_CLR, 1); - break; - default: - return; + switch (intr) { + case ESP_KEY_MGR_INT_PREP_DONE: + REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_PREP_DONE_INT_CLR, 1); + break; + case ESP_KEY_MGR_INT_PROC_DONE: + REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_PROC_DONE_INT_CLR, 1); + break; + case ESP_KEY_MGR_INT_POST_DONE: + REG_SET_FIELD(KEYMNG_INT_CLR_REG, KEYMNG_POST_DONE_INT_CLR, 1); + break; + default: + return; } } @@ -185,75 +185,75 @@ static inline void key_mgr_ll_use_sw_init_key(void) static inline void key_mgr_ll_set_key_usage(const esp_key_mgr_key_type_t key_type, const esp_key_mgr_key_usage_t key_usage) { switch (key_type) { - case ESP_KEY_MGR_ECDSA_KEY: - if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { - REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA); - } else { - REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA); - } - break; + case ESP_KEY_MGR_ECDSA_KEY: + if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { + REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA); + } else { + REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA); + } + break; - case ESP_KEY_MGR_FLASH_XTS_AES_KEY: - if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { - REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH); - } else { - REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH); - } - break; + case ESP_KEY_MGR_FLASH_XTS_AES_KEY: + if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { + REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH); + } else { + REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH); + } + break; #if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300 - case ESP_KEY_MGR_HMAC_KEY: - if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { - REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC); - } else { - REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC); - } - break; + case ESP_KEY_MGR_HMAC_KEY: + if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { + REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC); + } else { + REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC); + } + break; - case ESP_KEY_MGR_DS_KEY: - if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { - REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS); - } else { - REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS); - } - break; + case ESP_KEY_MGR_DS_KEY: + if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { + REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS); + } else { + REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS); + } + break; - case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: - if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { - REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM); - } else { - REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM); - } + case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: + if (key_usage == ESP_KEY_MGR_USE_EFUSE_KEY) { + REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM); + } else { + REG_CLR_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM); + } break; #endif - default: - HAL_ASSERT(false && "Unsupported key type"); - return; + default: + HAL_ASSERT(false && "Unsupported key type"); + return; } } static inline esp_key_mgr_key_usage_t key_mgr_ll_get_key_usage(esp_key_mgr_key_type_t key_type) { switch (key_type) { - case ESP_KEY_MGR_ECDSA_KEY: - return (esp_key_mgr_key_usage_t) (REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA)); + case ESP_KEY_MGR_ECDSA_KEY: + return (esp_key_mgr_key_usage_t)(REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_ECDSA)); - case ESP_KEY_MGR_FLASH_XTS_AES_KEY: - return (esp_key_mgr_key_usage_t) (REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH)); + case ESP_KEY_MGR_FLASH_XTS_AES_KEY: + return (esp_key_mgr_key_usage_t)(REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH)); #if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300 - case ESP_KEY_MGR_HMAC_KEY: - return (esp_key_mgr_key_usage_t) (REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC)); + case ESP_KEY_MGR_HMAC_KEY: + return (esp_key_mgr_key_usage_t)(REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_HMAC)); - case ESP_KEY_MGR_DS_KEY: - return (esp_key_mgr_key_usage_t) (REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS)); + case ESP_KEY_MGR_DS_KEY: + return (esp_key_mgr_key_usage_t)(REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_DS)); - case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: - return (esp_key_mgr_key_usage_t) (REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM)); + case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: + return (esp_key_mgr_key_usage_t)(REG_GET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_PSRAM)); #endif - default: - HAL_ASSERT(false && "Unsupported key type"); - return ESP_KEY_MGR_USAGE_INVALID; + default: + HAL_ASSERT(false && "Unsupported key type"); + return ESP_KEY_MGR_USAGE_INVALID; } } @@ -274,31 +274,31 @@ static inline void key_mgr_ll_lock_use_sw_init_key_reg(void) */ static inline void key_mgr_ll_lock_use_efuse_key_reg(esp_key_mgr_key_type_t key_type) { - switch(key_type) { - case ESP_KEY_MGR_ECDSA_KEY: - REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_ECDSA); - break; + switch (key_type) { + case ESP_KEY_MGR_ECDSA_KEY: + REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_ECDSA); + break; - case ESP_KEY_MGR_FLASH_XTS_AES_KEY: - REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_FLASH); - break; + case ESP_KEY_MGR_FLASH_XTS_AES_KEY: + REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_FLASH); + break; #if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300 - case ESP_KEY_MGR_HMAC_KEY: - REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_HMAC); - break; + case ESP_KEY_MGR_HMAC_KEY: + REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_HMAC); + break; - case ESP_KEY_MGR_DS_KEY: - REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_DS); - break; + case ESP_KEY_MGR_DS_KEY: + REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_DS); + break; - case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: - REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_PSRAM); - break; + case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: + REG_SET_BIT(KEYMNG_LOCK_REG, KEYMNG_USE_EFUSE_KEY_LOCK_PSRAM); + break; #endif - default: - HAL_ASSERT(false && "Unsupported key type"); - return; + default: + HAL_ASSERT(false && "Unsupported key type"); + return; } } @@ -334,49 +334,49 @@ static inline bool key_mgr_ll_is_result_success(void) static inline bool key_mgr_ll_is_key_deployment_valid(const esp_key_mgr_key_type_t key_type, const esp_key_mgr_key_len_t key_len) { switch (key_type) { - case ESP_KEY_MGR_ECDSA_KEY: - switch (key_len) { - case ESP_KEY_MGR_ECDSA_LEN_192: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_192_VLD); - case ESP_KEY_MGR_ECDSA_LEN_256: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_256_VLD); - case ESP_KEY_MGR_ECDSA_LEN_384: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_384_VLD); - default: - HAL_ASSERT(false && "Unsupported key type"); - return 0; - } + case ESP_KEY_MGR_ECDSA_KEY: + switch (key_len) { + case ESP_KEY_MGR_ECDSA_LEN_192: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_192_VLD); + case ESP_KEY_MGR_ECDSA_LEN_256: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_256_VLD); + case ESP_KEY_MGR_ECDSA_LEN_384: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_ECDSA_384_VLD); + default: + HAL_ASSERT(false && "Unsupported key type"); + return 0; + } - case ESP_KEY_MGR_FLASH_XTS_AES_KEY: - switch (key_len) { - case ESP_KEY_MGR_XTS_AES_LEN_128: - case ESP_KEY_MGR_XTS_AES_LEN_256: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_FLASH_VLD); - default: - HAL_ASSERT(false && "Unsupported key type"); - return 0; - } + case ESP_KEY_MGR_FLASH_XTS_AES_KEY: + switch (key_len) { + case ESP_KEY_MGR_XTS_AES_LEN_128: + case ESP_KEY_MGR_XTS_AES_LEN_256: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_FLASH_VLD); + default: + HAL_ASSERT(false && "Unsupported key type"); + return 0; + } #if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300 - case ESP_KEY_MGR_HMAC_KEY: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_HMAC_VLD); + case ESP_KEY_MGR_HMAC_KEY: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_HMAC_VLD); - case ESP_KEY_MGR_DS_KEY: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_DS_VLD); + case ESP_KEY_MGR_DS_KEY: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_DS_VLD); - case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: - switch (key_len) { - case ESP_KEY_MGR_XTS_AES_LEN_128: - case ESP_KEY_MGR_XTS_AES_LEN_256: - return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_PSRAM_VLD); - default: - HAL_ASSERT(false && "Unsupported key type"); - return 0; - } -#endif + case ESP_KEY_MGR_PSRAM_XTS_AES_KEY: + switch (key_len) { + case ESP_KEY_MGR_XTS_AES_LEN_128: + case ESP_KEY_MGR_XTS_AES_LEN_256: + return REG_GET_FIELD(KEYMNG_KEY_VLD_REG, KEYMNG_KEY_PSRAM_VLD); default: - HAL_ASSERT(false && "Unsupported mode"); + HAL_ASSERT(false && "Unsupported key type"); return 0; + } +#endif + default: + HAL_ASSERT(false && "Unsupported mode"); + return 0; } } @@ -410,7 +410,7 @@ static inline void key_mgr_ll_write_assist_info(const uint8_t *assist_info_buf, * @input * assist_info_buf Assist info buffer, this should be a writable buffer of size KEY_MGR_ASSIST_INFO_LEN. The buffer must be 32 bit aligned */ -static inline void key_mgr_ll_read_assist_info( uint8_t *assist_info_buf) +static inline void key_mgr_ll_read_assist_info(uint8_t *assist_info_buf) { memcpy(assist_info_buf, (uint8_t *)KEYMNG_ASSIST_INFO_MEM, KEY_MGR_ASSIST_INFO_LEN); } @@ -461,15 +461,15 @@ static inline void key_mgr_ll_set_xts_aes_key_len(const esp_key_mgr_key_type_t k } switch (key_len) { - case ESP_KEY_MGR_XTS_AES_LEN_128: - REG_CLR_BIT(KEYMNG_STATIC_REG, key_len_bit_mask); - break; - case ESP_KEY_MGR_XTS_AES_LEN_256: - REG_SET_BIT(KEYMNG_STATIC_REG, key_len_bit_mask); - break; - default: - HAL_ASSERT(false && "Unsupported key length"); - return; + case ESP_KEY_MGR_XTS_AES_LEN_128: + REG_CLR_BIT(KEYMNG_STATIC_REG, key_len_bit_mask); + break; + case ESP_KEY_MGR_XTS_AES_LEN_256: + REG_SET_BIT(KEYMNG_STATIC_REG, key_len_bit_mask); + break; + default: + HAL_ASSERT(false && "Unsupported key length"); + return; } } @@ -492,13 +492,13 @@ static inline esp_key_mgr_key_len_t key_mgr_ll_get_xts_aes_key_len(const esp_key } switch (key_len_bit) { - case 0: - return ESP_KEY_MGR_XTS_AES_LEN_128; - case 1: - return ESP_KEY_MGR_XTS_AES_LEN_256; - default: - HAL_ASSERT(false && "Unsupported key length"); - return (esp_key_mgr_key_len_t) key_len_bit; + case 0: + return ESP_KEY_MGR_XTS_AES_LEN_128; + case 1: + return ESP_KEY_MGR_XTS_AES_LEN_256; + default: + HAL_ASSERT(false && "Unsupported key length"); + return (esp_key_mgr_key_len_t) key_len_bit; } } diff --git a/components/hal/esp32p4/include/hal/mpi_ll.h b/components/esp_hal_security/esp32p4/include/hal/mpi_ll.h similarity index 100% rename from components/hal/esp32p4/include/hal/mpi_ll.h rename to components/esp_hal_security/esp32p4/include/hal/mpi_ll.h diff --git a/components/hal/esp32p4/include/hal/sha_ll.h b/components/esp_hal_security/esp32p4/include/hal/sha_ll.h similarity index 100% rename from components/hal/esp32p4/include/hal/sha_ll.h rename to components/esp_hal_security/esp32p4/include/hal/sha_ll.h diff --git a/components/hal/esp32s2/include/hal/aes_ll.h b/components/esp_hal_security/esp32s2/include/hal/aes_ll.h similarity index 97% rename from components/hal/esp32s2/include/hal/aes_ll.h rename to components/esp_hal_security/esp32s2/include/hal/aes_ll.h index 4b7c1caa25..7d18c66e42 100644 --- a/components/hal/esp32s2/include/hal/aes_ll.h +++ b/components/esp_hal_security/esp32s2/include/hal/aes_ll.h @@ -16,7 +16,6 @@ extern "C" { #endif - /** * @brief State of AES accelerator, busy, idle or done * @@ -132,11 +131,10 @@ static inline void aes_ll_read_block(void *output) for (size_t i = 0; i < AES_BLOCK_WORDS; i++) { output_word = REG_READ(AES_TEXT_OUT_BASE + (i * REG_WIDTH)); /* Memcpy to avoid potential unaligned access */ - memcpy( (uint8_t*)output + i * 4, &output_word, sizeof(output_word)); + memcpy((uint8_t*)output + i * 4, &output_word, sizeof(output_word)); } } - /** * @brief Starts block transform * @@ -166,7 +164,6 @@ static inline esp_aes_state_t aes_ll_get_state(void) return (esp_aes_state_t)REG_READ(AES_STATE_REG); } - /** * @brief Set mode of operation * @@ -219,7 +216,7 @@ static inline void aes_ll_set_iv(const uint8_t *iv) uint32_t *reg_addr_buf = (uint32_t *)(AES_IV_BASE); uint32_t iv_word; - for (int i = 0; i < IV_WORDS; i++ ) { + for (int i = 0; i < IV_WORDS; i++) { /* Memcpy to avoid potential unaligned access */ memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); REG_WRITE(®_addr_buf[i], iv_word); @@ -311,8 +308,8 @@ static inline void aes_ll_gcm_set_j0(const uint8_t *j0) uint32_t *reg_addr_buf = (uint32_t *)(AES_J_BASE); uint32_t j0_word; - for (int i = 0; i < AES_BLOCK_WORDS; i++ ) { - /* Memcpy to avoid potential unaligned access */ + for (int i = 0; i < AES_BLOCK_WORDS; i++) { + /* Memcpy to avoid potential unaligned access */ memcpy(&j0_word, j0 + 4 * i, sizeof(j0_word)); REG_WRITE(®_addr_buf[i], j0_word); } diff --git a/components/hal/esp32s2/include/hal/crypto_dma_ll.h b/components/esp_hal_security/esp32s2/include/hal/crypto_dma_ll.h similarity index 99% rename from components/hal/esp32s2/include/hal/crypto_dma_ll.h rename to components/esp_hal_security/esp32s2/include/hal/crypto_dma_ll.h index 4f8d1f36c4..10f64537f8 100644 --- a/components/hal/esp32s2/include/hal/crypto_dma_ll.h +++ b/components/esp_hal_security/esp32s2/include/hal/crypto_dma_ll.h @@ -21,7 +21,7 @@ extern "C" { #include "soc/dport_reg.h" typedef enum { - CRYPTO_DMA_AES= 0, + CRYPTO_DMA_AES = 0, CRYPTO_DMA_SHA, } crypto_dma_mode_t; @@ -127,7 +127,6 @@ static inline bool crypto_dma_ll_inlink_is_eof(void) return ((REG_READ(CRYPTO_DMA_INT_RAW_REG) & INT_RAW_IN_SUC_EOF) == INT_RAW_IN_SUC_EOF); } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32s2/include/hal/mpi_ll.h b/components/esp_hal_security/esp32s2/include/hal/mpi_ll.h similarity index 99% rename from components/hal/esp32s2/include/hal/mpi_ll.h rename to components/esp_hal_security/esp32s2/include/hal/mpi_ll.h index f764031c70..3d35e58ba0 100644 --- a/components/hal/esp32s2/include/hal/mpi_ll.h +++ b/components/esp_hal_security/esp32s2/include/hal/mpi_ll.h @@ -18,7 +18,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for MPI peripheral module * diff --git a/components/hal/esp32s2/include/hal/mpu_ll.h b/components/esp_hal_security/esp32s2/include/hal/mpu_ll.h similarity index 100% rename from components/hal/esp32s2/include/hal/mpu_ll.h rename to components/esp_hal_security/esp32s2/include/hal/mpu_ll.h diff --git a/components/hal/esp32s2/include/hal/sha_ll.h b/components/esp_hal_security/esp32s2/include/hal/sha_ll.h similarity index 100% rename from components/hal/esp32s2/include/hal/sha_ll.h rename to components/esp_hal_security/esp32s2/include/hal/sha_ll.h diff --git a/components/hal/esp32s3/include/hal/aes_ll.h b/components/esp_hal_security/esp32s3/include/hal/aes_ll.h similarity index 98% rename from components/hal/esp32s3/include/hal/aes_ll.h rename to components/esp_hal_security/esp32s3/include/hal/aes_ll.h index 2a4b978cf3..f967b3fa77 100644 --- a/components/hal/esp32s3/include/hal/aes_ll.h +++ b/components/esp_hal_security/esp32s3/include/hal/aes_ll.h @@ -127,7 +127,7 @@ static inline void aes_ll_read_block(void *output) for (size_t i = 0; i < AES_BLOCK_WORDS; i++) { output_word = REG_READ(AES_TEXT_OUT_BASE + (i * REG_WIDTH)); /* Memcpy to avoid potential unaligned access */ - memcpy( (uint8_t*)output + i * 4, &output_word, sizeof(output_word)); + memcpy((uint8_t*)output + i * 4, &output_word, sizeof(output_word)); } } @@ -140,7 +140,6 @@ static inline void aes_ll_start_transform(void) REG_WRITE(AES_TRIGGER_REG, 1); } - /** * @brief Read state of AES accelerator * @@ -151,7 +150,6 @@ static inline esp_aes_state_t aes_ll_get_state(void) return (esp_aes_state_t)REG_READ(AES_STATE_REG); } - /** * @brief Set mode of operation * @@ -204,7 +202,7 @@ static inline void aes_ll_set_iv(const uint8_t *iv) uint32_t *reg_addr_buf = (uint32_t *)(AES_IV_BASE); uint32_t iv_word; - for (int i = 0; i < IV_WORDS; i++ ) { + for (int i = 0; i < IV_WORDS; i++) { /* Memcpy to avoid potential unaligned access */ memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); REG_WRITE(®_addr_buf[i], iv_word); @@ -255,7 +253,6 @@ static inline void aes_ll_interrupt_clear(void) REG_WRITE(AES_INT_CLEAR_REG, 1); } - #ifdef __cplusplus } #endif diff --git a/components/hal/esp32s3/include/hal/ds_ll.h b/components/esp_hal_security/esp32s3/include/hal/ds_ll.h similarity index 100% rename from components/hal/esp32s3/include/hal/ds_ll.h rename to components/esp_hal_security/esp32s3/include/hal/ds_ll.h diff --git a/components/hal/esp32s3/include/hal/hmac_ll.h b/components/esp_hal_security/esp32s3/include/hal/hmac_ll.h similarity index 99% rename from components/hal/esp32s3/include/hal/hmac_ll.h rename to components/esp_hal_security/esp32s3/include/hal/hmac_ll.h index e2c6328156..07c3633f4c 100644 --- a/components/hal/esp32s3/include/hal/hmac_ll.h +++ b/components/esp_hal_security/esp32s3/include/hal/hmac_ll.h @@ -80,7 +80,7 @@ static inline void hmac_ll_start(void) */ static inline void hmac_ll_config_output(hmac_hal_output_t config) { - switch(config) { + switch (config) { case HMAC_OUTPUT_USER: REG_WRITE(HMAC_SET_PARA_PURPOSE_REG, HMAC_LL_EFUSE_KEY_PURPOSE_UP); break; @@ -137,7 +137,7 @@ static inline void hmac_ll_wait_idle(void) uint32_t query; do { query = REG_READ(HMAC_QUERY_BUSY_REG); - } while(query != 0); + } while (query != 0); } /** diff --git a/components/hal/esp32s3/include/hal/mpi_ll.h b/components/esp_hal_security/esp32s3/include/hal/mpi_ll.h similarity index 99% rename from components/hal/esp32s3/include/hal/mpi_ll.h rename to components/esp_hal_security/esp32s3/include/hal/mpi_ll.h index 785e6f8711..ff710b30b2 100644 --- a/components/hal/esp32s3/include/hal/mpi_ll.h +++ b/components/esp_hal_security/esp32s3/include/hal/mpi_ll.h @@ -19,7 +19,6 @@ extern "C" { #endif - /** * @brief Enable the bus clock for MPI peripheral module * diff --git a/components/hal/esp32s3/include/hal/mpu_ll.h b/components/esp_hal_security/esp32s3/include/hal/mpu_ll.h similarity index 100% rename from components/hal/esp32s3/include/hal/mpu_ll.h rename to components/esp_hal_security/esp32s3/include/hal/mpu_ll.h diff --git a/components/hal/esp32s3/include/hal/sha_ll.h b/components/esp_hal_security/esp32s3/include/hal/sha_ll.h similarity index 100% rename from components/hal/esp32s3/include/hal/sha_ll.h rename to components/esp_hal_security/esp32s3/include/hal/sha_ll.h diff --git a/components/hal/hmac_hal.c b/components/esp_hal_security/hmac_hal.c similarity index 97% rename from components/hal/hmac_hal.c rename to components/esp_hal_security/hmac_hal.c index fc77233848..4bf2426b18 100644 --- a/components/hal/hmac_hal.c +++ b/components/esp_hal_security/hmac_hal.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/hal/huk_hal.c b/components/esp_hal_security/huk_hal.c similarity index 94% rename from components/hal/huk_hal.c rename to components/esp_hal_security/huk_hal.c index 21f1a12959..22de4d30ef 100644 --- a/components/hal/huk_hal.c +++ b/components/esp_hal_security/huk_hal.c @@ -1,11 +1,10 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ // The HAL layer for Hardware Unique Key(HUK) Generator - #include "hal/huk_hal.h" #include "hal/huk_ll.h" #include "hal/huk_types.h" diff --git a/components/hal/include/hal/aes_hal.h b/components/esp_hal_security/include/hal/aes_hal.h similarity index 99% rename from components/hal/include/hal/aes_hal.h rename to components/esp_hal_security/include/hal/aes_hal.h index 3cb661ecc2..3398915644 100644 --- a/components/hal/include/hal/aes_hal.h +++ b/components/esp_hal_security/include/hal/aes_hal.h @@ -25,7 +25,6 @@ extern "C" { #endif - /** * @brief Sets the key used for AES encryption/decryption * @@ -114,7 +113,6 @@ void aes_hal_transform_dma_finish(void); */ #define aes_hal_interrupt_clear() aes_ll_interrupt_clear() - #if SOC_AES_SUPPORT_GCM /** * @brief Calculates the Hash sub-key H0 needed to start AES-GCM @@ -159,7 +157,6 @@ void aes_hal_gcm_read_tag(uint8_t *tag, size_t tag_len); #endif //SOC_AES_SUPPORT_DMA - #ifdef __cplusplus } #endif diff --git a/components/hal/include/hal/aes_types.h b/components/esp_hal_security/include/hal/aes_types.h similarity index 99% rename from components/hal/include/hal/aes_types.h rename to components/esp_hal_security/include/hal/aes_types.h index 1b6462763f..9393e0bc4c 100644 --- a/components/hal/include/hal/aes_types.h +++ b/components/esp_hal_security/include/hal/aes_types.h @@ -13,7 +13,6 @@ extern "C" { #define ESP_AES_ENCRYPT 1 #define ESP_AES_DECRYPT 0 - /* DMA AES working modes*/ typedef enum { ESP_AES_BLOCK_MODE_ECB = 0, diff --git a/components/hal/include/hal/apm_hal.h b/components/esp_hal_security/include/hal/apm_hal.h similarity index 98% rename from components/hal/include/hal/apm_hal.h rename to components/esp_hal_security/include/hal/apm_hal.h index 99db81a991..80c5026118 100644 --- a/components/hal/include/hal/apm_hal.h +++ b/components/esp_hal_security/include/hal/apm_hal.h @@ -35,7 +35,7 @@ typedef struct { * @param enable Permission enable/disable */ void apm_hal_hp_peri_access_enable(apm_ll_master_id_t master_id, apm_ll_hp_peri_t hp_peri, - apm_ll_secure_mode_t sec_mode, bool enable); + apm_ll_secure_mode_t sec_mode, bool enable); /** * @brief Configure LP peripherals access permission for the LP CPU. @@ -53,7 +53,7 @@ void apm_hal_lp_peri_access_enable(apm_ll_lp_peri_t lp_peri, bool enable); * @param regn_high_addr Configurable address range end address. */ void apm_hal_peri_region_config(uint32_t regn_num, uint32_t regn_low_addr, - uint32_t regn_high_addr); + uint32_t regn_high_addr); /** * @brief Configure peripherals configurable address ranges. @@ -67,7 +67,7 @@ void apm_hal_peri_region_config(uint32_t regn_num, uint32_t regn_low_addr, * @return Configuration performed successfully? */ int apm_hal_peri_region_pms(apm_ll_master_id_t master_id, apm_ll_secure_mode_t sec_mode, - uint32_t regn_num, uint32_t regn_pms); + uint32_t regn_num, uint32_t regn_pms); /** * @brief Configure APM controller clock gating. @@ -100,7 +100,6 @@ void apm_hal_dma_region_config(uint32_t regn_num, uint32_t regn_low_addr, uint32 */ void apm_hal_dma_region_pms(apm_hal_dma_region_config_data_t *pms_data); - #else /** @@ -115,7 +114,6 @@ void apm_hal_dma_region_pms(apm_hal_dma_region_config_data_t *pms_data); .regn_pms = (PMS), \ .filter_en = true - #if SOC_APM_SUPPORT_CTRL_CFG_LOCK #define APM_HAL_REGION_ENTRY(PATH, NUM, START, END, PMS, LOCK) \ { APM_HAL_REGION_ENTRY_BASE(PATH, NUM, START, END, PMS), .lock_en = LOCK } diff --git a/components/hal/include/hal/apm_types.h b/components/esp_hal_security/include/hal/apm_types.h similarity index 100% rename from components/hal/include/hal/apm_types.h rename to components/esp_hal_security/include/hal/apm_types.h diff --git a/components/hal/include/hal/ds_hal.h b/components/esp_hal_security/include/hal/ds_hal.h similarity index 100% rename from components/hal/include/hal/ds_hal.h rename to components/esp_hal_security/include/hal/ds_hal.h diff --git a/components/hal/include/hal/ds_types.h b/components/esp_hal_security/include/hal/ds_types.h similarity index 100% rename from components/hal/include/hal/ds_types.h rename to components/esp_hal_security/include/hal/ds_types.h diff --git a/components/hal/include/hal/ecc_hal.h b/components/esp_hal_security/include/hal/ecc_hal.h similarity index 100% rename from components/hal/include/hal/ecc_hal.h rename to components/esp_hal_security/include/hal/ecc_hal.h diff --git a/components/hal/include/hal/ecc_types.h b/components/esp_hal_security/include/hal/ecc_types.h similarity index 100% rename from components/hal/include/hal/ecc_types.h rename to components/esp_hal_security/include/hal/ecc_types.h diff --git a/components/hal/include/hal/ecdsa_hal.h b/components/esp_hal_security/include/hal/ecdsa_hal.h similarity index 98% rename from components/hal/include/hal/ecdsa_hal.h rename to components/esp_hal_security/include/hal/ecdsa_hal.h index 15b4d030b7..922232dd69 100644 --- a/components/hal/include/hal/ecdsa_hal.h +++ b/components/esp_hal_security/include/hal/ecdsa_hal.h @@ -59,7 +59,7 @@ typedef struct { * @param len Length of the r_out and s_out buffer (32 bytes for SECP256R1, 24 for SECP192R1) */ void ecdsa_hal_gen_signature(ecdsa_hal_config_t *conf, const uint8_t *hash, - uint8_t *r_out, uint8_t *s_out, uint16_t len); + uint8_t *r_out, uint8_t *s_out, uint16_t len); /** * @brief Verify given ECDSA signature diff --git a/components/hal/include/hal/ecdsa_types.h b/components/esp_hal_security/include/hal/ecdsa_types.h similarity index 100% rename from components/hal/include/hal/ecdsa_types.h rename to components/esp_hal_security/include/hal/ecdsa_types.h diff --git a/components/hal/include/hal/hmac_hal.h b/components/esp_hal_security/include/hal/hmac_hal.h similarity index 100% rename from components/hal/include/hal/hmac_hal.h rename to components/esp_hal_security/include/hal/hmac_hal.h diff --git a/components/hal/include/hal/hmac_types.h b/components/esp_hal_security/include/hal/hmac_types.h similarity index 100% rename from components/hal/include/hal/hmac_types.h rename to components/esp_hal_security/include/hal/hmac_types.h diff --git a/components/hal/include/hal/huk_hal.h b/components/esp_hal_security/include/hal/huk_hal.h similarity index 100% rename from components/hal/include/hal/huk_hal.h rename to components/esp_hal_security/include/hal/huk_hal.h diff --git a/components/hal/include/hal/huk_types.h b/components/esp_hal_security/include/hal/huk_types.h similarity index 100% rename from components/hal/include/hal/huk_types.h rename to components/esp_hal_security/include/hal/huk_types.h diff --git a/components/hal/include/hal/key_mgr_hal.h b/components/esp_hal_security/include/hal/key_mgr_hal.h similarity index 100% rename from components/hal/include/hal/key_mgr_hal.h rename to components/esp_hal_security/include/hal/key_mgr_hal.h diff --git a/components/hal/include/hal/key_mgr_types.h b/components/esp_hal_security/include/hal/key_mgr_types.h similarity index 100% rename from components/hal/include/hal/key_mgr_types.h rename to components/esp_hal_security/include/hal/key_mgr_types.h diff --git a/components/hal/include/hal/mpi_hal.h b/components/esp_hal_security/include/hal/mpi_hal.h similarity index 100% rename from components/hal/include/hal/mpi_hal.h rename to components/esp_hal_security/include/hal/mpi_hal.h diff --git a/components/hal/include/hal/mpi_types.h b/components/esp_hal_security/include/hal/mpi_types.h similarity index 99% rename from components/hal/include/hal/mpi_types.h rename to components/esp_hal_security/include/hal/mpi_types.h index c38fbe19c1..e291f662c8 100644 --- a/components/hal/include/hal/mpi_types.h +++ b/components/esp_hal_security/include/hal/mpi_types.h @@ -9,7 +9,6 @@ extern "C" { #endif - typedef enum { MPI_MULT = 0x0, // (X * Y) MPI_MODMULT, // (X * Y) Mod M diff --git a/components/hal/include/hal/mpu_hal.h b/components/esp_hal_security/include/hal/mpu_hal.h similarity index 100% rename from components/hal/include/hal/mpu_hal.h rename to components/esp_hal_security/include/hal/mpu_hal.h diff --git a/components/hal/include/hal/mpu_types.h b/components/esp_hal_security/include/hal/mpu_types.h similarity index 100% rename from components/hal/include/hal/mpu_types.h rename to components/esp_hal_security/include/hal/mpu_types.h diff --git a/components/hal/include/hal/sha_hal.h b/components/esp_hal_security/include/hal/sha_hal.h similarity index 100% rename from components/hal/include/hal/sha_hal.h rename to components/esp_hal_security/include/hal/sha_hal.h diff --git a/components/hal/include/hal/sha_types.h b/components/esp_hal_security/include/hal/sha_types.h similarity index 100% rename from components/hal/include/hal/sha_types.h rename to components/esp_hal_security/include/hal/sha_types.h diff --git a/components/hal/key_mgr_hal.c b/components/esp_hal_security/key_mgr_hal.c similarity index 97% rename from components/hal/key_mgr_hal.c rename to components/esp_hal_security/key_mgr_hal.c index 9a9c281238..7ef544848b 100644 --- a/components/hal/key_mgr_hal.c +++ b/components/esp_hal_security/key_mgr_hal.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/hal/mpi_hal.c b/components/esp_hal_security/mpi_hal.c similarity index 95% rename from components/hal/mpi_hal.c rename to components/esp_hal_security/mpi_hal.c index 47ccba4c56..fbc72da915 100644 --- a/components/hal/mpi_hal.c +++ b/components/esp_hal_security/mpi_hal.c @@ -30,10 +30,9 @@ void mpi_hal_disable_hardware_hw_op(void) void mpi_hal_interrupt_enable(bool enable) { - if (enable){ + if (enable) { mpi_ll_enable_interrupt(); - } - else { + } else { mpi_ll_disable_interrupt(); } } @@ -72,20 +71,18 @@ void mpi_hal_write_rinv(uint32_t rinv) #if !SOC_IS(ESP32) void mpi_hal_enable_constant_time(bool enable) { - if (enable){ + if (enable) { mpi_ll_enable_constant_time(); - } - else { + } else { mpi_ll_disable_constant_time(); } } void mpi_hal_enable_search(bool enable) { - if (enable){ + if (enable) { mpi_ll_enable_search(); - } - else { + } else { mpi_ll_disable_search(); } } diff --git a/components/esp_hal_security/mpu_hal.c b/components/esp_hal_security/mpu_hal.c new file mode 100644 index 0000000000..eb2d8c01f3 --- /dev/null +++ b/components/esp_hal_security/mpu_hal.c @@ -0,0 +1,48 @@ +/* + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "esp_err.h" + +#include "hal/mpu_hal.h" +#include "hal/mpu_ll.h" +#include "hal/mpu_types.h" + +#include "soc/soc_caps.h" + +void mpu_hal_set_region_access(int id, mpu_access_t access) +{ + uint32_t addr = mpu_ll_id_to_addr(id); + + switch (access) { +#if SOC_MPU_REGION_RO_SUPPORTED + case MPU_REGION_RO: + mpu_ll_set_region_ro(addr); + break; +#endif +#if SOC_MPU_REGION_WO_SUPPORTED + case MPU_REGION_WO: + mpu_ll_set_region_wo(addr); + break; +#endif + case MPU_REGION_RW: + mpu_ll_set_region_rw(addr); + break; + case MPU_REGION_X: + mpu_ll_set_region_x(addr); + break; + case MPU_REGION_RWX: + mpu_ll_set_region_rwx(addr); + break; + case MPU_REGION_ILLEGAL: + mpu_ll_set_region_illegal(addr); + break; + default: + break; + } +} diff --git a/components/hal/sha_hal.c b/components/esp_hal_security/sha_hal.c similarity index 98% rename from components/hal/sha_hal.c rename to components/esp_hal_security/sha_hal.c index 6ab4068464..d7da7f4fe6 100644 --- a/components/hal/sha_hal.c +++ b/components/esp_hal_security/sha_hal.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -13,7 +13,6 @@ #include "hal/sha_ll.h" #include "soc/soc_caps.h" - #define SHA1_STATE_LEN_WORDS (160 / 32) #define SHA256_STATE_LEN_WORDS (256 / 32) #define SHA512_STATE_LEN_WORDS (512 / 32) diff --git a/components/hal/test_apps/crypto/CMakeLists.txt b/components/esp_hal_security/test_apps/crypto/CMakeLists.txt similarity index 100% rename from components/hal/test_apps/crypto/CMakeLists.txt rename to components/esp_hal_security/test_apps/crypto/CMakeLists.txt diff --git a/components/hal/test_apps/crypto/README.md b/components/esp_hal_security/test_apps/crypto/README.md similarity index 100% rename from components/hal/test_apps/crypto/README.md rename to components/esp_hal_security/test_apps/crypto/README.md diff --git a/components/hal/test_apps/crypto/components/mbedtls/include/CMakeLists.txt b/components/esp_hal_security/test_apps/crypto/components/mbedtls/include/CMakeLists.txt similarity index 100% rename from components/hal/test_apps/crypto/components/mbedtls/include/CMakeLists.txt rename to components/esp_hal_security/test_apps/crypto/components/mbedtls/include/CMakeLists.txt diff --git a/components/hal/test_apps/crypto/components/mbedtls/include/aes.h b/components/esp_hal_security/test_apps/crypto/components/mbedtls/include/aes.h similarity index 100% rename from components/hal/test_apps/crypto/components/mbedtls/include/aes.h rename to components/esp_hal_security/test_apps/crypto/components/mbedtls/include/aes.h diff --git a/components/hal/test_apps/crypto/components/mbedtls/include/cipher.h b/components/esp_hal_security/test_apps/crypto/components/mbedtls/include/cipher.h similarity index 100% rename from components/hal/test_apps/crypto/components/mbedtls/include/cipher.h rename to components/esp_hal_security/test_apps/crypto/components/mbedtls/include/cipher.h diff --git a/components/hal/test_apps/crypto/components/mbedtls/include/error.h b/components/esp_hal_security/test_apps/crypto/components/mbedtls/include/error.h similarity index 100% rename from components/hal/test_apps/crypto/components/mbedtls/include/error.h rename to components/esp_hal_security/test_apps/crypto/components/mbedtls/include/error.h diff --git a/components/hal/test_apps/crypto/components/mbedtls/include/platform_util.h b/components/esp_hal_security/test_apps/crypto/components/mbedtls/include/platform_util.h similarity index 71% rename from components/hal/test_apps/crypto/components/mbedtls/include/platform_util.h rename to components/esp_hal_security/test_apps/crypto/components/mbedtls/include/platform_util.h index 8a09f30950..7b62bc8559 100644 --- a/components/hal/test_apps/crypto/components/mbedtls/include/platform_util.h +++ b/components/esp_hal_security/test_apps/crypto/components/mbedtls/include/platform_util.h @@ -5,7 +5,7 @@ */ #include -static inline void mbedtls_platform_zeroize( void *buf, size_t len ) +static inline void mbedtls_platform_zeroize(void *buf, size_t len) { bzero(buf, len); } diff --git a/components/hal/test_apps/crypto/components/mbedtls/include/sha256.h b/components/esp_hal_security/test_apps/crypto/components/mbedtls/include/sha256.h similarity index 100% rename from components/hal/test_apps/crypto/components/mbedtls/include/sha256.h rename to components/esp_hal_security/test_apps/crypto/components/mbedtls/include/sha256.h diff --git a/components/hal/test_apps/crypto/main/CMakeLists.txt b/components/esp_hal_security/test_apps/crypto/main/CMakeLists.txt similarity index 100% rename from components/hal/test_apps/crypto/main/CMakeLists.txt rename to components/esp_hal_security/test_apps/crypto/main/CMakeLists.txt diff --git a/components/hal/test_apps/crypto/main/Kconfig.projbuild b/components/esp_hal_security/test_apps/crypto/main/Kconfig.projbuild similarity index 100% rename from components/hal/test_apps/crypto/main/Kconfig.projbuild rename to components/esp_hal_security/test_apps/crypto/main/Kconfig.projbuild diff --git a/components/hal/test_apps/crypto/main/aes/test_aes.c b/components/esp_hal_security/test_apps/crypto/main/aes/test_aes.c similarity index 98% rename from components/hal/test_apps/crypto/main/aes/test_aes.c rename to components/esp_hal_security/test_apps/crypto/main/aes/test_aes.c index 9069d0f5d0..d075fa4ac6 100644 --- a/components/hal/test_apps/crypto/main/aes/test_aes.c +++ b/components/esp_hal_security/test_apps/crypto/main/aes/test_aes.c @@ -57,13 +57,11 @@ static void test_cbc_aes(size_t buffer_size, const uint8_t expected_cipher_end[3 TEST_ASSERT_EQUAL(0, esp_aes_crypt_cbc(&ctx, ESP_AES_ENCRYPT, buffer_size, nonce, plaintext, ciphertext)); TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher_end, ciphertext + buffer_size - 32, 32); - // Decrypt memcpy(nonce, iv, 16); TEST_ASSERT_EQUAL(0, esp_aes_crypt_cbc(&ctx, ESP_AES_DECRYPT, buffer_size, nonce, ciphertext, decryptedtext)); TEST_ASSERT_EQUAL_HEX8_ARRAY(plaintext, decryptedtext, buffer_size); - esp_aes_free(&ctx); // Free dynamically allocated memory @@ -347,11 +345,13 @@ TEST(aes, gcm_aes_dma_test) size_t length = 16; const uint8_t expected_last_block[16] = { 0x37, 0x99, 0x4b, 0x16, 0x5f, 0x8d, 0x27, 0xb1, - 0x60, 0x72, 0x9a, 0x81, 0x8d, 0x3c, 0x69, 0x66}; + 0x60, 0x72, 0x9a, 0x81, 0x8d, 0x3c, 0x69, 0x66 + }; const uint8_t expected_tag[16] = { 0x45, 0xc2, 0xa8, 0xfe, 0xff, 0x49, 0x1f, 0x45, - 0x8e, 0x29, 0x74, 0x41, 0xed, 0x9b, 0x54, 0x28}; + 0x8e, 0x29, 0x74, 0x41, 0xed, 0x9b, 0x54, 0x28 + }; test_gcm_aes(length, expected_last_block, expected_tag); } @@ -363,11 +363,13 @@ TEST(aes, gcm_aes_long_dma_test) size_t length = 5000; const uint8_t expected_last_block[16] = { 0xee, 0xfd, 0xab, 0x2a, 0x09, 0x44, 0x41, 0x6a, - 0x91, 0xb0, 0x74, 0x24, 0xee, 0x35, 0xb1, 0x39}; + 0x91, 0xb0, 0x74, 0x24, 0xee, 0x35, 0xb1, 0x39 + }; const uint8_t expected_tag[16] = { 0x22, 0xe1, 0x22, 0x34, 0x0c, 0x91, 0x0b, 0xcf, - 0xa3, 0x42, 0xe0, 0x48, 0xe6, 0xfe, 0x2e, 0x28}; + 0xa3, 0x42, 0xe0, 0x48, 0xe6, 0xfe, 0x2e, 0x28 + }; test_gcm_aes(length, expected_last_block, expected_tag); } diff --git a/components/hal/test_apps/crypto/main/aes/test_params.h b/components/esp_hal_security/test_apps/crypto/main/aes/test_params.h similarity index 100% rename from components/hal/test_apps/crypto/main/aes/test_params.h rename to components/esp_hal_security/test_apps/crypto/main/aes/test_params.h diff --git a/components/hal/test_apps/crypto/main/app_main.c b/components/esp_hal_security/test_apps/crypto/main/app_main.c similarity index 100% rename from components/hal/test_apps/crypto/main/app_main.c rename to components/esp_hal_security/test_apps/crypto/main/app_main.c diff --git a/components/hal/test_apps/crypto/main/ds/digital_signature_test_cases_3072.h b/components/esp_hal_security/test_apps/crypto/main/ds/digital_signature_test_cases_3072.h similarity index 50% rename from components/hal/test_apps/crypto/main/ds/digital_signature_test_cases_3072.h rename to components/esp_hal_security/test_apps/crypto/main/ds/digital_signature_test_cases_3072.h index 70fe3c48c7..e7616a58f5 100644 --- a/components/hal/test_apps/crypto/main/ds/digital_signature_test_cases_3072.h +++ b/components/esp_hal_security/test_apps/crypto/main/ds/digital_signature_test_cases_3072.h @@ -11,35 +11,35 @@ #define NUM_HMAC_KEYS 3 static const uint8_t test_hmac_keys[NUM_HMAC_KEYS][32] = { - { 0x28, 0x5e, 0x24, 0x5c, 0x93, 0x57, 0x14, 0x75, 0x3b, 0x2d, 0x80, 0x31, 0x4d, 0x6f, 0xe2, 0x55, 0x4e, 0x2c, 0xcd, 0xd5, 0xec, 0xfa, 0x1c, 0x93, 0xac, 0xe8, 0x57, 0x90, 0x93, 0x9f, 0x4b, 0xf9 }, - { 0xee, 0x94, 0xa4, 0x30, 0xb6, 0x3d, 0xf2, 0x4f, 0x00, 0x45, 0xa8, 0xca, 0x22, 0xff, 0xc8, 0xad, 0xb8, 0x0c, 0xe7, 0x38, 0x1f, 0xbc, 0x50, 0xde, 0xde, 0xa1, 0x2a, 0x1e, 0xed, 0x9f, 0x38, 0x62 }, - { 0x5f, 0xce, 0xad, 0x48, 0x15, 0xfa, 0xdc, 0xb0, 0xcc, 0xb8, 0x43, 0xd5, 0x31, 0x73, 0xaa, 0x7f, 0xeb, 0x4a, 0x87, 0x24, 0x74, 0x09, 0x61, 0x40, 0x87, 0xb2, 0xf7, 0x12, 0xa5, 0x21, 0xbd, 0x82 }, + { 0x28, 0x5e, 0x24, 0x5c, 0x93, 0x57, 0x14, 0x75, 0x3b, 0x2d, 0x80, 0x31, 0x4d, 0x6f, 0xe2, 0x55, 0x4e, 0x2c, 0xcd, 0xd5, 0xec, 0xfa, 0x1c, 0x93, 0xac, 0xe8, 0x57, 0x90, 0x93, 0x9f, 0x4b, 0xf9 }, + { 0xee, 0x94, 0xa4, 0x30, 0xb6, 0x3d, 0xf2, 0x4f, 0x00, 0x45, 0xa8, 0xca, 0x22, 0xff, 0xc8, 0xad, 0xb8, 0x0c, 0xe7, 0x38, 0x1f, 0xbc, 0x50, 0xde, 0xde, 0xa1, 0x2a, 0x1e, 0xed, 0x9f, 0x38, 0x62 }, + { 0x5f, 0xce, 0xad, 0x48, 0x15, 0xfa, 0xdc, 0xb0, 0xcc, 0xb8, 0x43, 0xd5, 0x31, 0x73, 0xaa, 0x7f, 0xeb, 0x4a, 0x87, 0x24, 0x74, 0x09, 0x61, 0x40, 0x87, 0xb2, 0xf7, 0x12, 0xa5, 0x21, 0xbd, 0x82 }, }; #define NUM_MESSAGES 10 -static const uint32_t test_messages[NUM_MESSAGES][3072/32] = { - // Message 0 - { 0xc3eeaca0, 0x145f499b, 0x4f6672c8, 0xe3be2eb4, 0x9bfc988d, 0x71ec0875, 0x8164f886, 0x17764392, 0x9739494d, 0x157fbaff, 0x22261fcd, 0xda824830, 0x463fb24c, 0x82264d6d, 0xf44cbee0, 0xfa2b8f70, 0x690ada68, 0x9a6f2fa1, 0x90e906d7, 0xbb77c9ee, 0x8cf45369, 0x97c74667, 0x65e31e23, 0xfbcd0d1a, 0x48743eeb, 0xd712ef62, 0x9c63d708, 0x776f25f6, 0x3eb30e2f, 0x428cbb76, 0xfd52cdbe, 0x0ab79293, 0x92444804, 0x989b940f, 0x49a74f17, 0xf2e98a77, 0x95682db5, 0xcda9c931, 0xe08ef8e0, 0x96e13ff5, 0x98475c25, 0x65667a05, 0xf3fca982, 0x1859b057, 0x01c91f26, 0xbf65df10, 0xa780ce07, 0x1fdb409a, 0x103d3382, 0xa369797c, 0xf028dfb6, 0xc4818df7, 0x08e01187, 0x2ea49432, 0x8174befe, 0xd7c91f9a, 0xc639985a, 0x1516863d, 0xfbaf413b, 0x5dc0faa9, 0x2248ade2, 0xc9cbb936, 0x91498a3d, 0xe72c22ff, 0xdfec98cf, 0x22ae559f, 0x5f93e271, 0xf879f63e, 0x6e41f357, 0x88cdfbee, 0xe5079bf1, 0xcf583f87, 0x67df5bee, 0xfbf2176c, 0x200f5f17, 0xd65e292e, 0x55018a0b, 0x1d89b23f, 0xfe702a98, 0x67dc3045, 0xbcde65d9, 0xa5b02ce4, 0x3f5475c2, 0x6ece0e1d, 0x64173690, 0xef552745, 0xde23a986, 0x6b2074f5, 0x781083ec, 0x42a8e469, 0x9075a526, 0x5fe2a8fc, 0xd3eef969, 0x3e270a4b, 0x01f0a7c8, 0x1ea42d07 }, - // Message 1 - { 0x7a1c7286, 0x7073526a, 0xa3b5dee2, 0xb20475b8, 0xe2ef8cb6, 0x3f3101e0, 0xb4008e2a, 0x3bb40a0e, 0x0f02dc62, 0x829a1f98, 0xa597c0b8, 0x015621ff, 0x34dec9d2, 0xd71bf2a2, 0xeeb0ca8e, 0x2b808183, 0x0ffad76f, 0x251ccbe1, 0xcc7a1d6c, 0x37cc14ae, 0x83ea4a30, 0xf57572aa, 0x15534228, 0xd9663dbb, 0x12e5fe52, 0x7b55d2cd, 0x5e303152, 0xe8665060, 0x14a16b0d, 0xffcc6665, 0xedb83d5c, 0xc02fc630, 0x67257bc7, 0x3890d4ca, 0x8e99f454, 0x84e52fbc, 0x99e09a32, 0xa431f208, 0x9b01d2dc, 0xd494be38, 0xdd536f81, 0x459b70a1, 0x8bdf94c7, 0xb11fbce6, 0x799fedce, 0x9f79cc5d, 0x68848129, 0x8629a36b, 0x5cf0dd2d, 0xb6cf3609, 0x64a1584f, 0x819a68f7, 0x77ad79b3, 0x9a8e8478, 0x25b94b80, 0xa2e9c895, 0xb0bbc126, 0x6291b5a7, 0x2ebf03e6, 0x7a080b9b, 0x3f9c8b9e, 0xa1ac613a, 0xe0315545, 0xeefbb06e, 0x7a0d621f, 0xc9983872, 0x40a42164, 0xb45363bb, 0xdc601819, 0xf596576e, 0xc96ab311, 0x3bbf9993, 0x96735365, 0xf8640fa2, 0x298597e6, 0xa42e997e, 0xc9fcd5e2, 0x0e69250e, 0x01a07595, 0x4904c73a, 0x0a940d6e, 0x83ecabbc, 0x10eb1454, 0x58cafd34, 0xe6c43dd7, 0x31168a19, 0xa24a1e81, 0x3b3de706, 0x68774552, 0x88175387, 0xef6cfc05, 0x4f060806, 0x56ae9157, 0xf7d4ad91, 0x2bb5f817, 0x5f7d11d6 }, - // Message 2 - { 0xa1dea256, 0x76df4ce8, 0x623f895d, 0x47276dbf, 0xa07b8313, 0xbe6514c0, 0x7b4de323, 0x1ff58fd6, 0xd7bf4cb0, 0xe3f241c6, 0x7875dd19, 0x656978e1, 0x922c9782, 0x8d944859, 0xb7a5019f, 0x0e0e74c3, 0x44d2f82e, 0x6671cc9a, 0x97ef9c1c, 0x3a900f53, 0x3246be9a, 0xa2d44e99, 0x1ed77873, 0xa139826d, 0xa7849972, 0x5e1b37e4, 0xf5979ce1, 0xd116a9e0, 0x9948fdac, 0xb08d0cac, 0x59a640a0, 0xebffeac6, 0x944b3101, 0x3d7b9cf2, 0x98404104, 0x712b4df0, 0x9b96bad7, 0x297dea1f, 0xe49df71a, 0xb8a4e00f, 0x69cc679c, 0x4f3fe52b, 0x67cf293c, 0xf28fe411, 0x504fe6c6, 0xe4484e46, 0xe15598e5, 0x45fc270f, 0x176f441c, 0xca57dcfb, 0xb1c85752, 0x339085d6, 0x4512048f, 0x52990e46, 0xb7f320b0, 0x681f291f, 0x8896c088, 0x227c4037, 0x576f7cdb, 0x7401fa6c, 0xc619e211, 0x0a9858de, 0x39d5ee5b, 0x554b6b6d, 0xa677922b, 0xdecd414c, 0x3126c77d, 0x07d038a6, 0x9e530272, 0x31b1b76e, 0x472ebb79, 0x22c6a00d, 0x0acce5e2, 0xf14ddc6d, 0x0a0ec86f, 0xf7358b56, 0xfab446eb, 0x75fff60e, 0x648c06a8, 0x6727ad03, 0xf754d2e7, 0x8f2c6fa6, 0x8982916d, 0x95103f6d, 0x4e89ee28, 0x7b6fb0cd, 0x71f211a4, 0xd1412fad, 0x416c4623, 0x7ded29b6, 0x6e03e6b3, 0x7f1b0af8, 0x38129536, 0xd42af72d, 0xa88fcdd2, 0x56f52ffb }, - // Message 3 - { 0xcba3ec40, 0x8e9870af, 0x435e826a, 0x24f0043a, 0xe135b65d, 0xa5269a0a, 0xae1e5c71, 0x5f92ddae, 0x468ea421, 0xe3fa1cae, 0x13753cef, 0xb5f38fc5, 0x657323cb, 0x03f917be, 0x43be579e, 0xc377242b, 0x143ba2d1, 0x930eefbc, 0xed0ce77b, 0xa68cb224, 0x5119d5e5, 0x1d29ba06, 0xea6a19a3, 0x58561410, 0x61d4249c, 0x06c89a90, 0x7cc56f0b, 0x696825e3, 0x2c6c1f6c, 0x7132b88a, 0x2e3afcc2, 0x3de924ab, 0x9ebaf1b7, 0xf1bd2a4b, 0x695af713, 0x50c8d4fc, 0x7b3ba186, 0x4f117ed4, 0x499e9aeb, 0x47bcc734, 0x5d220224, 0x2cd763f6, 0xefe6ce2b, 0xd2c71a86, 0x16f45158, 0xfe216ee5, 0x363fbef9, 0xc3ddf66a, 0x6ae95b6f, 0x57ee7f8d, 0xcb022b41, 0x5ae22c6d, 0xbdcce81d, 0xd4285f21, 0xa84a2825, 0x3b9addfa, 0x63ae24d3, 0x15cc9e4a, 0xe55c69d7, 0xb0e3b2ba, 0x79644a64, 0xfc027806, 0xf44cdf5f, 0x57d978a5, 0x62db858d, 0x4f316e10, 0x3f592569, 0xe77939af, 0xb1a58024, 0xef48c542, 0xd5f3bbcf, 0x717535b9, 0x7f2a5491, 0xc74b15e5, 0x30bd7b9f, 0xa9ab7827, 0x59a2845e, 0xc2926b40, 0xc2402dbe, 0xaf3c7ff8, 0x919cce5a, 0x66e21bc8, 0xd6095e37, 0x3d3ebcbb, 0xc0b8c2f7, 0xea5a3027, 0xb1610dbe, 0x55d5a073, 0x42c7f62b, 0x1daac5d7, 0xc0add0c4, 0x5d0898ee, 0xa11cc859, 0x68beb29c, 0x902c7eb0, 0x7b202e0f }, - // Message 4 - { 0xf07c2643, 0x38e2657b, 0xae5f2b4b, 0xdb2e2d35, 0x03c4fee6, 0x6ef7341d, 0xe16ea957, 0x8fc81e9d, 0x9b15db0e, 0x2a1a5c6b, 0x4d5a6630, 0x8e3b7905, 0x9ccfbad6, 0x8e86717e, 0x35043adb, 0xe3026b2b, 0x843f4b71, 0x63f4f111, 0x2e185601, 0x3b9916d3, 0x8a736073, 0xa801feb1, 0x46548286, 0xb64e9b7e, 0xf87fa1d9, 0x20928964, 0x8379106f, 0x2a857cc8, 0x0e219f79, 0x5929ab6c, 0x7beae2c5, 0xbf6a0fc2, 0xf7be862b, 0xeaaf8ea2, 0xf2d6c3e1, 0x570499fe, 0x475ecbd1, 0xbd49866a, 0x8dcbaeeb, 0xfa3f75ae, 0x6e9cbe8a, 0x25a4d6c3, 0x8d9fd682, 0x8dce79d6, 0x24b64f90, 0x8b1b8cea, 0x8e590935, 0xd003ecbb, 0xe7045354, 0x349643c7, 0xf4065cb9, 0xe12f3326, 0x491d220d, 0xe6b6278a, 0xe569bee5, 0x63caa061, 0x26d866bc, 0x42f25022, 0xd343f63c, 0x6f0a3c27, 0xfa81f733, 0x761c2631, 0xc6d0893f, 0xcd292cab, 0x176c2807, 0xa09d5b50, 0x02ac2015, 0x5ca43818, 0x119c633b, 0x223a9e33, 0x56a37a80, 0x5509dd1d, 0x059214fb, 0x5cdc01d6, 0x85240177, 0xc0cd83ae, 0xa535a45b, 0x3eb873d8, 0x7b9391ce, 0x5d096154, 0x0171c488, 0xf2103cff, 0x4803f890, 0xcbd5c5b1, 0x11f1b655, 0xd5561b02, 0x7f0316a3, 0xaea54093, 0x8d0e5137, 0x72366487, 0xb948ce91, 0x01e2dc76, 0x8e9e16c2, 0x9b6e2a78, 0x7c43df35, 0xbe408f76 }, - // Message 5 - { 0xfabd701b, 0xa1590dcc, 0x3db459a7, 0x2308dcf6, 0xace3e018, 0xaabd3ec9, 0xba381222, 0xbdd3d0d8, 0x1966a84b, 0x6d5b8e49, 0xbaabe2da, 0x8c49e82c, 0x401fe8fc, 0x1c27a0c3, 0x49c79172, 0x62cb5bff, 0x01e739a4, 0x357b356f, 0x82ae4212, 0xa1aada88, 0x11a256d9, 0xa46ca099, 0xefb03762, 0x08a5f2c4, 0x8812d7a6, 0x4d04d25f, 0x92dbaa4c, 0x1bb2bd96, 0xf7fb234f, 0xb34985a4, 0xef0ab5fb, 0x00931f0c, 0x176d6f41, 0xa3548661, 0x0229ff38, 0x223c30b9, 0xf7f924ef, 0x738ec0cc, 0xb7476ccf, 0x6ba09e97, 0xefa6d0d8, 0x0bf56501, 0x2ffa1674, 0xecb4ce9b, 0xd79d4f08, 0x47e61a5a, 0xbedc035d, 0xc5531c75, 0xc7dc0f8a, 0x1da1bda4, 0xccd6e0bd, 0x0dd1e5ea, 0xe4a9e539, 0x5ae2519b, 0x7361ec5a, 0x470990f7, 0x5dba9caf, 0x070b4f11, 0xddf7378f, 0xfd9ba564, 0x5130e86a, 0x5c69b196, 0xf9546de9, 0xb26bfb69, 0xd03c9bf3, 0x03322049, 0x5e16cbcd, 0xb7fbdd01, 0xd210b244, 0x8f580d9b, 0x09f0b90c, 0x4b740685, 0x78cb56ed, 0x75b29bfd, 0x432292c4, 0x157e6c5a, 0x361b1c48, 0xbe6fea21, 0x9008ad79, 0xcb01783c, 0xa73d5cd8, 0x7e62c315, 0xfa975554, 0x9a17934b, 0x22722bc9, 0x0c28a821, 0xd677b3b6, 0x2893fb37, 0x2e3e6509, 0x80a66f3f, 0x86f7cdaf, 0x1264e0dc, 0xf9b137d6, 0x0a8ba672, 0xbd33497c, 0x25a1b012 }, - // Message 6 - { 0x12d6a3bc, 0x56a34948, 0xcbf451e6, 0x00ddf5e7, 0xc4fdabaf, 0x98f72ae6, 0x06b1f2eb, 0xef80d089, 0x893bb2b9, 0xe585a2c7, 0x0a896cf4, 0xce868b8f, 0xd9d05320, 0x7191e6c3, 0x4fb79d31, 0x6bb85c41, 0x8c120e2e, 0xb91a5ecf, 0xb8f02bff, 0x9936daa0, 0x0df082e9, 0xf5f04457, 0x064941a1, 0x261bedcd, 0x7243821b, 0x39bbd76f, 0xac8ae627, 0x7d778bc9, 0xaf251cbd, 0x4dbd0780, 0x59e2ad8d, 0xb936f81f, 0xcfc2cbd5, 0xe5002e14, 0xf31941ea, 0xcda8badc, 0x107bb5d7, 0xdf904d88, 0x03f63fe9, 0xdcc00578, 0x23f099c0, 0xbc1dfb32, 0xee9f4fb8, 0x938a5166, 0x79589870, 0xeda6c78d, 0x613e9d94, 0xbf8be0c8, 0x2abebfde, 0x595655cc, 0x7f79eb8f, 0xee9cad71, 0xe31cb989, 0xe534b1b2, 0x1ec3e119, 0x8c17938c, 0xc8e8336f, 0x5edc4a60, 0xdf24f1c2, 0xcf066496, 0x58e4cad1, 0x651fbd95, 0xd0e0ebd6, 0x6ff25dff, 0xd19e7c2a, 0x9169f615, 0x19b1c6e0, 0x6f499521, 0xd69b20b6, 0x4860ddaa, 0x43cccd20, 0x3ea7f614, 0xaa5faabc, 0x65b79084, 0x6bfbf24d, 0x8741a5b7, 0x248702ea, 0x519dc058, 0x1fda81e2, 0x633b1f54, 0x793fdb10, 0x1b0a3669, 0xfc945e8b, 0x5f791d7f, 0xc000c3e0, 0xcabd4658, 0x1fae5fe0, 0xf69fc0d8, 0xf7f27ee6, 0x8e3d83ba, 0x8c5d20fc, 0x2af41708, 0xa9b0f827, 0xbe14eb78, 0xa7be7525, 0xf36d5783 }, - // Message 7 - { 0xffb93c13, 0xaa171f5c, 0x2dac1faa, 0x10efc463, 0xa18d50e3, 0x6fdffe88, 0x17ad6a67, 0x66d6e9ad, 0x0416d8de, 0x40b42d2d, 0x4fb5b2aa, 0xd0151eac, 0xc889dd2f, 0x58a64806, 0x4159d67a, 0x48953359, 0xd998d5b1, 0xe407a4fd, 0x3c578d6c, 0x2b7aa2ae, 0xb6947e1d, 0xa3c06991, 0xaa9199b6, 0xe64378ea, 0xe00f8347, 0x8e58515d, 0x2aa64dd9, 0x179fdffb, 0x91078aec, 0xf9d0c9ea, 0x9842f003, 0x973f8a2f, 0xc14fb956, 0x0e6b26ce, 0x619cae5e, 0x4a64ff47, 0xf104baaf, 0x107f5859, 0x25dd465a, 0xcb29219b, 0x87f6e43b, 0x27a41fe2, 0xb8f9664e, 0x4affb7ef, 0x0792bc28, 0xd006ad75, 0x4c9c8848, 0xbaf0fa0e, 0x44d46be4, 0xddffc7cd, 0x6a5c52bb, 0xe1322f3e, 0x56fdce09, 0x4e1badba, 0xe12e1c1e, 0xceba61d2, 0xbe3ab4c3, 0x048dc48c, 0x26d2b6e0, 0x7bef1532, 0x7a9ff8e6, 0xb0284b7e, 0xd6a57380, 0x28159f16, 0x5d75f5a4, 0x9de3116b, 0xc8911421, 0xbbe4b5c0, 0x04abebc7, 0xb98df244, 0xb5a960c2, 0xd1244e73, 0x5ef3579f, 0xb35f692f, 0x32d9cb9c, 0xb750939d, 0x8f52c776, 0xe227d5b6, 0xaaff1475, 0xdbb5d059, 0x35ed9b80, 0x80497958, 0x87288c3d, 0x8547ae37, 0x74583b51, 0x258cec13, 0xb044d0d1, 0x4ed71f6f, 0x4a6441dd, 0x536bbb71, 0x61d3b810, 0xaa095fe0, 0xffa278ba, 0x0c51a517, 0xaa173979, 0x9e26a393 }, - // Message 8 - { 0x9350abcc, 0x502e32d1, 0x3a3fc643, 0xca7d86e4, 0xec2c2945, 0xc6b09c1d, 0x014c68ef, 0xce9add3b, 0x9153d36b, 0xa6086b85, 0x7e306fa0, 0x6ee123a7, 0x3966e2f4, 0x87a87bd4, 0x30e541b4, 0x032d3fea, 0x3e6c9ba9, 0x267286ec, 0xb3794fe1, 0xecba7ca0, 0xea348df6, 0x46573190, 0x8acd3daf, 0x8edb0c5b, 0x241b1242, 0x5f5f7f93, 0x36f12384, 0xff61d3de, 0x8af09ddb, 0x8897efc0, 0x1d7fb2e6, 0x5871330e, 0xd1fbc501, 0xb2f1435f, 0x4a10ceea, 0x773b27d9, 0xd81c83d0, 0xb58bd832, 0xd82027a3, 0x3854683a, 0x42238bfb, 0x86daaa64, 0x44455fdd, 0xdb3763b1, 0x30faa197, 0x301c802d, 0x7f9f34c0, 0xf55dbd2d, 0x4abdc1a0, 0x30cd3a3a, 0x1aa671c4, 0xf43a1b22, 0x3ae81713, 0xc79d036d, 0x2b8ae850, 0x5e013388, 0x444d730f, 0xf7719d16, 0xf858d332, 0xde80d0e5, 0xba906252, 0x0ae3d9f0, 0xe9e064fe, 0x5473529d, 0x2634047c, 0x4e7904d2, 0xc50d57ea, 0xfc7b5873, 0xc0ec20ac, 0x9f73c76b, 0x8a6b3e96, 0x9f0e17ec, 0x13e1654b, 0x1ac7edef, 0x08fdcf5f, 0x51f67ca8, 0xb34e6cf0, 0x79f18b36, 0x8226238d, 0xb948e89d, 0xba6d6fcc, 0x6b3a2bdd, 0xfd373842, 0x69a07fd7, 0x568a3836, 0x0b67ac69, 0x7c522039, 0x2133df29, 0x5a35ef14, 0x596a234d, 0x620e2cc5, 0x2be5feeb, 0xce7cb8b4, 0xd04752cf, 0x0820b469, 0xaff3d9f3 }, - // Message 9 - { 0x08b2bdd7, 0xb9e4f5e9, 0x2298b215, 0xed9042e0, 0xd93a60dd, 0x14f08d95, 0xe9f669fe, 0x196b10fb, 0xceb6f5a5, 0xe19255c5, 0x1ebb83b2, 0xb4655473, 0xa6b79c9d, 0x88fe4dd9, 0x3546e18a, 0x6dc61f68, 0xc45d3b39, 0x061ee6ff, 0x9c85aaa3, 0x5ad24b87, 0x8ee06618, 0xc5292e42, 0x92bf8b73, 0x23124856, 0x85272862, 0xb284fbed, 0x6212d764, 0x7ee3f935, 0x3b386c35, 0xc694dd1f, 0xa6e068c2, 0xc8cad857, 0x5efd0a73, 0xceec5084, 0xfbb88a02, 0xb09d042d, 0x4e45d49f, 0xb430b6e7, 0xc63934a8, 0x212701f8, 0x6220074a, 0xd88103c3, 0x3312698b, 0x4e0bd933, 0x37b85cbd, 0x2cd97e09, 0x5014b36e, 0x57c8399f, 0xa6427d45, 0x57381c5d, 0x689adc4b, 0x48f893c3, 0x40b902a1, 0x130048cd, 0xa158e363, 0xf3a58a8a, 0x6b3ea545, 0xd6b51dc4, 0xe65db148, 0x5bf8ad29, 0x44257142, 0x92e0deb9, 0xb9cfbe30, 0x83b5cc31, 0x401feebc, 0x70d8ed1a, 0x6a77f25b, 0xed4bb4ba, 0x6a69e8a3, 0xe72c1f3a, 0xf9f67b2d, 0x64a13cdd, 0xc3268e68, 0xa5a33132, 0x6b10626a, 0xb48a00a3, 0xffc1ab2e, 0x4ae98114, 0xf571d6d5, 0x1c068302, 0xca5fe2a9, 0xc7f43921, 0x5b82d397, 0x43a210b2, 0x7b58af9e, 0x6232c22a, 0xc51f2306, 0xfcd5d566, 0x76c5e2e7, 0x8b77942e, 0xd9323119, 0xe3eb7011, 0xe8a1bc8e, 0xc02bf571, 0x90799da8, 0x76f308ea }, - }; +static const uint32_t test_messages[NUM_MESSAGES][3072 / 32] = { + // Message 0 + { 0xc3eeaca0, 0x145f499b, 0x4f6672c8, 0xe3be2eb4, 0x9bfc988d, 0x71ec0875, 0x8164f886, 0x17764392, 0x9739494d, 0x157fbaff, 0x22261fcd, 0xda824830, 0x463fb24c, 0x82264d6d, 0xf44cbee0, 0xfa2b8f70, 0x690ada68, 0x9a6f2fa1, 0x90e906d7, 0xbb77c9ee, 0x8cf45369, 0x97c74667, 0x65e31e23, 0xfbcd0d1a, 0x48743eeb, 0xd712ef62, 0x9c63d708, 0x776f25f6, 0x3eb30e2f, 0x428cbb76, 0xfd52cdbe, 0x0ab79293, 0x92444804, 0x989b940f, 0x49a74f17, 0xf2e98a77, 0x95682db5, 0xcda9c931, 0xe08ef8e0, 0x96e13ff5, 0x98475c25, 0x65667a05, 0xf3fca982, 0x1859b057, 0x01c91f26, 0xbf65df10, 0xa780ce07, 0x1fdb409a, 0x103d3382, 0xa369797c, 0xf028dfb6, 0xc4818df7, 0x08e01187, 0x2ea49432, 0x8174befe, 0xd7c91f9a, 0xc639985a, 0x1516863d, 0xfbaf413b, 0x5dc0faa9, 0x2248ade2, 0xc9cbb936, 0x91498a3d, 0xe72c22ff, 0xdfec98cf, 0x22ae559f, 0x5f93e271, 0xf879f63e, 0x6e41f357, 0x88cdfbee, 0xe5079bf1, 0xcf583f87, 0x67df5bee, 0xfbf2176c, 0x200f5f17, 0xd65e292e, 0x55018a0b, 0x1d89b23f, 0xfe702a98, 0x67dc3045, 0xbcde65d9, 0xa5b02ce4, 0x3f5475c2, 0x6ece0e1d, 0x64173690, 0xef552745, 0xde23a986, 0x6b2074f5, 0x781083ec, 0x42a8e469, 0x9075a526, 0x5fe2a8fc, 0xd3eef969, 0x3e270a4b, 0x01f0a7c8, 0x1ea42d07 }, + // Message 1 + { 0x7a1c7286, 0x7073526a, 0xa3b5dee2, 0xb20475b8, 0xe2ef8cb6, 0x3f3101e0, 0xb4008e2a, 0x3bb40a0e, 0x0f02dc62, 0x829a1f98, 0xa597c0b8, 0x015621ff, 0x34dec9d2, 0xd71bf2a2, 0xeeb0ca8e, 0x2b808183, 0x0ffad76f, 0x251ccbe1, 0xcc7a1d6c, 0x37cc14ae, 0x83ea4a30, 0xf57572aa, 0x15534228, 0xd9663dbb, 0x12e5fe52, 0x7b55d2cd, 0x5e303152, 0xe8665060, 0x14a16b0d, 0xffcc6665, 0xedb83d5c, 0xc02fc630, 0x67257bc7, 0x3890d4ca, 0x8e99f454, 0x84e52fbc, 0x99e09a32, 0xa431f208, 0x9b01d2dc, 0xd494be38, 0xdd536f81, 0x459b70a1, 0x8bdf94c7, 0xb11fbce6, 0x799fedce, 0x9f79cc5d, 0x68848129, 0x8629a36b, 0x5cf0dd2d, 0xb6cf3609, 0x64a1584f, 0x819a68f7, 0x77ad79b3, 0x9a8e8478, 0x25b94b80, 0xa2e9c895, 0xb0bbc126, 0x6291b5a7, 0x2ebf03e6, 0x7a080b9b, 0x3f9c8b9e, 0xa1ac613a, 0xe0315545, 0xeefbb06e, 0x7a0d621f, 0xc9983872, 0x40a42164, 0xb45363bb, 0xdc601819, 0xf596576e, 0xc96ab311, 0x3bbf9993, 0x96735365, 0xf8640fa2, 0x298597e6, 0xa42e997e, 0xc9fcd5e2, 0x0e69250e, 0x01a07595, 0x4904c73a, 0x0a940d6e, 0x83ecabbc, 0x10eb1454, 0x58cafd34, 0xe6c43dd7, 0x31168a19, 0xa24a1e81, 0x3b3de706, 0x68774552, 0x88175387, 0xef6cfc05, 0x4f060806, 0x56ae9157, 0xf7d4ad91, 0x2bb5f817, 0x5f7d11d6 }, + // Message 2 + { 0xa1dea256, 0x76df4ce8, 0x623f895d, 0x47276dbf, 0xa07b8313, 0xbe6514c0, 0x7b4de323, 0x1ff58fd6, 0xd7bf4cb0, 0xe3f241c6, 0x7875dd19, 0x656978e1, 0x922c9782, 0x8d944859, 0xb7a5019f, 0x0e0e74c3, 0x44d2f82e, 0x6671cc9a, 0x97ef9c1c, 0x3a900f53, 0x3246be9a, 0xa2d44e99, 0x1ed77873, 0xa139826d, 0xa7849972, 0x5e1b37e4, 0xf5979ce1, 0xd116a9e0, 0x9948fdac, 0xb08d0cac, 0x59a640a0, 0xebffeac6, 0x944b3101, 0x3d7b9cf2, 0x98404104, 0x712b4df0, 0x9b96bad7, 0x297dea1f, 0xe49df71a, 0xb8a4e00f, 0x69cc679c, 0x4f3fe52b, 0x67cf293c, 0xf28fe411, 0x504fe6c6, 0xe4484e46, 0xe15598e5, 0x45fc270f, 0x176f441c, 0xca57dcfb, 0xb1c85752, 0x339085d6, 0x4512048f, 0x52990e46, 0xb7f320b0, 0x681f291f, 0x8896c088, 0x227c4037, 0x576f7cdb, 0x7401fa6c, 0xc619e211, 0x0a9858de, 0x39d5ee5b, 0x554b6b6d, 0xa677922b, 0xdecd414c, 0x3126c77d, 0x07d038a6, 0x9e530272, 0x31b1b76e, 0x472ebb79, 0x22c6a00d, 0x0acce5e2, 0xf14ddc6d, 0x0a0ec86f, 0xf7358b56, 0xfab446eb, 0x75fff60e, 0x648c06a8, 0x6727ad03, 0xf754d2e7, 0x8f2c6fa6, 0x8982916d, 0x95103f6d, 0x4e89ee28, 0x7b6fb0cd, 0x71f211a4, 0xd1412fad, 0x416c4623, 0x7ded29b6, 0x6e03e6b3, 0x7f1b0af8, 0x38129536, 0xd42af72d, 0xa88fcdd2, 0x56f52ffb }, + // Message 3 + { 0xcba3ec40, 0x8e9870af, 0x435e826a, 0x24f0043a, 0xe135b65d, 0xa5269a0a, 0xae1e5c71, 0x5f92ddae, 0x468ea421, 0xe3fa1cae, 0x13753cef, 0xb5f38fc5, 0x657323cb, 0x03f917be, 0x43be579e, 0xc377242b, 0x143ba2d1, 0x930eefbc, 0xed0ce77b, 0xa68cb224, 0x5119d5e5, 0x1d29ba06, 0xea6a19a3, 0x58561410, 0x61d4249c, 0x06c89a90, 0x7cc56f0b, 0x696825e3, 0x2c6c1f6c, 0x7132b88a, 0x2e3afcc2, 0x3de924ab, 0x9ebaf1b7, 0xf1bd2a4b, 0x695af713, 0x50c8d4fc, 0x7b3ba186, 0x4f117ed4, 0x499e9aeb, 0x47bcc734, 0x5d220224, 0x2cd763f6, 0xefe6ce2b, 0xd2c71a86, 0x16f45158, 0xfe216ee5, 0x363fbef9, 0xc3ddf66a, 0x6ae95b6f, 0x57ee7f8d, 0xcb022b41, 0x5ae22c6d, 0xbdcce81d, 0xd4285f21, 0xa84a2825, 0x3b9addfa, 0x63ae24d3, 0x15cc9e4a, 0xe55c69d7, 0xb0e3b2ba, 0x79644a64, 0xfc027806, 0xf44cdf5f, 0x57d978a5, 0x62db858d, 0x4f316e10, 0x3f592569, 0xe77939af, 0xb1a58024, 0xef48c542, 0xd5f3bbcf, 0x717535b9, 0x7f2a5491, 0xc74b15e5, 0x30bd7b9f, 0xa9ab7827, 0x59a2845e, 0xc2926b40, 0xc2402dbe, 0xaf3c7ff8, 0x919cce5a, 0x66e21bc8, 0xd6095e37, 0x3d3ebcbb, 0xc0b8c2f7, 0xea5a3027, 0xb1610dbe, 0x55d5a073, 0x42c7f62b, 0x1daac5d7, 0xc0add0c4, 0x5d0898ee, 0xa11cc859, 0x68beb29c, 0x902c7eb0, 0x7b202e0f }, + // Message 4 + { 0xf07c2643, 0x38e2657b, 0xae5f2b4b, 0xdb2e2d35, 0x03c4fee6, 0x6ef7341d, 0xe16ea957, 0x8fc81e9d, 0x9b15db0e, 0x2a1a5c6b, 0x4d5a6630, 0x8e3b7905, 0x9ccfbad6, 0x8e86717e, 0x35043adb, 0xe3026b2b, 0x843f4b71, 0x63f4f111, 0x2e185601, 0x3b9916d3, 0x8a736073, 0xa801feb1, 0x46548286, 0xb64e9b7e, 0xf87fa1d9, 0x20928964, 0x8379106f, 0x2a857cc8, 0x0e219f79, 0x5929ab6c, 0x7beae2c5, 0xbf6a0fc2, 0xf7be862b, 0xeaaf8ea2, 0xf2d6c3e1, 0x570499fe, 0x475ecbd1, 0xbd49866a, 0x8dcbaeeb, 0xfa3f75ae, 0x6e9cbe8a, 0x25a4d6c3, 0x8d9fd682, 0x8dce79d6, 0x24b64f90, 0x8b1b8cea, 0x8e590935, 0xd003ecbb, 0xe7045354, 0x349643c7, 0xf4065cb9, 0xe12f3326, 0x491d220d, 0xe6b6278a, 0xe569bee5, 0x63caa061, 0x26d866bc, 0x42f25022, 0xd343f63c, 0x6f0a3c27, 0xfa81f733, 0x761c2631, 0xc6d0893f, 0xcd292cab, 0x176c2807, 0xa09d5b50, 0x02ac2015, 0x5ca43818, 0x119c633b, 0x223a9e33, 0x56a37a80, 0x5509dd1d, 0x059214fb, 0x5cdc01d6, 0x85240177, 0xc0cd83ae, 0xa535a45b, 0x3eb873d8, 0x7b9391ce, 0x5d096154, 0x0171c488, 0xf2103cff, 0x4803f890, 0xcbd5c5b1, 0x11f1b655, 0xd5561b02, 0x7f0316a3, 0xaea54093, 0x8d0e5137, 0x72366487, 0xb948ce91, 0x01e2dc76, 0x8e9e16c2, 0x9b6e2a78, 0x7c43df35, 0xbe408f76 }, + // Message 5 + { 0xfabd701b, 0xa1590dcc, 0x3db459a7, 0x2308dcf6, 0xace3e018, 0xaabd3ec9, 0xba381222, 0xbdd3d0d8, 0x1966a84b, 0x6d5b8e49, 0xbaabe2da, 0x8c49e82c, 0x401fe8fc, 0x1c27a0c3, 0x49c79172, 0x62cb5bff, 0x01e739a4, 0x357b356f, 0x82ae4212, 0xa1aada88, 0x11a256d9, 0xa46ca099, 0xefb03762, 0x08a5f2c4, 0x8812d7a6, 0x4d04d25f, 0x92dbaa4c, 0x1bb2bd96, 0xf7fb234f, 0xb34985a4, 0xef0ab5fb, 0x00931f0c, 0x176d6f41, 0xa3548661, 0x0229ff38, 0x223c30b9, 0xf7f924ef, 0x738ec0cc, 0xb7476ccf, 0x6ba09e97, 0xefa6d0d8, 0x0bf56501, 0x2ffa1674, 0xecb4ce9b, 0xd79d4f08, 0x47e61a5a, 0xbedc035d, 0xc5531c75, 0xc7dc0f8a, 0x1da1bda4, 0xccd6e0bd, 0x0dd1e5ea, 0xe4a9e539, 0x5ae2519b, 0x7361ec5a, 0x470990f7, 0x5dba9caf, 0x070b4f11, 0xddf7378f, 0xfd9ba564, 0x5130e86a, 0x5c69b196, 0xf9546de9, 0xb26bfb69, 0xd03c9bf3, 0x03322049, 0x5e16cbcd, 0xb7fbdd01, 0xd210b244, 0x8f580d9b, 0x09f0b90c, 0x4b740685, 0x78cb56ed, 0x75b29bfd, 0x432292c4, 0x157e6c5a, 0x361b1c48, 0xbe6fea21, 0x9008ad79, 0xcb01783c, 0xa73d5cd8, 0x7e62c315, 0xfa975554, 0x9a17934b, 0x22722bc9, 0x0c28a821, 0xd677b3b6, 0x2893fb37, 0x2e3e6509, 0x80a66f3f, 0x86f7cdaf, 0x1264e0dc, 0xf9b137d6, 0x0a8ba672, 0xbd33497c, 0x25a1b012 }, + // Message 6 + { 0x12d6a3bc, 0x56a34948, 0xcbf451e6, 0x00ddf5e7, 0xc4fdabaf, 0x98f72ae6, 0x06b1f2eb, 0xef80d089, 0x893bb2b9, 0xe585a2c7, 0x0a896cf4, 0xce868b8f, 0xd9d05320, 0x7191e6c3, 0x4fb79d31, 0x6bb85c41, 0x8c120e2e, 0xb91a5ecf, 0xb8f02bff, 0x9936daa0, 0x0df082e9, 0xf5f04457, 0x064941a1, 0x261bedcd, 0x7243821b, 0x39bbd76f, 0xac8ae627, 0x7d778bc9, 0xaf251cbd, 0x4dbd0780, 0x59e2ad8d, 0xb936f81f, 0xcfc2cbd5, 0xe5002e14, 0xf31941ea, 0xcda8badc, 0x107bb5d7, 0xdf904d88, 0x03f63fe9, 0xdcc00578, 0x23f099c0, 0xbc1dfb32, 0xee9f4fb8, 0x938a5166, 0x79589870, 0xeda6c78d, 0x613e9d94, 0xbf8be0c8, 0x2abebfde, 0x595655cc, 0x7f79eb8f, 0xee9cad71, 0xe31cb989, 0xe534b1b2, 0x1ec3e119, 0x8c17938c, 0xc8e8336f, 0x5edc4a60, 0xdf24f1c2, 0xcf066496, 0x58e4cad1, 0x651fbd95, 0xd0e0ebd6, 0x6ff25dff, 0xd19e7c2a, 0x9169f615, 0x19b1c6e0, 0x6f499521, 0xd69b20b6, 0x4860ddaa, 0x43cccd20, 0x3ea7f614, 0xaa5faabc, 0x65b79084, 0x6bfbf24d, 0x8741a5b7, 0x248702ea, 0x519dc058, 0x1fda81e2, 0x633b1f54, 0x793fdb10, 0x1b0a3669, 0xfc945e8b, 0x5f791d7f, 0xc000c3e0, 0xcabd4658, 0x1fae5fe0, 0xf69fc0d8, 0xf7f27ee6, 0x8e3d83ba, 0x8c5d20fc, 0x2af41708, 0xa9b0f827, 0xbe14eb78, 0xa7be7525, 0xf36d5783 }, + // Message 7 + { 0xffb93c13, 0xaa171f5c, 0x2dac1faa, 0x10efc463, 0xa18d50e3, 0x6fdffe88, 0x17ad6a67, 0x66d6e9ad, 0x0416d8de, 0x40b42d2d, 0x4fb5b2aa, 0xd0151eac, 0xc889dd2f, 0x58a64806, 0x4159d67a, 0x48953359, 0xd998d5b1, 0xe407a4fd, 0x3c578d6c, 0x2b7aa2ae, 0xb6947e1d, 0xa3c06991, 0xaa9199b6, 0xe64378ea, 0xe00f8347, 0x8e58515d, 0x2aa64dd9, 0x179fdffb, 0x91078aec, 0xf9d0c9ea, 0x9842f003, 0x973f8a2f, 0xc14fb956, 0x0e6b26ce, 0x619cae5e, 0x4a64ff47, 0xf104baaf, 0x107f5859, 0x25dd465a, 0xcb29219b, 0x87f6e43b, 0x27a41fe2, 0xb8f9664e, 0x4affb7ef, 0x0792bc28, 0xd006ad75, 0x4c9c8848, 0xbaf0fa0e, 0x44d46be4, 0xddffc7cd, 0x6a5c52bb, 0xe1322f3e, 0x56fdce09, 0x4e1badba, 0xe12e1c1e, 0xceba61d2, 0xbe3ab4c3, 0x048dc48c, 0x26d2b6e0, 0x7bef1532, 0x7a9ff8e6, 0xb0284b7e, 0xd6a57380, 0x28159f16, 0x5d75f5a4, 0x9de3116b, 0xc8911421, 0xbbe4b5c0, 0x04abebc7, 0xb98df244, 0xb5a960c2, 0xd1244e73, 0x5ef3579f, 0xb35f692f, 0x32d9cb9c, 0xb750939d, 0x8f52c776, 0xe227d5b6, 0xaaff1475, 0xdbb5d059, 0x35ed9b80, 0x80497958, 0x87288c3d, 0x8547ae37, 0x74583b51, 0x258cec13, 0xb044d0d1, 0x4ed71f6f, 0x4a6441dd, 0x536bbb71, 0x61d3b810, 0xaa095fe0, 0xffa278ba, 0x0c51a517, 0xaa173979, 0x9e26a393 }, + // Message 8 + { 0x9350abcc, 0x502e32d1, 0x3a3fc643, 0xca7d86e4, 0xec2c2945, 0xc6b09c1d, 0x014c68ef, 0xce9add3b, 0x9153d36b, 0xa6086b85, 0x7e306fa0, 0x6ee123a7, 0x3966e2f4, 0x87a87bd4, 0x30e541b4, 0x032d3fea, 0x3e6c9ba9, 0x267286ec, 0xb3794fe1, 0xecba7ca0, 0xea348df6, 0x46573190, 0x8acd3daf, 0x8edb0c5b, 0x241b1242, 0x5f5f7f93, 0x36f12384, 0xff61d3de, 0x8af09ddb, 0x8897efc0, 0x1d7fb2e6, 0x5871330e, 0xd1fbc501, 0xb2f1435f, 0x4a10ceea, 0x773b27d9, 0xd81c83d0, 0xb58bd832, 0xd82027a3, 0x3854683a, 0x42238bfb, 0x86daaa64, 0x44455fdd, 0xdb3763b1, 0x30faa197, 0x301c802d, 0x7f9f34c0, 0xf55dbd2d, 0x4abdc1a0, 0x30cd3a3a, 0x1aa671c4, 0xf43a1b22, 0x3ae81713, 0xc79d036d, 0x2b8ae850, 0x5e013388, 0x444d730f, 0xf7719d16, 0xf858d332, 0xde80d0e5, 0xba906252, 0x0ae3d9f0, 0xe9e064fe, 0x5473529d, 0x2634047c, 0x4e7904d2, 0xc50d57ea, 0xfc7b5873, 0xc0ec20ac, 0x9f73c76b, 0x8a6b3e96, 0x9f0e17ec, 0x13e1654b, 0x1ac7edef, 0x08fdcf5f, 0x51f67ca8, 0xb34e6cf0, 0x79f18b36, 0x8226238d, 0xb948e89d, 0xba6d6fcc, 0x6b3a2bdd, 0xfd373842, 0x69a07fd7, 0x568a3836, 0x0b67ac69, 0x7c522039, 0x2133df29, 0x5a35ef14, 0x596a234d, 0x620e2cc5, 0x2be5feeb, 0xce7cb8b4, 0xd04752cf, 0x0820b469, 0xaff3d9f3 }, + // Message 9 + { 0x08b2bdd7, 0xb9e4f5e9, 0x2298b215, 0xed9042e0, 0xd93a60dd, 0x14f08d95, 0xe9f669fe, 0x196b10fb, 0xceb6f5a5, 0xe19255c5, 0x1ebb83b2, 0xb4655473, 0xa6b79c9d, 0x88fe4dd9, 0x3546e18a, 0x6dc61f68, 0xc45d3b39, 0x061ee6ff, 0x9c85aaa3, 0x5ad24b87, 0x8ee06618, 0xc5292e42, 0x92bf8b73, 0x23124856, 0x85272862, 0xb284fbed, 0x6212d764, 0x7ee3f935, 0x3b386c35, 0xc694dd1f, 0xa6e068c2, 0xc8cad857, 0x5efd0a73, 0xceec5084, 0xfbb88a02, 0xb09d042d, 0x4e45d49f, 0xb430b6e7, 0xc63934a8, 0x212701f8, 0x6220074a, 0xd88103c3, 0x3312698b, 0x4e0bd933, 0x37b85cbd, 0x2cd97e09, 0x5014b36e, 0x57c8399f, 0xa6427d45, 0x57381c5d, 0x689adc4b, 0x48f893c3, 0x40b902a1, 0x130048cd, 0xa158e363, 0xf3a58a8a, 0x6b3ea545, 0xd6b51dc4, 0xe65db148, 0x5bf8ad29, 0x44257142, 0x92e0deb9, 0xb9cfbe30, 0x83b5cc31, 0x401feebc, 0x70d8ed1a, 0x6a77f25b, 0xed4bb4ba, 0x6a69e8a3, 0xe72c1f3a, 0xf9f67b2d, 0x64a13cdd, 0xc3268e68, 0xa5a33132, 0x6b10626a, 0xb48a00a3, 0xffc1ab2e, 0x4ae98114, 0xf571d6d5, 0x1c068302, 0xca5fe2a9, 0xc7f43921, 0x5b82d397, 0x43a210b2, 0x7b58af9e, 0x6232c22a, 0xc51f2306, 0xfcd5d566, 0x76c5e2e7, 0x8b77942e, 0xd9323119, 0xe3eb7011, 0xe8a1bc8e, 0xc02bf571, 0x90799da8, 0x76f308ea }, +}; #define NUM_CASES 6 @@ -57,18 +57,19 @@ static const encrypt_testcase_t test_cases[NUM_CASES] = { .hmac_key_idx = DS_KEY_BLOCK_1, // results of message array encrypted with these keys .expected_results = { - // Message 0 - { 0x1dd30b07, 0x7a20e1b4, 0x115af11c, 0x97802d6b, 0x71544abc, 0xf2bc3fa7, 0xf6e0503b, 0x78cb7e48, 0xa30c7b6c, 0x3fa57779, 0x62af2846, 0x7145e0fb, 0x7f4e2832, 0x27b691a8, 0x4f51c10a, 0xc3bf3c35, 0x3590d49f, 0x1a3ce71a, 0xd6aefc2d, 0x973b26e5, 0x3cd1f9e5, 0xd16d72d6, 0xec083586, 0x4bc5c167, 0xb5cf09e7, 0xdb73999d, 0x14bb9526, 0xb8b457e7, 0x0a880269, 0x421ef4c2, 0x61b1e1d8, 0x388b344e, 0x5ce460de, 0x5fba2b59, 0x1542c556, 0x22c67e3f, 0x4e4b85cd, 0x8397db1d, 0xe947eae6, 0x3624eb45, 0xaa90759b, 0xf22563b4, 0xe9fdea74, 0xd377c19d, 0x9c40d81c, 0x414329b6, 0x236b963e, 0x177b7ae6, 0xfc784ccb, 0xf5997978, 0x3abb91d2, 0xb9022814, 0x6c52f545, 0x6887d3ee, 0x19c31382, 0x77891c70, 0x31a4eb0c, 0xf91d8fc7, 0xdd7c5a2c, 0xd70d36b7, 0xcbd2177f, 0xeef25eae, 0xd1e28214, 0x5ae777a6, 0x2ed2dff6, 0x3519453d, 0xb905e964, 0x46f77558, 0x2863e62e, 0x9c248fbb, 0x8b520908, 0xca900ef0, 0x3259bd4a, 0x3f0f7f41, 0xe2f276d8, 0xd82e9c89, 0x24a83a1e, 0x86accf96, 0xaf0bde50, 0xaa575f80, 0x7a707413, 0x864d4cc3, 0x10a1b440, 0xbddbaa40, 0x6491bded, 0x5e771fc6, 0x0ac3e261, 0x4e438a97, 0x28695772, 0xe01782b6, 0x05b7d3b4, 0xa9e86035, 0xdc32d354, 0xdf89442a, 0xe28124c6, 0x04029f58 }, // Message 1 - { 0x33848dd8, 0xe7836e09, 0xca5a0f41, 0x06005392, 0x07c4e3cb, 0xa0fdb69d, 0xafeb2b08, 0xef413195, 0xf3d1cd01, 0x716d2dbc, 0xe2494e22, 0x16e54706, 0x5a5e12f7, 0xdc95ca93, 0xdce75ef0, 0x84ef183d, 0x3b7807fb, 0x1c2a5170, 0x97d9f580, 0x087fae04, 0x60dc0c3f, 0x23c74ba7, 0x5d7a88ab, 0xb43a453a, 0x030407e7, 0x778f2049, 0x61dbff41, 0x05b64f7b, 0xecdee671, 0x5552ec2b, 0xeb87e7ed, 0xefffb3f8, 0x1dbd29bb, 0x2f351041, 0xae962fa7, 0x6ff2a155, 0x4b8e1f6a, 0x8008bccd, 0xadc038b6, 0xb6d261fc, 0x32d87543, 0xd69f8d81, 0x956ddcaf, 0x46496335, 0x78923048, 0x41d10e82, 0xfac5bb0d, 0xff0fead0, 0x4ba5b498, 0xde213e07, 0x95f5de08, 0x98fc3216, 0x2390d74b, 0xe66b3354, 0x3c9a737f, 0xd68f4a21, 0xb86ec19c, 0xb54ef2b4, 0x7ae7b726, 0x317edea5, 0xdb52f3da, 0xf2c8ddf6, 0x8975c934, 0x5ffb553d, 0x16fa5cc8, 0x44be6a69, 0x83e7d672, 0x2feadeb6, 0xad79641f, 0xc6f9ca2b, 0xd8e0b8cc, 0x4ccfd352, 0x05f8ac86, 0x7f1cf362, 0xeaa7ddb7, 0x347814d9, 0xddbadb11, 0x6e16fdbb, 0xeea66534, 0x0a045c01, 0x82157a88, 0xb191b3c4, 0xdc8fa781, 0x7800bed7, 0x18f48d72, 0xbd65317b, 0xb2e1b61a, 0xfa219cab, 0xe8c56ed0, 0xd38d2fdd, 0xbe94d8e1, 0x93674a1a, 0xcf61399c, 0xf2512581, 0x5fdd17d4, 0x966136bf }, // Message 2 - { 0x9bbb2c24, 0x3e809a67, 0x09589246, 0x766acc7f, 0x7b2655cd, 0x21b9eb2a, 0xc09b52ff, 0x2689e2e3, 0x875030a1, 0x3a6f11b5, 0xfe225d07, 0x4e764d22, 0xe97ee0ab, 0x1c370cdf, 0x42373ac2, 0xf9b5abeb, 0x993f16dc, 0x49ae4679, 0xafc3b152, 0x9ac97356, 0xa8b39c0d, 0x95563462, 0x69c54cad, 0x6b2d0c90, 0xe01ffaef, 0x80090674, 0xccbdc920, 0x0f67c36f, 0xcfc2cf7f, 0x88d605ff, 0xe00975fa, 0x8dd33c0a, 0x1f5827a4, 0x3c653584, 0x7e83b1c2, 0x329890a7, 0x84ee6eb0, 0xdedd32bb, 0xe96b9c7d, 0x33f258e9, 0xdc72ac85, 0x19999994, 0x0ce022f3, 0x1b0f9343, 0xa09ed3ec, 0x26131e20, 0xd59dcdf4, 0xf36220b3, 0x3e5e4370, 0x27e76689, 0x5035ef5c, 0x4a00f78c, 0x62f02bef, 0x72ba9ea4, 0x5e69343c, 0xdd760c30, 0x0d9413c7, 0x167832c7, 0x20f1dc0c, 0x6c04bd22, 0xecc4ef61, 0x9aa0e468, 0xda1b320b, 0x87cdddc9, 0x9edd9520, 0xc8b860de, 0xd0595061, 0x4ea05219, 0x53ffc1ab, 0x1403fd6a, 0xd671d660, 0xaeb31f22, 0x2081c4b2, 0x3ad34de7, 0x10e38026, 0x35a99f89, 0x80cdb6bc, 0x961b7f67, 0xc308357f, 0x6afa371b, 0x5536d81b, 0x88ba626f, 0x58245cc3, 0x1d074b80, 0x31f33e10, 0x0d2796b1, 0xa87dbc31, 0xb4fafefb, 0x9cc4dd5d, 0x1392f1c9, 0x6608a408, 0x29bcf835, 0xf4012433, 0xf9fb1170, 0x2e211738, 0x6b27913a }, // Message 3 - { 0x89ab0030, 0xc4250e0f, 0xbc90454a, 0xd7b805c6, 0x8f3379d1, 0x02fdcdfd, 0x1cee1096, 0x91fa7ca0, 0x16659c1c, 0x85e9e9af, 0x96a5a844, 0x6a9e23e8, 0xde241e7d, 0xdbf47cef, 0x2f763c3b, 0xc37d0b3e, 0x29df1f63, 0xc6af9e35, 0x72ce3496, 0x86999ab8, 0xf86c3abb, 0x61e26c79, 0x0eeb9522, 0x88d69b72, 0xb800d4e4, 0x43584df9, 0x76cd4f85, 0xfd228340, 0x14b7fa54, 0x8d38f2d0, 0x6acd0758, 0xa07ebbb2, 0x4bcbff9c, 0x0d563e80, 0xcbe4d8a2, 0x3187ee90, 0x77118bfd, 0x7c81c15a, 0x0fc2860f, 0xd27952a9, 0x3e777af9, 0xed0e28a1, 0x12260ac5, 0xdda7c661, 0x2138f6d3, 0x53dd74ef, 0x89d96332, 0x83cd74ec, 0x39bb794f, 0x2648ead6, 0x941388dc, 0x32b2a9be, 0xbe5e87aa, 0xd997d17a, 0xd0614ac4, 0x7f2be785, 0x2bfccc52, 0x2cc2b2b4, 0xb6ae74b4, 0x9f84ff27, 0x886a9cd8, 0xb5cc7f0b, 0xe73ef16a, 0x4e028c43, 0xf1e43014, 0xef1c72af, 0x3dbc6a82, 0xe2e5757e, 0x909c23cb, 0x115826f6, 0xda086c8a, 0x5fdcd239, 0xc27e9057, 0x57f9893f, 0xf9ff2755, 0x41ee1548, 0xe3c9b4bb, 0x4bda5e41, 0xa635f5b0, 0xa94bbabc, 0x862d93bc, 0x31b3a8df, 0x5485c1fe, 0xf0124216, 0x4b619dd2, 0x8df5ff9b, 0x50bb155e, 0xa968ea40, 0x0859e718, 0x8a3199c6, 0xe4553bbb, 0x9baf44d9, 0xb12d6498, 0xb878a59e, 0xe0d13c6f, 0x2bb74cb7 }, // Message 4 - { 0xabf9a766, 0xc7598b0b, 0x1866649d, 0xcd24127d, 0x2cd2e2fc, 0x19c31e2b, 0x1c7f56cf, 0x77c76e57, 0x62a49e90, 0xa5a89ca9, 0x5294b82d, 0xe8f182c4, 0x8b40ebe7, 0x515666c1, 0xa430a24c, 0x43260ab3, 0x1c6e4a17, 0x1fbaea29, 0x7070679f, 0xce931dc5, 0x9df42bf6, 0x5e873d07, 0x520c6633, 0x49aaf80a, 0x49c6b5a9, 0x15074f1c, 0xa6b9f5a6, 0x6e2585f4, 0xe09aea9b, 0x305607a8, 0x6df358bf, 0xd804d2bf, 0x48ee8c78, 0x9309cae5, 0x9198601a, 0x6fbff8d8, 0xcc7896fe, 0x81cccec8, 0xd8185ea2, 0x23fa8bf7, 0x0ce2865c, 0xf015bcc4, 0xd71fb2a9, 0x4598d445, 0x3133fce4, 0x1e179697, 0x64c56bd2, 0x68af22de, 0xa0aa42a8, 0xb8184fc9, 0x3ec21f1d, 0x30f8fac4, 0x1536c2a9, 0x2645cf02, 0x17ef7159, 0xf7309c3e, 0x85e6a098, 0xe6b4066d, 0x19964d30, 0x389af5c9, 0x3d739fb7, 0xab72767e, 0x60d546f7, 0xda585399, 0xe955e994, 0x72b840fb, 0x9971491b, 0x61e07743, 0x1a471634, 0x075d9d61, 0x24921c9d, 0x8e1b5979, 0xae0fdd3e, 0x8f71903b, 0x4e373f40, 0xa8500ae7, 0x1f225fe7, 0x188d47ce, 0x618da90f, 0x1716bfa6, 0x566164c7, 0x10555f1b, 0x5b3b9cc8, 0x77921856, 0x6014c5b0, 0xda27653d, 0xb0943d38, 0x336cf13a, 0xd9febd34, 0x1657ddcc, 0xd7e1aada, 0x54b10d97, 0x88f13732, 0x7310cd55, 0xaa5f6269, 0x85cfa06f }, // Message 5 - { 0xde9ec0bb, 0x71ce275d, 0xcea33e85, 0x99501280, 0xd956176e, 0xc883165c, 0x8f77016b, 0x030f10d4, 0x2b3ac35c, 0x939f3cd4, 0x71ab5924, 0x950ca9f0, 0xdd9eab26, 0x024ddcb1, 0xd3adfc61, 0x32f8a9a8, 0xf4678564, 0x6e538709, 0xc4f9e00a, 0x9236af28, 0x5efb1831, 0xa3c6430f, 0xb5e25317, 0x5f7ee309, 0xfa99c2ae, 0x1e03ff49, 0x20f94781, 0xb01e6ff6, 0x0b8dd51d, 0x3c8a19db, 0x0a2c1876, 0xa0dff0eb, 0x7389d213, 0x4143634f, 0x521993bf, 0x65bd40f3, 0xe2f746d1, 0x8bc6007d, 0xd24cd0c2, 0xf153f376, 0xe26d5393, 0x3f644a47, 0xd7426e05, 0x6b06f344, 0xbf5cab80, 0x82b44d11, 0x37d9093e, 0xd33a1761, 0xff94c832, 0xc614d1bc, 0x5a1dd0c7, 0x1cc645c5, 0xd91db784, 0x32efe6ae, 0x09ff24ec, 0x329781fb, 0x66831dac, 0x2f1a3647, 0xd986dc9a, 0x535fb6e4, 0xbf0a1211, 0x9d9c5e0c, 0x1566d6a0, 0x401a616a, 0x1253eb46, 0x4771ff4e, 0x11601897, 0x9f2f7cac, 0x6219f12e, 0x53e53137, 0x5f878279, 0x53040f96, 0xfdeaf516, 0xd6a00205, 0xd02c307a, 0x3bfc99c9, 0x3e3dd8f8, 0x6abb1c4d, 0x20e7270b, 0xafe26ccd, 0x0704d6c9, 0x24b55dbf, 0x1da0683d, 0xa152edc8, 0xbfe87bb3, 0x648eedb7, 0x2e4c8cb3, 0x130c0d1b, 0x14db85c7, 0x58a5093f, 0x0dd0e4a2, 0x669057bd, 0x67a8d73a, 0x42934819, 0x997f7e48, 0x4a79a2fb }, // Message 6 - { 0x3091af00, 0x3e88a63f, 0xc1e5a42e, 0xef4136ab, 0x019914f4, 0xe5679a1d, 0x53398d88, 0x0adbfe54, 0x18b045db, 0xc192c25a, 0x42d66a41, 0x44fe7c2f, 0x24c949c3, 0x9a9a1a24, 0x72a30041, 0x1d4d0c7f, 0xda007af0, 0x0f8ebd86, 0x9d75b6d6, 0x63c92aff, 0x43689bcb, 0xbe3c99be, 0xec00e4b6, 0x3c1b6d9e, 0x09e61956, 0xe32bc167, 0xeef7d112, 0xa5b6aaca, 0xd4920f01, 0x9d2a805f, 0x045b38ff, 0xf85b8e76, 0xcd5eb94d, 0x65a26556, 0xc67f6cd8, 0xc0b8e974, 0x7d82557e, 0xd9818bbd, 0xeb5ba0fb, 0x5c9a90f0, 0xed2b3d8c, 0x2c4012b0, 0xaaa83528, 0x27f8ca81, 0x1fa868eb, 0xf6f1ffd8, 0x0ebb2a64, 0x65f33892, 0xa83b6286, 0xdc8f84e7, 0x0082e31f, 0xa94c437a, 0x273e38dd, 0x18cbba3e, 0x33d142c1, 0x9652fa61, 0x38c770ef, 0x456110a9, 0x1cc26e20, 0x35440d20, 0x2bc8c13f, 0x934c3e3b, 0xc7592d8a, 0x4ff51143, 0xd528f834, 0x08a081b2, 0x008da561, 0xf66f5ad5, 0x304ef7ba, 0x4cbb841b, 0xafc3093f, 0x8f4f2bcd, 0x0dd051cc, 0xfd9cdd1b, 0x3171189c, 0x1690ca02, 0x3e6fbbd7, 0x0c2a98b5, 0x1362d451, 0x7e2edb82, 0x33e6eeed, 0x4e71a3a6, 0xf51d3acc, 0x444e4e06, 0xeb50c285, 0x66881abb, 0x2d3690f8, 0x574b7709, 0xe6e57584, 0x16c95cae, 0xba2dbd54, 0x5a5d693a, 0xc823016c, 0xf0089ae6, 0x415e0902, 0x67c1b0c1 }, // Message 7 - { 0x7e8b2e2a, 0x289b46a4, 0xa6a37b8c, 0xc567df73, 0x55018796, 0x4e9d9d18, 0x0d31eb7e, 0x5d74d159, 0x841ebae2, 0xe1973167, 0xd61418e6, 0x5cb89cbc, 0x1acb9a42, 0xf82e0e7f, 0x05e631bc, 0xba43f7f9, 0xd79c942b, 0x16628593, 0xcbb9d614, 0x8614cc8b, 0xf7945887, 0xca968cfe, 0x5b92abbf, 0x18abb020, 0x4ca4d94d, 0x652b2efd, 0xb38d885c, 0xd727ce25, 0xd0accfb8, 0x8b1498c4, 0xa9788ae1, 0x87b60400, 0x72ee888c, 0x3cc8b5be, 0xd01b4fda, 0xe4214afd, 0xd709bd20, 0xe17b0353, 0x7fffe766, 0x1cf3c00e, 0x1ba37716, 0x0e412e6e, 0xcfe26c33, 0xd4e73eef, 0xcfe108b0, 0x9da923e4, 0xf309b4f6, 0xf7553306, 0x96001a08, 0x18392a1e, 0x10f14241, 0x1c5b6398, 0xe14efe32, 0xa1fa1f3d, 0xd30a00e3, 0x2220b1b5, 0xd21b950f, 0xffbe55a0, 0xab511ea4, 0x1d508c36, 0x11766260, 0x93f08d28, 0x2b55f5d2, 0x3b31e88a, 0x901cc723, 0xffb83098, 0x0cc75b00, 0xfdf6ddfa, 0x8c61275f, 0x7c3d5f35, 0x6e947893, 0x8d78a4ef, 0x3715a9b2, 0x5df48a9b, 0xced6b5ac, 0xc365d317, 0xf0751afa, 0x51b70a61, 0xb961f7ab, 0x00e2ec20, 0xddc4bcd5, 0x3575bb7c, 0xfc3e41e6, 0xabd80278, 0x560cd8db, 0x37c6f978, 0xbecaf8b6, 0x8e9370b8, 0x6e419061, 0x123a0d8e, 0xafc8bf2f, 0x110335cb, 0x0e2dd6ff, 0xdff2ac5b, 0xc4c40ded, 0x71c828d5 }, // Message 8 - { 0x5f4d6c0f, 0x07cbb6c0, 0xc5d29098, 0xaa4b7646, 0x9ad67706, 0xc24cb90a, 0x0e3b474d, 0x570aa38b, 0x609c6eea, 0x35acb442, 0xfb4ecb48, 0xc0bca95d, 0xca13fb93, 0xce8c161c, 0xcb587f70, 0x5be94979, 0xa8d864f1, 0x46d3a2cd, 0x376e1880, 0xed9e9acc, 0xad3671d8, 0xf07acd26, 0xd4fcd4b2, 0x8592f218, 0x4215a2ee, 0xeba03531, 0x5979f6e3, 0xce0435fa, 0xda72ea66, 0x02503771, 0x9734cb8d, 0x7ecc8a3a, 0x5b7e0c2f, 0x952a10c9, 0xbb8ac3e7, 0x07691411, 0x6a4ec582, 0x5720909f, 0x6dfbd1f8, 0x87a2ade8, 0x4fa2084c, 0x47cef5ef, 0x68295cb4, 0xf126dd97, 0x147ad2d0, 0x8350c426, 0x5f996e6e, 0xb984046f, 0xdfe837e9, 0xc90ba36b, 0x74f4144c, 0x96b87bf6, 0x2a854c34, 0x4aecade4, 0x51262c73, 0x59ef8591, 0x5e8a1852, 0xb18e1501, 0x96fb63a7, 0x99766d88, 0x4eae8963, 0xdc86ecbe, 0x394414c8, 0x4b680710, 0xf1f31913, 0x44decb2a, 0xbc328965, 0xeb85a7a5, 0x3123199b, 0x029a3109, 0xf7ff3e08, 0x6624ddd6, 0x25f6bc05, 0x1dafd418, 0x0d07a121, 0x3c8c10aa, 0x0d367ea7, 0xbc97bccc, 0x4c3c5bd0, 0x6a412808, 0xdd549ed9, 0xeac0470f, 0x9bab1f29, 0x22fcbbf9, 0x844313ad, 0x020ad2d7, 0x738d245d, 0x0e0de0e0, 0x7ca6cb06, 0x02c4cc89, 0x8bf7b00b, 0x3b19f999, 0xd8acac9d, 0xdba5a5c7, 0x79e558bd, 0x98cdad76 }, // Message 9 - { 0x3cb7cf11, 0xa6105ab5, 0xab76fba2, 0x83b390f6, 0x2c8b342f, 0x067cb33b, 0x1408d6ee, 0x11fac21f, 0x3acf1455, 0x0b5a24b0, 0xfd77a460, 0x94c6fd74, 0x58f4b525, 0xf942d753, 0x66cc39a2, 0x49c9739e, 0x6403a808, 0xc991f39f, 0x32b96bad, 0x251f2197, 0x39e921b7, 0x0678add2, 0xeea0ac3b, 0x73ca6627, 0xb471fc30, 0x5a3af2cd, 0x2e295cb3, 0xf69dabd3, 0xe91b9a66, 0x3a22cfcd, 0xc19a3cac, 0x6558aa8a, 0x1d35ee0e, 0x3fe4bbbc, 0xa502e579, 0xeef25dd8, 0x852ee0e2, 0x691a50b6, 0xc24f814b, 0x4057d02e, 0x1a7027c2, 0x940128ca, 0xe524bd60, 0xdfc42a34, 0x5c660828, 0x625f0bc0, 0x0736e130, 0xdb1f4eb8, 0x93dd97bb, 0xab978162, 0xa892631e, 0x32344a00, 0x422976a3, 0x25779ed5, 0xb7320ebd, 0x24ae7deb, 0xff1f30e1, 0x90a022e1, 0xb553ada7, 0x3a00c75d, 0x3b14b336, 0x80ac9445, 0x76b35ce5, 0x825a665d, 0x4e1e0923, 0x0c69aebc, 0x3e15c3e6, 0x1bca6e19, 0x1cfeef07, 0xe174c35c, 0x4fbda286, 0x2c7bbf73, 0x96f754dc, 0x5c63252a, 0x95c04e0d, 0x77ca359a, 0xc18676fb, 0x3da32215, 0xc2e9e2af, 0xdc786295, 0x37b467e6, 0x2de4b870, 0x981d8fcb, 0x1c55875a, 0x25b97c90, 0xcffc9df3, 0xf8f07656, 0xfc55a341, 0x7df87dfe, 0x075a4077, 0xd0c81ca3, 0xd3d4b477, 0x3ac9b98f, 0xad6ddd0c, 0x0887bc80, 0x8a4211d9 }, }, - }, + // Message 0 + { 0x1dd30b07, 0x7a20e1b4, 0x115af11c, 0x97802d6b, 0x71544abc, 0xf2bc3fa7, 0xf6e0503b, 0x78cb7e48, 0xa30c7b6c, 0x3fa57779, 0x62af2846, 0x7145e0fb, 0x7f4e2832, 0x27b691a8, 0x4f51c10a, 0xc3bf3c35, 0x3590d49f, 0x1a3ce71a, 0xd6aefc2d, 0x973b26e5, 0x3cd1f9e5, 0xd16d72d6, 0xec083586, 0x4bc5c167, 0xb5cf09e7, 0xdb73999d, 0x14bb9526, 0xb8b457e7, 0x0a880269, 0x421ef4c2, 0x61b1e1d8, 0x388b344e, 0x5ce460de, 0x5fba2b59, 0x1542c556, 0x22c67e3f, 0x4e4b85cd, 0x8397db1d, 0xe947eae6, 0x3624eb45, 0xaa90759b, 0xf22563b4, 0xe9fdea74, 0xd377c19d, 0x9c40d81c, 0x414329b6, 0x236b963e, 0x177b7ae6, 0xfc784ccb, 0xf5997978, 0x3abb91d2, 0xb9022814, 0x6c52f545, 0x6887d3ee, 0x19c31382, 0x77891c70, 0x31a4eb0c, 0xf91d8fc7, 0xdd7c5a2c, 0xd70d36b7, 0xcbd2177f, 0xeef25eae, 0xd1e28214, 0x5ae777a6, 0x2ed2dff6, 0x3519453d, 0xb905e964, 0x46f77558, 0x2863e62e, 0x9c248fbb, 0x8b520908, 0xca900ef0, 0x3259bd4a, 0x3f0f7f41, 0xe2f276d8, 0xd82e9c89, 0x24a83a1e, 0x86accf96, 0xaf0bde50, 0xaa575f80, 0x7a707413, 0x864d4cc3, 0x10a1b440, 0xbddbaa40, 0x6491bded, 0x5e771fc6, 0x0ac3e261, 0x4e438a97, 0x28695772, 0xe01782b6, 0x05b7d3b4, 0xa9e86035, 0xdc32d354, 0xdf89442a, 0xe28124c6, 0x04029f58 }, // Message 1 + { 0x33848dd8, 0xe7836e09, 0xca5a0f41, 0x06005392, 0x07c4e3cb, 0xa0fdb69d, 0xafeb2b08, 0xef413195, 0xf3d1cd01, 0x716d2dbc, 0xe2494e22, 0x16e54706, 0x5a5e12f7, 0xdc95ca93, 0xdce75ef0, 0x84ef183d, 0x3b7807fb, 0x1c2a5170, 0x97d9f580, 0x087fae04, 0x60dc0c3f, 0x23c74ba7, 0x5d7a88ab, 0xb43a453a, 0x030407e7, 0x778f2049, 0x61dbff41, 0x05b64f7b, 0xecdee671, 0x5552ec2b, 0xeb87e7ed, 0xefffb3f8, 0x1dbd29bb, 0x2f351041, 0xae962fa7, 0x6ff2a155, 0x4b8e1f6a, 0x8008bccd, 0xadc038b6, 0xb6d261fc, 0x32d87543, 0xd69f8d81, 0x956ddcaf, 0x46496335, 0x78923048, 0x41d10e82, 0xfac5bb0d, 0xff0fead0, 0x4ba5b498, 0xde213e07, 0x95f5de08, 0x98fc3216, 0x2390d74b, 0xe66b3354, 0x3c9a737f, 0xd68f4a21, 0xb86ec19c, 0xb54ef2b4, 0x7ae7b726, 0x317edea5, 0xdb52f3da, 0xf2c8ddf6, 0x8975c934, 0x5ffb553d, 0x16fa5cc8, 0x44be6a69, 0x83e7d672, 0x2feadeb6, 0xad79641f, 0xc6f9ca2b, 0xd8e0b8cc, 0x4ccfd352, 0x05f8ac86, 0x7f1cf362, 0xeaa7ddb7, 0x347814d9, 0xddbadb11, 0x6e16fdbb, 0xeea66534, 0x0a045c01, 0x82157a88, 0xb191b3c4, 0xdc8fa781, 0x7800bed7, 0x18f48d72, 0xbd65317b, 0xb2e1b61a, 0xfa219cab, 0xe8c56ed0, 0xd38d2fdd, 0xbe94d8e1, 0x93674a1a, 0xcf61399c, 0xf2512581, 0x5fdd17d4, 0x966136bf }, // Message 2 + { 0x9bbb2c24, 0x3e809a67, 0x09589246, 0x766acc7f, 0x7b2655cd, 0x21b9eb2a, 0xc09b52ff, 0x2689e2e3, 0x875030a1, 0x3a6f11b5, 0xfe225d07, 0x4e764d22, 0xe97ee0ab, 0x1c370cdf, 0x42373ac2, 0xf9b5abeb, 0x993f16dc, 0x49ae4679, 0xafc3b152, 0x9ac97356, 0xa8b39c0d, 0x95563462, 0x69c54cad, 0x6b2d0c90, 0xe01ffaef, 0x80090674, 0xccbdc920, 0x0f67c36f, 0xcfc2cf7f, 0x88d605ff, 0xe00975fa, 0x8dd33c0a, 0x1f5827a4, 0x3c653584, 0x7e83b1c2, 0x329890a7, 0x84ee6eb0, 0xdedd32bb, 0xe96b9c7d, 0x33f258e9, 0xdc72ac85, 0x19999994, 0x0ce022f3, 0x1b0f9343, 0xa09ed3ec, 0x26131e20, 0xd59dcdf4, 0xf36220b3, 0x3e5e4370, 0x27e76689, 0x5035ef5c, 0x4a00f78c, 0x62f02bef, 0x72ba9ea4, 0x5e69343c, 0xdd760c30, 0x0d9413c7, 0x167832c7, 0x20f1dc0c, 0x6c04bd22, 0xecc4ef61, 0x9aa0e468, 0xda1b320b, 0x87cdddc9, 0x9edd9520, 0xc8b860de, 0xd0595061, 0x4ea05219, 0x53ffc1ab, 0x1403fd6a, 0xd671d660, 0xaeb31f22, 0x2081c4b2, 0x3ad34de7, 0x10e38026, 0x35a99f89, 0x80cdb6bc, 0x961b7f67, 0xc308357f, 0x6afa371b, 0x5536d81b, 0x88ba626f, 0x58245cc3, 0x1d074b80, 0x31f33e10, 0x0d2796b1, 0xa87dbc31, 0xb4fafefb, 0x9cc4dd5d, 0x1392f1c9, 0x6608a408, 0x29bcf835, 0xf4012433, 0xf9fb1170, 0x2e211738, 0x6b27913a }, // Message 3 + { 0x89ab0030, 0xc4250e0f, 0xbc90454a, 0xd7b805c6, 0x8f3379d1, 0x02fdcdfd, 0x1cee1096, 0x91fa7ca0, 0x16659c1c, 0x85e9e9af, 0x96a5a844, 0x6a9e23e8, 0xde241e7d, 0xdbf47cef, 0x2f763c3b, 0xc37d0b3e, 0x29df1f63, 0xc6af9e35, 0x72ce3496, 0x86999ab8, 0xf86c3abb, 0x61e26c79, 0x0eeb9522, 0x88d69b72, 0xb800d4e4, 0x43584df9, 0x76cd4f85, 0xfd228340, 0x14b7fa54, 0x8d38f2d0, 0x6acd0758, 0xa07ebbb2, 0x4bcbff9c, 0x0d563e80, 0xcbe4d8a2, 0x3187ee90, 0x77118bfd, 0x7c81c15a, 0x0fc2860f, 0xd27952a9, 0x3e777af9, 0xed0e28a1, 0x12260ac5, 0xdda7c661, 0x2138f6d3, 0x53dd74ef, 0x89d96332, 0x83cd74ec, 0x39bb794f, 0x2648ead6, 0x941388dc, 0x32b2a9be, 0xbe5e87aa, 0xd997d17a, 0xd0614ac4, 0x7f2be785, 0x2bfccc52, 0x2cc2b2b4, 0xb6ae74b4, 0x9f84ff27, 0x886a9cd8, 0xb5cc7f0b, 0xe73ef16a, 0x4e028c43, 0xf1e43014, 0xef1c72af, 0x3dbc6a82, 0xe2e5757e, 0x909c23cb, 0x115826f6, 0xda086c8a, 0x5fdcd239, 0xc27e9057, 0x57f9893f, 0xf9ff2755, 0x41ee1548, 0xe3c9b4bb, 0x4bda5e41, 0xa635f5b0, 0xa94bbabc, 0x862d93bc, 0x31b3a8df, 0x5485c1fe, 0xf0124216, 0x4b619dd2, 0x8df5ff9b, 0x50bb155e, 0xa968ea40, 0x0859e718, 0x8a3199c6, 0xe4553bbb, 0x9baf44d9, 0xb12d6498, 0xb878a59e, 0xe0d13c6f, 0x2bb74cb7 }, // Message 4 + { 0xabf9a766, 0xc7598b0b, 0x1866649d, 0xcd24127d, 0x2cd2e2fc, 0x19c31e2b, 0x1c7f56cf, 0x77c76e57, 0x62a49e90, 0xa5a89ca9, 0x5294b82d, 0xe8f182c4, 0x8b40ebe7, 0x515666c1, 0xa430a24c, 0x43260ab3, 0x1c6e4a17, 0x1fbaea29, 0x7070679f, 0xce931dc5, 0x9df42bf6, 0x5e873d07, 0x520c6633, 0x49aaf80a, 0x49c6b5a9, 0x15074f1c, 0xa6b9f5a6, 0x6e2585f4, 0xe09aea9b, 0x305607a8, 0x6df358bf, 0xd804d2bf, 0x48ee8c78, 0x9309cae5, 0x9198601a, 0x6fbff8d8, 0xcc7896fe, 0x81cccec8, 0xd8185ea2, 0x23fa8bf7, 0x0ce2865c, 0xf015bcc4, 0xd71fb2a9, 0x4598d445, 0x3133fce4, 0x1e179697, 0x64c56bd2, 0x68af22de, 0xa0aa42a8, 0xb8184fc9, 0x3ec21f1d, 0x30f8fac4, 0x1536c2a9, 0x2645cf02, 0x17ef7159, 0xf7309c3e, 0x85e6a098, 0xe6b4066d, 0x19964d30, 0x389af5c9, 0x3d739fb7, 0xab72767e, 0x60d546f7, 0xda585399, 0xe955e994, 0x72b840fb, 0x9971491b, 0x61e07743, 0x1a471634, 0x075d9d61, 0x24921c9d, 0x8e1b5979, 0xae0fdd3e, 0x8f71903b, 0x4e373f40, 0xa8500ae7, 0x1f225fe7, 0x188d47ce, 0x618da90f, 0x1716bfa6, 0x566164c7, 0x10555f1b, 0x5b3b9cc8, 0x77921856, 0x6014c5b0, 0xda27653d, 0xb0943d38, 0x336cf13a, 0xd9febd34, 0x1657ddcc, 0xd7e1aada, 0x54b10d97, 0x88f13732, 0x7310cd55, 0xaa5f6269, 0x85cfa06f }, // Message 5 + { 0xde9ec0bb, 0x71ce275d, 0xcea33e85, 0x99501280, 0xd956176e, 0xc883165c, 0x8f77016b, 0x030f10d4, 0x2b3ac35c, 0x939f3cd4, 0x71ab5924, 0x950ca9f0, 0xdd9eab26, 0x024ddcb1, 0xd3adfc61, 0x32f8a9a8, 0xf4678564, 0x6e538709, 0xc4f9e00a, 0x9236af28, 0x5efb1831, 0xa3c6430f, 0xb5e25317, 0x5f7ee309, 0xfa99c2ae, 0x1e03ff49, 0x20f94781, 0xb01e6ff6, 0x0b8dd51d, 0x3c8a19db, 0x0a2c1876, 0xa0dff0eb, 0x7389d213, 0x4143634f, 0x521993bf, 0x65bd40f3, 0xe2f746d1, 0x8bc6007d, 0xd24cd0c2, 0xf153f376, 0xe26d5393, 0x3f644a47, 0xd7426e05, 0x6b06f344, 0xbf5cab80, 0x82b44d11, 0x37d9093e, 0xd33a1761, 0xff94c832, 0xc614d1bc, 0x5a1dd0c7, 0x1cc645c5, 0xd91db784, 0x32efe6ae, 0x09ff24ec, 0x329781fb, 0x66831dac, 0x2f1a3647, 0xd986dc9a, 0x535fb6e4, 0xbf0a1211, 0x9d9c5e0c, 0x1566d6a0, 0x401a616a, 0x1253eb46, 0x4771ff4e, 0x11601897, 0x9f2f7cac, 0x6219f12e, 0x53e53137, 0x5f878279, 0x53040f96, 0xfdeaf516, 0xd6a00205, 0xd02c307a, 0x3bfc99c9, 0x3e3dd8f8, 0x6abb1c4d, 0x20e7270b, 0xafe26ccd, 0x0704d6c9, 0x24b55dbf, 0x1da0683d, 0xa152edc8, 0xbfe87bb3, 0x648eedb7, 0x2e4c8cb3, 0x130c0d1b, 0x14db85c7, 0x58a5093f, 0x0dd0e4a2, 0x669057bd, 0x67a8d73a, 0x42934819, 0x997f7e48, 0x4a79a2fb }, // Message 6 + { 0x3091af00, 0x3e88a63f, 0xc1e5a42e, 0xef4136ab, 0x019914f4, 0xe5679a1d, 0x53398d88, 0x0adbfe54, 0x18b045db, 0xc192c25a, 0x42d66a41, 0x44fe7c2f, 0x24c949c3, 0x9a9a1a24, 0x72a30041, 0x1d4d0c7f, 0xda007af0, 0x0f8ebd86, 0x9d75b6d6, 0x63c92aff, 0x43689bcb, 0xbe3c99be, 0xec00e4b6, 0x3c1b6d9e, 0x09e61956, 0xe32bc167, 0xeef7d112, 0xa5b6aaca, 0xd4920f01, 0x9d2a805f, 0x045b38ff, 0xf85b8e76, 0xcd5eb94d, 0x65a26556, 0xc67f6cd8, 0xc0b8e974, 0x7d82557e, 0xd9818bbd, 0xeb5ba0fb, 0x5c9a90f0, 0xed2b3d8c, 0x2c4012b0, 0xaaa83528, 0x27f8ca81, 0x1fa868eb, 0xf6f1ffd8, 0x0ebb2a64, 0x65f33892, 0xa83b6286, 0xdc8f84e7, 0x0082e31f, 0xa94c437a, 0x273e38dd, 0x18cbba3e, 0x33d142c1, 0x9652fa61, 0x38c770ef, 0x456110a9, 0x1cc26e20, 0x35440d20, 0x2bc8c13f, 0x934c3e3b, 0xc7592d8a, 0x4ff51143, 0xd528f834, 0x08a081b2, 0x008da561, 0xf66f5ad5, 0x304ef7ba, 0x4cbb841b, 0xafc3093f, 0x8f4f2bcd, 0x0dd051cc, 0xfd9cdd1b, 0x3171189c, 0x1690ca02, 0x3e6fbbd7, 0x0c2a98b5, 0x1362d451, 0x7e2edb82, 0x33e6eeed, 0x4e71a3a6, 0xf51d3acc, 0x444e4e06, 0xeb50c285, 0x66881abb, 0x2d3690f8, 0x574b7709, 0xe6e57584, 0x16c95cae, 0xba2dbd54, 0x5a5d693a, 0xc823016c, 0xf0089ae6, 0x415e0902, 0x67c1b0c1 }, // Message 7 + { 0x7e8b2e2a, 0x289b46a4, 0xa6a37b8c, 0xc567df73, 0x55018796, 0x4e9d9d18, 0x0d31eb7e, 0x5d74d159, 0x841ebae2, 0xe1973167, 0xd61418e6, 0x5cb89cbc, 0x1acb9a42, 0xf82e0e7f, 0x05e631bc, 0xba43f7f9, 0xd79c942b, 0x16628593, 0xcbb9d614, 0x8614cc8b, 0xf7945887, 0xca968cfe, 0x5b92abbf, 0x18abb020, 0x4ca4d94d, 0x652b2efd, 0xb38d885c, 0xd727ce25, 0xd0accfb8, 0x8b1498c4, 0xa9788ae1, 0x87b60400, 0x72ee888c, 0x3cc8b5be, 0xd01b4fda, 0xe4214afd, 0xd709bd20, 0xe17b0353, 0x7fffe766, 0x1cf3c00e, 0x1ba37716, 0x0e412e6e, 0xcfe26c33, 0xd4e73eef, 0xcfe108b0, 0x9da923e4, 0xf309b4f6, 0xf7553306, 0x96001a08, 0x18392a1e, 0x10f14241, 0x1c5b6398, 0xe14efe32, 0xa1fa1f3d, 0xd30a00e3, 0x2220b1b5, 0xd21b950f, 0xffbe55a0, 0xab511ea4, 0x1d508c36, 0x11766260, 0x93f08d28, 0x2b55f5d2, 0x3b31e88a, 0x901cc723, 0xffb83098, 0x0cc75b00, 0xfdf6ddfa, 0x8c61275f, 0x7c3d5f35, 0x6e947893, 0x8d78a4ef, 0x3715a9b2, 0x5df48a9b, 0xced6b5ac, 0xc365d317, 0xf0751afa, 0x51b70a61, 0xb961f7ab, 0x00e2ec20, 0xddc4bcd5, 0x3575bb7c, 0xfc3e41e6, 0xabd80278, 0x560cd8db, 0x37c6f978, 0xbecaf8b6, 0x8e9370b8, 0x6e419061, 0x123a0d8e, 0xafc8bf2f, 0x110335cb, 0x0e2dd6ff, 0xdff2ac5b, 0xc4c40ded, 0x71c828d5 }, // Message 8 + { 0x5f4d6c0f, 0x07cbb6c0, 0xc5d29098, 0xaa4b7646, 0x9ad67706, 0xc24cb90a, 0x0e3b474d, 0x570aa38b, 0x609c6eea, 0x35acb442, 0xfb4ecb48, 0xc0bca95d, 0xca13fb93, 0xce8c161c, 0xcb587f70, 0x5be94979, 0xa8d864f1, 0x46d3a2cd, 0x376e1880, 0xed9e9acc, 0xad3671d8, 0xf07acd26, 0xd4fcd4b2, 0x8592f218, 0x4215a2ee, 0xeba03531, 0x5979f6e3, 0xce0435fa, 0xda72ea66, 0x02503771, 0x9734cb8d, 0x7ecc8a3a, 0x5b7e0c2f, 0x952a10c9, 0xbb8ac3e7, 0x07691411, 0x6a4ec582, 0x5720909f, 0x6dfbd1f8, 0x87a2ade8, 0x4fa2084c, 0x47cef5ef, 0x68295cb4, 0xf126dd97, 0x147ad2d0, 0x8350c426, 0x5f996e6e, 0xb984046f, 0xdfe837e9, 0xc90ba36b, 0x74f4144c, 0x96b87bf6, 0x2a854c34, 0x4aecade4, 0x51262c73, 0x59ef8591, 0x5e8a1852, 0xb18e1501, 0x96fb63a7, 0x99766d88, 0x4eae8963, 0xdc86ecbe, 0x394414c8, 0x4b680710, 0xf1f31913, 0x44decb2a, 0xbc328965, 0xeb85a7a5, 0x3123199b, 0x029a3109, 0xf7ff3e08, 0x6624ddd6, 0x25f6bc05, 0x1dafd418, 0x0d07a121, 0x3c8c10aa, 0x0d367ea7, 0xbc97bccc, 0x4c3c5bd0, 0x6a412808, 0xdd549ed9, 0xeac0470f, 0x9bab1f29, 0x22fcbbf9, 0x844313ad, 0x020ad2d7, 0x738d245d, 0x0e0de0e0, 0x7ca6cb06, 0x02c4cc89, 0x8bf7b00b, 0x3b19f999, 0xd8acac9d, 0xdba5a5c7, 0x79e558bd, 0x98cdad76 }, // Message 9 + { 0x3cb7cf11, 0xa6105ab5, 0xab76fba2, 0x83b390f6, 0x2c8b342f, 0x067cb33b, 0x1408d6ee, 0x11fac21f, 0x3acf1455, 0x0b5a24b0, 0xfd77a460, 0x94c6fd74, 0x58f4b525, 0xf942d753, 0x66cc39a2, 0x49c9739e, 0x6403a808, 0xc991f39f, 0x32b96bad, 0x251f2197, 0x39e921b7, 0x0678add2, 0xeea0ac3b, 0x73ca6627, 0xb471fc30, 0x5a3af2cd, 0x2e295cb3, 0xf69dabd3, 0xe91b9a66, 0x3a22cfcd, 0xc19a3cac, 0x6558aa8a, 0x1d35ee0e, 0x3fe4bbbc, 0xa502e579, 0xeef25dd8, 0x852ee0e2, 0x691a50b6, 0xc24f814b, 0x4057d02e, 0x1a7027c2, 0x940128ca, 0xe524bd60, 0xdfc42a34, 0x5c660828, 0x625f0bc0, 0x0736e130, 0xdb1f4eb8, 0x93dd97bb, 0xab978162, 0xa892631e, 0x32344a00, 0x422976a3, 0x25779ed5, 0xb7320ebd, 0x24ae7deb, 0xff1f30e1, 0x90a022e1, 0xb553ada7, 0x3a00c75d, 0x3b14b336, 0x80ac9445, 0x76b35ce5, 0x825a665d, 0x4e1e0923, 0x0c69aebc, 0x3e15c3e6, 0x1bca6e19, 0x1cfeef07, 0xe174c35c, 0x4fbda286, 0x2c7bbf73, 0x96f754dc, 0x5c63252a, 0x95c04e0d, 0x77ca359a, 0xc18676fb, 0x3da32215, 0xc2e9e2af, 0xdc786295, 0x37b467e6, 0x2de4b870, 0x981d8fcb, 0x1c55875a, 0x25b97c90, 0xcffc9df3, 0xf8f07656, 0xfc55a341, 0x7df87dfe, 0x075a4077, 0xd0c81ca3, 0xd3d4b477, 0x3ac9b98f, 0xad6ddd0c, 0x0887bc80, 0x8a4211d9 }, + }, + }, { /* Case 1 */ .iv = { 0x1a, 0x74, 0x1a, 0x0d, 0x12, 0x6a, 0x41, 0x95, 0xad, 0x9d, 0xcf, 0x50, 0x36, 0xcd, 0xd2, 0x2f }, .p_data = { @@ -82,18 +83,19 @@ static const encrypt_testcase_t test_cases[NUM_CASES] = { .hmac_key_idx = DS_KEY_BLOCK_1, // results of message array encrypted with these keys .expected_results = { - // Message 0 - { 0x835d38bf, 0xe5d63f67, 0x9969a043, 0xdf213e48, 0x5395a017, 0x78987b04, 0xec668fef, 0x138cea9d, 0xd2959a98, 0xca4bcc37, 0x73bb1fb9, 0xcfbf5c65, 0xac990953, 0x1010be27, 0x409fe4a2, 0x1a088f8e, 0x8a6129e2, 0x28b0f377, 0x95fe4361, 0x31c102ed, 0x9d56607e, 0x4a0e1bc6, 0x845492e7, 0x85041a2c, 0x11674b84, 0x5c7c5581, 0x9dcd3abc, 0x55787571, 0x7ebdb8d1, 0x35e919ef, 0x75bc464c, 0xc9a8f462, 0xbb6f7aea, 0x468b755d, 0xb1fed0b0, 0x9de6970d, 0x59b00212, 0x59072464, 0x45ca23fa, 0xad6b2f35, 0x204def10, 0x740ed293, 0x7bc9091a, 0xff564d15, 0x5dac25fc, 0xb71f9b49, 0xf4d4e929, 0xf43cb14d, 0xdb65ea58, 0x2e2b7709, 0x48ec8318, 0x5e2ac1b7, 0x434e5675, 0x941b94ea, 0xf8383423, 0x7ab130a4, 0x7ab3f1a7, 0x0f29b325, 0x37e2a0fb, 0x8f4a69fa, 0x5300ee3c, 0x60e2b8ea, 0xcee689b3, 0x4fb2e0d4 }, // Message 1 - { 0xaea0f0cc, 0x1a04cde4, 0x130e1cdb, 0x602d49ba, 0x3905c581, 0xef7076bb, 0x97cf179c, 0xb8d34ef3, 0xf67fed8d, 0xf83b3124, 0x03844cf5, 0x4b94e59e, 0xd4bc08ed, 0x29751177, 0x05a7bed1, 0xeaf15db4, 0xfb5c176a, 0x0022a082, 0x875783a1, 0xc7b0c8e3, 0xbb306d42, 0xaa940cbe, 0x24601cf1, 0x6a5f3b51, 0xb510d1c0, 0xe04a1c02, 0x7a75519a, 0x62898080, 0x072fb3c0, 0x8ea64421, 0x1d69910e, 0xce8f69d3, 0x4178728d, 0xf6a0ac68, 0xe912aef9, 0x399c8a67, 0x510b4530, 0x051870e4, 0xa88a8e9d, 0x58b9beb2, 0xe745be00, 0xc73e7aaf, 0x753a3b8d, 0x77e4e5f3, 0x11b9c826, 0x6ac2a4bb, 0xd586fcd5, 0xaa00a3f4, 0x6ba0891a, 0x9280c3e2, 0x2619978c, 0x6e84589a, 0x08619b2c, 0x56292b20, 0x61231305, 0x0fc4ed35, 0x3b98feb5, 0xe58c13e0, 0xd5be0160, 0xf8ecb215, 0xdcf2e362, 0x9e33ae28, 0xc321c2fb, 0x502a5838 }, // Message 2 - { 0x3ddfd386, 0x6e970ebe, 0xeb7ea383, 0xa669530d, 0x9d8932f3, 0xe6136de0, 0x1025104b, 0x0705d132, 0x6092beca, 0x3bcebea3, 0xd132717f, 0x75ff1b2f, 0xb3650121, 0x81978768, 0x69818c9c, 0xdcd7f2b3, 0xb833662e, 0xfd6c05e0, 0x5a60ffb3, 0x20b17ace, 0x0783c2cf, 0x9f9b2bfb, 0x00a33a3a, 0x9c578fff, 0x4bcb51d1, 0x97c65525, 0x201b4cce, 0x7cda0c91, 0xbfcba599, 0x205da6a5, 0xad5139b3, 0xdd371516, 0x3f163e24, 0xf3302b85, 0x3644d76e, 0xa4cb54e5, 0x6bd17357, 0x1b592082, 0x9f9d16ff, 0xed911666, 0x4da7e0a8, 0x3794bfad, 0x6cc87568, 0x91a3b09c, 0xf616aa63, 0xe3e613a5, 0x4e9f27ca, 0x2dfe69e3, 0xab52b446, 0xb470e27c, 0xc29267c5, 0xf8196031, 0xd62a42d0, 0xd23e3ece, 0xf57beacf, 0x60320b3d, 0x19482bbc, 0xe2565c30, 0xd2be65a7, 0xcf4c9ed7, 0xab283b90, 0x73665ce1, 0x17c472b3, 0x8f84065d }, // Message 3 - { 0x7a03a04f, 0xbaace918, 0x251a548a, 0xaef94e57, 0x044bb78c, 0x418e7bd2, 0x2baeb277, 0x9316a3d8, 0x09c55923, 0xc3847913, 0x9489f08b, 0x4202255a, 0x0052468a, 0x787c3556, 0xadcc0f35, 0x46905e61, 0x733c9627, 0x0adb7185, 0x5628be9f, 0x64acdebe, 0x0d65d855, 0xe910b82c, 0x93d6e9d7, 0x30e78e83, 0xe480a591, 0xb6a272a1, 0x439d1a60, 0x9ba73f8c, 0x4e47e26c, 0x77546854, 0x4b213196, 0x6c0a9ce5, 0xb1a1bf69, 0x0f4ec13f, 0x115b8e29, 0xe57ad59e, 0xd13f4088, 0x15b6ab73, 0xf850462e, 0x235e658a, 0xb67dda70, 0xf869a31c, 0x7a68d45c, 0x83798c24, 0x9b41ea3d, 0x51d3c878, 0xb0a09fd8, 0x5b43262e, 0xcad9a0ab, 0xa468879e, 0x7f587d0a, 0xf7b48bac, 0x4cf4d7a5, 0x749cbe80, 0x4232863f, 0xbaa0de28, 0x2f794252, 0x156ac039, 0x503fd973, 0x4636fe18, 0x8c814348, 0xe9b16601, 0xcd83fa21, 0x273c9388 }, // Message 4 - { 0xf98eb364, 0x99c9caff, 0x2600738b, 0x0624e1ee, 0x6ef8c7f0, 0x36acef55, 0x5fcbc2c7, 0x5da49157, 0xd66beabf, 0x424c2003, 0x58d5eed0, 0xf5b15fd2, 0x4d7d7608, 0x5841ca15, 0xfa323fad, 0x5ba1c2b5, 0x2d3b328d, 0xb0b4bef6, 0x28274fbd, 0xcd749d15, 0x82168019, 0xe5c7aaee, 0xc8859b8b, 0x42b4fdfd, 0x4cfa650c, 0x2458b829, 0x973b8891, 0x9694ed16, 0xaa2e8784, 0x34b134a9, 0x1d5ad164, 0xd292b460, 0x106883ff, 0x82e7a1a3, 0x4e7efe87, 0x82b91b3a, 0x509172ee, 0xecdb302b, 0xf3d844b0, 0x6033ce4d, 0xcb0e8db3, 0x48cc61fa, 0x21671b05, 0x87c4c8f7, 0xbd803bc9, 0xcc8cb60c, 0x52c671af, 0x7bf68d07, 0xbfd04b93, 0xa53221c2, 0x199415aa, 0x7ea79094, 0x8b633d2d, 0xf5e5307c, 0xe95ae38a, 0x2f56ef98, 0xfe788444, 0x75b2517e, 0x98fc8260, 0x8457cace, 0x3b54e191, 0x4db57540, 0x955b2f2d, 0x24c93908 }, // Message 5 - { 0x1f28ddc2, 0x15a2dc71, 0x8e7252e6, 0x52639b27, 0x52ce60f2, 0xd61531d8, 0xaaf57cca, 0x74f38591, 0x86a1308c, 0x2f6e64d6, 0x88e5c0b4, 0x151a998e, 0xdb9acdd4, 0xd34f328a, 0xb3de0215, 0xac48737e, 0xaddb7e17, 0x493a053b, 0x78e711a2, 0x45731b42, 0x92c2db4e, 0x6c053e5c, 0xc619cf31, 0x96a24999, 0xf77ac300, 0xdd0e2da7, 0x78b417d4, 0x238081fd, 0x2a145fa3, 0x8873f774, 0xf53a2d43, 0x6ed14716, 0x4eee7203, 0xdb7edc1e, 0x5ff789a4, 0xbfb9bfc3, 0x507dd2b1, 0x65aa4379, 0x0972c296, 0x7e69b5f8, 0x6ed7b232, 0xb92d76f9, 0xc22c4366, 0xba7c2143, 0x8f2c34af, 0x8a1bdf99, 0xcbedc3ce, 0xd232c905, 0x17efee6c, 0x9250bea0, 0x7ea0911e, 0x20dcb8a8, 0x33e8db59, 0xbd45664c, 0x1e62d9c9, 0xd50aa2a1, 0x7792a770, 0xb8b9fae7, 0xfa2fef77, 0x52a29eec, 0x618a5954, 0xd9236e6c, 0xa696f270, 0x7836803c }, // Message 6 - { 0xec64ca3c, 0x3678f40f, 0xe3d00448, 0x8404a50a, 0x101223df, 0x1aaa5b1e, 0x5f64bec9, 0x5d0ea2d2, 0x56a60d03, 0x13a8b3bb, 0x1c3e9a21, 0xf35e9061, 0xabe87d10, 0x21ee3db4, 0x7bed23da, 0x85bc8040, 0xfe8526cd, 0x8d23fec0, 0x8688adce, 0x007978c9, 0xa93f75f5, 0xaecc2565, 0x60fa222a, 0x6c3dca6e, 0x56a91183, 0xab8afb43, 0x8ddf1e0d, 0x94fbcbee, 0x255d9618, 0x3ee98bbc, 0x1ff43eb2, 0xfdb7edd7, 0xd352a38e, 0x82f977f3, 0x50873873, 0x12678596, 0x973fed11, 0xcf419c3b, 0xff80eb70, 0x56bf5e82, 0x3e45e09e, 0x20104ca2, 0xb350417e, 0xf7ba8440, 0xef3f6adc, 0x86077d78, 0xe63480fb, 0xcdb5f14b, 0x604e3b49, 0x82bb1259, 0x99764293, 0x7276ec12, 0x03d28b92, 0x324ff0c3, 0x95c31851, 0xd3d5d247, 0xbabf0578, 0x642bb38b, 0x62188f4c, 0x93ce0c9e, 0x1bfb9d63, 0xdd5d248c, 0x2316198e, 0x072e73f7 }, // Message 7 - { 0x00a3e1e2, 0x66ce9c3b, 0x0d21bcea, 0xc051866e, 0x7e25880c, 0x5e17f3f7, 0x3e7925e8, 0x04b1d12a, 0xf11510d6, 0xafc765d6, 0x4532e9c6, 0x6939cee0, 0x2634d48b, 0xa03e3cb6, 0x060d39ad, 0xe2a95e89, 0x856f7fba, 0xcb429a2f, 0xfb2c2ce1, 0x8d950c85, 0x508af1f4, 0xfbdf22cf, 0x6b7258ab, 0x36bd4d6e, 0x55603283, 0x235e2a6d, 0xe3faff0c, 0xb8b0dbef, 0x7cd8a9be, 0x1de43b98, 0xf3ed9652, 0x1a5451e6, 0xa33a57bb, 0xc09ea9b6, 0x3d882bb0, 0xb3bc50f2, 0xd14e9fe5, 0xe123aa3a, 0x42a552b5, 0x3e675022, 0x78362ba8, 0x1d85e30f, 0xdcbe7506, 0xc5916a41, 0x55508d5f, 0x55f3fe0c, 0x988e98fd, 0x57ca4d0e, 0xa10feaef, 0x7e457772, 0xe71324cc, 0x499dff0c, 0x59200869, 0x7748d113, 0x049f9382, 0x3a27952a, 0x11e88cda, 0x9f0be192, 0x91a5336e, 0x65baea68, 0xa6185492, 0x51e9990b, 0x654144a9, 0x8af5b175 }, // Message 8 - { 0x62c3edd8, 0x6fe563b4, 0xb55f8c9d, 0xeb212894, 0x544f427b, 0xdde12726, 0x25f49372, 0x58f31f93, 0xedae370a, 0x8bd35034, 0xe354465d, 0x734ffaf6, 0xecf5a0ce, 0x90d132ae, 0xdae05950, 0x4a98c3da, 0x22816397, 0x76cd5223, 0x959de8ce, 0xa6c70b75, 0x27f32d4b, 0x9b3b0e33, 0x25fb512a, 0xbd2bd4cd, 0x05b35f37, 0x88d625ea, 0x01f015a7, 0x703fe63e, 0x26a82c25, 0x58e42a0d, 0xe1a36751, 0x3a407afb, 0xccbfedd9, 0x6ccc2afd, 0x64a91a52, 0xcce659f6, 0x21bd8b9a, 0x70bafab3, 0x0bf349ef, 0xbc9ca563, 0x773eb021, 0xbdf4b1da, 0xc5d38991, 0x7f571195, 0x68c85949, 0x85a54e7e, 0x2af5550a, 0xd22049e4, 0x2e349d14, 0x44e65417, 0x74d2fcb3, 0xf476c998, 0x3a9ba228, 0xc172a514, 0x90c7c270, 0xd79c9b83, 0x831ae841, 0x3a7f9283, 0x372bae1d, 0xae1a6eeb, 0xbb459f0e, 0x0f6dafa7, 0x76d9fddc, 0x5cc22a15 }, // Message 9 - { 0x70f405b7, 0x465029b2, 0x077202c6, 0xd31c7f2b, 0xd190f66b, 0xb9dc1726, 0xe5fca329, 0xac39c8c0, 0xf4404de0, 0x7ceb2dae, 0xe6e76432, 0xb3f0da25, 0xdf2dfbac, 0x3fe0d5e6, 0x10250326, 0xb5a89d4b, 0x26e384c9, 0x94bf486a, 0xb83a42ed, 0x6a7584dc, 0xdbba6ce6, 0x0dc2a4b0, 0xfc1ec776, 0xa9e7207e, 0x3321d690, 0xd67dcff8, 0xfa440ece, 0x2cbe27e0, 0xae3b3f56, 0x01ad071f, 0x25e3f648, 0x2c09f3f9, 0x504061a4, 0x5e1d77b7, 0x48858bfc, 0x9c05d8cf, 0x57eab353, 0x10a7809f, 0xf28e5ff9, 0xe1e06bbf, 0xa483c0b6, 0x0bb3e25a, 0xb32a6b03, 0x81e6d0bf, 0x64cc457a, 0xbb514952, 0x84b0b2ea, 0x9b7f44f5, 0x14b1f423, 0x93614063, 0xb75e831d, 0xae508c35, 0x07d9de51, 0xcb5a9404, 0xca5593bf, 0xd3a6f1c8, 0xfe0578ca, 0xbc175972, 0xf83c64cf, 0xfb612553, 0xebb70016, 0x0ded9f6e, 0xc12eb1e9, 0x90d391d3 }, }, - }, + // Message 0 + { 0x835d38bf, 0xe5d63f67, 0x9969a043, 0xdf213e48, 0x5395a017, 0x78987b04, 0xec668fef, 0x138cea9d, 0xd2959a98, 0xca4bcc37, 0x73bb1fb9, 0xcfbf5c65, 0xac990953, 0x1010be27, 0x409fe4a2, 0x1a088f8e, 0x8a6129e2, 0x28b0f377, 0x95fe4361, 0x31c102ed, 0x9d56607e, 0x4a0e1bc6, 0x845492e7, 0x85041a2c, 0x11674b84, 0x5c7c5581, 0x9dcd3abc, 0x55787571, 0x7ebdb8d1, 0x35e919ef, 0x75bc464c, 0xc9a8f462, 0xbb6f7aea, 0x468b755d, 0xb1fed0b0, 0x9de6970d, 0x59b00212, 0x59072464, 0x45ca23fa, 0xad6b2f35, 0x204def10, 0x740ed293, 0x7bc9091a, 0xff564d15, 0x5dac25fc, 0xb71f9b49, 0xf4d4e929, 0xf43cb14d, 0xdb65ea58, 0x2e2b7709, 0x48ec8318, 0x5e2ac1b7, 0x434e5675, 0x941b94ea, 0xf8383423, 0x7ab130a4, 0x7ab3f1a7, 0x0f29b325, 0x37e2a0fb, 0x8f4a69fa, 0x5300ee3c, 0x60e2b8ea, 0xcee689b3, 0x4fb2e0d4 }, // Message 1 + { 0xaea0f0cc, 0x1a04cde4, 0x130e1cdb, 0x602d49ba, 0x3905c581, 0xef7076bb, 0x97cf179c, 0xb8d34ef3, 0xf67fed8d, 0xf83b3124, 0x03844cf5, 0x4b94e59e, 0xd4bc08ed, 0x29751177, 0x05a7bed1, 0xeaf15db4, 0xfb5c176a, 0x0022a082, 0x875783a1, 0xc7b0c8e3, 0xbb306d42, 0xaa940cbe, 0x24601cf1, 0x6a5f3b51, 0xb510d1c0, 0xe04a1c02, 0x7a75519a, 0x62898080, 0x072fb3c0, 0x8ea64421, 0x1d69910e, 0xce8f69d3, 0x4178728d, 0xf6a0ac68, 0xe912aef9, 0x399c8a67, 0x510b4530, 0x051870e4, 0xa88a8e9d, 0x58b9beb2, 0xe745be00, 0xc73e7aaf, 0x753a3b8d, 0x77e4e5f3, 0x11b9c826, 0x6ac2a4bb, 0xd586fcd5, 0xaa00a3f4, 0x6ba0891a, 0x9280c3e2, 0x2619978c, 0x6e84589a, 0x08619b2c, 0x56292b20, 0x61231305, 0x0fc4ed35, 0x3b98feb5, 0xe58c13e0, 0xd5be0160, 0xf8ecb215, 0xdcf2e362, 0x9e33ae28, 0xc321c2fb, 0x502a5838 }, // Message 2 + { 0x3ddfd386, 0x6e970ebe, 0xeb7ea383, 0xa669530d, 0x9d8932f3, 0xe6136de0, 0x1025104b, 0x0705d132, 0x6092beca, 0x3bcebea3, 0xd132717f, 0x75ff1b2f, 0xb3650121, 0x81978768, 0x69818c9c, 0xdcd7f2b3, 0xb833662e, 0xfd6c05e0, 0x5a60ffb3, 0x20b17ace, 0x0783c2cf, 0x9f9b2bfb, 0x00a33a3a, 0x9c578fff, 0x4bcb51d1, 0x97c65525, 0x201b4cce, 0x7cda0c91, 0xbfcba599, 0x205da6a5, 0xad5139b3, 0xdd371516, 0x3f163e24, 0xf3302b85, 0x3644d76e, 0xa4cb54e5, 0x6bd17357, 0x1b592082, 0x9f9d16ff, 0xed911666, 0x4da7e0a8, 0x3794bfad, 0x6cc87568, 0x91a3b09c, 0xf616aa63, 0xe3e613a5, 0x4e9f27ca, 0x2dfe69e3, 0xab52b446, 0xb470e27c, 0xc29267c5, 0xf8196031, 0xd62a42d0, 0xd23e3ece, 0xf57beacf, 0x60320b3d, 0x19482bbc, 0xe2565c30, 0xd2be65a7, 0xcf4c9ed7, 0xab283b90, 0x73665ce1, 0x17c472b3, 0x8f84065d }, // Message 3 + { 0x7a03a04f, 0xbaace918, 0x251a548a, 0xaef94e57, 0x044bb78c, 0x418e7bd2, 0x2baeb277, 0x9316a3d8, 0x09c55923, 0xc3847913, 0x9489f08b, 0x4202255a, 0x0052468a, 0x787c3556, 0xadcc0f35, 0x46905e61, 0x733c9627, 0x0adb7185, 0x5628be9f, 0x64acdebe, 0x0d65d855, 0xe910b82c, 0x93d6e9d7, 0x30e78e83, 0xe480a591, 0xb6a272a1, 0x439d1a60, 0x9ba73f8c, 0x4e47e26c, 0x77546854, 0x4b213196, 0x6c0a9ce5, 0xb1a1bf69, 0x0f4ec13f, 0x115b8e29, 0xe57ad59e, 0xd13f4088, 0x15b6ab73, 0xf850462e, 0x235e658a, 0xb67dda70, 0xf869a31c, 0x7a68d45c, 0x83798c24, 0x9b41ea3d, 0x51d3c878, 0xb0a09fd8, 0x5b43262e, 0xcad9a0ab, 0xa468879e, 0x7f587d0a, 0xf7b48bac, 0x4cf4d7a5, 0x749cbe80, 0x4232863f, 0xbaa0de28, 0x2f794252, 0x156ac039, 0x503fd973, 0x4636fe18, 0x8c814348, 0xe9b16601, 0xcd83fa21, 0x273c9388 }, // Message 4 + { 0xf98eb364, 0x99c9caff, 0x2600738b, 0x0624e1ee, 0x6ef8c7f0, 0x36acef55, 0x5fcbc2c7, 0x5da49157, 0xd66beabf, 0x424c2003, 0x58d5eed0, 0xf5b15fd2, 0x4d7d7608, 0x5841ca15, 0xfa323fad, 0x5ba1c2b5, 0x2d3b328d, 0xb0b4bef6, 0x28274fbd, 0xcd749d15, 0x82168019, 0xe5c7aaee, 0xc8859b8b, 0x42b4fdfd, 0x4cfa650c, 0x2458b829, 0x973b8891, 0x9694ed16, 0xaa2e8784, 0x34b134a9, 0x1d5ad164, 0xd292b460, 0x106883ff, 0x82e7a1a3, 0x4e7efe87, 0x82b91b3a, 0x509172ee, 0xecdb302b, 0xf3d844b0, 0x6033ce4d, 0xcb0e8db3, 0x48cc61fa, 0x21671b05, 0x87c4c8f7, 0xbd803bc9, 0xcc8cb60c, 0x52c671af, 0x7bf68d07, 0xbfd04b93, 0xa53221c2, 0x199415aa, 0x7ea79094, 0x8b633d2d, 0xf5e5307c, 0xe95ae38a, 0x2f56ef98, 0xfe788444, 0x75b2517e, 0x98fc8260, 0x8457cace, 0x3b54e191, 0x4db57540, 0x955b2f2d, 0x24c93908 }, // Message 5 + { 0x1f28ddc2, 0x15a2dc71, 0x8e7252e6, 0x52639b27, 0x52ce60f2, 0xd61531d8, 0xaaf57cca, 0x74f38591, 0x86a1308c, 0x2f6e64d6, 0x88e5c0b4, 0x151a998e, 0xdb9acdd4, 0xd34f328a, 0xb3de0215, 0xac48737e, 0xaddb7e17, 0x493a053b, 0x78e711a2, 0x45731b42, 0x92c2db4e, 0x6c053e5c, 0xc619cf31, 0x96a24999, 0xf77ac300, 0xdd0e2da7, 0x78b417d4, 0x238081fd, 0x2a145fa3, 0x8873f774, 0xf53a2d43, 0x6ed14716, 0x4eee7203, 0xdb7edc1e, 0x5ff789a4, 0xbfb9bfc3, 0x507dd2b1, 0x65aa4379, 0x0972c296, 0x7e69b5f8, 0x6ed7b232, 0xb92d76f9, 0xc22c4366, 0xba7c2143, 0x8f2c34af, 0x8a1bdf99, 0xcbedc3ce, 0xd232c905, 0x17efee6c, 0x9250bea0, 0x7ea0911e, 0x20dcb8a8, 0x33e8db59, 0xbd45664c, 0x1e62d9c9, 0xd50aa2a1, 0x7792a770, 0xb8b9fae7, 0xfa2fef77, 0x52a29eec, 0x618a5954, 0xd9236e6c, 0xa696f270, 0x7836803c }, // Message 6 + { 0xec64ca3c, 0x3678f40f, 0xe3d00448, 0x8404a50a, 0x101223df, 0x1aaa5b1e, 0x5f64bec9, 0x5d0ea2d2, 0x56a60d03, 0x13a8b3bb, 0x1c3e9a21, 0xf35e9061, 0xabe87d10, 0x21ee3db4, 0x7bed23da, 0x85bc8040, 0xfe8526cd, 0x8d23fec0, 0x8688adce, 0x007978c9, 0xa93f75f5, 0xaecc2565, 0x60fa222a, 0x6c3dca6e, 0x56a91183, 0xab8afb43, 0x8ddf1e0d, 0x94fbcbee, 0x255d9618, 0x3ee98bbc, 0x1ff43eb2, 0xfdb7edd7, 0xd352a38e, 0x82f977f3, 0x50873873, 0x12678596, 0x973fed11, 0xcf419c3b, 0xff80eb70, 0x56bf5e82, 0x3e45e09e, 0x20104ca2, 0xb350417e, 0xf7ba8440, 0xef3f6adc, 0x86077d78, 0xe63480fb, 0xcdb5f14b, 0x604e3b49, 0x82bb1259, 0x99764293, 0x7276ec12, 0x03d28b92, 0x324ff0c3, 0x95c31851, 0xd3d5d247, 0xbabf0578, 0x642bb38b, 0x62188f4c, 0x93ce0c9e, 0x1bfb9d63, 0xdd5d248c, 0x2316198e, 0x072e73f7 }, // Message 7 + { 0x00a3e1e2, 0x66ce9c3b, 0x0d21bcea, 0xc051866e, 0x7e25880c, 0x5e17f3f7, 0x3e7925e8, 0x04b1d12a, 0xf11510d6, 0xafc765d6, 0x4532e9c6, 0x6939cee0, 0x2634d48b, 0xa03e3cb6, 0x060d39ad, 0xe2a95e89, 0x856f7fba, 0xcb429a2f, 0xfb2c2ce1, 0x8d950c85, 0x508af1f4, 0xfbdf22cf, 0x6b7258ab, 0x36bd4d6e, 0x55603283, 0x235e2a6d, 0xe3faff0c, 0xb8b0dbef, 0x7cd8a9be, 0x1de43b98, 0xf3ed9652, 0x1a5451e6, 0xa33a57bb, 0xc09ea9b6, 0x3d882bb0, 0xb3bc50f2, 0xd14e9fe5, 0xe123aa3a, 0x42a552b5, 0x3e675022, 0x78362ba8, 0x1d85e30f, 0xdcbe7506, 0xc5916a41, 0x55508d5f, 0x55f3fe0c, 0x988e98fd, 0x57ca4d0e, 0xa10feaef, 0x7e457772, 0xe71324cc, 0x499dff0c, 0x59200869, 0x7748d113, 0x049f9382, 0x3a27952a, 0x11e88cda, 0x9f0be192, 0x91a5336e, 0x65baea68, 0xa6185492, 0x51e9990b, 0x654144a9, 0x8af5b175 }, // Message 8 + { 0x62c3edd8, 0x6fe563b4, 0xb55f8c9d, 0xeb212894, 0x544f427b, 0xdde12726, 0x25f49372, 0x58f31f93, 0xedae370a, 0x8bd35034, 0xe354465d, 0x734ffaf6, 0xecf5a0ce, 0x90d132ae, 0xdae05950, 0x4a98c3da, 0x22816397, 0x76cd5223, 0x959de8ce, 0xa6c70b75, 0x27f32d4b, 0x9b3b0e33, 0x25fb512a, 0xbd2bd4cd, 0x05b35f37, 0x88d625ea, 0x01f015a7, 0x703fe63e, 0x26a82c25, 0x58e42a0d, 0xe1a36751, 0x3a407afb, 0xccbfedd9, 0x6ccc2afd, 0x64a91a52, 0xcce659f6, 0x21bd8b9a, 0x70bafab3, 0x0bf349ef, 0xbc9ca563, 0x773eb021, 0xbdf4b1da, 0xc5d38991, 0x7f571195, 0x68c85949, 0x85a54e7e, 0x2af5550a, 0xd22049e4, 0x2e349d14, 0x44e65417, 0x74d2fcb3, 0xf476c998, 0x3a9ba228, 0xc172a514, 0x90c7c270, 0xd79c9b83, 0x831ae841, 0x3a7f9283, 0x372bae1d, 0xae1a6eeb, 0xbb459f0e, 0x0f6dafa7, 0x76d9fddc, 0x5cc22a15 }, // Message 9 + { 0x70f405b7, 0x465029b2, 0x077202c6, 0xd31c7f2b, 0xd190f66b, 0xb9dc1726, 0xe5fca329, 0xac39c8c0, 0xf4404de0, 0x7ceb2dae, 0xe6e76432, 0xb3f0da25, 0xdf2dfbac, 0x3fe0d5e6, 0x10250326, 0xb5a89d4b, 0x26e384c9, 0x94bf486a, 0xb83a42ed, 0x6a7584dc, 0xdbba6ce6, 0x0dc2a4b0, 0xfc1ec776, 0xa9e7207e, 0x3321d690, 0xd67dcff8, 0xfa440ece, 0x2cbe27e0, 0xae3b3f56, 0x01ad071f, 0x25e3f648, 0x2c09f3f9, 0x504061a4, 0x5e1d77b7, 0x48858bfc, 0x9c05d8cf, 0x57eab353, 0x10a7809f, 0xf28e5ff9, 0xe1e06bbf, 0xa483c0b6, 0x0bb3e25a, 0xb32a6b03, 0x81e6d0bf, 0x64cc457a, 0xbb514952, 0x84b0b2ea, 0x9b7f44f5, 0x14b1f423, 0x93614063, 0xb75e831d, 0xae508c35, 0x07d9de51, 0xcb5a9404, 0xca5593bf, 0xd3a6f1c8, 0xfe0578ca, 0xbc175972, 0xf83c64cf, 0xfb612553, 0xebb70016, 0x0ded9f6e, 0xc12eb1e9, 0x90d391d3 }, + }, + }, { /* Case 2 */ .iv = { 0xf8, 0x40, 0x6d, 0xc2, 0x14, 0xcf, 0x51, 0xfa, 0xba, 0x22, 0x6c, 0x84, 0x62, 0xe8, 0x55, 0x1f }, .p_data = { @@ -107,18 +109,19 @@ static const encrypt_testcase_t test_cases[NUM_CASES] = { .hmac_key_idx = DS_KEY_BLOCK_1, // results of message array encrypted with these keys .expected_results = { - // Message 0 - { 0xf310f445, 0xef8a7e16, 0x3305705e, 0x8425f05d, 0x7c52803b, 0x3683f157, 0x66aed50c, 0xf25c6a91, 0x7f527392, 0x12961c88, 0x36371944, 0x559457b5, 0xd00a275b, 0x5e5d03d6, 0xbd69fbce, 0xeb255ff9, 0x19282ae3, 0x783e7db8, 0xa6fae8fe, 0x31ab084e, 0x91089b30, 0x067cfadc, 0x30f9978d, 0xb20c9992, 0x4c9e106d, 0x315504fd, 0xe0b32d13, 0x4e806332, 0xbf3b26a0, 0x0328d962, 0x58a5b7bb, 0x48f7370c }, // Message 1 - { 0xd61b5930, 0x10ac25c2, 0xf9c7c5a6, 0x42910e3b, 0xda9de774, 0xd7db92d6, 0x9a2aeac8, 0x7680d452, 0xb4cfd2a1, 0xef63641b, 0x46f78247, 0x0bead2e5, 0xa7f8ba66, 0x9eaab78a, 0x12758fa0, 0xa3597102, 0x3d6adcdc, 0xa0757ffd, 0x21cf3f44, 0x2e8138d7, 0xf0b43523, 0xcfe41517, 0x7089a941, 0x93a9170a, 0xbec7fc51, 0x5de82ec3, 0xb27b0153, 0x3807e930, 0xbd574483, 0xf2d1adeb, 0x87caf02f, 0x66e571af }, // Message 2 - { 0x187e5c38, 0x54c69610, 0xc0b0cbd0, 0x12bd0199, 0x1bec2bfa, 0xcaf3840c, 0xe399adda, 0x0a30609a, 0xbdaa98dc, 0x04e68f02, 0x2a2d27a1, 0x3cb09660, 0xa4d205b4, 0x18083a97, 0xc1d2f725, 0x94c3a5f0, 0x5c86722d, 0x01fc30bb, 0xc9ceade1, 0xcd39318f, 0x63708412, 0x4949dc3b, 0x8c2b6ca0, 0x122a091a, 0x3b840e52, 0x69ebf753, 0x50fcbc3a, 0x7884da4c, 0x6c4af9e1, 0x3714260c, 0x2cdcc350, 0xa112c15b }, // Message 3 - { 0x7aa0add9, 0x19745c35, 0x94da41fe, 0x7ad60b93, 0x5dfb248d, 0xd85228e7, 0xb54b3877, 0xb42f3cb8, 0xf80f3d95, 0x3fd69b4a, 0x5c9a82e3, 0x2450d3a7, 0x3286b6c2, 0x2829dec8, 0x79a78536, 0x71889db4, 0x4d525cdc, 0x9bd01eb8, 0x2e7f72c0, 0x4b6a9ea7, 0xa5d69db2, 0x67612452, 0x26cd107e, 0xf7383cac, 0xeca5d8a4, 0xb4f08dcd, 0x1820038c, 0xf0f6faee, 0x1b77ca61, 0xcfac29fe, 0x0092447d, 0x29de2f24 }, // Message 4 - { 0xb7a5df0f, 0xc75373f1, 0x3ea72c51, 0xdd9ef451, 0x94707b36, 0x19e17306, 0xbf103cdb, 0x95fe4561, 0xe3db7633, 0x4cd2d7a0, 0x510023f5, 0xbb78e70b, 0x914482c4, 0xbffccb98, 0x9526656a, 0x97ae7b13, 0xec2db60c, 0xc0d2ddff, 0x41d2f4d3, 0xfa1af1fc, 0x4cf33e46, 0x1b5cc385, 0x3a0675a8, 0x1994449b, 0xe36a3227, 0x33e75082, 0xc134accb, 0x53e2791d, 0xc8b0035e, 0x8a2153fe, 0xc17700d4, 0x798b90e7 }, // Message 5 - { 0x7b2ebde1, 0x90b72133, 0x64e70d23, 0xead12105, 0xcb83cbf4, 0x8abc79c4, 0xf535af57, 0x8d6546e2, 0xbf5dbf6d, 0x6c14834c, 0x737b764b, 0x98b7e61b, 0x52b7837e, 0xc0af477e, 0x8279583a, 0x695b8504, 0xdbd8518f, 0x7c10ba2d, 0xb3a62c34, 0xc44fa7b7, 0xea6a7173, 0xaf390343, 0x0fecdf96, 0x460eac91, 0x092ab7a7, 0xea1f05cb, 0x14e5e350, 0x37afa09b, 0x6192d38e, 0xa5a84a2e, 0x60ff8653, 0x61b5139c }, // Message 6 - { 0xf9c1f8c3, 0xa9cab7eb, 0x5c4bf6b0, 0x72b5fc95, 0xc135d95a, 0x9a0e9274, 0x7e5f01c9, 0x96f545f1, 0x75f80b45, 0xa4e86727, 0x83726459, 0x202c1901, 0xcd7501cf, 0x6645988c, 0x001fcf80, 0xcdc47212, 0x00c1eb3d, 0x46325c5f, 0x2dbfce7c, 0xe1abcf75, 0x3383ff3c, 0x2eea981f, 0x8575e22c, 0x328364d3, 0x2e9e4f77, 0x29699d6f, 0x87553675, 0x680c6dd5, 0xd13cefb1, 0xe1d92518, 0x96f6d4fb, 0x1f77b77d }, // Message 7 - { 0x5c87dd11, 0x15c93747, 0xbcfe22f1, 0x21dd758d, 0xef45f74c, 0x5ee8ecd6, 0xadf3bd88, 0xf121ac92, 0xc9f2ecf2, 0xb15dc716, 0xdbc9e90f, 0xc806ffdb, 0x847ab647, 0xeb332783, 0x58cc1ae1, 0xe6141bc3, 0xda692ef1, 0xbd34d333, 0x6f132b8e, 0x628bc926, 0xfd5b168d, 0xc0ea4851, 0x51e30761, 0x6acdefad, 0x445084b7, 0x951871b7, 0x36224984, 0xfcaaf34a, 0x63e22ba1, 0xdb08fa93, 0x4d6e1866, 0x484a40b7 }, // Message 8 - { 0x865fa089, 0x79f6170d, 0xf418880c, 0xa20da1bd, 0xf76f4041, 0xbc53972d, 0xeaa4560f, 0x39dd7056, 0x43dd5a60, 0xfaffb757, 0x8e8f2e2e, 0xb1ebb81d, 0xe5a114d3, 0xe0420859, 0x37b94b75, 0x7edf1b31, 0x1a7c257f, 0xfed4fd79, 0xbfa6a733, 0x1ef1f749, 0xe3798bf5, 0xa3c4e95b, 0xaaeae176, 0xb413d684, 0xcfafb071, 0xfd8cfa58, 0x42144301, 0x221408ce, 0x7d191498, 0xfff720b2, 0x80ed8829, 0x939da9d6 }, // Message 9 - { 0x98059557, 0x487b9a53, 0x1fe77a9f, 0x2f04419c, 0x1e25f53c, 0x85824732, 0x2f2a2a6b, 0x6784ce75, 0xc7a6e268, 0x167c1182, 0x330ad69c, 0x0c5bb9db, 0xaa23d157, 0xce49071a, 0x5bb53063, 0x76dc0f9d, 0xa4c01941, 0x38961aef, 0xdc7281c1, 0x22ae6c1d, 0xe3c0e5cb, 0xa01e3dd9, 0xdfef9f3c, 0x9dcdbcdb, 0xba7c9d06, 0x01258f94, 0x9603960e, 0x7bd2480f, 0x0a73d886, 0xb9dc2b12, 0x324e7747, 0x0b2fbdb9 }, }, - }, + // Message 0 + { 0xf310f445, 0xef8a7e16, 0x3305705e, 0x8425f05d, 0x7c52803b, 0x3683f157, 0x66aed50c, 0xf25c6a91, 0x7f527392, 0x12961c88, 0x36371944, 0x559457b5, 0xd00a275b, 0x5e5d03d6, 0xbd69fbce, 0xeb255ff9, 0x19282ae3, 0x783e7db8, 0xa6fae8fe, 0x31ab084e, 0x91089b30, 0x067cfadc, 0x30f9978d, 0xb20c9992, 0x4c9e106d, 0x315504fd, 0xe0b32d13, 0x4e806332, 0xbf3b26a0, 0x0328d962, 0x58a5b7bb, 0x48f7370c }, // Message 1 + { 0xd61b5930, 0x10ac25c2, 0xf9c7c5a6, 0x42910e3b, 0xda9de774, 0xd7db92d6, 0x9a2aeac8, 0x7680d452, 0xb4cfd2a1, 0xef63641b, 0x46f78247, 0x0bead2e5, 0xa7f8ba66, 0x9eaab78a, 0x12758fa0, 0xa3597102, 0x3d6adcdc, 0xa0757ffd, 0x21cf3f44, 0x2e8138d7, 0xf0b43523, 0xcfe41517, 0x7089a941, 0x93a9170a, 0xbec7fc51, 0x5de82ec3, 0xb27b0153, 0x3807e930, 0xbd574483, 0xf2d1adeb, 0x87caf02f, 0x66e571af }, // Message 2 + { 0x187e5c38, 0x54c69610, 0xc0b0cbd0, 0x12bd0199, 0x1bec2bfa, 0xcaf3840c, 0xe399adda, 0x0a30609a, 0xbdaa98dc, 0x04e68f02, 0x2a2d27a1, 0x3cb09660, 0xa4d205b4, 0x18083a97, 0xc1d2f725, 0x94c3a5f0, 0x5c86722d, 0x01fc30bb, 0xc9ceade1, 0xcd39318f, 0x63708412, 0x4949dc3b, 0x8c2b6ca0, 0x122a091a, 0x3b840e52, 0x69ebf753, 0x50fcbc3a, 0x7884da4c, 0x6c4af9e1, 0x3714260c, 0x2cdcc350, 0xa112c15b }, // Message 3 + { 0x7aa0add9, 0x19745c35, 0x94da41fe, 0x7ad60b93, 0x5dfb248d, 0xd85228e7, 0xb54b3877, 0xb42f3cb8, 0xf80f3d95, 0x3fd69b4a, 0x5c9a82e3, 0x2450d3a7, 0x3286b6c2, 0x2829dec8, 0x79a78536, 0x71889db4, 0x4d525cdc, 0x9bd01eb8, 0x2e7f72c0, 0x4b6a9ea7, 0xa5d69db2, 0x67612452, 0x26cd107e, 0xf7383cac, 0xeca5d8a4, 0xb4f08dcd, 0x1820038c, 0xf0f6faee, 0x1b77ca61, 0xcfac29fe, 0x0092447d, 0x29de2f24 }, // Message 4 + { 0xb7a5df0f, 0xc75373f1, 0x3ea72c51, 0xdd9ef451, 0x94707b36, 0x19e17306, 0xbf103cdb, 0x95fe4561, 0xe3db7633, 0x4cd2d7a0, 0x510023f5, 0xbb78e70b, 0x914482c4, 0xbffccb98, 0x9526656a, 0x97ae7b13, 0xec2db60c, 0xc0d2ddff, 0x41d2f4d3, 0xfa1af1fc, 0x4cf33e46, 0x1b5cc385, 0x3a0675a8, 0x1994449b, 0xe36a3227, 0x33e75082, 0xc134accb, 0x53e2791d, 0xc8b0035e, 0x8a2153fe, 0xc17700d4, 0x798b90e7 }, // Message 5 + { 0x7b2ebde1, 0x90b72133, 0x64e70d23, 0xead12105, 0xcb83cbf4, 0x8abc79c4, 0xf535af57, 0x8d6546e2, 0xbf5dbf6d, 0x6c14834c, 0x737b764b, 0x98b7e61b, 0x52b7837e, 0xc0af477e, 0x8279583a, 0x695b8504, 0xdbd8518f, 0x7c10ba2d, 0xb3a62c34, 0xc44fa7b7, 0xea6a7173, 0xaf390343, 0x0fecdf96, 0x460eac91, 0x092ab7a7, 0xea1f05cb, 0x14e5e350, 0x37afa09b, 0x6192d38e, 0xa5a84a2e, 0x60ff8653, 0x61b5139c }, // Message 6 + { 0xf9c1f8c3, 0xa9cab7eb, 0x5c4bf6b0, 0x72b5fc95, 0xc135d95a, 0x9a0e9274, 0x7e5f01c9, 0x96f545f1, 0x75f80b45, 0xa4e86727, 0x83726459, 0x202c1901, 0xcd7501cf, 0x6645988c, 0x001fcf80, 0xcdc47212, 0x00c1eb3d, 0x46325c5f, 0x2dbfce7c, 0xe1abcf75, 0x3383ff3c, 0x2eea981f, 0x8575e22c, 0x328364d3, 0x2e9e4f77, 0x29699d6f, 0x87553675, 0x680c6dd5, 0xd13cefb1, 0xe1d92518, 0x96f6d4fb, 0x1f77b77d }, // Message 7 + { 0x5c87dd11, 0x15c93747, 0xbcfe22f1, 0x21dd758d, 0xef45f74c, 0x5ee8ecd6, 0xadf3bd88, 0xf121ac92, 0xc9f2ecf2, 0xb15dc716, 0xdbc9e90f, 0xc806ffdb, 0x847ab647, 0xeb332783, 0x58cc1ae1, 0xe6141bc3, 0xda692ef1, 0xbd34d333, 0x6f132b8e, 0x628bc926, 0xfd5b168d, 0xc0ea4851, 0x51e30761, 0x6acdefad, 0x445084b7, 0x951871b7, 0x36224984, 0xfcaaf34a, 0x63e22ba1, 0xdb08fa93, 0x4d6e1866, 0x484a40b7 }, // Message 8 + { 0x865fa089, 0x79f6170d, 0xf418880c, 0xa20da1bd, 0xf76f4041, 0xbc53972d, 0xeaa4560f, 0x39dd7056, 0x43dd5a60, 0xfaffb757, 0x8e8f2e2e, 0xb1ebb81d, 0xe5a114d3, 0xe0420859, 0x37b94b75, 0x7edf1b31, 0x1a7c257f, 0xfed4fd79, 0xbfa6a733, 0x1ef1f749, 0xe3798bf5, 0xa3c4e95b, 0xaaeae176, 0xb413d684, 0xcfafb071, 0xfd8cfa58, 0x42144301, 0x221408ce, 0x7d191498, 0xfff720b2, 0x80ed8829, 0x939da9d6 }, // Message 9 + { 0x98059557, 0x487b9a53, 0x1fe77a9f, 0x2f04419c, 0x1e25f53c, 0x85824732, 0x2f2a2a6b, 0x6784ce75, 0xc7a6e268, 0x167c1182, 0x330ad69c, 0x0c5bb9db, 0xaa23d157, 0xce49071a, 0x5bb53063, 0x76dc0f9d, 0xa4c01941, 0x38961aef, 0xdc7281c1, 0x22ae6c1d, 0xe3c0e5cb, 0xa01e3dd9, 0xdfef9f3c, 0x9dcdbcdb, 0xba7c9d06, 0x01258f94, 0x9603960e, 0x7bd2480f, 0x0a73d886, 0xb9dc2b12, 0x324e7747, 0x0b2fbdb9 }, + }, + }, { /* Case 3 */ .iv = { 0x07, 0x26, 0x01, 0x00, 0x07, 0x30, 0x8f, 0x4b, 0x20, 0x54, 0x05, 0x88, 0xcb, 0xf6, 0x05, 0xe5 }, .p_data = { @@ -132,18 +135,19 @@ static const encrypt_testcase_t test_cases[NUM_CASES] = { .hmac_key_idx = DS_KEY_BLOCK_2, // results of message array encrypted with these keys .expected_results = { - // Message 0 - { 0xa1aa1dbc, 0x6bfeca2e, 0x52579368, 0x9917aee2, 0xb0e80764, 0x37f9a8b7, 0x481eb269, 0x464b4d3d, 0xcf71f4db, 0x7351a7ca, 0xeb1ec130, 0xb83fac88, 0x3138bc61, 0x4a512440, 0x72740e8a, 0xe7323f77, 0x217cef40, 0x935a2a3e, 0x0bab13d8, 0xd0240460, 0x75049abd, 0xf3b962c4, 0x11bc2a99, 0xc6bb6684, 0xde379ed5, 0x2ef02cbe, 0x12fd546d, 0x9604b4f3, 0x8d689bb6, 0x7e74892e, 0x6f8ab328, 0xb9f08d16, 0x2e8fb46b, 0xcbc54f3c, 0x3b6907c6, 0x8ab3f3cc, 0xdcbc09a0, 0x3454447e, 0x1370cff9, 0xed567e09, 0x090f14e8, 0x4e12eed6, 0x36245f6f, 0x7bd05722, 0x1b2c8e2d, 0xb4ca04af, 0xb4e7820a, 0xcc2a73f7, 0x9c0df46e, 0x6c9074ba, 0xd4146d11, 0x24b31195, 0x8ce24eb8, 0x28f7726f, 0x07514d9b, 0x64db81e1, 0x65534881, 0x0464d3f7, 0xd747ae2c, 0xbe054cd8, 0xa80bfc3d, 0xba019963, 0x0ec9b06e, 0x4dad02e4, 0x0836f67c, 0x2feb04f5, 0x4b94a15f, 0x1dfcd6f4, 0xad469ebc, 0x92c737e0, 0x2cd35b60, 0xa4c0125f, 0x3332462f, 0xf91f1d37, 0x636d70fa, 0xd230cc56, 0x18685f86, 0xee78afad, 0x59959835, 0x03fa4338, 0x73ddf35b, 0x48d63529, 0x662f3813, 0xe6da64fd, 0x1f96d323, 0xf42067b6, 0x9b82ea14, 0x493feb0a, 0x465b8ec6, 0x9a044790, 0x3fa84e21, 0x6d1ec28e, 0xe5040cec, 0xf2ef9141, 0x4a22c045, 0x83b612f4 }, // Message 1 - { 0xd25ae7cd, 0x54e5b1b6, 0xf68e64db, 0xb2df6bce, 0x828a606c, 0xe86db627, 0xedce94ba, 0x48c16185, 0x8588ab0a, 0xa6bbdcbb, 0x265c52e7, 0xce115342, 0x1c3755ac, 0xcb015c8e, 0xdba14eec, 0xe44bd94a, 0xaa76e009, 0x7a617e88, 0x474b6831, 0xef4355e7, 0x42349fba, 0x2a219307, 0x6a8f73e0, 0x2b317e12, 0xb3e9ea66, 0x9fb18f45, 0xcab09e84, 0x3e0d9a5c, 0x45ed64f6, 0x21a00d3c, 0x01093476, 0xf6a930b2, 0x9a365af0, 0x831c489d, 0xe60a2820, 0xad1a3182, 0x1f6d33a5, 0x1c032e8e, 0x9475e04e, 0xdee6ec81, 0x1221c448, 0xc80ca10b, 0xc9e06b14, 0xf254d191, 0x03dbafb4, 0xda4203d4, 0x101ca395, 0xa20183ac, 0xc8abeadc, 0xd3a828b0, 0xef8aa316, 0xb4a12c62, 0x8eea38f8, 0x4941cfdd, 0x1e4a9784, 0x753a5faa, 0x66c9aa73, 0xc2b8e3a4, 0x4c45c4bd, 0x86f654bf, 0x63e7f803, 0xea1df1a1, 0x019c3e09, 0x56d2abb5, 0x76d59820, 0x0a0c1c61, 0x5de18f7a, 0x782d60e5, 0x045c7e91, 0x29a43ceb, 0xb615c899, 0x584b92ce, 0x851579c3, 0x21e60283, 0x387e27fe, 0x42ca1101, 0x61dee134, 0xbe160a71, 0x1a382b27, 0x9ec820cd, 0x55f76d51, 0x016eda6f, 0xe1a15112, 0xaaa55421, 0x35b229f7, 0x1662dd27, 0x6f5ab29a, 0x38149deb, 0xcc6576a4, 0xe24570f1, 0x7c1dff79, 0x2af8e8ee, 0xa41d31bf, 0x7c8d03e4, 0xc5ea8098, 0xb2177890 }, // Message 2 - { 0x23d80d6f, 0x332e59dd, 0x709354e4, 0x53ebfded, 0x47145d88, 0x48ed2093, 0x8ca19e05, 0xab0c66f2, 0x34a7783f, 0x6494eeba, 0x6b155cb9, 0x904a7a36, 0xdf18f8a8, 0x037809b6, 0x024b12df, 0xdacaa4a1, 0x01ef567c, 0x641f4be5, 0xd65daaba, 0x7dd1aaab, 0xa9bfcbdb, 0xe2de9585, 0x08b6c38e, 0xabba57f2, 0xc378cfe3, 0x88f14d3c, 0xb55afc8a, 0x48d89429, 0x324dcc61, 0xd1d29081, 0x54531f8d, 0x914ba825, 0xf106c060, 0x800783d6, 0x66beb72e, 0x6bfdd2cf, 0xd6b8bc19, 0x37ace02d, 0xf7c1009b, 0x04b9df44, 0xa51416d6, 0xe5a046ef, 0x54db4532, 0xcef4e543, 0x79abc75f, 0x0cc2bf0e, 0x3632ff8a, 0x3ff421f2, 0x545cd824, 0x2bb7108d, 0x20ab0941, 0xe6a5a3c4, 0x936b1188, 0x5a0adfe8, 0xa80ec542, 0xbbddd9b0, 0x619cc3b4, 0xa8fb5288, 0x65f6baeb, 0x114cd217, 0x292974c0, 0x33234e17, 0x8fb30d0d, 0x37f6209e, 0x2125bb9b, 0xe092d255, 0xa5932237, 0xf5c63429, 0x8e24a0cb, 0xfec2118a, 0x8d1484af, 0x6b57f383, 0xee5fe75e, 0xd56bb0fc, 0x768fd62c, 0x2e362b9e, 0xaf61c7df, 0x2b3dab4e, 0x20f1f647, 0xc31882b9, 0xce6d3204, 0x4aa764ec, 0x5f102b8d, 0x321bf8d9, 0xfaef3696, 0xa9d43fa9, 0x117b5edb, 0xa20927eb, 0x09622d86, 0x5fe27475, 0xc01f4ea5, 0x4b6a5fc6, 0x65dc765c, 0x05233680, 0x2152c86c, 0x1eb53b5c }, // Message 3 - { 0xfd79cd47, 0xb0c2f2a5, 0x253a06c5, 0x869705d0, 0x604740cd, 0xdbd15125, 0xeea6be32, 0x7a13359d, 0x738ef862, 0x262c425a, 0x0874ecfd, 0x8d8f3054, 0x622fd315, 0x4449e6ba, 0x7e0f7e08, 0x4c0de6f5, 0x74e097df, 0xb97d0146, 0xc52a7f22, 0x75bb02bb, 0x4135c7b7, 0x08e029c8, 0x0d403e96, 0xdfeaf402, 0x2f00807c, 0x2204a84a, 0x7bcf47c2, 0xe7b7ba13, 0x48ab1e23, 0x99f12f76, 0x204dbae9, 0xb939bb2e, 0x0b820116, 0x97f43da2, 0x1dd7eb77, 0x5e5c968f, 0x446baa5e, 0xbba35824, 0x9ac8f4ef, 0x0f206963, 0x940b1a97, 0x2ef98261, 0x8c04c982, 0x27d81ecd, 0x595392b9, 0x19612b04, 0xd0ce5730, 0xadb036f5, 0x9b7faba1, 0x5bf385ad, 0xbd0d8845, 0x4baf51d1, 0xa32a329b, 0xcb06beec, 0xfd63360d, 0x078e4d91, 0x13957485, 0xef0284c7, 0x1d5b76c3, 0xed596c0e, 0xfafa7dd2, 0x9fda0275, 0x6c7ac160, 0x638863b1, 0xcf72cef5, 0xac45dba2, 0x605224e9, 0x14e713a8, 0xfe6e0c57, 0x487b1788, 0xaf26e692, 0xe419b371, 0xf709e56f, 0xf0b17219, 0x5e3cf8dd, 0xdb160c73, 0xbe9b73ea, 0x4b28962f, 0x6f1c0a76, 0xb99387d2, 0x48a73c3a, 0xe3b8c5c5, 0x9a9ba733, 0x59493059, 0x2767a3ae, 0x3afa8f8e, 0x6044c6f1, 0xf595a693, 0x41f9df83, 0xaa3a2670, 0x967d1de5, 0x4e9d9f32, 0x03f61fe7, 0x11229d4f, 0xf6e73aa6, 0x6afae6c1 }, // Message 4 - { 0x2a558672, 0x1adec7de, 0x823156bd, 0x1adae6af, 0xe619ffae, 0x74873ef4, 0x682795bd, 0x9cff58a8, 0xb777343f, 0xb451d609, 0x64dc8e63, 0x739685df, 0x476948a5, 0xaf7d41b3, 0x8e468f9b, 0x494a1638, 0xa9eea76e, 0xa9e387b1, 0x8c031cec, 0x00ac3674, 0xb68e95ce, 0xd62da688, 0x73ad08f3, 0xeb6f7ec1, 0x4cb4c0dd, 0x1f77a781, 0x86437938, 0xfc80e94f, 0x4a433afb, 0xbe26dba7, 0x81272fb8, 0x85455b6e, 0x6a0b65b4, 0x719169b4, 0xb347abe1, 0x144a985a, 0x2c2fa0f6, 0x94e0806c, 0xe8f0e94e, 0x6946ca3d, 0x3a84aad2, 0xf1638aac, 0x7a85fb0b, 0xc71056f1, 0xb83fdf09, 0xf1f44e0f, 0x1d10713e, 0x8206b586, 0x03ee00f0, 0xb518ae35, 0x77083069, 0x7dc1d5b8, 0xd01978bf, 0x5aca4eb0, 0x599f30a6, 0xa31578cc, 0xd7d4258c, 0xd67b4b4c, 0xdf217acc, 0x3ed8f3c3, 0xa5cb9b86, 0x30d568d4, 0x0a48834d, 0xbcaac227, 0x6ea6598e, 0x6be51ad0, 0x902b50ac, 0xa1e68cf7, 0xe05f3b22, 0xcfa5bd26, 0x5ee78d43, 0x7ea72d53, 0x59d83fc1, 0xe6c5430f, 0xd795b862, 0xef9ebc03, 0xc0795a04, 0xae1162a6, 0x8490e7e2, 0xe772eb99, 0xeb1a911b, 0xe5bf3f80, 0xeaeeef1c, 0xc2bfe0b0, 0x589bd638, 0x687cd03d, 0xb4fa3386, 0x02df2cbe, 0xec97aa45, 0x14014328, 0x1fddbf0e, 0x405611b1, 0x99d67838, 0x3e075db2, 0x231c4336, 0x7d50bc5d }, // Message 5 - { 0x28c750c9, 0x01966fd0, 0x7f3d06cb, 0xb8abad79, 0x3e432f4c, 0xc975e29c, 0xfc7ca255, 0x7ada66f9, 0x8192c217, 0x413ce2bb, 0x8969851e, 0xd7693097, 0x76f5a31c, 0x89874462, 0x726437fe, 0xb194c5a9, 0x99a23cf6, 0x6b56f271, 0xd23bf902, 0x0c552db9, 0xc77855df, 0xda586622, 0x45c147c0, 0xd77a985d, 0x92b82b9e, 0xc016518f, 0xd64e6351, 0x60364340, 0x7b577f18, 0x55f842f6, 0xb8bb2ef2, 0xb97aebab, 0xb66c7dd8, 0x438a5780, 0x695d2cd4, 0x0186bff7, 0x74ca8980, 0x0bacd9ec, 0x61f10b13, 0xad107025, 0xc68e5dd8, 0xc4d3052f, 0x39ff203a, 0xe4e7249b, 0xe4d6061a, 0x79ccaf7b, 0xe5c3a1b9, 0xa5c98ea7, 0x2c00215e, 0x3b080ece, 0x61188199, 0xd15cb516, 0xe1606226, 0xe71cb2a0, 0x87ca1bc0, 0x6e711b80, 0x0ad5457a, 0xa3810eb5, 0x6ec99efe, 0xd452a9d6, 0x59a3e975, 0x7bb9e908, 0x8ad801bc, 0xd040a337, 0xef7831b2, 0xab76502f, 0x8edef374, 0x225cb7cb, 0xcbb4d767, 0xc2eac91e, 0xce739d00, 0x06d8aa3e, 0x88a94e37, 0x165b2472, 0x86a607d2, 0xb8eef8d7, 0x1a7619f5, 0xf3004692, 0x732e2e14, 0x8049c34a, 0x1aaf4a3b, 0x6aca5518, 0x2d3ca896, 0x55a791fd, 0x108d5ea8, 0xea722dcf, 0xdc674b3a, 0xb0480771, 0xba5f9cdc, 0xa7d15653, 0xd0719366, 0x8384ceef, 0x08f63a8e, 0xac4852e3, 0xe499b669, 0x71f900d4 }, // Message 6 - { 0x191fa132, 0xec529575, 0xd350bc5a, 0x1dd01a08, 0x464fbc64, 0x3030ef77, 0xd3ae8199, 0x3a93d837, 0x95ba1b2d, 0x87281d33, 0xc71b420f, 0x0f869a92, 0x9395277d, 0x265f9014, 0x7ca1dcc2, 0x3a8aa517, 0x8ca06b79, 0x935d8c7f, 0x9846142c, 0x7fd38710, 0xa213679f, 0xccb22b7d, 0xfced5250, 0xe2ee7998, 0x1b74127d, 0x98b6f139, 0xa7b8d576, 0x795743f3, 0x003ca859, 0x98e4ff16, 0x865e5d7b, 0xc58ff71b, 0x51dd5f7c, 0x77d45d59, 0xdef44b51, 0x35ee735f, 0xbb2fd64e, 0x14ecc9f9, 0xee26206f, 0x16c40a0b, 0xe26da793, 0xe0ed59c4, 0x28cca504, 0xf8ad4257, 0xf7176ec4, 0xc305229c, 0xab835cf0, 0xb96f092f, 0x19ffd5b7, 0xb8316374, 0xb4cb7fe8, 0x5a433227, 0xb719f9a5, 0x03457109, 0x72b4e00a, 0x99cf6b58, 0xab3851f9, 0xbf07ee85, 0x9ee9abe6, 0xe610c900, 0x25b37bde, 0x8eee2d7d, 0xad082045, 0xa678a249, 0x1c74f6b7, 0x642b8c51, 0xee633a06, 0xe46bafc2, 0x5b257036, 0x08018ca6, 0xab2af844, 0x29febacc, 0x3eeae805, 0xc03721c0, 0x1650b290, 0xa8e2073c, 0x55f64445, 0x1fb6cf2b, 0x84b242de, 0x18a68269, 0x35c4e174, 0xa128d976, 0x19ef3319, 0xa23db9e1, 0x8d676a01, 0x86304fbb, 0x1066317e, 0x9e7029d3, 0x032cd540, 0x956f4738, 0x55241be1, 0x9e8331ba, 0xf929c836, 0x6d6209fe, 0x2a5b1d9e, 0x16c37c16 }, // Message 7 - { 0xdb1c9a9c, 0x5deff40c, 0xb3373d4c, 0x9d628ea4, 0xd12262b6, 0xcbe805eb, 0xa0477188, 0x96ec467a, 0xea0884a7, 0x87e2cd54, 0x25617ab9, 0x7e9d0276, 0x7f796d2a, 0xc8d0eb0a, 0xf1e23aca, 0x471a4455, 0x50d35ea4, 0x633d0a89, 0xa6ebd368, 0xde3ad74d, 0x2774b9e0, 0xefb2422a, 0x23aa3274, 0x2bb5823a, 0xe654ffb5, 0xfaf11941, 0x0735094a, 0x623fe270, 0xd0605432, 0xb5f362e7, 0xd7e65ae9, 0x34332131, 0x4ed4ce90, 0xfd0d83aa, 0x125f0267, 0x566ac135, 0xe141ba65, 0x5213145f, 0xa46299ad, 0x75c5de69, 0x02d2d762, 0x2486b2af, 0x9aef897c, 0x4de5a642, 0xb56e1a99, 0x6a349e07, 0x219ee3b1, 0x7ad30cf9, 0x231e1d02, 0xc4ffb405, 0xecb691d7, 0xdba127a1, 0x453fed84, 0xb1a70dcc, 0xb0a31df7, 0xec814977, 0x2e1fbc59, 0x9811d77d, 0x1f6e8c8b, 0xe99e3675, 0x8057b8d7, 0xfe26053b, 0xca417fd1, 0x564ad062, 0x37d1df83, 0x77ad67bd, 0x9b60e003, 0x5b03ca19, 0x1d1d3c04, 0xa093d050, 0x35d1d54f, 0x0c212c6e, 0x8882c6b8, 0xc898c4e2, 0xd9c17559, 0xf502bac4, 0x279e8ae5, 0xa4f1aab6, 0x8301bab1, 0x743c84c4, 0xd5822a78, 0xb0af1dab, 0x2734861a, 0x68ba0d30, 0x402d8daf, 0xa63e25b6, 0xfe7060fb, 0xc8175ac8, 0xdff77344, 0xf3e5abc4, 0xfeb0c548, 0x9c409afd, 0xf451d5f5, 0x27861421, 0xc00dfe2a, 0x07e603fd }, // Message 8 - { 0x79341110, 0x3eaa9a3e, 0x3c085c32, 0xb1a1add1, 0x11bbcfe1, 0xf70a0bc3, 0x988de2e3, 0x8cfecb83, 0x82a40d9c, 0xa1593ce9, 0x8ed03d21, 0xf3b8c633, 0x43d85b47, 0x878a92f3, 0x4d74b0b9, 0x976e8c95, 0x276d1d83, 0x7e0204d0, 0xc6718b91, 0xcb38068d, 0x1f8da0cc, 0x50c1b479, 0xff7f188b, 0xff1ab5d9, 0x46d9e9de, 0xaad3e1c1, 0x276f355f, 0x59f71ebe, 0x59bf872f, 0x00400dde, 0xe1e9eefa, 0x977098de, 0x309bf8bd, 0xeadcac01, 0x1ea8a66d, 0x62f2d4c6, 0x891afc3a, 0x4f3b0951, 0xdf2dd664, 0xe86f4b73, 0x1f1e1661, 0xe387443b, 0x1213e4cd, 0x45a5c758, 0x4b41af3d, 0x3b0b41dc, 0xab8f30c0, 0x17c6b450, 0x17e441f3, 0x455ba5e4, 0x0f21b9ee, 0x1aedcbcc, 0x2809d947, 0x39c30825, 0x7dc22fa6, 0x819098c1, 0x4ef74d7d, 0xa06d2712, 0xc80faaf2, 0xbd113791, 0x310fc8ec, 0x80d28dc1, 0x80fc8028, 0xa5f7868b, 0xd7f84266, 0xad7f7e1a, 0xb056eb1c, 0xe2405b9a, 0x6db21321, 0xe5d9cb1c, 0xfd0e9679, 0xb57560a8, 0x5b8a721b, 0xeb084e9f, 0x033fa371, 0xddd04527, 0x4c145eea, 0xa470244a, 0xc6eca4bb, 0x19aac9d1, 0x499c8362, 0xa19aee86, 0xac1bcd4c, 0xe23a4bad, 0xc1ee2115, 0x59e7f143, 0xed3917d8, 0xfc43b95f, 0xde31c771, 0x67f6ee54, 0xdc44c991, 0x4f1fe1de, 0x9cf4257e, 0x4ac95e18, 0x0676bc73, 0x6dc235f7 }, // Message 9 - { 0xd1eb33f6, 0x927aa895, 0xc13d7b18, 0x20c54dd5, 0x21b7a967, 0x51d17dd6, 0x934d625d, 0x7437e19d, 0x5e1a4d84, 0x92722dcf, 0x3875608b, 0x536bb522, 0x8351e5e4, 0x74e732d1, 0x9edfec21, 0x2777d97c, 0x70df7f29, 0x6963e91c, 0x85391f32, 0x50ae8d40, 0xdf4af0a4, 0x1320f154, 0x56baaf09, 0xc90df7b2, 0x6fb6a16b, 0xf07c2cdd, 0x889aed44, 0x2540a3a9, 0xc81eb672, 0xc9b36b81, 0xf8f1f29d, 0x43faf5f2, 0x5f29013b, 0xfbb7e46c, 0x584c228b, 0x3b50bc1b, 0x9897c7fe, 0x0139e884, 0x243cd901, 0x76f81c72, 0x38f64dcb, 0x26db109a, 0xd7391f7a, 0x7bcd517f, 0xc72a5b4b, 0xb07f6e62, 0x40c01c5b, 0x7608fbeb, 0x0334fcb7, 0xe8ac74dc, 0x0478c091, 0x65a667f8, 0xf23a6d82, 0x488fa619, 0x471dc831, 0x54f3b664, 0x9f11e50d, 0x7ad8dd31, 0x3a7e9ba0, 0xc468fa21, 0x8dda1f65, 0x88b9d1fa, 0xeb9b57da, 0xcec0d814, 0x3456663b, 0x607418cf, 0x130fba8f, 0x64397053, 0x7b56732e, 0xa84f74e9, 0x353950d6, 0x8eb42599, 0xfe2c8159, 0xcc2a2650, 0x498862ae, 0xf7269bbc, 0xc62a4d59, 0xf3c1a9cd, 0xc79b25d3, 0x1fa0f53a, 0xc1187788, 0x874e3ad2, 0x38ddff67, 0x86a40e76, 0x2964e3ad, 0x835a1fa2, 0x3b7cb7de, 0x8f9737e4, 0xbc318a9c, 0x1f9fdbe9, 0x559a63c5, 0x4acbee44, 0x51d2a044, 0xdeed124e, 0x09fe623b, 0x78433ad2 }, }, - }, + // Message 0 + { 0xa1aa1dbc, 0x6bfeca2e, 0x52579368, 0x9917aee2, 0xb0e80764, 0x37f9a8b7, 0x481eb269, 0x464b4d3d, 0xcf71f4db, 0x7351a7ca, 0xeb1ec130, 0xb83fac88, 0x3138bc61, 0x4a512440, 0x72740e8a, 0xe7323f77, 0x217cef40, 0x935a2a3e, 0x0bab13d8, 0xd0240460, 0x75049abd, 0xf3b962c4, 0x11bc2a99, 0xc6bb6684, 0xde379ed5, 0x2ef02cbe, 0x12fd546d, 0x9604b4f3, 0x8d689bb6, 0x7e74892e, 0x6f8ab328, 0xb9f08d16, 0x2e8fb46b, 0xcbc54f3c, 0x3b6907c6, 0x8ab3f3cc, 0xdcbc09a0, 0x3454447e, 0x1370cff9, 0xed567e09, 0x090f14e8, 0x4e12eed6, 0x36245f6f, 0x7bd05722, 0x1b2c8e2d, 0xb4ca04af, 0xb4e7820a, 0xcc2a73f7, 0x9c0df46e, 0x6c9074ba, 0xd4146d11, 0x24b31195, 0x8ce24eb8, 0x28f7726f, 0x07514d9b, 0x64db81e1, 0x65534881, 0x0464d3f7, 0xd747ae2c, 0xbe054cd8, 0xa80bfc3d, 0xba019963, 0x0ec9b06e, 0x4dad02e4, 0x0836f67c, 0x2feb04f5, 0x4b94a15f, 0x1dfcd6f4, 0xad469ebc, 0x92c737e0, 0x2cd35b60, 0xa4c0125f, 0x3332462f, 0xf91f1d37, 0x636d70fa, 0xd230cc56, 0x18685f86, 0xee78afad, 0x59959835, 0x03fa4338, 0x73ddf35b, 0x48d63529, 0x662f3813, 0xe6da64fd, 0x1f96d323, 0xf42067b6, 0x9b82ea14, 0x493feb0a, 0x465b8ec6, 0x9a044790, 0x3fa84e21, 0x6d1ec28e, 0xe5040cec, 0xf2ef9141, 0x4a22c045, 0x83b612f4 }, // Message 1 + { 0xd25ae7cd, 0x54e5b1b6, 0xf68e64db, 0xb2df6bce, 0x828a606c, 0xe86db627, 0xedce94ba, 0x48c16185, 0x8588ab0a, 0xa6bbdcbb, 0x265c52e7, 0xce115342, 0x1c3755ac, 0xcb015c8e, 0xdba14eec, 0xe44bd94a, 0xaa76e009, 0x7a617e88, 0x474b6831, 0xef4355e7, 0x42349fba, 0x2a219307, 0x6a8f73e0, 0x2b317e12, 0xb3e9ea66, 0x9fb18f45, 0xcab09e84, 0x3e0d9a5c, 0x45ed64f6, 0x21a00d3c, 0x01093476, 0xf6a930b2, 0x9a365af0, 0x831c489d, 0xe60a2820, 0xad1a3182, 0x1f6d33a5, 0x1c032e8e, 0x9475e04e, 0xdee6ec81, 0x1221c448, 0xc80ca10b, 0xc9e06b14, 0xf254d191, 0x03dbafb4, 0xda4203d4, 0x101ca395, 0xa20183ac, 0xc8abeadc, 0xd3a828b0, 0xef8aa316, 0xb4a12c62, 0x8eea38f8, 0x4941cfdd, 0x1e4a9784, 0x753a5faa, 0x66c9aa73, 0xc2b8e3a4, 0x4c45c4bd, 0x86f654bf, 0x63e7f803, 0xea1df1a1, 0x019c3e09, 0x56d2abb5, 0x76d59820, 0x0a0c1c61, 0x5de18f7a, 0x782d60e5, 0x045c7e91, 0x29a43ceb, 0xb615c899, 0x584b92ce, 0x851579c3, 0x21e60283, 0x387e27fe, 0x42ca1101, 0x61dee134, 0xbe160a71, 0x1a382b27, 0x9ec820cd, 0x55f76d51, 0x016eda6f, 0xe1a15112, 0xaaa55421, 0x35b229f7, 0x1662dd27, 0x6f5ab29a, 0x38149deb, 0xcc6576a4, 0xe24570f1, 0x7c1dff79, 0x2af8e8ee, 0xa41d31bf, 0x7c8d03e4, 0xc5ea8098, 0xb2177890 }, // Message 2 + { 0x23d80d6f, 0x332e59dd, 0x709354e4, 0x53ebfded, 0x47145d88, 0x48ed2093, 0x8ca19e05, 0xab0c66f2, 0x34a7783f, 0x6494eeba, 0x6b155cb9, 0x904a7a36, 0xdf18f8a8, 0x037809b6, 0x024b12df, 0xdacaa4a1, 0x01ef567c, 0x641f4be5, 0xd65daaba, 0x7dd1aaab, 0xa9bfcbdb, 0xe2de9585, 0x08b6c38e, 0xabba57f2, 0xc378cfe3, 0x88f14d3c, 0xb55afc8a, 0x48d89429, 0x324dcc61, 0xd1d29081, 0x54531f8d, 0x914ba825, 0xf106c060, 0x800783d6, 0x66beb72e, 0x6bfdd2cf, 0xd6b8bc19, 0x37ace02d, 0xf7c1009b, 0x04b9df44, 0xa51416d6, 0xe5a046ef, 0x54db4532, 0xcef4e543, 0x79abc75f, 0x0cc2bf0e, 0x3632ff8a, 0x3ff421f2, 0x545cd824, 0x2bb7108d, 0x20ab0941, 0xe6a5a3c4, 0x936b1188, 0x5a0adfe8, 0xa80ec542, 0xbbddd9b0, 0x619cc3b4, 0xa8fb5288, 0x65f6baeb, 0x114cd217, 0x292974c0, 0x33234e17, 0x8fb30d0d, 0x37f6209e, 0x2125bb9b, 0xe092d255, 0xa5932237, 0xf5c63429, 0x8e24a0cb, 0xfec2118a, 0x8d1484af, 0x6b57f383, 0xee5fe75e, 0xd56bb0fc, 0x768fd62c, 0x2e362b9e, 0xaf61c7df, 0x2b3dab4e, 0x20f1f647, 0xc31882b9, 0xce6d3204, 0x4aa764ec, 0x5f102b8d, 0x321bf8d9, 0xfaef3696, 0xa9d43fa9, 0x117b5edb, 0xa20927eb, 0x09622d86, 0x5fe27475, 0xc01f4ea5, 0x4b6a5fc6, 0x65dc765c, 0x05233680, 0x2152c86c, 0x1eb53b5c }, // Message 3 + { 0xfd79cd47, 0xb0c2f2a5, 0x253a06c5, 0x869705d0, 0x604740cd, 0xdbd15125, 0xeea6be32, 0x7a13359d, 0x738ef862, 0x262c425a, 0x0874ecfd, 0x8d8f3054, 0x622fd315, 0x4449e6ba, 0x7e0f7e08, 0x4c0de6f5, 0x74e097df, 0xb97d0146, 0xc52a7f22, 0x75bb02bb, 0x4135c7b7, 0x08e029c8, 0x0d403e96, 0xdfeaf402, 0x2f00807c, 0x2204a84a, 0x7bcf47c2, 0xe7b7ba13, 0x48ab1e23, 0x99f12f76, 0x204dbae9, 0xb939bb2e, 0x0b820116, 0x97f43da2, 0x1dd7eb77, 0x5e5c968f, 0x446baa5e, 0xbba35824, 0x9ac8f4ef, 0x0f206963, 0x940b1a97, 0x2ef98261, 0x8c04c982, 0x27d81ecd, 0x595392b9, 0x19612b04, 0xd0ce5730, 0xadb036f5, 0x9b7faba1, 0x5bf385ad, 0xbd0d8845, 0x4baf51d1, 0xa32a329b, 0xcb06beec, 0xfd63360d, 0x078e4d91, 0x13957485, 0xef0284c7, 0x1d5b76c3, 0xed596c0e, 0xfafa7dd2, 0x9fda0275, 0x6c7ac160, 0x638863b1, 0xcf72cef5, 0xac45dba2, 0x605224e9, 0x14e713a8, 0xfe6e0c57, 0x487b1788, 0xaf26e692, 0xe419b371, 0xf709e56f, 0xf0b17219, 0x5e3cf8dd, 0xdb160c73, 0xbe9b73ea, 0x4b28962f, 0x6f1c0a76, 0xb99387d2, 0x48a73c3a, 0xe3b8c5c5, 0x9a9ba733, 0x59493059, 0x2767a3ae, 0x3afa8f8e, 0x6044c6f1, 0xf595a693, 0x41f9df83, 0xaa3a2670, 0x967d1de5, 0x4e9d9f32, 0x03f61fe7, 0x11229d4f, 0xf6e73aa6, 0x6afae6c1 }, // Message 4 + { 0x2a558672, 0x1adec7de, 0x823156bd, 0x1adae6af, 0xe619ffae, 0x74873ef4, 0x682795bd, 0x9cff58a8, 0xb777343f, 0xb451d609, 0x64dc8e63, 0x739685df, 0x476948a5, 0xaf7d41b3, 0x8e468f9b, 0x494a1638, 0xa9eea76e, 0xa9e387b1, 0x8c031cec, 0x00ac3674, 0xb68e95ce, 0xd62da688, 0x73ad08f3, 0xeb6f7ec1, 0x4cb4c0dd, 0x1f77a781, 0x86437938, 0xfc80e94f, 0x4a433afb, 0xbe26dba7, 0x81272fb8, 0x85455b6e, 0x6a0b65b4, 0x719169b4, 0xb347abe1, 0x144a985a, 0x2c2fa0f6, 0x94e0806c, 0xe8f0e94e, 0x6946ca3d, 0x3a84aad2, 0xf1638aac, 0x7a85fb0b, 0xc71056f1, 0xb83fdf09, 0xf1f44e0f, 0x1d10713e, 0x8206b586, 0x03ee00f0, 0xb518ae35, 0x77083069, 0x7dc1d5b8, 0xd01978bf, 0x5aca4eb0, 0x599f30a6, 0xa31578cc, 0xd7d4258c, 0xd67b4b4c, 0xdf217acc, 0x3ed8f3c3, 0xa5cb9b86, 0x30d568d4, 0x0a48834d, 0xbcaac227, 0x6ea6598e, 0x6be51ad0, 0x902b50ac, 0xa1e68cf7, 0xe05f3b22, 0xcfa5bd26, 0x5ee78d43, 0x7ea72d53, 0x59d83fc1, 0xe6c5430f, 0xd795b862, 0xef9ebc03, 0xc0795a04, 0xae1162a6, 0x8490e7e2, 0xe772eb99, 0xeb1a911b, 0xe5bf3f80, 0xeaeeef1c, 0xc2bfe0b0, 0x589bd638, 0x687cd03d, 0xb4fa3386, 0x02df2cbe, 0xec97aa45, 0x14014328, 0x1fddbf0e, 0x405611b1, 0x99d67838, 0x3e075db2, 0x231c4336, 0x7d50bc5d }, // Message 5 + { 0x28c750c9, 0x01966fd0, 0x7f3d06cb, 0xb8abad79, 0x3e432f4c, 0xc975e29c, 0xfc7ca255, 0x7ada66f9, 0x8192c217, 0x413ce2bb, 0x8969851e, 0xd7693097, 0x76f5a31c, 0x89874462, 0x726437fe, 0xb194c5a9, 0x99a23cf6, 0x6b56f271, 0xd23bf902, 0x0c552db9, 0xc77855df, 0xda586622, 0x45c147c0, 0xd77a985d, 0x92b82b9e, 0xc016518f, 0xd64e6351, 0x60364340, 0x7b577f18, 0x55f842f6, 0xb8bb2ef2, 0xb97aebab, 0xb66c7dd8, 0x438a5780, 0x695d2cd4, 0x0186bff7, 0x74ca8980, 0x0bacd9ec, 0x61f10b13, 0xad107025, 0xc68e5dd8, 0xc4d3052f, 0x39ff203a, 0xe4e7249b, 0xe4d6061a, 0x79ccaf7b, 0xe5c3a1b9, 0xa5c98ea7, 0x2c00215e, 0x3b080ece, 0x61188199, 0xd15cb516, 0xe1606226, 0xe71cb2a0, 0x87ca1bc0, 0x6e711b80, 0x0ad5457a, 0xa3810eb5, 0x6ec99efe, 0xd452a9d6, 0x59a3e975, 0x7bb9e908, 0x8ad801bc, 0xd040a337, 0xef7831b2, 0xab76502f, 0x8edef374, 0x225cb7cb, 0xcbb4d767, 0xc2eac91e, 0xce739d00, 0x06d8aa3e, 0x88a94e37, 0x165b2472, 0x86a607d2, 0xb8eef8d7, 0x1a7619f5, 0xf3004692, 0x732e2e14, 0x8049c34a, 0x1aaf4a3b, 0x6aca5518, 0x2d3ca896, 0x55a791fd, 0x108d5ea8, 0xea722dcf, 0xdc674b3a, 0xb0480771, 0xba5f9cdc, 0xa7d15653, 0xd0719366, 0x8384ceef, 0x08f63a8e, 0xac4852e3, 0xe499b669, 0x71f900d4 }, // Message 6 + { 0x191fa132, 0xec529575, 0xd350bc5a, 0x1dd01a08, 0x464fbc64, 0x3030ef77, 0xd3ae8199, 0x3a93d837, 0x95ba1b2d, 0x87281d33, 0xc71b420f, 0x0f869a92, 0x9395277d, 0x265f9014, 0x7ca1dcc2, 0x3a8aa517, 0x8ca06b79, 0x935d8c7f, 0x9846142c, 0x7fd38710, 0xa213679f, 0xccb22b7d, 0xfced5250, 0xe2ee7998, 0x1b74127d, 0x98b6f139, 0xa7b8d576, 0x795743f3, 0x003ca859, 0x98e4ff16, 0x865e5d7b, 0xc58ff71b, 0x51dd5f7c, 0x77d45d59, 0xdef44b51, 0x35ee735f, 0xbb2fd64e, 0x14ecc9f9, 0xee26206f, 0x16c40a0b, 0xe26da793, 0xe0ed59c4, 0x28cca504, 0xf8ad4257, 0xf7176ec4, 0xc305229c, 0xab835cf0, 0xb96f092f, 0x19ffd5b7, 0xb8316374, 0xb4cb7fe8, 0x5a433227, 0xb719f9a5, 0x03457109, 0x72b4e00a, 0x99cf6b58, 0xab3851f9, 0xbf07ee85, 0x9ee9abe6, 0xe610c900, 0x25b37bde, 0x8eee2d7d, 0xad082045, 0xa678a249, 0x1c74f6b7, 0x642b8c51, 0xee633a06, 0xe46bafc2, 0x5b257036, 0x08018ca6, 0xab2af844, 0x29febacc, 0x3eeae805, 0xc03721c0, 0x1650b290, 0xa8e2073c, 0x55f64445, 0x1fb6cf2b, 0x84b242de, 0x18a68269, 0x35c4e174, 0xa128d976, 0x19ef3319, 0xa23db9e1, 0x8d676a01, 0x86304fbb, 0x1066317e, 0x9e7029d3, 0x032cd540, 0x956f4738, 0x55241be1, 0x9e8331ba, 0xf929c836, 0x6d6209fe, 0x2a5b1d9e, 0x16c37c16 }, // Message 7 + { 0xdb1c9a9c, 0x5deff40c, 0xb3373d4c, 0x9d628ea4, 0xd12262b6, 0xcbe805eb, 0xa0477188, 0x96ec467a, 0xea0884a7, 0x87e2cd54, 0x25617ab9, 0x7e9d0276, 0x7f796d2a, 0xc8d0eb0a, 0xf1e23aca, 0x471a4455, 0x50d35ea4, 0x633d0a89, 0xa6ebd368, 0xde3ad74d, 0x2774b9e0, 0xefb2422a, 0x23aa3274, 0x2bb5823a, 0xe654ffb5, 0xfaf11941, 0x0735094a, 0x623fe270, 0xd0605432, 0xb5f362e7, 0xd7e65ae9, 0x34332131, 0x4ed4ce90, 0xfd0d83aa, 0x125f0267, 0x566ac135, 0xe141ba65, 0x5213145f, 0xa46299ad, 0x75c5de69, 0x02d2d762, 0x2486b2af, 0x9aef897c, 0x4de5a642, 0xb56e1a99, 0x6a349e07, 0x219ee3b1, 0x7ad30cf9, 0x231e1d02, 0xc4ffb405, 0xecb691d7, 0xdba127a1, 0x453fed84, 0xb1a70dcc, 0xb0a31df7, 0xec814977, 0x2e1fbc59, 0x9811d77d, 0x1f6e8c8b, 0xe99e3675, 0x8057b8d7, 0xfe26053b, 0xca417fd1, 0x564ad062, 0x37d1df83, 0x77ad67bd, 0x9b60e003, 0x5b03ca19, 0x1d1d3c04, 0xa093d050, 0x35d1d54f, 0x0c212c6e, 0x8882c6b8, 0xc898c4e2, 0xd9c17559, 0xf502bac4, 0x279e8ae5, 0xa4f1aab6, 0x8301bab1, 0x743c84c4, 0xd5822a78, 0xb0af1dab, 0x2734861a, 0x68ba0d30, 0x402d8daf, 0xa63e25b6, 0xfe7060fb, 0xc8175ac8, 0xdff77344, 0xf3e5abc4, 0xfeb0c548, 0x9c409afd, 0xf451d5f5, 0x27861421, 0xc00dfe2a, 0x07e603fd }, // Message 8 + { 0x79341110, 0x3eaa9a3e, 0x3c085c32, 0xb1a1add1, 0x11bbcfe1, 0xf70a0bc3, 0x988de2e3, 0x8cfecb83, 0x82a40d9c, 0xa1593ce9, 0x8ed03d21, 0xf3b8c633, 0x43d85b47, 0x878a92f3, 0x4d74b0b9, 0x976e8c95, 0x276d1d83, 0x7e0204d0, 0xc6718b91, 0xcb38068d, 0x1f8da0cc, 0x50c1b479, 0xff7f188b, 0xff1ab5d9, 0x46d9e9de, 0xaad3e1c1, 0x276f355f, 0x59f71ebe, 0x59bf872f, 0x00400dde, 0xe1e9eefa, 0x977098de, 0x309bf8bd, 0xeadcac01, 0x1ea8a66d, 0x62f2d4c6, 0x891afc3a, 0x4f3b0951, 0xdf2dd664, 0xe86f4b73, 0x1f1e1661, 0xe387443b, 0x1213e4cd, 0x45a5c758, 0x4b41af3d, 0x3b0b41dc, 0xab8f30c0, 0x17c6b450, 0x17e441f3, 0x455ba5e4, 0x0f21b9ee, 0x1aedcbcc, 0x2809d947, 0x39c30825, 0x7dc22fa6, 0x819098c1, 0x4ef74d7d, 0xa06d2712, 0xc80faaf2, 0xbd113791, 0x310fc8ec, 0x80d28dc1, 0x80fc8028, 0xa5f7868b, 0xd7f84266, 0xad7f7e1a, 0xb056eb1c, 0xe2405b9a, 0x6db21321, 0xe5d9cb1c, 0xfd0e9679, 0xb57560a8, 0x5b8a721b, 0xeb084e9f, 0x033fa371, 0xddd04527, 0x4c145eea, 0xa470244a, 0xc6eca4bb, 0x19aac9d1, 0x499c8362, 0xa19aee86, 0xac1bcd4c, 0xe23a4bad, 0xc1ee2115, 0x59e7f143, 0xed3917d8, 0xfc43b95f, 0xde31c771, 0x67f6ee54, 0xdc44c991, 0x4f1fe1de, 0x9cf4257e, 0x4ac95e18, 0x0676bc73, 0x6dc235f7 }, // Message 9 + { 0xd1eb33f6, 0x927aa895, 0xc13d7b18, 0x20c54dd5, 0x21b7a967, 0x51d17dd6, 0x934d625d, 0x7437e19d, 0x5e1a4d84, 0x92722dcf, 0x3875608b, 0x536bb522, 0x8351e5e4, 0x74e732d1, 0x9edfec21, 0x2777d97c, 0x70df7f29, 0x6963e91c, 0x85391f32, 0x50ae8d40, 0xdf4af0a4, 0x1320f154, 0x56baaf09, 0xc90df7b2, 0x6fb6a16b, 0xf07c2cdd, 0x889aed44, 0x2540a3a9, 0xc81eb672, 0xc9b36b81, 0xf8f1f29d, 0x43faf5f2, 0x5f29013b, 0xfbb7e46c, 0x584c228b, 0x3b50bc1b, 0x9897c7fe, 0x0139e884, 0x243cd901, 0x76f81c72, 0x38f64dcb, 0x26db109a, 0xd7391f7a, 0x7bcd517f, 0xc72a5b4b, 0xb07f6e62, 0x40c01c5b, 0x7608fbeb, 0x0334fcb7, 0xe8ac74dc, 0x0478c091, 0x65a667f8, 0xf23a6d82, 0x488fa619, 0x471dc831, 0x54f3b664, 0x9f11e50d, 0x7ad8dd31, 0x3a7e9ba0, 0xc468fa21, 0x8dda1f65, 0x88b9d1fa, 0xeb9b57da, 0xcec0d814, 0x3456663b, 0x607418cf, 0x130fba8f, 0x64397053, 0x7b56732e, 0xa84f74e9, 0x353950d6, 0x8eb42599, 0xfe2c8159, 0xcc2a2650, 0x498862ae, 0xf7269bbc, 0xc62a4d59, 0xf3c1a9cd, 0xc79b25d3, 0x1fa0f53a, 0xc1187788, 0x874e3ad2, 0x38ddff67, 0x86a40e76, 0x2964e3ad, 0x835a1fa2, 0x3b7cb7de, 0x8f9737e4, 0xbc318a9c, 0x1f9fdbe9, 0x559a63c5, 0x4acbee44, 0x51d2a044, 0xdeed124e, 0x09fe623b, 0x78433ad2 }, + }, + }, { /* Case 4 */ .iv = { 0xc6, 0x09, 0xa6, 0x69, 0x05, 0xf2, 0x42, 0xa4, 0xd4, 0x92, 0x33, 0xc2, 0xe3, 0x09, 0x09, 0x56 }, .p_data = { @@ -157,18 +161,19 @@ static const encrypt_testcase_t test_cases[NUM_CASES] = { .hmac_key_idx = DS_KEY_BLOCK_1, // results of message array encrypted with these keys .expected_results = { - // Message 0 - { 0xfc598d13, 0x1d473088, 0x7ffd4112, 0x05e516ab, 0xc7a44c14, 0x613d4f1d, 0xea1783c6, 0xe5a2af06, 0x4606a9a4, 0x8df1d612, 0x33e34d14, 0x86c3c728, 0x6c207e61, 0xd99dbf4e, 0x6aa1e65a, 0x6bb8bec4, 0x86c9d4a2, 0x0f26f926, 0xb4c8a1b2, 0x362af515, 0x71c39eab, 0xb7503223, 0xba49d5cb, 0x5f124681, 0xb0ed8bc1, 0x67b5e609, 0xe0ec19b2, 0xf31e7004, 0x5dfdb706, 0xd008a52a, 0xb75c99cb, 0x8902c79c, 0x204f092f, 0x2fce2179, 0x2d1f3dbb, 0x0fd74ad6, 0xd1c9e71c, 0xb074fb79, 0x35238f28, 0xd8b391af, 0x3e6d2ec3, 0x55844db8, 0xe6e75b8a, 0x03a99ee4, 0xf005dac2, 0xefa7498e, 0x61c2b890, 0xfbe2cf97, 0x3b71c7db, 0x01c5ef6d, 0x1ee832d7, 0xce99d538, 0x68f0814a, 0x6453dcb8, 0x4f68f0fe, 0xcdfef4c7, 0xce3e0294, 0xcd4e7ce4, 0x62e7e380, 0x0124b9d8, 0x36d8e0e4, 0xc4ba6d84, 0x814d3306, 0x33415f8f }, // Message 1 - { 0x18bf9474, 0x988428b3, 0x81ddcad6, 0xc2b68ef7, 0xf4a1f91e, 0x232e183d, 0x4fb1b4f7, 0x3ac70b4b, 0x144d1f9e, 0xd9118e07, 0x8ca7ad8d, 0x6ade88cf, 0xafbd08b6, 0x15206556, 0x52aaaf8a, 0x884c18c6, 0x96015c1a, 0x11830e50, 0x08a180f7, 0x38b52d92, 0x10fdd6e4, 0x971d4085, 0xb51d438e, 0x90351016, 0x911800de, 0x394b0906, 0x177c2f74, 0xf8cdda9d, 0x9cbdea30, 0xfc9c0362, 0x28bf1a50, 0x6105d3df, 0x33189ece, 0x94a16d59, 0x9b061e79, 0xd9a6e6a5, 0x1e888d3a, 0x6d478584, 0xb7790739, 0x66766e30, 0x346510ae, 0x3cbb226b, 0x136cd135, 0x850dec39, 0xe8a0ed14, 0x5b20b0e5, 0xdd1d228f, 0xbbfd809f, 0xaf438780, 0xf4febe0a, 0xe286350b, 0xad8e6121, 0xbe86682c, 0xb9c34739, 0x43d476a2, 0x6aba25ad, 0xf21e3d12, 0x599b3597, 0xccdf84ab, 0xb0f3fb04, 0x9b06b5d3, 0xa601e1e4, 0x84758b74, 0x9fbedc5d }, // Message 2 - { 0xc2b5ae36, 0x1aeb9b5b, 0x0b508123, 0x7ee7b308, 0xcebcc0fb, 0xfa397624, 0x6363bc9d, 0x0f2b272e, 0x7f06060b, 0x9a359730, 0xc8b30728, 0xd5366056, 0x6703f08e, 0x6f4aca2a, 0xf236fe5f, 0x7fc5dd15, 0xe211c3d6, 0xef1da620, 0xd7935897, 0x53399468, 0x8fdee1dc, 0x5027d4ca, 0xc624cbb6, 0xba38e77f, 0x904be5db, 0xafe206a3, 0x24e95377, 0xf2e72a73, 0x2288b1a5, 0x2c7f95fd, 0xb679dc58, 0xe3a0b721, 0xe0702e95, 0xc01864f1, 0x786296ef, 0x139882ca, 0x4c435986, 0xcd065d9e, 0x68f7facb, 0xbd9919ca, 0x8609fdcc, 0xeca268d5, 0x7aef2981, 0xfbd0368a, 0xedddf78e, 0xe8a1d08a, 0x63f18b00, 0x215b4061, 0x30dc86c8, 0x20e39320, 0xd1f81146, 0x0c7fcf7e, 0xb336613a, 0x5e21c11a, 0xb0f69848, 0x7da07291, 0xd028be8e, 0xa02763a7, 0x0ca407ee, 0x5383620c, 0x22e616a7, 0xffef43c8, 0x2e598c30, 0x41d5f744 }, // Message 3 - { 0x9ed3569e, 0xcff8e1fc, 0xb8316201, 0x8ec76542, 0xe2bd71d9, 0x1e6c1bc0, 0xbbb7be3d, 0xf205c2a4, 0xb6dd52ab, 0x79b86266, 0x54f9112e, 0xde54a79b, 0x17afd240, 0xdf138244, 0x081c244d, 0xeac3196d, 0x2c501b40, 0x7c023353, 0x067d08fe, 0x34a95f0d, 0x8518421f, 0xbea1845a, 0x2637c534, 0xd9a55f19, 0xf0073dbc, 0xec397237, 0x6d44c410, 0x6f1536ca, 0x5f8a0b81, 0x9cd9f9ba, 0x9c83a9ef, 0xc7916db2, 0xa53fc34c, 0xb970252d, 0xfae0026a, 0xa7fdbb29, 0x361cd47f, 0xdc982214, 0x511fa34e, 0xd95af0aa, 0xe27a0af0, 0x7668a551, 0x81777273, 0x7d1ad474, 0xab3ad53d, 0xac7dfbcf, 0x3b1bfabd, 0xbe544df8, 0xf265d550, 0xeb6fbb7e, 0x7d5641f9, 0x9fc4030d, 0xed76648b, 0x892f297b, 0x7de0c713, 0x599fe0d5, 0x117990d8, 0xee47aaa3, 0x1a8e7731, 0xd09c1b8c, 0xbd6b98c6, 0xc94cbf1b, 0x3dd4a4dd, 0x037acf37 }, // Message 4 - { 0x1fc95528, 0x63b7d75f, 0x74765e81, 0x8d211f05, 0xdf5813bb, 0x56ff66e5, 0x0f07e11f, 0xac2880aa, 0x5fe06824, 0x9828add3, 0xa69e9842, 0xf4e31018, 0xc69b1e36, 0xfd3a4f81, 0x89eeaa63, 0x47427df2, 0xd5cc698b, 0x9f01c11a, 0x7f773008, 0xcecbaf2b, 0xc8078035, 0x684c771b, 0xaa7f78d4, 0xdf679f8b, 0xd0c244a0, 0xc64be458, 0x83ea0d53, 0x31b442ed, 0x762016b2, 0xc1f7883b, 0x209f72ab, 0xde5cbb55, 0x815389eb, 0xb2191364, 0xcd35817f, 0x980e1486, 0xe452e660, 0x47907753, 0xa2315ae0, 0x2311f1c3, 0x58693740, 0x30ce0572, 0x06bb610a, 0x6e6b97d3, 0x95379f07, 0x998bcf16, 0xda7b2f7f, 0xfe2af4bc, 0xcfe90490, 0x67f1324e, 0xd9b87c2d, 0xf877ea6f, 0xc4faa30b, 0x007fb2aa, 0x6bfb185e, 0x55c8b8b3, 0xda50b63c, 0xb5e0d575, 0xac9a08be, 0x39411815, 0x6063cb1e, 0x3fb7f751, 0x011cb226, 0x8e017cf5 }, // Message 5 - { 0xfaf04f88, 0x9c03a39d, 0x5537d484, 0x04061d78, 0x9026ed61, 0x9105ad03, 0x9772d112, 0xd9a2fc31, 0x85fd5fcb, 0x13ea0d40, 0x13ca95bd, 0xdcdd0824, 0x6080c33f, 0x372a934e, 0x815240b9, 0x945793d7, 0x4cc48bac, 0x964dc4e7, 0x9b7865c6, 0xca216981, 0x4a78c295, 0xcc0e6805, 0xcecd3d96, 0x02277e39, 0xcb932093, 0x50f811dd, 0x84d10aeb, 0x0bcc1472, 0xc76a79d4, 0xc0b23e66, 0x15dd87e1, 0x7a94e3f9, 0xaa09a8b8, 0xbdd5a37b, 0x5b5619e8, 0xe9d9639a, 0x1bcffa7d, 0xf95efe4b, 0x527542cb, 0xce3abb49, 0xebfaf581, 0x0cacc6c1, 0xe8b3236c, 0x9d89ea8b, 0xff5bcc27, 0xab1730d1, 0xc3b1f798, 0x746246a6, 0x2e0b7462, 0x73ff914c, 0x10a9f4c2, 0x8be4541a, 0xdc439d20, 0x4fe5d3c5, 0xd24d95ab, 0x9a8f38e5, 0xf0163d6a, 0xbdc721c8, 0x616bbdd6, 0x13241387, 0x892b9c14, 0xff16c7a7, 0x4a9d5086, 0x6fdabbf7 }, // Message 6 - { 0x99f67aaf, 0x4599443a, 0xeaac250f, 0x64e642a5, 0xc90870ac, 0xfaad4d28, 0xcd7a418e, 0x8abe5c09, 0x54fdb68e, 0x5a690863, 0xc0244737, 0xcfb554ea, 0x19f591e3, 0xc63737c2, 0xfef6af07, 0x589d8e38, 0xd1792c9c, 0x5804026c, 0x62f0c6c8, 0x94f3dd2d, 0xc3078ba0, 0x00d87497, 0x54e1c383, 0x545bbdfb, 0x901d305f, 0xb1bcd27b, 0x9a7e39fd, 0x479d39dc, 0x1a41841d, 0x51336abf, 0xec4e7c5e, 0x025424aa, 0x0ac9809f, 0x11034663, 0x3c25c619, 0x40052b07, 0xec885c50, 0xcc54068d, 0xc83ba064, 0x3dc4224b, 0xeea736d7, 0xba652070, 0xcce7a1d5, 0x7cf447af, 0xc5758174, 0xee446e38, 0xb39bf8a3, 0x82034077, 0xc06e33fc, 0xb9f3a31c, 0x8cfda584, 0xb6eeb236, 0xc6f30415, 0x2d1319ef, 0x2adea19f, 0x9a5789ac, 0x276ba414, 0x82d564c3, 0x6c4e2ac9, 0x86efe4ca, 0xadf6a7c3, 0x49dffebd, 0x4ec9b334, 0x525cc81a }, // Message 7 - { 0x2f8cc27e, 0x350875fb, 0x39dd5df5, 0x89b03399, 0x7061995d, 0xcdff4a8d, 0x8ad7164a, 0xa94b3d47, 0xa27a52df, 0x81defbc8, 0x3bcab908, 0xe1ab51aa, 0x5e255d58, 0xa86e03c0, 0xb12e7d2d, 0xeb4ddb39, 0xe0b20ff1, 0xa1a8a804, 0xa1e63720, 0x5cdf514c, 0x20470756, 0x80ff396e, 0xe1a222fb, 0x1416a149, 0xf107da73, 0xb1f7266e, 0x004b334e, 0xa48d77d3, 0x4f1c1163, 0x2026e047, 0x516e5e8c, 0xc2e3b1dd, 0xa92a39d9, 0xc9912ad5, 0xe2a5d15b, 0x441a8d3d, 0xff6d2498, 0x3cc68abc, 0x31eeb23f, 0xa13cfe83, 0x9bdaab5f, 0xdd044d15, 0x26bd0f7a, 0xa42c0703, 0x6a5abd71, 0x037cf6a3, 0x6ac04323, 0x891bc22a, 0x40c30a53, 0x203fbde5, 0x6548de6b, 0x434b16d8, 0x16312b1e, 0x1cc818d2, 0x922fc3eb, 0xdb9afa7f, 0x826fb620, 0xac29c255, 0x535a649d, 0x295c40b1, 0x4371c19a, 0x98ad6d9a, 0xabbf3324, 0x99ac0444 }, // Message 8 - { 0x6e83f692, 0xbc0e6bda, 0x7e72510e, 0x4e944578, 0xc65967b7, 0x32f2d6c0, 0x02e369aa, 0x67658c2f, 0x8c9b40b7, 0x48cb3f6c, 0xe44438c3, 0xa789ffc2, 0x58d58fd3, 0xb44dc061, 0xb41b3551, 0x7cb5a176, 0xc275d51f, 0x6b1b5da9, 0x084057ce, 0x5335f8da, 0xe3d68679, 0x0e2c0f9c, 0xc74d3251, 0x8614ea1d, 0xd24d3fbb, 0x19f1c101, 0x2b8428fe, 0x7e124e3b, 0xe5691058, 0xb81eaa06, 0x8cec76a6, 0x89b1c345, 0x2847f64f, 0xdc1c91dd, 0xb8b4b126, 0x929da99a, 0x53aef56c, 0x0790c430, 0x9c47900b, 0x2b14de91, 0x94a0c514, 0x36199986, 0x4c0da7ed, 0xe546f058, 0x49dd9fe7, 0x31f8858c, 0x2c0c6222, 0xf8fa5b53, 0x976128c4, 0x19cd831c, 0x9a62299c, 0x53e300c9, 0x88df91d0, 0x940f1558, 0xbd7fdce8, 0x8789041c, 0xefa7f207, 0x9a2eb6e8, 0xea2d8b7f, 0x5d1f5954, 0x1b20a908, 0x8ff17818, 0x428676fe, 0x1d93063a }, // Message 9 - { 0x382d84b6, 0x9d2697cb, 0xf39c39f1, 0x874b431d, 0x4add73d1, 0x3af49e97, 0xed375698, 0x8a19b492, 0xe722e314, 0x3a83ce5d, 0xd9e4fd2f, 0x363f8acc, 0xf9b56768, 0xb646b2be, 0x593eb44c, 0x1866c5a8, 0xa8f2b7f0, 0x81f6de65, 0xc86441c3, 0xcd3cd74d, 0x3e0aa6b2, 0x620d0e63, 0x6e9337b8, 0xcd97bef4, 0xb8808dc3, 0x0a996a55, 0xcfc0fafe, 0xc20b72cd, 0x6dd75c42, 0x0a416689, 0xe175ba09, 0xfc1e76a4, 0xd257e752, 0x2ab8c17f, 0x528354f7, 0x0240e4ea, 0x545cafbb, 0x0b06f1ff, 0xdb305649, 0x581cee55, 0x21adaed2, 0x4ff0aa40, 0x99ba5d0d, 0x0fce658a, 0x97c55b62, 0x820b80b3, 0xd0186a18, 0x5e5a70bd, 0xb8c4c251, 0x883f43b2, 0x8fe14b9e, 0x3a12687b, 0x0c3552b5, 0x88506482, 0x2f8aad3a, 0x51a11aaa, 0x6199cbe3, 0x48fd82ec, 0x92818dc1, 0xfb3e4fcd, 0x4b5e76bf, 0xf7ded2ad, 0x241b6fae, 0xa617617f }, }, - }, + // Message 0 + { 0xfc598d13, 0x1d473088, 0x7ffd4112, 0x05e516ab, 0xc7a44c14, 0x613d4f1d, 0xea1783c6, 0xe5a2af06, 0x4606a9a4, 0x8df1d612, 0x33e34d14, 0x86c3c728, 0x6c207e61, 0xd99dbf4e, 0x6aa1e65a, 0x6bb8bec4, 0x86c9d4a2, 0x0f26f926, 0xb4c8a1b2, 0x362af515, 0x71c39eab, 0xb7503223, 0xba49d5cb, 0x5f124681, 0xb0ed8bc1, 0x67b5e609, 0xe0ec19b2, 0xf31e7004, 0x5dfdb706, 0xd008a52a, 0xb75c99cb, 0x8902c79c, 0x204f092f, 0x2fce2179, 0x2d1f3dbb, 0x0fd74ad6, 0xd1c9e71c, 0xb074fb79, 0x35238f28, 0xd8b391af, 0x3e6d2ec3, 0x55844db8, 0xe6e75b8a, 0x03a99ee4, 0xf005dac2, 0xefa7498e, 0x61c2b890, 0xfbe2cf97, 0x3b71c7db, 0x01c5ef6d, 0x1ee832d7, 0xce99d538, 0x68f0814a, 0x6453dcb8, 0x4f68f0fe, 0xcdfef4c7, 0xce3e0294, 0xcd4e7ce4, 0x62e7e380, 0x0124b9d8, 0x36d8e0e4, 0xc4ba6d84, 0x814d3306, 0x33415f8f }, // Message 1 + { 0x18bf9474, 0x988428b3, 0x81ddcad6, 0xc2b68ef7, 0xf4a1f91e, 0x232e183d, 0x4fb1b4f7, 0x3ac70b4b, 0x144d1f9e, 0xd9118e07, 0x8ca7ad8d, 0x6ade88cf, 0xafbd08b6, 0x15206556, 0x52aaaf8a, 0x884c18c6, 0x96015c1a, 0x11830e50, 0x08a180f7, 0x38b52d92, 0x10fdd6e4, 0x971d4085, 0xb51d438e, 0x90351016, 0x911800de, 0x394b0906, 0x177c2f74, 0xf8cdda9d, 0x9cbdea30, 0xfc9c0362, 0x28bf1a50, 0x6105d3df, 0x33189ece, 0x94a16d59, 0x9b061e79, 0xd9a6e6a5, 0x1e888d3a, 0x6d478584, 0xb7790739, 0x66766e30, 0x346510ae, 0x3cbb226b, 0x136cd135, 0x850dec39, 0xe8a0ed14, 0x5b20b0e5, 0xdd1d228f, 0xbbfd809f, 0xaf438780, 0xf4febe0a, 0xe286350b, 0xad8e6121, 0xbe86682c, 0xb9c34739, 0x43d476a2, 0x6aba25ad, 0xf21e3d12, 0x599b3597, 0xccdf84ab, 0xb0f3fb04, 0x9b06b5d3, 0xa601e1e4, 0x84758b74, 0x9fbedc5d }, // Message 2 + { 0xc2b5ae36, 0x1aeb9b5b, 0x0b508123, 0x7ee7b308, 0xcebcc0fb, 0xfa397624, 0x6363bc9d, 0x0f2b272e, 0x7f06060b, 0x9a359730, 0xc8b30728, 0xd5366056, 0x6703f08e, 0x6f4aca2a, 0xf236fe5f, 0x7fc5dd15, 0xe211c3d6, 0xef1da620, 0xd7935897, 0x53399468, 0x8fdee1dc, 0x5027d4ca, 0xc624cbb6, 0xba38e77f, 0x904be5db, 0xafe206a3, 0x24e95377, 0xf2e72a73, 0x2288b1a5, 0x2c7f95fd, 0xb679dc58, 0xe3a0b721, 0xe0702e95, 0xc01864f1, 0x786296ef, 0x139882ca, 0x4c435986, 0xcd065d9e, 0x68f7facb, 0xbd9919ca, 0x8609fdcc, 0xeca268d5, 0x7aef2981, 0xfbd0368a, 0xedddf78e, 0xe8a1d08a, 0x63f18b00, 0x215b4061, 0x30dc86c8, 0x20e39320, 0xd1f81146, 0x0c7fcf7e, 0xb336613a, 0x5e21c11a, 0xb0f69848, 0x7da07291, 0xd028be8e, 0xa02763a7, 0x0ca407ee, 0x5383620c, 0x22e616a7, 0xffef43c8, 0x2e598c30, 0x41d5f744 }, // Message 3 + { 0x9ed3569e, 0xcff8e1fc, 0xb8316201, 0x8ec76542, 0xe2bd71d9, 0x1e6c1bc0, 0xbbb7be3d, 0xf205c2a4, 0xb6dd52ab, 0x79b86266, 0x54f9112e, 0xde54a79b, 0x17afd240, 0xdf138244, 0x081c244d, 0xeac3196d, 0x2c501b40, 0x7c023353, 0x067d08fe, 0x34a95f0d, 0x8518421f, 0xbea1845a, 0x2637c534, 0xd9a55f19, 0xf0073dbc, 0xec397237, 0x6d44c410, 0x6f1536ca, 0x5f8a0b81, 0x9cd9f9ba, 0x9c83a9ef, 0xc7916db2, 0xa53fc34c, 0xb970252d, 0xfae0026a, 0xa7fdbb29, 0x361cd47f, 0xdc982214, 0x511fa34e, 0xd95af0aa, 0xe27a0af0, 0x7668a551, 0x81777273, 0x7d1ad474, 0xab3ad53d, 0xac7dfbcf, 0x3b1bfabd, 0xbe544df8, 0xf265d550, 0xeb6fbb7e, 0x7d5641f9, 0x9fc4030d, 0xed76648b, 0x892f297b, 0x7de0c713, 0x599fe0d5, 0x117990d8, 0xee47aaa3, 0x1a8e7731, 0xd09c1b8c, 0xbd6b98c6, 0xc94cbf1b, 0x3dd4a4dd, 0x037acf37 }, // Message 4 + { 0x1fc95528, 0x63b7d75f, 0x74765e81, 0x8d211f05, 0xdf5813bb, 0x56ff66e5, 0x0f07e11f, 0xac2880aa, 0x5fe06824, 0x9828add3, 0xa69e9842, 0xf4e31018, 0xc69b1e36, 0xfd3a4f81, 0x89eeaa63, 0x47427df2, 0xd5cc698b, 0x9f01c11a, 0x7f773008, 0xcecbaf2b, 0xc8078035, 0x684c771b, 0xaa7f78d4, 0xdf679f8b, 0xd0c244a0, 0xc64be458, 0x83ea0d53, 0x31b442ed, 0x762016b2, 0xc1f7883b, 0x209f72ab, 0xde5cbb55, 0x815389eb, 0xb2191364, 0xcd35817f, 0x980e1486, 0xe452e660, 0x47907753, 0xa2315ae0, 0x2311f1c3, 0x58693740, 0x30ce0572, 0x06bb610a, 0x6e6b97d3, 0x95379f07, 0x998bcf16, 0xda7b2f7f, 0xfe2af4bc, 0xcfe90490, 0x67f1324e, 0xd9b87c2d, 0xf877ea6f, 0xc4faa30b, 0x007fb2aa, 0x6bfb185e, 0x55c8b8b3, 0xda50b63c, 0xb5e0d575, 0xac9a08be, 0x39411815, 0x6063cb1e, 0x3fb7f751, 0x011cb226, 0x8e017cf5 }, // Message 5 + { 0xfaf04f88, 0x9c03a39d, 0x5537d484, 0x04061d78, 0x9026ed61, 0x9105ad03, 0x9772d112, 0xd9a2fc31, 0x85fd5fcb, 0x13ea0d40, 0x13ca95bd, 0xdcdd0824, 0x6080c33f, 0x372a934e, 0x815240b9, 0x945793d7, 0x4cc48bac, 0x964dc4e7, 0x9b7865c6, 0xca216981, 0x4a78c295, 0xcc0e6805, 0xcecd3d96, 0x02277e39, 0xcb932093, 0x50f811dd, 0x84d10aeb, 0x0bcc1472, 0xc76a79d4, 0xc0b23e66, 0x15dd87e1, 0x7a94e3f9, 0xaa09a8b8, 0xbdd5a37b, 0x5b5619e8, 0xe9d9639a, 0x1bcffa7d, 0xf95efe4b, 0x527542cb, 0xce3abb49, 0xebfaf581, 0x0cacc6c1, 0xe8b3236c, 0x9d89ea8b, 0xff5bcc27, 0xab1730d1, 0xc3b1f798, 0x746246a6, 0x2e0b7462, 0x73ff914c, 0x10a9f4c2, 0x8be4541a, 0xdc439d20, 0x4fe5d3c5, 0xd24d95ab, 0x9a8f38e5, 0xf0163d6a, 0xbdc721c8, 0x616bbdd6, 0x13241387, 0x892b9c14, 0xff16c7a7, 0x4a9d5086, 0x6fdabbf7 }, // Message 6 + { 0x99f67aaf, 0x4599443a, 0xeaac250f, 0x64e642a5, 0xc90870ac, 0xfaad4d28, 0xcd7a418e, 0x8abe5c09, 0x54fdb68e, 0x5a690863, 0xc0244737, 0xcfb554ea, 0x19f591e3, 0xc63737c2, 0xfef6af07, 0x589d8e38, 0xd1792c9c, 0x5804026c, 0x62f0c6c8, 0x94f3dd2d, 0xc3078ba0, 0x00d87497, 0x54e1c383, 0x545bbdfb, 0x901d305f, 0xb1bcd27b, 0x9a7e39fd, 0x479d39dc, 0x1a41841d, 0x51336abf, 0xec4e7c5e, 0x025424aa, 0x0ac9809f, 0x11034663, 0x3c25c619, 0x40052b07, 0xec885c50, 0xcc54068d, 0xc83ba064, 0x3dc4224b, 0xeea736d7, 0xba652070, 0xcce7a1d5, 0x7cf447af, 0xc5758174, 0xee446e38, 0xb39bf8a3, 0x82034077, 0xc06e33fc, 0xb9f3a31c, 0x8cfda584, 0xb6eeb236, 0xc6f30415, 0x2d1319ef, 0x2adea19f, 0x9a5789ac, 0x276ba414, 0x82d564c3, 0x6c4e2ac9, 0x86efe4ca, 0xadf6a7c3, 0x49dffebd, 0x4ec9b334, 0x525cc81a }, // Message 7 + { 0x2f8cc27e, 0x350875fb, 0x39dd5df5, 0x89b03399, 0x7061995d, 0xcdff4a8d, 0x8ad7164a, 0xa94b3d47, 0xa27a52df, 0x81defbc8, 0x3bcab908, 0xe1ab51aa, 0x5e255d58, 0xa86e03c0, 0xb12e7d2d, 0xeb4ddb39, 0xe0b20ff1, 0xa1a8a804, 0xa1e63720, 0x5cdf514c, 0x20470756, 0x80ff396e, 0xe1a222fb, 0x1416a149, 0xf107da73, 0xb1f7266e, 0x004b334e, 0xa48d77d3, 0x4f1c1163, 0x2026e047, 0x516e5e8c, 0xc2e3b1dd, 0xa92a39d9, 0xc9912ad5, 0xe2a5d15b, 0x441a8d3d, 0xff6d2498, 0x3cc68abc, 0x31eeb23f, 0xa13cfe83, 0x9bdaab5f, 0xdd044d15, 0x26bd0f7a, 0xa42c0703, 0x6a5abd71, 0x037cf6a3, 0x6ac04323, 0x891bc22a, 0x40c30a53, 0x203fbde5, 0x6548de6b, 0x434b16d8, 0x16312b1e, 0x1cc818d2, 0x922fc3eb, 0xdb9afa7f, 0x826fb620, 0xac29c255, 0x535a649d, 0x295c40b1, 0x4371c19a, 0x98ad6d9a, 0xabbf3324, 0x99ac0444 }, // Message 8 + { 0x6e83f692, 0xbc0e6bda, 0x7e72510e, 0x4e944578, 0xc65967b7, 0x32f2d6c0, 0x02e369aa, 0x67658c2f, 0x8c9b40b7, 0x48cb3f6c, 0xe44438c3, 0xa789ffc2, 0x58d58fd3, 0xb44dc061, 0xb41b3551, 0x7cb5a176, 0xc275d51f, 0x6b1b5da9, 0x084057ce, 0x5335f8da, 0xe3d68679, 0x0e2c0f9c, 0xc74d3251, 0x8614ea1d, 0xd24d3fbb, 0x19f1c101, 0x2b8428fe, 0x7e124e3b, 0xe5691058, 0xb81eaa06, 0x8cec76a6, 0x89b1c345, 0x2847f64f, 0xdc1c91dd, 0xb8b4b126, 0x929da99a, 0x53aef56c, 0x0790c430, 0x9c47900b, 0x2b14de91, 0x94a0c514, 0x36199986, 0x4c0da7ed, 0xe546f058, 0x49dd9fe7, 0x31f8858c, 0x2c0c6222, 0xf8fa5b53, 0x976128c4, 0x19cd831c, 0x9a62299c, 0x53e300c9, 0x88df91d0, 0x940f1558, 0xbd7fdce8, 0x8789041c, 0xefa7f207, 0x9a2eb6e8, 0xea2d8b7f, 0x5d1f5954, 0x1b20a908, 0x8ff17818, 0x428676fe, 0x1d93063a }, // Message 9 + { 0x382d84b6, 0x9d2697cb, 0xf39c39f1, 0x874b431d, 0x4add73d1, 0x3af49e97, 0xed375698, 0x8a19b492, 0xe722e314, 0x3a83ce5d, 0xd9e4fd2f, 0x363f8acc, 0xf9b56768, 0xb646b2be, 0x593eb44c, 0x1866c5a8, 0xa8f2b7f0, 0x81f6de65, 0xc86441c3, 0xcd3cd74d, 0x3e0aa6b2, 0x620d0e63, 0x6e9337b8, 0xcd97bef4, 0xb8808dc3, 0x0a996a55, 0xcfc0fafe, 0xc20b72cd, 0x6dd75c42, 0x0a416689, 0xe175ba09, 0xfc1e76a4, 0xd257e752, 0x2ab8c17f, 0x528354f7, 0x0240e4ea, 0x545cafbb, 0x0b06f1ff, 0xdb305649, 0x581cee55, 0x21adaed2, 0x4ff0aa40, 0x99ba5d0d, 0x0fce658a, 0x97c55b62, 0x820b80b3, 0xd0186a18, 0x5e5a70bd, 0xb8c4c251, 0x883f43b2, 0x8fe14b9e, 0x3a12687b, 0x0c3552b5, 0x88506482, 0x2f8aad3a, 0x51a11aaa, 0x6199cbe3, 0x48fd82ec, 0x92818dc1, 0xfb3e4fcd, 0x4b5e76bf, 0xf7ded2ad, 0x241b6fae, 0xa617617f }, + }, + }, { /* Case 5 */ .iv = { 0xdc, 0x0f, 0x35, 0x44, 0x22, 0x00, 0x92, 0x16, 0xb6, 0x05, 0x77, 0x21, 0x81, 0x7b, 0x04, 0x91 }, .p_data = { @@ -182,16 +187,17 @@ static const encrypt_testcase_t test_cases[NUM_CASES] = { .hmac_key_idx = DS_KEY_BLOCK_3, // results of message array encrypted with these keys .expected_results = { - // Message 0 - { 0x01e2dc01, 0x633fdca6, 0x7cd9d77d, 0x98ab8b40, 0x90c880f5, 0xb8ac2b6c, 0x9f1c1674, 0x8e588407, 0xc161ea0d, 0x72650a07, 0xa0dc2aea, 0x90a933b8, 0x45c3a758, 0xc028546e, 0x1a71d733, 0x90904a2d, 0x75c1e6d5, 0xbafd9de8, 0x3c59bb42, 0xb8509064, 0x9c195816, 0x535a89ac, 0x91586a13, 0xce511155, 0x0ccd474e, 0xada5982c, 0x1826227e, 0x13f35e5a, 0xaac45ec8, 0x7a9da79a, 0x95aac0f0, 0xc3f7e0d9 }, // Message 1 - { 0x7439408f, 0x4f559c0f, 0x53abcf59, 0x0afe23bb, 0xd7968c8e, 0xbdcd5bad, 0x62e6a085, 0x07bdf181, 0xdae1ae5a, 0x9c4f6678, 0x9e7ba556, 0xbfa17b23, 0x4e18253a, 0xf8e0580a, 0x4ba0b485, 0xaaf0f898, 0xb96658dc, 0x815303b4, 0xf968440d, 0xf5332fe4, 0x99ed2be9, 0xfbe4df33, 0xa7c184f2, 0x7f8d12fc, 0x4d463fcd, 0x7935979e, 0xdf3b14f6, 0xc4c4882f, 0xe6ffec7e, 0xd7763619, 0x18014ec2, 0x46990fb3 }, // Message 2 - { 0x50a0b5cb, 0x997c13a9, 0xb0f6ffd3, 0xe9413733, 0x0e7ab25c, 0xddc6a245, 0xfbd0f854, 0x6adb24d0, 0x5db4e56e, 0x8a61bca0, 0x803b66a5, 0xdad11d26, 0xe2906044, 0x73cc5d4a, 0x229d10ba, 0x4804e398, 0xbd9ac917, 0xf808270f, 0xba08ba25, 0x4355b4f4, 0xbc8b74d4, 0x1a59fcae, 0xcf7b5091, 0x4d6f5787, 0xcb372f9a, 0xb6a06799, 0xadf1f839, 0x5b64cb8d, 0x6407d3a3, 0x97c952bb, 0xa72f607f, 0x8d16d14a }, // Message 3 - { 0x03e5e08f, 0xcc577a1b, 0x0e76860c, 0x02cf67e2, 0x456289ca, 0x87960178, 0x54612711, 0x6318dd0c, 0x713f3c87, 0xad64c7f9, 0xda797afb, 0x1b126889, 0x6af88ba2, 0x8fff6375, 0xc8d3f032, 0xd32e5e42, 0x6e5e8de2, 0xfd90e475, 0xf77c9234, 0x450b1958, 0x24889574, 0xc00ce37f, 0x5f0f0292, 0xbcb5c6ef, 0xfbac4efb, 0x0d4e62bd, 0x38385be3, 0x418bd60b, 0x68ef088d, 0x382a89a0, 0x204afb17, 0x46a2dec9 }, // Message 4 - { 0xde71c441, 0xcbc9c834, 0x6c88deda, 0x62d21e99, 0xb0d50d51, 0x9d7409ed, 0x7a7b2210, 0xe4c44565, 0xbcb6c5c9, 0xe26a2e8a, 0x7db936fa, 0x60a36028, 0xb9a38900, 0x252fe056, 0xe37511d0, 0x9ff6c6f0, 0xdd8c9bae, 0xb790246a, 0x80b6886b, 0xb7c640b8, 0x2e444acf, 0x50e4ae96, 0xa3e3fa0d, 0x5da3b5e9, 0x0e46b2b1, 0xd19d6374, 0xfe0211f5, 0xabefeb51, 0x1d311220, 0x18ddcb78, 0x256a708b, 0xb72a624b }, // Message 5 - { 0xec841b54, 0x77810071, 0x5942ee0e, 0x4bf98f6e, 0xec6db923, 0xf10470e9, 0x51efa255, 0x8880447d, 0xec49dd41, 0x277acea7, 0x8a6671dd, 0x04aec75b, 0xd5590a8e, 0x827ebeb0, 0x122ea66a, 0x3934a777, 0x85259b34, 0xc74af398, 0xbd555666, 0x42f671f7, 0x90344a8e, 0x03451800, 0x0bb86241, 0xb6b5998d, 0x9231117a, 0x09de2a15, 0xe02df98c, 0xf4670c0d, 0x8242fb53, 0x2fecd8b1, 0x685ad637, 0x3d375ca1 }, // Message 6 - { 0x601f9888, 0x324f03a7, 0x76816efa, 0x09f31fc2, 0x4fe54aaf, 0x8399f6b5, 0x116572eb, 0x0f72fb48, 0xbcc9bdee, 0x7ce8c882, 0xf2dae59a, 0xa0f7623c, 0xa97bb554, 0xc353fe65, 0xce3091d5, 0xe5aebe3b, 0xe4d813ce, 0x54f4d525, 0x2efb8057, 0x3f4d489e, 0xcc060bed, 0x8fc0df8f, 0x314948a9, 0x168d95a9, 0xaeee97d6, 0xfb4fb17f, 0xf4f7f17d, 0x69bf9713, 0xf7a9a28b, 0x79012b09, 0x4ee7e70a, 0x1a094462 }, // Message 7 - { 0x4bc2312b, 0x5619fac2, 0x1032aede, 0x1c197418, 0x098c3bca, 0xba6a75b5, 0x6f914c9f, 0xfcb330fa, 0xd054a7a6, 0x741a1085, 0x21a6aa90, 0x4937d82b, 0xd51cf1af, 0x9f7c568a, 0x47f983be, 0x8c6cd2f9, 0xc6694a58, 0x9ef95f86, 0x5fa02a5a, 0x9a0e7f70, 0xc08e256a, 0x05be92fb, 0x303198c9, 0xd5c30c38, 0x039f7e31, 0xbb9f0b6e, 0x8b176868, 0xa92f0eaa, 0x3afee460, 0x23da6824, 0x008a0231, 0x83235c9c }, // Message 8 - { 0x427d58e6, 0xc0bcaa51, 0xdebac30b, 0x08f1a13b, 0x96ec5ef0, 0x114d0d1f, 0xedaafc04, 0xf8c49654, 0xb6e3b23c, 0x2dbdc932, 0x28401da1, 0xca20457a, 0x0015d8f4, 0x3c809988, 0x9f6fcc0e, 0x225df98d, 0x258efa9f, 0x05c2b486, 0x35b9fb97, 0xfecb6e6f, 0x14540fac, 0x721b786f, 0x0f2e8738, 0x9811ad77, 0x5ee7eb36, 0xd3dbedb1, 0x4f1686fd, 0x31390953, 0x45e100c7, 0x49485e7a, 0xc586b794, 0x853b42d3 }, // Message 9 - { 0x82cb45e5, 0x393db1f2, 0xd22e78cb, 0xcf57d0a4, 0x387e16ff, 0x7db3454f, 0x249c492f, 0xda86d50b, 0x7895254a, 0x1c12f919, 0x7b0be80c, 0x36a10ee4, 0x0666df05, 0xdd901597, 0x674c62ae, 0xe1b6c5fb, 0x1cffbbd9, 0x2fd45bdf, 0x30310492, 0xf2a60213, 0xadf46362, 0x28a65efa, 0xafaf03d4, 0x9bf58710, 0xef74f30a, 0x97092e4b, 0xd2c5deb1, 0x760b434e, 0x824fb397, 0x40de33ec, 0x815bd4eb, 0x32498475 }, }, - }, + // Message 0 + { 0x01e2dc01, 0x633fdca6, 0x7cd9d77d, 0x98ab8b40, 0x90c880f5, 0xb8ac2b6c, 0x9f1c1674, 0x8e588407, 0xc161ea0d, 0x72650a07, 0xa0dc2aea, 0x90a933b8, 0x45c3a758, 0xc028546e, 0x1a71d733, 0x90904a2d, 0x75c1e6d5, 0xbafd9de8, 0x3c59bb42, 0xb8509064, 0x9c195816, 0x535a89ac, 0x91586a13, 0xce511155, 0x0ccd474e, 0xada5982c, 0x1826227e, 0x13f35e5a, 0xaac45ec8, 0x7a9da79a, 0x95aac0f0, 0xc3f7e0d9 }, // Message 1 + { 0x7439408f, 0x4f559c0f, 0x53abcf59, 0x0afe23bb, 0xd7968c8e, 0xbdcd5bad, 0x62e6a085, 0x07bdf181, 0xdae1ae5a, 0x9c4f6678, 0x9e7ba556, 0xbfa17b23, 0x4e18253a, 0xf8e0580a, 0x4ba0b485, 0xaaf0f898, 0xb96658dc, 0x815303b4, 0xf968440d, 0xf5332fe4, 0x99ed2be9, 0xfbe4df33, 0xa7c184f2, 0x7f8d12fc, 0x4d463fcd, 0x7935979e, 0xdf3b14f6, 0xc4c4882f, 0xe6ffec7e, 0xd7763619, 0x18014ec2, 0x46990fb3 }, // Message 2 + { 0x50a0b5cb, 0x997c13a9, 0xb0f6ffd3, 0xe9413733, 0x0e7ab25c, 0xddc6a245, 0xfbd0f854, 0x6adb24d0, 0x5db4e56e, 0x8a61bca0, 0x803b66a5, 0xdad11d26, 0xe2906044, 0x73cc5d4a, 0x229d10ba, 0x4804e398, 0xbd9ac917, 0xf808270f, 0xba08ba25, 0x4355b4f4, 0xbc8b74d4, 0x1a59fcae, 0xcf7b5091, 0x4d6f5787, 0xcb372f9a, 0xb6a06799, 0xadf1f839, 0x5b64cb8d, 0x6407d3a3, 0x97c952bb, 0xa72f607f, 0x8d16d14a }, // Message 3 + { 0x03e5e08f, 0xcc577a1b, 0x0e76860c, 0x02cf67e2, 0x456289ca, 0x87960178, 0x54612711, 0x6318dd0c, 0x713f3c87, 0xad64c7f9, 0xda797afb, 0x1b126889, 0x6af88ba2, 0x8fff6375, 0xc8d3f032, 0xd32e5e42, 0x6e5e8de2, 0xfd90e475, 0xf77c9234, 0x450b1958, 0x24889574, 0xc00ce37f, 0x5f0f0292, 0xbcb5c6ef, 0xfbac4efb, 0x0d4e62bd, 0x38385be3, 0x418bd60b, 0x68ef088d, 0x382a89a0, 0x204afb17, 0x46a2dec9 }, // Message 4 + { 0xde71c441, 0xcbc9c834, 0x6c88deda, 0x62d21e99, 0xb0d50d51, 0x9d7409ed, 0x7a7b2210, 0xe4c44565, 0xbcb6c5c9, 0xe26a2e8a, 0x7db936fa, 0x60a36028, 0xb9a38900, 0x252fe056, 0xe37511d0, 0x9ff6c6f0, 0xdd8c9bae, 0xb790246a, 0x80b6886b, 0xb7c640b8, 0x2e444acf, 0x50e4ae96, 0xa3e3fa0d, 0x5da3b5e9, 0x0e46b2b1, 0xd19d6374, 0xfe0211f5, 0xabefeb51, 0x1d311220, 0x18ddcb78, 0x256a708b, 0xb72a624b }, // Message 5 + { 0xec841b54, 0x77810071, 0x5942ee0e, 0x4bf98f6e, 0xec6db923, 0xf10470e9, 0x51efa255, 0x8880447d, 0xec49dd41, 0x277acea7, 0x8a6671dd, 0x04aec75b, 0xd5590a8e, 0x827ebeb0, 0x122ea66a, 0x3934a777, 0x85259b34, 0xc74af398, 0xbd555666, 0x42f671f7, 0x90344a8e, 0x03451800, 0x0bb86241, 0xb6b5998d, 0x9231117a, 0x09de2a15, 0xe02df98c, 0xf4670c0d, 0x8242fb53, 0x2fecd8b1, 0x685ad637, 0x3d375ca1 }, // Message 6 + { 0x601f9888, 0x324f03a7, 0x76816efa, 0x09f31fc2, 0x4fe54aaf, 0x8399f6b5, 0x116572eb, 0x0f72fb48, 0xbcc9bdee, 0x7ce8c882, 0xf2dae59a, 0xa0f7623c, 0xa97bb554, 0xc353fe65, 0xce3091d5, 0xe5aebe3b, 0xe4d813ce, 0x54f4d525, 0x2efb8057, 0x3f4d489e, 0xcc060bed, 0x8fc0df8f, 0x314948a9, 0x168d95a9, 0xaeee97d6, 0xfb4fb17f, 0xf4f7f17d, 0x69bf9713, 0xf7a9a28b, 0x79012b09, 0x4ee7e70a, 0x1a094462 }, // Message 7 + { 0x4bc2312b, 0x5619fac2, 0x1032aede, 0x1c197418, 0x098c3bca, 0xba6a75b5, 0x6f914c9f, 0xfcb330fa, 0xd054a7a6, 0x741a1085, 0x21a6aa90, 0x4937d82b, 0xd51cf1af, 0x9f7c568a, 0x47f983be, 0x8c6cd2f9, 0xc6694a58, 0x9ef95f86, 0x5fa02a5a, 0x9a0e7f70, 0xc08e256a, 0x05be92fb, 0x303198c9, 0xd5c30c38, 0x039f7e31, 0xbb9f0b6e, 0x8b176868, 0xa92f0eaa, 0x3afee460, 0x23da6824, 0x008a0231, 0x83235c9c }, // Message 8 + { 0x427d58e6, 0xc0bcaa51, 0xdebac30b, 0x08f1a13b, 0x96ec5ef0, 0x114d0d1f, 0xedaafc04, 0xf8c49654, 0xb6e3b23c, 0x2dbdc932, 0x28401da1, 0xca20457a, 0x0015d8f4, 0x3c809988, 0x9f6fcc0e, 0x225df98d, 0x258efa9f, 0x05c2b486, 0x35b9fb97, 0xfecb6e6f, 0x14540fac, 0x721b786f, 0x0f2e8738, 0x9811ad77, 0x5ee7eb36, 0xd3dbedb1, 0x4f1686fd, 0x31390953, 0x45e100c7, 0x49485e7a, 0xc586b794, 0x853b42d3 }, // Message 9 + { 0x82cb45e5, 0x393db1f2, 0xd22e78cb, 0xcf57d0a4, 0x387e16ff, 0x7db3454f, 0x249c492f, 0xda86d50b, 0x7895254a, 0x1c12f919, 0x7b0be80c, 0x36a10ee4, 0x0666df05, 0xdd901597, 0x674c62ae, 0xe1b6c5fb, 0x1cffbbd9, 0x2fd45bdf, 0x30310492, 0xf2a60213, 0xadf46362, 0x28a65efa, 0xafaf03d4, 0x9bf58710, 0xef74f30a, 0x97092e4b, 0xd2c5deb1, 0x760b434e, 0x824fb397, 0x40de33ec, 0x815bd4eb, 0x32498475 }, + }, + }, }; diff --git a/components/esp_hal_security/test_apps/crypto/main/ds/digital_signature_test_cases_4096.h b/components/esp_hal_security/test_apps/crypto/main/ds/digital_signature_test_cases_4096.h new file mode 100644 index 0000000000..a894b6a83a --- /dev/null +++ b/components/esp_hal_security/test_apps/crypto/main/ds/digital_signature_test_cases_4096.h @@ -0,0 +1,203 @@ +/* + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + * + * File generated by gen_digital_signature_tests.py + */ + +#include "hal_crypto_common.h" + +#define NUM_HMAC_KEYS 3 + +static const uint8_t test_hmac_keys[NUM_HMAC_KEYS][32] = { + { 0xe0, 0x19, 0xfc, 0x51, 0xb3, 0xa6, 0x3f, 0x31, 0xca, 0x43, 0xb5, 0x17, 0xe9, 0x7b, 0xe2, 0x87, 0x85, 0x41, 0x9c, 0x42, 0x60, 0x52, 0xd8, 0x8e, 0x45, 0xc3, 0x7c, 0x3b, 0x82, 0xe0, 0xe2, 0x80 }, + { 0x3d, 0x71, 0xd5, 0xc7, 0xe0, 0x15, 0xe6, 0x30, 0x66, 0xe8, 0xee, 0x5d, 0x14, 0x1e, 0xe1, 0xa1, 0x03, 0xd9, 0x7d, 0x48, 0x16, 0xde, 0xbc, 0xba, 0xaa, 0xf4, 0x3e, 0xd5, 0xb2, 0xbc, 0x46, 0xbc }, + { 0xa7, 0x84, 0x00, 0x57, 0xd9, 0x09, 0x0b, 0xab, 0x02, 0xfe, 0x76, 0x14, 0x21, 0xc9, 0x41, 0x0f, 0x8d, 0xe9, 0x94, 0xb7, 0x70, 0xc6, 0xf9, 0xec, 0xd4, 0xd9, 0xd4, 0xee, 0x00, 0xce, 0xde, 0x58 }, +}; + +#define NUM_MESSAGES 10 + +static const uint32_t test_messages[NUM_MESSAGES][4096 / 32] = { + // Message 0 + { 0x5b8223c6, 0xfa88edc7, 0x583c1799, 0xedc7c223, 0x9fb0857c, 0xed3c6f20, 0x05d1fb6e, 0x96d1dac3, 0x85c6d96d, 0x8b3a9a1d, 0x2e786a8f, 0xd2e4e243, 0xb364f14e, 0x44010946, 0xd9cd527f, 0x618cc373, 0xa0a19bd9, 0x7d97761f, 0xfb079173, 0x3c540391, 0x02d239ac, 0xe911c2f1, 0xf65c484b, 0xcf487211, 0x4125e65c, 0xb26ae57f, 0x1a3e9853, 0x019647f5, 0xb14d1638, 0x07069668, 0x19ad19b5, 0x19251d1d, 0xb685c504, 0x6760e85b, 0xa0fb61cc, 0x0b3f7909, 0x0377025d, 0x7654239b, 0x5c93db67, 0x3482b3f5, 0x1a79c91b, 0x02e91b71, 0x8557f72b, 0x2a45cf00, 0x3d180e14, 0x6f73b72b, 0xd9652bd2, 0xd49095cc, 0xffc72050, 0x799ac0a3, 0x23d37af6, 0xf30c65f5, 0x86daf4f1, 0xad2f3c99, 0xe0ba6ff9, 0x362de37c, 0x4846218d, 0x9a9a52aa, 0xd08e871a, 0xbc17c032, 0x91c16b34, 0x285fe6f8, 0xda1f4561, 0xa8fa480d, 0x9caff2a9, 0xd4bc8149, 0xb16f4ba3, 0x0ae0c85c, 0x8b261fb3, 0xaa5d5e9c, 0x9af38deb, 0xbcf4fc65, 0xabe82ab0, 0x5e478c29, 0x0e166ddf, 0x8080359b, 0x4a33e024, 0xafaf0456, 0x9d68deda, 0xcbbcdae1, 0x02f97709, 0x810de7ce, 0x5e9c6b43, 0x0267aa74, 0x18d763b2, 0xdd88fb86, 0x3c006c8b, 0x55b8b0cc, 0xf8413d02, 0xde19f942, 0xd4b64c8a, 0x7cf2bea1, 0xcdac985b, 0xa5fadac5, 0xf1bef008, 0x6098c15d, 0x23b0c27a, 0x7c4393f9, 0xe9c49179, 0x4b947a62, 0xfff2f206, 0xf639587d, 0x5ee8da18, 0xd10f0450, 0xd8b4bc25, 0x20e7eb82, 0x1736eef5, 0x6a8f4ef8, 0x3ff7f07f, 0x10795bba, 0x0b18864b, 0x494c96dc, 0x2fb5a260, 0xe28127bb, 0xab1162c6, 0x2bace451, 0x40874cd9, 0xf74700e8, 0x602cf820, 0xe1551cd9, 0x09747e29, 0x20bb223c, 0x77b3a76d, 0x3794e803, 0xf42f126d, 0x2de8434d, 0x668ac9fb, 0x4f7c92b6 }, + // Message 1 + { 0x6db17696, 0x244fca66, 0xe983297c, 0x937d0785, 0xa24fb4a4, 0x975c141b, 0x2d56770c, 0x5773491e, 0xb7827329, 0xb0789fa1, 0x5f91495c, 0x50a1535f, 0xc224980f, 0x2bcfc99d, 0x63379435, 0xc7d84f81, 0xf3f8b326, 0x9d1de54c, 0x3a91fc0a, 0xcf0776e5, 0x54c367ac, 0xb94e8202, 0xb6a1541f, 0x41bcbc32, 0x95d38d73, 0xe5c36c21, 0xb12d6159, 0x954b6dae, 0x45973e71, 0x1cda2855, 0xf8df9ad8, 0x644e1ca7, 0x2d4da7f1, 0x7fb3453a, 0x40f8eece, 0x0527c74c, 0x63e4fc08, 0x24e043f3, 0x22258133, 0x11c6417c, 0xf81232b7, 0xa4036037, 0x1aded35c, 0x20492892, 0x58d442a3, 0x48858b44, 0x9a6526a2, 0xc222ce2a, 0xd62ddcdc, 0xa83ec889, 0xa6aead0f, 0x00064cd1, 0x97cc7619, 0xdcfeead8, 0x084c9fbb, 0x0e706ee7, 0x52f492e4, 0xa51f2798, 0xf411d709, 0x1ae71c6f, 0xa94a6094, 0x68c34f12, 0xc4fb3f5d, 0xc0d9640d, 0xb1d17cad, 0xb9037e04, 0x7a6befa8, 0xa8611c7e, 0x3caf3730, 0x898f42a6, 0x67436870, 0x2a10a9f4, 0xbc4e74d8, 0x1790ec00, 0xdd193f23, 0x2b028522, 0xa33da521, 0x265ddcab, 0x3b23a204, 0xd1c622a8, 0x1531f752, 0xb8d48f02, 0x3d361e11, 0x87efe588, 0xc0b7d7f4, 0x21320e85, 0xbdd0491e, 0x6878b882, 0xf43c7d58, 0x95ccfda9, 0xdb39e8f5, 0x29d88964, 0xd282a492, 0xc889f542, 0xce6304e9, 0xc457a787, 0x47f7bc8e, 0x4eed33c0, 0xed150c28, 0xd4abcd08, 0xa20961b3, 0xaf5d0429, 0x245df52b, 0xd47d84f8, 0xdd44316d, 0x39643183, 0xee61e6a6, 0x7d366b7c, 0xde6bb656, 0x4563aea7, 0x1c967894, 0xacb7f54d, 0xc4c62fff, 0xf8846bbb, 0x9589e180, 0xd36d33b0, 0xbdd135b7, 0x4654580c, 0xb9ab2521, 0x9f0dbea2, 0x24827593, 0xf55d24b7, 0xb7a905f7, 0x14d542bd, 0x47859654, 0x4583d9a1, 0x6e711a70, 0xfd811de1 }, + // Message 2 + { 0xed4d7109, 0x4e0e1a49, 0xf89b6ff3, 0xe056fb57, 0x53afa880, 0xfe1c49f7, 0xd1830e17, 0x912eae65, 0x226fb7f9, 0xe21039d4, 0x0bc5639d, 0x2da133cb, 0x714531e1, 0xfda0a79d, 0x4c862b04, 0x3a04103d, 0xb5890521, 0xa77c5feb, 0x16114180, 0x0bb05b6d, 0x32cf6395, 0x0b6522f2, 0xaa36a343, 0x3e32599f, 0xc5a89214, 0xd1330f28, 0x3e5ec6d8, 0xfbd07f92, 0xbf4159ce, 0x5e04e915, 0x034f4e92, 0x170f2180, 0x1e792d8e, 0x96074aaa, 0xf59d11ed, 0x2ebfc19b, 0x920df270, 0x9e4b85d2, 0xa87cbc78, 0xe6b7a7ba, 0x5e61a1d2, 0x66ff5fad, 0xc6908748, 0xb42666df, 0x4111505a, 0x03d10421, 0x7e9f5def, 0x224d3e9a, 0xd5df568c, 0x99e03c83, 0xc8f756e6, 0x8f1c460e, 0xa9a518fe, 0x739bbd22, 0xf7343f19, 0x6f377270, 0xa1514341, 0x3006ec98, 0xd65ace1e, 0xf9ae42d6, 0xc0bdb44f, 0x50324808, 0xc784d0cb, 0xada4436a, 0xb32fcb5c, 0x6fe45992, 0xbe1e1fbc, 0x4d12f24b, 0x2894525d, 0x0d628aae, 0x5d3af461, 0x31e31010, 0x7041f204, 0xd16e221a, 0x2ff374ed, 0xdaca35b8, 0x74f67c88, 0x49457357, 0x3cc37ffb, 0x05fe90f7, 0x4816177d, 0xd90a410c, 0x2b6bcf0d, 0x83b98c58, 0x5bdffd49, 0xe8cd6b54, 0x5df214ed, 0x3c2b17da, 0x4d88c905, 0xfcf2d541, 0x6113416b, 0xa6bfeaff, 0x6e982de6, 0x1915da2d, 0x2a665024, 0x54db334f, 0x2f68a4c7, 0x11f25492, 0x1dcc6510, 0x2907beaa, 0x05506517, 0xceddd753, 0x2b06fafd, 0xfd34373e, 0x3efed25a, 0xef2b25b7, 0x7ffc85cb, 0x5d426c00, 0x1e74d9a1, 0x9c6a47f2, 0x24f85a07, 0xe23b2f49, 0xe3c98f1e, 0xbed8064f, 0x82d0acb5, 0x7b2287cc, 0xb5b2df41, 0xcecb3734, 0x0fdcdecf, 0xa2082a23, 0x0ecc613a, 0x88f4fe31, 0x9e454af1, 0x5ecc4ddf, 0x925e1590, 0xd722dcf5, 0x25317545, 0x80553b6a }, + // Message 3 + { 0xdb8ab0d8, 0x8352a755, 0x814109e2, 0x026b88a2, 0xf109e093, 0xa97346bc, 0x2b8eafc3, 0xf5959191, 0x7b6cbffa, 0x3ed8c580, 0x9f8ff337, 0xb5b5eff9, 0x5ef86b9b, 0x082990c4, 0x25b8347c, 0x4ff662a8, 0x81d76ca1, 0x3142818e, 0x850f1a66, 0xda5be26b, 0xbd2435ef, 0x642b9d78, 0x94c2c6ba, 0x236a0b09, 0x70693da2, 0xc4e36393, 0x423c3169, 0x65018e28, 0x9d8af95b, 0x308f6d35, 0x78c057f9, 0x79ae2e67, 0xc14332a6, 0x8e90ad6a, 0xba4f98e6, 0x36e2e12a, 0xa0af779c, 0x7ff2042d, 0x09cb88a1, 0xcd9a013e, 0x946c25f0, 0x1e2de977, 0xcc71d0e9, 0x1e91760e, 0xd2db1aa9, 0x82f4015e, 0x62b34d2e, 0xea817d00, 0x7e068c6f, 0x9cd45388, 0x87e56478, 0xb941472f, 0xab0c68ed, 0xc5841e8e, 0x7a011679, 0x45a83b37, 0x30eaed98, 0x8276a091, 0x2878646f, 0xed9db655, 0x748dcb7f, 0xfbb50291, 0xb9366921, 0x4a6ab2bc, 0x412de9c3, 0x312a2879, 0x2ccaa654, 0xacd304e6, 0x0952d148, 0x367ccc61, 0xec0d0533, 0x643ed028, 0x390a38bd, 0xeb939b4c, 0x66973d9a, 0xfeac4855, 0x3e5a5b39, 0x286a27b3, 0x3c4f1c95, 0xce7dd02b, 0xa0437ba3, 0x25b8d742, 0x14ac3921, 0x31f20af2, 0xbbbbfdc4, 0x24b70692, 0x38ca4e54, 0x5669e1b6, 0xa3ed2237, 0x3bdc1f5d, 0x59a88cdc, 0x6f413613, 0x7e96e4af, 0x61e0ec78, 0x41e045a5, 0x1c2ea76f, 0x41fc44eb, 0x1660063c, 0x5a2d4861, 0xeb4a0150, 0x998ca467, 0x97818ef6, 0xa94b9fad, 0x70f2fd65, 0xd070ceb9, 0x6cfdcef8, 0x37634bdc, 0xcfda5cc0, 0xeef09548, 0x496f0fab, 0x307c15a1, 0xccd90d15, 0xd497071e, 0x24c18289, 0x7e9793bc, 0x90119197, 0xdf285a15, 0x5726b6b0, 0xff787a3f, 0x37745cea, 0x1a452044, 0xfe59e0e1, 0x04641bd5, 0x3c81c3c0, 0x0189793d, 0xb4d7d362, 0x73cb084e, 0x802954ab }, + // Message 4 + { 0x57714ceb, 0xd4ea891d, 0x80634624, 0x2674d5f0, 0xe64b9955, 0xfc897081, 0xc70d11db, 0x4b66a1fc, 0x9277589b, 0x082a949b, 0xc4b57ea3, 0x22483603, 0x38ac45ec, 0xd8d49671, 0xff6a9258, 0x28abc76a, 0x2c5cbc7b, 0x99c37b2a, 0x35ac630c, 0x2e29515f, 0x5f6ce059, 0x23bb1811, 0xdea61bf7, 0x1674ee6e, 0x63f403ec, 0x005e0e6f, 0x4b95d017, 0xb3210c9c, 0xf018616f, 0x2ebe0ca3, 0x6e520e83, 0x53f3c811, 0x4e12d834, 0x3ea94f5f, 0x9cf7cea2, 0x672b6af7, 0xef95e58c, 0xcacb6a25, 0xa2073d06, 0xba3e1080, 0xe17ad704, 0x43120fd8, 0x01ddaad2, 0x0ac909ff, 0x22f02430, 0x93e40d0e, 0x29c31bf7, 0xdcf82e58, 0xdbb4fb4b, 0x0cd41b95, 0xdd719a49, 0x0b92337a, 0x1cde0032, 0x86159699, 0xcd43e1e2, 0xe1d04c4f, 0x6f8cf803, 0xe95778df, 0x428ba9e6, 0x90a11dc9, 0x324aaf5a, 0xf52929e9, 0xa6d657b9, 0x041e73d8, 0xf7389e23, 0xe1e74b63, 0xe036afa3, 0xf8ebc2e7, 0x2d13682b, 0xfc69124e, 0xcb6d7207, 0x4ce9620c, 0x3e33621b, 0x0a7ef135, 0x8261faeb, 0x61c43173, 0xd3c623da, 0x7fb60c10, 0xbd560cec, 0xd613ff75, 0xa4ce6ac0, 0x72686b41, 0x6ced92f5, 0x7ca77287, 0xcd7e09f5, 0x544243e1, 0x24ad9e3f, 0x6be8c4ce, 0xa7149e51, 0xd208d6ae, 0x5ce4aba8, 0xe9c71f29, 0x59646779, 0x28f50d3f, 0x7a3be6eb, 0xff9c5011, 0x3450f7c9, 0x0ac73164, 0x8bc2ed8e, 0x5c230617, 0x447a3097, 0x41a35f7b, 0x03a5220c, 0x3cc3467b, 0xd7f466a3, 0x49bcf01a, 0xd4f3c7f6, 0x1095dcfd, 0xe74419d1, 0xb0e64bcc, 0xddf2eed5, 0x8a50d90c, 0x5fa5dc2d, 0xff0edf86, 0x71780ed4, 0xefd6d10d, 0xb5cb49e4, 0x782284a4, 0x54d9dcf8, 0x8f80ccb9, 0x21f2f84f, 0x2e6a336e, 0x11f0b9a8, 0x748f2261, 0x38bcd6e4, 0x221aa382, 0xd62ee339, 0xe358a45c }, + // Message 5 + { 0x1bc12cdf, 0x28a72c65, 0xf48690b2, 0xd5fc0ea2, 0xe5c0b276, 0x2de130dc, 0x7d515090, 0x31e582bc, 0x83071741, 0xf32d18c2, 0x401aceb2, 0x90cc2f31, 0x2bf5fbd6, 0xbacb8936, 0x1149875c, 0x5eef4a04, 0x2f3e6897, 0xe71bb41e, 0x50fd7691, 0xf0ad6ade, 0x89d7bdb3, 0x90573e25, 0x981ac9fa, 0x33f2d2ac, 0x166cbde4, 0x27f6dc9b, 0x9eee56d3, 0x0dc8e6b8, 0x1aace0a4, 0xa7aaa2fe, 0x80d4b7f3, 0x79014f16, 0x320ed7ff, 0xb9e289b1, 0x15e46a2e, 0x4bdf1eb7, 0xf8f3e838, 0x9a4b3c01, 0x8d88fa6b, 0x64536a00, 0x2a59d92a, 0x05af4c72, 0x9e0ea16a, 0xeb9fe653, 0x46a8a13e, 0x78096135, 0x284b8f7b, 0x17bb4c3b, 0xe816798d, 0x840515d3, 0x0ece68a9, 0x6e6a06ac, 0xfe328057, 0x9024ca90, 0x56dc779e, 0x7ed4587f, 0xf76f9497, 0xfb36a58d, 0x63afa410, 0xf452e511, 0x017b27c1, 0x5b5c89b1, 0x6816acc8, 0xad2974c0, 0x82e3c44a, 0x91b952db, 0x3abff058, 0xba35c474, 0xa2face8d, 0xd013fe9d, 0x756417f1, 0xf49758c3, 0xdde5e21d, 0xb5c32be4, 0x6a0c656a, 0x95b4534f, 0xd745cf46, 0xf5fa5f3b, 0xae5ab31c, 0xd5909050, 0x5ad2287c, 0xd19d877f, 0xf6886332, 0x05689388, 0x6e2c702d, 0x3eb76528, 0xbf229d83, 0x1f5a7e14, 0xad9649bd, 0x6063a966, 0xdb3aedc5, 0x70b412ff, 0xb5bde84d, 0x57b85da6, 0x1a6358e8, 0xfe5fcdef, 0xb6082c47, 0x639322b1, 0x244fa7ed, 0xcb35cade, 0xc28e5248, 0x3337c589, 0x326371a8, 0xd34bc537, 0x1a5a675e, 0xa50ff5e4, 0x8650af04, 0xa20bf18e, 0x9b0bbf85, 0xb5093ec3, 0x2b378916, 0xd1d9bb53, 0x06e6f702, 0x90c4f3e1, 0x42894cb4, 0x1d4562db, 0x69bf1c93, 0x90f474cb, 0x3824e888, 0x3d5bddb2, 0xbd742ead, 0x117160ef, 0xa5827f9b, 0x6485517a, 0x47743509, 0x9b35f24b, 0x7e376093, 0xa45f0ac8 }, + // Message 6 + { 0xe452f4bc, 0xc9d479a5, 0x29a1b641, 0xd1e9a939, 0x89d3ed73, 0x703551d0, 0x94a03ee3, 0xc795d169, 0xfa647432, 0xd12cc217, 0x6b4eb934, 0x9acefaf1, 0x0253eda3, 0x1cd8ac3a, 0xd9d328d1, 0x7f9c57c8, 0x55d3ddbb, 0x7ef5df37, 0xf01de95b, 0x55687231, 0x632850a7, 0x04610301, 0x4930c2d6, 0xd5c67abb, 0x88f6490e, 0xc673cce5, 0xd41292b0, 0xe8436103, 0x18fc0817, 0x703aa3f0, 0xf4fe010b, 0x4de8f608, 0x1fa73843, 0x15f386ff, 0x055a6a1d, 0xcf3b302f, 0xd54e17bf, 0x432c2cf4, 0xdc1ae47c, 0x8b273462, 0xeaeb313a, 0x3d70ee11, 0x43e27f96, 0x6abf2b4c, 0xc24a16a3, 0x58c6373a, 0xa43dc335, 0x9c2519cf, 0x928ca803, 0xe63a772e, 0xfb004fa4, 0xd82bd259, 0xf9ae3953, 0xe8d293a8, 0xe60199af, 0x183acf8e, 0x5036227a, 0xff271487, 0xca4ae0ee, 0xa294276b, 0xd044da85, 0xc06c63fc, 0x46d0b7a3, 0x2718eef5, 0x11bf8763, 0x2ecad730, 0xaa9d785d, 0x705cb33c, 0xa5a058ac, 0x56b8f206, 0xbb8589be, 0x43f29d50, 0x9f99c44a, 0xdc4a2d7e, 0x7a67f3a6, 0xf9f2a464, 0x72e15395, 0x058c896b, 0x3f012837, 0x47c28d1b, 0xc5af9885, 0x8470ee34, 0x0a2d96dc, 0x84c85dd2, 0x4e698e29, 0xfdf921f3, 0x74d238ab, 0xa24fc6ec, 0x8c5e7858, 0x66538b3f, 0x70624478, 0x67962dad, 0x8872ff12, 0xc8f874fc, 0x576e08b9, 0x679637e2, 0x5a4b25e1, 0x1cf2c23f, 0x2f517298, 0x40737162, 0x83106478, 0x00b6e580, 0x574b57bb, 0x49f2367a, 0x4509f9d8, 0xffc90327, 0x09da762e, 0x0f0032db, 0x5e4d3a6b, 0x832e51f5, 0x5cba2bb2, 0x796c76ab, 0x1a924931, 0xad68199b, 0xcae04e9b, 0x1b01a7cf, 0x538e362d, 0xe5d42a13, 0x9f74c756, 0xbc9a23af, 0x8f4d9ac3, 0xd126c669, 0xc7b7729e, 0x18f3d75a, 0x2e4b0461, 0x7a5a7436, 0xa5e4442f, 0x9c0b3af8 }, + // Message 7 + { 0xcc8dd298, 0x3e17956c, 0xdfa1522d, 0x6e536c43, 0x36e504ce, 0xab4b3d1e, 0x1d855b66, 0x7a5d8774, 0x032a37d0, 0xf8089adf, 0x7d0a68c8, 0xedb67d0c, 0x28bf8099, 0x53908c44, 0xd64aef09, 0x3a888eed, 0x9bf63716, 0xdc30171a, 0xf6dc15b9, 0x2142ad89, 0xdfbc7e72, 0xd15f60c4, 0xe40a7cd0, 0x9f024434, 0xef2af8d4, 0xc33f3e8c, 0xfb1aef47, 0xfd75ee6a, 0xaf43429f, 0xa91320c5, 0xe75223f8, 0x932102ad, 0xe0285748, 0x6e49073a, 0x54b7a14f, 0xc578136a, 0x764637dc, 0x5a4233ec, 0x22244d8d, 0xbf1e51e8, 0x1c7ff213, 0xf2892d06, 0x9b83cbac, 0xed54b7b2, 0x94ede988, 0x95b1b8c0, 0x057e0c7a, 0x3ab93c3f, 0xb6b87bb8, 0x0bdb2659, 0x31683aa5, 0x1bb0ffab, 0x5d6920d4, 0xc05fac74, 0x1db3121c, 0xcff11207, 0x29e7dc11, 0x9605eb05, 0x96a3769c, 0x315d485a, 0x1495b308, 0xcd1993a6, 0x032b8d2a, 0xf1ec677b, 0xb09e1f6e, 0x8479bb94, 0xeac3f10b, 0x9bd252bf, 0x50a23458, 0x6c8b24d5, 0x2ecb3c03, 0x708c6957, 0x1f599bac, 0xbbbdcaf8, 0xfb5fdb49, 0xeb26f5fe, 0xc32d74fb, 0xce1ca095, 0x60df7ac8, 0xbf0874e7, 0xcef6a57d, 0xc79cf491, 0x85ec6d40, 0x519f7ec2, 0x870c4573, 0x5566fd01, 0x99a91b71, 0x2573ab71, 0xd0967389, 0xf53aebc1, 0x19e2d893, 0x7fb25e60, 0x0b59d165, 0x7e85aa2d, 0x1b02ece3, 0xf71378df, 0xe9c237c6, 0xa0365fce, 0x286c2f3d, 0x6783e4c3, 0x47c86229, 0xc18ab13c, 0x33e1fc5b, 0x308d23c3, 0x2e875b30, 0x55f7a991, 0x1e3ac107, 0x0af30db9, 0x16ee6859, 0x165e0740, 0xa4ac4587, 0x0e01b996, 0x418b7684, 0xd3d95ed4, 0x5818cda8, 0x06e23868, 0x86323661, 0x899dcf13, 0x1a805c58, 0x365f027b, 0x8f3edf67, 0x7b7788d4, 0x54433277, 0xa76dbdf3, 0xa4b4853f, 0x25b9edc4, 0x65513104, 0xf80ff68c }, + // Message 8 + { 0xee334586, 0xcff4221e, 0xf9f78033, 0xe47cb45d, 0x286aee0c, 0x4f098fae, 0xb09c4aa1, 0x0156b937, 0x6b17c99b, 0x61022994, 0xe39a53ef, 0xae99a69e, 0x49317b54, 0xe59fd748, 0x5e9e28e5, 0x8580e373, 0xfb4ab864, 0x3ddbdaf6, 0x53d9f846, 0x6746c176, 0xecc7acf2, 0x011b4527, 0x997c908f, 0xa5377ac5, 0x8e362d50, 0xa82ffdc7, 0xd5ac6bdd, 0x7fea3597, 0xce83aa16, 0x5a876007, 0x0350729b, 0xbbce5b23, 0xfa4d1ea8, 0x01141379, 0x3b7610bf, 0x5c7e8e2d, 0x72d941dd, 0xf4f90443, 0x77eeb2f1, 0x9d04214a, 0x730fe00d, 0x478b9d4f, 0x74648cc0, 0xcba3e985, 0x76861fb8, 0xa732fc65, 0x42c37470, 0x34fa6e2b, 0xaea8f19c, 0x184c3ddb, 0x68e6f193, 0x57d6aa56, 0xb6d73fb1, 0x8cdc8b2d, 0x2ca44938, 0xd274bb8d, 0x322216e1, 0x236d88c9, 0x373f0604, 0x5d453e43, 0x3e43dacb, 0x956be271, 0x6cd2de66, 0xf20ebbe5, 0xe712d372, 0x2a52bcaa, 0x7ef61eee, 0x7373e0a5, 0x2546a8c5, 0xf8b7a409, 0x0dd39577, 0xf76b1790, 0x02bae1d9, 0xab2cfa90, 0x9d813594, 0x297f4a40, 0x15b3ae12, 0xfd68916a, 0x11144092, 0x7a7acfe6, 0x3fc0b46d, 0xe4ef53b5, 0xdafa0a2f, 0x48a0adab, 0x6adfb440, 0x9c9f8156, 0xbbdafb71, 0x42724c46, 0x5d52b219, 0x0c1902c0, 0xab73ab10, 0x372ff909, 0x0c4bba52, 0xbe3cf13f, 0xd8f904e9, 0x357de8ef, 0x4b8b9853, 0xd2e8a5bd, 0x0ad12d1b, 0x8fb563f1, 0xfeb51ccb, 0x2ca72e4e, 0x9232f8ec, 0x7b1f59c2, 0xd373a2eb, 0x4934908d, 0xca2908b4, 0x0a60b257, 0x7613c894, 0x9e8d0a95, 0x08310a85, 0x18e38a72, 0xf7e3dd3b, 0x91023003, 0x47f430c4, 0x9fd0b861, 0xe04d5f15, 0x627b7b00, 0xc1be62fa, 0xdde5c280, 0xa7def84e, 0xf1f2bc80, 0x3a52ae63, 0x1dafded7, 0x9f2d0c67, 0xf7e0e23c, 0x4df71751, 0xfbe52f39 }, + // Message 9 + { 0x114c7b7d, 0x6e0a4091, 0xa1ca8ff8, 0xbbebd6e2, 0xcf0e1f0c, 0xc37d6fd1, 0xd95988a5, 0x3f037509, 0xf63f01e7, 0xf7da3c13, 0x5dac7e31, 0xf3827bd4, 0x19814a2f, 0xc9eba643, 0xe76dd339, 0x4808ff4b, 0x021c6f56, 0x0a8bf157, 0x7c6da00d, 0x5bb73f8b, 0x8451c583, 0x879ff0b9, 0x0b0202d9, 0x2def9b31, 0xffe90a1e, 0x2edf353d, 0x4d5907c9, 0x5ede67dc, 0x73fc44e0, 0x3cb1996c, 0xe0232147, 0x55417647, 0x51608a6a, 0xa01891d5, 0xa24e1b0b, 0xd350fd6e, 0x6df5f0f0, 0xa25b1109, 0xaf70b2be, 0xde1eb7b7, 0x11e96416, 0xb0440223, 0x7a990004, 0x996082b6, 0xca604575, 0x37289ac1, 0x22f9f957, 0x411460d7, 0xb96d073e, 0x1cf5a29a, 0x59bb1a1b, 0x02ae9a70, 0xa003257e, 0xbd5db231, 0xaf627522, 0xc3aee50e, 0xef12de92, 0x5fbfad38, 0x1955fdbe, 0xe9912624, 0x0f4dfc59, 0x04abc583, 0xa541abb3, 0xf18e6fff, 0xd7836cfc, 0x8b5b314f, 0xb8186f24, 0xb792523d, 0xd6c278e9, 0x589106ab, 0x8309afb4, 0x9d6b1a57, 0xf9b8ca53, 0x127fa2dd, 0x6811c966, 0x3e779dc9, 0x65079638, 0x8fef2e22, 0xfb323a4f, 0x53867c83, 0xee4c4541, 0xd240a0a8, 0xef876f46, 0x2d3718ae, 0x257120c8, 0xff6c2012, 0x8205fe7c, 0xef12a0d1, 0xb2ba4c7a, 0x009eaa05, 0xd6c21798, 0x8b349dd2, 0x112ba334, 0x69e7e390, 0xe7158d36, 0x9ee0366f, 0x6ae77879, 0x2b465530, 0x32a480d2, 0x351f20ec, 0x480f8597, 0x26123637, 0x33e60117, 0x599fa78a, 0x601744cb, 0xdfa7210d, 0x577088ef, 0x9329fd6d, 0x145599c8, 0x5600b3a2, 0xb3e97a3a, 0xffffa1d1, 0x16eb6985, 0x3d492390, 0xcd0fcede, 0x083c474b, 0x213361e0, 0xa0085c40, 0x52c04f44, 0x4ed84b85, 0x17c46f1b, 0x9964fc00, 0x29e33a1e, 0xcae24444, 0xf2a63dbb, 0x2c5f1694, 0x51b97d95, 0x7fa91cb7 }, +}; + +#define NUM_CASES 6 + +static const encrypt_testcase_t test_cases[NUM_CASES] = { + { /* Case 0 */ + .iv = { 0xb6, 0xf5, 0xa9, 0x4b, 0x0a, 0xf4, 0x12, 0x77, 0x0b, 0x1b, 0x23, 0x09, 0xc3, 0x0e, 0x98, 0x0c }, + .p_data = { + .Y = { 0xd9bc5e81, 0x5278a41f, 0x738cfbc5, 0x1b8a9e66, 0xab2af510, 0x2c9dcbca, 0x5f7f5aaf, 0x2e25ef6d, 0x816ed715, 0xdfd33bf8, 0x48bd8a07, 0x8734c506, 0xa8000f0f, 0xae247ce5, 0xb341793d, 0x1487a983, 0x7fbbd48f, 0x3187dbed, 0xdb76a21f, 0x6d30fb92, 0xa46af22f, 0xd4a6a40b, 0xc9d72a63, 0x031322f3, 0xdd70ece8, 0x00397a58, 0x3d487b66, 0x62bd7792, 0x43384493, 0x01a1b0bb, 0x0aa8e094, 0x6850a0f7, 0xe4c8b84e, 0xcd8bc178, 0xbee248ce, 0x180e1413, 0x0834e7c0, 0x65dbc25d, 0xfe9240ba, 0x55a83d31, 0xc7a33eac, 0x0902a0a4, 0x1a85f7e0, 0x3d2e9d85, 0x2df3888d, 0x039b374a, 0xb3eccdf9, 0x6941313f, 0xdf97c189, 0xb48eca17, 0xd6ea82fb, 0x94134a26, 0xae4d0772, 0xf2304d22, 0x88e033a0, 0xec796d04, 0x6d602162, 0x03a9e6fe, 0x65d23c30, 0x94b518e5, 0xfd7e673c, 0xd4daf275, 0x787c73a8, 0x4118eefd, 0x98c199b4, 0x420fea74, 0xe1c3b8d0, 0x6cfb93d0, 0x0c2a112b, 0x44949ea4, 0xf0cd7d25, 0xc096e916, 0xf3563f74, 0xf65d9eb9, 0x12bcbcb6, 0x7b209e1e, 0x25f4e4df, 0x61a3c7bc, 0xa1698274, 0x58f6e7a1, 0x45671c4b, 0x7b2b1e22, 0x3e1794e1, 0xf9bb5e68, 0xdf850597, 0x05cece2a, 0x79e91d82, 0xfc161b5e, 0xe9e11217, 0x5b1c18fb, 0x3e53ace6, 0x4e8892da, 0xcdd787aa, 0x8450b1e7, 0xe2a33d01, 0xd35754a4, 0xf68daac5, 0x10c2a67e, 0xee013ccd, 0xdebf382c, 0x0190adb8, 0x43990fe5, 0xee29aa5b, 0x95fabd11, 0x175159b2, 0xc89bfd61, 0x92ecd835, 0x45e823bd, 0x300e1fc3, 0xc2f686f1, 0x2fa2e7c0, 0x99262371, 0xc5fc3aa3, 0xc9497f49, 0xf0c12a26, 0x20bb0862, 0x05bb77d1, 0x9f0f2cca, 0xf1bdc1d6, 0xc895ad79, 0xaf1c095a, 0xb2f98d0a, 0xf7f13949, 0x82408cf8, 0x95246078, 0x7dadb502, 0xce4b534a, 0x025dbdbc }, + .M = { 0x3e5be0e3, 0xf52833a1, 0xfaaa3a32, 0x05c752eb, 0xe1b51c99, 0x13443332, 0xb4f7c41e, 0x99524fa1, 0xdfc54d11, 0xbc645327, 0xe1b033fe, 0x937eaca5, 0x800491f4, 0xf57591c9, 0xe5fc3e12, 0x80da6612, 0x9780f6f7, 0x55b11c5c, 0x0179fc8b, 0x04623dfe, 0x666a6b7b, 0x6a454e45, 0xd1a1fb65, 0x18941ef0, 0x0aa01777, 0xd9ca9098, 0xa2c6af75, 0x47856509, 0x5b73b08a, 0x057ddaf7, 0xbe9983a1, 0x65d4ce2d, 0xfc744622, 0x344b94a7, 0x8b500462, 0xc0577e09, 0x20a166aa, 0xfb600ac2, 0x18357e29, 0xad80d41f, 0x40cf7884, 0x4f0620a0, 0xa71755e3, 0xb3730828, 0x3b57c8a2, 0x037b6797, 0x0a0504c4, 0xadc84e8a, 0xe7ca75cf, 0x0d7ec10d, 0xa41d0c19, 0xf89480ad, 0x33003db2, 0xfc8fcd65, 0x6e58d19e, 0x7da9a7fb, 0x58157d95, 0x06c58ea2, 0x5ff77fc1, 0xd530d00a, 0xd5a33559, 0x86edb7b3, 0x88d67a31, 0xc009267b, 0xd43b7b63, 0xb5fe7abb, 0xf24cb5f0, 0x4bff1cb1, 0x361dc50f, 0xf9ddf251, 0xa4096a6f, 0xe472bc8f, 0x9fcff5bc, 0xc8f7b470, 0xb938b4c0, 0xf698e42d, 0xecdfc785, 0xd78d0041, 0xbfb1319d, 0x8e139488, 0xa37802e6, 0xb854ad74, 0x6a2dc19c, 0x133bab93, 0x11ffc10a, 0x2b7f4cbd, 0x278c755c, 0x94f7403b, 0xfffee20f, 0x66bf66e6, 0xb7dd64b0, 0xcc19e6b5, 0x3fe276a9, 0xa24ff09b, 0xf728ac2b, 0x9896e0b7, 0x278f34d5, 0x3c62885a, 0x0318e882, 0x42de2419, 0x625fc485, 0x9050d8e9, 0x4be23084, 0xdb339a1e, 0xed8a20b5, 0x45d4baae, 0x0f17e3e2, 0x2a8ccc9c, 0x48c0fd56, 0x72e7d7fb, 0xbce7b35b, 0xf9d33b71, 0xbf19699f, 0x043d2d8f, 0xe6ca2ab3, 0xbb8999ec, 0x70be2438, 0x6caacf3d, 0xcaf12efa, 0x0b7fe0d4, 0xd0c59b45, 0x519cb602, 0xdec543a7, 0x7b70ab45, 0xce1088b4, 0x1e4969c0, 0x946c0dd1, 0xa8023f63 }, + .Rb = { 0x249f12c5, 0xbfa04790, 0x6f15e58b, 0x622c5bd5, 0x58ed2bab, 0xbccbf725, 0xb7ef2f34, 0x44f9b33e, 0x75c70e78, 0x10106974, 0x861d85af, 0x68e8c6f7, 0xf2b40dbb, 0x7bbb891b, 0x7a9221b9, 0xdc0e7ceb, 0xd06d32ec, 0x53ae3d27, 0xb8b542bf, 0x85378510, 0x91239094, 0x3a205f3c, 0x406fe2db, 0xe91cc561, 0x58e1ef61, 0x1bcaaed0, 0x0091fe94, 0x1c62aa45, 0xaa1fd46c, 0x037f59b8, 0x5323106d, 0xc12662e8, 0x52c938c2, 0xe6c0e25e, 0xd122cc49, 0xd7386afa, 0xac74d12b, 0x6ab7a0e8, 0x869720b2, 0xfa7bc0ca, 0x773ab48a, 0xf1c10c44, 0xd7a49c2c, 0xb7a4390a, 0xd1d0327e, 0xa948aac3, 0xf52713b3, 0x256e890a, 0x911b97ae, 0x5470529f, 0x70a03d5e, 0x99c502bf, 0xb50b90af, 0x16885774, 0xd93e9bd0, 0x690e1ce0, 0x5d0531cb, 0x9ad07417, 0x439088ea, 0x57fbbd4e, 0xf304be99, 0x790196d1, 0x1f4a8335, 0xc7cbbae5, 0xad3fd79e, 0x85c3cd73, 0xdf294021, 0x8abcd42b, 0x398ec188, 0x8ebb0b9d, 0xd05edce2, 0x1fa6e879, 0xe3ac6de7, 0xc3deb4a4, 0x1e3640c7, 0x8e8fee5a, 0x66476e67, 0x3eab72be, 0xc51eb4b9, 0xca865930, 0x0285d777, 0x3880c0d8, 0x2a1522b3, 0x721ee77d, 0x34e0d955, 0xf5973965, 0x12ec085f, 0xe26061df, 0x2335063a, 0x9fe3251d, 0x9665de8b, 0x7caec6bb, 0x84b51e0e, 0xbb416b04, 0x89bd0b7b, 0x95f117c2, 0xaa0a2971, 0x5f91cefb, 0x27afb45d, 0xac96dae7, 0x5d62cb98, 0x5e9bbb81, 0x72ccf5d3, 0x2ba887e4, 0xc34b5f8f, 0x21808a6a, 0x0cc9ec13, 0x0d8dc7e8, 0x2bca56a0, 0xd68cdc1b, 0xdbb390e0, 0x84c90089, 0x21174c96, 0xd728c34d, 0xd0f6ad8a, 0x4fe46a1c, 0x954f3cf7, 0xceeba0fd, 0x1b8b48bd, 0xace97594, 0x5e4136fa, 0xc5d4fb92, 0x4f6e95cf, 0x0116c9bb, 0x3e201fdb, 0x3e839b6d, 0xf9d27fce, 0x9a0b4575 }, + .M_prime = 0x10bb9b35, + .length = 127, // 4096 bit + }, + .expected_c = { 0xe9, 0xb0, 0x95, 0xe3, 0x03, 0xf1, 0x78, 0xf2, 0x79, 0x24, 0x73, 0x10, 0x4f, 0x9f, 0xc4, 0x45, 0x67, 0xf6, 0xf7, 0xba, 0xfb, 0xa4, 0xcd, 0xda, 0x0e, 0x14, 0x48, 0x5d, 0x71, 0xc7, 0x2e, 0x80, 0x49, 0x44, 0xc0, 0x2d, 0xcb, 0x8a, 0x6a, 0x70, 0x33, 0xfe, 0x10, 0x0a, 0xf4, 0xa0, 0x15, 0xa0, 0xdb, 0xc0, 0x8f, 0xad, 0xe3, 0xfe, 0x0b, 0x69, 0x95, 0xd1, 0xd3, 0x09, 0x67, 0x69, 0x5a, 0x99, 0xa0, 0xc1, 0x98, 0xb1, 0x2e, 0x77, 0xbd, 0x35, 0xfc, 0x96, 0x5d, 0xb9, 0xf4, 0x9c, 0x99, 0x61, 0x44, 0x77, 0x8e, 0xa1, 0x73, 0x25, 0x2c, 0x7b, 0x95, 0xd8, 0xa7, 0xf3, 0xe3, 0x08, 0xeb, 0x48, 0xc8, 0x44, 0x69, 0x19, 0xe6, 0x9b, 0x30, 0x0e, 0x16, 0xfc, 0x2f, 0xf1, 0xe8, 0xd9, 0x2d, 0xe5, 0xa9, 0x95, 0x5c, 0x2b, 0xb3, 0xd6, 0x2b, 0xca, 0x5b, 0x1f, 0xff, 0x99, 0xcc, 0x22, 0x7b, 0x28, 0x1a, 0x26, 0x0c, 0x98, 0x02, 0x04, 0x36, 0x51, 0x4c, 0x1b, 0xc6, 0xe3, 0x1a, 0x91, 0x8b, 0x24, 0x50, 0x57, 0x04, 0xdc, 0x11, 0x6d, 0x17, 0xc3, 0x52, 0x3e, 0x2e, 0xc5, 0x2c, 0x14, 0xdd, 0x82, 0x38, 0x87, 0x48, 0xad, 0xcf, 0x5f, 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0x4b, 0x15, 0x2d, 0x7f, 0x31, 0x19, 0x9a, 0xbc, 0x76, 0xc5, 0x3c, 0xe8, 0x3b, 0xe8, 0x1f, 0xc1, 0xed, 0xc5, 0xdf, 0xcf, 0x66, 0xe0, 0x6b, 0xda, 0xd0, 0xbc, 0x0a, 0xe1, 0x7f, 0xe2, 0x17, 0x0c, 0x54, 0xe8, 0x77, 0x54, 0x00, 0xf9, 0xd4, 0x9a, 0xe3, 0xd7, 0x33, 0x96, 0x7a, 0xae, 0x7a, 0xa6, 0x7c, 0xf0, 0x4c, 0x6c, 0x91, 0xc1, 0x51, 0x1f, 0x13, 0xd7, 0xc5, 0x3c, 0x09, 0xc6, 0xd9, 0x34, 0x0f, 0x66, 0xff, 0x05, 0x1b, 0x54, 0x33, 0xc0, 0xdc, 0x29, 0xa5, 0x26, 0x57, 0x9e, 0xd9, 0xfd, 0x38, 0xd4, 0xe6, 0xb1, 0x96, 0x9a, 0xf6, 0x12, 0xfb, 0x2d, 0x3a, 0x1c, 0x19, 0xc9, 0x52, 0xb4, 0xbf, 0x39, 0x35, 0xdf, 0x96, 0x0c, 0xab, 0xba, 0x5f, 0x77, 0x49, 0x3c, 0x46, 0x3c, 0x2b, 0x24, 0xcf, 0x92, 0x2c, 0x7e, 0xaa, 0x33, 0x83, 0x01, 0x04, 0x51, 0x10, 0xeb, 0xb0 }, + .hmac_key_idx = DS_KEY_BLOCK_2, + // results of message array encrypted with these keys + .expected_results = { + // Message 0 + { 0xfbb74b40, 0xe374e619, 0x5e13f3db, 0x7c115126, 0x6de46b23, 0x8da94cf4, 0xbca82dfd, 0x36dc0605, 0x09ded882, 0xd93fc63e, 0x3f4f182d, 0xc9a82503, 0x12855997, 0x5e81b49e, 0x612e6356, 0x9d3065d4, 0x59588dda, 0xa7686076, 0xd250bc05, 0x548c132f, 0x74afb3f2, 0xe64e4afd, 0xe0278a09, 0xb1eb40c7, 0x2ae1182f, 0xbd18fb09, 0xd99bce5d, 0x0cea8a0b, 0x9ba0ebda, 0xa4bb85ee, 0x9d952fc8, 0x6d0d28e1, 0x6624f74f, 0x7c3780cc, 0x1dc160c6, 0xfae23c41, 0x521b525f, 0xc4c605ce, 0xf8a74470, 0x153ae915, 0x66df5b13, 0x99240058, 0x2f9ad9bc, 0xbd9032c5, 0xf8b610df, 0x71c0af21, 0x1060a640, 0x5a3044a0, 0xf4b9ef05, 0x13ddbc92, 0x3bd52348, 0xac2a7296, 0x632a2311, 0x8641de76, 0x89b8ec44, 0xf2a91646, 0x10b48913, 0x30438ad9, 0x87896ce2, 0xea99866a, 0x69c5e9d2, 0xba889f66, 0x0ab126f0, 0x2fae8e24, 0xfdd0d95f, 0x89e512c9, 0xded5dd87, 0x34ccca78, 0x7d981cd8, 0xafbbe035, 0xfc3ddd8d, 0x4b736f1c, 0xb0b08d7f, 0x26d18579, 0x873ecc99, 0xb6516ea3, 0xd8a3a0a8, 0x8cc51732, 0xb0da3748, 0x2f06ddca, 0xb6ce3545, 0x52d1f19c, 0x768baf6c, 0x3e8280ee, 0xe23773f4, 0x8483e2cc, 0x9410a287, 0x4b2c665f, 0xe3ed9cc6, 0xf8fe6a43, 0x13d008a1, 0x29e64695, 0x2a8f1cbc, 0x46487188, 0x3599a7ec, 0xd8f352a0, 0x4f63d0d0, 0x46c31575, 0xb7074e32, 0x4c513bef, 0xc087fe37, 0x9ee8a681, 0x126bb86a, 0x45704d3d, 0x0eebf8a3, 0x6b1e9929, 0x60f8c04f, 0x698c225e, 0x2e484f0b, 0xebd420e1, 0x0d4cbcec, 0x90806b6e, 0x59acf71d, 0x9d3085fd, 0xde69a76c, 0x862cf540, 0xd5b1a736, 0x6c656d00, 0xd4bc2f10, 0x8a3c9937, 0x158a07a5, 0x768e377f, 0x6b28aeff, 0xaf0e2c3d, 0x5dad8716, 0x0053eb21, 0x10dd81c7, 0x9c8ae64c }, // Message 1 + { 0x154c6f0d, 0x893dde00, 0x7d5e029c, 0x2e4b8d06, 0xbb6df4ac, 0x4cb04e00, 0x69d9903e, 0x92a87011, 0x8a2408c3, 0x89554b0c, 0xc473f6cc, 0xa9539442, 0xd373a3dd, 0x23e29be9, 0x71184cd6, 0xdb0496dd, 0x33ab6ee5, 0xd1ff944c, 0x8a59be18, 0x5eb3a04a, 0x695f9e2e, 0x9c66f231, 0x4ef5f557, 0xa02364b7, 0x2d6e8dc1, 0x9770a469, 0xbc423ecc, 0xf0d24bfe, 0x408cfeff, 0xa1ce8322, 0xfd9b0e38, 0xf113dbf2, 0x2f6f1112, 0x41079246, 0xd55fe926, 0x6b7580b6, 0xd0ffbbd2, 0xb08953cd, 0x1fa944a7, 0x1f052e74, 0x82ea3e77, 0xf96fd0aa, 0x93a6fd98, 0x9d999340, 0x73929756, 0x7d4dc5e5, 0xe83af128, 0x24a7107a, 0x70ade5cc, 0x0731b568, 0x4f9dd476, 0xf5aae73c, 0x69a436d2, 0x0e644225, 0x0a35824c, 0xd59556f6, 0xb889da39, 0xb861b76a, 0xc2608d4c, 0x6f60cae4, 0xf8b57bb7, 0xa53f6e4b, 0xbe5358e8, 0x2f250533, 0x5c3e3302, 0xf8deee3d, 0x5e4c5a65, 0xb2ea65f5, 0x9662bbf1, 0x20047818, 0x9f9271f3, 0xc14b7ba5, 0xd53cede7, 0x8c2494be, 0xb8dbd1e3, 0x91ce3f06, 0xe420b978, 0x9dcc8aed, 0x5c0843a7, 0x4dececff, 0x9c4935a8, 0xf60772d4, 0x563ed0f2, 0x19d1d292, 0xc902fb76, 0xf19c94eb, 0x8a5ea691, 0x7108cf70, 0x8b6ef23f, 0x6506c9e3, 0xef33bb00, 0xba72b340, 0x03fa28c7, 0xdd737c71, 0xdd420641, 0x957da2a1, 0xb02645a4, 0x945e6c9d, 0x5c8db47c, 0xd02cebdb, 0xc72b55a5, 0x037a2b21, 0x8a275fd5, 0x4d36326e, 0xe220273d, 0x31151800, 0xfc37e730, 0x7ec85000, 0x78532720, 0x84cca231, 0xa8a16c95, 0x72c93f0c, 0xfa4cc77e, 0x4dc73d1a, 0x370a9e4c, 0xdd362d71, 0x812dae5c, 0x634e0385, 0xd3c65aff, 0x416f4cb7, 0xeed31f6d, 0x9ebefeb4, 0x847d0839, 0xdf201773, 0x2d65c879, 0xd7e55c30, 0x50a2b1fb, 0x177f646b }, // Message 2 + { 0xf620b880, 0x217bf2cd, 0x1628ca08, 0x1c0504d1, 0x474863c2, 0xdaac839d, 0xc0c00b24, 0x5b8aaa1a, 0xb84df421, 0x46a300e2, 0x74b58522, 0x348ead4c, 0x979217da, 0xae684a30, 0x8f3d81f0, 0xfa29906d, 0x08be2185, 0x8d1bc86d, 0x620114f8, 0x286ebf04, 0xa40c02b7, 0x4a888992, 0x60cb10b7, 0xb50d40ed, 0x9c1df301, 0xe47a0f98, 0x77b59d6a, 0xdda6ea41, 0x6a0ca045, 0xbb287481, 0xf71b1916, 0xe68d6d01, 0x8f515997, 0xccc6d707, 0xa34f2e26, 0x1ee9d6de, 0xfd303121, 0x13769977, 0x9a990fcb, 0x1a32b103, 0x60141055, 0x208fa8eb, 0xb9e0a27a, 0x83a7518d, 0xb768a2a7, 0xbb4e57f5, 0x59049ae1, 0x2cdffce2, 0x507ed979, 0x4c7cdfa4, 0x01af0305, 0x64ef02b1, 0x889c3faa, 0xeac30e58, 0xcb60e3e7, 0x0908767b, 0x185e5484, 0x439157a7, 0x9461824c, 0x542282f2, 0xa339778f, 0x4961930f, 0xf2ba657d, 0x9ec23324, 0x842de8e4, 0xe3620524, 0x485a6b83, 0x06ecb4e7, 0xfbfdb186, 0xd151bd47, 0x94cb5ba1, 0x5b3b3db4, 0x1b4888c7, 0x1c87b82b, 0x3c9cb229, 0x29c1f0c4, 0xe1cf9700, 0x38954b6e, 0xbccb5cf4, 0x19f1c54b, 0x8f250486, 0x7258c7dd, 0x43460daf, 0xb97d1ec3, 0x241a291f, 0x86ac4ba0, 0xbfdd64ce, 0xb6fa651f, 0xbbdd65b5, 0xeba5db10, 0x4bf74893, 0xb24e22e1, 0x2d9c0945, 0xbade7f79, 0xf8a4d456, 0x43ec690c, 0x1ac6ef92, 0x7e3e869a, 0x062d6ecc, 0xc5b73105, 0x3e4fcb51, 0x96741d01, 0x9a21ef67, 0xc8772eae, 0x00498faf, 0x05e5e725, 0x600975fb, 0x0e3fb83e, 0xb75c2046, 0x4f9310d5, 0x9b620514, 0x7f2140a1, 0xee33197b, 0xad539c75, 0xe052de0d, 0x372337d4, 0xbe861bec, 0x1475891a, 0x245789da, 0x45ac9587, 0x0bc7c997, 0x1f2def07, 0x5a9871ef, 0xe4c3b849, 0xa36fa0f3, 0x6cab69b4, 0x9cca66d6, 0x855a048d }, // Message 3 + { 0x251cd1f2, 0x594996a7, 0x8c97afad, 0xdb76f5ce, 0xa4607eff, 0xeaf9d348, 0x5b6c0726, 0x93a1be80, 0xdd39377c, 0x7e6efc39, 0x10be7d35, 0xba0ee678, 0xd8a8a050, 0xd8c5af3e, 0x88b6aeb7, 0x6622552d, 0x2823b689, 0xc8a16dfd, 0x2da1cd21, 0x66caad46, 0x07e36a34, 0x1545a5e3, 0x5570f123, 0x28b4eec5, 0xf6aac927, 0x71aa8ad8, 0xe99513b9, 0x46990c24, 0x141d6a0e, 0x6c9a599c, 0x02172a3b, 0xa537c9f0, 0xf6267ea9, 0x6c819eb4, 0x1f12cf67, 0xc20a92a9, 0xe347d7ba, 0xb5055575, 0x89cc5300, 0x7dc0441a, 0x0f7e8123, 0xeabba812, 0x2eb32ada, 0x86763f88, 0x584e8747, 0xa6ed7130, 0xbcd64bdd, 0x67fef4c5, 0xc3176bfb, 0xf9559dfd, 0x6e7774a8, 0xff6be862, 0xd600b8bd, 0x92cd7c59, 0x2e0eec59, 0x0bd6f56b, 0xc78306fe, 0xf0dd994f, 0x84e19119, 0x070e6c58, 0xf4b0d608, 0x16b4d852, 0xa8f41101, 0xb6209170, 0xe8f34d78, 0x869a50b7, 0x5fabb0ba, 0x22a1a136, 0x049c258b, 0x5fdcd9cf, 0x22f1dfc8, 0x742db2ef, 0x7b53a211, 0x880e2357, 0x55d28f55, 0xb89cda05, 0xf006e0fd, 0xd79165a2, 0x72edbb99, 0x00e92524, 0xf9e44ccf, 0xbe2482a8, 0x6ecef96a, 0x7db4a9e3, 0xe22e91ff, 0xaf790acd, 0x4d13cb47, 0x86b160c1, 0x9cdc9680, 0x486a41e8, 0xfd755bfc, 0xa53f2bcf, 0xaf5b02f1, 0xfcfbb672, 0x3c695034, 0xa5a4a863, 0x793ef2aa, 0xf677dd31, 0x9b9f80e5, 0x2634504d, 0x6f10a58c, 0x3d8242fd, 0x88dee96f, 0x84be51b0, 0x80e607cd, 0x0abee960, 0xa069f191, 0xd663f8e2, 0xe9b28406, 0x0e42b309, 0x8ba4632d, 0x744abc04, 0xacafdb68, 0xe9ce03c3, 0x010d9093, 0x46317cb3, 0x25c55562, 0x1d8013d1, 0x7e5b24b2, 0x77877589, 0x16872b15, 0x10c6e231, 0xc2177c50, 0xea84d46c, 0x01c06181, 0x852a5f00, 0xa15d3b80, 0x1cf6a21e }, // Message 4 + { 0x8e450d5f, 0x6ad0dd00, 0xf494c37a, 0xba60b757, 0x9e528e32, 0x8ad223f6, 0x4e4ac37e, 0x864eafca, 0x3dc4d02b, 0xf5c89928, 0xff864462, 0x898c9c60, 0x31a57b3e, 0xc00a3f8a, 0xb76a25cd, 0x133025c7, 0x923fd239, 0xab6e0104, 0x7b0db6d3, 0x1ae4b0e7, 0x138f9171, 0xbaae0554, 0x03c5678c, 0x88b9168b, 0x2646a196, 0xeb89a848, 0xb04fcecb, 0xe8e6318b, 0x168c6d3a, 0xe94c6b6f, 0xb8711658, 0xce7cc24a, 0xbef25a0c, 0x6afbe897, 0x5668f8cb, 0x9c8f3bcf, 0x1d482de1, 0xd14b386f, 0xeebf404a, 0x0d8b4b42, 0x58d65520, 0xe2ebb9a7, 0x3cd269a4, 0x6583accc, 0xc29cca81, 0x2b5c3944, 0xac1f9a4f, 0xc6aa106f, 0x38de4972, 0xc8681bed, 0x20657187, 0xd91e23b4, 0x97d6efaa, 0xf2cc1855, 0x9185c4f0, 0xabc3b423, 0x28680d3c, 0x82de1141, 0x916053d3, 0x9af73e47, 0xea4d2741, 0xab2910e6, 0x7577ad7f, 0xe8ca0842, 0xbae59043, 0x5fc14a23, 0xfafe4784, 0x1cc899bb, 0x80a3f00d, 0xade3aa31, 0x18648dff, 0xf0f48d62, 0xa10688d6, 0xa7141a1f, 0x803fd159, 0x53a80a18, 0x2b67e2ca, 0x459c9d97, 0x47cd5ad7, 0x45f9e4b1, 0xc1189f8b, 0x19e164b7, 0x94ae2457, 0xb6bf30dc, 0xb11d67d1, 0xc53ca3c8, 0x13279983, 0xbf0795d8, 0x119734a5, 0x0f322272, 0x8935dc32, 0xc4f391b3, 0x47fec962, 0x05291603, 0x079e420b, 0xf8111bb1, 0xff10edff, 0x5e8000c0, 0x7befdb2e, 0x2dc21eb6, 0x1143bb6b, 0xaad6e511, 0xa0edd169, 0x886e625b, 0x8cd085a7, 0x7bec0223, 0x8650853d, 0xc209055d, 0x9c2c4194, 0x0226c197, 0xaa8fa4c2, 0x5366f876, 0xaeebe186, 0xdfbb7f09, 0x86422ac4, 0xdeb9c38e, 0xde6eb812, 0x03b326c9, 0x5bdf5c5a, 0x6c6d2bec, 0x1741eaac, 0xc9470180, 0x15c59502, 0x79f931e0, 0x99963116, 0x68e0a0ce, 0xe992dd6e, 0x86a26261 }, // Message 5 + { 0xfae3ee44, 0x60e00973, 0x529a647c, 0x5c77b6fd, 0x37d8ae67, 0x7644c936, 0xaa021da8, 0x8aad585d, 0x39b0f64a, 0x92d8faea, 0x490740cc, 0x0bbde4c0, 0x2dfa365b, 0x8de0252d, 0xd63905d3, 0xe85f77ae, 0x3b8cf0f4, 0x28cd27c5, 0xf5d8a39d, 0x5bfa068b, 0x38de4c93, 0x3ef1c7f5, 0xd274a075, 0x3d3eebcc, 0xbe1b1804, 0xebe368a5, 0x5f22ceb4, 0x5964c309, 0xd1a44d2c, 0xebefd6a7, 0x3c596525, 0x2fd4ea75, 0xf751a130, 0x7ed57b2c, 0x53d543fc, 0xcada892c, 0x28a62ffa, 0x65bde524, 0x93b72e41, 0x86b6f11f, 0x3f1f6acb, 0x372109eb, 0xca351285, 0xa7b45bdd, 0x8f981c5a, 0x9c09556a, 0xb7845478, 0x34d18840, 0xd531e749, 0xbb9e5d52, 0xd0f2499a, 0x33d941f6, 0x050256d2, 0xeb5feac0, 0x06920ec9, 0xb38205e1, 0x68d9558a, 0x2ff020ef, 0xadb7d176, 0xc5e29bb5, 0x78ef0b80, 0x0cb42fb5, 0x6bacd277, 0x49c6fe88, 0xb2d87ca8, 0x140716e6, 0x2c9310b1, 0xe1f619aa, 0x3dab476d, 0x679c140c, 0xcf8f1ff1, 0x1ba0d9ed, 0x0031ddc1, 0x3be56f1f, 0xb79c5649, 0xfe23c8c2, 0x15b3a1dd, 0x1b6b5a49, 0xdd6343a5, 0x5c68362c, 0x88b40e2c, 0x1cf400cb, 0x08395155, 0x6d537d59, 0xb7906d58, 0x4ba13819, 0xf26e4f9c, 0x0c2285cd, 0x1814ae52, 0x5e550533, 0x8c07c227, 0xd8c7d099, 0x4179c9a5, 0x01747fad, 0xe9c86a72, 0x62905779, 0x1a5a42d8, 0xf667a583, 0xc17bbc19, 0x35b4cdd1, 0x67fefbd7, 0x64a2d08f, 0xeadbe370, 0xb51d09f9, 0x2a16c1e2, 0x20a4e179, 0xc65be038, 0x28137542, 0x2eced8c7, 0xa7622629, 0x386cc4af, 0x6c8ec462, 0xac96b1a6, 0xfa5e1028, 0x6a8e29f5, 0x83e31df2, 0xc5ecb1ac, 0x353a6734, 0x8224971e, 0x6e5795ee, 0xed425a2e, 0xf2484f56, 0x04a98a76, 0x798d8730, 0x6b8bc8ba, 0x554c1511, 0xe10a6957, 0x1db9e1ad }, // Message 6 + { 0x7dc11dff, 0xb1156ada, 0xb23d6a94, 0x23548c27, 0xec712d07, 0x83974324, 0x53dcd264, 0xde546fd4, 0xbb464aa5, 0x77ce12d0, 0x5792800d, 0x07d83939, 0x50afe0e7, 0xfac5d626, 0x79b31e5f, 0x1c18ab84, 0x81a4b82a, 0xb42481c3, 0x5a76f763, 0xd173db91, 0xbdbdccd2, 0xc2d07502, 0x9d845ca3, 0x2ee9dc99, 0x09317aa0, 0x0c4bf0d0, 0x94257465, 0x0cf8a221, 0x9ad1d006, 0xb4d3ce4c, 0x4b63ccaa, 0x437fa97f, 0xb415582a, 0x68c5f7f5, 0x45df2a12, 0xc1f26f6f, 0xe866558d, 0x291d1dd5, 0x58b81986, 0xaf2f2c09, 0xf44a1d2a, 0xd7faf0a9, 0x482bd662, 0x73da75a7, 0x757363a8, 0x85c33b90, 0x9716dada, 0x88c409f3, 0x1084d962, 0xa2ccee92, 0x9e749976, 0x64ecfdf6, 0xff2c5376, 0x247e7205, 0x28f2ffdd, 0x4feb7d32, 0x8c2d9f14, 0xd9f1becd, 0x7f3945f1, 0x99eff322, 0xd6c78add, 0x07d09180, 0xdc233a10, 0xd3f70b29, 0x5476c844, 0x45af6fd5, 0xafdc264b, 0x660bb873, 0x8b49e478, 0x739e5862, 0x421fd9bf, 0xe9b7fe8b, 0x9d54492e, 0xb24e52c5, 0x5d4dc940, 0xabd5c995, 0xa191afd1, 0x84ebb1c1, 0x3193317d, 0x66eb4eda, 0x34d7fef6, 0x694af146, 0x99018e25, 0x4a51ce83, 0x1e1ba0d2, 0x412b9ebe, 0x67836ee4, 0x28194719, 0xd087e92f, 0x2f008a49, 0xfb793379, 0xa3b0f3ca, 0xea670b5b, 0x9b7d2897, 0x5736eb1d, 0x33c381ce, 0x8cf7708c, 0x344ab658, 0x9fad8c4d, 0x993f0c5b, 0x25296e78, 0x99c10d8e, 0x11c5d555, 0x2f111753, 0x3284ce18, 0x743af7c0, 0x5f4d0b95, 0x81b16894, 0xd60a6eda, 0xb701fe87, 0xfaa6d80a, 0xef966884, 0x80ea6bd3, 0x15999e6a, 0x970adadb, 0xbdcad573, 0x61f41970, 0x9609603d, 0x4a81e22d, 0x1c165af9, 0x5c8b7661, 0xc7e71dbc, 0xa765cc2f, 0x81480902, 0x0ab291fd, 0xb24b0fe8, 0x89bd0a03, 0x197f9145 }, // Message 7 + { 0x2e389a08, 0x629db53a, 0xfead0a32, 0x6b1a1b3f, 0x4db22855, 0xea7bc14b, 0x22d28362, 0xc8aaafb0, 0x09574613, 0x1186a531, 0x7314d648, 0x269abc08, 0x47db9ef4, 0x3d4fd364, 0x674d2960, 0x63949eab, 0x099645b2, 0xf6fe1777, 0x60ff4598, 0xce40cbba, 0x6e94f60f, 0x5f6d7fe4, 0x82458625, 0x33052262, 0x16027ecb, 0xc5be855a, 0xa7f22f87, 0x0116d93d, 0x0ef05754, 0xf6c74648, 0xf51656b9, 0x90a06115, 0x8dd01ad5, 0x4f9050f1, 0xbcf8cf7b, 0xb14fba3d, 0xa1285f92, 0x62758a5e, 0xee909968, 0x4182f5dc, 0xed3e055a, 0xe05a023b, 0xa0b00ad6, 0xfb5cf304, 0x583406d7, 0x0539162f, 0x101c41d8, 0x514b29d6, 0x3eb3f2f7, 0x23bb7a8e, 0xbe33d2ec, 0x7315852c, 0xd5ecb314, 0xf9c562d6, 0x86a6ae5f, 0x7f3c3963, 0xae44e848, 0xe83b84c0, 0xe2ff7e1a, 0xce70d227, 0xcbe3ed46, 0x50d83022, 0x62039d34, 0x2bc65794, 0x4c3e1fc9, 0x2526dc47, 0x6008680f, 0x8de3580e, 0xf8c1f7f4, 0x2dbe4fa2, 0x48180f90, 0x779c0e90, 0x81c73e5b, 0x5e114ab8, 0x61751abb, 0x16ae818a, 0x057b21bd, 0xbcff0537, 0xcc6f7774, 0x4f94d9f5, 0x32d4c296, 0x73a384ee, 0x1d75ed46, 0x9044e2bc, 0x2f0e3f76, 0x76d94e88, 0x45e1f18d, 0x4a02f43b, 0xcab2bedc, 0x996f535c, 0xe4de18dc, 0xc0e0c081, 0xbd967d90, 0x6ed1493f, 0xda0cdabe, 0xc86dc1a2, 0xf240dd7b, 0x85d87e49, 0xec38a229, 0xd9b9d1af, 0xca98c8d2, 0xfd0245ec, 0xc265bf26, 0x37d7ea68, 0xf3ebc9e4, 0x39e9aa93, 0xb8fa7d3d, 0x37aa0b8e, 0xd052314d, 0xdd12882f, 0x9759b302, 0x21ee3b31, 0x315009cb, 0xc3358ae2, 0x1e44340e, 0x9584300f, 0xf1f6b83f, 0x48f4bfab, 0xe17785c7, 0xa9c2f604, 0xdbc7ff0b, 0x2628cb1d, 0x3919c8e6, 0x7330d62a, 0x2f25fa8b, 0xe5ee3990, 0x7a91b924, 0x02893f77 }, // Message 8 + { 0x68ec8519, 0xf571b9c8, 0xbb38c337, 0x46fe53a8, 0x10626192, 0x2e89e74f, 0x65c40bb6, 0x948dfc3f, 0xb1ca54fd, 0x210563b2, 0xb49711c6, 0xa977fcc6, 0xdfbebc09, 0x781201dd, 0xd00a59ba, 0xdfc3d908, 0xe979f20d, 0x6328d52d, 0x24036580, 0x7ac3cc1b, 0x250d69fc, 0xf43c9944, 0x1103a4a7, 0x70074821, 0x505a1256, 0x78d1a577, 0x13fe8bd1, 0xcd27b13b, 0xed2b505d, 0x65d4dc75, 0x7a1057fc, 0x0329d776, 0x788d92dd, 0x296bf77a, 0x364761e8, 0x44878f25, 0x9e951b12, 0xbc332538, 0x4c31b43d, 0xe832195a, 0x6bd1d3fe, 0x49ce1265, 0xb312bfd5, 0x2722bb91, 0xc7facfca, 0x5c568aeb, 0xca6cde0f, 0x58c9ddcc, 0xdd2558f9, 0x1f3f5438, 0xb9243f7d, 0xaf12f165, 0x57bd24c8, 0xd17a76ff, 0xd194afbe, 0xe4bf7a7d, 0x2b468c6a, 0x2b0620ef, 0xdd64bc8c, 0xffc4fb90, 0x6c0230ec, 0x6b1d25df, 0xe5a825fe, 0xfc617173, 0x2bf790aa, 0x6a3a015e, 0xba5cbdd0, 0x84da315c, 0x885b072b, 0xbb8f3fd7, 0x501bf81f, 0x1f8337fc, 0x772f858d, 0x9e41d3b9, 0xa6a1d2b7, 0x4266c4a8, 0x5ef537c4, 0x7938501c, 0x07c38f7e, 0xa6c63cbc, 0x570082fa, 0x2bc5b3e7, 0xe8ee0268, 0xc0776a2b, 0xcae6c48d, 0x8512383c, 0xf61051ee, 0xbc668b50, 0x10f2451b, 0x859bc0ee, 0xa7659871, 0x89f167e7, 0xbcacb15b, 0x14b6b16e, 0xf5efe62a, 0x85a2ff2c, 0xd6a0ec4c, 0x827140be, 0x7a2bdea1, 0x1945c255, 0x118c97bb, 0xd32324fb, 0x2b487f54, 0x11c606ec, 0x7a8f5b36, 0x33a7cfa0, 0x11a03731, 0xfcbd1a14, 0x5bd9cb85, 0xeae08c9b, 0xf67e2abe, 0x882c7b9e, 0x49a16cc9, 0xaeb4d6e0, 0xb1863649, 0xd228b211, 0x751f005b, 0xc6f3cd54, 0x77d206e9, 0xcaf57852, 0xc76e543e, 0x124be84a, 0x361d35fc, 0xded42998, 0x0683a134, 0xd0d9dd6a, 0x7d91d1b0, 0x3c08073e }, // Message 9 + { 0x08b22864, 0xfdc51028, 0x7b1e8f1f, 0x70d5716c, 0xa187b780, 0x658c1164, 0x78f34049, 0xb45926a6, 0xa95d7b70, 0x45f21c13, 0xd35d3712, 0x69f9f676, 0x7f79cd5f, 0xbe6e6e05, 0x898923c9, 0xe5c27236, 0x427db647, 0x45cc0175, 0x9c1c52b5, 0xcd48aac8, 0x41b82773, 0xd9841a08, 0x1bc4433a, 0xd1e155b3, 0xf48c7c9c, 0x1d8c8bbe, 0x572b856e, 0x9d638bfa, 0x69d2ebba, 0xb1c97e2f, 0x349675dd, 0x89eb7c45, 0x8071bfd6, 0xb9d62198, 0xeb117c56, 0xd8d20636, 0x3bb7f484, 0x0167c059, 0x9b006f91, 0x53313146, 0x3dffdca0, 0xfef27540, 0x8a554c03, 0xbbed0920, 0xfa0ae45b, 0xc6898b45, 0x0cdcc4c7, 0x0a361b64, 0x14c72edb, 0x9d649bed, 0x57111e81, 0x86e49ac9, 0xe84bb28b, 0x8df11985, 0x8adc2d7d, 0x1312dfea, 0xc0b3225a, 0xfc7801c5, 0xd2e1c447, 0x5d7b1814, 0x445c1084, 0x94bb8fc9, 0x523fc3ce, 0x6ab2e330, 0xf85da456, 0x86179ef3, 0x018d44f4, 0x2415f643, 0x866d90ae, 0xe7ea7afc, 0x5309f860, 0x324b0b46, 0x31316b2a, 0x2dde18c3, 0x69243936, 0xf0495848, 0xe3f89e69, 0x05d3ea06, 0x92b78005, 0x9942cbed, 0x03d912bf, 0x7f9bc3f6, 0xe87298c2, 0x2e08af7c, 0x0c6fdb87, 0x75a14da4, 0xf034dc24, 0xc3a7db20, 0xb3b8e530, 0xa35721ed, 0x584f1c4f, 0xe0c8c764, 0x43edc51b, 0xf8821414, 0x0c9e4a2a, 0x39d94bf1, 0xcddc96fd, 0x0b3e4b2d, 0x743d2fe8, 0x21f5d70f, 0x164538db, 0x60aaa592, 0xfa62bcff, 0x7cc19be4, 0x3db5edfb, 0xbab4a921, 0x30c68244, 0x139f7bd6, 0x797b0e30, 0xb7f9e399, 0xe7272a08, 0x70ae9449, 0xeae4ed71, 0x8b884db8, 0x9ddbd0f0, 0x3bfdbc06, 0x3b6ae04f, 0xd5fd13ab, 0x4a55db2d, 0xeb8926bd, 0x23c262a9, 0x746a862e, 0x8fe3193f, 0xcd0e9c7d, 0x68242a25, 0x3249df04, 0x0dae94cb, 0x79a3f7f8 }, + }, + }, + { /* Case 1 */ + .iv = { 0x97, 0xd4, 0xc6, 0xa6, 0x36, 0xf6, 0x5b, 0x90, 0x2d, 0xbe, 0x19, 0x38, 0x75, 0xcd, 0x08, 0x56 }, + .p_data = { + .Y = { 0x951a34c9, 0xccae5647, 0x7a079316, 0x845cada2, 0xbebb34e0, 0x95094811, 0x185654f0, 0xf4db9796, 0xd249a05e, 0x099a3b3f, 0x133822d8, 0x94ade868, 0x616ded7e, 0x2a075baa, 0xfa5a21b3, 0x3f918c50, 0x7fa678f0, 0x71d34ae8, 0xa01c1f1e, 0xec44ab64, 0xa186d5f9, 0xa267aa5d, 0x80efb9db, 0x9a289e76, 0x529f74e1, 0xe8aaa733, 0x668574ef, 0xabaa3f14, 0xd3e35805, 0x3af660a8, 0x6bf87b6c, 0x2a920dda, 0x75b5c0a7, 0x372bd1bf, 0x1acaa469, 0xbfe31c02, 0xfab811bc, 0xeb9b939f, 0x8a879c99, 0x95b7655d, 0xa0ca67ed, 0xa4dcb019, 0xb4d202b7, 0x80fd4048, 0xe7671fb1, 0x04a8241b, 0x79c44a87, 0xe8e5d70f, 0x8aa37edb, 0x4871b066, 0xa241611c, 0xcb3fe7bb, 0xb5980f9a, 0xe4531acb, 0x67ebf907, 0xf3afabee, 0x6bbe7ce1, 0x2882357d, 0x3214dca5, 0x3430c6bb, 0x29adc028, 0xd2dae59c, 0x3d9e0955, 0x6a7ebbe6, 0xd081f470, 0x0cfc91f0, 0xe06b3d89, 0x79523cb4, 0xb2c8b52a, 0xefbc02d1, 0xdfc09bb5, 0x34f383d4, 0xeb423eea, 0x7c0fbea2, 0xde81af74, 0x56ffd15a, 0x49158963, 0xeaed41a1, 0xb2a54d3f, 0xf4d486c3, 0x9cde7214, 0x0de6379c, 0x25d9c928, 0x06581ceb, 0x0fd03112, 0xb5bf67b8, 0xef8e4069, 0x8a9adb3b, 0xde33afb3, 0x20ebb56e, 0x11ce27ad, 0xa119f507, 0xebbefb2d, 0x51fc6edd, 0x1425b833, 0x861ae340 }, + .M = { 0x31bbd807, 0xa861c407, 0x92f96b67, 0x9f4c5d3b, 0xaa1a43c3, 0xabd90e5b, 0x89c3d4ca, 0x43ec5589, 0xe434cef6, 0x43f89089, 0xd43a64ff, 0xf6136391, 0x14b4011f, 0xabe85ecb, 0xbfb858f5, 0x4360c9ed, 0x6f287d4d, 0x22291aae, 0x5e70e0f6, 0x889f7942, 0x5aec9b03, 0x743bfd6e, 0xa0f20fad, 0xc59e70e0, 0xddeda78a, 0x40bf8fcb, 0x9a39225d, 0x6039fded, 0x237cf58c, 0x488a4f19, 0x9cac5843, 0x58b5fd62, 0x0d2c93bc, 0xf34d0397, 0x82fd3243, 0xba1d0ea4, 0xc29f1dc9, 0x997e49d2, 0x3c7f513f, 0x811bbd66, 0x0623e514, 0xbae0d286, 0x6b2f233a, 0x7001fc67, 0x7be399ab, 0x852211dd, 0xe83b72a5, 0xeed324af, 0xb9423f45, 0x619cbbc8, 0xb432cfa4, 0x92c2af7d, 0x93836f52, 0x8e3abcd4, 0x957bf4ab, 0x821db4f6, 0x7efbb842, 0x0d76ddc1, 0x085f699b, 0xf1b54ccf, 0x33a35100, 0x9008f633, 0xf2ae840c, 0x03a9a5db, 0xee98a0c1, 0x0026dcfb, 0xeab30f7c, 0x0454632e, 0x1572233a, 0xad2d3b0b, 0x3aeae29b, 0xc4ba69a6, 0x44d1143c, 0x60236cdb, 0x54657fc7, 0x91ed80e5, 0xf9f60c63, 0xc9a18b09, 0x4ca49a40, 0x9a48c57a, 0x9fd6f197, 0x64cd425f, 0x768ec7d2, 0x5029d3ec, 0x953f175d, 0xa1ff2ad4, 0x52ae91b9, 0x47e7b7a8, 0x5ebae7bb, 0xd33bdd63, 0x4988976b, 0x7cb0349f, 0x3db77b04, 0x36096709, 0x31dc1550, 0xcb6bfedb }, + .Rb = { 0x7275f857, 0x4d7defcc, 0xdb5e757b, 0x8f452c9b, 0x44b52168, 0x70e6ac35, 0xcf58398a, 0x3b2fb477, 0x8bd83728, 0x96c95676, 0x510b3241, 0xadacb956, 0x8c5565b0, 0xcb39dde9, 0x797b8fa7, 0xde254108, 0x243dfd87, 0x6f9ca2b0, 0xca3c2a6b, 0xd4d73187, 0x2d3b5ece, 0xf7f74b31, 0xf5346a71, 0x473410dd, 0xbc03d660, 0x0bf5f2cf, 0xbe949594, 0xed2e027a, 0x473ca37d, 0x9ab7f84c, 0x93863217, 0x065afc4b, 0x67331ba8, 0x2ec262ba, 0xdd215fa1, 0xb7e6046e, 0x454dba87, 0x95d5014a, 0x013ab8b7, 0xf43948f3, 0x414c5335, 0x9d2ff8b0, 0x1f3889e2, 0x2ec3cff3, 0xbf4fa9db, 0x43c3a45a, 0xe68270f6, 0x718d9762, 0x9fa85fec, 0xe20a4344, 0xe11d2655, 0x956e2c77, 0x3c27e149, 0xbc17d416, 0x432441b7, 0x00ce539f, 0x3fb73f3e, 0x3344e09d, 0xcd1273c6, 0x6b518f83, 0xbce56b31, 0x73d85ebe, 0x06e7a087, 0x079680b5, 0x7163bc88, 0x2ef149ac, 0x961431e4, 0xee92e9c3, 0x8a25b3ca, 0x35735064, 0xa3cec88e, 0x45eaf68f, 0x2edf5f53, 0xff40043d, 0x70253035, 0x27f5b91f, 0x07a8eef7, 0x4a9fe48f, 0x3affdfac, 0x949fd3a1, 0xb1354085, 0xa654404b, 0x63f3d375, 0x6ccce12d, 0x11b8b819, 0xf13c8016, 0xb56a9b87, 0xc657dd11, 0x7725986f, 0xc5ad4e73, 0xc25732cd, 0xe15ffb93, 0x0e328ccf, 0xf618976c, 0xd3e09a5b, 0x5a98416e }, + .M_prime = 0xd9ffea49, + .length = 95, // 3072 bit + }, + .expected_c = { 0x81, 0xa5, 0xd8, 0x77, 0x3c, 0x8b, 0x6c, 0x26, 0x46, 0x72, 0x8a, 0x5c, 0x3e, 0x19, 0xcf, 0x2a, 0x72, 0xde, 0x38, 0x6d, 0x5d, 0x8d, 0x74, 0x6d, 0x89, 0xdc, 0xc6, 0xf7, 0xed, 0x1b, 0x7a, 0x1a, 0x44, 0x04, 0xe7, 0xfd, 0xb2, 0xce, 0x26, 0x51, 0x01, 0x18, 0xf2, 0x45, 0x81, 0x4c, 0x77, 0xb6, 0x95, 0x1c, 0x5d, 0x66, 0xa3, 0x21, 0xf7, 0xef, 0x5b, 0xf1, 0x5c, 0xbc, 0x7c, 0xda, 0x5d, 0x82, 0xcf, 0x94, 0xae, 0x34, 0xbf, 0x98, 0x1b, 0x6e, 0x8d, 0x14, 0xc5, 0xbb, 0xed, 0x9e, 0xf3, 0xdc, 0x63, 0xa3, 0xd8, 0x0d, 0xc0, 0xcf, 0xdc, 0x4f, 0xd5, 0x0f, 0x13, 0xb8, 0x8d, 0x12, 0x92, 0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13, 0x87, 0x9f, 0x63, 0x9e, 0x46, 0x25, 0x05, 0xb3 }, + .hmac_key_idx = DS_KEY_BLOCK_3, + // results of message array encrypted with these keys + .expected_results = { + // Message 0 + { 0x2409519c, 0xbd193601, 0x812295cc, 0x191705c7, 0x11523082, 0x68cf854f, 0x344c7460, 0xee5862b0, 0xda2f44a6, 0x632a3fb2, 0xc6587773, 0xa7ffca35, 0xb1a7c1aa, 0x278121a5, 0x25ce15ea, 0xd2e7f22b, 0xd9ddd7e2, 0x2bee43dd, 0xf54dcf7b, 0x2be2f8f4, 0xd4aac2a0, 0x71cf94d7, 0xffccce1b, 0x84efa515, 0x20669452, 0x962d6716, 0xb1443ca9, 0x03ada35d, 0x6f321068, 0x156102c3, 0x1debb96b, 0xcbd0fb3b, 0x8585f721, 0x28151959, 0xeb177d23, 0x57cc8035, 0x024d3d63, 0xf5ce1936, 0xf0bc9c1e, 0x4f34859b, 0xada7f8bf, 0x56b76a72, 0x1607707e, 0x72f51923, 0xf4ed89a1, 0x60c79c7e, 0xa710fd23, 0xbe50ecdc, 0x405962ab, 0x9640b41f, 0xf06ba9e7, 0xd039f2a7, 0x0afddfbd, 0xbc575b5c, 0x503f75aa, 0xf69e8c0d, 0xb6f5a40c, 0x4b44b906, 0xb73f55a0, 0x285c460d, 0x6b28a87b, 0x7cc657c7, 0xf358d67c, 0xf7c72066, 0x3fff8de7, 0x65010724, 0x1f7bb30e, 0xb751aa60, 0xa5d0fdd3, 0x2d5d5107, 0x9384f03c, 0x69d85b17, 0x8863fe78, 0xa98f1b93, 0xee9aabe2, 0xfb904702, 0x6655a531, 0x7a391ef0, 0x102e42b3, 0x6e00a335, 0x1daa4046, 0x85283eb0, 0xb69dbcd4, 0x9a432fc5, 0x135dfdac, 0xa26767b3, 0xa0b0e390, 0xc7995ef3, 0x726e839d, 0x5606b772, 0xc34668ec, 0xade8e3bd, 0x97cc48ed, 0xa4639be9, 0x8eeef91f, 0x60771930 }, // Message 1 + { 0xf0156d41, 0x6fe08f0f, 0x03190cce, 0x10fa8567, 0xf04daa47, 0x4d143fc8, 0xe2ae7a2b, 0x1d12ec75, 0xe4422c90, 0xbecd4972, 0x11808bc6, 0x469113b0, 0x1fb2fb4c, 0x94b57b6d, 0x94793e20, 0x5adc5bc7, 0x7fb02330, 0x4e557aed, 0x8aff515e, 0x888a587d, 0x0f852f62, 0x18953c32, 0x0d63bafc, 0xa61d2ff1, 0x3242d7a0, 0x93daf785, 0x6d25cbf8, 0x19be3158, 0x3cae164a, 0x76cf89f2, 0xd2a5c456, 0x5de6e54b, 0x5afb02b8, 0xa4c857e0, 0x21f76527, 0x28da35e6, 0xd2af3238, 0xd0a743a8, 0x393223ad, 0xc1c4ac1b, 0xd0f16fe5, 0xdc24e47c, 0x69a05a6f, 0x31c328f3, 0xe607ac82, 0x5211a108, 0xd102fa0e, 0x50330896, 0x39c5883f, 0x57e33307, 0xf75eac31, 0x3d5a58b7, 0x7279f883, 0x861d0a08, 0x7b073033, 0x16147866, 0x8ffa5c7b, 0x28a91a63, 0xc5f2b236, 0xf0f0f2f9, 0xe0f9670b, 0x82b1b842, 0xb34a49d8, 0xa75b6f63, 0x27ef3e3e, 0x3c05d2d2, 0x39c0904f, 0x342495c2, 0x8049679e, 0xe5705973, 0x8da356f4, 0x16e1ad10, 0x5333f72d, 0x3729b23a, 0x9f410ea0, 0x7c4554a6, 0x73e7cf4b, 0x2c830da8, 0x37364474, 0x8b924a8e, 0x3410d68e, 0x7c7caeaf, 0x876b4be8, 0x2f215ec8, 0x8ca14335, 0x655fa1ae, 0x5fcdf97e, 0xc014814e, 0xdaf26bda, 0x1fcb2904, 0xac89b2a4, 0xa174f74e, 0xff493e03, 0x402d735f, 0x1684a4dd, 0x0f8720f5 }, // Message 2 + { 0x3759ec07, 0xc12f58eb, 0x62dd5e70, 0xda1ad998, 0xd027a1c8, 0x0380d18b, 0x5aa4a1b6, 0x31677a0a, 0xaa61aeb8, 0x12330b93, 0xeec9f36f, 0x6b33a37c, 0x35a542f2, 0xb69b01b2, 0xa47c4692, 0x9373cd83, 0x30245602, 0xb7737108, 0x814351f8, 0xd77ec36f, 0xe48ce52c, 0xa3a03d34, 0xed4de380, 0x2ead5f19, 0xddb9eb16, 0xd7252de0, 0x13ed0a87, 0x26bb4ffd, 0x1fac4f20, 0x8128e96e, 0x70fa4773, 0x324c1182, 0xd249fa4e, 0xd8e40184, 0x7d55bc73, 0x9fb71f36, 0x421d0c4c, 0x48f8cb67, 0xa4eb1f0f, 0x8a7bfeae, 0xa64ccda3, 0xa069b814, 0x87482b48, 0x8230e457, 0xc556a69f, 0xdf3831fc, 0xa2ee579f, 0x45df7dc3, 0xf0d8443f, 0x4d05c92e, 0x6bf8b99b, 0x95d22e6b, 0x162330e0, 0xc3431829, 0xb24d0a17, 0xfae28b17, 0x3ec27815, 0x007708a3, 0x2b84f611, 0x7441c1d0, 0xf4a383bc, 0x04b4e4e7, 0x547d811a, 0xba64014b, 0x19b30195, 0x6996efe8, 0x28e5f6c4, 0x10a582a1, 0xfa190d01, 0x860b111d, 0x85e45a43, 0x0d13e752, 0xddc57a9c, 0xd0bc56c9, 0x15ed8723, 0x58b19aec, 0x3b00c8da, 0x4d51a8ff, 0x72c08db1, 0xe9e18e15, 0x9c014ffa, 0x82b5c681, 0xe488fedb, 0x2b8bc706, 0x4e9bb6f8, 0x98a98e99, 0x670b6c9f, 0x1da131cd, 0x153ee0d3, 0x38f44938, 0xe98937a5, 0xff94654e, 0x68c5bd7f, 0x5d2f0e9c, 0x9921faf3, 0xb3efb9a0 }, // Message 3 + { 0x3f48cabf, 0xe132eb41, 0xb667b5f2, 0x5eeb5d01, 0x19a45aa3, 0xfbc85e16, 0xefb7f1ec, 0x257c44f4, 0x42748fea, 0xa179ff56, 0xad41bd57, 0x81255837, 0x1a0b5abf, 0x8ac673b2, 0xf3d7d3e0, 0x87d1c550, 0x2ce6dfbf, 0xef0180f5, 0x38d7640e, 0x5ccee480, 0x137d1fe3, 0x277ce4b6, 0xf3c9d33b, 0x50f08d4a, 0x204486dd, 0xc0ee7491, 0x02f0498e, 0xa889fd95, 0xa9c9ca70, 0xbe7908a7, 0xb91752bb, 0x793fb266, 0xa4ee4f04, 0xdbc09f07, 0xd7918256, 0x442125d8, 0xef5f71cf, 0xf0e039f5, 0xc941d011, 0x9caf7342, 0xb35f98ea, 0x03d339f6, 0x06382af2, 0x446dcbcc, 0x3d897a6e, 0x4c068d74, 0x42178ccf, 0x5e7cb388, 0x5599e219, 0x35a54d36, 0x34542531, 0x148ac25e, 0x3c625dea, 0x9e04792f, 0x8f52631d, 0xa5850fc3, 0xed7d1df8, 0xf0f74d5f, 0xd9ca19f1, 0xb4b905a0, 0xdc63422d, 0xc79940b5, 0x15c9ef50, 0x8b5420cb, 0xcbca78e7, 0xc0445d46, 0x221957e7, 0x8bc6b9c2, 0x33f9273c, 0x5cf97589, 0xa537cdd5, 0xd0e7ef3b, 0xeced5007, 0xafefe7bc, 0x15175097, 0xcc357433, 0xb47118d9, 0x187aa821, 0x5a836ead, 0x752a9084, 0xfa8c183a, 0x945f1ca7, 0xc8dd067d, 0x36291bde, 0x9952ba07, 0xad96a131, 0x1b384d38, 0xc67e02ca, 0x7ba2c7d2, 0x2f24c5d8, 0xb46101b1, 0x14b46d2b, 0x32a00ad8, 0xe102d6ce, 0x49b2a5de, 0x11c2b100 }, // Message 4 + { 0x641a1236, 0x442fca06, 0xc9d6321a, 0x4e8e40d9, 0xd09062e1, 0x39acc384, 0x1e67a09f, 0x64f1a05e, 0x9a8f85a0, 0x1b7743dc, 0xae332434, 0x722ff5da, 0x60a66064, 0xef66977e, 0x186d71c5, 0xf5cc7d43, 0xb5519d31, 0x04fd1720, 0x99843778, 0x7eb8236c, 0x27ddb197, 0x0d5d6f2f, 0xff366f1a, 0xcbfd542e, 0x55d2b0f3, 0xf802f937, 0xa2ec467a, 0x54b7e7b0, 0xd3f81c8e, 0xf8cdc61b, 0xc1a1d69f, 0xca7fe5ed, 0xf4f4be5c, 0xeea0e672, 0x4d4b05c4, 0x129d4f19, 0xcf735cf2, 0x18598f50, 0xf3598afc, 0x3d773f1b, 0x148e63b4, 0x5ce0e393, 0x61a9b151, 0x25b45156, 0xa8e2ac74, 0x8b50dccf, 0x79f882ab, 0x839db8a8, 0xca0f3aac, 0xa708850c, 0x347ccbf2, 0xe8851f37, 0x5ed0479b, 0x225917a1, 0x147f4f16, 0x558b44b4, 0x08bdcfc9, 0xbc414a90, 0x8a67eb12, 0xca945a73, 0xfc30e27f, 0xe4b6185e, 0x245579be, 0xa505acd1, 0x2a875b92, 0x38cb59b4, 0xc84aaddb, 0xcd00b784, 0x4d4aa33d, 0x83ff8662, 0x58c0bace, 0x14d3cef6, 0x0bee7817, 0x459666b9, 0x940f4463, 0x91fa5945, 0xb7c7d1d8, 0x46ade57d, 0xbdde6e57, 0xfdd1d957, 0x12ec9392, 0x843982c4, 0xec47b3ba, 0x209cebd4, 0x19c8c859, 0x376548de, 0xa578fe6a, 0x0fc72259, 0x33f1fb58, 0x011b3853, 0x1be20ee3, 0xdb2132a5, 0x9625c273, 0xbb289e1a, 0xae09452b, 0x0deaa174 }, // Message 5 + { 0x673e9708, 0x05b60159, 0xcb967266, 0xca6b9a56, 0xefe0aa43, 0x1f3d4ded, 0xc3199cf4, 0x9b13c377, 0xcacdb49f, 0x068d4f4f, 0xb193d342, 0x23db8617, 0x803f7062, 0x306d8e06, 0xd3074f62, 0x124ad0ad, 0x781f5c18, 0xac7dd88e, 0x71906a56, 0x7b5ff9c0, 0x9bbc925b, 0x9b13b3fd, 0xc74ce7f5, 0x26236c7a, 0x3f4c6aa9, 0x90bcf0ef, 0xf161ce37, 0xff82f8c0, 0x719fa25f, 0x547901ff, 0x6b9cc3d3, 0xe56f6de5, 0xb87fdfeb, 0x727e8f60, 0xe8fb200b, 0x918329f6, 0x67d76d37, 0x1609d3f5, 0xd4bc764d, 0xd6ffe007, 0x2b546c1e, 0xe12c9ff3, 0x903da24b, 0x7e457b75, 0x36628d8f, 0xf749ecfd, 0x5e029903, 0x0e97b3ef, 0xd82994e3, 0x1dbbaad1, 0x14e7a694, 0x35285b53, 0x8f4a9091, 0x0d5d2d6e, 0x568eacf0, 0xc6dd56a7, 0x4cca123e, 0xefc5f313, 0x7f6bef35, 0x63cf95f6, 0xba6dd9eb, 0xeb33955d, 0x7aa3c476, 0x02bc1f84, 0x112dc79f, 0x8f09e158, 0x2e68dcac, 0x1f5c4fd3, 0x6d9da11a, 0xed4cb4c0, 0xbefb92bf, 0x51a1cf72, 0x87f99885, 0xf27b9cf3, 0xa72c2a30, 0x27286879, 0xf357d3dc, 0xe8430c6b, 0x2ee739eb, 0xb6e3b349, 0x4cd2a14e, 0x495f71b2, 0x6cc3c37c, 0x47748fc1, 0x875b7f5c, 0x0dac13bd, 0xaef4e56a, 0x7a48824b, 0xee236e71, 0x96c99803, 0xeedd9867, 0xa91e8077, 0xe84ca623, 0xfe3c5b70, 0xa55f485d, 0x2dd4c20b }, // Message 6 + { 0x0b06c9da, 0x4cd15188, 0x27915641, 0x8d179402, 0x9500064d, 0x518818cc, 0x85cecef7, 0x4b471b6b, 0xffb415fc, 0x474613ff, 0xd93a97c5, 0x33bd68d6, 0x1cc082f4, 0x183a5623, 0xd5ac8a90, 0xe61688ec, 0x166c312b, 0x32c11857, 0x4469b905, 0x4411f6b7, 0xba893cac, 0x2bfcedd6, 0x64d2414d, 0x45581259, 0xe8b69e7d, 0x882d5cc2, 0xb43c7329, 0xef4dd745, 0x62f9bc04, 0xb4d12d33, 0x3b90db0c, 0xa337e1d3, 0x39296b35, 0xe040b266, 0x9bdf5a09, 0x8e5cf5df, 0xcba7df3d, 0xe9572388, 0xae3ea401, 0xe9600bfa, 0x62cd137f, 0xf9f63491, 0x95d87fac, 0x119fdb73, 0xd558be3a, 0x92017586, 0xe11a554f, 0x4dc2019a, 0x2acb9f5e, 0x79f27b85, 0xbcf48ec5, 0xff4ce3d4, 0xd72f506e, 0x25952a04, 0x0089ff66, 0xc5eb2af3, 0xbea25a82, 0xebaa428c, 0xf1988559, 0xef6a81db, 0x2684421d, 0xe807a5d4, 0x5f5350c1, 0xc40f4718, 0xe585636c, 0x6712a2e3, 0xf5736a2f, 0xefcbce94, 0x2e4c4478, 0x1433d020, 0x3f6bbed0, 0xa298fe86, 0x20a254e6, 0x2d43d95a, 0x8525668d, 0xc93cb9a5, 0x2774c4a9, 0xa649aee0, 0x8249a6ec, 0x014b390c, 0xc5a8364f, 0x93dac9ae, 0x2ee706c5, 0x6b9b0ba9, 0x88494ce8, 0x692b0d2f, 0x21a3caac, 0x2a16de8f, 0xba42163a, 0x7f911099, 0x4f1f7583, 0xef6816ad, 0x11d7b62f, 0xe059d337, 0x029e43fb, 0xad96bedd }, // Message 7 + { 0x125c0216, 0x2a38cc49, 0xae5fb6ab, 0xbc9a3fa4, 0x8dd23ac9, 0xc338e315, 0xfaa1bf07, 0x86867363, 0x5a9154e0, 0x3ede1c02, 0x9d8b3656, 0x32f92b62, 0xc06a7892, 0x7c5a53e9, 0x0d279cbb, 0x6ff86c7e, 0x98363741, 0x920abf78, 0x3fb3d4ac, 0xdd2690c5, 0x6c998427, 0x642c709f, 0x7461b3af, 0x2a73fce2, 0x40b0ce56, 0x47f6865d, 0xd846050b, 0x3a23c53d, 0x74423bc5, 0xfac96032, 0xc5d7beef, 0x0aa9ffaa, 0xbf42933d, 0x9841bfe3, 0xbee7577a, 0xe3ea0a75, 0xb8c98050, 0x1ded6eb4, 0x0a48ea14, 0x17e65029, 0x9fa0f651, 0x3824aadb, 0xee43b619, 0xc1894aec, 0xe8590fdb, 0x0b784a9f, 0xe8cb6a14, 0xc4f47449, 0x57f7c3a2, 0x6e19b551, 0x1dad6c7b, 0x5389b88c, 0x33d8d9ae, 0x05afe038, 0x28466f96, 0x31c5eddc, 0x6541c962, 0x95b2de5e, 0xa6fdffc2, 0xb15e93ea, 0x0553ffd5, 0x1ad4afc4, 0xd2fd7102, 0x09e40a6c, 0xbfc6a5a1, 0x41ca1dfc, 0x37f09919, 0x0c01f809, 0x4096f505, 0xa7c27a7d, 0xe9082b73, 0x73fd7007, 0xdced3262, 0x46efbff3, 0x8682ced3, 0x9546b182, 0x0038b42c, 0x498e68fc, 0xd0b4252c, 0xa61ad839, 0xd26a4b61, 0x184e0e29, 0x975fc404, 0x0bcec781, 0x23d870bb, 0x1a2ffb42, 0x97c02bd0, 0x3c50984f, 0x78fc3ce9, 0x07db579a, 0xb74ce45a, 0x108be2b6, 0x3e002d5a, 0xd91cd1aa, 0xb6ce7a25, 0xc49dd643 }, // Message 8 + { 0xe9d3cbe9, 0xb1ea952e, 0x8c0ed244, 0x6bbe76ff, 0x08f6a337, 0x30acd50b, 0x713c043b, 0x6c199435, 0x253fda83, 0x69cad8cc, 0x97fbcd79, 0xbac98340, 0xe1d172ca, 0xa0bce93d, 0x08070e35, 0xda5d354e, 0xc9f12d03, 0x4cf1e6b1, 0xeaa1f0f9, 0x866cffcd, 0x88caa2f1, 0x282e655c, 0x8ed45770, 0x8cb28b01, 0x3c608d81, 0x4d42d1be, 0xd8a4a53e, 0x263d26de, 0x41b45e6f, 0xadf6415b, 0xa02c7965, 0x34c5b885, 0xe481bdfa, 0xd2974004, 0x27be3240, 0xe860b2cc, 0x1e4b6c34, 0x794b5f84, 0xf676dc4e, 0x5a280bc4, 0xa7f09dd6, 0x4e5a4f50, 0x78b9ba94, 0x040f1179, 0x173c1da7, 0xaf6ef39d, 0x94afb20d, 0xf868e096, 0x14e422d7, 0xbbb33d78, 0x85549504, 0x6699263e, 0x15b28dbc, 0x3cea7407, 0x6ac47cf2, 0x5399a971, 0xe1638190, 0x4dd4fa87, 0x9697ebb0, 0x756c17c5, 0x4b2a9c36, 0x183d8239, 0x78a9e0c1, 0x15998ed1, 0xadd6be1d, 0x32aeee95, 0x1ffedd99, 0x090553b6, 0x36474687, 0x6fd609fd, 0x422cc2d8, 0x54bfedf4, 0x98b93ba2, 0x462150f3, 0xa31a469e, 0x9f7f636c, 0x5d6012b0, 0xfd95cb2c, 0xe4909ff6, 0xe49ff27b, 0x27e1a1bc, 0x73290f67, 0xc6e43a1f, 0x48227646, 0x5c5bfe4a, 0x2979375e, 0x527d6659, 0xe0eabf49, 0x9cf14c0c, 0xcf3e9985, 0x50445e40, 0xe041389c, 0x498630df, 0x670d26bd, 0xc2ade384, 0x9b4c1653 }, // Message 9 + { 0x1cc6ba26, 0x0e7756e7, 0xd6a016f6, 0x2370930d, 0x4c96a62b, 0x07088df9, 0xc62bd0c6, 0x117ac64e, 0x64021b8f, 0xb9b34536, 0x6e211947, 0x9e5b5adc, 0x707108fa, 0xc1ae745c, 0x14fe842e, 0x66ebe017, 0xfd99a725, 0x4dfd484b, 0xdc8f69bb, 0x6f47777e, 0x903a3203, 0x02c6e04b, 0x3204650f, 0x6e933828, 0x004a6ccd, 0x6a7278ad, 0x2ad9be64, 0x40d4758c, 0x73c71314, 0x8dfeea2b, 0x304774f9, 0xac936a3f, 0xfbc0d9aa, 0x2832b6c4, 0x055df478, 0x3217bffd, 0xf6e60b49, 0xb8edec60, 0xee1a927b, 0x597e16fc, 0x92a3c496, 0x6c94954d, 0x23ceb621, 0xab1f5efc, 0xcac411c3, 0x183046ba, 0xa17163db, 0x181bfe85, 0xa1521e27, 0x5a6482d7, 0x3aef85d3, 0x9b34756c, 0x0b18c1ae, 0x7ce044af, 0x410dc013, 0x8e453a12, 0x23e7130a, 0x060be370, 0xe56f5185, 0x4a7da34d, 0x05e6b797, 0x3fac2cc7, 0x9974e726, 0x0f661205, 0x30445e0a, 0x34f5884e, 0xa2aba24a, 0x90b9a90c, 0xd027c62e, 0x9c217a5a, 0x470d6585, 0xa0145795, 0x4b227351, 0xd08ae822, 0x6c8e5a23, 0x14d2ae93, 0x7372aa46, 0x4edcad0e, 0x1e2e3ad6, 0xe90b4f3a, 0x3fa50466, 0x6cd1ee94, 0x99da9419, 0xd5eaf5f2, 0xf6f61662, 0xe275da8e, 0xc7bf7d15, 0x3f1de288, 0xb113d05a, 0xb2278268, 0x64111935, 0x56c36edd, 0xc3976fa7, 0xc029f35d, 0x6f06a172, 0x5c84a5cb }, + }, + }, + { /* Case 2 */ + .iv = { 0x56, 0x3b, 0xc1, 0x5a, 0x62, 0xcf, 0xfb, 0xc5, 0x8c, 0xfc, 0x2a, 0x0d, 0xb8, 0x77, 0x0d, 0x7c }, + .p_data = { + .Y = { 0x96464501, 0x786e0f50, 0x5156c737, 0x3414fba0, 0xd1867963, 0xb4ea4fcf, 0x588bee90, 0x42199bca, 0x7db378d3, 0xdc5c1742, 0x4d8d29a4, 0x411bb4f0, 0xe684b248, 0xa5f43318, 0x4dab1c1c, 0x41765d8e, 0x02e0b169, 0xd2bfeddf, 0x209f5b76, 0x23e9d097, 0xc7b4cbe6, 0x3a442cfd, 0xc88e5c35, 0xca04575a, 0xa1844add, 0x5efb2b7a, 0x867eaa5d, 0x7954c058, 0x26a83a80, 0xa49c7ab5, 0xed50f6ba, 0x7b05235a, 0x9f0602a5, 0x1c24852a, 0x94eece3a, 0x7ba3884b, 0x15560697, 0x6aedf3c1, 0xc042ec32, 0x3f83ff5f, 0x94252db8, 0xdac29c5d, 0x8462fa39, 0x7747f6bf, 0x1c95f2de, 0x01912a8a, 0xd76ca7ea, 0x4b89f285, 0xaefeeca9, 0xd5db0979, 0xed531c5d, 0x91164867, 0x1162b3ab, 0xd46944cf, 0x1c4fe5ec, 0xdc6b05be, 0x843ca8af, 0xdd4f37a7, 0xe5ba6d9a, 0xf8735498, 0xdca3b2f5, 0x3b2f519b, 0x1c32c3e4, 0x995ca936 }, + .M = { 0xe799fe75, 0x8e75f4bc, 0x18291cd5, 0xab929bb1, 0x4f6a8e5d, 0x3b7c4763, 0x50c8f902, 0x908b29dc, 0x580f8b21, 0x58c2e4ce, 0xfe1b99e3, 0x7b29ee83, 0x808f3d99, 0xa4da03b2, 0xbfc9f648, 0x39f86580, 0x611ceda5, 0xcbeac59a, 0xd55048a0, 0x8c89024c, 0xf72d1b77, 0x6e2bbd0c, 0xd8d3ac6c, 0xf0abb46b, 0xfb5cbe4a, 0xc0992c51, 0xc79307bb, 0x545a5879, 0xd757f2d1, 0x6cfd1252, 0x5af08dc7, 0x0cf18767, 0x5fcd5abb, 0x9f87f320, 0xa4ff872a, 0x1de80a26, 0xd48e9680, 0x885732f3, 0x73c78280, 0x0bdba0b1, 0x96b3c183, 0x9cecad28, 0x3d2ffacd, 0xb3c0f07b, 0xf998b9bd, 0x1d7dacc9, 0xe36d664b, 0xedbef9ed, 0x08431e80, 0xc7d49eab, 0x93c8cfad, 0xa172fdf8, 0xa2175944, 0x48b3ed65, 0x0429b91c, 0x4960000c, 0x38ff4512, 0x68070e66, 0x16246f63, 0x41aef4e5, 0xb6e10daf, 0xe53c97c0, 0xc3933ac8, 0xc9c7c711 }, + .Rb = { 0xdaf34cbf, 0xe10eeaaf, 0x64bf581f, 0xaebe5724, 0xab0bb94f, 0x85e4fff3, 0xbc8c2b5b, 0xcacb94bd, 0x6e20d65c, 0x8d425537, 0xf89a182c, 0xea8d9374, 0x8a8a08f0, 0x6a1201c7, 0xb13f6ea2, 0x9cd3987f, 0x57de4856, 0x292a233e, 0x6010b31d, 0x7747d940, 0x50df6d97, 0x1be82fed, 0xa5cb77b1, 0xffe45d64, 0xbe8c4809, 0xf528c435, 0x09f6eef1, 0x7429f1c7, 0xca2b1973, 0x0b0e8b4f, 0xb97241b1, 0x830b035e, 0x11fc7f3b, 0x41f13f82, 0x4978b8e3, 0xc7526f69, 0x47db512b, 0xe5693bb9, 0x090db86e, 0x334a5b26, 0x2990a886, 0xc3233d6c, 0xa0ceef03, 0x15b8538f, 0x6af0cdba, 0x378473e0, 0xadd6d072, 0xf4c831e6, 0xe4e04c69, 0xc2a9b0df, 0x70ef3199, 0xa4621f85, 0xb5614255, 0x7eaf86af, 0x2a6a553e, 0xd6133c99, 0x57422b74, 0x120d1b0e, 0x892462ca, 0x75906ef1, 0x07b7d512, 0x22f2619b, 0x41f03a05, 0x31f0fd1c }, + .M_prime = 0xce8e9e23, + .length = 63, // 2048 bit + }, + .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 0x91, 0x66, 0x63, 0x44, 0x30, 0x2f, 0x4a, 0x6f, 0xaa, 0xaf, 0x9f, 0x37, 0x11, 0x9f, 0xb2, 0x1d, 0x24, 0xd3, 0xab, 0xea, 0xa0, 0x4a, 0x44, 0x75, 0x93, 0xad, 0xdd, 0x89, 0x0c, 0xd3, 0xb0, 0x0b, 0x4e, 0xab, 0x96, 0x79, 0x52, 0x24, 0x84, 0x1f, 0xc6, 0xc3, 0xb7, 0x6c, 0xf5, 0x03, 0x55, 0x33, 0x67, 0xa0, 0xc6, 0xf4, 0x08, 0xd1, 0x10, 0x79, 0x82, 0x64, 0xbe, 0x36, 0x6e, 0xb5, 0xd5, 0xcd, 0x72, 0xf1, 0x19, 0xf9, 0x30, 0x7f, 0x79, 0x09, 0x61, 0x24, 0x15, 0xfd, 0x1a, 0x3e, 0x49, 0xa0, 0xb9, 0x58, 0x97, 0xb2, 0x5f, 0xdf, 0x7a, 0xf4, 0x31, 0xcb, 0xb0, 0x8c, 0x33, 0x2c, 0x13, 0x3d, 0x8c, 0xe3, 0x79, 0x08, 0x66, 0xa0, 0x2d, 0xad, 0x3d, 0xeb, 0x82, 0xaf, 0x9c }, + .hmac_key_idx = DS_KEY_BLOCK_1, + // results of message array encrypted with these keys + .expected_results = { + // Message 0 + { 0x49250367, 0x223e05ec, 0x236a3106, 0x039643fd, 0x90043d2a, 0x0aac40c8, 0x34f693ab, 0x6b5afda8, 0xb5ddc3de, 0x32fa592e, 0x1e61619e, 0x8f28f70a, 0xbd2e7743, 0x84fc7709, 0x1acbcb72, 0x5043839d, 0x86b3105a, 0xed47d9a0, 0x50da66c0, 0xebfc5d93, 0x2295e705, 0x1a6b62e4, 0xa9f16862, 0x95a2cb5d, 0x2e840c12, 0x78784e1d, 0xa008eff2, 0x63fd629f, 0x2e492a37, 0x00fcc1d8, 0x6bf6f354, 0x25665c0b, 0x62dbba8e, 0xf5b0c71c, 0x745a3e91, 0x3ac48470, 0xf53ca24f, 0x012f09fc, 0x3318ad13, 0x0ed89270, 0xf13f7ccd, 0xc8463b8c, 0xdb59027d, 0x16e5f0f9, 0x6df47a4a, 0x69413f62, 0x94af9430, 0x1958aac0, 0xdb1cf99c, 0x3d917432, 0xe8f9dce3, 0x906463bd, 0x0f084605, 0x377b1b40, 0x9db1ce8f, 0xcb78b6ad, 0xb83a1a77, 0x3cc75aa9, 0xbd6a7e31, 0xd66cf2d1, 0x2cb06253, 0x133a667e, 0x1a237e6e, 0x1388df8f }, // Message 1 + { 0xf93c60dc, 0x486541c6, 0x92219fae, 0x0cad6c8d, 0x49edf5f2, 0x4796b929, 0xcb8ed982, 0x02f38196, 0x2f1f8668, 0x65444d8e, 0xcb21a501, 0xc9078acc, 0x1f776f93, 0x22b7c745, 0xb9dc17d8, 0xdcf59598, 0x4d205da2, 0x20006e97, 0xb9e60ca4, 0x638b8531, 0x3cba2018, 0x2972eee8, 0x0df43a5a, 0x4046e476, 0x556c78dc, 0xb0c322ac, 0x85785e08, 0x0cc2426d, 0x0a439f48, 0xb5f566e3, 0x5b835bf0, 0x9bad5cc9, 0xd4ec0ca5, 0x3e90666a, 0xdf48539f, 0x1f16dea8, 0x134e3935, 0x11bfb72f, 0xf66715ec, 0xf4ddad53, 0x954cb62f, 0x8cd6311e, 0x5fc447e9, 0x7dc30657, 0x1409fec0, 0x69102142, 0xa1d0d9e5, 0xa0981307, 0x2c4a9847, 0xfc3e9014, 0xe4c5345c, 0x8279ba5c, 0xdd5072c4, 0x44b5391f, 0x30c9f8a8, 0x5100d8c8, 0x1de1eec1, 0x1d3b315a, 0x3054db23, 0x81e9963d, 0xba57923e, 0x34c47686, 0x51b8ed34, 0x8550746c }, // Message 2 + { 0x95af51cc, 0xa56a6c39, 0xa5fac474, 0x32ee3574, 0x5ef7979d, 0x151d6891, 0xa1bec650, 0x54337154, 0x903e3628, 0x499c751d, 0x76163d37, 0x2df23770, 0xd7d7a86e, 0x457e3eef, 0x95a4e128, 0x69e5977a, 0xed460985, 0xd13ff0f6, 0x6cd33014, 0x330f694d, 0x48c9b70c, 0xcd1581de, 0x59aef213, 0x87c973a2, 0x63a54a55, 0xc0ef37bb, 0xf3526357, 0xa503cb2a, 0xa3b1d1f3, 0xc818a48a, 0x033ba4c6, 0x7192d05c, 0x804da2ee, 0x28021be1, 0x918cddbb, 0x9fd04445, 0xcc58ba79, 0x9e159615, 0x74b27132, 0xc45cd0b2, 0xb6dc6a16, 0x5d9d448f, 0x0c808f2c, 0xe92f2c44, 0xa202a48c, 0xfaf57df7, 0xbf884580, 0xd43d5df6, 0x93a952c2, 0x8dd2da38, 0xd48b9d95, 0x59325bc5, 0xa3b915f8, 0xa3175aaf, 0xcdf45fc2, 0xc989e5cf, 0x5b56d793, 0xeac73628, 0xbf2c8284, 0x9f9f2411, 0xd23df80d, 0x08bb046c, 0x4e222cbe, 0x4892eea2 }, // Message 3 + { 0x2bcc8348, 0xe8e9a108, 0x7edb4886, 0x31c9d055, 0xd4bd6aa0, 0x727160c3, 0xaa4628c4, 0x7b6799aa, 0xf80fc2a9, 0xc83a4581, 0xfad80e05, 0x69d360f3, 0xb46ba0aa, 0x3bebf640, 0xa078e6f8, 0xd9d1c05d, 0x67cd08fe, 0x2507319f, 0x871d2711, 0x1d665776, 0x80970e20, 0x342a6269, 0x5d1c88d3, 0x79b23450, 0x1db17b92, 0xbf99fc3a, 0x286f0cb6, 0xdc7a87bb, 0xa2f846b2, 0x85f3e429, 0xcee5337a, 0xf830ace1, 0xc8af1f36, 0xe40cb208, 0x5248cd9e, 0x99305e9b, 0x3cd76b1c, 0x833cae1c, 0xfe846a7a, 0xab76863a, 0xb266d518, 0x53fa2463, 0xe7b42c45, 0xed9b9555, 0xfad7afd0, 0x0b734ee8, 0xb82438a2, 0xadd4c3b1, 0x52832f3f, 0x55e7498e, 0x84f92417, 0xf1f04308, 0xd04374ab, 0x5bdc0249, 0x0a95e342, 0x6b1514f7, 0x56883eb8, 0xdb46a3eb, 0xa573fbed, 0x93bad740, 0xadb9bdb3, 0x5a4db433, 0x79ae9bbb, 0xa66a46e3 }, // Message 4 + { 0xa4bf6899, 0xf5896ab5, 0x28291d49, 0x4f122ab9, 0x7267fb0c, 0x2fbb18a7, 0xbe4f71ac, 0x68449c16, 0xe4e98f31, 0xf2cbba4e, 0x537caad6, 0x342eb897, 0x5fbf9290, 0xd0a7067f, 0x4245557f, 0x0852baf6, 0xb59edc95, 0x6f37f0c7, 0xacbe95b8, 0xf7fbf6e5, 0x2253b689, 0xcddf28b1, 0xc551eb52, 0xbbc94fff, 0x3c816ef8, 0x5a951f22, 0xd417dae7, 0xec90bc0b, 0x1979ec22, 0xfb95d654, 0xbb3bd8ab, 0xafb07eaf, 0xa751e478, 0x2d527447, 0xa47465a0, 0x21356b70, 0x948043e6, 0x6a11044b, 0x61f30e37, 0x3717e8d9, 0x4ed1f3b8, 0x583bf989, 0xfcb15635, 0xacb520c1, 0xb9599f19, 0xd0befe91, 0x2dbc347e, 0x23f51388, 0x9f2cdc68, 0x39bea045, 0xb21efe8c, 0x857ade32, 0x2115e30a, 0x3f38a23e, 0xedb9f5c4, 0x08b0c13d, 0x08e00e7b, 0x318c4a82, 0x50a2b0f7, 0xe9889c07, 0xf8621f05, 0x253c1a97, 0x581ed775, 0x71895842 }, // Message 5 + { 0xda588f90, 0x7fc5f0de, 0x868529f6, 0xbb94d3a0, 0x934b5396, 0xf708be09, 0xfa2bcb40, 0xde70cc2c, 0x1e6585db, 0x91546ec5, 0xed186173, 0xda22c913, 0x3b51ba96, 0x767f64ba, 0x58b5d3cb, 0xce96a53b, 0xe9e65bb7, 0xe490accd, 0x8b9c0088, 0x759df710, 0x557a7a8a, 0x23738c7d, 0xb8880d68, 0xb23092e2, 0xecce9455, 0x06c7f10a, 0x7ce960b8, 0x029a2178, 0x518f9ba9, 0x42e441cd, 0x50e3f22e, 0x93092d49, 0xc2a0fe82, 0x2932e731, 0xad606c81, 0xd35af42d, 0xd79ea3a8, 0x514584c1, 0x348f21d1, 0x65c7d980, 0x6656881d, 0x59bbfe3f, 0x2c9853e0, 0x26c8835e, 0xa18bcff0, 0xdc94d7d0, 0x7d0ab137, 0xb2f280b0, 0x75875db5, 0x520e2e18, 0x0a79b614, 0xf3938392, 0xbfdabc9e, 0x76e1211d, 0x02c0a97d, 0x14d021d7, 0xa901f427, 0xaa976834, 0x5a2e42f6, 0xa3eacba0, 0x33a2931b, 0xdea99739, 0x5f0d1759, 0xa01316d7 }, // Message 6 + { 0x5d6f3d9c, 0x41079187, 0xd491e278, 0xf6e4c86a, 0xe55c3381, 0xd393eb03, 0x0471ae74, 0xdbdd383e, 0xaf579429, 0x94637bfa, 0x14862f4f, 0xa58a3b93, 0xc35ea5ef, 0x5f0de2f4, 0xe6c2a0d1, 0x949449fc, 0xf0f2c31a, 0x0ffad251, 0x6e005487, 0xa7f3f6cd, 0xba4a846f, 0xa49086d3, 0x5d9edece, 0x099d64c1, 0x24064f82, 0x2d1736ea, 0x6cea5361, 0xbf97aff8, 0x60989760, 0xd9e74c31, 0x349ebfc6, 0xe9920c52, 0xc4c4b082, 0x3ad314e1, 0xe5abf591, 0x166b097b, 0xe6b686b8, 0x85f79ab3, 0x206deb9e, 0xed54a3bd, 0x36e3cc6f, 0x7d839ed7, 0x81e26900, 0x20e0ad10, 0xa77967ce, 0x8a9f84b7, 0x1b33e82a, 0x49cbf2a5, 0x0279db93, 0x4d778e49, 0xecd1af58, 0x83539324, 0x0b11a5db, 0x8a1f27e4, 0x61f539fa, 0x317d68b3, 0xede9ef7c, 0x4392cfcf, 0x68493e17, 0x0045944c, 0x1786b566, 0x20958881, 0x373bd388, 0x65d37d26 }, // Message 7 + { 0xd3bde9e6, 0xa57dc31c, 0x9124efe3, 0x48b33f1e, 0xae7fab80, 0x02cf600d, 0x8887f934, 0x9608cb7b, 0xfa5dc8f6, 0x1ccf1980, 0xa53a73c4, 0x8fd5657c, 0x1afa2dc4, 0x0c167611, 0xd8ee01ab, 0x145020b0, 0x06d60ed6, 0xaff7acde, 0xb5e41331, 0x9bce2ed8, 0xd8c3ce5f, 0x830ec28b, 0x9340206d, 0x6a400341, 0xb19128f9, 0x2b0a8ece, 0x2cb059fb, 0x7fb3fbb1, 0xa9702a3b, 0x8c7e4f62, 0x434f7ecb, 0x88d6aa1e, 0x10e3f024, 0x72438c62, 0x4403348d, 0xe43e7962, 0x19d8307a, 0xe360be64, 0x1dcc14fb, 0xd468ed7a, 0xdf22198e, 0x48b7c193, 0xaa183f77, 0x02f08b4d, 0x3f0b8951, 0x4ecf53f1, 0x6e34c59b, 0xbb0af7e7, 0x4c4e5f20, 0xd9d9528e, 0x761f7be6, 0xf6d96e7f, 0x6cceacd0, 0xfe5e0c06, 0x0de869cb, 0x76dd5cba, 0x2d1c5e29, 0x84fe071e, 0xad96421f, 0x7006bfed, 0xc1446ba4, 0x012d11c6, 0x38c57992, 0x59766787 }, // Message 8 + { 0x5a1af4e7, 0xe37c6a65, 0xa7818fb6, 0xc137ba2f, 0x2dc002f5, 0x5c2d362d, 0x0863073a, 0xd74e27b7, 0x0deaec8c, 0x3a041309, 0x5ec383b5, 0x4e7e5446, 0x8236d27c, 0x1ab06bab, 0x08ec1002, 0xedf6cb2b, 0x6a30b850, 0xd9dedbb8, 0x8ac220c1, 0x1b87ec58, 0x8c55f115, 0x2829ecda, 0x11b4445e, 0x2a35a31e, 0xaac438ce, 0xb5731aca, 0x36fb003c, 0x34b9f2ec, 0xcf6fc098, 0x450dafb6, 0x6807491a, 0xa82d5440, 0xb46d9c55, 0xc3b4cfa3, 0x9ddda5fb, 0x55f6e50d, 0xcdf3b551, 0x446a78c6, 0x67c6a7b8, 0x389447a2, 0xede898f9, 0x0cdf84bf, 0x78669e91, 0xb9d74cd1, 0x7e28242b, 0xde7a9ee2, 0x94bf6106, 0xa4597461, 0x69e8b2b9, 0x932cf68d, 0x6d56fae4, 0xabbb1103, 0xc1478340, 0x2ee55b73, 0xd98a09ec, 0x3c41deb2, 0xfdf109c1, 0xcd2129c8, 0x7e25e9a0, 0x1e3f837e, 0x64afa918, 0x11f11232, 0x56c22d35, 0xc96345da }, // Message 9 + { 0x18ec7c18, 0x82de9be7, 0xf0bd0776, 0x80d93889, 0xc7c20ab9, 0xcbedc9ff, 0xfdf533df, 0xf51bada0, 0x6a7448d8, 0xb53fca55, 0xc7ff0037, 0x1c658ed5, 0xc4403f58, 0x23da4d71, 0xc453c05e, 0xb2abf7ba, 0x6415c335, 0xba6f98cf, 0x5de8ab10, 0x82c4d0a7, 0x7eceae99, 0x9947ce99, 0x097290d5, 0x9539d658, 0xf9a48bdf, 0xcd9f2dab, 0x153c933b, 0x1a790d41, 0x9456a5cf, 0xdafae171, 0xf663dc8c, 0x41297d88, 0x5117dbf2, 0x1a1b6ca0, 0xbb1d54a1, 0xbdf7face, 0xa8016018, 0x6194d0e3, 0x7e35d377, 0x1c1d477d, 0xc9822385, 0xbbdb0f0d, 0x5b5e4b0e, 0xd1a14271, 0x3bed8fd5, 0x04fcaadd, 0x4ba4eb22, 0x9d60891c, 0xb32a7d01, 0xe3b68bed, 0x95b00333, 0x858a5d08, 0xe0f35109, 0x2113a3d4, 0x7fd2874d, 0x47b80f75, 0x5729eac6, 0x9fb93b0e, 0xaa65a597, 0xef3d72d4, 0xd91a3587, 0x1edfd0aa, 0xf65b3c2f, 0x16badb1a }, + }, + }, + { /* Case 3 */ + .iv = { 0x4d, 0x39, 0x4b, 0x5f, 0x64, 0xd7, 0x95, 0xaf, 0x88, 0xe4, 0xab, 0x73, 0xe9, 0x4f, 0x16, 0x5a }, + .p_data = { + .Y = { 0xb338c1c9, 0x8067b3a5, 0x52a0dfdd, 0x33e05415, 0x30912994, 0x418af50a, 0x2aa6cf30, 0xa76ddb96, 0xbe03c020, 0x19485a62, 0x44a9c82f, 0x3a4ea0f4, 0x29e8ce3f, 0x9f77bcc3, 0x8ac5a934, 0x21d999e0, 0xad9dc793, 0x705b9692, 0xf11b5b64, 0x40f39af8, 0x8f6a8c5d, 0x55ad72b5, 0x412a1151, 0xd0ead3e8, 0x9d1028fc, 0xd4c3a930, 0xa9acae1e, 0xed732262, 0x4cd52629, 0x91c4cdbd, 0x33f7bed7, 0x6e6c8203 }, + .M = { 0x3398b9a9, 0xe004f59e, 0xe293ab68, 0xfe9508d0, 0xc419416e, 0xbc1955f6, 0x8f963035, 0x628c7a2f, 0xcde5f08b, 0x430c457c, 0x708b5823, 0x5024e5f3, 0x55adf617, 0x393ee334, 0x8d8c8f09, 0xd608e46c, 0x80ff13f7, 0x7dbc8407, 0x727ede3c, 0x7930b272, 0x3c7b43ef, 0x00a9c471, 0xa5a6a9cf, 0xbce8732b, 0x03eead94, 0x945169c2, 0xfd1d6f05, 0x8c471354, 0x37eeb506, 0x5324ef4d, 0xc8348330, 0xa63818d5 }, + .Rb = { 0x7265b9fd, 0x78d90d73, 0x86061d2b, 0xb4f3cd24, 0x6d53f461, 0x5f2b8893, 0xf05faf7b, 0xc4a52a02, 0xbfd629e1, 0x9ea05cfb, 0xdc73e38c, 0xd8cc030d, 0x824966fd, 0x0a3c9e0b, 0x0887b000, 0xe54bd673, 0xe34ecada, 0xe5991711, 0x33f0a439, 0x8c047ecf, 0xe81262cf, 0x135fc37a, 0x7d6c72a8, 0x8501a8b0, 0x8f1fc453, 0x5032b172, 0x95474942, 0xa2ae96a8, 0xab241f12, 0x6d63962f, 0xf39293b7, 0x0a94759a }, + .M_prime = 0xd8a50567, + .length = 31, // 1024 bit + }, + .expected_c = { 0x5a, 0x60, 0x69, 0x68, 0x29, 0x96, 0x85, 0xb3, 0xba, 0x39, 0x9d, 0x2d, 0x82, 0x39, 0xac, 0x5e, 0x41, 0x70, 0xcc, 0xb7, 0x80, 0x57, 0x4f, 0x9c, 0x32, 0xb6, 0xdf, 0x76, 0xe0, 0x55, 0xa2, 0xaf, 0x23, 0x03, 0x55, 0xb2, 0xe5, 0x42, 0xf6, 0xa3, 0x08, 0x5d, 0x8e, 0x72, 0xd9, 0x24, 0x4e, 0x0e, 0x60, 0x01, 0xcd, 0x9b, 0xe1, 0x39, 0xa8, 0xb8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xce, 0xaa, 0x15, 0x4b, 0x9b, 0x01, 0x8d, 0xd8, 0xff, 0x50, 0x93, 0xd4, 0x9b, 0x4b, 0x6b, 0xac, 0xe4, 0xe4, 0xf8, 0xe7, 0xde, 0x11, 0x55, 0xdd, 0x3e, 0xdf, 0x95, 0x61, 0x17, 0x59, 0x39, 0xb5, 0x4d, 0x29, 0x9f, 0x1d, 0x1d, 0x47, 0xa5, 0x86, 0x28, 0x0e, 0x49, 0xda, 0xd0, 0xf1, 0x7e, 0x41, 0x52, 0x40, 0xae, 0x83, 0xe1 }, + .hmac_key_idx = DS_KEY_BLOCK_3, + // results of message array encrypted with these keys + .expected_results = { + // Message 0 + { 0xba72e92f, 0xae10df70, 0x5bca3cd7, 0x6f04225e, 0x7d00b5fe, 0x76636818, 0x735c0bcb, 0xd9c0a2f3, 0x95fc03cb, 0x718358cf, 0xdb1d125c, 0xfa75964a, 0xcc15b01d, 0xd6a7be53, 0x4cce1454, 0xfbfc6367, 0x1d368629, 0x412dc330, 0x77bff74f, 0x0778de39, 0xde435343, 0x4fd119cf, 0x09b03a17, 0x1646d9a4, 0x842792ff, 0x11d79d7c, 0x665a863e, 0x9f73563f, 0x6bb67178, 0xeb86aa6c, 0xbf8e8e48, 0x01a8d767 }, // Message 1 + { 0xc1c56630, 0x9d4cfbd6, 0x5d0c0e26, 0x2e2fdcf2, 0x7f4d4c2f, 0xc7d3ba31, 0x9b4c5947, 0x972bea0e, 0x50d8c701, 0xe7480b9c, 0xe5958dcd, 0xe90cd25f, 0x4ccd89ce, 0x2361da6c, 0xf23e79e9, 0xd4e9214a, 0x97e3888b, 0x1a47d051, 0x555dbfeb, 0x366afe71, 0x2ac64722, 0xc8bf47d0, 0x6749c7ab, 0x13234bc6, 0xca154ad5, 0x9041f2a2, 0xf48b17be, 0x647f92ae, 0xe9224a6f, 0x5680bd1c, 0x6f5512cb, 0x2b1c7048 }, // Message 2 + { 0xa2977003, 0xd6e9b4da, 0x07b95635, 0x87991e87, 0x7182ef05, 0x62a6944c, 0xddc01bd2, 0xb0829257, 0x6761e7e1, 0xd4bf505e, 0xe7352707, 0x0098f9b4, 0x03b47ad3, 0xf35a66f2, 0xe98ce33b, 0x9595952f, 0x7c3edce8, 0x04398454, 0x83103ce5, 0x998a2a52, 0xd0958b7e, 0x44ea25c1, 0xf3d014cb, 0x79a16fa2, 0x3d124088, 0x4877d6c1, 0x10d51185, 0xa6efc61d, 0xc1145c15, 0x7c96e140, 0x4193064e, 0xa5f7909b }, // Message 3 + { 0x864f2c69, 0x97195cb9, 0xd8e1b427, 0x67617eee, 0xd3b9f6b5, 0x21b3c45e, 0x5e1fa103, 0x007ff8bd, 0xf390f594, 0xe0cc5d88, 0xa33e4dd7, 0x3be82420, 0x8ebb3666, 0x0acfe045, 0xf7cf562d, 0x0b45c08a, 0xb07adcc7, 0xe08e7b43, 0x6b4d1ded, 0x5f455255, 0x5a62e11d, 0x9ba5cf08, 0xebe4bbe9, 0x3f224968, 0x2899388d, 0x1ed06a6d, 0x673439db, 0xed018c95, 0x97a5f184, 0xdac94ee8, 0xb300bd6d, 0x4f5d8901 }, // Message 4 + { 0xe813a6e9, 0xf8623ece, 0x606d6f56, 0x011b4d25, 0x253e2eda, 0x8e8976b1, 0x35539708, 0x4f7fc2b4, 0xcf49ac33, 0x00db8b47, 0xa8c11748, 0x3fed9d93, 0xcfb60a60, 0x8634cb77, 0x2d927735, 0xf6fac4d4, 0x38b444c1, 0x75b3dbaa, 0x4685dc9f, 0x84d87a81, 0x32ebad0f, 0xb90a1d5a, 0xca174ccc, 0x1461733e, 0xed5de1cf, 0xab125242, 0xe96c9f99, 0x0f6adca9, 0x745efae6, 0xf23a814c, 0xbeff6914, 0x54137808 }, // Message 5 + { 0x82ded2bc, 0x595f0fb7, 0xe83f6022, 0x95d1d131, 0xc0f0951a, 0x625ab669, 0x000413a9, 0x924f0a65, 0x4ccbcf64, 0xbd3a1add, 0xc220053c, 0x373376b2, 0x5536dc78, 0xa68790f9, 0x1598c8fe, 0x70c47c05, 0xef79b99b, 0x493c273a, 0xd68da949, 0x0c8a939a, 0x1725d6cc, 0x9d811bb0, 0x451664f7, 0x9f0caa28, 0xc12a02bd, 0xdf5eb10a, 0x72f76059, 0xe7adb519, 0x4cfd1f4b, 0xe906aab0, 0x875fffa3, 0x21de0263 }, // Message 6 + { 0xd1dfe4b8, 0x4fe33710, 0xaff420d1, 0xb17e0316, 0xe2dddf0a, 0xd5bb0e95, 0x77269d33, 0x30221c42, 0x78a95629, 0x12656b4a, 0x856115c8, 0x77f54093, 0xe4d4b1fe, 0x9e4f4619, 0x631102dc, 0x76bf9be9, 0xdb148371, 0x914e1715, 0x82652047, 0xb30a16ff, 0x28e2d7c9, 0xf917308e, 0x467e65c2, 0xc2cf2b3d, 0x7d717ee6, 0x1dcd4a9e, 0x8a5e8a3d, 0x38d72800, 0xd07673be, 0x1bdf65fc, 0xf81f3c8a, 0x9c2e0d34 }, // Message 7 + { 0xf3e4c4ad, 0x74912017, 0x7a37d474, 0x4c51f003, 0x9f0fcc31, 0x8ee33b4f, 0xe6b28d72, 0xe4234f2d, 0xab7d56fc, 0x2903a668, 0xdf4dd82f, 0x22df0964, 0xfc520d2d, 0x1f8f162e, 0x953853a6, 0x854d9d13, 0x17793a8e, 0xbbb6a63b, 0xb933d590, 0x58617cd6, 0x25ff965b, 0x69782821, 0xf42953ef, 0x9f0bd425, 0xd5bdec4d, 0x631186c2, 0xdba17911, 0x38ae42c5, 0x4fc90e3e, 0xa34f5a43, 0xa7015f30, 0x1158d75c }, // Message 8 + { 0x39c5f930, 0x62fb432e, 0x923867a7, 0xd97c80d9, 0xeda172b8, 0xd13f057a, 0x755bb3da, 0xeb66d1f9, 0x92c010e6, 0xe6d71871, 0x6c8093c8, 0xe2661836, 0x1da9f585, 0xad7b59a7, 0x47d33f5f, 0x374d36e2, 0x950e48ca, 0xeae29093, 0x55db981b, 0x8a9840ba, 0xfaf72af6, 0xb75af9b5, 0x06ff33bd, 0xb4a10b80, 0x69cca0e4, 0xb37fe48c, 0x7302fb82, 0x1c8f53d3, 0x1b960ddb, 0x40381075, 0xb5f802a7, 0x561ae9f2 }, // Message 9 + { 0x79b623c1, 0x837bde5a, 0x8f808b24, 0x109569ad, 0x6c8ec555, 0x5663ef90, 0x7dd62181, 0xe3887a1d, 0x204008ab, 0xa9b00a5c, 0xf11a6639, 0x919e68e6, 0xfd30a100, 0xc7d72472, 0x9fc1f51c, 0x7a73bc7e, 0x7f29f723, 0x845bf48c, 0x88d0b0b4, 0x0308f918, 0xe37a76e2, 0x72d1574f, 0x8072f360, 0x3060e10a, 0xcc10a3a6, 0x76aaef0c, 0x9963ae62, 0xa395d72f, 0xc33b5696, 0x634675f0, 0x2666698d, 0x5e60ef0b }, + }, + }, + { /* Case 4 */ + .iv = { 0x1a, 0x4c, 0x50, 0xba, 0xff, 0xa6, 0x9d, 0x39, 0xfb, 0x57, 0xe3, 0x4f, 0x62, 0xb7, 0xea, 0x72 }, + .p_data = { + .Y = { 0x3e810ba1, 0x9f644dc7, 0xaa078e34, 0x1eb0da9b, 0x076595db, 0x1a394478, 0x34178765, 0xbb67ffc5, 0x76a0a1ab, 0x40eb29fc, 0x64dc1761, 0x11e6e8d4, 0x81a1e957, 0x23e4e925, 0xaebe1521, 0xa7a1713b, 0xa5468b31, 0xccf89f4b, 0xb3ad3540, 0x21a908b7, 0x8af93ee6, 0x29f5bae0, 0x1f50383a, 0xed32ad2e, 0x18a0ea2d, 0x38f0ea31, 0x203f0ff5, 0xf9a9f44b, 0xf07680e7, 0x9fb34a57, 0x340a3dff, 0x45212f6d, 0x7a187c6e, 0xc4c370bc, 0xa4c99c40, 0xa792a335, 0x647cad30, 0x2ef895b4, 0x43c9298a, 0x98b6f5bd, 0x35151bdd, 0xc2233553, 0x5226c0fb, 0x8be7c854, 0x4296f87e, 0x2d6e1342, 0x68d562a9, 0x281ba6e9, 0xd97fae63, 0x30227173, 0xe9bbd1bd, 0x75841134, 0xbd7f1af6, 0x089b989c, 0x150c0107, 0x5f948fde, 0x8955ae07, 0xedd30eec, 0xb428fe0d, 0x19ebfde8, 0x92415e6e, 0x2ec2dde0, 0x05c5a817, 0x616bb2e6, 0x09e3d733, 0x09769bcd, 0xe208ada7, 0x45625133, 0x319a1d60, 0xc7adbe47, 0x3dfbddff, 0x74272035, 0x70d71946, 0x68a75807, 0x344f528c, 0x92b0c036, 0x0a1b8be1, 0x7c3f481f, 0xf550c534, 0xc361acad, 0x1bf9030d, 0xdfd2e87c, 0xd015d6c2, 0x19439db8, 0xe4935ffa, 0x581caf7c, 0x7327959b, 0x77faee04, 0xe813509e, 0xb6523b05, 0xcb177c84, 0x09492f7f, 0x510cae30, 0x0cbdc3fb, 0x529734ac, 0xf532b43a, 0x6918bb87, 0x7c229488, 0x7ea7b591, 0xf842e5e1, 0x30ca0108, 0xe9fb7f8c, 0x92d5bf6b, 0x9c5d05d8, 0x3f8acd21, 0x38e46c65, 0xc62ac9d9, 0xd1d0bfc0, 0x55ea5880, 0xef5ac76b, 0xf72e8a73, 0x592d0761, 0xfdf0639a, 0x4c436242, 0x96792f01, 0x8888cd7e, 0x8c64fd68, 0x347dde4d, 0x59275d36, 0x5e4c068c, 0xf9365bed, 0xf54d9d10, 0xa3b4efd3, 0x150c488d, 0x09c5ad8e, 0xa16c26d0, 0x075090ab, 0x9b37ab03 }, + .M = { 0xb8c6cb7f, 0x6a28a1e1, 0x5c276d3c, 0xaaa07746, 0xa45f4875, 0x03b9f46b, 0xe8ae50f5, 0xa4a6da06, 0x3c1c9c30, 0xa859ec9f, 0xaa3e9a2e, 0xcdd446a4, 0x3c2bdae0, 0x909f1cf7, 0x40dd8fd0, 0xa7be13f0, 0x4dc244c8, 0x09f943c4, 0x1b645384, 0x3d27f01c, 0x7130473f, 0x6e380172, 0x32db86c6, 0xba13fb6e, 0xc325402d, 0x35e5fc93, 0x160f89cc, 0x485d56f9, 0x2e21b673, 0x14a3c3df, 0x00a172bb, 0x07cde7bc, 0xde5cd136, 0x54b5af00, 0x9fbbc455, 0x992be202, 0x7addc891, 0x179433b3, 0x5bb2fbb5, 0x7f4fd59e, 0x6d3c2c31, 0x011328fd, 0xbe2975ff, 0x8d42af6d, 0xb18ea96f, 0x02ea3e14, 0x474f728a, 0x39cf734c, 0x854f8b75, 0xabf755b9, 0x3e41a6b2, 0xabb28d2f, 0xb464f409, 0x63248bca, 0xab66d668, 0xd30986a7, 0xf6af0682, 0xbc4198b1, 0x91b60e6f, 0xb8024050, 0x8c8ea172, 0x6c5b0a34, 0xa3a1a2ae, 0x33d148ef, 0x9323b3c6, 0xce233c33, 0x3ec2872e, 0x1a0f1f34, 0xf66a1768, 0x626c272b, 0x63cdfe39, 0x93428587, 0x4e3acf4e, 0x85bd85c1, 0x3b8c3a63, 0x7439e0b9, 0xe965bd31, 0x1a338781, 0xe9111237, 0x84f08047, 0xf8edb04b, 0x7ac12a97, 0x63034a07, 0x4537f7b7, 0xf0a379b3, 0x85501147, 0x2bbab728, 0xa4b03198, 0xf04ad415, 0x5a29c443, 0x8186e3cf, 0xef474cd6, 0xe70b98a7, 0x18e2b385, 0x7fff695a, 0x72741fcd, 0x1fa5b7c0, 0x47d7af93, 0x9387ed18, 0xce66e3d9, 0xb929abe8, 0xf800fb74, 0x6ffed75b, 0xf3751f51, 0x5a2b25c8, 0xafe14ce1, 0xcef73f16, 0x97d26329, 0xe10281db, 0xbf7166c0, 0xd17c4148, 0x17824b21, 0x2971f5f4, 0x35cad8dd, 0xe86dabde, 0x666b0fc4, 0xc0ba9585, 0x963743cd, 0x76888a7c, 0x0c6cf767, 0xf6df6893, 0x10307071, 0x359151de, 0x785206df, 0x194167c1, 0x66871182, 0xdd28b011, 0xc1ac50af }, + .Rb = { 0x5601d942, 0x64406920, 0x8c7a0bd1, 0x86261be2, 0x998a1c5c, 0x13a2385b, 0x08006737, 0x26f1116d, 0xfdd4d386, 0x4e042d1f, 0x6cc9c843, 0x1b5fd9be, 0x1295af18, 0xe78c4d62, 0xca5e558f, 0x6aa821b7, 0x7953f0b0, 0xe00c418a, 0xc1ed8d5f, 0x09b356ea, 0x3e8d8804, 0xdf84e7fd, 0x18458a64, 0x03af2adb, 0xe4785ef7, 0x0dfb9ec2, 0x605310e2, 0x13427bd3, 0x5c2ac3af, 0x5610bc0f, 0xc8ee617c, 0x955ab02e, 0x26c8937c, 0xc996cfd7, 0x5fe5a7dc, 0xbc9fcf43, 0x7e7d7367, 0xd2d4e3df, 0xa1bbde53, 0x6da7080d, 0x26f727fd, 0x27f1e4a2, 0xc30f4c27, 0x2f22b83c, 0xc8454ab1, 0x14035a64, 0xcb668ae2, 0xaa706148, 0xff171528, 0x8f89b0b2, 0x2d2908a2, 0x1c6aa3f1, 0xea7f145c, 0x3b291b85, 0x804ba12c, 0xabec0d49, 0x5725a717, 0x4f688543, 0xcf8bc9b0, 0x930bba14, 0x8b26e3a4, 0xf4077f67, 0x6759fdb9, 0x1a483477, 0xa2141a28, 0xb29f8d27, 0x89f58be8, 0x852f483f, 0x5d0b7c5e, 0xc2b27bb0, 0x1a73f70b, 0xc9889f3d, 0xaca633e2, 0xb62bb4e9, 0x117369ac, 0x86217fa5, 0x7fcabf97, 0x43ea33e1, 0x84eeb189, 0x75bd17d3, 0x7e1ea7c1, 0x16a2ba4d, 0xd07e6f23, 0x2a0f88cc, 0x5d66590e, 0x5d00f33a, 0x39ad53e7, 0xf1edfab3, 0xc6a00ef7, 0x53e02654, 0x240a381c, 0xa9b977cf, 0xda92216b, 0x4a17d895, 0xc23adaec, 0xb51d2a59, 0xfdb8aa0b, 0x68834d23, 0x16136874, 0xb4427c6b, 0x4041ba51, 0x9e762fd8, 0x642d31d9, 0xa0ce898b, 0x1987209c, 0xdd509791, 0x4f9b2c85, 0x69c03518, 0x053b7ff4, 0x5126f869, 0xae33efa3, 0xca22b5b5, 0xb35298e2, 0x1f462924, 0xfe754ae2, 0x87cd8eef, 0xfcf54790, 0x053e588d, 0x389b5a40, 0x0478119d, 0x2c6d7f65, 0xe08ae821, 0x383d18d6, 0x7d8eff6e, 0x6e668fa3, 0x622cdd7b, 0xebf86fce, 0x9e8c4ef8 }, + .M_prime = 0x356b0b81, + .length = 127, // 4096 bit + }, + .expected_c = { 0xdc, 0x5b, 0x4a, 0x62, 0xf6, 0xdb, 0x54, 0x89, 0x9c, 0x0c, 0x5a, 0x0e, 0x1f, 0xf2, 0x63, 0x97, 0xa7, 0xa1, 0xe0, 0x92, 0xff, 0xda, 0x82, 0x90, 0x87, 0x9e, 0x8f, 0x4b, 0x96, 0xf7, 0x6b, 0x92, 0x5a, 0x0c, 0x4f, 0x4d, 0x4b, 0x26, 0x28, 0xb5, 0xf2, 0x59, 0xf1, 0xfd, 0xa8, 0x58, 0x46, 0xc2, 0xbd, 0xbf, 0xd5, 0xe0, 0xd4, 0x14, 0xab, 0x0d, 0xb4, 0xbb, 0xe8, 0x6f, 0x46, 0xc9, 0xab, 0x80, 0xa2, 0xf5, 0x41, 0xc8, 0x40, 0xa2, 0x1d, 0x25, 0xc7, 0x9e, 0xdb, 0x6c, 0x2e, 0x00, 0xb1, 0x54, 0x6f, 0xc4, 0x2a, 0x48, 0x73, 0x3d, 0x39, 0x1d, 0x8c, 0x93, 0xb3, 0x17, 0xe1, 0x2a, 0x7c, 0xac, 0x5f, 0x12, 0x74, 0xef, 0x3f, 0x57, 0x8b, 0x40, 0xb1, 0xd9, 0xc0, 0x6e, 0x8d, 0x84, 0x10, 0xba, 0xd2, 0x2b, 0xd2, 0x22, 0xc1, 0xbb, 0xc3, 0x33, 0xec, 0x5f, 0xbd, 0x4e, 0x89, 0x58, 0x33, 0x59, 0x78, 0x1d, 0x44, 0x7b, 0x9b, 0x5d, 0xda, 0xff, 0x31, 0x86, 0x18, 0xaa, 0x07, 0x2e, 0x28, 0x21, 0x81, 0x74, 0xe5, 0x1b, 0xfb, 0x1c, 0xcf, 0x44, 0x4c, 0x12, 0x5f, 0x24, 0xf9, 0xa0, 0x00, 0x76, 0x35, 0x14, 0xe5, 0x8d, 0x78, 0xa4, 0xec, 0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45, 0xe2, 0xd1, 0x44, 0xb9, 0x87, 0x1c, 0x44, 0xae, 0x73, 0xe0, 0x30, 0xbb, 0x2a, 0xf7, 0xcf, 0xe1, 0xf3, 0x55, 0x91, 0x15, 0xdc, 0x3e, 0x18, 0x66, 0x8a, 0x00, 0xdb, 0x0f, 0x63, 0x46, 0x3a, 0xdc, 0x1f, 0xc3, 0x4c, 0x52, 0x5b, 0x33, 0xca, 0xa2, 0x54, 0x74, 0x87, 0x7c, 0x01, 0x49, 0xa9, 0x96, 0x5d, 0x2f, 0x8b, 0xc9, 0xb4, 0x6f, 0xc6, 0x51, 0xf8, 0x12, 0x8e, 0x43, 0xcb, 0x79, 0xd9, 0xf1, 0x6a, 0x93, 0x73, 0xb1, 0x20, 0x5b, 0x54, 0xc7, 0xac, 0xc0, 0x1a, 0x43, 0x82, 0xce, 0x36, 0x7e, 0x2f, 0xf0, 0xd8, 0x71, 0xca, 0xac, 0x8a, 0x3a, 0x12, 0xfc, 0x41, 0x37, 0x33, 0x3a, 0x8a, 0xe2, 0x5f, 0x3a, 0x21, 0x6e, 0xb5, 0x99, 0xcb, 0x27, 0x11, 0xe9, 0x6c, 0xeb, 0xb1, 0xa1, 0x63, 0x3b, 0xd4, 0xb0, 0x99, 0x7d, 0x21, 0x20, 0x38, 0xd0, 0xe8 }, + .hmac_key_idx = DS_KEY_BLOCK_1, + // results of message array encrypted with these keys + .expected_results = { + // Message 0 + { 0xd6181232, 0x4c3f3b3c, 0x02a0117a, 0xb147d1bd, 0xefddcdf5, 0x643659c6, 0x9269d1fe, 0x75cbe975, 0xa5c6b0b8, 0x3217a488, 0x427b00ab, 0x2c722f10, 0xcb41a86b, 0xeeea8e33, 0xe2da56e4, 0xcb3cd04d, 0x426e8b0e, 0xd1f1313e, 0x7d819534, 0xe36bc154, 0x20df1ed5, 0x185506ab, 0x0ee68201, 0x94cde377, 0xb6580762, 0x21e6fdd4, 0x29c298af, 0xdc767cb2, 0x9399aa2e, 0x66731f3b, 0x6758040b, 0x201d182b, 0xa1ccd2d4, 0x7f65a75e, 0xdba1cb59, 0xc99d86a4, 0xbe8fa6c4, 0x63b00a31, 0x0284cb92, 0xceedac4b, 0xde2a5464, 0x4eb0b620, 0xf0c8df99, 0xe1bc0349, 0x3a40449c, 0xec1c195c, 0xcfbc468a, 0xc0fdcf7f, 0x54f7a64f, 0x46b1ec0c, 0x150f403d, 0xbfd9cdfd, 0x8de55c3f, 0xa7c16275, 0xb6249827, 0x98f5651a, 0xf65879d3, 0x6754363f, 0xc3dc0cbd, 0x52c7cf64, 0xc7bc362a, 0x26d460ed, 0x7c486d29, 0xb45c2503, 0x41a32b07, 0x7868e90e, 0x9cbbfdd2, 0xb7d139ec, 0x8c887d1b, 0x7a093383, 0xe3f7db73, 0xdd6753b2, 0xf3bedf1b, 0x1ff37916, 0x9d1b5055, 0x75c578ae, 0xc042e8bd, 0x459d6f50, 0xe1fab515, 0xe29127df, 0xc59cdcd3, 0x5f5b3232, 0x814a7cba, 0xc3a08009, 0xfb7eb550, 0x1668365d, 0x51a79a39, 0x602afd8d, 0xfbbda80a, 0xf9d876db, 0xe3243435, 0xd09a88d2, 0x5758caa9, 0x4f5dab1c, 0xca400386, 0xfacda8bf, 0x2fd4be34, 0x86eea3bc, 0x21b9d7db, 0x70fe2723, 0xa1e3f21d, 0x2dc8a5fb, 0xfde4610e, 0x95e94b2e, 0x1490a425, 0x3f9c7a30, 0xfae138af, 0x02c5721b, 0x5ad36aba, 0x546b4c2e, 0x7cd440eb, 0x6e59f972, 0xb056e630, 0x956eda28, 0x893c3222, 0x808b1df5, 0xf0a819f1, 0x8665d811, 0xec3651bb, 0x1be40421, 0xda17c3c8, 0xd957cc7e, 0x1e65855b, 0xb04bdee2, 0x67ee35e5, 0x0df1ce25, 0x641d8626, 0x44e55185 }, // Message 1 + { 0xe8655d24, 0x3cf44779, 0x6f5ce997, 0x4c954812, 0xb1411bac, 0xe17e382c, 0x68d687bd, 0xba823aee, 0xe12b8177, 0x1b0e8fab, 0x7b916f70, 0x0fad9234, 0xfe19d26d, 0xe7575249, 0xc995e816, 0x3e850516, 0xf0b4473a, 0x9f69a144, 0xdaaf2e85, 0x1cccc787, 0xb783f951, 0xe158b74a, 0x9b976056, 0x27e9d0d1, 0xca44ac47, 0x0043596b, 0x1845e608, 0x098ee588, 0x8e18c478, 0x37eb9188, 0x322ce0f8, 0xdd41611f, 0x946279c7, 0x71a52276, 0xfbe94893, 0x4fad7943, 0x606beefd, 0x81a5fd96, 0xc1a6be10, 0xebf3051e, 0xcd1e78d8, 0x3f6dbd11, 0x37231c5f, 0xf0b23b49, 0x2c5c6015, 0x0fe8e839, 0x11cbf712, 0xb98f7946, 0xd0ce3c64, 0x170dc629, 0x94996fde, 0x2891d7ce, 0x6be3efc5, 0x2549495d, 0xacda425a, 0x66e1d128, 0xd73c8cad, 0x4db74cd4, 0xdaf15f2c, 0x40fb43d3, 0x766157e6, 0x6115b1a1, 0x22e9f53f, 0x2f9c972b, 0xd1e466d1, 0xf6863116, 0xf1e833f7, 0xc2c8dcbe, 0xc2738786, 0x02755ad1, 0xe5f67790, 0x91f3b20e, 0x357cfa4f, 0xcd047a74, 0x9e0b28b2, 0x1b35d095, 0xfcba8a07, 0x02055ea3, 0x5f3e5cf2, 0x32818583, 0x4d6636b7, 0x383047ab, 0x7962077c, 0x65ec9d0a, 0x6608a8ac, 0x15eee1e5, 0x79c70043, 0x170e2c88, 0x3bc736ec, 0xde0b15a0, 0x8e67330d, 0xffacad3a, 0xaa919daf, 0x382a076a, 0x90c17105, 0x384f7237, 0x62a858d0, 0x6163ee2d, 0xd32c4283, 0x59bdecc8, 0x493a1b07, 0x0874f351, 0x81ee60e5, 0x40e12352, 0x4de89d93, 0xe90fb2a0, 0x9e7c59a8, 0x6264ab2e, 0x60d143a2, 0xe631c19d, 0x0eb76c17, 0x645f9ebf, 0x9694cff1, 0xe2d018a3, 0x99995405, 0x8ef0fa59, 0xde1d39e5, 0xb7caea84, 0xb5d5660b, 0xba95cad0, 0x5f42d2bb, 0x4ddee6e8, 0x4cd15df9, 0xf3e3151c, 0xdb67fb81, 0x941f8511, 0xa1ec08c4, 0xa17234dc }, // Message 2 + { 0xf498231c, 0xb596c199, 0x3c8bad8e, 0x0e48af8f, 0x731238f9, 0x5e41b7d0, 0xa281050b, 0x26092ca2, 0x4367262c, 0x85028677, 0x960a314d, 0x1735947a, 0xe00e3416, 0x75b7e10c, 0x7afd0873, 0x16fef2f7, 0xf1897b3a, 0x441ecaf2, 0x858cb22a, 0x477169a3, 0x0d049be1, 0x1de513a6, 0x674fc416, 0x77c4f189, 0x392814b1, 0x6a056172, 0xf09ecf7a, 0xce35d5f6, 0x27d7cc5f, 0x895b91e5, 0xc20d4fa3, 0x311c8bfb, 0x2ea43c2a, 0x735cf539, 0x73714e22, 0xc3a9351a, 0x8452f3d8, 0xd6667669, 0x6041f5a1, 0x8244a39b, 0xa32c91ea, 0x84c4dbc5, 0xa53e7960, 0x336dd099, 0x46c93e7a, 0xd54cbcb7, 0xec16e4cf, 0x5b8ebe64, 0x143cbbb3, 0xc9c7ee1c, 0x8c09588b, 0xd4b65608, 0x72caa6f6, 0xb8d1245d, 0x595773f0, 0x2ded1b4f, 0xca914bd1, 0x07baacaa, 0x5e7f9e7e, 0x55d1b8e7, 0x64088134, 0x3643ba31, 0xd5e90640, 0xe668e6c1, 0x710b463c, 0x94b7b835, 0xe68a4814, 0x0e0350fb, 0x8446b5ec, 0x69689dd6, 0x9e6d4f6d, 0x91a9212e, 0x782e2e51, 0x62f9c3fa, 0x19e47497, 0x84449127, 0x973aefa6, 0x7b8bf7d9, 0x09bedaf7, 0x50ea4856, 0x7f1650f6, 0x51d320cd, 0x08347674, 0x98ecf70c, 0xe10c17d0, 0x667625b7, 0xb219fbe7, 0xaa110390, 0x43a5e2ba, 0x54345607, 0x0a163657, 0x6065ae1e, 0x8aea4e2b, 0x7b230f06, 0x3102b623, 0x96c07dc0, 0x6e67dbe9, 0x6bea832d, 0xe75be0d0, 0x6a20b6fe, 0xf2fcec99, 0x5a356966, 0xcec9ef85, 0xe2c99dde, 0x7acfb061, 0x686a6353, 0x32c99493, 0x123a2fc5, 0x1917ba58, 0xe923ce08, 0x5fd754c1, 0x14f9a61d, 0x7b9cf858, 0x4390012e, 0xb4edc187, 0xcb13565b, 0xff24db38, 0xa1aad96a, 0xeba0d921, 0x681799c0, 0xdb3d978f, 0xca4876db, 0xb7712235, 0xea3a5422, 0xfe06090f, 0xe8872e98, 0x7dc5c55f, 0x0506fee5 }, // Message 3 + { 0x093f43a2, 0xf4feaebb, 0xa4ff9bac, 0xa595ee13, 0xd9ea05de, 0x9f0f07d9, 0x2a388bc8, 0x5ccbceb8, 0x1d2f159d, 0x8b6b099b, 0x49079cf7, 0x15e1d719, 0xeb3b16d8, 0x991fa156, 0x77202852, 0x5a6aa09c, 0x6ece5167, 0x2dca9247, 0xf711676b, 0xe4e17a42, 0x637cd250, 0x72e37215, 0x8c71329b, 0xa8de914e, 0x7b992f7f, 0x87cecf0f, 0x56018c3c, 0x99fc23db, 0xbe8227b7, 0xe0c18d87, 0x0cadd6bb, 0xe4469f3e, 0xef5e3743, 0xd4a8f77a, 0x3dfad4e1, 0x3ee0c146, 0xad03950c, 0x67fb2c13, 0x4294b8a3, 0xb47b6aca, 0x8b64024e, 0x118155df, 0x45a3af51, 0xabcb4ea3, 0x40aff48e, 0x5d01b4da, 0xfc4efc96, 0xcc177b93, 0x4760f26d, 0x22bf3212, 0xf7fe1d7f, 0x3e9aed77, 0x20b3990d, 0x62db3a2c, 0x7add6bae, 0x2410862b, 0x6010fb01, 0x1b652e93, 0xbd425b6c, 0x04eb6be3, 0x378374c6, 0x42848bcf, 0x4e800ed8, 0x326e00b6, 0xadee6835, 0xe9bb4acf, 0xc1c29674, 0xabf3946f, 0xe671f16e, 0x37acd6e4, 0x4b81e5ab, 0x95d7678c, 0x825c467a, 0xca910b11, 0x014bc7f9, 0x0a46052d, 0x37477f28, 0x50ee7bab, 0x2ef0f801, 0x8bfa75ec, 0xf90b5638, 0xf99d8820, 0xb6d31e8b, 0x282fc07d, 0xc0ef8fb9, 0x6f1ecbfe, 0x46b81c35, 0x1bd261c4, 0xb8a9d6ad, 0x07faf944, 0xa8355992, 0xfd80d186, 0xa862af41, 0x33693558, 0x2c3f0101, 0xbd6c8dfa, 0x8b52a97f, 0xe6e3ccec, 0x9b2a8bf7, 0x5303dcd8, 0xa34dc51c, 0x4afdeeee, 0x1a215b9c, 0x1ea10f26, 0xfb336df6, 0x193d82be, 0x14527d5e, 0xc1b00c26, 0xdf2bbf11, 0x590bb058, 0x4bc72430, 0x6a63b278, 0xd0af7750, 0xbdc79dfd, 0xa2b769aa, 0x5abb8414, 0xf8c2a483, 0x4753ed6a, 0x42ecad25, 0xf3a26ffc, 0xbbd34144, 0xa9943ac4, 0x5c28f188, 0x48f93813, 0x7e3ee3cc, 0xac3867be, 0x418f64a6, 0x9ce60ad1 }, // Message 4 + { 0x006ec7a4, 0x6b436c1c, 0xcd88b3d9, 0x49fa2429, 0x57b856f0, 0x49e5224d, 0xe2500640, 0x626c742d, 0x50636081, 0xadb9da73, 0x0daf0c4b, 0xde46f82d, 0x2524776a, 0xd1d68688, 0x753efcd4, 0xb1a46b8e, 0x8ed5a073, 0xd565372b, 0xfbc9be0d, 0x061e71a3, 0x7d92e217, 0x429fa130, 0x11cb8fb6, 0x759fb7eb, 0x00af28a1, 0x95e6ea71, 0x70b01242, 0x74584e47, 0x77813ba1, 0x94916792, 0x66330a6e, 0xaff823bc, 0x983a26b1, 0x2644d903, 0x713bc925, 0xc53bc83c, 0x41030037, 0x034fa6c1, 0x458aaaeb, 0xe60ae620, 0x7200aa21, 0xb911d1dc, 0xcb8a2002, 0x1f45e425, 0x8ebd5383, 0x0696acea, 0xbb6ad80f, 0x5d2d97d5, 0xae465356, 0xa94a348f, 0x18a69075, 0xfefd4d04, 0x93d6a5a4, 0xb0732ac6, 0xe793abd6, 0x3296dd34, 0x423e8d92, 0x400396a5, 0x9bf1fdcd, 0x6979f56a, 0xcc1b8a98, 0x50e89001, 0x892a2442, 0xf63da520, 0x445544da, 0xe5e46e6b, 0x025de7bf, 0x6da7a068, 0xf330e75d, 0xa42dbb46, 0x1b10a594, 0xe40adaf7, 0x601ad459, 0x2f924364, 0x284c1cf8, 0x1788a504, 0x92969bdf, 0x0d3cac69, 0xfe5cba21, 0xb446e5fa, 0x4ec5061c, 0x48f5f465, 0xc9b1c4c8, 0x0e761a8d, 0x923f99bb, 0x74d29ad4, 0xc0dc01dc, 0xd0249d36, 0xd0173662, 0x1790e2dc, 0xfaa95adb, 0x5f070749, 0x5382fa53, 0x2dc8d9ea, 0x63ced49a, 0x9e05ea49, 0x37b3e6bb, 0xa40285ca, 0x3a95cf89, 0xcad5417b, 0xda4fd307, 0xdb3dc567, 0x4067b4e8, 0x2368f369, 0x3931e8f8, 0x73de690d, 0x69bd79c8, 0x977b34e5, 0x0a7bef10, 0x07c8539c, 0xebfa37ca, 0xfd880453, 0x2b632c0b, 0x7462c433, 0x6f3d6d51, 0x7d47f508, 0x8adaefc9, 0x72527319, 0x83bd7c62, 0xbad87380, 0xad75ae09, 0x77214b06, 0x998b6114, 0x1b09cbcf, 0xafe16db5, 0x662962eb, 0xe058c0e9, 0xbe2ab5a2 }, // Message 5 + { 0xb8ad1ce7, 0x2422434e, 0x002e5c8e, 0xb04efab6, 0x4be20e9d, 0x82b40f52, 0x5e43ad2c, 0x7ea4098d, 0x1ac89521, 0x8b2f7897, 0x731917c3, 0xf42c8546, 0xd15059a5, 0xada739b5, 0x2feee210, 0x54449bba, 0x4066c2eb, 0xd67d8c46, 0xf7f8945c, 0x42d296b6, 0x767a7d68, 0x74255858, 0x6d928587, 0x91b2ba12, 0x5bda731c, 0xfda3f6e8, 0x523b42de, 0xdf470728, 0x7dc3f631, 0x7c6b8bdd, 0xe020926b, 0x50e68ce8, 0x4b551b98, 0x8fac6588, 0xb4aa4b1a, 0xd6c0319f, 0xf13be7b6, 0xd50d4992, 0xd8149671, 0x70460538, 0xf87326cd, 0x4b7d94fc, 0x638bf2a2, 0x923ac827, 0x67b4ce0e, 0x264964fb, 0x3ee13282, 0x3daf8aa7, 0x6a19dc6c, 0xe09bec37, 0x60416938, 0x6e52a0e1, 0x40ccfc24, 0x3357ef24, 0xe28a22c6, 0x556ea264, 0xcd7aa476, 0x50134123, 0xae2770e4, 0x401e7513, 0x9c438bb0, 0xe2dae578, 0x13511b19, 0xfaa22929, 0x95a5308b, 0xaf4a79a8, 0x1f4f037b, 0xde130499, 0x7487df23, 0x30e56c54, 0x59a0e290, 0x3f5f4664, 0x7b66a36c, 0x1af4a553, 0xec8ede85, 0xaab9fd2b, 0xc3067946, 0x29ad1746, 0x2791e8fa, 0xb0fa4fc3, 0xc4942417, 0x1b160fc4, 0xef2704ce, 0xf2d3991d, 0xbdbffa36, 0xbcdad4ce, 0x64ebdfef, 0x420e3bce, 0xa92cf445, 0x716c64d3, 0x82d8e99b, 0xa20ab921, 0xa636e9eb, 0x36f5a6b3, 0xd6f3f15e, 0xbd9ccb73, 0x8b41b4cc, 0xa928de4d, 0x1f7bd428, 0xc32a116d, 0xa8bdf7bd, 0x12fa968d, 0x6839e646, 0x73d62e0b, 0x6d44d1ce, 0xa17b59c2, 0x62a03b4d, 0xee384e0f, 0x2367bf6b, 0x8f298fd1, 0x093da705, 0xb8d6014b, 0x24e06646, 0xde5c9b52, 0xd6dda865, 0xaafa8bb0, 0x73a01671, 0x0879ada1, 0xd47e73ba, 0x5e576002, 0x81ad2b85, 0x235252f4, 0xba7c0508, 0x80458f5c, 0x81f60a70, 0x85cc67a2, 0xdab85092, 0x74fad90a }, // Message 6 + { 0x6ef02f44, 0x90f2847f, 0xe1ea6cfc, 0x9d8eace4, 0x4e0b6a2a, 0x29ecd2bf, 0x0be1a6b9, 0x5f4bf1d3, 0xb8fd6892, 0x2ed469f9, 0x887c1b29, 0x2a2415f2, 0xffd7de3d, 0x3ce8cf41, 0xcaf7d174, 0xe07e8adf, 0xb8e316c0, 0x0fe7615b, 0x89c6e542, 0xd3f6b53b, 0x9dbeffe1, 0x88020c5a, 0x81719094, 0xec159883, 0x1ff56a85, 0xde85edc6, 0x17363063, 0xf26a30a7, 0xb32a7d8d, 0xbb059911, 0x7ef3f0b5, 0xd8bd011f, 0x70644486, 0xab26bad5, 0x30e05839, 0xd2622fa1, 0xfb532423, 0xed71dc7e, 0x023a4fd9, 0x521d6d1f, 0xddfe5e28, 0xe86e05dc, 0xc594715d, 0xb3514174, 0xa57f951c, 0x6e376f0c, 0x26797930, 0x2d85df4d, 0x838bd85d, 0x3d21fdb3, 0x60e690fa, 0xa5a9f380, 0xa2308e97, 0x8004f7b7, 0xf275bee9, 0x44a89ca5, 0x60465d28, 0xb5052c5b, 0x4207b6de, 0x27225e75, 0x701f138e, 0xaf988be8, 0x49c64860, 0xb986eeb9, 0xa7c541cb, 0xd407e21f, 0xffd6f0ec, 0x085e1ee4, 0x8ad02786, 0x6a0ae1d6, 0xad6108dd, 0x9b59b6af, 0x23645880, 0x7120371d, 0x8b74d7eb, 0xfca886b2, 0x3397f01c, 0x81bfb9d8, 0x2bac2c6d, 0x70827970, 0x4e1909eb, 0x5467c681, 0x60ac5277, 0x63ebc057, 0x27867d95, 0x369af5a3, 0x7ba39f37, 0x142ecea5, 0x210d31fb, 0x764f7dfe, 0xcc400756, 0xaefefbf7, 0x98034d5d, 0xa2b4ec45, 0x476b1aa2, 0xdaf9ed72, 0x0e82f193, 0x6328cf44, 0x16cdea45, 0xc1b7f2df, 0x60f6387f, 0x5a04ed03, 0xd1c310ef, 0x605ced1c, 0xbee5f10a, 0xce7bd1d8, 0x02edc7ab, 0xb9eea0d2, 0x026a75aa, 0x40606771, 0xe2e86d43, 0xd734b7b6, 0x9fbe7ea7, 0xb90b5bea, 0x1416c657, 0x05c66239, 0x88a7df2e, 0x69dfc5ea, 0xd746669d, 0x45e327b7, 0xb51a095d, 0xe1c3e974, 0x424b415b, 0x870377cf, 0x2e33faf5, 0x90486a3e, 0xf17dfb9e, 0x93c26889 }, // Message 7 + { 0x8a68b729, 0x026a3969, 0xd578c7f5, 0x6373922e, 0xed8c7c9b, 0xd2d6b1f9, 0x81b0783a, 0x7c0ad2ff, 0xf09ba017, 0x14a711e4, 0x5653cc61, 0x861b9620, 0x3a378e0f, 0xed2e762f, 0x9c7ff5f1, 0x9f695be6, 0x81912e63, 0x0213a187, 0x228f1c6a, 0xaa93e0f2, 0x2b7fa58e, 0x797e7581, 0xba18076e, 0xc399b9be, 0xda0ed74e, 0x45ca3985, 0xd8794f04, 0x169359e2, 0x06375fde, 0x688304a7, 0x060e2be8, 0xc44c24d0, 0x7ffa36cb, 0xaf9a9fe4, 0x610ea78d, 0xf1d3bb9c, 0x76bbb4d5, 0xab8695ed, 0x0002f61d, 0x82adf07c, 0x3a1d8f8c, 0xe9fdada3, 0xad061847, 0xa8c50e99, 0x6534f8de, 0xd15832e2, 0x7b612734, 0x0e6f3262, 0x45ada93f, 0x5e818644, 0x193aa36d, 0x0447072c, 0xd43b8f1a, 0xfd0a4c9d, 0x5e8a0b45, 0x69698ea5, 0xe1fa65da, 0xdc85f4bf, 0x13db7e62, 0x29f7bff1, 0x3a9ac10b, 0xe13f8f37, 0x10fc1e75, 0xc9fa9a85, 0x37f8a27d, 0x09d7bed4, 0x9f6afe59, 0xcf7cde23, 0x726acc86, 0xe39ea1d9, 0x37c04b7b, 0x687d54ad, 0x1f7b0108, 0x6f0bafc1, 0x76c265c8, 0x349749bc, 0xd9c6bf2e, 0x6928ac83, 0x99d23dfa, 0x39bf238e, 0x24ddfc92, 0xc09110c0, 0x356acd40, 0x02fc0d80, 0x44866f39, 0xb28e3688, 0xdf7d8322, 0xf81a3e89, 0xc4669e99, 0xbc9a122e, 0x267a6775, 0xc989c0de, 0xafe1b702, 0xd1c66122, 0xbd73efaf, 0x67a75f0d, 0xf1cf31d2, 0x3f9a40ec, 0x8e7aebc6, 0x23e8f608, 0xa8181f2f, 0xc2115be2, 0x587b5804, 0xe8d011d7, 0xf5c1ced7, 0xb61fd3ae, 0xa77d72cc, 0xe64984a4, 0xe1d042b8, 0x831a3078, 0x5108924f, 0x81051916, 0x957ddb26, 0xa1885509, 0x5ed27bc9, 0xebfd14b0, 0x833d0226, 0xc6fea3fd, 0x80f008c8, 0x9accfd12, 0xb50eda4b, 0xc07c0fc7, 0x069d0e67, 0xdb854278, 0x755bbb3a, 0xacca6539, 0x0d5f6cd7, 0xafeb0b9d }, // Message 8 + { 0x2ea4f637, 0xe45c1cbd, 0x43ced540, 0xd4746821, 0xc385436c, 0xbd0d44e5, 0x8bcdb071, 0xe0835959, 0xbeccae1a, 0xb0ea178e, 0x5dd5e007, 0xc7f562ca, 0x349f3403, 0xfbaf7899, 0xf982648a, 0x09e6cd77, 0x09c49969, 0x31c9205f, 0x3faba5bb, 0x34247ec6, 0x0221697c, 0xd1bf1146, 0x7483466c, 0x58c97486, 0x35d1122d, 0xb4a7fd92, 0xb640e5ec, 0x8fc6cad2, 0x190deeb1, 0x610965cd, 0x0c44de9a, 0x46fa02cf, 0x68822f88, 0x6b72419d, 0xe01ac941, 0x3235f83a, 0x2e51f76b, 0x1d6e02aa, 0xc1874f7f, 0x78c64f41, 0xb18848ea, 0x8160ce86, 0xa10d385e, 0xfd056a9a, 0xaee90273, 0x45fc9472, 0x56313971, 0x199feabb, 0x152fed05, 0x91bd0ff5, 0x4b7ea26c, 0x135d97ba, 0x73a654c5, 0x67cdbdf1, 0x47c97458, 0x42a5d49b, 0x7283721a, 0x09046fbd, 0xa89e6c6e, 0x2c2db237, 0x7131b5b9, 0x8b4f5c7b, 0x59d30988, 0x30c57e4b, 0xaa3ccf45, 0x3a529b7c, 0x0c86c06d, 0x45010094, 0xdb8195b2, 0x709799c4, 0xb12bad7f, 0xb5034a0c, 0x75c86e27, 0x5857fdea, 0x65c65a87, 0x35379c05, 0x1bd8fcc2, 0x0c59dc01, 0x5e526342, 0xf32dcab9, 0x7dce0ef4, 0x4de8d2bf, 0xec720510, 0x3a77b1a9, 0xb59012f4, 0x82da2181, 0x3db38cc9, 0xedeb50f1, 0xf1084b14, 0xe97066c3, 0x59c6a72b, 0x8fc0b407, 0xd354671e, 0x334cb14e, 0x4eb44832, 0xb313d279, 0x59681b52, 0x261ecb17, 0x294c6cc4, 0x0e732870, 0x51c30bae, 0x64879f27, 0x17159b88, 0x6a4fe96a, 0xf1d34a95, 0x334ee983, 0xce9020aa, 0x8c8e9fdc, 0xe2d13a4d, 0xa6a8a7d4, 0x128e24b5, 0x7d462d5e, 0xcb549308, 0x5a6b8387, 0x08f66cbb, 0xfe4c3033, 0x2b322d80, 0x01083438, 0x80eb4a33, 0x60079be4, 0x09b63391, 0x6fce76a8, 0x4c9f9847, 0x1b929f41, 0xcf288859, 0x7c98aef6, 0x152f7494, 0x935a0b32 }, // Message 9 + { 0x47dac6bd, 0xd9e3cffd, 0x42f02d93, 0x0422522d, 0x56e8d2fe, 0x84f74937, 0xd1547e9e, 0x954ff74f, 0xcc81da04, 0x8233b92c, 0xf1bf11b1, 0x9536268e, 0x4248a0e4, 0x3a73c38c, 0x566a23bd, 0x442c2d5d, 0xf1fc5043, 0xf0767982, 0x935d6a9c, 0xa5340e20, 0x34444f72, 0xf58f7de1, 0xf01cd0d5, 0x2f616b48, 0xe3da3bd0, 0x45585073, 0x6c051a90, 0x79d66b6f, 0x83d06e1f, 0x786316df, 0xbb9e345c, 0x0b3581ac, 0x0029e47d, 0xd7093a97, 0xaabb92de, 0x3ee942fa, 0x6d4f2034, 0x29ac599b, 0xf5da090d, 0x6014f0fc, 0xbfc30034, 0xddcbe0d1, 0x7615b11f, 0x9a535f52, 0x2237e600, 0xf23b5a2d, 0x811405df, 0xc962e4b1, 0x64fd1ecd, 0x639e1e54, 0xdbce2917, 0xba3fc5e9, 0x4b204d48, 0x3213cbad, 0x12e93c47, 0x358f9623, 0x68b1a2e1, 0x0b1d0312, 0x9d56ce6e, 0xb78d6713, 0xa2e50f00, 0xce26b76c, 0x32aa021f, 0x97cba5ba, 0x71e8e671, 0x8b202722, 0x739ee32e, 0xdd6fba73, 0xbbabcda7, 0x724c0ef2, 0xeeeb061a, 0xf76f0af6, 0x06beb624, 0xce5d85df, 0x9b5cc7fa, 0xe8dffce6, 0xbe7caba4, 0xbca5e8c7, 0xf3eb7747, 0xd711b5db, 0xbbc1a52a, 0xcc007d76, 0x42f5871d, 0x5179d613, 0x45680df4, 0xbd1222d7, 0x0fee6947, 0x766e322d, 0xd8308036, 0x23697905, 0x2b1f21cf, 0x9411dda9, 0x7cbda1ea, 0xfa3cc4e5, 0xeb46fa2c, 0x2cc3696c, 0xe43fa80a, 0xf2273467, 0xef277111, 0x65c7ada2, 0xdf598dce, 0xa913632f, 0x927f36b7, 0xcbeb0304, 0x660b5f58, 0xf1e41df3, 0xfa836f55, 0x002f594e, 0x4ad64d96, 0xac9d4350, 0xda3a268c, 0x9904ca9c, 0x2ae5d591, 0x81fe5fa5, 0x05484993, 0xab009e04, 0x5c5be551, 0x9fef0958, 0xc83f41c5, 0x8e174480, 0xa6ba244f, 0xf32dd56c, 0x3769432a, 0x54f79959, 0x9797d41b, 0x749445bd, 0x5c5eaf4c, 0x8f2737c2 }, + }, + }, + { /* Case 5 */ + .iv = { 0xdf, 0xb2, 0x78, 0x21, 0xb1, 0x68, 0x58, 0x7c, 0x12, 0xfb, 0xff, 0x62, 0x6e, 0x20, 0x24, 0x69 }, + .p_data = { + .Y = { 0xd5794891, 0xb68b5e18, 0xebec99a1, 0xbf0eaffa, 0x82fb145b, 0x53b67e97, 0xca2af164, 0xf6fc0fdd, 0x89775af0, 0x5ca53026, 0xc83532bf, 0xf6d537c8, 0x2521a241, 0x690dc307, 0x096527d4, 0x11cff318, 0x3aaef396, 0x9b72167a, 0x7b09bb8d, 0x222c63a8, 0xfcfa604f, 0x37b8f945, 0x01e26530, 0x82a5f636, 0x40091709, 0x93a71631, 0x1d734f5f, 0x6e8d63f6, 0x0f2ea5e6, 0x6147002a, 0x98c68b4c, 0xdf41652d, 0x2e0f9ef8, 0xcd9dd301, 0xc4557b4b, 0xa65f4974, 0x3b372bb6, 0x6ebbcaa9, 0x76d03a88, 0xbebd9567, 0x4906a66e, 0x46048851, 0xa2d3a9ca, 0xd0d21252, 0xf160a68e, 0xb04033c3, 0xff5f604e, 0x8cb75bb7, 0x792c56f4, 0x7417bb62, 0x98970766, 0x77c98ccc, 0x67c90d67, 0xd8748fc5, 0xb5d4775f, 0x99fe9fa7, 0xc831c7e4, 0x044285b4, 0x8c408842, 0xc1c633e1, 0x510c923c, 0x109507bd, 0x56a9a538, 0x04f1ea20, 0x8874b19a, 0xd8c74347, 0x1ae1f91e, 0x10549f2b, 0x042cfa07, 0x03e97592, 0xf8f71fdd, 0x65c551d5, 0x30db14c7, 0x6ee9b500, 0x5fc41c94, 0x6f0c8b10, 0x085e28c6, 0x1e4761e6, 0x124f872a, 0x903e1ee4, 0x0f18d538, 0xfe63be2d, 0x68bcafb3, 0xb0d6d58d, 0x4a87c27f, 0xf2a9e73d, 0x6e90b824, 0x925a2cf4, 0x5946dfd7, 0x163f7cfc, 0x28b8310a, 0x20ff871a, 0x407d16a4, 0x131f2320, 0xabeab811, 0x4ce5a78c }, + .M = { 0x091526ab, 0xe66c20e6, 0xa407eec4, 0xa4b83d5b, 0x41b9798b, 0x8cca59c7, 0xde5efafc, 0xda2d2d63, 0x67ef0c73, 0x22bf5326, 0x4ffc07de, 0xa5c7fcee, 0x09bc0ca4, 0x626c1380, 0xd1d11c62, 0xfc36c50b, 0x21171467, 0x5cd50acb, 0x7d50e0a7, 0xe044be0a, 0x68b496f0, 0x6be2fde9, 0x1c78c1db, 0x9350c66a, 0x8622aeb6, 0xc5b1d6bf, 0xc561fa88, 0xf8353cfd, 0x75111f90, 0xddf02468, 0x6809fc90, 0x7307eb2a, 0x15869909, 0x6f15772c, 0xe99abc75, 0x73038a7f, 0xe5080ef9, 0x4aa3fb7d, 0xb0376031, 0xe45d8c87, 0xd34419b0, 0xd244e981, 0xc0b10c57, 0x9da7aa2b, 0x22987887, 0x0d4d6c56, 0x69bd5495, 0xba8b5a8e, 0x703dcfa1, 0x69fb3135, 0xc178a9c7, 0x68e6cf8a, 0x67f79a7f, 0x3a117b80, 0x0f66a427, 0x67482015, 0x9e2060e1, 0x4cae4f11, 0x6620ae87, 0x5967e7c0, 0xc0031bc5, 0x605ac11d, 0x0f661d68, 0x155d1eeb, 0xf8b6b812, 0xdb556d2a, 0x56944549, 0x62530a6c, 0x49c877a6, 0xd9e2e1e9, 0x58100f11, 0x9a0502ed, 0xf19074fc, 0xa91fd513, 0x774284fe, 0xec788699, 0x4f03a6b4, 0x708c2ef8, 0xea39caa3, 0x9862effb, 0x62071c53, 0xc2ec8254, 0xf56a3286, 0x6087a3c1, 0x51fd789d, 0xae7fedfa, 0x0fa2ac93, 0x65d8be1c, 0x9bbe3b82, 0x2cb2d8dd, 0x4558f759, 0x533ec2b0, 0xfeb0e75f, 0x89a222b7, 0xd42fcef3, 0xd2146e1c }, + .Rb = { 0x3a6e0569, 0x53ec2cce, 0x2bd39843, 0x98254283, 0x05e3668e, 0x9c5a1b2a, 0x60901117, 0x07679a5e, 0x5a6eaca8, 0xc3b567b4, 0xbbd49487, 0x514e0303, 0xcc9f1968, 0x67c50804, 0x17c27d5e, 0x3248e594, 0xc4c1b388, 0xaf52507f, 0x4944a08b, 0x6ad65fbb, 0x3997f29d, 0xb12e8e96, 0x03f70c1f, 0xed308182, 0x8fd40dd5, 0x7ecea683, 0x58ccf705, 0xea36830a, 0x91db6f0e, 0x523e5651, 0xe3da6a6c, 0xf88ce3da, 0x38dd4fa6, 0x9d19a220, 0x33ef16b9, 0x22bb1cf8, 0x7e5d6853, 0x8981be47, 0x30122101, 0xc17a23b9, 0xbe0c6e00, 0x3aa26e03, 0x7df423b8, 0x2c27ba91, 0xdb7697da, 0x0bb868cd, 0xcc4f7d61, 0x8c9eea14, 0xeeacfe04, 0xfaf41d9e, 0x2e1e1375, 0x8cc69ce5, 0xe05d228a, 0x9dd5fedc, 0x2ab39a8d, 0xf2b283c7, 0x5ccf2559, 0x46fd2024, 0x67eecb62, 0x7ba5077d, 0xebaffd8b, 0xc9ea5892, 0xc13b3f6c, 0x1c1dc815, 0x49e19057, 0x2d5e70d4, 0x7d106a9e, 0xee4d6a21, 0xb1ed4e48, 0xb9d24508, 0xc8225da0, 0xd08f1472, 0x25f576bc, 0x80412ddc, 0x02669c45, 0x21e626e8, 0x2c438963, 0xf36cda28, 0xad9eec09, 0xd11eaf93, 0x2595e7c2, 0x23a2650b, 0xbdd6c840, 0xeb8b0f01, 0x7b14d4cb, 0xc841f7b5, 0x52f14bbf, 0xd5c9c34b, 0x258a15c4, 0xa9aaaccd, 0xab7dfc58, 0x45cd8518, 0x85155c51, 0x54d72cd7, 0xa481ff52, 0x245bee5c }, + .M_prime = 0x2c0e5bfd, + .length = 95, // 3072 bit + }, + .expected_c = { 0x04, 0x79, 0xb3, 0xfb, 0x4b, 0x3d, 0x54, 0x06, 0xbe, 0xb6, 0x89, 0xfa, 0x63, 0x35, 0xa8, 0x8c, 0x65, 0xca, 0x4b, 0x3a, 0xfe, 0xc2, 0xea, 0x2d, 0x2c, 0x0d, 0x7d, 0x09, 0x7a, 0xff, 0xe4, 0x7e, 0x9c, 0xaf, 0x9e, 0x77, 0xd3, 0xf4, 0x5c, 0x73, 0xe9, 0xc5, 0x24, 0x93, 0x38, 0x17, 0xe6, 0xfd, 0x4e, 0x30, 0xc3, 0xf7, 0x25, 0xbe, 0x03, 0xeb, 0x4e, 0xa9, 0x6a, 0x9c, 0xb6, 0x09, 0x7d, 0xad, 0x79, 0xb0, 0x52, 0x73, 0x4e, 0xcb, 0xaa, 0x22, 0x01, 0x1a, 0xab, 0x5e, 0xa7, 0x96, 0x07, 0x67, 0xcb, 0xa1, 0xf4, 0x29, 0x8d, 0xbb, 0xe4, 0x0e, 0x98, 0xe3, 0x56, 0x20, 0xb5, 0x63, 0x10, 0x29, 0xf2, 0xa0, 0x12, 0x3d, 0xd0, 0xf4, 0x30, 0x62, 0xef, 0xcd, 0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ba, 0x6e, 0x65, 0x64, 0x68, 0x5c, 0xe6, 0x6a, 0x5d }, + .hmac_key_idx = DS_KEY_BLOCK_1, + // results of message array encrypted with these keys + .expected_results = { + // Message 0 + { 0x64c24e70, 0x03f4e5f7, 0xbdd3c270, 0x6987c775, 0x623bff9e, 0xa52ddc27, 0x55140d81, 0x3f830f6c, 0xde186954, 0x73900908, 0x6ebc1990, 0x753704e8, 0xc810ac35, 0x345dddcb, 0xc41c937f, 0x0c8eeee3, 0x74f3a128, 0x67473afa, 0x6667bbf2, 0xa3851d69, 0x2d6b5145, 0x4cf9d237, 0x181a8ff1, 0xa4e1c506, 0xb684684e, 0x1df012c5, 0x4546c158, 0xa87c6d87, 0x0d1e0f48, 0x01075128, 0x11b8baac, 0xfb51bd01, 0xdd079533, 0x4eb8c402, 0x33d649d0, 0xcdff3e1c, 0x23bef697, 0x1e181aef, 0x6c31d342, 0xd167abbb, 0x6128f652, 0x2ba7bed4, 0x3ef2fe5f, 0xead2f540, 0x122fcae9, 0xadcbf50c, 0x7edb76be, 0x16d92d27, 0xe15c225c, 0xcbf3dd52, 0xcf49716e, 0xeea16bb2, 0x8a82d04e, 0x7a63abd0, 0x1c010703, 0xaab6a261, 0x385cc6f3, 0x92f69b5b, 0x05e71345, 0x0569b623, 0x2684aa87, 0xeac5b3db, 0x8420d980, 0xa4cf7037, 0x8c7e999a, 0xf58e5cc2, 0xe250b65d, 0xb16a3c0f, 0x9969c3fa, 0xa0477cdd, 0x2400ffa5, 0xb74dbd79, 0xe5f33572, 0x655dd07c, 0xa5706dc1, 0xc96b9590, 0x0cf03658, 0x56c4f1c3, 0xcd0c5e74, 0x77f736d2, 0x69d18612, 0xca23b547, 0x7166ae08, 0x5494e6e0, 0x5154fc4f, 0xac6e3fbc, 0x0cf2e065, 0x9f1d081d, 0x230f6cf6, 0x487b74e1, 0xf52e5254, 0xf0ecdc99, 0x5320f081, 0x9c861a51, 0xc29c4302, 0xc8accc54 }, // Message 1 + { 0x831ac52b, 0x5f4806ad, 0xbc5f3fa7, 0xd26c151e, 0xc8870389, 0xf89ba084, 0x51243a73, 0x1ae04b55, 0xed43ccdb, 0x17a34d55, 0xb8d9d8eb, 0xba716829, 0xc51979a3, 0x440ac411, 0xbd54ee17, 0x205c811e, 0xcf31fa28, 0x26b912aa, 0x7611532d, 0x8832fd6d, 0x3a3980bd, 0xb84d0c19, 0xbd6a503c, 0x44558981, 0xe1e7aa64, 0x878fc357, 0xa6996ab7, 0x2d4615cd, 0x67aede4e, 0xcb6f77fa, 0xb6dd6323, 0x96d16b66, 0x41de13e4, 0xf0497ec8, 0xe9b622c3, 0xeb004a8d, 0x64a125a2, 0xbf309d9c, 0x5d0a298c, 0x33726396, 0x713914cf, 0x862602d7, 0x1c662821, 0xa604e69d, 0x16b77cd6, 0xaa83cb0f, 0xdb987f60, 0xaaff4ec8, 0x7a941629, 0xcd3a6f7d, 0x9a69302c, 0x465b2886, 0x7087686d, 0x98fde217, 0xd5964c1c, 0x95bd5d46, 0x6163c2ac, 0xbdfb9350, 0x11cd7f8c, 0xc798e6cd, 0x0ef5ea89, 0x2be92390, 0xc4831143, 0x61928747, 0xe23dd7ae, 0xfe87ae70, 0x5b645aac, 0x5bbb95d2, 0xf27fd00d, 0xc2dca04d, 0xa14fe33d, 0x287088a8, 0x3f60e052, 0xa2605635, 0xb51727ed, 0x868883dd, 0xb9d27411, 0x19b1c9bc, 0x446757e4, 0x78e5e348, 0x97da41e6, 0x9e799008, 0x70575a6c, 0x2f11ce5c, 0xe71bc323, 0xbf2ec758, 0x6c3aaa01, 0x7ddfa5f6, 0x59aaa01f, 0x7c5fac79, 0x27058b25, 0xe9e56e44, 0xb69fb209, 0xd752ba93, 0x81425877, 0x2c392ffe }, // Message 2 + { 0x7fa7b65f, 0x0f62aa8d, 0xf5103440, 0x77040239, 0x7fbacb28, 0x257056b7, 0xc45cfe66, 0x1f00f227, 0x8b932739, 0xcddfb5e1, 0x1daba0bb, 0x30021709, 0xfa5cf3e7, 0x07619442, 0x6308c66a, 0x3e518bdb, 0xc69faa93, 0x6c257ce2, 0xffe55054, 0x6ebac857, 0x3db1f438, 0xc4891802, 0xbf4dcd9a, 0x51f4d20b, 0x4d4af4b9, 0x3b689725, 0xba59bb9e, 0x35518898, 0x22738adf, 0x02ddcf6e, 0xa8971ee0, 0x18c28892, 0xad953b15, 0xc7467248, 0xafa8ade9, 0xc7d0996b, 0x2eab2209, 0x3fe14627, 0x078c914d, 0xec7aae74, 0x6c92279d, 0xc8c0d24f, 0x8a6f4fb6, 0xc58ee36d, 0x3b36d29a, 0x42bda927, 0xd27335ce, 0x7be8bf0a, 0x24674de3, 0x0bb233fb, 0x396a5a15, 0xfadac055, 0x5f2ddf35, 0xec9f7c40, 0xf1e79c1e, 0x478a57db, 0xeae25d2f, 0x9b6e59b5, 0x1998c689, 0x2b8a2bd0, 0xdc45e240, 0x70c6aacc, 0xaf8d272c, 0x62b6dc97, 0x121b31b4, 0x1df1cf7f, 0x5627432c, 0xac7095ac, 0x63649988, 0xdf5a6b80, 0x7cc6f26a, 0xf928d222, 0xde553e0c, 0xe79a0dcc, 0x62b52fce, 0x4f7668c1, 0x3b0b1871, 0x9a2ddf5b, 0x308bc241, 0xb731000e, 0x7e001a30, 0xa637004e, 0xbed18e29, 0x9f08b82a, 0x4713953e, 0xc785c82f, 0x7ff61900, 0x155d4627, 0xe1d9f6dc, 0x0d20928a, 0x35ce4ecd, 0x064a6b90, 0x30dd9e79, 0x62f7d800, 0x2ae9a6be, 0xb44aa4c2 }, // Message 3 + { 0x21455e3e, 0x25705524, 0x59490a68, 0xc4822a49, 0x8eea5881, 0x16996f95, 0x6dc1f6e3, 0x1a3869ac, 0x01f34509, 0x58709a31, 0xa09dd776, 0x9298b6e7, 0x8066195c, 0x262fe076, 0xfd5363ff, 0x163b7658, 0xa25bb253, 0x5ba8f842, 0x08fd4559, 0x491f12e3, 0x6b74028d, 0x9cd39858, 0x665f4457, 0x73b46f90, 0x3e077a77, 0x4bc537f0, 0xaf9144d8, 0x94df74bf, 0x4f158e93, 0x930d9a23, 0x40b94edf, 0x95352e7f, 0xb27548c0, 0x1f64e1dc, 0x4b2bbdc0, 0x1f7e56ad, 0xf42fc1e0, 0xf28bd40d, 0xfaf536e5, 0x633a86af, 0xa9b8b114, 0x8c7782c1, 0x0802c9b7, 0x9258e2b4, 0x27cc94ea, 0xd9fb10b5, 0x997c870f, 0xaae73078, 0xa56067d4, 0x4c77baf0, 0x471a1108, 0xaed379dd, 0x924405f2, 0xca74892f, 0x734fe88f, 0x5d140648, 0x2ccae3f7, 0x7c7a050a, 0x16d3cdf5, 0x5c5d3e21, 0xe58c7f66, 0xd147390f, 0x9218ad13, 0x0ce015a4, 0xb9baed51, 0xd9189b01, 0x34e7aa06, 0x49913b4a, 0x209fd3dd, 0xfa7efa53, 0x5e58ec0d, 0x789ed70b, 0xe3d234b3, 0xee786b8d, 0x5a1ad94e, 0x65c90ee4, 0x948dca7a, 0xc0d99437, 0xb8e50f04, 0xd7293909, 0x6cbc8188, 0xdc7b031b, 0x91b0d9d7, 0x354fd88e, 0x6a26b3c4, 0xc84e0ff0, 0xa752d269, 0x2940476e, 0x40760567, 0x797f43fb, 0x87e5b3a1, 0x6bc92f2b, 0xcf3e1d5c, 0x01a9fa5c, 0x74dc165e, 0x756b96c7 }, // Message 4 + { 0x75b94bcd, 0x4727321f, 0xc20f35e6, 0x2e24446e, 0x4518523d, 0x8c48b2dc, 0x96717d50, 0x821f1237, 0xbebbd2e8, 0x8fdad52d, 0xcbf66868, 0x717d052b, 0xc250a639, 0xc7324725, 0x9f5b81b0, 0x1eb023ca, 0xf74a9135, 0x1ffaf2c6, 0xfc239282, 0x5310170d, 0x88eeff37, 0x811a01f1, 0x0638b0f7, 0x2d9e0512, 0xe5651782, 0xa0b4d90f, 0x92bb6d8a, 0x29901b7b, 0x7e5ffe21, 0x8a2faf4b, 0xde6d9c1b, 0xc039f9db, 0x2fefa926, 0xd944448c, 0x0ef40b8f, 0x49e7ef54, 0x1aca067a, 0x31651dd1, 0x435e6f0a, 0x56418f85, 0x3132a6eb, 0x49071227, 0xaf64f72b, 0x5ddf9924, 0x7e5dc362, 0x08acbe35, 0xdd11cce3, 0xefbd9384, 0xe4145f92, 0xbfce1d13, 0x3b9272b7, 0x3475d474, 0xd1488f01, 0x1ee27762, 0x56ce6a8b, 0x52173cfe, 0xc8f01f5b, 0xb7e14351, 0x8c3d8913, 0xd0601b74, 0xb06a5c86, 0xb77e176d, 0x7f9055c1, 0x29d18cec, 0x78176f52, 0x4f63e07f, 0xc5dcef9b, 0x042a35cd, 0x78929548, 0x6ea48187, 0x895d4912, 0x6cefe216, 0x92fe5324, 0xea0eb66a, 0xa49bbf66, 0x25630b34, 0x91fc86a6, 0xe2a79600, 0x1b9fed8f, 0xe427eecc, 0xa3e57a0e, 0xa75a2f54, 0x78a78916, 0xe9d24fa4, 0xcd019448, 0x3c4c3be7, 0xbca05cba, 0xdcb5771d, 0x92d00fac, 0x24f36d77, 0x0b727526, 0x9ae0b9c5, 0xc1444216, 0x15dbe3c0, 0xd99cf784, 0x44b2fd73 }, // Message 5 + { 0x11f9bd96, 0xf7ea1e63, 0x150c8f6e, 0x44cc8a80, 0x42fed7e5, 0x0f61e30c, 0x033638ee, 0x16241c9a, 0x68d9e483, 0xf2ef13d1, 0x01ada294, 0xfc6ba49d, 0x5986b719, 0x31d9a8da, 0xcb96ac35, 0x46fd03de, 0x756a03cb, 0x56bede87, 0x3db9fa94, 0x3c3ea1e9, 0x426e8145, 0xf404e223, 0x7a3363b8, 0xd250034e, 0xa23b3113, 0x3fd58c62, 0xbefaffa4, 0xea33988f, 0xfd4d0faf, 0x3f34bb25, 0x5f7da7c7, 0x75335eae, 0x2d9d72be, 0x5cc321e8, 0x6c321f3e, 0x760a13d6, 0xc8065bc8, 0x1e286132, 0x711a05f6, 0x3bee7ea5, 0x7e74c8e7, 0xc8a3a954, 0x8d01a889, 0x7ced44c5, 0x5f3e3fd5, 0x39be9d5c, 0x6b0ecc90, 0x8776df48, 0xd2fdfe60, 0x1f7f04c8, 0xd4a2846a, 0xddbb74d9, 0x4d58d3eb, 0xe16757df, 0xad55dd71, 0x98c1496e, 0x8ffe3a6b, 0x283afc22, 0x49c8862a, 0x68996c1d, 0xdb520015, 0x2e969b5c, 0x2f5f740d, 0x12146eaf, 0xd0d2732d, 0xa8884b25, 0x4f220f85, 0xf135a28f, 0x049186fb, 0xb3666eb4, 0xc4ac6f00, 0xe3cc9915, 0x8109969c, 0xffe6b13c, 0xbba86af0, 0xe7851e32, 0x92859216, 0xb3b63ebd, 0xda770264, 0x16044416, 0x91ea85d0, 0xd59afc2a, 0xdbe40984, 0xf33227c2, 0x0c835eff, 0x030916c8, 0x030a7b89, 0xdb00bab8, 0x39a5eaa9, 0x2762b6c8, 0x97985604, 0x2739649a, 0x8a908a89, 0x96faa348, 0xe4106b3e, 0x19cb304f }, // Message 6 + { 0x95e204e0, 0x4c1d6b06, 0x22b54c81, 0xf93bf0f6, 0xd0e92737, 0x0a05c841, 0x101d5059, 0x5b2e8406, 0xac0e2652, 0x6682d406, 0x5347a137, 0xabf938ac, 0x18ec9576, 0x08613a1d, 0x12c7b359, 0x6ddf1968, 0x2d375bf2, 0x91db0b71, 0xd56613e9, 0x511e27dc, 0xb75afea5, 0x2a713567, 0x3fbc7c17, 0x1a06a794, 0xe9d3e146, 0xfab6aa85, 0x7d0130c8, 0x1a5edae4, 0x79f1a48e, 0xe4310003, 0xeef16617, 0xf74ed6bf, 0x35606830, 0x58d55432, 0xe987fe23, 0xe49d4b59, 0x24474156, 0x0544da62, 0x3d55350b, 0x91dd1909, 0x98817796, 0xbf97824f, 0xa33bc1ee, 0x12cc6861, 0xbf4f03b5, 0x8e26a2bc, 0x436c1adc, 0x2fbb42b1, 0x7735491e, 0xe061a448, 0xe72db823, 0x96cba6df, 0xd6c5f39a, 0x6ac73d93, 0x2220c46b, 0x6a91b642, 0x9e69693f, 0x3e8238bf, 0x443aaead, 0x207ba9cb, 0x337c15ea, 0x1b0bc624, 0x75b68671, 0x1b3d86f5, 0x7d1c8a3d, 0x53d3a5cb, 0x65b351db, 0x3121be26, 0x916c071b, 0xbffb13d5, 0xc6742bd3, 0x42b8d304, 0x8171987d, 0xe7c9bbed, 0x74aa982c, 0xe7f2997f, 0x61f72f0c, 0xa8f98719, 0xcc0276e3, 0x3559c7fe, 0x0850408f, 0x07730249, 0x478a5a56, 0x2059aeed, 0x7d2b4c4d, 0x0a33df12, 0x054a8aa5, 0x50d8a093, 0x6fb23fe2, 0xb7f4641e, 0x1c503388, 0xca0e245f, 0x2fd22529, 0xc2119e0e, 0x25fd6afd, 0x6de0e7f5 }, // Message 7 + { 0x48e6637f, 0x6804d74d, 0x0b779232, 0x7aa48561, 0x92efbae2, 0xb56d6b85, 0x18f8654c, 0x3d9901bc, 0x27bc4146, 0xd6ece0f2, 0x38b3463f, 0x00e8f46f, 0xaa76530b, 0x40ce9365, 0xe0ee68ee, 0x43e1ab45, 0xd00f6fc1, 0x5c1cb98d, 0x348bee22, 0xadfecab9, 0x62f54000, 0xd6c1eead, 0xf690c04d, 0xc04cdc70, 0xa937db09, 0x305342b4, 0xaf216410, 0xb8660b05, 0x94dffa5e, 0x3efaa489, 0xd6ce0101, 0x2aa00a5d, 0xe33137c7, 0xdf5dfbbd, 0x77cc49e3, 0x2a660869, 0x2f5f4dfe, 0x8b941c69, 0x2d2a5d0b, 0x986cfa7a, 0x70b119f7, 0xc2efedbd, 0x09b5329c, 0xd9809b8f, 0xc62c50f8, 0x4135e1c5, 0x26c14c00, 0x8ff2556e, 0x167eb63b, 0xe6ce0405, 0x98bf6772, 0x2c781030, 0xb89c94a1, 0x1f4ffd23, 0x75f42cff, 0xb2275a98, 0x88905856, 0xda3764e8, 0x7784da29, 0x083ac191, 0x98e6d5bc, 0x3ec067c9, 0x1f6688da, 0x40295ceb, 0xdb076f74, 0xd73ed31f, 0x1eced964, 0x5a00716b, 0xb7354831, 0xb4081b35, 0xd55f7374, 0x4f078453, 0xef208f40, 0xd1487976, 0x7027b268, 0x773dbfe7, 0x7d7b6c26, 0xa759838f, 0xf37bbc0a, 0xeea627e2, 0x7d4441c2, 0xfc882a4c, 0x26ab1884, 0x1ee7fb21, 0x901ccf77, 0x8745cd47, 0x590ea36b, 0xaf6765a3, 0xd6ca4d2c, 0xdf017cfc, 0x530aa4a4, 0x3c422af6, 0xdf8484a3, 0xf7ac6b75, 0xa9ed54aa, 0x12daf4c2 }, // Message 8 + { 0xa97a75a9, 0x1b42faf1, 0xce1399f5, 0x718a2ba1, 0x13415a2d, 0x9c43933a, 0x4c42743b, 0x467c6b83, 0x770cb2e6, 0x0047b22f, 0x6bfd5179, 0xc4080057, 0x122f0ac1, 0xe870bc9f, 0xa698c15a, 0xec98df98, 0x51be3e90, 0x9f90d7ab, 0x3a877a4e, 0x45af2bbc, 0xef28f5f7, 0xfce93fc8, 0xf18d6c53, 0xdd6577f5, 0x6e97e1da, 0x07d0949b, 0xcbc8326e, 0xf9e315a9, 0xc97c2f8a, 0xe76643ec, 0x63543d42, 0x0e01aeb1, 0xb9b51d58, 0x5783fbb9, 0x2a099aaf, 0xe141ea14, 0xc763b58e, 0x698e7a90, 0xf6ba62da, 0x13270a2f, 0xf2df8b30, 0xf788dc1b, 0xf50ea21e, 0xb2fbed7a, 0x56e95caa, 0x5f118c32, 0x54430ddf, 0x90c9f2e9, 0xc2475f91, 0xbabf8c6d, 0x17948b8c, 0x3d7a1438, 0x2ae8ba41, 0x496723f2, 0xa60718e4, 0xcc960e0d, 0xa4bdb10a, 0xde1adf3d, 0xbbd6c327, 0xf1398005, 0xb867c10d, 0x37f48fd6, 0xea795e19, 0x898bb52e, 0x4152897e, 0xbbf127dd, 0x2c335ef6, 0x8c0d4a76, 0x79090668, 0x7683f91c, 0xa8e58a83, 0xf001b762, 0xe1621309, 0xa562fa4c, 0xbfec7b42, 0xbf1b4a9d, 0x29207a95, 0x1d59987e, 0x7b428bef, 0x64cc46aa, 0xc79c99a5, 0x8a2a8bc9, 0x642a2b8f, 0x25a800ff, 0xeb00edf1, 0x9989c721, 0xaae4a05c, 0x454ec92f, 0xa2f72f0f, 0x5bcb9edd, 0x18cb73e4, 0x00a71263, 0x93f8c011, 0x6a96956b, 0x10ecb752, 0x205d5822 }, // Message 9 + { 0x3bfb11e4, 0xf6d6ebb3, 0x7ec5dcb8, 0x3840135d, 0x88388a13, 0x874bd2a5, 0xae525562, 0x354b7be8, 0x74ce87af, 0x51f350a5, 0x0793137d, 0x26aa0636, 0x8e10d76c, 0xd49d5e73, 0x4959f524, 0xb7555703, 0x99859035, 0x40c79673, 0x317fb940, 0x5cd8d72b, 0x1bf41d50, 0x61b31955, 0x62524def, 0x59f2c0dd, 0xdbe9d581, 0x6f4693bd, 0x187b99b0, 0x19f2409d, 0x5514e19d, 0x283e3fdc, 0xed3eb99a, 0x6b8426da, 0x18061fad, 0x897a3d73, 0x3052444c, 0x7072639e, 0xb00c252c, 0x22a7ad0e, 0x465c3c85, 0xe6ef64d7, 0xd52c1a8a, 0xb5b90f82, 0xe9faf74d, 0xc4f62e88, 0xe9c7b255, 0x095e8714, 0x87c0ea0b, 0x5fd386a6, 0xb61ff901, 0x7f874595, 0x347c8e6b, 0xa2c27bf1, 0x0ae4f4a2, 0xb0da37c4, 0xda204dfc, 0xad2bb768, 0xda456d50, 0x26ba84d2, 0x04605ef5, 0x585a5e1d, 0xe29c018e, 0x2e3cfc92, 0x193bc8e6, 0x4faf3ebb, 0xaabdef6a, 0x83322b12, 0xd86e4652, 0x83a72a63, 0xb4617f2d, 0x8753ebe4, 0xcadcf4ec, 0x70f32836, 0x4d1b40f5, 0x239ad371, 0x8218dc38, 0x20574ac8, 0xbf1699fa, 0xfe2771bd, 0x0cb48a07, 0x0151e1bf, 0xbcb58312, 0x9b4fb373, 0x026917d2, 0x22a4fad9, 0x384c6d19, 0x69e78c6d, 0xe59850f3, 0x837c9b3a, 0x76022e4a, 0x5418542d, 0xc912e299, 0x1525f115, 0xe068e14a, 0x5fc8d5f9, 0xba75c297, 0xce4163cf }, + }, + }, +}; diff --git a/components/hal/test_apps/crypto/main/ds/ds_types.h b/components/esp_hal_security/test_apps/crypto/main/ds/ds_types.h similarity index 100% rename from components/hal/test_apps/crypto/main/ds/ds_types.h rename to components/esp_hal_security/test_apps/crypto/main/ds/ds_types.h diff --git a/components/hal/test_apps/crypto/main/ds/keys/3072/ds_key1.bin b/components/esp_hal_security/test_apps/crypto/main/ds/keys/3072/ds_key1.bin similarity index 100% rename from components/hal/test_apps/crypto/main/ds/keys/3072/ds_key1.bin rename to components/esp_hal_security/test_apps/crypto/main/ds/keys/3072/ds_key1.bin diff --git a/components/hal/test_apps/crypto/main/ds/keys/3072/ds_key2.bin b/components/esp_hal_security/test_apps/crypto/main/ds/keys/3072/ds_key2.bin similarity index 100% rename from components/hal/test_apps/crypto/main/ds/keys/3072/ds_key2.bin rename to components/esp_hal_security/test_apps/crypto/main/ds/keys/3072/ds_key2.bin diff --git a/components/hal/test_apps/crypto/main/ds/keys/3072/ds_key3.bin b/components/esp_hal_security/test_apps/crypto/main/ds/keys/3072/ds_key3.bin similarity index 100% rename from components/hal/test_apps/crypto/main/ds/keys/3072/ds_key3.bin rename to components/esp_hal_security/test_apps/crypto/main/ds/keys/3072/ds_key3.bin diff --git a/components/hal/test_apps/crypto/main/ds/keys/4096/ds_key1.bin b/components/esp_hal_security/test_apps/crypto/main/ds/keys/4096/ds_key1.bin similarity index 100% rename from components/hal/test_apps/crypto/main/ds/keys/4096/ds_key1.bin rename to components/esp_hal_security/test_apps/crypto/main/ds/keys/4096/ds_key1.bin diff --git a/components/hal/test_apps/crypto/main/ds/keys/4096/ds_key2.bin b/components/esp_hal_security/test_apps/crypto/main/ds/keys/4096/ds_key2.bin similarity index 100% rename from components/hal/test_apps/crypto/main/ds/keys/4096/ds_key2.bin rename to components/esp_hal_security/test_apps/crypto/main/ds/keys/4096/ds_key2.bin diff --git a/components/hal/test_apps/crypto/main/ds/keys/4096/ds_key3.bin b/components/esp_hal_security/test_apps/crypto/main/ds/keys/4096/ds_key3.bin similarity index 100% rename from components/hal/test_apps/crypto/main/ds/keys/4096/ds_key3.bin rename to components/esp_hal_security/test_apps/crypto/main/ds/keys/4096/ds_key3.bin diff --git a/components/hal/test_apps/crypto/main/ds/test_ds.c b/components/esp_hal_security/test_apps/crypto/main/ds/test_ds.c similarity index 95% rename from components/hal/test_apps/crypto/main/ds/test_ds.c rename to components/esp_hal_security/test_apps/crypto/main/ds/test_ds.c index bf7962ec89..e4a8f31730 100644 --- a/components/hal/test_apps/crypto/main/ds/test_ds.c +++ b/components/esp_hal_security/test_apps/crypto/main/ds/test_ds.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -47,7 +47,6 @@ typedef struct { 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" @@ -86,7 +85,6 @@ static void ds_disable_release(void) esp_crypto_ds_enable_periph_clk(false); } - static esp_err_t esp_ds_start_sign(const void *message, const esp_ds_data_t *data, uint32_t key_id) { ds_acquire_enable(); @@ -167,9 +165,9 @@ esp_err_t esp_ds_sign(const void *message, } 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) + const void *iv, + const esp_ds_p_data_t *p_data, + const void *key) { if (!p_data) { return ESP_ERR_INVALID_ARG; @@ -221,8 +219,8 @@ static void ds_disable_release(void) } static esp_err_t esp_ds_start_sign(const void *message, - const esp_ds_data_t *data, - uint32_t key_id) + const esp_ds_data_t *data, + uint32_t key_id) { ds_acquire_enable(); @@ -274,9 +272,9 @@ esp_err_t esp_ds_finish_sign(void *signature, const esp_ds_data_t *data) } static esp_err_t esp_ds_sign(const void *message, - const esp_ds_data_t *data, - uint32_t key_id, - void *signature) + const esp_ds_data_t *data, + uint32_t key_id, + void *signature) { esp_err_t result = esp_ds_start_sign(message, data, key_id); if (result != ESP_OK) { @@ -289,9 +287,9 @@ static esp_err_t esp_ds_sign(const void *message, } 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) + 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)); diff --git a/components/hal/test_apps/crypto/main/ecc/ecc_params.h b/components/esp_hal_security/test_apps/crypto/main/ecc/ecc_params.h similarity index 98% rename from components/hal/test_apps/crypto/main/ecc/ecc_params.h rename to components/esp_hal_security/test_apps/crypto/main/ecc/ecc_params.h index 85fde9de38..6e9341f709 100644 --- a/components/hal/test_apps/crypto/main/ecc/ecc_params.h +++ b/components/esp_hal_security/test_apps/crypto/main/ecc/ecc_params.h @@ -50,10 +50,10 @@ static const uint8_t ecc_p256_point_y[] = { }; static const uint8_t ecc_p256_scalar[] = { - 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, + 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, }; static const uint8_t ecc_p256_mul_res_x[] = { diff --git a/components/hal/test_apps/crypto/main/ecc/test_ecc.c b/components/esp_hal_security/test_apps/crypto/main/ecc/test_ecc.c similarity index 99% rename from components/hal/test_apps/crypto/main/ecc/test_ecc.c rename to components/esp_hal_security/test_apps/crypto/main/ecc/test_ecc.c index b8fe24a7e5..d2a4043aa6 100644 --- a/components/hal/test_apps/crypto/main/ecc/test_ecc.c +++ b/components/esp_hal_security/test_apps/crypto/main/ecc/test_ecc.c @@ -704,7 +704,6 @@ TEST(ecc, ecc_mod_multiplication_using_SECP192R1_SECP256R1_SECP384R1_order_of_cu } #endif - TEST_GROUP_RUNNER(ecc) { #if SOC_ECC_SUPPORT_POINT_MULT diff --git a/components/hal/test_apps/crypto/main/ecdsa/ecdsa192_priv_key.pem b/components/esp_hal_security/test_apps/crypto/main/ecdsa/ecdsa192_priv_key.pem similarity index 100% rename from components/hal/test_apps/crypto/main/ecdsa/ecdsa192_priv_key.pem rename to components/esp_hal_security/test_apps/crypto/main/ecdsa/ecdsa192_priv_key.pem diff --git a/components/hal/test_apps/crypto/main/ecdsa/ecdsa256_priv_key.pem b/components/esp_hal_security/test_apps/crypto/main/ecdsa/ecdsa256_priv_key.pem similarity index 100% rename from components/hal/test_apps/crypto/main/ecdsa/ecdsa256_priv_key.pem rename to components/esp_hal_security/test_apps/crypto/main/ecdsa/ecdsa256_priv_key.pem diff --git a/components/hal/test_apps/crypto/main/ecdsa/ecdsa384_priv_key.pem b/components/esp_hal_security/test_apps/crypto/main/ecdsa/ecdsa384_priv_key.pem similarity index 100% rename from components/hal/test_apps/crypto/main/ecdsa/ecdsa384_priv_key.pem rename to components/esp_hal_security/test_apps/crypto/main/ecdsa/ecdsa384_priv_key.pem diff --git a/components/hal/test_apps/crypto/main/ecdsa/ecdsa_params.h b/components/esp_hal_security/test_apps/crypto/main/ecdsa/ecdsa_params.h similarity index 100% rename from components/hal/test_apps/crypto/main/ecdsa/ecdsa_params.h rename to components/esp_hal_security/test_apps/crypto/main/ecdsa/ecdsa_params.h diff --git a/components/hal/test_apps/crypto/main/ecdsa/test_ecdsa.c b/components/esp_hal_security/test_apps/crypto/main/ecdsa/test_ecdsa.c similarity index 84% rename from components/hal/test_apps/crypto/main/ecdsa/test_ecdsa.c rename to components/esp_hal_security/test_apps/crypto/main/ecdsa/test_ecdsa.c index 1053fe354c..62aa5c7396 100644 --- a/components/hal/test_apps/crypto/main/ecdsa/test_ecdsa.c +++ b/components/esp_hal_security/test_apps/crypto/main/ecdsa/test_ecdsa.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: CC0-1.0 */ @@ -74,22 +74,22 @@ int test_ecdsa_verify(ecdsa_curve_t curve, uint8_t* sha, uint8_t* r_le, uint8_t* }; switch (curve) { - case ECDSA_CURVE_SECP192R1: - conf.curve = ECDSA_CURVE_SECP192R1; - len = 24; - break; - case ECDSA_CURVE_SECP256R1: - conf.curve = ECDSA_CURVE_SECP256R1; - len = 32; - break; + case ECDSA_CURVE_SECP192R1: + conf.curve = ECDSA_CURVE_SECP192R1; + len = 24; + break; + case ECDSA_CURVE_SECP256R1: + conf.curve = ECDSA_CURVE_SECP256R1; + len = 32; + break; #if SOC_ECDSA_SUPPORT_CURVE_P384 - case ECDSA_CURVE_SECP384R1: - conf.curve = ECDSA_CURVE_SECP384R1; - len = 48; - break; + case ECDSA_CURVE_SECP384R1: + conf.curve = ECDSA_CURVE_SECP384R1; + len = 48; + break; #endif - default: - break; + default: + break; } /* Set HASH */ @@ -106,12 +106,12 @@ static void test_ecdsa_corrupt_data(ecdsa_curve_t curve, uint8_t* sha, uint8_t* int len = 0; switch (curve) { - case ECDSA_CURVE_SECP192R1: len = 24; break; - case ECDSA_CURVE_SECP256R1: len = 32; break; + case ECDSA_CURVE_SECP192R1: len = 24; break; + case ECDSA_CURVE_SECP256R1: len = 32; break; #if SOC_ECDSA_SUPPORT_CURVE_P384 - case ECDSA_CURVE_SECP384R1: len = 48; break; + case ECDSA_CURVE_SECP384R1: len = 48; break; #endif - default: break; + default: break; } // Randomly select a bit and corrupt its corresponding value @@ -160,33 +160,33 @@ void test_ecdsa_sign(ecdsa_curve_t curve, uint8_t* sha, uint8_t* r_le, uint8_t* .sign_type = k_type, }; switch (curve) { - case ECDSA_CURVE_SECP192R1: - conf.curve = ECDSA_CURVE_SECP192R1; - if (use_km_key == 0) { - conf.efuse_key_blk = EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_1; - } - len = 24; - break; - case ECDSA_CURVE_SECP256R1: - conf.curve = ECDSA_CURVE_SECP256R1; - if (use_km_key == 0) { - conf.efuse_key_blk = EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_2; - } - len = 32; - break; + case ECDSA_CURVE_SECP192R1: + conf.curve = ECDSA_CURVE_SECP192R1; + if (use_km_key == 0) { + conf.efuse_key_blk = EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_1; + } + len = 24; + break; + case ECDSA_CURVE_SECP256R1: + conf.curve = ECDSA_CURVE_SECP256R1; + if (use_km_key == 0) { + conf.efuse_key_blk = EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_2; + } + len = 32; + break; #if SOC_ECDSA_SUPPORT_CURVE_P384 - case ECDSA_CURVE_SECP384R1: - conf.curve = ECDSA_CURVE_SECP384R1; - if (use_km_key == 0) { - // Store two key blocks in a single 8-bit integer - // Most significant 4 bits for first block where, lower 4 bits for second block - conf.efuse_key_blk = HAL_ECDSA_COMBINE_KEY_BLOCKS(EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_3, EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_4); - } - len = 48; - break; + case ECDSA_CURVE_SECP384R1: + conf.curve = ECDSA_CURVE_SECP384R1; + if (use_km_key == 0) { + // Store two key blocks in a single 8-bit integer + // Most significant 4 bits for first block where, lower 4 bits for second block + conf.efuse_key_blk = HAL_ECDSA_COMBINE_KEY_BLOCKS(EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_3, EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_4); + } + len = 48; + break; #endif - default: - break; + default: + break; } /* Set HASH */ @@ -214,7 +214,7 @@ void test_ecdsa_sign(ecdsa_curve_t curve, uint8_t* sha, uint8_t* r_le, uint8_t* process_again |= !ecdsa_hal_det_signature_k_check(); } #endif /* SOC_ECDSA_SUPPORT_DETERMINISTIC_MODE && !SOC_ECDSA_SUPPORT_HW_DETERMINISTIC_LOOP */ - } while(process_again); + } while (process_again); ecdsa_disable(); } @@ -237,33 +237,33 @@ void test_ecdsa_export_pubkey_inner(ecdsa_curve_t curve, uint8_t *exported_pub_x }; switch (curve) { - case ECDSA_CURVE_SECP192R1: - conf.curve = ECDSA_CURVE_SECP192R1; - if (use_km_key == 0) { - conf.efuse_key_blk = EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_1; - } - *len = 24; - break; - case ECDSA_CURVE_SECP256R1: - conf.curve = ECDSA_CURVE_SECP256R1; - if (use_km_key == 0) { - conf.efuse_key_blk = EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_2; - } - *len = 32; - break; + case ECDSA_CURVE_SECP192R1: + conf.curve = ECDSA_CURVE_SECP192R1; + if (use_km_key == 0) { + conf.efuse_key_blk = EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_1; + } + *len = 24; + break; + case ECDSA_CURVE_SECP256R1: + conf.curve = ECDSA_CURVE_SECP256R1; + if (use_km_key == 0) { + conf.efuse_key_blk = EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_2; + } + *len = 32; + break; #if SOC_ECDSA_SUPPORT_CURVE_P384 - case ECDSA_CURVE_SECP384R1: - conf.curve = ECDSA_CURVE_SECP384R1; - if (use_km_key == 0) { - // Store two key blocks in a single 8-bit integer - // Most significant 4 bits for first block where, lower 4 bits for second block - conf.efuse_key_blk = HAL_ECDSA_COMBINE_KEY_BLOCKS(EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_3, EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_4); - } - *len = 48; - break; + case ECDSA_CURVE_SECP384R1: + conf.curve = ECDSA_CURVE_SECP384R1; + if (use_km_key == 0) { + // Store two key blocks in a single 8-bit integer + // Most significant 4 bits for first block where, lower 4 bits for second block + conf.efuse_key_blk = HAL_ECDSA_COMBINE_KEY_BLOCKS(EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_3, EFUSE_BLK_KEY0 + ECDSA_KEY_BLOCK_4); + } + *len = 48; + break; #endif - default: - break; + default: + break; } ecdsa_enable_and_reset(); diff --git a/components/hal/test_apps/crypto/main/hal_crypto_common.h b/components/esp_hal_security/test_apps/crypto/main/hal_crypto_common.h similarity index 100% rename from components/hal/test_apps/crypto/main/hal_crypto_common.h rename to components/esp_hal_security/test_apps/crypto/main/hal_crypto_common.h diff --git a/components/hal/test_apps/crypto/main/hmac/hmac_key.bin b/components/esp_hal_security/test_apps/crypto/main/hmac/hmac_key.bin similarity index 100% rename from components/hal/test_apps/crypto/main/hmac/hmac_key.bin rename to components/esp_hal_security/test_apps/crypto/main/hmac/hmac_key.bin diff --git a/components/hal/test_apps/crypto/main/hmac/hmac_params.h b/components/esp_hal_security/test_apps/crypto/main/hmac/hmac_params.h similarity index 82% rename from components/hal/test_apps/crypto/main/hmac/hmac_params.h rename to components/esp_hal_security/test_apps/crypto/main/hmac/hmac_params.h index b304935935..69aed7dab0 100644 --- a/components/hal/test_apps/crypto/main/hmac/hmac_params.h +++ b/components/esp_hal_security/test_apps/crypto/main/hmac/hmac_params.h @@ -21,843 +21,1150 @@ const char *message = "Deleniti voluptas explicabo et assumenda. Sed et aliquid 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 }, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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, + { + .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 }, }, }; diff --git a/components/hal/test_apps/crypto/main/hmac/test_hmac.c b/components/esp_hal_security/test_apps/crypto/main/hmac/test_hmac.c similarity index 89% rename from components/hal/test_apps/crypto/main/hmac/test_hmac.c rename to components/esp_hal_security/test_apps/crypto/main/hmac/test_hmac.c index 930d2a6566..0f7a8cdcfb 100644 --- a/components/hal/test_apps/crypto/main/hmac/test_hmac.c +++ b/components/esp_hal_security/test_apps/crypto/main/hmac/test_hmac.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -18,7 +18,8 @@ #include "hmac_params.h" #include "hal_crypto_common.h" -static ets_efuse_block_t convert_key_type(uint32_t key_id) { +static ets_efuse_block_t convert_key_type(uint32_t key_id) +{ return ETS_EFUSE_BLOCK_KEY0 + (ets_efuse_block_t) key_id; } @@ -39,7 +40,6 @@ static esp_err_t hmac_jtag_disable(void) #define SHA256_BLOCK_SZ 64 #define SHA256_PAD_SZ 8 - static esp_err_t hmac_jtag_enable(uint32_t key_id, const uint8_t *token) { int ets_status; @@ -128,11 +128,10 @@ esp_err_t hmac_calculate(uint32_t key_id, const void *message, size_t message_le #else /* !CONFIG_IDF_TARGET_ESP32S2 */ - static esp_err_t hmac_calculate(uint32_t key_id, - const void *message, - size_t message_len, - uint8_t *hmac) + const void *message, + size_t message_len, + uint8_t *hmac) { int hmac_ret; ets_hmac_enable(); @@ -188,17 +187,15 @@ TEST_TEAR_DOWN(hmac) TEST(hmac, hmac_downstream_jtag_enable_mode) { - TEST_ASSERT_EQUAL_HEX32_MESSAGE(ESP_OK, hmac_jtag_enable(HMAC_KEY_BLOCK_1, jtag_enable_token_data), - "JTAG should be re-enabled now, please manually verify"); + TEST_ASSERT_EQUAL_HEX32_MESSAGE(ESP_OK, hmac_jtag_enable(HMAC_KEY_BLOCK_1, 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_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]; @@ -210,12 +207,11 @@ TEST(hmac, hmac_upstream_mac_generation_with_zeroes) } } - TEST(hmac, hmac_upstream_MAC_generation_from_data) { uint8_t hmac[32]; - for (int i = 0; i < sizeof(results)/sizeof(hmac_result); i++) { + for (int i = 0; i < sizeof(results) / sizeof(hmac_result); i++) { TEST_ESP_OK(hmac_calculate(HMAC_KEY_BLOCK_2, message, results[i].msglen, hmac)); TEST_ASSERT_EQUAL_HEX8_ARRAY(results[i].result, hmac, sizeof(hmac)); } diff --git a/components/hal/test_apps/crypto/main/idf_component.yml b/components/esp_hal_security/test_apps/crypto/main/idf_component.yml similarity index 100% rename from components/hal/test_apps/crypto/main/idf_component.yml rename to components/esp_hal_security/test_apps/crypto/main/idf_component.yml diff --git a/components/hal/test_apps/crypto/main/key_manager/ecdsa_192_key.pem b/components/esp_hal_security/test_apps/crypto/main/key_manager/ecdsa_192_key.pem similarity index 100% rename from components/hal/test_apps/crypto/main/key_manager/ecdsa_192_key.pem rename to components/esp_hal_security/test_apps/crypto/main/key_manager/ecdsa_192_key.pem diff --git a/components/hal/test_apps/crypto/main/key_manager/ecdsa_256_key.pem b/components/esp_hal_security/test_apps/crypto/main/key_manager/ecdsa_256_key.pem similarity index 100% rename from components/hal/test_apps/crypto/main/key_manager/ecdsa_256_key.pem rename to components/esp_hal_security/test_apps/crypto/main/key_manager/ecdsa_256_key.pem diff --git a/components/hal/test_apps/crypto/main/key_manager/ecdsa_384_key.pem b/components/esp_hal_security/test_apps/crypto/main/key_manager/ecdsa_384_key.pem similarity index 100% rename from components/hal/test_apps/crypto/main/key_manager/ecdsa_384_key.pem rename to components/esp_hal_security/test_apps/crypto/main/key_manager/ecdsa_384_key.pem diff --git a/components/hal/test_apps/crypto/main/key_manager/gen_key_manager_test_cases.py b/components/esp_hal_security/test_apps/crypto/main/key_manager/gen_key_manager_test_cases.py similarity index 100% rename from components/hal/test_apps/crypto/main/key_manager/gen_key_manager_test_cases.py rename to components/esp_hal_security/test_apps/crypto/main/key_manager/gen_key_manager_test_cases.py diff --git a/components/hal/test_apps/crypto/main/key_manager/init_key.bin b/components/esp_hal_security/test_apps/crypto/main/key_manager/init_key.bin similarity index 100% rename from components/hal/test_apps/crypto/main/key_manager/init_key.bin rename to components/esp_hal_security/test_apps/crypto/main/key_manager/init_key.bin diff --git a/components/hal/test_apps/crypto/main/key_manager/k1.bin b/components/esp_hal_security/test_apps/crypto/main/key_manager/k1.bin similarity index 100% rename from components/hal/test_apps/crypto/main/key_manager/k1.bin rename to components/esp_hal_security/test_apps/crypto/main/key_manager/k1.bin diff --git a/components/hal/test_apps/crypto/main/key_manager/k1_64.bin b/components/esp_hal_security/test_apps/crypto/main/key_manager/k1_64.bin similarity index 100% rename from components/hal/test_apps/crypto/main/key_manager/k1_64.bin rename to components/esp_hal_security/test_apps/crypto/main/key_manager/k1_64.bin diff --git a/components/hal/test_apps/crypto/main/key_manager/k2.bin b/components/esp_hal_security/test_apps/crypto/main/key_manager/k2.bin similarity index 100% rename from components/hal/test_apps/crypto/main/key_manager/k2.bin rename to components/esp_hal_security/test_apps/crypto/main/key_manager/k2.bin diff --git a/components/hal/test_apps/crypto/main/key_manager/key_manager_test_cases.h b/components/esp_hal_security/test_apps/crypto/main/key_manager/key_manager_test_cases.h similarity index 87% rename from components/hal/test_apps/crypto/main/key_manager/key_manager_test_cases.h rename to components/esp_hal_security/test_apps/crypto/main/key_manager/key_manager_test_cases.h index b6742bd3a2..e87f74b1f9 100644 --- a/components/hal/test_apps/crypto/main/key_manager/key_manager_test_cases.h +++ b/components/esp_hal_security/test_apps/crypto/main/key_manager/key_manager_test_cases.h @@ -70,27 +70,27 @@ test_data_aes_mode_t test_data_xts_aes_128 = { .k1_encrypted = { { 0x37, 0xcf, 0x5b, 0x9e, 0x08, 0x26, 0x36, 0x31, 0xd7, 0x51, 0x3c, 0x33, 0x0d, 0x5d, 0x03, 0xad, 0x48, 0x6e, 0xbe, 0x82, 0xce, 0xa9, 0xc8, 0xd5, 0x98, 0x11, 0x24, 0xcc, 0x83, 0xf8, 0xf9, 0x53 }, { } }, .plaintext_data = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80 }, .xts_test_data = { - {.data_size = 32, .data_offset = 0x160000, .ciphertext = {0xba, 0xa3, 0xa4, 0x8f, 0x77, 0xac, 0xb5, 0x96, 0xc2, 0x9c, 0x76, 0xc3, 0x0f, 0x0e, 0xc5, 0xf1, 0xa8, 0x44, 0x4e, 0x05, 0x79, 0x0e, 0xa4, 0x1f, 0x72, 0x0a, 0xa5, 0xa9, 0xd8, 0x7c, 0xe8, 0xf5}}, - {.data_size = 64, .data_offset = 0x160100, .ciphertext = {0xf9, 0x09, 0x32, 0x28, 0xdc, 0x0b, 0x44, 0x8a, 0xbc, 0x06, 0x0e, 0xfb, 0x0e, 0x58, 0xfa, 0x3a, 0x16, 0x27, 0x41, 0xab, 0xde, 0xa7, 0x2b, 0xf5, 0xcc, 0xe0, 0x8c, 0xde, 0xda, 0x3b, 0x9b, 0x39, 0x04, 0xdf, 0x02, 0x5d, 0x87, 0xe8, 0x19, 0x2f, 0x87, 0x3a, 0x77, 0x00, 0x9c, 0x38, 0xb1, 0xfb, 0xae, 0xd8, 0xa7, 0x39, 0x4b, 0x89, 0x83, 0x4d, 0x4a, 0x9c, 0xee, 0x50, 0x3e, 0xd1, 0x64, 0xd2}}, - {.data_size = 128, .data_offset = 0x160200, .ciphertext = {0x03, 0xb0, 0xa3, 0x50, 0x55, 0x50, 0xdb, 0xc9, 0x6b, 0x39, 0xb2, 0x19, 0xd2, 0x57, 0xf8, 0x7b, 0x07, 0x3c, 0xe0, 0x01, 0xec, 0xc1, 0x38, 0x92, 0x8c, 0x96, 0x64, 0xbf, 0x18, 0xde, 0x12, 0x18, 0xa5, 0xca, 0x3a, 0x97, 0x6b, 0x7d, 0x0d, 0xe5, 0x15, 0xa1, 0x2d, 0x28, 0xdb, 0xb5, 0xe0, 0x2b, 0x7e, 0x6a, 0x9a, 0xe0, 0x16, 0x7b, 0xbf, 0x3c, 0x49, 0x05, 0x4e, 0x46, 0x92, 0x63, 0x7b, 0x49, 0x22, 0x60, 0x6a, 0xde, 0x96, 0x02, 0xd0, 0x24, 0x03, 0x69, 0x3b, 0xfe, 0x5f, 0xfe, 0xe4, 0x0c, 0xe3, 0x77, 0x40, 0x98, 0x43, 0xe9, 0x2a, 0xaf, 0x35, 0x57, 0x6f, 0x60, 0x08, 0x43, 0xd4, 0xb3, 0x7e, 0xb6, 0x2d, 0x19, 0x56, 0xc3, 0x94, 0x49, 0x93, 0x94, 0x3d, 0x8a, 0xf9, 0xbe, 0xb4, 0x19, 0x63, 0x20, 0x09, 0xae, 0x45, 0x00, 0x33, 0x4e, 0xa4, 0xbf, 0x09, 0x74, 0x78, 0x03, 0x13, 0x0b}}, - {.data_size = 16, .data_offset = 0x160300, .ciphertext = {0x8c, 0x37, 0x62, 0x84, 0x37, 0xb0, 0x80, 0x0f, 0xf2, 0xb2, 0xa8, 0x1b, 0x1e, 0x7f, 0xeb, 0x1b}}, - {.data_size = 32, .data_offset = 0x160400, .ciphertext = {0x05, 0x19, 0x1b, 0x8f, 0x30, 0xf1, 0x4d, 0x74, 0xc6, 0xf1, 0x3d, 0x9c, 0xcb, 0xbe, 0x7d, 0x06, 0x1a, 0xf4, 0xdd, 0x41, 0x23, 0x1e, 0x61, 0xe0, 0xaa, 0x14, 0x6a, 0x16, 0xac, 0x4c, 0x01, 0x67}}, - } + {.data_size = 32, .data_offset = 0x160000, .ciphertext = {0xba, 0xa3, 0xa4, 0x8f, 0x77, 0xac, 0xb5, 0x96, 0xc2, 0x9c, 0x76, 0xc3, 0x0f, 0x0e, 0xc5, 0xf1, 0xa8, 0x44, 0x4e, 0x05, 0x79, 0x0e, 0xa4, 0x1f, 0x72, 0x0a, 0xa5, 0xa9, 0xd8, 0x7c, 0xe8, 0xf5}}, + {.data_size = 64, .data_offset = 0x160100, .ciphertext = {0xf9, 0x09, 0x32, 0x28, 0xdc, 0x0b, 0x44, 0x8a, 0xbc, 0x06, 0x0e, 0xfb, 0x0e, 0x58, 0xfa, 0x3a, 0x16, 0x27, 0x41, 0xab, 0xde, 0xa7, 0x2b, 0xf5, 0xcc, 0xe0, 0x8c, 0xde, 0xda, 0x3b, 0x9b, 0x39, 0x04, 0xdf, 0x02, 0x5d, 0x87, 0xe8, 0x19, 0x2f, 0x87, 0x3a, 0x77, 0x00, 0x9c, 0x38, 0xb1, 0xfb, 0xae, 0xd8, 0xa7, 0x39, 0x4b, 0x89, 0x83, 0x4d, 0x4a, 0x9c, 0xee, 0x50, 0x3e, 0xd1, 0x64, 0xd2}}, + {.data_size = 128, .data_offset = 0x160200, .ciphertext = {0x03, 0xb0, 0xa3, 0x50, 0x55, 0x50, 0xdb, 0xc9, 0x6b, 0x39, 0xb2, 0x19, 0xd2, 0x57, 0xf8, 0x7b, 0x07, 0x3c, 0xe0, 0x01, 0xec, 0xc1, 0x38, 0x92, 0x8c, 0x96, 0x64, 0xbf, 0x18, 0xde, 0x12, 0x18, 0xa5, 0xca, 0x3a, 0x97, 0x6b, 0x7d, 0x0d, 0xe5, 0x15, 0xa1, 0x2d, 0x28, 0xdb, 0xb5, 0xe0, 0x2b, 0x7e, 0x6a, 0x9a, 0xe0, 0x16, 0x7b, 0xbf, 0x3c, 0x49, 0x05, 0x4e, 0x46, 0x92, 0x63, 0x7b, 0x49, 0x22, 0x60, 0x6a, 0xde, 0x96, 0x02, 0xd0, 0x24, 0x03, 0x69, 0x3b, 0xfe, 0x5f, 0xfe, 0xe4, 0x0c, 0xe3, 0x77, 0x40, 0x98, 0x43, 0xe9, 0x2a, 0xaf, 0x35, 0x57, 0x6f, 0x60, 0x08, 0x43, 0xd4, 0xb3, 0x7e, 0xb6, 0x2d, 0x19, 0x56, 0xc3, 0x94, 0x49, 0x93, 0x94, 0x3d, 0x8a, 0xf9, 0xbe, 0xb4, 0x19, 0x63, 0x20, 0x09, 0xae, 0x45, 0x00, 0x33, 0x4e, 0xa4, 0xbf, 0x09, 0x74, 0x78, 0x03, 0x13, 0x0b}}, + {.data_size = 16, .data_offset = 0x160300, .ciphertext = {0x8c, 0x37, 0x62, 0x84, 0x37, 0xb0, 0x80, 0x0f, 0xf2, 0xb2, 0xa8, 0x1b, 0x1e, 0x7f, 0xeb, 0x1b}}, + {.data_size = 32, .data_offset = 0x160400, .ciphertext = {0x05, 0x19, 0x1b, 0x8f, 0x30, 0xf1, 0x4d, 0x74, 0xc6, 0xf1, 0x3d, 0x9c, 0xcb, 0xbe, 0x7d, 0x06, 0x1a, 0xf4, 0xdd, 0x41, 0x23, 0x1e, 0x61, 0xe0, 0xaa, 0x14, 0x6a, 0x16, 0xac, 0x4c, 0x01, 0x67}}, + } }; // For 64-byte k1 key test_data_aes_mode_t test_data_xts_aes_256 = { - .init_key = {0xee, 0x89, 0x95, 0xda, 0x3c, 0x8a, 0x43, 0x83, 0xa9, 0x4b, 0x25, 0x5b, 0x04, 0x7e, 0xf1, 0x57, 0xb8, 0xe8, 0x06, 0x45, 0x87, 0x76, 0xee, 0x1b, 0x4e, 0x2e, 0x55, 0xa7, 0x1f, 0x25, 0xe1, 0x94}, - .k2_info = {0x8f, 0x96, 0x33, 0x47, 0xe1, 0xa5, 0x57, 0xe9, 0x2a, 0x51, 0xa9, 0xbe, 0x48, 0x84, 0x25, 0x4e, 0x6f, 0x50, 0x1c, 0x45, 0xdb, 0xb6, 0xfa, 0xeb, 0x35, 0xd2, 0x27, 0x91, 0x3f, 0x67, 0x57, 0xd9, 0xcb, 0x55, 0xe4, 0x2b, 0x18, 0x16, 0xe7, 0xce, 0x6c, 0xf2, 0x58, 0x71, 0x17, 0x76, 0x2a, 0x86, 0x05, 0xe7, 0x37, 0x45, 0x71, 0x34, 0xca, 0xaf, 0x60, 0x07, 0xdf, 0xf4, 0xd2, 0xee, 0x3d, 0x4b}, - .k1_encrypted = {{0x37, 0xcf, 0x5b, 0x9e, 0x08, 0x26, 0x36, 0x31, 0xd7, 0x51, 0x3c, 0x33, 0x0d, 0x5d, 0x03, 0xad, 0x48, 0x6e, 0xbe, 0x82, 0xce, 0xa9, 0xc8, 0xd5, 0x98, 0x11, 0x24, 0xcc, 0x83, 0xf8, 0xf9, 0x53}, {0x84, 0xf7, 0x09, 0x06, 0xa3, 0xf2, 0xc7, 0x5f, 0x08, 0x43, 0xfd, 0xe9, 0x2e, 0xab, 0x32, 0xf3, 0x31, 0xd4, 0x4f, 0xf4, 0xf6, 0x1d, 0xa1, 0xc7, 0x1f, 0x2c, 0x11, 0xca, 0x9f, 0x21, 0x26, 0xaa}}, - .plaintext_data = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80}, + .init_key = {0xee, 0x89, 0x95, 0xda, 0x3c, 0x8a, 0x43, 0x83, 0xa9, 0x4b, 0x25, 0x5b, 0x04, 0x7e, 0xf1, 0x57, 0xb8, 0xe8, 0x06, 0x45, 0x87, 0x76, 0xee, 0x1b, 0x4e, 0x2e, 0x55, 0xa7, 0x1f, 0x25, 0xe1, 0x94}, + .k2_info = {0x8f, 0x96, 0x33, 0x47, 0xe1, 0xa5, 0x57, 0xe9, 0x2a, 0x51, 0xa9, 0xbe, 0x48, 0x84, 0x25, 0x4e, 0x6f, 0x50, 0x1c, 0x45, 0xdb, 0xb6, 0xfa, 0xeb, 0x35, 0xd2, 0x27, 0x91, 0x3f, 0x67, 0x57, 0xd9, 0xcb, 0x55, 0xe4, 0x2b, 0x18, 0x16, 0xe7, 0xce, 0x6c, 0xf2, 0x58, 0x71, 0x17, 0x76, 0x2a, 0x86, 0x05, 0xe7, 0x37, 0x45, 0x71, 0x34, 0xca, 0xaf, 0x60, 0x07, 0xdf, 0xf4, 0xd2, 0xee, 0x3d, 0x4b}, + .k1_encrypted = {{0x37, 0xcf, 0x5b, 0x9e, 0x08, 0x26, 0x36, 0x31, 0xd7, 0x51, 0x3c, 0x33, 0x0d, 0x5d, 0x03, 0xad, 0x48, 0x6e, 0xbe, 0x82, 0xce, 0xa9, 0xc8, 0xd5, 0x98, 0x11, 0x24, 0xcc, 0x83, 0xf8, 0xf9, 0x53}, {0x84, 0xf7, 0x09, 0x06, 0xa3, 0xf2, 0xc7, 0x5f, 0x08, 0x43, 0xfd, 0xe9, 0x2e, 0xab, 0x32, 0xf3, 0x31, 0xd4, 0x4f, 0xf4, 0xf6, 0x1d, 0xa1, 0xc7, 0x1f, 0x2c, 0x11, 0xca, 0x9f, 0x21, 0x26, 0xaa}}, + .plaintext_data = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80}, .xts_test_data = { - {.data_size = 32, .data_offset = 0x160000, .ciphertext = {0x3d, 0xab, 0x5b, 0x96, 0x8f, 0xa5, 0x5b, 0x6f, 0xcb, 0x82, 0xcb, 0x3a, 0x94, 0xa0, 0xa6, 0x3e, 0xc6, 0x59, 0xde, 0x61, 0x0e, 0xb4, 0x8f, 0x99, 0x03, 0xff, 0xaf, 0x24, 0x11, 0x6e, 0x3b, 0x3b}}, - {.data_size = 64, .data_offset = 0x160100, .ciphertext = {0x75, 0xaa, 0x68, 0xcd, 0x98, 0x29, 0x70, 0xe2, 0xaf, 0xb2, 0x7c, 0x39, 0x0a, 0x50, 0xac, 0x08, 0x01, 0x71, 0x7a, 0xdb, 0x1f, 0x04, 0xb8, 0x5e, 0x4d, 0x8d, 0x4c, 0xc4, 0x0d, 0xde, 0xcf, 0x5e, 0x1f, 0xa0, 0xfb, 0x74, 0xf6, 0xb2, 0x51, 0xe0, 0x69, 0x84, 0x47, 0x61, 0x71, 0xc5, 0x92, 0x8c, 0x12, 0x69, 0x77, 0xfb, 0xdf, 0xe8, 0xd2, 0x86, 0xc3, 0xbc, 0xd2, 0x2d, 0x8c, 0xbc, 0x4b, 0x59}}, - {.data_size = 128, .data_offset = 0x160200, .ciphertext = {0xb9, 0x2b, 0xf5, 0x02, 0x84, 0xba, 0x1b, 0xda, 0xf8, 0x85, 0x2c, 0xba, 0x36, 0x42, 0x16, 0xa7, 0x83, 0x22, 0x37, 0xab, 0x41, 0x9d, 0x84, 0xde, 0x81, 0x4c, 0xa5, 0x2e, 0x40, 0x65, 0xd2, 0xc9, 0x30, 0x81, 0x5c, 0x61, 0x86, 0x22, 0xc3, 0xec, 0xf7, 0x7f, 0x66, 0x02, 0x73, 0x7b, 0xf2, 0x22, 0x17, 0x6d, 0x41, 0x90, 0xda, 0xb1, 0x4e, 0x2f, 0xbe, 0xe2, 0x0b, 0x22, 0x4e, 0xb4, 0x6a, 0x90, 0x13, 0x1f, 0x9b, 0xf2, 0x78, 0x03, 0x4f, 0xb5, 0x37, 0x62, 0x6d, 0x01, 0x56, 0xfc, 0xe3, 0xfa, 0xe7, 0x19, 0xbf, 0x81, 0x05, 0x9d, 0x7f, 0xef, 0xbe, 0xe4, 0x3a, 0xa8, 0xa0, 0x98, 0x74, 0x68, 0x10, 0xe4, 0x95, 0x7a, 0x93, 0xf0, 0x75, 0x68, 0x09, 0xf3, 0x63, 0xe9, 0x1a, 0xbb, 0x2a, 0xf4, 0x1e, 0xa0, 0x45, 0x61, 0x5b, 0x1f, 0x2d, 0x08, 0xfd, 0xed, 0x79, 0x61, 0x11, 0xad, 0x57, 0xb6}}, - {.data_size = 16, .data_offset = 0x160300, .ciphertext = {0x0f, 0x8f, 0xff, 0x33, 0x23, 0x1c, 0x63, 0x5f, 0xae, 0x91, 0x87, 0x13, 0x5d, 0x27, 0xd0, 0xef}}, - {.data_size = 32, .data_offset = 0x160400, .ciphertext = {0x29, 0x23, 0x17, 0x47, 0xb3, 0xd3, 0x19, 0xf4, 0x9d, 0x6b, 0x3c, 0x82, 0x49, 0x83, 0x25, 0x7a, 0x3d, 0xfc, 0x51, 0xca, 0x7c, 0x96, 0x5e, 0x1e, 0xcf, 0x7a, 0x85, 0x99, 0x0c, 0x33, 0x17, 0xe4}}, - } + {.data_size = 32, .data_offset = 0x160000, .ciphertext = {0x3d, 0xab, 0x5b, 0x96, 0x8f, 0xa5, 0x5b, 0x6f, 0xcb, 0x82, 0xcb, 0x3a, 0x94, 0xa0, 0xa6, 0x3e, 0xc6, 0x59, 0xde, 0x61, 0x0e, 0xb4, 0x8f, 0x99, 0x03, 0xff, 0xaf, 0x24, 0x11, 0x6e, 0x3b, 0x3b}}, + {.data_size = 64, .data_offset = 0x160100, .ciphertext = {0x75, 0xaa, 0x68, 0xcd, 0x98, 0x29, 0x70, 0xe2, 0xaf, 0xb2, 0x7c, 0x39, 0x0a, 0x50, 0xac, 0x08, 0x01, 0x71, 0x7a, 0xdb, 0x1f, 0x04, 0xb8, 0x5e, 0x4d, 0x8d, 0x4c, 0xc4, 0x0d, 0xde, 0xcf, 0x5e, 0x1f, 0xa0, 0xfb, 0x74, 0xf6, 0xb2, 0x51, 0xe0, 0x69, 0x84, 0x47, 0x61, 0x71, 0xc5, 0x92, 0x8c, 0x12, 0x69, 0x77, 0xfb, 0xdf, 0xe8, 0xd2, 0x86, 0xc3, 0xbc, 0xd2, 0x2d, 0x8c, 0xbc, 0x4b, 0x59}}, + {.data_size = 128, .data_offset = 0x160200, .ciphertext = {0xb9, 0x2b, 0xf5, 0x02, 0x84, 0xba, 0x1b, 0xda, 0xf8, 0x85, 0x2c, 0xba, 0x36, 0x42, 0x16, 0xa7, 0x83, 0x22, 0x37, 0xab, 0x41, 0x9d, 0x84, 0xde, 0x81, 0x4c, 0xa5, 0x2e, 0x40, 0x65, 0xd2, 0xc9, 0x30, 0x81, 0x5c, 0x61, 0x86, 0x22, 0xc3, 0xec, 0xf7, 0x7f, 0x66, 0x02, 0x73, 0x7b, 0xf2, 0x22, 0x17, 0x6d, 0x41, 0x90, 0xda, 0xb1, 0x4e, 0x2f, 0xbe, 0xe2, 0x0b, 0x22, 0x4e, 0xb4, 0x6a, 0x90, 0x13, 0x1f, 0x9b, 0xf2, 0x78, 0x03, 0x4f, 0xb5, 0x37, 0x62, 0x6d, 0x01, 0x56, 0xfc, 0xe3, 0xfa, 0xe7, 0x19, 0xbf, 0x81, 0x05, 0x9d, 0x7f, 0xef, 0xbe, 0xe4, 0x3a, 0xa8, 0xa0, 0x98, 0x74, 0x68, 0x10, 0xe4, 0x95, 0x7a, 0x93, 0xf0, 0x75, 0x68, 0x09, 0xf3, 0x63, 0xe9, 0x1a, 0xbb, 0x2a, 0xf4, 0x1e, 0xa0, 0x45, 0x61, 0x5b, 0x1f, 0x2d, 0x08, 0xfd, 0xed, 0x79, 0x61, 0x11, 0xad, 0x57, 0xb6}}, + {.data_size = 16, .data_offset = 0x160300, .ciphertext = {0x0f, 0x8f, 0xff, 0x33, 0x23, 0x1c, 0x63, 0x5f, 0xae, 0x91, 0x87, 0x13, 0x5d, 0x27, 0xd0, 0xef}}, + {.data_size = 32, .data_offset = 0x160400, .ciphertext = {0x29, 0x23, 0x17, 0x47, 0xb3, 0xd3, 0x19, 0xf4, 0x9d, 0x6b, 0x3c, 0x82, 0x49, 0x83, 0x25, 0x7a, 0x3d, 0xfc, 0x51, 0xca, 0x7c, 0x96, 0x5e, 0x1e, 0xcf, 0x7a, 0x85, 0x99, 0x0c, 0x33, 0x17, 0xe4}}, + } }; test_data_aes_mode_t test_data_ecdsa = { diff --git a/components/hal/test_apps/crypto/main/key_manager/rand_num.bin b/components/esp_hal_security/test_apps/crypto/main/key_manager/rand_num.bin similarity index 100% rename from components/hal/test_apps/crypto/main/key_manager/rand_num.bin rename to components/esp_hal_security/test_apps/crypto/main/key_manager/rand_num.bin diff --git a/components/hal/test_apps/crypto/main/key_manager/test_key_manager.c b/components/esp_hal_security/test_apps/crypto/main/key_manager/test_key_manager.c similarity index 97% rename from components/hal/test_apps/crypto/main/key_manager/test_key_manager.c rename to components/esp_hal_security/test_apps/crypto/main/key_manager/test_key_manager.c index 9d2f2ea085..4222b36f32 100644 --- a/components/hal/test_apps/crypto/main/key_manager/test_key_manager.c +++ b/components/esp_hal_security/test_apps/crypto/main/key_manager/test_key_manager.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -247,23 +247,23 @@ void key_mgr_test_ecdsa_key(esp_key_mgr_key_len_t key_len, ecdsa_sign_type_t k_t ecdsa_curve_t curve = ECDSA_CURVE_SECP192R1; switch (key_len) { - case ESP_KEY_MGR_ECDSA_LEN_192: - sha_digest_len = 24; - curve = ECDSA_CURVE_SECP192R1; - break; - case ESP_KEY_MGR_ECDSA_LEN_256: - sha_digest_len = 32; - curve = ECDSA_CURVE_SECP256R1; - break; + case ESP_KEY_MGR_ECDSA_LEN_192: + sha_digest_len = 24; + curve = ECDSA_CURVE_SECP192R1; + break; + case ESP_KEY_MGR_ECDSA_LEN_256: + sha_digest_len = 32; + curve = ECDSA_CURVE_SECP256R1; + break; #if SOC_ECDSA_SUPPORT_CURVE_P384 - case ESP_KEY_MGR_ECDSA_LEN_384: - sha_digest_len = 48; - curve = ECDSA_CURVE_SECP384R1; - break; + case ESP_KEY_MGR_ECDSA_LEN_384: + sha_digest_len = 48; + curve = ECDSA_CURVE_SECP384R1; + break; #endif - default: - TEST_FAIL_MESSAGE("Unsupported key length"); - return; + default: + TEST_FAIL_MESSAGE("Unsupported key length"); + return; } test_ecdsa_sign(curve, sha_digest, r_le, s_le, 1, k_type); @@ -296,8 +296,7 @@ static void key_mgr_test_ecdsa_key_aes_mode(esp_key_mgr_key_len_t key_len, test_ pub_x = test_data->ecdsa_test_data.ecdsa_p192_pubx; pub_y = test_data->ecdsa_test_data.ecdsa_p192_puby; curve = ECDSA_CURVE_SECP192R1; - } - else if (key_len == ESP_KEY_MGR_ECDSA_LEN_256) { + } else if (key_len == ESP_KEY_MGR_ECDSA_LEN_256) { memcpy(key_config.k1_encrypted[0], (uint8_t*) test_data->k1_encrypted[1], KEY_MGR_K1_ENCRYPTED_SIZE); pub_x = test_data->ecdsa_test_data.ecdsa_p256_pubx; pub_y = test_data->ecdsa_test_data.ecdsa_p256_puby; @@ -467,9 +466,9 @@ static void key_mgr_test_hmac_random_mode(void) #if SOC_KEY_MANAGER_DS_KEY_DEPLOY extern esp_err_t esp_ds_sign(const void *message, - const esp_ds_data_t *data, - uint32_t key_id, - void *signature); + const esp_ds_data_t *data, + uint32_t key_id, + void *signature); static void key_mgr_test_ds_key_aes_mode(test_data_aes_mode_t *test_data) { diff --git a/components/hal/test_apps/crypto/main/mpi/mpi_params.h b/components/esp_hal_security/test_apps/crypto/main/mpi/mpi_params.h similarity index 99% rename from components/hal/test_apps/crypto/main/mpi/mpi_params.h rename to components/esp_hal_security/test_apps/crypto/main/mpi/mpi_params.h index ed3959b62a..704f3fcf55 100644 --- a/components/hal/test_apps/crypto/main/mpi/mpi_params.h +++ b/components/esp_hal_security/test_apps/crypto/main/mpi/mpi_params.h @@ -123,8 +123,6 @@ size_t test_cases_num_words[TEST_CASES_NUM] = { 16, 32, 48, 64, 80, 96, 32, 96, 48, 64, 96, }; - - #define EXP_TEST_CASES_NUM 33 const uint32_t exp_M_p_1[] = { 0xffffffff,}; diff --git a/components/hal/test_apps/crypto/main/mpi/test_mpi.c b/components/esp_hal_security/test_apps/crypto/main/mpi/test_mpi.c similarity index 89% rename from components/hal/test_apps/crypto/main/mpi/test_mpi.c rename to components/esp_hal_security/test_apps/crypto/main/mpi/test_mpi.c index d0c971e9f1..3b1c8c1797 100644 --- a/components/hal/test_apps/crypto/main/mpi/test_mpi.c +++ b/components/esp_hal_security/test_apps/crypto/main/mpi/test_mpi.c @@ -23,24 +23,22 @@ #define _DEBUG_ 0 -static void esp_mpi_enable_hardware_hw_op( void ) +static void esp_mpi_enable_hardware_hw_op(void) { esp_crypto_mpi_enable_periph_clk(true); mpi_hal_enable_hardware_hw_op(); } - -static void esp_mpi_disable_hardware_hw_op( void ) +static void esp_mpi_disable_hardware_hw_op(void) { mpi_hal_disable_hardware_hw_op(); esp_crypto_mpi_enable_periph_clk(false); } - static void mpi_mul_mpi_mod_hw_op(void) { esp_mpi_enable_hardware_hw_op(); - for(int i = 0; i < TEST_CASES_NUM; i++){ + for (int i = 0; i < TEST_CASES_NUM; i++) { #if CONFIG_IDF_TARGET_ESP32 mpi_hal_set_mode((test_cases_num_words[i] / 16) - 1); #else @@ -70,12 +68,12 @@ static void mpi_mul_mpi_mod_hw_op(void) uint32_t* Z_p = (uint32_t*)heap_caps_calloc(test_cases_Z_words[i], sizeof(uint32_t), MALLOC_CAP_INTERNAL); mpi_hal_read_result_hw_op(Z_p, test_cases_Z_words[i], test_cases_Z_words[i]); - printf("Test Case %d: ", i+1); + printf("Test Case %d: ", i + 1); #if _DEBUG_ printf("\n"); - ESP_LOG_BUFFER_HEX("Expected Z:", test_cases_Z_p[i], test_cases_Z_words[i]*4); - ESP_LOG_BUFFER_HEX("Got Z:", Z_p, test_cases_Z_words[i]*4); + ESP_LOG_BUFFER_HEX("Expected Z:", test_cases_Z_p[i], test_cases_Z_words[i] * 4); + ESP_LOG_BUFFER_HEX("Got Z:", Z_p, test_cases_Z_words[i] * 4); #endif TEST_ASSERT_EQUAL_HEX32_ARRAY_MESSAGE(test_cases_Z_p[i], Z_p, test_cases_Z_words[i], "Result"); @@ -85,13 +83,13 @@ static void mpi_mul_mpi_mod_hw_op(void) esp_mpi_disable_hardware_hw_op(); } - static void mpi_exp_mpi_mod_hw_op(void) { for (int i = 0; i < EXP_TEST_CASES_NUM; i++) { - if (i == 14 || i == 16 || i == 18 || i == 22) // cases when Y == 0 (in Z = X ^ Y mod M) should be handled in the software level + if (i == 14 || i == 16 || i == 18 || i == 22) { // cases when Y == 0 (in Z = X ^ Y mod M) should be handled in the software level continue; + } #ifdef ESP_MPI_USE_MONT_EXP // CONFIG_IDF_TARGET_ESP32 printf("Support for montgomery exponentiation to be added.\n"); break; @@ -121,12 +119,12 @@ static void mpi_exp_mpi_mod_hw_op(void) mpi_hal_read_result_hw_op(Z_p, exp_test_cases_m_words[i], exp_test_cases_m_words[i]); esp_mpi_disable_hardware_hw_op(); - printf("Test Case %d: ", i+1); + printf("Test Case %d: ", i + 1); #if _DEBUG_ printf("\n"); - ESP_LOG_BUFFER_HEX("Expected Z:", test_cases_Z_p[i], test_cases_Z_words[i]*4); - ESP_LOG_BUFFER_HEX("Got Z:", Z_p, test_cases_Z_words[i]*4); + ESP_LOG_BUFFER_HEX("Expected Z:", test_cases_Z_p[i], test_cases_Z_words[i] * 4); + ESP_LOG_BUFFER_HEX("Got Z:", Z_p, test_cases_Z_words[i] * 4); #endif TEST_ASSERT_EQUAL_HEX32_ARRAY_MESSAGE(exp_test_cases_Z_p[i], Z_p, exp_test_cases_m_words[i], "Result"); diff --git a/components/hal/test_apps/crypto/main/sha/include/sha_block.h b/components/esp_hal_security/test_apps/crypto/main/sha/include/sha_block.h similarity index 100% rename from components/hal/test_apps/crypto/main/sha/include/sha_block.h rename to components/esp_hal_security/test_apps/crypto/main/sha/include/sha_block.h diff --git a/components/hal/test_apps/crypto/main/sha/include/sha_dma.h b/components/esp_hal_security/test_apps/crypto/main/sha/include/sha_dma.h similarity index 100% rename from components/hal/test_apps/crypto/main/sha/include/sha_dma.h rename to components/esp_hal_security/test_apps/crypto/main/sha/include/sha_dma.h diff --git a/components/hal/test_apps/crypto/main/sha/include/test_params.h b/components/esp_hal_security/test_apps/crypto/main/sha/include/test_params.h similarity index 99% rename from components/hal/test_apps/crypto/main/sha/include/test_params.h rename to components/esp_hal_security/test_apps/crypto/main/sha/include/test_params.h index a947440968..5f290cea88 100644 --- a/components/hal/test_apps/crypto/main/sha/include/test_params.h +++ b/components/esp_hal_security/test_apps/crypto/main/sha/include/test_params.h @@ -57,7 +57,6 @@ typedef struct { #endif /* defined(SOC_SHA_SUPPORT_SHA1) */ - #if defined(SOC_SHA_SUPPORT_SHA224) || defined(SOC_SHA_SUPPORT_SHA256) static const unsigned char sha256_padding[64] = { diff --git a/components/hal/test_apps/crypto/main/sha/sha_block.c b/components/esp_hal_security/test_apps/crypto/main/sha/sha_block.c similarity index 76% rename from components/hal/test_apps/crypto/main/sha/sha_block.c rename to components/esp_hal_security/test_apps/crypto/main/sha/sha_block.c index e18745f25d..a6b971ebe4 100644 --- a/components/hal/test_apps/crypto/main/sha/sha_block.c +++ b/components/esp_hal_security/test_apps/crypto/main/sha/sha_block.c @@ -54,19 +54,19 @@ static void sha1_update_block(sha1_ctx* ctx, esp_sha_type sha_type, const unsign ctx->total[0] += (uint32_t) ilen; ctx->total[0] &= 0xFFFFFFFF; - if ( ctx->total[0] < (uint32_t) ilen ) { + if (ctx->total[0] < (uint32_t) ilen) { ctx->total[1]++; } - if ( left && ilen >= fill ) { - memcpy( (void *) (ctx->buffer + left), input, fill ); + if (left && ilen >= fill) { + memcpy((void *)(ctx->buffer + left), input, fill); input += fill; ilen -= fill; left = 0; local_len = 64; } - if ( (ilen >= 64) || local_len) { + if ((ilen >= 64) || local_len) { /* Enable peripheral module */ esp_crypto_sha_enable_periph_clk(true); @@ -79,16 +79,16 @@ static void sha1_update_block(sha1_ctx* ctx, esp_sha_type sha_type, const unsign } /* First process buffered block, if any */ - if ( local_len ) { + if (local_len) { /* Hash a single block */ - sha_hal_hash_block(sha_type, ctx->buffer, block_length(sha_type)/4, ctx->first_block); + sha_hal_hash_block(sha_type, ctx->buffer, block_length(sha_type) / 4, ctx->first_block); if (ctx->first_block == 1) { ctx->first_block = 0; } } - while ( ilen >= 64 ) { - sha_hal_hash_block(sha_type, input, block_length(sha_type)/4, ctx->first_block); + while (ilen >= 64) { + sha_hal_hash_block(sha_type, input, block_length(sha_type) / 4, ctx->first_block); if (ctx->first_block == 1) { ctx->first_block = 0; } @@ -103,8 +103,8 @@ static void sha1_update_block(sha1_ctx* ctx, esp_sha_type sha_type, const unsign esp_crypto_sha_enable_periph_clk(false); } - if ( ilen > 0 ) { - memcpy( (void *) (ctx->buffer + left), input, ilen); + if (ilen > 0) { + memcpy((void *)(ctx->buffer + left), input, ilen); } } @@ -121,15 +121,15 @@ void sha1_block(esp_sha_type sha_type, const unsigned char *input, size_t ilen, uint32_t high, low; unsigned char msglen[8]; - high = ( ctx.total[0] >> 29 ) - | ( ctx.total[1] << 3 ); - low = ( ctx.total[0] << 3 ); + high = (ctx.total[0] >> 29) + | (ctx.total[1] << 3); + low = (ctx.total[0] << 3); - PUT_UINT32_BE( high, msglen, 0 ); - PUT_UINT32_BE( low, msglen, 4 ); + PUT_UINT32_BE(high, msglen, 0); + PUT_UINT32_BE(low, msglen, 4); last = ctx.total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); + padn = (last < 56) ? (56 - last) : (120 - last); sha1_update_block(&ctx, sha_type, sha1_padding, padn); @@ -153,19 +153,19 @@ static void sha256_update_block(sha256_ctx* ctx, esp_sha_type sha_type, const un ctx->total[0] += (uint32_t) ilen; ctx->total[0] &= 0xFFFFFFFF; - if ( ctx->total[0] < (uint32_t) ilen ) { + if (ctx->total[0] < (uint32_t) ilen) { ctx->total[1]++; } - if ( left && ilen >= fill ) { - memcpy( (void *) (ctx->buffer + left), input, fill ); + if (left && ilen >= fill) { + memcpy((void *)(ctx->buffer + left), input, fill); input += fill; ilen -= fill; left = 0; local_len = 64; } - if ( (ilen >= 64) || local_len) { + if ((ilen >= 64) || local_len) { /* Enable peripheral module */ esp_crypto_sha_enable_periph_clk(true); @@ -178,16 +178,16 @@ static void sha256_update_block(sha256_ctx* ctx, esp_sha_type sha_type, const un } /* First process buffered block, if any */ - if ( local_len ) { + if (local_len) { /* Hash a single block */ - sha_hal_hash_block(sha_type, ctx->buffer, block_length(sha_type)/4, ctx->first_block); + sha_hal_hash_block(sha_type, ctx->buffer, block_length(sha_type) / 4, ctx->first_block); if (ctx->first_block == 1) { ctx->first_block = 0; } } - while ( ilen >= 64 ) { - sha_hal_hash_block(sha_type, input, block_length(sha_type)/4, ctx->first_block); + while (ilen >= 64) { + sha_hal_hash_block(sha_type, input, block_length(sha_type) / 4, ctx->first_block); if (ctx->first_block == 1) { ctx->first_block = 0; } @@ -202,8 +202,8 @@ static void sha256_update_block(sha256_ctx* ctx, esp_sha_type sha_type, const un esp_crypto_sha_enable_periph_clk(false); } - if ( ilen > 0 ) { - memcpy( (void *) (ctx->buffer + left), input, ilen); + if (ilen > 0) { + memcpy((void *)(ctx->buffer + left), input, ilen); } } @@ -220,15 +220,15 @@ void sha256_block(esp_sha_type sha_type, const unsigned char *input, size_t ilen uint32_t high, low; unsigned char msglen[8]; - high = ( ctx.total[0] >> 29 ) - | ( ctx.total[1] << 3 ); - low = ( ctx.total[0] << 3 ); + high = (ctx.total[0] >> 29) + | (ctx.total[1] << 3); + low = (ctx.total[0] << 3); - PUT_UINT32_BE( high, msglen, 0 ); - PUT_UINT32_BE( low, msglen, 4 ); + PUT_UINT32_BE(high, msglen, 0); + PUT_UINT32_BE(low, msglen, 4); last = ctx.total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); + padn = (last < 56) ? (56 - last) : (120 - last); sha256_update_block(&ctx, sha_type, sha256_padding, padn); @@ -290,25 +290,24 @@ static void sha512_update_block(sha512_ctx* ctx, esp_sha_type sha_type, const un size_t fill; unsigned int left, local_len = 0; - left = (unsigned int) (ctx->total[0] & 0x7F); + left = (unsigned int)(ctx->total[0] & 0x7F); fill = 128 - left; ctx->total[0] += (uint64_t) ilen; - if ( ctx->total[0] < (uint64_t) ilen ) { + if (ctx->total[0] < (uint64_t) ilen) { ctx->total[1]++; } - if ( left && ilen >= fill ) { - memcpy( (void *) (ctx->buffer + left), input, fill ); + if (left && ilen >= fill) { + memcpy((void *)(ctx->buffer + left), input, fill); input += fill; ilen -= fill; left = 0; local_len = 128; } - - if ( (ilen >= 128) || local_len) { + if ((ilen >= 128) || local_len) { /* Enable peripheral module */ esp_crypto_sha_enable_periph_clk(true); @@ -316,26 +315,25 @@ static void sha512_update_block(sha512_ctx* ctx, esp_sha_type sha_type, const un sha_hal_wait_idle(); sha_hal_set_mode(sha_type); - if (ctx->first_block && sha_type == SHA2_512T){ + if (ctx->first_block && sha_type == SHA2_512T) { sha_512_t_init_hash_block(ctx->t_val); ctx->first_block = 0; - } - else if (ctx->first_block == 0) { + } else if (ctx->first_block == 0) { /* Writes the message digest to the SHA engine */ sha_hal_write_digest(sha_type, ctx->state); } /* First process buffered block, if any */ - if ( local_len ) { + if (local_len) { /* Hash a single block */ - sha_hal_hash_block(sha_type, ctx->buffer, block_length(sha_type)/4, ctx->first_block); + sha_hal_hash_block(sha_type, ctx->buffer, block_length(sha_type) / 4, ctx->first_block); if (ctx->first_block == 1) { ctx->first_block = 0; } } - while ( ilen >= 128 ) { - sha_hal_hash_block(sha_type, input, block_length(sha_type)/4, ctx->first_block); + while (ilen >= 128) { + sha_hal_hash_block(sha_type, input, block_length(sha_type) / 4, ctx->first_block); if (ctx->first_block == 1) { ctx->first_block = 0; } @@ -350,8 +348,8 @@ static void sha512_update_block(sha512_ctx* ctx, esp_sha_type sha_type, const un esp_crypto_sha_enable_periph_clk(false); } - if ( ilen > 0 ) { - memcpy( (void *) (ctx->buffer + left), input, ilen); + if (ilen > 0) { + memcpy((void *)(ctx->buffer + left), input, ilen); } } @@ -368,19 +366,19 @@ void sha512_block(esp_sha_type sha_type, const unsigned char *input, size_t ilen uint64_t high, low; unsigned char msglen[16]; - high = ( ctx.total[0] >> 61 ) - | ( ctx.total[1] << 3 ); - low = ( ctx.total[0] << 3 ); + high = (ctx.total[0] >> 61) + | (ctx.total[1] << 3); + low = (ctx.total[0] << 3); - PUT_UINT64_BE( high, msglen, 0 ); - PUT_UINT64_BE( low, msglen, 8 ); + PUT_UINT64_BE(high, msglen, 0); + PUT_UINT64_BE(low, msglen, 8); - last = (size_t)( ctx.total[0] & 0x7F ); - padn = ( last < 112 ) ? ( 112 - last ) : ( 240 - last ); + last = (size_t)(ctx.total[0] & 0x7F); + padn = (last < 112) ? (112 - last) : (240 - last); - sha512_update_block( &ctx, sha_type, sha512_padding, padn ); + sha512_update_block(&ctx, sha_type, sha512_padding, padn); - sha512_update_block( &ctx, sha_type, msglen, 16 ); + sha512_update_block(&ctx, sha_type, msglen, 16); if (sha_type == SHA2_384) { memcpy(output, ctx.state, 48); @@ -407,19 +405,19 @@ void sha512t_block(esp_sha_type sha_type, const unsigned char *input, size_t ile uint64_t high, low; unsigned char msglen[16]; - high = ( ctx.total[0] >> 61 ) - | ( ctx.total[1] << 3 ); - low = ( ctx.total[0] << 3 ); + high = (ctx.total[0] >> 61) + | (ctx.total[1] << 3); + low = (ctx.total[0] << 3); - PUT_UINT64_BE( high, msglen, 0 ); - PUT_UINT64_BE( low, msglen, 8 ); + PUT_UINT64_BE(high, msglen, 0); + PUT_UINT64_BE(low, msglen, 8); - last = (size_t)( ctx.total[0] & 0x7F ); - padn = ( last < 112 ) ? ( 112 - last ) : ( 240 - last ); + last = (size_t)(ctx.total[0] & 0x7F); + padn = (last < 112) ? (112 - last) : (240 - last); - sha512_update_block( &ctx, sha_type, sha512_padding, padn ); + sha512_update_block(&ctx, sha_type, sha512_padding, padn); - sha512_update_block( &ctx, sha_type, msglen, 16 ); + sha512_update_block(&ctx, sha_type, msglen, 16); if (sha_type == SHA2_384) { memcpy(output, ctx.state, 48); diff --git a/components/hal/test_apps/crypto/main/sha/sha_dma.c b/components/esp_hal_security/test_apps/crypto/main/sha/sha_dma.c similarity index 79% rename from components/hal/test_apps/crypto/main/sha/sha_dma.c rename to components/esp_hal_security/test_apps/crypto/main/sha/sha_dma.c index 82db1f4063..e67bcde3a0 100644 --- a/components/hal/test_apps/crypto/main/sha/sha_dma.c +++ b/components/esp_hal_security/test_apps/crypto/main/sha/sha_dma.c @@ -44,12 +44,12 @@ static void sha1_update_dma(sha1_ctx* ctx, esp_sha_type sha_type, const unsigned ctx->total[0] += (uint32_t) ilen; ctx->total[0] &= 0xFFFFFFFF; - if ( ctx->total[0] < (uint32_t) ilen ) { + if (ctx->total[0] < (uint32_t) ilen) { ctx->total[1]++; } - if ( left && ilen >= fill ) { - memcpy( (void *) (ctx->buffer + left), input, fill ); + if (left && ilen >= fill) { + memcpy((void *)(ctx->buffer + left), input, fill); input += fill; ilen -= fill; left = 0; @@ -57,7 +57,7 @@ static void sha1_update_dma(sha1_ctx* ctx, esp_sha_type sha_type, const unsigned } len = (ilen / 64) * 64; - if ( len || local_len) { + if (len || local_len) { /* Enable peripheral module */ esp_sha_acquire_hardware(); @@ -78,8 +78,8 @@ static void sha1_update_dma(sha1_ctx* ctx, esp_sha_type sha_type, const unsigned esp_sha_release_hardware(); } - if ( ilen > 0 ) { - memcpy( (void *) (ctx->buffer + left), input + len, ilen - len ); + if (ilen > 0) { + memcpy((void *)(ctx->buffer + left), input + len, ilen - len); } } @@ -90,7 +90,7 @@ void sha1_dma(esp_sha_type sha_type, const unsigned char *input, size_t ilen, un ctx.total[0] = 0; ctx.total[1] = 0; - memset(&ctx, 0, sizeof( sha1_ctx ) ); + memset(&ctx, 0, sizeof(sha1_ctx)); ctx.mode = SHA1; sha1_update_dma(&ctx, sha_type, input, ilen); @@ -99,15 +99,15 @@ void sha1_dma(esp_sha_type sha_type, const unsigned char *input, size_t ilen, un uint32_t high, low; unsigned char msglen[8]; - high = ( ctx.total[0] >> 29 ) - | ( ctx.total[1] << 3 ); - low = ( ctx.total[0] << 3 ); + high = (ctx.total[0] >> 29) + | (ctx.total[1] << 3); + low = (ctx.total[0] << 3); - PUT_UINT32_BE( high, msglen, 0 ); - PUT_UINT32_BE( low, msglen, 4 ); + PUT_UINT32_BE(high, msglen, 0); + PUT_UINT32_BE(low, msglen, 4); last = ctx.total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); + padn = (last < 56) ? (56 - last) : (120 - last); sha1_update_dma(&ctx, sha_type, sha1_padding, padn); @@ -142,12 +142,12 @@ static void sha256_update_dma(sha256_ctx* ctx, esp_sha_type sha_type, const unsi ctx->total[0] += (uint32_t) ilen; ctx->total[0] &= 0xFFFFFFFF; - if ( ctx->total[0] < (uint32_t) ilen ) { + if (ctx->total[0] < (uint32_t) ilen) { ctx->total[1]++; } - if ( left && ilen >= fill ) { - memcpy( (void *) (ctx->buffer + left), input, fill ); + if (left && ilen >= fill) { + memcpy((void *)(ctx->buffer + left), input, fill); input += fill; ilen -= fill; left = 0; @@ -155,7 +155,7 @@ static void sha256_update_dma(sha256_ctx* ctx, esp_sha_type sha_type, const unsi } len = (ilen / 64) * 64; - if ( len || local_len) { + if (len || local_len) { /* Enable peripheral module */ esp_sha_acquire_hardware(); @@ -178,8 +178,8 @@ static void sha256_update_dma(sha256_ctx* ctx, esp_sha_type sha_type, const unsi esp_sha_release_hardware(); } - if ( ilen > 0 ) { - memcpy( (void *) (ctx->buffer + left), input + len, ilen - len ); + if (ilen > 0) { + memcpy((void *)(ctx->buffer + left), input + len, ilen - len); } } @@ -196,15 +196,15 @@ void sha256_dma(esp_sha_type sha_type, const unsigned char *input, size_t ilen, uint32_t high, low; unsigned char msglen[8]; - high = ( ctx.total[0] >> 29 ) - | ( ctx.total[1] << 3 ); - low = ( ctx.total[0] << 3 ); + high = (ctx.total[0] >> 29) + | (ctx.total[1] << 3); + low = (ctx.total[0] << 3); - PUT_UINT32_BE( high, msglen, 0 ); - PUT_UINT32_BE( low, msglen, 4 ); + PUT_UINT32_BE(high, msglen, 0); + PUT_UINT32_BE(low, msglen, 4); last = ctx.total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); + padn = (last < 56) ? (56 - last) : (120 - last); sha256_update_dma(&ctx, sha_type, sha256_padding, padn); @@ -286,17 +286,17 @@ static void sha512_update_dma(sha512_ctx* ctx, esp_sha_type sha_type, const unsi size_t fill; unsigned int left, len, local_len = 0; - left = (unsigned int) (ctx->total[0] & 0x7F); + left = (unsigned int)(ctx->total[0] & 0x7F); fill = 128 - left; ctx->total[0] += (uint64_t) ilen; - if ( ctx->total[0] < (uint64_t) ilen ) { + if (ctx->total[0] < (uint64_t) ilen) { ctx->total[1]++; } - if ( left && ilen >= fill ) { - memcpy( (void *) (ctx->buffer + left), input, fill ); + if (left && ilen >= fill) { + memcpy((void *)(ctx->buffer + left), input, fill); input += fill; ilen -= fill; left = 0; @@ -305,7 +305,7 @@ static void sha512_update_dma(sha512_ctx* ctx, esp_sha_type sha_type, const unsi len = (ilen / 128) * 128; - if ( len || local_len) { + if (len || local_len) { /* Enable peripheral module */ esp_sha_acquire_hardware(); @@ -328,8 +328,8 @@ static void sha512_update_dma(sha512_ctx* ctx, esp_sha_type sha_type, const unsi esp_sha_release_hardware(); } - if ( ilen > 0 ) { - memcpy( (void *) (ctx->buffer + left), input + len, ilen - len ); + if (ilen > 0) { + memcpy((void *)(ctx->buffer + left), input + len, ilen - len); } } @@ -346,19 +346,19 @@ void sha512_dma(esp_sha_type sha_type, const unsigned char *input, size_t ilen, uint64_t high, low; unsigned char msglen[16]; - high = ( ctx.total[0] >> 61 ) - | ( ctx.total[1] << 3 ); - low = ( ctx.total[0] << 3 ); + high = (ctx.total[0] >> 61) + | (ctx.total[1] << 3); + low = (ctx.total[0] << 3); - PUT_UINT64_BE( high, msglen, 0 ); - PUT_UINT64_BE( low, msglen, 8 ); + PUT_UINT64_BE(high, msglen, 0); + PUT_UINT64_BE(low, msglen, 8); - last = (size_t)( ctx.total[0] & 0x7F ); - padn = ( last < 112 ) ? ( 112 - last ) : ( 240 - last ); + last = (size_t)(ctx.total[0] & 0x7F); + padn = (last < 112) ? (112 - last) : (240 - last); - sha512_update_dma( &ctx, sha_type, sha512_padding, padn ); + sha512_update_dma(&ctx, sha_type, sha512_padding, padn); - sha512_update_dma( &ctx, sha_type, msglen, 16 ); + sha512_update_dma(&ctx, sha_type, msglen, 16); if (sha_type == SHA2_384) { memcpy(output, ctx.state, 48); @@ -385,19 +385,19 @@ void sha512t_dma(esp_sha_type sha_type, const unsigned char *input, size_t ilen, uint64_t high, low; unsigned char msglen[16]; - high = ( ctx.total[0] >> 61 ) - | ( ctx.total[1] << 3 ); - low = ( ctx.total[0] << 3 ); + high = (ctx.total[0] >> 61) + | (ctx.total[1] << 3); + low = (ctx.total[0] << 3); - PUT_UINT64_BE( high, msglen, 0 ); - PUT_UINT64_BE( low, msglen, 8 ); + PUT_UINT64_BE(high, msglen, 0); + PUT_UINT64_BE(low, msglen, 8); - last = (size_t)( ctx.total[0] & 0x7F ); - padn = ( last < 112 ) ? ( 112 - last ) : ( 240 - last ); + last = (size_t)(ctx.total[0] & 0x7F); + padn = (last < 112) ? (112 - last) : (240 - last); - sha512_update_dma( &ctx, sha_type, sha512_padding, padn ); + sha512_update_dma(&ctx, sha_type, sha512_padding, padn); - sha512_update_dma( &ctx, sha_type, msglen, 16 ); + sha512_update_dma(&ctx, sha_type, msglen, 16); if (sha_type == SHA2_384) { memcpy(output, ctx.state, 48); diff --git a/components/hal/test_apps/crypto/main/sha/test_sha.c b/components/esp_hal_security/test_apps/crypto/main/sha/test_sha.c similarity index 79% rename from components/hal/test_apps/crypto/main/sha/test_sha.c rename to components/esp_hal_security/test_apps/crypto/main/sha/test_sha.c index e78dc5d578..8c5acb9880 100644 --- a/components/hal/test_apps/crypto/main/sha/test_sha.c +++ b/components/esp_hal_security/test_apps/crypto/main/sha/test_sha.c @@ -31,13 +31,13 @@ static void test_sha1(bool is_dma) const uint8_t sha1_expected[20] = { 0x09, 0x23, 0x02, 0xfb, 0x2d, 0x36, 0x42, 0xec, 0xc5, 0xfa, 0xd5, 0x8f, 0xdb, 0xc3, 0x8d, 0x5c, - 0x97, 0xd6, 0x17, 0xee }; + 0x97, 0xd6, 0x17, 0xee + }; #if SOC_SHA_SUPPORT_DMA - if(is_dma) { + if (is_dma) { sha1_dma(SHA1, buffer, BUFFER_SZ, sha1_result); - } - else + } else #endif { sha1_block(SHA1, buffer, BUFFER_SZ, sha1_result); @@ -58,15 +58,15 @@ static void test_sha224(bool is_dma) memset(buffer, 0xEE, BUFFER_SZ); const uint8_t sha224_expected[28] = { 0x69, 0xfd, 0x84, 0x30, 0xd9, 0x4a, 0x44, 0x96, - 0x41, 0xc4, 0xab, 0xab, 0x89, 0x53, 0xa9, 0x1f, - 0x4b, 0xfa, 0x5f, 0x2c, 0xa0, 0x72, 0x5f, 0x6b, - 0xec, 0xd1, 0x47, 0xf9}; + 0x41, 0xc4, 0xab, 0xab, 0x89, 0x53, 0xa9, 0x1f, + 0x4b, 0xfa, 0x5f, 0x2c, 0xa0, 0x72, 0x5f, 0x6b, + 0xec, 0xd1, 0x47, 0xf9 + }; #if SOC_SHA_SUPPORT_DMA - if(is_dma) { + if (is_dma) { sha256_dma(SHA2_224, buffer, BUFFER_SZ, sha224_result); - } - else + } else #endif { sha256_block(SHA2_224, buffer, BUFFER_SZ, sha224_result); @@ -87,15 +87,15 @@ static void test_sha256(bool is_dma) memset(buffer, 0xEE, BUFFER_SZ); const uint8_t sha256_expected[32] = { 0x0c, 0x67, 0x8d, 0x7b, 0x8a, 0x3e, 0x9e, 0xc0, - 0xb5, 0x61, 0xaa, 0x51, 0xd8, 0xfd, 0x42, 0x70, - 0xd6, 0x11, 0x2a, 0xec, 0x4c, 0x72, 0x9b, 0x2c, - 0xa4, 0xc6, 0x04, 0x80, 0x93, 0x4d, 0xc9, 0x99 }; + 0xb5, 0x61, 0xaa, 0x51, 0xd8, 0xfd, 0x42, 0x70, + 0xd6, 0x11, 0x2a, 0xec, 0x4c, 0x72, 0x9b, 0x2c, + 0xa4, 0xc6, 0x04, 0x80, 0x93, 0x4d, 0xc9, 0x99 + }; #if SOC_SHA_SUPPORT_DMA - if(is_dma) { + if (is_dma) { sha256_dma(SHA2_256, buffer, BUFFER_SZ, sha256_result); - } - else + } else #endif { sha256_block(SHA2_256, buffer, BUFFER_SZ, sha256_result); @@ -116,17 +116,17 @@ static void test_sha384(bool is_dma) memset(buffer, 0xEE, BUFFER_SZ); const uint8_t sha384_expected[48] = { 0xf2, 0x7c, 0x75, 0x16, 0xa9, 0xe6, 0xe5, 0xe2, - 0x4d, 0x8b, 0xe4, 0x6b, 0xc5, 0xb3, 0x25, 0xb1, - 0x10, 0xc2, 0xb4, 0x7d, 0xb7, 0xe1, 0xee, 0x1c, - 0xbd, 0xde, 0x52, 0x9d, 0xaa, 0x31, 0xda, 0x88, - 0xfe, 0xec, 0xd5, 0x38, 0x59, 0x28, 0x93, 0xc7, - 0x1c, 0x1a, 0x0b, 0x3b, 0x4e, 0x06, 0x48, 0xa7 }; + 0x4d, 0x8b, 0xe4, 0x6b, 0xc5, 0xb3, 0x25, 0xb1, + 0x10, 0xc2, 0xb4, 0x7d, 0xb7, 0xe1, 0xee, 0x1c, + 0xbd, 0xde, 0x52, 0x9d, 0xaa, 0x31, 0xda, 0x88, + 0xfe, 0xec, 0xd5, 0x38, 0x59, 0x28, 0x93, 0xc7, + 0x1c, 0x1a, 0x0b, 0x3b, 0x4e, 0x06, 0x48, 0xa7 + }; #if SOC_SHA_SUPPORT_DMA - if(is_dma) { + if (is_dma) { sha512_dma(SHA2_384, buffer, BUFFER_SZ, sha384_result); - } - else + } else #endif { sha512_block(SHA2_384, buffer, BUFFER_SZ, sha384_result); @@ -147,19 +147,19 @@ static void test_sha512(bool is_dma) memset(buffer, 0xEE, BUFFER_SZ); const uint8_t sha512_expected[64] = { 0x7f, 0xca, 0x1c, 0x81, 0xc6, 0xc7, 0x1e, 0x49, - 0x1f, 0x4a, 0x35, 0x50, 0xb0, 0x0c, 0xd9, 0xbf, - 0x3e, 0xba, 0x90, 0x31, 0x08, 0xc7, 0xb3, 0xf0, - 0x58, 0x11, 0xd3, 0x29, 0xee, 0xa0, 0x4f, 0x3b, - 0xe4, 0x60, 0xd2, 0xc7, 0x2e, 0x50, 0x39, 0x68, - 0xf7, 0x27, 0x2e, 0x71, 0xbc, 0x9f, 0x10, 0xfc, - 0x9d, 0x75, 0xb5, 0x57, 0x74, 0x8d, 0xb9, 0x4b, - 0x69, 0x1a, 0x9c, 0x5f, 0x30, 0x61, 0xca, 0x3b }; + 0x1f, 0x4a, 0x35, 0x50, 0xb0, 0x0c, 0xd9, 0xbf, + 0x3e, 0xba, 0x90, 0x31, 0x08, 0xc7, 0xb3, 0xf0, + 0x58, 0x11, 0xd3, 0x29, 0xee, 0xa0, 0x4f, 0x3b, + 0xe4, 0x60, 0xd2, 0xc7, 0x2e, 0x50, 0x39, 0x68, + 0xf7, 0x27, 0x2e, 0x71, 0xbc, 0x9f, 0x10, 0xfc, + 0x9d, 0x75, 0xb5, 0x57, 0x74, 0x8d, 0xb9, 0x4b, + 0x69, 0x1a, 0x9c, 0x5f, 0x30, 0x61, 0xca, 0x3b + }; #if SOC_SHA_SUPPORT_DMA - if(is_dma) { + if (is_dma) { sha512_dma(SHA2_512, buffer, BUFFER_SZ, sha512_result); - } - else + } else #endif { sha512_block(SHA2_512, buffer, BUFFER_SZ, sha512_result); @@ -184,10 +184,9 @@ static void test_sha512t(bool is_dma) } #if SOC_SHA_SUPPORT_DMA - if(is_dma) { + if (is_dma) { sha512t_dma(sha512T_algo[i], sha512T_test_buf[j], sha512T_test_buflen[j], sha512, sha512T_t_len[i]); - } - else + } else #endif { sha512t_block(sha512T_algo[i], sha512T_test_buf[j], sha512T_test_buflen[j], sha512, sha512T_t_len[i]); @@ -199,7 +198,6 @@ static void test_sha512t(bool is_dma) #endif /* SOC_SHA_SUPPORT_SHA512_T */ - TEST_GROUP(sha); TEST_SETUP(sha) @@ -229,7 +227,6 @@ TEST(sha, test_sha1_dma) #endif /* SOC_SHA_SUPPORT_DMA*/ #endif /* SOC_SHA_SUPPORT_SHA1 */ - #if SOC_SHA_SUPPORT_SHA224 TEST(sha, test_sha224_block) @@ -245,7 +242,6 @@ TEST(sha, test_sha224_dma) #endif /* SOC_SHA_SUPPORT_DMA*/ #endif /* SOC_SHA_SUPPORT_SHA224 */ - #if SOC_SHA_SUPPORT_SHA256 TEST(sha, test_sha256_block) @@ -261,7 +257,6 @@ TEST(sha, test_sha256_dma) #endif /* SOC_SHA_SUPPORT_DMA*/ #endif /* SOC_SHA_SUPPORT_SHA256 */ - #if SOC_SHA_SUPPORT_SHA384 TEST(sha, test_sha384_block) @@ -292,7 +287,6 @@ TEST(sha, test_sha512_dma) #endif /* SOC_SHA_SUPPORT_DMA*/ #endif /* SOC_SHA_SUPPORT_SHA512 */ - #if SOC_SHA_SUPPORT_SHA512_T TEST(sha, test_sha512t_block) diff --git a/components/hal/test_apps/crypto/main/xts_aes/generate_xts_aes_encrypt_test_cases.py b/components/esp_hal_security/test_apps/crypto/main/xts_aes/generate_xts_aes_encrypt_test_cases.py similarity index 100% rename from components/hal/test_apps/crypto/main/xts_aes/generate_xts_aes_encrypt_test_cases.py rename to components/esp_hal_security/test_apps/crypto/main/xts_aes/generate_xts_aes_encrypt_test_cases.py diff --git a/components/hal/test_apps/crypto/main/xts_aes/test_xts_aes.c b/components/esp_hal_security/test_apps/crypto/main/xts_aes/test_xts_aes.c similarity index 100% rename from components/hal/test_apps/crypto/main/xts_aes/test_xts_aes.c rename to components/esp_hal_security/test_apps/crypto/main/xts_aes/test_xts_aes.c diff --git a/components/hal/test_apps/crypto/main/xts_aes/xts_aes_128_key.bin b/components/esp_hal_security/test_apps/crypto/main/xts_aes/xts_aes_128_key.bin similarity index 100% rename from components/hal/test_apps/crypto/main/xts_aes/xts_aes_128_key.bin rename to components/esp_hal_security/test_apps/crypto/main/xts_aes/xts_aes_128_key.bin diff --git a/components/hal/test_apps/crypto/main/xts_aes/xts_aes_256_key.bin b/components/esp_hal_security/test_apps/crypto/main/xts_aes/xts_aes_256_key.bin similarity index 100% rename from components/hal/test_apps/crypto/main/xts_aes/xts_aes_256_key.bin rename to components/esp_hal_security/test_apps/crypto/main/xts_aes/xts_aes_256_key.bin diff --git a/components/hal/test_apps/crypto/main/xts_aes/xts_aes_params.h b/components/esp_hal_security/test_apps/crypto/main/xts_aes/xts_aes_params.h similarity index 100% rename from components/hal/test_apps/crypto/main/xts_aes/xts_aes_params.h rename to components/esp_hal_security/test_apps/crypto/main/xts_aes/xts_aes_params.h diff --git a/components/hal/test_apps/crypto/partitions.csv b/components/esp_hal_security/test_apps/crypto/partitions.csv similarity index 100% rename from components/hal/test_apps/crypto/partitions.csv rename to components/esp_hal_security/test_apps/crypto/partitions.csv diff --git a/components/hal/test_apps/crypto/pytest_crypto.py b/components/esp_hal_security/test_apps/crypto/pytest_crypto.py similarity index 100% rename from components/hal/test_apps/crypto/pytest_crypto.py rename to components/esp_hal_security/test_apps/crypto/pytest_crypto.py diff --git a/components/hal/test_apps/crypto/sdkconfig.ci.long_aes_operations b/components/esp_hal_security/test_apps/crypto/sdkconfig.ci.long_aes_operations similarity index 100% rename from components/hal/test_apps/crypto/sdkconfig.ci.long_aes_operations rename to components/esp_hal_security/test_apps/crypto/sdkconfig.ci.long_aes_operations diff --git a/components/hal/test_apps/crypto/sdkconfig.defaults b/components/esp_hal_security/test_apps/crypto/sdkconfig.defaults similarity index 100% rename from components/hal/test_apps/crypto/sdkconfig.defaults rename to components/esp_hal_security/test_apps/crypto/sdkconfig.defaults diff --git a/components/hal/test_apps/tee/CMakeLists.txt b/components/esp_hal_security/test_apps/tee/CMakeLists.txt similarity index 100% rename from components/hal/test_apps/tee/CMakeLists.txt rename to components/esp_hal_security/test_apps/tee/CMakeLists.txt diff --git a/components/hal/test_apps/tee/README.md b/components/esp_hal_security/test_apps/tee/README.md similarity index 98% rename from components/hal/test_apps/tee/README.md rename to components/esp_hal_security/test_apps/tee/README.md index 262aed3209..018cd170c1 100644 --- a/components/hal/test_apps/tee/README.md +++ b/components/esp_hal_security/test_apps/tee/README.md @@ -85,7 +85,7 @@ Defined based on GDMA version: - `SOC_AHB_GDMA_VERSION == 1` → `GPSPI` - `SOC_AHB_GDMA_VERSION == 2` → `26` (e.g., `GDMA_DUMMY10`) -Refer to `hal/apm_types.h` or the SoC TRM. +Refer to `esp_hal_security/apm_types.h` or the SoC TRM. ### 2. APM Controller and Path Definitions @@ -159,4 +159,4 @@ idf.py flash monitor pytest --target ``` ---- \ No newline at end of file +--- diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/CMakeLists.txt b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/CMakeLists.txt similarity index 95% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/CMakeLists.txt rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/CMakeLists.txt index ea655ee657..72571b8925 100644 --- a/components/hal/test_apps/tee/components/pms_and_cpu_intr/CMakeLists.txt +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/CMakeLists.txt @@ -21,7 +21,7 @@ endif() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "include" "priv_include" PRIV_INCLUDE_DIRS "priv_include/${target}" - REQUIRES ulp unity + REQUIRES ulp unity esp_hal_security PRIV_REQUIRES esp_hal_timg LDFRAGMENTS linker.lf) diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/Kconfig b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/Kconfig similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/Kconfig rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/Kconfig diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/include/test_cpu_intr.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/include/test_cpu_intr.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/include/test_cpu_intr.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/include/test_cpu_intr.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/include/test_pms.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/include/test_pms.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/include/test_pms.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/include/test_pms.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/linker.lf b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/linker.lf similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/linker.lf rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/linker.lf diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_cpu_intr_params.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_cpu_intr_params.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_cpu_intr_params.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_cpu_intr_params.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_pms_params.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_pms_params.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_pms_params.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_pms_params.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_rv_utils.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_rv_utils.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_rv_utils.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_rv_utils.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c6/test_pms_params.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c6/test_pms_params.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c6/test_pms_params.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c6/test_pms_params.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_cpu_intr_params.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_cpu_intr_params.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_cpu_intr_params.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_cpu_intr_params.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_pms_params.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_pms_params.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_pms_params.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_pms_params.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_rv_utils.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_rv_utils.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_rv_utils.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_rv_utils.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32h2/test_pms_params.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32h2/test_pms_params.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32h2/test_pms_params.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32h2/test_pms_params.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_cpu_intr_priv.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_cpu_intr_priv.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_cpu_intr_priv.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_cpu_intr_priv.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_pms_priv.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_pms_priv.h similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_pms_priv.h rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_pms_priv.h diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_apm_utils.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_apm_utils.c similarity index 90% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_apm_utils.c rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_apm_utils.c index cff666dc4a..5ea7373eb0 100644 --- a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_apm_utils.c +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_apm_utils.c @@ -36,24 +36,24 @@ static void test_apm_ctrl_free_all_intr(void); void apm_hal_enable_region_filter_all(apm_ctrl_module_t ctrl_mod, bool enable) { switch (ctrl_mod) { - case APM_CTRL_HP_APM: - REG_WRITE(HP_APM_REGION_FILTER_EN_REG, enable ? UINT32_MAX : 0); - break; + case APM_CTRL_HP_APM: + REG_WRITE(HP_APM_REGION_FILTER_EN_REG, enable ? UINT32_MAX : 0); + break; #if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - REG_WRITE(LP_APM0_REGION_FILTER_EN_REG, enable ? UINT32_MAX : 0); - break; + case APM_CTRL_LP_APM0: + REG_WRITE(LP_APM0_REGION_FILTER_EN_REG, enable ? UINT32_MAX : 0); + break; #endif - case APM_CTRL_LP_APM: - REG_WRITE(LP_APM_REGION_FILTER_EN_REG, enable ? UINT32_MAX : 0); - break; + case APM_CTRL_LP_APM: + REG_WRITE(LP_APM_REGION_FILTER_EN_REG, enable ? UINT32_MAX : 0); + break; #if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - REG_WRITE(CPU_APM_REGION_FILTER_EN_REG, enable ? UINT32_MAX : 0); - break; + case APM_CTRL_CPU_APM: + REG_WRITE(CPU_APM_REGION_FILTER_EN_REG, enable ? UINT32_MAX : 0); + break; #endif - default: - break; + default: + break; } } @@ -329,25 +329,25 @@ void test_apm_ctrl_enable_intr(apm_ctrl_module_t ctrl_mod, apm_ctrl_access_path_ int intr_src = -1; switch (ctrl_mod) { - case APM_CTRL_HP_APM: - intr_src = ETS_HP_APM_INTR_SOURCE(path); - break; + case APM_CTRL_HP_APM: + intr_src = ETS_HP_APM_INTR_SOURCE(path); + break; #if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - intr_src = ETS_LP_APM0_INTR_SOURCE(path); - break; + case APM_CTRL_LP_APM0: + intr_src = ETS_LP_APM0_INTR_SOURCE(path); + break; #endif - case APM_CTRL_LP_APM: - intr_src = ETS_LP_APM_INTR_SOURCE(path); - break; + case APM_CTRL_LP_APM: + intr_src = ETS_LP_APM_INTR_SOURCE(path); + break; #if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - intr_src = ETS_CPU_APM_INTR_SOURCE(path); - break; + case APM_CTRL_CPU_APM: + intr_src = ETS_CPU_APM_INTR_SOURCE(path); + break; #endif - default: - TEST_ASSERT_MESSAGE(false, "Invalid APM module"); - return; + default: + TEST_ASSERT_MESSAGE(false, "Invalid APM module"); + return; } uint32_t flags = ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_LEVEL3; diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_intr_utils.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_intr_utils.c similarity index 99% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_intr_utils.c rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_intr_utils.c index 6332eeb8e4..2fbb383e77 100644 --- a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_intr_utils.c +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_intr_utils.c @@ -207,7 +207,7 @@ void test_intr_alloc(int mode, int priority, int intr_src, intr_handler_t func, } s_intr_status |= BIT(intr_num); - s_intr_table[TEST_INTR_IDX(intr_num)] = (test_intr_entry_t){ + s_intr_table[TEST_INTR_IDX(intr_num)] = (test_intr_entry_t) { .mode = mode, .intr_src = intr_src, }; diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_panic_handler.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_panic_handler.c similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_panic_handler.c rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_panic_handler.c diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_setup_utils.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_setup_utils.c similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_setup_utils.c rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_setup_utils.c diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_interrupt.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_interrupt.c similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_interrupt.c rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_interrupt.c diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_vectors_m.S b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_vectors_m.S similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_vectors_m.S rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_vectors_m.S diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_vectors_u.S b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_vectors_u.S similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_vectors_u.S rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/cpu_intr/test_vectors_u.S diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_peri_apm.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_peri_apm.c similarity index 93% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_peri_apm.c rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_peri_apm.c index 7e17875948..4768ec1700 100644 --- a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_peri_apm.c +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_peri_apm.c @@ -79,7 +79,7 @@ static const uint32_t test_peri_apm_lp_peri_reg[] = { FORCE_INLINE_ATTR uint32_t reg_read(uint32_t addr) { uint32_t value; - __asm__ volatile ( + __asm__ volatile( "lw %0, 0(%1)\n" "fence\n" "nop\nnop\nnop\nnop\n" @@ -92,7 +92,7 @@ FORCE_INLINE_ATTR uint32_t reg_read(uint32_t addr) FORCE_INLINE_ATTR void reg_write(uint32_t addr, uint32_t value) { - __asm__ volatile ( + __asm__ volatile( "sw %1, 0(%0)\n" "fence\n" "nop\nnop\nnop\nnop\n" @@ -177,17 +177,17 @@ static void test_cpu_to_peri_access(const test_peri_apm_periph_cfg_t *cfg) peri_access_func_t cpu_peri_rw = NULL; switch (cfg->master_id) { - case APM_MASTER_HPCORE: - cpu_peri_rw = hp_cpu_peri_addr_rw; - break; + case APM_MASTER_HPCORE: + cpu_peri_rw = hp_cpu_peri_addr_rw; + break; #if CONFIG_ULP_COPROC_ENABLED - case APM_MASTER_LPCORE: - cpu_peri_rw = lp_cpu_peri_addr_rw; - break; + case APM_MASTER_LPCORE: + cpu_peri_rw = lp_cpu_peri_addr_rw; + break; #endif - default: - TEST_ASSERT_MESSAGE(false, "Unsupported master"); - return; + default: + TEST_ASSERT_MESSAGE(false, "Unsupported master"); + return; } for (uint32_t mode = APM_SEC_MODE_TEE; mode <= APM_SEC_MODE_REE2; mode++) { @@ -205,17 +205,25 @@ static void test_cpu_to_peri_access(const test_peri_apm_periph_cfg_t *cfg) bool is_switch_req = (cfg->master_id == APM_MASTER_HPCORE && mode != APM_SEC_MODE_TEE); - if (is_switch_req) switch_priv_mode(); + if (is_switch_req) { + switch_priv_mode(); + } cpu_peri_rw(peri_addr, pms_attr); - if (is_switch_req) switch_priv_mode(); + if (is_switch_req) { + switch_priv_mode(); + } pms_attr = APM_PERM_R; apm_hal_tee_set_peri_access(cfg->ctrl_mod, BIT64(peri_idx), (apm_security_mode_t)mode, APM_PERM_NONE); apm_hal_tee_set_peri_access(cfg->ctrl_mod, BIT64(peri_idx), (apm_security_mode_t)mode, pms_attr); - if (is_switch_req) switch_priv_mode(); + if (is_switch_req) { + switch_priv_mode(); + } cpu_peri_rw(peri_addr, pms_attr); - if (is_switch_req) switch_priv_mode(); + if (is_switch_req) { + switch_priv_mode(); + } apm_hal_tee_set_peri_access(cfg->ctrl_mod, BIT64(peri_idx), (apm_security_mode_t)mode, APM_PERM_R | APM_PERM_W); } diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_sys_apm.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_sys_apm.c similarity index 95% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_sys_apm.c rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_sys_apm.c index edb0ae720a..6f8de78a6b 100644 --- a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_sys_apm.c +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_sys_apm.c @@ -251,17 +251,17 @@ static void test_cpu_to_peri_access(const test_sys_apm_periph_cfg_t *cfg) peri_access_func_t cpu_peri_rw = NULL; switch (cfg->master_id) { - case APM_MASTER_HPCORE: - cpu_peri_rw = hp_cpu_peri_addr_rw; - break; + case APM_MASTER_HPCORE: + cpu_peri_rw = hp_cpu_peri_addr_rw; + break; #if CONFIG_ULP_COPROC_ENABLED - case APM_MASTER_LPCORE: - cpu_peri_rw = lp_cpu_peri_addr_rw; - break; + case APM_MASTER_LPCORE: + cpu_peri_rw = lp_cpu_peri_addr_rw; + break; #endif - default: - TEST_ASSERT_MESSAGE(false, "Unsupported master"); - return; + default: + TEST_ASSERT_MESSAGE(false, "Unsupported master"); + return; } for (uint32_t mode = APM_SEC_MODE_TEE; mode <= APM_SEC_MODE_REE2; mode++) { @@ -282,16 +282,24 @@ static void test_cpu_to_peri_access(const test_sys_apm_periph_cfg_t *cfg) pms_attr = APM_PERM_W; apm_hal_set_sec_mode_region_attr(cfg->ctrl_mod, regn_idx, mode, APM_PERM_NONE); apm_hal_set_sec_mode_region_attr(cfg->ctrl_mod, regn_idx, mode, pms_attr); - if (cfg->master_id == APM_MASTER_HPCORE) test_m2u_switch(); + if (cfg->master_id == APM_MASTER_HPCORE) { + test_m2u_switch(); + } cpu_peri_rw(cfg->test_addr[regn_idx], pms_attr); - if (cfg->master_id == APM_MASTER_HPCORE) test_u2m_switch(); + if (cfg->master_id == APM_MASTER_HPCORE) { + test_u2m_switch(); + } pms_attr = APM_PERM_R; apm_hal_set_sec_mode_region_attr(cfg->ctrl_mod, regn_idx, mode, APM_PERM_NONE); apm_hal_set_sec_mode_region_attr(cfg->ctrl_mod, regn_idx, mode, pms_attr); - if (cfg->master_id == APM_MASTER_HPCORE) test_m2u_switch(); + if (cfg->master_id == APM_MASTER_HPCORE) { + test_m2u_switch(); + } cpu_peri_rw(cfg->test_addr[regn_idx], pms_attr); - if (cfg->master_id == APM_MASTER_HPCORE) test_u2m_switch(); + if (cfg->master_id == APM_MASTER_HPCORE) { + test_u2m_switch(); + } apm_hal_set_sec_mode_region_attr(cfg->ctrl_mod, regn_idx, mode, APM_PERM_R | APM_PERM_W); } @@ -489,7 +497,7 @@ static void hp_cpu_xmem_addr_rw(uint32_t mem_addr, size_t size, uint32_t attr) for (uint32_t offs = 0; offs < num_words; offs += step) { addr[offs] = TEST_VAL; - asm volatile ("nop"); + asm volatile("nop"); test_delay_ms(10); bool can_write = (attr & APM_PERM_W); @@ -499,7 +507,7 @@ static void hp_cpu_xmem_addr_rw(uint32_t mem_addr, size_t size, uint32_t attr) uint32_t val = addr[offs]; (void)val; - asm volatile ("fence"); + asm volatile("fence"); test_delay_ms(10); bool can_read = (attr & APM_PERM_R); @@ -598,19 +606,19 @@ static void test_cpu_to_xmem_access(test_sys_apm_mem_cfg_t *cfg, uint32_t test_s mem_access_func_t cpu_mem_rw = NULL, cpu_mem_x = NULL; switch (cfg->master_id) { - case APM_MASTER_HPCORE: - cpu_mem_rw = hp_cpu_xmem_addr_rw; - cpu_mem_x = hp_cpu_xmem_addr_x; - break; + case APM_MASTER_HPCORE: + cpu_mem_rw = hp_cpu_xmem_addr_rw; + cpu_mem_x = hp_cpu_xmem_addr_x; + break; #if CONFIG_ULP_COPROC_ENABLED - case APM_MASTER_LPCORE: - cpu_mem_rw = lp_cpu_xmem_addr_rw; - cpu_mem_x = lp_cpu_xmem_addr_x; - break; + case APM_MASTER_LPCORE: + cpu_mem_rw = lp_cpu_xmem_addr_rw; + cpu_mem_x = lp_cpu_xmem_addr_x; + break; #endif - default: - TEST_ASSERT_MESSAGE(false, "Unsupported master"); - return; + default: + TEST_ASSERT_MESSAGE(false, "Unsupported master"); + return; } for (uint32_t mode = APM_SEC_MODE_TEE; mode <= APM_SEC_MODE_REE2; mode++) { @@ -630,17 +638,25 @@ static void test_cpu_to_xmem_access(test_sys_apm_mem_cfg_t *cfg, uint32_t test_s pms_attr = APM_PERM_W; apm_hal_set_sec_mode_region_attr(cfg->ctrl_mod, regn_idx, mode, APM_PERM_NONE); apm_hal_set_sec_mode_region_attr(cfg->ctrl_mod, regn_idx, mode, pms_attr); - if (cfg->master_id == APM_MASTER_HPCORE) test_m2u_switch(); + if (cfg->master_id == APM_MASTER_HPCORE) { + test_m2u_switch(); + } cpu_mem_rw(regn_start, cfg->regn_sz, pms_attr); cpu_mem_x(regn_start, cfg->regn_sz, pms_attr); - if (cfg->master_id == APM_MASTER_HPCORE) test_u2m_switch(); + if (cfg->master_id == APM_MASTER_HPCORE) { + test_u2m_switch(); + } pms_attr = APM_PERM_R; apm_hal_set_sec_mode_region_attr(cfg->ctrl_mod, regn_idx, mode, APM_PERM_NONE); apm_hal_set_sec_mode_region_attr(cfg->ctrl_mod, regn_idx, mode, pms_attr); - if (cfg->master_id == APM_MASTER_HPCORE) test_m2u_switch(); + if (cfg->master_id == APM_MASTER_HPCORE) { + test_m2u_switch(); + } cpu_mem_rw(regn_start, cfg->regn_sz, pms_attr); - if (cfg->master_id == APM_MASTER_HPCORE) test_u2m_switch(); + if (cfg->master_id == APM_MASTER_HPCORE) { + test_u2m_switch(); + } apm_hal_set_sec_mode_region_attr(cfg->ctrl_mod, regn_idx, mode, APM_PERM_ALL); } diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_vectors.S b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_vectors.S similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_vectors.S rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_vectors.S diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/ulp/ulp_lp_core_main.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/ulp/ulp_lp_core_main.c similarity index 78% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/ulp/ulp_lp_core_main.c rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/ulp/ulp_lp_core_main.c index e91aea1d0f..44feb46850 100644 --- a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/ulp/ulp_lp_core_main.c +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/ulp/ulp_lp_core_main.c @@ -34,18 +34,18 @@ void restore_default_vector_table(void) void test_panicHandler(void *frame, int exccause) { switch (exccause) { - case MCAUSE_INST_ACCESS_FAULT: - SEND_EXCP(1); - break; - case MCAUSE_LOAD_ACCESS_FAULT: - SEND_EXCP(5); - break; - case MCAUSE_STORE_ACCESS_FAULT: - SEND_EXCP(7); - break; - default: - SEND_EXCP(0xFFU); - break; + case MCAUSE_INST_ACCESS_FAULT: + SEND_EXCP(1); + break; + case MCAUSE_LOAD_ACCESS_FAULT: + SEND_EXCP(5); + break; + case MCAUSE_STORE_ACCESS_FAULT: + SEND_EXCP(7); + break; + default: + SEND_EXCP(0xFFU); + break; } SEND_ADDR(RV_READ_CSR(mtval)); @@ -87,19 +87,19 @@ int main(void) uint32_t test_size = RECV_SIZE(); switch (test_msg) { - case MSG_SLAVE_READ: - (void)REG_READ(test_addr); - break; - case MSG_SLAVE_WRITE: - REG_WRITE(test_addr, test_size); - break; - case MSG_SLAVE_EXEC: { - void (*func_ptr)(void) = (void (*)(void))(test_addr); - func_ptr(); - break; - } - default: - break; + case MSG_SLAVE_READ: + (void)REG_READ(test_addr); + break; + case MSG_SLAVE_WRITE: + REG_WRITE(test_addr, test_size); + break; + case MSG_SLAVE_EXEC: { + void (*func_ptr)(void) = (void (*)(void))(test_addr); + func_ptr(); + break; + } + default: + break; } SEND_MSG(MSG_SLAVE_CLEAR); } diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/ulp/ulp_vectors.S b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/ulp/ulp_vectors.S similarity index 100% rename from components/hal/test_apps/tee/components/pms_and_cpu_intr/src/ulp/ulp_vectors.S rename to components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/ulp/ulp_vectors.S diff --git a/components/hal/test_apps/tee/main/CMakeLists.txt b/components/esp_hal_security/test_apps/tee/main/CMakeLists.txt similarity index 88% rename from components/hal/test_apps/tee/main/CMakeLists.txt rename to components/esp_hal_security/test_apps/tee/main/CMakeLists.txt index a701218c2c..a73b1b8300 100644 --- a/components/hal/test_apps/tee/main/CMakeLists.txt +++ b/components/esp_hal_security/test_apps/tee/main/CMakeLists.txt @@ -5,7 +5,7 @@ endif() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "" - PRIV_REQUIRES pms_and_cpu_intr esp_psram + PRIV_REQUIRES pms_and_cpu_intr esp_psram esp_hal_security WHOLE_ARCHIVE) # TODO: IDF-14145 diff --git a/components/hal/test_apps/tee/main/idf_component.yml b/components/esp_hal_security/test_apps/tee/main/idf_component.yml similarity index 100% rename from components/hal/test_apps/tee/main/idf_component.yml rename to components/esp_hal_security/test_apps/tee/main/idf_component.yml diff --git a/components/hal/test_apps/tee/main/test_cpu_intr.c b/components/esp_hal_security/test_apps/tee/main/test_cpu_intr.c similarity index 100% rename from components/hal/test_apps/tee/main/test_cpu_intr.c rename to components/esp_hal_security/test_apps/tee/main/test_cpu_intr.c diff --git a/components/hal/test_apps/tee/main/test_main.c b/components/esp_hal_security/test_apps/tee/main/test_main.c similarity index 100% rename from components/hal/test_apps/tee/main/test_main.c rename to components/esp_hal_security/test_apps/tee/main/test_main.c diff --git a/components/hal/test_apps/tee/main/test_pms.c b/components/esp_hal_security/test_apps/tee/main/test_pms.c similarity index 100% rename from components/hal/test_apps/tee/main/test_pms.c rename to components/esp_hal_security/test_apps/tee/main/test_pms.c diff --git a/components/hal/test_apps/tee/pytest_pms_and_cpu_intr.py b/components/esp_hal_security/test_apps/tee/pytest_pms_and_cpu_intr.py similarity index 100% rename from components/hal/test_apps/tee/pytest_pms_and_cpu_intr.py rename to components/esp_hal_security/test_apps/tee/pytest_pms_and_cpu_intr.py diff --git a/components/hal/test_apps/tee/sdkconfig.defaults b/components/esp_hal_security/test_apps/tee/sdkconfig.defaults similarity index 100% rename from components/hal/test_apps/tee/sdkconfig.defaults rename to components/esp_hal_security/test_apps/tee/sdkconfig.defaults diff --git a/components/hal/test_apps/tee/sdkconfig.defaults.esp32c5 b/components/esp_hal_security/test_apps/tee/sdkconfig.defaults.esp32c5 similarity index 100% rename from components/hal/test_apps/tee/sdkconfig.defaults.esp32c5 rename to components/esp_hal_security/test_apps/tee/sdkconfig.defaults.esp32c5 diff --git a/components/hal/test_apps/tee/sdkconfig.defaults.esp32c6 b/components/esp_hal_security/test_apps/tee/sdkconfig.defaults.esp32c6 similarity index 100% rename from components/hal/test_apps/tee/sdkconfig.defaults.esp32c6 rename to components/esp_hal_security/test_apps/tee/sdkconfig.defaults.esp32c6 diff --git a/components/hal/test_apps/tee/sdkconfig.defaults.esp32c61 b/components/esp_hal_security/test_apps/tee/sdkconfig.defaults.esp32c61 similarity index 100% rename from components/hal/test_apps/tee/sdkconfig.defaults.esp32c61 rename to components/esp_hal_security/test_apps/tee/sdkconfig.defaults.esp32c61 diff --git a/components/hal/test_apps/tee/sdkconfig.defaults.esp32h2 b/components/esp_hal_security/test_apps/tee/sdkconfig.defaults.esp32h2 similarity index 100% rename from components/hal/test_apps/tee/sdkconfig.defaults.esp32h2 rename to components/esp_hal_security/test_apps/tee/sdkconfig.defaults.esp32h2 diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index 54a0e93dd4..d57d4e5eda 100644 --- a/components/esp_hw_support/CMakeLists.txt +++ b/components/esp_hw_support/CMakeLists.txt @@ -11,7 +11,8 @@ endif() set(requires esp_hal_dma esp_hal_gpio esp_hal_usb esp_hal_pmu) # only esp_hw_support/adc_share_hw_ctrl.c requires efuse component -set(priv_requires efuse spi_flash bootloader_support esp_hal_wdt esp_hal_rtc_timer esp_hal_clock) +set(priv_requires efuse spi_flash bootloader_support esp_hal_wdt esp_hal_rtc_timer + esp_hal_clock esp_hal_security) set(srcs "cpu.c" "port/${IDF_TARGET}/esp_cpu_intr.c" "esp_memory_utils.c" "port/${IDF_TARGET}/cpu_region_protect.c") if(NOT non_os_build) diff --git a/components/esp_security/CMakeLists.txt b/components/esp_security/CMakeLists.txt index 362f942aeb..fe08fb3e07 100644 --- a/components/esp_security/CMakeLists.txt +++ b/components/esp_security/CMakeLists.txt @@ -6,6 +6,7 @@ if(${target} STREQUAL "linux") endif() set(srcs "") +set(requires esp_hal_security) set(priv_requires esp_hw_support hal efuse) set(priv_includes "") @@ -53,6 +54,7 @@ endif() idf_component_register(SRCS ${srcs} INCLUDE_DIRS "include" PRIV_INCLUDE_DIRS ${priv_includes} + REQUIRES ${requires} PRIV_REQUIRES ${priv_requires}) if(NOT non_os_build) diff --git a/components/esp_security/src/esp_crypto_periph_clk.c b/components/esp_security/src/esp_crypto_periph_clk.c index 329f6c8eca..f5fa2dc2e7 100644 --- a/components/esp_security/src/esp_crypto_periph_clk.c +++ b/components/esp_security/src/esp_crypto_periph_clk.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_security/src/esp_ds.c b/components/esp_security/src/esp_ds.c index 82bb521f01..0d311c610b 100644 --- a/components/esp_security/src/esp_ds.c +++ b/components/esp_security/src/esp_ds.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_security/src/esp_hmac.c b/components/esp_security/src/esp_hmac.c index 2e2cf020a4..4b881ec461 100644 --- a/components/esp_security/src/esp_hmac.c +++ b/components/esp_security/src/esp_hmac.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_security/src/esp_key_mgr.c b/components/esp_security/src/esp_key_mgr.c index 6ffefe5898..28bcfbedba 100644 --- a/components/esp_security/src/esp_key_mgr.c +++ b/components/esp_security/src/esp_key_mgr.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_security/src/init.c b/components/esp_security/src/init.c index db1fac033a..2db714b424 100644 --- a/components/esp_security/src/init.c +++ b/components/esp_security/src/init.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_system/port/soc/esp32c5/clk.c b/components/esp_system/port/soc/esp32c5/clk.c index 7bbb9993cd..d5fe762ccf 100644 --- a/components/esp_system/port/soc/esp32c5/clk.c +++ b/components/esp_system/port/soc/esp32c5/clk.c @@ -27,7 +27,6 @@ #if SOC_MODEM_CLOCK_SUPPORTED #include "hal/modem_lpcon_ll.h" #endif -#include "hal/apm_ll.h" #include "hal/clk_gate_ll.h" #include "hal/clk_tree_ll.h" #include "esp_private/esp_sleep_internal.h" diff --git a/components/esp_tee/subproject/CMakeLists.txt b/components/esp_tee/subproject/CMakeLists.txt index 693219c654..d02498cc77 100644 --- a/components/esp_tee/subproject/CMakeLists.txt +++ b/components/esp_tee/subproject/CMakeLists.txt @@ -25,7 +25,8 @@ set(ESP_TEE_BUILD 1) set(NON_OS_BUILD 1) # Additional components -list(APPEND COMPONENTS bootloader_support efuse esp_hal_mspi esp_hal_wdt esp_security mbedtls esp_stdio) +list(APPEND COMPONENTS bootloader_support efuse esp_hal_mspi esp_hal_wdt + esp_hal_security esp_security mbedtls esp_stdio) # TEE-specific components list(APPEND COMPONENTS attestation tee_flash_mgr tee_ota_ops tee_sec_storage) diff --git a/components/esp_tee/subproject/main/soc/esp32c5/esp_tee_secure_sys_cfg.c b/components/esp_tee/subproject/main/soc/esp32c5/esp_tee_secure_sys_cfg.c index cec537a13c..86e30ce131 100644 --- a/components/esp_tee/subproject/main/soc/esp32c5/esp_tee_secure_sys_cfg.c +++ b/components/esp_tee/subproject/main/soc/esp32c5/esp_tee_secure_sys_cfg.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_tee/subproject/main/soc/esp32c6/esp_tee_secure_sys_cfg.c b/components/esp_tee/subproject/main/soc/esp32c6/esp_tee_secure_sys_cfg.c index 0802611ea0..1da37191af 100644 --- a/components/esp_tee/subproject/main/soc/esp32c6/esp_tee_secure_sys_cfg.c +++ b/components/esp_tee/subproject/main/soc/esp32c6/esp_tee_secure_sys_cfg.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_tee/subproject/main/soc/esp32c61/esp_tee_secure_sys_cfg.c b/components/esp_tee/subproject/main/soc/esp32c61/esp_tee_secure_sys_cfg.c index 8946c35f0e..46cba5c6de 100644 --- a/components/esp_tee/subproject/main/soc/esp32c61/esp_tee_secure_sys_cfg.c +++ b/components/esp_tee/subproject/main/soc/esp32c61/esp_tee_secure_sys_cfg.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_tee/subproject/main/soc/esp32h2/esp_tee_secure_sys_cfg.c b/components/esp_tee/subproject/main/soc/esp32h2/esp_tee_secure_sys_cfg.c index 1cd42774f3..397329461f 100644 --- a/components/esp_tee/subproject/main/soc/esp32h2/esp_tee_secure_sys_cfg.c +++ b/components/esp_tee/subproject/main/soc/esp32h2/esp_tee_secure_sys_cfg.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/espcoredump/CMakeLists.txt b/components/espcoredump/CMakeLists.txt index fbfd802c40..b0329d71b6 100644 --- a/components/espcoredump/CMakeLists.txt +++ b/components/espcoredump/CMakeLists.txt @@ -8,7 +8,8 @@ set(srcs "") set(includes "") set(priv_includes "") set(priv_requires - esp_partition spi_flash bootloader_support mbedtls esp_rom soc esp_system esp_driver_gpio esp_app_format) + esp_partition spi_flash bootloader_support mbedtls esp_rom soc esp_system esp_driver_gpio esp_app_format + esp_hal_security) if(CONFIG_ESP_COREDUMP_ENABLE) list(APPEND srcs "src/core_dump_init.c" diff --git a/components/hal/.build-test-rules.yml b/components/hal/.build-test-rules.yml index a8292becc9..a360855ecc 100644 --- a/components/hal/.build-test-rules.yml +++ b/components/hal/.build-test-rules.yml @@ -1,13 +1,3 @@ -components/hal/test_apps/crypto: - depends_components: - - efuse - - mbedtls - - esp_security - components/hal/test_apps/hal_utils: enable: - if: IDF_TARGET == "linux" - -components/hal/test_apps/tee: - disable: - - if: IDF_TARGET not in ["esp32c6", "esp32h2", "esp32c5", "esp32c61"] diff --git a/components/hal/CMakeLists.txt b/components/hal/CMakeLists.txt index 42decfb2a4..5f6f540f08 100644 --- a/components/hal/CMakeLists.txt +++ b/components/hal/CMakeLists.txt @@ -11,19 +11,10 @@ list(APPEND includes "${target}/include") list(APPEND includes "include") -if(CONFIG_SOC_MPU_SUPPORTED) - list(APPEND srcs "mpu_hal.c") -endif() - if(CONFIG_SOC_EFUSE_SUPPORTED) list(APPEND srcs "efuse_hal.c" "${target}/efuse_hal.c") endif() -if(CONFIG_SOC_KEY_MANAGER_SUPPORTED) - list(APPEND srcs "key_mgr_hal.c") - list(APPEND srcs "huk_hal.c") -endif() - if(NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP) if(CONFIG_SOC_MMU_PERIPH_NUM) list(APPEND srcs "mmu_hal.c") @@ -42,29 +33,7 @@ else() endif() endif() -if(esp_tee_build) - list(APPEND srcs "apm_hal.c") - - if(CONFIG_SOC_AES_SUPPORTED) - list(APPEND srcs "aes_hal.c") - endif() - - if(CONFIG_SOC_SHA_SUPPORTED) - list(APPEND srcs "sha_hal.c") - endif() - - if(CONFIG_SOC_HMAC_SUPPORTED) - list(APPEND srcs "hmac_hal.c") - endif() - - if(CONFIG_SOC_DIG_SIGN_SUPPORTED) - list(APPEND srcs "ds_hal.c") - endif() - - if(CONFIG_SOC_ECC_SUPPORTED) - list(APPEND srcs "ecc_hal.c") - endif() -elseif(NOT BOOTLOADER_BUILD) +if(NOT esp_tee_build AND NOT BOOTLOADER_BUILD) list(APPEND srcs "color_hal.c") if(CONFIG_SOC_SYSTIMER_SUPPORTED AND NOT CONFIG_HAL_SYSTIMER_USE_ROM_IMPL) @@ -79,26 +48,6 @@ elseif(NOT BOOTLOADER_BUILD) list(APPEND srcs "etm_hal.c" "${target}/etm_periph.c") endif() - if(CONFIG_SOC_ECC_SUPPORTED) - list(APPEND srcs "ecc_hal.c") - endif() - - if(CONFIG_SOC_ECDSA_SUPPORTED) - list(APPEND srcs "ecdsa_hal.c") - endif() - - if(CONFIG_SOC_MPI_SUPPORTED) - list(APPEND srcs "mpi_hal.c") - endif() - - if(CONFIG_SOC_SHA_SUPPORTED) - list(APPEND srcs "sha_hal.c") - endif() - - if(CONFIG_SOC_AES_SUPPORTED) - list(APPEND srcs "aes_hal.c") - endif() - if(CONFIG_SOC_MODEM_CLOCK_IS_INDEPENDENT AND CONFIG_SOC_MODEM_CLOCK_SUPPORTED) list(APPEND srcs "${target}/modem_clock_hal.c") endif() @@ -106,20 +55,6 @@ elseif(NOT BOOTLOADER_BUILD) if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED) list(APPEND srcs "sdio_slave_hal.c") endif() - - if(CONFIG_SOC_APM_SUPPORTED) - list(APPEND srcs "apm_hal.c") - endif() - - if(CONFIG_SOC_HMAC_SUPPORTED AND NOT CONFIG_IDF_TARGET_ESP32S2) - # For ESP32-S2 we do not have HMAC HAL layer implementation yet - list(APPEND srcs "hmac_hal.c") - endif() - - if(CONFIG_SOC_DIG_SIGN_SUPPORTED AND NOT CONFIG_IDF_TARGET_ESP32S2) - # For ESP32-S2 we do not have DS HAL layer implementation yet - list(APPEND srcs "ds_hal.c") - endif() endif() idf_component_register(SRCS ${srcs} diff --git a/components/hal/Kconfig b/components/hal/Kconfig index 0b9a6d1422..1dc192742b 100644 --- a/components/hal/Kconfig +++ b/components/hal/Kconfig @@ -82,15 +82,6 @@ menu "Hardware Abstraction Layer (HAL) and Low Level (LL)" orsource "../esp_hal_gpio/Kconfig.hal_gpio" - config HAL_ECDSA_GEN_SIG_CM - bool "Enable countermeasure for ECDSA signature generation" - depends on IDF_TARGET_ESP32H2 - default n - help - Enable this option to apply the countermeasure for ECDSA signature operation - This countermeasure masks the real ECDSA sign operation - under dummy sign operations to add randomness in the generated power signature. - This countermeasure is only necessary for ESP32-H2 < v1.2. - + orsource "../esp_hal_security/Kconfig.hal_security" endmenu diff --git a/components/hal/apm_hal.c b/components/hal/apm_hal.c deleted file mode 100644 index ee350b6e2e..0000000000 --- a/components/hal/apm_hal.c +++ /dev/null @@ -1,527 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include "soc/soc_caps.h" -#include "hal/assert.h" -#include "hal/apm_hal.h" -#include "hal/apm_ll.h" -#include "hal/log.h" - -#if SOC_IS(ESP32P4) -void apm_hal_hp_peri_access_enable(apm_ll_master_id_t master_id, apm_ll_hp_peri_t hp_peri, - apm_ll_secure_mode_t sec_mode, bool enable) -{ - apm_ll_hp_peri_access_enable(master_id, hp_peri, sec_mode, enable); -} - - -void apm_hal_lp_peri_access_enable(apm_ll_lp_peri_t lp_peri, bool enable) -{ - apm_ll_lp_peri_access_enable(lp_peri, enable); -} - -void apm_hal_peri_region_config(uint32_t regn_num, uint32_t regn_low_addr, uint32_t regn_high_addr) -{ - apm_ll_peri_region_config(regn_num, regn_low_addr, regn_high_addr); -} - -int apm_hal_peri_region_pms(apm_ll_master_id_t master_id, apm_ll_secure_mode_t sec_mode, - uint32_t regn_num, uint32_t regn_pms) -{ - return apm_ll_peri_region_pms(master_id, sec_mode, regn_num, regn_pms); -} - -int apm_hal_apm_ctrl_clk_gating_enable(apm_ll_apm_ctrl_t apm_ctrl, bool enable) -{ - return apm_ll_apm_ctrl_clk_gating_enable(apm_ctrl, enable); -} - -void apm_hal_dma_region_config(uint32_t regn_num, uint32_t regn_low_addr, uint32_t regn_high_addr) -{ - apm_ll_dma_region_set_low_address(regn_num, regn_low_addr); - apm_ll_dma_region_set_high_address(regn_num, regn_high_addr); -} - -void apm_hal_dma_region_pms(apm_hal_dma_region_config_data_t *pms_data) -{ - HAL_ASSERT(pms_data); - - apm_ll_dma_region_r_pms(pms_data->dma_master, pms_data->pms_r_mask); - apm_ll_dma_region_w_pms(pms_data->dma_master, pms_data->pms_w_mask); -} -#else - -void apm_hal_set_master_sec_mode(uint32_t master_mask, apm_security_mode_t mode) -{ - master_mask &= APM_MASTER_MASK_ALL; - while (master_mask) { - uint32_t master = __builtin_ctz(master_mask); - master_mask &= ~(1U << master); - apm_ll_hp_tee_set_master_sec_mode(master, mode); -#if SOC_APM_SUPPORT_LP_TEE_CTRL - if (master == APM_MASTER_LPCORE) { - apm_ll_lp_tee_set_master_sec_mode(master, mode); - } -#endif - } -} - -void apm_hal_set_master_sec_mode_all(apm_security_mode_t mode) -{ - apm_hal_set_master_sec_mode(APM_MASTER_MASK_ALL, mode); -} - -#if SOC_APM_SUPPORT_CTRL_CFG_LOCK -void apm_hal_lock_master_sec_mode(uint32_t master_mask) -{ - master_mask &= APM_MASTER_MASK_ALL; - while (master_mask) { - uint32_t master = __builtin_ctz(master_mask); - master_mask &= ~(1U << master); - apm_ll_hp_tee_lock_master_sec_mode(master); -#if SOC_APM_SUPPORT_LP_TEE_CTRL - if (master == APM_MASTER_LPCORE) { - apm_ll_lp_tee_lock_master_sec_mode(master); - } -#endif - } -} - -void apm_hal_lock_master_sec_mode_all(void) -{ - apm_hal_lock_master_sec_mode(APM_MASTER_MASK_ALL); -} -#endif - -#if SOC_APM_SUPPORT_TEE_PERI_ACCESS_CTRL -void apm_hal_tee_set_peri_access(apm_tee_ctrl_module_t ctrl_mod, uint64_t periph_mask, apm_security_mode_t mode, apm_perm_t pms) -{ - switch (ctrl_mod) { - case APM_TEE_CTRL_HP: - uint64_t hp_tee_peri_mask = periph_mask & APM_TEE_HP_PERIPH_MASK_ALL; - for (uint32_t periph = 0; periph < APM_TEE_HP_PERIPH_MAX; periph++) { - if (hp_tee_peri_mask & (1ULL << periph)) { - apm_ll_hp_tee_set_peri_access((apm_tee_hp_periph_t)periph, mode, pms); - } - } - apm_ll_hp_tee_enable_bus_err_resp(true); - break; -#if SOC_APM_SUPPORT_LP_TEE_CTRL - case APM_TEE_CTRL_LP: - uint32_t lp_tee_peri_mask = (uint32_t)periph_mask & (uint32_t)APM_TEE_LP_PERIPH_MASK_ALL; - while (lp_tee_peri_mask) { - uint32_t periph = __builtin_ctz(lp_tee_peri_mask); - apm_ll_lp_tee_set_peri_access((apm_tee_lp_periph_t)periph, mode, pms); - lp_tee_peri_mask &= ~(1U << periph); - } - apm_ll_lp_tee_enable_bus_err_resp(true); - break; -#endif - default: - break; - } -} - -void apm_hal_tee_set_peri_access_all(apm_tee_ctrl_module_t ctrl_mod, apm_security_mode_t mode, apm_perm_t pms) -{ - switch (ctrl_mod) { - case APM_TEE_CTRL_HP: - apm_hal_tee_set_peri_access(APM_TEE_CTRL_HP, (uint64_t)(APM_TEE_HP_PERIPH_MASK_ALL), mode, pms); - break; -#if SOC_APM_SUPPORT_LP_TEE_CTRL - case APM_TEE_CTRL_LP: - apm_hal_tee_set_peri_access(APM_TEE_CTRL_LP, (uint64_t)(APM_TEE_LP_PERIPH_MASK_ALL), mode, pms); - break; -#endif - default: - break; - } -} -#endif - -void apm_hal_tee_enable_clk_gating(apm_tee_ctrl_module_t ctrl_mod, bool enable) -{ - switch (ctrl_mod) { - case APM_TEE_CTRL_HP: - apm_ll_hp_tee_enable_clk_gating(enable); - break; -#if SOC_APM_SUPPORT_LP_TEE_CTRL - case APM_TEE_CTRL_LP: - apm_ll_lp_tee_enable_clk_gating(enable); - break; -#endif - default: - break; - } -} - -void apm_hal_enable_ctrl_filter(apm_ctrl_module_t ctrl_mod, apm_ctrl_access_path_t path, bool enable) -{ - switch (ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_enable_ctrl_filter(path, enable); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_enable_ctrl_filter(path, enable); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_enable_ctrl_filter(path, enable); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_enable_ctrl_filter(path, enable); - break; -#endif - default: - break; - } -} - -void apm_hal_enable_ctrl_filter_all(bool enable) -{ - apm_ll_hp_apm_enable_ctrl_filter_all(enable); -#if SOC_APM_LP_APM0_SUPPORTED - apm_ll_lp_apm0_enable_ctrl_filter_all(enable); -#endif - apm_ll_lp_apm_enable_ctrl_filter_all(enable); -#if SOC_APM_CPU_APM_SUPPORTED - apm_ll_cpu_apm_enable_ctrl_filter_all(enable); -#endif -} - -void apm_hal_enable_region_filter(apm_ctrl_module_t ctrl_mod, uint32_t regn_num, bool enable) -{ - switch (ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_enable_region_filter(regn_num, enable); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_enable_region_filter(regn_num, enable); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_enable_region_filter(regn_num, enable); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_enable_region_filter(regn_num, enable); - break; -#endif - default: - break; - } -} - -void apm_hal_set_region_start_addr(apm_ctrl_module_t ctrl_mod, uint32_t regn_num, uint32_t addr) -{ - switch (ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_set_region_start_addr(regn_num, addr); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_set_region_start_addr(regn_num, addr); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_set_region_start_addr(regn_num, addr); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_set_region_start_addr(regn_num, addr); - break; -#endif - default: - break; - } -} - -void apm_hal_set_region_end_addr(apm_ctrl_module_t ctrl_mod, uint32_t regn_num, uint32_t addr) -{ - switch (ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_set_region_end_addr(regn_num, addr); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_set_region_end_addr(regn_num, addr); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_set_region_end_addr(regn_num, addr); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_set_region_end_addr(regn_num, addr); - break; -#endif - default: - break; - } -} - -void apm_hal_set_sec_mode_region_attr(apm_ctrl_module_t ctrl_mod, uint32_t regn_num, apm_security_mode_t mode, uint32_t regn_pms) -{ - HAL_ASSERT(mode != APM_SEC_MODE_TEE); - - switch (ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_set_sec_mode_region_attr(regn_num, mode, regn_pms); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_set_sec_mode_region_attr(regn_num, mode, regn_pms); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_set_sec_mode_region_attr(regn_num, mode, regn_pms); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_set_sec_mode_region_attr(regn_num, mode, regn_pms); - break; -#endif - default: - break; - } -} - -void apm_hal_set_region_filter_cfg(apm_ctrl_module_t ctrl_mod, apm_security_mode_t mode, const apm_hal_ctrl_region_cfg_t *regn_cfg) -{ - HAL_ASSERT(regn_cfg); - HAL_ASSERT(mode != APM_SEC_MODE_TEE); - - switch (ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_set_region_start_addr(regn_cfg->regn_num, regn_cfg->regn_start_addr); - apm_ll_hp_apm_set_region_end_addr(regn_cfg->regn_num, regn_cfg->regn_end_addr); - apm_ll_hp_apm_set_sec_mode_region_attr(regn_cfg->regn_num, mode, regn_cfg->regn_pms); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_set_region_start_addr(regn_cfg->regn_num, regn_cfg->regn_start_addr); - apm_ll_lp_apm0_set_region_end_addr(regn_cfg->regn_num, regn_cfg->regn_end_addr); - apm_ll_lp_apm0_set_sec_mode_region_attr(regn_cfg->regn_num, mode, regn_cfg->regn_pms); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_set_region_start_addr(regn_cfg->regn_num, regn_cfg->regn_start_addr); - apm_ll_lp_apm_set_region_end_addr(regn_cfg->regn_num, regn_cfg->regn_end_addr); - apm_ll_lp_apm_set_sec_mode_region_attr(regn_cfg->regn_num, mode, regn_cfg->regn_pms); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_set_region_start_addr(regn_cfg->regn_num, regn_cfg->regn_start_addr); - apm_ll_cpu_apm_set_region_end_addr(regn_cfg->regn_num, regn_cfg->regn_end_addr); - apm_ll_cpu_apm_set_sec_mode_region_attr(regn_cfg->regn_num, mode, regn_cfg->regn_pms); - break; -#endif - default: - break; - } -} - -#if SOC_APM_SUPPORT_CTRL_CFG_LOCK -void apm_hal_lock_region_filter_cfg(apm_ctrl_module_t ctrl_mod, uint32_t regn_num) -{ - switch (ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_lock_sec_mode_region_attr(regn_num); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_lock_sec_mode_region_attr(regn_num); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_lock_sec_mode_region_attr(regn_num); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_lock_sec_mode_region_attr(regn_num); - break; -#endif - default: - break; - } -} -#endif - -void apm_hal_set_ctrl_sec_mode_cfg(const apm_hal_ctrl_sec_mode_cfg_t *cfg) -{ - HAL_ASSERT(cfg); - HAL_ASSERT(cfg->regions); - - for (uint32_t regn_idx = 0; regn_idx < cfg->regn_count; regn_idx++) { - const apm_hal_ctrl_region_cfg_t *region = &cfg->regions[regn_idx]; - apm_hal_set_region_filter_cfg(cfg->ctrl_mod, cfg->mode, region); - apm_hal_enable_region_filter(cfg->ctrl_mod, region->regn_num, region->filter_en); -#if SOC_APM_SUPPORT_CTRL_CFG_LOCK - if (region->lock_en) { - apm_hal_lock_region_filter_cfg(cfg->ctrl_mod, region->regn_num); - } -#endif - apm_hal_enable_ctrl_filter(cfg->ctrl_mod, region->path_id, true); - } -} - -uint32_t apm_hal_get_exception_type(apm_hal_ctrl_info_t *ctrl_info) -{ - HAL_ASSERT(ctrl_info); - - switch (ctrl_info->ctrl_mod) { - case APM_CTRL_HP_APM: - return apm_ll_hp_apm_get_excp_type(ctrl_info->path); -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - return apm_ll_lp_apm0_get_excp_type(ctrl_info->path); -#endif - case APM_CTRL_LP_APM: - return apm_ll_lp_apm_get_excp_type(ctrl_info->path); -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - return apm_ll_cpu_apm_get_excp_type(ctrl_info->path); -#endif - default: - return UINT8_MAX; - } -} - -void apm_hal_clear_exception_status(apm_hal_ctrl_info_t *ctrl_info) -{ - HAL_ASSERT(ctrl_info); - - switch (ctrl_info->ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_clear_ctrl_excp_status(ctrl_info->path); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_clear_ctrl_excp_status(ctrl_info->path); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_clear_ctrl_excp_status(ctrl_info->path); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_clear_ctrl_excp_status(ctrl_info->path); - break; -#endif - default: - break; - } -} - -void apm_hal_get_exception_info(apm_hal_ctrl_info_t *ctrl_info, apm_ctrl_exception_info_t *excp_info) -{ - HAL_ASSERT(ctrl_info); - HAL_ASSERT(excp_info); - - switch (ctrl_info->ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_get_excp_info(ctrl_info->path, excp_info); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_get_excp_info(ctrl_info->path, excp_info); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_get_excp_info(ctrl_info->path, excp_info); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_get_excp_info(ctrl_info->path, excp_info); - break; -#endif - default: - break; - } -} - -void apm_hal_enable_intr(apm_hal_ctrl_info_t *ctrl_info, bool enable) -{ - HAL_ASSERT(ctrl_info); - - switch (ctrl_info->ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_enable_ctrl_intr(ctrl_info->path, enable); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_enable_ctrl_intr(ctrl_info->path, enable); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_enable_ctrl_intr(ctrl_info->path, enable); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_enable_ctrl_intr(ctrl_info->path, enable); - break; -#endif - default: - break; - } -} - -int apm_hal_get_intr_src_num(apm_hal_ctrl_info_t *ctrl_info) -{ - HAL_ASSERT(ctrl_info); - - switch (ctrl_info->ctrl_mod) { - case APM_CTRL_HP_APM: - return apm_ll_hp_apm_get_ctrl_intr_src(ctrl_info->path); -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - return apm_ll_lp_apm0_get_ctrl_intr_src(ctrl_info->path); -#endif - case APM_CTRL_LP_APM: - return apm_ll_lp_apm_get_ctrl_intr_src(ctrl_info->path); -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - return apm_ll_cpu_apm_get_ctrl_intr_src(ctrl_info->path); -#endif - default: - return -1; - } -} - -void apm_hal_enable_reset_event_bypass(bool enable) -{ - apm_ll_enable_reset_event_bypass(enable); -} - -void apm_hal_enable_ctrl_clk_gating(apm_ctrl_module_t ctrl_mod, bool enable) -{ - switch (ctrl_mod) { - case APM_CTRL_HP_APM: - apm_ll_hp_apm_enable_ctrl_clk_gating(enable); - break; -#if SOC_APM_LP_APM0_SUPPORTED - case APM_CTRL_LP_APM0: - apm_ll_lp_apm0_enable_ctrl_clk_gating(enable); - break; -#endif - case APM_CTRL_LP_APM: - apm_ll_lp_apm_enable_ctrl_clk_gating(enable); - break; -#if SOC_APM_CPU_APM_SUPPORTED - case APM_CTRL_CPU_APM: - apm_ll_cpu_apm_enable_ctrl_clk_gating(enable); - break; -#endif - default: - break; - } -} - -#endif //SOC_IS(ESP32P4) diff --git a/components/hal/esp32h4/include/hal/efuse_ll.h b/components/hal/esp32h4/include/hal/efuse_ll.h index 0752550d03..c4cf792f6b 100644 --- a/components/hal/esp32h4/include/hal/efuse_ll.h +++ b/components/hal/esp32h4/include/hal/efuse_ll.h @@ -12,7 +12,6 @@ #include "soc/efuse_periph.h" #include "hal/assert.h" #include "rom/efuse.h" -#include "hal/ecdsa_types.h" //TODO: [ESP32H4] IDF-12322 inherited from verification branch, need check diff --git a/components/hal/esp32s31/include/hal/efuse_ll.h b/components/hal/esp32s31/include/hal/efuse_ll.h index f274228610..74ce7cfaf5 100644 --- a/components/hal/esp32s31/include/hal/efuse_ll.h +++ b/components/hal/esp32s31/include/hal/efuse_ll.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -11,7 +11,6 @@ #include "soc/efuse_periph.h" #include "hal/assert.h" #include "rom/efuse.h" -#include "hal/ecdsa_types.h" #include "soc/efuse_defs.h" #ifdef __cplusplus @@ -105,11 +104,12 @@ __attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_ver_pkg( // TODO: [ESP32S31] IDF-14688 } -__attribute__((always_inline)) static inline void efuse_ll_set_ecdsa_key_blk(ecdsa_curve_t curve, int efuse_blk) -{ - (void) curve; - // TODO: [ESP32S31] IDF-14688 -} +// TODO: [ESP32S31] IDF-14688 +// __attribute__((always_inline)) static inline void efuse_ll_set_ecdsa_key_blk(ecdsa_curve_t curve, int efuse_blk) +// { +// (void) curve; +// +// } /******************* eFuse control functions *************************/ diff --git a/components/hal/include/hal/efuse_hal.h b/components/hal/include/hal/efuse_hal.h index d21390a27a..d688675508 100644 --- a/components/hal/include/hal/efuse_hal.h +++ b/components/hal/include/hal/efuse_hal.h @@ -9,7 +9,6 @@ #include #include #include "soc/soc_caps.h" -#include "hal/ecdsa_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/hal/mpu_hal.c b/components/hal/mpu_hal.c deleted file mode 100644 index c03fe80b11..0000000000 --- a/components/hal/mpu_hal.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include - -#include "esp_err.h" - -#include "hal/mpu_hal.h" -#include "hal/mpu_ll.h" -#include "hal/mpu_types.h" - -#include "soc/soc_caps.h" - -void mpu_hal_set_region_access(int id, mpu_access_t access) -{ - uint32_t addr = mpu_ll_id_to_addr(id); - - switch (access) - { -#if SOC_MPU_REGION_RO_SUPPORTED - case MPU_REGION_RO: - mpu_ll_set_region_ro(addr); - break; -#endif -#if SOC_MPU_REGION_WO_SUPPORTED - case MPU_REGION_WO: - mpu_ll_set_region_wo(addr); - break; -#endif - case MPU_REGION_RW: - mpu_ll_set_region_rw(addr); - break; - case MPU_REGION_X: - mpu_ll_set_region_x(addr); - break; - case MPU_REGION_RWX: - mpu_ll_set_region_rwx(addr); - break; - case MPU_REGION_ILLEGAL: - mpu_ll_set_region_illegal(addr); - break; - default: - break; - } -} diff --git a/components/hal/test_apps/crypto/main/ds/digital_signature_test_cases_4096.h b/components/hal/test_apps/crypto/main/ds/digital_signature_test_cases_4096.h deleted file mode 100644 index 2a456a585b..0000000000 --- a/components/hal/test_apps/crypto/main/ds/digital_signature_test_cases_4096.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - * - * File generated by gen_digital_signature_tests.py - */ - -#include "hal_crypto_common.h" - -#define NUM_HMAC_KEYS 3 - -static const uint8_t test_hmac_keys[NUM_HMAC_KEYS][32] = { - { 0xe0, 0x19, 0xfc, 0x51, 0xb3, 0xa6, 0x3f, 0x31, 0xca, 0x43, 0xb5, 0x17, 0xe9, 0x7b, 0xe2, 0x87, 0x85, 0x41, 0x9c, 0x42, 0x60, 0x52, 0xd8, 0x8e, 0x45, 0xc3, 0x7c, 0x3b, 0x82, 0xe0, 0xe2, 0x80 }, - { 0x3d, 0x71, 0xd5, 0xc7, 0xe0, 0x15, 0xe6, 0x30, 0x66, 0xe8, 0xee, 0x5d, 0x14, 0x1e, 0xe1, 0xa1, 0x03, 0xd9, 0x7d, 0x48, 0x16, 0xde, 0xbc, 0xba, 0xaa, 0xf4, 0x3e, 0xd5, 0xb2, 0xbc, 0x46, 0xbc }, - { 0xa7, 0x84, 0x00, 0x57, 0xd9, 0x09, 0x0b, 0xab, 0x02, 0xfe, 0x76, 0x14, 0x21, 0xc9, 0x41, 0x0f, 0x8d, 0xe9, 0x94, 0xb7, 0x70, 0xc6, 0xf9, 0xec, 0xd4, 0xd9, 0xd4, 0xee, 0x00, 0xce, 0xde, 0x58 }, -}; - -#define NUM_MESSAGES 10 - -static const uint32_t test_messages[NUM_MESSAGES][4096/32] = { - // Message 0 - { 0x5b8223c6, 0xfa88edc7, 0x583c1799, 0xedc7c223, 0x9fb0857c, 0xed3c6f20, 0x05d1fb6e, 0x96d1dac3, 0x85c6d96d, 0x8b3a9a1d, 0x2e786a8f, 0xd2e4e243, 0xb364f14e, 0x44010946, 0xd9cd527f, 0x618cc373, 0xa0a19bd9, 0x7d97761f, 0xfb079173, 0x3c540391, 0x02d239ac, 0xe911c2f1, 0xf65c484b, 0xcf487211, 0x4125e65c, 0xb26ae57f, 0x1a3e9853, 0x019647f5, 0xb14d1638, 0x07069668, 0x19ad19b5, 0x19251d1d, 0xb685c504, 0x6760e85b, 0xa0fb61cc, 0x0b3f7909, 0x0377025d, 0x7654239b, 0x5c93db67, 0x3482b3f5, 0x1a79c91b, 0x02e91b71, 0x8557f72b, 0x2a45cf00, 0x3d180e14, 0x6f73b72b, 0xd9652bd2, 0xd49095cc, 0xffc72050, 0x799ac0a3, 0x23d37af6, 0xf30c65f5, 0x86daf4f1, 0xad2f3c99, 0xe0ba6ff9, 0x362de37c, 0x4846218d, 0x9a9a52aa, 0xd08e871a, 0xbc17c032, 0x91c16b34, 0x285fe6f8, 0xda1f4561, 0xa8fa480d, 0x9caff2a9, 0xd4bc8149, 0xb16f4ba3, 0x0ae0c85c, 0x8b261fb3, 0xaa5d5e9c, 0x9af38deb, 0xbcf4fc65, 0xabe82ab0, 0x5e478c29, 0x0e166ddf, 0x8080359b, 0x4a33e024, 0xafaf0456, 0x9d68deda, 0xcbbcdae1, 0x02f97709, 0x810de7ce, 0x5e9c6b43, 0x0267aa74, 0x18d763b2, 0xdd88fb86, 0x3c006c8b, 0x55b8b0cc, 0xf8413d02, 0xde19f942, 0xd4b64c8a, 0x7cf2bea1, 0xcdac985b, 0xa5fadac5, 0xf1bef008, 0x6098c15d, 0x23b0c27a, 0x7c4393f9, 0xe9c49179, 0x4b947a62, 0xfff2f206, 0xf639587d, 0x5ee8da18, 0xd10f0450, 0xd8b4bc25, 0x20e7eb82, 0x1736eef5, 0x6a8f4ef8, 0x3ff7f07f, 0x10795bba, 0x0b18864b, 0x494c96dc, 0x2fb5a260, 0xe28127bb, 0xab1162c6, 0x2bace451, 0x40874cd9, 0xf74700e8, 0x602cf820, 0xe1551cd9, 0x09747e29, 0x20bb223c, 0x77b3a76d, 0x3794e803, 0xf42f126d, 0x2de8434d, 0x668ac9fb, 0x4f7c92b6 }, - // Message 1 - { 0x6db17696, 0x244fca66, 0xe983297c, 0x937d0785, 0xa24fb4a4, 0x975c141b, 0x2d56770c, 0x5773491e, 0xb7827329, 0xb0789fa1, 0x5f91495c, 0x50a1535f, 0xc224980f, 0x2bcfc99d, 0x63379435, 0xc7d84f81, 0xf3f8b326, 0x9d1de54c, 0x3a91fc0a, 0xcf0776e5, 0x54c367ac, 0xb94e8202, 0xb6a1541f, 0x41bcbc32, 0x95d38d73, 0xe5c36c21, 0xb12d6159, 0x954b6dae, 0x45973e71, 0x1cda2855, 0xf8df9ad8, 0x644e1ca7, 0x2d4da7f1, 0x7fb3453a, 0x40f8eece, 0x0527c74c, 0x63e4fc08, 0x24e043f3, 0x22258133, 0x11c6417c, 0xf81232b7, 0xa4036037, 0x1aded35c, 0x20492892, 0x58d442a3, 0x48858b44, 0x9a6526a2, 0xc222ce2a, 0xd62ddcdc, 0xa83ec889, 0xa6aead0f, 0x00064cd1, 0x97cc7619, 0xdcfeead8, 0x084c9fbb, 0x0e706ee7, 0x52f492e4, 0xa51f2798, 0xf411d709, 0x1ae71c6f, 0xa94a6094, 0x68c34f12, 0xc4fb3f5d, 0xc0d9640d, 0xb1d17cad, 0xb9037e04, 0x7a6befa8, 0xa8611c7e, 0x3caf3730, 0x898f42a6, 0x67436870, 0x2a10a9f4, 0xbc4e74d8, 0x1790ec00, 0xdd193f23, 0x2b028522, 0xa33da521, 0x265ddcab, 0x3b23a204, 0xd1c622a8, 0x1531f752, 0xb8d48f02, 0x3d361e11, 0x87efe588, 0xc0b7d7f4, 0x21320e85, 0xbdd0491e, 0x6878b882, 0xf43c7d58, 0x95ccfda9, 0xdb39e8f5, 0x29d88964, 0xd282a492, 0xc889f542, 0xce6304e9, 0xc457a787, 0x47f7bc8e, 0x4eed33c0, 0xed150c28, 0xd4abcd08, 0xa20961b3, 0xaf5d0429, 0x245df52b, 0xd47d84f8, 0xdd44316d, 0x39643183, 0xee61e6a6, 0x7d366b7c, 0xde6bb656, 0x4563aea7, 0x1c967894, 0xacb7f54d, 0xc4c62fff, 0xf8846bbb, 0x9589e180, 0xd36d33b0, 0xbdd135b7, 0x4654580c, 0xb9ab2521, 0x9f0dbea2, 0x24827593, 0xf55d24b7, 0xb7a905f7, 0x14d542bd, 0x47859654, 0x4583d9a1, 0x6e711a70, 0xfd811de1 }, - // Message 2 - { 0xed4d7109, 0x4e0e1a49, 0xf89b6ff3, 0xe056fb57, 0x53afa880, 0xfe1c49f7, 0xd1830e17, 0x912eae65, 0x226fb7f9, 0xe21039d4, 0x0bc5639d, 0x2da133cb, 0x714531e1, 0xfda0a79d, 0x4c862b04, 0x3a04103d, 0xb5890521, 0xa77c5feb, 0x16114180, 0x0bb05b6d, 0x32cf6395, 0x0b6522f2, 0xaa36a343, 0x3e32599f, 0xc5a89214, 0xd1330f28, 0x3e5ec6d8, 0xfbd07f92, 0xbf4159ce, 0x5e04e915, 0x034f4e92, 0x170f2180, 0x1e792d8e, 0x96074aaa, 0xf59d11ed, 0x2ebfc19b, 0x920df270, 0x9e4b85d2, 0xa87cbc78, 0xe6b7a7ba, 0x5e61a1d2, 0x66ff5fad, 0xc6908748, 0xb42666df, 0x4111505a, 0x03d10421, 0x7e9f5def, 0x224d3e9a, 0xd5df568c, 0x99e03c83, 0xc8f756e6, 0x8f1c460e, 0xa9a518fe, 0x739bbd22, 0xf7343f19, 0x6f377270, 0xa1514341, 0x3006ec98, 0xd65ace1e, 0xf9ae42d6, 0xc0bdb44f, 0x50324808, 0xc784d0cb, 0xada4436a, 0xb32fcb5c, 0x6fe45992, 0xbe1e1fbc, 0x4d12f24b, 0x2894525d, 0x0d628aae, 0x5d3af461, 0x31e31010, 0x7041f204, 0xd16e221a, 0x2ff374ed, 0xdaca35b8, 0x74f67c88, 0x49457357, 0x3cc37ffb, 0x05fe90f7, 0x4816177d, 0xd90a410c, 0x2b6bcf0d, 0x83b98c58, 0x5bdffd49, 0xe8cd6b54, 0x5df214ed, 0x3c2b17da, 0x4d88c905, 0xfcf2d541, 0x6113416b, 0xa6bfeaff, 0x6e982de6, 0x1915da2d, 0x2a665024, 0x54db334f, 0x2f68a4c7, 0x11f25492, 0x1dcc6510, 0x2907beaa, 0x05506517, 0xceddd753, 0x2b06fafd, 0xfd34373e, 0x3efed25a, 0xef2b25b7, 0x7ffc85cb, 0x5d426c00, 0x1e74d9a1, 0x9c6a47f2, 0x24f85a07, 0xe23b2f49, 0xe3c98f1e, 0xbed8064f, 0x82d0acb5, 0x7b2287cc, 0xb5b2df41, 0xcecb3734, 0x0fdcdecf, 0xa2082a23, 0x0ecc613a, 0x88f4fe31, 0x9e454af1, 0x5ecc4ddf, 0x925e1590, 0xd722dcf5, 0x25317545, 0x80553b6a }, - // Message 3 - { 0xdb8ab0d8, 0x8352a755, 0x814109e2, 0x026b88a2, 0xf109e093, 0xa97346bc, 0x2b8eafc3, 0xf5959191, 0x7b6cbffa, 0x3ed8c580, 0x9f8ff337, 0xb5b5eff9, 0x5ef86b9b, 0x082990c4, 0x25b8347c, 0x4ff662a8, 0x81d76ca1, 0x3142818e, 0x850f1a66, 0xda5be26b, 0xbd2435ef, 0x642b9d78, 0x94c2c6ba, 0x236a0b09, 0x70693da2, 0xc4e36393, 0x423c3169, 0x65018e28, 0x9d8af95b, 0x308f6d35, 0x78c057f9, 0x79ae2e67, 0xc14332a6, 0x8e90ad6a, 0xba4f98e6, 0x36e2e12a, 0xa0af779c, 0x7ff2042d, 0x09cb88a1, 0xcd9a013e, 0x946c25f0, 0x1e2de977, 0xcc71d0e9, 0x1e91760e, 0xd2db1aa9, 0x82f4015e, 0x62b34d2e, 0xea817d00, 0x7e068c6f, 0x9cd45388, 0x87e56478, 0xb941472f, 0xab0c68ed, 0xc5841e8e, 0x7a011679, 0x45a83b37, 0x30eaed98, 0x8276a091, 0x2878646f, 0xed9db655, 0x748dcb7f, 0xfbb50291, 0xb9366921, 0x4a6ab2bc, 0x412de9c3, 0x312a2879, 0x2ccaa654, 0xacd304e6, 0x0952d148, 0x367ccc61, 0xec0d0533, 0x643ed028, 0x390a38bd, 0xeb939b4c, 0x66973d9a, 0xfeac4855, 0x3e5a5b39, 0x286a27b3, 0x3c4f1c95, 0xce7dd02b, 0xa0437ba3, 0x25b8d742, 0x14ac3921, 0x31f20af2, 0xbbbbfdc4, 0x24b70692, 0x38ca4e54, 0x5669e1b6, 0xa3ed2237, 0x3bdc1f5d, 0x59a88cdc, 0x6f413613, 0x7e96e4af, 0x61e0ec78, 0x41e045a5, 0x1c2ea76f, 0x41fc44eb, 0x1660063c, 0x5a2d4861, 0xeb4a0150, 0x998ca467, 0x97818ef6, 0xa94b9fad, 0x70f2fd65, 0xd070ceb9, 0x6cfdcef8, 0x37634bdc, 0xcfda5cc0, 0xeef09548, 0x496f0fab, 0x307c15a1, 0xccd90d15, 0xd497071e, 0x24c18289, 0x7e9793bc, 0x90119197, 0xdf285a15, 0x5726b6b0, 0xff787a3f, 0x37745cea, 0x1a452044, 0xfe59e0e1, 0x04641bd5, 0x3c81c3c0, 0x0189793d, 0xb4d7d362, 0x73cb084e, 0x802954ab }, - // Message 4 - { 0x57714ceb, 0xd4ea891d, 0x80634624, 0x2674d5f0, 0xe64b9955, 0xfc897081, 0xc70d11db, 0x4b66a1fc, 0x9277589b, 0x082a949b, 0xc4b57ea3, 0x22483603, 0x38ac45ec, 0xd8d49671, 0xff6a9258, 0x28abc76a, 0x2c5cbc7b, 0x99c37b2a, 0x35ac630c, 0x2e29515f, 0x5f6ce059, 0x23bb1811, 0xdea61bf7, 0x1674ee6e, 0x63f403ec, 0x005e0e6f, 0x4b95d017, 0xb3210c9c, 0xf018616f, 0x2ebe0ca3, 0x6e520e83, 0x53f3c811, 0x4e12d834, 0x3ea94f5f, 0x9cf7cea2, 0x672b6af7, 0xef95e58c, 0xcacb6a25, 0xa2073d06, 0xba3e1080, 0xe17ad704, 0x43120fd8, 0x01ddaad2, 0x0ac909ff, 0x22f02430, 0x93e40d0e, 0x29c31bf7, 0xdcf82e58, 0xdbb4fb4b, 0x0cd41b95, 0xdd719a49, 0x0b92337a, 0x1cde0032, 0x86159699, 0xcd43e1e2, 0xe1d04c4f, 0x6f8cf803, 0xe95778df, 0x428ba9e6, 0x90a11dc9, 0x324aaf5a, 0xf52929e9, 0xa6d657b9, 0x041e73d8, 0xf7389e23, 0xe1e74b63, 0xe036afa3, 0xf8ebc2e7, 0x2d13682b, 0xfc69124e, 0xcb6d7207, 0x4ce9620c, 0x3e33621b, 0x0a7ef135, 0x8261faeb, 0x61c43173, 0xd3c623da, 0x7fb60c10, 0xbd560cec, 0xd613ff75, 0xa4ce6ac0, 0x72686b41, 0x6ced92f5, 0x7ca77287, 0xcd7e09f5, 0x544243e1, 0x24ad9e3f, 0x6be8c4ce, 0xa7149e51, 0xd208d6ae, 0x5ce4aba8, 0xe9c71f29, 0x59646779, 0x28f50d3f, 0x7a3be6eb, 0xff9c5011, 0x3450f7c9, 0x0ac73164, 0x8bc2ed8e, 0x5c230617, 0x447a3097, 0x41a35f7b, 0x03a5220c, 0x3cc3467b, 0xd7f466a3, 0x49bcf01a, 0xd4f3c7f6, 0x1095dcfd, 0xe74419d1, 0xb0e64bcc, 0xddf2eed5, 0x8a50d90c, 0x5fa5dc2d, 0xff0edf86, 0x71780ed4, 0xefd6d10d, 0xb5cb49e4, 0x782284a4, 0x54d9dcf8, 0x8f80ccb9, 0x21f2f84f, 0x2e6a336e, 0x11f0b9a8, 0x748f2261, 0x38bcd6e4, 0x221aa382, 0xd62ee339, 0xe358a45c }, - // Message 5 - { 0x1bc12cdf, 0x28a72c65, 0xf48690b2, 0xd5fc0ea2, 0xe5c0b276, 0x2de130dc, 0x7d515090, 0x31e582bc, 0x83071741, 0xf32d18c2, 0x401aceb2, 0x90cc2f31, 0x2bf5fbd6, 0xbacb8936, 0x1149875c, 0x5eef4a04, 0x2f3e6897, 0xe71bb41e, 0x50fd7691, 0xf0ad6ade, 0x89d7bdb3, 0x90573e25, 0x981ac9fa, 0x33f2d2ac, 0x166cbde4, 0x27f6dc9b, 0x9eee56d3, 0x0dc8e6b8, 0x1aace0a4, 0xa7aaa2fe, 0x80d4b7f3, 0x79014f16, 0x320ed7ff, 0xb9e289b1, 0x15e46a2e, 0x4bdf1eb7, 0xf8f3e838, 0x9a4b3c01, 0x8d88fa6b, 0x64536a00, 0x2a59d92a, 0x05af4c72, 0x9e0ea16a, 0xeb9fe653, 0x46a8a13e, 0x78096135, 0x284b8f7b, 0x17bb4c3b, 0xe816798d, 0x840515d3, 0x0ece68a9, 0x6e6a06ac, 0xfe328057, 0x9024ca90, 0x56dc779e, 0x7ed4587f, 0xf76f9497, 0xfb36a58d, 0x63afa410, 0xf452e511, 0x017b27c1, 0x5b5c89b1, 0x6816acc8, 0xad2974c0, 0x82e3c44a, 0x91b952db, 0x3abff058, 0xba35c474, 0xa2face8d, 0xd013fe9d, 0x756417f1, 0xf49758c3, 0xdde5e21d, 0xb5c32be4, 0x6a0c656a, 0x95b4534f, 0xd745cf46, 0xf5fa5f3b, 0xae5ab31c, 0xd5909050, 0x5ad2287c, 0xd19d877f, 0xf6886332, 0x05689388, 0x6e2c702d, 0x3eb76528, 0xbf229d83, 0x1f5a7e14, 0xad9649bd, 0x6063a966, 0xdb3aedc5, 0x70b412ff, 0xb5bde84d, 0x57b85da6, 0x1a6358e8, 0xfe5fcdef, 0xb6082c47, 0x639322b1, 0x244fa7ed, 0xcb35cade, 0xc28e5248, 0x3337c589, 0x326371a8, 0xd34bc537, 0x1a5a675e, 0xa50ff5e4, 0x8650af04, 0xa20bf18e, 0x9b0bbf85, 0xb5093ec3, 0x2b378916, 0xd1d9bb53, 0x06e6f702, 0x90c4f3e1, 0x42894cb4, 0x1d4562db, 0x69bf1c93, 0x90f474cb, 0x3824e888, 0x3d5bddb2, 0xbd742ead, 0x117160ef, 0xa5827f9b, 0x6485517a, 0x47743509, 0x9b35f24b, 0x7e376093, 0xa45f0ac8 }, - // Message 6 - { 0xe452f4bc, 0xc9d479a5, 0x29a1b641, 0xd1e9a939, 0x89d3ed73, 0x703551d0, 0x94a03ee3, 0xc795d169, 0xfa647432, 0xd12cc217, 0x6b4eb934, 0x9acefaf1, 0x0253eda3, 0x1cd8ac3a, 0xd9d328d1, 0x7f9c57c8, 0x55d3ddbb, 0x7ef5df37, 0xf01de95b, 0x55687231, 0x632850a7, 0x04610301, 0x4930c2d6, 0xd5c67abb, 0x88f6490e, 0xc673cce5, 0xd41292b0, 0xe8436103, 0x18fc0817, 0x703aa3f0, 0xf4fe010b, 0x4de8f608, 0x1fa73843, 0x15f386ff, 0x055a6a1d, 0xcf3b302f, 0xd54e17bf, 0x432c2cf4, 0xdc1ae47c, 0x8b273462, 0xeaeb313a, 0x3d70ee11, 0x43e27f96, 0x6abf2b4c, 0xc24a16a3, 0x58c6373a, 0xa43dc335, 0x9c2519cf, 0x928ca803, 0xe63a772e, 0xfb004fa4, 0xd82bd259, 0xf9ae3953, 0xe8d293a8, 0xe60199af, 0x183acf8e, 0x5036227a, 0xff271487, 0xca4ae0ee, 0xa294276b, 0xd044da85, 0xc06c63fc, 0x46d0b7a3, 0x2718eef5, 0x11bf8763, 0x2ecad730, 0xaa9d785d, 0x705cb33c, 0xa5a058ac, 0x56b8f206, 0xbb8589be, 0x43f29d50, 0x9f99c44a, 0xdc4a2d7e, 0x7a67f3a6, 0xf9f2a464, 0x72e15395, 0x058c896b, 0x3f012837, 0x47c28d1b, 0xc5af9885, 0x8470ee34, 0x0a2d96dc, 0x84c85dd2, 0x4e698e29, 0xfdf921f3, 0x74d238ab, 0xa24fc6ec, 0x8c5e7858, 0x66538b3f, 0x70624478, 0x67962dad, 0x8872ff12, 0xc8f874fc, 0x576e08b9, 0x679637e2, 0x5a4b25e1, 0x1cf2c23f, 0x2f517298, 0x40737162, 0x83106478, 0x00b6e580, 0x574b57bb, 0x49f2367a, 0x4509f9d8, 0xffc90327, 0x09da762e, 0x0f0032db, 0x5e4d3a6b, 0x832e51f5, 0x5cba2bb2, 0x796c76ab, 0x1a924931, 0xad68199b, 0xcae04e9b, 0x1b01a7cf, 0x538e362d, 0xe5d42a13, 0x9f74c756, 0xbc9a23af, 0x8f4d9ac3, 0xd126c669, 0xc7b7729e, 0x18f3d75a, 0x2e4b0461, 0x7a5a7436, 0xa5e4442f, 0x9c0b3af8 }, - // Message 7 - { 0xcc8dd298, 0x3e17956c, 0xdfa1522d, 0x6e536c43, 0x36e504ce, 0xab4b3d1e, 0x1d855b66, 0x7a5d8774, 0x032a37d0, 0xf8089adf, 0x7d0a68c8, 0xedb67d0c, 0x28bf8099, 0x53908c44, 0xd64aef09, 0x3a888eed, 0x9bf63716, 0xdc30171a, 0xf6dc15b9, 0x2142ad89, 0xdfbc7e72, 0xd15f60c4, 0xe40a7cd0, 0x9f024434, 0xef2af8d4, 0xc33f3e8c, 0xfb1aef47, 0xfd75ee6a, 0xaf43429f, 0xa91320c5, 0xe75223f8, 0x932102ad, 0xe0285748, 0x6e49073a, 0x54b7a14f, 0xc578136a, 0x764637dc, 0x5a4233ec, 0x22244d8d, 0xbf1e51e8, 0x1c7ff213, 0xf2892d06, 0x9b83cbac, 0xed54b7b2, 0x94ede988, 0x95b1b8c0, 0x057e0c7a, 0x3ab93c3f, 0xb6b87bb8, 0x0bdb2659, 0x31683aa5, 0x1bb0ffab, 0x5d6920d4, 0xc05fac74, 0x1db3121c, 0xcff11207, 0x29e7dc11, 0x9605eb05, 0x96a3769c, 0x315d485a, 0x1495b308, 0xcd1993a6, 0x032b8d2a, 0xf1ec677b, 0xb09e1f6e, 0x8479bb94, 0xeac3f10b, 0x9bd252bf, 0x50a23458, 0x6c8b24d5, 0x2ecb3c03, 0x708c6957, 0x1f599bac, 0xbbbdcaf8, 0xfb5fdb49, 0xeb26f5fe, 0xc32d74fb, 0xce1ca095, 0x60df7ac8, 0xbf0874e7, 0xcef6a57d, 0xc79cf491, 0x85ec6d40, 0x519f7ec2, 0x870c4573, 0x5566fd01, 0x99a91b71, 0x2573ab71, 0xd0967389, 0xf53aebc1, 0x19e2d893, 0x7fb25e60, 0x0b59d165, 0x7e85aa2d, 0x1b02ece3, 0xf71378df, 0xe9c237c6, 0xa0365fce, 0x286c2f3d, 0x6783e4c3, 0x47c86229, 0xc18ab13c, 0x33e1fc5b, 0x308d23c3, 0x2e875b30, 0x55f7a991, 0x1e3ac107, 0x0af30db9, 0x16ee6859, 0x165e0740, 0xa4ac4587, 0x0e01b996, 0x418b7684, 0xd3d95ed4, 0x5818cda8, 0x06e23868, 0x86323661, 0x899dcf13, 0x1a805c58, 0x365f027b, 0x8f3edf67, 0x7b7788d4, 0x54433277, 0xa76dbdf3, 0xa4b4853f, 0x25b9edc4, 0x65513104, 0xf80ff68c }, - // Message 8 - { 0xee334586, 0xcff4221e, 0xf9f78033, 0xe47cb45d, 0x286aee0c, 0x4f098fae, 0xb09c4aa1, 0x0156b937, 0x6b17c99b, 0x61022994, 0xe39a53ef, 0xae99a69e, 0x49317b54, 0xe59fd748, 0x5e9e28e5, 0x8580e373, 0xfb4ab864, 0x3ddbdaf6, 0x53d9f846, 0x6746c176, 0xecc7acf2, 0x011b4527, 0x997c908f, 0xa5377ac5, 0x8e362d50, 0xa82ffdc7, 0xd5ac6bdd, 0x7fea3597, 0xce83aa16, 0x5a876007, 0x0350729b, 0xbbce5b23, 0xfa4d1ea8, 0x01141379, 0x3b7610bf, 0x5c7e8e2d, 0x72d941dd, 0xf4f90443, 0x77eeb2f1, 0x9d04214a, 0x730fe00d, 0x478b9d4f, 0x74648cc0, 0xcba3e985, 0x76861fb8, 0xa732fc65, 0x42c37470, 0x34fa6e2b, 0xaea8f19c, 0x184c3ddb, 0x68e6f193, 0x57d6aa56, 0xb6d73fb1, 0x8cdc8b2d, 0x2ca44938, 0xd274bb8d, 0x322216e1, 0x236d88c9, 0x373f0604, 0x5d453e43, 0x3e43dacb, 0x956be271, 0x6cd2de66, 0xf20ebbe5, 0xe712d372, 0x2a52bcaa, 0x7ef61eee, 0x7373e0a5, 0x2546a8c5, 0xf8b7a409, 0x0dd39577, 0xf76b1790, 0x02bae1d9, 0xab2cfa90, 0x9d813594, 0x297f4a40, 0x15b3ae12, 0xfd68916a, 0x11144092, 0x7a7acfe6, 0x3fc0b46d, 0xe4ef53b5, 0xdafa0a2f, 0x48a0adab, 0x6adfb440, 0x9c9f8156, 0xbbdafb71, 0x42724c46, 0x5d52b219, 0x0c1902c0, 0xab73ab10, 0x372ff909, 0x0c4bba52, 0xbe3cf13f, 0xd8f904e9, 0x357de8ef, 0x4b8b9853, 0xd2e8a5bd, 0x0ad12d1b, 0x8fb563f1, 0xfeb51ccb, 0x2ca72e4e, 0x9232f8ec, 0x7b1f59c2, 0xd373a2eb, 0x4934908d, 0xca2908b4, 0x0a60b257, 0x7613c894, 0x9e8d0a95, 0x08310a85, 0x18e38a72, 0xf7e3dd3b, 0x91023003, 0x47f430c4, 0x9fd0b861, 0xe04d5f15, 0x627b7b00, 0xc1be62fa, 0xdde5c280, 0xa7def84e, 0xf1f2bc80, 0x3a52ae63, 0x1dafded7, 0x9f2d0c67, 0xf7e0e23c, 0x4df71751, 0xfbe52f39 }, - // Message 9 - { 0x114c7b7d, 0x6e0a4091, 0xa1ca8ff8, 0xbbebd6e2, 0xcf0e1f0c, 0xc37d6fd1, 0xd95988a5, 0x3f037509, 0xf63f01e7, 0xf7da3c13, 0x5dac7e31, 0xf3827bd4, 0x19814a2f, 0xc9eba643, 0xe76dd339, 0x4808ff4b, 0x021c6f56, 0x0a8bf157, 0x7c6da00d, 0x5bb73f8b, 0x8451c583, 0x879ff0b9, 0x0b0202d9, 0x2def9b31, 0xffe90a1e, 0x2edf353d, 0x4d5907c9, 0x5ede67dc, 0x73fc44e0, 0x3cb1996c, 0xe0232147, 0x55417647, 0x51608a6a, 0xa01891d5, 0xa24e1b0b, 0xd350fd6e, 0x6df5f0f0, 0xa25b1109, 0xaf70b2be, 0xde1eb7b7, 0x11e96416, 0xb0440223, 0x7a990004, 0x996082b6, 0xca604575, 0x37289ac1, 0x22f9f957, 0x411460d7, 0xb96d073e, 0x1cf5a29a, 0x59bb1a1b, 0x02ae9a70, 0xa003257e, 0xbd5db231, 0xaf627522, 0xc3aee50e, 0xef12de92, 0x5fbfad38, 0x1955fdbe, 0xe9912624, 0x0f4dfc59, 0x04abc583, 0xa541abb3, 0xf18e6fff, 0xd7836cfc, 0x8b5b314f, 0xb8186f24, 0xb792523d, 0xd6c278e9, 0x589106ab, 0x8309afb4, 0x9d6b1a57, 0xf9b8ca53, 0x127fa2dd, 0x6811c966, 0x3e779dc9, 0x65079638, 0x8fef2e22, 0xfb323a4f, 0x53867c83, 0xee4c4541, 0xd240a0a8, 0xef876f46, 0x2d3718ae, 0x257120c8, 0xff6c2012, 0x8205fe7c, 0xef12a0d1, 0xb2ba4c7a, 0x009eaa05, 0xd6c21798, 0x8b349dd2, 0x112ba334, 0x69e7e390, 0xe7158d36, 0x9ee0366f, 0x6ae77879, 0x2b465530, 0x32a480d2, 0x351f20ec, 0x480f8597, 0x26123637, 0x33e60117, 0x599fa78a, 0x601744cb, 0xdfa7210d, 0x577088ef, 0x9329fd6d, 0x145599c8, 0x5600b3a2, 0xb3e97a3a, 0xffffa1d1, 0x16eb6985, 0x3d492390, 0xcd0fcede, 0x083c474b, 0x213361e0, 0xa0085c40, 0x52c04f44, 0x4ed84b85, 0x17c46f1b, 0x9964fc00, 0x29e33a1e, 0xcae24444, 0xf2a63dbb, 0x2c5f1694, 0x51b97d95, 0x7fa91cb7 }, - }; - - - -#define NUM_CASES 6 - -static const encrypt_testcase_t test_cases[NUM_CASES] = { - { /* Case 0 */ - .iv = { 0xb6, 0xf5, 0xa9, 0x4b, 0x0a, 0xf4, 0x12, 0x77, 0x0b, 0x1b, 0x23, 0x09, 0xc3, 0x0e, 0x98, 0x0c }, - .p_data = { - .Y = { 0xd9bc5e81, 0x5278a41f, 0x738cfbc5, 0x1b8a9e66, 0xab2af510, 0x2c9dcbca, 0x5f7f5aaf, 0x2e25ef6d, 0x816ed715, 0xdfd33bf8, 0x48bd8a07, 0x8734c506, 0xa8000f0f, 0xae247ce5, 0xb341793d, 0x1487a983, 0x7fbbd48f, 0x3187dbed, 0xdb76a21f, 0x6d30fb92, 0xa46af22f, 0xd4a6a40b, 0xc9d72a63, 0x031322f3, 0xdd70ece8, 0x00397a58, 0x3d487b66, 0x62bd7792, 0x43384493, 0x01a1b0bb, 0x0aa8e094, 0x6850a0f7, 0xe4c8b84e, 0xcd8bc178, 0xbee248ce, 0x180e1413, 0x0834e7c0, 0x65dbc25d, 0xfe9240ba, 0x55a83d31, 0xc7a33eac, 0x0902a0a4, 0x1a85f7e0, 0x3d2e9d85, 0x2df3888d, 0x039b374a, 0xb3eccdf9, 0x6941313f, 0xdf97c189, 0xb48eca17, 0xd6ea82fb, 0x94134a26, 0xae4d0772, 0xf2304d22, 0x88e033a0, 0xec796d04, 0x6d602162, 0x03a9e6fe, 0x65d23c30, 0x94b518e5, 0xfd7e673c, 0xd4daf275, 0x787c73a8, 0x4118eefd, 0x98c199b4, 0x420fea74, 0xe1c3b8d0, 0x6cfb93d0, 0x0c2a112b, 0x44949ea4, 0xf0cd7d25, 0xc096e916, 0xf3563f74, 0xf65d9eb9, 0x12bcbcb6, 0x7b209e1e, 0x25f4e4df, 0x61a3c7bc, 0xa1698274, 0x58f6e7a1, 0x45671c4b, 0x7b2b1e22, 0x3e1794e1, 0xf9bb5e68, 0xdf850597, 0x05cece2a, 0x79e91d82, 0xfc161b5e, 0xe9e11217, 0x5b1c18fb, 0x3e53ace6, 0x4e8892da, 0xcdd787aa, 0x8450b1e7, 0xe2a33d01, 0xd35754a4, 0xf68daac5, 0x10c2a67e, 0xee013ccd, 0xdebf382c, 0x0190adb8, 0x43990fe5, 0xee29aa5b, 0x95fabd11, 0x175159b2, 0xc89bfd61, 0x92ecd835, 0x45e823bd, 0x300e1fc3, 0xc2f686f1, 0x2fa2e7c0, 0x99262371, 0xc5fc3aa3, 0xc9497f49, 0xf0c12a26, 0x20bb0862, 0x05bb77d1, 0x9f0f2cca, 0xf1bdc1d6, 0xc895ad79, 0xaf1c095a, 0xb2f98d0a, 0xf7f13949, 0x82408cf8, 0x95246078, 0x7dadb502, 0xce4b534a, 0x025dbdbc }, - .M = { 0x3e5be0e3, 0xf52833a1, 0xfaaa3a32, 0x05c752eb, 0xe1b51c99, 0x13443332, 0xb4f7c41e, 0x99524fa1, 0xdfc54d11, 0xbc645327, 0xe1b033fe, 0x937eaca5, 0x800491f4, 0xf57591c9, 0xe5fc3e12, 0x80da6612, 0x9780f6f7, 0x55b11c5c, 0x0179fc8b, 0x04623dfe, 0x666a6b7b, 0x6a454e45, 0xd1a1fb65, 0x18941ef0, 0x0aa01777, 0xd9ca9098, 0xa2c6af75, 0x47856509, 0x5b73b08a, 0x057ddaf7, 0xbe9983a1, 0x65d4ce2d, 0xfc744622, 0x344b94a7, 0x8b500462, 0xc0577e09, 0x20a166aa, 0xfb600ac2, 0x18357e29, 0xad80d41f, 0x40cf7884, 0x4f0620a0, 0xa71755e3, 0xb3730828, 0x3b57c8a2, 0x037b6797, 0x0a0504c4, 0xadc84e8a, 0xe7ca75cf, 0x0d7ec10d, 0xa41d0c19, 0xf89480ad, 0x33003db2, 0xfc8fcd65, 0x6e58d19e, 0x7da9a7fb, 0x58157d95, 0x06c58ea2, 0x5ff77fc1, 0xd530d00a, 0xd5a33559, 0x86edb7b3, 0x88d67a31, 0xc009267b, 0xd43b7b63, 0xb5fe7abb, 0xf24cb5f0, 0x4bff1cb1, 0x361dc50f, 0xf9ddf251, 0xa4096a6f, 0xe472bc8f, 0x9fcff5bc, 0xc8f7b470, 0xb938b4c0, 0xf698e42d, 0xecdfc785, 0xd78d0041, 0xbfb1319d, 0x8e139488, 0xa37802e6, 0xb854ad74, 0x6a2dc19c, 0x133bab93, 0x11ffc10a, 0x2b7f4cbd, 0x278c755c, 0x94f7403b, 0xfffee20f, 0x66bf66e6, 0xb7dd64b0, 0xcc19e6b5, 0x3fe276a9, 0xa24ff09b, 0xf728ac2b, 0x9896e0b7, 0x278f34d5, 0x3c62885a, 0x0318e882, 0x42de2419, 0x625fc485, 0x9050d8e9, 0x4be23084, 0xdb339a1e, 0xed8a20b5, 0x45d4baae, 0x0f17e3e2, 0x2a8ccc9c, 0x48c0fd56, 0x72e7d7fb, 0xbce7b35b, 0xf9d33b71, 0xbf19699f, 0x043d2d8f, 0xe6ca2ab3, 0xbb8999ec, 0x70be2438, 0x6caacf3d, 0xcaf12efa, 0x0b7fe0d4, 0xd0c59b45, 0x519cb602, 0xdec543a7, 0x7b70ab45, 0xce1088b4, 0x1e4969c0, 0x946c0dd1, 0xa8023f63 }, - .Rb = { 0x249f12c5, 0xbfa04790, 0x6f15e58b, 0x622c5bd5, 0x58ed2bab, 0xbccbf725, 0xb7ef2f34, 0x44f9b33e, 0x75c70e78, 0x10106974, 0x861d85af, 0x68e8c6f7, 0xf2b40dbb, 0x7bbb891b, 0x7a9221b9, 0xdc0e7ceb, 0xd06d32ec, 0x53ae3d27, 0xb8b542bf, 0x85378510, 0x91239094, 0x3a205f3c, 0x406fe2db, 0xe91cc561, 0x58e1ef61, 0x1bcaaed0, 0x0091fe94, 0x1c62aa45, 0xaa1fd46c, 0x037f59b8, 0x5323106d, 0xc12662e8, 0x52c938c2, 0xe6c0e25e, 0xd122cc49, 0xd7386afa, 0xac74d12b, 0x6ab7a0e8, 0x869720b2, 0xfa7bc0ca, 0x773ab48a, 0xf1c10c44, 0xd7a49c2c, 0xb7a4390a, 0xd1d0327e, 0xa948aac3, 0xf52713b3, 0x256e890a, 0x911b97ae, 0x5470529f, 0x70a03d5e, 0x99c502bf, 0xb50b90af, 0x16885774, 0xd93e9bd0, 0x690e1ce0, 0x5d0531cb, 0x9ad07417, 0x439088ea, 0x57fbbd4e, 0xf304be99, 0x790196d1, 0x1f4a8335, 0xc7cbbae5, 0xad3fd79e, 0x85c3cd73, 0xdf294021, 0x8abcd42b, 0x398ec188, 0x8ebb0b9d, 0xd05edce2, 0x1fa6e879, 0xe3ac6de7, 0xc3deb4a4, 0x1e3640c7, 0x8e8fee5a, 0x66476e67, 0x3eab72be, 0xc51eb4b9, 0xca865930, 0x0285d777, 0x3880c0d8, 0x2a1522b3, 0x721ee77d, 0x34e0d955, 0xf5973965, 0x12ec085f, 0xe26061df, 0x2335063a, 0x9fe3251d, 0x9665de8b, 0x7caec6bb, 0x84b51e0e, 0xbb416b04, 0x89bd0b7b, 0x95f117c2, 0xaa0a2971, 0x5f91cefb, 0x27afb45d, 0xac96dae7, 0x5d62cb98, 0x5e9bbb81, 0x72ccf5d3, 0x2ba887e4, 0xc34b5f8f, 0x21808a6a, 0x0cc9ec13, 0x0d8dc7e8, 0x2bca56a0, 0xd68cdc1b, 0xdbb390e0, 0x84c90089, 0x21174c96, 0xd728c34d, 0xd0f6ad8a, 0x4fe46a1c, 0x954f3cf7, 0xceeba0fd, 0x1b8b48bd, 0xace97594, 0x5e4136fa, 0xc5d4fb92, 0x4f6e95cf, 0x0116c9bb, 0x3e201fdb, 0x3e839b6d, 0xf9d27fce, 0x9a0b4575 }, - .M_prime = 0x10bb9b35, - .length = 127, // 4096 bit - }, - .expected_c = { 0xe9, 0xb0, 0x95, 0xe3, 0x03, 0xf1, 0x78, 0xf2, 0x79, 0x24, 0x73, 0x10, 0x4f, 0x9f, 0xc4, 0x45, 0x67, 0xf6, 0xf7, 0xba, 0xfb, 0xa4, 0xcd, 0xda, 0x0e, 0x14, 0x48, 0x5d, 0x71, 0xc7, 0x2e, 0x80, 0x49, 0x44, 0xc0, 0x2d, 0xcb, 0x8a, 0x6a, 0x70, 0x33, 0xfe, 0x10, 0x0a, 0xf4, 0xa0, 0x15, 0xa0, 0xdb, 0xc0, 0x8f, 0xad, 0xe3, 0xfe, 0x0b, 0x69, 0x95, 0xd1, 0xd3, 0x09, 0x67, 0x69, 0x5a, 0x99, 0xa0, 0xc1, 0x98, 0xb1, 0x2e, 0x77, 0xbd, 0x35, 0xfc, 0x96, 0x5d, 0xb9, 0xf4, 0x9c, 0x99, 0x61, 0x44, 0x77, 0x8e, 0xa1, 0x73, 0x25, 0x2c, 0x7b, 0x95, 0xd8, 0xa7, 0xf3, 0xe3, 0x08, 0xeb, 0x48, 0xc8, 0x44, 0x69, 0x19, 0xe6, 0x9b, 0x30, 0x0e, 0x16, 0xfc, 0x2f, 0xf1, 0xe8, 0xd9, 0x2d, 0xe5, 0xa9, 0x95, 0x5c, 0x2b, 0xb3, 0xd6, 0x2b, 0xca, 0x5b, 0x1f, 0xff, 0x99, 0xcc, 0x22, 0x7b, 0x28, 0x1a, 0x26, 0x0c, 0x98, 0x02, 0x04, 0x36, 0x51, 0x4c, 0x1b, 0xc6, 0xe3, 0x1a, 0x91, 0x8b, 0x24, 0x50, 0x57, 0x04,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0xd5, 0x5d, 0x30, 0xed, 0xae, 0x9b, 0xc9, 0x84, 0xaa, 0x69, 0x64, 0xf8, 0xa2, 0xdb, 0x0a, 0x0b, 0x87, 0xa6, 0x93, 0x4b, 0x15, 0x2d, 0x7f, 0x31, 0x19, 0x9a, 0xbc, 0x76, 0xc5, 0x3c, 0xe8, 0x3b, 0xe8, 0x1f, 0xc1, 0xed, 0xc5, 0xdf, 0xcf, 0x66, 0xe0, 0x6b, 0xda, 0xd0, 0xbc, 0x0a, 0xe1, 0x7f, 0xe2, 0x17, 0x0c, 0x54, 0xe8, 0x77, 0x54, 0x00, 0xf9, 0xd4, 0x9a, 0xe3, 0xd7, 0x33, 0x96, 0x7a, 0xae, 0x7a, 0xa6, 0x7c, 0xf0, 0x4c, 0x6c, 0x91, 0xc1, 0x51, 0x1f, 0x13, 0xd7, 0xc5, 0x3c, 0x09, 0xc6, 0xd9, 0x34, 0x0f, 0x66, 0xff, 0x05, 0x1b, 0x54, 0x33, 0xc0, 0xdc, 0x29, 0xa5, 0x26, 0x57, 0x9e, 0xd9, 0xfd, 0x38, 0xd4, 0xe6, 0xb1, 0x96, 0x9a, 0xf6, 0x12, 0xfb, 0x2d, 0x3a, 0x1c, 0x19, 0xc9, 0x52, 0xb4, 0xbf, 0x39, 0x35, 0xdf, 0x96, 0x0c, 0xab, 0xba, 0x5f, 0x77, 0x49, 0x3c, 0x46, 0x3c, 0x2b, 0x24, 0xcf, 0x92, 0x2c, 0x7e, 0xaa, 0x33, 0x83, 0x01, 0x04, 0x51, 0x10, 0xeb, 0xb0 }, - .hmac_key_idx = DS_KEY_BLOCK_2, - // results of message array encrypted with these keys - .expected_results = { - // Message 0 - { 0xfbb74b40, 0xe374e619, 0x5e13f3db, 0x7c115126, 0x6de46b23, 0x8da94cf4, 0xbca82dfd, 0x36dc0605, 0x09ded882, 0xd93fc63e, 0x3f4f182d, 0xc9a82503, 0x12855997, 0x5e81b49e, 0x612e6356, 0x9d3065d4, 0x59588dda, 0xa7686076, 0xd250bc05, 0x548c132f, 0x74afb3f2, 0xe64e4afd, 0xe0278a09, 0xb1eb40c7, 0x2ae1182f, 0xbd18fb09, 0xd99bce5d, 0x0cea8a0b, 0x9ba0ebda, 0xa4bb85ee, 0x9d952fc8, 0x6d0d28e1, 0x6624f74f, 0x7c3780cc, 0x1dc160c6, 0xfae23c41, 0x521b525f, 0xc4c605ce, 0xf8a74470, 0x153ae915, 0x66df5b13, 0x99240058, 0x2f9ad9bc, 0xbd9032c5, 0xf8b610df, 0x71c0af21, 0x1060a640, 0x5a3044a0, 0xf4b9ef05, 0x13ddbc92, 0x3bd52348, 0xac2a7296, 0x632a2311, 0x8641de76, 0x89b8ec44, 0xf2a91646, 0x10b48913, 0x30438ad9, 0x87896ce2, 0xea99866a, 0x69c5e9d2, 0xba889f66, 0x0ab126f0, 0x2fae8e24, 0xfdd0d95f, 0x89e512c9, 0xded5dd87, 0x34ccca78, 0x7d981cd8, 0xafbbe035, 0xfc3ddd8d, 0x4b736f1c, 0xb0b08d7f, 0x26d18579, 0x873ecc99, 0xb6516ea3, 0xd8a3a0a8, 0x8cc51732, 0xb0da3748, 0x2f06ddca, 0xb6ce3545, 0x52d1f19c, 0x768baf6c, 0x3e8280ee, 0xe23773f4, 0x8483e2cc, 0x9410a287, 0x4b2c665f, 0xe3ed9cc6, 0xf8fe6a43, 0x13d008a1, 0x29e64695, 0x2a8f1cbc, 0x46487188, 0x3599a7ec, 0xd8f352a0, 0x4f63d0d0, 0x46c31575, 0xb7074e32, 0x4c513bef, 0xc087fe37, 0x9ee8a681, 0x126bb86a, 0x45704d3d, 0x0eebf8a3, 0x6b1e9929, 0x60f8c04f, 0x698c225e, 0x2e484f0b, 0xebd420e1, 0x0d4cbcec, 0x90806b6e, 0x59acf71d, 0x9d3085fd, 0xde69a76c, 0x862cf540, 0xd5b1a736, 0x6c656d00, 0xd4bc2f10, 0x8a3c9937, 0x158a07a5, 0x768e377f, 0x6b28aeff, 0xaf0e2c3d, 0x5dad8716, 0x0053eb21, 0x10dd81c7, 0x9c8ae64c }, // Message 1 - { 0x154c6f0d, 0x893dde00, 0x7d5e029c, 0x2e4b8d06, 0xbb6df4ac, 0x4cb04e00, 0x69d9903e, 0x92a87011, 0x8a2408c3, 0x89554b0c, 0xc473f6cc, 0xa9539442, 0xd373a3dd, 0x23e29be9, 0x71184cd6, 0xdb0496dd, 0x33ab6ee5, 0xd1ff944c, 0x8a59be18, 0x5eb3a04a, 0x695f9e2e, 0x9c66f231, 0x4ef5f557, 0xa02364b7, 0x2d6e8dc1, 0x9770a469, 0xbc423ecc, 0xf0d24bfe, 0x408cfeff, 0xa1ce8322, 0xfd9b0e38, 0xf113dbf2, 0x2f6f1112, 0x41079246, 0xd55fe926, 0x6b7580b6, 0xd0ffbbd2, 0xb08953cd, 0x1fa944a7, 0x1f052e74, 0x82ea3e77, 0xf96fd0aa, 0x93a6fd98, 0x9d999340, 0x73929756, 0x7d4dc5e5, 0xe83af128, 0x24a7107a, 0x70ade5cc, 0x0731b568, 0x4f9dd476, 0xf5aae73c, 0x69a436d2, 0x0e644225, 0x0a35824c, 0xd59556f6, 0xb889da39, 0xb861b76a, 0xc2608d4c, 0x6f60cae4, 0xf8b57bb7, 0xa53f6e4b, 0xbe5358e8, 0x2f250533, 0x5c3e3302, 0xf8deee3d, 0x5e4c5a65, 0xb2ea65f5, 0x9662bbf1, 0x20047818, 0x9f9271f3, 0xc14b7ba5, 0xd53cede7, 0x8c2494be, 0xb8dbd1e3, 0x91ce3f06, 0xe420b978, 0x9dcc8aed, 0x5c0843a7, 0x4dececff, 0x9c4935a8, 0xf60772d4, 0x563ed0f2, 0x19d1d292, 0xc902fb76, 0xf19c94eb, 0x8a5ea691, 0x7108cf70, 0x8b6ef23f, 0x6506c9e3, 0xef33bb00, 0xba72b340, 0x03fa28c7, 0xdd737c71, 0xdd420641, 0x957da2a1, 0xb02645a4, 0x945e6c9d, 0x5c8db47c, 0xd02cebdb, 0xc72b55a5, 0x037a2b21, 0x8a275fd5, 0x4d36326e, 0xe220273d, 0x31151800, 0xfc37e730, 0x7ec85000, 0x78532720, 0x84cca231, 0xa8a16c95, 0x72c93f0c, 0xfa4cc77e, 0x4dc73d1a, 0x370a9e4c, 0xdd362d71, 0x812dae5c, 0x634e0385, 0xd3c65aff, 0x416f4cb7, 0xeed31f6d, 0x9ebefeb4, 0x847d0839, 0xdf201773, 0x2d65c879, 0xd7e55c30, 0x50a2b1fb, 0x177f646b }, // Message 2 - { 0xf620b880, 0x217bf2cd, 0x1628ca08, 0x1c0504d1, 0x474863c2, 0xdaac839d, 0xc0c00b24, 0x5b8aaa1a, 0xb84df421, 0x46a300e2, 0x74b58522, 0x348ead4c, 0x979217da, 0xae684a30, 0x8f3d81f0, 0xfa29906d, 0x08be2185, 0x8d1bc86d, 0x620114f8, 0x286ebf04, 0xa40c02b7, 0x4a888992, 0x60cb10b7, 0xb50d40ed, 0x9c1df301, 0xe47a0f98, 0x77b59d6a, 0xdda6ea41, 0x6a0ca045, 0xbb287481, 0xf71b1916, 0xe68d6d01, 0x8f515997, 0xccc6d707, 0xa34f2e26, 0x1ee9d6de, 0xfd303121, 0x13769977, 0x9a990fcb, 0x1a32b103, 0x60141055, 0x208fa8eb, 0xb9e0a27a, 0x83a7518d, 0xb768a2a7, 0xbb4e57f5, 0x59049ae1, 0x2cdffce2, 0x507ed979, 0x4c7cdfa4, 0x01af0305, 0x64ef02b1, 0x889c3faa, 0xeac30e58, 0xcb60e3e7, 0x0908767b, 0x185e5484, 0x439157a7, 0x9461824c, 0x542282f2, 0xa339778f, 0x4961930f, 0xf2ba657d, 0x9ec23324, 0x842de8e4, 0xe3620524, 0x485a6b83, 0x06ecb4e7, 0xfbfdb186, 0xd151bd47, 0x94cb5ba1, 0x5b3b3db4, 0x1b4888c7, 0x1c87b82b, 0x3c9cb229, 0x29c1f0c4, 0xe1cf9700, 0x38954b6e, 0xbccb5cf4, 0x19f1c54b, 0x8f250486, 0x7258c7dd, 0x43460daf, 0xb97d1ec3, 0x241a291f, 0x86ac4ba0, 0xbfdd64ce, 0xb6fa651f, 0xbbdd65b5, 0xeba5db10, 0x4bf74893, 0xb24e22e1, 0x2d9c0945, 0xbade7f79, 0xf8a4d456, 0x43ec690c, 0x1ac6ef92, 0x7e3e869a, 0x062d6ecc, 0xc5b73105, 0x3e4fcb51, 0x96741d01, 0x9a21ef67, 0xc8772eae, 0x00498faf, 0x05e5e725, 0x600975fb, 0x0e3fb83e, 0xb75c2046, 0x4f9310d5, 0x9b620514, 0x7f2140a1, 0xee33197b, 0xad539c75, 0xe052de0d, 0x372337d4, 0xbe861bec, 0x1475891a, 0x245789da, 0x45ac9587, 0x0bc7c997, 0x1f2def07, 0x5a9871ef, 0xe4c3b849, 0xa36fa0f3, 0x6cab69b4, 0x9cca66d6, 0x855a048d }, // Message 3 - { 0x251cd1f2, 0x594996a7, 0x8c97afad, 0xdb76f5ce, 0xa4607eff, 0xeaf9d348, 0x5b6c0726, 0x93a1be80, 0xdd39377c, 0x7e6efc39, 0x10be7d35, 0xba0ee678, 0xd8a8a050, 0xd8c5af3e, 0x88b6aeb7, 0x6622552d, 0x2823b689, 0xc8a16dfd, 0x2da1cd21, 0x66caad46, 0x07e36a34, 0x1545a5e3, 0x5570f123, 0x28b4eec5, 0xf6aac927, 0x71aa8ad8, 0xe99513b9, 0x46990c24, 0x141d6a0e, 0x6c9a599c, 0x02172a3b, 0xa537c9f0, 0xf6267ea9, 0x6c819eb4, 0x1f12cf67, 0xc20a92a9, 0xe347d7ba, 0xb5055575, 0x89cc5300, 0x7dc0441a, 0x0f7e8123, 0xeabba812, 0x2eb32ada, 0x86763f88, 0x584e8747, 0xa6ed7130, 0xbcd64bdd, 0x67fef4c5, 0xc3176bfb, 0xf9559dfd, 0x6e7774a8, 0xff6be862, 0xd600b8bd, 0x92cd7c59, 0x2e0eec59, 0x0bd6f56b, 0xc78306fe, 0xf0dd994f, 0x84e19119, 0x070e6c58, 0xf4b0d608, 0x16b4d852, 0xa8f41101, 0xb6209170, 0xe8f34d78, 0x869a50b7, 0x5fabb0ba, 0x22a1a136, 0x049c258b, 0x5fdcd9cf, 0x22f1dfc8, 0x742db2ef, 0x7b53a211, 0x880e2357, 0x55d28f55, 0xb89cda05, 0xf006e0fd, 0xd79165a2, 0x72edbb99, 0x00e92524, 0xf9e44ccf, 0xbe2482a8, 0x6ecef96a, 0x7db4a9e3, 0xe22e91ff, 0xaf790acd, 0x4d13cb47, 0x86b160c1, 0x9cdc9680, 0x486a41e8, 0xfd755bfc, 0xa53f2bcf, 0xaf5b02f1, 0xfcfbb672, 0x3c695034, 0xa5a4a863, 0x793ef2aa, 0xf677dd31, 0x9b9f80e5, 0x2634504d, 0x6f10a58c, 0x3d8242fd, 0x88dee96f, 0x84be51b0, 0x80e607cd, 0x0abee960, 0xa069f191, 0xd663f8e2, 0xe9b28406, 0x0e42b309, 0x8ba4632d, 0x744abc04, 0xacafdb68, 0xe9ce03c3, 0x010d9093, 0x46317cb3, 0x25c55562, 0x1d8013d1, 0x7e5b24b2, 0x77877589, 0x16872b15, 0x10c6e231, 0xc2177c50, 0xea84d46c, 0x01c06181, 0x852a5f00, 0xa15d3b80, 0x1cf6a21e }, // Message 4 - { 0x8e450d5f, 0x6ad0dd00, 0xf494c37a, 0xba60b757, 0x9e528e32, 0x8ad223f6, 0x4e4ac37e, 0x864eafca, 0x3dc4d02b, 0xf5c89928, 0xff864462, 0x898c9c60, 0x31a57b3e, 0xc00a3f8a, 0xb76a25cd, 0x133025c7, 0x923fd239, 0xab6e0104, 0x7b0db6d3, 0x1ae4b0e7, 0x138f9171, 0xbaae0554, 0x03c5678c, 0x88b9168b, 0x2646a196, 0xeb89a848, 0xb04fcecb, 0xe8e6318b, 0x168c6d3a, 0xe94c6b6f, 0xb8711658, 0xce7cc24a, 0xbef25a0c, 0x6afbe897, 0x5668f8cb, 0x9c8f3bcf, 0x1d482de1, 0xd14b386f, 0xeebf404a, 0x0d8b4b42, 0x58d65520, 0xe2ebb9a7, 0x3cd269a4, 0x6583accc, 0xc29cca81, 0x2b5c3944, 0xac1f9a4f, 0xc6aa106f, 0x38de4972, 0xc8681bed, 0x20657187, 0xd91e23b4, 0x97d6efaa, 0xf2cc1855, 0x9185c4f0, 0xabc3b423, 0x28680d3c, 0x82de1141, 0x916053d3, 0x9af73e47, 0xea4d2741, 0xab2910e6, 0x7577ad7f, 0xe8ca0842, 0xbae59043, 0x5fc14a23, 0xfafe4784, 0x1cc899bb, 0x80a3f00d, 0xade3aa31, 0x18648dff, 0xf0f48d62, 0xa10688d6, 0xa7141a1f, 0x803fd159, 0x53a80a18, 0x2b67e2ca, 0x459c9d97, 0x47cd5ad7, 0x45f9e4b1, 0xc1189f8b, 0x19e164b7, 0x94ae2457, 0xb6bf30dc, 0xb11d67d1, 0xc53ca3c8, 0x13279983, 0xbf0795d8, 0x119734a5, 0x0f322272, 0x8935dc32, 0xc4f391b3, 0x47fec962, 0x05291603, 0x079e420b, 0xf8111bb1, 0xff10edff, 0x5e8000c0, 0x7befdb2e, 0x2dc21eb6, 0x1143bb6b, 0xaad6e511, 0xa0edd169, 0x886e625b, 0x8cd085a7, 0x7bec0223, 0x8650853d, 0xc209055d, 0x9c2c4194, 0x0226c197, 0xaa8fa4c2, 0x5366f876, 0xaeebe186, 0xdfbb7f09, 0x86422ac4, 0xdeb9c38e, 0xde6eb812, 0x03b326c9, 0x5bdf5c5a, 0x6c6d2bec, 0x1741eaac, 0xc9470180, 0x15c59502, 0x79f931e0, 0x99963116, 0x68e0a0ce, 0xe992dd6e, 0x86a26261 }, // Message 5 - { 0xfae3ee44, 0x60e00973, 0x529a647c, 0x5c77b6fd, 0x37d8ae67, 0x7644c936, 0xaa021da8, 0x8aad585d, 0x39b0f64a, 0x92d8faea, 0x490740cc, 0x0bbde4c0, 0x2dfa365b, 0x8de0252d, 0xd63905d3, 0xe85f77ae, 0x3b8cf0f4, 0x28cd27c5, 0xf5d8a39d, 0x5bfa068b, 0x38de4c93, 0x3ef1c7f5, 0xd274a075, 0x3d3eebcc, 0xbe1b1804, 0xebe368a5, 0x5f22ceb4, 0x5964c309, 0xd1a44d2c, 0xebefd6a7, 0x3c596525, 0x2fd4ea75, 0xf751a130, 0x7ed57b2c, 0x53d543fc, 0xcada892c, 0x28a62ffa, 0x65bde524, 0x93b72e41, 0x86b6f11f, 0x3f1f6acb, 0x372109eb, 0xca351285, 0xa7b45bdd, 0x8f981c5a, 0x9c09556a, 0xb7845478, 0x34d18840, 0xd531e749, 0xbb9e5d52, 0xd0f2499a, 0x33d941f6, 0x050256d2, 0xeb5feac0, 0x06920ec9, 0xb38205e1, 0x68d9558a, 0x2ff020ef, 0xadb7d176, 0xc5e29bb5, 0x78ef0b80, 0x0cb42fb5, 0x6bacd277, 0x49c6fe88, 0xb2d87ca8, 0x140716e6, 0x2c9310b1, 0xe1f619aa, 0x3dab476d, 0x679c140c, 0xcf8f1ff1, 0x1ba0d9ed, 0x0031ddc1, 0x3be56f1f, 0xb79c5649, 0xfe23c8c2, 0x15b3a1dd, 0x1b6b5a49, 0xdd6343a5, 0x5c68362c, 0x88b40e2c, 0x1cf400cb, 0x08395155, 0x6d537d59, 0xb7906d58, 0x4ba13819, 0xf26e4f9c, 0x0c2285cd, 0x1814ae52, 0x5e550533, 0x8c07c227, 0xd8c7d099, 0x4179c9a5, 0x01747fad, 0xe9c86a72, 0x62905779, 0x1a5a42d8, 0xf667a583, 0xc17bbc19, 0x35b4cdd1, 0x67fefbd7, 0x64a2d08f, 0xeadbe370, 0xb51d09f9, 0x2a16c1e2, 0x20a4e179, 0xc65be038, 0x28137542, 0x2eced8c7, 0xa7622629, 0x386cc4af, 0x6c8ec462, 0xac96b1a6, 0xfa5e1028, 0x6a8e29f5, 0x83e31df2, 0xc5ecb1ac, 0x353a6734, 0x8224971e, 0x6e5795ee, 0xed425a2e, 0xf2484f56, 0x04a98a76, 0x798d8730, 0x6b8bc8ba, 0x554c1511, 0xe10a6957, 0x1db9e1ad }, // Message 6 - { 0x7dc11dff, 0xb1156ada, 0xb23d6a94, 0x23548c27, 0xec712d07, 0x83974324, 0x53dcd264, 0xde546fd4, 0xbb464aa5, 0x77ce12d0, 0x5792800d, 0x07d83939, 0x50afe0e7, 0xfac5d626, 0x79b31e5f, 0x1c18ab84, 0x81a4b82a, 0xb42481c3, 0x5a76f763, 0xd173db91, 0xbdbdccd2, 0xc2d07502, 0x9d845ca3, 0x2ee9dc99, 0x09317aa0, 0x0c4bf0d0, 0x94257465, 0x0cf8a221, 0x9ad1d006, 0xb4d3ce4c, 0x4b63ccaa, 0x437fa97f, 0xb415582a, 0x68c5f7f5, 0x45df2a12, 0xc1f26f6f, 0xe866558d, 0x291d1dd5, 0x58b81986, 0xaf2f2c09, 0xf44a1d2a, 0xd7faf0a9, 0x482bd662, 0x73da75a7, 0x757363a8, 0x85c33b90, 0x9716dada, 0x88c409f3, 0x1084d962, 0xa2ccee92, 0x9e749976, 0x64ecfdf6, 0xff2c5376, 0x247e7205, 0x28f2ffdd, 0x4feb7d32, 0x8c2d9f14, 0xd9f1becd, 0x7f3945f1, 0x99eff322, 0xd6c78add, 0x07d09180, 0xdc233a10, 0xd3f70b29, 0x5476c844, 0x45af6fd5, 0xafdc264b, 0x660bb873, 0x8b49e478, 0x739e5862, 0x421fd9bf, 0xe9b7fe8b, 0x9d54492e, 0xb24e52c5, 0x5d4dc940, 0xabd5c995, 0xa191afd1, 0x84ebb1c1, 0x3193317d, 0x66eb4eda, 0x34d7fef6, 0x694af146, 0x99018e25, 0x4a51ce83, 0x1e1ba0d2, 0x412b9ebe, 0x67836ee4, 0x28194719, 0xd087e92f, 0x2f008a49, 0xfb793379, 0xa3b0f3ca, 0xea670b5b, 0x9b7d2897, 0x5736eb1d, 0x33c381ce, 0x8cf7708c, 0x344ab658, 0x9fad8c4d, 0x993f0c5b, 0x25296e78, 0x99c10d8e, 0x11c5d555, 0x2f111753, 0x3284ce18, 0x743af7c0, 0x5f4d0b95, 0x81b16894, 0xd60a6eda, 0xb701fe87, 0xfaa6d80a, 0xef966884, 0x80ea6bd3, 0x15999e6a, 0x970adadb, 0xbdcad573, 0x61f41970, 0x9609603d, 0x4a81e22d, 0x1c165af9, 0x5c8b7661, 0xc7e71dbc, 0xa765cc2f, 0x81480902, 0x0ab291fd, 0xb24b0fe8, 0x89bd0a03, 0x197f9145 }, // Message 7 - { 0x2e389a08, 0x629db53a, 0xfead0a32, 0x6b1a1b3f, 0x4db22855, 0xea7bc14b, 0x22d28362, 0xc8aaafb0, 0x09574613, 0x1186a531, 0x7314d648, 0x269abc08, 0x47db9ef4, 0x3d4fd364, 0x674d2960, 0x63949eab, 0x099645b2, 0xf6fe1777, 0x60ff4598, 0xce40cbba, 0x6e94f60f, 0x5f6d7fe4, 0x82458625, 0x33052262, 0x16027ecb, 0xc5be855a, 0xa7f22f87, 0x0116d93d, 0x0ef05754, 0xf6c74648, 0xf51656b9, 0x90a06115, 0x8dd01ad5, 0x4f9050f1, 0xbcf8cf7b, 0xb14fba3d, 0xa1285f92, 0x62758a5e, 0xee909968, 0x4182f5dc, 0xed3e055a, 0xe05a023b, 0xa0b00ad6, 0xfb5cf304, 0x583406d7, 0x0539162f, 0x101c41d8, 0x514b29d6, 0x3eb3f2f7, 0x23bb7a8e, 0xbe33d2ec, 0x7315852c, 0xd5ecb314, 0xf9c562d6, 0x86a6ae5f, 0x7f3c3963, 0xae44e848, 0xe83b84c0, 0xe2ff7e1a, 0xce70d227, 0xcbe3ed46, 0x50d83022, 0x62039d34, 0x2bc65794, 0x4c3e1fc9, 0x2526dc47, 0x6008680f, 0x8de3580e, 0xf8c1f7f4, 0x2dbe4fa2, 0x48180f90, 0x779c0e90, 0x81c73e5b, 0x5e114ab8, 0x61751abb, 0x16ae818a, 0x057b21bd, 0xbcff0537, 0xcc6f7774, 0x4f94d9f5, 0x32d4c296, 0x73a384ee, 0x1d75ed46, 0x9044e2bc, 0x2f0e3f76, 0x76d94e88, 0x45e1f18d, 0x4a02f43b, 0xcab2bedc, 0x996f535c, 0xe4de18dc, 0xc0e0c081, 0xbd967d90, 0x6ed1493f, 0xda0cdabe, 0xc86dc1a2, 0xf240dd7b, 0x85d87e49, 0xec38a229, 0xd9b9d1af, 0xca98c8d2, 0xfd0245ec, 0xc265bf26, 0x37d7ea68, 0xf3ebc9e4, 0x39e9aa93, 0xb8fa7d3d, 0x37aa0b8e, 0xd052314d, 0xdd12882f, 0x9759b302, 0x21ee3b31, 0x315009cb, 0xc3358ae2, 0x1e44340e, 0x9584300f, 0xf1f6b83f, 0x48f4bfab, 0xe17785c7, 0xa9c2f604, 0xdbc7ff0b, 0x2628cb1d, 0x3919c8e6, 0x7330d62a, 0x2f25fa8b, 0xe5ee3990, 0x7a91b924, 0x02893f77 }, // Message 8 - { 0x68ec8519, 0xf571b9c8, 0xbb38c337, 0x46fe53a8, 0x10626192, 0x2e89e74f, 0x65c40bb6, 0x948dfc3f, 0xb1ca54fd, 0x210563b2, 0xb49711c6, 0xa977fcc6, 0xdfbebc09, 0x781201dd, 0xd00a59ba, 0xdfc3d908, 0xe979f20d, 0x6328d52d, 0x24036580, 0x7ac3cc1b, 0x250d69fc, 0xf43c9944, 0x1103a4a7, 0x70074821, 0x505a1256, 0x78d1a577, 0x13fe8bd1, 0xcd27b13b, 0xed2b505d, 0x65d4dc75, 0x7a1057fc, 0x0329d776, 0x788d92dd, 0x296bf77a, 0x364761e8, 0x44878f25, 0x9e951b12, 0xbc332538, 0x4c31b43d, 0xe832195a, 0x6bd1d3fe, 0x49ce1265, 0xb312bfd5, 0x2722bb91, 0xc7facfca, 0x5c568aeb, 0xca6cde0f, 0x58c9ddcc, 0xdd2558f9, 0x1f3f5438, 0xb9243f7d, 0xaf12f165, 0x57bd24c8, 0xd17a76ff, 0xd194afbe, 0xe4bf7a7d, 0x2b468c6a, 0x2b0620ef, 0xdd64bc8c, 0xffc4fb90, 0x6c0230ec, 0x6b1d25df, 0xe5a825fe, 0xfc617173, 0x2bf790aa, 0x6a3a015e, 0xba5cbdd0, 0x84da315c, 0x885b072b, 0xbb8f3fd7, 0x501bf81f, 0x1f8337fc, 0x772f858d, 0x9e41d3b9, 0xa6a1d2b7, 0x4266c4a8, 0x5ef537c4, 0x7938501c, 0x07c38f7e, 0xa6c63cbc, 0x570082fa, 0x2bc5b3e7, 0xe8ee0268, 0xc0776a2b, 0xcae6c48d, 0x8512383c, 0xf61051ee, 0xbc668b50, 0x10f2451b, 0x859bc0ee, 0xa7659871, 0x89f167e7, 0xbcacb15b, 0x14b6b16e, 0xf5efe62a, 0x85a2ff2c, 0xd6a0ec4c, 0x827140be, 0x7a2bdea1, 0x1945c255, 0x118c97bb, 0xd32324fb, 0x2b487f54, 0x11c606ec, 0x7a8f5b36, 0x33a7cfa0, 0x11a03731, 0xfcbd1a14, 0x5bd9cb85, 0xeae08c9b, 0xf67e2abe, 0x882c7b9e, 0x49a16cc9, 0xaeb4d6e0, 0xb1863649, 0xd228b211, 0x751f005b, 0xc6f3cd54, 0x77d206e9, 0xcaf57852, 0xc76e543e, 0x124be84a, 0x361d35fc, 0xded42998, 0x0683a134, 0xd0d9dd6a, 0x7d91d1b0, 0x3c08073e }, // Message 9 - { 0x08b22864, 0xfdc51028, 0x7b1e8f1f, 0x70d5716c, 0xa187b780, 0x658c1164, 0x78f34049, 0xb45926a6, 0xa95d7b70, 0x45f21c13, 0xd35d3712, 0x69f9f676, 0x7f79cd5f, 0xbe6e6e05, 0x898923c9, 0xe5c27236, 0x427db647, 0x45cc0175, 0x9c1c52b5, 0xcd48aac8, 0x41b82773, 0xd9841a08, 0x1bc4433a, 0xd1e155b3, 0xf48c7c9c, 0x1d8c8bbe, 0x572b856e, 0x9d638bfa, 0x69d2ebba, 0xb1c97e2f, 0x349675dd, 0x89eb7c45, 0x8071bfd6, 0xb9d62198, 0xeb117c56, 0xd8d20636, 0x3bb7f484, 0x0167c059, 0x9b006f91, 0x53313146, 0x3dffdca0, 0xfef27540, 0x8a554c03, 0xbbed0920, 0xfa0ae45b, 0xc6898b45, 0x0cdcc4c7, 0x0a361b64, 0x14c72edb, 0x9d649bed, 0x57111e81, 0x86e49ac9, 0xe84bb28b, 0x8df11985, 0x8adc2d7d, 0x1312dfea, 0xc0b3225a, 0xfc7801c5, 0xd2e1c447, 0x5d7b1814, 0x445c1084, 0x94bb8fc9, 0x523fc3ce, 0x6ab2e330, 0xf85da456, 0x86179ef3, 0x018d44f4, 0x2415f643, 0x866d90ae, 0xe7ea7afc, 0x5309f860, 0x324b0b46, 0x31316b2a, 0x2dde18c3, 0x69243936, 0xf0495848, 0xe3f89e69, 0x05d3ea06, 0x92b78005, 0x9942cbed, 0x03d912bf, 0x7f9bc3f6, 0xe87298c2, 0x2e08af7c, 0x0c6fdb87, 0x75a14da4, 0xf034dc24, 0xc3a7db20, 0xb3b8e530, 0xa35721ed, 0x584f1c4f, 0xe0c8c764, 0x43edc51b, 0xf8821414, 0x0c9e4a2a, 0x39d94bf1, 0xcddc96fd, 0x0b3e4b2d, 0x743d2fe8, 0x21f5d70f, 0x164538db, 0x60aaa592, 0xfa62bcff, 0x7cc19be4, 0x3db5edfb, 0xbab4a921, 0x30c68244, 0x139f7bd6, 0x797b0e30, 0xb7f9e399, 0xe7272a08, 0x70ae9449, 0xeae4ed71, 0x8b884db8, 0x9ddbd0f0, 0x3bfdbc06, 0x3b6ae04f, 0xd5fd13ab, 0x4a55db2d, 0xeb8926bd, 0x23c262a9, 0x746a862e, 0x8fe3193f, 0xcd0e9c7d, 0x68242a25, 0x3249df04, 0x0dae94cb, 0x79a3f7f8 }, }, - }, - { /* Case 1 */ - .iv = { 0x97, 0xd4, 0xc6, 0xa6, 0x36, 0xf6, 0x5b, 0x90, 0x2d, 0xbe, 0x19, 0x38, 0x75, 0xcd, 0x08, 0x56 }, - .p_data = { - .Y = { 0x951a34c9, 0xccae5647, 0x7a079316, 0x845cada2, 0xbebb34e0, 0x95094811, 0x185654f0, 0xf4db9796, 0xd249a05e, 0x099a3b3f, 0x133822d8, 0x94ade868, 0x616ded7e, 0x2a075baa, 0xfa5a21b3, 0x3f918c50, 0x7fa678f0, 0x71d34ae8, 0xa01c1f1e, 0xec44ab64, 0xa186d5f9, 0xa267aa5d, 0x80efb9db, 0x9a289e76, 0x529f74e1, 0xe8aaa733, 0x668574ef, 0xabaa3f14, 0xd3e35805, 0x3af660a8, 0x6bf87b6c, 0x2a920dda, 0x75b5c0a7, 0x372bd1bf, 0x1acaa469, 0xbfe31c02, 0xfab811bc, 0xeb9b939f, 0x8a879c99, 0x95b7655d, 0xa0ca67ed, 0xa4dcb019, 0xb4d202b7, 0x80fd4048, 0xe7671fb1, 0x04a8241b, 0x79c44a87, 0xe8e5d70f, 0x8aa37edb, 0x4871b066, 0xa241611c, 0xcb3fe7bb, 0xb5980f9a, 0xe4531acb, 0x67ebf907, 0xf3afabee, 0x6bbe7ce1, 0x2882357d, 0x3214dca5, 0x3430c6bb, 0x29adc028, 0xd2dae59c, 0x3d9e0955, 0x6a7ebbe6, 0xd081f470, 0x0cfc91f0, 0xe06b3d89, 0x79523cb4, 0xb2c8b52a, 0xefbc02d1, 0xdfc09bb5, 0x34f383d4, 0xeb423eea, 0x7c0fbea2, 0xde81af74, 0x56ffd15a, 0x49158963, 0xeaed41a1, 0xb2a54d3f, 0xf4d486c3, 0x9cde7214, 0x0de6379c, 0x25d9c928, 0x06581ceb, 0x0fd03112, 0xb5bf67b8, 0xef8e4069, 0x8a9adb3b, 0xde33afb3, 0x20ebb56e, 0x11ce27ad, 0xa119f507, 0xebbefb2d, 0x51fc6edd, 0x1425b833, 0x861ae340 }, - .M = { 0x31bbd807, 0xa861c407, 0x92f96b67, 0x9f4c5d3b, 0xaa1a43c3, 0xabd90e5b, 0x89c3d4ca, 0x43ec5589, 0xe434cef6, 0x43f89089, 0xd43a64ff, 0xf6136391, 0x14b4011f, 0xabe85ecb, 0xbfb858f5, 0x4360c9ed, 0x6f287d4d, 0x22291aae, 0x5e70e0f6, 0x889f7942, 0x5aec9b03, 0x743bfd6e, 0xa0f20fad, 0xc59e70e0, 0xddeda78a, 0x40bf8fcb, 0x9a39225d, 0x6039fded, 0x237cf58c, 0x488a4f19, 0x9cac5843, 0x58b5fd62, 0x0d2c93bc, 0xf34d0397, 0x82fd3243, 0xba1d0ea4, 0xc29f1dc9, 0x997e49d2, 0x3c7f513f, 0x811bbd66, 0x0623e514, 0xbae0d286, 0x6b2f233a, 0x7001fc67, 0x7be399ab, 0x852211dd, 0xe83b72a5, 0xeed324af, 0xb9423f45, 0x619cbbc8, 0xb432cfa4, 0x92c2af7d, 0x93836f52, 0x8e3abcd4, 0x957bf4ab, 0x821db4f6, 0x7efbb842, 0x0d76ddc1, 0x085f699b, 0xf1b54ccf, 0x33a35100, 0x9008f633, 0xf2ae840c, 0x03a9a5db, 0xee98a0c1, 0x0026dcfb, 0xeab30f7c, 0x0454632e, 0x1572233a, 0xad2d3b0b, 0x3aeae29b, 0xc4ba69a6, 0x44d1143c, 0x60236cdb, 0x54657fc7, 0x91ed80e5, 0xf9f60c63, 0xc9a18b09, 0x4ca49a40, 0x9a48c57a, 0x9fd6f197, 0x64cd425f, 0x768ec7d2, 0x5029d3ec, 0x953f175d, 0xa1ff2ad4, 0x52ae91b9, 0x47e7b7a8, 0x5ebae7bb, 0xd33bdd63, 0x4988976b, 0x7cb0349f, 0x3db77b04, 0x36096709, 0x31dc1550, 0xcb6bfedb }, - .Rb = { 0x7275f857, 0x4d7defcc, 0xdb5e757b, 0x8f452c9b, 0x44b52168, 0x70e6ac35, 0xcf58398a, 0x3b2fb477, 0x8bd83728, 0x96c95676, 0x510b3241, 0xadacb956, 0x8c5565b0, 0xcb39dde9, 0x797b8fa7, 0xde254108, 0x243dfd87, 0x6f9ca2b0, 0xca3c2a6b, 0xd4d73187, 0x2d3b5ece, 0xf7f74b31, 0xf5346a71, 0x473410dd, 0xbc03d660, 0x0bf5f2cf, 0xbe949594, 0xed2e027a, 0x473ca37d, 0x9ab7f84c, 0x93863217, 0x065afc4b, 0x67331ba8, 0x2ec262ba, 0xdd215fa1, 0xb7e6046e, 0x454dba87, 0x95d5014a, 0x013ab8b7, 0xf43948f3, 0x414c5335, 0x9d2ff8b0, 0x1f3889e2, 0x2ec3cff3, 0xbf4fa9db, 0x43c3a45a, 0xe68270f6, 0x718d9762, 0x9fa85fec, 0xe20a4344, 0xe11d2655, 0x956e2c77, 0x3c27e149, 0xbc17d416, 0x432441b7, 0x00ce539f, 0x3fb73f3e, 0x3344e09d, 0xcd1273c6, 0x6b518f83, 0xbce56b31, 0x73d85ebe, 0x06e7a087, 0x079680b5, 0x7163bc88, 0x2ef149ac, 0x961431e4, 0xee92e9c3, 0x8a25b3ca, 0x35735064, 0xa3cec88e, 0x45eaf68f, 0x2edf5f53, 0xff40043d, 0x70253035, 0x27f5b91f, 0x07a8eef7, 0x4a9fe48f, 0x3affdfac, 0x949fd3a1, 0xb1354085, 0xa654404b, 0x63f3d375, 0x6ccce12d, 0x11b8b819, 0xf13c8016, 0xb56a9b87, 0xc657dd11, 0x7725986f, 0xc5ad4e73, 0xc25732cd, 0xe15ffb93, 0x0e328ccf, 0xf618976c, 0xd3e09a5b, 0x5a98416e }, - .M_prime = 0xd9ffea49, - .length = 95, // 3072 bit - }, - .expected_c = { 0x81, 0xa5, 0xd8, 0x77, 0x3c, 0x8b, 0x6c, 0x26, 0x46, 0x72, 0x8a, 0x5c, 0x3e, 0x19, 0xcf, 0x2a, 0x72, 0xde, 0x38, 0x6d, 0x5d, 0x8d, 0x74, 0x6d, 0x89, 0xdc, 0xc6, 0xf7, 0xed, 0x1b, 0x7a, 0x1a, 0x44, 0x04, 0xe7, 0xfd, 0xb2, 0xce, 0x26, 0x51, 0x01, 0x18, 0xf2, 0x45, 0x81, 0x4c, 0x77, 0xb6, 0x95, 0x1c, 0x5d, 0x66, 0xa3, 0x21, 0xf7, 0xef, 0x5b, 0xf1, 0x5c, 0xbc, 0x7c, 0xda, 0x5d, 0x82, 0xcf, 0x94, 0xae, 0x34, 0xbf, 0x98, 0x1b, 0x6e, 0x8d, 0x14, 0xc5, 0xbb, 0xed, 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xa8, 0xb9, 0xfc, 0xd1, 0xf0, 0x41, 0x11, 0x45, 0xaa, 0xd0, 0x4f, 0x5a, 0xcd, 0x7e, 0xcc, 0x38, 0xa3, 0x1e, 0x13, 0x87, 0x9f, 0x63, 0x9e, 0x46, 0x25, 0x05, 0xb3 }, - .hmac_key_idx = DS_KEY_BLOCK_3, - // results of message array encrypted with these keys - .expected_results = { - // Message 0 - { 0x2409519c, 0xbd193601, 0x812295cc, 0x191705c7, 0x11523082, 0x68cf854f, 0x344c7460, 0xee5862b0, 0xda2f44a6, 0x632a3fb2, 0xc6587773, 0xa7ffca35, 0xb1a7c1aa, 0x278121a5, 0x25ce15ea, 0xd2e7f22b, 0xd9ddd7e2, 0x2bee43dd, 0xf54dcf7b, 0x2be2f8f4, 0xd4aac2a0, 0x71cf94d7, 0xffccce1b, 0x84efa515, 0x20669452, 0x962d6716, 0xb1443ca9, 0x03ada35d, 0x6f321068, 0x156102c3, 0x1debb96b, 0xcbd0fb3b, 0x8585f721, 0x28151959, 0xeb177d23, 0x57cc8035, 0x024d3d63, 0xf5ce1936, 0xf0bc9c1e, 0x4f34859b, 0xada7f8bf, 0x56b76a72, 0x1607707e, 0x72f51923, 0xf4ed89a1, 0x60c79c7e, 0xa710fd23, 0xbe50ecdc, 0x405962ab, 0x9640b41f, 0xf06ba9e7, 0xd039f2a7, 0x0afddfbd, 0xbc575b5c, 0x503f75aa, 0xf69e8c0d, 0xb6f5a40c, 0x4b44b906, 0xb73f55a0, 0x285c460d, 0x6b28a87b, 0x7cc657c7, 0xf358d67c, 0xf7c72066, 0x3fff8de7, 0x65010724, 0x1f7bb30e, 0xb751aa60, 0xa5d0fdd3, 0x2d5d5107, 0x9384f03c, 0x69d85b17, 0x8863fe78, 0xa98f1b93, 0xee9aabe2, 0xfb904702, 0x6655a531, 0x7a391ef0, 0x102e42b3, 0x6e00a335, 0x1daa4046, 0x85283eb0, 0xb69dbcd4, 0x9a432fc5, 0x135dfdac, 0xa26767b3, 0xa0b0e390, 0xc7995ef3, 0x726e839d, 0x5606b772, 0xc34668ec, 0xade8e3bd, 0x97cc48ed, 0xa4639be9, 0x8eeef91f, 0x60771930 }, // Message 1 - { 0xf0156d41, 0x6fe08f0f, 0x03190cce, 0x10fa8567, 0xf04daa47, 0x4d143fc8, 0xe2ae7a2b, 0x1d12ec75, 0xe4422c90, 0xbecd4972, 0x11808bc6, 0x469113b0, 0x1fb2fb4c, 0x94b57b6d, 0x94793e20, 0x5adc5bc7, 0x7fb02330, 0x4e557aed, 0x8aff515e, 0x888a587d, 0x0f852f62, 0x18953c32, 0x0d63bafc, 0xa61d2ff1, 0x3242d7a0, 0x93daf785, 0x6d25cbf8, 0x19be3158, 0x3cae164a, 0x76cf89f2, 0xd2a5c456, 0x5de6e54b, 0x5afb02b8, 0xa4c857e0, 0x21f76527, 0x28da35e6, 0xd2af3238, 0xd0a743a8, 0x393223ad, 0xc1c4ac1b, 0xd0f16fe5, 0xdc24e47c, 0x69a05a6f, 0x31c328f3, 0xe607ac82, 0x5211a108, 0xd102fa0e, 0x50330896, 0x39c5883f, 0x57e33307, 0xf75eac31, 0x3d5a58b7, 0x7279f883, 0x861d0a08, 0x7b073033, 0x16147866, 0x8ffa5c7b, 0x28a91a63, 0xc5f2b236, 0xf0f0f2f9, 0xe0f9670b, 0x82b1b842, 0xb34a49d8, 0xa75b6f63, 0x27ef3e3e, 0x3c05d2d2, 0x39c0904f, 0x342495c2, 0x8049679e, 0xe5705973, 0x8da356f4, 0x16e1ad10, 0x5333f72d, 0x3729b23a, 0x9f410ea0, 0x7c4554a6, 0x73e7cf4b, 0x2c830da8, 0x37364474, 0x8b924a8e, 0x3410d68e, 0x7c7caeaf, 0x876b4be8, 0x2f215ec8, 0x8ca14335, 0x655fa1ae, 0x5fcdf97e, 0xc014814e, 0xdaf26bda, 0x1fcb2904, 0xac89b2a4, 0xa174f74e, 0xff493e03, 0x402d735f, 0x1684a4dd, 0x0f8720f5 }, // Message 2 - { 0x3759ec07, 0xc12f58eb, 0x62dd5e70, 0xda1ad998, 0xd027a1c8, 0x0380d18b, 0x5aa4a1b6, 0x31677a0a, 0xaa61aeb8, 0x12330b93, 0xeec9f36f, 0x6b33a37c, 0x35a542f2, 0xb69b01b2, 0xa47c4692, 0x9373cd83, 0x30245602, 0xb7737108, 0x814351f8, 0xd77ec36f, 0xe48ce52c, 0xa3a03d34, 0xed4de380, 0x2ead5f19, 0xddb9eb16, 0xd7252de0, 0x13ed0a87, 0x26bb4ffd, 0x1fac4f20, 0x8128e96e, 0x70fa4773, 0x324c1182, 0xd249fa4e, 0xd8e40184, 0x7d55bc73, 0x9fb71f36, 0x421d0c4c, 0x48f8cb67, 0xa4eb1f0f, 0x8a7bfeae, 0xa64ccda3, 0xa069b814, 0x87482b48, 0x8230e457, 0xc556a69f, 0xdf3831fc, 0xa2ee579f, 0x45df7dc3, 0xf0d8443f, 0x4d05c92e, 0x6bf8b99b, 0x95d22e6b, 0x162330e0, 0xc3431829, 0xb24d0a17, 0xfae28b17, 0x3ec27815, 0x007708a3, 0x2b84f611, 0x7441c1d0, 0xf4a383bc, 0x04b4e4e7, 0x547d811a, 0xba64014b, 0x19b30195, 0x6996efe8, 0x28e5f6c4, 0x10a582a1, 0xfa190d01, 0x860b111d, 0x85e45a43, 0x0d13e752, 0xddc57a9c, 0xd0bc56c9, 0x15ed8723, 0x58b19aec, 0x3b00c8da, 0x4d51a8ff, 0x72c08db1, 0xe9e18e15, 0x9c014ffa, 0x82b5c681, 0xe488fedb, 0x2b8bc706, 0x4e9bb6f8, 0x98a98e99, 0x670b6c9f, 0x1da131cd, 0x153ee0d3, 0x38f44938, 0xe98937a5, 0xff94654e, 0x68c5bd7f, 0x5d2f0e9c, 0x9921faf3, 0xb3efb9a0 }, // Message 3 - { 0x3f48cabf, 0xe132eb41, 0xb667b5f2, 0x5eeb5d01, 0x19a45aa3, 0xfbc85e16, 0xefb7f1ec, 0x257c44f4, 0x42748fea, 0xa179ff56, 0xad41bd57, 0x81255837, 0x1a0b5abf, 0x8ac673b2, 0xf3d7d3e0, 0x87d1c550, 0x2ce6dfbf, 0xef0180f5, 0x38d7640e, 0x5ccee480, 0x137d1fe3, 0x277ce4b6, 0xf3c9d33b, 0x50f08d4a, 0x204486dd, 0xc0ee7491, 0x02f0498e, 0xa889fd95, 0xa9c9ca70, 0xbe7908a7, 0xb91752bb, 0x793fb266, 0xa4ee4f04, 0xdbc09f07, 0xd7918256, 0x442125d8, 0xef5f71cf, 0xf0e039f5, 0xc941d011, 0x9caf7342, 0xb35f98ea, 0x03d339f6, 0x06382af2, 0x446dcbcc, 0x3d897a6e, 0x4c068d74, 0x42178ccf, 0x5e7cb388, 0x5599e219, 0x35a54d36, 0x34542531, 0x148ac25e, 0x3c625dea, 0x9e04792f, 0x8f52631d, 0xa5850fc3, 0xed7d1df8, 0xf0f74d5f, 0xd9ca19f1, 0xb4b905a0, 0xdc63422d, 0xc79940b5, 0x15c9ef50, 0x8b5420cb, 0xcbca78e7, 0xc0445d46, 0x221957e7, 0x8bc6b9c2, 0x33f9273c, 0x5cf97589, 0xa537cdd5, 0xd0e7ef3b, 0xeced5007, 0xafefe7bc, 0x15175097, 0xcc357433, 0xb47118d9, 0x187aa821, 0x5a836ead, 0x752a9084, 0xfa8c183a, 0x945f1ca7, 0xc8dd067d, 0x36291bde, 0x9952ba07, 0xad96a131, 0x1b384d38, 0xc67e02ca, 0x7ba2c7d2, 0x2f24c5d8, 0xb46101b1, 0x14b46d2b, 0x32a00ad8, 0xe102d6ce, 0x49b2a5de, 0x11c2b100 }, // Message 4 - { 0x641a1236, 0x442fca06, 0xc9d6321a, 0x4e8e40d9, 0xd09062e1, 0x39acc384, 0x1e67a09f, 0x64f1a05e, 0x9a8f85a0, 0x1b7743dc, 0xae332434, 0x722ff5da, 0x60a66064, 0xef66977e, 0x186d71c5, 0xf5cc7d43, 0xb5519d31, 0x04fd1720, 0x99843778, 0x7eb8236c, 0x27ddb197, 0x0d5d6f2f, 0xff366f1a, 0xcbfd542e, 0x55d2b0f3, 0xf802f937, 0xa2ec467a, 0x54b7e7b0, 0xd3f81c8e, 0xf8cdc61b, 0xc1a1d69f, 0xca7fe5ed, 0xf4f4be5c, 0xeea0e672, 0x4d4b05c4, 0x129d4f19, 0xcf735cf2, 0x18598f50, 0xf3598afc, 0x3d773f1b, 0x148e63b4, 0x5ce0e393, 0x61a9b151, 0x25b45156, 0xa8e2ac74, 0x8b50dccf, 0x79f882ab, 0x839db8a8, 0xca0f3aac, 0xa708850c, 0x347ccbf2, 0xe8851f37, 0x5ed0479b, 0x225917a1, 0x147f4f16, 0x558b44b4, 0x08bdcfc9, 0xbc414a90, 0x8a67eb12, 0xca945a73, 0xfc30e27f, 0xe4b6185e, 0x245579be, 0xa505acd1, 0x2a875b92, 0x38cb59b4, 0xc84aaddb, 0xcd00b784, 0x4d4aa33d, 0x83ff8662, 0x58c0bace, 0x14d3cef6, 0x0bee7817, 0x459666b9, 0x940f4463, 0x91fa5945, 0xb7c7d1d8, 0x46ade57d, 0xbdde6e57, 0xfdd1d957, 0x12ec9392, 0x843982c4, 0xec47b3ba, 0x209cebd4, 0x19c8c859, 0x376548de, 0xa578fe6a, 0x0fc72259, 0x33f1fb58, 0x011b3853, 0x1be20ee3, 0xdb2132a5, 0x9625c273, 0xbb289e1a, 0xae09452b, 0x0deaa174 }, // Message 5 - { 0x673e9708, 0x05b60159, 0xcb967266, 0xca6b9a56, 0xefe0aa43, 0x1f3d4ded, 0xc3199cf4, 0x9b13c377, 0xcacdb49f, 0x068d4f4f, 0xb193d342, 0x23db8617, 0x803f7062, 0x306d8e06, 0xd3074f62, 0x124ad0ad, 0x781f5c18, 0xac7dd88e, 0x71906a56, 0x7b5ff9c0, 0x9bbc925b, 0x9b13b3fd, 0xc74ce7f5, 0x26236c7a, 0x3f4c6aa9, 0x90bcf0ef, 0xf161ce37, 0xff82f8c0, 0x719fa25f, 0x547901ff, 0x6b9cc3d3, 0xe56f6de5, 0xb87fdfeb, 0x727e8f60, 0xe8fb200b, 0x918329f6, 0x67d76d37, 0x1609d3f5, 0xd4bc764d, 0xd6ffe007, 0x2b546c1e, 0xe12c9ff3, 0x903da24b, 0x7e457b75, 0x36628d8f, 0xf749ecfd, 0x5e029903, 0x0e97b3ef, 0xd82994e3, 0x1dbbaad1, 0x14e7a694, 0x35285b53, 0x8f4a9091, 0x0d5d2d6e, 0x568eacf0, 0xc6dd56a7, 0x4cca123e, 0xefc5f313, 0x7f6bef35, 0x63cf95f6, 0xba6dd9eb, 0xeb33955d, 0x7aa3c476, 0x02bc1f84, 0x112dc79f, 0x8f09e158, 0x2e68dcac, 0x1f5c4fd3, 0x6d9da11a, 0xed4cb4c0, 0xbefb92bf, 0x51a1cf72, 0x87f99885, 0xf27b9cf3, 0xa72c2a30, 0x27286879, 0xf357d3dc, 0xe8430c6b, 0x2ee739eb, 0xb6e3b349, 0x4cd2a14e, 0x495f71b2, 0x6cc3c37c, 0x47748fc1, 0x875b7f5c, 0x0dac13bd, 0xaef4e56a, 0x7a48824b, 0xee236e71, 0x96c99803, 0xeedd9867, 0xa91e8077, 0xe84ca623, 0xfe3c5b70, 0xa55f485d, 0x2dd4c20b }, // Message 6 - { 0x0b06c9da, 0x4cd15188, 0x27915641, 0x8d179402, 0x9500064d, 0x518818cc, 0x85cecef7, 0x4b471b6b, 0xffb415fc, 0x474613ff, 0xd93a97c5, 0x33bd68d6, 0x1cc082f4, 0x183a5623, 0xd5ac8a90, 0xe61688ec, 0x166c312b, 0x32c11857, 0x4469b905, 0x4411f6b7, 0xba893cac, 0x2bfcedd6, 0x64d2414d, 0x45581259, 0xe8b69e7d, 0x882d5cc2, 0xb43c7329, 0xef4dd745, 0x62f9bc04, 0xb4d12d33, 0x3b90db0c, 0xa337e1d3, 0x39296b35, 0xe040b266, 0x9bdf5a09, 0x8e5cf5df, 0xcba7df3d, 0xe9572388, 0xae3ea401, 0xe9600bfa, 0x62cd137f, 0xf9f63491, 0x95d87fac, 0x119fdb73, 0xd558be3a, 0x92017586, 0xe11a554f, 0x4dc2019a, 0x2acb9f5e, 0x79f27b85, 0xbcf48ec5, 0xff4ce3d4, 0xd72f506e, 0x25952a04, 0x0089ff66, 0xc5eb2af3, 0xbea25a82, 0xebaa428c, 0xf1988559, 0xef6a81db, 0x2684421d, 0xe807a5d4, 0x5f5350c1, 0xc40f4718, 0xe585636c, 0x6712a2e3, 0xf5736a2f, 0xefcbce94, 0x2e4c4478, 0x1433d020, 0x3f6bbed0, 0xa298fe86, 0x20a254e6, 0x2d43d95a, 0x8525668d, 0xc93cb9a5, 0x2774c4a9, 0xa649aee0, 0x8249a6ec, 0x014b390c, 0xc5a8364f, 0x93dac9ae, 0x2ee706c5, 0x6b9b0ba9, 0x88494ce8, 0x692b0d2f, 0x21a3caac, 0x2a16de8f, 0xba42163a, 0x7f911099, 0x4f1f7583, 0xef6816ad, 0x11d7b62f, 0xe059d337, 0x029e43fb, 0xad96bedd }, // Message 7 - { 0x125c0216, 0x2a38cc49, 0xae5fb6ab, 0xbc9a3fa4, 0x8dd23ac9, 0xc338e315, 0xfaa1bf07, 0x86867363, 0x5a9154e0, 0x3ede1c02, 0x9d8b3656, 0x32f92b62, 0xc06a7892, 0x7c5a53e9, 0x0d279cbb, 0x6ff86c7e, 0x98363741, 0x920abf78, 0x3fb3d4ac, 0xdd2690c5, 0x6c998427, 0x642c709f, 0x7461b3af, 0x2a73fce2, 0x40b0ce56, 0x47f6865d, 0xd846050b, 0x3a23c53d, 0x74423bc5, 0xfac96032, 0xc5d7beef, 0x0aa9ffaa, 0xbf42933d, 0x9841bfe3, 0xbee7577a, 0xe3ea0a75, 0xb8c98050, 0x1ded6eb4, 0x0a48ea14, 0x17e65029, 0x9fa0f651, 0x3824aadb, 0xee43b619, 0xc1894aec, 0xe8590fdb, 0x0b784a9f, 0xe8cb6a14, 0xc4f47449, 0x57f7c3a2, 0x6e19b551, 0x1dad6c7b, 0x5389b88c, 0x33d8d9ae, 0x05afe038, 0x28466f96, 0x31c5eddc, 0x6541c962, 0x95b2de5e, 0xa6fdffc2, 0xb15e93ea, 0x0553ffd5, 0x1ad4afc4, 0xd2fd7102, 0x09e40a6c, 0xbfc6a5a1, 0x41ca1dfc, 0x37f09919, 0x0c01f809, 0x4096f505, 0xa7c27a7d, 0xe9082b73, 0x73fd7007, 0xdced3262, 0x46efbff3, 0x8682ced3, 0x9546b182, 0x0038b42c, 0x498e68fc, 0xd0b4252c, 0xa61ad839, 0xd26a4b61, 0x184e0e29, 0x975fc404, 0x0bcec781, 0x23d870bb, 0x1a2ffb42, 0x97c02bd0, 0x3c50984f, 0x78fc3ce9, 0x07db579a, 0xb74ce45a, 0x108be2b6, 0x3e002d5a, 0xd91cd1aa, 0xb6ce7a25, 0xc49dd643 }, // Message 8 - { 0xe9d3cbe9, 0xb1ea952e, 0x8c0ed244, 0x6bbe76ff, 0x08f6a337, 0x30acd50b, 0x713c043b, 0x6c199435, 0x253fda83, 0x69cad8cc, 0x97fbcd79, 0xbac98340, 0xe1d172ca, 0xa0bce93d, 0x08070e35, 0xda5d354e, 0xc9f12d03, 0x4cf1e6b1, 0xeaa1f0f9, 0x866cffcd, 0x88caa2f1, 0x282e655c, 0x8ed45770, 0x8cb28b01, 0x3c608d81, 0x4d42d1be, 0xd8a4a53e, 0x263d26de, 0x41b45e6f, 0xadf6415b, 0xa02c7965, 0x34c5b885, 0xe481bdfa, 0xd2974004, 0x27be3240, 0xe860b2cc, 0x1e4b6c34, 0x794b5f84, 0xf676dc4e, 0x5a280bc4, 0xa7f09dd6, 0x4e5a4f50, 0x78b9ba94, 0x040f1179, 0x173c1da7, 0xaf6ef39d, 0x94afb20d, 0xf868e096, 0x14e422d7, 0xbbb33d78, 0x85549504, 0x6699263e, 0x15b28dbc, 0x3cea7407, 0x6ac47cf2, 0x5399a971, 0xe1638190, 0x4dd4fa87, 0x9697ebb0, 0x756c17c5, 0x4b2a9c36, 0x183d8239, 0x78a9e0c1, 0x15998ed1, 0xadd6be1d, 0x32aeee95, 0x1ffedd99, 0x090553b6, 0x36474687, 0x6fd609fd, 0x422cc2d8, 0x54bfedf4, 0x98b93ba2, 0x462150f3, 0xa31a469e, 0x9f7f636c, 0x5d6012b0, 0xfd95cb2c, 0xe4909ff6, 0xe49ff27b, 0x27e1a1bc, 0x73290f67, 0xc6e43a1f, 0x48227646, 0x5c5bfe4a, 0x2979375e, 0x527d6659, 0xe0eabf49, 0x9cf14c0c, 0xcf3e9985, 0x50445e40, 0xe041389c, 0x498630df, 0x670d26bd, 0xc2ade384, 0x9b4c1653 }, // Message 9 - { 0x1cc6ba26, 0x0e7756e7, 0xd6a016f6, 0x2370930d, 0x4c96a62b, 0x07088df9, 0xc62bd0c6, 0x117ac64e, 0x64021b8f, 0xb9b34536, 0x6e211947, 0x9e5b5adc, 0x707108fa, 0xc1ae745c, 0x14fe842e, 0x66ebe017, 0xfd99a725, 0x4dfd484b, 0xdc8f69bb, 0x6f47777e, 0x903a3203, 0x02c6e04b, 0x3204650f, 0x6e933828, 0x004a6ccd, 0x6a7278ad, 0x2ad9be64, 0x40d4758c, 0x73c71314, 0x8dfeea2b, 0x304774f9, 0xac936a3f, 0xfbc0d9aa, 0x2832b6c4, 0x055df478, 0x3217bffd, 0xf6e60b49, 0xb8edec60, 0xee1a927b, 0x597e16fc, 0x92a3c496, 0x6c94954d, 0x23ceb621, 0xab1f5efc, 0xcac411c3, 0x183046ba, 0xa17163db, 0x181bfe85, 0xa1521e27, 0x5a6482d7, 0x3aef85d3, 0x9b34756c, 0x0b18c1ae, 0x7ce044af, 0x410dc013, 0x8e453a12, 0x23e7130a, 0x060be370, 0xe56f5185, 0x4a7da34d, 0x05e6b797, 0x3fac2cc7, 0x9974e726, 0x0f661205, 0x30445e0a, 0x34f5884e, 0xa2aba24a, 0x90b9a90c, 0xd027c62e, 0x9c217a5a, 0x470d6585, 0xa0145795, 0x4b227351, 0xd08ae822, 0x6c8e5a23, 0x14d2ae93, 0x7372aa46, 0x4edcad0e, 0x1e2e3ad6, 0xe90b4f3a, 0x3fa50466, 0x6cd1ee94, 0x99da9419, 0xd5eaf5f2, 0xf6f61662, 0xe275da8e, 0xc7bf7d15, 0x3f1de288, 0xb113d05a, 0xb2278268, 0x64111935, 0x56c36edd, 0xc3976fa7, 0xc029f35d, 0x6f06a172, 0x5c84a5cb }, }, - }, - { /* Case 2 */ - .iv = { 0x56, 0x3b, 0xc1, 0x5a, 0x62, 0xcf, 0xfb, 0xc5, 0x8c, 0xfc, 0x2a, 0x0d, 0xb8, 0x77, 0x0d, 0x7c }, - .p_data = { - .Y = { 0x96464501, 0x786e0f50, 0x5156c737, 0x3414fba0, 0xd1867963, 0xb4ea4fcf, 0x588bee90, 0x42199bca, 0x7db378d3, 0xdc5c1742, 0x4d8d29a4, 0x411bb4f0, 0xe684b248, 0xa5f43318, 0x4dab1c1c, 0x41765d8e, 0x02e0b169, 0xd2bfeddf, 0x209f5b76, 0x23e9d097, 0xc7b4cbe6, 0x3a442cfd, 0xc88e5c35, 0xca04575a, 0xa1844add, 0x5efb2b7a, 0x867eaa5d, 0x7954c058, 0x26a83a80, 0xa49c7ab5, 0xed50f6ba, 0x7b05235a, 0x9f0602a5, 0x1c24852a, 0x94eece3a, 0x7ba3884b, 0x15560697, 0x6aedf3c1, 0xc042ec32, 0x3f83ff5f, 0x94252db8, 0xdac29c5d, 0x8462fa39, 0x7747f6bf, 0x1c95f2de, 0x01912a8a, 0xd76ca7ea, 0x4b89f285, 0xaefeeca9, 0xd5db0979, 0xed531c5d, 0x91164867, 0x1162b3ab, 0xd46944cf, 0x1c4fe5ec, 0xdc6b05be, 0x843ca8af, 0xdd4f37a7, 0xe5ba6d9a, 0xf8735498, 0xdca3b2f5, 0x3b2f519b, 0x1c32c3e4, 0x995ca936 }, - .M = { 0xe799fe75, 0x8e75f4bc, 0x18291cd5, 0xab929bb1, 0x4f6a8e5d, 0x3b7c4763, 0x50c8f902, 0x908b29dc, 0x580f8b21, 0x58c2e4ce, 0xfe1b99e3, 0x7b29ee83, 0x808f3d99, 0xa4da03b2, 0xbfc9f648, 0x39f86580, 0x611ceda5, 0xcbeac59a, 0xd55048a0, 0x8c89024c, 0xf72d1b77, 0x6e2bbd0c, 0xd8d3ac6c, 0xf0abb46b, 0xfb5cbe4a, 0xc0992c51, 0xc79307bb, 0x545a5879, 0xd757f2d1, 0x6cfd1252, 0x5af08dc7, 0x0cf18767, 0x5fcd5abb, 0x9f87f320, 0xa4ff872a, 0x1de80a26, 0xd48e9680, 0x885732f3, 0x73c78280, 0x0bdba0b1, 0x96b3c183, 0x9cecad28, 0x3d2ffacd, 0xb3c0f07b, 0xf998b9bd, 0x1d7dacc9, 0xe36d664b, 0xedbef9ed, 0x08431e80, 0xc7d49eab, 0x93c8cfad, 0xa172fdf8, 0xa2175944, 0x48b3ed65, 0x0429b91c, 0x4960000c, 0x38ff4512, 0x68070e66, 0x16246f63, 0x41aef4e5, 0xb6e10daf, 0xe53c97c0, 0xc3933ac8, 0xc9c7c711 }, - .Rb = { 0xdaf34cbf, 0xe10eeaaf, 0x64bf581f, 0xaebe5724, 0xab0bb94f, 0x85e4fff3, 0xbc8c2b5b, 0xcacb94bd, 0x6e20d65c, 0x8d425537, 0xf89a182c, 0xea8d9374, 0x8a8a08f0, 0x6a1201c7, 0xb13f6ea2, 0x9cd3987f, 0x57de4856, 0x292a233e, 0x6010b31d, 0x7747d940, 0x50df6d97, 0x1be82fed, 0xa5cb77b1, 0xffe45d64, 0xbe8c4809, 0xf528c435, 0x09f6eef1, 0x7429f1c7, 0xca2b1973, 0x0b0e8b4f, 0xb97241b1, 0x830b035e, 0x11fc7f3b, 0x41f13f82, 0x4978b8e3, 0xc7526f69, 0x47db512b, 0xe5693bb9, 0x090db86e, 0x334a5b26, 0x2990a886, 0xc3233d6c, 0xa0ceef03, 0x15b8538f, 0x6af0cdba, 0x378473e0, 0xadd6d072, 0xf4c831e6, 0xe4e04c69, 0xc2a9b0df, 0x70ef3199, 0xa4621f85, 0xb5614255, 0x7eaf86af, 0x2a6a553e, 0xd6133c99, 0x57422b74, 0x120d1b0e, 0x892462ca, 0x75906ef1, 0x07b7d512, 0x22f2619b, 0x41f03a05, 0x31f0fd1c }, - .M_prime = 0xce8e9e23, - .length = 63, // 2048 bit - }, - .expected_c = { 0xca, 0x84, 0x36, 0x38, 0x9c, 0xb2, 0x96, 0x19, 0xbb, 0xa6, 0x4f, 0x1f, 0xb9, 0x57, 0x9a, 0x63, 0xd4, 0xcf, 0x78, 0xae, 0xec, 0x47, 0xe8, 0x6a, 0xd4, 0xd5, 0x96, 0x82, 0x5f, 0xcd, 0x6e, 0x52, 0xd4, 0xde, 0x91, 0x24, 0xa9, 0x8f, 0x1a, 0xe8, 0xc9, 0x36, 0x39, 0x8b, 0x1c, 0x5f, 0xb0, 0xd4, 0x59, 0xba, 0x79, 0x71, 0xcf, 0xf9, 0x02, 0x4d, 0xcc, 0x3b, 0xe7, 0x3b, 0x74, 0x17, 0x88, 0xd0, 0xba, 0x59, 0x72, 0xc9, 0xdd, 0xa8, 0x62, 0xa3, 0x0f, 0x99, 0x84, 0xb0, 0x14, 0xbb, 0x75, 0x58, 0xc9, 0x4c, 0xd4, 0x3f, 0x3d, 0x0f, 0x28, 0x9f, 0xa1, 0x12, 0x1d, 0xdf, 0x29, 0x73, 0x2d, 0xbe, 0x96, 0x17, 0x07, 0x04, 0xd8, 0xe1, 0xdc, 0x70, 0xd2, 0xe0, 0x7d, 0xd0, 0x0b, 0x2b, 0x10, 0x52, 0x8d, 0x7f, 0xcf, 0xf6, 0xee, 0x72, 0x18, 0x95, 0x8c, 0x3e, 0x82, 0x3e, 0xda, 0xfe, 0xf9, 0x8b, 0x75, 0x7e, 0x1d, 0xc4, 0x0a, 0xc8, 0xb5, 0x78, 0xd1, 0x12, 0xd8, 0xc6, 0xff, 0xff, 0x21, 0xb4, 0x3c, 0x35, 0xd5, 0xf1, 0x04, 0x67, 0x51, 0xaa, 0xce, 0x75, 0x25, 0xd6, 0x32, 0x91, 0x54, 0x8b, 0xd9, 0xe1, 0x26, 0x78, 0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 0xf9, 0x7f, 0x89, 0x2a, 0x92, 0x22, 0x02, 0x21, 0x30, 0xb2, 0x89, 0x3a, 0x17, 0x6c, 0xc4, 0xe5, 0xad, 0xd7, 0x20, 0x91, 0x66, 0x63, 0x44, 0x30, 0x2f, 0x4a, 0x6f, 0xaa, 0xaf, 0x9f, 0x37, 0x11, 0x9f, 0xb2, 0x1d, 0x24, 0xd3, 0xab, 0xea, 0xa0, 0x4a, 0x44, 0x75, 0x93, 0xad, 0xdd, 0x89, 0x0c, 0xd3, 0xb0, 0x0b, 0x4e, 0xab, 0x96, 0x79, 0x52, 0x24, 0x84, 0x1f, 0xc6, 0xc3, 0xb7, 0x6c, 0xf5, 0x03, 0x55, 0x33, 0x67, 0xa0, 0xc6, 0xf4, 0x08, 0xd1, 0x10, 0x79, 0x82, 0x64, 0xbe, 0x36, 0x6e, 0xb5, 0xd5, 0xcd, 0x72, 0xf1, 0x19, 0xf9, 0x30, 0x7f, 0x79, 0x09, 0x61, 0x24, 0x15, 0xfd, 0x1a, 0x3e, 0x49, 0xa0, 0xb9, 0x58, 0x97, 0xb2, 0x5f, 0xdf, 0x7a, 0xf4, 0x31, 0xcb, 0xb0, 0x8c, 0x33, 0x2c, 0x13, 0x3d, 0x8c, 0xe3, 0x79, 0x08, 0x66, 0xa0, 0x2d, 0xad, 0x3d, 0xeb, 0x82, 0xaf, 0x9c }, - .hmac_key_idx = DS_KEY_BLOCK_1, - // results of message array encrypted with these keys - .expected_results = { - // Message 0 - { 0x49250367, 0x223e05ec, 0x236a3106, 0x039643fd, 0x90043d2a, 0x0aac40c8, 0x34f693ab, 0x6b5afda8, 0xb5ddc3de, 0x32fa592e, 0x1e61619e, 0x8f28f70a, 0xbd2e7743, 0x84fc7709, 0x1acbcb72, 0x5043839d, 0x86b3105a, 0xed47d9a0, 0x50da66c0, 0xebfc5d93, 0x2295e705, 0x1a6b62e4, 0xa9f16862, 0x95a2cb5d, 0x2e840c12, 0x78784e1d, 0xa008eff2, 0x63fd629f, 0x2e492a37, 0x00fcc1d8, 0x6bf6f354, 0x25665c0b, 0x62dbba8e, 0xf5b0c71c, 0x745a3e91, 0x3ac48470, 0xf53ca24f, 0x012f09fc, 0x3318ad13, 0x0ed89270, 0xf13f7ccd, 0xc8463b8c, 0xdb59027d, 0x16e5f0f9, 0x6df47a4a, 0x69413f62, 0x94af9430, 0x1958aac0, 0xdb1cf99c, 0x3d917432, 0xe8f9dce3, 0x906463bd, 0x0f084605, 0x377b1b40, 0x9db1ce8f, 0xcb78b6ad, 0xb83a1a77, 0x3cc75aa9, 0xbd6a7e31, 0xd66cf2d1, 0x2cb06253, 0x133a667e, 0x1a237e6e, 0x1388df8f }, // Message 1 - { 0xf93c60dc, 0x486541c6, 0x92219fae, 0x0cad6c8d, 0x49edf5f2, 0x4796b929, 0xcb8ed982, 0x02f38196, 0x2f1f8668, 0x65444d8e, 0xcb21a501, 0xc9078acc, 0x1f776f93, 0x22b7c745, 0xb9dc17d8, 0xdcf59598, 0x4d205da2, 0x20006e97, 0xb9e60ca4, 0x638b8531, 0x3cba2018, 0x2972eee8, 0x0df43a5a, 0x4046e476, 0x556c78dc, 0xb0c322ac, 0x85785e08, 0x0cc2426d, 0x0a439f48, 0xb5f566e3, 0x5b835bf0, 0x9bad5cc9, 0xd4ec0ca5, 0x3e90666a, 0xdf48539f, 0x1f16dea8, 0x134e3935, 0x11bfb72f, 0xf66715ec, 0xf4ddad53, 0x954cb62f, 0x8cd6311e, 0x5fc447e9, 0x7dc30657, 0x1409fec0, 0x69102142, 0xa1d0d9e5, 0xa0981307, 0x2c4a9847, 0xfc3e9014, 0xe4c5345c, 0x8279ba5c, 0xdd5072c4, 0x44b5391f, 0x30c9f8a8, 0x5100d8c8, 0x1de1eec1, 0x1d3b315a, 0x3054db23, 0x81e9963d, 0xba57923e, 0x34c47686, 0x51b8ed34, 0x8550746c }, // Message 2 - { 0x95af51cc, 0xa56a6c39, 0xa5fac474, 0x32ee3574, 0x5ef7979d, 0x151d6891, 0xa1bec650, 0x54337154, 0x903e3628, 0x499c751d, 0x76163d37, 0x2df23770, 0xd7d7a86e, 0x457e3eef, 0x95a4e128, 0x69e5977a, 0xed460985, 0xd13ff0f6, 0x6cd33014, 0x330f694d, 0x48c9b70c, 0xcd1581de, 0x59aef213, 0x87c973a2, 0x63a54a55, 0xc0ef37bb, 0xf3526357, 0xa503cb2a, 0xa3b1d1f3, 0xc818a48a, 0x033ba4c6, 0x7192d05c, 0x804da2ee, 0x28021be1, 0x918cddbb, 0x9fd04445, 0xcc58ba79, 0x9e159615, 0x74b27132, 0xc45cd0b2, 0xb6dc6a16, 0x5d9d448f, 0x0c808f2c, 0xe92f2c44, 0xa202a48c, 0xfaf57df7, 0xbf884580, 0xd43d5df6, 0x93a952c2, 0x8dd2da38, 0xd48b9d95, 0x59325bc5, 0xa3b915f8, 0xa3175aaf, 0xcdf45fc2, 0xc989e5cf, 0x5b56d793, 0xeac73628, 0xbf2c8284, 0x9f9f2411, 0xd23df80d, 0x08bb046c, 0x4e222cbe, 0x4892eea2 }, // Message 3 - { 0x2bcc8348, 0xe8e9a108, 0x7edb4886, 0x31c9d055, 0xd4bd6aa0, 0x727160c3, 0xaa4628c4, 0x7b6799aa, 0xf80fc2a9, 0xc83a4581, 0xfad80e05, 0x69d360f3, 0xb46ba0aa, 0x3bebf640, 0xa078e6f8, 0xd9d1c05d, 0x67cd08fe, 0x2507319f, 0x871d2711, 0x1d665776, 0x80970e20, 0x342a6269, 0x5d1c88d3, 0x79b23450, 0x1db17b92, 0xbf99fc3a, 0x286f0cb6, 0xdc7a87bb, 0xa2f846b2, 0x85f3e429, 0xcee5337a, 0xf830ace1, 0xc8af1f36, 0xe40cb208, 0x5248cd9e, 0x99305e9b, 0x3cd76b1c, 0x833cae1c, 0xfe846a7a, 0xab76863a, 0xb266d518, 0x53fa2463, 0xe7b42c45, 0xed9b9555, 0xfad7afd0, 0x0b734ee8, 0xb82438a2, 0xadd4c3b1, 0x52832f3f, 0x55e7498e, 0x84f92417, 0xf1f04308, 0xd04374ab, 0x5bdc0249, 0x0a95e342, 0x6b1514f7, 0x56883eb8, 0xdb46a3eb, 0xa573fbed, 0x93bad740, 0xadb9bdb3, 0x5a4db433, 0x79ae9bbb, 0xa66a46e3 }, // Message 4 - { 0xa4bf6899, 0xf5896ab5, 0x28291d49, 0x4f122ab9, 0x7267fb0c, 0x2fbb18a7, 0xbe4f71ac, 0x68449c16, 0xe4e98f31, 0xf2cbba4e, 0x537caad6, 0x342eb897, 0x5fbf9290, 0xd0a7067f, 0x4245557f, 0x0852baf6, 0xb59edc95, 0x6f37f0c7, 0xacbe95b8, 0xf7fbf6e5, 0x2253b689, 0xcddf28b1, 0xc551eb52, 0xbbc94fff, 0x3c816ef8, 0x5a951f22, 0xd417dae7, 0xec90bc0b, 0x1979ec22, 0xfb95d654, 0xbb3bd8ab, 0xafb07eaf, 0xa751e478, 0x2d527447, 0xa47465a0, 0x21356b70, 0x948043e6, 0x6a11044b, 0x61f30e37, 0x3717e8d9, 0x4ed1f3b8, 0x583bf989, 0xfcb15635, 0xacb520c1, 0xb9599f19, 0xd0befe91, 0x2dbc347e, 0x23f51388, 0x9f2cdc68, 0x39bea045, 0xb21efe8c, 0x857ade32, 0x2115e30a, 0x3f38a23e, 0xedb9f5c4, 0x08b0c13d, 0x08e00e7b, 0x318c4a82, 0x50a2b0f7, 0xe9889c07, 0xf8621f05, 0x253c1a97, 0x581ed775, 0x71895842 }, // Message 5 - { 0xda588f90, 0x7fc5f0de, 0x868529f6, 0xbb94d3a0, 0x934b5396, 0xf708be09, 0xfa2bcb40, 0xde70cc2c, 0x1e6585db, 0x91546ec5, 0xed186173, 0xda22c913, 0x3b51ba96, 0x767f64ba, 0x58b5d3cb, 0xce96a53b, 0xe9e65bb7, 0xe490accd, 0x8b9c0088, 0x759df710, 0x557a7a8a, 0x23738c7d, 0xb8880d68, 0xb23092e2, 0xecce9455, 0x06c7f10a, 0x7ce960b8, 0x029a2178, 0x518f9ba9, 0x42e441cd, 0x50e3f22e, 0x93092d49, 0xc2a0fe82, 0x2932e731, 0xad606c81, 0xd35af42d, 0xd79ea3a8, 0x514584c1, 0x348f21d1, 0x65c7d980, 0x6656881d, 0x59bbfe3f, 0x2c9853e0, 0x26c8835e, 0xa18bcff0, 0xdc94d7d0, 0x7d0ab137, 0xb2f280b0, 0x75875db5, 0x520e2e18, 0x0a79b614, 0xf3938392, 0xbfdabc9e, 0x76e1211d, 0x02c0a97d, 0x14d021d7, 0xa901f427, 0xaa976834, 0x5a2e42f6, 0xa3eacba0, 0x33a2931b, 0xdea99739, 0x5f0d1759, 0xa01316d7 }, // Message 6 - { 0x5d6f3d9c, 0x41079187, 0xd491e278, 0xf6e4c86a, 0xe55c3381, 0xd393eb03, 0x0471ae74, 0xdbdd383e, 0xaf579429, 0x94637bfa, 0x14862f4f, 0xa58a3b93, 0xc35ea5ef, 0x5f0de2f4, 0xe6c2a0d1, 0x949449fc, 0xf0f2c31a, 0x0ffad251, 0x6e005487, 0xa7f3f6cd, 0xba4a846f, 0xa49086d3, 0x5d9edece, 0x099d64c1, 0x24064f82, 0x2d1736ea, 0x6cea5361, 0xbf97aff8, 0x60989760, 0xd9e74c31, 0x349ebfc6, 0xe9920c52, 0xc4c4b082, 0x3ad314e1, 0xe5abf591, 0x166b097b, 0xe6b686b8, 0x85f79ab3, 0x206deb9e, 0xed54a3bd, 0x36e3cc6f, 0x7d839ed7, 0x81e26900, 0x20e0ad10, 0xa77967ce, 0x8a9f84b7, 0x1b33e82a, 0x49cbf2a5, 0x0279db93, 0x4d778e49, 0xecd1af58, 0x83539324, 0x0b11a5db, 0x8a1f27e4, 0x61f539fa, 0x317d68b3, 0xede9ef7c, 0x4392cfcf, 0x68493e17, 0x0045944c, 0x1786b566, 0x20958881, 0x373bd388, 0x65d37d26 }, // Message 7 - { 0xd3bde9e6, 0xa57dc31c, 0x9124efe3, 0x48b33f1e, 0xae7fab80, 0x02cf600d, 0x8887f934, 0x9608cb7b, 0xfa5dc8f6, 0x1ccf1980, 0xa53a73c4, 0x8fd5657c, 0x1afa2dc4, 0x0c167611, 0xd8ee01ab, 0x145020b0, 0x06d60ed6, 0xaff7acde, 0xb5e41331, 0x9bce2ed8, 0xd8c3ce5f, 0x830ec28b, 0x9340206d, 0x6a400341, 0xb19128f9, 0x2b0a8ece, 0x2cb059fb, 0x7fb3fbb1, 0xa9702a3b, 0x8c7e4f62, 0x434f7ecb, 0x88d6aa1e, 0x10e3f024, 0x72438c62, 0x4403348d, 0xe43e7962, 0x19d8307a, 0xe360be64, 0x1dcc14fb, 0xd468ed7a, 0xdf22198e, 0x48b7c193, 0xaa183f77, 0x02f08b4d, 0x3f0b8951, 0x4ecf53f1, 0x6e34c59b, 0xbb0af7e7, 0x4c4e5f20, 0xd9d9528e, 0x761f7be6, 0xf6d96e7f, 0x6cceacd0, 0xfe5e0c06, 0x0de869cb, 0x76dd5cba, 0x2d1c5e29, 0x84fe071e, 0xad96421f, 0x7006bfed, 0xc1446ba4, 0x012d11c6, 0x38c57992, 0x59766787 }, // Message 8 - { 0x5a1af4e7, 0xe37c6a65, 0xa7818fb6, 0xc137ba2f, 0x2dc002f5, 0x5c2d362d, 0x0863073a, 0xd74e27b7, 0x0deaec8c, 0x3a041309, 0x5ec383b5, 0x4e7e5446, 0x8236d27c, 0x1ab06bab, 0x08ec1002, 0xedf6cb2b, 0x6a30b850, 0xd9dedbb8, 0x8ac220c1, 0x1b87ec58, 0x8c55f115, 0x2829ecda, 0x11b4445e, 0x2a35a31e, 0xaac438ce, 0xb5731aca, 0x36fb003c, 0x34b9f2ec, 0xcf6fc098, 0x450dafb6, 0x6807491a, 0xa82d5440, 0xb46d9c55, 0xc3b4cfa3, 0x9ddda5fb, 0x55f6e50d, 0xcdf3b551, 0x446a78c6, 0x67c6a7b8, 0x389447a2, 0xede898f9, 0x0cdf84bf, 0x78669e91, 0xb9d74cd1, 0x7e28242b, 0xde7a9ee2, 0x94bf6106, 0xa4597461, 0x69e8b2b9, 0x932cf68d, 0x6d56fae4, 0xabbb1103, 0xc1478340, 0x2ee55b73, 0xd98a09ec, 0x3c41deb2, 0xfdf109c1, 0xcd2129c8, 0x7e25e9a0, 0x1e3f837e, 0x64afa918, 0x11f11232, 0x56c22d35, 0xc96345da }, // Message 9 - { 0x18ec7c18, 0x82de9be7, 0xf0bd0776, 0x80d93889, 0xc7c20ab9, 0xcbedc9ff, 0xfdf533df, 0xf51bada0, 0x6a7448d8, 0xb53fca55, 0xc7ff0037, 0x1c658ed5, 0xc4403f58, 0x23da4d71, 0xc453c05e, 0xb2abf7ba, 0x6415c335, 0xba6f98cf, 0x5de8ab10, 0x82c4d0a7, 0x7eceae99, 0x9947ce99, 0x097290d5, 0x9539d658, 0xf9a48bdf, 0xcd9f2dab, 0x153c933b, 0x1a790d41, 0x9456a5cf, 0xdafae171, 0xf663dc8c, 0x41297d88, 0x5117dbf2, 0x1a1b6ca0, 0xbb1d54a1, 0xbdf7face, 0xa8016018, 0x6194d0e3, 0x7e35d377, 0x1c1d477d, 0xc9822385, 0xbbdb0f0d, 0x5b5e4b0e, 0xd1a14271, 0x3bed8fd5, 0x04fcaadd, 0x4ba4eb22, 0x9d60891c, 0xb32a7d01, 0xe3b68bed, 0x95b00333, 0x858a5d08, 0xe0f35109, 0x2113a3d4, 0x7fd2874d, 0x47b80f75, 0x5729eac6, 0x9fb93b0e, 0xaa65a597, 0xef3d72d4, 0xd91a3587, 0x1edfd0aa, 0xf65b3c2f, 0x16badb1a }, }, - }, - { /* Case 3 */ - .iv = { 0x4d, 0x39, 0x4b, 0x5f, 0x64, 0xd7, 0x95, 0xaf, 0x88, 0xe4, 0xab, 0x73, 0xe9, 0x4f, 0x16, 0x5a }, - .p_data = { - .Y = { 0xb338c1c9, 0x8067b3a5, 0x52a0dfdd, 0x33e05415, 0x30912994, 0x418af50a, 0x2aa6cf30, 0xa76ddb96, 0xbe03c020, 0x19485a62, 0x44a9c82f, 0x3a4ea0f4, 0x29e8ce3f, 0x9f77bcc3, 0x8ac5a934, 0x21d999e0, 0xad9dc793, 0x705b9692, 0xf11b5b64, 0x40f39af8, 0x8f6a8c5d, 0x55ad72b5, 0x412a1151, 0xd0ead3e8, 0x9d1028fc, 0xd4c3a930, 0xa9acae1e, 0xed732262, 0x4cd52629, 0x91c4cdbd, 0x33f7bed7, 0x6e6c8203 }, - .M = { 0x3398b9a9, 0xe004f59e, 0xe293ab68, 0xfe9508d0, 0xc419416e, 0xbc1955f6, 0x8f963035, 0x628c7a2f, 0xcde5f08b, 0x430c457c, 0x708b5823, 0x5024e5f3, 0x55adf617, 0x393ee334, 0x8d8c8f09, 0xd608e46c, 0x80ff13f7, 0x7dbc8407, 0x727ede3c, 0x7930b272, 0x3c7b43ef, 0x00a9c471, 0xa5a6a9cf, 0xbce8732b, 0x03eead94, 0x945169c2, 0xfd1d6f05, 0x8c471354, 0x37eeb506, 0x5324ef4d, 0xc8348330, 0xa63818d5 }, - .Rb = { 0x7265b9fd, 0x78d90d73, 0x86061d2b, 0xb4f3cd24, 0x6d53f461, 0x5f2b8893, 0xf05faf7b, 0xc4a52a02, 0xbfd629e1, 0x9ea05cfb, 0xdc73e38c, 0xd8cc030d, 0x824966fd, 0x0a3c9e0b, 0x0887b000, 0xe54bd673, 0xe34ecada, 0xe5991711, 0x33f0a439, 0x8c047ecf, 0xe81262cf, 0x135fc37a, 0x7d6c72a8, 0x8501a8b0, 0x8f1fc453, 0x5032b172, 0x95474942, 0xa2ae96a8, 0xab241f12, 0x6d63962f, 0xf39293b7, 0x0a94759a }, - .M_prime = 0xd8a50567, - .length = 31, // 1024 bit - }, - .expected_c = { 0x5a, 0x60, 0x69, 0x68, 0x29, 0x96, 0x85, 0xb3, 0xba, 0x39, 0x9d, 0x2d, 0x82, 0x39, 0xac, 0x5e, 0x41, 0x70, 0xcc, 0xb7, 0x80, 0x57, 0x4f, 0x9c, 0x32, 0xb6, 0xdf, 0x76, 0xe0, 0x55, 0xa2, 0xaf, 0x23, 0x03, 0x55, 0xb2, 0xe5, 0x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, 0xfc, 0x24, 0x26, 0xf4, 0x14, 0xaa, 0x7d, 0x30, 0x82, 0x3a, 0x0a, 0x21, 0x2a, 0x59, 0xc4, 0xe0, 0xf4, 0x06, 0xce, 0xaa, 0x15, 0x4b, 0x9b, 0x01, 0x8d, 0xd8, 0xff, 0x50, 0x93, 0xd4, 0x9b, 0x4b, 0x6b, 0xac, 0xe4, 0xe4, 0xf8, 0xe7, 0xde, 0x11, 0x55, 0xdd, 0x3e, 0xdf, 0x95, 0x61, 0x17, 0x59, 0x39, 0xb5, 0x4d, 0x29, 0x9f, 0x1d, 0x1d, 0x47, 0xa5, 0x86, 0x28, 0x0e, 0x49, 0xda, 0xd0, 0xf1, 0x7e, 0x41, 0x52, 0x40, 0xae, 0x83, 0xe1 }, - .hmac_key_idx = DS_KEY_BLOCK_3, - // results of message array encrypted with these keys - .expected_results = { - // Message 0 - { 0xba72e92f, 0xae10df70, 0x5bca3cd7, 0x6f04225e, 0x7d00b5fe, 0x76636818, 0x735c0bcb, 0xd9c0a2f3, 0x95fc03cb, 0x718358cf, 0xdb1d125c, 0xfa75964a, 0xcc15b01d, 0xd6a7be53, 0x4cce1454, 0xfbfc6367, 0x1d368629, 0x412dc330, 0x77bff74f, 0x0778de39, 0xde435343, 0x4fd119cf, 0x09b03a17, 0x1646d9a4, 0x842792ff, 0x11d79d7c, 0x665a863e, 0x9f73563f, 0x6bb67178, 0xeb86aa6c, 0xbf8e8e48, 0x01a8d767 }, // Message 1 - { 0xc1c56630, 0x9d4cfbd6, 0x5d0c0e26, 0x2e2fdcf2, 0x7f4d4c2f, 0xc7d3ba31, 0x9b4c5947, 0x972bea0e, 0x50d8c701, 0xe7480b9c, 0xe5958dcd, 0xe90cd25f, 0x4ccd89ce, 0x2361da6c, 0xf23e79e9, 0xd4e9214a, 0x97e3888b, 0x1a47d051, 0x555dbfeb, 0x366afe71, 0x2ac64722, 0xc8bf47d0, 0x6749c7ab, 0x13234bc6, 0xca154ad5, 0x9041f2a2, 0xf48b17be, 0x647f92ae, 0xe9224a6f, 0x5680bd1c, 0x6f5512cb, 0x2b1c7048 }, // Message 2 - { 0xa2977003, 0xd6e9b4da, 0x07b95635, 0x87991e87, 0x7182ef05, 0x62a6944c, 0xddc01bd2, 0xb0829257, 0x6761e7e1, 0xd4bf505e, 0xe7352707, 0x0098f9b4, 0x03b47ad3, 0xf35a66f2, 0xe98ce33b, 0x9595952f, 0x7c3edce8, 0x04398454, 0x83103ce5, 0x998a2a52, 0xd0958b7e, 0x44ea25c1, 0xf3d014cb, 0x79a16fa2, 0x3d124088, 0x4877d6c1, 0x10d51185, 0xa6efc61d, 0xc1145c15, 0x7c96e140, 0x4193064e, 0xa5f7909b }, // Message 3 - { 0x864f2c69, 0x97195cb9, 0xd8e1b427, 0x67617eee, 0xd3b9f6b5, 0x21b3c45e, 0x5e1fa103, 0x007ff8bd, 0xf390f594, 0xe0cc5d88, 0xa33e4dd7, 0x3be82420, 0x8ebb3666, 0x0acfe045, 0xf7cf562d, 0x0b45c08a, 0xb07adcc7, 0xe08e7b43, 0x6b4d1ded, 0x5f455255, 0x5a62e11d, 0x9ba5cf08, 0xebe4bbe9, 0x3f224968, 0x2899388d, 0x1ed06a6d, 0x673439db, 0xed018c95, 0x97a5f184, 0xdac94ee8, 0xb300bd6d, 0x4f5d8901 }, // Message 4 - { 0xe813a6e9, 0xf8623ece, 0x606d6f56, 0x011b4d25, 0x253e2eda, 0x8e8976b1, 0x35539708, 0x4f7fc2b4, 0xcf49ac33, 0x00db8b47, 0xa8c11748, 0x3fed9d93, 0xcfb60a60, 0x8634cb77, 0x2d927735, 0xf6fac4d4, 0x38b444c1, 0x75b3dbaa, 0x4685dc9f, 0x84d87a81, 0x32ebad0f, 0xb90a1d5a, 0xca174ccc, 0x1461733e, 0xed5de1cf, 0xab125242, 0xe96c9f99, 0x0f6adca9, 0x745efae6, 0xf23a814c, 0xbeff6914, 0x54137808 }, // Message 5 - { 0x82ded2bc, 0x595f0fb7, 0xe83f6022, 0x95d1d131, 0xc0f0951a, 0x625ab669, 0x000413a9, 0x924f0a65, 0x4ccbcf64, 0xbd3a1add, 0xc220053c, 0x373376b2, 0x5536dc78, 0xa68790f9, 0x1598c8fe, 0x70c47c05, 0xef79b99b, 0x493c273a, 0xd68da949, 0x0c8a939a, 0x1725d6cc, 0x9d811bb0, 0x451664f7, 0x9f0caa28, 0xc12a02bd, 0xdf5eb10a, 0x72f76059, 0xe7adb519, 0x4cfd1f4b, 0xe906aab0, 0x875fffa3, 0x21de0263 }, // Message 6 - { 0xd1dfe4b8, 0x4fe33710, 0xaff420d1, 0xb17e0316, 0xe2dddf0a, 0xd5bb0e95, 0x77269d33, 0x30221c42, 0x78a95629, 0x12656b4a, 0x856115c8, 0x77f54093, 0xe4d4b1fe, 0x9e4f4619, 0x631102dc, 0x76bf9be9, 0xdb148371, 0x914e1715, 0x82652047, 0xb30a16ff, 0x28e2d7c9, 0xf917308e, 0x467e65c2, 0xc2cf2b3d, 0x7d717ee6, 0x1dcd4a9e, 0x8a5e8a3d, 0x38d72800, 0xd07673be, 0x1bdf65fc, 0xf81f3c8a, 0x9c2e0d34 }, // Message 7 - { 0xf3e4c4ad, 0x74912017, 0x7a37d474, 0x4c51f003, 0x9f0fcc31, 0x8ee33b4f, 0xe6b28d72, 0xe4234f2d, 0xab7d56fc, 0x2903a668, 0xdf4dd82f, 0x22df0964, 0xfc520d2d, 0x1f8f162e, 0x953853a6, 0x854d9d13, 0x17793a8e, 0xbbb6a63b, 0xb933d590, 0x58617cd6, 0x25ff965b, 0x69782821, 0xf42953ef, 0x9f0bd425, 0xd5bdec4d, 0x631186c2, 0xdba17911, 0x38ae42c5, 0x4fc90e3e, 0xa34f5a43, 0xa7015f30, 0x1158d75c }, // Message 8 - { 0x39c5f930, 0x62fb432e, 0x923867a7, 0xd97c80d9, 0xeda172b8, 0xd13f057a, 0x755bb3da, 0xeb66d1f9, 0x92c010e6, 0xe6d71871, 0x6c8093c8, 0xe2661836, 0x1da9f585, 0xad7b59a7, 0x47d33f5f, 0x374d36e2, 0x950e48ca, 0xeae29093, 0x55db981b, 0x8a9840ba, 0xfaf72af6, 0xb75af9b5, 0x06ff33bd, 0xb4a10b80, 0x69cca0e4, 0xb37fe48c, 0x7302fb82, 0x1c8f53d3, 0x1b960ddb, 0x40381075, 0xb5f802a7, 0x561ae9f2 }, // Message 9 - { 0x79b623c1, 0x837bde5a, 0x8f808b24, 0x109569ad, 0x6c8ec555, 0x5663ef90, 0x7dd62181, 0xe3887a1d, 0x204008ab, 0xa9b00a5c, 0xf11a6639, 0x919e68e6, 0xfd30a100, 0xc7d72472, 0x9fc1f51c, 0x7a73bc7e, 0x7f29f723, 0x845bf48c, 0x88d0b0b4, 0x0308f918, 0xe37a76e2, 0x72d1574f, 0x8072f360, 0x3060e10a, 0xcc10a3a6, 0x76aaef0c, 0x9963ae62, 0xa395d72f, 0xc33b5696, 0x634675f0, 0x2666698d, 0x5e60ef0b }, }, - }, - { /* Case 4 */ - .iv = { 0x1a, 0x4c, 0x50, 0xba, 0xff, 0xa6, 0x9d, 0x39, 0xfb, 0x57, 0xe3, 0x4f, 0x62, 0xb7, 0xea, 0x72 }, - .p_data = { - .Y = { 0x3e810ba1, 0x9f644dc7, 0xaa078e34, 0x1eb0da9b, 0x076595db, 0x1a394478, 0x34178765, 0xbb67ffc5, 0x76a0a1ab, 0x40eb29fc, 0x64dc1761, 0x11e6e8d4, 0x81a1e957, 0x23e4e925, 0xaebe1521, 0xa7a1713b, 0xa5468b31, 0xccf89f4b, 0xb3ad3540, 0x21a908b7, 0x8af93ee6, 0x29f5bae0, 0x1f50383a, 0xed32ad2e, 0x18a0ea2d, 0x38f0ea31, 0x203f0ff5, 0xf9a9f44b, 0xf07680e7, 0x9fb34a57, 0x340a3dff, 0x45212f6d, 0x7a187c6e, 0xc4c370bc, 0xa4c99c40, 0xa792a335, 0x647cad30, 0x2ef895b4, 0x43c9298a, 0x98b6f5bd, 0x35151bdd, 0xc2233553, 0x5226c0fb, 0x8be7c854, 0x4296f87e, 0x2d6e1342, 0x68d562a9, 0x281ba6e9, 0xd97fae63, 0x30227173, 0xe9bbd1bd, 0x75841134, 0xbd7f1af6, 0x089b989c, 0x150c0107, 0x5f948fde, 0x8955ae07, 0xedd30eec, 0xb428fe0d, 0x19ebfde8, 0x92415e6e, 0x2ec2dde0, 0x05c5a817, 0x616bb2e6, 0x09e3d733, 0x09769bcd, 0xe208ada7, 0x45625133, 0x319a1d60, 0xc7adbe47, 0x3dfbddff, 0x74272035, 0x70d71946, 0x68a75807, 0x344f528c, 0x92b0c036, 0x0a1b8be1, 0x7c3f481f, 0xf550c534, 0xc361acad, 0x1bf9030d, 0xdfd2e87c, 0xd015d6c2, 0x19439db8, 0xe4935ffa, 0x581caf7c, 0x7327959b, 0x77faee04, 0xe813509e, 0xb6523b05, 0xcb177c84, 0x09492f7f, 0x510cae30, 0x0cbdc3fb, 0x529734ac, 0xf532b43a, 0x6918bb87, 0x7c229488, 0x7ea7b591, 0xf842e5e1, 0x30ca0108, 0xe9fb7f8c, 0x92d5bf6b, 0x9c5d05d8, 0x3f8acd21, 0x38e46c65, 0xc62ac9d9, 0xd1d0bfc0, 0x55ea5880, 0xef5ac76b, 0xf72e8a73, 0x592d0761, 0xfdf0639a, 0x4c436242, 0x96792f01, 0x8888cd7e, 0x8c64fd68, 0x347dde4d, 0x59275d36, 0x5e4c068c, 0xf9365bed, 0xf54d9d10, 0xa3b4efd3, 0x150c488d, 0x09c5ad8e, 0xa16c26d0, 0x075090ab, 0x9b37ab03 }, - .M = { 0xb8c6cb7f, 0x6a28a1e1, 0x5c276d3c, 0xaaa07746, 0xa45f4875, 0x03b9f46b, 0xe8ae50f5, 0xa4a6da06, 0x3c1c9c30, 0xa859ec9f, 0xaa3e9a2e, 0xcdd446a4, 0x3c2bdae0, 0x909f1cf7, 0x40dd8fd0, 0xa7be13f0, 0x4dc244c8, 0x09f943c4, 0x1b645384, 0x3d27f01c, 0x7130473f, 0x6e380172, 0x32db86c6, 0xba13fb6e, 0xc325402d, 0x35e5fc93, 0x160f89cc, 0x485d56f9, 0x2e21b673, 0x14a3c3df, 0x00a172bb, 0x07cde7bc, 0xde5cd136, 0x54b5af00, 0x9fbbc455, 0x992be202, 0x7addc891, 0x179433b3, 0x5bb2fbb5, 0x7f4fd59e, 0x6d3c2c31, 0x011328fd, 0xbe2975ff, 0x8d42af6d, 0xb18ea96f, 0x02ea3e14, 0x474f728a, 0x39cf734c, 0x854f8b75, 0xabf755b9, 0x3e41a6b2, 0xabb28d2f, 0xb464f409, 0x63248bca, 0xab66d668, 0xd30986a7, 0xf6af0682, 0xbc4198b1, 0x91b60e6f, 0xb8024050, 0x8c8ea172, 0x6c5b0a34, 0xa3a1a2ae, 0x33d148ef, 0x9323b3c6, 0xce233c33, 0x3ec2872e, 0x1a0f1f34, 0xf66a1768, 0x626c272b, 0x63cdfe39, 0x93428587, 0x4e3acf4e, 0x85bd85c1, 0x3b8c3a63, 0x7439e0b9, 0xe965bd31, 0x1a338781, 0xe9111237, 0x84f08047, 0xf8edb04b, 0x7ac12a97, 0x63034a07, 0x4537f7b7, 0xf0a379b3, 0x85501147, 0x2bbab728, 0xa4b03198, 0xf04ad415, 0x5a29c443, 0x8186e3cf, 0xef474cd6, 0xe70b98a7, 0x18e2b385, 0x7fff695a, 0x72741fcd, 0x1fa5b7c0, 0x47d7af93, 0x9387ed18, 0xce66e3d9, 0xb929abe8, 0xf800fb74, 0x6ffed75b, 0xf3751f51, 0x5a2b25c8, 0xafe14ce1, 0xcef73f16, 0x97d26329, 0xe10281db, 0xbf7166c0, 0xd17c4148, 0x17824b21, 0x2971f5f4, 0x35cad8dd, 0xe86dabde, 0x666b0fc4, 0xc0ba9585, 0x963743cd, 0x76888a7c, 0x0c6cf767, 0xf6df6893, 0x10307071, 0x359151de, 0x785206df, 0x194167c1, 0x66871182, 0xdd28b011, 0xc1ac50af }, - .Rb = { 0x5601d942, 0x64406920, 0x8c7a0bd1, 0x86261be2, 0x998a1c5c, 0x13a2385b, 0x08006737, 0x26f1116d, 0xfdd4d386, 0x4e042d1f, 0x6cc9c843, 0x1b5fd9be, 0x1295af18, 0xe78c4d62, 0xca5e558f, 0x6aa821b7, 0x7953f0b0, 0xe00c418a, 0xc1ed8d5f, 0x09b356ea, 0x3e8d8804, 0xdf84e7fd, 0x18458a64, 0x03af2adb, 0xe4785ef7, 0x0dfb9ec2, 0x605310e2, 0x13427bd3, 0x5c2ac3af, 0x5610bc0f, 0xc8ee617c, 0x955ab02e, 0x26c8937c, 0xc996cfd7, 0x5fe5a7dc, 0xbc9fcf43, 0x7e7d7367, 0xd2d4e3df, 0xa1bbde53, 0x6da7080d, 0x26f727fd, 0x27f1e4a2, 0xc30f4c27, 0x2f22b83c, 0xc8454ab1, 0x14035a64, 0xcb668ae2, 0xaa706148, 0xff171528, 0x8f89b0b2, 0x2d2908a2, 0x1c6aa3f1, 0xea7f145c, 0x3b291b85, 0x804ba12c, 0xabec0d49, 0x5725a717, 0x4f688543, 0xcf8bc9b0, 0x930bba14, 0x8b26e3a4, 0xf4077f67, 0x6759fdb9, 0x1a483477, 0xa2141a28, 0xb29f8d27, 0x89f58be8, 0x852f483f, 0x5d0b7c5e, 0xc2b27bb0, 0x1a73f70b, 0xc9889f3d, 0xaca633e2, 0xb62bb4e9, 0x117369ac, 0x86217fa5, 0x7fcabf97, 0x43ea33e1, 0x84eeb189, 0x75bd17d3, 0x7e1ea7c1, 0x16a2ba4d, 0xd07e6f23, 0x2a0f88cc, 0x5d66590e, 0x5d00f33a, 0x39ad53e7, 0xf1edfab3, 0xc6a00ef7, 0x53e02654, 0x240a381c, 0xa9b977cf, 0xda92216b, 0x4a17d895, 0xc23adaec, 0xb51d2a59, 0xfdb8aa0b, 0x68834d23, 0x16136874, 0xb4427c6b, 0x4041ba51, 0x9e762fd8, 0x642d31d9, 0xa0ce898b, 0x1987209c, 0xdd509791, 0x4f9b2c85, 0x69c03518, 0x053b7ff4, 0x5126f869, 0xae33efa3, 0xca22b5b5, 0xb35298e2, 0x1f462924, 0xfe754ae2, 0x87cd8eef, 0xfcf54790, 0x053e588d, 0x389b5a40, 0x0478119d, 0x2c6d7f65, 0xe08ae821, 0x383d18d6, 0x7d8eff6e, 0x6e668fa3, 0x622cdd7b, 0xebf86fce, 0x9e8c4ef8 }, - .M_prime = 0x356b0b81, - .length = 127, // 4096 bit - }, - .expected_c = { 0xdc, 0x5b, 0x4a, 0x62, 0xf6, 0xdb, 0x54, 0x89, 0x9c, 0x0c, 0x5a, 0x0e, 0x1f, 0xf2, 0x63, 0x97, 0xa7, 0xa1, 0xe0, 0x92, 0xff, 0xda, 0x82, 0x90, 0x87, 0x9e, 0x8f, 0x4b, 0x96, 0xf7, 0x6b, 0x92, 0x5a, 0x0c, 0x4f, 0x4d, 0x4b, 0x26, 0x28, 0xb5, 0xf2, 0x59, 0xf1, 0xfd, 0xa8, 0x58, 0x46, 0xc2, 0xbd, 0xbf, 0xd5, 0xe0, 0xd4, 0x14, 0xab, 0x0d, 0xb4, 0xbb, 0xe8, 0x6f, 0x46, 0xc9, 0xab, 0x80, 0xa2, 0xf5, 0x41, 0xc8, 0x40, 0xa2, 0x1d, 0x25, 0xc7, 0x9e, 0xdb, 0x6c, 0x2e, 0x00, 0xb1, 0x54, 0x6f, 0xc4, 0x2a, 0x48, 0x73, 0x3d, 0x39, 0x1d, 0x8c, 0x93, 0xb3, 0x17, 0xe1, 0x2a, 0x7c, 0xac, 0x5f, 0x12, 0x74, 0xef, 0x3f, 0x57, 0x8b, 0x40, 0xb1, 0xd9, 0xc0, 0x6e, 0x8d, 0x84, 0x10, 0xba, 0xd2, 0x2b, 0xd2, 0x22, 0xc1, 0xbb, 0xc3, 0x33, 0xec, 0x5f, 0xbd, 0x4e, 0x89, 0x58, 0x33, 0x59, 0x78, 0x1d, 0x44, 0x7b, 0x9b, 0x5d, 0xda, 0xff, 0x31, 0x86, 0x18, 0xaa, 0x07, 0x2e, 0x28, 0x21, 0x81, 0x74, 0xe5, 0x1b, 0xfb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, 0x29, 0x82, 0x87, 0x81, 0xe2, 0x47, 0xd1, 0x6e, 0x26, 0x2b, 0x90, 0x6a, 0x1d, 0xd5, 0x70, 0x58, 0xae, 0xd5, 0x45, 0xe2, 0xd1, 0x44, 0xb9, 0x87, 0x1c, 0x44, 0xae, 0x73, 0xe0, 0x30, 0xbb, 0x2a, 0xf7, 0xcf, 0xe1, 0xf3, 0x55, 0x91, 0x15, 0xdc, 0x3e, 0x18, 0x66, 0x8a, 0x00, 0xdb, 0x0f, 0x63, 0x46, 0x3a, 0xdc, 0x1f, 0xc3, 0x4c, 0x52, 0x5b, 0x33, 0xca, 0xa2, 0x54, 0x74, 0x87, 0x7c, 0x01, 0x49, 0xa9, 0x96, 0x5d, 0x2f, 0x8b, 0xc9, 0xb4, 0x6f, 0xc6, 0x51, 0xf8, 0x12, 0x8e, 0x43, 0xcb, 0x79, 0xd9, 0xf1, 0x6a, 0x93, 0x73, 0xb1, 0x20, 0x5b, 0x54, 0xc7, 0xac, 0xc0, 0x1a, 0x43, 0x82, 0xce, 0x36, 0x7e, 0x2f, 0xf0, 0xd8, 0x71, 0xca, 0xac, 0x8a, 0x3a, 0x12, 0xfc, 0x41, 0x37, 0x33, 0x3a, 0x8a, 0xe2, 0x5f, 0x3a, 0x21, 0x6e, 0xb5, 0x99, 0xcb, 0x27, 0x11, 0xe9, 0x6c, 0xeb, 0xb1, 0xa1, 0x63, 0x3b, 0xd4, 0xb0, 0x99, 0x7d, 0x21, 0x20, 0x38, 0xd0, 0xe8 }, - .hmac_key_idx = DS_KEY_BLOCK_1, - // results of message array encrypted with these keys - .expected_results = { - // Message 0 - { 0xd6181232, 0x4c3f3b3c, 0x02a0117a, 0xb147d1bd, 0xefddcdf5, 0x643659c6, 0x9269d1fe, 0x75cbe975, 0xa5c6b0b8, 0x3217a488, 0x427b00ab, 0x2c722f10, 0xcb41a86b, 0xeeea8e33, 0xe2da56e4, 0xcb3cd04d, 0x426e8b0e, 0xd1f1313e, 0x7d819534, 0xe36bc154, 0x20df1ed5, 0x185506ab, 0x0ee68201, 0x94cde377, 0xb6580762, 0x21e6fdd4, 0x29c298af, 0xdc767cb2, 0x9399aa2e, 0x66731f3b, 0x6758040b, 0x201d182b, 0xa1ccd2d4, 0x7f65a75e, 0xdba1cb59, 0xc99d86a4, 0xbe8fa6c4, 0x63b00a31, 0x0284cb92, 0xceedac4b, 0xde2a5464, 0x4eb0b620, 0xf0c8df99, 0xe1bc0349, 0x3a40449c, 0xec1c195c, 0xcfbc468a, 0xc0fdcf7f, 0x54f7a64f, 0x46b1ec0c, 0x150f403d, 0xbfd9cdfd, 0x8de55c3f, 0xa7c16275, 0xb6249827, 0x98f5651a, 0xf65879d3, 0x6754363f, 0xc3dc0cbd, 0x52c7cf64, 0xc7bc362a, 0x26d460ed, 0x7c486d29, 0xb45c2503, 0x41a32b07, 0x7868e90e, 0x9cbbfdd2, 0xb7d139ec, 0x8c887d1b, 0x7a093383, 0xe3f7db73, 0xdd6753b2, 0xf3bedf1b, 0x1ff37916, 0x9d1b5055, 0x75c578ae, 0xc042e8bd, 0x459d6f50, 0xe1fab515, 0xe29127df, 0xc59cdcd3, 0x5f5b3232, 0x814a7cba, 0xc3a08009, 0xfb7eb550, 0x1668365d, 0x51a79a39, 0x602afd8d, 0xfbbda80a, 0xf9d876db, 0xe3243435, 0xd09a88d2, 0x5758caa9, 0x4f5dab1c, 0xca400386, 0xfacda8bf, 0x2fd4be34, 0x86eea3bc, 0x21b9d7db, 0x70fe2723, 0xa1e3f21d, 0x2dc8a5fb, 0xfde4610e, 0x95e94b2e, 0x1490a425, 0x3f9c7a30, 0xfae138af, 0x02c5721b, 0x5ad36aba, 0x546b4c2e, 0x7cd440eb, 0x6e59f972, 0xb056e630, 0x956eda28, 0x893c3222, 0x808b1df5, 0xf0a819f1, 0x8665d811, 0xec3651bb, 0x1be40421, 0xda17c3c8, 0xd957cc7e, 0x1e65855b, 0xb04bdee2, 0x67ee35e5, 0x0df1ce25, 0x641d8626, 0x44e55185 }, // Message 1 - { 0xe8655d24, 0x3cf44779, 0x6f5ce997, 0x4c954812, 0xb1411bac, 0xe17e382c, 0x68d687bd, 0xba823aee, 0xe12b8177, 0x1b0e8fab, 0x7b916f70, 0x0fad9234, 0xfe19d26d, 0xe7575249, 0xc995e816, 0x3e850516, 0xf0b4473a, 0x9f69a144, 0xdaaf2e85, 0x1cccc787, 0xb783f951, 0xe158b74a, 0x9b976056, 0x27e9d0d1, 0xca44ac47, 0x0043596b, 0x1845e608, 0x098ee588, 0x8e18c478, 0x37eb9188, 0x322ce0f8, 0xdd41611f, 0x946279c7, 0x71a52276, 0xfbe94893, 0x4fad7943, 0x606beefd, 0x81a5fd96, 0xc1a6be10, 0xebf3051e, 0xcd1e78d8, 0x3f6dbd11, 0x37231c5f, 0xf0b23b49, 0x2c5c6015, 0x0fe8e839, 0x11cbf712, 0xb98f7946, 0xd0ce3c64, 0x170dc629, 0x94996fde, 0x2891d7ce, 0x6be3efc5, 0x2549495d, 0xacda425a, 0x66e1d128, 0xd73c8cad, 0x4db74cd4, 0xdaf15f2c, 0x40fb43d3, 0x766157e6, 0x6115b1a1, 0x22e9f53f, 0x2f9c972b, 0xd1e466d1, 0xf6863116, 0xf1e833f7, 0xc2c8dcbe, 0xc2738786, 0x02755ad1, 0xe5f67790, 0x91f3b20e, 0x357cfa4f, 0xcd047a74, 0x9e0b28b2, 0x1b35d095, 0xfcba8a07, 0x02055ea3, 0x5f3e5cf2, 0x32818583, 0x4d6636b7, 0x383047ab, 0x7962077c, 0x65ec9d0a, 0x6608a8ac, 0x15eee1e5, 0x79c70043, 0x170e2c88, 0x3bc736ec, 0xde0b15a0, 0x8e67330d, 0xffacad3a, 0xaa919daf, 0x382a076a, 0x90c17105, 0x384f7237, 0x62a858d0, 0x6163ee2d, 0xd32c4283, 0x59bdecc8, 0x493a1b07, 0x0874f351, 0x81ee60e5, 0x40e12352, 0x4de89d93, 0xe90fb2a0, 0x9e7c59a8, 0x6264ab2e, 0x60d143a2, 0xe631c19d, 0x0eb76c17, 0x645f9ebf, 0x9694cff1, 0xe2d018a3, 0x99995405, 0x8ef0fa59, 0xde1d39e5, 0xb7caea84, 0xb5d5660b, 0xba95cad0, 0x5f42d2bb, 0x4ddee6e8, 0x4cd15df9, 0xf3e3151c, 0xdb67fb81, 0x941f8511, 0xa1ec08c4, 0xa17234dc }, // Message 2 - { 0xf498231c, 0xb596c199, 0x3c8bad8e, 0x0e48af8f, 0x731238f9, 0x5e41b7d0, 0xa281050b, 0x26092ca2, 0x4367262c, 0x85028677, 0x960a314d, 0x1735947a, 0xe00e3416, 0x75b7e10c, 0x7afd0873, 0x16fef2f7, 0xf1897b3a, 0x441ecaf2, 0x858cb22a, 0x477169a3, 0x0d049be1, 0x1de513a6, 0x674fc416, 0x77c4f189, 0x392814b1, 0x6a056172, 0xf09ecf7a, 0xce35d5f6, 0x27d7cc5f, 0x895b91e5, 0xc20d4fa3, 0x311c8bfb, 0x2ea43c2a, 0x735cf539, 0x73714e22, 0xc3a9351a, 0x8452f3d8, 0xd6667669, 0x6041f5a1, 0x8244a39b, 0xa32c91ea, 0x84c4dbc5, 0xa53e7960, 0x336dd099, 0x46c93e7a, 0xd54cbcb7, 0xec16e4cf, 0x5b8ebe64, 0x143cbbb3, 0xc9c7ee1c, 0x8c09588b, 0xd4b65608, 0x72caa6f6, 0xb8d1245d, 0x595773f0, 0x2ded1b4f, 0xca914bd1, 0x07baacaa, 0x5e7f9e7e, 0x55d1b8e7, 0x64088134, 0x3643ba31, 0xd5e90640, 0xe668e6c1, 0x710b463c, 0x94b7b835, 0xe68a4814, 0x0e0350fb, 0x8446b5ec, 0x69689dd6, 0x9e6d4f6d, 0x91a9212e, 0x782e2e51, 0x62f9c3fa, 0x19e47497, 0x84449127, 0x973aefa6, 0x7b8bf7d9, 0x09bedaf7, 0x50ea4856, 0x7f1650f6, 0x51d320cd, 0x08347674, 0x98ecf70c, 0xe10c17d0, 0x667625b7, 0xb219fbe7, 0xaa110390, 0x43a5e2ba, 0x54345607, 0x0a163657, 0x6065ae1e, 0x8aea4e2b, 0x7b230f06, 0x3102b623, 0x96c07dc0, 0x6e67dbe9, 0x6bea832d, 0xe75be0d0, 0x6a20b6fe, 0xf2fcec99, 0x5a356966, 0xcec9ef85, 0xe2c99dde, 0x7acfb061, 0x686a6353, 0x32c99493, 0x123a2fc5, 0x1917ba58, 0xe923ce08, 0x5fd754c1, 0x14f9a61d, 0x7b9cf858, 0x4390012e, 0xb4edc187, 0xcb13565b, 0xff24db38, 0xa1aad96a, 0xeba0d921, 0x681799c0, 0xdb3d978f, 0xca4876db, 0xb7712235, 0xea3a5422, 0xfe06090f, 0xe8872e98, 0x7dc5c55f, 0x0506fee5 }, // Message 3 - { 0x093f43a2, 0xf4feaebb, 0xa4ff9bac, 0xa595ee13, 0xd9ea05de, 0x9f0f07d9, 0x2a388bc8, 0x5ccbceb8, 0x1d2f159d, 0x8b6b099b, 0x49079cf7, 0x15e1d719, 0xeb3b16d8, 0x991fa156, 0x77202852, 0x5a6aa09c, 0x6ece5167, 0x2dca9247, 0xf711676b, 0xe4e17a42, 0x637cd250, 0x72e37215, 0x8c71329b, 0xa8de914e, 0x7b992f7f, 0x87cecf0f, 0x56018c3c, 0x99fc23db, 0xbe8227b7, 0xe0c18d87, 0x0cadd6bb, 0xe4469f3e, 0xef5e3743, 0xd4a8f77a, 0x3dfad4e1, 0x3ee0c146, 0xad03950c, 0x67fb2c13, 0x4294b8a3, 0xb47b6aca, 0x8b64024e, 0x118155df, 0x45a3af51, 0xabcb4ea3, 0x40aff48e, 0x5d01b4da, 0xfc4efc96, 0xcc177b93, 0x4760f26d, 0x22bf3212, 0xf7fe1d7f, 0x3e9aed77, 0x20b3990d, 0x62db3a2c, 0x7add6bae, 0x2410862b, 0x6010fb01, 0x1b652e93, 0xbd425b6c, 0x04eb6be3, 0x378374c6, 0x42848bcf, 0x4e800ed8, 0x326e00b6, 0xadee6835, 0xe9bb4acf, 0xc1c29674, 0xabf3946f, 0xe671f16e, 0x37acd6e4, 0x4b81e5ab, 0x95d7678c, 0x825c467a, 0xca910b11, 0x014bc7f9, 0x0a46052d, 0x37477f28, 0x50ee7bab, 0x2ef0f801, 0x8bfa75ec, 0xf90b5638, 0xf99d8820, 0xb6d31e8b, 0x282fc07d, 0xc0ef8fb9, 0x6f1ecbfe, 0x46b81c35, 0x1bd261c4, 0xb8a9d6ad, 0x07faf944, 0xa8355992, 0xfd80d186, 0xa862af41, 0x33693558, 0x2c3f0101, 0xbd6c8dfa, 0x8b52a97f, 0xe6e3ccec, 0x9b2a8bf7, 0x5303dcd8, 0xa34dc51c, 0x4afdeeee, 0x1a215b9c, 0x1ea10f26, 0xfb336df6, 0x193d82be, 0x14527d5e, 0xc1b00c26, 0xdf2bbf11, 0x590bb058, 0x4bc72430, 0x6a63b278, 0xd0af7750, 0xbdc79dfd, 0xa2b769aa, 0x5abb8414, 0xf8c2a483, 0x4753ed6a, 0x42ecad25, 0xf3a26ffc, 0xbbd34144, 0xa9943ac4, 0x5c28f188, 0x48f93813, 0x7e3ee3cc, 0xac3867be, 0x418f64a6, 0x9ce60ad1 }, // Message 4 - { 0x006ec7a4, 0x6b436c1c, 0xcd88b3d9, 0x49fa2429, 0x57b856f0, 0x49e5224d, 0xe2500640, 0x626c742d, 0x50636081, 0xadb9da73, 0x0daf0c4b, 0xde46f82d, 0x2524776a, 0xd1d68688, 0x753efcd4, 0xb1a46b8e, 0x8ed5a073, 0xd565372b, 0xfbc9be0d, 0x061e71a3, 0x7d92e217, 0x429fa130, 0x11cb8fb6, 0x759fb7eb, 0x00af28a1, 0x95e6ea71, 0x70b01242, 0x74584e47, 0x77813ba1, 0x94916792, 0x66330a6e, 0xaff823bc, 0x983a26b1, 0x2644d903, 0x713bc925, 0xc53bc83c, 0x41030037, 0x034fa6c1, 0x458aaaeb, 0xe60ae620, 0x7200aa21, 0xb911d1dc, 0xcb8a2002, 0x1f45e425, 0x8ebd5383, 0x0696acea, 0xbb6ad80f, 0x5d2d97d5, 0xae465356, 0xa94a348f, 0x18a69075, 0xfefd4d04, 0x93d6a5a4, 0xb0732ac6, 0xe793abd6, 0x3296dd34, 0x423e8d92, 0x400396a5, 0x9bf1fdcd, 0x6979f56a, 0xcc1b8a98, 0x50e89001, 0x892a2442, 0xf63da520, 0x445544da, 0xe5e46e6b, 0x025de7bf, 0x6da7a068, 0xf330e75d, 0xa42dbb46, 0x1b10a594, 0xe40adaf7, 0x601ad459, 0x2f924364, 0x284c1cf8, 0x1788a504, 0x92969bdf, 0x0d3cac69, 0xfe5cba21, 0xb446e5fa, 0x4ec5061c, 0x48f5f465, 0xc9b1c4c8, 0x0e761a8d, 0x923f99bb, 0x74d29ad4, 0xc0dc01dc, 0xd0249d36, 0xd0173662, 0x1790e2dc, 0xfaa95adb, 0x5f070749, 0x5382fa53, 0x2dc8d9ea, 0x63ced49a, 0x9e05ea49, 0x37b3e6bb, 0xa40285ca, 0x3a95cf89, 0xcad5417b, 0xda4fd307, 0xdb3dc567, 0x4067b4e8, 0x2368f369, 0x3931e8f8, 0x73de690d, 0x69bd79c8, 0x977b34e5, 0x0a7bef10, 0x07c8539c, 0xebfa37ca, 0xfd880453, 0x2b632c0b, 0x7462c433, 0x6f3d6d51, 0x7d47f508, 0x8adaefc9, 0x72527319, 0x83bd7c62, 0xbad87380, 0xad75ae09, 0x77214b06, 0x998b6114, 0x1b09cbcf, 0xafe16db5, 0x662962eb, 0xe058c0e9, 0xbe2ab5a2 }, // Message 5 - { 0xb8ad1ce7, 0x2422434e, 0x002e5c8e, 0xb04efab6, 0x4be20e9d, 0x82b40f52, 0x5e43ad2c, 0x7ea4098d, 0x1ac89521, 0x8b2f7897, 0x731917c3, 0xf42c8546, 0xd15059a5, 0xada739b5, 0x2feee210, 0x54449bba, 0x4066c2eb, 0xd67d8c46, 0xf7f8945c, 0x42d296b6, 0x767a7d68, 0x74255858, 0x6d928587, 0x91b2ba12, 0x5bda731c, 0xfda3f6e8, 0x523b42de, 0xdf470728, 0x7dc3f631, 0x7c6b8bdd, 0xe020926b, 0x50e68ce8, 0x4b551b98, 0x8fac6588, 0xb4aa4b1a, 0xd6c0319f, 0xf13be7b6, 0xd50d4992, 0xd8149671, 0x70460538, 0xf87326cd, 0x4b7d94fc, 0x638bf2a2, 0x923ac827, 0x67b4ce0e, 0x264964fb, 0x3ee13282, 0x3daf8aa7, 0x6a19dc6c, 0xe09bec37, 0x60416938, 0x6e52a0e1, 0x40ccfc24, 0x3357ef24, 0xe28a22c6, 0x556ea264, 0xcd7aa476, 0x50134123, 0xae2770e4, 0x401e7513, 0x9c438bb0, 0xe2dae578, 0x13511b19, 0xfaa22929, 0x95a5308b, 0xaf4a79a8, 0x1f4f037b, 0xde130499, 0x7487df23, 0x30e56c54, 0x59a0e290, 0x3f5f4664, 0x7b66a36c, 0x1af4a553, 0xec8ede85, 0xaab9fd2b, 0xc3067946, 0x29ad1746, 0x2791e8fa, 0xb0fa4fc3, 0xc4942417, 0x1b160fc4, 0xef2704ce, 0xf2d3991d, 0xbdbffa36, 0xbcdad4ce, 0x64ebdfef, 0x420e3bce, 0xa92cf445, 0x716c64d3, 0x82d8e99b, 0xa20ab921, 0xa636e9eb, 0x36f5a6b3, 0xd6f3f15e, 0xbd9ccb73, 0x8b41b4cc, 0xa928de4d, 0x1f7bd428, 0xc32a116d, 0xa8bdf7bd, 0x12fa968d, 0x6839e646, 0x73d62e0b, 0x6d44d1ce, 0xa17b59c2, 0x62a03b4d, 0xee384e0f, 0x2367bf6b, 0x8f298fd1, 0x093da705, 0xb8d6014b, 0x24e06646, 0xde5c9b52, 0xd6dda865, 0xaafa8bb0, 0x73a01671, 0x0879ada1, 0xd47e73ba, 0x5e576002, 0x81ad2b85, 0x235252f4, 0xba7c0508, 0x80458f5c, 0x81f60a70, 0x85cc67a2, 0xdab85092, 0x74fad90a }, // Message 6 - { 0x6ef02f44, 0x90f2847f, 0xe1ea6cfc, 0x9d8eace4, 0x4e0b6a2a, 0x29ecd2bf, 0x0be1a6b9, 0x5f4bf1d3, 0xb8fd6892, 0x2ed469f9, 0x887c1b29, 0x2a2415f2, 0xffd7de3d, 0x3ce8cf41, 0xcaf7d174, 0xe07e8adf, 0xb8e316c0, 0x0fe7615b, 0x89c6e542, 0xd3f6b53b, 0x9dbeffe1, 0x88020c5a, 0x81719094, 0xec159883, 0x1ff56a85, 0xde85edc6, 0x17363063, 0xf26a30a7, 0xb32a7d8d, 0xbb059911, 0x7ef3f0b5, 0xd8bd011f, 0x70644486, 0xab26bad5, 0x30e05839, 0xd2622fa1, 0xfb532423, 0xed71dc7e, 0x023a4fd9, 0x521d6d1f, 0xddfe5e28, 0xe86e05dc, 0xc594715d, 0xb3514174, 0xa57f951c, 0x6e376f0c, 0x26797930, 0x2d85df4d, 0x838bd85d, 0x3d21fdb3, 0x60e690fa, 0xa5a9f380, 0xa2308e97, 0x8004f7b7, 0xf275bee9, 0x44a89ca5, 0x60465d28, 0xb5052c5b, 0x4207b6de, 0x27225e75, 0x701f138e, 0xaf988be8, 0x49c64860, 0xb986eeb9, 0xa7c541cb, 0xd407e21f, 0xffd6f0ec, 0x085e1ee4, 0x8ad02786, 0x6a0ae1d6, 0xad6108dd, 0x9b59b6af, 0x23645880, 0x7120371d, 0x8b74d7eb, 0xfca886b2, 0x3397f01c, 0x81bfb9d8, 0x2bac2c6d, 0x70827970, 0x4e1909eb, 0x5467c681, 0x60ac5277, 0x63ebc057, 0x27867d95, 0x369af5a3, 0x7ba39f37, 0x142ecea5, 0x210d31fb, 0x764f7dfe, 0xcc400756, 0xaefefbf7, 0x98034d5d, 0xa2b4ec45, 0x476b1aa2, 0xdaf9ed72, 0x0e82f193, 0x6328cf44, 0x16cdea45, 0xc1b7f2df, 0x60f6387f, 0x5a04ed03, 0xd1c310ef, 0x605ced1c, 0xbee5f10a, 0xce7bd1d8, 0x02edc7ab, 0xb9eea0d2, 0x026a75aa, 0x40606771, 0xe2e86d43, 0xd734b7b6, 0x9fbe7ea7, 0xb90b5bea, 0x1416c657, 0x05c66239, 0x88a7df2e, 0x69dfc5ea, 0xd746669d, 0x45e327b7, 0xb51a095d, 0xe1c3e974, 0x424b415b, 0x870377cf, 0x2e33faf5, 0x90486a3e, 0xf17dfb9e, 0x93c26889 }, // Message 7 - { 0x8a68b729, 0x026a3969, 0xd578c7f5, 0x6373922e, 0xed8c7c9b, 0xd2d6b1f9, 0x81b0783a, 0x7c0ad2ff, 0xf09ba017, 0x14a711e4, 0x5653cc61, 0x861b9620, 0x3a378e0f, 0xed2e762f, 0x9c7ff5f1, 0x9f695be6, 0x81912e63, 0x0213a187, 0x228f1c6a, 0xaa93e0f2, 0x2b7fa58e, 0x797e7581, 0xba18076e, 0xc399b9be, 0xda0ed74e, 0x45ca3985, 0xd8794f04, 0x169359e2, 0x06375fde, 0x688304a7, 0x060e2be8, 0xc44c24d0, 0x7ffa36cb, 0xaf9a9fe4, 0x610ea78d, 0xf1d3bb9c, 0x76bbb4d5, 0xab8695ed, 0x0002f61d, 0x82adf07c, 0x3a1d8f8c, 0xe9fdada3, 0xad061847, 0xa8c50e99, 0x6534f8de, 0xd15832e2, 0x7b612734, 0x0e6f3262, 0x45ada93f, 0x5e818644, 0x193aa36d, 0x0447072c, 0xd43b8f1a, 0xfd0a4c9d, 0x5e8a0b45, 0x69698ea5, 0xe1fa65da, 0xdc85f4bf, 0x13db7e62, 0x29f7bff1, 0x3a9ac10b, 0xe13f8f37, 0x10fc1e75, 0xc9fa9a85, 0x37f8a27d, 0x09d7bed4, 0x9f6afe59, 0xcf7cde23, 0x726acc86, 0xe39ea1d9, 0x37c04b7b, 0x687d54ad, 0x1f7b0108, 0x6f0bafc1, 0x76c265c8, 0x349749bc, 0xd9c6bf2e, 0x6928ac83, 0x99d23dfa, 0x39bf238e, 0x24ddfc92, 0xc09110c0, 0x356acd40, 0x02fc0d80, 0x44866f39, 0xb28e3688, 0xdf7d8322, 0xf81a3e89, 0xc4669e99, 0xbc9a122e, 0x267a6775, 0xc989c0de, 0xafe1b702, 0xd1c66122, 0xbd73efaf, 0x67a75f0d, 0xf1cf31d2, 0x3f9a40ec, 0x8e7aebc6, 0x23e8f608, 0xa8181f2f, 0xc2115be2, 0x587b5804, 0xe8d011d7, 0xf5c1ced7, 0xb61fd3ae, 0xa77d72cc, 0xe64984a4, 0xe1d042b8, 0x831a3078, 0x5108924f, 0x81051916, 0x957ddb26, 0xa1885509, 0x5ed27bc9, 0xebfd14b0, 0x833d0226, 0xc6fea3fd, 0x80f008c8, 0x9accfd12, 0xb50eda4b, 0xc07c0fc7, 0x069d0e67, 0xdb854278, 0x755bbb3a, 0xacca6539, 0x0d5f6cd7, 0xafeb0b9d }, // Message 8 - { 0x2ea4f637, 0xe45c1cbd, 0x43ced540, 0xd4746821, 0xc385436c, 0xbd0d44e5, 0x8bcdb071, 0xe0835959, 0xbeccae1a, 0xb0ea178e, 0x5dd5e007, 0xc7f562ca, 0x349f3403, 0xfbaf7899, 0xf982648a, 0x09e6cd77, 0x09c49969, 0x31c9205f, 0x3faba5bb, 0x34247ec6, 0x0221697c, 0xd1bf1146, 0x7483466c, 0x58c97486, 0x35d1122d, 0xb4a7fd92, 0xb640e5ec, 0x8fc6cad2, 0x190deeb1, 0x610965cd, 0x0c44de9a, 0x46fa02cf, 0x68822f88, 0x6b72419d, 0xe01ac941, 0x3235f83a, 0x2e51f76b, 0x1d6e02aa, 0xc1874f7f, 0x78c64f41, 0xb18848ea, 0x8160ce86, 0xa10d385e, 0xfd056a9a, 0xaee90273, 0x45fc9472, 0x56313971, 0x199feabb, 0x152fed05, 0x91bd0ff5, 0x4b7ea26c, 0x135d97ba, 0x73a654c5, 0x67cdbdf1, 0x47c97458, 0x42a5d49b, 0x7283721a, 0x09046fbd, 0xa89e6c6e, 0x2c2db237, 0x7131b5b9, 0x8b4f5c7b, 0x59d30988, 0x30c57e4b, 0xaa3ccf45, 0x3a529b7c, 0x0c86c06d, 0x45010094, 0xdb8195b2, 0x709799c4, 0xb12bad7f, 0xb5034a0c, 0x75c86e27, 0x5857fdea, 0x65c65a87, 0x35379c05, 0x1bd8fcc2, 0x0c59dc01, 0x5e526342, 0xf32dcab9, 0x7dce0ef4, 0x4de8d2bf, 0xec720510, 0x3a77b1a9, 0xb59012f4, 0x82da2181, 0x3db38cc9, 0xedeb50f1, 0xf1084b14, 0xe97066c3, 0x59c6a72b, 0x8fc0b407, 0xd354671e, 0x334cb14e, 0x4eb44832, 0xb313d279, 0x59681b52, 0x261ecb17, 0x294c6cc4, 0x0e732870, 0x51c30bae, 0x64879f27, 0x17159b88, 0x6a4fe96a, 0xf1d34a95, 0x334ee983, 0xce9020aa, 0x8c8e9fdc, 0xe2d13a4d, 0xa6a8a7d4, 0x128e24b5, 0x7d462d5e, 0xcb549308, 0x5a6b8387, 0x08f66cbb, 0xfe4c3033, 0x2b322d80, 0x01083438, 0x80eb4a33, 0x60079be4, 0x09b63391, 0x6fce76a8, 0x4c9f9847, 0x1b929f41, 0xcf288859, 0x7c98aef6, 0x152f7494, 0x935a0b32 }, // Message 9 - { 0x47dac6bd, 0xd9e3cffd, 0x42f02d93, 0x0422522d, 0x56e8d2fe, 0x84f74937, 0xd1547e9e, 0x954ff74f, 0xcc81da04, 0x8233b92c, 0xf1bf11b1, 0x9536268e, 0x4248a0e4, 0x3a73c38c, 0x566a23bd, 0x442c2d5d, 0xf1fc5043, 0xf0767982, 0x935d6a9c, 0xa5340e20, 0x34444f72, 0xf58f7de1, 0xf01cd0d5, 0x2f616b48, 0xe3da3bd0, 0x45585073, 0x6c051a90, 0x79d66b6f, 0x83d06e1f, 0x786316df, 0xbb9e345c, 0x0b3581ac, 0x0029e47d, 0xd7093a97, 0xaabb92de, 0x3ee942fa, 0x6d4f2034, 0x29ac599b, 0xf5da090d, 0x6014f0fc, 0xbfc30034, 0xddcbe0d1, 0x7615b11f, 0x9a535f52, 0x2237e600, 0xf23b5a2d, 0x811405df, 0xc962e4b1, 0x64fd1ecd, 0x639e1e54, 0xdbce2917, 0xba3fc5e9, 0x4b204d48, 0x3213cbad, 0x12e93c47, 0x358f9623, 0x68b1a2e1, 0x0b1d0312, 0x9d56ce6e, 0xb78d6713, 0xa2e50f00, 0xce26b76c, 0x32aa021f, 0x97cba5ba, 0x71e8e671, 0x8b202722, 0x739ee32e, 0xdd6fba73, 0xbbabcda7, 0x724c0ef2, 0xeeeb061a, 0xf76f0af6, 0x06beb624, 0xce5d85df, 0x9b5cc7fa, 0xe8dffce6, 0xbe7caba4, 0xbca5e8c7, 0xf3eb7747, 0xd711b5db, 0xbbc1a52a, 0xcc007d76, 0x42f5871d, 0x5179d613, 0x45680df4, 0xbd1222d7, 0x0fee6947, 0x766e322d, 0xd8308036, 0x23697905, 0x2b1f21cf, 0x9411dda9, 0x7cbda1ea, 0xfa3cc4e5, 0xeb46fa2c, 0x2cc3696c, 0xe43fa80a, 0xf2273467, 0xef277111, 0x65c7ada2, 0xdf598dce, 0xa913632f, 0x927f36b7, 0xcbeb0304, 0x660b5f58, 0xf1e41df3, 0xfa836f55, 0x002f594e, 0x4ad64d96, 0xac9d4350, 0xda3a268c, 0x9904ca9c, 0x2ae5d591, 0x81fe5fa5, 0x05484993, 0xab009e04, 0x5c5be551, 0x9fef0958, 0xc83f41c5, 0x8e174480, 0xa6ba244f, 0xf32dd56c, 0x3769432a, 0x54f79959, 0x9797d41b, 0x749445bd, 0x5c5eaf4c, 0x8f2737c2 }, }, - }, - { /* Case 5 */ - .iv = { 0xdf, 0xb2, 0x78, 0x21, 0xb1, 0x68, 0x58, 0x7c, 0x12, 0xfb, 0xff, 0x62, 0x6e, 0x20, 0x24, 0x69 }, - .p_data = { - .Y = { 0xd5794891, 0xb68b5e18, 0xebec99a1, 0xbf0eaffa, 0x82fb145b, 0x53b67e97, 0xca2af164, 0xf6fc0fdd, 0x89775af0, 0x5ca53026, 0xc83532bf, 0xf6d537c8, 0x2521a241, 0x690dc307, 0x096527d4, 0x11cff318, 0x3aaef396, 0x9b72167a, 0x7b09bb8d, 0x222c63a8, 0xfcfa604f, 0x37b8f945, 0x01e26530, 0x82a5f636, 0x40091709, 0x93a71631, 0x1d734f5f, 0x6e8d63f6, 0x0f2ea5e6, 0x6147002a, 0x98c68b4c, 0xdf41652d, 0x2e0f9ef8, 0xcd9dd301, 0xc4557b4b, 0xa65f4974, 0x3b372bb6, 0x6ebbcaa9, 0x76d03a88, 0xbebd9567, 0x4906a66e, 0x46048851, 0xa2d3a9ca, 0xd0d21252, 0xf160a68e, 0xb04033c3, 0xff5f604e, 0x8cb75bb7, 0x792c56f4, 0x7417bb62, 0x98970766, 0x77c98ccc, 0x67c90d67, 0xd8748fc5, 0xb5d4775f, 0x99fe9fa7, 0xc831c7e4, 0x044285b4, 0x8c408842, 0xc1c633e1, 0x510c923c, 0x109507bd, 0x56a9a538, 0x04f1ea20, 0x8874b19a, 0xd8c74347, 0x1ae1f91e, 0x10549f2b, 0x042cfa07, 0x03e97592, 0xf8f71fdd, 0x65c551d5, 0x30db14c7, 0x6ee9b500, 0x5fc41c94, 0x6f0c8b10, 0x085e28c6, 0x1e4761e6, 0x124f872a, 0x903e1ee4, 0x0f18d538, 0xfe63be2d, 0x68bcafb3, 0xb0d6d58d, 0x4a87c27f, 0xf2a9e73d, 0x6e90b824, 0x925a2cf4, 0x5946dfd7, 0x163f7cfc, 0x28b8310a, 0x20ff871a, 0x407d16a4, 0x131f2320, 0xabeab811, 0x4ce5a78c }, - .M = { 0x091526ab, 0xe66c20e6, 0xa407eec4, 0xa4b83d5b, 0x41b9798b, 0x8cca59c7, 0xde5efafc, 0xda2d2d63, 0x67ef0c73, 0x22bf5326, 0x4ffc07de, 0xa5c7fcee, 0x09bc0ca4, 0x626c1380, 0xd1d11c62, 0xfc36c50b, 0x21171467, 0x5cd50acb, 0x7d50e0a7, 0xe044be0a, 0x68b496f0, 0x6be2fde9, 0x1c78c1db, 0x9350c66a, 0x8622aeb6, 0xc5b1d6bf, 0xc561fa88, 0xf8353cfd, 0x75111f90, 0xddf02468, 0x6809fc90, 0x7307eb2a, 0x15869909, 0x6f15772c, 0xe99abc75, 0x73038a7f, 0xe5080ef9, 0x4aa3fb7d, 0xb0376031, 0xe45d8c87, 0xd34419b0, 0xd244e981, 0xc0b10c57, 0x9da7aa2b, 0x22987887, 0x0d4d6c56, 0x69bd5495, 0xba8b5a8e, 0x703dcfa1, 0x69fb3135, 0xc178a9c7, 0x68e6cf8a, 0x67f79a7f, 0x3a117b80, 0x0f66a427, 0x67482015, 0x9e2060e1, 0x4cae4f11, 0x6620ae87, 0x5967e7c0, 0xc0031bc5, 0x605ac11d, 0x0f661d68, 0x155d1eeb, 0xf8b6b812, 0xdb556d2a, 0x56944549, 0x62530a6c, 0x49c877a6, 0xd9e2e1e9, 0x58100f11, 0x9a0502ed, 0xf19074fc, 0xa91fd513, 0x774284fe, 0xec788699, 0x4f03a6b4, 0x708c2ef8, 0xea39caa3, 0x9862effb, 0x62071c53, 0xc2ec8254, 0xf56a3286, 0x6087a3c1, 0x51fd789d, 0xae7fedfa, 0x0fa2ac93, 0x65d8be1c, 0x9bbe3b82, 0x2cb2d8dd, 0x4558f759, 0x533ec2b0, 0xfeb0e75f, 0x89a222b7, 0xd42fcef3, 0xd2146e1c }, - .Rb = { 0x3a6e0569, 0x53ec2cce, 0x2bd39843, 0x98254283, 0x05e3668e, 0x9c5a1b2a, 0x60901117, 0x07679a5e, 0x5a6eaca8, 0xc3b567b4, 0xbbd49487, 0x514e0303, 0xcc9f1968, 0x67c50804, 0x17c27d5e, 0x3248e594, 0xc4c1b388, 0xaf52507f, 0x4944a08b, 0x6ad65fbb, 0x3997f29d, 0xb12e8e96, 0x03f70c1f, 0xed308182, 0x8fd40dd5, 0x7ecea683, 0x58ccf705, 0xea36830a, 0x91db6f0e, 0x523e5651, 0xe3da6a6c, 0xf88ce3da, 0x38dd4fa6, 0x9d19a220, 0x33ef16b9, 0x22bb1cf8, 0x7e5d6853, 0x8981be47, 0x30122101, 0xc17a23b9, 0xbe0c6e00, 0x3aa26e03, 0x7df423b8, 0x2c27ba91, 0xdb7697da, 0x0bb868cd, 0xcc4f7d61, 0x8c9eea14, 0xeeacfe04, 0xfaf41d9e, 0x2e1e1375, 0x8cc69ce5, 0xe05d228a, 0x9dd5fedc, 0x2ab39a8d, 0xf2b283c7, 0x5ccf2559, 0x46fd2024, 0x67eecb62, 0x7ba5077d, 0xebaffd8b, 0xc9ea5892, 0xc13b3f6c, 0x1c1dc815, 0x49e19057, 0x2d5e70d4, 0x7d106a9e, 0xee4d6a21, 0xb1ed4e48, 0xb9d24508, 0xc8225da0, 0xd08f1472, 0x25f576bc, 0x80412ddc, 0x02669c45, 0x21e626e8, 0x2c438963, 0xf36cda28, 0xad9eec09, 0xd11eaf93, 0x2595e7c2, 0x23a2650b, 0xbdd6c840, 0xeb8b0f01, 0x7b14d4cb, 0xc841f7b5, 0x52f14bbf, 0xd5c9c34b, 0x258a15c4, 0xa9aaaccd, 0xab7dfc58, 0x45cd8518, 0x85155c51, 0x54d72cd7, 0xa481ff52, 0x245bee5c }, - .M_prime = 0x2c0e5bfd, - .length = 95, // 3072 bit - }, - .expected_c = { 0x04, 0x79, 0xb3, 0xfb, 0x4b, 0x3d, 0x54, 0x06, 0xbe, 0xb6, 0x89, 0xfa, 0x63, 0x35, 0xa8, 0x8c, 0x65, 0xca, 0x4b, 0x3a, 0xfe, 0xc2, 0xea, 0x2d, 0x2c, 0x0d, 0x7d, 0x09, 0x7a, 0xff, 0xe4, 0x7e, 0x9c, 0xaf, 0x9e, 0x77, 0xd3, 0xf4, 0x5c, 0x73, 0xe9, 0xc5, 0x24, 0x93, 0x38, 0x17, 0xe6, 0xfd, 0x4e, 0x30, 0xc3, 0xf7, 0x25, 0xbe, 0x03, 0xeb, 0x4e, 0xa9, 0x6a, 0x9c, 0xb6, 0x09, 0x7d, 0xad, 0x79, 0xb0, 0x52, 0x73, 0x4e, 0xcb, 0xaa, 0x22, 0x01, 0x1a, 0xab, 0x5e, 0xa7, 0x96, 0x07, 0x67, 0xcb, 0xa1, 0xf4, 0x29, 0x8d, 0xbb, 0xe4, 0x0e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, 0xcf, 0x14, 0x8a, 0xcc, 0xb7, 0x60, 0xb2, 0xfd, 0x04, 0x86, 0x2a, 0xa0, 0xe4, 0xc1, 0x33, 0x8a, 0xc7, 0xba, 0x6e, 0x65, 0x64, 0x68, 0x5c, 0xe6, 0x6a, 0x5d }, - .hmac_key_idx = DS_KEY_BLOCK_1, - // results of message array encrypted with these keys - .expected_results = { - // Message 0 - { 0x64c24e70, 0x03f4e5f7, 0xbdd3c270, 0x6987c775, 0x623bff9e, 0xa52ddc27, 0x55140d81, 0x3f830f6c, 0xde186954, 0x73900908, 0x6ebc1990, 0x753704e8, 0xc810ac35, 0x345dddcb, 0xc41c937f, 0x0c8eeee3, 0x74f3a128, 0x67473afa, 0x6667bbf2, 0xa3851d69, 0x2d6b5145, 0x4cf9d237, 0x181a8ff1, 0xa4e1c506, 0xb684684e, 0x1df012c5, 0x4546c158, 0xa87c6d87, 0x0d1e0f48, 0x01075128, 0x11b8baac, 0xfb51bd01, 0xdd079533, 0x4eb8c402, 0x33d649d0, 0xcdff3e1c, 0x23bef697, 0x1e181aef, 0x6c31d342, 0xd167abbb, 0x6128f652, 0x2ba7bed4, 0x3ef2fe5f, 0xead2f540, 0x122fcae9, 0xadcbf50c, 0x7edb76be, 0x16d92d27, 0xe15c225c, 0xcbf3dd52, 0xcf49716e, 0xeea16bb2, 0x8a82d04e, 0x7a63abd0, 0x1c010703, 0xaab6a261, 0x385cc6f3, 0x92f69b5b, 0x05e71345, 0x0569b623, 0x2684aa87, 0xeac5b3db, 0x8420d980, 0xa4cf7037, 0x8c7e999a, 0xf58e5cc2, 0xe250b65d, 0xb16a3c0f, 0x9969c3fa, 0xa0477cdd, 0x2400ffa5, 0xb74dbd79, 0xe5f33572, 0x655dd07c, 0xa5706dc1, 0xc96b9590, 0x0cf03658, 0x56c4f1c3, 0xcd0c5e74, 0x77f736d2, 0x69d18612, 0xca23b547, 0x7166ae08, 0x5494e6e0, 0x5154fc4f, 0xac6e3fbc, 0x0cf2e065, 0x9f1d081d, 0x230f6cf6, 0x487b74e1, 0xf52e5254, 0xf0ecdc99, 0x5320f081, 0x9c861a51, 0xc29c4302, 0xc8accc54 }, // Message 1 - { 0x831ac52b, 0x5f4806ad, 0xbc5f3fa7, 0xd26c151e, 0xc8870389, 0xf89ba084, 0x51243a73, 0x1ae04b55, 0xed43ccdb, 0x17a34d55, 0xb8d9d8eb, 0xba716829, 0xc51979a3, 0x440ac411, 0xbd54ee17, 0x205c811e, 0xcf31fa28, 0x26b912aa, 0x7611532d, 0x8832fd6d, 0x3a3980bd, 0xb84d0c19, 0xbd6a503c, 0x44558981, 0xe1e7aa64, 0x878fc357, 0xa6996ab7, 0x2d4615cd, 0x67aede4e, 0xcb6f77fa, 0xb6dd6323, 0x96d16b66, 0x41de13e4, 0xf0497ec8, 0xe9b622c3, 0xeb004a8d, 0x64a125a2, 0xbf309d9c, 0x5d0a298c, 0x33726396, 0x713914cf, 0x862602d7, 0x1c662821, 0xa604e69d, 0x16b77cd6, 0xaa83cb0f, 0xdb987f60, 0xaaff4ec8, 0x7a941629, 0xcd3a6f7d, 0x9a69302c, 0x465b2886, 0x7087686d, 0x98fde217, 0xd5964c1c, 0x95bd5d46, 0x6163c2ac, 0xbdfb9350, 0x11cd7f8c, 0xc798e6cd, 0x0ef5ea89, 0x2be92390, 0xc4831143, 0x61928747, 0xe23dd7ae, 0xfe87ae70, 0x5b645aac, 0x5bbb95d2, 0xf27fd00d, 0xc2dca04d, 0xa14fe33d, 0x287088a8, 0x3f60e052, 0xa2605635, 0xb51727ed, 0x868883dd, 0xb9d27411, 0x19b1c9bc, 0x446757e4, 0x78e5e348, 0x97da41e6, 0x9e799008, 0x70575a6c, 0x2f11ce5c, 0xe71bc323, 0xbf2ec758, 0x6c3aaa01, 0x7ddfa5f6, 0x59aaa01f, 0x7c5fac79, 0x27058b25, 0xe9e56e44, 0xb69fb209, 0xd752ba93, 0x81425877, 0x2c392ffe }, // Message 2 - { 0x7fa7b65f, 0x0f62aa8d, 0xf5103440, 0x77040239, 0x7fbacb28, 0x257056b7, 0xc45cfe66, 0x1f00f227, 0x8b932739, 0xcddfb5e1, 0x1daba0bb, 0x30021709, 0xfa5cf3e7, 0x07619442, 0x6308c66a, 0x3e518bdb, 0xc69faa93, 0x6c257ce2, 0xffe55054, 0x6ebac857, 0x3db1f438, 0xc4891802, 0xbf4dcd9a, 0x51f4d20b, 0x4d4af4b9, 0x3b689725, 0xba59bb9e, 0x35518898, 0x22738adf, 0x02ddcf6e, 0xa8971ee0, 0x18c28892, 0xad953b15, 0xc7467248, 0xafa8ade9, 0xc7d0996b, 0x2eab2209, 0x3fe14627, 0x078c914d, 0xec7aae74, 0x6c92279d, 0xc8c0d24f, 0x8a6f4fb6, 0xc58ee36d, 0x3b36d29a, 0x42bda927, 0xd27335ce, 0x7be8bf0a, 0x24674de3, 0x0bb233fb, 0x396a5a15, 0xfadac055, 0x5f2ddf35, 0xec9f7c40, 0xf1e79c1e, 0x478a57db, 0xeae25d2f, 0x9b6e59b5, 0x1998c689, 0x2b8a2bd0, 0xdc45e240, 0x70c6aacc, 0xaf8d272c, 0x62b6dc97, 0x121b31b4, 0x1df1cf7f, 0x5627432c, 0xac7095ac, 0x63649988, 0xdf5a6b80, 0x7cc6f26a, 0xf928d222, 0xde553e0c, 0xe79a0dcc, 0x62b52fce, 0x4f7668c1, 0x3b0b1871, 0x9a2ddf5b, 0x308bc241, 0xb731000e, 0x7e001a30, 0xa637004e, 0xbed18e29, 0x9f08b82a, 0x4713953e, 0xc785c82f, 0x7ff61900, 0x155d4627, 0xe1d9f6dc, 0x0d20928a, 0x35ce4ecd, 0x064a6b90, 0x30dd9e79, 0x62f7d800, 0x2ae9a6be, 0xb44aa4c2 }, // Message 3 - { 0x21455e3e, 0x25705524, 0x59490a68, 0xc4822a49, 0x8eea5881, 0x16996f95, 0x6dc1f6e3, 0x1a3869ac, 0x01f34509, 0x58709a31, 0xa09dd776, 0x9298b6e7, 0x8066195c, 0x262fe076, 0xfd5363ff, 0x163b7658, 0xa25bb253, 0x5ba8f842, 0x08fd4559, 0x491f12e3, 0x6b74028d, 0x9cd39858, 0x665f4457, 0x73b46f90, 0x3e077a77, 0x4bc537f0, 0xaf9144d8, 0x94df74bf, 0x4f158e93, 0x930d9a23, 0x40b94edf, 0x95352e7f, 0xb27548c0, 0x1f64e1dc, 0x4b2bbdc0, 0x1f7e56ad, 0xf42fc1e0, 0xf28bd40d, 0xfaf536e5, 0x633a86af, 0xa9b8b114, 0x8c7782c1, 0x0802c9b7, 0x9258e2b4, 0x27cc94ea, 0xd9fb10b5, 0x997c870f, 0xaae73078, 0xa56067d4, 0x4c77baf0, 0x471a1108, 0xaed379dd, 0x924405f2, 0xca74892f, 0x734fe88f, 0x5d140648, 0x2ccae3f7, 0x7c7a050a, 0x16d3cdf5, 0x5c5d3e21, 0xe58c7f66, 0xd147390f, 0x9218ad13, 0x0ce015a4, 0xb9baed51, 0xd9189b01, 0x34e7aa06, 0x49913b4a, 0x209fd3dd, 0xfa7efa53, 0x5e58ec0d, 0x789ed70b, 0xe3d234b3, 0xee786b8d, 0x5a1ad94e, 0x65c90ee4, 0x948dca7a, 0xc0d99437, 0xb8e50f04, 0xd7293909, 0x6cbc8188, 0xdc7b031b, 0x91b0d9d7, 0x354fd88e, 0x6a26b3c4, 0xc84e0ff0, 0xa752d269, 0x2940476e, 0x40760567, 0x797f43fb, 0x87e5b3a1, 0x6bc92f2b, 0xcf3e1d5c, 0x01a9fa5c, 0x74dc165e, 0x756b96c7 }, // Message 4 - { 0x75b94bcd, 0x4727321f, 0xc20f35e6, 0x2e24446e, 0x4518523d, 0x8c48b2dc, 0x96717d50, 0x821f1237, 0xbebbd2e8, 0x8fdad52d, 0xcbf66868, 0x717d052b, 0xc250a639, 0xc7324725, 0x9f5b81b0, 0x1eb023ca, 0xf74a9135, 0x1ffaf2c6, 0xfc239282, 0x5310170d, 0x88eeff37, 0x811a01f1, 0x0638b0f7, 0x2d9e0512, 0xe5651782, 0xa0b4d90f, 0x92bb6d8a, 0x29901b7b, 0x7e5ffe21, 0x8a2faf4b, 0xde6d9c1b, 0xc039f9db, 0x2fefa926, 0xd944448c, 0x0ef40b8f, 0x49e7ef54, 0x1aca067a, 0x31651dd1, 0x435e6f0a, 0x56418f85, 0x3132a6eb, 0x49071227, 0xaf64f72b, 0x5ddf9924, 0x7e5dc362, 0x08acbe35, 0xdd11cce3, 0xefbd9384, 0xe4145f92, 0xbfce1d13, 0x3b9272b7, 0x3475d474, 0xd1488f01, 0x1ee27762, 0x56ce6a8b, 0x52173cfe, 0xc8f01f5b, 0xb7e14351, 0x8c3d8913, 0xd0601b74, 0xb06a5c86, 0xb77e176d, 0x7f9055c1, 0x29d18cec, 0x78176f52, 0x4f63e07f, 0xc5dcef9b, 0x042a35cd, 0x78929548, 0x6ea48187, 0x895d4912, 0x6cefe216, 0x92fe5324, 0xea0eb66a, 0xa49bbf66, 0x25630b34, 0x91fc86a6, 0xe2a79600, 0x1b9fed8f, 0xe427eecc, 0xa3e57a0e, 0xa75a2f54, 0x78a78916, 0xe9d24fa4, 0xcd019448, 0x3c4c3be7, 0xbca05cba, 0xdcb5771d, 0x92d00fac, 0x24f36d77, 0x0b727526, 0x9ae0b9c5, 0xc1444216, 0x15dbe3c0, 0xd99cf784, 0x44b2fd73 }, // Message 5 - { 0x11f9bd96, 0xf7ea1e63, 0x150c8f6e, 0x44cc8a80, 0x42fed7e5, 0x0f61e30c, 0x033638ee, 0x16241c9a, 0x68d9e483, 0xf2ef13d1, 0x01ada294, 0xfc6ba49d, 0x5986b719, 0x31d9a8da, 0xcb96ac35, 0x46fd03de, 0x756a03cb, 0x56bede87, 0x3db9fa94, 0x3c3ea1e9, 0x426e8145, 0xf404e223, 0x7a3363b8, 0xd250034e, 0xa23b3113, 0x3fd58c62, 0xbefaffa4, 0xea33988f, 0xfd4d0faf, 0x3f34bb25, 0x5f7da7c7, 0x75335eae, 0x2d9d72be, 0x5cc321e8, 0x6c321f3e, 0x760a13d6, 0xc8065bc8, 0x1e286132, 0x711a05f6, 0x3bee7ea5, 0x7e74c8e7, 0xc8a3a954, 0x8d01a889, 0x7ced44c5, 0x5f3e3fd5, 0x39be9d5c, 0x6b0ecc90, 0x8776df48, 0xd2fdfe60, 0x1f7f04c8, 0xd4a2846a, 0xddbb74d9, 0x4d58d3eb, 0xe16757df, 0xad55dd71, 0x98c1496e, 0x8ffe3a6b, 0x283afc22, 0x49c8862a, 0x68996c1d, 0xdb520015, 0x2e969b5c, 0x2f5f740d, 0x12146eaf, 0xd0d2732d, 0xa8884b25, 0x4f220f85, 0xf135a28f, 0x049186fb, 0xb3666eb4, 0xc4ac6f00, 0xe3cc9915, 0x8109969c, 0xffe6b13c, 0xbba86af0, 0xe7851e32, 0x92859216, 0xb3b63ebd, 0xda770264, 0x16044416, 0x91ea85d0, 0xd59afc2a, 0xdbe40984, 0xf33227c2, 0x0c835eff, 0x030916c8, 0x030a7b89, 0xdb00bab8, 0x39a5eaa9, 0x2762b6c8, 0x97985604, 0x2739649a, 0x8a908a89, 0x96faa348, 0xe4106b3e, 0x19cb304f }, // Message 6 - { 0x95e204e0, 0x4c1d6b06, 0x22b54c81, 0xf93bf0f6, 0xd0e92737, 0x0a05c841, 0x101d5059, 0x5b2e8406, 0xac0e2652, 0x6682d406, 0x5347a137, 0xabf938ac, 0x18ec9576, 0x08613a1d, 0x12c7b359, 0x6ddf1968, 0x2d375bf2, 0x91db0b71, 0xd56613e9, 0x511e27dc, 0xb75afea5, 0x2a713567, 0x3fbc7c17, 0x1a06a794, 0xe9d3e146, 0xfab6aa85, 0x7d0130c8, 0x1a5edae4, 0x79f1a48e, 0xe4310003, 0xeef16617, 0xf74ed6bf, 0x35606830, 0x58d55432, 0xe987fe23, 0xe49d4b59, 0x24474156, 0x0544da62, 0x3d55350b, 0x91dd1909, 0x98817796, 0xbf97824f, 0xa33bc1ee, 0x12cc6861, 0xbf4f03b5, 0x8e26a2bc, 0x436c1adc, 0x2fbb42b1, 0x7735491e, 0xe061a448, 0xe72db823, 0x96cba6df, 0xd6c5f39a, 0x6ac73d93, 0x2220c46b, 0x6a91b642, 0x9e69693f, 0x3e8238bf, 0x443aaead, 0x207ba9cb, 0x337c15ea, 0x1b0bc624, 0x75b68671, 0x1b3d86f5, 0x7d1c8a3d, 0x53d3a5cb, 0x65b351db, 0x3121be26, 0x916c071b, 0xbffb13d5, 0xc6742bd3, 0x42b8d304, 0x8171987d, 0xe7c9bbed, 0x74aa982c, 0xe7f2997f, 0x61f72f0c, 0xa8f98719, 0xcc0276e3, 0x3559c7fe, 0x0850408f, 0x07730249, 0x478a5a56, 0x2059aeed, 0x7d2b4c4d, 0x0a33df12, 0x054a8aa5, 0x50d8a093, 0x6fb23fe2, 0xb7f4641e, 0x1c503388, 0xca0e245f, 0x2fd22529, 0xc2119e0e, 0x25fd6afd, 0x6de0e7f5 }, // Message 7 - { 0x48e6637f, 0x6804d74d, 0x0b779232, 0x7aa48561, 0x92efbae2, 0xb56d6b85, 0x18f8654c, 0x3d9901bc, 0x27bc4146, 0xd6ece0f2, 0x38b3463f, 0x00e8f46f, 0xaa76530b, 0x40ce9365, 0xe0ee68ee, 0x43e1ab45, 0xd00f6fc1, 0x5c1cb98d, 0x348bee22, 0xadfecab9, 0x62f54000, 0xd6c1eead, 0xf690c04d, 0xc04cdc70, 0xa937db09, 0x305342b4, 0xaf216410, 0xb8660b05, 0x94dffa5e, 0x3efaa489, 0xd6ce0101, 0x2aa00a5d, 0xe33137c7, 0xdf5dfbbd, 0x77cc49e3, 0x2a660869, 0x2f5f4dfe, 0x8b941c69, 0x2d2a5d0b, 0x986cfa7a, 0x70b119f7, 0xc2efedbd, 0x09b5329c, 0xd9809b8f, 0xc62c50f8, 0x4135e1c5, 0x26c14c00, 0x8ff2556e, 0x167eb63b, 0xe6ce0405, 0x98bf6772, 0x2c781030, 0xb89c94a1, 0x1f4ffd23, 0x75f42cff, 0xb2275a98, 0x88905856, 0xda3764e8, 0x7784da29, 0x083ac191, 0x98e6d5bc, 0x3ec067c9, 0x1f6688da, 0x40295ceb, 0xdb076f74, 0xd73ed31f, 0x1eced964, 0x5a00716b, 0xb7354831, 0xb4081b35, 0xd55f7374, 0x4f078453, 0xef208f40, 0xd1487976, 0x7027b268, 0x773dbfe7, 0x7d7b6c26, 0xa759838f, 0xf37bbc0a, 0xeea627e2, 0x7d4441c2, 0xfc882a4c, 0x26ab1884, 0x1ee7fb21, 0x901ccf77, 0x8745cd47, 0x590ea36b, 0xaf6765a3, 0xd6ca4d2c, 0xdf017cfc, 0x530aa4a4, 0x3c422af6, 0xdf8484a3, 0xf7ac6b75, 0xa9ed54aa, 0x12daf4c2 }, // Message 8 - { 0xa97a75a9, 0x1b42faf1, 0xce1399f5, 0x718a2ba1, 0x13415a2d, 0x9c43933a, 0x4c42743b, 0x467c6b83, 0x770cb2e6, 0x0047b22f, 0x6bfd5179, 0xc4080057, 0x122f0ac1, 0xe870bc9f, 0xa698c15a, 0xec98df98, 0x51be3e90, 0x9f90d7ab, 0x3a877a4e, 0x45af2bbc, 0xef28f5f7, 0xfce93fc8, 0xf18d6c53, 0xdd6577f5, 0x6e97e1da, 0x07d0949b, 0xcbc8326e, 0xf9e315a9, 0xc97c2f8a, 0xe76643ec, 0x63543d42, 0x0e01aeb1, 0xb9b51d58, 0x5783fbb9, 0x2a099aaf, 0xe141ea14, 0xc763b58e, 0x698e7a90, 0xf6ba62da, 0x13270a2f, 0xf2df8b30, 0xf788dc1b, 0xf50ea21e, 0xb2fbed7a, 0x56e95caa, 0x5f118c32, 0x54430ddf, 0x90c9f2e9, 0xc2475f91, 0xbabf8c6d, 0x17948b8c, 0x3d7a1438, 0x2ae8ba41, 0x496723f2, 0xa60718e4, 0xcc960e0d, 0xa4bdb10a, 0xde1adf3d, 0xbbd6c327, 0xf1398005, 0xb867c10d, 0x37f48fd6, 0xea795e19, 0x898bb52e, 0x4152897e, 0xbbf127dd, 0x2c335ef6, 0x8c0d4a76, 0x79090668, 0x7683f91c, 0xa8e58a83, 0xf001b762, 0xe1621309, 0xa562fa4c, 0xbfec7b42, 0xbf1b4a9d, 0x29207a95, 0x1d59987e, 0x7b428bef, 0x64cc46aa, 0xc79c99a5, 0x8a2a8bc9, 0x642a2b8f, 0x25a800ff, 0xeb00edf1, 0x9989c721, 0xaae4a05c, 0x454ec92f, 0xa2f72f0f, 0x5bcb9edd, 0x18cb73e4, 0x00a71263, 0x93f8c011, 0x6a96956b, 0x10ecb752, 0x205d5822 }, // Message 9 - { 0x3bfb11e4, 0xf6d6ebb3, 0x7ec5dcb8, 0x3840135d, 0x88388a13, 0x874bd2a5, 0xae525562, 0x354b7be8, 0x74ce87af, 0x51f350a5, 0x0793137d, 0x26aa0636, 0x8e10d76c, 0xd49d5e73, 0x4959f524, 0xb7555703, 0x99859035, 0x40c79673, 0x317fb940, 0x5cd8d72b, 0x1bf41d50, 0x61b31955, 0x62524def, 0x59f2c0dd, 0xdbe9d581, 0x6f4693bd, 0x187b99b0, 0x19f2409d, 0x5514e19d, 0x283e3fdc, 0xed3eb99a, 0x6b8426da, 0x18061fad, 0x897a3d73, 0x3052444c, 0x7072639e, 0xb00c252c, 0x22a7ad0e, 0x465c3c85, 0xe6ef64d7, 0xd52c1a8a, 0xb5b90f82, 0xe9faf74d, 0xc4f62e88, 0xe9c7b255, 0x095e8714, 0x87c0ea0b, 0x5fd386a6, 0xb61ff901, 0x7f874595, 0x347c8e6b, 0xa2c27bf1, 0x0ae4f4a2, 0xb0da37c4, 0xda204dfc, 0xad2bb768, 0xda456d50, 0x26ba84d2, 0x04605ef5, 0x585a5e1d, 0xe29c018e, 0x2e3cfc92, 0x193bc8e6, 0x4faf3ebb, 0xaabdef6a, 0x83322b12, 0xd86e4652, 0x83a72a63, 0xb4617f2d, 0x8753ebe4, 0xcadcf4ec, 0x70f32836, 0x4d1b40f5, 0x239ad371, 0x8218dc38, 0x20574ac8, 0xbf1699fa, 0xfe2771bd, 0x0cb48a07, 0x0151e1bf, 0xbcb58312, 0x9b4fb373, 0x026917d2, 0x22a4fad9, 0x384c6d19, 0x69e78c6d, 0xe59850f3, 0x837c9b3a, 0x76022e4a, 0x5418542d, 0xc912e299, 0x1525f115, 0xe068e14a, 0x5fc8d5f9, 0xba75c297, 0xce4163cf }, }, - }, -}; diff --git a/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake b/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake index 7324e97435..74b9e0c84a 100644 --- a/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake +++ b/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake @@ -1,6 +1,6 @@ idf_component_get_property(heap_dir heap COMPONENT_DIR) -set(priv_requires esp_hw_support hal soc) +set(priv_requires esp_hw_support hal soc esp_hal_security) set(include_dirs "${COMPONENT_DIR}/port/include" "${COMPONENT_DIR}/mbedtls/include" diff --git a/components/mbedtls/port/aes/dma/esp_aes_crypto_dma_impl.c b/components/mbedtls/port/aes/dma/esp_aes_crypto_dma_impl.c index 8878375231..2670267aca 100644 --- a/components/mbedtls/port/aes/dma/esp_aes_crypto_dma_impl.c +++ b/components/mbedtls/port/aes/dma/esp_aes_crypto_dma_impl.c @@ -17,7 +17,7 @@ esp_err_t esp_aes_dma_start(const crypto_dma_desc_t *input, const crypto_dma_des crypto_dma_ll_reset(); crypto_dma_ll_set_mode(CRYPTO_DMA_AES); - /* Set descriptors, input to AES comes from outlink DMA and viceversa */ + /* Set descriptors, input to AES comes from outlink DMA and vice-versa */ crypto_dma_ll_outlink_set((uint32_t)input); crypto_dma_ll_inlink_set((uint32_t)output); diff --git a/components/mbedtls/port/include/sha512_alt.h b/components/mbedtls/port/include/sha512_alt.h index d0de4623e9..51f6423494 100644 --- a/components/mbedtls/port/include/sha512_alt.h +++ b/components/mbedtls/port/include/sha512_alt.h @@ -73,7 +73,7 @@ typedef struct { } mbedtls_sha512_context; /** - * @brief Sets the specfic algorithm for SHA512 + * @brief Sets the specific algorithm for SHA512 * * @param ctx The mbedtls sha512 context * @@ -82,7 +82,7 @@ typedef struct { */ void esp_sha512_set_mode(mbedtls_sha512_context *ctx, esp_sha_type type); -/* For SHA512/t mode the intial hash value will depend on t */ +/* For SHA512/t mode the initial hash value will depend on t */ void esp_sha512_set_t( mbedtls_sha512_context *ctx, uint16_t t_val); diff --git a/components/mbedtls/port/sha/core/sha.c b/components/mbedtls/port/sha/core/sha.c index eb905d4bb5..2e63b155df 100644 --- a/components/mbedtls/port/sha/core/sha.c +++ b/components/mbedtls/port/sha/core/sha.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 * diff --git a/docs/en/security/flash-encryption.rst b/docs/en/security/flash-encryption.rst index d8615fac94..030bfef78b 100644 --- a/docs/en/security/flash-encryption.rst +++ b/docs/en/security/flash-encryption.rst @@ -1157,7 +1157,7 @@ The following sections provide some reference information about the operation of * - High - 18 % - .. [#] The above performance numbers have been calculated using the XTS-AES test of the HAL crypto test app :component_file:`test_xts_aes.c `. + .. [#] The above performance numbers have been calculated using the XTS-AES test of the HAL crypto test app :component_file:`test_xts_aes.c `. You can configure the strength of the pseudo rounds functions according to your use cases. For example, increasing the strength would provide higher security but would slow down the flash encryption/decryption operations. diff --git a/docs/zh_CN/security/flash-encryption.rst b/docs/zh_CN/security/flash-encryption.rst index 201405e3b5..14cafd3dd6 100644 --- a/docs/zh_CN/security/flash-encryption.rst +++ b/docs/zh_CN/security/flash-encryption.rst @@ -1157,7 +1157,7 @@ JTAG 调试 * - 高 - 18 % - .. [#] 上述性能数据由 HAL 加密测试应用中的 XTS-AES 测试程序 :component_file:`test_xts_aes.c ` 计算得出。 + .. [#] 上述性能数据由 HAL 加密测试应用中的 XTS-AES 测试程序 :component_file:`test_xts_aes.c ` 计算得出。 可以根据实际用例需求配置伪轮次功能的强度。例如,提高强度以提供更高的安全性,同时减慢 flash 加解密操作的速度。 diff --git a/tools/test_apps/system/g1_components/CMakeLists.txt b/tools/test_apps/system/g1_components/CMakeLists.txt index 6d5f4950a0..b064ec362f 100644 --- a/tools/test_apps/system/g1_components/CMakeLists.txt +++ b/tools/test_apps/system/g1_components/CMakeLists.txt @@ -24,6 +24,7 @@ set(esp_hal_components esp_hal_pmu esp_hal_rtc_timer esp_hal_clock + esp_hal_security ) set(COMPONENTS ${g0_components} ${g1_components} ${esp_hal_components} main) diff --git a/tools/test_apps/system/panic/main/CMakeLists.txt b/tools/test_apps/system/panic/main/CMakeLists.txt index 879a7f8526..57c2d3b349 100644 --- a/tools/test_apps/system/panic/main/CMakeLists.txt +++ b/tools/test_apps/system/panic/main/CMakeLists.txt @@ -16,7 +16,7 @@ endif() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "include" REQUIRES spi_flash esp_psram esp_system esp_partition - PRIV_REQUIRES esp_gdbstub espcoredump) + PRIV_REQUIRES esp_gdbstub espcoredump esp_hal_security) target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-unused-variable" "-Wno-infinite-recursion"