Documentation

CslibFrontier.Computability.Distributed.Byzantine.DolevStrong

Dolev–Strong authenticated synchronous broadcast #

In the unauthenticated synchronous model (Cslib.Distributed.Byzantine.Protocol), Byzantine agreement requires n > 3t processes (NodeBound). With unforgeable digital signatures, the (t + 1)-round protocol of Dolev and Strong (§4, Theorem 3, pp. 662–663) solves single-sender Byzantine broadcast against up to t Byzantine faults for every finite process set P and every t—even when t ≥ n - 1—while each correct process sends at most two signed chains along each outgoing edge across the entire execution.

Model and protocol-variant choices #

Authenticated synchronous model #

A SignedChain P V pairs a candidate value value : V with a list signers : List P of process identities (ordered outermost-first, with dealer at the root getLast? in dolevStrong). An AuthProtocol P V State dealer gives dealer an initial state from its input input : V, gives every other process an input-independent initial state, and in each round r + 1 delivers lists of signed chains via the shared faulty-versus-honest selector AuthProtocol.selectMsg before updating local states.

AuthProtocol.Unforgeable.exists_send_of_mem_signers combines WellSigned and Unforgeable: in any well-signed protocol against an unforgeable adversary, any received chain carrying a correct process k's signature witnesses that k itself emitted a signature for that value at or before the current round (and strictly before it whenever the sender is not k).

The Dolev–Strong protocol #

Each process maintains DolevStrongState P V, storing extracted : List V (capped at length ≤ 2) and toRelay : List (SignedChain P V) queued for the next round:

Correctness and communication complexity #

Main definitions #

Main results #

References #

structure Cslib.Distributed.Byzantine.SignedChain (P : Type u_1) (V : Type u_2) :
Type (max u_1 u_2)

A signed broadcast message carrying a root value and a list signers of processes whose signatures are attached to it.

  • value : V

    Broadcast value at the root of the signature chain.

  • signers : List P

    Processes whose signatures are attached to this chain (outermost-first in dolevStrong).

theorem Cslib.Distributed.Byzantine.SignedChain.ext {P : Type u_1} {V : Type u_2} {x y : SignedChain P V} (value : x.value = y.value) (signers : x.signers = y.signers) :
x = y
@[instance_reducible]
def Cslib.Distributed.Byzantine.instDecidableEqSignedChain.decEq {P✝ : Type u_1} {V✝ : Type u_2} [DecidableEq P✝] [DecidableEq V✝] (x✝ x✝¹ : SignedChain P✝ V✝) :
Decidable (x✝ = x✝¹)
structure Cslib.Distributed.Byzantine.AuthProtocol (P : Type u_1) (V : Type u_2) (State : Type u_3) (dealer : P) :
Type (max (max u_1 u_2) u_3)

A deterministic synchronous signed-message broadcast protocol on P over value domain V with distinguished broadcaster dealer.

Only dealer receives the broadcast input (initDealer); all other processes start in initOther i, independent of the input. In round r + 1 (step r), process j in state s sends send r j s i to i, and i moves to update r i s m, where m j is the list of chains received from j. Process i's decision in state s is output i s.

  • initDealer : V → State

    Initial state of dealer given its input value.

  • initOther : P → State

    Initial state of a non-dealer process i.

  • send : ℕ → P → State → P → List (SignedChain P V)

    send r j s i: signed chains sent by j in state s to i in round r + 1.

  • update : ℕ → P → State → (P → List (SignedChain P V)) → State

    update r i s m: state of i after round r + 1 upon receiving m j from each j.

  • output : P → State → V

    Decision value read from process i's local state.

def Cslib.Distributed.Byzantine.AuthProtocol.selectMsg {P : Type u_1} {V : Type u_2} {S : Type u_3} {dealer : P} [DecidableEq P] (π : AuthProtocol P V S dealer) (F : Finset P) (adv : ℕ → P → P → List (SignedChain P V)) (r : ℕ) (σ : P → S) (src i : P) :

Faulty-versus-honest message selector at step r under global state σ: faulty processes in F inject adv r src i, while correct processes send π.send r src (σ src) i.

def Cslib.Distributed.Byzantine.AuthProtocol.state {P : Type u_1} {V : Type u_2} {S : Type u_3} {dealer : P} [DecidableEq P] (π : AuthProtocol P V S dealer) (F : Finset P) (adv : ℕ → P → P → List (SignedChain P V)) (input : V) :
ℕ → P → S

