All Tools
Tools/TR-34 Protocol Diagram
📊
CryptographyAvailable
TR-34 Protocol Diagram
Interactive TR-34 key distribution diagram. Configure key attributes and actor names — the sequence diagram and KTKDH token formula update live with your values.
Use test data only. All calculations run locally in your browser — PayProbe never sees, transmits, or stores your PAN, CVV, keys, PINs, or cryptographic inputs. How we handle data →
KRDATM EPP
KDHBank HSM
Phase 1Bind Phase — Credential ExchangeMust complete before key transport
A1
Send CTKRD
CTKRD = { CertKRD }── CTKRD ──────────────────────────────────────────────▶
B1
Validate CertKRD — store
Verify: chain(CertKRD) → CA root
keyUsage = keyEnciphermentB2
Send CTKDH
CTKDH = { CertKDH ‖ CRLCA_KDH }◀── CTKDH (CertKDH + CRL) ────────────────────────────
A2
Validate CTKDH — store credentials
store( CertKDH, CRLCA_KDH ) in secure boundaryPhase 2Key Transport — 2-Pass (RKRD nonce)
A1
Generate nonce — send RTKRD
RTKRD = { RKRD: 8F9FFB55FDCFE3F7 }── RTKRD { 8F9FFB55FDCFE3F7 } ──────────────────────────▶
B1
Receive RKRD
store( RKRD = 8F9FFB55FDCFE3F7 )B2
Generate Kn + build KBH
Kn = random Triple DES (3DES)
KBH = B0096P0TE00N0000B3
Generate ephemeral key KE
KE = random TDEA-192 // never reusedB4
Encrypt key block → BE
BE = EKE( Version ‖ IDKDH ‖ Kn ‖ B0096P0TE00N0000 )B5
RSA-encrypt ephemeral key → EncryptedKey
EncryptedKey = RSA-OAEP( PubKRD, KE )B6
Assemble & sign KTKDH
8F9FFB55FDCFE3F7 ‖ B0096P0TE00N0000 ‖ EncryptedKey ‖ BE ‖ SKDH(...) ‖ CRL◀── KTKDH ────────────────────────────────────────────
A2
Verify signature + check RKRD
Verify SKDH(RKRD ‖ KBH ‖ EncKey ‖ BE) using CertKDH
Assert: token RKRD == 8F9FFB55FDCFE3F7A3
Decrypt KE → decrypt BE → verify
KE = DPrivKRD(EncryptedKey)
(Ver, ID, Kn, KBH) = DKE(BE)
Assert: ID == CertKDH fingerprint && KBH == B0096P0TE00N0000A4
Load Kn — compute KCV
Load Kn as PIN Encryption Key (ZPK), Triple DES (3DES), Encrypt only, Non-exportable
KCV(Kn) = 3DES-ECBKn(0x0000000000000000)[0:3]KTKDH Token — Field Assembly
Your configured values substituted into the exact X9 TR34-2012 token formula
Formula:
KTKDH = RKRD ‖ KBH ‖ EncryptedKey ‖ BE ‖ SKDH(RKRD ‖ KBH ‖ EncKey ‖ BE) ‖ CRLCA_KDH