Abecs Pinpad Communication Protocol and Operation v212r01190411 1
Abecs Pinpad Communication Protocol and Operation v212r01190411 1
Definitions
Abecs Or “Associação Brasileira das Empresas de Cartões de Crédito e Serviços” (Brazilian
Association of Credit Card and Service Companies).
Acquirer Company that captures and processes payment card transactions (also referred as
“Acquirer Network”).
AES Or “Advanced Encryption Standard”, also known as “Rijndael”, it is a symmetric
encryption algorithm defined by FIPS 197 or ISO / IEC 18033-3. Although his algorithm
considers keys of different sizes, this specification specifically uses AES-128 (16-byte
key).
Being a symmetric algorithm, AES has a reverse function, in this specification denoted as
AES-1.
AID Or “Application Identifier”, it is a 5 to 16-byte data object that identifies a payment
application on an EMV card (Ex: Visa Credit = A0000000031010h).
Bypass Situation in which the cardholder refuses to enter the PIN, pressing the [OK/ENTER] key
on the pinpad with an empty input field.
Card Association Institution that defines rules and provides interoperability for issuing and accepting
payment cards (ex: VISA, MasterCard, etc.).
Cardholder It refers to the person who uses a card to perform a payment transaction.
CBC Or “Cipher-block Chaining”, data block encryption method.
Cleartext Information or data are referred in this specification as “cleartext” when not encrypted
(before encryption or after decryption).
Command Instruction sent from the SPE to the pinpad for it to execute and return a response.
CRC Or “Cyclic Redundancy Check”, validation code for error detection (see section 7.2).
Cryptogram Block of data encrypted using a symmetric key (DES, TDES, AES) or an asymmetric public
key (RSA).
CTLS Not an initialism, this definition was created in this specification to refer to a contactless
chip card, to differentiate it from the ICC.
DES Or “Data Encryption Standard”, symmetric key encryption algorithm defined by the
FIPS-46-3 standard. Being a symmetric algorithm, DES has a reverse function, in this
specification denoted as DES-1.
Display Device for displaying text and images on the pinpad, usually a liquid crystal display (LCD).
DUKPT Or “Derived Unique Key Per Transaction”, encryption method defined by the ANSI
X9.24:2009 standard (DUKPT:TDES)
ECB Or “Electronic Codebook”, data block encryption method.
EMV Standard for processing ICC payment cards, defined in EMV#1, EMV#2, EMV#3
and EMV#4.
EMV Kernel A “EMV Type Approval Level 2” certified software core that is responsible for processing
EMV cards (ICC or CTLS) on the pinpad.
Fallback Contingency process through which an ICC is accepted by the SPE through its magnetic
stripe, usually due to a technical problem with the chip.
ICC Or “Integrated Circuit Card”, for this specification it refers exclusively to contact chip
card, according to ISO-7816.
Issuer Entity, usually a bank, that issues cards for use in pinpads, whether magnetic, ICC or
CTLS.
KMOD/KPUB/KPRV RSA key managed by the SPE, used in the “Secure Communication” (section 5.2) and
“Encrypted PAN” (section 5.3) modes, composed of a “module” (KMOD), a “public
exponent” (KPUB) and a “private exponent”( KPRV)
KSEC AES key created by the pinpad in “Secure Communication” mode (section 5.2).
KRAND Random TDES key used to encode card tracks in “End-to-End Encryption” (section 5.4).
KSN Or “Key Serial Number”, it is the serial number of a key used in DUKPT encryption.
MK Or “Master Key”, TDES encryption key inserted in the pinpad (in this specification
referred to as MK: TDES).
MK/WK PIN (or any data) encryption method defined by the ANSI X9.8 standard, which uses a
MK and a “Working Key” provided externally.
Nibble Equivalent to half byte, that is, a set of 4 bits (represents values 0h to Fh).
PAN Or “Primary Account Number”, that is, the number of a payment card.
PCI Or “Payment Card Industry Security Standards Council”, the normative council that
defines security rules for card payment systems.
PIN Or “Personal Identification Number”, the cardholder password.
Pinpad Formally "PIN-pad", it is a secure device (“tamper proof”) that preserves encryption keys
(MK/WK or DUKPT) and includes keyboard, display, magnetic card, ICC, SAM, CTLS
interfaces and serial communication (RS232, USB, Bluetooth, etc.).
Protocol Also referred to as “Communication Protocol”, it is a bidirectional data transfer
mechanism between the SPE and the pinpad, so that the SPE can send the commands.
RSA Or “Rivest, Shamir & Adleman”, an asymmetric encryption algorithm defined by the
PKCS # 1 standard (RFC 3447). An RSA encryption key is made up of “module”, “public
exponent” and “private exponent”.
RFU Reserved for Future Use.
SAM Or “Secure Application Module”, refers to a card with a chip (“2FF” format) embedded
in the pinpad.
SPE Portuguese initialism for “Electronic Payment System”, that is, the system that uses the
pinpad, which can be, for example, a payment checkout or a self-service machine.
Tag See “TLV”.
TDES Or “Triple-DES”, a symmetric key encryption algorithm defined by the NIST SP 800-57
and SP 800-78-3 standard (2TDEA - keying option 2). Being a symmetric algorithm, TDES
has a reverse function, in this specification denoted as TDES-1.
TLV Or “Tag, Length and Value”, it is a data encoding method used by the EMV standard (see
section 7.1).
Track One of the three possible data blocks recorded on a magnetic card, referred as Track 1,
Track 2 and Track 3. These data blocks usually contain the PAN, expiration date and
other relevant information. ICC and CLTS may contain the same data blocks in their
memory.
WKPAN TDES encryption key used to encode sensitive information in communication messages
(mainly PAN) in the method referred to in this specification as “Encrypted PAN” (see
section 5.3).
XOR Or “Exclusive OR”, it is a binary logical operation also represented by the symbol “”.
Note: Terms extracted from the EMV standard are highlighted in this document to avoid loss
of reference and, thus, facilitate its understanding.
Abecs Pinpad - Communication Protocol and Operation Version 2.12 (Apr 11th, 2019)
1. Introduction
This document is intended to specify in detail the “Abecs Pinpad”, with the objective of defining an
interoperability standard for the use of pinpad type devices in the Brazilian market, mainly
encompassing the following functionalities:
• Secure PIN capture;
• Magnetic card reading;
• Processing of EMV chip card (contact or contactless);
• Basic “human-machine interface” operations with the cardholder; and
• Identification and logistics management of the device.
“Abecs Pinpad” refers to a pinpad type device whose software/firmware respects this specification,
which does not go into the merit of its hardware.
This specification focuses on two main technical points to guarantee the interoperability of an Abecs
Pinpad in different SPEs:
sofware/firmware
1
2
Communication protocol between the SPE and the Abecs Pinpad; and
Internal operation of the pinpad, that is, specification of its software/firmware.
1.2. Versioning
This specification adopts a numerical “A.BC” version convention, being:
“C” = Increased when the specification changes only for structural or explanatory improvements, not
incurring in functional changes.
“B” = Increased when the specification relates to functional changes in the pinpad, but maintaining
full compatibility with the SPE
“A” = Increased when the specification undergoes functional changes that influence both sides: SPE
and pinpad.
Format Description
A Alphanumeric information coded according to the ASCII table, containing bytes from
20h (space) to 7Eh (~). When the information is smaller than the defined field, it
should be left aligned with spaces (20h) on the right.
Example: If a field of format "A6" contains the information "TEXT", it is encoded as:
54h 45h 58h 54h 20h 20h.
Format Description
S Alphanumeric information coded according to the character table defined in section
7.3.2, which may contain bytes from 20h (space) to FFh. When the information is
smaller than the defined field, it should be left aligned with spaces (20h) on the right.
Example: If a field of format “S8” contains the information “Ação”, it is encoded as:
41h E7h E3h 6Fh 20h 20h 20h 20h.
N Decimal numeric information encoded according to the ASCII table, and can only
contain bytes from 30h ("0") to 39h ("9"). When the information is smaller than the
defined field, it must be right aligned with zeros (30h) to the left.
Example: If a field of format “N8” contains the value 1234, it is encoded as: 30h 30h
30h 30h 31h 32h 33h 34h.
H Hexadecimal numeric information encoded according to the ASCII table, and may
contain only bytes from 30h (“0”) to 39h (“9”), 41h (“A”) to 46h (“F”) and 61h (“a”) to
66h (“f”). When the information is smaller than the defined field, it must be right
aligned with zeros (30h) to the left.
Each two characters in hexadecimal format represent a byte (value from 00h to FFh),
so the [Length] must always be an even number.
Example: If a field of format “H4” contains the value 3F6Ch, it is encoded as: 33h 46h
36h 43h.
X Numeric information in binary representation, preceded by the most significant byte.
When the information is smaller than the defined field, it must be right aligned with
leading zeros.
Example: If an “X3” format field contains the value 3000 (BB8h), it is encoded as: 00h
0Bh B8h.
IMPORTANT: Data of type “H..???” are always preceded by a numeric field containing their size
information. However, for historical reasons, this value is always divided by two (÷ 2), to
represent the number of “original” bytes that generated the hexadecimal encoding.
2. Communication Protocol
This chapter describes the communication protocol between the SPE and the pinpad, considering
three levels:
SPE Pinpad
Payment Abecs
Application Application
hardware hardware
For compatibility with the legacy base, the SPE can only send a packet to the pinpad with
PKTDATA greater than 1024 bytes in the case of an “Abecs Command” (see section 3.1.3).
SPE Pinpad
Idle state...
Command
Pinpad executes
command and
returns response.
Response
Idle state...
This specification considers two types of commands, “blocking” and “non-blocking”, as detailed
below. To find out the type of a particular command, see its definition in Chapter 3.
Non-blocking commands
Commands that do not require interaction with the cardholder are called “non-blocking”.
In this case, the SPE must wait up to 10 seconds for the response, informing a “time-out” error if it is
not received within this time.
SPE Pinpad
Idle state...
Non-blocking command
SPE waits up to 10 Pinpad executes
seconds for the command and
response! returns response.
Response
Idle state...
Blocking commands
Commands that require interaction with the cardholder (for example, PIN capture) cause the pinpad
to hold the processing indefinitely, being called “blocking”.
In this case, the SPE must wait indefinitely for a response, never informing a “time-out” error.
This type of command also allows the pinpad to return intermediate responses called “notification
messages” to the SPE (see section 2.3.3).
SPE Pinpad
Idle state...
Blocking command
Pinpad processes
SPE waits command and may
indefinitely for the send notification
response! Notification message messages before
the final response.
Response
Idle state...
SPE Pinpad
Idle state...
command
Pinpad verifies
SPE waits up to 2 command format
seconds... and CRC
ACK
SPE waits for the Pinpad executes
response... the command...
Upon receiving the command, the pinpad verifies the CRC and sends an «ACK» (06h) if the data is
correct. If the values do not match, or the format of the packet is invalid, the pinpad sends a «NAK»
(15h) and discards the packet.
SPE Pinpad
Idle state...
command
Pinpad rejects
SPE waits up to 2 command format
seconds... or CRC
NAK
Idle state...
command
Pinpad accepts
SPE waits up to 2 command format
seconds... and CRC
ACK
SPE waits for the Pinpad executes
response... the command...
The SPE must wait for an «ACK» or a «NAK» for 2 seconds after sending the command. Failure to
receive any of these bytes aborts communication.
Upon receiving a «NAK», the SPE must retransmit the command. The SPE must attempt to send the
command up to 3 times, aborting after the 3rd «NAK» received.
Examples:
SPE sends command to the pinpad, but it does not receive the CRC correctly.
SPE 16 4F 50 4E 17 00 00 ∙OPN∙∙∙
The pinpad does not recognize the command as valid and returns «NAK».
PP 15 ∙
SPE resends the command, which is now received with the correct CRC.
SPE 16 4F 50 4E 17 A8 A9 ∙OPN∙¨©
PP 06 ∙
SPE Pinpad
Pinpad executes
command and
builds response.
response
SPE rejects response
Idle state...
format or CRC.
NAK
Pinpad retransmits
response.
response
SPE accepts response
format/CRC and does Idle state...
not send an ACK.
Upon receiving a response from the pinpad, the SPE must check the CRC of the received packet and
send a «NAK» in case of error, returning to wait for the response. This process must be repeated up
to 3 times.
If the received packet is intact, nothing should be sent.
Examples:
The SPE sends a command to the pinpad.
16 44 53 50 30 33 32 20 20 20 20 4F 50 45 52 41 ∙DSP032∙∙∙∙OPERA
SPE C7 C3 4F 20 20 20 20 20 20 20 46 49 4E 41 4C 49 ÇÃO∙∙∙∙∙∙∙FINALI
5A 41 44 41 20 20 20 17 52 13 ZADA∙∙∙∙R∙
PP 06 ∙
The pinpad returns the response, but the SPE does not receive a valid CRC.
PP 16 44 53 50 30 30 30 17 FF FF ∙DSP000∙ÿÿ
The SPE does not recognize the response and sends a «NAK», requesting its retransmission.
SPE 15 ∙
The pinpad returns the response again, and it is now received with a valid CRC.
PP 16 44 53 50 30 30 30 17 39 63 ∙DSP000∙9c
SPE Pinpad
Idle state...
blocking command
Waits up to 2 Pinpad verifies
seconds... command CRC
ACK
Pinpad is
User requests processing the
cancellation! command...
CAN
Waits up to 2 Pinpad aborts the
seconds... processing.
EOT
Idle state...
The SPE must wait for the «EOT» for 2 seconds, in order to obtain confirmation of the cancellation. If
this byte is not received, the SPE must try to send the «CAN» up to 3 times.
During this time, the SPE must ignore any other bytes it may receive, as, coincidentally, there may be
a response from the pinpad or a notification message being returned at the time of cancellation.
It is important that the SPE always initiates the communication flow with the pinpad by sending
a «CAN», in order to abort any blocking command that may be in process.
Examples:
The SPE sends a blocking command to the pinpad.
16 47 43 44 30 31 36 00 0C 00 01 3C 00 0E 00 01 ∙GCD016∙∙∙∙<∙∙∙∙
SPE 0A 00 0B 00 02 00 09 17 C1 42 ∙∙∙∙∙∙∙∙ÁB
PP 06 ∙
After a delay, the SPE decides to abort the command by sending a «CAN».
SPE 18 ∙
PP 04 ∙
Command sending
Send command
to serial
interface
Timeout! Wait up to 2s
for a byte from
serial interface
Error...
=NAK? Y
N
3rd
N
N =ACK? time?
Y Y
Response receiving
A
Wait byte from
serial interface
C B
PKTDATA
Y
=SYN? N < 2049?
Error...
Y N
=ETB? N
Y
=DC3? N
Wait up to 2s Timeout! Y
for the
1st CRC byte Subtract
Timeout! Wait up to 2s
for a byte from 20h from
received
Wait up to 2s Timeout! serial interface byte
for the
1nd CRC byte
OK! Error...
Blocking Y
N
command?
Has it User
N N Y
been 10s? cancelled?
Y
Send CAN
Was a byte
N
received? Wait up 2s for a Timeout!
byte from the
Y serial interface
Y
Byte Operation Communication
Timeout!
received! cancelled! error!
C B C C
If PKTDATA starts with the «DC2» byte (12h), it is encrypted according to the “Secure
Communication” method described in section 5.2. In this case, the formats described in this
section refer to the CLRDATA field.
Successful execution
A response to the successful execution of a command may (or may not) contain data blocks of up to
999 bytes each, always preceded by the length information.
Execution error
In the event of an error in the execution of a recognized command, the pinpad always returns the
following 6-byte response.
2.3.4. Exceptions
If a command is not recognized as valid by the pinpad, it cannot return a coherent answer (RSP_ID
with the same value as CMD_ID). In this case, the following response is used:
3. Commands
This chapter details the commands processed by the pinpad at the Application Layer, according to
the format presented in section 2.3.
All formats and examples described in this chapter disregard the Link Layer, as well as the
“Secure Communication” mode, given that the commands and responses operate above these
layers.
In the detail sections of the commands in this specification, we seek to list only the relevant
return codes for the command being described. Most commands support the ST_OK,
ST_INVPARM, ST_MANDAT and ST_INTERR return codes and these are omitted to
simplify the document.
The SPE shall not use an obsolete command for a pinpad that is known to follow this
specification. To recognize an Abecs Pinpad, it shall use the “OPN” command described in
section 3.2.2.
The pinpad shall implement an obsolete command while it is described in this specification, in
order to maintain compatibility with legacy systems.
Composition rules
• The SPE can send the parameters in any order, not necessarily the same as shown in the
description of the commands in this chapter.
• The SPE can divide the parameters into one or more blocks (CMD_BLKn), given that the
CMD_LENn field allows a maximum of only 999 bytes.
• The parameters sent to the pinpad can be mandatory or optional, as required by the command.
The pinpad will simply ignore parameters there are unknown or unnecessary for the command
being processed.
Presentation
The following convention is adopted to simplify the specification of Abecs Commands in this chapter:
List of parameters
Composition rules
• The pinpad may return data fields in any order, not necessarily the same as shown in the
description of the commands in this chapter.
• The pinpad may divide the response data into one or more blocks (RSP_BLKn), since the
RSP_LENn size discriminator allows a maximum of only 999 bytes.
• Response data returned by the pinpad can be mandatory or optional, according to the command
specification. The SPE shall ignore any unknown or unnecessary response data field.
Presentation
The following convention is adopted to simplify the specification of Abecs Commands in this chapter:
MD = Data field is mandatory depending on the situation (it can be a complement to another data,
for example). If its presence is required but it is absent, the SPE shall end the operation with a
fatal error.
MR = Data is mandatory if required by the SPE in the command. The SPE shall criticize or not its
presence according to the situation.
O= Data is optional as a processing result and the SPE should not criticize its absence.
This command format is obsolete. The SPE must use the format described in section 3.2.2.
Command
Response
Examples
SPE requests “opening” of the pinpad.
SPE 4F 50 4E OPN
Operation is successful.
PP 4F 50 4E 30 30 30 OPN000
Command
If the pinpad returns this response format, it means that it does not yet follow this
specification. In this specific case, there is no “Secure Communication” and, for compatibility
reasons, the SPE shall not use Abecs Commands.
Examples
SPE requests KSEC key, providing a 256-byte RSA key module and a public exponent of value 13
(0Dh).
4F 50 4E 35 31 39 30 32 35 36 41 38 32 41 36 36 OPN5190256A82A66
30 42 33 43 34 39 32 32 36 45 46 43 44 41 42 41 0B3C49226EFCDABA
37 46 43 36 38 30 36 36 42 38 33 44 32 33 44 30 7FC68066B83D23D0
35 36 30 45 44 41 33 41 31 32 42 36 33 45 39 31 560EDA3A12B63E91
33 32 46 32 39 39 46 42 46 33 34 30 41 35 41 45 32F299FBF340A5AE
42 43 34 43 44 35 44 43 31 46 31 34 38 37 33 46 BC4CD5DC1F14873F
38 33 41 38 30 42 41 39 41 38 38 44 33 46 45 41 83A80BA9A88D3FEA
42 42 41 42 34 31 44 46 46 43 31 39 34 34 42 42 BBAB41DFFC1944BB
42 41 41 38 39 46 32 36 41 46 39 43 43 32 38 46 BAA89F26AF9CC28F
46 33 31 43 34 39 37 45 42 39 31 44 38 32 46 38 F31C497EB91D82F8
36 31 33 45 37 34 36 33 43 34 37 35 32 39 46 42 613E7463C47529FB
44 31 39 32 35 46 44 33 33 32 36 41 38 44 43 30 D1925FD3326A8DC0
32 37 37 30 34 44 41 36 38 38 36 30 45 36 38 42 27704DA68860E68B
44 30 41 31 43 45 41 38 44 45 36 45 43 37 35 36 D0A1CEA8DE6EC756
30 34 43 44 33 44 39 41 36 41 46 33 38 38 32 32 04CD3D9A6AF38822
44 45 34 35 41 41 41 30 43 39 46 42 46 32 42 44 DE45AAA0C9FBF2BD
SPE 34 37 38 33 42 30 46 39 41 38 31 46 36 33 35 30 4783B0F9A81F6350
43 30 31 38 38 31 35 36 46 39 30 38 46 41 42 31 C0188156F908FAB1
46 35 35 39 43 46 43 45 31 46 39 31 41 33 39 33 F559CFCE1F91A393
34 33 31 45 38 42 46 32 43 44 37 38 43 30 34 42 431E8BF2CD78C04B
44 35 33 30 44 42 34 34 31 30 39 31 43 44 46 46 D530DB441091CDFF
42 34 30 30 44 41 43 30 38 42 31 34 35 30 44 42 B400DAC08B1450DB
36 35 43 30 30 45 32 44 34 41 46 34 45 39 41 38 65C00E2D4AF4E9A8
35 41 31 41 31 39 42 36 31 46 35 35 30 46 30 43 5A1A19B61F550F0C
32 38 39 42 31 34 42 44 36 33 44 46 38 41 31 35 289B14BD63DF8A15
33 39 41 38 43 46 36 32 39 46 39 38 46 38 38 45 39A8CF629F98F88E
41 39 34 34 44 39 30 35 36 36 37 35 30 30 30 46 A944D9056675000F
39 35 42 46 44 30 46 45 46 43 35 36 46 39 44 39 95BFD0FEFC56F9D9
44 36 36 45 32 37 30 31 42 44 42 44 37 31 39 33 D66E2701BDBD7193
33 31 39 31 41 45 39 39 32 38 46 35 44 36 32 33 3191AE9928F5D623
46 45 38 42 39 39 45 43 43 37 37 37 34 34 34 46 FE8B99ECC777444F
46 41 41 38 33 44 45 34 35 36 46 35 43 38 44 33 FAA83DE456F5C8D3
43 38 33 45 43 35 31 31 41 46 31 30 44 C83EC511AF10D
For validation purposes, this example considers the following value for the private exponent:
KPRV =
40 AD D8 7A 79 A5 F9 8D 26 2C BD E2 60 0A 00 1F
79 FA 15 0D 68 2C 8C 7D 59 C9 4B 89 BF C5 12 22
7B 53 6A 97 31 3E 8F BD 2F 47 B5 F7 8F 66 F2 7B
E7 8E BC BE 55 8F 7D 88 58 7C E5 BD F2 15 D3 CD
63 AD 4B 0E BC 1C 44 6E 95 32 5F 87 DC F1 B0 37
DE 4B 39 77 FD 38 8C 4E 77 C0 5D 99 03 CF 18 AA
9B 6C 5D 28 DB C5 A3 69 3E 4C AA EE 27 8D D8 EE
0E E5 97 41 CC 06 8C 9C 74 98 70 2F 32 A6 87 67
6B A0 D1 02 AD F1 70 45 5D E2 6B 71 6E 0A C1 CA
13 93 71 D0 B5 27 5F 0B 93 F7 07 9F 2F 9C F0 1D
21 D6 C0 D4 1E 21 2E 20 FE 40 C1 E3 AF AF 73 47
3F 5B 7C 16 79 01 A9 5B 49 44 80 4E DC D6 8D 4C
A4 E2 C5 D3 3C BF 88 AC 42 71 2C ED 32 47 9A 03
6B 48 9F 38 23 D8 B8 63 FA 9C EB 9E 5A 4C ED AB
AD 25 19 11 D4 F9 20 D1 5D 72 B5 47 A0 AD 21 27
6E 9C FD 79 F8 7B 83 0C 32 B7 65 05 68 D8 EB D5
Using the RSA key with the KPRV defined above, the following data block is obtained when “opening”
CRKSEC:
CRKSEC 00 02 FA 6D BD 58 30 43 21 4C A1 BA EA EA 54 F2
DB 72 2E 7F 96 41 89 7D C7 57 DB 31 6C 79 88 07
cleartext C1 27 AA 16 88 6D 4E 31 0A CC 97 1B 0B 2D 1F 22
= 60 DD B1 E7 15 17 AC 33 5F FB CD B3 16 C7 98 80
7B 78 BE 8B 96 BE 37 97 A0 3C BD 23 C8 7A 92 CD
26 BD C7 37 E3 8C 39 4C 96 D9 70 96 75 B1 FA 7C
49 2E E2 23 B7 1D BD 63 6E 87 FE A8 C0 46 F4 9C
F9 B4 45 FA 57 FA 6D BD 58 30 43 21 4C A1 BA EA
EA 54 F2 DB 72 2E 7F 96 41 89 7D C7 57 DB 31 6C
79 88 07 C1 27 AA 16 88 6D 4E 31 0A CC 97 1B 0B
2D 1F 22 60 DD B1 E7 15 17 AC 33 5F FB CB 78 BE
8B 96 BE 37 97 A0 3C BD 23 C8 7A 92 CD 26 BD C7 KSEC =
37 E3 8C 39 4C 96 D9 70 96 75 B1 FA 7C 49 2E E2 DB 3B 4D 01
23 B7 1D BD 63 6E 87 FE A8 C0 46 F4 9C F9 B4 45 54 32 AB 32
FA 57 6E 87 FE A8 C0 46 F4 9C F9 B4 45 FA 57 00 23 55 5A 1F
DB 3B 4D 01 54 32 AB 32 23 55 5A 1F 81 75 9A 94 81 75 9A 94
This command is obsolete. The SPE must use the “GIX” command for this functionality.
Command
Examples
SPE requests pinpad information for GIN_ACQIDX = “00”.
SPE 47 49 4E 30 30 32 30 30 GIN00200
Operation is successful.
47 49 4E 30 30 30 31 30 30 43 59 47 4E 55 53 20 GIN000100CYGNUS∙
20 20 20 20 20 20 20 20 20 20 20 20 20 50 50 20 ∙∙∙∙∙∙∙∙∙∙∙∙∙PP∙
58 2D 31 3B 31 30 4D 42 20 20 20 20 20 20 20 20 X-1;10MB∙∙∙∙∙∙∙∙
PP 43 38 30 36 35 58 41 30 37 37 58 30 30 36 30 58 C8065XA077X0060X
20 20 20 20 20 32 2E 30 30 30 30 31 2E 30 33 20 ∙∙∙∙∙2.00001.03∙
31 33 30 37 31 35 20 20 20 30 30 31 31 30 31 30 130715∙∙∙0011010
31 30 33 30 30 30 30 30 20 20 20 20 20 10300000∙∙∙∙∙
SPE 47 49 4E 30 30 32 30 32 GIN00202
Operation is successful.
47 49 4E 30 30 30 30 34 32 41 62 65 63 73 20 20 GIN000042Abecs∙∙
20 56 31 2E 30 39 20 20 20 20 20 20 20 30 30 31 ∙V1.09∙∙∙∙∙∙∙001
PP 2E 30 33 20 31 33 30 37 31 35 32 2E 30 30 20 20 .03∙1307152.00∙∙
20 30 30 ∙00
Command
Response
Examples
SPE requests PP_SERNUM, PP_MNNAME, PP_DKPTTDESP, PP_KSNTDESP01 and PP_KSNTDESP14.
47 49 58 30 31 34 00 01 00 0A 80 01 80 04 80 34 GIX014....€.€.€4
SPE 91 01 91 0E ‚.‚.
Pinpad returns the information but does not return the KSN of DUKPT:TDES:PIN #14, as this key is
not loaded.
47 49 58 30 30 30 31 35 31 80 01 00 0C 39 39 31 GIX000151€...991
32 37 34 33 36 36 31 35 35 80 04 00 0D 48 45 4D 274366155€...HEM
49 53 50 48 45 52 45 53 20 20 80 34 00 64 30 31 ISPHERES∙∙€4.d01
31 31 30 30 31 31 30 30 30 30 30 30 30 30 30 30 1100110000000000
30 30 30 30 30 30 30 32 32 32 32 32 32 32 32 32 0000000222222222
PP 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
32 32 91 01 00 0A FF FF F9 13 25 00 43 20 04 43 22’...ÿÿù.%.C .C
SPE 47 49 58 GIX
The “Encrypted PAN” mode is obsolete and has been replaced by the “Secure Communication”
method, described in section 5.2. It should only be used by the SPE if it identifies that the
pinpad does not yet comply with this specification.
The “Encrypted PAN” mode is not accepted by the pinpad if the SPE is already using the
“Secure Communication” method described in section 5.2.
Command (Mode 1)
Response (Mode 1)
Command (Mode 2)
Response (Mode 2)
Examples
SPE initiates the “Encrypted PAN” mode 2, providing an RSA public key.
44 57 4B 32 36 33 32 43 30 45 34 45 36 41 41 44 DWK2632C0E4E6AAD
39 44 43 38 31 45 32 45 42 46 38 41 43 31 32 36 9DC81E2EBF8AC126
45 37 45 45 45 36 35 36 38 30 38 39 38 42 42 41 E7EEE65680898BBA
43 33 30 30 36 33 44 43 44 35 34 33 44 37 30 35 C30063DCD543D705
30 34 30 45 39 31 36 44 39 33 45 45 33 31 36 42 040E916D93EE316B
39 45 43 34 39 32 42 37 39 36 46 31 37 32 31 34 9EC492B796F17214
32 35 46 30 46 30 32 38 38 33 34 32 35 31 41 41 25F0F028834251AA
44 35 31 43 45 42 31 37 38 33 33 30 38 45 43 37 D51CEB1783308EC7
SPE 44 35 30 37 32 44 38 34 38 31 33 42 44 41 35 39 D5072D84813BDA59
42 33 31 36 31 43 42 34 38 37 39 34 36 34 45 42 B3161CB4879464EB
35 41 46 37 31 39 36 39 38 36 35 46 44 33 34 37 5AF71969865FD347
34 35 41 37 31 31 44 31 44 41 33 44 44 42 34 44 45A711D1DA3DDB4D
32 39 44 32 39 44 30 34 32 32 43 36 45 31 37 43 29D29D0422C6E17C
32 35 46 31 37 43 30 42 35 42 33 39 45 36 38 38 25F17C0B5B39E688
43 34 44 30 36 31 32 33 44 44 42 35 46 35 35 38 C4D06123DDB5F558
45 46 30 33 31 36 42 33 46 37 34 34 43 37 30 37 EF0316B3F744C707
31 46 32 39 37 39 31 30 31 30 30 30 31 1F29791010001
For validation purposes, this example considers the following value for the private exponent:
KPRV =
65 3C BD C3 95 AC 21 8F 53 81 A3 ED D8 88 4D DE
73 07 70 01 AF 91 54 F5 42 BA 9F B4 3E AA 92 AB
27 41 D6 35 AB 46 D3 F0 39 3F 90 C8 27 E9 74 1B
44 18 FA 10 52 3E C9 58 63 59 85 A9 78 EB AC 19
E4 25 CE 7F 6B 78 66 7E 9C C1 85 C8 1A 0B F2 FF
A7 4A CC 33 FF A3 6F DB 95 66 80 12 FF 32 4E BD
58 04 60 C3 2D 76 61 8B E8 16 98 61 F5 33 2B 83
5C FC 31 1F 7C C5 41 65 87 0D 78 9D 6B 72 68 F1
Command
Response
Examples
SPE requests the “closing” of the pinpad, leaving the message “FORCE TEN @STORE” / “THANK
YOU!” on the display.
43 4C 4F 30 33 32 46 4F 52 43 45 20 54 45 4E 20 CLO032FORCE∙TEN∙
SPE 40 53 54 4F 52 45 20 20 20 54 48 41 4E 4B 20 59 @STORE∙∙∙THANK∙Y
4F 55 21 20 20 20 OU!∙∙∙
Operation is successful.
PP 43 4C 4F 30 30 30 CLO000
Command
NOTES:
If no parameters are provided, the display is simply erased.
SPE_MFNAME has priority over SPE_DSPMSG, that is, if SPE_MFNAME is provided and the
reported media file exists, SPE_DSPMSG is ignored.
Response
Examples
SPE requests the “closing” of the pinpad, leaving a three-line message on the display.
43 4C 58 30 34 31 00 1B 00 25 50 52 45 53 54 4F CLX041...%PRESTO
SPE 20 53 48 4F 50 0D 54 48 41 4E 4B 20 59 4F 55 0D ∙SHOP.THANK∙YOU.
41 4E 44 20 43 4F 4D 45 20 41 47 41 49 4E 21 AND∙COME∙AGAIN!
Operation is successful.
PP 43 4C 58 30 30 30 CLX000
Command
Response
If a magnetic card has been swiped (PP_EVENT = “90”), but no track could be read, RSP_STAT =
ST_OK and PP_TRK1INC, PP_TRK2INC and PP_TRK3INC fields will not be returned. This
differs from the “CKE” command behavior, which returns RSP_STAT = ST_MCDATAERR in this
case.
Examples
SPE requests only the magnetic card swiping event.
SPE 43 45 58 30 31 30 00 06 00 06 30 31 30 30 30 30 CEX010....010000
Command
Response
Notes
• The pinpad will not resolve internally the return statuses 61xxh and 6Cxxh of T = 0 cards, thus the
SPE must be prepared to deal with these two cases externally.
• The SPE shall always disable the antenna when it finishes processing a CTLS.
Examples
SPE requests the activation of the ICC in the main coupler.
SPE 43 48 50 30 30 35 30 31 30 30 30 CHP00501000
Operation is successful and the pinpad returns the card's ATR (3B29008072A4456400FF0010).
43 48 50 30 30 30 30 32 37 30 31 32 33 42 32 39 CHP0000270123B29
PP 30 30 38 30 37 32 41 34 34 35 36 34 30 30 46 46 008072A4456400FF
30 30 31 30 0010
PP 43 48 50 30 30 30 30 30 37 30 30 32 36 31 33 32 CHP0000070026132
Since the card returned 61xxh (T = 0 protocol), the SPE sends a GET RESPONSE command to the
card.
43 48 50 30 31 35 30 32 30 30 35 30 30 43 30 30 CHP0150200500C00
SPE 30 30 30 33 32 00032
Operation is successful, with the card returning the response to the SELECT command.
43 48 50 30 30 30 31 30 37 30 35 32 36 46 33 30 CHP0001070526F30
38 34 30 37 41 30 30 30 30 30 30 30 30 34 31 30 8407A00000000410
31 30 41 35 32 35 35 30 30 41 34 44 36 31 37 33 10A525500A4D6173
37 34 36 35 37 32 34 33 36 31 37 32 36 34 38 37 7465724361726487
PP 30 31 30 31 35 46 32 44 30 36 37 30 37 34 36 35 01015F2D06707465
36 45 36 35 37 33 39 46 31 31 30 31 30 31 39 46 6E65739F1101019F
31 32 30 36 34 33 37 32 36 35 36 34 36 39 37 34 1206437265646974
39 30 30 30 9000
PP 43 48 50 30 30 30 30 30 37 30 30 32 36 41 38 36 CHP0000070026A86
Command
If the pinpad is in “Encrypted PAN” mode (see section 5.3), the PANs on the tracks return
encoded using the WKPAN key.
If the pinpad is in “Encrypted PAN” mode, CKE_TRK3LEN is not filled, as Track 2 can reach up to
40 characters (see explanation in section 5.3)!!
Examples
SPE asks the pinpad to wait for any of the four possible events.
SPE 43 4B 45 30 30 34 31 31 31 31 CKE0041111
A magnetic card is swiped on the pinpad, which returns its tracks 1 and 2.
43 4B 45 30 30 30 32 32 35 31 37 34 42 35 31 34 CKE000225174B514
38 36 38 32 32 32 32 32 32 32 32 37 37 5E 41 4C 8682222222277^AL
45 58 20 4C 49 46 45 53 4F 4E 20 20 20 20 20 20 EX∙LIFESON∙∙∙∙∙∙
20 20 20 20 20 20 5E 32 31 31 32 32 30 31 39 38 ∙∙∙∙∙∙^211220198
PP 37 36 30 30 30 30 30 30 30 30 30 30 30 34 34 39 7600000000000449
37 30 30 30 30 30 20 20 33 37 35 31 34 38 36 38 700000∙∙37514868
32 32 32 32 32 32 32 32 37 37 3D 31 35 30 36 32 2222222277=15062
30 31 30 30 30 30 39 38 37 36 34 34 39 37 30 30 0100009876449700
30 30 00
SPE asks the pinpad to wait only for the keystroke event (also not sending the optional CKE_CTLS
field).
SPE 43 4B 45 30 30 33 31 30 30 CKE003100
PP 43 4B 45 30 30 30 30 30 33 30 30 34 CKE000003004
Command
Response
Examples
SPE sends a four-line message for presentation on the display.
44 45 58 30 34 31 30 33 38 46 72 65 65 7A 65 20 DEX041038Freeze∙
SPE 74 68 69 73 20 6D 6F 6D 65 6E 74 0D 41 20 6C 69 this∙moment.A∙li
74 74 6C 65 0D 62 69 74 20 6C 6F 6E 67 65 72 ttle∙bit∙longer
Operation is successful.
PP 44 45 58 30 30 30 DEX000
Command
Response
Examples
SPE sends the message "OPERATION ERROR" / "CODE: 2112/76", correctly formatted for
presentation on the display in 2 rows and 16 columns.
44 53 50 30 33 32 4F 50 45 52 41 54 49 4F 4E 20 DSP032OPERATION∙
SPE 45 52 52 4F 52 20 43 4F 44 45 3A 20 32 31 31 32 ERROR∙CODE:∙2112
2F 37 36 20 20 20 /76∙∙∙
Operation is successful.
PP 44 53 50 30 30 30 DSP000
Command
Response
Examples
SPE requests the encryption of a 24-byte block, containing the ASCII message “DATA TO BE
ENCRYPTED”, using the DUKPT:TDES index “07”, with variant #5 and CBC mode.
45 42 58 30 34 30 00 0F 00 18 44 41 54 41 20 54 EBX040....DATA∙T
SPE 4F 20 42 45 20 45 4E 43 52 59 50 54 45 44 20 20 O∙BE∙ENCRYPTED∙∙
20 20 00 03 00 02 37 31 00 09 00 02 30 37 ∙∙....71....07
Command
Response
Examples
SPE requests encryption of data 4C45455045415254 using MK:TDES:DAT index “14”.
45 4E 42 30 35 31 31 31 34 46 45 34 42 31 33 36 ENB051114FE4B136
34 34 36 33 32 39 46 45 36 30 30 30 30 30 30 30 446329FE60000000
SPE 30 30 30 30 30 30 30 30 30 34 43 34 35 34 35 35 0000000004C45455
30 34 35 34 31 35 32 35 34 045415254
Operation is successful.
45 4E 42 30 30 30 30 31 36 46 43 31 43 37 41 41 ENB000016FC1C7AA
PP 43 38 35 32 45 35 44 39 46 C852E5D9F
Command
Response
Message table
Examples
SPE requests the cardholder's RG (identification number), with a maximum of 10 digits, with a
maximum idle time of 1 minute (60 sec).
47 43 44 30 31 36 00 0C 00 01 3C 00 0E 00 01 0A GCD016....<.....
SPE 00 0B 00 02 00 09 ......
Command
Response
Examples
SPE requests the current KSN of DUKPT:TDES:PIN slot index “12”
SPE 47 44 55 30 30 33 33 31 32 GDU003312
This command is obsolete, the SPE shall use “CEX” with SPE_CEXOPT = “100000” instead.
Command
Response
Examples
SPE requests key pressing.
SPE 47 4B 59 GKY
PP 47 4B 59 30 31 33 GKY013
Command
Response
Examples
SPE requests a PIN capture using the MK/WK:TDES method, with MK slot index “08”.
47 50 4E 30 39 33 31 30 38 34 31 33 35 45 41 35 GPN0931084135EA5
38 42 41 31 33 45 32 36 32 46 34 34 43 35 39 45 8BA13E262F44C59E
44 37 38 39 39 41 41 33 43 31 36 34 34 34 34 33 D7899AA3C1644443
SPE 33 33 33 32 32 32 32 31 31 31 31 20 20 20 31 30 33322221111∙∙∙10
34 31 32 52 24 20 20 20 20 20 20 20 20 20 33 34 412R$∙∙∙∙∙∙∙∙∙34
2C 35 36 44 49 47 49 54 45 20 53 55 41 20 53 45 ,56DIGITE∙SUA∙SE
4E 48 41 NHA
Operation is successful.
47 50 4E 30 30 30 30 33 36 42 42 36 42 45 32 38 GPN000036BB6BE28
PP 46 44 46 33 35 32 32 45 39 30 30 30 30 30 30 30 FDF3522E90000000
30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000
The “GTK” command can only be used once after “CEX” or “GCX”.
For encrypted tracks, on shall use the parameters defined in the specifications of the Acquirer
Network that will process the transaction.
Command
1 It is understood that the data is “available” when it is successfully read from the magnetic card, or, in the case of a
chip card, when the equivalent TLV objects are present.
Response
If a magnetic card was swiped in “CEX” or “GCX” but no track could be read (reading error),
“GTK” returns ST_OK without card data.
Examples
SPE requests all the three tracks with 6 (six) cleartext digits at the beginning, using DUKPT:TDES
encryption (variant # 2) in ECB mode, with the key in slot index “12”.
47 54 4B 30 32 35 00 03 00 02 34 30 00 07 00 04 GTK025....40....
SPE 30 31 31 31 00 08 00 01 36 00 09 00 02 31 32 0111....6....12
Pinpad returns Tracks 1 and 2 and the respective generated KSN but does not return Track 3, as it is
unknown.
47 54 4B 30 30 30 31 33 33 80 44 00 4E 35 34 37 GTK000133€D.N547
38 32 33 7A E2 FA 69 BA 8C 62 93 9E C2 38 2C 33 823zâúiºŒb“žÂ8,3
D5 A1 6C 06 A2 D4 F6 EA 24 1E DC 93 73 21 92 FD Õ¡l.¢Ôöê$.Ü“s!’ý
D5 32 74 95 66 7C 8F D2 DF E6 A0 1C B7 94 BE C5 Õ2t•f|•Òßæ .·”¾Å
PP 8C 57 65 D9 4C E1 8A CD CC CB 57 68 51 64 DD 65 ŒWeÙLáŠÍÌËWhQdÝe
56 C7 35 BE 35 7E 39 45 6A 68 DB 80 47 00 0A FF VÇ5¾5~9EjhÛ€G..ÿ
FF F8 19 46 00 18 70 00 1F 80 45 00 13 54 78 23 ÿø.F..p..€E..Tx#
EA 2F B6 CD 92 89 F9 70 1C B0 88 3F D6 CC 6F 79 ê/¶Í’‰ùp.°ˆ?ÖÌoy
80 48 00 0A FF FF F8 19 46 00 18 70 00 1F €H..ÿÿø.F..p..
SPE requests PAN and Track 2 with 4 (four) cleartext digits at the beginning, using MK/WK:TDES
encryption with the key in slot index “07”, in CBC mode with a provided “IV” (Initialization Vector).
47 54 4B 30 35 37 00 07 00 04 31 30 31 30 00 03 GTK057....1010..
00 02 31 31 00 1D 00 08 7F 7C 1A FA C0 A8 4F B7 ..11....•|.úÀ¨O·
SPE 00 08 00 01 34 00 09 00 02 30 37 00 0A 00 10 C2 ....4....07....Â
BC A2 4F 3E F8 F2 EF 1C 0F 07 A9 7D 38 C3 38 ¼¢O>øòï...©}8Ã8
SPE requests PAN, Track 1 and Track 2 totally encrypted using a random TDES key in CBC mode, with
no “IV” (Initialization Vector).
47 54 4B 32 38 31 00 07 00 04 31 31 31 30 00 03 GTK281....1110..
00 02 39 31 00 24 00 80 80 45 05 9A 9D C7 D2 77 ..91.$..€E.š•ÇÒw
09 06 DC FD 01 04 E3 1E 23 CE 30 85 71 61 5D 1D ..Üý..ã.#Î0…qa].
BA 6E C2 29 91 13 76 26 3B 6B 64 A3 CE 89 21 A7 ºnÂ)‘.v&;kd£Î‰!§
9C 94 80 E5 32 1E 52 66 28 7D 43 48 60 B7 5A 92 œ”€å2.Rf(}CH`·Z’
FD B0 4B A8 8A 59 95 C2 4B FC 02 EC 2D CB 5C 8F ý°K¨ŠY•ÂKü.ì-Ë\•
AA C0 62 D7 60 D3 5E 79 98 9D 8E D9 8A D0 E3 56 ªÀb×`Ó^y˜ŽÙŠÐãV
53 F4 B4 84 68 39 55 17 C3 17 12 AD E5 62 3C F5 Sô´„h9U.Ã..åb<õ
29 4C BC CF EA CE 1A DA 9B 89 E2 21 22 D7 5C 39 )L¼ÏêÎ.Ú›‰â!"×\9
SPE 31 BC 14 E6 C1 BD 39 1B BF BF D9 E8 E8 A4 E5 4D 1¼.æÁ½9.¿¿Ùèè¤åM
F8 7B 05 AC 4E 43 E1 3F AA 93 EB A6 7D 95 D4 D3 ø{.¬NCá?ª“ë¦}•ÔÓ
B6 C3 D2 47 D3 C2 55 A7 F8 65 B3 96 82 2E 19 85 ¶ÃÒGÓÂU§øe³-‚..…
08 04 95 8E C9 1B 31 A2 3D 68 6F FE 4A 76 E6 4C ..•ŽÉ.1¢=hoþJvæL
31 B8 EA 51 BC 03 41 B5 79 7D AB 18 F6 F9 97 03 1¸êQ¼.Aµy}«.öù-.
35 6A B1 8D 9B FD 62 33 CD BC 31 DC 2C 46 F1 76 5j±›ýb3ͼ1Ü,Fñv
1A F5 AF 5C EF C8 2A 29 32 99 0A 4D 04 67 D9 15 .õ¯\ïÈ*)2™.M.gÙ.
79 CF E1 26 83 48 DA 19 FF 3F C7 EA 96 9E B3 47 yÏá&ƒHÚ.ÿ?Çê-ž³G
37 7A EA EA 64 21 AA 55 00 25 00 03 01 00 01 7zêêd!ªU.%.....
Pinpad PAN and Track 1 successfully encrypted but does not return Track 2, as it is unknown.
47 54 4B 33 35 37 30 30 30 80 4A 00 08 F1 58 F8 GTK357000€J..ñXø
C2 2E 09 59 1E 80 44 00 51 42 FB A4 60 A1 A9 17 Â..Y.€D.QBû¤`¡©.
B1 72 5C E1 E7 32 35 33 D0 7C 9F 0B 9A 6B E5 AB ±r\áç253Ð|Ÿ.škå«
AD 0D DB A1 D6 7F F0 F7 DE A3 7F 5A 4F 5A 17 DA -.Û¡Ö•ð÷Þ£•ZOZ.Ú
95 17 E7 3F 77 70 D7 7B 64 38 C7 FA 04 0B C4 BD •.ç?wp×{d8Çú..Ľ
71 8F 80 56 86 7B 6F F9 51 76 A0 63 7B 67 91 F4 q€V†{oùQv c{g‘ô
04 8D C3 38 5C 45 58 8D 82 07 80 63 01 00 13 F7 .•Ã8\EX‚.€c...÷
3B C3 B1 9D 6A 2D 25 0D 96 80 6D 1A 98 5F DF D1 ;ñ•j-%.-€m.˜_ßÑ
96 35 02 A2 5A B1 07 E1 28 87 CC D1 C0 5E 5E 9B -5.¢Z±.á(‡ÌÑÀ^^›
EE C6 CA 3D 81 AA 34 36 57 66 9B D1 76 0C 9B 5B îÆÊ=•ª46Wf›Ñv.›[
FD 48 CD 77 93 F5 15 4E 6B 15 49 F3 99 33 B1 22 ýHÍw“õ.Nk.Ió™3±"
PP 1A 15 8E 7B F7 E8 C0 6B 7B FE 5F 47 38 13 E7 FE ..Ž{÷èÀk{þ_G8.çþ
6A 93 47 84 36 10 5F 7E 85 40 00 15 3E BC 95 38 j“G„6._~…@..>¼•8
56 12 FF 90 5D D3 8B 3F 6D 86 1F EA B9 E4 1A 7F V.ÿ•]Ó‹?m†.ê¹ä.•
EA 6D 61 0A 71 0A 4A E4 F2 2B C6 35 A7 18 0C 2D êma.q.Jäò+Æ5§..-
6C A4 A6 FA A3 F8 FD 51 E8 CA 0C 9E D1 DA 70 E1 l¤¦ú£øýQèÊ.žÑÚpá
FC 1D BF C6 DB CB 29 BF 90 4F 07 40 BC C1 7D FB ü.¿ÆÛË)¿•O.@¼Á}û
82 16 D5 81 46 F6 4B 46 23 8B 85 5D 86 C6 CF 8F ‚.Õ•FöKF#‹…]†ÆÏ•
4E 8B 0B 0E DF EE 90 3C 82 01 F7 8E C7 8C 88 31 N‹..ßî•<‚.÷ŽÇŒˆ1
12 0E C4 D2 F6 CA E2 A2 39 ED FF A9 94 50 EE 4D ..ÄÒöÊâ¢9íÿ©”PîM
5C 95 B8 8B A4 A9 7A C3 2D 3A FD 62 69 88 B1 BE \•¸‹¤©zÃ-:ýbiˆ±¾
EE D3 A4 CB 16 E1 87 0D 88 74 F6 E0 F8 B7 B6 7C îÓ¤Ë.á‡.ˆtöàø·¶|
D7 35 B0 F7 96 1E 5A 22 18 1D D2 A6 2D 77 ×5°÷–.Z"..Ò¦-w
For validation purposes, this example considers the following values for the random key (KRAND) and
the private exponent (KPRV):
KRAND = FF 47 55 39 9A E4 28 93 44 D4 BB C0 7D 96 8B 5F
KPRV =
24 2B D2 9D BC 5A AA 16 19 3C 8F 3A E5 7B AC 54
46 82 91 9A 3F D3 D5 FF 59 20 7C AE 5E 13 DF E0
7E 27 15 B5 3F BB D9 FA BB 24 01 89 20 6D FE 8C
82 64 78 81 C3 8C 51 05 5C 76 C7 8F 1A 9C 92 A7
BC E7 AF 27 4C EE A9 06 76 7F 54 20 2A 54 D0 B2
77 80 0E D5 77 D8 DA 12 F1 0F F3 8B D7 1C 3B CB
BC 9F 18 0C 63 C0 25 32 79 58 03 72 9A 63 4E 9D
50 F9 3C 04 5E 1F DF 08 DD E6 8C FA 59 AD F3 99
62 5F 01 5E 0E 32 70 BB 2B 7F 27 D2 16 E8 AE 43
28 1C 2E 43 E4 A2 4E 77 34 05 86 94 C5 93 45 35
C2 4E FD 21 B2 CC 47 AE 93 82 7F C9 38 1B 6D 59
F3 50 B2 F3 53 43 71 AF A3 E4 0D 5C A3 1A C7 74
45 83 A3 86 1E 08 E4 42 36 34 B2 9D B2 C3 BA 14
D2 F3 7E 70 4F 1A AB E6 51 F2 5C 43 E0 DE 57 7F
B5 30 EF 17 AC B8 F1 5A A5 A9 0D 20 D8 35 DA 78
2C 5D 69 6A 44 DB F8 EB 21 3E B3 E3 46 3E 53 01
Command
Response
Examples
The SPE asks the pinpad to present a menu with the title “Selecione, por favor:” and the options:
“5.Chamado Técnico”
“1.Consultas”
“3.Ajuda”
“Voltar!!”
The timeout value is 30 seconds.
4D 4E 55 30 38 39 00 0C 00 01 1E 00 20 00 11 35 MNU089......∙..5
2E 43 68 61 6D 61 64 6F 20 54 E9 63 6E 69 63 6F .Chamado∙Técnico
00 20 00 0B 31 2E 43 6F 6E 73 75 6C 74 61 73 00 .∙..1.Consultas.
SPE 20 00 07 33 2E 41 6A 75 64 61 00 20 00 08 56 6F ∙..3.Ajuda.∙..Vo
6C 74 61 72 21 21 00 1B 00 15 53 65 6C 65 63 69 ltar!!....Seleci
6F 6E 65 2C 20 70 6F 72 20 66 61 76 6F 72 3A one,∙por∙favor:
Pinpad successfully returns the value “02”, indicating that the option “1.Consultas” has been
selected.
PP 4D 4E 55 30 30 30 30 30 36 80 4D 00 02 30 32 MNU000006€M..02
Command
Response
Examples
SPE requests removal of the card, displaying the message “OPERATION FINISHED”.
52 4D 43 30 33 32 20 20 20 20 4F 50 45 52 41 54 RMC032∙∙∙∙OPERAT
SPE 49 4F 4E 20 20 20 20 20 20 20 46 49 4E 49 53 48 ION∙∙∙∙∙∙∙FINISH
45 44 20 20 20 20 ED∙∙∙∙
Operation is successful.
PP 52 4D 43 30 30 30 RMC000
When a command in this section is not supported by the pinpad, it simply returns the response
error defined in section 2.3.4 (with RSP_STAT = “010”), as it does for any other unknown
command.
Command
Response
Examples
SPE requests the loading of a 3,334-byte PNG file named “QRCODE01”.
4D 4C 49 30 32 36 00 1E 00 08 51 52 43 4F 44 45 MLI026....QRCODE
SPE 30 31 00 1F 00 0A 00 00 0D 06 F2 11 01 00 00 00 01........ò.....
Operation is successful.
PP 4D 4C 49 30 30 30 MLI000
Command
Response
Examples
SPE starts loading data from the PNG file of the “MLI” command example (section 3.4.1). Note that
the command is divided into two blocks (CMD_BLK1 and CMD_BLK2), both with 436 bytes.
4D 4C 52 34 33 36 00 0F 01 B0 89 50 4E 47 0D 0A MLR436...°‰PNG..
1A 0A 00 00 00 0D 49 48 44 52 00 00 00 7D 00 00 ......IHDR...}..
00 7D 08 02 00 00 00 00 E2 FB 72 00 00 0A 37 69 .}......âûr...7i
43 43 50 73 52 47 42 20 49 45 43 36 31 39 36 36 CCPsRGB∙IEC61966
2D 32 2E 31 00 00 78 9C 9D 96 77 54 53 D9 16 87 ∙2.1..xœ•∙wTSÙ.‡
CF BD 37 BD 50 92 10 8A 94 D0 6B 68 52 02 48 0D Ͻ7½P’.Š”ÐkhR.H.
BD 48 91 2E 2A 31 09 10 4A C0 90 00 22 36 44 54 ½H‘.*1..JÀ•."6DT
70 44 51 91 A6 08 32 28 E0 80 A3 43 91 B1 22 8A pDQ‘¦.2(à€£C‘±"Š
85 01 51 B1 EB 04 19 44 D4 71 70 14 1B 96 49 64 ….Q±ë..DÔqp..∙Id
AD 19 DF BC 79 EF CD 9B DF 1F F7 7E 6B 9F BD CF .ß¼yïÍ›ß.÷~kŸ½Ï
DD 67 EF 7D D6 BA 00 90 FC 83 05 C2 4C 58 09 80 Ýgï}Öº.üƒ.ÂLX.€
0C A1 58 14 E1 E7 C5 88 8D 8B 67 60 07 01 0C F0 .¡X.áçň‹g`...ð
00 03 6C 00 E0 70 B3 B3 42 16 F8 46 02 99 02 7C ..l.àp³³B.øF.™.|
D8 8C 6C 99 13 F8 17 BD BA 0E 20 F9 FB 2A D3 3F ØŒl™.ø.½º.∙ùû*Ó?
8C C1 00 FF 9F 94 B9 59 22 31 00 50 98 8C E7 F2 ŒÁ.ÿŸ”¹Y"1.P˜Œçò
F8 D9 5C 19 17 C9 38 3D 57 9C 25 B7 4F C9 98 B6 øÙ\..É8=Wœ%·Oɘ¶
34 4D CE 30 4A CE 22 59 82 32 56 93 73 F2 2C 5B 4MÎ0JÎ"Y‚2V“sò,[
7C F6 99 65 0F 39 F3 32 84 3C 19 CB 73 CE E2 65 |ö™e.9ó2„<.ËsÎâe
F0 E4 DC 27 E3 8D 39 12 BE 8C 91 60 19 17 E7 08 ðäÜ'ã•9.¾Œ‘`..ç.
F8 B9 32 BE 26 63 83 74 49 86 40 C6 6F E4 B1 19 ø¹2¾&cƒtI†@Æoä±.
7C 4E 36 00 28 92 DC 2E E6 73 53 64 6C 2D 63 92 |N6.(’Ü.æsSdl∙c’
28 32 82 2D E3 79 00 E0 48 C9 5F F0 D2 2F 58 CC (2‚∙ãy.àHÉ_ðÒ/XÌ
CF 13 CB 0F C5 CE CC 5A 2E 12 24 A7 88 19 26 5C Ï.Ë.ÅÎÌZ..$§ˆ.&\
53 86 8D 93 13 8B E1 CF CF 4D E7 8B C5 CC 30 0E S†“.‹áÏÏMç‹ÅÌ0.
37 8D 23 E2 31 D8 99 19 59 1C E1 72 00 66 CF FC 7•#â1Ø™.Y.ár.fÏü
59 14 79 6D 19 B2 22 3B D8 38 39 38 30 6D 2D 6D Y.ym.²";Ø8980m∙m
BE 28 D4 7F 5D FC 9B 92 F7 76 96 5E 84 7F EE 19 ¾(Ô]ü›’÷v∙^„î.
44 1F F8 C3 F6 57 7E 99 0D 00 34 33 36 00 0F 01 D.øÃöW~™..436...
SPE B0 B0 A6 65 B5 D9 FA 87 6D 69 15 00 5D EB 01 50 °°¦eµÙú‡mi..]ë.P
BB FD 87 CD 60 2F 00 8A B2 BE 75 0E 7D 71 1E BA »ý‡Í`/.в¾u.}q.º
7C 5E 52 C4 E2 2C 67 2B AB DC DC 5C 4B 01 9F 6B |^RÄâ,g+«ÜÜ\K.Ÿk
29 2F E8 EF FA 9F 0E 7F 43 5F 7C CF 52 BE DD EF )/èïúŸ.•C_|ÏR¾Ýï
E5 61 78 F3 93 38 92 74 31 43 5E 37 6E 66 7A A6 åaxó“8’t1C^7nfz¦
44 C4 C8 CE E2 70 F9 0C E6 9F 87 F8 1F 07 FE 75 DÄÈÎâpù.柇ø..þu
1E 16 11 FC 24 BE 88 2F 94 45 44 CB A6 4C 20 4C ...ü$¾ˆ/”ED˦L∙L
96 B5 5B C8 13 88 05 99 42 86 40 F8 9F 9A F8 0F ∙µ[È.ˆ.™B†@øŸšø.
C3 FE A4 D9 B9 96 89 DA F8 11 D0 96 58 02 A5 21 Ãþ¤Ù¹∙‰Úø.Ð∙X.¥!
1A 40 7E 1E 00 28 2A 11 20 09 7B 64 2B D0 EF 7D .@~..(*.∙.{d+Ðï}
0B C6 47 03 F9 CD 8B D1 99 98 9D FB CF 82 FE 7D .ÆG.ù͋љ˜ûÏ‚þ}
57 B8 4C FE C8 16 24 7F 8E 63 47 44 32 B8 12 51 W¸LþÈ.$ŽcGD2¸.Q
CE EC 9A FC 5A 02 34 20 00 45 40 03 EA 40 1B E8 ÎìšüZ.4∙.E@.ê@.è
03 13 C0 04 B6 C0 11 B8 00 0F E0 03 02 41 28 88 ..À.¶À.¸..à..A(ˆ
04 71 60 31 E0 82 14 90 01 44 20 17 14 80 B5 A0 .q`1à‚.•.D∙..€µ
18 94 82 AD 60 27 A8 06 75 A0 11 34 83 36 70 18 .”‚`'¨.u .4ƒ6p.
74 81 63 E0 34 38 07 2E 81 CB 60 04 DC 01 52 30 t•cà48..•Ë`.Ü.R0
0E 9E 80 29 F0 0A CC 40 10 84 85 C8 10 15 52 87 .ž€)ð.Ì@.„…È..R‡
74 20 43 C8 1C B2 85 58 90 1B E4 03 05 43 11 50 t∙CÈ.²…X•.ä..C.P
1C 94 08 25 43 42 48 02 15 40 EB A0 52 A8 1C AA .”.%CBH..@ë R¨.ª
86 EA A1 66 E8 5B E8 28 74 1A BA 00 0D 43 B7 A0 †ê¡fè[è(t.º..C·
51 68 12 FA 15 7A 07 23 30 09 A6 C1 5A B0 11 6C Qh.ú.z.#0.¦ÁZ°.l
05 B3 60 4F 38 08 8E 84 17 C1 C9 F0 32 38 1F 2E .³`O8.Ž„.ÁÉð28..
82 B7 C0 95 70 03 7C 10 EE 84 4F C3 97 E0 11 58 ‚·À•p.|.î„OÃ∙à.X
0A 3F 81 A7 11 80 10 11 3A A2 8B 30 11 16 C2 46 .?•§.€..:¢‹0..ÂF
42 91 78 24 09 11 21 AB 90 12 A4 02 69 40 DA 90 B‘x$..!«•.¤.i@Ú•
1E A4 1F B9 8A 48 91 A7 C8 5B 14 06 45 45 31 50 .¤.¹ŠH‘§È[..EE1P
4C L
Operation is successful.
PP 4D 4C 52 30 30 30 MLR000
SPE continues to load the data, again dividing the command into two blocks (CMD_BLK1 and
CMD_BLK2), both with 436 bytes.
4D 4C 52 34 33 36 00 0F 01 B0 94 0B CA 1F 15 85 MLR436...°”.Ê..…
E2 A2 96 A1 56 A1 36 A3 AA 51 07 50 9D A8 3E D4 â¢∙¡V¡6£ªQ.P•¨>Ô
55 D4 28 6A 0A F5 11 4D 46 6B A2 CD D1 CE E8 00 UÔ(j.õ.MFk¢ÍÑÎè.
74 2C 3A 19 9D 8B 2E 46 57 A0 9B D0 1D E8 B3 E8 t,:.‹.FW ›Ð.è³è
11 F4 38 FA 15 06 83 A1 63 8C 31 8E 18 7F 4C 1C .ô8ú..ƒ¡cŒ1Ž.•L.
26 15 B3 02 B3 19 B3 1B D3 8E 39 85 19 C6 8C 61 &.³.³.³.ÓŽ9….ÆŒa
A6 B1 58 AC 3A D6 1C EB 8A 0D C5 72 B0 62 6C 31 ¦±X¬:Ö.ëŠ.År°bl1
B6 0A 7B 10 7B 12 7B 05 3B 8E 7D 83 23 E2 74 70 ¶.{.{.{.;Ž}ƒ#âtp
B6 38 5F 5C 3C 4E 88 2B C4 55 E0 5A 70 27 70 57 ¶8_\<Nˆ+ÄUàZp'pW
70 13 B8 19 BC 12 DE 10 EF 8C 0F C5 F3 F0 CB F1 p.¸.¼.Þ.ïŒ.ÅóðËñ
65 F8 46 7C 0F 7E 08 3F 8E 9F 21 28 13 8C 09 AE eøF|.~.?ŽŸ!(.Œ.®
84 48 42 2A 61 2D A1 92 D0 46 38 4B B8 4B 78 41 „HB*a∙¡’ÐF8K¸KxA
24 12 F5 88 4E C4 70 A2 80 B8 86 58 49 3C 44 3C $.õˆNÄp¢€¸†XI<D<
4F 1C 25 BE 25 51 48 66 24 36 29 81 24 21 6D 21 O.%¾%QHf$6)•$!m!
ED 27 9D 22 DD 22 BD 20 93 C9 46 64 0F 72 3C 59 í'•"Ý"½∙“ÉFd.r<Y
4C DE 42 6E 26 9F 21 DF 27 BF 51 A0 2A 58 2A 04 LÞBn&Ÿ!ß'¿Q *X*.
28 F0 14 56 2B D4 28 74 2A 5C 51 78 A6 88 57 34 (ð.V+Ô(t*\Qx¦ˆW4
54 F4 54 5C AC 98 AF 58 A1 78 44 71 48 F1 A9 12 TôT\¬˜¯X¡xDqHñ©.
5E C9 48 89 AD C4 51 5A A5 54 A3 74 54 E9 86 D2 ^ÉH‰ÄQZ¥T£tTé†Ò
B4 32 55 D9 46 39 54 39 43 79 B3 72 8B F2 05 E5 ´2UÙF9T9Cy³r‹ò.å
47 14 2C C5 88 E2 43 E1 51 8A 28 FB 28 67 28 63 G.,ňâCáQŠ(û(g(c
54 84 AA 4F 65 53 B9 D4 75 D4 46 EA 59 EA 38 0D T„ªOeS¹ÔuÔFêYê8.
43 33 A6 05 D0 52 69 A5 B4 6F 68 83 B4 29 15 8A C3¦.ÐRi¥´ohƒ´).Š
8A 9D 4A B4 4A 9E 4A 8D CA 71 15 29 1D A1 1B D1 Š•J´JžJ•Êq.).¡.Ñ
03 E8 E9 F4 32 FA 61 FA 75 FA 3B 55 2D 55 4F 55 .èéô2úaúuú;U∙UOU
BE EA 26 D5 36 D5 2B AA AF D5 E6 A8 79 A8 F1 D5 ¾ê&Õ6Õ+ª¯Õæ¨y¨ñÕ
4A D4 DA D5 46 D4 DE A9 33 D4 7D D4 D3 D4 B7 A9 JÔÚÕFÔÞ©3Ô}ÔÓÔ·©
77 A9 DF D3 40 69 98 69 84 6B 34 33 36 00 0F 01 w©ßÓ@i˜i„k436...
SPE B0 E4 6A EC D1 38 AB F1 74 0E 6D 8E CB 1C EE 9C °äjìÑ8«ñt.mŽË.îœ
92 39 87 E7 DC D6 84 35 CD 34 23 34 57 68 EE D3 ’9‡çÜÖ„5Í4#4WhîÓ
1C D0 9C D6 D2 D6 F2 D3 CA D2 AA D2 3A A3 F5 54 .МÖÒÖòÓÊÒªÒ:£õT
9B AE ED A1 9D AA BD 43 FB 84 F6 A4 0E 55 C7 4D ›®í¡•ª½Cû„ö¤.UÇM
47 A0 B3 43 E7 A4 CE 63 86 0A C3 93 91 CE A8 64 G ³Cç¤Îc†.Ó‘Ψd
F4 31 A6 74 35 75 FD 75 25 BA F5 BA 83 BA 33 7A ô1¦t5uýu%ºõºƒº3z
C6 7A 51 7A 85 7A ED 7A F7 F4 09 FA 2C FD 24 FD ÆzQz…zíz÷ô.ú,ý$ý
1D FA BD FA 53 06 3A 06 21 06 05 06 AD 06 B7 0D .ú½úS.:.!...-.·.
F1 86 2C C3 14 C3 5D 86 FD 86 AF 8D 8C 8D 62 8C ñ†,Ã.Ã]†ý†¯ŒbŒ
36 18 75 19 3D 32 56 33 0E 30 CE 37 6E 35 BE 6B 6.u.=2V3.0Î7n5¾k
42 36 71 37 59 66 D2 60 72 CD 14 63 CA 32 4D 33 B6q7YfÒ`rÍ.cÊ2M3
DD 6D 7A D9 0C 36 B3 37 4B 31 AB 31 1B 32 87 CD ÝmzÙ.6³7K1«1.2‡Í
1D CC 05 E6 BB CD 87 2D D0 16 4E 16 42 8B 06 8B .Ì.æ»Í‡∙Ð.N.B‹.‹
1B 4C 12 D3 93 99 C3 6C 65 8E 5A D2 2D 83 2D 0B .L.Ó“™ÃleŽZÒ∙ƒ∙.
2D BB 2C 9F 59 19 58 C5 5B 6D B3 EA B7 FA 68 6D ∙»,ŸY.XÅ[m³ê·úhm
6F 9D 6E DD 68 7D C7 86 62 13 68 53 68 D3 63 F3 o•nÝh}džb.hShÓcó
AB AD 99 2D D7 B6 C6 F6 DA 5C F2 5C DF B9 AB E7 «™∙×¶ÆöÚ\ò\ß¹«ç
76 CF 7D 6E 67 6E C7 B7 DB 63 77 D3 9E 6A 1F 62 vÏ}ngnÇ·ÛcwÓžj.b
BF C1 BE D7 FE 83 83 A3 83 C8 A1 CD 61 D2 D1 C0 ¿Á¾×þƒƒ£ƒÈ¡ÍaÒÑÀ
31 D1 B1 D6 F1 06 8B C6 0A 63 6D 66 9D 77 42 3B 1ѱÖñ.‹Æ.cmf•wB;
79 39 AD 76 3A E6 F4 D6 D9 C1 59 EC 7C D8 F9 17 y9-v:æôÖÙÁYì|Øù.
17 A6 4B 9A 4B 8B CB A3 79 C6 F3 F8 F3 1A E7 8D .¦KšK‹Ë£yÆóøó.ç•
B9 EA B9 72 5C EB 5D A5 6E 0C B7 44 B7 BD 6E 52 ¹ê¹r\ë]¥n.·D·½nR
77 5D 77 8E 7B 83 FB 03 0F 7D 0F 9E 47 93 C7 84 w]wŽ{ƒû..}.žG“Ç„
A7 A9 67 AA E7 41 CF 67 5E D6 5E 22 AF 0E AF D7 §©gªçAÏg^Ö^"¯.¯×
6C 67 F6 4A F6 29 6F C4 DB CF BB C4 7B D0 87 E2 lgöJö)oÄÛÏ»Ä{Їâ
13 E5 53 ED 73 DF 57 CF 37 D9 B7 D5 77 CA CF DE .åSísßWÏ7Ù·ÕwÊÏÞ
6F o
Operation is successful.
PP 4D 4C 52 30 30 30 MLR000
SPE continues to load the data, again dividing the command into two blocks (CMD_BLK1 and
CMD_BLK2), both with 436 bytes.
4D 4C 52 34 33 36 00 0F 01 B0 85 DF 29 7F B4 7F MLR436...°…ß)•´•
90 FF 36 FF 1B 01 5A 01 DC 80 E6 80 A9 40 C7 C0 •ÿ6ÿ..Z.܀怩@ÇÀ
95 81 7D 41 A4 A0 05 41 D5 41 0F 82 CD 82 45 C1 ••}A¤ .AÕA.‚Í‚EÁ
3D 21 70 48 60 C8 F6 90 BB F3 0D E7 0B E7 77 85 =!pH`Èö•»ó.ç.çw…
82 D0 80 D0 ED A1 F7 C2 8C C3 96 85 7D 1F 8E 09 ‚ЀÐí¡÷ÂŒÃ∙…}.Ž.
0F 0B AF 09 7F 18 61 13 51 10 D1 BF 80 BA 60 C9 ..¯..a.Q.Ñ¿€º`É
82 96 05 AF 22 BD 22 CB 22 EF 44 99 44 49 A2 7A ‚∙.¯"½"Ë"ïD™DI¢z
A3 15 A3 13 A2 9B A3 5F C7 78 C7 94 C7 48 63 AD £.£.¢›£_ÇxÇ”ÇHc
62 57 C6 5E 8A D3 88 13 C4 75 C7 63 E3 A3 E3 9B bWÆ^ŠÓˆ.ÄuÇcã£ã›
E2 A7 17 FA 2C DC B9 70 3C C1 3E A1 38 E1 FA 22 â§.ú,ܹp<Á>¡8áú"
E3 45 79 8B 2E 2C D6 58 9C BE F8 F8 12 C5 25 9C ãEy‹.,ÖXœ¾øø.Å%œ
25 47 12 D1 89 31 89 2D 89 EF 39 A1 9C 06 CE F4 %G.щ1‰∙‰ï9¡œ.Îô
D2 80 A5 B5 4B A7 B8 6C EE 2E EE 13 9E 07 6F 07 Ò€¥µK§¸lî.î.ž.o.
6F 92 EF CA 2F E7 4F 24 B9 26 95 27 3D 4A 76 4D o’ïÊ/çO$¹&•'=JvM
DE 9E 3C 99 E2 9E 52 91 F2 54 C0 16 54 0B 9E A7 Þž<™âžR‘òTÀ.T.ž§
FA A7 D6 A5 BE 4E 0B 4D DB 9F F6 29 3D 26 BD 3D ú§Ö¥¾N.MÛŸö)=&½=
03 97 91 98 71 54 48 11 A6 09 FB 32 B5 33 F3 32 .∙‘˜qTH.¦.û2µ3ó2
87 B3 CC B3 8A B3 A4 CB 9C 97 ED 5C 36 25 0A 12 ‡³Ì³Š³¤Ëœ∙í\6%..
35 65 43 D9 8B B2 BB C5 34 D9 CF D4 80 C4 44 B2 5eCÙ‹²»Å4ÙÏÔ€ÄD²
5E 32 9A E3 96 53 93 F3 26 37 3A F7 48 9E 72 9E ^2šã∙S“ó&7:÷Hžrž
30 6F 60 B9 D9 F2 4D CB 27 F2 7D F3 BF 5E 81 5A 0o`¹ÙòMË'ò}ó¿^•Z
C1 5D D1 5B A0 5B B0 B6 60 74 A5 E7 CA FA 55 D0 Á]Ñ[ [°¶`t¥çÊúUÐ
AA A5 AB 7A 57 EB AF 2E 5A 3D BE C6 6F CD 81 B5 ª¥«zWë¯.Z=¾ÆoÍ•µ
84 B5 69 6B 7F 28 B4 2E 2C 2F 7C B9 2E 66 5D 4F „µik•(´.,/|¹.f]O
91 56 D1 9A A2 B1 F5 7E EB 5B 8B 15 8A 45 C5 37 ‘VÑš¢±õ~ë[‹.ŠEÅ7
36 B8 6C A8 DB 88 DA 28 D8 38 B8 69 EE A6 AA 4D 6¸l¨ÛˆÚ(Ø8¸iM
1F 4B 78 25 17 4B AD 4B 2B 4A DF 6F E6 6E BE F8 .Kx%.K-K+Jßoæn¾ø
95 CD 57 95 5F 7D DA 92 B4 65 34 33 36 00 0F 01 •ÍW•_}Ú’´e436...
SPE B0 B0 CC A1 6C CF 56 CC 56 E1 D6 EB DB DC B7 1D °°Ì¡lÏVÌVáÖëÛÜ·.
28 57 2E CF 2F 1F DB 1E B2 BD 73 07 63 47 C9 8E (W.Ï/.Û.²½s.cGÉŽ
97 3B 97 EC BC 50 61 57 51 B7 8B B0 4B B2 4B 5A ∙;∙ì¼PaWQ·‹°K²KZ
19 5C D9 5D 65 50 B5 B5 EA 7D 75 4A F5 48 8D 57 .\Ù]ePµµê}uJõH•W
4D 7B AD 66 ED A6 DA D7 BB 79 BB AF EC F1 D8 D3 M{-fí¦Ú×»y»¯ìñØÓ
56 A7 55 57 5A F7 6E AF 60 EF CD 7A BF FA CE 06 V§UWZ÷n¯`ïÍz¿úÎ.
A3 86 8A 7D 98 7D 39 FB 1E 36 46 37 F6 7F CD FA £†Š}˜}9û.6F7ö•Íú
BA B9 49 A3 A9 B4 E9 C3 7E E1 7E E9 81 88 03 7D º¹I£©´éÃ~á~éˆ.}
CD 8E CD CD 2D 9A 2D 65 AD 70 AB A4 75 F2 60 C2 ÍŽÍÍ∙š∙ep«¤uò`Â
C1 CB DF 78 7F D3 DD C6 6C AB 6F A7 B7 97 1E 02 ÁËßxÓÝÆl«o§·∙..
87 24 87 1E 7F 9B F8 ED F5 C3 41 87 7B 8F B0 8E ‡$‡.›øíõÃA‡{°Ž
B4 7D 67 F8 5D 6D 07 B5 A3 A4 13 EA 5C DE 39 D5 ´}gø]m.µ£¤.ê\Þ9Õ
95 D2 25 ED 8E EB 1E 3E 1A 78 B4 B7 C7 A5 A7 E3 •Ò%íŽë.>.x´·Ç¥§ã
7B CB EF F7 1F D3 3D 56 73 5C E5 78 D9 09 C2 89 {Ëï÷.Ó=Vs\åxÙ.‰
A2 13 9F 4E E6 9F 9C 3E 95 75 EA E9 E9 E4 D3 63 ¢.ŸN柜>•uêééäÓc
BD 4B 7A EF 9C 89 3D 73 AD 2F BC 6F F0 6C D0 D9 ½Kz=s/¼oðlÐÙ
F3 E7 7C CF 9D E9 F7 EC 3F 79 DE F5 FC B1 0B CE óç|Ï•é÷ì?yÞõü±.Î
17 8E 5E 64 5D EC BA E4 70 A9 73 C0 7E A0 E3 07 .Ž^d]ìºäp©sÀ~ ã.
FB 1F 3A 06 1D 06 3B 87 1C 87 BA 2F 3B 5D EE 19 û.:...;‡.‡º/;]î.
9E 37 7C E2 8A FB 95 D3 57 BD AF 9E BB 16 70 ED ž7|âŠû•ÓW½¯ž».pí
D2 C8 FC 91 E1 EB 51 D7 6F DE 48 B8 21 BD C9 BB ÒÈü‘áëQ×oÞH¸!½É»
F9 E8 56 FA AD E7 B7 73 6E CF DC 59 73 17 7D B7 ùèVú-ç·snÏÜYs.}·
E4 9E D2 BD 8A FB 9A F7 1B 7E 34 FD B1 5D EA 20 äžÒ½Šûš÷.~4ý±]ê
3D 3E EA 3D 3A F0 60 C1 83 3B 63 DC B1 27 3F 65 =>ê=:ð`Áƒ;cܱ'?e
FF F4 7E BC E8 21 F9 61 C5 84 CE 44 F3 23 DB 47 ÿô~¼è!ùaÅ„ÎDó#ÛG
C7 26 7D 27 2F 3F 5E F8 78 FC 49 D6 93 99 A7 C5 Ç&}'/?^øxüIÖ“™§Å
3F 2B FF 5C FB CC E4 D9 77 BF 78 FC 32 30 15 3B ?+ÿ\ûÌäÙw¿xü20.;
35 5
Operation is successful.
PP 4D 4C 52 30 30 30 MLR000
SPE finishes loading the data, this time dividing the command into two blocks (CMD_BLK1 and
CMD_BLK2) of 436 and 314 bytes.
4D 4C 52 34 33 36 00 0F 01 B0 FE 5C F4 FC D3 AF MLR436...°þ\ôüÓ¯
9B 5F A8 BF D8 FF D2 EE 65 EF 74 D8 F4 FD 57 19 ›_¨¿ØÿÒîeïtØôýW.
AF 66 5E 97 BC 51 7F 73 E0 2D EB 6D FF BB 98 77 ¯f^•¼Qsà•ëmÿ»˜w
13 33 B9 EF B1 EF 2B 3F 98 7E E8 F9 18 F4 F1 EE .3¹ï±ï+?˜~èù.ôñî
A7 8C 4F 9F 7E 03 F7 84 F3 FB 8F 70 66 2A 00 00 §ŒOŸ~.÷„óû•pf*..
00 09 70 48 59 73 00 00 0B 12 00 00 0B 12 01 D2 ..pHYs.........Ò
DD 7E FC 00 00 02 75 49 44 41 54 78 9C ED 9D 41 Ý~ü...uIDATxœí•A
8E 83 30 0C 00 B7 12 FF FF 72 F7 EE 43 90 6B 27 Žƒ0..·.ÿÿr÷îC•k'
63 D0 CC 35 10 CA C8 92 95 E0 B8 D7 DF 29 BE DF cÐÌ5.ÊÈ’•à¸×ß)¾ß
6F D7 54 9F CF E7 E7 07 85 7B C3 C5 EB 99 1B B9 o×TŸÏçç.…{ÃÅë™.¹
CE 3C 46 02 7A 67 D0 3B 83 DE 19 A2 F7 63 D9 AF Î<F.zgÐ;ƒÞ.¢÷cÙ¯
C2 3A 19 36 3E 77 9F 0D E3 9D 41 EF 0C 7A 67 D0 Â:.6>wŸ.ã•Aï.zgÐ
3B C3 8D F7 54 8E 4A 65 A1 D4 BA B1 71 B4 42 A3 ;Õ÷TŽJe¡Ôº±q´B£
0D E3 9D 41 EF 0C 7A 67 D0 3B C3 50 EF A9 ED D9 .ã•Aï.zgÐ;ÃPï©íÙ
D4 68 63 9A AD 30 D4 FB EB D1 3B 83 DE 19 F4 CE Ôhcš0ÔûëÑ;ƒÞ.ôÎ
30 D4 7B 2A 19 EE BB 78 1F 43 BD BF 1E BD 33 E8 0Ô{*.î»x.C½¿.½3è
9D 41 EF 0C 37 DE 87 AC EE 02 95 DA A3 CA 1B 35 •Aï.7Þ‡¬î.•Ú£Ê.5
DA 30 DE 19 F4 CE A0 77 06 BD 33 44 EF C7 0A 62 Ú0Þ.ôÎ w.½3DïÇ.b
8F 51 F9 FA BA CF 86 F1 CE A0 77 06 BD 33 E8 9D •QùúºÏ†ñÎ w.½3è•
E1 1A B2 22 A5 4A 91 02 C7 6C 18 EF 0C 7A 67 D0 á.²"¥J‘.Çl.ï.zgÐ
3B 83 DE 19 AE 63 E7 39 C3 CC D4 27 D3 63 0B 54 ;ƒÞ.®cç9ÃÌÔ'Óc.T
EB 81 27 A2 77 06 BD 33 E8 9D E1 66 1F 78 DF 01 ë•'¢w.½3è•áf.xß.
97 F5 C5 C7 DA 35 EC 5B 27 AF EF 35 DE 19 F4 CE ••õÅÇÚ5ì['¯ï5Þ.ô
A0 77 06 BD 33 74 9E 5F 6D BC 77 4D A5 2F 44 65 Î w.½3tž_m¼wM¥/D
SPE BD DA 38 B3 F1 CE A0 77 06 BD 33 E8 9D 21 57 0F e½Ú8³ñÎ w.½3è•!W
5C 69 8C D0 98 B2 F6 ED 5D 37 AE 57 D7 53 19 EF .\iŒÐ˜²öí]7®W×S.
0C 7A 67 D0 3B 83 DE 19 62 DD 52 2A 29 55 52 65 ï.zgÐ;ƒÞ.bÝR*)UR
A0 92 B2 1A A7 AA B4 98 48 BD 33 31 34 00 0F 01 e ’².§ª´˜H½314..
36 AF F1 CE A0 77 06 BD 33 E8 9D 21 57 B7 44 75 .6¯ñÎ w.½3è•!W·D
0C 6C 3C A1 5A F9 AE DB 38 6A BC 33 E8 9D 41 EF u.l<¡Zù®Û8j¼3è•A
0C 7A 67 E8 F4 DE B8 40 4D 8D 56 FA EE 1F 3B CE ï.zgèôÞ¸@M•Vúî.;
EA 3E F0 08 F4 CE A0 77 06 BD 33 E4 BC 0F 29 09 Îê>ð.ôÎ w.½3ä¼.)
DA D7 51 69 4D E5 67 98 57 47 A0 77 06 BD 33 E8 .Ú×QiMåg˜WG w.½3
9D 21 E7 7D C8 E1 CF F5 C5 33 0F E5 B8 0F 3C 02 è•!ç}ÈáÏõÅ3.å¸.<
BD 33 E8 9D 41 EF 0C 37 FD 96 1A CB 89 02 8D 55 .½3è•Aï.7ý•.ˉ.•
BB A9 D1 C6 23 A9 95 57 30 DE 19 F4 CE A0 77 06 U»©ÑÆ#©•W0Þ.ôÎ w
BD 33 C4 BA A5 7D 54 FA 2D A5 66 AE D0 58 89 B5 .½3ĺ¥}Tú•¥f®ÐX‰
7E 05 E3 9D 41 EF 0C 7A 67 D0 3B 43 F4 7E EC 5F µ~.ã•Aï.zgÐ;Cô~ì
C0 1B 8F 86 1E 9B B9 72 AF DF 57 47 A0 77 06 BD _À.†.›¹r¯ßWG w.
33 E8 9D A1 B3 DF 52 63 4E 1E D2 8F 22 85 E7 57 ½3è•¡³ßRcN.Ò•"…ç
1F 80 DE 19 F4 CE A0 77 86 29 DE 1B EB 81 D7 F7 W.€Þ.ôÎ w†)Þ.ë•×
A6 9E 9B 9A D9 BC FA 00 F4 CE A0 77 06 BD 33 3C ÷¦ž›šÙ¼ú.ôÎ w.½3
D2 FB B1 3F DD B1 8F E1 DB D0 3B 83 DE 19 F4 CE <Òû±?ݱ•áÛÐ;ƒÞ.ô
90 EB 0F DC C8 BE 92 A0 CA D7 D7 7D 7D F7 03 C6 Εë.ÜȾ’ Ê××}}÷.
3B 83 DE 19 F4 CE A0 77 86 9B FF 89 DB 47 63 8E Æ;ƒÞ.ôÎ w†›ÿ‰ÛGc
AA 9C 23 4D 4D B5 C6 7D E0 07 A0 77 06 BD 33 E8 Žªœ#MMµÆ}à. w.½3
9D E1 1F AC 1F 66 FE AE F3 F7 6D 00 00 00 00 49 è•á.¬.fþ®ó÷m....
45 4E 44 AE 42 60 82 IEND®B`‚
Operation is successful.
PP 4D 4C 52 30 30 30 MLR000
Command
Response
Examples
SPE indicates the completion of the media file loading.
SPE 4D 4C 45 MLE
Operation is successful.
PP 4D 4C 45 30 30 30 MLE000
Command
Response
Examples
SPE requests the list of media files loaded on the pinpad.
SPE 4C 4D 46 LMF
Command
Response
Examples
SPE requests deletion of two media files on the pinpad.
44 4D 46 30 32 34 00 1E 00 08 54 45 53 54 45 43 DMF024....TESTEC
SPE 48 4F 00 1E 00 08 4D 4F 56 4E 50 49 43 54 HO....MOVNPICT
Operation is successful.
PP 44 4D 46 30 30 30 DMF000
Pinpads are not required to support all media file formats provided for by this specification.
The SPE must obtain the information of the supported formats through the command “GIX”
(parameter PP_MFSUP).
Command
Response
Examples
SPE requests the presentation of the media file named “QRCODE01”.
44 53 49 30 31 32 00 1E 00 08 51 52 43 4F 44 45 DSI012....QRCODE
SPE 30 31 01
Operation is successful.
PP 44 53 49 30 30 30 DSI000
This command is obsolete, the SPE shall use “GIX” with PP_TABVERnn
instead.
mand
Response
Examples
SPE requests the version of the EMV Tables of the Acquirer Network index “02”.
SPE 47 54 53 30 30 32 30 32 GTS00202
Command
Response
Examples
SPE requests the complete load of tables (all Acquirer Networks), informing the new version of EMV
Tables (“TABVER0008”).
54 4C 49 30 31 32 30 30 54 41 42 56 45 52 30 30 TLI01200TABVER00
SPE 30 38 08
Pinpad starts the process successfully, stating that the version provided differs from the current
version.
PP 54 4C 49 30 32 30 TLI020
Command
Response
Examples
SPE sends AID Table records “01” and “02” of Acquirer Network “03”.
54 4C 52 36 33 30 30 32 33 31 34 31 30 33 30 31 TLR6300231410301
30 37 41 30 30 30 30 30 30 30 30 34 31 30 31 30 07A0000000041010
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
30 30 30 31 43 54 4C 45 53 53 2D 2D 43 52 45 44 0001CTLESS--CRED
49 54 4F 20 30 33 30 30 30 31 30 30 30 32 30 30 ITO∙030001000200
30 31 30 37 36 38 34 30 32 30 32 30 35 30 33 30 0107684020205030
30 30 30 30 30 30 30 34 30 30 30 30 30 30 30 30 0000000400000000
30 30 30 30 45 30 46 38 45 38 37 30 30 30 46 30 0000E0F8E87000F0
46 30 30 31 32 32 32 30 35 30 30 34 41 30 30 30 F00122205004A000
44 38 30 30 45 38 30 30 30 30 32 30 35 30 30 34 D800E80000205004
46 38 30 30 30 30 30 30 30 30 30 30 52 30 34 30 F80000000000R040
30 30 30 31 33 38 37 30 30 30 30 30 35 44 42 30 0001387000005DB0
30 30 30 30 39 43 33 31 32 33 34 30 39 46 30 32 00009C3123409F02
30 36 35 46 32 41 30 32 39 41 30 33 39 43 30 31 065F2A029A039C01
39 35 30 35 39 46 33 37 30 34 30 30 30 30 30 30 95059F3704000000
30 30 30 30 39 46 33 37 30 34 30 30 30 30 30 30 00009F3704000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 59 31 5A 31 000000000000Y1Z1
59 33 5A 33 46 30 30 30 30 34 38 30 30 30 30 30 Y3Z3F00004800000
30 30 30 30 30 30 30 30 46 30 30 30 30 34 38 30 00000000F0000480
SPE 30 30 33 31 34 31 30 33 30 32 30 37 41 30 30 30 003141030207A000
30 30 30 30 30 34 33 30 36 30 30 30 30 30 30 30 0000043060000000
30 30 30 30 30 30 30 30 30 30 30 30 30 32 43 54 00000000000002CT
4C 45 53 53 2D 2D 44 45 42 49 54 4F 20 20 30 33 LESS--DEBITO∙∙03
30 30 30 31 30 30 30 32 30 30 30 31 30 37 36 38 0001000200010768
34 30 32 30 32 30 35 30 33 30 30 30 30 30 30 30 4020205030000000
30 34 30 30 30 30 30 30 30 30 30 30 30 30 45 30 04000000000000E0
46 38 45 38 37 30 30 30 46 30 46 30 30 31 32 32 F8E87000F0F00122
32 30 35 30 30 34 41 30 30 30 44 38 30 30 45 38 205004A000D800E8
30 30 30 30 32 30 35 30 30 34 46 38 30 30 30 30 0000205004F80000
30 30 30 30 30 30 52 30 34 30 30 30 30 31 33 38 000000R040000138
37 30 30 30 30 30 35 44 42 30 30 30 30 30 39 43 7000005DB000009C
33 31 32 33 34 30 39 46 30 32 30 36 35 46 32 41 3123409F02065F2A
30 32 39 41 30 33 39 43 30 31 39 35 30 35 39 46 029A039C0195059F
33 37 30 34 30 30 30 30 30 30 30 30 30 30 39 46 370400000000009F
33 37 30 34 30 30 30 30 30 30 30 30 30 30 30 30 3704000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
30 30 30 30 30 30 59 31 5A 31 59 33 5A 33 46 30 000000Y1Z1Y3Z3F0
30 30 30 34 38 30 30 30 30 30 30 30 30 30 30 30 0004800000000000
30 30 46 30 30 30 30 34 38 30 30 30 00F000048000
PP 54 4C 52 30 30 30 TLR000
SPE sends CAPK Table record “13” of Acquirer Network “02” followed by Certification Revocation
Table records “01”, “02” and “03” of Acquirer Network “01”.
54 4C 52 36 39 31 30 34 36 31 31 32 30 32 31 33 TLR6910461120313
41 30 30 30 30 30 30 30 30 34 45 46 30 30 31 30 A000000004EF0010
33 30 30 30 30 32 34 38 41 31 39 31 43 42 38 37 30000248A191CB87
34 37 33 46 32 39 33 34 39 42 35 44 36 30 41 38 473F29349B5D60A8
38 42 33 45 41 45 45 30 39 37 33 41 41 36 46 31 8B3EAEE0973AA6F1
41 30 38 32 46 33 35 38 44 38 34 39 46 44 44 46 A082F358D849FDDF
46 39 43 30 39 31 46 38 39 39 45 44 41 39 37 39 F9C091F899EDA979
32 43 41 46 30 39 45 46 32 38 46 35 44 32 32 34 2CAF09EF28F5D224
30 34 42 38 38 41 32 32 39 33 45 45 42 42 43 31 04B88A2293EEBBC1
39 34 39 43 34 33 42 45 41 34 44 36 30 43 46 44 949C43BEA4D60CFD
38 37 39 41 31 35 33 39 35 34 34 45 30 39 45 30 879A1539544E09E0
46 30 39 46 36 30 46 30 36 35 42 32 42 46 32 41 F09F60F065B2BF2A
31 33 45 43 43 37 30 35 46 33 44 34 36 38 42 39 13ECC705F3D468B9
44 33 33 41 45 37 37 41 44 39 44 33 46 31 39 43 D33AE77AD9D3F19C
41 34 30 46 32 33 44 43 46 35 45 42 37 43 30 34 A40F23DCF5EB7C04
44 43 38 46 36 39 45 42 41 35 36 35 42 31 45 42 DC8F69EBA565B1EB
43 42 34 36 38 36 43 44 32 37 34 37 38 35 35 33 CB4686CD27478553
30 46 46 36 46 36 45 39 45 45 34 33 41 41 34 33 0FF6F6E9EE43AA43
46 44 42 30 32 43 45 30 30 44 41 45 43 31 35 43 FDB02CE00DAEC15C
37 42 38 46 44 36 41 39 42 33 39 34 42 41 42 41 7B8FD6A9B394BABA
34 31 39 44 33 46 36 44 43 38 35 45 31 36 35 36 419D3F6DC85E1656
39 42 45 38 45 37 36 39 38 39 36 38 38 45 46 45 9BE8E76989688EFE
SPE 41 32 44 46 32 32 46 46 37 44 33 35 43 30 34 33 A2DF22FF7D35C043
33 33 38 44 45 41 41 39 38 32 41 30 32 42 38 36 338DEAA982A02B86
36 44 45 35 33 32 38 35 31 39 45 42 42 43 44 36 6DE5328519EBBCD6
46 30 33 43 44 44 36 38 36 36 37 33 38 34 37 46 F03CDD686673847F
38 34 44 42 36 35 31 41 42 38 36 43 32 38 43 46 84DB651AB86C28CF
31 34 36 32 35 36 32 43 35 37 37 42 38 35 33 35 1462562C577B8535
36 34 41 32 39 30 43 38 35 35 36 44 38 31 38 35 64A290C8556D8185
33 31 32 36 38 44 32 35 43 43 39 38 41 34 43 43 31268D25CC98A4CC
36 41 30 42 44 46 46 46 44 41 32 44 43 43 41 33 6A0BDFFFDA2DCCA3
41 39 34 43 39 39 38 35 35 39 45 33 30 37 46 44 A94C998559E307FD
44 46 39 31 35 30 30 36 44 39 41 39 38 37 42 30 DF915006D9A987B0
37 44 44 41 45 42 33 42 31 32 31 37 36 36 45 42 7DDAEB3B121766EB
42 30 45 45 31 32 32 41 46 42 36 35 44 37 38 34 B0EE122AFB65D784
35 42 37 33 44 42 34 36 42 41 42 36 35 34 32 37 5B73DB46BAB65427
41 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 A000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 32 36 33 30 0000000000002630
31 30 31 41 30 30 30 30 30 30 30 30 33 30 31 34 301A000000003014
34 34 34 34 34 30 32 36 33 30 31 30 32 41 30 30 4444402630302A00
30 30 30 30 30 30 33 39 37 35 35 35 35 35 35 30 0000003975555550
32 36 33 30 31 30 33 41 30 30 30 30 30 30 30 30 2630303A00000000
33 39 34 36 36 36 36 36 36 394666666
PP 54 4C 52 30 30 30 TLR000
Command
Response
Examples
SPE requests the completion of the table loading process.
SPE 54 4C 45 TLE
PP 54 4C 45 30 30 30 TLE000
All commands described in this section are obsolete. For these functionalities, the SPE must
use commands described in section 3.7.
Command
Response
If the pinpad is in “Encrypted PAN” mode (see section 5.3), GCR_PAN and the PANs in the
tracks are encrypted by the WKPAN key.
If the pinpad is in “Encrypted PAN” mode, GCR_TRK3LEN is not filled, as Track 2 can reach up
to 40 characters (see explanation in section 5.3).
** In this case its format change from “N3” to “A3”!!
Note #1
The processing of EMV cards requires knowledge of the supported AIDs, which are provided in the
AID Tables (see section 4.1.1), and different Acquirers can support the processing of the same AIDs.
Thus, when using option GCR_ACQIDXREQ = "00", the SPE must ensure that the combined set of
loaded AID Tables does not have conflicting AID records. The pinpad does not do any treatment to
solve this type of conflict and, if this restriction is not observed by the SPE, pinpad behavior will be
unpredictable.
Note #2
An SPE that supports CTLS shall call “GCR” initially allowing this interface using GCR_CTLSON = “1” (or
omitting this parameter). However, the SPE shall disable this interface with GCR_CTLSON = "0" and
resubmit the command in the following cases:
• When the command returns ST_CTLSPROBLEMS, ST_CTLSAPPNAV, ST_CTLSAPPNAUT,
ST_CTLSINVALIDAT or ST_CTLSIFCHG; or
• When the command returns ST_CTLSCOMMERR for the second consecutive time.
Note #3
If “GCX” returns ST_CTLSEXTCVM, the SPE shall present a message to the cardholder requesting an
action on his device (ex: “FOLLOW INSTRUCTIONS ON THE PHONE”) and call the command again.
The following diagram illustrates this process:
Start
“GCR”
SPE shows error GCR_CTLSON = “1”
ST_CTLSPROBLEMS, ST_CTLSAPPNAV,
ST_CTLSAPPNAUT, ST_CTLSINVALIDAT,
ST_CTLSIFCHG or
ST_CTLSCOMMERR (2nd consecutive time)
RSP_STAT?
ST_CTLSMULTIPLE or
ST_CTLSCOMMERR (1st time) ST_???
SPE shows error
Request
action on the
cardholder's RSP_STAT?
device ST_CTLSEXTCVM
ST_???
“GCR”
GCR_CTLSON = “0”
Continue...
Examples
The SPE requests a card providing a list of three indexes from the network “02” (the CTLS interface
is activated, as GCR_CTLSON is not provided).
47 43 52 30 35 32 30 30 30 30 30 30 30 30 30 30 GCR0520000000000
30 30 31 30 30 30 31 33 31 32 30 37 31 30 32 33 0010001312071023
SPE 35 35 38 37 36 35 32 33 34 35 36 38 30 33 30 32 5587652345680302
31 34 30 32 32 32 30 32 31 37 1402220217
Pinpad notifies the SPE about the application selected on the card.
4E 54 4D 30 30 30 30 33 32 53 45 4C 45 43 49 4F NTM000032SELECIO
PP 4E 41 44 4F 3A 20 20 20 20 43 52 45 44 49 54 4F NADO:∙∙∙∙CREDITO
20 20 20 20 20 20 20 20 20 ∙∙∙∙∙∙∙∙∙
SPE requests a card considering all the Acquirers and all table records, amount $ 28.37, enabling
CTLS.
47 43 52 30 34 31 30 30 39 39 30 30 30 30 30 30 GCR0410099000000
SPE 30 30 32 38 33 37 31 34 30 37 32 34 31 31 33 39 0028371407241139
32 32 54 41 42 56 45 52 30 39 31 38 30 30 30 22TABVER0918000
A magnetic card is swiped, its data returns successfully, and there is also the indication of an error
allowing fallback in a previous chip card processing.
47 43 52 30 30 30 33 35 32 30 30 31 30 30 30 30 GCR0003520010000
30 30 37 36 42 34 34 34 34 33 33 33 33 32 32 32 0076B44443333222
32 31 31 31 31 5E 54 4F 4D 20 53 41 57 59 45 52 21111^TOM∙SAWYER
5E 31 36 30 38 31 30 31 38 31 32 37 33 36 35 34 ^160810181273654
37 36 31 35 32 33 36 34 35 31 37 38 36 32 33 35 7615236451786235
34 38 37 36 31 32 33 37 36 34 35 37 36 31 32 33 4876123764576123
33 37 34 34 34 34 33 33 33 33 32 32 32 32 31 31 3744443333222211
31 31 3D 31 36 30 38 31 30 31 38 31 32 37 33 36 11=1608101812736
35 34 37 36 31 35 34 30 39 30 34 34 34 34 33 33 5476154090444433
33 33 32 32 32 32 31 31 31 31 3D 3D 31 36 30 38 3322221111==1608
31 30 31 38 31 32 37 33 36 35 34 37 36 31 35 32 1018127365476152
PP 33 36 34 35 31 37 38 36 32 33 35 34 38 37 36 31 3645178623548761
32 33 37 36 34 35 37 36 31 32 33 3D 38 33 37 34 23764576123=8374
38 32 37 34 37 38 37 32 33 36 38 34 30 30 30 30 8274787236840000
31 39 39 31 20 20 20 20 20 20 20 20 20 20 20 20 1991∙∙∙∙∙∙∙∙∙∙∙∙
20 20 30 30 20 20 20 20 20 20 20 20 20 20 20 20 ∙∙00∙∙∙∙∙∙∙∙∙∙∙∙
20 20 20 20 20 20 20 30 30 20 20 20 20 20 20 20 ∙∙∙∙∙∙∙00∙∙∙∙∙∙∙
20 20 20 20 20 20 20 20 20 30 30 30 20 20 20 20 ∙∙∙∙∙∙∙∙∙000∙∙∙∙
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙
20 20 20 20 20 20 30 30 30 30 30 30 30 30 30 30 ∙∙∙∙∙∙0000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
30 30 30 30 30 30 30 30 30 000000000
This command can only be used after the successful execution of the “GCR” command, in the
specific case of GCR_CARDTYPE = “03” (ICC EMV).
Command
Response
Examples
SPE provides the values of the following EMV parameters for use in the processing:
→ Terminal Capabilities (tag 9F33h) = E0D0C8h
→ Transaction Currency Code (tag 5F2Ah) = 0840h
→ Issuer proprietary data (tag DF04h) = 169937823Fh
43 4E 47 30 34 30 31 39 39 46 33 33 30 33 45 30 CNG040199F3303E0
SPE 44 30 43 38 35 46 32 41 30 32 30 38 34 30 44 46 D0C85F2A020840DF
30 34 30 35 31 36 39 39 33 37 38 32 33 46 0405169937823F
PP 43 4E 47 30 30 30 CNG000
Command
Response
Examples
SPE requests the transaction continuation, changing the amount to $ 12.00, providing parameters
for possible online PIN capture and EMV risk management parameters.
47 4F 43 30 38 36 30 30 30 30 30 30 30 30 31 32 GOC0860000000012
30 30 30 30 30 30 30 30 30 30 30 32 30 30 30 30 0000000000020000
31 33 30 31 30 30 30 30 30 30 30 30 30 30 30 30 1301000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
SPE 30 30 30 30 31 30 30 30 30 31 33 38 38 32 30 30 0000100001388200
30 30 30 30 33 45 38 38 30 30 30 30 30 32 35 30 00003E8800000250
31 31 38 32 39 46 32 37 39 46 32 36 39 46 33 36 11829F279F269F36
39 35 38 46 39 46 33 37 30 30 33 30 30 30 958F9F37003000
Operation is successful, with offline PIN capture, and the card asks for online authorization.
47 4F 43 30 30 30 31 33 30 32 30 31 30 30 30 30 GOC0001302010000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
30 30 30 30 34 31 38 32 30 32 35 38 30 30 39 46 000041820258009F
PP 32 37 30 31 38 30 39 46 32 36 30 38 37 36 35 44 2701809F2608765D
43 31 33 38 30 37 44 31 45 34 43 38 39 46 33 36 C13807D1E4C89F36
30 32 30 30 30 36 39 35 30 35 30 30 31 30 30 30 0200069505001000
30 30 30 30 38 46 30 31 30 35 39 46 33 37 30 34 00008F01059F3704
35 41 37 37 41 43 46 30 30 30 30 5A77ACF0000
Command
Response
Examples
The SPE requests the EMV transaction completion. The Acquirer Network approves the transaction,
also returning the Issuer Authentication Data (tag 91h).
46 4E 43 30 33 30 30 30 30 30 30 31 30 39 31 30 FNC0300000010910
38 45 36 34 41 32 46 45 32 31 46 44 38 38 36 37 8E64A2FE21FD8867
SPE 32 30 30 30 30 32 35 30 31 31 38 32 39 46 32 37 2000025011829F27
39 46 32 36 39 46 33 36 39 35 38 46 39 46 33 37 9F269F36958F9F37
Operation is successful, but the card declines the transaction at the end (the SPE must undo the
transaction with Acquirer Network).
46 4E 43 30 30 30 30 39 31 31 30 34 31 38 32 30 FNC0000911041820
32 35 38 30 30 39 46 32 37 30 31 30 30 39 46 32 258009F2701009F2
36 30 38 36 39 45 42 41 33 42 45 31 43 43 38 42 60869EBA3BE1CC8B
PP 33 38 44 39 46 33 36 30 32 30 30 30 36 39 35 30 38D9F36020006950
35 30 30 31 30 30 30 30 30 30 30 38 46 30 31 30 500100000008F010
35 39 46 33 37 30 34 35 41 37 37 41 43 46 30 30 59F37045A77ACF00
30 30 30 30 0000
Start
“GCR”
(no parameters)
“CNG”
Process as
magnetic card...
“GOC”
(offline declined) “1”
(offline approved) “0” “2” (online authorization)
GOC_DECISION?
End
“FNC” transaction “FNC”
Commands presented in this section are very flexible and their form of use depends deeply on
the specifications of the Acquirer Network payment systems.
Command
Response
If a magnetic card has been swiped (PP_CARDTYPE = “00”) but no track could be successfully
read, RSP_STAT = ST_OK and the PP_TRK1INC, PP_TRK2INC and PP_TRK3INC fields will not
be returned.
Note #1
A SPE that supports CTLS must call “GCX” initially allowing this interface using SPE_GCXOPT =
“1xxxx”. However, the SPE must disable this interface using SPE_GCXOPT = “0xxxx” (or omitting this
parameter) and resubmit the command in the following cases:
• When the command returns ST_CTLSPROBLEMS, ST_CTLSAPPNAV, ST_CTLSAPPNAUT,
ST_CTLSINVALIDAT or ST_CTLSIFCHG; or
• When the command returns ST_CTLSCOMMERR for the second consecutive time.
Note #2
If “GCX” returns ST_CTLSEXTCVM, the SPE must present a message to the cardholder requesting an
action on his device (ex: “FOLLOW INSTRUCTIONS ON THE PHONE”) and call the command again.
The following diagram illustrates this process:
Start
“GCX”
SPE shows error SPE_GCXOPT = “1xxxx”
ST_CTLSPROBLEMS, ST_CTLSAPPNAV,
ST_CTLSAPPNAUT, ST_CTLSINVALIDAT,
ST_CTLSIFCHG or
ST_CTLSCOMMERR (2nd consecutive time)
RSP_STAT?
ST_CTLSMULTIPLE or
ST_CTLSCOMMERR (1st time) ST_???
SPE shows error
Request
action on the
cardholder’s RSP_STAT?
device ST_CTLSEXTCVM
ST_???
“GCX”
SPE_GCXOPT = “0xxxx”
Continue...
Examples
SPE starts processing a transaction with the following characteristics:
▪ Amount $483.00, without cashback;
▪ Magnetic card or ICC only (CTLS not allowed);
▪ Use all records in the AID Table of Acquirer Network “08”;
▪ Force the E0F8C8h value for Terminal Capabilities (tag 9F33h); and
▪ Request the following EMV data objects if they exist in the card: Issuer Country Code (tag 5F28h)
and Application Expiration Date (tag 5F24h).
47 43 58 30 36 39 00 17 00 05 30 30 30 30 30 00 GCX069....00000.
10 00 02 30 38 00 13 00 0C 30 30 30 30 30 30 30 ...08....0000000
SPE 34 38 33 30 30 00 15 00 06 31 33 30 39 30 31 00 48300....130901.
16 00 06 32 30 31 38 34 37 00 05 00 06 9F 33 03 ...201847....Ÿ3.
E0 F8 C8 00 04 00 04 5F 28 5F 24 àøÈ...._(_$
Pinpad successfully processes a CTLS, however it informs that the transaction can be processed by
two different Acquirer Networks in the SPE.
47 43 58 30 30 30 30 39 36 80 42 00 19 35 30 30 GCX000096€B..500
39 38 32 33 37 32 33 34 32 33 38 30 30 32 3D 31 98237234238002=1
37 30 31 36 30 30 80 4F 00 02 30 36 80 51 00 0C 701600€O..06€Q..
PP 30 32 30 35 30 33 32 35 30 34 30 33 80 52 00 11 020503250403€R..
35 30 30 39 38 32 33 37 32 33 34 32 33 38 30 30 5009823723423800
32 80 53 00 02 30 30 80 5B 00 07 50 41 59 50 41 2€S..00€[..PAYPA
53 53 80 5C 00 03 38 34 30 SS€\..840
Command
Response
Examples
SPE requests the following EMV objects if they exist on the card: Application Usage Control (tag
9F07h), Application Version Number (tag 9F08h), ADF Name (4Fh) and a proprietary object of tag
DF55h.
47 45 44 30 31 31 00 04 00 07 9F 07 9F 08 4F DF GED011....Ÿ.Ÿ.Oß
SPE 55 U
Pinpad returns the requested objects except for the Application Version Number (tag 9F08h), as it
is unknown in this processing.
47 45 44 30 30 30 30 32 39 80 54 00 19 9F 07 02 GED000029€T..Ÿ..
PP FF 00 4F 07 A0 00 00 00 03 10 10 DF 55 08 11 22 ÿ.O. ......ßU..”
33 44 55 66 77 88 3DUfwˆ
Command
Response
Examples
SPE requests the continuation of an ICC EMV processing with the following characteristics:
▪ Use EMV Tables of Acquirer Network “08”;
▪ Transaction amount $234.50, with a $100.00 cashback;
▪ If an online PIN is required, use DUKPT:TDES slot “07”;
▪ Perform Terminal Risk Management with: Floor Limit = $100.00; Target Percentage to be used for
Biased Random Selection = 20%; Threshold Value for Biased Random Selection = $25.00; Maximum
Target Percentage to be used for Biased Random Selection = 80%;
▪ No optional EMV parameters; and
▪ Request the following EMV data objects if they exist: TVR (tag 95h), Application Cryptogram (tag
9F26h), Cryptogram Information Data (tag 9F27h), Issuer Application Data (tag 9F10h), CVM
Results (tag 9F34h) and ATC (tag 9F36h).
47 4F 58 31 31 36 00 13 00 0C 30 30 30 30 30 30 GOX116....000000
30 32 33 34 35 30 00 14 00 0C 30 30 30 30 30 30 023450....000000
30 31 30 30 30 30 00 02 00 01 33 00 09 00 02 30 010000....3....0
37 00 1B 00 22 43 52 C9 44 49 54 4F 0D 52 24 20 7...”CRÉDITO.R$∙
SPE 32 33 34 2C 35 30 0D 44 49 47 49 54 45 20 53 55 234,50.DIGITE∙SU
41 20 53 45 4E 48 41 00 1A 00 0A 00 00 27 10 14 A∙SENHA......’..
00 00 00 19 50 00 04 00 0B 95 9F 26 9F 27 9F 10 ....P....•Ÿ&Ÿ’Ÿ.
9F 34 9F 36 00 10 00 02 30 38 Ÿ4Ÿ6....08
Pinpad successfully performs the operation (the card requires online authorization), returning the
required EMV data.
47 4F 58 30 30 30 30 38 38 80 56 00 06 32 30 32 GOX000088€V..202
30 30 30 80 54 00 30 95 05 00 80 00 00 00 9F 26 000€T.0•..€...Ÿ&
08 E0 DB 51 A3 74 2F EA 83 9F 27 01 80 9F 10 0C .àÛQ£t/ꃟ’.€Ÿ..
PP 2C 51 4D 27 0F C3 CD 87 6C A4 00 00 9F 34 03 42 ,QM’.Ã͇l¤..Ÿ4.B
03 02 9F 36 02 00 4C 80 57 00 08 B9 DF 0A 99 6E ..Ÿ6..L€W..¹ß.™n
A6 CC B7 80 4C 00 0A FF FF F7 98 41 00 34 40 00 ¦Ì·€L..ÿÿ÷˜A.4@.
08 .
Command
Response
Examples
SPE requests the completion of an ICC EMV processing with the following characteristics:
▪ Acquirer Network approves the online transaction, but with “Y3” as response code;
▪ Acquirer Network returns Issuer Authentication Data (tag 91h) and Issuer Script (tag 72h); and
▪ Request the following EMV data objects if they exist: TVR (tag 95h), Application Cryptogram (tag
9F26h), Cryptogram Information Data (tag 9F27h) and Issuer Application Data (tag 9F10h).
46 43 58 30 35 39 00 05 00 1E 91 08 A1 02 DB 6D FCX059....‘.¡.Ûm
41 C6 79 63 72 12 9F 18 00 86 0D 84 24 00 00 08 AÆycr.Ÿ..†.„$...
SPE A0 71 54 4A 23 76 1A A1 00 04 00 07 95 9F 26 9F qTJ#v.¡....•Ÿ&Ÿ
27 9F 10 00 1C 00 02 59 33 00 19 00 04 30 30 30 ’Ÿ.....Y3....000
30 0
Pinpad successfully completes the operation (approval) and returns the Issuer Script Results, as
well as the requested EMV objects.
46 43 58 30 30 30 30 35 35 80 56 00 03 30 30 30 FCX000055€V..000
80 59 00 05 20 00 00 00 00 80 54 00 23 95 05 00 €Y.......€T.#•..
PP 80 00 00 00 9F 26 08 95 24 B3 FC 02 5E 51 72 9F €...Ÿ&.•$³ü.^QrŸ
27 01 40 9F 10 0A 7D 89 5F FF F0 15 D7 72 FB C9 ’.@Ÿ..}‰_ÿð.×rûÉ
Start
“GCX”
“GOX”
End
“FCX” transaction “FCX”
To optimize EMV card processing (ICC or CTLS) in the commands described in sections 3.6 and 3.7,
the pinpad needs to be preloaded with a set of parameter tables, which are stored in a non-volatile
manner (they are preserved even when the pinpad is turned off).
These tables are separated by acquirer network according to the diagram:
These tables are generated by the SPE (from the information received from the Acquirer Networks)
and are transferred to the pinpad using the commands described in section 3.5.
Consistency of the records sent to the pinpad is the sole responsibility of the SPE, since pinpad
does not make complex criticisms, such as, for example, identifying collisions of indexes and
records. The pinpad simply ignores records whose contents are notably invalid.
Notes:
• Each record must have a unique TAB_RECIDX (not necessarily sequential) for a given Acquirer
Network.
• TAB_ID, TAB_ACQ and TAB_RECIDX together uniquely identify a record in a table.
Examples
TAB_ACQ = “02”, TAB_RECIDX = 4D43h (“MC”): MasterCard credit with CTLS support (current
specification)
340102MC07A000000004101000000000000000000001CTLESS CREDIT 03000100020001
0769862020503000000004000000000000E0F8E87000F0F00122205004A000D800E8000020
5004F80000000000R0400001387000009C3000005DB123409F02065F2A029A039C0195059F
370400000000009F37040000000000000000000000000000000000Y1Z1Y3Z3F00000000000
00000000F000000000E0484817000F0F001000013870
TAB_ACQ = “17”, TAB_RECIDX = 3031h (“01”): MasterCard credit with CTLS support (V2.0x
specification).
3141170107A000000004101000000000000000000001CTLESS CREDIT 03000100020001
0769862020503000000004000000000000E0F8E87000F0F00122205004A000D800E8000020
5004F80000000000R0400001387000009C3000005DB123409F02065F2A029A039C0195059F
370400000000009F37040000000000000000000000000000000000Y1Z1Y3Z3F00000000000
00000000F000000000
TAB_ACQ = “23”, TAB_RECIDX = 3132h (“12”): Visa Electron with no CTLS support (specification
prior to V2.0x).
2841231207A000000003201000000000000000000002Electron 03008400830082
0769862MERCHID9182672X1234TID01877E0F0C07000F0F001220000000000480000000000
0004F800000007D010000001F499000007D010000001F4999F02069F030600000000000000
000000000000000000000000000000000000000000000000000000Y1Z1Y3Z3
Examples
TAB_ACQ = “01”, TAB_RECIDX = 3033h (“03”): American Express public key of index 0Eh.
61120103A0000000250E001030000144AA94A8C6DAD24F9BA56A27C09B01020819568B81A0
26BE9FD0A3416CA9A71166ED5084ED91CED47DD457DB7E6CBCD53E560BC5DF48ABC380993B
6D549F5196CFA77DFB20A0296188E969A2772E8C4141665F8BB2516BA2C7B5FC91F8DA04E8
D512EB0F6411516FB86FC021CE7E969DA94D33937909A53A57F907C40C22009DA7532CB3BE
509AE173B39AD6A01BA5BB8500000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000
00000000001A7266ABAE64B42A3668851191D49856E17F8FBCD00000000000000000000000
0000000000000000000
Table Merging
The CAPK Tables contain RSA public keys defined by the Card Associations, which, other than in
exceptional situations, must be the same for all Acquirer Networks able to process their cards.
The records in these tables are large and, as the number of Acquirer Networks increases, they
generate overhead in the communication between the SPE and the pinpad during the update process
(to say nothing of the device's memory consumption).
To minimize overhead in this process, this specification provides for an optional mechanism through
which these tables can be “merged” by the SPE when identified as “redundant”:
• Public keys identified as “redundant” among two or more Acquirer Networks may be loaded into
a table with TAB_ACQ = “00”. In this case, the key no longer exists in the specific tables for these
Acquirers.
• Keys are considered “redundant” when all of their fields are identical (T2_RID, T2_CAPKIDX,
T2_EXP, T2_MOD, T2_CHKSTAT and T2_CHECKSUM).
• Although the fields T2_RID and T2_CAPKIDX uniquely define a public key for a Card Association, it
is necessary to foresee the situation in which its data is defined differently by the Acquirer
Networks. In this case, these keys are not considered “redundant” and, therefore, must be kept in
the specific tables of the Acquirer Networks.
Merged tables are only used by Abecs card processing commands (described in section 3.7)
and are not recognized by obsolete commands.
This merging process only makes sense when the SPE uses a “unified” table management (see
section 4.2.1), since records with TAB_ACQ = “00” cannot be loaded in the pinpad when the
management is “separated” (see section 4.2.2).
Examples
TAB_ACQ = “02”, TAB_RECIDX = 3233h (“23”): MasterCard certificate of serial number 333333h.
02620223A000000004FE333333
This version information consists of a 10-character field that can be obtained using “GTS” or “GIX”
(with PP_TABVERnn) commands.
Depending on the philosophy of the SPE, it can operate in two ways:
• Manage the tables of all Acquirer Networks in a unified way; or
• Manage the Acquirer Network tables independently.
• The tables of all Acquirer Networks are loaded in a single moment, using TLI_ACQIDX = “00” in
the “TLI” command.
• TLI_TABVER version informed in the “TLI” command becomes valid for the tables of all Acquirer
Networks.
• The “GCR” command must be activated with GCR_ACQIDXREQ = “00”, with GCR_TABVER
referring to the common version of all tables.
• The “GCX” command must be called without the SPE_ACQREF parameter.
5. Security
This chapter details the cryptographic security mechanisms used by this specification, providing
explanations regarding the keys injected by the pinpad manufacturer, as well as the processes
designed to ensure the confidentiality of the information transmitted in the communication with the
SPE.
Important considerations:
• From the factory injection point of view, PIN and data keys (“DAT”) do not have any special
treatment. It is just a logical separation to comply with PCI restrictions (a key used for PIN
encryption cannot be used for other purposes).
• The following commands use only PIN keys: “GDU”, “GPN”, “GOC” and “GOX”.
• The following commands use only data (“DAT”) keys: “DWK”, “EBX”, “ENB” and “GTK”.
• Index “00” is valid and, considering that the maximum allowed index is “99”, one can have up to
100 keys of each type. However, the number of possible keys for each type depends on the
pinpad model (for example, a given pinpad allows up to 18 DUKPT:TDES keys, from indexes "00"
to "17").
• DUKPT:TDES data keys (“DAT”) allow different variants at the time of use (see section 5.1.1),
however the existence of these variants does not require any special treatment in the factory
injection process.
(*) In addition to the modification constant, these two variants add an additional diversification of
the key using TDES, as described in section A.4.1 of the ANSI X9.24:2009 standard.
Whenever this specification considers data block encryption using DUKPT, regardless of the
modality (ECB or CBC) or the variant used, the pinpad must use the same “Current Transaction
Key” (a single KSN) for all 8-byte parts of the block, regardless of the number of iterations
required for the process.
5.2.1. Establishment
The following flow illustrates the process of establishing “Secure Communication”:
SPE Pinpad
1 2 3
KMOD KPUB “OPN” (KMOD + KPUB) KSEC
KPRV
KMOD KPUB RSA
(PKCS#1)
KSEC
5
The SPE creates an RSA key (or uses a fixed hardcoded key). This specification considers that the
module must have 256 bytes (it may be increased in the future).
The SPE sends KMOD and KPUB to the pinpad using the “OPN” command.
The pinpad randomly generates a 16-byte KSEC and encrypts it using RSA with KMOD/KPUB key. For
this purpose, the block format recommended by the PKCS # 1 standard (table below) is used as
the algorithm input, which must have the same size as the KMOD.
The pinpad returns the generated cryptogram (CRKSEC) in the response to the “OPN” command.
The SPE decodes the cryptogram (CRKSEC) received using RSA with KMOD/KPRV key, thus
obtaining the random KSEC key generated by the pinpad.
Format Description
B2 Header (fixed: 00h 02h).
Bxxx Random bytes other than 00h. The size “xxx” must be calculated so that
this structure has same the total size as KMOD.
B1 Separator (fixed: 00h).
B16 Random key generated by the pinpad (KSEC).
Example:
A detailed example of the process for establishing “Secure Communication” is found in section 3.2.2.
After “Secure Communication” is established, the SPE should only send encrypted commands
(except for “OPN”). If the pinpad receives a cleartext command in this mode, it will return
ST_ERRPKTSEC for the command in question. The response error will be returned in
cleartext, although “Secure Communication” remains active.
After “Secure Communication” is established, the pinpad will always return encrypted
responses, including notification messages (“NTM”), except for “CLO” and “CLX” responses,
which are always returned “cleartext”.
Regardless of the “Secure Communication” status, the “OPN” (secure or classic) command, can
only be sent in cleartext.
IV = 0 + + + +
PKTDATA
As described in the Link Level (section 2.2.1), if PKTDATA is encrypted, it must be started with the
«DC2» byte.
Example:
Considering KSEC = DB3B4D015432AB3223555A1F81759A94, the SPE wishes to send the “GIX”
command below in “Secure Communication”:
47 49 58 30 31 34 00 01 00 0A 80 01 80 04 80 34 GIX014....€.€.€4
CLRDATA 91 01 91 0E ‚.‚.
Including the control fields (DATALEN, DATACRC and FILLER), the block to be encrypted is:
DATALEN 00 14 8D F2 47 49 58 30 31 34 00 01 00 0A 80 01 ..•òGIX014....€.
DATACRC 80 04 80 34 91 01 91 0E 00 00 00 00 00 00 00 00 €.€4‘.‘.........
CLRDATA
FILLER
The following result is obtained applying AES (CBC) with the KSEC key (preceded by the «DC2» byte):
12 EA 22 9E DD 36 F8 4C 2A A7 E0 02 75 10 5C 3A .ê"žÝ6øL*§à.u.\:
PKTDATA 8A 78 7F C9 B2 88 35 40 AE E8 27 BA 1C 5A 03 94 Šx.ɲˆ5@®è'º.Z.”
96 –
PKTDATA
IV = 0 + + + +
Upon receiving an encrypted packet, the following verifications must be carried out:
• The size of PKTDATA (excluding the «DC2» byte) must be a multiple of 16;
• The value of DATALEN must be consistent (smaller than PKTDATA, excluding 5 bytes of DATALEN,
DATACRC and «DC2»); and
• The CRC-16 calculated over CLRDATA must be equal to the value informed in DATACRC.
If the SPE detects any of these inconsistencies in an encrypted response, it must end the
operation with a fatal error.
Example:
SPE receives the following response started with «DC2», indicating “Secure Communication”.
12 BA 90 C3 82 65 12 69 B2 2D 0E FC 90 B9 2B C3 .ºÃ‚e.i²..ü•¹+Ã
08 83 71 38 6A 69 B9 A7 A8 5B C6 AC 76 E4 84 37 .ƒq8ji¹§¨[Ƭvä„7
BC 73 A2 02 86 EC B6 73 A4 93 4C 85 35 4E 47 16 ¼s¢.†ì¶s¤“L…5NG.
0F 27 2E 1A 2B 53 BA C1 B7 95 85 9E 4C 62 2F C8 .'..+SºÁ·•…žLb/È
66 1A 4B AE 1F EE 45 09 75 B7 CA 04 20 C6 18 A1 f.K®.îE.u·Ê.•Æ.¡
FC 74 47 65 C3 E7 08 AF 56 02 25 6B 75 A9 07 C3 ütGeÃç.¯V.%ku©.Ã
PKTDATA F9 A2 56 89 CB 11 23 9C 01 E3 6F C6 18 B4 17 A0 ù¢V‰Ë.#œ.ãoÆ.´.
2A 21 77 E3 C3 C8 73 B1 F0 6E 3B D6 20 8F F2 B4 *!wãÃÈs±ðn;Ö••ò´
96 A2 B0 BD F8 12 32 FD A0 97 30 0C 7D 19 B0 07 •¢°½ø.2ý •0.}.°.
DD C1 7E 6D EF 8B E7 BB 0E 82 58 8C 07 11 C0 1B ÝÁ~mï‹ç».‚XŒ..À.
39 B1 21 BB 8C 66 E3 E0 31 3C 82 69 27 FB 7F 13 9±!»Œfãà1<‚i'û•.
36 6
SPE decrypts the message (without the «DC2») using AES (CBC) with
KSEC = DB3B4D015432AB3223555A1F81759A94, obtaining:
00 A0 66 EB 47 49 58 30 30 30 31 35 31 80 01 00 . fëGIX000151€..
0C 39 39 31 32 37 34 33 36 36 31 35 35 80 04 00 .991274366155€..
0D 48 45 4D 49 53 50 48 45 52 45 53 20 20 80 34 .HEMISPHERES••€4
DATALEN 00 64 30 31 31 31 30 30 31 31 30 30 30 30 30 30 .d01110011000000
DATACRC 30 30 30 30 30 30 30 30 30 30 30 32 32 32 32 32 0000000000022222
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
CLRDATA 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
FILLER 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
32 32 32 32 32 32 91 01 00 0A FF FF F9 13 25 00 222222‘...ÿÿù.%.
43 20 04 43 00 00 00 00 00 00 00 00 00 00 00 00 C .C............
SPE identifies the length DATALEN = 00A0h (160 bytes) and verifies DATACRC = 66EBh, extracting
the CLRDATA block, response to a “GIX” command.
47 49 58 30 30 30 31 35 31 80 01 00 0C 39 39 31 GIX000151€...991
32 37 34 33 36 36 31 35 35 80 04 00 0D 48 45 4D 274366155€...HEM
49 53 50 48 45 52 45 53 20 20 80 34 00 64 30 31 ISPHERES∙∙€4.d01
31 31 30 30 31 31 30 30 30 30 30 30 30 30 30 30 1100110000000000
30 30 30 30 30 30 30 32 32 32 32 32 32 32 32 32 0000000222222222
CLRDATA 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 2222222222222222
32 32 91 01 00 0A FF FF F9 13 25 00 43 20 04 43 22’...ÿÿù.%.C .C
5.2.2.3. Ending
The “Secure Communication” process is ended and the KSEC key is cleared from memory in the
following cases:
• A “CLO”/“CLX” command is received.
• The pinpad detects any inconsistencies in the encrypted command, returning “ERR009”
(ST_ERRPKTSEC, as described in section 2.3.4).
• The pinpad receives an encrypted “OPN” command.
This modality is obsolete, having been replaced by the “Secure Communication” described in
section 5.2. The SPE should use this mode only if the pinpad is not recognized as an “Abecs
Pinpad”.
In this mode, some data is encrypted using a TDES key called WKPAN, which can be generated in two
ways:
Mode 1:
If a pinpad Master Key (TDES) is known, WKPAN can be generated externally by the SPE and sent
to the pinpad encrypted by this Master Key.
SPE Pinpad
MK WKPAN MK
TDES-1
(ECB)
TDES WKPAN
(ECB)
WKPAN
WKPAN
Mode 2:
A random WKPAN can be generated by the pinpad and returned to the SPE through an RSA
cryptogram, as described in section 5.3.3.
SPE Pinpad
KMOD +
KMOD KPUB
KPUB
KPRV
WKPAN
RSA WKPAN
RSA
WKPAN
The activation of the “Encrypted PAN” mode, as well as the definition of the WKPAN key, is done
through the command “DWK” (see section 3.2.5). The following table lists the commands and data
affected by this mode:
These rules do not apply to the “ENB” command even if ENB_INPUT contains PAN information,
since it is intended to encrypt generic data that is not interpreted in any way by the pinpad.
Examples
The following examples consider WKPAN = ‘EA 52 8A 43 B0 26 52 FD EB 53 8B 42 B1 27 53 FC’:
Example 1: Track 1 returned by the pinpad, with PAN containing blank spaces.
• Cleartext (59 characters):
“B3764 361234 56006^NAME NAME NAME NAME NAME N^0905060640431”
• Identified PAN (17 characters):
“3764 361234 56006”
• Encoding:
“764E361234E56006” TDES “5716A983F0E4643B”
• Encrypted (59 characters):
“B35716A983F0E4643B^NAME NAME NAME NAME NAME N^0905060640431”
Example 6: A 37-character Track 2 returned by the pinpad, containing a 13-digit PAN, resulting in 40
characters after encryption.
• Cleartext (37 characters):
“3827418937101=09050606404312376450123”
• Identified PAN (13 characters):
“3827418937101”
• Encoding:
“3827418937101FFF” TDES “1CCE9197C5C6E3FF”
• Encrypted (40 characters!!!):
“1CCE9197C5C6E3FF=09050606404312376450123”
• Encoding:
“6748362525378000” TDES “FE8E271A114C1A35”
• Encrypted (104 characters):
“491FE8E271A114C1A35==5300053205322056019300000010000004050=00000
000000000000=00000000000000000=7=3012056”
Example 8: Track 2 returned by the pinpad, without separator. In this case, to maintain consistency
with the defined rule, it is as if the entire track was the PAN.
• Cleartext (37 characters):
“9823746589273648956239486587923497851”
• Identified PAN (37 characters):
“9823746589273648956239486587923497851”
• Encoding:
“9486587923497851” TDES “2C05DF894573C7FA”
• Encrypted (37 characters):
“9823746589273648956232C05DF894573C7FA”
Format Description
A1 Block header (fixed = “T” / 54h).
N1 Layout version (fixed = “1” / 31h).
N9 Sequential number generated by the pinpad for cryptogram diversification.
H32 Random WKPAN generated by the pinpad.
N84 Not used (zeros = “00000...0000”).
A1 Block trailer (fixed = “X”)
When opening the cryptogram, the SPE shall verify that the header, version and trailer are correct,
validating their integrity. The sequential number must be disregarded.
PP_TRK1INC Go through Track 1 from left to right and truncate in seven positions after the
second separator “^” (5Eh). If this rule is not possible, consider the leftmost 19
positions.
PP_TRK2INC Go through Track 2 from left to right and truncate in seven positions after the
second separator “=” (3Dh). If this rule is not possible, consider the leftmost 19
positions.
PP_TRK3INC Consider always the leftmost 19 positions.
If the SPE_PANMASK parameter is present in the command, the pinpad will mask the PAN as follows:
• Identify as PAN the first consecutive sequence of numeric characters to the left of the field,
ignoring any blank spaces.
• Follow the SPE_PANMASK definition which indicates how many numeric digits must be kept open
on the right (“RR”) and on the left (“LL”).
If the sum of the sizes “RR” and “LL” exceeds the number of numeric digits in the PAN,
there is no masking.
The remaining numeric digits are replaced by asterisks (2Ah).
Examples
• Assuming a Track 2 containing “66733246732413=1512601234879534275432”, the value of
PP_TRK2INC would be “66733246732413=1512601”.
• Assuming a Track 1 containing “B9994444333322221111^NOME^1512601234879”, the value of
PP_TRK1INC would be “B9994444333322221111^NOME^1512601”.
• Assuming a Track 2 containing “667332467324131512601234879534275432”, the value of
PP_TRK2INC would be “6673324673241315126”.
• Assuming a Track 1 containing “B3764 329710 01006^JOE^2108100265123756” and
SPE_PANMASK = “0604”, the value of PP_TRK1INC would be
“B3764 32**** *1006^JOE^2108100”.
• Assuming a Track 2 containing “4444333322221111=2212601019923625524” and SPE_PANMASK
= “0700”, the value of PP_TRK2INC would be “4444333*********=2212601”.
• Assuming a Track 1 containing “A756325325535^PROPRIETARYFORMAT=6562532” and
SPE_PANMASK = “0005”, the value of PP_TRK1INC would be “A*******25535^PROPR”.
SPE_IVCBC + + +
PP_TRACKn / PP_ENCPAN
The algorithm to be used for encryption (“Alg”) is selected in SPE_MTHDDAT, using the SPE_KEYIDX
key. However, when SPE_MTHDDAT = “9x”, the following rule must be adopted:
• Encryption will be done using a random TDES key (KRAND) generated by the pinpad itself. This key
must be generated every time “GTK” is executed and it cannot be reused.
• The SPE must provide an RSA public key in the SPE_PBKMOD and SPE_PBKEXP input fields.
• The KRAND key is encrypted by the pinpad using the RSA public key, in the same PKCS #1 format
presented in section 5.2.1, generating the PP_ENCKRAND output field.
5.4.2.1. Track 1
The Track 1 allows alphanumeric characters, so it is always treated as information in ASCII encoding,
with each symbol occupying one byte. Thus, the following rule is adopted:
• The pinpad preserves in cleartext the initial characters of Track 1 according to the quantity
requested in SPE_OPNDIG, disregarding the format character (usually “B”)
• The block to be encrypted must have a size multiple of 8 (eight) bytes. If necessary, it must be
filled trailing 00h bytes.
Example
The following diagram illustrates the encryption of a 39-character track (“B9994444333322221111^
NAME^1512601234879”) using ECB block mode, preserving the first 8 characters in cleartext:
B 9 9 9 4 4 4 4 3 3 3 3 2 2 2 2 1 1 1 1 ^ N A M E ^ 1 5 1 2 6 0 1 2 3 4 8 7 9
42 39 39 39 34 34 34 34 33 33 33 33 32 32 32 32 31 31 31 31 5E 4E 41 4D 45 5E 31 35 31 32 36 30 31 32 33 34 38 37 39 00 00
42 39 39 39 34 34 34 34 33 XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
B 9 9 9 4 4 4 4 3 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Example
The following diagram illustrates the encryption of a 37-position track (“66733246732413=
1512601234879534275432”) using CBC block mode, without “IV ”(Initialization Vector), preserving
the first 4 digits in cleartext:
66 73 32 46 73 24 13 D1 51 26 01 23 48 79 53 42 75 43 2 F FF FF FF FF FF FF FF
+ +
66 73 XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
This chapter defines the rules for the internal operation of the pinpads and is intended for its
manufacturers and developers, and its knowledge is not necessary for SPE suppliers.
For more information, see the Portuguese version of this specification.
7. Additional information
The sections in this chapter provide supplementary information useful for understanding this
specification.
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
x x x Object class and type
1 1 1 1 1 See subsequent bytes
Any other value < 31 Tag number
According to ISO/IEC 8825, the following table defines the coding rules of the subsequent bytes of a
BER-TLV tag when tag numbers 31 are used (that is, bits b5 - b1 of the first byte equal '11111'):
b8 b7 b6 b5 b4 b3 b2 b1 Meaning
1 Another byte follows
0 Last tag byte
Any value > 0 (Part of) tag number
Before, between, or after TLV-coded data objects, 00h bytes without any meaning may occur (for
example, due to erased or modified TLV-coded data objects).
“GCX” Uses the display to request a card and to display the application selection
menu.
▪ For ICC or CTLS successfully processed, leave a message on the display
indicating the selected application.
▪ In case of error, erase the display at the end.
“GOX” If required, it uses the display to capture the PIN, erasing it at the end,
whether the capture is successful or unsuccessful. If there is no PIN
capture, the display is not modified.
“FCX” It may use the display to request a card in the case of CTLS with Issuer
Script Processing, erasing it at the end. For other situations, the display is
not modified.
Other commands not listed in this table shall not erase or modify the contents of the display.
If the pinpad does not support this codepage, it must “translate” the messages before the
presentation on the display, to remove accents and cedilla.