payShield host commands

PIN operations

payShield G0 — Translate PIN BDK→BDK/ZPK

answers with G1

Translate a DUKPT PIN block to a destination working key and inspect the G1 response.

The payShield 2.2a capture covers a TDES BDK to ZPK translation with format 01 on both sides. AES translation has simulator tests. ZKA and BDK-5 derivation are unavailable.

Fields

FieldWhat it holds
Source BDKBDK-1, BDK-2 or BDK-5 under the LMK. Variant LMK: 32H/U32H; optional ~ selects BDK-2. Key Block LMK: S block with usage B0/41/44.
Destination keyZPK, BDK or ZKA-MK under the LMK. Variant flags: * BDK-1, ~ BDK-2, ! BDK-4. Key Block LMK: usage selects the role.
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 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.
PIN Block (HEX)16 or 32 chars16 hex chars, or 32 for format 48
Source PIN Block Format2 chars01 (ISO 0), 05 (ISO 1), 34 (ISO 2), 47 (ISO 3), 48 (ISO 4), 04 (PLUS), 35 (Pay Now/Later)
Destination PIN Block Format2 charsdefaults to the source format
PAN relationshipDifferent PANs requires Enable use of Tokens in PIN Translation on the selected HSM.
PAN12-19 digit card number
Destination PANPAN used to form the destination PIN block.
LMK Identifier (optional)2 chars2 digits, e.g. 01 — blank uses the default slot
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. This example uses the Thales AES test LMK in slot 00 and requires G0 and PIN format 01 to be enabled.

Translate PIN BDK→BDK/ZPK

0000G0S10096B0TX00S0000DA110DF602A5937FF0F8CADD3CDD05AEDA5F9DA11D0511B43D6277E0C2DDC93F7E385F9A7E15FD83S10096P0TB00S000034B43E25EE3930E9078AD04B93C23B82F4664B404066EB855043B8AF2F8F6A0B386C24B067534CADA05FFFF9876543210E000014CB5A6D843B2E11D0101123456789012%00<19>G0 return

4-char headercommand262 bytes of fields
Send G0 to the simulator

Opens the simulator with this command already filled in.

PIN operations