⚡
usefultools.dev
TR31

Key Block Decoder (TR-31 / X9.143)

NOVO

Decode a TR-31 / ANSI X9.143 key block header and optional blocks, then verify the MAC and unwrap the key with a test KBPK for versions A, B, C and D.

Funciona 100% no seu navegador — o que você insere nunca é enviado nem armazenado nos nossos servidores.

Esta ferramenta ainda não está totalmente traduzida, por isso parte do texto continua em inglês. A ferramenta funciona da mesma forma em todos os idiomas.

Key block header
Pos.FieldValueMeaning
1Version IDAKey variant binding method (TDES) — deprecated
2–5Key block length007272 characters
6–7Key usageP0PIN encryption key
8AlgorithmTTriple DES (TDES)
9Mode of useEEncrypt / wrap only
10–11Key version number00No key versioning
12ExportabilityEExportable under a trusted key
13–14Optional blocks000 optional block(s)
15–16Reserved00Reserved (00)
Unwrap with a test KBPK (versions A, B, C, D)

TDES 16 / 24 bytes for A, B, C; AES 16 / 24 / 32 bytes for D.

Runs entirely in your browser. Use test keys only — never paste production keys or key blocks into a web page.

⚡

Exemplos rápidos

Entradas típicas e os resultados que esta ferramenta gera.

Header
A0072P0TE00E0000…
P0 PIN key · TDES · encrypt only
Unwrap
Same block · KBPK 89E8…380C
Key F039121B…B22AAF8F
KCV
Key F039121B…B22AAF8F
KCV CB9DEA
Header
Version ID D
AES key derivation binding
Header
Key usage B0
Base derivation key (BDK)
📖

Visão geral

A TR-31 key block (now standardised as ANSI X9.143) carries an encrypted key together with a readable header that says what the key may be used for: key usage, algorithm, mode of use, version and exportability, plus optional blocks such as a DUKPT key set ID. A MAC binds header and key so neither can be changed.

This TR-31 decoder explains every header field and lists the optional blocks as you paste the key block. Add a test key block protection key to verify the MAC and unwrap the key: versions A and C (TDES variant binding), B (TDES derivation binding with CMAC) and D (AES derivation binding with AES-CMAC) are supported, and the key check value of the unwrapped key is shown.

Por que usar esta ferramenta?

  • Read key usage and restrictions at a glance
  • Verify and unwrap test key blocks
  • Supports TDES and AES key blocks
  • Runs locally — use test keys only
⭐

Recursos

🧾

Header decoding

All 16 header characters explained.

🧩

Optional blocks

KS, KC, KP, PB, TS and more, with extended lengths.

🔓

Unwrap A/B/C/D

MAC check, then decryption with your KBPK.

✅

Key check value

KCV of the unwrapped TDES or AES key.

🛠️

Como usar

1

Paste the key block

The header is decoded immediately.

2

Read the fields

Usage, algorithm, mode of use and optional blocks.

3

Enter a test KBPK

TDES for A/B/C, AES for D.

4

Verify MAC and unwrap

Copy the key and compare its KCV.

🤔

Perguntas frequentes