| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536 |
- /*
- * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
- *
- * SPDX-License-Identifier: CC0-1.0
- */
- #include <stdio.h>
- #include <stdbool.h>
- #include <string.h>
- #include "sdkconfig.h"
- #include "esp_private/esp_crypto_lock_internal.h"
- #include "esp_log.h"
- #include "ecc_params.h"
- #include "soc/soc_caps.h"
- #include "hal/ecc_hal.h"
- #include "hal/ecc_ll.h"
- #include "memory_checks.h"
- #include "unity_fixture.h"
- #define _DEBUG_ 0
- #define SOC_ECC_SUPPORT_POINT_MULT 1
- #define SOC_ECC_SUPPORT_POINT_VERIFY 1
- #if SOC_ECC_EXTENDED_MODES_SUPPORTED
- #define SOC_ECC_SUPPORT_POINT_DIVISION 1
- #define SOC_ECC_SUPPORT_JACOB_POINT_MULT 1
- #define SOC_ECC_SUPPORT_JACOB_POINT_VERIFY 1
- #define SOC_ECC_SUPPORT_POINT_ADDITION 1
- #define SOC_ECC_SUPPORT_MOD_ADD 1
- #define SOC_ECC_SUPPORT_MOD_SUB 1
- #define SOC_ECC_SUPPORT_MOD_MUL 1
- #endif
- static void ecc_be_to_le(const uint8_t* be_point, uint8_t *le_point, uint8_t len)
- {
- /* When the size is 24 bytes, it should be padded with 0 bytes*/
- memset(le_point, 0x0, 32);
- for (int i = 0; i < len; i++) {
- le_point[i] = be_point[len - i - 1];
- }
- }
- static void ecc_enable_and_reset(void)
- {
- ECC_RCC_ATOMIC() {
- ecc_ll_enable_bus_clock(true);
- ecc_ll_reset_register();
- }
- }
- static void ecc_disable(void)
- {
- ECC_RCC_ATOMIC() {
- ecc_ll_enable_bus_clock(false);
- }
- }
- TEST_GROUP(ecc);
- TEST_SETUP(ecc)
- {
- test_utils_record_free_mem();
- TEST_ESP_OK(test_utils_set_leak_level(0, ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_GENERAL));
- }
- TEST_TEAR_DOWN(ecc)
- {
- test_utils_finish_and_evaluate_leaks(test_utils_get_leak_level(ESP_LEAK_TYPE_WARNING, ESP_COMP_LEAK_ALL),
- test_utils_get_leak_level(ESP_LEAK_TYPE_CRITICAL, ESP_COMP_LEAK_ALL));
- }
- #if SOC_ECC_SUPPORT_POINT_MULT
- static void ecc_point_mul(const uint8_t *k_le, const uint8_t *x_le, const uint8_t *y_le, uint8_t len, bool verify_first,
- uint8_t *res_x_le, uint8_t *res_y_le)
- {
- ecc_enable_and_reset();
- ecc_hal_write_mul_param(k_le, x_le, y_le, len);
- if (verify_first) {
- ecc_hal_set_mode(ECC_MODE_VERIFY_THEN_POINT_MUL);
- } else {
- ecc_hal_set_mode(ECC_MODE_POINT_MUL);
- }
- ecc_hal_start_calc();
- while (!ecc_hal_is_calc_finished()) {
- ;
- }
- ecc_hal_read_mul_result(res_x_le, res_y_le, len);
- ecc_disable();
- }
- static void test_ecc_point_mul_inner(bool verify_first)
- {
- uint8_t scalar_le[32];
- uint8_t x_le[32];
- uint8_t y_le[32];
- /* P256 */
- ecc_be_to_le(ecc_p256_scalar, scalar_le, 32);
- ecc_be_to_le(ecc_p256_point_x, x_le, 32);
- ecc_be_to_le(ecc_p256_point_y, y_le, 32);
- uint8_t x_res_le[32];
- uint8_t y_res_le[32];
- ecc_point_mul(scalar_le, x_le, y_le, 32, verify_first, x_res_le, y_res_le);
- uint8_t x_mul_le[32];
- uint8_t y_mul_le[32];
- ecc_be_to_le(ecc_p256_mul_res_x, x_mul_le, 32);
- ecc_be_to_le(ecc_p256_mul_res_y, y_mul_le, 32);
- #if _DEBUG_
- ESP_LOG_BUFFER_HEX("Expected X:", x_mul_le, 32);
- ESP_LOG_BUFFER_HEX("Got X:", x_res_le, 32);
- ESP_LOG_BUFFER_HEX("Expected Y:", y_mul_le, 32);
- ESP_LOG_BUFFER_HEX("Got Y:", y_res_le, 32);
- #endif
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(x_mul_le, x_res_le, 32, "X coordinate of P256 point multiplication ");
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(y_mul_le, y_res_le, 32, "Y coordinate of P256 point multiplication ");
- memset(x_res_le, 0x0, 32);
- memset(y_res_le, 0x0, 32);
- memset(x_mul_le, 0x0, 32);
- memset(y_mul_le, 0x0, 32);
- /* P192 */
- ecc_be_to_le(ecc_p192_scalar, scalar_le, 24);
- ecc_be_to_le(ecc_p192_point_x, x_le, 24);
- ecc_be_to_le(ecc_p192_point_y, y_le, 24);
- ecc_point_mul(scalar_le, x_le, y_le, 24, verify_first, x_res_le, y_res_le);
- ecc_be_to_le(ecc_p192_mul_res_x, x_mul_le, 24);
- ecc_be_to_le(ecc_p192_mul_res_y, y_mul_le, 24);
- #if _DEBUG_
- ESP_LOG_BUFFER_HEX("Expected X:", x_mul_le, 32);
- ESP_LOG_BUFFER_HEX("Got X:", x_res_le, 32);
- ESP_LOG_BUFFER_HEX("Expected Y:", y_mul_le, 32);
- ESP_LOG_BUFFER_HEX("Got Y:", y_res_le, 32);
- #endif
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(x_mul_le, x_res_le, 24, "X coordinate of P192 point multiplication ");
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(y_mul_le, y_res_le, 24, "Y coordinate of P192 point multiplication ");
- }
- TEST(ecc, ecc_point_multiplication_on_SECP192R1_and_SECP256R1)
- {
- test_ecc_point_mul_inner(false);
- }
- #endif
- #if SOC_ECC_SUPPORT_POINT_VERIFY && !defined(SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK)
- static int ecc_point_verify(const uint8_t *x_le, const uint8_t *y_le, uint8_t len)
- {
- ecc_enable_and_reset();
- ecc_hal_write_verify_param(x_le, y_le, len);
- ecc_hal_set_mode(ECC_MODE_VERIFY);
- ecc_hal_start_calc();
- while (!ecc_hal_is_calc_finished()) {
- ;
- }
- int ret = ecc_hal_read_verify_result();
- ecc_disable();
- return ret;
- }
- TEST(ecc, ecc_point_verification_on_SECP192R1_and_SECP256R1)
- {
- int res;
- uint8_t x_le[32];
- uint8_t y_le[32];
- /* P256 */
- ecc_be_to_le(ecc_p256_point_x, x_le, 32);
- ecc_be_to_le(ecc_p256_point_y, y_le, 32);
- // Case 1: Correct point on curve
- res = ecc_point_verify(x_le, y_le, 32);
- TEST_ASSERT_EQUAL(1, res);
- // Case 2: Modify one byte from the point
- x_le[6] = x_le[6] ^ 0xFF;
- res = ecc_point_verify(x_le, y_le, 32);
- TEST_ASSERT_EQUAL(0, res);
- /* P192 */
- ecc_be_to_le(ecc_p192_point_x, x_le, 24);
- ecc_be_to_le(ecc_p192_point_y, y_le, 24);
- // Case 1: Correct point on curve
- res = ecc_point_verify(x_le, y_le, 24);
- TEST_ASSERT_EQUAL(1, res);
- // Case 2: Modify one byte from the point
- x_le[6] = x_le[6] ^ 0xFF;
- res = ecc_point_verify(x_le, y_le, 24);
- TEST_ASSERT_EQUAL(0, res);
- }
- #endif
- #if SOC_ECC_SUPPORT_POINT_MULT && SOC_ECC_SUPPORT_POINT_VERIFY && !defined(SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK)
- TEST(ecc, ecc_point_verification_and_multiplication_on_SECP192R1_and_SECP256R1)
- {
- test_ecc_point_mul_inner(true);
- }
- #endif
- #if SOC_ECC_SUPPORT_POINT_DIVISION
- static void ecc_point_inv_mul(const uint8_t *num_le, const uint8_t *deno_le, uint8_t len, uint8_t *res_le)
- {
- ecc_enable_and_reset();
- uint8_t zero[32] = {0};
- ecc_hal_write_mul_param(zero, num_le, deno_le, len);
- ecc_hal_set_mode(ECC_MODE_INVERSE_MUL);
- ecc_hal_start_calc();
- while (!ecc_hal_is_calc_finished()) {
- ;
- }
- ecc_hal_read_mul_result(zero, res_le, len);
- ecc_disable();
- }
- TEST(ecc, ecc_inverse_multiplication_or_mod_division_using_SECP192R1_and_SECP256R1_order_of_curve)
- {
- uint8_t res[32] = {0};
- ecc_point_inv_mul(ecc256_num, ecc256_den, 32, res);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc256_inv_mul_res, res, 32, "P256 Inverse multiplication (or Mod division)");
- ecc_point_inv_mul(ecc192_num, ecc192_den, 24, res);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc192_inv_mul_res, res, 24, "P192 Inverse multiplication (or Mod division)");
- }
- #endif
- #if SOC_ECC_SUPPORT_JACOB_POINT_MULT
- static void ecc_jacob_mul(uint8_t *k_le, uint8_t *x_le, uint8_t *y_le, uint8_t len, bool verify_first,
- uint8_t *res_x_le, uint8_t *res_y_le, uint8_t *res_z_le)
- {
- ecc_enable_and_reset();
- ecc_hal_write_mul_param(k_le, x_le, y_le, len);
- if (verify_first) {
- ecc_hal_set_mode(ECC_MODE_POINT_VERIFY_JACOBIAN_MUL);
- } else {
- ecc_hal_set_mode(ECC_MODE_JACOBIAN_POINT_MUL);
- }
- ecc_hal_start_calc();
- while (!ecc_hal_is_calc_finished()) {
- ;
- }
- ecc_hal_read_jacob_mul_result(res_x_le, res_y_le, res_z_le, len);
- ecc_disable();
- }
- static void test_ecc_jacob_mul_inner(bool verify_first)
- {
- uint8_t scalar_le[32];
- uint8_t x_le[32];
- uint8_t y_le[32];
- /* P256 */
- ecc_be_to_le(ecc_p256_scalar, scalar_le, 32);
- ecc_be_to_le(ecc_p256_point_x, x_le, 32);
- ecc_be_to_le(ecc_p256_point_y, y_le, 32);
- uint8_t x_res_le[32];
- uint8_t y_res_le[32];
- uint8_t z_res_le[32];
- ecc_jacob_mul(scalar_le, x_le, y_le, 32, verify_first, x_res_le, y_res_le, z_res_le);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc_p256_jacob_mul_res_x_le, x_res_le, 32, "X coordinate of P256 point jacobian multiplication ");
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc_p256_jacob_mul_res_y_le, y_res_le, 32, "Y coordinate of P256 point jacobian multiplication ");
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc_p256_jacob_mul_res_z_le, z_res_le, 32, "Z coordinate of P256 point jacobian multiplication ");
- memset(x_res_le, 0x0, 32);
- memset(y_res_le, 0x0, 32);
- memset(z_res_le, 0x0, 32);
- /* P192 */
- ecc_be_to_le(ecc_p192_scalar, scalar_le, 24);
- ecc_be_to_le(ecc_p192_point_x, x_le, 24);
- ecc_be_to_le(ecc_p192_point_y, y_le, 24);
- ecc_jacob_mul(scalar_le, x_le, y_le, 24, verify_first, x_res_le, y_res_le, z_res_le);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc_p192_jacob_mul_res_x_le, x_res_le, 24, "X coordinate of P192 point jacobian multiplication ");
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc_p192_jacob_mul_res_y_le, y_res_le, 24, "Y coordinate of P192 point jacobian multiplication ");
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc_p192_jacob_mul_res_z_le, z_res_le, 24, "Z coordinate of P192 point jacobian multiplication ");
- }
- TEST(ecc, ecc_jacobian_point_multiplication_on_SECP192R1_and_SECP256R1)
- {
- test_ecc_jacob_mul_inner(false);
- }
- #endif
- #if SOC_ECC_SUPPORT_JACOB_POINT_VERIFY
- static int ecc_jacob_verify(const uint8_t *x_le, const uint8_t *y_le, const uint8_t *z_le, uint8_t len)
- {
- ecc_enable_and_reset();
- ecc_hal_write_jacob_verify_param(x_le, y_le, z_le, len);
- ecc_hal_set_mode(ECC_MODE_JACOBIAN_POINT_VERIFY);
- ecc_hal_start_calc();
- while (!ecc_hal_is_calc_finished()) {
- ;
- }
- int ret = ecc_hal_read_verify_result();
- ecc_disable();
- return ret;
- }
- TEST(ecc, ecc_jacobian_point_verification_on_SECP192R1_and_SECP256R1)
- {
- int res;
- /* P256 */
- res = ecc_jacob_verify(ecc_p256_jacob_mul_res_x_le, ecc_p256_jacob_mul_res_y_le, ecc_p256_jacob_mul_res_z_le, 32);
- TEST_ASSERT_EQUAL(1, res);
- /* P192 */
- res = ecc_jacob_verify(ecc_p192_jacob_mul_res_x_le, ecc_p192_jacob_mul_res_y_le, ecc_p192_jacob_mul_res_z_le, 24);
- TEST_ASSERT_EQUAL(1, res);
- }
- #endif
- #if SOC_ECC_SUPPORT_JACOB_POINT_MULT && SOC_ECC_SUPPORT_JACOB_POINT_VERIFY
- TEST(ecc, ecc_point_verification_and_jacobian_point_multiplication_on_SECP192R1_and_SECP256R1)
- {
- test_ecc_jacob_mul_inner(true);
- }
- #endif
- #if SOC_ECC_SUPPORT_POINT_ADDITION
- static void ecc_point_addition(uint8_t *px_le, uint8_t *py_le, uint8_t *qx_le, uint8_t *qy_le, uint8_t *qz_le,
- uint8_t len, bool jacob_output,
- uint8_t *x_res_le, uint8_t *y_res_le, uint8_t *z_res_le)
- {
- ecc_enable_and_reset();
- ecc_hal_write_point_add_param(px_le, py_le, qx_le, qy_le, qz_le, len);
- ecc_hal_set_mode(ECC_MODE_POINT_ADD);
- ecc_hal_start_calc();
- while (!ecc_hal_is_calc_finished()) {
- ;
- }
- ecc_hal_read_point_add_result(x_res_le, y_res_le, z_res_le, len, jacob_output);
- ecc_disable();
- }
- TEST(ecc, ecc_point_addition_on_SECP192R1_and_SECP256R1)
- {
- uint8_t scalar_le[32] = {0};
- uint8_t x_le[32] = {0};
- uint8_t y_le[32] = {0};
- uint8_t z_le[32] = {0};
- /* P256
- * R = 2 * P
- */
- ecc_be_to_le(ecc_p256_point_x, x_le, 32);
- ecc_be_to_le(ecc_p256_point_y, y_le, 32);
- scalar_le[0] = 0x2;
- uint8_t x_res_le[32];
- uint8_t y_res_le[32];
- uint8_t z_res_le[32];
- ecc_jacob_mul(scalar_le, x_le, y_le, 32, 0, x_res_le, y_res_le, z_res_le);
- uint8_t x_add_le[32];
- uint8_t y_add_le[32];
- uint8_t z_add_le[32];
- z_le[0] = 0x1;
- ecc_point_addition(x_le, y_le, x_le, y_le, z_le, 32, 1, x_add_le, y_add_le, z_add_le);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(x_add_le, x_res_le, 32, "X coordinate of P256 point addition");
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(y_add_le, y_res_le, 32, "Y coordinate of P256 point addition");
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(z_add_le, z_res_le, 32, "Z coordinate of P256 point addition");
- /* P192
- * R = 2 * P
- */
- ecc_be_to_le(ecc_p192_point_x, x_le, 24);
- ecc_be_to_le(ecc_p192_point_y, y_le, 24);
- scalar_le[0] = 0x2;
- ecc_jacob_mul(scalar_le, x_le, y_le, 24, 0, x_res_le, y_res_le, z_res_le);
- z_le[0] = 0x1;
- ecc_point_addition(x_le, y_le, x_le, y_le, z_le, 24, 1, x_add_le, y_add_le, z_add_le);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(x_add_le, x_res_le, 24, "X coordinate of P192 point addition");
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(y_add_le, y_res_le, 24, "Y coordinate of P192 point addition");
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(z_add_le, z_res_le, 24, "Z coordinate of P192 point addition");
- }
- #endif
- #if SOC_ECC_SUPPORT_MOD_ADD || SOC_ECC_SUPPORT_MOD_SUB || SOC_ECC_SUPPORT_MOD_MUL
- static void ecc_mod_op(ecc_mode_t mode, const uint8_t *a, const uint8_t *b, uint8_t len, uint8_t *res_le)
- {
- ecc_enable_and_reset();
- ecc_hal_write_mod_op_param(a, b, len);
- ecc_hal_set_mode(mode);
- ecc_hal_start_calc();
- while (!ecc_hal_is_calc_finished()) {
- ;
- }
- ecc_hal_read_mod_op_result(res_le, len);
- ecc_disable();
- }
- #endif
- #if SOC_ECC_SUPPORT_MOD_ADD
- TEST(ecc, ecc_mod_addition_using_SECP192R1_and_SECP256R1_order_of_curve)
- {
- uint8_t res[32] = {0};
- ecc_mod_op(ECC_MODE_MOD_ADD, ecc256_x, ecc256_y, 32, res);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc256_add_res, res, 32, "P256 mod addition");
- ecc_mod_op(ECC_MODE_MOD_ADD, ecc192_x, ecc192_y, 24, res);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc192_add_res, res, 24, "P192 mod addition");
- }
- #endif
- #if SOC_ECC_SUPPORT_MOD_SUB
- TEST(ecc, ecc_mod_subtraction_using_SECP192R1_and_SECP256R1_order_of_curve)
- {
- uint8_t res[32] = {0};
- ecc_mod_op(ECC_MODE_MOD_SUB, ecc256_x, ecc256_y, 32, res);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc256_sub_res, res, 32, "P256 mod subtraction");
- ecc_mod_op(ECC_MODE_MOD_SUB, ecc192_x, ecc192_y, 24, res);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc192_sub_res, res, 24, "P192 mod subtraction");
- }
- #endif
- #if SOC_ECC_SUPPORT_MOD_MUL
- TEST(ecc, ecc_mod_multiplication_using_SECP192R1_and_SECP256R1_order_of_curve)
- {
- uint8_t res[32] = {0};
- ecc_mod_op(ECC_MODE_MOD_MUL, ecc256_x, ecc256_y, 32, res);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc256_mul_res, res, 32, "P256 mod multiplication");
- ecc_mod_op(ECC_MODE_MOD_MUL, ecc192_x, ecc192_y, 24, res);
- TEST_ASSERT_EQUAL_MEMORY_MESSAGE(ecc192_mul_res, res, 24, "P192 mod multiplication");
- }
- #endif
- TEST_GROUP_RUNNER(ecc)
- {
- #if SOC_ECC_SUPPORT_POINT_MULT
- RUN_TEST_CASE(ecc, ecc_point_multiplication_on_SECP192R1_and_SECP256R1);
- #endif
- #if SOC_ECC_SUPPORT_POINT_VERIFY && !defined(SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK)
- RUN_TEST_CASE(ecc, ecc_point_verification_on_SECP192R1_and_SECP256R1);
- #endif
- #if SOC_ECC_SUPPORT_POINT_MULT && SOC_ECC_SUPPORT_POINT_VERIFY && !defined(SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK)
- RUN_TEST_CASE(ecc, ecc_point_verification_and_multiplication_on_SECP192R1_and_SECP256R1);
- #endif
- #if SOC_ECC_SUPPORT_POINT_DIVISION
- RUN_TEST_CASE(ecc, ecc_inverse_multiplication_or_mod_division_using_SECP192R1_and_SECP256R1_order_of_curve);
- #endif
- #if SOC_ECC_SUPPORT_JACOB_POINT_MULT
- RUN_TEST_CASE(ecc, ecc_jacobian_point_multiplication_on_SECP192R1_and_SECP256R1);
- #endif
- #if SOC_ECC_SUPPORT_JACOB_POINT_VERIFY
- RUN_TEST_CASE(ecc, ecc_jacobian_point_verification_on_SECP192R1_and_SECP256R1);
- #endif
- #if SOC_ECC_SUPPORT_JACOB_POINT_MULT && SOC_ECC_SUPPORT_JACOB_POINT_VERIFY
- RUN_TEST_CASE(ecc, ecc_point_verification_and_jacobian_point_multiplication_on_SECP192R1_and_SECP256R1);
- #endif
- #if SOC_ECC_SUPPORT_POINT_ADDITION
- RUN_TEST_CASE(ecc, ecc_point_addition_on_SECP192R1_and_SECP256R1);
- #endif
- #if SOC_ECC_SUPPORT_MOD_ADD
- RUN_TEST_CASE(ecc, ecc_mod_addition_using_SECP192R1_and_SECP256R1_order_of_curve);
- #endif
- #if SOC_ECC_SUPPORT_MOD_SUB
- RUN_TEST_CASE(ecc, ecc_mod_subtraction_using_SECP192R1_and_SECP256R1_order_of_curve);
- #endif
- #if SOC_ECC_SUPPORT_MOD_MUL
- RUN_TEST_CASE(ecc, ecc_mod_multiplication_using_SECP192R1_and_SECP256R1_order_of_curve);
- #endif
- }
|