
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@scure/sr25519
Advanced tools
Audited & minimal implementation of sr25519 (polkadot) cryptography, with Merlin and Strobe
Audited & minimal JS implementation of sr25519 cryptography for Polkadot.
scure — audited micro-libraries.
npm install @scure/sr25519
deno add jsr:@scure/sr25519
We support all major platforms and runtimes.
import * as sr25519 from '@scure/sr25519';
const signature = sr25519.sign(pair.secretKey, msg);
const isValid = sr25519.verify(msg, polkaSig, pair.publicKey);
const secretKey = sr25519.secretFromSeed(seed);
const publicKey = sr25519.getPublicKey(secretKey);
const sharedSecret = sr25519.getSharedSecret(secretKey, publicKey);
// hard
const secretKey = sr25519.HDKD.secretHard(pair.secretKey, cc);
const publicKey = sr25519.getPublicKey(secretKey);
// soft
const secretKey = sr25519.HDKD.secretSoft(pair.secretKey, cc);
const publicKey = sr25519.getPublicKey(secretKey);
// public
const publicKey = sr25519.HDKD.publicSoft(pubSelf, cc);
const signature = sr25519.vrf.sign(msg, pair.secretKey);
const isValid = sr25519.vrf.verify(msg, sig, pair.publicKey);
We implement only the parts of these protocols that sr25519 requires.
@polkadot/utils-crypto{publicKey, privateKey}, we always return only privateKey,
you can get publicKey via getPublicKeyThe library has been independently audited:
If you see anything unusual: investigate and report.
Low-level operations are done using noble-curves and noble-hashes. Consult their README for more information about constant-timeness, memory dumping and supply chain security. A few notes:
Benchmark results on Apple M4:
secretFromSeed x 493,827 ops/sec @ 2μs/op
getSharedSecret x 1,135 ops/sec @ 880μs/op
HDKD.secretHard x 54,121 ops/sec @ 18μs/op
HDKD.secretSoft x 4,108 ops/sec @ 243μs/op
HDKD.publicSoft x 4,499 ops/sec @ 222μs/op
sign x 2,475 ops/sec @ 403μs/op
verify x 955 ops/sec @ 1ms/op
vrfSign x 442 ops/sec @ 2ms/op
vrfVerify x 344 ops/sec @ 2ms/op
Comparison with wasm:
secretFromSeed wasm x 21,615 ops/sec @ 46μs/op
getSharedSecret wasm x 6,681 ops/sec @ 149μs/op
HDKD.secretHard wasm x 16,958 ops/sec @ 58μs/op
HDKD.secretSoft wasm x 16,075 ops/sec @ 62μs/op
HDKD.publicSoft wasm x 16,981 ops/sec @ 58μs/op
sign wasm x 16,559 ops/sec @ 60μs/op
verify wasm x 6,741 ops/sec @ 148μs/op
vrfSign wasm x 2,470 ops/sec @ 404μs/op
vrfVerify wasm x 2,917 ops/sec @ 342μs/op
npm install to install build dependencies like TypeScriptnpm run build to compile TypeScript codenpm run test will execute all main testsThe MIT License (MIT)
Copyright (c) 2024 Paul Miller (https://paulmillr.com)
See LICENSE file.
FAQs
Audited & minimal implementation of sr25519 (polkadot) cryptography, with Merlin and Strobe
The npm package @scure/sr25519 receives a total of 12,896 weekly downloads. As such, @scure/sr25519 popularity was classified as popular.
We found that @scure/sr25519 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.