In cryptography, Derived Unique Key Per Transaction (DUKPT) is a key management scheme in which for every transaction, a unique key is used which is derived from a fixed key. Therefore, if a derived key is compromised, future and past transaction data are still protected since the next or prior keys cannot be determined easily. DUKPT is specified in ANSI X9.24 part 1.
Overview
DUKPT allows the processing of the encryption to be moved away from the devices that hold the shared secret. The encryption is done with a derived key, which is not re-used after the transaction. DUKPT is used to encrypt electronic commerce transactions. While it can be used to protect information between two companies or banks, it is typically used to encrypt PIN information acquired by Point-Of-Sale (POS) devices.
DUKPT is not itself an encryption standard; rather it is a key management technique. The features of the DUKPT scheme are: enable both originating and receiving parties to be in agreement as to the key being used for a given transaction, each transaction will have a distinct key from all other transactions, except by coincidence, if a present derived key is compromised, past and future keys (and thus the transactional data encrypted under them) remain uncompromised, each device generates a different key sequence, originators and receivers of encrypted messages do not have to perform an interactive key-agreement protocol beforehand.
History
DUKPT was invented in the late 1980s at Visa but didn’t receive much acceptance until the 1990s, when industry practices shifted towards recommending, and later requiring, that each device have a distinct encryption key.
Before DUKPT, state of the art was known as Master/Session, which required every PIN-encrypting device to be initialized with a unique master key. In handling transactions originating from devices using Master/Session key management, an unwanted side effect was the need for a table of encryption keys as numerous as the devices deployed. At a major merchant acquirer the table could become quite large indeed. DUKPT resolved this. In DUKPT each device is still initialized with a distinct key, but all of the initialization keys of an entire family of devices are derived from a single key, the base derivation key (BDK). To decrypt encrypted messages from devices in the field, the recipient need only store the BDK.
Keys
As stated above, the algorithm needs an initial single key which in the original description of the algorithm was called the super-secret key, but was later renamed to—in a more official-sounding way—Base Derivation Key (or BDK). The original name perhaps conveys better the true nature of this key, because if it is compromised then all devices and all transactions are similarly compromised.
This is mitigated by the fact that there are only two parties that know the BDK:
the recipient of the encrypted messages (typically a merchant acquirer) the party which initializes the encryption devices (typically the manufacturer of the device).
The BDK is usually stored inside a tamper-resistant security module (TRSM), or hardware security module (HSM). It must remain clear that this key is not the one used to initialize the encryption device that will participate in DUKPT operations. See below for the actual encryption key generation process.
First: A key derived from the BDK, this is known as the IPEK (Initial PIN Encryption Key) Second: The IPEK is then injected into the devices, so any compromise of that key compromises only the device, not the BDK. This creates yet another set of keys (inside the device) irreversibly derived from it (nominally called the Future Keys) Fourth: Afterwards the IPEK is then immediately discarded. NOTE: This step contradicts "Session Keys" section where it indicates that only 21 "Future Keys" are generated. The IPEK must be retained by the terminal in order generate the next batch of 21 Future Keys. NOTE: This isn't true, the future keys are used to derive new future keys, the IPEK is in fact discarded. Fifth: Future Keys are used to encrypt transactions in the DUKPT process.
Upon detection of compromise the device itself derives a new key via the Derived Key Generation Process.