secure-systems-lab / go-securesystemslib

Cryptographic and general-purpose routines for Golang Secure Systems Lab projects at NYU
MIT License
20 stars 21 forks source link

Support PEM encoding for all key types #67

Closed adityasaky closed 5 months ago

adityasaky commented 6 months ago

This change matches python-securesystemslib by retiring the custom serialization format. With this change, RSA, ED25519, and ECDSA keys can be loaded from standard PEM encoding, meaning custom tooling isn't needed to generate the keys. This commit adds deprecation warnings to prior Load methods that expected the custom format.

@lukpueh

adityasaky commented 6 months ago

The scheme for ECDSA isn't quite right but I'd prefer to patch that separately.

adityasaky commented 6 months ago

Also, the existing test keys were converted using https://github.com/secure-systems-lab/securesystemslib/blob/main/docs/migrate_key.py and checked in.

adityasaky commented 6 months ago

Converted to draft until @lukpueh gets a chance to review, I don't want this to be merged accidentally. :)

adityasaky commented 5 months ago

I've changed the base branch so this can be merged for now. This will enable downstream testing, and we can merge to main after @lukpueh has a chance to review. Thanks @mnm678!