Part 2 of Behind the Tap, a series on how contactless payments work. Part 1 covered the half second a card spends on the reader.
You hold your phone near the terminal, glance at it, and it beeps. Apple Pay or Google Pay, done.
The terminal has no idea it just talked to a phone. As far as it's concerned, a contactless card turned up, answered its commands, produced a cryptogram and left. That isn't an accident or a loophole. It's the whole design. There are millions of contactless terminals in the world, and phone payments were built so that not one of them had to change.
The specifications say as much in their own way. In the Visa contactless kernel's glossary, a "card" is simply "a consumer device supporting contactless transactions". Plastic, phone or watch: if it answers like a card, it's a card.
So the interesting question isn't how the phone talks to the terminal. It's the same conversation. The interesting question is what the phone does differently behind it. There are three answers: the number it sends, who checks that it's you, and where the keys live.
The same conversation
Everything from part 1 still applies. The terminal finds the device, reads its list of payment applications (the PPSE), and Entry Point picks one. A Visa card in your wallet app goes to the Visa kernel, a Mastercard to the Mastercard kernel, exactly as the plastic card would. Then come GET PROCESSING OPTIONS, a few record reads, and a cryptogram, all inside the same 500 ms.
The terminal doesn't need a "phone mode". It only needs to understand a few capabilities that phones tend to have and plastic cards usually don't. The most important one is coming up below.

