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 whole message · 1 first part · 2 middle part · 3 final part
Input Format1 chars0 binary · 1 hex-encoded · 2 text (M0 only for data encryption/decryption)
MAC Size1 chars0 (8 hex), 1 (16 hex), 2 (32 hex for AES)
MAC Algorithm1 chars1 (ISO 9797-1 alg 1, DES), 3 (alg 3, TDES), 5 (CBC-MAC, AES), 6 (CMAC, AES) — must match the key
Padding Method1 charsAlgorithms 1, 3 and 5: 0 unpadded, 1 zero padding, 2 add 80 then zeros, or 3 prepend the bit length (single message). AES-CMAC: 4.
Key Type3 chars000 (ZMK), 001 (ZPK), 002 (TMK/TPK), 003 (PVK), 009 (MAC key)
MAC Key under LMKKey Block LMK: enter the complete S key block. Variant LMK: 16 hex digits, U followed by 32, or T followed by 48.
IV16 or 32 charsCBC only: 16 hex (3DES) / 32 hex (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.

Generate MAC

0000M600264FFFS10096M6AC00N00008B858249E37868BA109CA96697DB7D583828C92C5BA04EE886EB0E62F0259E09583FB5BDAFDB8C660011<0019FF3C00112233445566778899AABBCC>%00

4-char headercommand129 bytes of fields
Send M6 to the simulator

Opens the simulator with this command already filled in.

Data & MAC