Repository navigation
crypto/spiffe: use Ed25519 for SVID key generation - #145
Merged
Merged
Conversation
Ed25519 is faster for signing/verifying, produces smaller keys and signatures, and has safer deterministic signing compared to ECDSA P256. Signed-off-by: joshvanl <me@joshvanl.dev>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the SPIFFE workload identity flow (and supporting test PKI utilities) to generate Ed25519 keys instead of ECDSA P-256, aligning SVID key generation with Ed25519’s performance and signature-size benefits.
Changes:
- Switch SPIFFE SVID private key generation to Ed25519 when creating CSRs.
- Update test PKI generation to use Ed25519 for root/leaf keys and adjust certificate creation accordingly.
- Adjust leaf certificate key usage to match Ed25519 signing-only semantics.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crypto/test/pki.go | Updates test PKI root/leaf key generation and certificate creation to use Ed25519. |
| crypto/spiffe/spiffe.go | Generates Ed25519 keys for SVID CSR creation during identity fetch/rotation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Josh van Leeuwen <me@joshvanl.dev>
Standard CA certificates should include both CertSign and CRLSign key usage to support certificate revocation list signing. Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
ed25519.PrivateKey is a value type ([]byte), not a struct, so taking its address creates *ed25519.PrivateKey which is not handled by EncodePrivateKey's type switch, causing "unsupported key type *ed25519.PrivateKey" errors at runtime. Use the value directly. Signed-off-by: joshvanl <me@joshvanl.dev>
acroca
approved these changes
Mar 9, 2026
cicoyle
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ed25519 is faster for signing/verifying, produces smaller keys and signatures, and has safer deterministic signing compared to ECDSA P256.