oxidecomputer / pki-playground

Tool for generating non-trivial X.509 certificate chains
Mozilla Public License 2.0
29 stars 2 forks source link

ed25519 support #34

Closed flihp closed 1 year ago

flihp commented 1 year ago

Add ed25519 support in a new module. Putting this in a module keeps us from having to deconflict type names from the p384 & ed25519 module.

flihp commented 1 year ago

This is marked as a draft because it uses a release candidate from the ed25519-dalek crate. If we don't want to use unreleased crates this can wait till they make their 2.0 release.

flihp commented 1 year ago

ed25519 signatures are limited to a single hash function and the current implementation will just ignore whatever hash gets set in the config. It's probably better to make the hash optional and throw errors where one is required.

flihp commented 1 year ago

The structure here may be a bit controversial so if you'd prefer to not break the KeyPair implementations out into their own modules let me know. This seemed reasonable given relative size of src/lib.rs and the conflicts between type names in the p384 and ed25519 crates. That said the same can be accomplished in a monolithic src/lib.rs if you prefer.