Section 1.31

Byzantine failure

Definition

A Byzantine failure is a failure in which a component behaves arbitrarily instead of simply stopping. It may send wrong values, send different values to different parties, stay silent, delay or repeat messages, or follow the protocol faithfully until the moment that does most harm. The component may be faulty or attacker-controlled; the model treats both alike. The name comes from the Byzantine Generals Problem, a 1982 paper by Lamport, Shostak and Pease [417] about loyal generals who must agree on a plan although some generals are traitors.

The idea

A controller sends commands to a device through a relay, such as a gateway or a phone that forwards radio messages. A design that assumes the relay either forwards correctly or stops copes with a broken relay. It does not cope with a relay that an attacker has taken over. That relay can change any field, invent messages, resend old ones, hold messages back and deliver them later, tell the controller “delivered” when it delivered nothing, and report invented measurements. Every guarantee that rested on the relay’s honesty is gone.

Under a Byzantine failure, treat the component as a wire the attacker owns. Only facts the receiver can establish for itself count: from the bytes it receives, from keys the faulty component does not hold, and from the receiver’s own stored state. A courier who may open, rewrite, delay, lose or duplicate letters, and who lies about delivering them, is a fair picture. A sealed letter protects its content, but the seal says nothing about when the letter was written or whether a newer one exists. The picture stops being accurate in one respect: in a distributed system, Byzantine components can also take part in decisions, for example by voting, and tolerating that needs more than checks at one receiver.

How it works

Sort every check the receiver makes by where its inputs come from.

Worked example

A controller C and a device D share a key K that the relay R does not have. C sends D a command whose authenticated bytes say: target D, epoch 4, install program P.

  1. R changes the outer address label to a second device E. If K is a group key that every device holds, the tag still verifies at E, so E must compare the authenticated target, D, with its own identity and refuse. Had E checked only the tag, R would have redirected the command without forging anything.

  2. R changes the epoch inside the authenticated bytes to 5. The tag no longer verifies, and D refuses.

  3. R holds the command back. C then revokes a key, which moves D to epoch 5, and R now delivers the held command. D tests 4=54 = 5, finds it false and refuses. A check that only remembered accepted messages would have accepted the command, because D never saw it.

  4. R tells C “installed”. C cannot believe this unless D returns a confirmation authenticated with a key that R lacks and containing a fresh value from C’s request.

  5. R drops everything. No check at D helps; C must notice the missing confirmation and use another route.

Stated precisely

When a component XX is modeled as Byzantine, the adversary chooses every output of XX: the content, destination and timing of each message, and whether it is sent at all, as any function of what XX has received. Arbitrary refers to the outputs at XX’s interface, not to unlimited power. The model still assumes that XX cannot forge a MAC or signature without the key, does not hold the keys of honest parties, and cannot change the receiver’s code or stored state. A receiver check is sound under this model if its result depends only on the received bytes, treated as arbitrary, on secrets XX lacks, and on state XX cannot write. If XX holds a signing key, a valid signature no longer shows that an honest party sent the message.

For agreement among nn parties of which at most ff are Byzantine, Lamport, Shostak and Pease proved two results for a synchronous system, one in which message delays have a known bound. With unsigned messages, agreement is possible if and only if n≥3f+1n \ge 3f + 1. With unforgeable signatures, their algorithm §14.1 works for any number of traitors. These numbers belong to that setting.

Withheld and pre-signed messages

Holding a genuine message back and delivering it later is a different attack from a replay. The receiver has never seen the message, so a check against the messages the receiver has already accepted lets the late message through. Three rules limit late delivery.

  1. State binding with equality: the sender writes into the message the number of the receiver state it is meant for, here called the epoch, and the receiver accepts the message only if that number equals its current epoch. Any event that advances the epoch, such as revoking a key, invalidates every message issued before that event.

  2. Expiry: the message carries a deadline, and the receiver checks it against a clock that the relay cannot set.

  3. Challenge and response: the receiver issues a fresh unpredictable nonce §5.18, a value used once, and accepts only a reply that contains the nonce of its current challenge.

A pre-signed message is one signed for a state that the receiver has not yet reached. State binding does not stop it: when the receiver reaches that epoch, the message becomes valid. Expiry stops it if the deadline passes first, and challenge and response stops it because nobody can sign a reply to a challenge that has not yet been issued. Otherwise the signer must refuse to sign for any epoch but the current one, or the signing key must be revoked, which invalidates everything signed with it.

Limits and common mistakes

Do not carry a threshold such as 3f+13f + 1 into a different system. Such thresholds depend on the timing assumptions, on whether messages are signed, on the voting rule and on the property sought.

A Byzantine relay model does not cover a Byzantine sender. If the controller itself is compromised, its tags are valid, and only the receiver’s policy limits what it can order.

Testing with a relay that behaves correctly says nothing about Byzantine behavior. A test relay must change, drop, delay, reorder, duplicate and invent messages.

Tolerating Byzantine failures costs messages, copies and checks. Many designs assume crash failures inside a trust boundary §1.3 and Byzantine failures outside it, and say so.

Detecting equivocation needs evidence shared between receivers, such as receivers comparing what they received, or a public log to which entries can only be added.

Questions answered

Which receiver checks remain sound if the relay lies about every field?

The checks that remain sound are those whose result depends only on the received bytes, on secrets the relay does not hold and on the receiver’s own state. They are:

  1. length and format checks, which hold for any input;

  2. verification of a message authentication code or signature that the original sender computed over the exact bytes, provided the relay does not hold the key;

  3. comparison of the authenticated target, operation and version with the receiver’s own identity and policy;

  4. freshness and anti-downgrade checks against counters and version floors kept in the receiver’s own protected storage.

Checks that rely on fields outside the authenticated bytes, or on anything the relay reports, such as a delivery receipt, a timestamp or a measurement, are not sound. Even the sound checks give no delivery and no timeliness: the relay can drop messages, or hold genuine ones back and deliver them later, which no check against already accepted messages detects. Binding each message to the receiver’s current state, an expiry time checked against a trusted clock, or a challenge chosen by the receiver limits such late delivery.

Related entries: End-to-end security (§1.34), Authentication coverage (§5.41), Artifact provenance (§13.1), Replay attack (§1.26), Fault model (§1.30), Epoch fencing and stale authority (§19.3.2). Further reading: [417].