Tools

    KCV calculator (key check value)

    DES/TDES/AES KCV per component and of the combined key, with parity.

    • Runs in your browser
    • No sign-up

    Input

    16 bytes · KCV 08D7B4 · odd parity

    KCV 08D7B4

    Result

    KCV (DES / TDES)
    08D7B4
    Key length
    16 bytes
    Parity
    odd parity

    Exchanging keys with a new processor or gráfica? IDNTEQ coordinates the hand-offs. Card-program implementation in Brazil

    About this tool

    Runs in your browser. This page loads no analytics or third-party scripts and does not send what you type.

    Enter a key to get its KCV. DES/TDES uses the encrypt-zero-block convention; AES uses the GlobalPlatform SCP03 convention (encrypt a block of 0x01). Add components to see the KCV of each one and of their XOR, and set odd or even parity.

    KCV conventions

    For DES and TDES the KCV is the first three bytes of the ciphertext produced by encrypting eight zero bytes under the key. For AES the tool uses the SCP03 convention (encrypt sixteen bytes of 0x01) and returns the first three bytes. Other systems compute AES check values differently (some use AES-CMAC), so compare KCVs only when both sides use the same convention. The KCV is computed with the algorithm you select; a key whose length does not fit that algorithm (8, 16 or 24 bytes for DES/TDES; 16, 24 or 32 for AES) is rejected rather than switched to the other one.

    Load a published example to compare the result with a known value: the double-length TDES key of the AWS Payment Cryptography Visa examples has KCV 08D7B4.

    Components and parity

    Split-knowledge key ceremonies combine two or three components by XOR. Add components and the tool shows the KCV and the parity of each component, so each custodian can check theirs, and the KCV of the combined key. The combined key itself is hidden until you choose Show. A component that is not valid hex, or not the same length as the others, is reported as an error. DES parity can be set to odd (the DES convention) or even on the result; the KCV does not change, because DES ignores the parity bits.

    Spec references

    • GlobalPlatform Card Specification (SCP03 KCV)
    • ANSI X9.24 (key management)
    • NIST SP 800-67 (TDES)

    Verified against

    Specifications
    • ANSI X9.24 (DES/TDES check value: encrypt 8 zero bytes)
    • GlobalPlatform SCP03 convention for AES (encrypt 16 bytes of 01)
    Published examples in the tests
    Other checks in the tests
    • Single- and double-length DES and AES-128/192/256 check values against OpenSSL
    • Component XOR, odd and even parity, components of different lengths rejected
    • AES check value 2CF6A4 of the SP 800-38A key, computed with OpenSSL (no published value found)
    Inputs
    Keys and components in hex: DES/TDES 8, 16 or 24 bytes, AES 16, 24 or 32 bytes.
    Not covered
    AES-CMAC based check values (another AES convention) are not computed.
    Last reviewed