SR25519
The SR25519 precompile provides an interface to verify a message signed with Schnorr sr25519 algorithm.
Web3 Foundation has implemented a Schnorr signature library using the more secure Ristretto compression over the Curve25519 in the Schnorrkel repository. Schnorrkel implements related protocols on top of this curve compression such as HDKD, MuSig, and a verifiable random function (VRF). It also includes various minor improvements such as the hashing scheme STROBE that can theoretically process huge amounts of data with only one call across the Wasm boundary.
The implementation of Schnorr signatures used in Polkadot that uses Schnorrkel protocols over a Ristretto compression of Curve25519, is known as sr25519.
For more context see the Polkadot Wiki.
The verify
function can be used to check that public_key
was used to generate signature
for message
.
Last updated