Skip to content

Int Representation for Hashing #10

@nickboucher

Description

@nickboucher

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions