payShield host commands

Data & MAC

payShield M4 — Translate Data Block

answers with M5

Decrypt under the source key and encrypt under the destination key. The simulator supports conventional cipher modes with DEKs, BDKs 1–3 and ZEK/TEK keys subject to the configured plaintext character set.

Fields

FieldWhat it holds
Source cipher mode00 ECB · 01 CBC · 02 CFB8 · 03 CFB64
Destination cipher mode00 ECB · 01 CBC · 02 CFB8 · 03 CFB64
Input Format1 chars0 binary · 1 hex-encoded · 2 text (M0 only for data encryption/decryption)
Output Format1 chars0 binary · 1 hex-encoded · 2 text (M2)
Source key typeFFF under a Key Block LMK
Source key under LMKEnter the complete protected key. A BDK also requires its KSN descriptor and KSN.
Source KSN descriptorTDES: Key Set ID length 5–A, reserved 0, Device ID length 2–5. AES: 000.
Source KSNTDES: descriptor lengths + 5 counter digits (12–20 hex). AES: 24 hex. Preserve the transaction counter.
Destination key typeFFF under a Key Block LMK
Destination key under LMKEnter the complete protected key. A BDK also requires its KSN descriptor and KSN.
Destination KSN descriptorRequired only for a destination BDK. TDES: lengths 5–A / 0 / 2–5. AES: 000.
Destination KSNRequired only for a destination BDK: 12–20 hex for TDES, 24 hex for AES.
Source IV16 hex digits for DES/TDES, 32 for AES
Destination IV16 hex digits for DES/TDES, 32 for AES
Data Block (HEX)Hex data (multiple of 16 chars for ECB)
Message trailerOptional · up to 32 printable ASCII characters.

On the wire

The four zeros are the message header. The device echoes them in its response.

Translate Data Block

0000M4000111FFFS10096D0TB00S00004EA7F62C3D05B27FCD6ED9E4590D7BDEAD1F9777861CF80279772FB09EDC999B90F78F4C3E672F8CFFFS10096D0TB00S00004EA7F62C3D05B27FCD6ED9E4590D7BDEAD1F9777861CF80279772FB09EDC999B90F78F4C3E672F8C0123456789ABCDEF0020A024C66E0F0508E89AF20722F083147A

4-char headercommand258 bytes of fields
Send M4 to the simulator

Opens the simulator with this command already filled in.

Data & MAC