How Does Bob The Taxgather Find Out Total Profits, Without Revealing Any of Them?

Prof Bill Buchanan OBE FRSE
Coinmonks
Published in
3 min readAug 20, 2019

--

The tax authority (Bob) wants to determine the total profit made by all the companies in its region (AliceCo, CharleyCo, DaveInc, EveCom, and FaithCo), but none of the companies wants to release their figures as it will give a commercial advantage to others. So how could we do this?

Well, initially Bob the tax gather generates a key pair: a public key and a private key, and sends Trent the tax agent the public key. In order to both be quantum robust, and preserve the privacy of the companies, Bob — a very forward-thinking tax gather— decides to use lattice cryptography and which give us homomorphic encryption, and where we can mathematically operate on encrypted values.

And so AliceCo, CharleyCo, DaveInc, EveCom, and FaithCo., all take their profit values and encrypt them with the public key, and send these to Alice. Alice cannot, at this stage, reveal any of their profits. Alice then performs homomorphic addition encryption on them and returns the result to Bob. Bob then uses his private key, on the result, and reveals the total profit made by AliceCo, CharleyCo, DaveInc, EveCom, and FaithCo.

Some sample code in Go which adds two numbers together is [here]:

package main

import (
"github.com/dedis/lago/bigint"…

--

--

Prof Bill Buchanan OBE FRSE
Coinmonks

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.