sui icon indicating copy to clipboard operation
sui copied to clipboard

crypto: Add r1 ecrecover and verify to Move

Open joyqvq opened this issue 2 years ago • 2 comments

What changed

ecdsa_k1::ecrecover(sig, hashed_msg, hash_function) -> ecdsa_k1::secp256k1_ecrecover(sig, msg, hash_function) ecdsa_k1::secp256k1_verify(sig, pk, hashed_msg) -> ecdsa_k1::secp256k1_verify(sig, pk, msg, hash_function) new: ecdsa_r1::secp256k1_ecrecover(sig, msg, hash_function) new: ecdsa_r1::secp256k1_verify(sig, pk, msg)

See md file for detailed descriptiosn.

What to do

Caller of these APIs required to provide the raw message instead of the hashed message, and provide the hash_function name (represented by u8, move does not have a concept of enum)

joyqvq avatar Jan 27 '23 16:01 joyqvq

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
explorer ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 21, 2023 at 4:50PM (UTC)
explorer-storybook ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 21, 2023 at 4:50PM (UTC)
frenemies ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 21, 2023 at 4:50PM (UTC)
wallet-adapter ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 21, 2023 at 4:50PM (UTC)

vercel[bot] avatar Jan 27 '23 16:01 vercel[bot]

@jonas-lj @kchalkias PTAL - this requires ecrecover and verify for both k1/r1 to take in a hash_function u8 param. and require the msg to be a raw msg.

joyqvq avatar Feb 17 '23 16:02 joyqvq