Researchers have published a cryptographic algorithm and source code that could be used to duplicate smart cards used by several major transit systems, including Boston's Charlie Card and the London Oyster card.

Scientists from the Dutch Radboud University Nijmegen presented their findings during the Esorics security conference on Monday in Malaga, Spain. They also published an article with cryptographic details.

Their presentations show how to circumvent the security mechanism of NXP Semiconductor's Mifare Classic RFID cards, which are widely used to provide access control to buildings and public transportation systems.

Researchers had previously reported that they had broken cryptography used in Mifare Classic, but NXP sued to prevent the information from being made public. The company asked for a lengthy delay to give customers enough time to secure their systems. However, a Dutch court ruled that free speech protected the researchers and that they shouldn't fall victim to mistakes made by the supplier.

Some details on the Mifare encryption were already public, but the publication of the Dutch paper marks the first time this information has been disclosed in a complete form, making it easy for a determined attacker to clone one of the cards.

In the paper, the researchers say they discovered the workings of the chip by analysing communication between the chip and the reader. An RFID-compatible device, the Ghost, was made to function independently from a computer. Ultimately they were able to obtain the cryptographic protocol. One issue is that the reader has to communicate in a predictable way, which opened the path to data analysis.

Related

When the mechanism was cracked, the scientists were able to crack keys in less than a second using a industry standard computer with only 8MB of memory. Given the state of technology in 1996, when the Mifare Classic was introduced, even then such a crack would take only minutes.

The Radboud University paper shows that researchers looked at another chip, the Hitag2, in order to crack the Mifare Classic. This chip was later introduced, but cracked some years ago. Since the information on this hack is freely available, this helped the researchers.

Security experts had expected sourcecode to surface soon after complete details of the Mifare Classic hack were published. However, last week a Russian website featured source code and documents. According to Professor Bart Jacobs, one of the paper's authors, the code lacked the authentication mechanism required to clone a Mifare Classic card.

But on Monday another paper released by German researcher Henryk Plotz does feature functioning source code. Jacobs said that this implementation could be used to build a working card.

The German group working on the Mifare Classic chip cracked its encryption by removing a Mifare chip from a card and then cutting layers off. By photographing each layer under a microscope and analysing all the connections they discovered the workings of the chip and derived the algorithm.

The Netherlands is introducing a new nationwide transportation card, OV-chipkaart, in a multi-billion dollar project. Despite criticism, the Mifare Classic chip won't be replaced before the new technology is introduced in 2009.