← index

Flattening Nested 2-of-2 Of a 1-of-1 And a k-of-n

An archive of delvingbitcoin.org · view original topic →

ZmnSCPxj jxPCSnmZ · #1 ·

Title: Flattening Nested 2-of-2 Of a 1-of-1 And a k-of-n

Note

It is possible to flatten the below into a single-layer quorum signing group:

This is done by simply requiring that the “single signer” participant holds multiple shares in a larger non-nested k-of-n group.

To determine the flattened k-of-n and the number of shares the single signer has:

flattened_k = n + 1
flattened_n = 2 * n - k + 1
single_signer_shares = n - k + 1

Here are a few concrete examples:

Derivation

The key here is flattened_k = n + 1. This assures us that the group of n participants cannot overpower the priveleged single signer, thus always requiring the participation of the priveleged single signer, as in the original 2-of-2 of the single signer plus the k-of-n quorum signers.

From there, we need to ensure that the group of n participants all just retain having one share in the group, but the priveleged single signer needs to fill in more than one share. As the original is k, then the priveleged single signer logically has to get the difference between the flattened_k and k, or in other words, single_signer_shares = flattened_k - k = n + 1 - k = n - k + 1.

single_signer_shares cannot be less than that as then even k of the quorum signers plus the single signer would not even achieve flattened_k. If it were more than that, then the priveleged single signer could overpower the quorum signers by choosing less than k of the quorum signers to achieve flattened_k.

There are still n participants in the quorum signing group, and the priveleged single signer has single_signer_shares, so adding them together gives us the total new number of shares for the flattened group: flattened_n = n + single_signer_shares = n + n - k + 1 = 2 * n - k + 1.

Applications

Adam Gibson · #2 ·

Thanks for the writeup.

A refreshing piece of pure logic instead of that dirty cryptography and coding stuff :slight_smile:

I agree with your formulas. It’s fairly simple in hindsight, but I’d guess a lot of people might never think of looking for it.

I guess it’s worth mentioning that we are not so fortunate for any other structure, like “A of B and C of D” generalized (the thresholds overlap so you can’t get it to cover all possibilities), or “1 of 1 or A of B” (unless I missed something these are impossible to flatten). As you point out, this particular structure is actually practically useful.

Interesting anecdotes. I am against TEEs in principle, you apparently have literally dirtied your hands on the topic, so I guess I’m glad to see you agree. In the absence of such (dirty or otherwise) hands-on, I’ll just keep going with my airy fairy abstract principles and say I don’t really trust hardware wallets not because they’re constructed with physical circuits but because they’re bitcoin specific devices, basically … with or without 1-round cut and choose :laughing: