Cryptography Explainer

This is a high-level overview of the cryptography used in Polkadot. It assumes that you have some knowledge about cryptographic primitives that are generally used in blockchains such as hashes, elliptic curve cryptography (ECC), and public-private keypairs.

For detailed descriptions on the cryptography used in Polkadot please see the more advanced research wikiarrow-up-right.

Hashing Algorithmarrow-up-right

The hashing algorithm used in Polkadot is Blake2barrow-up-right. Blake2 is considered to be a very fast cryptographic hash function that is also used in the cryptocurrency Zcasharrow-up-right.

Keypairs and Signingarrow-up-right

Polkadot uses Schnorrkel/Ristretto x25519 ("sr25519") as its key derivation and signing algorithm.

Sr25519 is based on the same underlying Curve25519arrow-up-right as its EdDSA counterpart, Ed25519arrow-up-right. However, it uses Schnorr signatures instead of the EdDSA scheme. Schnorr signatures bring some noticeable benefits over the ECDSA/EdDSA schemes. For one, it is more efficient and still retains the same feature set and security assumptions. Additionally, it allows for native multisignature through signature aggregationarrow-up-right.

The names Schnorrkel and Ristretto come from the two Rust libraries that implement this scheme, the Schnorrkelarrow-up-right library for Schnorr signatures and the Ristrettoarrow-up-right library that makes it possible to use cofactor-8 curves like Curve25519.

Last updated