Runs four operations from the German girocard/SECCOS world in one tool: session key derivation, PIN block encryption, PIN block decryption, and a retail MAC. Derivation is 3DES-ECB(MK, CM XOR Rnd) applied to each 8-byte half; the PIN and MAC tabs are standard 3DES under a session key you supply. The ZKA derivation spec (Anlage 2 of the Technischer Anhang) is not public, so treat the derived key as a reconstruction and confirm it against the KCV your terminal or HSM reports before relying on it.
Inputs
Tab: Selects the operation. Each tab has its own inputs and its own result panel.
MK — Master Key (HEX): Double-length 3DES key (16 bytes / 32 hex chars) shared by card and host. Used only by the SK Derivation tab.
CM — Card Message (HEX): Card message, 16 bytes / 32 hex chars. The card-supplied half of the derivation input.
Rnd — Random Number (HEX): Host random number, 16 bytes / 32 hex chars. It is XORed with CM before encryption, which is what makes the key session-specific.
Session Key (HEX) — PIN tabs: The 16-byte key used by PIN Encrypt and PIN Decrypt. Paste the output of the SK Derivation tab, or a session key captured from the terminal.
Clear / Encrypted PIN Block (HEX): One 8-byte block, 16 hex chars. The label reads Clear PIN Block on PIN Encrypt and Encrypted PIN Block on PIN Decrypt; both read the same field.
Session Key (HEX) — MAC tab: The MAC tab keeps its own session key field, separate from the PIN tabs. Switching tabs does not carry the key over, so paste it again here.
Data (HEX): Hex data to MAC. Any even number of hex chars; the tool appends the padding itself. An empty field is rejected rather than MACed as a bare pad block.
Tips
Derivation is 3DES-ECB(MK, CM XOR Rnd) over each 8-byte half, both halves under the same MK. If CM and Rnd happen to XOR to two identical halves, the session key comes out as K1 = K2 and 3DES degrades to single DES.
The KCV is the first 3 bytes of 3DES-ECB(SK, 0000000000000000). Compare it with the terminal or HSM before trusting the key — it is also the check that tells you whether this derivation matches the one your counterpart implements. The derived key is not parity-adjusted, so an HSM that enforces odd parity on import will reject it.
PIN Encrypt and PIN Decrypt are raw 3DES-ECB over a single block, with no padding and no PAN binding. Decrypting the ciphertext with the same session key must return the original block byte for byte.
The MAC is ISO 9797-1 Algorithm 3 with padding method 2: 80 then 00 up to an 8-byte boundary, always appended even when the data is already a multiple of 8. Intermediate blocks use single DES under the left key half; only the last block uses full 3DES.
Standards: ISO 9797-1 (MAC Algorithm 3, padding method 2), ISO 9564-1 (format of the PIN blocks the PIN tabs operate on), NIST SP 800-67 (TDEA), ZKA/DK Technischer Anhang, Anlage 2 (proprietary — the derivation here is a public reconstruction)