* This is the first step of the implementation to use precomputed values to encrypt a ballot. There is are two queues in a global (PrecomputedBufferContext) and the queues are populated with a populate method and stopped with a stop_populate method. Then in encryptSelection (encrypt.cpp) if precomputed values are available in the queues then those values are used to generate the encrypted selection.
* More changes for precomputed values.
* Add testing for the precompute buffers change.
* Add benchmarking tests for the new precomputed values APIs.
* Update to the benchmarking tests.
* Clean up missing xml documentation for exceptions
* precompute integration
* Making sure calling stop_populate after calling populate in tests.
* Fix issue with setting of max queue size.
* fixing integration
* Remove the dependency on async.hpp.
* Updated the code to fix a number of issues pointed out during PR review.
* Satisfy rule of 5
* Remove the TripleEntry and QuadrupleEntry objects and store the Triple and Quadruple entries in the queue.
* Removed sleeps in test code and in the PrecomputeAPI.
* add lock_guards to the precompute
* created const for default precompute buffer size.
* adding resend for completed events
* Moved the assert to the bottom of the tests to get the rest of the results checked first
* Adding an init method to the PrecomputeBufferContext.
* Created new init function to have the api call to know when it is ready.
* updating version number for nuget
Co-authored-by: Jeff <spelmaa@wwu.edu>
Co-authored-by: SteveMaier-IRT <steve.maier@infernored.com>
* Created new benchmark to replicate and test the performance for context make with json
* Change the public key to a fixed base.
* Add benchmarks for encrypting contests
* Made benchmark make command work for Windows
* Updated version number for release
* Fixed issue with benchmarks on non-Windows machines
* typo in the makefile
* Fixed DLL entrypoint issue for NativeInterface method
* Add serialization for extended data for JSON/BSON
* Add unit test to verify extended data is serialized
* Renamed the field in the test code that is saved to extended data
* Create ElectionGuardException
* Fix namespace warnings
* Replace console.writelines in ballot with exceptions
* Replace remaining console.writelines with throw exceptions
* Default to Release for electionguard.dll to fix VS test runner
* Fix warnings
* Revert "Default to Release for electionguard.dll to fix VS test runner"
This reverts commit 36b39536e8.
* add const time versions of exp functions
add hacl bench
* Add exponentiation lookup tables
add a class instance to hacl bignum wrapper so that montgomery precompute can be used. use the montgomery context throughout for mod and modexp operations where possible. modify g_pow_p to ue the exponentiation tables. use random numbers when benchmarking.
* add lookuptablecontext
add overloads fgor using fixed base table. update tests to specify to use fixed base at key creation. add c interface
* temporarily add some hardcoded values
* pin cpm version
* add missing includes
* copy sample data to output directory
* update spdlog
* add pow_mod_p to c interface
fix double initialization in lookup table, cleanup log messages.
* reset sample data
* adjust bench
* adjust sample route
* adjust sample route
* add export to hacl constants
* Added an offset path where the sample data is extracted so that the tests can be run.
* Converting to other slash for linux builds
* fixed cpp manifest location
* add encryption functions for benchmarks
clean up benchmarks
* Converted all of the Console.Writeline for error handling
fix compiler warnings for most xml docs
* remove explicit copy operation
* only run netstandard x86 tests on windows
* update doctest to latest version
* fix transcription error
* add mod_p bench
Co-authored-by: SteveMaier-IRT <steve.maier@infernored.com>
* Add overload of disjunctive proof
add the new disjunctive computation method as an overload
* add make function that uses the new proof scheme
* add new member to the C interface
* Add new C# member
* load manifests from file
* Add extendedData to CiphertextElectionContext
* Add a simple linked list implementation
* use c style type names
* return error codes
* add election context C test
rename refactor linked list to remove electionguard from function names
* add external api exports and get function
* rework tests
* move logic into code file
* move struct implement to c file
make the external typedef struct opaque to the caller. add more api methods. refactor tests
* refactor C function name
add api documentation.
* Add C# native interface for LinkedList
add the C# facade class and unit tests.
* Add ExtendedData to C# CiphertextElectionContext
add the native interface binding, add the new field to the existing c# facade. add unit test.
* add stdint to header
* fix assertion use in main lib
* add missing comma
* address pr feedback
* increment version
* add platform property
fix assignment error
* add bench, add methods to safehandle
* replace c interface uses of size_t with uint64_t
* clean up uses of long in c# classes
* fix a few missed size_t
* missed another one
* explicitly state calling convention for native api's
* fix compiler warnings
* add a targets file and explicitly place package output
* do not error on old style cast
* fix typo
- GCC pragma is not a valid pragma in MSVC, thus produces warning C4068:
unknown pragma 'GCC'.
- The workaround is to encapsulate the GCC pragma in if GNUC defined
block.
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
* 🚧 Adjust to Single Project
Shift project towards new csproj for C# project and away from Shared Setup.
Remove the shared project setup and start with .net standard 2.0 and .net framework 4.8 with the goal of adding more pieces including .net core.
Fix tests
* 🙈 Ignore Test with Memory Address Issues
* ✨ Create Release Workflow
* ✨ Add links to README
* ♻️ Update Make
* 🚀 Add so, dylib, and dll to Release
* respect configuration when loading binaries
* use truncated manifest
replace the hardcoded manifest with one that is not affected by #176
* update readme and build tasks
* Remove msys package target
* try run netstandard tests
* only run netstandard tests on macos for now
* add chaum pedersen to C interface
* Add C# chaum pedersen proofs
* update version numbers
* rename x86 file
* do not upload 32 bit
* remove try
Co-authored-by: Keith Fung <keith.robert.fung@gmail.com>
Co-authored-by: Keith Fung <keith.fung@infernored.com>
* 🚧 Adjust to Single Project
Shift project towards new csproj for C# project and away from Shared Setup.
Remove the shared project setup and start with .net standard 2.0 and .net framework 4.8 with the goal of adding more pieces including .net core.
Fix tests
* 🙈 Ignore Test with Memory Address Issues
* ✨ Create Release Workflow
* ✨ Add links to README
* ♻️ Update Make
* 🚀 Add so, dylib, and dll to Release
* respect configuration when loading binaries
* use truncated manifest
replace the hardcoded manifest with one that is not affected by #176
* update readme and build tasks
* Remove msys package target
* try run netstandard tests
* only run netstandard tests on macos for now
* add chaum pedersen to C interface
* Add C# chaum pedersen proofs
* update version numbers
* rename x86 file
Co-authored-by: Keith Fung <keith.robert.fung@gmail.com>
Co-authored-by: Keith Fung <keith.fung@infernored.com>
* 🚧 Adjust to Single Project
Shift project towards new csproj for C# project and away from Shared Setup.
Remove the shared project setup and start with .net standard 2.0 and .net framework 4.8 with the goal of adding more pieces including .net core.
Fix tests
* 🙈 Ignore Test with Memory Address Issues
* ✨ Create Release Workflow
* ✨ Add links to README
* ♻️ Update Make
* 🚀 Add so, dylib, and dll to Release
* respect configuration when loading binaries
* use truncated manifest
replace the hardcoded manifest with one that is not affected by #176
* update readme and build tasks
* Remove msys package target
* try run netstandard tests
* only run netstandard tests on macos for now
* add chaum pedersen to C interface
* Add C# chaum pedersen proofs
* update version numbers
Co-authored-by: Keith Fung <keith.robert.fung@gmail.com>
Co-authored-by: Keith Fung <keith.fung@infernored.com>
* 🚧 Adjust to Single Project
Shift project towards new csproj for C# project and away from Shared Setup.
Remove the shared project setup and start with .net standard 2.0 and .net framework 4.8 with the goal of adding more pieces including .net core.
Fix tests
* 🙈 Ignore Test with Memory Address Issues
* ✨ Create Release Workflow
* ✨ Add links to README
* ♻️ Update Make
* 🚀 Add so, dylib, and dll to Release
* respect configuration when loading binaries
* use truncated manifest
replace the hardcoded manifest with one that is not affected by #176
* update readme and build tasks
* Remove msys package target
* try run netstandard tests
* only run netstandard tests on macos for now
* dont run tests
* 🧹 Update Test Project references
* 🧹 Quick Cleanup
Co-authored-by: Matt Wilhelm <github@addressxception.com>
* Add ElectionGuard.Bench project
* Add spdlog
clean up log messages
* clean up includes
* Add multi threading support
* add sequenceOrder to ciphertext ballot
ensure c tests run in release mode
* clean up resources on terminate
wait for the thread queue to finish and clean up the threads when the thread pool finalizer runs
* add sequenceOrder to netframework api
* use the header only version of spdlog
* address pr feedback
add default deletes for rule of 5 for async things
* add benchmarks
* Add new HACL code
* Use hacl facade in group
* Add benchmarks for group hash and nonces
* Add option to manually export internal headers for release mode
* add encryptBallot benchmark
* fix compiler errors
change default build to release mode
* compile benchmark with c++ 17
use target flag when building tests
* cdo not automatically export internals in debug
* remove inline modifiers for implementation methods
* add bench to pr template
* clean up makefile. tests build in release mode
* update codeql
* export internals when running sanitizer
* Add manifest c++/cli wrapper. redefine internal constructors
add copy constructor for some types. Add tests
* add ballot and encrypt interfaces
* Add isValid checks
* Add programmatic and serialization examples
* refactor election generator to manifest
link in date library
* fix test compilation issues
* Match manifest and encryption output to python
* fix windows compilation issues
* Compile for MSVC
Update HACL to the latest version to support MSVC.
Add a .net framework 4.8 binding library and demonstrate an API example (TestElGamal.cs).
* update PR template to include msvc
* fix template issue
* fix makefile
* try fix broken build
* move words into tests
* remove c# functions
* Refactor Tracker to BallotCode
* add win export modifiers
* remove words completely
* fix ballot code naming
remove wording that implies ballot chaining
* refactor hash suffix where possible
* use ballot_id instead of ballot_style where possible
* refactor ElectionDescription to manifest
* move refactor Manifest to its own file
* Update api documentation
* install clang-9
because IWYU wants it
* try fix iwyu
* Encrypt CompactPlaintextBallot
Add functions to convert between plaintext and compact plaintext ballots. Add functions to convert between ciphertext and compact ciphertext ballots. Complete implementation of encrypt functions to parallel python (e.g. handling manifests with multiple ballot styles). modify encrypt ballot to explicitly use the nonce passed in so that the encryption can be rehydrated properly.
add some documentation and migrate the cpm download into cmake
* Add C Tests
factor out the Test Generators into a library that can be referenced from either test project. Add facades for relevant generator functions in C. Add documentation.
* add compact encrypt methods to mediator c interface
* Add C# interface
* clean up compiler warnings
* add array deletion
* add access modifiers
* Use int for key in extended data
* refactor ballot compact
* fix static analysis warnings
* refactor c# interface
* Add Xamarin Android tests
* check for IWYU prior to running
* address some PR feedback
* refactor compact test cases to use a fixture model
* add sort pr cleanup
* move the android project
* Refactor PlaintextBallotSelection to use an int instead of a string
add documentation to interfaces. Add C++, c and C# tests
* Use ElectionguardSafeHandle for plaintext ballots
* update templates
* fix spelling errors and add comments
* Add Ciphertext Accumulation to CiphertextBallotContest
Add documentation to ballot API's. Add clone methods to some objects like DisjunctiveChaumPedersenProof. Add simple Encryption tests. Refactor C# Native Interface to use the SmartHandle pattern.
* Try fix windows compilation errors
* Fix some compiler warnings
Fix some compiler warnings
* Try fix windows compilation errors
* fix constness
* Add Commitment Hash to CiphertextElectionContext
* add missing noexcept
* add noexcept
* Add ElGamal types to C# interface
* add docs
* PR review
* Refactor PlaintextBallotSelection to use an int instead of a string
add documentation to interfaces. Add C++, c and C# tests
* Use ElectionguardSafeHandle for plaintext ballots
* update templates
* fix spelling errors and add comments
* Add Ciphertext Accumulation to CiphertextBallotContest
Add documentation to ballot API's. Add clone methods to some objects like DisjunctiveChaumPedersenProof. Add simple Encryption tests. Refactor C# Native Interface to use the SmartHandle pattern.
* Try fix windows compilation errors
* Fix some compiler warnings
Fix some compiler warnings
* Try fix windows compilation errors
* fix constness
* Add Commitment Hash to CiphertextElectionContext
* add missing noexcept
* add noexcept
* Refactor PlaintextBallotSelection to use an int instead of a string
add documentation to interfaces. Add C++, c and C# tests
* Use ElectionguardSafeHandle for plaintext ballots
* update templates
* fix spelling errors and add comments
* Add Ciphertext Accumulation to CiphertextBallotContest
Add documentation to ballot API's. Add clone methods to some objects like DisjunctiveChaumPedersenProof. Add simple Encryption tests. Refactor C# Native Interface to use the SmartHandle pattern.
* Try fix windows compilation errors
* Fix some compiler warnings
Fix some compiler warnings
* Try fix windows compilation errors
* fix constness
* add missing noexcept
* Refactor PlaintextBallotSelection to use an int instead of a string
add documentation to interfaces. Add C++, c and C# tests
* Use ElectionguardSafeHandle for plaintext ballots
* update templates
* fix spelling errors and add comments
* Try fix windows compilation errors
* Try fix windows compilation errors
* Use HMAC DRBG
* Increment Version Number
* Add missing API functions for plaintext and ciphertext ballots
Add the plaintext and ciphertext versions of property getters for several functions missing on the ballot.h interface. Add a C test to demonstrate traversing some of the property getters.
* Add netstandard unit test shared project
* Add missing C# ballot objects and interface stubs
* Add missing property accessors
add c# unit tests for ios
* remove debug line
* Compile for Windows
- cleanup EG_API declarations, clean up Makefile,
- add windows documentation,
- add a c++ facade around HACL functions used in tests (using an internal api exposed in debug builds).
- Fix string literal values in ballot nonce serialization.
- statically link in libstdc++
-
* stub windows action test runner
* TABS OVER SPACES
* only statically link on windows for now
minor adjustments to the CI workflow
* use test command on osx, adjust system path for msys2
try using msys2 explicit shell invocation
try installing msys2 with choco
* try using the official msys github action
* remove pacman commands
set github path, only run msys on windows
try fix windows run
try modify path
Try shell change
* Use cmake to copy the windows dll to the output directory
* remove demo app
* Implement Placeholder selections, add ElectionDescription
Add the missing ElectionDescription and verify that a manifest can be serialized. Add ContestDescriptionWithPlaceholders and generate the placeholder selections when an InternalElectionDescription is instantiated. Add documentation to classes touched. Refactor namespace usage to use explicit calls in public headers. Move refactor ballot and election generation tot he generators folder. Add tests for verifying serialization.
Note: this PR is still very lightly tested. See: #95
* Try update codeQL
* fix some compiler warnings
* fix use of gmtime
* Rename Repo, Update Docs
rename the repository references within the code base and update the documentation. Fix issue with targeting .net 4 in the nuget package.
* update text
* Add methods to expose json conversion for election manifest to the C api
propagate the changes to the C api into the .net api.
* update docs, PR self-review
* Fix getDescriptionHash() return value type
* edit review of PR 146
Co-authored-by: rc <rocarter@microsoft.com>
* Use HMAC DRBG
* Increment Version Number
* Add missing API functions for plaintext and ciphertext ballots
Add the plaintext and ciphertext versions of property getters for several functions missing on the ballot.h interface. Add a C test to demonstrate traversing some of the property getters.
* Add netstandard unit test shared project
* Add missing C# ballot objects and interface stubs
* Add missing property accessors
add c# unit tests for ios
* remove debug line
* Compile for Windows
- cleanup EG_API declarations, clean up Makefile,
- add windows documentation,
- add a c++ facade around HACL functions used in tests (using an internal api exposed in debug builds).
- Fix string literal values in ballot nonce serialization.
- statically link in libstdc++
-
* stub windows action test runner
* TABS OVER SPACES
* only statically link on windows for now
minor adjustments to the CI workflow
* use test command on osx, adjust system path for msys2
try using msys2 explicit shell invocation
try installing msys2 with choco
* try using the official msys github action
* remove pacman commands
set github path, only run msys on windows
try fix windows run
try modify path
Try shell change
* Use cmake to copy the windows dll to the output directory
* remove demo app
* Implement Placeholder selections, add ElectionDescription
Add the missing ElectionDescription and verify that a manifest can be serialized. Add ContestDescriptionWithPlaceholders and generate the placeholder selections when an InternalElectionDescription is instantiated. Add documentation to classes touched. Refactor namespace usage to use explicit calls in public headers. Move refactor ballot and election generation tot he generators folder. Add tests for verifying serialization.
Note: this PR is still very lightly tested. See: #95
* Try update codeQL
* fix some compiler warnings
* fix use of gmtime
* Use HMAC DRBG
* Increment Version Number
* Add missing API functions for plaintext and ciphertext ballots
Add the plaintext and ciphertext versions of property getters for several functions missing on the ballot.h interface. Add a C test to demonstrate traversing some of the property getters.
* Add netstandard unit test shared project
* Add missing C# ballot objects and interface stubs
* Add missing property accessors
add c# unit tests for ios
* remove debug line
* Compile for Windows
- cleanup EG_API declarations, clean up Makefile,
- add windows documentation,
- add a c++ facade around HACL functions used in tests (using an internal api exposed in debug builds).
- Fix string literal values in ballot nonce serialization.
- statically link in libstdc++
-
* stub windows action test runner
* TABS OVER SPACES
* only statically link on windows for now
minor adjustments to the CI workflow
* use test command on osx, adjust system path for msys2
try using msys2 explicit shell invocation
try installing msys2 with choco
* try using the official msys github action
* remove pacman commands
set github path, only run msys on windows
try fix windows run
try modify path
Try shell change
* Use cmake to copy the windows dll to the output directory
* remove demo app
* Use HMAC DRBG
* Increment Version Number
* Add missing API functions for plaintext and ciphertext ballots
Add the plaintext and ciphertext versions of property getters for several functions missing on the ballot.h interface. Add a C test to demonstrate traversing some of the property getters.
* Add netstandard unit test shared project
* Add missing C# ballot objects and interface stubs
* Add missing property accessors
add c# unit tests for ios
* remove debug line
* Fix typo
* update PR workflow linux runners
* Initial CI test
* only cpp for now
* fix typo
* use self-allocation on gmtime_r call
* use explicit version
* add back error exclusion
* test coverage
* add variables, reformat
* use explicit version
add back error exclusion
test coverage
add variables, reformat
shorten test loop, add coverage target
tests on mac, sanitizers on linux
test add GCC
add debug/release folders for builds. add gcc/clang for linux
adjust paths
find android
adjust paths
see
ugh
Comment out android for now
* Build CI
* use console debug on dotnet
* New HACL v9
Add new HACL library
* Add boolean flag to remove nonces from serialization
* increment version number
* remove undefined sanitizer for now
* try use explicit max
use explicit limit
* remove coverage