# DES – bringing cryptography into the public domain

Data Encryption Standard (DES) is a legacy symmetric-key algorithm that has been highly influential in the advancement of cryptography.

## Overview

Data Encryption Standard (DES) is a symmetric-key algorithm and block cipher. It was first published in 1977 and contributed to bringing secure cryptography, that was largely reserved to governments at the time, into the public domain. In 2002 it was replaced by AES. Today, DES is considered to be too insecure for modern applications.

## Usage

### Key

DES expects a key of 8 bytes. As a symmetric-key algorithm the same exact key is used for both encryption and decryption. Only someone who knows the exact key that was used to encrypt a message can turn back the encrypted result to its original content, at least in theory. In practice, DES is known to be vulnerable to brute force attacks due to the length of its key.

### Initialization Vector

The DES initialization vector (IV), also called starting variable, consists of 8 bytes and determines the starting point of the DES encryption process. It should be unique for each encryption. To successfully decrypt a previously DES encrypted message the same IV used during said encryption needs to be provided to the decryption process. Thus, both the key and the IV need to be kept after encryption.

The purpose of IVs is to introduce randomness into the encrypted data. When the IV is set to a fixed value the same key and input data would always result in the same encrypted data. An attacker could use this property to infer relationships between messages.

## Implementation

The DES encryption operation relies on the JavaScript library forge providing a native implementation of TLS alongside with related cryptographic tools.