Whenever we represent a digest as a hex string, we should encode it in a big-endian way to make small1 digest values have leading zeros.
The behavior of the functions to_hex, try_from_hex, and the Ord implementation should be consistent. The conversion to and from BigUint also needs to agree.
Note that we do not necessarily have to change the encoding of other values. I am only concerned with the hex string representation of Digest. e.g. BFieldElement or Digest is serialized is not of a concern, I think.
Whenever we represent a digest as a hex string, we should encode it in a big-endian way to make small1 digest values have leading zeros.
The behavior of the functions
to_hex,try_from_hex, and theOrdimplementation should be consistent. The conversion to and fromBigUintalso needs to agree.Note that we do not necessarily have to change the encoding of other values. I am only concerned with the hex string representation of
Digest. e.g.BFieldElementorDigestis serialized is not of a concern, I think.Footnotes
Small is well-defined for
Digestas it implements theOrdtrait. ↩