Skip to content

Commit

Permalink
Add timing for encryption, plus a shell script.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnLCaron committed Aug 8, 2024
1 parent 00fbf8d commit ef68e7b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Egk Elliptic Curves Mixnet

_last update 06/03/2024_
_last update 08/09/2024_

Implementation of a mixnet using the [ElectionGuard Kotlin Elliptical Curve library](https://github.com/JohnLCaron/egk-ec),
and the [Verificatum library](https://www.verificatum.org/). The mixnet uses the Terelius / Wikström (TW) mixnet
Expand Down Expand Up @@ -32,7 +32,9 @@ Also see: [Workflow Notes](docs/cacvote-workflow.md)
* [Build](#build)
* [Rebuild](#rebuild)
* [Build the Verificatum C library using GMP (optional)](#build-the-verificatum-c-library-using-gmp-optional)
* [Sample Workflow for testing](#sample-workflow-for-testing)
* [Complete Workflow for testing](#complete-workflow-for-testing)
* [Encryption Workflow for testing](#encryption-workflow-for-testing)
* [Workflow components](#workflow-components)
* [electionguard](#electionguard)
* [election-initialize.sh](#election-initializesh)
* [generate-and-encrypt-ballots.sh](#generate-and-encrypt-ballotssh)
Expand Down Expand Up @@ -118,7 +120,7 @@ Follow the instructions in [Egk-ec Getting Started](https://github.com/JohnLCaro

This is needed for good performance.

## Sample Workflow for testing
## Complete Workflow for testing

````
~/dev/github/egk-ec-mixnet:$ ./scripts/completeWorkflow.sh working
Expand All @@ -128,7 +130,22 @@ Runs a complete test of the workflow and writes the output to whatever you set _

After running, examine the log file at **_egkMixnet.log_**.

The components of this workflow are:
## Encryption Workflow for testing

Note that election_initialize.sh uses a manifest from _src/test/data/mixnetInput_. Change that to the correct manifest if needed.

You might want to first delete the log file at **_egkMixnet.log_**.

````
~/dev/github/egk-ec-mixnet:$ ./scripts/encryptionWorkflow.sh working
````

Runs a test of the encryption workflow and writes the output to whatever you set _working_ to.

After running, examine the log file at **_egkMixnet.log_**.


## Workflow components

### electionguard

Expand Down
Binary file modified libs/egk-ec-2.1-SNAPSHOT.jar
Binary file not shown.
11 changes: 11 additions & 0 deletions scripts/encryptionWorkflow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ~/.bashrc
WORKING=$1

if [ -z "${WORKING}" ]; then
echo "No workspace provided."
exit 1
fi

# electionguard
./scripts/election-initialize.sh ${WORKING}/private src/test/data/mixnetInput ${WORKING}/public
./scripts/generate-and-encrypt-ballots.sh ${WORKING}/private 100 ${WORKING}/public

0 comments on commit ef68e7b

Please sign in to comment.