The Byzantine Generals Problem is a classic game theory problem involving achieving consensus in the presence of unreliable communication or malicious parties. Here, we present a series of questions and a step-by-step workflow to achieve consensus between Alice, Bob, and Mallory without relying on a trusted third party:
Each person generates a unique code to represent themselves anonymously:
Alice generates code A.
Bob generates code B.
Mallory generates code M.
Each person hashes their code and sends the hash to the other two parties:
Alice sends H(A) to Bob and Mallory.
Bob sends H(B) to Alice and Mallory.
Mallory sends H(M) to Alice and Bob.
Each person proposes a meeting place and time and hashes that proposal:
Alice proposes P1 (place and time) and calculates H(P1).
Bob proposes P2 (place and time) and calculates H(P2).
Mallory proposes P3 (place and time) and calculates H(P3).
Each person sends their proposal hash to the other two parties encrypted with their unique code:
Alice sends {H(P1)}_A to Bob and Mallory.
Bob sends {H(P2)}_B to Alice and Mallory.
Mallory sends {H(P3)}_M to Alice and Bob.
Each person decrypts the received proposal hashes:
Alice decrypts {H(P2)}_B and {H(P3)}_M.
Bob decrypts {H(P1)}_A and {H(P3)}_M.
Mallory decrypts {H(P1)}_A and {H(P2)}_B.
Each person sends their own proposal and the two received proposal hashes to the other two parties encrypted with their unique code:
Alice sends P1, {H(P2)}_A, {H(P3)}_A to Bob and Mallory.
Bob sends P2, {H(P1)}_B, {H(P3)}_B to Alice and Mallory.
Mallory sends P3, {H(P1)}_M, {H(P2)}_M to Alice and Bob.
Each person decrypts the received proposals and verifies the hashes:
Alice decrypts P2, {H(P1)}_B, {H(P3)}_B and verifies H(P2) against the received hash.
Bob decrypts P1, {H(P2)}_A, {H(P3)}_A and verifies H(P1) against the received hash.
Mallory decrypts P1, {H(P2)}_M, {H(P3)}_M and verifies H(P1) against the received hash.
Each person evaluates the proposals and votes for one of them, creating a commitment to their vote:
Alice evaluates P1, P2, and P3, votes for P1, and creates a commitment C_A = H(V_A || H(A)).
Bob evaluates P1, P2, and P3, votes for P2, and creates a commitment C_B = H(V_B || H(B)).
Mallory evaluates P1, P2, and P3, votes for P1, and creates a commitment C_M = H(V_M || H(M)).
Each person sends their commitment to the other two parties:
Alice sends C_A to Bob and Mallory.
Bob sends C_B to Alice and Mallory.
Mallory sends C_M to Alice and Bob.
Each person reveals their vote and unique code to the other two parties:
Alice sends V_A and H(A) to Bob and Mallory.
Bob sends V_B and H(B) to Alice and Mallory.
Mallory sends V_M and H(M) to Alice and Bob.
Each person verifies the received votes and unique codes against the commitments:
Alice verifies C_B and C_M using V_B, H(B), V_M, and H(M).
Bob verifies C_A and C_M using V_A, H(A), V_M, and H(M).
Mallory verifies C_A and C_B using V_A, H(A), V_B, and H(B).
Each person tallies the votes and determines the majority vote:
Alice tallies the votes V_A, V_B, and V_M and determines the majority vote.
Bob tallies the votes V_A, V_B, and V_M and determines the majority vote.
Mallory tallies the votes V_A, V_B, and V_M and determines the majority vote.
If there is a majority vote for a proposal, all parties agree on that place and time for the meeting:
Alice, Bob, and Mallory agree on the majority-voted proposal for the meeting.
If there is a tie between the proposals, they can either repeat the process or use a predetermined tie-breaking mechanism to decide on the meeting place and time.
By following this step-by-step workflow, Alice, Bob, and Mallory can achieve consensus on a meeting place and time without divulging their identities or relying on a trusted third party.