from : http://community.silabs.com/t5/32-bit-MCU-Knowledge-Base/EFM32-Unique-ID/ta-p/122190
Every EFM32 device is assigned a 64-bit Unique ID, which is programmed into the Device information page of the flash during the production of the device.This 64-bit value is guaranteed to be unique for all past and future EFM32 device that are manufactured.
The 64-bit value can be read from the following addresses:
0xFE081F0 (UNIQUE_0)
0xFE081F4 (UNIQUE_1)
UNIQUE_0 is a 32-bit timestamp (Unix time) set during production
UNIQUE_1 is a 32-bit value that represents the facility ID where the part was produced.
As each facility does not produce more than one part per second (smallest resolution of the timestamp), the two values together constitute a 64-bit unique number when combined.
Note that Silicon Labs while reserves the right to change the structure of these values in the future, but the uniqueness will still be guaranteed.
Hashing the Unique ID to generate smaller ID values
While uniqueness is only guaranteed when using the full 64-bit value, smaller IDs can be generated by using a cryptographic hashing function to reduce the ID bit number while still maintaining a low probability that two or more IDs will be identical. A hash function has a diffusion property that every bit of its input affects on average half of the bits of the output. Hashing the ID and then discarding bits will result in a collision probability directly related to the effective reduction in bit count.
Given that we generate k hash values where each value is a non-negative integer less than N, the probability that at least two of them are equal can be shown to be approximately:
k(k−1)/2N
The approximation is valid only if k is a lot smaller than N.
If a 56 bit hash value is generated from the Unique ID, there would then be a k(k-1)/(2*2^56) probability that at least two values would collide. If we assume that we generate k=1e6 values, the probability of collision is 6.93e-6.
Many cryptographic hashing functions could be suitable for this application, but when using an EFM32 the on-chip AES accelerator provides a speed benefit over other pure SW solutions. The AES accelerator can be used by combining the 64-bit UNIQUE ID together with an arbitrarily chosen constant to be used as the 128-bit data input to the AES function. The 128-bit key could also be an arbitrarily chosen constant. n bits of the output of the AES encryption can then be chosen to represent a pseudo unique ID with the collision probabilities described above.
'임베디드.일렉트로닉스' 카테고리의 다른 글
LCD Assistant . 비트맵 이미지의 LCD, OLED 용 픽셀데이터 생성툴. (0) | 2015.10.24 |
---|---|
EFM8SB1 Unique ID (Chip ID) (0) | 2015.10.12 |
가속도 센서, 각속도(자이로) 센서 개념정리. (0) | 2015.10.06 |
ALTIUM (알티움 팁) - 라우팅시 루프 자동제거 기능 해제하기. (0) | 2015.09.25 |
Dialog 사. DA1458x 외부 SPI 플래시 메모리. (0) | 2015.09.21 |
댓글