1
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$ Mar 9, 2018 at 2:28

1 Answer 1

1
$\begingroup$

What is double-length derivation key ?

My reading is that is the Base Derivation Key (BDK), used to derive (produce) an Initial PIN Entry device Key (IPEK). Both BDK and IPEK are 16-byte keys for 3DES; otherwise said for TDEA keying option 2 per the (obsolete) FIPS SP-800-67-Rev1 section 3.2, item 2.

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.

Step 5 complements the high-order two bits of the four left/high order bytes of each of the 8-byte halves of BDK, to form a different BDK'. The same 8-byte value obtained in the first half of step 3 is enciphered per 3DES/TDEA using BDK (resp. BDK') to form the left/high order (resp. right/low order) half of IPEK.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.