Quiz Entry - updated: 2026.07.14
How many keys are needed for symmetric encryption with $n$ participants, and why?
$\frac{n(n-1)}{2}$ keys are needed, because every pair of participants needs a unique shared secret.
* Pairwise symmetric keys grow quadratically; asymmetric key pairs grow linearly. *
For $n$ participants communicating pairwise:
- Each participant needs a key with every other participant
- Each participant has $n - 1$ keys
- But each key is shared by 2 people, so:
$$\text{Keys} = \frac{n \cdot (n-1)}{2}$$
Example: For $n = 100$ participants:
$$\frac{100 \times 99}{2} = 4{,}950 \text{ keys}$$
This is $O(n^2)$ growth, which becomes impractical at scale. This "key distribution problem" is one of the main motivations for asymmetric cryptography.
Note: If keys are directional ($K_{AB} \neq K_{BA}$), the count doubles to $n(n-1)$.
Go deeper:
Key management — why quadratic key growth drives real-world key-distribution design.