-
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
Define PSA_WANT_xxx_KEY_PAIR_yyy step 2/DH #7903
Define PSA_WANT_xxx_KEY_PAIR_yyy step 2/DH #7903
Conversation
Well, this PR is when 7773 is done :) I think we could indeed extend the existing "features" entry a bit, to mention that (1) DERIVE is only available for ECC so far, and (2) the implementation is free to enable more than was requested (for example it currently enables import and export as soon as basic is present, though that might change in the future). |
0f91405
to
e738f42
Compare
696f6c6
to
322b7fd
Compare
Just rebased after #7902 was merged yesterday. CI was green before this rebase so hopefully it would be again soon. |
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Rebased again on |
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'm happy with the changes that are there (except two hickups in the Changelog), but I think a few more changes are needed:
- fulfill the prophecy in
tests/scripts/generate_psa_tests.py
- adjust the opening comment in
psa/crypto_legacy.h
: I think we just want to remove_LEGACY
here, which probably was added by mistake (mass replace) in the first place.
Once these two changes are done, git grep KEY_PAIR_LEGACY
will no longer find any match, as should be.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
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, thanks!
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 noticed that we still have the line //#define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR 1
in the file configs/crypto_config_profile_medium.h
which we import from TF-M. I think we should remove it now in this PR however others might not agree so we will check with the team. Other than that this PR is looking good so I will approve once we get an answer on this.
Correct. I would say we have 2 options here: either use new symbols for the RSA key pair or remove it. Then what about DH? Should I add it here as well (still commented out of course)? Edit: thinking a bit more about this, usually having something commented out in a config file it means that it is supposed to be enabled in some test (even though I didn't find any of such case in
Am I right? |
I think there are several possible reasons from having things commented out like this:
There seems to be consensus on Slack that we want to keep the top of this file unchanged from their version and add our changes in an explicitly-delimited section at the end, with /***********************************************************************
* Local edits below this delimiter
**********************************************************************/
/* Between Mbed TLS 3.4 and 3.5, the following macro, commented-out above,
//#define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR 1
* has been replaced with the following new macros:
//#define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC 1
//#define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_IMPORT 1
//#define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_EXPORT 1
//#define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_GENERATE 1
//#define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_DERIVE 1
*/
/* Between Mbed TLS 3.4 and 3.5, the following macros have been added:
// [...]
*/ Wdyt? |
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
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
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, thank you. I am marking "needs-ci" just while CI completes.
@tom-daubney-arm FYI now that we're using merge queues, the merge action is “put on a queue to merge when the CI has finished” and no longer “merge now”. So we no longer need “needs-ci” when a pull request has been approved. |
That's great! Ok I will remove the label then. Thanks for letting me know. |
Ah, I hadn't realised either the move to merge queues has that effect, so I was also waiting for the CI to complete before pressing the "merge when ready" button, which sounds a bit silly now that I'm writing it - thanks for connecting the dots :) |
This PR replaces temporary occurrences of
DH_KEY_TYPE_LEGACY
with proper new symbols.Depends on #7902 and #7909
Resolves #7773.
PR checklist