Just using random values is not going to shorten it. While the likelihood that the two keys will be the same is very small, the chances quickly increase with the number of keys generated. See birthday paradox .
In most cases, such keys are generated in such a way as to guarantee uniqueness with the help of several values, such as the MAC address or any serial number of the server that generated it, time stamp, value of a special counter.
source
share