Closed brandonros closed 1 year ago
What's your use case?
Like ECDSA, we use systems that sign digests. ES224, ES256, ES384, ES512 work well with this.
PureEdDSA prefers the original message. It would be awesome to have Ed25519ph that conforms to same design pattern as ECDSA.
I would also add, the latest FIPS draft is requiring ed25519ph support.
G̶o̶ ̶1̶.̶1̶9̶ Go 1.20 will implemented this: https://github.com/golang/go/issues/31804. PyNaCl is also working on high level support.
How should the ph api look like to be simple?
As far as API, how about signDigest
and verifyDigest
?
Looking at this line:
export { getPublicKey, sign, verify, utils, CURVE, Point, ExtendedPoint, RistrettoPoint };
The exported would become:
export { getPublicKey, sign, verify, signDigest, verifyDigest, utils, CURVE, Point, ExtendedPoint, RistrettoPoint };
Edit: I was also thinking "signPH" and "verifyPH" might be more descriptive for those already familiar with Ed.