3

When I use internet banking with my bank I use something called PIN sentry, i.e. this:

enter image description here

(wikimedia commons image)

To use it I insert my chip-an-pin card (chip side in) and press one of the three top buttons: IDENTIFY, RESPOND or SIGN. The sentry asks me for the PIN and produces an 8 digit code which I then use inside internet banking.

The sentry itself does not contain any keys that are to my account (and EMV already uses public key cryptography anyway) since I can use the PIN sentry of someone else. But I wonder what it actually does to generate those digits.


My guess

At first I thought it performed an offline authorization for 1 unit of currency, an authorization that would simply never be cleared. Then the sentry will print the first digits of the HMAC. But this guess has two problems:

  1. At some point the card will want to go online and refuse to perform an offline authorization. I tested this (by using the sentry several times in sequence and the card never rejected it).

  2. EMV has UN (unpredictable number, i.e. random number, at 9F37) which is generated by the card and send as part of a transaction. As far as I am aware the UN is used in the HMAC calculation, therefore an issuer checking HMAC needs the UN. But, if the issuer receives only the digits from HMAC he cannot verify it.

So yeah, I'm out of ideas how this thing can work. But I have yet one more question on this device and PCI-DSS. The summary of the question is therefore:

Question

  1. The PIN sentry generates an 8 digit numeric code, that's relatively easy to bruteforce. How can this be PCI compliant?

  2. It is unlikely that the PIN sentry makes a transaction for one unit of currency. How therefore it can use the chip to validate the PIN and produce an output that can be checked by the issuer?

3

There's a sub-specification to EMV known as the Chip Authentication Program (for MasterCard) or Dynamic Passcode Authentication (for Visa).

I'd never run into this before, but according to Wikipedia, your "one unit of currency" guess is pretty close. The device starts by generating a cancellation message for a (fake) $0 transaction, then uses a mask stored on the card (Issuer Authentication Indicator) to select certain bits from the ARQC response, which get turned into the number displayed.

As for brute forcing the code, that's on the bank: Since the device is only used when interacting with your bank, the bank is immediately aware of any incorrect code attempts and can lock your account if it detects too many. Similarly, the device uses the card's standard PIN counter, so if you get your PIN wrong too many times the card will lock itself until it can do an online transaction.

  • Heh, I worked with APACS (POS terminals, not issuer side but still) and I could not figure this out. (well I was close :) ). Thanks – grochmal Oct 10 '16 at 20:55
  • @grochmal - I also work with POS terminals, and I'd never heard of it before, either. But when I was looking into it, I landed on Wikipedia's EMV page, and right there, at the bottom of the (lengthy) intro (which I'd never actually read): "Visa and MasterCard have also developed standards for using EMV cards in devices to support card not present transactions over the telephone and Internet. MasterCard has the Chip Authentication Program (CAP) for secure e-commerce." Sometimes, it just takes a second pair of eyes. :) – Bobson Oct 10 '16 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.