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

Document how to generate key files #662

Open
lukpueh opened this issue Nov 29, 2023 · 0 comments
Open

Document how to generate key files #662

lukpueh opened this issue Nov 29, 2023 · 0 comments

Comments

@lukpueh
Copy link
Member

lukpueh commented Nov 29, 2023

in-toto now accepts standard PKCS8 and subjectPublicKeyInfo key files in cli (#649, #651, #654, #652).

Given available 3rd tooling to easily generate compatible keys, in-toto no longer provides API for that (as it did previously for its proprietary key format).

It might still be helpful to include 3rd party tool usage in in-toto docs, e.g.

# RSA and ECDSA on LibreSSL 3.3.6
openssl genpkey -algorithm rsa -out rsa_private.pem
openssl pkcs8 -in rsa_private.pem -topk8 -passout pass:hunter2 -out rsa_private_encrypted.pem
openssl rsa -in rsa_private.pem -pubout -out rsa_public.pem

openssl genpkey -algorithm EC \
        -pkeyopt ec_paramgen_curve:P-256 \
        -pkeyopt ec_param_enc:named_curve \
        -out ecdsa_private.pem
openssl pkcs8 -in ecdsa_private.pem -topk8 -passout pass:hunter2 -out ecdsa_private_encrypted.pem
openssl pkey -in ecdsa_private.pem -pubout -out ecdsa_public.pem

# Ed25519 on OpenSSL 3.1.1
openssl genpkey -algorithm Ed25519 -out ed25519_private.pem
openssl pkcs8 -in ed25519_private.pem -topk8 -passout pass:hunter2 -out ed25519_private_encrypted.pem
openssl pkey -in ed25519_private.pem -pubout -out ed25519_public.pem
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

1 participant