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

pkg/types/core: add Ed25519Signer #1050

Merged
merged 3 commits into from
Mar 5, 2025
Merged

Conversation

jmank88
Copy link
Collaborator

@jmank88 jmank88 commented Feb 26, 2025

func (c *CryptoSigner) Public() crypto.PublicKey { return c.account }

func (c *CryptoSigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) {
//TODO sanity check rand & opts?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you going to implement something more here?

Copy link
Collaborator Author

@jmank88 jmank88 Feb 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends what is required to support our usage. I'd like to keep it as simple as possible, and hopefully not have to pass opts over the wire at all. But even in that simplest case, we may want to be strict about validating which opts are passed in so there aren't any surprises.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converted to a Ed25519Signer since that is all we need for CSA, and made it stricter here, tolerating only crypto/rand.Reader and crypto.Hash(0) for x509.PureEd25519, and returning a ed25519.PublicKey.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TLS x509 is the only usage currently, for Mercury/LLO.

pavel-raykov
pavel-raykov previously approved these changes Feb 28, 2025
@jmank88 jmank88 force-pushed the CRE-305-loop-keystore branch from 0b9672b to 42aa7a3 Compare March 1, 2025 03:48
@jmank88 jmank88 changed the title pkg/types/core: add CryptoSigner pkg/types/core: add Ed25519Signer Mar 1, 2025
@jmank88 jmank88 force-pushed the CRE-305-loop-keystore branch from 42aa7a3 to 6a59f5c Compare March 1, 2025 15:12
@jmank88 jmank88 marked this pull request as ready for review March 1, 2025 15:19
@jmank88 jmank88 requested a review from a team as a code owner March 1, 2025 15:19
@patrickhuie19 patrickhuie19 deployed to integration March 5, 2025 20:05 — with GitHub Actions Active
@patrickhuie19 patrickhuie19 merged commit 3bcd92a into main Mar 5, 2025
13 of 15 checks passed
@patrickhuie19 patrickhuie19 deleted the CRE-305-loop-keystore branch March 5, 2025 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants