How to decode a PIN Block

This “How to” describes the way to get clear PIN value from encrypted PIN Block stored in chip data. To get more on PIN-block formatting check our Complete list of PIN-blocks.

Tools needed

  • EFTtools – Cryptographic Calculator (ccalc)
  • EFTtools – Card Edit Tool (cedit)

Steps taken

  1. Use EFTtools – Crypto Calculator
  2. Select Generic -> DES, copy & paste clear PEK from Key Usage Architecture document
  1. EFTtools – Card Edit Tool (cedit).
  2. Open the P3 Input or Output File with P3 Viewer.
  3. Select Chip Data and copy Encrypted PIN Block from Tag 9F62 or DF01
  1. Paste the data into Cryptographic Calculator Data field and decode the PIN Block to get plain PIN Block.
  1. Copy PAN from Tag 5A.
  1. Paste the PAN into Cryptographic Calculator -> Payments -> PIN Blocks -> tab Decode -> PAN field.
  2. Paste the result from DES3 decode step into the PIN block field.
  3. Set the PIN Block format to “Format 0 (ISO-0).
  4. Run the decrypt function – done.