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

Rename commands to remove PSA prefix and make them more user-friendly #26

Closed
paulhowardarm opened this issue Feb 1, 2021 · 3 comments · Fixed by #33
Closed

Rename commands to remove PSA prefix and make them more user-friendly #26

paulhowardarm opened this issue Feb 1, 2021 · 3 comments · Fixed by #33
Assignees
Labels
small Effort label

Comments

@paulhowardarm
Copy link
Contributor

Summary

Some of the tool command names are chosen to match the opcode names in the wire protocol, but it would be better to give them names that are more intuitive for scripting, and also to cater for the fact that some commands might end up being compositions of multiple wire protocol ops. Also, words like "generate" and "destroy" are not idiomatic for scripting of key management: "create" and "delete" would be better. There is no need to align to PSA terminology here. The overriding aim is to make a nice usable CLI tool.

Details

psa-generate-key should be renamed to either create-key or create-rsa-keypair depending on whether we want to specialise it to RSA in the future. A single create-key command will eventually need all sorts of differently-constrained parameter sets for all the different key types, so having a separate command for different main key types might make sense.

psa-destroy-key should be renamed to delete-key (and we only need one of those regardless of the key type).

psa-generate-random can just be generate-random or make-random.

psa-export-key can just be export-key.

psa-export-public-key can just be export-publiic-key.

@ionut-arm ionut-arm added enhancement New feature or request small Effort label and removed enhancement New feature or request labels Feb 3, 2021
@hug-dev
Copy link
Member

hug-dev commented Feb 4, 2021

I think create-rsa-key is a good name. It would need a key name and default to the following key attributes:

  • type: RSA key pair
  • size: 1024 bits
  • policy: by default used for encryption/decryption with RSA PKCS#1 v1.5 encryption (with SHA-256). A --usage flag or similar could be used to modify that

create-ecc-key would be similar with the following defaulting:

  • type: ECC key pair with curve secp256r1
  • size: 256 bits
  • policy: by default signing/verifying with ECDSA SHA-256

also see this conversation in Slack.

@ionut-arm
Copy link
Member

ionut-arm commented Feb 5, 2021

size: 1024 bits

That's too small, 2048 bits at least

Source: https://www.keylength.com/en/

@hug-dev
Copy link
Member

hug-dev commented Feb 5, 2021

Yes in the code I changed it to 2048, knowing that we support that 👍

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

Successfully merging a pull request may close this issue.

3 participants