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

API for loading and managing keys from files #427

Closed
adityasaky opened this issue Nov 1, 2022 · 5 comments
Closed

API for loading and managing keys from files #427

adityasaky opened this issue Nov 1, 2022 · 5 comments

Comments

@adityasaky
Copy link
Contributor

go-tuf doesn't currently provide an API to load existing keys from files. It'd be great to be able to load keys from files into their data.PrivateKey or data.PublicKey representations.

@udf2457
Copy link
Contributor

udf2457 commented Nov 10, 2022

Yes, for people who use PKCS#11 (e.g. Yubikey) or cloud HSM (e.g AWS KSM or Azure KV) it would be very useful to be able to:

  1. Load pubkey representations (i.e. provide pem file and it gets parsed into the correct format)
  2. Load external signatures (I.e. provide hex string which gets parsed into correct format)

@asraa
Copy link
Contributor

asraa commented Nov 14, 2022

+1, we currently handwrite the data.PublicKey conversions for the HSMs we use.

I agree that loading a PEM file or other pubkey representaitons into a public key would be great to start.

@udf2457
Copy link
Contributor

udf2457 commented Nov 15, 2022

For signatures, a good reference point would be to support the --signature-format output options from pkcs11-tool seeing as pkcs11-tool is a widely used reference implemenation:

--signature-format format
Format for ECDSA signature: 'rs' (default), 'sequence', 'openssl'.

@trishankatdatadog
Copy link
Member

This should be a go-securesystemslib issue IMHO

@rdimitrov
Copy link
Contributor

Closing since the code base changed and this is now fixed.

Thanks for raising this 👍

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

6 participants