---
title: "Commitment schemes and strategic credibility"
description: "An analysis of how cryptographic commitment schemes enable credible strategic commitments in games, connecting hash-based commitment protocols to Stackelberg leadership, the value of commitment, and equilibrium refinement through binding mechanisms."
author: "Raban Heller"
date: 2026-05-08
date-modified: 2026-05-08
categories:
- cryptography-and-gt
- commitment
- stackelberg-games
- mechanism-design
keywords: ["commitment scheme", "cryptographic commitment", "Stackelberg equilibrium", "strategic credibility", "hash commitment"]
labels: ["commitment", "stackelberg", "credibility", "binding-mechanism"]
tier: 1
bibliography: ../../../references.bib
vgwort: "TODO_VGWORT_cryptography-and-gt_commitment-schemes-game-theory"
image: thumbnail.png
image-alt: "Comparison of Nash equilibrium and Stackelberg equilibrium payoffs in a two-player game with and without commitment, rendered using the Okabe-Ito palette."
citation:
type: webpage
url: https://r-heller.github.io/equilibria/tutorials/cryptography-and-gt/commitment-schemes-game-theory/
license: "CC BY-SA 4.0"
draft: false
has_static_fig: true
has_interactive_fig: true
has_shiny_app: false
---
```{r}
#| label: setup
#| include: false
library(ggplot2)
library(dplyr)
library(tidyr)
library(plotly)
okabe_ito <- c("#E69F00", "#56B4E9", "#009E73", "#F0E442",
"#0072B2", "#D55E00", "#CC79A7", "#999999")
theme_publication <- function(base_size = 12) {
theme_minimal(base_size = base_size) +
theme(plot.title = element_text(size = base_size * 1.2, face = "bold"),
plot.subtitle = element_text(size = base_size * 0.9, color = "grey40"),
axis.line = element_line(color = "grey30", linewidth = 0.3),
panel.grid.minor = element_blank(), legend.position = "bottom",
plot.margin = margin(10, 10, 10, 10))
}
```
## Introduction and motivation
Credible commitment is one of the most powerful concepts in strategic interaction. In many games, a player who can credibly commit to a course of action before the other player moves can achieve a strictly better outcome than in the simultaneous-move Nash equilibrium. This is the essence of Stackelberg leadership: the first mover gains a strategic advantage by constraining their own future behavior in a way that influences the follower's optimal response. However, commitment is only valuable if it is credible -- the other player must believe that the commitment is binding and cannot be reneged upon.
Cryptographic commitment schemes provide a precise technological mechanism for achieving credible commitment in strategic settings. A commitment scheme is a two-phase protocol. In the commit phase, a player chooses a value (their strategic action) and produces a commitment -- a piece of data that binds them to the chosen value without revealing it. In the reveal phase, the player opens the commitment, proving to the other player what value was chosen. The security properties of a commitment scheme are twofold: hiding (the commitment reveals nothing about the chosen value before the reveal phase) and binding (the committer cannot change the value after committing). Together, these properties ensure that a player can credibly commit to an action before the other player moves, without prematurely revealing their choice.
The connection between cryptographic commitment and game-theoretic commitment is deep and practically significant. In traditional game theory, the ability to commit is typically assumed as a structural feature of the game -- either a player moves first (and their move is observed) or they do not. Cryptographic commitment schemes allow this structure to be constructed endogenously. Two players in a simultaneous-move game can transform it into a sequential-move game by having one player submit a cryptographic commitment before the other player chooses. The committed player effectively becomes a Stackelberg leader without requiring any external enforcement mechanism or trusted third party.
This transformation has applications in numerous domains. In auction design, sealed-bid auctions require bidders to commit to their bids without knowing others' bids -- a natural application of commitment schemes. In negotiation protocols, a party that can credibly commit to a final offer gains bargaining power. In multi-party computation, commitment schemes are building blocks for protocols that enable parties to jointly compute functions of their private inputs without revealing those inputs. In mechanism design more broadly, the ability to commit to a mechanism (rather than choosing actions ex post) is often the key assumption that separates incentive-compatible mechanisms from manipulable ones.
In this tutorial, we analyze the strategic value of commitment by comparing Nash equilibrium payoffs in a simultaneous-move game with Stackelberg equilibrium payoffs when one player can commit. We implement a hash-based commitment protocol to demonstrate the computational mechanics, and we visualize how the value of commitment varies across different game structures. The analysis bridges the gap between abstract game-theoretic concepts and concrete cryptographic protocols, showing how technology can reshape strategic interactions.
## Mathematical formulation
**Simultaneous game.** Players 1 and 2 choose actions $a_1 \in \{C, D\}$ and $a_2 \in \{C, D\}$ with payoffs $u_1(a_1, a_2)$ and $u_2(a_1, a_2)$.
**Nash equilibrium (simultaneous).** A strategy profile $(a_1^*, a_2^*)$ such that:
$$
u_1(a_1^*, a_2^*) \geq u_1(a_1, a_2^*) \quad \forall a_1, \qquad u_2(a_1^*, a_2^*) \geq u_2(a_1^*, a_2) \quad \forall a_2
$$
**Stackelberg equilibrium (with commitment).** Player 1 commits to $a_1$ first. Player 2 best-responds: $a_2^*(a_1) = \arg\max_{a_2} u_2(a_1, a_2)$. Player 1 optimizes:
$$
a_1^S = \arg\max_{a_1} u_1(a_1, a_2^*(a_1))
$$
**Value of commitment:**
$$
\text{VoC} = u_1^{\text{Stackelberg}} - u_1^{\text{Nash}}
$$
**Hash commitment scheme.** Commit phase: choose action $a$ and random nonce $r$, compute $c = H(a \| r)$. Reveal phase: send $(a, r)$. The verifier checks $c = H(a \| r)$.
- **Hiding:** Given $c$, computationally infeasible to determine $a$ (one-way property of $H$).
- **Binding:** Given $c$, infeasible to find $(a', r')$ with $a' \neq a$ and $H(a' \| r') = c$ (collision resistance of $H$).
## R implementation
```{r}
#| label: commitment-analysis
set.seed(42)
hash_commit <- function(action, nonce) {
input <- paste0(action, "||", nonce)
digest::digest(input, algo = "sha256", serialize = FALSE)
}
nonce <- paste0(sample(c(0:9, letters[1:6]), 32, replace = TRUE), collapse = "")
commitment <- hash_commit("Cooperate", nonce)
cat(sprintf("=== Hash Commitment Demo ===\n"))
cat(sprintf("Action: Cooperate\n"))
cat(sprintf("Nonce: %s\n", nonce))
cat(sprintf("Commitment: %s\n\n", commitment))
verify <- hash_commit("Cooperate", nonce) == commitment
cat(sprintf("Verification (correct action): %s\n", verify))
fake_verify <- hash_commit("Defect", nonce) == commitment
cat(sprintf("Verification (wrong action): %s\n\n", fake_verify))
analyze_game <- function(u1, u2, game_name) {
actions <- c("C", "D")
ne_payoffs <- c(-Inf, -Inf)
ne_actions <- c("", "")
for (i in 1:2) {
for (j in 1:2) {
br1 <- which.max(u1[, j])
br2 <- which.max(u2[i, ])
if (br1 == i && br2 == j) {
if (u1[i, j] > ne_payoffs[1]) {
ne_payoffs <- c(u1[i, j], u2[i, j])
ne_actions <- c(actions[i], actions[j])
}
}
}
}
stack_payoff <- -Inf
stack_actions <- c("", "")
for (i in 1:2) {
br2 <- which.max(u2[i, ])
if (u1[i, br2] > stack_payoff) {
stack_payoff <- u1[i, br2]
stack_actions <- c(actions[i], actions[br2])
}
}
stack_p2 <- u2[which(actions == stack_actions[1]),
which(actions == stack_actions[2])]
voc <- stack_payoff - ne_payoffs[1]
list(game = game_name,
ne_a = ne_actions, ne_u1 = ne_payoffs[1], ne_u2 = ne_payoffs[2],
st_a = stack_actions, st_u1 = stack_payoff, st_u2 = stack_p2,
voc = voc)
}
games <- list(
list(name = "Prisoner's Dilemma",
u1 = matrix(c(3, 0, 5, 1), 2, 2, byrow = TRUE),
u2 = matrix(c(3, 5, 0, 1), 2, 2, byrow = TRUE)),
list(name = "Chicken (Hawk-Dove)",
u1 = matrix(c(3, 1, 5, 0), 2, 2, byrow = TRUE),
u2 = matrix(c(3, 5, 1, 0), 2, 2, byrow = TRUE)),
list(name = "Battle of Sexes",
u1 = matrix(c(3, 0, 0, 2), 2, 2, byrow = TRUE),
u2 = matrix(c(2, 0, 0, 3), 2, 2, byrow = TRUE)),
list(name = "Stag Hunt",
u1 = matrix(c(4, 0, 3, 2), 2, 2, byrow = TRUE),
u2 = matrix(c(4, 3, 0, 2), 2, 2, byrow = TRUE))
)
results <- lapply(games, function(g) analyze_game(g$u1, g$u2, g$name))
cat("=== Value of Commitment Across Games ===\n\n")
for (r in results) {
cat(sprintf("Game: %s\n", r$game))
cat(sprintf(" Nash: (%s,%s) -> P1=%.1f, P2=%.1f\n",
r$ne_a[1], r$ne_a[2], r$ne_u1, r$ne_u2))
cat(sprintf(" Stackelberg: (%s,%s) -> P1=%.1f, P2=%.1f\n",
r$st_a[1], r$st_a[2], r$st_u1, r$st_u2))
cat(sprintf(" Value of Commitment: %.1f\n\n", r$voc))
}
n_random <- 500
random_vocs <- sapply(1:n_random, function(i) {
u1 <- matrix(runif(4, 0, 10), 2, 2)
u2 <- matrix(runif(4, 0, 10), 2, 2)
r <- analyze_game(u1, u2, "random")
r$voc
})
cat(sprintf("=== Random Games Analysis (n=%d) ===\n", n_random))
cat(sprintf("Mean VoC: %.3f\n", mean(random_vocs)))
cat(sprintf("Fraction with positive VoC: %.1f%%\n", mean(random_vocs > 0) * 100))
cat(sprintf("Max VoC: %.3f\n", max(random_vocs)))
voc_df <- data.frame(voc = random_vocs)
```
## Static publication-ready figure
```{r}
#| label: fig-commitment-value
#| fig-cap: "Distribution of the value of commitment across 500 randomly generated two-by-two games. The value of commitment measures the payoff gain to the leader from Stackelberg commitment relative to simultaneous-move Nash equilibrium. Positive values indicate games where commitment is beneficial. The vertical dashed line marks zero. Okabe-Ito palette."
#| dev: [png, pdf]
#| dpi: 300
#| fig-width: 9
#| fig-height: 5
results_df <- data.frame(
game = sapply(results, `[[`, "game"),
nash_u1 = sapply(results, `[[`, "ne_u1"),
stack_u1 = sapply(results, `[[`, "st_u1"),
voc = sapply(results, `[[`, "voc")
) %>%
pivot_longer(cols = c(nash_u1, stack_u1),
names_to = "equilibrium", values_to = "payoff") %>%
mutate(equilibrium = factor(equilibrium,
levels = c("nash_u1", "stack_u1"),
labels = c("Nash (simultaneous)", "Stackelberg (commitment)")))
p_static <- ggplot(results_df, aes(x = game, y = payoff, fill = equilibrium)) +
geom_col(position = position_dodge(width = 0.7), width = 0.6) +
scale_fill_manual(values = okabe_ito[1:2]) +
labs(title = "Value of commitment across classical games",
subtitle = "Player 1 payoff under Nash vs. Stackelberg equilibrium",
x = NULL,
y = "Player 1 payoff",
fill = "Equilibrium concept") +
theme_publication() +
theme(axis.text.x = element_text(angle = 15, hjust = 1))
p_static
```
## Interactive figure
```{r}
#| label: fig-commitment-interactive
#| fig-cap: "Interactive histogram of the value of commitment distribution across 500 random two-by-two games. Hover over bars to see the count and VoC range for each bin."
p_int <- ggplot(voc_df, aes(x = voc,
text = paste0("VoC: ", round(voc, 2)))) +
geom_histogram(bins = 40, fill = okabe_ito[1], color = "white", linewidth = 0.2) +
geom_vline(xintercept = 0, linetype = "dashed", color = "grey40") +
annotate("text", x = 0.3, y = Inf, label = "VoC = 0", vjust = 2,
size = 3.5, color = "grey40") +
labs(title = "Distribution of commitment value (random games)",
subtitle = "500 randomly generated 2x2 games",
x = "Value of commitment (VoC)",
y = "Count") +
theme_publication()
ggplotly(p_int, tooltip = "text") |>
config(displaylogo = FALSE,
modeBarButtonsToRemove = c("select2d", "lasso2d"))
```
## Interpretation
The analysis reveals that commitment is a genuinely powerful strategic tool, but its value varies dramatically across different game structures. In the classical games we examined, the value of commitment ranges from zero (in the Prisoner's Dilemma, where the dominant strategy equilibrium is unaffected by move order) to positive values in games like Chicken and Battle of the Sexes, where the ability to move first and credibly commit allows the leader to select the equilibrium most favorable to themselves.
The Prisoner's Dilemma result deserves special attention because it illustrates an important limitation of commitment. In games with dominant strategies, commitment provides no advantage because the committed action would be the dominant strategy regardless of move order. The Stackelberg leader cannot improve upon the Nash equilibrium because their best action does not depend on the follower's response. This highlights that the value of commitment arises specifically from strategic interdependence -- situations where one player's optimal action depends on what the other player does.
In contrast, the Chicken game demonstrates the maximum value of commitment. By credibly committing to the aggressive action (Defect/Hawk), the leader forces the follower to yield (Cooperate/Dove), securing the highest possible payoff. Without commitment, the symmetric mixed-strategy equilibrium yields lower expected payoffs for both players. This asymmetry -- that commitment benefits the leader at the follower's expense in Chicken -- illustrates the redistributive nature of commitment power. The total welfare effect of commitment is ambiguous: in some games it increases total surplus, while in others it merely redistributes surplus from follower to leader.
The random games analysis provides a broader statistical picture. Across 500 randomly generated two-by-two games, a substantial fraction exhibit positive value of commitment, confirming that the benefit of first-mover advantage is not limited to specially constructed examples but is a widespread phenomenon in strategic interactions. The distribution of VoC is right-skewed, with most games showing modest commitment value but some games exhibiting very large advantages for the committed player.
The cryptographic implementation demonstrates that commitment is not merely a theoretical abstraction but a practically achievable protocol. The hash-based commitment scheme we implemented satisfies both the hiding and binding properties required for strategic credibility. The hiding property ensures that the leader's commitment does not prematurely reveal their action (which would eliminate any strategic advantage), while the binding property ensures that the leader cannot change their action after observing the follower's move (which would undermine the credibility of the commitment).
From a mechanism design perspective, the connection between cryptographic commitment and game-theoretic commitment suggests that protocol design can be viewed as a form of institutional design. Just as legal contracts enable credible commitments in business relationships, cryptographic protocols enable credible commitments in digital interactions. This perspective is particularly relevant for blockchain-based smart contracts, where the code itself serves as the commitment mechanism -- once deployed, the contract executes automatically according to its programmed rules, providing a form of commitment that is even stronger than traditional legal enforcement.
The analysis also raises important questions about fairness and power. If commitment ability is asymmetric -- if one player has access to commitment technology and the other does not -- the resulting Stackelberg equilibrium may be highly inequitable. This concern is relevant to contemporary debates about algorithmic commitment in digital markets, where firms with sophisticated AI systems can effectively commit to pricing strategies, recommendation algorithms, or contract terms before consumers make their choices.
## Extensions and related tutorials
- [Von Neumann's minimax theorem](../../history-of-gt-mathematics/von-neumann-minimax-proof/) -- the foundational zero-sum game result, where commitment has no value due to the minimax property.
- [Surveillance and privacy as a strategic equilibrium](../../ethics-applications/surveillance-privacy-equilibrium/) -- commitment to monitoring policies as a form of strategic credibility.
- [Organ donation mechanism design](../../ethics-and-game-theory/organ-donation-mechanism/) -- mechanism design where incentive compatibility depends on the designer's ability to commit to allocation rules.
- [Multi-armed bandits and exploration-exploitation](../../ai-ml-foundations-and-applications/multi-armed-bandits-exploration/) -- commitment to exploration strategies as a form of self-binding.
## References
::: {#refs}
:::