Граф коммитов

219 Коммитов

Автор SHA1 Сообщение Дата
Jesse Douglas 141109a337 Remove page/view model self-registration 2020-09-29 12:29:35 -04:00
Jesse Douglas 3896115b92 Replace Ninject w/ Autofac 2020-09-29 12:29:35 -04:00
Jesse Douglas d7587a995e Add active contest page w/ view model injection 2020-09-29 12:29:35 -04:00
Jesse Douglas b588bbaf17 Add active contest view model 2020-09-29 12:29:35 -04:00
Jesse Douglas 4c8912cdbc Add election service 2020-09-29 12:29:35 -04:00
Jesse Douglas 533032e671 Add models 2020-09-29 12:29:35 -04:00
Jesse Douglas 89cb398b43 Add view-model project 2020-09-29 12:29:34 -04:00
Jesse Douglas da11f6e5d8 Update .gitignore 2020-09-29 12:29:34 -04:00
Jesse Douglas 03549cec3b Rename projects to reflect hierarchy 2020-09-29 12:29:34 -04:00
Jesse Douglas 7b1a01e214 Update .gitignore 2020-09-29 12:29:32 -04:00
Matt Wilhelm 25e28df01a
Feature/election models (#71)
* Add android build support

* Add netstandard binding project

* Add c++ build output

* Build Nuget Package

* Compile out memzero on android

fix issue with Xcode generator improperly combining the ios fat binary output

* Add CiphertextElectionContext

* clean up some const_cast

* Add PlaintextBallotContest and CiphertextBallotContest

* Add EncryptContest

* add CiphertextBallot

* add EncryptBallot

* Add Encrypt Ballot

* Add C interface stubs

* Delete dead code in demo-cpp

* cleanup compiler warnings
2020-09-28 09:29:21 -04:00
Matt Wilhelm 768e985df9 cleanup compiler warnings 2020-09-27 12:43:42 -04:00
Matt Wilhelm 97e228a27b Delete dead code in demo-cpp 2020-09-27 11:39:14 -04:00
Matt Wilhelm 84cbe31523 Merge remote-tracking branch 'origin/integration/c-sharp' into feature/election-models 2020-09-27 11:37:17 -04:00
Matt Wilhelm c4dd6bd200 Add C interface stubs 2020-09-27 11:36:06 -04:00
Matt Wilhelm 126fa87668 Add Encrypt Ballot 2020-09-27 01:53:38 -04:00
Matt Wilhelm 211406456c
Feature/net standard wrapper (#70)
* Add android build support

* Add netstandard binding project

* Add c++ build output

* Build Nuget Package

* Compile out memzero on android

fix issue with Xcode generator improperly combining the ios fat binary output
2020-09-27 01:23:01 -04:00
Matt Wilhelm 1ee58df66f add EncryptBallot 2020-09-26 17:09:18 -04:00
Matt Wilhelm 96b7cdc08f add CiphertextBallot 2020-09-26 16:13:49 -04:00
Matt Wilhelm 2b4c76d05d Add EncryptContest 2020-09-26 13:25:42 -04:00
Matt Wilhelm 7dfb71fb79 Add PlaintextBallotContest and CiphertextBallotContest 2020-09-26 10:52:09 -04:00
Matt Wilhelm 1e307c8fec clean up some const_cast 2020-09-25 21:57:19 -04:00
Matt Wilhelm 6a844f14ff Add CiphertextElectionContext 2020-09-25 21:57:02 -04:00
Matt Wilhelm 27effb11c1 Compile out memzero on android
fix issue with Xcode generator improperly combining the ios fat binary output
2020-09-25 15:33:31 -04:00
Matt Wilhelm ca6333cfaa Build Nuget Package 2020-09-25 14:13:35 -04:00
Matt Wilhelm e1f9cfb437 Add c++ build output 2020-09-24 20:20:18 -04:00
Matt Wilhelm 9b4a7a14e4 Add netstandard binding project 2020-09-24 17:23:09 -04:00
Matt Wilhelm e081f5e31b Add android build support 2020-09-24 17:02:01 -04:00
Matt Wilhelm ef15b106c3 Short-circuit the swift app 2020-09-24 14:14:55 -04:00
Matt Wilhelm 844ac79ef5 Add Xamarin Forms Template 2020-09-24 14:01:50 -04:00
Matt Wilhelm 50ca2bc13e
Feature/constantchaumpedersenproof (#59)
* 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
2020-09-24 13:50:06 -04:00
Matt Wilhelm 88b3175086
Feature/ballot tracker (#57)
* 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
2020-09-24 13:19:35 -04:00
Matt Wilhelm 71debcea15
Feature/test elgamal (#55)
* 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
2020-09-24 12:58:54 -04:00
Matt Wilhelm fbb7ba57e0
Feature/element math operations (#54)
* 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
2020-09-23 15:28:27 -04:00
Matt Wilhelm 0f2ef4422c
Feature/new bignum 4 (#53)
* Add new Hacl bignum code

fix failing tests

* add mod tests
2020-09-11 16:47:25 -04:00
Matt Wilhelm 46e1756825
Feature/chaum pedersen (#52)
* 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
2020-09-10 16:40:35 -04:00
Ed Snider ec25db1a8b
updated ios demo app to get manifest from API (#51) 2020-09-09 14:43:46 -04:00
Ed Snider 9f3601d003
Fixed iOS app election screen flow (#49)
* 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>
2020-09-06 15:03:32 -04:00
Pamela Vong dfa70eadc7
Elgamal encryption + Fixes (#50)
* Fix P_ARRAY representation in Hacl format; Elgamal encryption; cleanup

* remove TODO comment

* rename refactor

Co-authored-by: Matt Wilhelm <github@addressxception.com>
2020-09-06 14:56:05 -04:00
Ed Snider 636db22361
Swift encrypt ballot and encrypt contest (#48)
* 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
2020-09-04 12:28:17 -04:00
Pamela Vong d03eaa1b35
P and Q methods and new Hacl Math (#47)
* 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>
2020-09-03 17:30:32 -04:00
Matt Wilhelm 697819e4fd
Feature/tracking code (#45)
* 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
2020-09-03 09:09:38 -04:00
Ed Snider 9b283919c3
iOS app demo election (#38)
* 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)
2020-09-01 16:12:40 -04:00
Matt Wilhelm fcd35de6d6
Feature/encrypt selection (#43)
* 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

* address PR feedback

* add cstring
2020-09-01 15:39:50 -04:00
Pamela Vong 5a2d2d3380
Implement hex and support for inner lists for hashing (#42)
* Implement hex and support for inner lists for hashing

* add slice test to nonces

Co-authored-by: Matt Wilhelm <github@addressxception.com>
2020-08-31 15:32:51 -04:00
Ed Snider f919c55192
updated README (#37)
fixed command in Swift Demo instructions
2020-08-31 13:59:10 -04:00
Matt Wilhelm 81817dd5a8
Feature/new bignum test (#35)
* 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>
2020-08-25 13:40:20 -04:00
Matt Wilhelm 382c1c1685 Add iOS build 2020-08-17 09:59:37 -04:00
Matt Wilhelm c34b82dd99 add new bignum test (WIP)
add the new bignum preview code
2020-06-24 11:55:08 -04:00
Matt Wilhelm 494b978385 build windows 2020-05-19 13:34:39 -04:00