-1

I am now running the MasterCard M-TIP test cases and cannot pass one of the requirement which is 'The card responds to the Second Gen AC with a TC'.

If someone could provide insight into what's happening or what's going wrong, I would greatly appreciate it. I attach ISO8583 logs and testing log for first and second generate AC as well for references.

ISO Log:

 Request: 
 [H]       6001110000
 [M]       0200

 [3]        000000
 [4]        000000004000
 [11]       237129
 [22]       0051
 [23]       0003
 [24]       0111
 [25]       00
 [35]       345413330089020011D2512601079360805F
 [41]       82298019
 [42]       000002207889494
 [55]      01145F2A0207645F34010382023000950580000080009A032103039C01009F02060000000040009F03060000000000009F090200029F10180210A0000F240000000000000000000000FF9F1A0207649F2608E268FFB06162B4719F2701809F34031E03009F3501219F360202019F370402AD4646
 [62]      00063030303030310000000000000000


 DE 55: 
  [5F2A]              0764
  [5F34]              03
  [82]                3000
  [95]                8000008000
  [9A]                210303
  [9C]                00
  [9F02]              000000004000
  [9F03]              000000000000
  [9F09]              0002
  [9F10]              0210A0000F240000000000000000000000FF
  [9F1A]              0764
  [9F26]              E268FFB06162B471
  [9F27]              80
  [9F34]              1E0300
  [9F35]              21
  [9F36]              0201
  [9F37]              02AD4646


 Response:
 [3]        000000
 [4]        000000004000
 [11]       237129
 [12]       090947
 [13]       0303
 [24]       0111
 [37]       106202237129
 [38]       679430
 [39]       00
 [41]       82298019
 [55]       910A602DD5A614D60000001271349F18008605841E0000088605841E0000088605841E0000088605841E0000088605841E0000088605841E0000088605841E000008

Generate AC Log:

1st Generate AC (ARQC)
    Request : 80 AE 80 00 25 00 00 00 00 40 00 00 00 00 00 00 00 07 64 80 00 00 80 00 07 64 21 03 03 00 02 AD 46 46 21 00 00 1E 03 00 48 00
    Class    :80
    Ins      :AE
    P1       :80
    P2       :00
    Lc       :25
    Data     :00 00 00 00 40 00 00 00 00 00 00 00 07 64 80 00 00 80 00 07 64 21 03 03 00 02 AD 46 46 21 00 00 1E 03 00 48 00
        Tag 9F 02: Transaction Amount                                             : 00 00 00 00 40 00
        Tag 9F 03: Cashback Amount                                                : 00 00 00 00 00 00
        Tag 9F 1A: Terminal Country Code                                          : 07 64
        Tag 95   : Terminal Verification Results (TVR)                            : 80 00 00 80 00
        Tag 5F 2A: Transaction Currency Code                                      : 07 64
        Tag 9A   : Transaction Date                                               : 21 03 03
        Tag 9C   : Transaction Type                                               : 00
        Tag 9F 37: Unpredictable Number                                           : 02 AD 46 46
        Tag 9F 35: Terminal Type                                                  : 21
        Tag 9F 45: Data Authentication Code                                       : 00 00
        Tag 9F 34: Cardholder Verification Method (CVM) Results                   : 1E 03 00
        Tag 9B   : Transaction Status Information(TSI)                            : 48 00
    masterKeyAC: 9E 15 20 43 13 F7 31 8A CB 79 B9 0B D9 86 AD 29
    uniqueKeyAC: 45 19 02 8F 54 4C AD 6D CE E9 A7 C7 C1 75 62 FD
    MCHIP SKD Session Key Derivation
    AC calculation: 00 00 00 00 40 00 00 00 00 00 00 00 07 64 80 00 00 80 00 07 64 21 03 03 00 02 AD 46 46 30 00 02 01 A0 00 0F 24 00 00 80
    Previous Transaction History
    Response: 61 2B

Get Response
    Request : 00 C0 00 00 2B
        Class    :00
        Ins      :C0
        P1       :00
        P2       :00
        Le       :2B
    Response: C0 77 29 9F 27 01 80 9F 36 02 02 01 9F 26 08 E2 68 FF B0 61 62 B4 71 9F 10 12 02 10 A0 00 0F 24 00 00 00 00 00 00 00 00 00 00 00 FF 90 00
        Ack Byte : C0
        Data     : 77 29 9F 27 01 80 9F 36 02 02 01 9F 26 08 E2 68 FF B0 61 62 B4 71 9F 10 12 02 10 A0 00 0F 24 00 00 00 00 00 00 00 00 00 00 00 FF
            Tag 77   : Response Message Template Format 2                             
                Tag 9F 27: Cryptogram Information Data (CID)                              : 80
                Tag 9F 36: Application Transaction Counter (ATC)                          : 02 01
                Tag 9F 26: Application Cryptogram (AC)                                    : E2 68 FF B0 61 62 B4 71
                Tag 9F 10: Issuer Application Data [M/Chip 4]                             : 02 10 A0 00 0F 24 00 00 00 00 00 00 00 00 00 00 00 FF
        SW1 SW2  : 90 00 (SW_OK)


2nd Generate AC (TC)
    Request : 80 AE 40 00 13 60 2D D5 A6 14 D6 00 00 00 12 30 30 80 00 00 80 00 48 00
    Class    :80
    Ins      :AE
    P1       :40
    P2       :00
    Lc       :13
    Data     :60 2D D5 A6 14 D6 00 00 00 12 30 30 80 00 00 80 00 48 00
        Tag 91   : Issuer Authentication Data [M/Chip]                            : 60 2D D5 A6 14 D6 00 00 00 12
        Tag 8A   : Authorization Response Code                                    : 30 30
        Tag 95   : Terminal Verification Results (TVR)                            : 80 00 00 80 00
        Tag 9B   : Transaction Status Information(TSI)                            : 48 00
    MChip4 - Symbol 81: Issuer Authentication failed, declining transaction
    masterKeyAC: 9E 15 20 43 13 F7 31 8A CB 79 B9 0B D9 86 AD 29
    uniqueKeyAC: 45 19 02 8F 54 4C AD 6D CE E9 A7 C7 C1 75 62 FD
    MCHIP SKD Session Key Derivation
    AC calculation: 00 00 00 00 40 00 00 00 00 00 00 00 07 64 80 00 00 80 00 07 64 21 03 03 00 02 AD 46 46 30 00 02 01 20 10 0F 24 04 00 80
    Previous Transaction History
    Response: 61 2B
    
Get Response
    Request : 00 C0 00 00 2B
    Class    :00
    Ins      :C0
    P1       :00
    P2       :00
    Le       :2B
    Response: C0 77 29 9F 27 01 00 9F 36 02 02 01 9F 26 08 3D 16 BC 66 09 5B E6 88 9F 10 12 02 10 20 10 0F 24 04 00 00 00 00 00 00 00 00 00 00 FF 90 00
    Ack Byte : C0
    Data     : 77 29 9F 27 01 00 9F 36 02 02 01 9F 26 08 3D 16 BC 66 09 5B E6 88 9F 10 12 02 10 20 10 0F 24 04 00 00 00 00 00 00 00 00 00 00 FF
        Tag 77   : Response Message Template Format 2                             
        Tag 9F 27: Cryptogram Information Data (CID)                              : 00
        Tag 9F 36: Application Transaction Counter (ATC)                          : 02 01
        Tag 9F 26: Application Cryptogram (AC)                                    : 3D 16 BC 66 09 5B E6 88
        Tag 9F 10: Issuer Application Data [M/Chip 4]                             : 02 10 20 10 0F 24 04 00 00 00 00 00 00 00 00 00 00 FF
    SW1 SW2  : 90 00 (SW_OK)

From the ISO log, you can see the host is actually approved the transaction but I don't understand why the card responds with AAC instead of TC.

  • this query is the duplication of https://stackoverflow.com/questions/66419082/emv-issuer-authenticate-in-second-generate-ac. Please provide all traces under original query. Host request and responses, full APDU card traces. – iso8583.info support Mar 07 '21 at 07:07

1 Answers1

1

Your Host simulator reply with issues:

  1. Tag 0x91 have to many zeroes in ARPC part. Then card tried to validate ARPC and 0x91 data you see the rejection: "MChip4 - Symbol 81: Issuer Authentication failed, declining transaction". The received ARPC cryptogram does not match the expected by card value.

  2. Issuer scripts Tag 0x71 also contain incorrect APDU commands with zeroed data.

Ask your simulator vendor for details. Maybe you use limited demo version that's why you got partially zeroed tags.

iso8583.info support
  • 2,130
  • 14
  • 18