Search code examples
authenticationsmartcardemv

CDA Authentication Parameters


For CDA Authentication The EMV terminal a GENERATE AC command like

80 AE P1 00 LC DATA 00

CLA = 80

INS = AE

P1 = ?

P2 = 00

LC = ?

DATA = ?

LE = 00

Where do the parameters P1, LC and Data come from?


Solution

  • P1 defines the type of cryptogram you expect the chip to generate for you. It also has bit to specify the data has to be responded inside a CDA jacket. Refer the below part from EMVCo book 3.

    enter image description here

    So P1 = 0x00 will mean you expect an AAC, 0x80 for ARQC and 0x40 for TC

    Turn on bit 5, and you get the data inside a certificate.

    I hope you understand that not always you will get the expected cryptogram type back from Card. It can be in the order TC > ARQC > AC. When requesting TC, you can expect TC, ARQC or AC. When ARQC is requested you can get ARQC or AAC, but not TC. When AAC is requested, it is always AAC and not TC or ARQC.