I am trying to generate the ARQC as following:
1. Generate Token using 'DATAM'||'INTERNAL'||DOUBLE' as input in CSNBKTG.
2. Concatenating PAN||PAN SEQ (4123456789012345||02) and generate 16 byte value '2345678901234502'x
then XOR with 'FFFFFFFFFFFFFFFF'x and generate new PAN data = '2345678901234502DCBA9876FEDCBAFD'x
3. Using CSNBDKG, using above generated Token, PAN Data and input array 'TDES-ENC' we generate new key (Guess it is UDK)
4. Using CSNBDKG using above UDK , ATC '0012000000000000'x, ' and input array 'SESS-XOR', generated Session Key
5. Using CSNBMGN using above generated Session key and entire Cryptogram data (Amount, Other Amount, Currency code, Date Currency Code, ATC, Unpredict#, AIP... & '8000000000000000' (totally 48 bytes), generated ARQC.
This ARQC value is not matching with the received one. I am not sure what mistake I have done. I am not clear about how to generate Session Key for ARQC and ARPC generation. Could you please guide me to fix the issue or any alternate solution to generate ARQC and ARPC.
------------------------------
Dipin Jose
------------------------------