ref-fvm
ref-fvm copied to clipboard
Replace verify_signature with verify_bls_aggregate
We currently have:
verify_signaturefor verifying arbitrary signatures.recover_secp_public_keyfor recovering a secp public key from a secp signature.
Unfortunately, the first one is a bit limited:
- It does hashing internally, which restricts the user to a specific hash function.
- It needs the public key to do verification in the first place, which is why we needed
recover_secp_public_key. - It can't, e.g., validate bls signature aggregates.
Proposal:
- Add a new
verify_bls_aggregate(where the aggregate may have one element). - Remove
verify_signature. - Move all hashing to userspace.
NOTE: this needs a FIP/discussion, but I'm posting the issue here because it'll be important for M2.2.
ALSO NOTE: The correct way to validate an "account's" signature is to use FRC0044.
Hey @Stebalien , Jake and I are looking at this this week. Do we need FFI wiring for this API too, or are you wrapping it internally or something?
We need a new syscall (wasm -> FVM) but nothing in the FFI (lotus -> FVM).
Fixed in #2003 (although we haven't removed the old version).