Coin Tossing Protocol #
This file formalizes a two-party coin tossing protocol over ZMod p
and proves its output uniformity via an additive bijection argument.
Protocol #
Two parties each sample a random element from ZMod p and output their sum.
The result is uniformly distributed, because for any fixed a, the map
b ↦ a + b is a bijection on ZMod p.
Main definitions #
coinTossReal— real protocol: sample two elements and output their sumcoinTossIdeal— ideal functionality: sample one uniform element
Main results #
add_uniform_eq_uniform— adding a constant to a uniform sample is uniformcoinToss_eq— real and ideal coin toss produce identical distributions
Additive bijection on ZMod p #
Protocol Definitions #
Real coin toss: both parties sample, output the sum.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Ideal coin toss: sample a single uniform element.
Equations
Instances For
Helper Lemmas #
Sampling uniformly and adding a constant gives the same distribution as
sampling uniformly. This is the key step: a + b for uniform b is uniform.
Main Theorem #
The inner computation: sampling b and returning a + b equals just sampling.
The real coin toss protocol is distributionally equivalent to the ideal
functionality. Both produce a uniform element of ZMod p.