dwcarder / draft-cc-v6ops-wlcg-flow-label-marking

0 stars 2 forks source link

hash function #11

Open dwcarder opened 1 year ago

dwcarder commented 1 year ago

From Brian: since a given flow must use the same flow label throughout, you can only use the regular 5-tuple as input to the Hamming code. I don't believe that a Hamming code will give you a discrete uniform distribution, but I'm not an expert in that area. An expert known as ChatGPT says: "No, a Hamming code does not produce a discrete uniform distribution... The non-uniformity of the distribution arises from the fact that Hamming codes prioritize error detection and correction capabilities over uniformity of codeword distribution."

So I think that simply using a stateless hash is the best way. These days I like FNV (draft-eastlake-fnv) which is easy and cheap to implement.

From Vasilenko Eduard: Any hash function must be close to "discrete uniform distribution"

timchown commented 1 year ago

So the point is we should have the 5 bits we use for entropy chose those 5 bits such that over time there is a uniform distribution. My Hamming code knowledge isn't good enough to know the detailed workings of that, we should ask whoever suggested the idea originally.

dwcarder commented 1 year ago

As our application is for telemetry any encoding must be reversible. We might need to poke around this area with some additional help, or perhaps drop this section if it's wrong or too distracting.

timchown commented 1 year ago

If we're adjusting all bits, rather than just the 5 entropy bits, then yes that would also affect traffic engineering based on the bits, not just time-unconstrained analysis. I don't know enough theory here to contribute so any help would be welcome.