* Add new Hacl bignum code
fix failing tests
* add mod tests
* suppress redundant and irrelevant clang-tidy checks
* move C type casting to variant_cast
* add explicit size invariants and common ModP elements
* use size invariants
* cleanup compiler warnings
* implement mod operations
* Rework/refactor group.cpp
refactor components of group.cpp to support vector based interfaces, and static_cast when pointers are required for interfacing with hacl. Move conversion functions into static methods on the relevant classes.
* make element constructors use constants
* Implement DisjunctiveChaum-Pedersen
add tests to Hacl showing the memory footprint. handle edge cases for Q values that are out of bounds when adding and subtracting.
* Address PR feedback
* use smart pointers
migrate the pointer-based c++ interfaces to use smart pointers throughout. Use the pimpl idiom for most data objects. validate that memory management naively works across the C API boundary. address some compiler warnings.
* fix GCC compiler errors
* Add Hacl v5 library
* Add decrypt method
* Disable Cpp sanitizers
Fix buffer underflow
* Fix GCC compiler errors
* remove commented out code
* Generate tracking codes
* Add Constant chaum pedersen proof
* format on save fail
* Add new Hacl bignum code
fix failing tests
* add mod tests
* suppress redundant and irrelevant clang-tidy checks
* move C type casting to variant_cast
* add explicit size invariants and common ModP elements
* use size invariants
* cleanup compiler warnings
* implement mod operations
* Rework/refactor group.cpp
refactor components of group.cpp to support vector based interfaces, and static_cast when pointers are required for interfacing with hacl. Move conversion functions into static methods on the relevant classes.
* make element constructors use constants
* Implement DisjunctiveChaum-Pedersen
add tests to Hacl showing the memory footprint. handle edge cases for Q values that are out of bounds when adding and subtracting.
* Address PR feedback
* use smart pointers
migrate the pointer-based c++ interfaces to use smart pointers throughout. Use the pimpl idiom for most data objects. validate that memory management naively works across the C API boundary. address some compiler warnings.
* fix GCC compiler errors
* Add Hacl v5 library
* Add decrypt method
* Disable Cpp sanitizers
Fix buffer underflow
* Fix GCC compiler errors
* remove commented out code
* Generate tracking codes
* Add new Hacl bignum code
fix failing tests
* add mod tests
* suppress redundant and irrelevant clang-tidy checks
* move C type casting to variant_cast
* add explicit size invariants and common ModP elements
* use size invariants
* cleanup compiler warnings
* implement mod operations
* Rework/refactor group.cpp
refactor components of group.cpp to support vector based interfaces, and static_cast when pointers are required for interfacing with hacl. Move conversion functions into static methods on the relevant classes.
* make element constructors use constants
* Implement DisjunctiveChaum-Pedersen
add tests to Hacl showing the memory footprint. handle edge cases for Q values that are out of bounds when adding and subtracting.
* Address PR feedback
* use smart pointers
migrate the pointer-based c++ interfaces to use smart pointers throughout. Use the pimpl idiom for most data objects. validate that memory management naively works across the C API boundary. address some compiler warnings.
* fix GCC compiler errors
* Add Hacl v5 library
* Add decrypt method
* Disable Cpp sanitizers
Fix buffer underflow
* Fix GCC compiler errors
* remove commented out code
* Add new Hacl bignum code
fix failing tests
* add mod tests
* suppress redundant and irrelevant clang-tidy checks
* move C type casting to variant_cast
* add explicit size invariants and common ModP elements
* use size invariants
* cleanup compiler warnings
* implement mod operations
* Rework/refactor group.cpp
refactor components of group.cpp to support vector based interfaces, and static_cast when pointers are required for interfacing with hacl. Move conversion functions into static methods on the relevant classes.
* make element constructors use constants
* Address PR feedback
* fix GCC compiler errors
* add ciphertext ballot object properties
(WIP) the ios object conversion mecahnism still needs work
* implement swift api stub of new object types
fix broken tests. add docs
* Add tracker and tracker words
* address PR feedback
* add cstring
* add tracker tests
* add tracker facade
* Add Swift tracker functions
* add hash to words to interface
* Add Chaum Pedersen Proofs
wire up the calls in encrypt selection
* make tests pass with stubbed methods
* rework encrypt tests
* add C interface for chaum pedersen and elgamal
* Add elgamal keypair and fill in chaum pedersen test
add constants
* updated demo ios app election flow - moved encryption call to review selection screen, moved cast/spoil options to verification/tracking code screen, and added a final (thank you) screen
* disabled nav animation between review and verification view controllers to prevent possibly partially showing the users selection and the verification code at the same time as the verification screen animates in
Co-authored-by: Matt Wilhelm <github@addressxception.com>
* updated model naming to match python models and added missing enum values
* fixed spelling in ElgamalCiphertext struct name
* exposed hash_elems via C interface so it can be used by the Swift code for hashing strings and ints
* updated demo ios app to include hash.h from EG so it can use EG to hash strings and ints consistently
* added encrypt contest function to swift EG wrapper
* fixed id naming on election manifest models
* added encrypt ballot function to swift EG wrapper
* updated hash header import in tracker class file
needed as rebase
* add ciphertext ballot object properties
(WIP) the ios object conversion mecahnism still needs work
* Implement hex and support for inner lists for hashing
* add slice test to nonces
* implement swift api stub of new object types
fix broken tests. add docs
* WIP - q and p math verification
* big numbers test to show bytes dropped when not starting 64byte positions
* Fix to hex logic and added test
* Cleanup logging; add log overloads; free bignum pointer
* implement multiplication with tests; implement "pow mod p" and tried testing mod arithmetic, but its not working; less than is working
* g_pow_p
* Add new bignum
* rest of P & Q functions before integrating new math code
* updates to use new 256 bignum; move groups constants to constants file; update tests
* More tests
* update use of max Q in tests
* earlier changes needed to revert
* change constexpr to just const
* formatting G hex
* make sure uint64_t is represented as width 16
* a_plus_bc_mod_q fix - apply 4096 math after multiplying results in 512-bit number
Co-authored-by: Matt Wilhelm <github@addressxception.com>
* add ciphertext ballot object properties
(WIP) the ios object conversion mecahnism still needs work
* implement swift api stub of new object types
fix broken tests. add docs
* Add tracker and tracker words
* address PR feedback
* add cstring
* add tracker tests
* add tracker facade
* Add Swift tracker functions
* add hash to words to interface
* added screen to display an election contest
* added election manifest models and updated screens to display demo election data
* updated contest screen to track selection, allow deselection, and disable submit button unless a selection is made
* updated election manifest json so justice-supreme-court contest is a pick 1; updated contest view controller to use justice contest instead of pineapple
* added review selection screen w/ option to cast or spoil
* updated demo election manifest to include a Present candidate selection
* removed name display from contest screen - shows title and subtitle only
* added vote verification screen
* removed second contest from example manifest json so the example is for a single contest election
* updated data service to store in memory (for demo only) cast and spoiled votes, by contest id; updated main screen to only allow voting if there is a contest (assumes 1 contest per election) and the user hasnt already cast a ballot for that contest
* removed default text from labels
* added copy button to copy tracking id to clipboard
* updated default button color to match app colors
* updated hardcoded (demo) election manifest
* added CiphertextElectionContext model and updated data service with a function to return a hardcoded (demo) election context
* updated cast and spoil functions to call the electionguard-core library (currently the main test function)
* Add PlaintextBallotSelection
rename EncryptionCompositor to EncryptionMediator.
* Add initial interface for group and elgamal
add CiphertextBallotSelection
* Rework the C interface, add function calls to the demo
* remove GMP dependency
* Add summary comments to hpp headers
* restate elementmodp getter
* clean up some warnings
* add a basic logging interface
* fix compiler warning
* remove unused header
* fix off by one error
* Swift (iOS app) demo using c interface (#32)
* added swift (iOS app) demo using c interface
* update the readme, remove the binary from source
Co-authored-by: Matt Wilhelm <github@addressxception.com>
* (WIP) SHA-256 Hashing with Hacl (#31)
* Support string hashing
* support for various sized numbers
* Stub out to_int for P and Q classes; Classes for CryptoHashable, Implement hashing for null-scenarios, vectors, P and Q, numbers, and CryptoHashable
* Big refactor using C++17 variant feature and left TODOs for missing feature depending on Q and TODO to figure out working with fold expressions and variadic templates in place of vector args
* replace vector with initalizer_list
* Use C++ naming conventions
* Add equality operators to elementmodq
add vector support to hash.hpp
Co-authored-by: Matt Wilhelm <github@addressxception.com>
* Nonces class implementation (#33)
* Support string hashing
* support for various sized numbers
* Stub out to_int for P and Q classes; Classes for CryptoHashable, Implement hashing for null-scenarios, vectors, P and Q, numbers, and CryptoHashable
* Big refactor using C++17 variant feature and left TODOs for missing feature depending on Q and TODO to figure out working with fold expressions and variadic templates in place of vector args
* replace vector with initalizer_list
* Use C++ naming conventions
* Nonces class
* Clean up constructor with headers using variant instead of overloading and add variant_cast support
* change interface int types to uint64_t
Co-authored-by: Matt Wilhelm <github@addressxception.com>
* specify integer type
* add minimum ios target version 12.0
Co-authored-by: Ed Snider <edsnider@users.noreply.github.com>
Co-authored-by: Pamela Vong <pamelavong@gmail.com>