We have presented in class the basic communication mechanisms in EMV, the protocol used in banking transactions. We have seen the low-level communication layer, as well as the higher layers of communication, including the format of commands (CAPDUs) and responses (RAPDUs). Furthermore, we have also seen an example of transaction.
Throughout this lab you'll have to analyze the transcript of a transaction, specifying what commands are being sent and what data is received from the card.
For this, you should get the EMV specification for contact/acceptance device (books 1-3) from http://emvco.com:
You are given the following ATR (each character represents a hexadecimal digit):
3B6500002063CB6600
Decode it in order to understand the ATR parameters. Mention the available parameters.
A card returns the following TLV as a response to a READ RECORD command (ignore the line breaks, this should be a single hexstring):
70538D06910A8A0295058E0C0000000000000000410000008C219F02069F03069F1A02950 55F2A029A039C019F37049F35019F45029F4C089F34039F561380000FFFFF000000000000 00000000000000009F5501809000
Find what are the cardholder verification methods allowed.
A short part of the communication between terminal (T) and card (C) is as follows:
T->C: 80CA9F1700 C->T: 6C04 T->C: 80CA9F1704 C->T: CA9F1701069000
A short part of the communication between terminal (T) and card (C) is as follows:
T->C: 0020008008241111FFFFFFFFFF C->T: 9000
A short part of the communication between terminal (T) and card (C) is as follows:
T->C: 80AE80002B00000000000000000000000000008000000000000000000000000000003400000000000000000000410002 C->T: 612B T->C: 00C000002B C->T: C077299F2701809F360201349F2608817C3AAB208BE0659F10120310A00006250400000000000000000000FF9000
Say you know the card's master key to be:
79610497EFCB67E5546EF8CEBCB05D85
Can you regenerate the cryptogram (MAC) from the information obtained in the previous exercises ?
You know the encryption algorithm is 3DES.
Besides the data from previous exercises, you are also given the Application Interchange Profile is 0x1000.