-
Notifications
You must be signed in to change notification settings - Fork 3k
Crypto IPC 64 bit key ids for ITS #9575
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
Conversation
@itayzafrir, thank you for your changes. |
ef3f6aa
to
636086f
Compare
Rebased on master, please take a look guys. |
636086f
to
44df786
Compare
components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/psa_crypto_spm.c
Outdated
Show resolved
Hide resolved
components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/psa_crypto_spm.c
Outdated
Show resolved
Hide resolved
components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/psa_crypto_spm.c
Outdated
Show resolved
Hide resolved
components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/psa_crypto_spm.c
Outdated
Show resolved
Hide resolved
components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/psa_crypto_spm.c
Outdated
Show resolved
Hide resolved
components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/psa_crypto_spm.c
Outdated
Show resolved
Hide resolved
components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/psa_crypto_spm.c
Outdated
Show resolved
Hide resolved
components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/psa_crypto_spm.c
Outdated
Show resolved
Hide resolved
components/TARGET_PSA/services/crypto/COMPONENT_SPE/crypto_types_spe.h
Outdated
Show resolved
Hide resolved
44df786
to
d2947e0
Compare
@avolinski I've rebased and addressed your comments so far. Old branch @ https://github.com/itayzafrir/mbed-os/tree/crypto-64-bit-key-ids-1 |
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-tls @ARMmbed/mbed-os-tools @ARMmbed/mbed-os-test @ARMmbed/mbed-os-crypto please review or comment if you don't wish to review. |
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.
There are no tool changes in this PR
@Patater @ARMmbed/mbed-os-crypto @ARMmbed/mbed-os-tls would you still like to review this PR (if so please do so) or can it go through. |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
This PR is waiting for reviewers to complete their reviews. |
This will need a rebase. @Patater @ARMmbed/mbed-os-crypto @ARMmbed/mbed-os-tls Please re-review. |
This enables crypto encoding an owner in key file IDs. Added a static assert check in client side proxy.
Remove duplicate inclusion of psa/client.h and psa/service.h
7d7cc46
to
fc2b072
Compare
Rebased to resolve merge confilcts in |
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.
OK
|
||
bytes_read = psa_read(msg.handle, 1, &id, msg.in_size[1]); | ||
bytes_read = psa_read(msg.handle, 1, &(id.key_id), msg.in_size[1]); |
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.
Consider using PSA_KEY_FILE_GET_KEY_ID
to get the key ID.
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.
That wouldn't work here. PSA_KEY_FILE_GET_KEY_ID
returns the value of key_id
, here we're reading from the incoming message into key_id
.
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.
&PSA_KEY_FILE_GET_KEY_ID(id)
wouldn't work?
The downside to how this is written now is it doesn't get the advantage of the macro abstraction and may be depending on more implementation detail than it needs to. This isn't a super strong downside now, but you should be aware of and consider 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.
My bad, it would work. However I'd like to leave it as is for now, since there's no abstraction for the owner
.
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.
OK
CI started |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
Holding for merge. @itayzafrir @Patater Is this comment resolved? #9575 |
Yup, it's fine as-is: was just a suggestion of something to consider. |
Description
Support 64 bit crypto key ids for TARGET_PSA systems.
Crypto type
psa_key_id_t
is defined differently between client and server, this PR is here to provide the key owner (i.e. the calling partition) for use by the crypto library.This PR assures that a crypto key can be opened only by the key owner/creator, i.e. the partition which created the key in the first place.
Please do not merge or run CI - depends on ARMmbed/mbed-crypto#32 and also ARMmbed/mbed-crypto#59.Once 32 and 59 have been merged to mbed-crypto this PR will need to be re-imported via crypto importer into Mbed OS.
Pull request type
Reviewers
@avolinski @Patater