# UniqueID How is it determined?

**URL:** <https://forum.opencyphal.org/t/uniqueid-how-is-it-determined/559>\
**Category:** Libcanard\
**Created:** [July 4, 2019, 7:02am UTC](https://forum.opencyphal.org/t/uniqueid-how-is-it-determined/559 "2019-07-04T07:02:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YGQ](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/y/97f17d/32.png) [@YGQ](https://forum.opencyphal.org/u/YGQ)\
**Post date:** [July 4, 2019, 7:02am UTC](https://forum.opencyphal.org/t/uniqueid-how-is-it-determined/559/1 "2019-07-04T07:02:32Z")

</div>

Stm32 UniqueID is 96 bits, but I see that you define it as 16 bytes.

---

<div class="post-metadata">

**Author:** ![deekay](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@deekay](https://forum.opencyphal.org/u/deekay)\
**Post date:** [July 6, 2019, 7:10pm UTC](https://forum.opencyphal.org/t/uniqueid-how-is-it-determined/559/2 "2019-07-06T19:10:27Z")

</div>

> **[Universally unique identifier](https://en.m.wikipedia.org/wiki/Universally_unique_identifier)**
>
> A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems. The term globally unique identifier (GUID) is also used, typically in software created by Microsoft.
> When generated according to the standard methods, UUIDs are for practical purposes unique, without depending for their uniqueness on a central registration authority or coordination between the parties generating them, unlike most other numbering schemes. While the probability that a UU...

Perhaps st does not follow a standard?

---

<div class="post-metadata">

**Author:** ![deekay](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@deekay](https://forum.opencyphal.org/u/deekay)\
**Post date:** [July 6, 2019, 7:12pm UTC](https://forum.opencyphal.org/t/uniqueid-how-is-it-determined/559/3 "2019-07-06T19:12:11Z")

</div>

there are uuid generators online.

---

<div class="post-metadata">

**Author:** ![lucas](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/lucas/32/164_2.png) [@lucas](https://forum.opencyphal.org/u/lucas)\
**Post date:** [July 8, 2019, 10:31am UTC](https://forum.opencyphal.org/t/uniqueid-how-is-it-determined/559/4 "2019-07-08T10:31:56Z")

</div>

If you assume STM32 unique IDs have enough entropy, 96 bits will be more than enough to ensure a very low probability of collision between devices (ethernet had no problems with just 48 bits).

There is no requirement that unique IDs are random. If you can assure they are different they can be just a simple counter incremented per device.

Random numbers are used to make it unnecessary to have that synchronisation element. You depend on statistic properties of big enough random numbers to avoid collisions, instead of a global serial ID.

A simple solution for the hobbyist is to use a build timestamp in your firmware. By rebuilding your firmware you ensure another unique id.
