Pulsars
0 %
Log inSign up

Dividing a secret

The threshold problem (k out of n)

We know how to encrypt a message so that a single person can read it. But how do we protect a collective secret: one that must belong to no one alone, yet that the group must be able to recover?

A bad idea: the copy

The first idea that comes to mind is to give a copy of the secret to each person. This is disastrous:

  • it only takes one person to betray, or to have their copy stolen, for everything to be lost;
  • the more copies there are, the larger the attack surface.

The secret is then no safer than its weakest link.

Another bad idea: naive splitting

We could cut the key into pieces: the first 4 digits to Alice, the next 4 to Bob, and so on. This is better, but still bad:

  • everyone must be gathered to reconstruct — a single absentee blocks everything;
  • each piece reveals part of the secret, which reduces an attacker's work by just as much.

We need a stronger, and more subtle, property.

The (k, n) threshold scheme

Adi Shamir formulates the right goal in 1979. We want to split a secret into n shares distributed to n people, with two simultaneous guarantees:

  • any k shares are enough to reconstruct the secret;
  • k - 1 shares, or fewer, learn nothing at all about the secret.

The number k is the threshold. We speak of a threshold scheme, or a (k, n) scheme.

   Secret S
      |
      |  split into n shares
      v
  +----+----+----+----+----+
  | P1 | P2 | P3 | P4 | P5 |     n = 5 shares distributed
  +----+----+----+----+----+
       \    \   /   /
        any 3 shares         -->  S reconstructed   (threshold k = 3)
        2 shares or fewer    -->  no information

What it is really for

This scheme addresses concrete needs where trust must rest on no single person:

Situation n k Idea
Company vault 5 executives 3 No single executive opens it; a majority is enough
Launch keys 2 officers 2 Both people are required, never just one
Crypto wallet 5 devices 3 Losing 2 devices is not fatal, stealing 2 is not enough
Certificate authority root 7 guardians 5 Ceremony requiring several people present

Fault tolerance as a bonus

The threshold brings a valuable bonus: resilience. With n = 5 and k = 3, we can lose two shares (a broken device, an unavailable person) and still reconstruct. The secret survives failures while resisting partial betrayals.

Summary

  • Copying or naively splitting a secret is dangerous: each piece leaks information, or requires everyone to be present.
  • A (k, n) threshold scheme distributes n shares such that k are enough to reconstruct, and k - 1 learn nothing.
  • It separates trust among several people and tolerates the loss of n - k shares.