Election-Tech-Initiative / electionguard-cpp

A C++ implementation of ElectionGuard specification focused on encryption components.
https://www.electionguard.vote/
MIT License
23 stars 26 forks source link

Handling of Extended Data Serialization in C++/.NET #245

Closed SteveMaier-IRT closed 2 years ago

SteveMaier-IRT commented 2 years ago

Is there an existing issue for this?

Current Behavior

Currently there are multiple functions that can load up an election context with extended data. There is a typo in the NativeInterface where eg_ciphertext_election_context_make_from_hex is used instead of eg_ciphertext_election_context_make_from_hex_with_extended_data so that the wrong C++ function underneath will be called and the extended data that is sent in will not work.

When data is serialized to or from JSON/BSON it does not use the extended data in the election context.

Expected Behavior

The NativeInterface should be using eg_ciphertext_election_context_make_from_hex_with_extended_data for the method that creates the election context with extended data.

When using the serialization with JSON/BSON the extended data should be included as well.

Steps To Reproduce

No response

Environment

- OS:

Anything else?

No response