helios-server icon indicating copy to clipboard operation
helios-server copied to clipboard

An example of a ballot file

Open ealione opened this issue 6 years ago • 0 comments

I am trying to understand how the file helios/helios-server-mixnet-master/standalone/mix.py works. It reads a ballots.json file and it uses it to mix the answers. This is done in this part:

with open(dataIn, 'r') as dataFile:
	data = json.load(dataFile)

nbits = ((int(math.log(long(data["public_key"]["p"]), 2)) - 1) & ~255) + 256
cryptosystem = EGCryptoSystem.load(nbits, long(data["public_key"]["p"]), int(data["public_key"]["g"])) # The generator might be a long if it's big? I don't know.
pk = PublicKey(cryptosystem, long(data["public_key"]["y"]))

ballots = data["answers"]
shufs_list = []
proofs_list = []

Is there a sample of the ballots.json file, how is it created?

ealione avatar Apr 29 '18 20:04 ealione