payShield host commands

Data & MAC

payShield M6 — Generate MAC

answers with M7

Generate MAC on data using a TAK or ZAK — MAC size/algorithm/padding per the v2.2 wire

Fields

FieldWhat it holds
Message Block1 chars0 (only block); 1-3 multi-block chaining not implemented
Input Format1 chars1 (Hex-Encoded Binary — the console format)
MAC Size1 chars0 (8 hex), 1 (16 hex) — default 1
MAC Algorithm1 chars1 (ISO 9797-1 alg 1, DES), 3 (alg 3, DES), 6 (CMAC, AES) — must match the key
Padding Method1 chars1 (ISO 9797-1 method 1); 4 for CMAC — default follows the algorithm
Key Type3 chars000 (ZMK), 001 (ZPK), 002 (TMK/TPK), 003 (PVK), 009 (MAC key)
MAC Key under LMK32 or 48 or 97 or 129 charsS… key block (97/129 chars), or 32/48 hex under a variant LMK
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.

Generate MAC

0000M601111FFFS10096M0TE00N0000C486F177EC809840B88B7F6E545898A0AFA62689E2DEEA56A9931CCD0A64F98B06B0283981BF320F001600112233445566778899AABBCCDDEEFF

4-char headercommand141 chars of fields
Send M6 to the simulator

Opens the simulator with this command already filled in.

Data & MAC