Tl;dr: We built the first open-source library that allows the Solana blockchain to incorporate Threshold Signature Scheme (TSS) technology and interact with crypto wallets like ZenGo. We believe our TSS technology, which enables a user-friendly experience by eliminating the burdens associated with owning a private key, is critical to supporting Solana’s mass adoption. Solana joins public blockchains like Bitcoin, Ethereum, Binance Coin, Tezos and Terra who have similar TSS libraries. View our demo, below!
At ZenGo, we’ve been at the forefront of blockchain security and how Threshold Signature Schemes (TSS) can enhance the native capabilities of blockchains.
A Threshold Signature Scheme removes the burden of a single atomic private key, splitting the generation of keys and key management responsibilities between multiple parties. Today we share the details on adding TSS support for the Solana blockchain.
Solana is one of the fastest growing ecosystems in crypto, with many projects spanning DeFi, NFTs, Web3 and more. Solana’s growth has also helped it become one of the top 10 cryptoassets by market capitalization as of this publication.
With Solana’s continued growth, we believe ZenGo’s Threshold Signature Scheme implementation is pivotal to achieve responsible and secure key management for the masses.
In this post, we breakdown the details of our TSS for Solana as executed and implemented by our blockchain research team.
Threshold Signature Scheme (TSS)
A Threshold Signature Scheme (TSS) removes the burden of the single atomic private key and splits the responsibility of key generation and key management between multiple parties.
In a threshold signature scheme, a set of ‘n’ participating parties which will be responsible for key generation, management and signing will interactively generate an m-of-n secret sharing of a single atomic key. Each participating party generates its own secret and uses it to distributively sign a transaction without revealing the secret to the other parties. For a high-level overview of TSS, please refer to our blog post: Threshold Signatures: The Future of Private Keys.
The ZenGo team has invested significant efforts and resources implementing TSS and making the scheme compatible and reusable for blockchains and digital signatures algorithms. This compatibility allows us to rapidly onboard and add TSS support to new blockchains.
ZenGo has implemented Threshold Signature Scheme (TSS) support for public chains like Bitcoin, Ethereum, Binance Coin (BNB), Zilliqa (ZIL), Libra, Tezos, Terra and others and we are always looking to extend our TSS support to other blockchains and projects.
We’ve chosen Solana for the following reasons:
- Trust in our project: The Solana Foundation has awarded ZenGo a research grant to promote the use of TSS with Solana
- Timing and mass distribution: Solana is a global public blockchain that aims to bring a user-friendly blockchain experience to millions. We believe our TSS technology, which enables a user-friendly experience by eliminating the burdens associated with owning a private key, is critical to mass adoption.
- Web3: In ZenGo we are firm believers in Web3 technology and Solana is most certainly one of the most interesting and developing arenas for Web3.
- Technical maturity: To implement a TSS wallet with a blockchain requires a mature developer environment. Solana network had all the needed ingredients in its testnet:
- A public testnet with a faucet so we could test everything without risking money.
- A blockchain explorer so that we could confirm our transactions were successfully recorded on the blockchain.
- Access to a testnet provided via API and an Open source SDK was far easier than setting up a full node.
The open-source SDK
Solana is a blockchain protocol that provides the fundamental infrastructure for a decentralized economy and enables open participation in the creation of new financial primitives to power the innovation of money.
The Solana blockchain supports advanced features, including BPF smart contracts and use Proof of History for achieving consensus.
Because our TSS is blockchain agnostic, it can easily integrate with this unique architecture and support all messages, related to both simple and smart contracts’ based transactions. This compatibility has allowed us to complete our PoC using MuSig2 over Ed25519 in a matter of days without a need for extensive or lengthy “integration” support from the Solana side.
We implemented an asynchronous signing process, which is a requirement in our use case for signing over the network. We used the Solana SDK and incorporated TSS generation and signing, providing a CLI tool for users. Here, each party generates its own secret share, and validates the shares of the other parties and the transaction that they’re signing.
- Generation: We have altered the original Solana centralized key generation algorithm so that the public key can be generated non-interactively by any of the parties. Of course, this part does not prove anything, as any random string can be successfully converted into an address. The real challenge is to sign a transaction from this address.
- Signing: The main change was in the signing function. We implemented MuSig2 and changed how the message was exported so that it was jointly signed by our TSS CLI tool. The Solana SDK allowed us to easily implement the abstract signing functionality with our TSS signer.
Our implementation can be accessed directly using the command-line, as shown in the demo below, or by including the code in other Solana projects.
This tool implements generating Solana addresses, checking balances, requesting an airdrop from a faucet on Testnet/Devnet, and doing n-of-n signing.
TSS is needed even if Solana supports MultiSig
It’s worth noting that even though Solana supports smart contracts that may allow users to add multi-signature security, there are still distinct advantages to using TSS. One main advantage is TSS transactions look exactly the same as regular transactions. Unlike MultiSig transactions, the TSS “magic” is applied in the mathematical layer, not in the application layer.
- If MultiSig is realized through smart contracts, additional fees may be incurred for smart contract execution. Furthermore, MultiSig smart contract functionality might be challenging to verify, as shown in the multiple incidents suffered by some Ethereum-based MultiSig smart contracts.
- The control mechanism is not exposed to the world: With TSS, the signing parties are never revealed. Therefore, adversaries cannot learn about the various parties or their control structure, nor can they monitor changes to them.
Concluding thoughts and future plans
It was gratifying for our team to add TSS support to such a valuable and ambitious team looking to truly set money free laying the groundwork for open financial infrastructure. By leveraging our previous experience with generic TSS infrastructure, creating a developer-ready Solana TSS version was relatively straightforward.
However, our work with TSS is not yet done. We plan to extend this project by working with the Solana community to provide TSS support for more advanced use cases in the future. We’re open-sourcing our SDK to encourage developers to incorporate it into their Solana projects. As always, we welcome feedback and peer review to make our code even better.
For any requests or feedback send us a message at [email protected] or reach out via Twitter DM.