Keywords: UID, Internal Code, Format

Posted on 18 Aug, 2019

In the production of smart IC cards, in order to facilitate system use and query, most systems need to laser engrave the card’s UID (commonly known as inner code) on the card surface. The following are some common internal code formats for analysis.

Such as: Mifare1k S50 card 0 sector 0 block data: 2A83155EE288040047C129D24D000607
1.Manchester code (hex): the first 4 bytes of the block, A total of 8 numbers or letters.
2. The inverse code is “5E15832A”, that is, the first 4 bytes of the 0 sector 0 block are reversed. A total of 8 numbers or letters.

ABA code (decimal):
1. The positive code is the decimal number converted by the Manchester code, and the calculation result is “0713233758” according to the example. A total of 10 numbers.
2. The inverse code is the decimal number converted by the Manchester code and the result is “1578468138” according to the example. A total of 10 numbers.

ID card internal code common format
The Manchester code is hexadecimal, and the ABA code and the Wiegand code are both decimal. ID card’s Manchester internal code = version code + customer code + ID code
For example: 125533FFFF, the version code is “1”, the customer code is “2”, and the ID code (8 numbers or letters) is “5533FFFF”.

ABA(8H): The ID code (8 digits or letters, according to the example “5533FFFF”) is converted to decimal.
According to the example calculation result is “1429471231”, a total of 10 numbers.

ABA(6H): The ID code (the last 6 digits or letters, according to the example “33FFFF”) is converted to decimal.
According to the example calculation result is “03407871”, a total of 8 numbers.

ABA(4H): The ID code (the last 4 digits or letters, according to the example “FFFF”) is converted to decimal.
According to the example calculation result is “65535”, a total of 5 numbers.

WG26 (2H+4H): ID code (reciprocal number 6, 5th digit or letter + last 4 digits or letters, according to the example “33+FFFF”)
Converted to decimal, according to the example calculation result is “051, 65535”, a total of 8 numbers.

WG34 (4H+4H): ID code (the eighth, seventh, sixth, fifth digit or letter + last four digits or letters, according to the example “5533 + FFFF”)
Converted to decimal, according to the example calculation result is “21811, 65535”, a total of 10 numbers.