DES Encryption

Encrypt and decrypt with DES (ECB/CBC). For legacy system compatibility testing.

DES Encrypt / Decrypt

0/8 characters

DES is considered insecure. Use AES for production.

DES is the cipher to study, not the cipher to use: a 64-bit block, a key that must be exactly 8 characters here, and an effective keyspace of 72,057,594,037,927,936 keys — a number that sounded unassailable in 1977 and stopped being one decades ago.

How dead is a 56-bit key

The 8 characters you type become 64 key bits, but DES ignores one bit per byte as parity, leaving 56 bits of actual key. The EFF's purpose-built Deep Crack machine brute-forced that space in 56 hours back in 1998, on 1998 hardware and a budget of about a quarter million dollars; today, rented GPU time gets there in far less. NIST formally withdrew DES as a standard in 2005. So three real use cases are left: interoperating with legacy systems that still emit DES ciphertext, verifying what an old codebase actually produced before you migrate it, and learning block-cipher mechanics on the algorithm every textbook uses. The key rule here is exact: fewer than 8 characters gets the error "Key must be exactly 8 characters for DES," and the field simply stops accepting input past 8 — paste a 20-character key and only the first 8 land, with the live counter showing 8/8 so the cut is visible rather than silent.

On decrypt, a wrong key almost always produces bytes that are not valid UTF-8, which surfaces as a plain "Decryption failed" — the tool cannot distinguish a wrong key from ciphertext produced under a different mode or a mangled Base64 string, so rule out copy-paste truncation before assuming the key is wrong. In CBC mode an IV field appears below the mode selector: DES's block is 8 bytes, so the IV is 8 characters (not 16 like AES). Leave it blank for an all-zero IV — deterministic, and for a single-block message the output is then byte-identical to ECB, since chaining has nothing earlier to mix in — or type an IV, which is cut or right-padded with "0" to exactly 8 characters. Decryption needs the same IV that encrypted the data.

DES-ECB, key "12345678"
Input: hello
Output: uhbGoCVxJa8=
One 8-byte block after PKCS#7 padding, Base64-encoded. Deterministic in ECB mode — OpenSSL's des-ecb with key hex 3132333435363738 produces the identical output, so you can use this tool to cross-check legacy pipelines.
Good to know: If you are migrating DES data forward, decrypt here to confirm you hold the right key, then re-encrypt with AES-256 — do not chain another layer of DES on top and call it done.

The Jasypt tool on this site is DES underneath too — PBEWithMD5AndDES — which is exactly why stock Jasypt configs are worth migrating. For new work, use the AES tool.

Further reading