Part IV Debit Credit Application Security Specification
Part IV Debit Credit Application Security Specification
— Basic Specifications
V1.0.2
THIS PAGE IS INTENTIONALLY LEFT BLANK.
Part IV Debit/Credit Application Security Specification
Table of Contents
SUMMARY OF REVISIONS.................................................................................................... 1
2 REFERENCES ..................................................................................................................... 3
UPI Confidential i
Part IV Debit/Credit Application Security Specification
7 TERMINAL SECURITY................................................................................................... 53
7.1 SECURITY REQUIREMENTS FOR TERMINAL DATA ................................................................. 53
UPI Confidential ii
Part IV Debit/Credit Application Security Specification
Summary of Revisions
The change listed below is associated with the current version.
UPI Confidential 1
Part IV Debit/Credit Application Security Specification
1 Application Scope
This book applies to all UPI Participants.
UPI Confidential 2
Part IV Debit/Credit Application Security Specification
2 References
The terms and conditions of the following documents have become the terms and
conditions of this book. The modification list (excluding corrected contents) or
revised edition attached to the dated documents shall not apply to this book.
However, Participants may study whether to apply the latest versions of such
documents. The latest versions of non-dated documents shall apply to this book.
EMV Integrated Circuit Card Specifications for Payment Systems, Version 4.3
Book 2 Security_and_Key_Management.
UPI Confidential 3
Part IV Debit/Credit Application Security Specification
In the process of SDA, the terminal verifies the legality of the static data on the
card where SDA is capable of confirming that issuer application data has not been
illegally tampered since the card personalization.
In the process of DDA, the terminal verifies the static data on the card and
signature for relevant transaction information generated from the card. DDA is
capable of confirming that the issuer application data on the card has not been
illegally tampered since the card personalization. DDA can also verify the
authenticity of the card and prevent it from being illegally reproduced. DDA can be
standard dynamic data authentication or combined dynamic data
authentication/application cryptogram generation (CDA). AIP points out the offline
data authentication method supported by the IC card.
Result of the offline data authentication will determine whether the card and
terminal will execute offline transaction, online authorization, or decline
transaction offline. Comparison of SDA and DDA is listed in Table 1.
SDA DDA
Confirm that the card data have not been tampered Yes Yes
UPI Confidential 4
Part IV Debit/Credit Application Security Specification
Offline data authentication performs only one authentication method with the
priorities of the three offline authentication methods (from highest to lowest) as:
CDA, standard DDA and SDA. Circumstances and the offline verification modes
supported by card and terminal are listed in Table 2.
SDA and
SDA Standard DDA Standard DDA
standard DDA
SDA, standard
SDA Standard DDA CDA
DDA and CDA
Records used in offline data authentication must be in TLV encoding format and
Tag = ’70’. Data in records used in offline data authentication depend on the SFI of
the files:
For files with SFI of 1-10, the Tag (’70’) of the record and the length of record
are not used in offline data authentication processing, all other data in
command READ RECORD response data field (except SW1 and SW2)
participate in the offline data authentication.
For files with SFI of 11 to 30, the Tag (’70’) of the record and the length of
record are used in offline data authentication processing; therefore, all data in
command READ RECORD response data field (except SW1 and SW2)
participate in offline data authentication.
If the Tag of the record in the files used in offline data authentication is
not ’70’, it means that the offline data authentication has performed and failed.
The terminal must configure “offline data authentication executed digit” of TSI,
“offline static data authentication failed digit” corresponding to TVR, and
“offline dynamic data authentication failed digit” or “CDA failed” digit.
The terminal realizes offline data authentication by verifying the signature and
certificate on the IC card with public key algorithm. Public key technique uses
private key to generate encrypted data (certificate or signature) which can be
decrypted with the public key for verification and data recovery. The bit length of
RSA public key modulus should be a multiple of 8 and the leftmost (highest) bit of
the leftmost (highest) byte should be 1. All lengths should be in byte.
UPI Confidential 5
Part IV Debit/Credit Application Security Specification
If the static application data on the card are not unique (for example, the card
adopts different CVMs for international and domestic transactions), the card must
support multi IC card public key certificates (or static data signatures). If the signed
static application data may be modified after the card is issued, the card must
support the update of IC card public key certificate (or static data signature).
Certification authority and the Issuer must use the asymmetrical algorithm
designated in Section 10.2 to generate certification authority public and private key
pair, issuer public and private key pair, and IC card public and private key pair.
Description of offline data authentication process and related data elements in this
chapter is based on RSA algorithm.
Certification authority will generate a maximum of 6 public and private key pairs
and every public and private key pair will be allocated with a unique index of
certification authority public key. The certification authority public key and the
index are loaded to terminal by Acquirer, while the certification authority private
key is kept by the certification authority to ensure its confidentiality and security.
The terminal must have sufficient space to store certification authority public keys
and the corresponding registered application provider identifiers (RID) and
certification authority public key index. The terminal locates certification authority
public key via RID and certification authority public key index.
Length of certification authority public keys must be within the scope defined in
Section 10.2.1 and the certification authority public key index must be equal to 3 or
216+1.
To Support SDA or DDA requires the Issuer to generate issuer public and private
key pair and obtain issuer public key certificate from certification authority. The
Issuer transmits the public key to the certification authority, and the certification
authority uses the certification authority private key with length of modulus longer
than or equal to that of the issuer public key modulus and the public key effective
date, later than issuer public key effective date, to sign the public key.
UPI Confidential 6
Part IV Debit/Credit Application Security Specification
IC card must contain issuer public key certificate and use this certificate to verify
the certification authority public key index of the issuer certificate. The issuer
private key is kept by the Issuer to ensure its confidentiality and security.
Length of issuer public key modulus must be less than or equal to the maximum
length of certification authority public key modulus. The length of issuer public key
modulus must be within the scope defined in Section 10.2.1. The issuer public key
index must be equal to 3 or 216+1.
The terminal locates certification authority public key via registered application
provider identifier (RID) and certification authority public key index, which also
uses the certification authority public key to recover issuer public key from issuer
certificate, then uses issuer public key to recover and verify the issuer application
data on the card.
To support DDA also requires Issuer to generate IC card public and private key
pair for every IC card. IC card private key is stored in the IC card secure storage
area. IC card public key is signed by issuer private key to generate IC card public
key certificate which is stored in card.
The length of IC card public key modulus must be less than or equal to that of
issuer public key modulus and within the scope defined in Section 10.2.1. The IC
card public key index must equal to 3 or 216+1.
IC card public key can also be used for offline cryptogram PIN verification, there is
no requirement for offline cryptogram PIN in UnionPay Integrated circuit card
specifications-Basic Specification.
The purpose of SDA is to verify the legality of critical static data identified by
application file locator (AFL) and listed in optional static data authentication tag
list stored in IC card so as to ensure that the issuer data in IC card have not been
illegally tampered with since personalization.
After personalization, the IC card supporting SDA should include the following
data elements:
Certification authority public key index: This single byte data element contains
a binary number, indicating which of the corresponding certification authority
UPI Confidential 7
Part IV Debit/Credit Application Security Specification
public key stored in terminal should be used by the terminal to authenticate the
IC card.
Issuer public key certificate: Variable length data element provided by the
certification authority to the Issuer. When the terminal verifies the data element,
the issuer public key and other data should be authenticated according to the
process described in Section 3.2.3.
Signed static application data: Variable length data element generated by the
issuer private key corresponding to the issuer public key authenticated by
issuer public key certificate. It is a digital signature of critical static data
element stored in IC card, which is specifically described in Section 3.2.4.
Remainder of issuer public key: A variable length data element, the presence
of this data element in the IC card is conditional. Further interpretation is
provided in Section 3.2.1.
Issuer public key index: A variable length data element provided by Issuer and
further interpretation is provided in Section 3.2.1.
In order to support SDA, every terminal should be able to store six certification
authority public keys for every registered application provider identifier (RID), and
must make the key information related to the key be interrelated to every key (so
that the terminal will be able to support multi algorithms in future and it will be
allowable to transit from one algorithm to another, please refer to section 7.3). In
case that RID and certification authority public key index provided by IC card is
given, the terminal should be able to locate such public keys and related
information.
UPI Confidential 8
Part IV Debit/Credit Application Security Specification
Issuer
public
key
certificate
(PI is
signed by
SCA)
Personalization
Signed Issuer
application public
data(Signe key
d by SI) certificate
IC card
application
READ RECORD
response message
Transaction includes:
IC card Certification authority
Terminal
application public key index
Issuer public key
certificate
Signed application data - PCA is used to recover PI. from issuer
public key certificate.
-PI is used to recover signed
application data.
SDA must use a reversible algorithm indicated in Section 9.2.1 and section 10.2.
Section 3.2.1 contains overviews of keys and certificates involved in the process of
SDA. The three major steps of authentication process are described in detail in
section 3.2.2 and Section 3.2.4:
In order to support SDA, the IC card must contain signed static application data,
which is signed via issuer private key. Issuer public key must be stored in the IC
card as public key certificate.
To obtain an issue public key certificate, certification authority private key SCA
should be used. The signature scheme in Section 9.2.1 should be used for the data
as shown in Table 3.
UPI Confidential 9
Part IV Debit/Credit Application Security Specification
There is a public key modulus of the public key of certification authority and the
public key modulus has NCA bytes. Public key Index of certification authority must
be equal to 3 or 216+1.
In order to obtain signed static application data, issuer private key SI should be used.
The signature scheme in Section 9.2.1 should be used for the data shown in Table
4.
There is an issuer public key modulus of the issuer public key pair and the public
key modulus has NI bytes (NI≤NCA). If NI >(NCA-36), the issuer public key modulus
is divided into two parts, one part contains the high order NCA-36 bytes in public
key modulus (the leftmost numbers in issuer public key and the other part contains
the surplus low order NI -(NCA-36)bytes (the remainder of issuer public key). The
issuer public key index must be equal to 3 or 216+1.
All information and data required for SDA are explained in Table 5 in detail, which
is also stored in the IC card. RID can be obtained from AID while as other
information and data can be obtained via reading command record (READ
RECORD). SDA will fail if any one of those data is missing.
Table 3 Issuer Public Key Data Signed by Certification Authority (hash Algorithm
Input)
UPI Confidential 10
Part IV Debit/Credit Application Security Specification
Table 4 Static Application Data Signed by Issuer (i.e. Hash Algorithm Input)
Data authentication
2 Code distributed by Issuer b
code
UPI Confidential 11
Part IV Debit/Credit Application Security Specification
‘9F4A’)). If there is a static data authentication tag list, it must only contain tag
‘82’ used for identifying AIP.
NI – NCA
‘92’ Remainder of issuer public key(if any) b
+36
The terminal reads the certification authority public key index. In order to use the
index and RID, the terminal must confirm and obtain the modulus, index and the
related key information of the certification authority public key and the
corresponding algorithm to be used. If the terminal hasn’t stored the key related to
the index and RID, static data authentication will fail.
1. If the length of issuer public key certificate is different from that of certification
authority public key modulus obtained in the previous process, the SDA has failed.
UPI Confidential 12
Part IV Debit/Credit Application Security Specification
Head of recovered
1 Hexadecimal and the value is “6A” b
data
3. Check the recovered data head. If it is not “6A”, the SDA has failed.
4. Check the certificate format. If it is not “02”, the SDA has failed.
UPI Confidential 13
Part IV Debit/Credit Application Security Specification
5. Concatenate from left to right the second to the tenth data elements in Table 6
(from certificate format to the issuer public key or the leftmost byte of issuer public
key) and then add the remainder of issuer public key to the end (if any), and final is
add the issuer public key index.
6. Use the designated hash algorithm (derived from Hash Algorithm Indicator) to
calculate the concatenation of the previous step to produce the hash result.
7. Compare the calculated hash result from the previous step with the recovered
hash result, if they are different from each other, SDA has failed.
8. Check if the issuer identifier matches the leftmost 3-8 digitals of the primary
account number (allowing for the possible padding of the Issuer Identifier with
hexadecimal 'F's). If not, the SDA has failed.
9. Verify that the last day of the month specified in the Certificate Expiration Date
is equal to or later than today’s date. If the Certificate Expiration Date is earlier
than today’s date, the certificate has expired, in which case SDA has failed.
10. Verify that the concatenation of RID, Certification Authority Public Key Index,
and Certificate Serial Number is valid. If not, SDA has failed.
11. If the identifier of issuer public key algorithm cannot be identified, the SDA has
failed.
12. If all the checks above are correct, concatenate the Leftmost Digits of the Issuer
Public Key and the Issuer Public Key Remainder (if present) to obtain the Issuer
Public Key Modulus, and continue with the next steps for the verification of the
Signed Static Application Data.
1. If the length of signed static application data is different from the length of issuer
public key modulus, the SDA has failed.
Head of
1 Hexadecimal and the value is “6A” b
recovered data
Signed data
1 Hexadecimal and the value is “03” b
format
UPI Confidential 14
Part IV Debit/Credit Application Security Specification
Data verification
2 Code distributed by Issuer b
code
End of recovered
1 Hexadecimal and the value is “BC” b
data
3. Check the recovered data head. If it is not “6A”, the SDA has failed.
4. Check signed data format. If it is not “03”, the SDA has failed.
5. Concatenate from left to right the second to the fifth data elements in Table 7
(that is, Signed Data Format through Pad Bytes), followed by the static data to be
authenticated as specified in section 7.3.1 of UnionPay Integrated circuit card
specifications-Basic Specifications Part Two Debit/Credit Application Card
Specification. If the Static Data Authentication Tag List is present and contains tags
other than “82”, then SDA has failed.
6. Use the designated hash algorithm (obtained from hash algorithm identifier) in
the connecting results of the previous step to produce the hash result.
7. Compare the calculated hash result from the previous step with the recovered
hash Result. If they are not the same, SDA has failed.
8. If all of the above steps were executed successfully, SDA was successful. The
The purpose of DDA is to confirm the legality of the critical data stored in and
generated by IC card and the data received from terminal. Besides executing the
static data authentication process similar to SDA, ensuring that the issuer data in IC
card have not been illegally tampered with since personalization, DDA can also
prevent the possibility of falsifying such cards.
The following two optional modes of dynamic data authentication are available:
UPI Confidential 15
Part IV Debit/Credit Application Security Specification
and the data received from terminal identified by dynamic data authentication
data object list.
IC cards supporting dynamic data authentication must include the following data
elements:
Public key index of certification authority: The single byte data element
contains a binary number, indicating which of the corresponding certification
authority public keys stored in terminal should be used to verify IC card.
IC card public key certificate: This variable data element is provided by Issuer
to IC card. If verifying this data element, the terminal authenticates the IC card
public key and other data according to the process described in Section 3.3.4.
Issuer public key index: It is a variable data element provided by Issuer and is
further interpreted in Section 3.3.1.
IC card public key index: It is a variable data element provided by Issuer and is
further interpreted in Section 3.3.1.
IC card private key: It is a variable data element stored in IC card used for
generating signed dynamic application data according to the process described
in Section 3.3.5 and Section 3.3.6.
UPI Confidential 16
Part IV Debit/Credit Application Security Specification
DDA must use a reversible algorithm shown in Section 9.2.1 and Section 10.2.
Section 3.3.1 contains overviews of key and certificate involved in DDA process,
and the initial steps of the authentication process are described in detail in Section
3.3.2 and Section 3.3.4:
Finally, the generation and verification process of dynamic signature in two cases
are described in detail in Section 3.3.5 and 3.3.6.
UPI Confidential 17
Part IV Debit/Credit Application Security Specification
Issuer
public
key
certificate
(PI is
signed by
SCA)
Personalization Issuer
IC card IC card
public
private public
key
key SICC key PICC
certificate
IC card
public key
certificate
(PICC is
signed by
SI)
IC card
INTERNAL AUTHENTICATE1
IC card
or GENERATE AC2 command
- Use PCA to recover PI from
issuer public key certificate
Use SICC to - Use PI to recover PICC from
calculate IC card public key certificate
dynamic - To authentication the static
signature data Hash in IC card public
key certificate
INTERNAL AUTHENTICATE1
or GENERATE AC2 response Terminal
with dynamic signature 1
INTERNAL
AUTHENTICATE Use PICC to
command(for standard verify
DDA) dynamic
2
GENERATE AC signature
command (for CDA)
In order to support DDA, an IC card must have a unique public/private key pair of
its own; the public/private key pair consists of a private signature key and a
UPI Confidential 18
Part IV Debit/Credit Application Security Specification
corresponding public verification key. The IC card public key must be stored in the
public key certificate of the IC card.
DDA uses a three-tier public key certificate scheme. Every IC card public key is
authenticated by its Issuer and the certification authority authenticates the issuer
public key, which indicates that in order to verify the signature of IC card, the
terminal should first recover and verify IC card public key through verifying two
certificates and then uses the public key to verify dynamic signature of the IC card.
Apply certification authority private key SCA to the data designated in Table 8 and
issuer private key SI to the data designated in Table 9 according to the signature
scheme in Section 9.2.1 to obtain issuer public key certificate and IC card public
key certificate respectively.
There is a NCA bytes public key modulus of certification authority public key pair
and the certification authority public key index must be equal to 3 or 216+1.
The issuer public key pair has an NI bytes (NI≤NCA) issuer public key modulus. If
NI >(NCA-36), the issuer public key modulus is divided into two parts, one part
contains the top NCA-36 bytes of the modulus (the leftmost numbers of issuer
public key) and the other contains the rest lowest NI -(NCA-36) bytes of the
modulus (remainder of the issuer public key). The issuer public key index must be
equal to 3 or 216+1.
The IC card public key pair has an NIC bytes (NIC≤NI≤NCA) IC card public key
modulus If NIC>(NI-42), the IC card public key modulus is divided into two parts.
One part contains the top NI- 42 bytes of the modulus (the leftmost numbers of IC
card public key) and the other contains the rest lowest NIC - (NI-42) bytes of the
modulus (the remainder of IC card public key). The IC card public key index must
be equal to 3 or 216+1.
If the static application data in the card is not unique (for example, the card uses
different CVMs for international and domestic transactions), the card must support
multi IC card public key certificate, if the signed static application data may be
modified after being issued by the card, the card must support update of the IC card
public key certificate.
In order to complete DDA, the terminal must first recover and verify IC card public
key (this step is called IC card public key authentication). All information and data
required for IC card public key authentication are detailed in Table 10 and stored in
the IC card. Besides RID can be obtained from AID, other information and data can
be obtained via command READ RECORD. If any of these data is missing, then
DDA has failed.
Table 8 Issuer Public Key Data Signed by Certification Authority (Hash Algorithm
Input)
UPI Confidential 19
Part IV Debit/Credit Application Security Specification
Identifier of
It is an identifier for the digital signature
issuer public key 1 b
algorithm to use issuer public key.
algorithm
Table 9 IC Card Public Key Data Signed by the Issuer (i.e. Hash Algorithm Input)
UPI Confidential 20
Part IV Debit/Credit Application Security Specification
Primary account
Primary account number (adding
number of 10 cn20
hexadecimal numeral “F” in the right)
application
Identifier of IC
It is an identifier for the digital signature
card public key 1 b
algorithm used in IC card public key.
algorithm
UPI Confidential 21
Part IV Debit/Credit Application Security Specification
The terminal reads out certification authority public key index. By this index and
RID, the terminal is able to confirm and obtain the modulus and index of
certification authority public key and related key information as well as the
corresponding algorithm that will be used and stored in the terminal. If the terminal
has not stored the key related to the index and RID, the DDA fails.
1. If the length of issuer public key certificate is different from that of certification
authority public key modulus obtained in the previous clause, the DDA fails.
UPI Confidential 22
Part IV Debit/Credit Application Security Specification
2. In order to obtain the restored data shown in Table 11, use certification authority
public key and corresponding algorithm to resume issuer public key certificate
according to the retrieval function shown in Section 9.2.1. If the end of restored
data is not equal to ‘BC’, the DDA fails.
Recovered data
1 Hexadecimal value is “6A” b
head
Certification
1 Hexadecimal value is “02” b
Format
Identifier of
It is an identifier for the digital signature
issuer public key 1 b
algorithm used in issuer public key.
algorithm
UPI Confidential 23
Part IV Debit/Credit Application Security Specification
Recovered data
1 Hexadecimal and the value is “BC” b
end
3. Check the recovered data head. If it is not “6A”, the DDA fails.
5. Concatenate from left to right the second to the tenth data elements in Table 11
(that is, Certificate Format through Issuer Public Key or Leftmost Digits of the
Issuer Public Key), followed by the Issuer Public Key Remainder (if present), and
finally the Issuer Public Key Index.
6. Apply the indicated hash algorithm (derived from the Hash Algorithm Indicator)
to the result of the concatenation of the previous step to produce the hash result.
7. Compare the calculated hash result from the previous step with the recovered
hash result. If they are not the same, dynamic data authentication has failed.
8. Verify that the Issuer Identifier matches the leftmost 3-8 PAN digits (allowing
for the possible padding of the Issuer Identifier with hexadecimal 'F's). If not,
dynamic data authentication has failed.
9. Verify that the last day of the month specified in the Certificate Expiration Date
is equal to or later than today’s date. If the Certificate Expiration Date is earlier
than today’s date, the certificate has expired, in which case dynamic data
authentication has failed.
10. Verify that the concatenation of RID, Certification Public Key Index, and
Certificate Serial Number is valid. If not, dynamic data authentication has failed.
11. If the Issuer Public Key Algorithm Indicator is not recognized, dynamic data
authentication has failed.
12. If all the checks above are correct, concatenate the Leftmost Digits of the Issuer
Public Key and the Issuer Public Key Remainder (if present) to obtain the Issuer
Public Key Modulus, and continue with the next steps to obtain the IC Card Public
Key.
1. If the length of IC card public key certificate is different from that of issuer
public key modulus obtained in the previous chapter, the DDA has failed.
2. In order to obtain the recovered data specified in Table 12, use issuer public key
and the corresponding algorithm to apply the recovery function shown in Section
9.2.1 to IC card public key certificate. If the end of restored data is not equal to
“BC”, the DDA has failed.
UPI Confidential 24
Part IV Debit/Credit Application Security Specification
UPI Confidential 25
Part IV Debit/Credit Application Security Specification
5. Concatenate from left to right the second to the tenth data elements in Table 13
(that is, Certificate Format through ICC Public Key or Leftmost Digits of the IC
Card Public Key), followed by the ICC Public Key Remainder (if present), the ICC
Public Key Exponent, and finally the static data to be authenticated specified in
section 7.3.1 of UnionPay Integrated circuit card specifications-Basic
Specifications Part Two Debit/Credit Application Card Specification. If the Static
Data Authentication Tag List is present and contains tags other than “82”, then
dynamic data authentication has failed.
6. Apply the indicated hash algorithm (derived from the Hash Algorithm Indicator)
to the result of the concatenation of the previous step to produce the hash result.
7. Compare the calculated hash result from the previous step with the recovered
hash result. If they are not the same, dynamic data authentication has failed.
8. Compare the recovered PAN to the Application PAN read from the IC Card. If
they are not the same, dynamic data authentication has failed.
9. Verify that the last day of the month specified in the Certificate Expiration Date
is equal to or later than today’s date. If not, dynamic data authentication has failed.
10. If the IC Card Public Key Algorithm Indicator is not recognized, dynamic data
authentication has failed.
11. If all of the above checks are correct, concatenate the Leftmost Digits of the IC
Card Public Key and the IC Card Public Key Remainder (if present) to obtain the
IC Card Public Key Modulus, and continue with the actual dynamic data
authentication described in the two sections below.
Suppose that the terminal has obtained IC card public key according to the
procedures described above, generation of dynamic signature should be conducted
according to the following steps:
The IC card may contain DDOL but the terminal should have a default DDOL
designated by the payment system to prevent the IC card from being used when
DDOL is not provided.
UPI Confidential 26
Part IV Debit/Credit Application Security Specification
The DDOL in the IC Card does not include the Unpredictable Number.
The IC Card does not contain a DDOL and the default DDOL in the terminal
does not include the Unpredictable Number.
2. IC card generates digital signature using IC card private key and the
corresponding algorithm according to the data in Table 13 in Section 9.2.1. The
result is called signed dynamic application data.
The byte length LDD of IC card dynamic data should meet the condition 0 ≤ DD ≤
NIC-25. The leftmost 3-9 bytes of IC card dynamic data should consist of a one byte
ICC dynamic data followed by 2-8 values of IC card dynamic data (tag “9F4C”,
2-8 binary bytes). IC card dynamic data is a parameter generated by IC card and
varying with the time (for example, it can be an unpredictable number or a counter
which adds 1 every time when the IC card receives a command of internal
authentication (INTERNAL AUTHENTICATE). UnionPay Integrated circuit card
specifications-Basic Specification using ATC as IC card dynamic data.
In addition to the data specified in Table 10, the data objects required for DDA are
detailed in Table 14.
UPI Confidential 27
Part IV Debit/Credit Application Security Specification
Table 14 Other Data Objects Required for Generating and Verifying Dynamic
Signature
1. If the length of signed dynamic application data is different from that of IC card
public key modulus, the DDA has failed.
2. In order to obtain the recovered data shown in Table 15, use IC card public key
and corresponding algorithm to apply the recovery function shown in Section 9.2.1
to signed dynamic application data. If the end of restored data is not equal to “BC”,
the DDA has failed.
UPI Confidential 28
Part IV Debit/Credit Application Security Specification
3. Check recovered data head and if it is not “6A”, the DDA fails.
4. Check the signed data format and if it is not “05”, the DDA fails.
5. Concatenate from left to right the second to the sixth data elements in Table 15
(that is, Signed Data Format until Pad Bytes), followed by the data elements
specified by the DDOL.
6. Apply the indicated hash algorithm (derived from the Hash Algorithm Indicator)
to the result of the concatenation of the previous step to produce the hash result.
7. Compare the calculated hash result from the previous step with the recovered
hash result. If they are not the same, DDA has failed.
If all the above steps were executed successfully, DDA was successful. The ICC
Dynamic Number contained in the ICC Dynamic Data recovered in Table 15
should be stored in tag “9F4C”.
For the first GENERATE AC command, and for the second GENERATE AC
command in the case “unable to go online”, the cryptogram type requested by the
terminal is always determined by the final Terminal Action Analysis preceding the
GENERATE AC command. If any of the above errors are detected prior to the final
Terminal Action Analysis, then the terminal shall not request CDA in the
GENERATE AC command. When the GENERATE AC command is issued with a
CDA request, then if any of the above errors are detected subsequently, the
eventual result will be an offline transaction decline.
For sections 3.3.6.1 and 3.3.6.2, assuming that the following conditions are met:
The TVR bit for “CDA failed” is not set to 1 prior to final Terminal Action
Analysis. Except when returning an AAC, the IC card always replies with a
CDA signature when requested by the terminal.
UPI Confidential 29
Part IV Debit/Credit Application Security Specification
When requesting an ARQC, the terminal may request it with or without a CDA
signature. When an ARQC is requested without a CDA signature, then the
terminal shall set the TVR bit for “Offline data authentication was not
performed” to 1 prior to issuance of the GENERATE AC command. When an
ARQC is requested without a CDA signature, the processes described in
sections 3.3.6.1 and 3.3.6.2 are not performed.
When requesting a TC, the terminal shall request it with a CDA signature.
The terminal shall set the TVR bit for “Offline data authentication was not
performed” to 0 prior to issuance of the GENERATE AC command. If the
terminal is processing the transaction as “unable to go online” then the TVR bit
setting will be done before the associated terminal action analysis.
2. If IC card uses TC or ARQC as the response, the IC card adopts the following
steps:
As shown in PDOL and in the sequence as appears in PDOL, the value of data
element the terminal transmits to IC card with command GET PROCESSING
OPTIONS.
UPI Confidential 30
Part IV Debit/Credit Application Security Specification
The IC card responses to GENERATE AC command with tag, length and value
in the returned data element, in order, with the signed dynamic application data
excluded.
As shown in PDOL and in the sequence as appears in PDOL, the value of data
element the terminal transmits to IC card with GET PROCESSING OPTIONS
command.
The IC card responses to GENERATE AC command with tag, length and value
in the returned data element, in order, with the signed dynamic application data
excluded. The 20 bytes calculation result is called the transaction data hash
value.
3) IC card uses the IC card secret key SIC stored in card to calculate the data in
Table 16 and the digital signature scheme and corresponding algorithm are
defined in Section 9.2.1. The result is called the signed dynamic application
data.
UPI Confidential 31
Part IV Debit/Credit Application Security Specification
The byte length LDD of IC card dynamic data should satisfy the condition
0≤LDD≤NIC-25. The leftmost 32-38 bytes of IC card dynamic data consist of the
concatenation of the data specified in Table 17.
8 TC or ARQC b
IC card dynamic data is a parameter generated by IC card and varying with time.
(For example, it can be an unpredictable numbers or a counter that increases by 1
every time the IC card receives a command of application cryptogram generation
(GENERATE AC) while conducting transactions.) UnionPay Integrated circuit
card specifications-Basic Specification recommends using ATC as IC card
dynamic data.
UPI Confidential 32
Part IV Debit/Credit Application Security Specification
Variable, max.
‘9F10’ Issuer application data Optional
length 32
3. If IC card adopts AAC as the response, the response of IC card must be coded
according to the format 1 or format 2 shown in Section GENERATE AC command
response message data field format of Appendix B. 6 of UnionPay Integrated
circuit card specifications-Basic Specifications Part Two Debit/Credit Application
Card Specification and it must include the three mandatory data objects shown in
Table 19 and optionally include issuer application data.
Application authentication
‘9F26’ 8 Mandatory
cryptogram
Variable, max.
‘9F10’ Issuer application data Optional
length 32
UPI Confidential 33
Part IV Debit/Credit Application Security Specification
The decentralized Key index indicates which key is adopted by IC card to generate
application cryptogram and the edition number of cryptogram indicates the
algorithm of the application cryptogram. Section 6.1 describes the method for
generating application cryptogram. Please refer to Appendix E of UnionPay
Integrated circuit card specifications-Basic Specifications Part Two Debit/Credit
Application Card Specification for definitions of cryptogram edition number and
algorithm identifier.
Suppose that the terminal has successfully retrieved IC card public key according
to the process described above:
If the IC card makes responses with an AAC, the terminal should decline
transaction.
If IC card responds with TC or ARQC, the terminal retrieves the first four data
objects in Table 18 from the response and executes the following steps:
1. If the length of signed dynamic application data is different from that of IC card
public key modulus, the combined DDA/application cryptogram generation (CDA)
has failed.
2. In order to obtain the recovered data specified in Table 21, use IC card public
key and corresponding algorithm to apply the recovery function specified in
Section 9.2.1 to signed dynamic application data. If the end of restored data is not
equal to “BC”, the combined DDA/application cryptogram generation (CDA) fails.
UPI Confidential 34
Part IV Debit/Credit Application Security Specification
3. Check recovered data head and if it is not “6A”, the combined dynamic data
authentication/application cryptogram generation has failed.
4. Check signed data format and if it is not “05”, the combined dynamic data
authentication/application cryptogram generation has failed.
5. Retrieve the data specified in Table 17 from the IC card dynamic data.
6. Check that the Cryptogram Information Data retrieved from the IC Card
Dynamic Data is equal to the Cryptogram Information Data obtained from the
response to the GENERATE AC command. If this is not the case, the combined
DDA/application cryptogram generation has failed.
7. Concatenate from left to right the second to the sixth data elements in Table 21
(that is, Signed Data Format through Pad Bytes), followed by the Unpredictable
Number.
8. Apply the indicated hash algorithm (derived from the Hash Algorithm Indicator)
to the result of the concatenation of the previous step to produce the hash result.
9. Compare the calculated hash result from the previous step with the recovered
hash result. If they are not the same, the combined DDA/application cryptogram
generation has failed
10. Concatenate from left to right the values of the following data elements:
UPI Confidential 35
Part IV Debit/Credit Application Security Specification
As shown in PDOL and in the sequence indicated in PDOL, the value of data
element transmitted by the terminal to IC card in GET PROCESSING
OPTIONS command.
The IC card responses to the GENERATE AC command, with tag, length and
value in the returned data element, in order, and the signed dynamic application
data are excluded.
The IC card responses to the GENERATE AC command, with tag, length and
value in the returned data element, in order, and the signed dynamic application
data are excluded.
11. Apply the designated hash algorithm (obtained from Hash algorithm identifier)
to the concatenated result of the last step so as to obtain transaction data hash value.
12. Compare the transaction data hash value obtained from the last step calculation
with the transaction data hash value restored from IC card dynamic data in step 5. If
they are different, the combined DDA/application cryptogram generation (CDA)
fails.
UPI Confidential 36
Part IV Debit/Credit Application Security Specification
No
Set CDA error in TVR.
Send GENERATE AC
command to request
ARQC, do not request
CDA
UPI Confidential 37
Part IV Debit/Credit Application Security Specification
Do Generate AC
command P1 sets
request CDA?
Yes No
TIC or ARQC
UPI Confidential 38
Part IV Debit/Credit Application Security Specification
GENERATE AC
response
AAC
ARQC/TC
Recovery dynamic
GENERATE AC Does GENERATE AC
TC No Yes application number
response… request CDA?
in signature
Execute
transaction
approval ARQC
processing, do not
No Found CDA error?
send second
Execute online
authorization
Yes
Online transaction
processing result… Set CDA failed in TVR
Online reject or
Can not connect - accept can not connect - Reject
Online accept
TC/AAC
GENERATE
Terminal request for AC response…
Yes online authorization
also requests CDA?
Reject transaction,
Set "offline data do not send 2nd
authentication not GENERATE AC
executed" to '0' in No command
TVR ARQC
Send 2nd
Send 2nd GENERATE AC
GENERATE AC command, set P1
Generate the second request for
command not to request CDA
AAC GENERATE AC command,
requesting TC, set P1 setting does not require CDA
P1 to request CDA
UPI Confidential 39
Part IV Debit/Credit Application Security Specification
Yes
Generate AC
returns…
AAC
TC
Recover signed
dynamic application
data
No
Recovery is Configure CDA failure
successful bit of TVR
Yes
Perform approved
transaction processing
Perform refused
transaction processing
Complete transaction
processing
UPI Confidential 40
Part IV Debit/Credit Application Security Specification
Data in the IC card‘s DOL transmitted from the terminal to the ICC via the
GENERATE AC or other command, and
Value Source
UPI Confidential 41
Part IV Debit/Credit Application Security Specification
Please see Table 23 for optional application cryptogram generation data source.
Value Source
1. In the first step, the IC card application cryptogram (AC) Unique Key MKAC and
the 2-bytes IC card application transaction counter are used as input and the
16-bytes application cryptogram process Key SKAC is obtained via derivation, the
process Key derivation function shown in Section 9.1.3 is used.
2. In the second step, the 16-bytes application cryptogram process key obtained via
derivation in the last step is used and the MAC algorithm shown in Section 9.1.2 is
applied to the selected data to generate 8-byte application cryptogram.
1. One 8-byte number is obtained via adding 6 “00” bytes at the end of 2-bytes
ARC.
3. Calculating ARPC
UPI Confidential 42
Part IV Debit/Credit Application Security Specification
ARPC:= ALG(SKAC) [Y || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00 || ‘00’ || ‘00]
The mechanisms for Application Cryptogram and Issuer Authentication require the
management by the Issuer of the unique IC Card Application Cryptogram Master
Keys. Please refer to Section 9.1.4 for derivation method of the IC card application
cryptogram (AC) sub-key.
UPI Confidential 43
Part IV Debit/Credit Application Security Specification
5 Security Message
Security message ensures the integrity of data and authentication of the Issuer via
message authentication code (MAC), and ensures the confidentiality of the data by
encrypting the data field.
The data field of the command involved in the message does not use BER-TLV
encoding in security message. The transmitter using the command of security
message and the current selected application must know that the data objects
included in the data field and the lengths of those data objects. According to
ISO/IEC 7816-4:2005, the security messages consistent with this format are clearly
designated via setting the lower-nibble of the type-byte of the command as “4”.
The transmitter using the command of security message and the current selected
application must know the data elements included in the data field (including MAC)
and the corresponding lengths of the data. MAC is not BER-TLV encoding and is
always the last data element in the data field. The length of MAC is always 4-bytes.
Table 24 Command Data Field Format of Security Message for Integrity and
Authentication
Value 1 Value 2
The first step of MAC generation of security message with integrity and
authentication as the purpose includes obtaining a unique 16-bytes message
authentication code (MAC) from the unique 16-bytes message authentication code
(MAC) sub-key of IC card and 2-bytes ATC derivation. One type of derivation
method is detailed in Section 9.1.3.
MAC is obtained by using MAC process Key obtained via derivation by the
method described in Section 5.2.2 and calculated through applying the system
described in Section 9.1.2 to the protected message .
UPI Confidential 44
Part IV Debit/Credit Application Security Specification
The length of MAC in this specification is 4. After the 8-bytes result is obtained
from the calculation method described above, the leftmost (the top) 4 bytes of the
result are used to obtain MAC.
Except MAC, all the other plaintext data fields in command data field are
encrypted.
Value 1 Value 2
The first step of encryption and decryption of security message with private
security as the purpose includes the unique 16-bytes encrypting process key
obtained from the unique 16-bytes security message sub-key of IC card and 2-bytes
ATC derivation. The method is detailed in Section 9.1.3.
The mechanism for message authentication requires the Issuer to manage a unique
IC Card message authentication code (MAC). Please refer to Section 9.1.4 for
derivation method of the IC card message authentication code (MAC) sub-key.
UPI Confidential 45
Part IV Debit/Credit Application Security Specification
6 Card Security
6.1 Symbiotic Application
This section introduces the structure of internal security system of the card. For the
processing flow controlled by card operating system and affecting all card data or
execution code, the use of the internal security system is restricted.
The target of this security system is to ensure that the card operating system adopts
an appropriate security system to provide security and integrity guarantee for all
data and processing flow in card. This system is designed for accessing data files
and using command and encryption algorithm.
The basic structure of this security system includes two basic characteristics:
Designated access conditions are adopted for the access of every EF.
As the operating system controls the access of all data and executable resources
(data file, record, command and encrypted key as well as algorithm, it is possible to
establish a security field, which is realized via running command SELECT and
GET PROCESSING OPTIONS. Those commands are used to establish relevant
information describing the security field and (at any time) to define the access
scope of the designated data and executable resources.
The card operating system uses the information and realizes the access control of
the data on file level. Therefore, the Issuer must seriously consider how to
amalgamate the data objects and data elements into the file. Put it another way, the
data that can be accessed on the same level can be amalgamated into one file with
similar data; on the flip side, the data with different access conditions should not be
amalgamated into the same file.
UPI Confidential 46
Part IV Debit/Credit Application Security Specification
Application management data (which are submitted to the operating system after
application is selected) determines the files and executable resources that the
application is able to access. Command GET PROCESSING OPTIONS will make
the operating system to change the state of security field so that it is possible to
quote other files and records. File numbers and record numbers should be provided
by the command in application file locator (Application File Locator).
For access to the elementary files, conditions are that command SELECT has been
executed at least once and the security field has been established. Once the security
field is established and the follow-up command (such as READ RECORD) or data
replacement command (such as record replacement command) is transmitted to an
elementary file, control of basic file access (defined by file control parameters of
file control information) is compulsorily used. The details of file control parameters
will be mentioned in section 6.3.4. The files using secure communication and
command VERIFY (or both) as access condition can only be executed after all
those conditions are met.
File control information (File Control Information, FCI) is associated with every
application definition file (Application Definition File, ADF) or application
elementary file (Application Elementary File, AEF) to describe features of the files.
UPI Confidential 47
Part IV Debit/Credit Application Security Specification
File control information is established for every file during the personalization
process. File control information of the application definition file includes file
management data (File Management Data, FMD), which may include application
management data, while application management data defines the security field of
application.
The security field described in application management data defines the following
content:
Resources that can be saved and accessed within the application scope,
application elementary files (Application Elementary File, AEF) and internal
elementary files (such as personal PIN, key and parameters)
In addition, resources can also be defined as “those not yet allocated to application”,
so after personalization, the card can use corresponding commands to distribute
resource to application. Resources and the relationship among resources are
described by application management data (AMD).
Key
PIN
Data resource refers to the data element that may be included in the file. Data
resources are identified by the only identifier in IC card. File is identified by the
UPI Confidential 48
Part IV Debit/Credit Application Security Specification
only file identifier in IC card. The data element not included in the file is identified
by the only data identifier. Any data resource required for operating application
must be identified in the application management data.
For files containing data element (which can be accessed via the command defined
by application management data), the relationship between SFI (which is the only
identified in application and can be accessed externally) and file identifier (which is
the only identified in IC card and can be accessed internally) is maintained as part
of application management data.
For the data objects not included in the file (which can be accessed via command
GET DATA defined by application management data), the relationship between
data object tag (which can be accessed externally) and the only data identifier
(which is in IC card and can be accessed internally) is maintained as part of
application management data.
Keys could be stored in the file or could also be an independent data element. Keys
could not be accessed externally. For keys stored in the file, application
management data maintains the file identifier required for locating the key and the
reference to the key when executing command defined by application management
data and encryption algorithm.
For keys not stored in the file, application management data maintains the only key
identifier in IC card required for locating key when executing command defined by
application management data and encryption algorithm.
PIN or password can be stored in the file or can also be an independent data
element. PIN and password can only be accessed externally via command jointly
defined by the application management data and secure communication.
For PIN or password stored in the file, application management data maintains the
file identifier required for locating PIN/password and the quotation oriented to PIN
or password when executing command defined by application management data
and encryption algorithm.
For PIN/password not stored in the file, application management data maintains the
only PIN/password identifier in the IC card required for locating PIN/password
when executing command defined by the application management data and
encryption algorithm.
Command
Encryption algorithm
UPI Confidential 49
Part IV Debit/Credit Application Security Specification
Command resources include CLA and INS bytes, which are used by the operating
system to search the command location. Command resources include the property
of the data the command may access and sometimes, properties of the parameters
related to key and algorithm.
Algorithm resources establish the relation between algorithm identifier defined for
application and the actual algorithm quotation the operating system uses to locate
the executable codes.
Every elementary file contains a file control parameter (FCP) in the file control
information, it stores the additional information related to the access conditions of
the file. The information is stored in IC card during the personalization process, and
is used by IC card operating system with the application management data stored in
the file control information of ADF for establishing the security field of application.
The access to the elementary file is as shown in Table 26.
Yes/No Yes/No
The Read column means to use the read commands, such as command READ
RECORD or GET DATA, to access the internal data of basic file. “Update”
column means to update the command, such as UPDATE RECORD or PUT DATA,
to access the internal data of elementary files.
File control parameters point out if the data should be transmitted in encrypted or
plaintext format in issuer script command UPDATE RECORD.
File control parameter is also used as a module for realizing the logic structure of
application management data. Moreover, file control parameters should also
describe mandatory access conditions for the elementary files of the applications on
the card.
UPI Confidential 50
Part IV Debit/Credit Application Security Specification
The following recommended access conditions are applicable to the data that can
be accessed by commands READ RECORD, UPDATE RECORD and GET DATA
or other similar suitable commands.
This recommendation is for the data that can only be read out with command
READ RECORD. All IC card local data that have been tagged and can be
externally accessed should be set in read-only state in access conditions
without secure communications.
This recommendation lists out the data that may be changed by command PUT
DATA and secure communications and the data that may be read out by
command GET DATA:
This recommendation lists out the data that may be updated by the private
command PIN CHANGE/UNBLOCK and secure communication of the
application and the data that cannot be read out:
Reference PIN
This recommendation lists out the data that may be read out by command GET
DATA and the data that may be re-configured by command PIN
CHANGE/UNBLOCK and secure communication as predetermined restriction:
Existence
Key Name Purpose Key Pattern Description
condition
UPI Confidential 51
Part IV Debit/Credit Application Security Specification
UPI Confidential 52
Part IV Debit/Credit Application Security Specification
7 Terminal Security
7.1 Security Requirements For Terminal Data
Sensitive data: including certification authority public key, symmetrical key for
PIN encryption and internal parameters of the terminal. When unauthorized,
external access modification of this type of data is not allowed.
Verify the identity of the updating party, terminal manufacturer, owners of the
terminal or the third party approved owners of the terminal or agents that
authorized to re-download the program.
All data related to the transaction should be stored in record form in the terminal
memory. The terminal must ensure the integrity of the data.
The module is mainly responsible for storing and processing all sensitive data,
which include various keys and internal parameters. Moreover, the module should
also provide mandatory encrypting functions. Specific requirements on the security
module hardware are not in the UnionPay Integrated circuit card
specifications-Basic Specification.
UPI Confidential 53
Part IV Debit/Credit Application Security Specification
The hardware design of security module must be capable of ensuring the physical
restriction of the access and grabbing of the sensitive data stored in module and the
unauthorized use and modification of the security module. Once the security
module is illegally attacked, the security module itself must be able to complete the
deleting of internal sensitive data immediately; meanwhile, the security module
must also possess sufficient security property to prevent the data from being
illegally tampered. Damage or ineffectiveness of any part of the security module
should not compromise the sensitive data. If the security module consists of several
separated components and the data must be transmitted among those components,
these components must be maintained at the same security level.
Logic design of the security module must ensure that using any single function or
combined functions will not compromise the sensitive data. For some sensitive
operations, there must be certain restrictions on the authority limit.
Multi pairs of certification authority public key and relevant information can be
stored in the security module. Certification authority public key is usually laid in
the security module before the terminal goes into service. If it is necessary to
update or withdraw the certification authority public key in terminal operation
process, security message must be used. Such an operation must be completed in a
special authorized situation.
An anti-intrusion device must be able to ensure that any sensitive data from the
input/output devices, stored in devices or processed in devices, will not be
compromised or changed by device or its interface in its normal operation
environment. (Please refer to ISO 13491-2:2005 and ISO 13491-2 for further
requirements on anti-intrusion devices.)
UPI Confidential 54
Part IV Debit/Credit Application Security Specification
Anti-intrusion devices not in operation state must not include any encryption key or
other sensitive data (such as PIN) that have been used in the previous transactions;
however, it can include the authentication information for the purpose of improving
anti-intrusion capability. If it is able to monitor intrusion before the devices and the
key stored in the devices are re-applied, even if the devices are compromised, the
security will not be affected. If the devices are designed as allowable for internal
access, sensitive data must be immediately deleted when the devices are being
accessed. Anti-intrusion devices depend on the detection conducted by user against
attack on physical security; therefore, the devices must be designed with sufficient
anti-intrusion property for a Merchant or an Acquirer to detect any intrusion.
To prevent access to the devices and to add, replace or modify anything to the
software and hardware of the devices. If one has no special skills and special
devices and the devices are not obviously and seriously damaged, users cannot
test and modify any sensitive data and reinstall the devices.
When truly accessing the devices, users are able to access or modify the
sensitive data that are inputted and stored, or processed without being
authorized.
If the terminal can be set in a “sensitive status”, which is normally not allowed (for
example, artificially installed key), such a conversion must be conducted with two
UPI Confidential 55
Part IV Debit/Credit Application Security Specification
or more trusted personnel. If the PIN or other plaintext data are used to control the
conversion to sensitive state, the input of PIN should also be protected in the same
mode as that of other sensitive data.
To reduce the risk caused by unauthorized use of sensitive function, there must be a
restriction on function usage times (as appropriate) and a restriction on time for
sensitive state. Once the restrictions are reached, the devices must return to normal
status.
A PIN pad is a tamper resistant device and supports 4-12 digit PIN entry. If the
PIN pad is equipped with a display screen, it must display every input number.
However, according to ISO 9564-1, the inputted PIN should not be displayed or
leaked through visual or audio feedback mode.
If the terminal supports offline PIN authentication, the IC card interface device
(IFD) and PINPAD should either be integrated into single anti-intrusion device or
two separated anti-intrusion devices.
If the IFD and PINPAD are integrated and the offline PIN is transmitted to card
in plaintext format, the plaintext PIN is directly transmitted from the integrated
PINPAD to IFD; PINPAD will not encrypt the offline PIN.
If the IFD and PINPAD are integrated and the offline PIN is transmitted to card
in plaintext format but the offline plaintext PIN is not directly transmitted from
integrated PINPAD to IFD, PINPAD must encrypt the offline PIN according to
ISO 9564-1 (or other equivalent mode approved by the payment system) and
then transmit the encrypted offline PIN to IFD. IFD will decrypt the offline
PIN and transmit it to card in plaintext.
If the IFD and PINPAD are not integrated and the offline PIN is transmitted to
card in plaintext mode, PINPAD must encrypt the offline PIN according to ISO
9564-1 (or other equivalent mode approved by the payment system) and then
transmit the encrypted offline PIN to IFD. IFD will decrypt the offline PIN and
transmit it to the card in plaintext.
The PIN encryption process must occur in one of the following two situations.
If the terminal supports online PIN verification, after the PIN is inputted, the PIN
must be encrypted according to ISO 9564-1 in order to protect the PIN and the
transmission of PIN must comply with the regulation of the payment system.
The information displayed on PINPAD to prompt that PIN should be inputted, must
be generated by PINPAD. This does not limit the display of PIN information on
PINPAD; however, before being displayed, other information must be approved by
the PINPAD. PINPAD must decline to display any unapproved information.
UPI Confidential 56
Part IV Debit/Credit Application Security Specification
For terminals with person on duty, the amount input process must be separated with
the PIN input process to prevent the PIN from being accidentally displayed on the
terminal display screen. Especially when the amount and PIN are inputted on the
same keyboard, the amount must be two separated operations. If there is no other
confirmation operation, the PIN input by the Cardholder should confirm the
amount.
PINPAD must automatically reset the internal buffer memory if the following two
situations occur:
In case of time out, including an inactive period when a PIN digit is not
inputted.
Existence
Key Name Purpose Key Format
Conditions
Certification
Offline data
authority public Asymmetrical Key Mandatory
authentication
key
Maintenance
Key for Import, update and
certification withdraw certification Symmetrical Key Mandatory
authority public authority public key
key
UPI Confidential 57
Part IV Debit/Credit Application Security Specification
The message authentication code described in Section 9.1.2 must be used for
import, update and withdraw of certification authority public key, every POS
terminal should save the only maintenance key for certification authority public key,
the key should be obtained with the master maintenance key for the certification
authority public key of the Acquirer using the sub-key derivation method described
in Section 9.1.4 for terminal counter.
The maintenance key for certification authority public key must be stored in
security modulus. Please refer to Section 7.1 for security requirements.
The terminal must verify the certification authority public key and relevant data
received from the Acquirer and ensure that there is no error.
The terminal must verify the received certification authority public key and
relevant data and make sure that they are really from its legal acquirer.
The Acquirer must confirm that the new certification authority public key has
been really and correctly loaded into its terminal.
UPI Confidential 58
Part IV Debit/Credit Application Security Specification
Every certification authority public key should be identified with a 5-bytes RID
identifying the payment system and a 1-byte certification authority public key
index distributed by the payment system to some specified certification authority
public key, which is unique to every RID.
The minimum set of useful data elements in the terminal is described in Table 29.
RID and certification authority public key index only identify one certification
authority public key and relate with a correct payment system.
The certification authority public key algorithm identifier points out the digital
signature algorithm used with corresponding certification authority public key,
which is the asymmetrical algorithm that should be used in the digital signature
scheme pointed out in Section 9.2.1 and Section 10.2.1 of UnionPay Integrated
circuit card specifications-Basic Specification. Hash algorithm identifier assigns
the hash algorithm that is used to generate hash result in digital signature scheme.
Certification authority public key is stored in the security modulus of terminal and
can be read out at will; however, security message must be used for updating.
Please refer to Section 7.3.2.1 for detailed information. Certification authority
public key is verified and used to ensure that the certification authority public key
and relevant data will be received accurately without any mistake. And then the
terminal can use this data element to re-verify the integrity of the certification
authority public key and relevant data.
The verification of the integrity of stored certification authority public key should
be conducted periodically.
Table 29 The Minimum Set of Certification Authority Public Key Related Data
Elements Stored in the Terminal
UPI Confidential 59
Part IV Debit/Credit Application Security Specification
Variable
Certification authority The Value of the certification authority
b
public key modulus maximum public key modulus part.
is 248
The use of certification authority public key in transaction must observe UnionPay
Integrated circuit card specifications-Basic Specification.
The following principles apply when the Acquirer withdraws the certification
authority public key from its terminal:
The terminal must verify that there is no mistake in the revocation notice
received from the Acquirer.
The terminal must verify that the received revocation notice is really from its
legal acquirer.
The Acquirer must confirm that a specified certification authority public key
has been correctly withdrawn from its terminal.
UPI Confidential 60
Part IV Debit/Credit Application Security Specification
This section defines the overall framework of principle and tactics for the
management of certification authority public key in payment system and the
certification authority public key is used in the static and dynamic data
authentication indicated in UnionPay Integrated circuit card specifications-Basic
Specifications.
The life cycle of certification authority public key in common environment can be
divided into the following continuous phases:
Planning
Generation
Distribution
Usage
8.1.1.1 Planning
In the planning phase, the payment system investigates and studies the
requirements for importing new certification authority public key pair. The
requirements include the quantity of required keys and the parameters of the keys.
One important part of the planning phase is to determine the expected life cycle of
existing key, or the new key that will be adopted via assessing the security of
asymmetrical encryption algorithm. Such assessment guides the configuration of
the length and expiry date of the new key, the potential modification of the expiry
date of existing key, and the overall planned key replacement.
8.1.1.2 Generation
If the result of the planning stage is to import new certification authority public key
pair, the keys must be generated by the payment system. More accurately speaking,
the certification authority of the payment system (payment system operated by the
organization is highly secure, both physically and logically) will generate the
required certification authority private key/public key pair in a secure mode for use
in the future.
UPI Confidential 61
Part IV Debit/Credit Application Security Specification
After the keys are generated, the private security of the certification authority
private key and the integrity of the certification authority public key and private
key must also be ensured.
8.1.1.3 Distribution
In the key distribution stage, the certification authority of the payment system
should distribute the newly generated certification authority public key to its
member Issuers and Acquirers for the following uses:
For verifying
issuer public
key certificate For verifying
provided by issuer public
certification key certificate
authority obtained from
IC card
Issuer provided by
certification
Certification authority
authority Certification
Generating authority
public key Certification Merchant
certification
authority terminal
authority
public key
public key pair
Merchant
Certification Acquirer
terminal
authority public
key
Certification
Merchant
authority
terminal
public key
For the Issuer, it verifies the issuer public key certificate provided by the
certification authority in use stage.
For the Acquirer, it securely imports certification authority public key in the
Merchant terminal.
To avoid importing fake certification authority public key, the interfaces between
the certification authorities of the payment system, Issuer and Acquirer must ensure
the integrity of the certification authority public key distribution.
8.1.1.4 Usage
The certification authority public key is used by merchant terminal for completing
static and dynamic data authentication. The certification authority private key is
used by the certification authority of payment system for generating issuer public
key certificate. More specifically, the following interactive operations occur:
UPI Confidential 62
Part IV Debit/Credit Application Security Specification
Certification authority of
Issuer
payment system
The Issuer generates its own issuer public key and transmits it to the
certification authority of the payment system.
The Issuer uses certification authority public key to verify whether the issuer
public key certificate is correct or not. If it is correct, the Issuer can use it as
part of a personalized IC card data.
To avoid the import of fake certification authority public key and the interfaces
between the certification authority of the payment system, the Issuer and the
Acquirer must ensure the integrity of the submitted issuer public key.
Once the certification authority public keys reach the expiry date set at the planning
stage, it must be deleted from the service. In practice, it means:
After the expiry date, the issuer public key certificate generated from the
certification authority private key is no longer effective; therefore, the Issuer
must ensure that the use of the personalized IC card with such an issuer public
key certificate should be terminated before the expiry date of the certification
authority public key pair.
Before the expiry date, the certification authority of the payment system should
stop using the corresponding certification authority private key to sign the
issuer public key.
After the expiry date, the Acquirer should delete the certification authority public
key from the terminal within the stipulated time limit.
When the certification authority public key pair is compromised, emergency state
must be implemented, which may finally result in revocation of certification
authority public key in advance before the planned expiry date. In such a case, there
will be some additional phases in the life cycle of key. They are described below:
Detection
Assessment
UPI Confidential 63
Part IV Debit/Credit Application Security Specification
Decision
8.1.2.1 Detection
Certification authority public key pair can be a true compromise. For example,
confirmed security of the certification authority of the payment system can be
damaged, or the analyzed confirmed key exposed via cryptanalysis. In addition, the
compromise can also be:
8.1.2.2 Assessment
8.1.2.3 Decision
According to the assessment result, the payment system will decide to take a series
of actions against the key compromise. In the worst situation, the decision will
include the revocation of certification authority public key in advance before the
planned expiry date.
After deciding to revoke the certification authority public key, members of the
payment system should be notified with the new expiry date of the corresponding
key. Afterwards, the processing will be the same as the revocation (as planned)
described in Section 8.1.1.5.
UPI Confidential 64
Part IV Debit/Credit Application Security Specification
1. Analysis of the attack-resistant public key and the demand for a new public key
pair.
2. Deciding the quantity and parameters of the newly demanded public key pair.
The parameters include:
The following strategies should be adopted for the public key expiry date:
December 31st should be the planned expiry date for all certification authority
public keys.
The Acquirer should have a transitional period of six months after the planned
expiry date (until June 30th of next calendar year) to revoke overdue keys from
all terminals. Mandatory key revocation should not appear before the end of the
transitional period. The revocation can be postponed based on the judgment of
the payment system.
All new certification authority public keys should be issued before December
31st.
The Acquirer should have a transitional period of six months (until June 30th of
the next calendar year) to install the new key on all terminals.
The Acquirer should have a period of six month (until June 30th of the next
calendar year) to install the new key on all terminals. New certification
authority public keys should be issued any time before December 31st to leave
enough time for the public key installation.
The payment system will not make the new certification authority public key
effective for legal transactions before January 1st of the next year.
UPI Confidential 65
Part IV Debit/Credit Application Security Specification
1. The distribution of the newly generated certification authority public key to its
member Issuers and Acquirers by the certification authority.
2. The import of the public keys into merchant terminals by the Acquirers.
2. The Issuer uses the certification authority public key to verify whether the
received issuer public key certificate is correct or not and load it to IC card via card
personalization. The following tactics should be adopted for signing with the
certification authority private key:
After the key is issued to Acquirers for at least six months, the certification
authority begins to use the secret key in the certification authority public key
pair for signing.
The expiry date of the user’s IC card issued by the Issuer must be no later than
the expiry date of the issuer public key certificate on the card, and must also be
no later than the issued (when the card is issued) revocation date of the
certification authority public key used to generate the issuer public key
certificate.
The expiry date of an issuer public key certificate must be no later than the
issued (when the certificate is issued) revocation date of the certification
authority public key used to generate the issuer public key certificate.
The expiry date of an IC card public key certificate must be no later than the
revocation date of the issuer public key used in generating the IC card public
key certificate.
1. Monitoring the security of the certification authority private key. Private key
compromise forms include physical, logical, suspected, potential, and
confirmed compromise forms.
The main task in this phase is to assess the impact caused by the public key
compromise on commercial business, including:
Confirmation of compromise
UPI Confidential 66
Part IV Debit/Credit Application Security Specification
Comparison of the cost of actions and the cost and risk brought about by the
compromise
1. A key management process of revoking a key from service and handling the
left-over issues after its use. Key revocation can be conducted as planned or in
advance. Based on the situation of certification authority public key pair, the
revocation means that the private key will no longer be used to generate issuer
public key certificate.
December 31st should be set as the expiry date for all certification authority
public keys. The Acquirer should have a transitional period of six months (until
June 30th of the next calendar year) to revoke abrogated key. Mandatory key
revocation should not appear before the transitional period is terminated and
the revocation can be postponed based on the judgment of the payment system.
In an advanced revocation, the reserved time for import and revocation are the
same as that for planned revocation; however, the date of revocation is determined
based on the judgment of the payment system.
The public key management strategies of issuer public key management can be
worked out in reference to the certification authority public key management
strategies.
Before applying the certification authority for public key certificate, the Issuer
should decide on the key management which include:
Length of the generated key. The length of issuer public key must not be
greater than that of the longest key of certification authority.
UPI Confidential 67
Part IV Debit/Credit Application Security Specification
Expiry date of every key. The expiry date of key must be no later than that of
the public key the certification authority uses to sign and issue certificate.
Key index
After the Issuers have worked out their key management tactics and a pair of public
keys have been generated, the issuer public key should be submitted to the
certification authority. When the certification authority receives multi-issuer public
keys, appropriate certificate should be selected to load into the card.
The key management system must have functions such as user security
management, devices security management, key security management, and audit
management:
Audit management is used for the security audit and management of system
operation log and other relevant information.
Symmetrical Key Types of system management are shown in the table below:
Message
Generating IC card MAC sub-key for generation and
authentication code 16-bytes
verification of message authentication code
(MAC) key
UPI Confidential 68
Part IV Debit/Credit Application Security Specification
IC card sub-key can be decentralized from issuer master key, and corresponding
process key is derived from sub-key in the transaction process, where MAC key is
used to generate security verification code (MAC) of message for security message
commands, such as secure updating of data and issuer script, etc. Encryption key is
used to encrypt security message and AC key is used to make encryption
calculation of TC, ARQC, AAC, and ARPC.
Key back-up and recovery function: It provides the back-up and recovery
function for system key so that when the system collapses catastrophic
recovery of the system key can be achieved.
Key derivation function: The only IC card sub-key is decentralized from the
issuer master key stored in encryption devices according to the derivation
method defined in Section 9.1.4.
UPI Confidential 69
Part IV Debit/Credit Application Security Specification
9 Security Systems
9.1 Symmetric Encryption System
Data encryption adopts block encryption algorithm with a block length of 64-bits
(8-bytes) or 128-bits (16-bytes) and can be in electronic cipher book (ECB) or
cipher block connection (CBC) mode. ECB mode is selected as the encryption and
decryption mode in the UnionPay Integrated circuit card specifications-Basic
Specifications.
The steps to encrypt message MSG of any length with encryption process key KS
are as follows:
If the length of message MSG is not the round multiple of block length, add a
“80” byte at the right end of MSG and then add minimum “00” byte at the right
end to make the length of result message MSG:=(MSG || ‘80’ || ‘00’ || ‘00’ || …
||‘00’ ) a round multiple of the block length.
If the length of message MSG is the round multiple of block length, no padding
is performed for the data.
The data to be encrypted should firstly be formatted into the data block of the
following forms:
Plaintext data
And then MSG is divided into 8-bytes or 16-bytes blocks, X1, X2, … , XK.
2. Cryptogram calculation
ECB mode
Blocks X1, X2, … , XK are encrypted into blocks Y1, Y2, . . . , YK of the block
length with encryption process Key KS via blocking encryption algorithm of ECB
mode.
Yi := ALG(KS)[Xi].
CBC mode
Blocks X1, X2, … , XK are encrypted into blocks Y1, Y2, . . . , YK of the block
length with encryption process Key KS via blocking encryption algorithm of CBC
mode.
UPI Confidential 70
Part IV Debit/Credit Application Security Specification
Yi := ALG(KS)[Xi⊕Yi-1],
Recorded as:
1. Cryptogram decryption
ECB mode
Xi := ALG-1(KS)[Yi ]
CBC mode
Xi := ALG-1(KS)[Yi ]⊕Yi-1,
2. To obtain the original message MSG, connect blocks X1, X2, ... , XK and if
padding is adopted (please see above context), delete the ending of byte string (‘80’
|| ‘00’ || ‘00’ || ... || ‘00’) in final block XK
Recorded as:
MSG = DEC(KS)[Y].
The MAC calculation method can be seen in Appendix A.1 and the length of MAC
s is 4-bytes.
UPI Confidential 71
Part IV Debit/Credit Application Security Specification
And then MSG is unpacked into 8-bytes blocks, X1, X2, … , XK.
MAC process key KS can both only include the leftmost key block KS=KSL and
can also be connected between the leftmost key block and the rightmost key block
into KS=(KSL || KSR).
3. Cryptogram calculation
8-bytes X1, X2, ... , XK are processed with the leftmost block of MAC process key
KSL in block encryption of CBC mode:
The original value of H0 is H0 := (‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ ||
‘00’).
Use one of the following two methods to calculate 8-bytes block HK+1.
The steps used in calculating a value S of s-bytes MAC (4≤s≤8) for message MSG
of any length via using 128-bits block encryption algorithm of CBC mode and
MAC process key KS are as follows:
UPI Confidential 72
Part IV Debit/Credit Application Security Specification
And then MSG is unpacked into 16-bytes blocks, X1, X2, … , XK.
3. Cryptogram calculation
16-bytes X1, X2, ... , XK are processed with MAC process key in block encryption
of CBC mode:
The original value of H0 is H0 := (‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’
|| ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’).
HK+1 := HKL⊕HKR.
The generation of MAC and data encryption session key is as follows: (in this
section, they are jointly called “session Key A” and “session Key B”.
The first step: Card/Issuer decides to use MAC keys A and B or data encryption
keys A and B for conducting selected algorithm processing (afterwards jointly
called “Key A” and “Key B”).
The second step: Use a hexadecimal number “0” to pad at the left side of the
current ATC to 8-bytes and use key A and key B to conduct 3-DES calculation of
the data as shown in Fig. 9 in order to generate session key A.
UPI Confidential 73
Part IV Debit/Credit Application Security Specification
Input data
Single length
process DEA key
The first step: Card/Issuer decides to use MAC keys A and B or data encryption
keys A and B for performing the selected algorithm (afterwards jointly called “Key
A” and “Key B”).
The second step: Use a hexadecimal number “0” to pad at the left side of current
ATC to 8-bytes and use key A and key B to conduct 3-DES calculation of the data
as shown in Fig. 9 to generate session key A.
Use a hexadecimal number “0” to pad to 8-bytes at the left side of current ATC
which has conducted XOR with hexadecimal value FFFF, and then use the same
method to conduct 3-DES calculation as shown in Fig. 9 to generate session key B.
To meet the requirements of DES key odd verification, the minimum bit of every
byte of DES key should be designed so that it is able to ensure that every one of the
8 or 16 bytes of the key has odd non-zero digit.
The first step: Card/Issuer decides to use MAC key or data encryption key for
performing selected algorithm processing.
The second step: Use a hexadecimal number “0” to pad 8-bytes at the left side of
the current ATC. The result is recorded as data source A, use a hexadecimal
number “0” to pad 8-bytes at the left side of current ATC which has conducted
XOR with hexadecimal value FFFF and the result is recorded as data source B.
Connect data source A and data source B in concatenation and then generate
UPI Confidential 74
Part IV Debit/Credit Application Security Specification
session key by making the data calculating as shown in Fig. 10 with the selected
key.
Z := ALG(Key)[ [‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ‘00’ || ATC || ‘00’ || ‘00’ || ‘00’ ||
‘00’ || ‘00’ || ‘00’ || (ATC⊕‘FFFF’) ]
Input data
Encryption Key
This section assigns a method of generating an IC card sub-key via derivation with
a 16-bytes issuer master key IMK for cryptogram generation, issuer authentication,
and security message.
The method takes as input the rightmost 16 digits of the concatenation PAN with
PAN Sequence Number(if the PAN Sequence Number is not present, then it is
replaced by a “00” byte), plus a 16-byte Issuer Master Key IMK, and produce the
16-byte IC Card sub-key MK in the following way.
1. If the length of primary account number and the PAN Sequence Number X is
less than 16 digits, pad hexadecimal F at the right end to obtain a 8-bytes digital
format Y, if the length of X is at least 16 digits, Y consists of the most right 16
digits of X.
ZL := ALG(IMK)[Y]
And
And define
Z := (ZL || ZR)
UPI Confidential 75
Part IV Debit/Credit Application Security Specification
ensure that every Byte of the 16 bytes of MK has an odd non-zero digit (in order to
meet the requirements of DES key odd verification).
This section describes the scheme to recover digital signature scheme by using the
given message of hash function according to specification ISO/IEC 9796-2, which
is used by static and dynamic data authentication in UnionPay Integrated circuit
card specifications-Basic Specifications.
9.2.1.1 Algorithm
Recover(PK)[ Sign(SK)[X] ] = X
A hash algorithm maps the message of any length into a hash value of 20 bytes.
The process of calculating signature S for message MSG consisting of data of any
length L with at least N-21 bytes length is as follows:
2. Unpack MSG into two parts MSG =(MSG1 || MSG2), where MSG1 consists of
the leftmost (top bit) N-22 bytes of MSG and MSG2 consists of the rest (minimum
bit) L – N + 22 bytes of MSG.
X := (B || MSG1 || H || E)
S := Sign(SK)[X]
X = Recover(PK) [S]
UPI Confidential 76
Part IV Debit/Credit Application Security Specification
H is 20-bytes long.
The received message is authentic only when all the examinations are correct.
UPI Confidential 77
Part IV Debit/Credit Application Security Specification
10 Approved Algorithm
10.1 Symmetric Encryption Algorithm
10.1.1 DES
DES algorithm is a calculation conducted with 64-bits block as the unit and the
length of key is 8-bytes. The algorithm is allowed to be used for security message
transmission and MAC system cryptogram calculation. The detailed process of the
algorithm is defined in ISO 8731-1, ISO 8732 and ISO/IEC 10116.
Y = DES(KL)[DES-1(KR)[DES(KL)[X]]]
X = DES-1(KL)[DES(KR)[DES-1(KL)[Y]]]
10.1.2 SSF33
SSF33 algorithm is a calculation conducted with 128-bits block as the unit and the
length of key is 16-bytes. The algorithm can also be used for security message
transmission and MAC system cryptogram calculation.
SSF33 algorithm and symmetrical encryption system based on 3-DES use the keys
of the same length, which are compatible with the original key management based
on 3-DES, the difference exists in the different lengths of blocks, and during
encrypting and calculating MAC and key derivation the padding and calculating
modes are different, however, the lengths of message authentication code and key
derivation output result should be identical with 3-DES algorithm.
10.2.1 RSA
UPI Confidential 78
Part IV Debit/Credit Application Security Specification
The lengths of cryptogram and digital signature generated from the algorithm
should be equal to that of modulus.
The length of certification authority public key modulus NCA, the length of issuer
public key modulus NI and the length of IC card public key modulus NIC must
comply with NIC≤NI≤NCA and NPE≤NI≤NCA.
Note: It is stipulated in chapter III, volume III of EMV specification that the
maximum length of a record in IC card must not exceed 254-bytes (including Tag
and Length); therefore, the actual length of IC card public key and issuer public key
should be less than the maximum length 248-bytes. It is stipulated in volume I of
EMV specification that the maximum length of command data is 255-bytes and
that of response data is 256-bytes. Using dynamic signature data as IC card
response data also restricts the maximum length of IC card public key.
If the card supports DDA and CDA, including the length of the record template of
IC card certificate, which means that the length of IC card public key certificate
plus the Tag and length of certificate (“9F46”) and record template (“70”), the total
length should not exceed 254-bytes, so the length of IC card public key should not
exceed 247-bytes; therefore, the maximum length of issuer public key should not
exceed 247-bytes either.
The maximum length of IC card public key should be between 205 and 240
according to different length of issuer application data. If command Generate AC
contains other optional data, the maximum length of IC card public key should be
subtracted by the lengths of those data (including Tag and Length). If the card
application supports INTERNAL AUTHENTICATION format II, the maximum
length of IC card public key should also be additionally subtracted by 7-bytes.
When selecting the length of public key modulus, comparison of the life cycle of
key and the expected factorization process should be considered.
The values of issuer public key index and IC card public key index should be
determined by the Issuer. The public key indexes of certification authority, Issuer
and IC card must equal to 3 or 216+1.
The public key algorithm identifier for identifying this digital signature algorithm
must be the hexadecimal code of “01”.
UPI Confidential 79
Part IV Debit/Credit Application Security Specification
The key, signature, and recovery function of RSA algorithm using odd public key
index are described in the following paragraphs.
10.2.1.1 Key
The secret key SK of RSA digital signature scheme using odd public key index e
consists of two prime numbers p and q, complying with:
ed ≡ 1 mod (p-1)(q-1)
Composition:
Corresponding public key PK consists of public key modulus n = pq and public key
index e.
RSA signature function using odd public key index is defined as:
Here: X is the data used for signing and S is the corresponding digital signature.
RSA recover function using odd public key index is defined as:
X = Recover(PK)[S] := Se mod n.
The payment system and the Issuer must be responsible for the security of the
respective RSA public/secret key generation process.
10.3.1 SHA-1
For SHA-1 algorithm see ISO/IEC 10118-3. SHA-1 generates a Hash value of
20-bytes for the input of message of any length.
UPI Confidential 80
Part IV Debit/Credit Application Security Specification
Step 2: Concatenate all data entered in specified order as a single data block.
Step 3: Segment the concatenated data block into 8-byte data blocks, labeled as D1,
D2, D3, and D4, etc. At the end, the remaining bytes form a last data block that is
less than or equal to 8 bytes in length.
Step 4: If the last data block is 8 bytes long, then append an 8-byte long data block,
with hexadecimal value of “0x 80 00 00 00 00 00 00 00". If the last block has fewer
than 8-bytes, then append a byte with hexadecimal value of “0x80". If the data
block is 8 bytes long after the appending, then skip to step 5. If the data block is
still less than 8 bytes long after the appending, then keep appending hexadecimal
value of “0x80" until the data block is 8 bytes long.
Step 5: MAC generation uses the data block created through the method above,
processed with the session key. For session key generation, see Figure B.3. TAC
generation uses the data block created through the method above, processed with
left-to-right 8 bytes of DTK key in XOR calculation for encryption. MAC or TAC
calculation methods please see Figure B.4 for details.
Step 6: 4 bytes on the left of the final value is the MAC or TAC.
UPI Confidential 81
Part IV Debit/Credit Application Security Specification
Initial
I2 I3 I4 I5
Vector
I1=D1 01 02 03 04
+ + + MAC
D2 D3 D4
Legend:
I = Input
D = Data block
DEA = Data Encryption Algorithm
(encipherment mode) KMA = MAC Session Key A
O = Output + = Exclusive-OR
Figure A.1 MAC and TAC single DEA key calculation method
UPI Confidential 82