Re: “A Practical Attack on the MIFARE Classic ”

2008-07-15 Thread Karsten Nohl

On Jul 15, 2008, at 5:06 PM, Perry E. Metzger wrote:

Although the paper seems to be gone from Wikileaks, it is on cryptome:

This is a paper published on arXiv in March that does not contain the  
type of information NXP is suing over, which is why it was removed  
from Wikileaks.

The law suit is about a full disclosure of the Crypto1 security system  
that would allow anybody to build attack tools. However, as we all  
know, It would also convince more users of Mifare to consider  
upgrading to more secure technologies and potentially enable  
researchers to find countermeasures. The benefits clearly outweigh the  
risks since half a year after announcing the vulnerabilities, Mifare  
Classic is hopefully not used in any high security application anymore.


The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]

Re: more on malicious hardware

2008-04-27 Thread Karsten Nohl

Perry E. Metzger wrote:

It turns out that the counterfeit chips business is booming:

In combination with the news about what as few as 1500 extra gates can
do, this is especially worrisome.

Chip pirating is a huge problem. Part of the reason we think it is
ethical to release the Crypto-1 details is the fact that pirated Mifare
chips have been sold for years.

Pirating becomes more widespread as the chip manufacturing is
outsourced. The cost of manufacturing a small volume of chips is
dominated by cutting the masks used in the lithographic process steps.
Once these masks are built, shelling out more chip copies is relatively
cheap which enables manufacturers to overproduce and sell pirated copies.

Adding a backdoor to chips is a different story, though, since that
would require cutting a second set of masks. I am assuming that there
must be no backdoor in the legitimately produced chips since the client
would detect it as a slight violation of some of their timing
simulations. The client also often inspects the masks before the chips
are produced and basically reverse-engineers the whole chip on that level.

The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]

Re: Designing and implementing malicious hardware

2008-04-26 Thread Karsten Nohl

Jacob Appelbaum wrote:

Perry E. Metzger wrote:

A pretty scary paper from the Usenix LEET conference:

The paper describes how, by adding a very small number of gates to a
microprocessor design (small enough that it would be hard to notice
them), you can create a machine that is almost impossible to defend
against an attacker who possesses a bit of secret knowledge. I suggest
reading it -- I won't do it justice with a small summary.

It is about the most frightening thing I've seen in years -- I have no
idea how one might defend against it.

Silicon has no secrets.

I spent last weekend in Seattle and Bunnie (of XBox hacking fame/Chumby)
gave a workshop with Karsten Nohl (who recently cracked MiFare).

In a matter of an hour, all of the students were able to take a
selection of a chip (from an OK photograph) and walk through the
transistor layout to describe the gate configuration. I was surprised
(not being an EE person by training) at how easy it can be to understand
production hardware. Debug pads, automated masking, etc. Karsten has
written a set of MatLab extensions that he used to automatically
describe the circuits of the mifare devices. Automation is key though, I
think doing it by hand is the path of madness.

If we could convince (this is the hard part) companies to publish what
they think their chips should look like, we'd have a starting point.


Silicon has no secrets, indeed. But it's also much too complex for 
exhaustive functionality tests; in particular if the tests are open 
ended as they need to be when hunting for backdoors.

While a single chip designer will perhaps not have the authority needed 
to significantly alter functionality, a small team of designers could 
very well adopt their part of a design and introduce a backdoor.

Hardware designs currently move away from what in software would be open 
source. Chip obfuscation meant to protect IP combined with the ever 
increasing size of chips makes it almost impossible to reverse-engineer 
an entire chip.

Bunnie pointed out that the secret debugging features of current 
processors perhaps already include functionality that breaks process 
separation. The fact that these features stay secret suggest that it is 
in fact hard to detect any undocumented functionality.

Assuming that hardware backdoors can be build, the interesting question 
becomes how to defeat against them. Even after a particular triggering 
string is identified, it is not clear whether software can be used to 
detect malicious programs. It almost appears as if the processor would 
need a hardware-based virus-scanner or sorts. This scanner could be 
simple as it only has to match known signatures, but would need have 
access to a large number of internal data structures while being 
developed by a completely separate team of designers.


The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]

Re: Dutch Transport Card Broken

2008-01-28 Thread Karsten Nohl
Not to defend the designers in any way or fashion, but I'd like to ask, 
How much security can you put into a plastic card, the size of a credit 
card, that has to perform its function in a secure manner, all in under 
2 seconds (in under 1 second in parts of Asia)? And it has to do this 
while receiving its power via the electromagnetic field being generated 
by the reader.

You are raising a very interesting point. The constraints under which
RFIDs and contactless smart-cards need to operate seem to vary widely
depending on the application.

The Mifare Classic cards, for example, authenticate in under 2 ms, but
wouldn't need to be that fast as you point out. Their crypto is also
very small, much smaller even than their flash memory. What good is it,
though, to have a lot of memory that is badly protected?

Last, the power consumption of the Mifare cards is certainly lower than 
others, which doesn't matter, though, in the near-field where even

micro-processor based designs can operate. This is where contactless
smart-cards and RFIDs get confused often. Only for the latter ones power
consumption is a limiting constraint.

To answer your question directly: Within the limits of Mifare Classic
(48-bit cipher, 16-bit RNG), one can build a 64-bit cipher that
generates 'random' numbers internally. Within the same limits, one could
almost implement TEA which at least has undergone its share of
peer-review. Again: Trading some of the memory for this much higher
level of security would certainly have been worth it.

The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to [EMAIL PROTECTED]