A few weeks ago, we shared a blog post about the first ever Zilliqa Threshold Signatures Scheme (TSS) transaction. Today, we are open-sourcing the code to the community so that everyone can create such TSS transactions.
A great leap forward! $ZIL is now one of the first coins that can be controlled via Treshold Signature Scheme (TSS) for #Schnorr signatures. Huge congratulations to the @Zengo for making this happen! #noprivatekey #blockchain #security Read more here: https://t.co/ZmT4GIUFnH pic.twitter.com/1TL8wa8z4S— Zilliqa (No airdrops or ETH giveaways) (@zilliqa) April 9, 2019
By using TSS, we remove the burden of having a single atomic private key and split the responsibility between multiple parties.
In this blog post, we at Zengo would like to share some details about this project executed by our blockchain research team.
Threshold Signatures Scheme (TSS) removes the burden of the single atomic private key and splits the responsibility between multiple parties.
Each of the parties generates its own secret and uses this secret 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)
For this Proof-of-Concept (PoC) project we used our open source implementation of TSS for Schnorr signatures
We have invested a lot of resources in implementing TSS and making it compatible and reusable for different kinds of blockchains and Digital Signatures Algorithms . This compatibility allows us to rapidly onboard and add TSS support to new blockchains.
At KZen, we have already implemented Threshold Signatures Scheme (TSS) support for Bitcoin, Ethereum, and Binance and wanted to experiment with other coins.
We choose ZIL mainly for the following main reasons:
It’s worth noting that even though Zilliqa supports Schnorr Multi-Signatures (MultiSig) and smart contracts which allow users to add multi-party security, there are still distinct advantages to using TSS. One main advantage is that TSS transactions look exactly the same as regular transactions. Unlike with MultiSig transactions, the TSS “magic” is applied in the mathematical layer and not in the application layer:
The fact that Zilliqa has funded the KZen research team demonstrates their interest in integrating TSS functionalities with Zilliqa.
The Zilliqa blockchain network is innovative, introducing concepts such as sharding to support transactions and smart contracts at scale. However, because TSS is blockchain agnostic, it is able to easily integrate with this unique architecture. This compatibility is what allowed us to complete this PoC in one day with no need for “integration” on the Zilliqa side. Using the aforementioned SDK, we first made sure we could generate a normal transaction. Next, we modified the SDK in a crude manual manner to provide Proof-of-Concept for sending TSS transactions. Lastly, we forked and modified the original SDK to properly integrate it with our TSS Schnorr library and to enable a polished way to generate a TSS key and sign a transaction. This is what we are announcing today.
Applying TSS key generation and signing to Zilliqa’s SDK
Of course, this part does not prove anything as any random string can be successfully converted into an address. The real challenge now is to sign a transaction from this address.
During this part, we identified that Zilliqa uses a slightly different variant of the Schnorr signatures (compared to Bitcoin’s BIP-Schnorr ) and we updated our Schnorr TSS library accordingly to accommodate this variation.
We use a client and server architecture. The server acts solely as the co-signer in the two-party protocol and holds no logic specific to Zilliqa.
You can play with the SDK using the command-line, as shown in the demo below.
Naturally, you can interact with the SDK via your code.
launching the server:
Using the client (API is almost identical to original Zilliqa JS library):
All in all, it was very rewarding for us to add TSS support to a relevant crypto asset. It only took us several working hours to create the initial PoC and a few more working days to make it developer-ready by leveraging our previous experience with generic TSS infrastructure.
Our work with TSS is not done. We plan to continue to extend this project in the future. We will also continue to bring TSS to other chains and coins.