In cryptography, Triple DES (3DES or TDES), officially the Triple Data Encryption Algorithm (TDEA or Triple DEA), is a symmetric-key block cipher, which applies the Data Encryption Standard (DES) cipher algorithm three times to each data block. At the time of its development, the 56-bit key size of DES was increasingly considered inadequate against newer cryptanalysis techniques, and rapid growth in computer performance, as predicted by Moore's law, made brute-force attacks increasingly possible and practical. Triple DES increases the effective key size to 112 bits. A CVE released in 2016, CVE-2016-2183, disclosed a major security vulnerability in the DES and 3DES encryption algorithms. This CVE, combined with the inadequate key size of 3DES, led to NIST deprecating 3DES in 2019 and disallowing all uses (except processing already encrypted data) by the end of 2023. It has been replaced with the more secure, more robust Advanced Encryption Standard, the AES. While US government and industry standards abbreviate the algorithm's name as TDES (Triple DES) and TDEA (Triple Data Encryption Algorithm), RFC 1851 referred to it as 3DES from the time it first promulgated the idea, and this namesake has since come into wide use by most vendors, users, and cryptographers.
History In 1978, a triple encryption method using DES with two 56-bit keys was proposed by Walter Tuchman; in 1981, Merkle and Hellman proposed a more secure triple-key version of 3DES with 112 bits of security.
Standards The Triple Data Encryption Algorithm is variously defined in several standards documents:
RFC 1851, The ESP Triple DES Transform (approved in 1995) ANSI ANS X9.52-1998 Triple Data Encryption Algorithm Modes of Operation (approved in 1998, withdrawn in 2008) FIPS PUB 46-3 Data Encryption Standard (DES) (approved in 1999, withdrawn in 2005) NIST Special Publication 800-67 Revision 2 Recommendation for the Triple Data Encryption Algorithm (TDEA) Block Cipher (approved in 2017, withdrawn in 2024) ISO/IEC 18033-3:2010: Part 3: Block ciphers (approved in 2005)
Algorithm The original DES cipher's key size of 56 bits was considered generally sufficient when it was designed, but the availability of increasing computational power made brute-force attacks feasible. Triple DES provides a relatively simple method of increasing the key size of DES to protect against such attacks, without the need to design a completely new block cipher algorithm. A naive approach to increase the strength of a block encryption algorithm with a short key length (like DES) would be to use two keys (K1,K2) instead of one, and encrypt each block twice: EK2(EK1(plaintext)). If the original key length is n bits, one would hope this scheme provides security equivalent to using a key 2n bits long. Unfortunately, this approach is vulnerable to the meet-in-the-middle attack: given a known plaintext pair (x,y), such that y=EK2(EK1(x)), one can recover the key pair (K1,K2) in 2n+1 steps, instead of the 22n steps one would expect from an ideally secure algorithm with 2n bits of key. Therefore, Triple DES uses a "key bundle" that comprises three DES keys, K1, K2 and K3, each of 56 bits (excluding parity bits). The encryption algorithm is:
ciphertext=EK3(DK2(EK1(plaintext))). That is, encrypt with K1, decrypt with K2, then encrypt with K3. Decryption is the reverse:
plaintext=DK1(EK2(DK3(ciphertext))). That is, decrypt with K3, encrypt with K2, then decrypt with K1. Each triple encryption encrypts one block of 64 bits of data. In each case, the middle operation is the reverse of the first and last. This improves the strength of the algorithm when using keying option 2 and provides backward compatibility with DES with keying option 3.
EEE operation The text above describes the mode common and standardized EDE (encrypt-decrypt-encrypt) sequence. There is a separate "EEE" (encrypt-encrypt-encrypt) sequence supported by some libraries in two-key or three-key setups.
Keying options The standards define three keying options:
Keying option 1 All three keys are independent. Sometimes known as 3TDEA or triple-length keys.This is the strongest, with 3 × 56 = 168 independent key bits. It is still vulnerable to the meet-in-the-middle attack, but the attack requires 22 × 56 steps. Keying option 2 K1 and K2 are independent, and K3 = K1. Sometimes known as 2TDEA or double-length keys.This provides a shorter key length of 56 × 2 or 112 bits and a reasonable compromise between DES and keying option 1, with the same caveat as above. This is an improvement over "double DES" which only requires 256 steps to attack. NIST disallowed this option in 2015. Keying option 3 All three keys are identical, i.e. K1 = K2 = K3.This is backward-compatible with DES, since two of the operations cancel out. ISO/IEC 18033-3 never allowed this option, and NIST no longer allows K1 = K2 or K2 = K3. Each DES key is 8 odd-parity bytes, with 56 bits of key and 8 bits of error-detection. A key bundle requires 24 bytes for option 1, 16 for option 2, or 8 for option 3. NIST (and the current TCG specifications version 2.0 of approved algorithms for Trusted Platform Module) also disallows using any one of the 64 following 64-bit values in any keys (note that 32 of them are the binary complement of the 32 others; and that 32 of these keys are also the reverse permutation of bytes of the 32 others), listed here in hexadecimal (in each byte, the least significant bit is an odd-parity generated bit, which is discarded when forming the effectively 56-bit key):
… excerpt ends here. Continue reading the full article.


