Election-Tech-Initiative / Election-Tech-Initiative/ElectionGuard-SDK-Specification

Int Representation for Hashing

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
28
Forks
15
PR merge metrics
No merged PRs in 30d

Description

It is unclear from the specification the format in which numbers are to be encoded for the purpose of calculating the extended base hash. For example, a public key for an election trustee could be encoded as:
- a null-terminated ASCII string
- a little-endian binary number with padding to the nearest byte boundary
- a little-endian binary number with no padding
- a little-endian two's complement-encoded number with padding to the nearest byte boundary
- a little-endian two's complement-encoded number with no padding
- a big-endian binary number with padding to the nearest byte boundary
- a big-endian binary number with no padding
- a big-endian two's complement-encoded number with padding to the nearest byte boundary
- a big-endian two's complement-encoded number with no padding

Additionally, it should be made explicit the order in which trustee public keys are included in the base hash calculation. Presumably, the order is inherited from the order in which trustee public keys are enumerated in the json-serialized representation of the election. However, it is unsafe to assume this and should be made explicit for those constructing verifiers.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.