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

Key ID generation is incorrect for non-ECDSA keys #954

Open
woodruffw opened this issue Apr 3, 2024 · 2 comments
Open

Key ID generation is incorrect for non-ECDSA keys #954

woodruffw opened this issue Apr 3, 2024 · 2 comments
Labels
bug Something isn't working component:verification Core verification functionality

Comments

@woodruffw
Copy link
Member

See sigstore/rekor#2062 for the full context here. TL;DR: we have an internal key_id helper that essentially does SHA256(DER(SPKI(key)), which is correct for ECDSA keys but not for Ed25519 or RSA.

Following #953 this will no longer cause failures, but will be suboptimal in terms of searching all keys in the keyring. We should fix our key ID generation and handling to make it more optimal.

@woodruffw woodruffw added bug Something isn't working component:verification Core verification functionality labels Apr 3, 2024
@haydentherapper
Copy link
Contributor

haydentherapper commented Apr 3, 2024

Pending agreement, I think we should have RSA be the same key ID calculation. Doing the complex computation with 0xff doesn't feel worthwhile.

Also note the update on the thread, I think we can put checkpoint key ID in the trust root so that clients don't have to compute it.

@woodruffw
Copy link
Member Author

Pending agreement, I think we should have RSA be the same key ID calculation. Doing the complex computation with 0xff doesn't feel worthwhile.

SGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:verification Core verification functionality
Projects
None yet
Development

No branches or pull requests

2 participants