Threshold ECDSA Signatures

Yes, indeed! :slight_smile:

But, admittedly, this powerful API for public key retrieval has only been possible to be decided on very recently, once we had a clear view of how we could implement it also in the most general deployment scenarios (arbitrarily many master keys on many subnets, any canister being able to use any of the keys etc.). The earlier thinking was that a canister could only query its own public key for exactly the reasons of reasonable implementability of the API in the most general settings we could envision. But that’s resolved now for the very general, powerful, API.


Progress update

We have made lots of progress both with the core threshold ECDSA signing feature as well as the system integration of threshold ECDSA.

Core feature: We are about to finalize the implementation of complaints handling, which is the last big open item for the signing protocol.

System integration: Work has progressed well for the efforts related to the NNS proposals required to create ECDSA master keys, reshare keys, and activate signing for a threshold ECDSA subnet. Some areas where we still have work items open are the following: Key resharing protocol to reshare an ECDSA master key from one subnet to another subnet, tweaks to the management canister API for threshold ECDSA, XNet message routing for ECDSA-related messages, as well as provisioning 34 nodes for a large threshold ECDSA subnet.

Testing / QA: Once we complete the implementation, we have a substantial testing effort as well as internal and external code reviews ahead of us.


Has the post been published? Where can I read it?

1 Like

Progress update

Awesome news! :tada:

Implementation of complaints handling, the last major open part for the core signing feature, has been finished. The core threshold ECDSA feature is now working in an end-to-end manner. @rsubramaniyam and @Manu have demonstrated the feature in last week’s DFINITY Global R&D meeting. :partying_face:

Now we are focussing on getting all the remaining parts of the feature done. See my post above for major items this comprises – system integration and specifically Xnet re-sharing require still quite an effort until completion. An effort on writing a system testing suite has been started in parallel. More updates to follow.


Progress update

The engineering team is still working on the implementation of this feature on multiple fronts: The cryptographic primitives are essentially finished, but there is still an effort required for finalizing the integration of crypto with consensus, e.g., for the X-Net re-sharing of a threshold ECDSA key, as well as some other parts of system integration. For example, the functionality related to the NNS proposals for key management (particularly Xnet re-sharing) still requires some more work to get finalized. A pretty small remaining item will be the integration with DFX which is essentially enabling the feature and generating / loading a key when DFX starts up a replica. Depending on performance measurements, we will need to give performance some attention, but that is currently open.

Another important task coming up is the security review of the consensus-related parts of the code through an external company. This will be started shortly and will help us increase our assurance on the code. We are planning to publish the resulting audit report once the findings have been addressed to share the gained insights with our community.

