Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redefinition warnings depending on available curves #9029

Closed
mschulz-at-hilscher opened this issue Apr 15, 2024 · 1 comment
Closed

Redefinition warnings depending on available curves #9029

mschulz-at-hilscher opened this issue Apr 15, 2024 · 1 comment
Assignees
Labels
bug component-crypto Crypto primitives and low-level interfaces size-xs Estimated task size: extra small (a few hours at most)

Comments

@mschulz-at-hilscher
Copy link
Contributor

mschulz-at-hilscher commented Apr 15, 2024

Summary

Compiling without SECP192R1 leads to warnings during compilation.

System information

Mbed TLS version (number or commit id): 3.6.0
Operating system and version: Linux 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Configuration (if not default, please attach mbedtls_config.h): //#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
Compiler and options (if you used a pre-built binary, please indicate how you obtained it):
Additional environment information:

Expected behavior

No compiler warnings.

Actual behavior

suites/test_suite_pk.function:139: warning: "MBEDTLS_TEST_PSA_ECC_ONE_CURVE_BITS" redefined
  139 | #define MBEDTLS_TEST_PSA_ECC_ONE_CURVE_BITS 256
      |
suites/test_suite_pk.function:74: note: this is the location of the previous definition
   74 | #define MBEDTLS_TEST_PSA_ECC_ONE_CURVE_BITS 224

Steps to reproduce

Deactivate SECP192R1 in mbedtls_config.h:

//#define MBEDTLS_ECP_DP_SECP192R1_ENABLED

Additional information

@gilles-peskine-arm
Copy link
Contributor

Oh, oops, the logic is wrong when secp192k1 is enabled but secp192r1 is disabled. (Getting a compilation error rather than mysterious test failures if I got the logic wrong was on purpose.)

@gilles-peskine-arm gilles-peskine-arm added bug component-crypto Crypto primitives and low-level interfaces size-xs Estimated task size: extra small (a few hours at most) labels Apr 15, 2024
@github-project-automation github-project-automation bot moved this to Done in Barriers Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component-crypto Crypto primitives and low-level interfaces size-xs Estimated task size: extra small (a few hours at most)
Projects
Archived in project
Development

No branches or pull requests

3 participants