Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Zero knowledge computation of the average salary

created by ariels

(thing) by ariels (1.6 d) (print)   ?   (I like it!) 1 C! Sat Dec 21 2002 at 9:04:40

A simple zero knowledge protocol. n professors of theoretical computer science gather in a room. They want to compute their average salary, but each is ashamed of how little money she or he earns. Use of a zero knowledge protocol is ideal here.

Note that if n=2, then there's not much point to the protocol. By learning the average salary of Alice and Bob, Alice can immediately determine Bob's salary: twice the average, minus her own salary. Even in this case, the zero knowledge guarantee is preserved -- it just doesn't give anything.

First, our professors agree on a big upper bound: no professor makes anything close to N=$1000000, especially not a TCS type. All computations will take place modulo n*N. If we know the sum of the salaries modulo n*N, then we know the sum -- it's just that number, as each professor earns between $0 and N. Our protocol will compute this number. By dividing by n, we determine the average salary.

Seat the professors in a circle. Professor #i's salary will be $Xi. Professor #1 cannot tell professor #2 her salary, or she breaks the zero knowledge guarantee. Instead, she picks a random number R1 from a uniform distribution on [0,N), writes down R+X1 (mod n*N) on a piece of paper, and passes it to professor #2. Professor #2 picks a random number R2, adds R2+X2 (mod n*N) to the sum she got, writes that down on a new piece of paper, and passes that to professor #3. Continue all the way around the circle, until the piece of paper returns to professor #1.

Professor #1 now has a piece of paper with the number R1+R2+...+Rn+X1+X2+...+Xn (mod n*N) written down on it. She subtracts R1 (not forgetting to give the result modulo n*N), which she knows, from it, writes it down, and passes it to professor #2. Each professor continues to subtract his or her Ri from the number, until again it reaches professor #1. Professor #1 announces the sum of the numbers, and all know their average salary.

It can be shown that this protocol gives zero information. For instance, in the first round professor #2 gets the number R1+X1, which can be shown to give no further information about X1. In the second round, he gets the sum of all Xi's, plus some random numbers. But he's anyway going to end up with the sum of all Xi's, unobfuscated by any random numbers, so this too gives no additional information.

Apart from the information known initially to each professor (information about Prof. Alice Bobinskov's salary may have been revealed in the paper -- Uni Awards Scandalous $20000 Raise to Prof Who Proves P = NP gives the information that she earns at least $20000...) and the information gleaned from knowing the sum, this protocol gives zero additional knowledge. All this if we assume nobody cheats.


printable version
chaos

zero knowledge P = NP Applied Cryptography To a Wealthy Man who Promised a Second Subscription to the Dublin Municipal Gallery
Secure multiparty computation uniform distribution Dial-up Top 500 universities
computer science cheat Cryptology obfuscate
Average uniform
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Look at this mess the Death Borg made!
People's Park
Harrison Ford
Duke of Grafton
AC-130H/U Gunship
America
Hizbullah
Seasoning a cast iron pan
Erin McKeown
noble gas
Too Darn Hot
It's OK to be a healthy geek
Capuchin architecture
apostrophe
New Writeups
Pavlovna
My Better Half(fiction)
kanoodle
Molson muscle(essay)
aneurin
You pays your money and you takes your choice(idea)
shaogo
July 20, 2008(log)
Glowing Fish
Tualatin River(place)
The Jacket
Words of Advice(idea)
John_Fox
Good Intentions Gone Wrong(person)
Heitah
Posthumous Oscar(thing)
ignis_glaciesque
University of South Florida(place)
ignis_glaciesque
Flogstaskriket(idea)
liveforever
Caesar's last breath(idea)
dagnyswaggart
she wants to believe(personal)
antigravpussy
he doesn't know, but her eyes widen too far(thing)
dagnyswaggart
Wild tides guard her secrets(poetry)
Lord Brawl
Caesar's last breath(poetry)
This affordable entertainment brought to you by The Everything Development Company