Why DES and 3DES Are Obsolete
Audits of payment terminals, mainframes, old VPN concentrators and industrial controllers still turn up DES and Triple DES. Both were sound designs for their time, and neither has a practical shortcut attack on the cipher itself. They were retired for two plain numbers: a key that is too short, and a block that is too small. Both numbers are worth understanding, because the same arithmetic decides whether any cipher is still safe.
DES in one paragraph
The Data Encryption Standard (FIPS 46, 1977) is a 16-round Feistel cipher designed at IBM with NSA input. It has a 64-bit block and a 56-bit key (the key is written as 8 bytes, but the lowest bit of each byte is a parity bit and is ignored). Its S-boxes were famously resistant to differential cryptanalysis, which the public only rediscovered in 1990. Its weakness was always the key length, criticised from the start.
Problem 1: a 56-bit key
The key space has keys, about . In 1998 the EFF's purpose-built machine "Deep Crack" (about 250,000 US dollars) found a DES key in 56 hours; in 1999 it and the distributed.net volunteers did it in under 23 hours. Today rented FPGA or GPU clusters do it in hours to days, and services have offered DES key recovery for some protocols for years.
Brute force is easy to demonstrate on a toy: below, the example creates a DES key and pretends the attacker already knows 6 of its 8 bytes, so only 16 bits are unknown. The search runs through that toy key space in under a second in your browser.
from Crypto.Cipher import DES
# A toy key space made by this example: a DES key whose first 6 bytes are known, 2 bytes (16 bits) are secret.
known = bytes.fromhex("133457799bbc")
secret = bytes.fromhex("dff1")
key = known + secret
pt = b"LABTEST!"
ct = DES.new(key, DES.MODE_ECB).encrypt(pt)
for guess in range(1 << 16):
k = known + guess.to_bytes(2, "big")
if DES.new(k, DES.MODE_ECB).encrypt(pt) == ct:
found = k
break
print("found key:", found.hex(), "after", guess + 1, "tries")
# DES ignores the lowest bit of each key byte (parity), so several 'keys' are equivalent:
print("equivalent to the secret:", DES.new(found, DES.MODE_ECB).encrypt(pt) == ct)
print("DES key space 2^56 =", f"{2**56:.2e}", "keys")
print("Sweet32: 64-bit blocks collide after about 2^32 blocks =", 2**32 * 8 // 2**30, "GiB")
print("AES: 128-bit blocks collide after about 2^64 blocks =", f"{2**64 * 16 / 2**60:.0f}", "EiB")found key: 133457799bbcdef0 after 57073 tries
equivalent to the secret: True
DES key space 2^56 = 7.21e+16 keys
Sweet32: 64-bit blocks collide after about 2^32 blocks = 32 GiB
AES: 128-bit blocks collide after about 2^64 blocks = 256 EiB
The search found ...def0, not the ...dff1 the example chose, and it decrypts just as well: the two keys differ only in parity bits, which DES ignores. That is the 56-bit key showing through the 64-bit key format. Scale the same loop from to tries, a factor of , about , and you have the real attack, which is only a matter of hardware.
3DES: fixing the key, not the block
Triple DES (TDEA, NIST SP 800-67) encrypts three times: . With three independent keys the key is 168 bits, but a meet-in-the-middle attack (store the results of one end, search from the other) cuts the effective strength to about 112 bits. With two keys () the nominal strength is lower still, about 80 bits under known attacks. So 3DES fixed problem 1, at three times the cost of DES. It kept the 64-bit block.
Problem 2: a 64-bit block, and Sweet32
In CBC mode, two ciphertext blocks that happen to be equal leak information: if then , so the XOR of the two plaintext blocks is known from public values. For random-looking ciphertext blocks of bits, the birthday bound says a repeat is likely after about
For a 64-bit block that is blocks, bytes GiB: a quantity of traffic a long-lived HTTPS or VPN connection can carry. In 2016 Karthikeyan Bhargavan and Gaëtan Leurent published Sweet32 (CVE-2016-2183 for TLS, CVE-2016-6329 for OpenVPN's Blowfish): JavaScript in the victim's browser generated about 785 GB of HTTPS traffic over one 3DES connection in less than two days, and the collisions revealed a secret session cookie that appeared in every request. For AES's 128-bit blocks the same bound is blocks, bytes EiB, far beyond any connection.
The official retirement
- DES: withdrawn as a NIST standard in 2005.
- 3DES: NIST SP 800-131A Rev. 2 limited encryption to blocks per key and disallowed it for new encryption after 2023; SP 800-67 was withdrawn on 1 January 2024. Decryption of legacy data remains allowed.
- TLS: RFC 8446 (TLS 1.3) contains no DES, 3DES or 64-bit-block ciphers; OpenSSL 1.1.0 moved 3DES out of the default list, and OpenSSL 3 puts DES in its "legacy" provider.
cryptographyhas moved TripleDES intocryptography.hazmat.decrepit, and announced its removal from the main namespace.
How DES and 3DES are detected
- TLS: scan your own servers for
TLS_RSA_WITH_3DES_EDE_CBC_SHAand similar suites (openssl s_client -cipher DES-CBC3-SHA, testssl.sh, Nmap'sssl-enum-ciphersscript, all within your scope). Vulnerability scanners report Sweet32 by its CVE. - VPN and SSH:
3des-cbcin SSH server configs,cipher DES-EDE3-CBCorBF-CBCin OpenVPN configs. - Code and data:
DES.new,DESede,TripleDES,des-ede3, 8-byte block sizes in custom protocols, ciphertext lengths that are multiples of 8 but not of 16. - Payment and legacy systems: PIN blocks and key-management protocols in finance still use 3DES under strict per-key limits; inventory them explicitly.
How it is fixed
- Replace with AES-GCM or ChaCha20-Poly1305; in TLS, allow only TLS 1.2 AEAD suites and TLS 1.3.
- Where 3DES cannot be removed yet: rekey frequently (far below blocks per key), limit connection lifetime, plan the migration with a date.
- Re-encrypt stored DES/3DES data under AES; keep decrypt-only support for the migration window.
Pitfalls
- Thinking 3DES is "triple strong": its effective key strength is about 112 bits, and its block size is still 64 bits.
- Replacing DES with AES-ECB: the cipher changes, the codebook leak stays.
- Ignoring other 64-bit block ciphers: Blowfish, IDEA, CAST5 and GOST 28147 share the Sweet32 problem.
Practice
1. A VPN uses Blowfish in CBC mode and rekeys every 64 GiB. Is Sweet32 a concern?
Yes. Blowfish has 64-bit blocks, so collisions are expected around blocks, 32 GiB, before the rekey. Rekey well below that (OpenVPN added a default limit of 64 MB for 64-bit ciphers after Sweet32) or, better, switch to AES-GCM.
2. In the toy search, why did the program find a key that differs from the one the example created?
The two keys differ only in the lowest bit of each of the last two bytes (df and de, f1 and f0): parity bits that DES ignores, so both encrypt identically. DES has 8 such bits, which is why a 64-bit key gives only 56 bits of security.
3. How much traffic does it take to reach the birthday bound with a 128-bit block?
blocks of 16 bytes, bytes EiB, which no single connection or key in practice comes near.
Test yourself
How many effective key bits does DES have?
- 64
- 56
- 112
- 128
What did the Sweet32 attack exploit?
- A flaw in the DES S-boxes
- Birthday collisions of 64-bit cipher blocks after about 32 GiB of traffic
- Weak RSA keys
- A timing leak in AES
Why is the effective strength of three-key 3DES about 112 bits, not 168?
- Parity bits
- Meet-in-the-middle attacks
- The 64-bit block
- Sweet32
Which replacement fixes both of DES's problems?
- 3DES
- AES-GCM
- Blowfish
- DES with a longer password