-
Notifications
You must be signed in to change notification settings - Fork 124
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
convert signature library to implement crypto.Signer interface #69
Conversation
This patch also allows for: - more flexibility for using different hash functions with different algorithms (not presuming SHA256 everywhere) - passing transaction Context via signature.SignerOpts for use when leveraging remote KMS - caching of public keys fetched from remote KMS (anticipating that verification will happen more frequently than key rotation occurs) Signed-off-by: Bob Callaway <[email protected]>
Signed-off-by: Bob Callaway <[email protected]>
Signed-off-by: Bob Callaway <[email protected]>
Signed-off-by: Bob Callaway <[email protected]>
Signed-off-by: Bob Callaway <[email protected]>
Signed-off-by: Bob Callaway <[email protected]>
Signed-off-by: Bob Callaway <[email protected]>
cc @dekkagaijin |
The reason why I intentionally did not implement the
I like these. Hash algs other than SHA256 are already supported via constructors, but can't sanely be used as an input to
This 100%, too, but unfortunately it's not compatible with What's the end goal? |
tl;dr Additionally, for |
Understood... by shifting the public key into a cache (which refreshes on its own context) and leveraging the
Yup, you're right - I should combine the first and fourth items above since I really meant that just for the KMS implementation.
PGP libs do take an
I'd like to get to a single implementation within sigstore for signing and verification, which is what I think your original goal was here as well. There's a fair bit of duplicated code across sigstore where we're directly calling rsa/ecdsa instead of using the signature library, and having support for the There were two recent situations that triggered me to start working on this:
+1 to |
What if we do both? Implement both |
I think that makes sense. Let me mark this PR as a draft for now, and we can agree to the combined interface separately and then come back to this one. |
IMHO we'll want to split the high and low level interfaces. I'm not sure there's a good way to provide a complete interface that can translate down to |
Signed-off-by: Bob Callaway <[email protected]>
Signed-off-by: Bob Callaway <[email protected]>
Signed-off-by: Bob Callaway <[email protected]>
@dekkagaijin After looking at what you put up in #70, and thinking it through a bit more, I've come to this (which I think achieves both of our goals):
I'd appreciate your comments on this latest update... thanks! |
Signed-off-by: Bob Callaway <[email protected]>
Signed-off-by: Bob Callaway <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like :)
Thanks for indulging me
Signed-off-by: Bob Callaway <[email protected]>
…/cosign/cmd/cosign@main" (sigstore#69) for now! Signed-off-by: Dan Lorenc <[email protected]>
This is the first step of several to try to have signature library that can be used across all of sigstore's golang projects.