-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
pkg/types/core/keystore.go
Outdated
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? |
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.
are you going to implement something more here?
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.
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.
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.
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
.
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.
TLS x509 is the only usage currently, for Mercury/LLO.
f5a1056
to
0b9672b
Compare
0b9672b
to
42aa7a3
Compare
42aa7a3
to
6a59f5c
Compare
smartcontract-it.atlassian.net/browse/CRE-305
Supports: