Smart Card Key Diversification Calculator
Derive card-specific keys from a master key and diversification data (PAN, PAN sequence). Supports EMV CSK Option A & B, Visa SD, Mastercard CAP, and MIFARE SAM derivation patterns. All cryptographic operations run in-browser via Web Crypto API — keys never leave your device.
Input Parameters
Derived Card Key
How to Use This Calculator
Key diversification is the process of deriving a unique per-card key from a master key. This is the cornerstone of smart card security — instead of storing the same key on every card (which would compromise all cards if one is broken), each card gets a unique key derived from the master key + card-specific data (typically the PAN).
EMV Option A: Most common. Uses 16-byte master key. PAN + PAN Seq → 3DES encrypt → card key.
EMV Option B: Uses 24-byte (double-length) 3DES key. Stronger but less common.
Visa SD: Specific to Visa Smart Debit/Credit. PAN (right-justified) → 3DES encrypt.
MIFARE SAM: AES-128 based, used in NXP MIFARE SAM AV2/AV3 secure access modules.
Related Tools
GP Session Key Calculator — SCP02/SCP03 session key derivation | MIFARE Access Bits Calculator — Sector trailer permissions | APDU Command Builder — Build APDUs for key operations