By the end of today’s lecture, you will learn:
Last time, we began our exploration of the Byzantine Broadcast problem. In this question:
attack
or to retreat
(or 0
or 1
, or any other binary choice).There are a total of \(n\) parties, including the leader.
However, the generals cannot gather in a single location. They can only send messages back and forth to each other, one at a time.
This restriction is similar to how the Internet works today.
“The Internet is just the world passing notes in a classroom.”
– Jon Stewart
Even worse, a subset of \(f\) generals (possibly including the leader) may secretly malicious. The malicious generals don’t care about the attack
vs retreat
decision; instead, their goal is to break consensus.
Our goal is to design a protocol – that is, a method that each party can use to decide what messages to send and to whom – that guarantees the following properties.
(We sometimes omit a discussion of the termination property when it is clear by construction.)
Note that our security guarantees only protect the honest parties. That’s because we have no idea what the malicious parties will do:
This is a common feature of all of the security guarantees we will see throughout this course: we only strive to protect the honest parties. In particular: if the leader is malicious, we still insist that the honest parties reach a consistent decision. It doesn’t matter whether the decision is 0 or 1, as long as they all agree.
Last time, we also discussed several possible types of assumptions that we could make about the communication network.
Finally, we concluded the last lecture by constructing the Dolev-Strong protocol. This protocol allows \(N\) parties to solve the Byzantine Broadcast problem in the following settings:
The key idea of Dolev-Strong is to pass along signature chains of messages signed and countersigned by lots of parties.
The Dolev-Strong protocol guarantees termination, consistency, and validity even if any subset \(f \leq n\) of the parties are malicious. However, the protocol is slow: it requires \(f + 1\) rounds of communication to reach consistency.
Dolev-Strong protocol is an elegant protocol for broadcast in the face of adversaries. So why don’t we use it as the basis for a cryptocurrency like Bitcoin?
There are many answers to this question, but one important reason is the need for trusted setup.
Remember that Dolev-Strong assumes the existence of a public key infrastructure… that is, a mapping from public keys to identities.
You can think of a PKI as similar to a telephone directory, just for cryptographic public keys rather than telephone numbers.
Relying on a PKI can be dangerous and unstable!
Still though, if we had a PKI then it is a powerful tool, because it allows the signatures to be transferrable. To explain this property, consider the following scenario with three parties: Far, Les, and Mor.
But without signatures, a party’s claims about statements made by another party are not verifiable.
Example. Consider the following attempt at creating a Byzantine Broadcast where the two possible messages are M
and L
. In this case, Les is unable to tell the difference between the following two activities:
If we had a PKI, then we could settle this discrepancy with digital signatures.
In other words:
So far, we have only shown that one specific two-round protocol fails to meet the consistency property of Byzantine Broadcast. But in fact this problem turns out to be impossible in general!
Also, it is not a coincidence that my (informal) counterexample above had 3 parties, of whom 1 was malicious. If we had four parties in the picture instead, we could have distinguished between the two possibilities of a malicious Far and a malicious Mor.
Question. How could we do this?
Great, so let’s try to build a Byzantine Broadcast protocol without using trusted setup like a PKI!
Unfortunately, that’s difficult to do.
Theorem. In a plain pairwise authenticated channel model without any setup assumptions such as a PKI, Byzantine Broadcast is impossible if at least \(n/3\) parties are malicious – that is, if \(n \leq 3f\).
This theorem was first proven by Pease, Shostak, and Lamport in 1980, and the proof was later simplified by Fischer, Lynch, and Merritt in 1985. Today, we’ll look at the FLM85 impossibility proof.
As a reminder, here are the three properties that Byzantine Broadcast is supposed to satisfy with a synchronous network.
Proof. We will only describe why this theorem holds in the case of \(n = 3\) parties. The theorem does generalize for any choice of \(n\), although we won’t prove it.
Consider any protocol \(\Pi\) (taking any number of rounds) involving 3 parties F
, L
, and M
, where F
is the leader. Suppose for the sake of contradiction that \(\Pi\) is a 3-party protocol that achieves Byzantine Broadcast.
Note that each party is expecting to talk to two others – let’s say one party on its left and another party on its right.
So in order to describe the protocol \(\Pi\), it suffices to write computer programs that explain how each of F
, L
, and M
react to messages received from its left or right neighbors. The programs should codify what the party computes, who to talk to next, and what message to send.
Now let’s do something strange: let’s say there are actually 6 parties arranged in this hexagonal grid.
As far as each individual party is concerned, to them it looks the same as before: they can talk with one party on their left, and another party on their right. So these parties can also execute the protocol \(\Pi\)!
Suppose we initiate this network with F
sending the message 0 and F'
sending the message 1. What happens next?
Using the consistency and validity rules, let’s look at what happens to the two parties on the top left of the hexagon, L
and M
, when one party is malicious.
Suppose that the leader F
is malicious and both L
and M
are honest. Then, by the consistency property on the L
-M
-F
triangle it must be the case that M
and L
decide the same value.
Suppose that L
is malicious. Since the leader F
is honest, in the same L
-M
-F
triangle it must be the case that M
decides 0.
Suppose that M
is malicious, and now look at the M
-L
-F'
triangle instead. Since the leader is honest, by the validity property it must be the case that L
decides 1.
But these three statements are in contradiction! So no such protocol \(\Pi\) can exist that satisfies consistency and validity. This completes the proof.
This contradiction would not have been possible if there were a PKI. In this case, we could not have two parties F
and F'
both acting in the role of the leader, because the honest parties could verify signatures to disinguish between the two.
To recap: Byzantine Broadcast becomes much harder without trusted setup like a PKI.
This leads to the question: so can we actually construct a Byzantine Broadcast protocol with \(f < n/3\) malicious parties?
The good news is that the answer is yes.
In the remainder of today’s lecture, we will construct a Byzantine Broadcast protocol that provides termination, consistency, and validity in the following setting:
Here is the high-level idea of the protocol that we will construct today, which is called the phase-king protocol.
In order to turn this idea into a fully-specified Byzantine Broadcast protocol:
Gradecast
.Gradecast
as a useful building block within the full phase-king protocol.Let there be \(n\) parties, which we label as \(P_1, P_2, \ldots, P_n\). The Gradecast
protocol is not about broadcasting a value. Instead it is about checking or verifying whether the parties have reached consensus about the value.
The grades reflect party \(P_i\)’s belief in the mutual knowledge of \(v\)… in the same way that the teacher provided mutual information to the muddy children. Here are the possible grades.
Our goal is to design a protocol that allows the parties to reach similar levels of confidence, in the sense that their grades will differ by at most one.
In more detail, we want to design the Gradecast
protocol to have the following security guarantees.
Knowledge of Agreement: If an honest party outputs a value with grade 2, then all honest parties output this value. That is: we will have mutual knowledge, even if some parties are not yet convinced.
Validity: If all honest parties have the same input value, then all of them output this value with grade 2. In this case, we will have a higher degree of common knowledge of \(v\) – every honest party knows it, and knows that the other parties know it.
Here is how we can build a Gradecast
protocol.
This protocol is shown from the perspective of a single honest party \(P_i\). Remember that all honest parties perform the same procedure, whereas malicious parties can do whatever they want.
input: each party P_i holds a message v_i
Round 1: party P_i sends v_i to all parties (including party P_i itself)
Round 2: if party P_i receives the message b from n-f distinct parties in round 1,
then send b to all parties (including party P_i itself)
else send nothing
output: if n-f distinct parties sent b to party P_i in round 2,
then output b with grade 2
else if f+1 distinct parties sent b to party P_i in round 2,
then output b with grade 1
else output v with grade 0
At first glance, it might appear that this pseudocode is not well-defined.
In round 2: what if an honest party hears two different messages \(b\) and \(b'\) from \(n-f\) distinct parties in round 1? Then it isn’t clear what party \(P_i\) should do, since we would like honest parties only to send one message in round 2.
At the output stage: what if an honest party \(P_i\) hears two different messages \(b\) and \(b'\) from \(n-f\) distinct parties in round 2? Or what if \(P_i\) hears two different messages from \(f+1\) distinct parties in round 2? Then it isn’t clear what party \(P_i\) should do, since parties are only allowed to reach one output decision.
Fortunately, it turns out that all of these issues will never happen!
Question. Can you see why?
As a hint: remember that \(n \geq 3f + 1\), and that the \(n-f\) honest parties (whoever they are) will send the same value to everyone in a particular round. Only the \(f\) malicious parties might send different messages to different parties.
Let’s show that this Gradecast
protocol achieves validity and knowledge of agreement, as long as \(n \geq 3f+1\).
We begin with validity, which if you recall is defined as:
If all honest parties have the same input value, then all of them output this value with grade 2.
Theorem. The Gradecast
protocol satisfies validity.
It is slightly more complicated to prove the knowledge of agreement property. As a starting point, let’s prove the following lemma.
Lemma. No two honest parties send conflicting round 2 messages.
Proof of lemma. Suppose for the sake of contradiction that there exist two honest parties \(P_i\) and \(P_j\) such that:
By the pigeonhole principle:
However, honest parties send only one value in round 1. So this is a contradiction, and it must not be the case that two honest parties can receive enough conflicting round 1 messages in order to send conflicting round 2 messages.
Now we can prove the knowledge of agreement property, which states:
If an honest party outputs a value with grade 2, then all honest parties output this value.
Theorem. The Gradecast
protocol satisfies knowledge of agreement.
Finally, let’s construct a new Byzantine Broadcast protocol based on Gradecast
.
This new protocol is called the phase-king protocol. The name comes from the fact that the main idea is for everyone to take a turn being the “king.” (There are actually many variations of the phase-king protocol; I will present just one of them in this class.)
The phase-king protocol proceeds in a sequence of \(f+1\) phases, each of which requires 3 rounds of interaction.
In each phase, one party is chosen to be the king and gets to select a value \(v\) to send to the others. The real leader \(P_1\) is the first king, and then party \(P_2\), then \(P_3\), and so on. When a party receives this value:
Gradecast
grade of 2 – then they ignore the current king.Here is some pseudocode that describes this protocol in detail. It is written from the perspective of a single party \(P_i\). As always: each honest party runs the same code.
We assume that they have already agreed upon a convention for which party to label as \(P_1\) (this should be the leader), \(P_2\), \(P_3\), and so on.
input: v # at the start, only the leader has an input; everyone else is clueless
# initialize the variable grade
grade = 0
for each phase j from 1 to f+1:
# first round of the phase
party P_j sends its value to all parties (other parties send nothing)
if grade < 2,
then v := value received from party P_j
# remaining two rounds of the phase
(v, grade) := Gradecast(v)
output:
at the end of round 3(f+1), output v
This protocol achieves our goals for Byzantine Broadcast.
Theorem. The phase-king protocol achieves termination, validity, and consistency.
Proof. This protocol clearly terminates after \(3(f+1)\) rounds.
To see that validity holds:
Proving the consistency property is a bit more complicated. Recall that we anoint \(f+1\) different kings, in sequence. Since there are only \(f\) malicious parties, at least one king is honest.
Let \(P_j\) denote the first honest king. We’re going to split our discussion into three parts.
The end of phase \(j-1\) (before \(P_j\)’s turn as the king):
During phase \(j\):
In the remaining phases:
This completes the proof of consistency.
Let’s conclude today by looking at the efficiency of the phase-king protocol. It may have been (relatively!) easy to describe, but unfortunately it is not the fastest protocol at performing the task of Byzantine Broadcast.
Phase-King requires \(3(f+1)\) rounds of interaction. This is a factor of \(3\) times slower than the best possible outcome of \(f+1\) rounds (and this lower bound follows from precisely the same issue with common knowledge that Dolev-Strong had).
Phase-King requires \(O(n^3)\) messages to be exchanged between the parties. It turns out that there are alternative ways to perform Byzantine Broadcast that only require \(O(n^2)\) messages – that is, about the number of messages required for each of the parties to communicate with the others.
Finally, let’s compare the Dolev-Strong protocol with the new Phase-King protocol, in terms of the underlying assumptions:
|
Dolev-Strong |
Phase-King |
---|---|---|
Synchronous network |
YES | YES |
PKI |
YES |
NO |
Number of malicious parties |
\(f \leq n\) | \(f \leq \frac{n-1}{3}\) |
Number of rounds |
\(f+1\) | \(3(f+1)\) |
Next time, we’ll discuss how to solve the broadcast problem when the network is unreliable and we cannot rely on the synchrony assumption either.
DS 653 — Lecture 10