DES / 3DES: Block Modes, Padding and Passphrase Derivation

Open Tool DES / 3DES Encryption

How much strength DES still has

A DES block is 64 bits and the key is nominally 8 bytes, but the eighth bit of each byte is parity, leaving 56 bits in play. That no longer constitutes a barrier, so DES survives only for legacy compatibility and teaching. 3DES runs encrypt-decrypt-encrypt with three keys for roughly 112 bits of strength, far better, though the 64-bit block keeps it an order of magnitude slower than AES on bulk data. The algorithm field offers exactly these two.

Steps

  1. Choose DES or 3DES and one of CBC, ECB, CFB or OFB.
  2. For passphrase-derived keys, enter the passphrase, salt and iteration count, then derive; or type a key directly and let format detection handle hex or text.
  3. IV is required for CBC, CFB and OFB — generate a random one; ECB needs none.
  4. Pick PKCS#7, Zero or no padding, and Base64 or hex ciphertext.
  5. Paste plaintext or ciphertext, encrypt or decrypt, then copy the result.
  6. Files go through choose-file followed by encrypted or decrypted download.

How the modes differ

ECB encrypts each block independently, so identical plaintext blocks yield identical ciphertext and an image still shows its outline — fine for checksums, useless for secrecy. CBC XORs the previous ciphertext into the next plaintext block and needs a fresh random IV each time; reusing an IV leaks relationships between messages. CFB and OFB turn the block cipher into a stream cipher, so ciphertext matches plaintext length with no padding, suiting fixed-length payloads. Every IV-bearing mode requires storing the IV alongside, or the first block never decrypts.

Padding and key derivation

PKCS#7 appends bytes whose value equals the pad length — three missing bytes become 0x03 0x03 0x03 — so decryption reads the last byte to know how much to strip. Zero padding cannot distinguish padding from genuine trailing zeros. No padding requires plaintext length to be a multiple of eight bytes or the operation errors. PBKDF2 stretches any passphrase into a fixed-length key; higher iteration counts slow brute force, with ten thousand a floor and six hundred thousand near modern guidance.

Common problems

Protecting real data with DES ignores that 56-bit keys fall to dedicated hardware in hours. A fixed IV in CBC drags ECB's weakness back in, since identical prefixes produce identical ciphertext prefixes. Wrong key length — 8 bytes for DES, 24 for 3DES — either errors or truncates to a wrong key. Mismatched algorithm or mode between encrypt and decrypt yields garbage. Deleting Base64 line breaks, or inserting spaces, breaks decoding. And losing the salt or iteration count makes derived-key ciphertext unrecoverable.

When not to use it:New projects belong on AES-256-GCM, which provides confidentiality and integrity together; the DES family has no authentication, so tampering surfaces only as undecryptable garbage. Against quantum threats AES-256 is the realistic answer too. Long-lived secrets do not belong in a web form at all but in server-side key management. This tool is right for legacy integration, validating archived data and comparing algorithm output — not for production encryption.

⏫︎