Hacker trio breaks encryption for MIFARE

Researchers peeled back MIFARE chip layer by layer to discover 48-bit key

"Regardless of the cryptographic strength of the cipher, the small key space therefore permits counterfeiting of any card that is read wirelessly," the team wrote in a follow-up statement issued on Jan. 8. "Knowing the details of the cipher would permit anyone to try all possible keys in a matter of days," the researchers noted. "Given basic knowledge of cryptographic trade-offs and sufficient storage, the secret keys of cards can be found in a matter of minutes."

The Dutch smartcard transit system is overseen by Trans Link Systems, a joint venture created for this purpose in 2002. After the Chaos presentation, Trans Link and the Dutch government asked the Netherlands Organization for Applied Scientific Research (known as TNO) to quickly assess the immediate risks posed to the system, and then to do a more thorough study on the long-term implications. The initial six-page evaluation is dated Jan. 14, and a copy of the declassified report was made available by NXP.

TNO says the researchers' claim to have fully recovered the MiFare Classic encryption algorithm can't be fully verified. But if they haven't, TNO expects them to do so in the near future.

The report confirms that if the algorithm is in fact known, then the MiFare Classic card is vulnerable to a key search attack because of the 48-bit key length. TNO remains convinced that the costs of building a key cracker, in dollars and time, still is far higher than the researchers say. But a sufficient investment would indeed allow an attacker who retrieves a card's encryption key to write fraudulent travel products to the card, manipulate existing products, and increase the card's purse value. It's labor intensive: "Each card has to be broken individually with a newly initiated attack," according to the TNO report.

A critical finding by TNO is that these discoveries do not yet warrant the conclusion that the MiFare Classic is "unfit for public transportation applications." In part that's due to the fact that there are other security mechanisms in place, such as fraud detection and blacklisting, to detect fraudulent transactions and refuse the card. But a full assessment of the overall system security is needed, according to the study, and is the focus of TNO's next investigation.

In the short term, for at least the next six months, the Dutch card system is not at risk from a key breaking attack, according to TNO.

The Dutch transit system actually uses two other types of tickets or cards, and both have been successfully attacked by other researchers.

Nohl and his colleagues noted that other types of NXP RFID tags, such as the Hitag2+ and Mifare DESfire, are not affected by their findings. In its statement, NXP noted that the MiFare Classic is a "low-end chip in a family of products for contactless smartcard applications" but not intended for applications such as banking or auto security or ePassports.

RFID security concerns have become pronounced over the past year or so, as hackers and researchers make more concerted efforts to understand the vulnerabilities. In mid-2007, one team used readily available RFID gear to read the Electronic Product Code data on tagged boxes loaded on a tractor-trailer. A year earlier, another group raised the specter that RFID tags could be infected with computer viruses.