last changed: 03/01/2022
This is a port of https://github.com/microsoft/electionguard-python/ to Java.
Also see:
To verify an Election Record:
The full Verification Specification is implemented.
The following command line programs run the entire workflow needed to run an election:
The entire workflow, consisting of the above steps plus verification can be run from a single command:
A simple Swing-based visualization of the Election Record. This is a debugging tool for developers, not a polished tool for end-users (eg election officials).
Election manifest, input ballot, and encrypted and decrypted tallies can be validated for consistency by classes in the com.sunya.electionguard.input package. These are complementary to the cyptographic verifications.
ElectionGuard-Java is a full port of the ElectionGuard python library, and can be used in your own projects. Contributions here and to the python library are welcome!
git clone https://github.com/JohnLCaron/electionguard-java.git
cd electionguard-java
./gradlew clean assemble fatJar myJavadocs
The javadocs will be in build/docs/javadoc/index.html. The jars will be in build/libs. Good luck, Jim.
These may be interesting to implement in other libraries:
- Assumes Java 17.
- Most classes are immutable. Builders are used where needed to separate mutable and immutable uses.
- Uses Java's BigInteger for cryptographic computations.
- Uses Gson for JSON serialization.
- Also serializes using protobuf.
- Use Java record classes instead of @AutoValue
- Uses Flogger for logging.
- Uses JUnit5, jqwik, Mockito for testing.
- Uses gradle 7 for building.
- Not yet fully compatible with python library JSON serialization
- Review error logging.
- Measure computational performance.
- Investigate parallelization strategies.