payShield host commands

Data & MAC

payShield M0 — Encrypt Data Block

answers with M1

Encrypt a data block under a data key (D0/21/22/23) — ECB or CBC with IV

Fields

FieldWhat it holds
Mode Flag1 or 2 chars00 (ECB), 01 (CBC — needs IV); other manual modes not implemented
Input Format1 chars1 (Hex-Encoded Binary — the console format)
Output Format1 chars1 (Hex-Encoded Binary — the console format)
Key under LMK32 or 48 or 97 or 129 charsS… key block (97/129 chars), or 32/48 hex under a variant LMK
IV16 or 32 charsCBC only: 16 hex (3DES) / 32 hex (AES)
Data Block (HEX)Hex data (multiple of 16 chars for ECB)

On the wire

Complete host messages. Each runs against the KeyLab simulator as printed. The header is four zeros here; the device echoes back whatever you send.

Encrypt Data Block

0000M00011FFFS10096D0TB00S00004EA7F62C3D05B27FCD6ED9E4590D7BDEAD1F9777861CF80279772FB09EDC999B90F78F4C3E672F8C001600112233445566778899AABBCCDDEEFF

4-char headercommand140 chars of fields
Send M0 to the simulator

Opens the simulator with this command already filled in.

Data & MAC