From 9c5c78ff5c3d259b8fea0bed2af67e26042aea38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 20 Mar 2017 14:13:07 +0100 Subject: [PATCH] Fix indicative values of ops counts Previous measurements were wrong due to counting multiplication by a small constant as a full multiplication, which it is not. --- include/mbedtls/ecp.h | 2 +- tests/suites/test_suite_ecp.function | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h index 810cb9f78..314e4b257 100644 --- a/include/mbedtls/ecp.h +++ b/include/mbedtls/ecp.h @@ -271,7 +271,7 @@ mbedtls_ecp_keypair; * \note A "basic operation" is roughly multiplication in GF(p), * or whatever takes a roughly equivalent amount of time. * As an indication, a scalar multiplication on P-256 is - * of the order of 3600 "basic operations" with default + * of the order of 3300 "basic operations" with default * settings. * * \warning Very low values are not always respected: sometimes diff --git a/tests/suites/test_suite_ecp.function b/tests/suites/test_suite_ecp.function index caf983e72..3dfef1877 100644 --- a/tests/suites/test_suite_ecp.function +++ b/tests/suites/test_suite_ecp.function @@ -69,11 +69,11 @@ void ecp_test_vect_restart( int id, * change in the future. A factor 2 is a minimum safety margin. * * For reference, with mbed TLS 2.4 and default settings, for P-256: - * - Random point mult: ~3600M - * - Cold base point mult: ~3600M - * - Hot base point mult: ~1200M + * - Random point mult: ~3250M + * - Cold base point mult: ~3300M + * - Hot base point mult: ~1100M * With MBEDTLS_ECP_WINDOW_SIZE set to 2 (minimum): - * - Random point mult: ~4200M + * - Random point mult: ~3850M */ mbedtls_ecp_group grp; mbedtls_ecp_point R;