Local state of process i after r rounds on dealer input input when processes in F are faulty and send adv r j i in round r + 1.

def Cslib.Distributed.Byzantine.AuthProtocol.receivedAt {P : Type u_1} {V : Type u_2} {S : Type u_3} {dealer : P} [DecidableEq P] (π : AuthProtocol P V S dealer) (F : Finset P) (adv : ℕ → P → P → List (SignedChain P V)) (input : V) (r : ℕ) (src i : P) :

Chains delivered from src to i in round r + 1 (step r).

def Cslib.Distributed.Byzantine.AuthProtocol.decision {P : Type u_1} {V : Type u_2} {S : Type u_3} {dealer : P} [DecidableEq P] (π : AuthProtocol P V S dealer) (F : Finset P) (adv : ℕ → P → P → List (SignedChain P V)) (input : V) (R : ℕ) (i : P) :
V

Decision of process i after R rounds.

def Cslib.Distributed.Byzantine.AuthProtocol.WellSigned {P : Type u_1} {V : Type u_2} {S : Type u_3} {dealer : P} [DecidableEq P] (π : AuthProtocol P V S dealer) :

Honest signature discipline: whenever π.send for process j at step r emits a chain c, every signer k ∈ c.signers with k ≠ j appeared on a chain for c.value that j received in some earlier step r' < r.

def Cslib.Distributed.Byzantine.AuthProtocol.Unforgeable {P : Type u_1} {V : Type u_2} {S : Type u_3} {dealer : P} [DecidableEq P] (π : AuthProtocol P V S dealer) (F : Finset P) (input : V) (adv : ℕ → P → P → List (SignedChain P V)) :

Adversarial unforgeability: in round r + 1 (step r), a faulty process j ∈ F can only include a correct process k ∉ F in c.signers if k genuinely emitted a chain for c.value carrying k's signature in some earlier step r' < r.

theorem Cslib.Distributed.Byzantine.AuthProtocol.Unforgeable.exists_send_of_mem_signers {P : Type u_1} {V : Type u_2} {S : Type u_3} {dealer : P} [DecidableEq P] {π : AuthProtocol P V S dealer} (hws : π.WellSigned) {F : Finset P} {input : V} {adv : ℕ → P → P → List (SignedChain P V)} (hunf : π.Unforgeable F input adv) (r : ℕ) (src i : P) (c : SignedChain P V) :
c ∈ π.receivedAt F adv input r src i → ∀ k ∈ c.signers, k ∉ F → ∃ (r' : ℕ), (r' < r ∨ r' = r ∧ src = k) ∧ ∃ (dst : P), ∃ c' ∈ π.send r' k (π.state F adv input r' k) dst, c'.value = c.value ∧ k ∈ c'.signers

Signature provenance. In a well-signed protocol against an unforgeable adversary, whenever process i receives a chain c from src at step r containing a correct signer k ∉ F, process k genuinely emitted a chain for c.value carrying k's signature either at an earlier step r' < r, or at step r itself with src = k.

structure Cslib.Distributed.Byzantine.AuthProtocol.SolvesAuthenticatedBroadcast {P : Type u_1} {V : Type u_2} {S : Type u_3} {dealer : P} [DecidableEq P] (π : AuthProtocol P V S dealer) (t R : ℕ) :

π solves synchronous authenticated broadcast against up to t Byzantine faults in R rounds: π is well-signed, all correct processes agree after R rounds against any unforgeable adversary of size at most t, and when dealer is correct they decide dealer's input.

  • wellSigned : π.WellSigned

    Honest transitions never forge signatures of other processes.

  • agreement (F : Finset P) : F.card ≤ t → ∀ (adv : ℕ → P → P → List (SignedChain P V)) (input : V), π.Unforgeable F input adv → ∀ i ∉ F, ∀ j ∉ F, π.decision F adv input R i = π.decision F adv input R j

    Agreement: all correct processes decide the same value after R rounds.

  • validity (F : Finset P) : F.card ≤ t → dealer ∉ F → ∀ (adv : ℕ → P → P → List (SignedChain P V)) (input : V), π.Unforgeable F input adv → ∀ i ∉ F, π.decision F adv input R i = input

    Validity: if dealer is correct, all correct processes decide input after R rounds.

