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

Capabilities of import_{ed25519,ecdsa}_{private,public}key_from_file don't align with name #280

Closed
lukpueh opened this issue Oct 5, 2020 · 0 comments · Fixed by #772
Closed
Labels
legacy Issues related to legacy interfaces (obsolete with #731)

Comments

@lukpueh
Copy link
Member

lukpueh commented Oct 5, 2020

Description of issue or feature request:

securesystemslib has a custom json on-disk format for ed25519 and ecdsa private and public keys. The generate_and_write_{ed25519, ecdsa}_keypair(...) and import_{ed25519, ecdsa}_{private, public}key_from_file functions serialize and deserialize keys to and from this format respectively, and according to their names.

However, as discovered while refactoring the related unit tests in #279, the capabilities of these function exceed the scope that their names suggest.

Current behavior:

  1. import_ed25519_publickey_from_file can import ed25519 private keys (if unencrypted)
  2. import_ed25519_privatekey_from_file can also import public keys
  3. import_ecdsa_publickey_from_file can import ed25519 public keys

Expected behavior:
Fail if the imported key is not what the name of the function suggests.

Also see #251 and secure-systems-lab/dsse#1 for long-term plans of dropping the custom key format.

lukpueh added a commit to lukpueh/securesystemslib that referenced this issue Oct 9, 2020
Updates docstrings and comments for rsa functions
Starts updating ed25519 generate

TODO:
- Finish docstrings and comments
- Adapt README
- Write better commit messages
- coordinate with in-toto/in-toto#80
- fix secure-systems-lab#280? (or in a follow-up PR)
lukpueh added a commit to lukpueh/securesystemslib that referenced this issue Oct 12, 2020
Updates docstrings and comments for rsa functions
Starts updating ed25519 generate

TODO:
- Finish docstrings and comments
- Adapt README
- Write better commit messages
- coordinate with in-toto/in-toto#80
- fix secure-systems-lab#280? (or in a follow-up PR)
@lukpueh lukpueh added the legacy Issues related to legacy interfaces (obsolete with #731) label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy Issues related to legacy interfaces (obsolete with #731)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant