Key Management Tools

Generate, validate, wrap, share, and verify cryptographic keys used across payment systems — from raw 3DES key generation and parity enforcement to TR-31 / Thales key blocks, vendor HSM-specific calculators, keyshare splitting, and X.509 certificate workflows.

Introduction

Key Management Tools cluster around four jobs:

The Key Management hub with cards for DEA Keys, Keyshare Generator, Thales, Futurex, Atalla and SafeNet key calculators, Thales and TR-31 key blocks, SSL certificates and RSA DER keys
key-tools Key Management hub
  • Build keys — generate and combine raw key material.
  • Wrap keys — bind a key to its usage / algorithm via TR-31 or Thales key blocks.
  • Distribute keys — split into shares for multi-custodian loading and validate the resulting halves.
  • Compute key check values — for vendor HSMs and operational sign-off.

SSL / X.509 certificate handling is also grouped here for projects that need terminal or host-to-host TLS.

All tools

Every tool in this category — each card links to the detailed reference below.

DEA Keys (DES / 3DES Utility)

A multi-tab tool focused on raw 3DES key material.

View details →
Keyshare Generator

Splits a single key into n shares such that all n are required to reconstruct the key (XOR-based component scheme).

View details →
TR-31 Key Block

ASC X9.143 (formerly TR-31) defines a key block format that binds a key to its allowable usage, algorithm, mode, and…

View details →
Thales Key Block

The Thales-specific key block format used by PayShield HSMs.

View details →
Thales Key Calculator

Vendor-aware calculations matching Thales PayShield host commands.

View details →
Atalla Key Calculator

Atalla / Utimaco AKB-style key block helpers, including AKB header construction and KCV verification.

View details →
Safenet Key Calculator

Safenet / Thales Luna key calculations for legacy and modern formats.

View details →
RSA DER Public Key Tool

Wrap a modulus and exponent into DER, with the sign-byte case handled.

View details →
SSL / X.509 Certificate Tool

An end-to-end certificate workflow tool for terminal-host TLS.

View details →

DEA Keys (DES / 3DES Utility)

A multi-tab tool focused on raw 3DES key material.

DEA Keys Calculator on the Key Generator tab with keys-to-generate, 128-bit key length and odd key parity, beside the activity log
key-tools DEA Keys Calculator

Tabs

  • Key Generator — Generate cryptographically random DES, 2-key 3DES, or 3-key 3DES keys.
  • Key Combination — XOR multiple key components together to reconstruct a key from shares.
  • Parity Enforcement — Adjust the LSB of each byte so each byte has odd parity (DES requirement).
  • Key Validation — Check parity, detect weak keys, and compute KCV (Key Check Value) using 00 00 00 00 00 00 00 00.

Key Combination

Key Combination form with a TDES double-length key type and eight component fields, each with its own KCV box alongside
key-tools Key Combination

Components XOR together into the key. Pick the Key Type / Length — e.g. TDES — Double length (16B / 32H) — and the fields resize to match.

There is room for eight components, and each carries its own KCV box beside it, with one more for the combined result. That is what makes a bad component obvious: check each custodian’s KCV against their envelope before you trust the total.

Parity Enforcement

Parity Enforcement form with a hex key field and an odd or even key parity selector above the Enforce Parity button
key-tools Parity Enforcement

DES ignores the low bit of each byte, so specs use it as a parity bit. Paste a Key (Hex), choose Odd or Even, and Enforce Parity adjusts each byte to match — the key value is unchanged as far as the cipher is concerned.

Key Validation

Key Lookup form with a hex key, a Check KCV checkbox, an optional KCV field and Any / Odd / Even parity radios above the Lookup Key button
key-tools Key Lookup

The validation tab is a Key Lookup: give it a key and it reports what the key actually is.

  • Key (Hex)
  • Check KCV? — When ticked, the KCV (Optional) field is compared against the computed value instead of just reporting it.
  • ParityAny, Odd or Even; the check fails if the key does not match the parity you assert.

Button: Lookup Key.

Keyshare Generator

Splits a single key into n shares such that all n are required to reconstruct the key (XOR-based component scheme). Useful for multi-custodian key loading.

Keyshare Generator with global parity and key type options above a 2 Parts / 3 Parts tab pair, showing part fields with a combined key and its KCV
key-tools Keyshare Generator

Inputs

  • Global OptionsParity (Ignore by default) and Key Type (DES/TDES), applied to the whole operation.
  • 2 Parts / 3 Parts — A tab pair rather than a count field; each tab shows exactly that many part fields.
  • Part 1, Part 2 (and Part 3) — Leave them empty to have the tool generate them.

Button: Generate 2 Parts (or 3). The Combined Key and its KCV appear together at the bottom, so the reconstructed value can be checked before it leaves the screen.

Output

  • Random components for shares 1 to n−1.
  • Final component computed so XOR of all components = the master key.
  • KCV of each share for safe transport verification.
Custody

Components must be transported and stored separately under the control of different custodians. Recombining shares brings them under the control of a single trustee, so do this only inside the HSM during loading.

TR-31 Key Block

ASC X9.143 (formerly TR-31) defines a key block format that binds a key to its allowable usage, algorithm, mode, and exportability. A TR-31 block is opaque to anything outside the issuing HSM but lets two HSMs exchange keys without losing metadata.

TR-31 Key block on the Encode tab with KBPK, plain key, header, version id, key usage, algorithm, mode of use, key version and exportability fields, beside the activity log
key-tools TR-31 Key Block

Tabs

  • Wrap — Build a key block from a clear key under a Key Block Protection Key (KBPK).
  • Unwrap — Decode a key block, validate its MAC, and reveal the contents.

Inputs (Wrap)

  • KBPK — 32 / 48 hex chars (3DES) or 64 hex (AES).
  • Clear Key — Key to wrap.
  • Key Usage — Two-character code (e.g. P0 = PIN encryption, M0 = MAC, K0 = Key Encryption Key).
  • AlgorithmD = DES, T = TDES, A = AES, etc.
  • Mode of UseE = encrypt, D = decrypt, B = both, N = no restriction.
  • Key Version Number — Two characters.
  • ExportabilityE = exportable, S = sensitive (no clear export), N = no export.

Output

An ASCII key block string starting with the version (A, B, C, D) plus encrypted key, MAC, and optional optional blocks.

A0072P0TE00E0000ABC...   (D variant TR-31 block)

Thales Key Block

The Thales-specific key block format used by PayShield HSMs. Similar in concept to TR-31 but with Thales’ own header and key usage codes.

Thales Key Block on the Encode tab with a 3DES / AES KBPK version selector, key block protection key with KCV, clear key, and the key block header attributes
key-tools Thales Key Block

Workflow

  • Pick a Thales Key Type — ZMK, ZPK, TMK, BDK, ZEK, etc.
  • Provide the LMK Variant applicable to that key type.
  • Provide the clear key material.
  • The tool returns the encrypted key under LMK along with its KCV.
Tip

Use this when you have a clear key and want to import it under the HSM Simulator’s LMK without typing it through the console.

Thales Key Calculator

Vendor-aware calculations matching Thales PayShield host commands.

Thales Keys Encryption/Decoding with a hex key, key scheme, double or triple LMK size, an LMK pair selector and a variant, above Encrypt and Decrypt buttons
key-tools Thales Key Calculator

Operations

  • Key Generation — Equivalent to A0 (Generate a Key) host command.
  • Key Translation — Equivalent to A6 (Translate a Key from One ZMK to Another).
  • KCV Computation — Match Thales-style 6-digit KCVs for operational sign-off.
  • Variant Application — Apply LMK and ZMK variants used during key wrapping.

Atalla Key Calculator

Atalla / Utimaco AKB-style key block helpers, in both directions: build a key block from a clear key, or take one apart.

Atalla Keys Calculator on the Key Encryption tab with hex key, AKB header and MFK key fields above the Encrypt Key button
key-tools Atalla Key Calculator

Key Encryption

  • Key (Hex) — The clear key to wrap.
  • AKB Header (Hex) — The attribute header that travels inside the block.
  • MFK Key (Hex) — The Master File Key the block is encrypted under.

Button: Encrypt Key.

AKB Decode

AKB Decode form with an Atalla Key Block field, a Check KCV checkbox, an optional KCV, a parity selector and an MFK key, above the Decode AKB button
key-tools AKB Decode
  • AKB (Atalla Key Block) — The block to open.
  • Check KCV? and KCV (S) — Verify the recovered key against a known check value rather than trusting the decode.
  • ParityNone by default.
  • MFK Key (Hex)

Button: Decode AKB.

Safenet Key Calculator

Safenet / Thales Luna key calculations for legacy and modern formats.

Safenet Keys Calculator with a hex key, a key format of single length DES, a DPK variant, hexadecimal key input format and a KM key, above Encrypt and Decrypt buttons
key-tools Safenet Key Calculator

SSL / X.509 Certificate Tool

An end-to-end certificate workflow tool for terminal-host TLS.

SSL Certificate (X.509) Utility on the Keys tab with an RSA key type, 2048-bit length and public and private key fields, beside the activity log
key-tools SSL Certificate (X.509) Utility

Tabs

  • Keys — Generate RSA key pairs (2048 / 3072 / 4096-bit) or read existing keys.
  • CSRs — Build a Certificate Signing Request from a key and DN parameters (CN, OU, O, L, S, C).
  • Read CSR — Parse and display the contents of an existing CSR.
  • Self-Signed — Issue a self-signed certificate from a key + DN, with configurable validity.
  • Read Certificate — Parse and display an X.509 certificate, including extensions.

Inputs

  • Common Name (CN)
  • Organisation (O), Org. Unit (OU)
  • Locality (L), State (S), Country (C)
  • Validity (Days)
  • Key Size — 2048 / 3072 / 4096.

Outputs are displayed as PEM and as parsed fields side-by-side, with a copy button per artifact.

RSA DER Public Key Tool

An RSA public key is a modulus and an exponent, but what a host expects on the wire is those two numbers wrapped in DER. This encoder does that wrapping, and is the tool to reach for when a certificate library rejects a key you know is correct.

DER Public Key Encoder with modulus and exponent fields, their own encoding selectors and a toggle modulus negative checkbox above the Encode Key button
key-tools DER Public Key Encoder

Inputs

  • Modulus with its own Modulus Encoding selector.
  • Exponent with an Exponent Encoding selector — commonly 03 or 010001.
  • Toggle Modulus Negative — DER reads the leading bit as a sign, so a modulus starting above 0x7F needs a leading zero byte. This is the switch for that case.

Button: Encode Key.

Tips

  • Always verify the KCV after combining shares or unwrapping a key block. A wrong KCV almost always means a typo in one share.
  • For TR-31, watch out for case sensitivity in the header — the key usage and mode codes are uppercase.
  • If your HSM rejects an imported key, compare the version byte (A vs B vs C vs D) — older HSMs may only accept specific versions.
  • For SSL, generate the key first, then the CSR, then the cert — the tool will pre-fill DN parameters from a previous CSR if you stay on the same session.