Unverified Commit b371c357 authored by drskalman's avatar drskalman Committed by GitHub
Browse files

Fix `ecdsa_bls` verify in BEEFY primitives (#2066)



BEEFY ECDSA signatures are on keccak has of the messages. As such we can
not simply call

`EcdsaBlsPair::verify(signature.as_inner_ref(), msg,
self.as_inner_ref())`

because that invokes ecdsa default verification which perfoms blake2
hash which we don't want.

This bring up the second issue makes: This makes `sign` and `verify`
function in `pair_crypto` useless, at least for BEEFY use case.
Moreover, there is no obvious clean way to generate the signature given
that pair_crypto does not exposes `sign_prehashed`. You could in theory
query the keystore for the pair (could you?), invoke `to_raw` and
re-generate each sub-pair and sign using each. But that sounds extremely
anticlimactic and will be frow upon by auditors . So I appreciate any
alternative suggestion.

---------

Co-authored-by: default avatarDavide Galassi <[email protected]>
Co-authored-by: default avatarRobert Hambrock <[email protected]>
parent 689b9d91
Pipeline #413261 passed with stages
in 49 minutes and 8 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment