-
Notifications
You must be signed in to change notification settings - Fork 390
Closed
Description
There have been a number of requests for suporting various signature verification as "pre-compiles", such as #583 as well as a number of requests in chats. This is an overview ticket to work out what APIs we would like to support. Each individual algorithm should be a separate PR (and maybe a breakout issue). You may also want to address #602 to allow more complex return values in these APIs.
Very important:
- Secp256k1 signature verification base (Add secp256k1_verify API #780)
- Secp256k1 signature verification compatible with Cosmos SDK (Support Cosmos SDK secp256k1 signature verification #752)
- Secp256k1 signature verification compatible with Eth 1.0 (Support Ethereum secp256k1 signature verification #753)
- Secp256k1 signature verification compatible with Bitcoin, Bitcoin forks (Create demo Bitcoin transaction verification #798)
-
Secp256k1 signature verification compatible with EOS? - Ed25519 signature verification compatible with Tendermint block headers (should provide Stellar and Cardano as well as NEAR protocol compatibility) (Support ed25519 signature verification (e.g. Tendermint block headers) #755)
Serious Consideration:
- Batch verification of ed25519 signatures (Batch verification of ed25519 signatures #781)
- sr25519 signature verification commonly used in Polkadot and (passively) supported by Tendermint. schnorkel seems to be needed for Substrate Light Clients (Grandpa). See Chorus One's work as a CosmWasm smart contract (Update from Joe: substrate chains use either ed25519 or sr25519; so addition of the sr25519 crate would be awesome :)
- BLS pairing primitives as needed to allow https://github.com/CosmWasm/drand-verify to be small and fast. In particular support for pairing on the
bls12_381curve. Ideally this is general enough to support ZCash's Jubjub on the same bls12_381 curve
Bonus Points:
- Secp256r1 signature verification: used in EOS, coming in Cosmos SDK v0.42 (found in Android and iOS secure enclaves)
- Secp256k1 schnorr theshhold scheme (verification side), as defined in BIP 340, which seems to be approaching Bitcoin mainnet
- Pairing support that maps to Ethereum ZK-snark support. In particular, supporting similar functionality to EIP 196 and EIP 197 This uses the
alt_bn128curve (maybe the same as bn256?). Reason to support this particular algorithm is the amount of tooling around Ethereum ZK snark contracts, eg. Zokrates, which may be able to be ported to CosmWasm contract. - Various common blockchain hash functions (most are light enough to include in wasm):
- keccak3
- sha2-256
- sha2-512
- ripemd160
- blake2