theorem Cslib.Distributed.Byzantine.AuthProtocol.SolvesAuthenticatedBroadcast.mono {P : Type u_1} {V : Type u_2} {S : Type u_3} {dealer : P} [DecidableEq P] {π : AuthProtocol P V S dealer} {t t' R : ℕ} (h : π.SolvesAuthenticatedBroadcast t R) (ht : t' ≤ t) :

Tolerating t faults implies tolerating t' ≤ t faults.

def Cslib.Distributed.Byzantine.AuthProtocol.correctMessagesSent {P : Type u_1} {V : Type u_2} {S : Type u_3} {dealer : P} [DecidableEq P] (π : AuthProtocol P V S dealer) [Fintype P] (F : Finset P) (adv : ℕ → P → P → List (SignedChain P V)) (input : V) (R : ℕ) :

Total point-to-point signed chains emitted by correct processes (∉ F) across all recipients over the first R rounds.

The Dolev–Strong protocol #

structure Cslib.Distributed.Byzantine.DolevStrongState (P : Type u_1) (V : Type u_2) :
Type (max u_1 u_2)

Local process state in the Dolev–Strong protocol: at most two extracted candidate values and the newly cosigned chains queued to forward in the next round.

  • extracted : List V

    Distinct values extracted from valid chains so far (capped at length ≤ 2).

  • toRelay : List (SignedChain P V)

    Chains cosigned in the most recent round to be forwarded in the next round.

theorem Cslib.Distributed.Byzantine.DolevStrongState.ext {P : Type u_1} {V : Type u_2} {x y : DolevStrongState P V} (extracted : x.extracted = y.extracted) (toRelay : x.toRelay = y.toRelay) :
x = y
@[instance_reducible]
def Cslib.Distributed.Byzantine.instDecidableEqDolevStrongState.decEq {P✝ : Type u_1} {V✝ : Type u_2} [DecidableEq P✝] [DecidableEq V✝] (x✝ x✝¹ : DolevStrongState P✝ V✝) :
Decidable (x✝ = x✝¹)

Decision rule for dolevStrong: output v when extracted is the unique singleton [v], and fall back to v₀ when zero or at least two values were extracted.

@[reducible, inline]
abbrev Cslib.Distributed.Byzantine.dolevStrongEligible {P : Type u_1} {V : Type u_2} (dealer i : P) (r : ℕ) (s : DolevStrongState P V) (c : SignedChain P V) :

Step-eligibility predicate for dolevStrong (Dolev and Strong, §4, Theorem 3, pp. 662–663): at step r (phase r + 1), process i in state s accepts an incoming chain c iff c is rooted at dealer (c.signers.getLast? = some dealer), has exact phase length c.signers.length = r + 1 with Nodup signers excluding i, carries a fresh value c.value ∉ s.extracted, and s.extracted has not yet reached its two-value cap.

def Cslib.Distributed.Byzantine.dolevStrongStepOnce {P : Type u_1} {V : Type u_2} [Fintype P] [LinearOrder P] [DecidableEq V] (dealer i : P) (r : ℕ) (m : P → List (SignedChain P V)) (s : DolevStrongState P V) :

Extract at most one new eligible value (from the minimum sender j offering one) and prepend its cosigned chain to s.toRelay. Running this twice per round suffices because s.extracted is capped at length 2.

def Cslib.Distributed.Byzantine.dolevStrongRound {P : Type u_1} {V : Type u_2} [Fintype P] [LinearOrder P] [DecidableEq V] (dealer : P) (t : ℕ) (i : P) (r : ℕ) (s : DolevStrongState P V) (m : P → List (SignedChain P V)) :

One round of local state update for dolevStrong at step r ≤ t.

def Cslib.Distributed.Byzantine.dolevStrong (P : Type u_1) (V : Type u_2) [Fintype P] [LinearOrder P] [DecidableEq V] (dealer : P) (v₀ : V) (t : ℕ) :

The Dolev–Strong (t + 1)-round authenticated broadcast protocol (Dolev and Strong, §4, Theorem 3, pp. 662–663), with broadcaster dealer, default fallback value v₀, and fault bound t.

