Terry Greeniaus <terrygreeni...@gmail.com> added the comment:

xoring does not guarantee uniqueness and has a good chance of discarding it, so 
it seems like a bad idea to me.

Suppose I have exactly two adapters with MAC addresses 0 and 3.
Suppose you have exactly two adapters with MAC addresses 1 and 2.

We'll both xor all our addresses and both get 0 ^ 3 == 1 ^ 2.  This trivially 
extends to 48 bits.

Suppose I have exactly two adapters from the same manufacturer.  The xor will 
throw away all of the "uniqueness" guaranteed by the manufacturer OUI and 
replace it with 0.

Suppose you have exactly two adapters from a different manufacturer (and 
nothing else).  The xor will throw away all of your "uniqueness" guaranteed by 
the manufacturer OUI and replace it with 0.

Now the only uniqueness between your UUIDs and my UUIDs will be the timestamp 
and the low-order bits of the xor'd MAC, whereas without the xor your UUIDs and 
my UUIDs would have absolutely been guaranteed to be unique since they are from 
different manufacturers with different OUIs.

I realize that the documentation for uuid1() states that it isn't guaranteed to 
give unique addresses if the time synchronization necessary isn't supported by 
the platform, so I suppose this could even be a documentation fix if no real 
solution can be found, but that would be really undesirable.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41552>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to