ref-fvm icon indicating copy to clipboard operation
ref-fvm copied to clipboard

Replace verify_signature with verify_bls_aggregate

Open Stebalien opened this issue 2 years ago • 4 comments

We currently have:

  • verify_signature for verifying arbitrary signatures.
  • recover_secp_public_key for 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:

  1. Add a new verify_bls_aggregate (where the aggregate may have one element).
  2. Remove verify_signature.
  3. Move all hashing to userspace.

Stebalien avatar Dec 20 '22 19:12 Stebalien

NOTE: this needs a FIP/discussion, but I'm posting the issue here because it'll be important for M2.2.

Stebalien avatar Dec 20 '22 19:12 Stebalien

ALSO NOTE: The correct way to validate an "account's" signature is to use FRC0044.

Stebalien avatar Dec 20 '22 19:12 Stebalien

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?

cryptonemo avatar Jul 17 '23 17:07 cryptonemo

We need a new syscall (wasm -> FVM) but nothing in the FFI (lotus -> FVM).

Stebalien avatar Jul 17 '23 17:07 Stebalien

Fixed in #2003 (although we haven't removed the old version).

Stebalien avatar May 08 '24 20:05 Stebalien