On the front of the closely-related Bitcoin feature, we have made great progress and will soon be able to run a first beta deployment on an IC subnet (Direct Integration with Bitcoin - #263 by dieter.sommer). So, the puzzle pieces are (slowly) coming together finally to enable a trustless Bitcoin integration unheard of so far on any blockchain!


For those, who have not see this yet: @victorshoup and @JensGroth of the DFINITY Foundation have published their threshold ECDSA work which is the foundation for our threshold ECDSA implementation. You can have a look at the paper uploaded to eprint at the below URL.

Design and analysis of a distributed ECDSA signing service
Jens Groth and Victor Shoup

Have fun! :slight_smile:


oh damn he’s here too, calling you guys morons… can we ban him from the blockchain?


Just ignore him. Eventually, he will get tired when he gets no reaction from anyone here.

1 Like

Progress update

The implementation has further progressed and we think that this or next week we may be ready for a first deployment of the feature on an IC subnet. This deployment will likely not contain the Xnet re-sharing yet, but the core signing algorithm. The purpose of this first deployment is to observe the behaviour of the feature on mainnet and to get operational experience with it before we will release the feature on the NNS and a large dedicated threshold ECDSA subnet.

As of last week, the major open issues to be implemented for a first deployment have been the following:

  • Payload validation to be finished. This is a prerequisite for the protocol to be secure and we won’t release on mainnet even for any form of testing purposes before this has been done.
  • Fixing some issues with Xnet communication for signing requests. Currently, Xnet routing of signing requests and responses still has some glitches.

A further major item that we do not necessarily need for a first deployment, but that is crucial for the overall feature is the following:

  • Xnet re-sharing requires to be end-to-end tested and validated. The protocol itself is implemented (crypto and consensus), but we have not been able to end-to-end validate its correctness.

There are multiple further items that still need to be done, but we are slowly getting there.


Threshold ECDSA System Integration

As promised long time ago, I wanted to give you an overview of the system integration of threshold ECDSA and particularly how we intend to deploy the feature.

New and Updated NNS Proposals for Managing Threshold ECDSA Keys

We needed to define or extend multiple NNS proposals to realize the threshold ECDSA key management functionality required for the intended deployment scenarios.

  • do_update_subnet: Updated proposal that allows for defining that a specific subnet should generate a new threshold ECDSA key with a given key id.
  • create_subnet: Updated proposal that allows for creating a new subnet with a threshold ECDSA key being re-shared from a specified subnet (actually, multiple keys from different subnets could be re-shared to this subnet in the future, the proposal is already generalized to such scenarios). Re-sharing works by the key source subnet computing initial threshold ECDSA dealings encrypted towards the replicas of the target subnet (Phase 1 of the cryptograpihc re-sharing protocol), which are then stored in the CUP for the to-be-created subnet in the Registry. This is all orchestrated by the NNS canisters when executing the create_subnet proposal. Once the new subnet bootstraps, its replicas pick up the initial dealings from the Registry and compute their threshold ECDSA key shares from those initial dealings (Phase 2 of the cryptographic re-sharing protocol).
  • update_ecdsa_signing_subnets: New proposal for enabling / disabling the signing functionality for a subnet for a key id.
  • set_recovery_cup: New proposal for setting the recovery cup with the initial threshold ECDSA dealings of the intended key from the given subnet.
  • A proposal for deleting a given threshold ECDSA key from a subnet.

Note that key ids are pairs comprising the cryptographic group (as variant) and a key identifier (as byte array). Example: (secp256k1, prod_key_1)

Deployment Architecture

Our intended deployment architecture is as follows:

  • We initially want one production threshold ECDSA key (and probably a test key, however, this discussion is about the production key) replicated on two subnets for reasons of key availability.
  • The NNS will hold the production threshold ECDSA key passively, i.e., the NNS will not accept signing requests with this key.
  • A new 34-node subnet will hold the same production threshold ECDSA key and accept signing requests.

Provisioning Flow

Provisioning flow with abstract API calls (the used key name is an example and not defined yet):

  • do_update_subnet(subnet_id=NNS, ... , ECDSA_keys={ (secp256k1, prod_key_1) })
    • The NNS is instructed to create a new threshold ECDSA key with id (secp256k1, prod_key_1) locally.
  • do_create_subnet(nodes={X, Y, Z, ...}, ..., ECDSA_key_source={ (NNS, (secp256k1, prod_key_1) }, ...)
    • Computes ECDSA dealings for nodes X, Y, Z, ... from the existing key (secp256k1, prod_key_1) and stores them in the Registry as part of the genesis CUP (Catch Up Package) for the new subnet to be created, then creates a new 34-node subnet with nodes X, Y, Z, ..., the nodes of which pull the ECDSA dealings from the Registry and finalize the re-sharing protocol to obtain the threshold ECDSA key (secp256k1, prod_key_1) in secret-shared form.
  • update_ecdsa_signing_subnets(A, true, key_id_1)
    • Enables the new 34-node subnet to accept signing requests for the key (secp256k1, prod_key_1).

In case one of the subnets holding the threshold ECDSA key (secp256k1, prod_key_1) is destroyed such the key cannot be reconstructed from the available shares any more and thus needs recovery, we use the set_recovery_cup proposal to create a recovery CUP (Catch Up Package) with ECDSA dealings of the key from which the key shares are computed.

Further Notes

Currently, each subnet can hold a single threshold ECDSA key, future extensions may lift this constraint, e.g., once we need a key in another group or would want multiple keys in the same group. The further may happen sooner than later in order to be able to realize a decentralized CA, which would require one of the secp256r1 groups.

There will be a talk on May 24th in which we will present more details about this topic.

See the attached figure for an overview of the rollout and related key management process.


Join Community Conversation - Threshold ECDSA - (@andrea & @dieter.sommer) on May 24, 2022: Webinar Registration - Zoom


BTW, if you want to start developing a project using the ECDSA feature today, you may want to check out this project GitHub - ninegua/ecdsa_example: An example of using the ECDSA signature feature on IC

It provides a mock implementation to allow deployment both locally and on IC. You can simply change the canister id back to aaaaa-aa after this feature is rolled out on main net.

Both Rust and Motoko examples are provided.



Implementation has been progressing pretty well recently and important work items have been completed, including the following:

  • Open issues with Xnet message routing of signing requests
  • Xnet re-sharing of threshold ECDSA keys is now covered with end-to-end tests (this is a huge achievement of the engineering team)
  • Key deletion (needed during the initial testing phase to gain some operational experience with the feature on IC mainnet)
  • All required NNS proposals
  • System tests

Considering the current state of the implementation, we can expect a first deployment on IC mainnet with a test key by end of the month or in early July. We plan to perform internal testing of the API to test its stability and performance characteristics and, once we have sufficient assurance of this, we open it up for public consumption. We already have a subnet on IC mainnet reserved for this purpose.

Meanwhile, you can program against a mock API in a canister as explained here: Threshold ECDSA Signatures - #165 by PaulLiu

You will hear on this and other channels once we deploy on IC mainnet! Stay tuned!


Progress update

We are nearing completion of the feature for a Beta launch. I would assess that we are currently around 90% - 95% complete for the Chromium / Beta launch.

The plan for the release of the Bitcoin integration feature incl. t-ECDSA is as follows:

  • Chromium (Beta) release in some weeks, target is late June: functionally complete implementation
    • API for Bitcoin testnet Integration available on IC mainnet for public consumption
    • Threshold ECDSA deployment with a test key that will be deleted after a Beta phase available on IC mainnet for public consumption
    • Documentation, videos, and a sample project on how to use the feature
  • GA (general availability) release targeted at ~1-2+ months after Chromium: production-ready implementation
    • API for Bitcoin mainnet Integration available on IC mainnet for public consumption
    • Threshold ECDSA deployment with the production key that will be hosted on two large subnets on IC mainnet for public consumption
    • ckBTC canister

The Chromium (Beta) release will allow the community to build canisters based on the Bitcoin and threshold ECDSA APIs, i.e., create fully-functional integrations with Bitcoin. The GA release provides fixes towards production readiness, e.g., in the areas of performance, and enables Bitcoin mainnet and the final production threshold ECDSA key.

There are some items still to be implemented for the Chromium / Beta release for t-ECDSA, but some of those are too technical to be self explaining without the full context and are not given here. We estimate those to be doable in the coming few weeks. Examples include:

  • Performance & latency benchmarks on realistically-sized subnet
  • Turn feature on by default in the SDK
  • Supporting key id (only 1 for now in consensus)
  • Addressing some security findings from the external code review
  • Signed initial dealings (from xnet resharing)
  • ic-admin commands for re-sharing to be defined based on tests
  • Writing a documentation Web page
  • Recording tutorial videos

For the GA release, the following items are currently on the table:

  • Further benchmarking
  • Performance improvements (if necessary)
  • Further testing
  • Another code review

Thanks for the update. Will there not be a ckBTC canister available for testing in the Beta release?

1 Like

Indeed, the ckBTC canister is just not ready for Beta.
The actual ckBTC canister work still needs to start, the involved teams are busy with the other features currently. One engineer and one researcher are, however, currently working on a library that the ckBTC canister will use to very reliably implement the UTXO and Bitcoin transaction handling, which will be one key part of the canister.
Also, there’s a dependency on the ledger / token standard that is currently being discussed: The ckBTC canister needs to already implement this standard that is not there yet.


I know you know but sometimes reading it from someone else helps: It is urgent not to rush. The impact of being “late” will be ln(1) compared to a faulty implementation…



The implementation of the feature for the Beta / Chromium release scope is nearing completion. Next to wrapping up the feature implementation, we still need to work on example code that shows how to use the feature as well as documentation. Launching the feature with a test key within 1-2 weeks can be very realistic.



The feature is code complete now and we are finishing up the documentation and still need to perform some stress testing in order to make sure everything works as intended when being run on IC Mainnet as well as some benchmarking on Mainnet to get an understanding of the performance of the feature on a 13-node subnet on Mainnet.

We are very close to making the feature available for the general public with a threshold ECDSA test key to be used only for testing purposes.


Excuse me, Can you explain how threshold ECDSA works in solving the problem of on decentralized DNS and decentralized certificate authority?

1 Like