Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milestone/nov election #386

Merged
merged 28 commits into from
Aug 5, 2023
Merged

Milestone/nov election #386

merged 28 commits into from
Aug 5, 2023

Conversation

AddressXception
Copy link
Collaborator

Issue

Link your PR to an issue

this is a remerge of #370 and #371 since they were reverted

Description

Please describe your pull request.

Testing

Describe the best way to test or validate your PR.

john-s-morgan and others added 3 commits July 17, 2023 10:34
* try removing soversion of hacl_cpp lib and bifurcate the links for win

* add hash prefeixes

* add hash prefixes to hashes

rework some of the hashed elgamal interface to support hash prefix and encryption seed.

* fix encryption tests

* propagate hashed elgamal interface changes into c#

* pr self review

* add exports to new hash functions

* address PR feedback

---------

Co-authored-by: AddressXception <github@addressxception.com>
* pass publicKey into elgamal encrypt with precompute

* Implement Base-K ElGamal

swap the encryption base from generator G to public key K, per the EG 2.0 spec. Add encryptionBase to elgamal decrypt functions and invert the decryption algorithm per the spec. Modify the discrete log to accept any base for lookups.

* adjust realtime disjunctive cp proofs to new format

* rename precomputed values only use getters on precompute

* rename triple to PrecomputedEncryption

* rename Quadruple to PrecomputedFakeDisjuctiveCommitments

* rename TwoTriplesAndAQuad to PrecomputedSelection

* rename context get and pop functions

* break out cp proof tests

* Skip due to invalid Constant Chaum Pedersen proof

skip all of the tests that are failing which rely on the proof of selection limit being valid (which is pretty much every check that checks the ballot, including decryption

* refactor elgamal encrypt to support base-G

* refactor precompute overrides for disjunctive proof

* fix comments

---------

Co-authored-by: AddressXception <github@addressxception.com>
SteveMaier-IRT and others added 25 commits July 26, 2023 12:17
* Adding ILogger support and logging of the issues reported from the key and tally ceremonies

* Added a warming for a rejected ballot

* PR cleanups

* PR change

* Updated the version number
#388)

* Removed mutex from being used since the access is controlled from the C# code and this caused a deadlock.

* changed delays since tests are failing on certain test runners

* removing the delay on the test for complete

---------

Co-authored-by: John Morgan <70619927+john-s-morgan@users.noreply.github.com>
* Add range proof

adda generic zero knowledge struct that can hol the data for zk proofs. while it is only implemented in the range proof now, it should replace the disjunctive proof implementation to make the code more legible.

* replace constant proof with range proof

* remove placeholder selections from contest encryption

* Fix compile issue with chaum.  Cleaned up a export for HashPrefix

* pr review, try revert the hashprefix symbolication

* allow commitments to be optional

handle cases where commitments are null, such as when loading from an election record. re-enable constant proofs. fix missing const functions on elgamal keypair. add some documentation throughout. simplify unit tests.

* try re-enabling x86 builds in CI on windows

* comment out the pr branch rul so that we can test ci

* turn on intellisense for dotenv files

* C interface for ranged chaum pedersen proof

* disable auto serialization of contest proofc ommitments

* Update Hacl add support for msys2-x86

enable x86 builds using the msys toolchain and add them to the netstandard packaging process.

* export all symbols in msys & mingw

* try set symbols for win32

* try always export symbols

* reenable compilation check for export symbols

* Enhance logger to trap isValid messages

* Add cpp facade

* Add external C interface

* Add native interface for RangedChaumPedersen

* Add Ranged Chaum Pedersen

* Fixed the x86 build from compiling as x64

* Add unit tests

* There are no longer placeholders. Remove from validation

* try cmment out windows check for export headers

* add test to prove decrypt with secret works

* add a single shot test to capture decrypt with shares and filter for it

* minor cleanup

* fix elgamal decrypt.

use key ceremony data when available for GenerateFakeElectionData

* switching to clang for building the x86

* update makefile to match CI

* update flags to pacman

* fixed x86 build

* removed installing .net for the ci/cd

* using new update for the hacl defaults

* implement spec 2.0 hashes (#387)

* implement spec 2.0 hashes

* fix ballot compilation and validation issues

* add new constants from the E.G. 2.0 spec

* clang update

* fix hash nonce when decrypting on contest

fix prefix issues

---------

Co-authored-by: John Morgan <john.morgan@infernored.com>
Co-authored-by: John Morgan <70619927+john-s-morgan@users.noreply.github.com>

* removed copy_n

* update R test

* remove R test

* CLI does not need to depend on nuget package

* Button layout update for tally

* export record if file exists

* Change verify to green mark

* Update targets for x86

* fix folder structure in pipeline

---------

Co-authored-by: SteveMaier-IRT <steve.maier@infernored.com>
Co-authored-by: John Morgan <john.morgan@infernored.com>
Co-authored-by: John Morgan <70619927+john-s-morgan@users.noreply.github.com>
* isolate windows-specific code

* update version in UI
remove the test toolchains in favor of the os/processor toolchains which support cross-compilation
this test is as close as possible to validating that precompute is working by default in the c# layer.
* allow for all file types

* encrypt to an encrypted_ballots folder

* use ballotcode instead of Tally ID

* Handle no ballots in folder

* Only create elections when at least one key ceremony is complete

* support no file extension means removing filter altogether

* update filter

* remove space

* logging for Tally

* update viewmodels

* Logout on db error.

* Create election db handling
Copy link
Collaborator

@john-s-morgan john-s-morgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good implementation of 1.9 math spec. Tests pass. Mac builds fail in expected ways. Let's go!

@john-s-morgan john-s-morgan merged commit 22923ec into main Aug 5, 2023
15 of 18 checks passed
@john-s-morgan john-s-morgan deleted the milestone/nov-election branch August 5, 2023 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants