Closed UMR1352 closed 2 weeks ago
Unfortunately implementing pre-hash verification for for our EdDSA verifier is not as straight forward. At the moment there's only one Rust crate that allows Ed2219 pre-hash verification - i.e. ed25519-dalek but the requirements to call its validate_prehashed
are way too strict.
The data to be verified must be passed to the function as a type D: Digest
where Digest
requires 4 more traits in order to be implemented.
After some discussion with the team we decided to ditch this feature as we want the JWS verifiers we provide with the library to only support verification of spec-compliant signatures (e.g. ES256 -> P256 + SHA256 and no other hashing algorithm).
We still do support the verification of custom signatures through our JwsSigner
trait.
Description of change
Enable pre-hash verification for EcDSA verifier. Small refactor for JWS verifiers.
Links to any relevant issues
Fixes issue #1418
Type of change
How the change has been tested
Ran tests
Change checklist