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

psa_import_key() documentation improvements #338

Open
laurencelundblade opened this issue Dec 23, 2019 · 1 comment
Open

psa_import_key() documentation improvements #338

laurencelundblade opened this issue Dec 23, 2019 · 1 comment

Comments

@laurencelundblade
Copy link

Description

Here's some things that were hard to figure out for psa_import_key() of an EC key for use with ECDSA that could be addressed with documentation. I figured them out from the source code and such and it took a long time.

  • When you import a private EC key, the public key is always created from the private key. So the import is either of a key pair or a public key, never just a private key. Design is fine, but it is not obvious. OpenSSL doesn't work this way for example.
  • For import to work, the one attribute you have to set is the key type, psa_set_key_type(), or it won't know what type of key you are importing.
  • To make the key you imported usable for sometime you have to set some policy, particularly what algorithms you want it to work with and what operations you want to perform.

I'm working off-target on MacOS with Xcode against MBed 2.0, MBed 1.1 and MBed 1.1 as integrated into TF-M.

(Sorry I can't actually make pull requests to improve the documentation. I just have too many projects going to get involved at that level here, though I'd like to.)

Issue request type

[ ] Question
[ X] Enhancement
[ ] Bug
@ciarmcom
Copy link
Member

Internal Jira reference: https://jira.arm.com/browse/IOTCRYPT-1037

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants