13.56MHz MIFARE Reader Module

Frequently Asked Questions

Getting Started

To test and interface the MIFARE® OEM Module, you do not need a sophisticated uP development system. All you need is a PC, a connection cable and a power supply for the reader. If you are using Windows 95/98/NT, take the following steps:

  • Make sure, that your reader is RS232-interface type
  • Start HyperTerminal
  • Create a new connection (FILE/NEW CONNECTION)
  • Enter name of connection as you like (f.e. ‘MIFARE’)
  • Select connect COM2 (COM1) direct connection
  • Connection setup 9600,8,n,1,no handshake
  • Connect your reader to COM2 (COM1) of the PC and apply appropriate the supply voltage. A string (f.e. “Mifare V 0.14”) is transmitted to the PC by the reader. This String denotes the firmware provided by your reader module
  • Put a tag to your reader. Serial numbers should be displayed properly
  • Enter commands via keyboard. They should be transmitted to the reader and the reader should reply

How does ticketing work with MIFARE ?

To get a quick impression, connect the reader to a terminal program, take a new card and try the following steps:

  • Put the card in the field. The terminal program should show continuously the serial numbers of the card, for example “D1635640”.
  • Enter space. The transmission of serial numbers should stop.
  • Enter “s” for select. A MIFARE® card always has to be selected, before it can be accessed.
  • Enter “l01<ENTER>” for login to sector 01. This uses key A and the transport key A0A1A2A3A4A5. Alternatively you can type in “L01AAA0A1A2A3A4A5”, specifying that you want to use key A which is A0A1A2A3A4A5 on a new card. A login is always needed before a sector can be accessed. For new Philips cards use “l01FF<ENTER>” since they have FFFFFFFFFF as transport key.
  • Now you can access block 04, 05, 06, 07 which are on sector 01. If you enter “w04000123456789AABBCCDDEEFFDDEE0375” then the value 000123456789AABBCCDDEEFFDDEE0375 gets written to block 04. To read it, enter “r04”.
  • To format block 04 as a value block and store 1500 points (1500dec=000005DChex) enter “wv04000005DC”.
  • To use up 100 points (100dec=00000064hex) enter “-0400000064”
  • To backup the value into block 05 enter “=0405”
  • You also can add to the values on the card. To charge 500 points (500dec=000001F4hex) enter “+04000001F4”.

We would like to use MIFARE® for cashless payment. How safe is it ?

Security is always a property of the overall system, not of the components. It requires careful design. A properly designed system will require ALL barriers to be hacked in order to be broken. For good design start specifying feasible attacks. Then create barriers to block them. MIFARE® was specifically designed for cashless payment applications. The MIFARE® concept provides following barriers:

  • Anticollision/-selection
  • Atomic value transaction
  • Ciphered communication
  • Storage of values and data protected by mutual authentication
  • Weak field keys that allow decrement only
  • Stored keys in the reader that are not readable
  • Keys in the card that are not readable
  • A brute force attack by trying different keys is limited by the transaction time (several msec) of the card and would last virtually forever.
  • Etc.

The Application can and should provide more barriers:

Sector access conditions: It is possible, to assign access conditions in a way, that only decrementing of values is allowed with the keys used in the field. So even a manipulated field station can not be used to charge cards with additional values. As a rule, key A is used as a field key,

allowing decrement and read only, and key B to format the card or charge values. Ensure this rules even for unused sectors !

Diversified keys: To make life even harder for attackers, keys can be modified using serial number and

memory content of the card. So each card uses different keys and a listening attack on the reader interface would be hopeless.

Further improvements

  • Limiting cash volume stored on a card
  • Do not use the transport keys (keys as programmed after delivery) for ticketing applications !
  • Ciphered and scrambled data storage
  • Sabotage alarm
  • Etc.