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

219 Коммитов

Автор SHA1 Сообщение Дата
John Morgan cd41ca2f73
🐛 #340 fix make environment for 🍎 (#343) 2023-01-03 11:36:49 -05:00
Lee Richardson 26abb5978d
#336 Add ability to specify which ballots should be spoiled in the CLI (#337) 2023-01-03 11:35:33 -05:00
John Morgan dd53fe3ef0
#341 - ignore vscode logs (#342) 2022-10-28 09:24:00 -04:00
Steve Maier cb7321732c
Add replacement for accented characters to language class (#333)
* Add replacement for accented characters to language class
Add unit test for handling accented characters.
Upgraded to version 1.0.0

* Encode the unicode characters as escaped chars
2022-09-28 11:00:24 -04:00
Steve Maier ff6975332f
Removed the use of the size of data returned from the C++ just use normal string logic. (#331) 2022-09-17 00:07:14 -04:00
Steve Maier 9d559b49bd
Fixed ballots to free the memory even tho it thinks it is already closed. (#328) 2022-09-15 16:49:27 -04:00
Steve Maier b418953b88
Change to newest json lib 3.11.2 (#327)
Cleaned up unmanged memory deleting copied data
2022-08-31 16:10:06 -04:00
Steve Maier 5116c72c89
change to use version 1.0 of the sample data (#323) 2022-08-31 09:17:20 -04:00
Awais Tanveer 8f8bcb550a
Remove unzip command for non-existant sample-data.zip file (#321) 2022-08-16 10:02:30 -04:00
Steve Maier 9e8f3b235f
Change string handling to use begin and end instead of front (#318)
* Change string handling to use begin and end instead of front
Added unit test to make sure the extended data is not null

* Fix multiple .net tests that had intermittent failures because of how c++ was handling data
2022-06-30 12:51:51 -04:00
Steve Maier 03986b78e4
When creating placeholders set the IsPlaceholder to true. (#317)
Unit test added to make sure the value is read properly.
2022-06-29 10:46:10 -04:00
MatthewRatzell f3046c3891
Updated doc test version (#314)
* Updated doctest GIT_TAG so Make Test doesn't output an error

* Updated other dependency that seemed to have an invalid gittag

Co-authored-by: Matthew Ratzell <mjr4427@g.rit.edu>
2022-06-27 08:55:31 -04:00
Lee Richardson 0af3157053
Validate that n of m elections are encrypting and decrypting correctly (#315)
* Validate that n of m elections are encrypting and decrypting correctly

* Extract styleid

* Fix problem with inconsistent slashes on windows build targets

* Consistently use forward slashes on windows

* Fix slashes for all build targets

* Fix slashes one level higher

* Fix cpm source cache as well
2022-06-24 14:09:43 -04:00
Steve Maier 370fdff223
For null string values for candidate and party, set them to an empty string (#313)
Created C# unit test
2022-06-23 09:57:08 -04:00
Steve Maier 5591045e66
Setup default value for votes_allowed to match the number_elected (#312)
* Setup default value for votes_allowed to match the number_elected
Create C# unit test to test various default values

* Removed the test for a single vote_allowed.

* Changed the test name to be clearer
2022-06-21 18:59:33 -04:00
Steve Maier d92a866dac
Fixed party name serialization (#309)
Added unit test to verify serialization
2022-06-17 14:02:26 -04:00
Steve Maier 62d1d030d3
- Add checks for the context and manifest matching manifesthash values (#306)
- Add C++ and C# unit tests
2022-06-15 10:11:47 -04:00
Steve Maier 6ba0bcab88
- Added checks for the election type and defaulting the VotesAllowed value to 1 if it is an n of m election (#305)
- Added C++ and C# unit tests to make sure the value gets set to 1
- Increased the build number for a new release of nuget package
2022-06-14 17:18:02 -04:00
Steve Maier 3d6ab6eabb
Updating release workflow with VS2022 (#303) 2022-06-09 12:35:26 -04:00
Steve Maier 45b3103128
Fix/default fix (#301)
* make the Party class default to a real value when the is no name given.

* clean up serialization

* Clean up constructor and fix an issue with C test

* fixed missing xml comments
2022-06-09 11:46:51 -04:00
Steve Maier 74f6ffbf4e
fix the serialization names (#299) 2022-06-08 15:37:34 -04:00
Lee Richardson 5180c1b20a
CPP CLI (#295) and VS2022 (#247)
* Simple CLI

* Ability to parse ballots

* Encrypt plaintext and output to out dir

* Submit ballots

* Fix compiler warnings

* Create output directory if it doesn't exist

* Add .NET 6 to github actions

* Upgrade to Visual Studio 2022

* Try to always install .NET 6

* Ensure .NET 5 AND 6 are both installed

* Upgrade .NET 5 to 6

* Only install .NET 6

* Remove 2nd command per PR
2022-06-07 17:24:38 -04:00
MatthewRatzell 171b97809a
Device issue (#290)
* Almost done working on device issue

* Finished working working on device encription issue,and hopefully did it correctly

* Adding using statements to encrpyt..hpp  to hopefully fix some errors

* Refactored device serilization to the right location

* Added JSON calls to .NET code for encryptionDevice

* Set up tests for encryption device C#

* Removed unneeded function definitions in encrypt.hpp

* Readded functions to encrpyt file to hopefully stop errors

* Adding using statement back even tho that will make linter unhappy

* Added code to clean up the mistakes I had originally, Still need to update tests

* Updated Encrypt.hpp

* fixed really stupid bug where I changed the name of a variable but not its subsequent calls

* ...

* Delete configurationCache.log

removing files not needed in the repo

* Delete dryrun.log

removing files not needed in the repo

* Delete targets.log

removing files not needed in the repo

Co-authored-by: Matthew Ratzell <mjr4427@g.rit.edu>
Co-authored-by: Steve Maier <82616727+SteveMaier-IRT@users.noreply.github.com>
2022-06-07 02:31:45 -04:00
Steve Maier c2040164c5
Feature/context config (#294)
* Adding configuration to the election context

* Converted configuration to be a pointer

* Add making a config from C#

* Creating Context with configurations

* Add methods to create context that include custom config.

* Fixed PR comments for tests

* Added missing comments
2022-06-03 15:41:38 -04:00
Steve Maier bf01e3e3fe
Fixed issue with party info having an issue serializing with null values (#293)
* Fixed issue with party info having an issue serializing with null values

* Add a unit test
2022-06-03 01:08:32 -04:00
Steve Maier 4d1e609e82
Fixed calling convention on nativeinterface calls (#289) 2022-05-27 16:56:20 -04:00
Steve Maier cacb33b880
Add Constant value serialization (#287)
* Add the ability to convert the contants to a json/bson string
Added tests in C# and C++
Fixed issue with Q value in C# being the wrong value.

* Removed the instructions from Python on how to create an instance of the class
2022-05-27 11:32:57 -04:00
Steve Maier 3418ca4a06
Found places where arrays were serialized as null instead of as empty arrays. (#284) 2022-05-25 17:33:08 -04:00
Steve Maier 15d90126ab
Fixed new constructor for the Manifest (#282)
* Fixed new constructor for the Manifest

* Add unit test for the changed constructor
2022-05-20 11:03:32 -04:00
jeffspel-crypto 0ea2ffdf63
Add support for using the 32 bit optimized HACL code. (#279)
* Add support for using the 32 bit optimized HACL code.

* Remove comment.

* fixed allocation for alloca inside of loops

* A bit of cleanup.

Co-authored-by: Steve Maier <ysfred4@hotmail.com>
2022-05-16 14:23:58 -04:00
Steve Maier 32b55893c3
Fix/integration fixes (#278)
* version number updated

* adding [] functionality to linked list class

* change ballot_code to code and add spec_version to serializing submitted ballots

* create manifest that can set name and contact information in c#

* Add comments for the new [] operator and new manifest ctor

Co-authored-by: Steve Maier <ysfred4@hotmail.com>
2022-05-13 09:41:24 -04:00
jeffspel-crypto 97e13e766b
Add support for writeins and overvotes. (#272)
* Add support for writeins and overvotes.

* Looks like my serialization changed broke a C test, not sure why the tests happily proceed on my machine.

* Update naming on an enum.

* Update naming of variables.

* Ooops got somethings wrong for key calculations. Also an updated test that should help with interop.

* Update with changes for interop. Overvote and writein labels were wrong. Updated some test data.

Co-authored-by: Jeff <spelmaa@wwu.edu>
2022-05-12 11:53:02 -04:00
Steve Maier 5d449cb269
update to version 0.1.11 (#277)
Co-authored-by: Steve Maier <ysfred4@hotmail.com>
2022-05-11 12:13:48 -04:00
jeffspel-crypto 331510f387
Optimize elgamal encryption. (#276) 2022-05-10 11:31:47 -04:00
jeffspel-crypto d894a96323
A plus bc mod q redo (#274)
* Update how a_plus_bc_mod_q is calling the big number package. Use 256 bit routines rather than 4096 routines.

* Add benchmark test for a_plus_bc_mod_q

* Use the abstraction layer.

* Should have been using the constant.

Co-authored-by: Jeff <jeffspel@hotmail.com>
2022-05-08 18:15:44 -04:00
jeffspel-crypto 84f21f78c8
Lookuptable mont entries (#273)
* Add support for montgomery entries in the lookup table.

* Add functions to move to and from montgomery form.

Co-authored-by: Jeff <spelmaa@wwu.edu>
2022-05-07 10:06:54 -04:00
jeffspel-crypto 554df0c59a
Lookup table mont (#265)
* new montgomery code

* Add Hacl code to support using Lookup_Table table entries in Montgomery form.

* Add a newline to the end of Hacl_GenericField64.h

* Removed the checks from the push path, only doing the pull_requests

* new Karamel version of HACL

* Changes for the merge

* Fixed header issue

* Add calls for the GetStatus to update the current status

* changed alloca call to malloca call to resolve issue with Code Scanner

* add constructor to API for testing.

* moved the allocation outside the for loops for the code checker

* Fixed comments on PR

Co-authored-by: Jeff <spelmaa@wwu.edu>
Co-authored-by: SteveMaier-IRT <steve.maier@infernored.com>
Co-authored-by: Steve Maier <82616727+SteveMaier-IRT@users.noreply.github.com>
2022-05-06 21:01:52 -04:00
SteveMaier-IRT 7165e78bcf Revert "Merge branch 'overvote_and_writeins' into main"
This reverts commit 355b689bbe, reversing
changes made to a6fad69bd5.
2022-05-06 15:44:15 -04:00
jeffspel-crypto 355b689bbe
Merge branch 'overvote_and_writeins' into main 2022-05-06 07:44:46 -07:00
Jeff a0cfff9a40 Add a string with a plaintext ballot for testing. 2022-05-05 21:52:06 -07:00
Jeff 5ea92acbe2 Remove spurious debug string. 2022-05-05 18:38:46 -07:00
jeffspel-crypto a6fad69bd5
Add code to support precomputations in the hashed elgamal encryption code. (#271)
Co-authored-by: Jeff <spelmaa@wwu.edu>
2022-05-05 20:05:04 -04:00
Jeff 85c0aaaea6 Merge branch 'overvote_and_writeins' of https://github.com/jeffspel-crypto/electionguard-cpp into overvote_and_writeins 2022-05-05 14:59:18 -07:00
Jeff 8aeee4091f Update the NetStandard test for overvotes. 2022-05-05 14:59:03 -07:00
jeffspel-crypto 8c7c6162bd
Merge branch 'microsoft:main' into overvote_and_writeins 2022-05-05 13:17:30 -07:00
jeffspel-crypto 53a22dd242
Add support to use precomputations when computing the constant chaum … (#269)
* Add support to use precomputations when computing the constant chaum pedersen proof associated with a contest.

* Fix the initialization of the count to determine how often we produce computations for the triple queue.

* Update the way the caller determines if there precomputed values for TwoTriplesAndAQuadruple

Co-authored-by: Jeff <spelmaa@wwu.edu>
2022-05-05 15:10:25 -04:00
Jeff 1e635a09c4 Add support for writeins and overvotes. 2022-05-05 10:51:01 -07:00
Steve Maier 95482bbf10
Removed lock on the stopping of the precompute. (#267)
* Removed lock on the stopping of the precompute.
Added benchmark to time the stopPrecompute functionality.

* Update version numbers for nuget release
2022-04-29 17:38:10 -04:00
jeffspel-crypto 8d1f234051
Overvote (#263)
* Adding code for the encrypt method of the hashed elgamal ciphertext object.

* Add some decryption code

* More decrypt code

* Encrypt/Decrypt for HashedElGamalCiphertext is working.

* Encrypt/decrypt seem to be working

* More HashedElGamalCiphertest changes.

* Update to HashedElGamalCiphertext crypto_hash methods.

* Revert changes to hash.hpp/cpp.

* Add benchmarking test. Cleanup the HashedElGamalCiphertext crypto_hash methods.

* Fix destructor.

* Updated to zeroize intermediate values.

* Change HashedElGamalCiphertext member from ciphertext to data.

* Update the padding scheme used in HashedElGamalCiphertext.

* Update to using hash_elems. Also create a get_hmac function and start using it.

* Fix some issues with HashElGamalCiphertext implementation.

* Add enumeration for max_len on hashedElGamalEncrypt

* Remove the apply_padding parameter from hashedElGamalEncrypt since with the enumeration we no longer need it.

* Update the master_key creation.

* Remove inheriting from CryptoHashable until we are sure we need it.

* Remove random comment.

Co-authored-by: Jeff <spelmaa@wwu.edu>
Co-authored-by: SteveMaier-IRT <steve.maier@infernored.com>
2022-04-28 14:02:37 -04:00
MatthewRatzell 9525fec14e
Whitespacing fix (#258)
* added .gitattributes file

added line to hopefully have line endings for linux on commit but change to system endings on pull

* change file format from txt in case that is neccessary for gitattributes

* Removed accidental duplicate .gitattributes

Co-authored-by: Matthew Ratzell <mjr4427@g.rit.edu>
2022-04-20 09:31:47 -04:00