# What is double-length derivation key?

I trying to understand how can an IPEK created from a given KSN and BDK (Triple DES Edition). From this article-Creating an IPEK from a given KSN and BDK (Triple DES Edition):

Derivation of Initial Key (IPEK) from Base Derivation Key (BDK) The initial PIN Entry Device key (the key initially loaded into the PIN Entry Device) is generated by the following process:

1. Copy the entire key serial number, including the 21-bit encryption counter, right-justified into a 10-byte register. If the key serial number is less than 10 bytes, pad to the left with hex “FF” bytes.
2. Set the 21 least-significant bits of this 10-byte register to zero.
3. Take the eight most-significant bytes of this 10-byte register, and encrypt/decrypt/encrypt these eight bytes using the double-length derivation key.
4. Use the ciphertext produced by Step 3 as the left half of the Initial Key.
5. Take the 8 most-significant bytes from the 10-byte register of Step 2 and encrypt/decrypt/encrypt these 8 bytes using as the key the double-length derivation key XORed with hexadecimal C0C0 C0C0 0000 0000 C0C0 C0C0 0000 0000.
6. Use the ciphertext produced by Step 5 as the right half of the Initial Key.

What is double-length derivation key ? I can't find any useful information regarding this from internet.

• You should probably say this is for the X9.24 DUKPT scheme as there are many other very different but less famous derivation schemes. Kind of like many people believe all computers run Windows, all websites are on domains beginning www., etc. – dave_thompson_085 Mar 9 '18 at 2:28

The 16-byte BDK or IPEK is split into two 8-byte halves $K_1$ and $K_2$, and 8-byte $P$ is enciphered into $C=E_{K_1}(D_{K_2}(E_{K_1}(P)))$. That's the usual Encrypt-Decrypt-Encrypt of 3DES/TDEA, as explained in step 3.