-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Driver-only ECDH starter #7142
Driver-only ECDH starter #7142
Conversation
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
With temporary exclusions to be lifted as follow-ups. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ;)
tests/scripts/all.sh
Outdated
# Disable the module that's accelerated | ||
scripts/config.py unset MBEDTLS_ECDH_C | ||
fi | ||
# Disable things that depend on it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please either remove this comment, or unset kex defines conditionally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll give my 2cents here. Albeit it is not explicitly written, I think that @mpg's plan is to start with these key exchanges disabled and then remove these lines as long as the ECDH task moves forward. We did the same for accelerated ECDSA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, it's just good to have a comment / follow-up issue linked to explain why these are disabled even if MBEDTLS_ECDH_C
isn't :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I'll add a comment, as this is not intuitive indeed.
tests/scripts/all.sh
Outdated
not grep mbedtls_ecdh_ library/ecdh.o | ||
|
||
# Run the tests | ||
# ------------- | ||
|
||
msg "test: MBEDTLS_PSA_CRYPTO_CONFIG with accelerated ECDH" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msg "test: MBEDTLS_PSA_CRYPTO_CONFIG with accelerated ECDH" | |
msg "test: MBEDTLS_PSA_CRYPTO_CONFIG with accelerated ECDH + USE_PSA" |
tests/scripts/all.sh
Outdated
# Keep in sync with component_test_psa_crypto_config_accel_ecdh_use_psa. | ||
# Used by tests/scripts/analyze_outcomes.py for comparison purposes. | ||
component_test_psa_crypto_config_reference_ecdh_use_psa () { | ||
msg "test: MBEDTLS_PSA_CRYPTO_CONFIG with accelerated ECDH + USE_PSA" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msg "test: MBEDTLS_PSA_CRYPTO_CONFIG with accelerated ECDH + USE_PSA" | |
msg "test: MBEDTLS_PSA_CRYPTO_CONFIG reference ECDH + USE_PSA" |
tests/scripts/all.sh
Outdated
|
||
make | ||
|
||
msg "test: MBEDTLS_PSA_CRYPTO_CONFIG with accelerated ECDH + USE_PSA" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msg "test: MBEDTLS_PSA_CRYPTO_CONFIG with accelerated ECDH + USE_PSA" | |
msg "test: MBEDTLS_PSA_CRYPTO_CONFIG reference ECDH + USE_PSA" |
tests/scripts/all.sh
Outdated
scripts/config.py unset MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED | ||
scripts/config.py unset MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED | ||
|
||
# Build the library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Build the library | |
# Build the main library |
tests/scripts/all.sh
Outdated
# Use the same config as reference, only without built-in ECDH | ||
config_psa_crypto_config_ecdh_use_psa 1 | ||
|
||
# Build the library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Build the library | |
# Build the main library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments left.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
@AndrzejKurek Thanks for your review! I think I've addressed your comments, so this should be ready to review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only found one mistake (which I guess might be due to some investigation about issue #7148)
tests/scripts/all.sh
Outdated
#make test | ||
tests/ssl-opt.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an error to me: I think that in this PR we should run make test
, but not ssl-opt.sh
as the latter is supposed to be solved in #7148 . Isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks for catching this. Indeed you guessed right, this was supposed to be a local experiment that I never intended to commit.
This was never meant to be committed here. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Description
This creates / updates the infrastructure for testing work on driver-only ECDH.
Context: see #6839. This is about the TL-ecdh intermediate goal - not doing the work itself, just putting the test components in place. TL-ecdh will be achieved when the
all.sh
component introduced here is complete (full config without undue exclusions, runningssl-opt.sh
too) and has testing parity with its reference component (that is, no undue "ignore"s inanalyze_outcome.py
).Follow-ups: tasks being created:
Gatekeeper checklist