How can my bank debit card reader know that my pin is valid?

The card knows this, the reader doesnt. When you put a pin in the reader talks to the microcontroller on the card to verify - which also logs the incorrect attempts. So multiple readers wont help trying to guess somebodies pin!
Thats more or less the extent of my knowledge, but an overview of how it works. The underlying protocols I have no knowledge of unfortunately. But the best public chip and pin researchers I've seen to date are the Cambridge guys ( http://www.cl.cam.ac.uk/~rja14/ ) despite the legal threats against them. A better answer will come along very soon!


If your debit card has an EMV chip (almost all chips are based on EMV today), it very likely does know your PIN (or at least how to verify an entered PIN).

Whether that capability is actually used depends on the type of transaction and terminal; if the terminal is online capable, it might as well verify the PIN directly with your bank's servers, which also know your PIN (or some derived verification value). This explains the behavior in the referenced question about ATMs; they simply choose to ignore the card's built-in PIN verification capabilities.

Since your reader is obviously not connected to anything but your card, the PIN you enter is in fact verified by the software running on your card itself, and not by the reader.

The reader supplies the card with your entered PIN. If they match, the transaction can proceed; if they don't match, an internal counter in the card is decremented and you can try again (but only a few more times).