Is there any reason we use 64-bit random codes instead of 32-bit ones? 32 bits can also create 832 random codes right? Just wanted to make sure I understood the logic correctly. Thanks!
You are right, 32-bit is feasible, and the reason we use 64-bit is simply because we want to avoid hash collision (which is low).
Does the hash collision you say we need to avoid occur because XORing two different sets of 32/64 bits might actually produce identical results? For example, 111 xor 111 is 000. But 101 xor 101 is also 000.
Hash collision is not considered in this situation.
I’m actually referring to your earlier answer where you mention hash collision
You shall consider that when designing but it is really hard to prevent from it 100%.