Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization compatibility with the Rust implementation #107

Closed
danwallach opened this issue May 27, 2022 · 7 comments
Closed

Serialization compatibility with the Rust implementation #107

danwallach opened this issue May 27, 2022 · 7 comments
Labels
waiting-2.1 waiting for 2.1 spec

Comments

@danwallach
Copy link
Contributor

Dependent issue: Election-Tech-Initiative/electionguard-python#646

Depending on what they do or don't fix, we might need to:

  • Ensure that we're always serializing integers to 32-bits
  • Remove the 0x00 from the KDF computation
  • Encode HMAC keys in hex bytes (hopefully not!)

We should also double-check that we (and they) are correctly handling inputs that aren't multiples of 32 bytes long. (Took some extra effort to get this correct in the TypeScript code.)

@JohnLCaron JohnLCaron changed the title HashedElGamal: compatibility with the reference implementation Serialization compatibility with the C++ implementation Nov 5, 2022
@JohnLCaron
Copy link
Collaborator

When C++ and kotlin are at the same serialization version, presumably 2.0, we will wantt o check compatibility of implementations with the spec.
Anticipating that the spec will use JSON.

@danwallach
Copy link
Contributor Author

Serialization compatibility is going to be a broad issue for us, not just in the hash cipher thing, although that specific function is one of many places where we need to be bug for bug compatible, else it just doesn't work.

@JohnLCaron
Copy link
Collaborator

We are waiting for the 2.0 spec before worrying too much about this. When its out, we can test compatibility with c++ library.

My thinking is that we will keep our protobuf based classes as central, and have CLI that transform back and forth to JSON.

Also notable is that the webapps use JSON to communicate to remote guardians. These structure include many of the primitives used in the election record. So we already have that done as a template for the rest of the classes.

@JohnLCaron
Copy link
Collaborator

PR #222 adds json serialization of Manifest for version 1.52, and tests against proto serialization.

@JohnLCaron
Copy link
Collaborator

PR #223 adds json serialization for most of the other classes. Need the spec and C++ examples to finish.

@JohnLCaron JohnLCaron added the waiting-2.1 waiting for 2.1 spec label Jan 19, 2023
@JohnLCaron
Copy link
Collaborator

Waiting to hear from Rust implementation, which is doing the 2.0 implementration.

@JohnLCaron JohnLCaron changed the title Serialization compatibility with the C++ implementation Serialization compatibility with the Rust implementation Sep 16, 2023
@JohnLCaron
Copy link
Collaborator

Superceeded by Issue #373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-2.1 waiting for 2.1 spec
Projects
None yet
Development

No branches or pull requests

2 participants