DES: Data Encryption Standard, is a symmetric encryption algorithm used for data encryption and decryption.
It was developed in the late 1970s and became the standard encryption algorithm for the U.S. federal government in the 1980s.
In DES, the plaintext is divided into 64-bit blocks, and the key length is 64 bits.
However, in DES, the key is effectively 56 bits due to the inclusion of parity bits (the 8th, 16th, 24th, 32nd, 40th, 48th, 56th, and 64th bits are used for parity checking). The encryption process involves bitwise substitution or permutation of the plaintext block with the 56-bit key to generate the ciphertext block.
Padding Modes
- None: No padding
- PKCS7: Padding consists of a byte sequence, with each byte padded to the length of the byte sequence
- Zeros: Padding consists of bytes set to zero
- ANSIX923: Padding consists of a byte sequence, where the last byte of the sequence indicates the length and other bytes are filled with zeros
- ISO10126: Padding consists of a byte sequence, where the last byte of the sequence indicates the length and other bytes are filled with random data
For block symmetric encryption algorithms, some operation modes require the byte length of plaintext data to be a multiple of the block size, so we must pad the plaintext data before encrypting it.