Byzantine agreement (Cadence SMV)

(Cachin, Kursawe & Shoup)

Contents

Introduction:

Cadence SMV is a proof assistant which supports several compositional methods methods [McM98, McM99, MQS00]. These methods allow the verification of large, complex, systems by reducing the verification problem to small problems that can be solved automatically by model checking. Cadence SMV provides a variety of such techniques including induction, circular compositional reasoning, temporal case splitting and data type reduction.

The version of Cadence SMV we have used is 08-20-01p1.

The Protocol:

The Cadence SMV model of the ABBA protocol closely follows that given in [CKS00], although some modifications were necessary to the original which we outline below. We use the data type ordset to model the round numbers of the protocol, which are unbounded, and to prove the correctness of the protocol for any number of parties, or, in other words, for all values of n and t such that n < 3t.

The description of the randomized Byzantine agreement protocol of [CKS00] in Cadence SMV, can be found here (also as a pdf file here).

Assumptions:

A number of assumptions were made in order to perform the verification including the correctness of the cryptographic primitives. The remaining assumptions concern fairness statements (which ensure that parties eventually cast votes), and technicalities that, due to the limitations of the ordset data type, we were unable to prove in Cadence SMV. In particular, since variables of different ordset data types cannot be compared, we cannot show that ``if at least k honest parties cast their votes in a round then there are at least k votes'', as distinct data types represent the set of honest parties and number of votes respectively.

First, we have assumptions which correspond to the fact that there cannot be n-2t honest votes for two distinct values in any round. These properties follow from the fact if this was not true there would be at least:

(n−2t)+(n−2t)=n−t+(n−3t)>n−t(n-2t) + (n-2t) = n-t+(n-3t) > n-t

honest parties which is a contradiction since there are only n-t honest parties.

In the Agreement proof the premise is that no party has decided before round r, therefore, under fairness, all honest parties eventually cast their votes in round r. Therefore, we assume:

Similarly, since all parties continue for one more round after they decide, we assume that:

For Validity, since under fairness all parties eventually cast their votes in round 0, we assume:

Finally, for Fast Convergence the premise is that a party enters round r. Now, if this party does not decide in round r, then by the Agreement property no party decides before round r and since all parties continue for one more round after deciding, under fairness all parties enter round r+1. If a party decides in round r, then by Agreement all parties must decide by round r+1, and since the party did not decide before round r+1, it must decide in round r+1. On the other hand, if no party decides before round r, then since all parties continue for one more round after they decide, under fairness all parties enter round r+2. Therefore we assume that:

Similarly, we assume that:

Validity: if all parties have the same initial value, then any party that decides must decide on this value.

The proof of validity can be found here (also as a pdf file here) and the output from Cadence SMV here.

Agreement: if r is the first round in which an honest party decides, then all honest parties that eventually decide, must decide on the same value in either round r or r+1.

The proof of agreement can be found here (also as a pdf file here) and the output from Cadence SMV here.

Fast Convergence: the probability that an honest party advances more than 2r+1 rounds is bounded above by 2-r.

The proof of this property involves a manual argument based on properties (P1 - P6) that are proved automatically in Cadence SMV. First we proved that, for any party that enters round r+1 and does not decide in round r:

In addition, we proved that the following properties hold.

The Cadence SMV proofs of P1-P4 can be found here (also as a pdf file here) and the output from Cadence SMV here. The proofs of P5-P6 can be found in the additional invariants section (see lemma9 and coin2 respectively).

We complete the proof of Fast Convergence with a simple manual proof. First we require the following lemma.

Lemma 1 For any party that enters round r+1:

Proof. Now suppose that a party enters round r+1 and does not decide in round r, then by Agreement no party decides before round r. Now since all parties continue for one more round after deciding, under fairness all parties cast their votes in round r, and hence the coin for round r is flipped and (a) holds. If in addition the party does not decide in round r+1 then by Agreement no party decides before round r+1. Then since all parties continue for one more round after deciding, under fairness all parties cast their votes in round r+1, and hence the coin for round r+1 is flipped and (b) holds.   ∎

We next introduce the following classification of protocol states:

If follows from P4 that these sets are pairwise disjoint and any state where the coin in round r-1 is not tossed is a member of one of these sets. The following proposition is crucial to establishing the efficiency of the protocol.

Proposition 1. In an idealised system, where the value of the coins in rounds 1,2,...,2r-1 are truly random, the probability of a party advancing by more than 2r+1 rounds is bounded above by 2-r.

Proof. We prove the proposition by induction on r. The case when r=0 is trivial since the probability bound is 1. Now suppose that the proposition holds for some r a suppose a party enters round 2r+1. If a party decides in round 2r, then by Agreement all parties will decide by round 2r+1, and hence the probability that a party enters round 2r+3 given a party enters round 2r+1 is bounded above by 0. On the other hand, if no party decides in round 2r, then by Lemma 1 the coin for round 2r is tossed. For any state s reached just before the coin is tossed we have two cases to consider:

Putting this together and since P(A & B) = P(A | B) * P(B), we have the probability of a party advancing more than 2r+3 rounds equals:

   = P(a party advances > 2r+3 rounds and a party advances > 2r+1 rounds)
   = P(a party advances > 2r+3 rounds | a party advances > 2r+1 rounds) * P(a party advances > 2r+1 rounds)
   ≤ 1/2 * 2-r
   = 2-(r+1)     as required.   ∎

It can be argued that in a real system the probability of a party advancing by more than 2r+1 rounds is bounded above by 2-r + e, where e is negligible. This follows from the unpredictability of the coin tossing scheme and P6; for more details see [CKS00].

Additional Invariants:

In all the above proofs certain invariants are assumed. The proof of these additional invariants can be found here (also as a pdf file here) and the output from Cadence SMV here.