Blockstream Research Brings libsecp256k1-zkp Back Up to Speed
2.5 years of upstream enhancements now out there for Liquid’s superior cryptography
Blockstream Research has accomplished a big upkeep milestone: bringing libsecp256k1-zkp totally up to date with 2.5 years of enhancements from upstream libsecp256k1. This library underpins the cryptographic basis of Liquid Network, Elements, and Blockstream’s functionary infrastructure.
Maintaining Bitcoin’s Cryptographic Core
libsecp256k1 is Bitcoin’s cryptographic basis. Every Bitcoin transaction you have ever made depends on this library for signature verification. When Bitcoin Core built-in libsecp256k1 in 2016 (changing OpenSSL), it delivered 2.5x to 5.5x efficiency enhancements for signature verification, making Bitcoin nodes sooner and safer at validating the blockchain.
Members of Blockstream Research co-maintain libsecp256k1. Jonas Nick (Director of Research) and Tim Ruffing (Cryptographic Engineer) are maintainers of the library that secures the Bitcoin mainnet. Every Bitcoin Core node runs code they preserve to confirm ECDSA signatures and, because the Taproot improve, Schnorr signatures. This is vital infrastructure work for Bitcoin itself.
However, Bitcoin mainnet is conservative by design. Advanced cryptographic options like Confidential Transactions, multisignature schemes with adaptor signature help, and zero-knowledge proofs do not exist in Bitcoin’s consensus guidelines. That’s the place libsecp256k1-zkp is available in.
What Is libsecp256k1-zkp?
libsecp256k1-zkp is Blockstream’s fork of libsecp256k1 that extends the bottom library with superior cryptographic primitives. The “zkp” suffix refers to zero-knowledge proofs and associated methods – cryptographic strategies that allow you to show statements about knowledge with out revealing the information itself.
Think of it this fashion: Bitcoin Core makes use of libsecp256k1 for cryptographic operations required within the Bitcoin community. Liquid Network makes use of libsecp256k1-zkp for those self same operations plus superior options that allow privateness and effectivity past what the Bitcoin mainnet helps.
The library consists of:
Confidential Transactions and Zero-Knowledge Proofs
- Pedersen commitments: Hide transaction quantities whereas permitting verification
- Range proofs: Prove a price is constructive with out revealing it
- Surjection proofs: Prove asset sort relationships privately
- Address whitelisting
Advanced Signature Schemes
- ECDSA adaptor signatures: For cost channels and atomic swaps
- Schnorr signature half-aggregation
This is what powers Liquid Network’s Confidential Transactions, permits the federated peg mechanism, and supplies cryptographic primitives for Blockstream’s enterprise merchandise.
Where It’s Used
libsecp256k1-zkp is deployed throughout Blockstream’s stack and the broader Liquid ecosystem:
- Elements Core: Foundation of Liquid Network
- Functionary infrastructure: Securing Liquid’s federated peg (host and HSM parts)
- Wally/libwally: Used by Core Lightning, Jade {hardware} wallets, AMP, Blockstream App
- LWK (Liquid Wallet Kit): Powers the Blockstream app, Blockstream Enterprise, AMP2, and Liquid ecosystem purposes
- Blockstream Explorer API: Powers block exploration and transaction unblinding for Liquid
- Simplicity: Smart contract language on Liquid makes use of libsecp256k1-zkp for cryptographic operations
Every pockets, trade, and software constructing on Liquid is determined by this library for superior cryptographic options.
What Changed: 2.5 Years of Improvements
Blockstream Research has merged 2.5 years of upstream enhancements from libsecp256k1:
Security Enhancements:
- API features now use a considerably extra strong technique to clear secrets and techniques from the stack earlier than returning, bettering safety in opposition to potential reminiscence assaults.
Performance Improvements:
- SDMC (Signed-Digit Multi-Comb) algorithm: 15-20% sooner signing and public key era
- Strauss algorithm optimization: 30% discount in reminiscence utilization for multi-point elliptic curve multiplication operations (authored by Jonas Nick)
- Batch level conversion optimization: New secp256k1_ge_set_all_gej operate improves MuSig2 and ECDSA Adaptor module efficiency (authored by Tim Ruffing)
Testing Infrastructure:
- New unit take a look at framework with parallel take a look at execution, selective take a look at operating, and named command-line arguments — dramatically bettering developer expertise and take a look at protection
Performance Benchmarks
Blockstream Research ran complete benchmarks evaluating libsecp256k1-zkp efficiency earlier than and after the upstream merge. Benchmarks have been carried out on a MacBook Air (M1, 2020) with 8 GB RAM operating macOS 14.1.2. The outcomes display measurable enhancements throughout core cryptographic operations, MuSig2 workflows, and zero-knowledge proofs.
Core Cryptographic Operations:
| Operation | Before | After | Improvement |
| ECDSA Signing | 22.9 μs | 19.9 μs | 13% sooner |
| Key Generation | 15.1 μs | 12.7 μs | 16% sooner |
| Schnorr Signing | 16.1 μs | 13.6 μs | 16% sooner |
The SDMC (Signed-Digit Multi-Comb) algorithm delivers 15-20% efficiency features for signing and key era operations that occur hundreds of thousands of instances throughout the Bitcoin and Liquid ecosystems.
MuSig2 Multisignature Operations:
| Operation | Before | After | Improvement |
| Nonce Generation | 94.5 μs | 69.3 μs | 27% sooner |
| Nonce Aggregation | 5.84 μs | 1.85 μs | 68% sooner |
| Nonce Processing | 29.1 μs | 23.6 μs | 19% sooner |
| Partial Signing | 220 μs | 178 μs | 19% sooner |
| Complete Signing | 175 μs | 141 μs | 19% sooner |
Zero-Knowledge Proof Primitives:
| Operation | Before | After | Improvement |
| ECDSA S2C Signing | 38.8 μs | 33.6 μs | 13% sooner |
| ECDSA Adaptor Encryption | 89.9 μs | 80.3 μs | 11% sooner |
| Surjection Proof Generation | 69.5 μs | 65.0 μs | 7% sooner |
Even privacy-preserving operations like adaptor signatures and surjection proofs (utilized in Confidential Assets) see measurable enhancements.
These benchmarks characterize real-world efficiency features for each pockets, trade, and software constructing on Liquid. Faster signing means sooner transaction building. Faster MuSig2 means extra environment friendly Lightning channels.
The Maintenance Work
For 2.5 years, libsecp256k1-zkp had fallen behind upstream libsecp256k1’s steady enhancements. Blockstream Research engineers Mariia Zhvanko and Illia Melnyk accomplished the great sync work, integrating these upstream modifications and bringing the fork again to parity.
This upkeep work required resolving conflicts between upstream enhancements and zkp-specific modules, updating assessments to guarantee compatibility with experimental options, and verifying nothing breaks for downstream initiatives. The sync included updating libsecp256k1-zkp’s MuSig2 implementation to match the upstream model (which was initially developed in zkp by Jonas Nick earlier than being ported to Bitcoin Core in October 2024), then re-adding adaptor signature help that exists solely within the zkp fork.
This illustrates an vital level: Blockstream Research isn’t simply passively merging upstream modifications into libsecp256k1-zkp. As Jonas Nick and Tim Ruffing are maintainers of upstream libsecp256k1, they creator most of the enhancements themselves. When they optimize the Strauss algorithm or implement batch level conversion for Bitcoin Core, those self same enhancements instantly profit Liquid and your complete ecosystem constructing on libsecp256k1-zkp. Mariia and Illia’s sync work ensures these enhancements stream to zkp whereas preserving the superior cryptographic modules that make Liquid’s privateness and performance doable. This is what it means for Blockstream Research to preserve vital infrastructure at each layers.
Post-Quantum Cryptography Research
While libsecp256k1-zkp focuses on elliptic curve cryptography for manufacturing use at this time, Blockstream Research can also be making ready for a post-quantum future. The group just lately deployed post-quantum signature verification on Liquid using Simplicity, permitting customers to defend their Liquid Bitcoin in opposition to future quantum laptop assaults.
This demonstrates Blockstream Research’s method: preserve manufacturing cryptography for Bitcoin and Liquid at this time whereas creating the cryptographic schemes that can safe Bitcoin tomorrow.
Why Maintenance Matters
Cryptographic libraries do not get factors for flashy options. They succeed by being right, quick, and maintainable. libsecp256k1 turned Bitcoin’s customary as a result of it prioritizes safety and efficiency. It’s written in C with no exterior dependencies, makes use of constant-time algorithms to resist timing assaults, and has been battle-tested defending billions of {dollars} on the Bitcoin mainnet.
libsecp256k1-zkp inherits that rigor whereas including help for confidential transactions and superior signatures that make Liquid’s privateness and effectivity doable. Keeping present with upstream means each challenge constructing on Liquid advantages from the identical safety requirements that defend Bitcoin Core.
Open Source for the Ecosystem
libsecp256k1-zkp is open supply and freely out there on Github.
Blockstream Research maintains it not only for our personal merchandise however for your complete Liquid ecosystem and anybody constructing superior Bitcoin purposes. This replace ensures builders working with Confidential Transactions, MuSig2, or different superior cryptographic primitives have entry to present, quick, and safe foundations.
Active work on each libsecp256k1 for Bitcoin Core and libsecp256k1-zkp for Liquid is a part of Blockstream Research’s dedication to Bitcoin infrastructure. It’s the unglamorous, important work that retains the ecosystem operating.
For extra on Blockstream Research, go to blog.blockstream.com/research
To study libsecp256k1’s function in Bitcoin, learn Bitcoin Magazine’s “The Core Issue: libsecp256k1, Bitcoin’s Cryptographic Heart”
