Add SM2 crypto to your Substrate chain | Substrate Seminar
Parity's Maggie Dong demonstrates Substrate accounts that use alternative cryptographic schemes. She'll show her work adding the sm2 scheme and submitting transactions with subxt.
2:48 Basics of Eliptic Curve Cryptography
based on https://andrea.corbellini.name/2015/05/17/elliptic-curve-cryptography-a-gentle-introduction/
27:57 What is SM2?
30:03 Strategy for integrating SM2 in Substrate
36:56 Implementing Substrate's Crypto Traits
43:00 Runtime interface for calling into STD environment
50:06 Re-defining MultiSigner and MultiSignature
54:23 Demo signing transactions with SM2 subxt
1:05:27 Question about on-chain PKI design
1:13:51 Working as a Blockchain Developer
The repo Maggie showed:
https://github.com/hammeWang/substrate-sm2
SM2 vs ECDSA?
https://crypto.stackexchange.com/questions/9918/reasons-for-chinese-sm2-digital-signature-algorithm
Details about different ECC curves
https://safecurves.cr.yp.to/index.html
The SM2 curve is not on it, but it does contain a lot of info about what makes one curve “good” and another “bad”.
Relevant Rustdocs:
Pair https://crates.parity.io/sp_core/crypto/trait.Pair.html
Public https://crates.parity.io/sp_core/crypto/trait.Public.html
MultiSigner https://crates.parity.io/sp_runtime/enum.MultiSigner.html
MultiSignature https://crates.parity.io/sp_runtime/enum.MultiSignature.html
Substrate-subxt that Maggie uses for submitting transactions https://github.com/paritytech/substrate-subxt
Chris's experimental code, BoxKeys https://gitlab.com/totem-tech/totem-substrate/-/blob/master/node/runtime/src/boxkeys.rshttps://www.youtube.com/watch?v=qaykNPHJcyw
⎼⎼⎼⎼⎼⎼⎼
→ For more videos on blockchain development and building Web 3.0,
subscribe to the channel: https://www.youtube.com/channel/UCSs5vZi0U7qHLkUjF3QnaWg?sub_confirmation=1
→ Website: https://www.parity.io/
→ To stay informed about Parity updates and events,
subscribe to the newsletter: https://www.parity.io/newsletter/
→ Follow us on Twitter (@ParityTech): https://twitter.com/ParityTech
→ Check our code on GitHub: https://github.com/paritytech/