$3,532.48 0.92%
BTC · 28w

Just released: a WebAssembly version of Bitcoin's Secp256k1 (10x faster than Javascript)

Just released: WebAssembly version of Secp256k1 (10x faster than Javascript)

Bitcoin, Bitcoin Cash, and most other cryptocurrencies use the Elliptic Curve Digital Signature Algorithm (ECDSA) to authenticate transactions. ECDSA can be used with a number of different elliptic curves, and Bitcoin’s creator chose the Koblitz curve Secp256k1 for Bitcoin’s digital signature system.

Secp256k1 is used by most cryptocurrency software

Most software packages which interact with these systems require Secp256k1 support. Mining software must be able to validate that transactions are properly signed before being included in the blockchain. Cryptocurrency wallets must be able to both verify incoming transactions and sign transactions to spend funds.

Many of the most popular cryptocurrency wallets and services are written in JavaScript. For these applications, Secp256k1 signing and validation can be complicated to package, use, and audit – often requiring different build and code paths for the browsers than those required for Node.js – and relatively slow (especially in browser applications).

Get the library on GitHub or NPM

A WebAssembly version of libsecp256k1 is now available on GitHub and via the Node.js package manager, NPM:

npm install --save bitcoin-ts

The API is purely-functional, fully-typed and documented with TypeScript, and accepts and returns native ES2015 typed arrays. Here’s a short example of Low-S signature verification using the library:

The library is written in TypeScript and documented inline, so capable editors will show documentation as you type:

For more usage information, review the code, the tests, or check out the Secp256k1 Interface in the TypeDocs.

Thoroughly tested against existing implementations

Along with standard test vectors and 100% code coverage, the library uses property-based testing to randomly generate thousands of test cases each run, including comparisons of ...

Continue on
Recent news
BTC +0.92% · · 2h

Spend Bitcoin At Target

We are pumped to bring back an old favorite, Target! Starting today you can use Bitcoin to purchase cards for Target through Fold. These cards can be used in-store and online at Users may…
BTC +0.92% · · 4h

Iranian Students Turn To Crypto - Crypto is Coming

The tension between the United States and Iran is nothing new. In 2002, the president at the time, George H.W. Bush, famously referred to Iran as part of the “Axis Of Evil”, a term used to describe a ...
BTC +0.92% · · 4h

Dave Rubin ditches Patreon and shifts to Bitcoin!

Political Commentator and the host of The Rubin Show Dave Rubin recently tweeted that he will be accepting Bitcoin. Recently, the crowdfunding platform Patreon removed Youtuber Carl Benjamin aka “Sarg...
BTC +0.92% · · 22h

A Guide on Closing Your Coinbase Account

When you've outgrown the exchange you may ask yourself how to close your Coinbase account. Following these easy steps will make the process super painless.