S-DES — Simplified DES

The teaching version of the Data Encryption Standard: an 8-bit block, a 10-bit key, and two Feistel rounds — small enough to follow every bit by hand. Toggle any bit below and the whole pipeline updates. The gold numbers above a row show where each bit came from.

Click a bit to toggle it.

Click a bit to toggle it.

Plaintext
Ciphertext

Key schedule — two round keys from one key

Before any encryption happens, the 10-bit key is stretched into two 8-bit round keys: shuffle with P10, split into halves, rotate, and compress with P8. Both round keys are fixed the moment the key is chosen.

Encryption — through the pipeline

How it works

S-DES was designed by Edward Schaefer at Santa Clara University in 1996 as a teaching version of the Data Encryption Standard (FIPS 46, 1977). It keeps every structural feature of the real cipher — an initial permutation, Feistel rounds built from expansion, key mixing, S-box substitution and a permutation, a swap between rounds, and a final inverse permutation — but shrinks the numbers so a single encryption can be worked through by hand: 8-bit blocks, a 10-bit key, two rounds, two S-boxes.

The S-boxes are the heart of the cipher. Every other step — P10, P8, IP, E/P, P4 — just moves bits around or XORs them, and those are linear operations. The S-box lookup is the only place where the output is not a simple rearrangement of the input, and that non-linearity is what the whole construction depends on.

The Feistel structure is what makes decryption work. A round only ever modifies the left half, by XORing it with a function of the right half and the round key; the right half passes through untouched. XOR undoes itself, so running the same machinery with the round keys in the opposite order — K₂ first, then K₁ — peels the rounds off in reverse. Hit switch to decrypt above and the pipeline carries your ciphertext back to the plaintext through exactly the same diagram.

Real DES scales the same skeleton up: 64-bit blocks, a 56-bit key, sixteen rounds, and eight larger S-boxes that map six bits to four. The lookup rule is the same one used here — outer bits pick the row, inner bits pick the column.