ChainSafe / gossamer

🕸️ Go Implementation of the Polkadot Host
https://chainsafe.github.io/gossamer
GNU Lesser General Public License v3.0
428 stars 110 forks source link

Implement sr25519 signature algorithm and ext_sr25519_verify #171

Closed noot closed 4 years ago

noot commented 5 years ago

Info: https://wiki.polkadot.network/en/latest/polkadot/learn/cryptography/ https://en.wikipedia.org/wiki/Schnorr_signature

Polkadot uses sr25519 as its default signing scheme, which is custom to substrate and has only been implemented in rust. The scheme is Schnorr signatures over curve25519.

noot commented 5 years ago

we are gonna use cgo to import this https://github.com/Warchant/sr25519-crust these are c bindings for the original rust implementation https://github.com/w3f/schnorrkel

zmanian commented 4 years ago

We have implementations of

Merlin and Ristretto255 in native golang

https://github.com/gtank/merlin

https://github.com/gtank/ristretto255

This make implementing sr25519 fairly trivial