This formalization enforces dealer-rooted exact-phase-length chains (dolevStrongEligible: c.signers.getLast? = some dealer, c.signers.length = r + 1, c.signers.Nodup, i ∉ c.signers), forwards queued chains only to recipients dst ∉ c.signers (so every emitted chain has c.signers.length = r + 1 ≤ t + 1), incorporates Theorem 3's two-value relay cap (extracted.length ≤ 2) over arbitrary [DecidableEq V] with deterministic sender tie-breaking via [LinearOrder P], and models signatures via trace provenance (AuthProtocol.WellSigned and AuthProtocol.Unforgeable) rather than nested cryptographic primitives.

Step invariants for dolevStrongStepOnce and dolevStrongRound #

Global state invariants of dolevStrong #

theorem Cslib.Distributed.Byzantine.dolevStrong_send_chain_props {P : Type u_1} {V : Type u_2} [Fintype P] [LinearOrder P] [DecidableEq V] (dealer : P) (v₀ : V) (t : ℕ) (F : Finset P) (adv : ℕ → P → P → List (SignedChain P V)) (input : V) {r : ℕ} {j dst : P} {c : SignedChain P V} (hc : c ∈ (dolevStrong P V dealer v₀ t).send r j ((dolevStrong P V dealer v₀ t).state F adv input r j) dst) :

Emitted chain structure (Dolev and Strong, §4, Theorem 3, pp. 662–663): every chain c emitted by dolevStrong from j to dst at step r is rooted at dealer, contains j, excludes dst, has Nodup signers, and has exact phase length r + 1 ≤ t + 1.

theorem Cslib.Distributed.Byzantine.dolevStrong_solvesAuthenticatedBroadcast {P : Type u_1} {V : Type u_2} [Fintype P] [LinearOrder P] [DecidableEq V] (dealer : P) (v₀ : V) (t : ℕ) {R : ℕ} (hR : t + 1 ≤ R) :

Dolev–Strong authenticated synchronous broadcast (Dolev and Strong, §4, Theorem 3, pp. 662–663): dolevStrong P V dealer v₀ t solves synchronous authenticated broadcast against up to t Byzantine faults in any R ≥ t + 1 rounds, for arbitrary finite P without any n > 3t bound.

Polynomial communication complexity #

theorem Cslib.Distributed.Byzantine.dolevStrong_sum_toRelay_length_eq {P : Type u_1} {V : Type u_2} [Fintype P] [LinearOrder P] [DecidableEq V] (dealer : P) (v₀ : V) (t : ℕ) (F : Finset P) (adv : ℕ → P → P → List (SignedChain P V)) (input : V) (i : P) :
∑ r ∈ Finset.range (t + 1), ((dolevStrong P V dealer v₀ t).state F adv input r i).toRelay.length = ((dolevStrong P V dealer v₀ t).state F adv input t i).extracted.length

Exact relay-queue identity: across all t + 1 protocol rounds, each process i queues exactly ((state t i).extracted).length signed chains in toRelay.

theorem Cslib.Distributed.Byzantine.dolevStrong_sum_send_length_le_two {P : Type u_1} {V : Type u_2} [Fintype P] [LinearOrder P] [DecidableEq V] (dealer : P) (v₀ : V) (t : ℕ) (F : Finset P) (adv : ℕ → P → P → List (SignedChain P V)) (input : V) (R : ℕ) (i dst : P) :
∑ r ∈ Finset.range R, ((dolevStrong P V dealer v₀ t).send r i ((dolevStrong P V dealer v₀ t).state F adv input r i) dst).length ≤ 2

Per-edge relay bound (Dolev and Strong, §4, Theorem 3, p. 663): across any number of rounds R, each process i sends at most 2 signed chains to each recipient dst.

theorem Cslib.Distributed.Byzantine.dolevStrong_correctMessagesSent_le {P : Type u_1} {V : Type u_2} [Fintype P] [LinearOrder P] [DecidableEq V] (dealer : P) (v₀ : V) (t : ℕ) (F : Finset P) (adv : ℕ → P → P → List (SignedChain P V)) (input : V) (R : ℕ) :
(dolevStrong P V dealer v₀ t).correctMessagesSent F adv input R ≤ 2 * (Fintype.card P - F.card) * (Fintype.card P - 1)

Polynomial communication complexity (Dolev and Strong, §4, Theorem 3, pp. 662–663): across any R rounds, all correct processes together emit at most 2 * (Fintype.card P - F.card) * (Fintype.card P - 1) point-to-point signed chains—at most two per directed edge leaving a correct process.