Not your card number
The first difference: your phone doesn't hold your card number.
When you add a card to Apple Pay or Google Pay, the wallet asks the card network for a payment token. It's a stand-in number that looks exactly like a card number (same length, same format) and can be used in its place. The phone stores the token, never the 16 digits printed on your card.
Because it looks like a card number, the token passes through the terminal, the acquirer and the network's switching unchanged. None of those systems had to be rebuilt either. Only at the network, just before the request goes to your bank, does a Token Service Provider swap it back. It looks up the token in its vault, checks it's still active and in date, and hands your bank the real card number. Your bank authorises as usual.
What makes a token safer than a card number isn't secrecy. It's that a token is only valid where it's meant to be used. EMV calls these Token Domain Restriction Controls. A token issued to your phone can be limited to contactless payments from that device, with a fresh token cryptogram on every transaction. If someone copies the token and types it into a website, it fails, because it was never allowed there. A stolen card number has no such limits.
And it gives you something a plastic card can't: if you lose your phone, the token can be suspended on its own. The card in your wallet keeps working, and the phone's copy of it stops.
Who checks it's you
The second difference is the one you notice at the till.
With a plastic card, the terminal decides whether to check you. Under the contactless limit nothing happens. Above it, the card's rules ask for a PIN, or the terminal asks you to insert the card instead.
A phone can check you itself, with Face ID, a fingerprint or the phone's passcode, before it ever reaches the reader. EMV calls this the Consumer Device CVM, or CDCVM: cardholder verification done on, and checked by, your own device. The terminal doesn't need a PIN, because the phone has already done the job a PIN does.
That changes the limits. The Mastercard kernel has two contactless transaction limits: one for devices that can't verify you, and a separate, usually higher, one for devices that can. The phone says which kind it is in a bit of its Application Interchange Profile. So the same purchase can be too big to tap with your card and fine to tap with your phone. That isn't the shop being inconsistent. The terminal is applying two different limits on purpose.
The obvious worry is: what stops a fake device from simply saying it checked you? The kernels have an answer, and I think it's the cleverest part of the whole arrangement. The terminal only trusts the phone's word when that word is signed.
- The Visa kernel reads a "Consumer Device CVM Performed" bit from the phone. It accepts it only if the same bits also appear inside data the phone has signed for offline authentication. If the two copies don't match, the reader declines. If there's no signed copy, it accepts the claim only on an online transaction, where the bank checks the cryptogram itself.
- In the Mastercard kernel, a device that claims it can verify you must use CDA, the strongest form of offline authentication, which signs the transaction itself. If that signature fails, the transaction is declined outright.
So nobody between the phone and the terminal can flip "I checked the cardholder" from no to yes without breaking a signature.
Where the keys live
The third difference is invisible, and it's where Apple and Google took different roads.
A plastic card keeps its keys in its chip, personalised at a bureau as in the handshake post. A phone needs somewhere equally safe. There are two approaches.
A secure element. This is a separate, tamper-resistant chip inside the phone, doing the same job as the chip on a card. The payment application and its keys live there, out of reach of the phone's operating system. Apple Pay works this way. For years the industry tried to do the same with the SIM card. That needed a Trusted Service Manager acting as a kind of card bureau for phones, plus a deal with every mobile network, and it never took off at scale. Apple's version works because an issuer only has to deal with one company.
Host Card Emulation (HCE). Here no secure chip is involved. An app on the phone's main processor answers the terminal as if it were a card. This is how wallets on Android, Google Pay included, generally work. The catch is that an app is much easier to attack than a secure chip, so HCE doesn't trust the phone with long-term keys. It works with limited-use keys: short-lived keys, derived by the issuer's side and sent to the phone in small batches. Each is good for a few transactions, and the wallet tops them up from the cloud. If one leaks, it's worth very little and soon expires.
Both produce the same kind of cryptogram at the terminal. The difference is only in how much the design relies on the phone itself.
Where this goes wrong
Some thoughts of my own.
The tap is the strong part. A token with domain controls, a cryptogram per transaction and a signed CDCVM claim are hard to defeat at the counter.
The weak moment is earlier: when the card is added to the wallet. That's when the network decides to issue a token to this phone, and the bank decides it really is the cardholder asking. It's usually backed by extra checks such as the CVV, a one-time code or 3-D Secure. But if those checks are weak, a fraudster with your card details can put your card on their phone, and from then on every tap looks perfect. For an issuer setting up mobile wallets, the provisioning checks deserve more attention than anything that happens at the terminal.
The second thing I'd watch is the limit difference. A phone can pay more than a card without a PIN, and that's by design. But it means the issuer's view of risk has to include what the phone did to verify the cardholder, not only the amount.
For the technical reader
Here is the terminal's side of "who checks it's you", for both kernels. The bits:
- Mastercard (Kernel 2): Application Interchange Profile, tag
82, byte 1 bit 2 means CDCVM is supported. If it's set and the reader supports CDCVM, the kernel uses the separate contactless limit for CDCVM devices. Above the CVM limit it records "CDCVM performed" in the CVM Results instead of going to the card's CVM List. - Visa (Kernel 3): Card Transaction Qualifiers, tag
9F6C, byte 2 bit 8 means Consumer Device CVM Performed. Bytes 6 and 7 of the Card Authentication Related Data, tag9F69, carry a copy of the CTQ, and that record is covered by the offline (fDDA) signature.
The script runs a plastic card and a phone through the same purchases. The limits and data are made up, since real limits are set per scheme, country and merchant.
CVM_LIMIT = 50_000 # above this, someone has to check the cardholder
TAP_LIMIT = 200_000 # most a card without CDCVM may tap for
TAP_LIMIT_CDCVM = 1_000_000 # most a device that verifies you itself may tap for
def kernel2(aip: bytes, amount: int) -> str:
cdcvm = bool(aip[0] & 0x02) # AIP byte 1 b2: CDCVM is supported
limit = TAP_LIMIT_CDCVM if cdcvm else TAP_LIMIT
if amount > limit:
return "over the tap limit (Select Next)"
if amount <= CVM_LIMIT:
return "no CVM"
return "CDCVM: the phone checked you" if cdcvm else "CVM List: PIN or signature"
def kernel3(ctq: bytes, signed: bytes | None, arqc: bool) -> str:
if ctq[0] & 0x80: # CTQ byte 1 b8: Online PIN Required
return "Online PIN"
if ctq[1] & 0x80: # CTQ byte 2 b8: Consumer Device CVM Performed
if signed is not None: # 9F69 bytes 6-7 carry the CTQ, under the fDDA signature
return "the phone checked you" if signed[5:7] == ctq else "decline: CTQ doesn't match what was signed"
return "the phone checked you (the bank checks the ARQC)" if arqc else "decline: unsigned claim, offline"
return "no CVM from the CTQ"
The same in C#
const int CvmLimit = 50_000; // above this, someone has to check the cardholder
const int TapLimit = 200_000; // most a card without CDCVM may tap for
const int TapLimitCdcvm = 1_000_000; // most a device that verifies you itself may tap for
static string Kernel2(byte[] aip, int amount)
{
bool cdcvm = (aip[0] & 0x02) != 0; // AIP byte 1 b2: CDCVM is supported
int limit = cdcvm ? TapLimitCdcvm : TapLimit;
if (amount > limit) return "over the tap limit (Select Next)";
if (amount <= CvmLimit) return "no CVM";
return cdcvm ? "CDCVM: the phone checked you" : "CVM List: PIN or signature";
}
static string Kernel3(byte[] ctq, byte[]? signed, bool arqc)
{
if ((ctq[0] & 0x80) != 0) return "Online PIN"; // CTQ byte 1 b8: Online PIN Required
if ((ctq[1] & 0x80) != 0) // CTQ byte 2 b8: Consumer Device CVM Performed
{
if (signed is not null) // 9F69 bytes 6-7 carry the CTQ, under the fDDA signature
return signed.AsSpan(5, 2).SequenceEqual(ctq) ? "the phone checked you" : "decline: CTQ doesn't match what was signed";
return arqc ? "the phone checked you (the bank checks the ARQC)" : "decline: unsigned claim, offline";
}
return "no CVM from the CTQ";
}
The full script, at the end of the post, prints:
Kernel 2
30,000 card: no CVM phone: no CVM
150,000 card: CVM List: PIN or signature phone: CDCVM: the phone checked you
500,000 card: over the tap limit (Select Next) phone: CDCVM: the phone checked you
Kernel 3, phone says it checked you
signed, matching: the phone checked you
changed in flight: decline: CTQ doesn't match what was signed
unsigned, online: the phone checked you (the bank checks the ARQC)
unsigned, offline: decline: unsigned claim, offline
The two AIP values, 1980 and 1B80, differ only in that one bit, and that bit is the difference between "insert your card" and "approved" at 500,000. The last four lines are the rule from above: the claim counts when it's signed or when the bank can check it, and in no other case.
What's next
The phone fits into EMV by pretending to be a card, but the token is doing a lot of quiet work underneath. Next in Behind the Tap: the token itself. Who is allowed to ask for one, how the network decides to issue it, and what happens to it over its life, from creation to suspension when a phone goes missing.
If you've worked on wallet provisioning, I'd like to know whether the "adding the card is the weak moment" problem matches what you've seen. Tell me in the comments.
The full scripts
Both run with nothing installed beyond Python 3.10 or .NET 10 (python3 who_checks_you.py, or dotnet run WhoChecksYou.cs), and print the same output.
who_checks_you.py
"""Who checks the cardholder on a contactless payment: the terminal, or the phone?
Kernel 2 (Mastercard): Application Interchange Profile (tag 82) byte 1 bit 2 says the device can verify
the cardholder itself (CDCVM). Such a device gets its own, higher contactless limit.
Kernel 3 (Visa): Card Transaction Qualifiers (tag 9F6C) byte 2 bit 8 says the device already has, and the
same two bytes must appear in the signed Card Authentication Related Data (tag 9F69).
The limits and values are made up; real limits are set per scheme, country and merchant.
"""
CVM_LIMIT = 50_000 # above this, someone has to check the cardholder
TAP_LIMIT = 200_000 # most a card without CDCVM may tap for
TAP_LIMIT_CDCVM = 1_000_000 # most a device that verifies you itself may tap for
def kernel2(aip: bytes, amount: int) -> str:
cdcvm = bool(aip[0] & 0x02) # AIP byte 1 b2: CDCVM is supported
limit = TAP_LIMIT_CDCVM if cdcvm else TAP_LIMIT
if amount > limit:
return "over the tap limit (Select Next)"
if amount <= CVM_LIMIT:
return "no CVM"
return "CDCVM: the phone checked you" if cdcvm else "CVM List: PIN or signature"
def kernel3(ctq: bytes, signed: bytes | None, arqc: bool) -> str:
if ctq[0] & 0x80: # CTQ byte 1 b8: Online PIN Required
return "Online PIN"
if ctq[1] & 0x80: # CTQ byte 2 b8: Consumer Device CVM Performed
if signed is not None: # 9F69 bytes 6-7 carry the CTQ, under the fDDA signature
return "the phone checked you" if signed[5:7] == ctq else "decline: CTQ doesn't match what was signed"
return "the phone checked you (the bank checks the ARQC)" if arqc else "decline: unsigned claim, offline"
return "no CVM from the CTQ"
card, phone = bytes.fromhex("1980"), bytes.fromhex("1B80") # AIP: same, except byte 1 b2
print("Kernel 2")
for amount in (30_000, 150_000, 500_000):
print(f" {amount:>9,} card: {kernel2(card, amount):<34} phone: {kernel2(phone, amount)}")
ctq = bytes.fromhex("0080")
print("Kernel 3, phone says it checked you")
print(" signed, matching: ", kernel3(ctq, bytes.fromhex("01A1B2C3D40080"), arqc=False))
print(" changed in flight: ", kernel3(ctq, bytes.fromhex("01A1B2C3D40000"), arqc=False))
print(" unsigned, online: ", kernel3(ctq, None, arqc=True))
print(" unsigned, offline: ", kernel3(ctq, None, arqc=False))
WhoChecksYou.cs
// Who checks the cardholder on a contactless payment: the terminal, or the phone? (.NET 10: dotnet run WhoChecksYou.cs)
// Kernel 2 (Mastercard): AIP (tag 82) byte 1 bit 2 = the device can verify the cardholder itself (CDCVM),
// and such a device gets its own, higher contactless limit.
// Kernel 3 (Visa): CTQ (tag 9F6C) byte 2 bit 8 = the device already has, and the same two bytes must appear in
// the signed Card Authentication Related Data (tag 9F69).
// The limits and values are made up; real limits are set per scheme, country and merchant.
const int CvmLimit = 50_000; // above this, someone has to check the cardholder
const int TapLimit = 200_000; // most a card without CDCVM may tap for
const int TapLimitCdcvm = 1_000_000; // most a device that verifies you itself may tap for
static string Kernel2(byte[] aip, int amount)
{
bool cdcvm = (aip[0] & 0x02) != 0; // AIP byte 1 b2: CDCVM is supported
int limit = cdcvm ? TapLimitCdcvm : TapLimit;
if (amount > limit) return "over the tap limit (Select Next)";
if (amount <= CvmLimit) return "no CVM";
return cdcvm ? "CDCVM: the phone checked you" : "CVM List: PIN or signature";
}
static string Kernel3(byte[] ctq, byte[]? signed, bool arqc)
{
if ((ctq[0] & 0x80) != 0) return "Online PIN"; // CTQ byte 1 b8: Online PIN Required
if ((ctq[1] & 0x80) != 0) // CTQ byte 2 b8: Consumer Device CVM Performed
{
if (signed is not null) // 9F69 bytes 6-7 carry the CTQ, under the fDDA signature
return signed.AsSpan(5, 2).SequenceEqual(ctq) ? "the phone checked you" : "decline: CTQ doesn't match what was signed";
return arqc ? "the phone checked you (the bank checks the ARQC)" : "decline: unsigned claim, offline";
}
return "no CVM from the CTQ";
}
byte[] card = Convert.FromHexString("1980"), phone = Convert.FromHexString("1B80"); // AIP: same, except byte 1 b2
Console.WriteLine("Kernel 2");
foreach (int amount in new[] { 30_000, 150_000, 500_000 })
Console.WriteLine($" {amount,9:N0} card: {Kernel2(card, amount),-34} phone: {Kernel2(phone, amount)}");
byte[] ctq = Convert.FromHexString("0080");
Console.WriteLine("Kernel 3, phone says it checked you");
Console.WriteLine($" signed, matching: {Kernel3(ctq, Convert.FromHexString("01A1B2C3D40080"), false)}");
Console.WriteLine($" changed in flight: {Kernel3(ctq, Convert.FromHexString("01A1B2C3D40000"), false)}");
Console.WriteLine($" unsigned, online: {Kernel3(ctq, null, true)}");
Console.WriteLine($" unsigned, offline: {Kernel3(ctq, null, false)}");
Sources: EMV Contactless Book C-2 (Kernel 2) and Book C-3 (Kernel 3) v2.12, and the EMV Payment Tokenisation Technical Framework v2.4, all free from emvco.com


