Fixed the ballot encrypt time based on what election context was used. There was a setting in the context that was not being used when a JSON/BSON file was serialized.
In the process also fixed the benchmarking system to work on Windows instead of only working on Linux and Mac.
Testing
There were benchmarks created to time the encrpytballot and encryptcontests methods that showed the issue with the timing.
To manual test it, create a test to encrypt a ballot and create 2 CithertextElectionContext, one using the standard paramter constructor and one using a JSON/BSON file. The encrypting of the ballot will take 2.5 times longer using the election context created from JSON. With this change there will be no timing issue.
Issue
Link your PR to an issue
Fixes #252
Description
Fixed the ballot encrypt time based on what election context was used. There was a setting in the context that was not being used when a JSON/BSON file was serialized.
In the process also fixed the benchmarking system to work on Windows instead of only working on Linux and Mac.
Testing
There were benchmarks created to time the encrpytballot and encryptcontests methods that showed the issue with the timing.
To manual test it, create a test to encrypt a ballot and create 2 CithertextElectionContext, one using the standard paramter constructor and one using a JSON/BSON file. The encrypting of the ballot will take 2.5 times longer using the election context created from JSON. With this change there will be no timing issue.