본문 바로가기
임베디드.일렉트로닉스

EFM32 Unique ID (Chip ID)

by i.got.it 2015. 10. 12.

 

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(k1)/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.

댓글



 

비트코인




암호화폐       외환/나스닥/골드         암호화폐/외환/나스닥/골드
     
현물 |선물 인버스 |선물 USDT       전략매니저(카피트레이딩)         프랍 트레이더 온라인 지원가능. MT4,MT5