mpcium icon indicating copy to clipboard operation
mpcium copied to clipboard

Re-Sharing security question

Open jcalfee opened this issue 1 year ago • 8 comments

I realized there is something unclear in the original tss-lib documentation (front page docs at least). If t (threshold) parties collude it means, of course, any party can sign. However, can they recover the private key? This has long-term implications after Re-Sharing (Use the resharing.LocalParty to re-distribute the secret shares). If they can't recover the private key then their old position is of no concern. If they can, however, then the present setup could be compromised by old parties that left the network.

This should be front page news in my opinion. I overlooked this until I slept on this and realized I was making assumptions about the protocol.

Thank you! And thank you for the TypeScript client..

jcalfee avatar Jul 01 '25 12:07 jcalfee

You're absolutely right to raise this point , it's a critical detail with significant security implications, especially in long-term MPC deployments.

Yes, if t or more parties collude, they can indeed reconstruct the private key, not just sign.

This has direct implications for resharing and participant churn:

If an old set of t parties collude after resharing, they can compromise the key, even though they are no longer actively part of the signing group.

It's important to design the system in a way that prevents malicious actors from ever controlling a threshold of shares. In that sense, tss-lib is better suited for environments with authenticated and authorized nodes, rather than anonymous or permissionless participants. Since any t parties can reconstruct the key, using TSS in open or adversarial settings without proper identity and access control introduces significant risk.

anhthii avatar Jul 02 '25 14:07 anhthii

One soluion is to use: Key Encapsulation with Membership Proof Use Verifiable Secret Sharing (VSS) or Authenticated Key Exchange (AKE) such that:

The share is encrypted to a participant during DKG

The participant must prove identity and authorization (e.g.,via, OIDC, signature challenge, etc.)

Without re-authentication, the share is inaccessible

This could be implemented as:

share_i = Enc(PK_i, raw_share)

where PK_i is a public key unique to party i, tied to a permissioned registry.

anhthii avatar Jul 02 '25 14:07 anhthii

I would like to make it easy to verify the chain state (a recent block + merkle root for example). I was entertaining the idea that a timestamp could be used in a BIP32 derivation path, then that same timestamp signed and given to any wallet or device to verity. The wallet can trust its own clock, a pre-loaded BIP32 public chain code, and derive the one time public key that will check the signed proof it just received.

I'm not sure it will help to require a participant to prove identity and authorization in this case though, because the private shares are still left usable and old nodes that left the network can skip the authentication after it obtains its share from the permission registry.

Along these lines though, maybe it would be feasible to create a smaller chain that would small create blocks just for tracking the authorized nodes. Even if this ran at 1 block per hour, it could still support a merkle root and some other faster blockchain or blockchain like structure. The point is, there is a smaller chain that can prove out which nodes are trusted.

For this proof of authority chain, lets say 100 nodes sign with a t=100 key. If one node leaves, everyone else signs with their t=99 key (t is less if more than one nodes leaves). After any nodes change, keys at t levels 51 and above get re-created and are recorded in the next proof of authority block. All the nodes seek to restore signing at t=100 asap. At all times, 51 DKG keys are needed because any number of nodes could disappear, but any lower than 51 a majority or split network and signing needs to be halted anyways. Thanks to the DKG and TSS, this will be a much smaller chain to download and keep up with. The network could sign more frequently than is necessary and do other things to help avoid nodes changing due to short amounts of down time (reboot for example). I can't see anyway to compress periods of time without reducing the security of the network though. I'm stuck downloading an entire chain, the best I know to do is make this as small as possible.

jcalfee avatar Jul 03 '25 00:07 jcalfee

I find that running a full blockchain just for tracking authorized nodes might be overkill. One alternative worth exploring is using Merkle-tree signed checkpoints , essentially an append-only log of group configurations (e.g., membership sets, public keys). Each update produces a new Merkle root, which you can sign using the same tss-lib threshold key.

anhthii avatar Jul 04 '25 15:07 anhthii

you can design in a way that only when the node participate in the network, it could decrypt the share otherwise the share is encrypted at rest. Before each session, a handshake is established to exchange the secret to encrypt the share. Node B use secret of node B (s_b) to encrypt share of Node A -> (cihper_a) so when Node A left , It only has the cippher_a and can't do anything unless it has the secret (s_b) which is not possible

anhthii avatar Jul 04 '25 15:07 anhthii

still this way cannot prevent a dishonest node from logging the share after decryption so might need to combine with TEE + Remote attestation to verify if a party is honest.

Ther are multiple solutions for your problems so good luck on finding the right one.

anhthii avatar Jul 04 '25 16:07 anhthii

Interesting.. Node B and B sounds like the same issue though. I'm trying to drill away at the foundation for a while to see what can be done. The reason to have a light weight chain is to prove it from both sides:

  1. there is a change and
  2. there is no change

If you don't prove there was no change then we are more vulnerable to an attack from the past: old nodes can quickly fabricate as much fake future history as they want to. I want to allow for "quickly" because I think the problem can be solved efficiently (adding proof of work is what I want to avoid). So, having a very minimally sized proof that no configuration changes have taken place every hour / day, etc. (depending on your risk profile) is adding value. We can't even link larger blocks of no changes together and skip the ones in the middle (old nodes can fake that). Finally, transactions need to hash with a recent chain state so the transactions validate the current configuration as well.

If you can simplify that, I think it will be better then what is out there now (that I know of). So much has changed, I appreciate your input on this. TSS can help a a little, it can make the proofs much smaller. If feels more modular to me. This should be the root "merkle master" where it does not store anything other than what is necessary and a single global merkle hash for the chain state.

Also, remember, having many TSS keys at each threshold gives a better proof as to exactly how many nodes signed. If I recall, TSS obfuscates which nodes signed; it could be useful to track that.

jcalfee avatar Jul 05 '25 19:07 jcalfee

Thanks for answering the question...

jcalfee avatar Jul 18 '25 17:07 jcalfee