Verifiable lotteries
Joseph Bonneau
Courant Institute
New York University
What modern cryptographers do
Replace
trust assumptions
with
computational assumptions
Physical randomness generation is old
Physical randomness generation is widespread
Lotteries have been subverted many times
Lucky Numbers, 2000
Lotteries have been subverted many times
Physical randomness can be faked
Physical randomness can fail quietly
US conscription lottery, 1969
Physical randomness can fail quietly
Physical randomness can fail quietly
US conscription lottery, 1969
1
2
3
4
5
6
7
8
9
7
4
1
8
5
2
9
6
3
2. Rotate axially
1
3
2
6
4
5
8
9
7
3. Draw from top
Physical randomness can fail quietly
Timeline for a verifiable lottery
Timeline for a verifiable lottery
for p in players:
p.seed = H(p, R)
sort(players)
Timeline for a verifiable lottery
for p in players:
p.seed = H(p, R)
sort(players)
Timeline for a verifiable lottery
for p in players:
p.seed = H(p, R)
sort(players)
Pseudorandom number generation
a276e6f4c488387e1b0b1f88dc402cd8
PRNG
574fb8dc165c47e2434753a8f7e8dd2d9543296eb3512e7b642832a8f54f7392f63f9afeb3c6f7e714c2ac785aed8a207d7f8e4ad62eec1a90fa070e1fffa9935162bbff82e9fdc6df899d4ca7dce0908025638808ae526f6099044609c09e5846154cc58d10cca845bf4807f6578941b99024e1fd07a7f2babd70daad3dbe51
(128-bit seed)
(infinite output)
Timeline for a verifiable lottery
for p in players:
p.seed = H(p, R)
sort(players)
for p in players:
p.seed = H(p, R)
sort(players)
+
Timeline for a verifiable lottery
for p in players:
p.seed = H(p, R)
sort(players)
for p in players:
p.seed = H(p, R)
sort(players)
+
The randomness beacon
01010001 01101011 10101000 11110000 10010100
The randomness beacon
01010001 01101011 10101000 11110000 10010100
The randomness beacon
01010001 01101011 10101000 11110000 10010100
Third-party beacons require trust
random.org
beacon.nist.gov
Natural beacons typically aren’t unanimous
sdo.gsfc.nasa.gov
Historical inspiration: The numbers game
Historical inspiration: The numbers game
Joseph
Moriarity
Sai Wing
Mock
Giosue
Galluci
Teddy
Roe
Modern idea: Financial data as a beacon
Problem: market manipulation
Manipulating a financial beacon
AAPL | $178.02 |
AMZN | $1571.68 |
GOOG | $1134.42 |
2. Simulate lottery outcomes for many perturbations
AAPL | $178.01 |
AMZN | $1571.67 |
GOOG | $1134.41 |
AAPL | $178.03 |
AMZN | $1571.69 |
GOOG | $1134.43 |
...
3. Force the best outcome
Similar manipulation for blockchain beacons
New approach: verifiable delay functions
Natural randomness
VDF
Beacon output
Goal: by the time the output can be computed, it’s too late to attack
What is a Verifiable Delay Function?
Preventing manipulation with a VDF
AAPL | $178.02 |
AMZN | $1571.68 |
GOOG | $1134.42 |
2. Simulate lottery outcomes for many perturbations
AAPL | $178.01 |
AMZN | $1571.67 |
GOOG | $1134.41 |
AAPL | $178.03 |
AMZN | $1571.69 |
GOOG | $1134.43 |
...
3. Market closes before attacker can evaluate options
Delay with slow verification: iterated hashing
H
H
H
H
H
H
H
x
y
...
def delay(x, t):
for i in range(t):
x := SHA256(x)
return x
delay(x): Ht(x)
A proto-VDF: square roots
[Dwork, Naor 1992]
def delay(x, p):
return x(p+1)/4 (mod p)
delay(x): √x (mod p)
def verify_delay(x, y, p):
return x == y2 (mod p)
Modern VDF: squaring in group of unknown order
delay(x): x2 (mod N)
def verify_delay(x, y, t, N, π):
...
t
def delay(x, t, N):
for i in range(t):
x := x2 (mod N)
return x
New computation model
Cryptography community typically
worries about scaling, not speed
Many uses in decentralized protocols
Many smart contracts need randomness
Many types of real-world “lottery”
Convincing the public is difficult
Be skeptical of authorities!