EMV Demystified
EMV Demystified
Payment System Private Key of RSA Key pair for Asymmetric Cryptography used in RSA
Private Key - SCA signing Issuer Public Key Certificate
Payment System Payment System Public Key made available to Acquirers for RSA
Public Key - PCA Terminal injection used in SDA, DDA and PIN validation. Used by
Issuers to verify correctness of their Public Key Certificate signed
with the SCA and the terminals to verify that the Issuer Public Key
Certificate, which is signed with the Payment System Private Key is
valid.
Terminal Keys
Key Name Key Description Type
Payment System Payment System Public Key injected into terminals by Acquirers. RSA
Public Key - PCA Used by terminals to verify that the Issuer Public Key Certificate,
which is signed with the Payment System Private Key is valid in SDA
mode, which in turn validates the ICCPK for DDA/CDA and the ICCPE
during Offline PIN Encipherment.
EMV Cryptographic Keys - Cont.
Issuer Keys
Key Name Key Description Key Type
Issuer Private Key - SI Private Key of RSA Key pair for Asymmetric Cryptography used in signing RSA -
ICC Public Key Certificate Asymmetric
Issuer Public Key - PI Issuer Public Key provided to Payment System for creating Issuer Public RSA –
Key Certificate Asymmetric
Issuer Public Key Issuer Public Key and Issuer data signed by Payment System Private key – RSA –
Certificate - PKIss This is stored on every ICC as part of Personalization in order to support Asymmetric
Offline SDA.
Issuer Master Double length Triple DES key that the Issuer generates and used to derive TDES –
Derivation Key - IDKAC the Card Master Keys, which in turn generate the Session Keys for use in Symmetric
Online Application Cryptograms – MAC.
Issuer Secure TDES key generated by Issuer used to derive Card Keys used to provide TDES –
Messaging for Integrity to Post Issuance Secure Messaging like Issuer Scripts Symmetric
Integrity - IMKSMI
Issuer Secure TDES key generated by Issuer used to derive Card Keys used to encrypt TDES –
Messaging for Post Issuance Secure Messaging data like PIN changes Symmetric
Confidentiality -
IMSSMC
EMV Cryptographic Keys - Cont.
ICC – Chip Card Keys for Offline transactions
Issuer Public Key Stored on every ICC as part of Personalization in order to support Offline SDA. RSA –
Cert - PKIss Used in offline DDA/CDA/Pin Encryption in an indirect chain fashion by Asymmetric
validating the ICC public key certificates ICCPK.
ICC Private Key - Private key of RSA key pair generated by Issuer and stored onto the ICC during RSA –
ICCS personalization. Asymmetric
ICC Public Key - Public Key of ICC RSA key pair generated by Issuer and stored on ICC during RSA –
ICCP personalization Asymmetric
ICC Public Key ICC Public Key Certificate digitally signed using Issuer Private key used by ICC RSA –
Cert for by providing to terminal for use in DDA and CDA. May be used for offline PIN Asymmetric
Authentication - encryption.
ICCPK
ICC Public Key ICC Public Key Certificate digitally signed using Issuer Private key used by ICC RSA –
Cert for PIN by providing to terminal for use in offline PIN encryption to separate the key Asymmetric
encryption - ICCPE usage.
EMV Cryptographic Keys - Cont.
ICC – Chip Card Keys for Online transactions
ICC Master Key - Double length Triple DES key derived from the IDKAC Issuer Master TDES –
MDKAC Derivation Key using the ICC PAN and PAN sequence number. This in Symmetric
turn generates the Session Keys for use in Online Application
Cryptograms – MAC. Stored on the card during Personalization.
Card Master Key TDES card master key derived from the IMKSMI and used to provide TDES –
for Issuer Secure Integrity to Post Issuance Secure Messaging like Issuer Scripts Symmetric
Messaging for
Integrity -
MDKSMI
Card Master Key TDES card master key derived from the IMSSMC and used to derive Card TDES –
for Secure Keys used to encrypt Post Issuance Secure Messaging data like PIN Symmetric
Messaging for changes
Confidentiality -
MDKSMC
Offline Data Authentication
EMV allows for the flexibility of transactions
to be approved offline – by the terminal itself
due to the increased security of the ICC as
well as the improved Risk Management
Conditions for Offline transaction
authorization are specified by Payment
Systems or Issuers and are personalized on
the ICC as well as subject to Terminal Risk
Management
Offline Data Authentication is accomplished
by validating Card data securely through the
use of RSA keys
Static Data Authentication SDA
In SDA, the terminal verifies a static signature of ICC card data
– this is a 2 layer scheme
The Issuer creates a digital signature of key application data
including PAN, Exp Date, Transaction control or Card risk
management data signed using the Issuer Private Key and
personalizes the card with this information referred to as SSAD
During an offline SDA transaction, this SSAD is passed to the
terminal where the terminal verifies the Signed data using the
Payment System CA public key to verify the Issuer Signature
Then based on the card risk management and payment
system/acquirer defined risk rules, the terminal can either
approve or decline the transaction without going online to the
issuer
SDA uses Static data and is prone to Electronic Skimming
attacks
Dynamic Data Authentication DDA
In DDA, after the terminal verifies the static data
The ICC card generates a dynamic signature of the transaction
unique data from the terminal and card using the RSA ICC
Private Key
The terminal validates the Dynamic Signature to prove that the
card is valid – a 3 layer scheme
DDA dynamic signature computation should include other ICC
data elements like ATC as well as from the terminal like the
“Unpredictable Number” which is a MUST and transaction
Amounts
DDA involves the use of the following ICC RSA keys
Issuer Public Key Certificate
Card Private Key
Card Public Key and Certificate
For DDA support, it is important for ICC cards to include an
on-chip crypto processor
Offline PIN CVM
In all the above offline modes, offline PIN validation can also
be supported for plaintext as well as enciphered PIN
Cardholder entered value sent back to the ICC is compared
with the reference PIN stored on the card by means of a
VERIFY command. The ICC informs the terminal the success or
failure of the VERIFY command by means of a “response to
verify” and also optionally by inspection of the CVR
Two types – plaintext and enciphered
Offline PLAINTEXT PIN where the cardholder entered value in
the VERIFY command is sent in the clear.
Offline Enciphered PIN where the cardholder entered value is
RSA encrypted by the terminal using the ICC PIN encryption
public key. The ICC uses its corresponding Private Key to
decipher and compare the PIN – the DDA RSA key pair can be
optionally used to reduce the key management
Online Application
Cryptograms – ARQC & ARPC
Online Card Authentication Method is invoked when either the
ICC or the terminal deems that an offline authentication would
not suffice due to the risk management parameters or acquirer
terminal rules not being met, or due to randomness of online
transaction on the ICC being met
In such a scenario, the transaction is sent ONLINE to the Issuer.
The Generate AC command from the terminal results in the ICC
generating an ARQC (Application Request Cryptogram) from
important transaction data using TDES algorithm, which
implies a secret key usage
The ARQC cryptogram is generated by the ICC using a session
key derived from the Card Master Key, which is personalized
on the ICC after being derived from the ISSUER Master Key
ARQC = MAC(SKAC)[Input] where SKAC is the session key derived
from the Card Master Key.
ARQC – DE55 TAG 9F26
The required data input to create an ARQC cryptogram which is
part of DE55 as TAG 9F26 are shown below:
Amount, Authorized
Amount Other
Terminal Country Code
Terminal Verification Result
Transaction Currency Code
Transaction Date
Transaction Type
Unpredictable Number
Application Interchange Profile
Application transaction counter (ATC)
Issuer Application Data (IAD)