DES Encrypt & Decrypt Online

Online tool to perform encryption and decryption using DES algorithm

About DES

DES is a symmetric-key block cipher with a block size of 64-bit and a key size of 56-bit. This algorithm has been considered insecure because of short key size and has been replaced by AES (Advanced Encryption Standard). A famous block cipher based on DES is called Triple DES, which applies DES cipher three times for each data blocks.

The DES algorithm consists of these stages:

  1. Initial Permutation
  2. Enciphering
  3. Final Permutation

Initial Permutation and Final Permutation are used to mutate plaintext and result of enciphering respectively. Both stages are inverse of each others.

First the block is divided into two 32-bit. The enciphering stage consists of 16 identical stages, which processed alternately using the criss-crossing Fiestel scheme. The decryption processed is similar to encryption process, but with the subkeys are applied in reverse order. The Fiestel scheme consists of four stages: Expansion, Key Mixing, Substitution, and Permutation. In the Expansion stage, the 32-bit block is expanded into a 48-bit block. Then in the Key Mixing, the results are combined with a subkey using XOR operation. Afterwards, the block is divided into eight 6-bit parts, each will be processed by substitution box (S-Box). Each S-Box processes a 6-bit part to generate a 4-bit output. Last, in the Permutation stage, the 32-bit outputs rearranged using a fixed permutation.

Example 1