LogoLogo
WebsiteSubstrate Block ExplorerEVM Block ExplorerFaucet
  • Learn
    • Architecture
    • Staking
      • Proof of stake
    • Smart Contracts
    • Accounts
    • Infrastructure
      • Nodes
      • Agents
      • Models
      • IPFS
    • Security
      • OPOC
      • TSS
      • IPFS Integrity
      • Model Updates Integrity
    • Fees
    • Finney Testnet RPC Endpoints
  • Build
    • Address format
    • ink! Environment
    • Wasm Smart Contracts
      • Smart Contract Stack
      • Domain-Specific Languages (DSLs)
      • ink! Development
      • ask! Development
      • Basic ink! Contract
    • EVM Smart Contracts
      • Introduction to EVM Smart Contracts
      • HardHat
      • Your first EVM Smart Contract
      • Debug EVM Transactions
      • Precompiles
        • SR25519
        • Substrate ECDSA
        • XC20
    • Run a node
      • Run an archive node
        • Binary
      • Run a full node
      • Become a validator
        • Learn about Validators
        • Validator requirements
        • Spin up a validator
        • Set your identity
    • Build an Agent
      • Introduction
      • Development
      • Installing WASP
      • Agents API Reference
      • Available AI Models
Powered by GitBook
On this page
Export as PDF
  1. Build
  2. EVM Smart Contracts
  3. Precompiles

SR25519

PreviousPrecompilesNextSubstrate ECDSA

Last updated 9 months ago

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 see the Polkadot Wiki.

    function verify(
        bytes32 public_key,
        bytes calldata signature,
        bytes calldata message
    ) external view returns (bool);

The verify function can be used to check that public_key was used to generate signature for message.

more context