This increased
dependence on the Internet implies that information security is more essential
than ever. The stakes are now too high. Users must understand that their
sensitive data is confidential, unaltered, and easily accessible to authorized
readers.
Data encryption is
only one weapon in the cybersecurity arsenal, but it is one of the oldest and
most widely used.
What is Data Encryption Standard (DES)
DES stands for Data
Encryption Standard. There are specific machines that can be used to crack the
DES algorithm. The DES algorithm uses a 56-bit key. Using this key, DES takes a
block of 64-bit plaintext as input and generates a block of 64-bit ciphertext.
The DES process has several steps, each
called a round. The number of rounds varies depending on the size of the wrench
used. Lets see a DES example, a 128-bit
key needs 10 rounds, a 192-bit key needs 12 rounds, and so on.
The Data Encryption
Standard (DES) algorithm is a symmetric-key block cipher developed in the 1970s
by an IBM team and embraced by the National Institute of Standards and
Technology (NIST). The algorithm takes plaintext in 64-bit blocks and converts
it to ciphertext using 48-bit keys.
Since it is a
symmetric key algorithm, it uses the same key to encrypt and decrypt data. If
it were an asymmetric algorithm, it would use other keys for encryption and
decryption.
History of the DES algorithm
DES is based on a
Feistel block cipher called LUCIFER, developed in 1971 by IBM cryptography
researcher Horst Feistel. DES uses a 16-round Feistel structure using a
different key for each game.
DES became the
authorized federal encryption standard in November 1976 and was subsequently
reaffirmed as a standard in 1983, 1988, and 1999.
The dominance of DES
ended in 2002 when the Advanced Encryption Standard (AES) replaced the DES
encryption algorithm as the accepted standard after a public competition to
find a replacement. NIST officially withdrew FIPS 46-3 (1999 reaffirmation) in
May 2005, although Triple DES (3DES) remains approved for sensitive government
information until 2030.
Steps of the DES algorithm
Let’s glance at the steps entangled in the DES algorithm:
” The initial permutation (IP) function accepts
a 64-bit plaintext block.
” IP is done on plain text.
” The IP then forms two halves of the block that
has been permuted. The two halves are left with plain text (LPT) and correct
text (RPT).
” Every LPTs and RPTs are encrypted 16 times.
” The LPT and RPT are combined, and a final
permutation (FP) is performed on this block.
” The 64-bit ciphertext is now ready.
There are five stages
in the encryption process (step 4):
” A key transformation
” Expansion Permutation
” Permutations of the S-Box
” Permutation of P-Box
” XOR and swap
The same algorithm is
used in the decryption process with the reverse order of the 16 keys.
DES operating modes
” Professionals using DES have five different
operating modes to choose from.
” Electronic Dial Book (ECB). Every 64-bit block
is encrypted and decrypted unaided.
” Cipher Block Chaining (CBC). Each 64-bit block
relies on the earlier one and uses an initialization vector (IV)
” Encrypted Feedback (CFB). The previous
ciphertext becomes the input to the ciphertext algorithm. It produces a
pseudo-random output, XORed with the plaintext to make the next ciphertext
unit.
” Output Feedback (OFB). Similar to CFB, except
that the input to the encryption algorithm is the output from the previous DES
” Counter (CTR). Every plaintext block is XORed
with an encrypted counter. The counter is then incremented for each successive block.
DES implementation and testing
” DES implementation requires a security
provider. However, there are many providers available to choose from, but
choosing one is an essential initial step in implementation. Your choice may
depend on languages like Java, Python, C, or MATLAB.
” Once you’ve decided on a provider, you must
choose whether to have a random secret key generated by KeyGenerator or create
your own key using plain text or a byte array.
” It is also essential to test the encryption to
ensure it is implemented correctly. You can find a test procedure that will do
the trick using the iteration relation found on GitHub.
Application of the DES algorithm
” The DES algorithm is used whenever less strong
encryption is required.
” It can be utilized in random number generators
or as permutation generators.
” One of the most significant practical
applications of the DES algorithm is the creation of triple legacy DES systems
with three keys.
Steps for encryption
Attempting to encrypt
data involves several steps. They are:
” Permute the 64 bits in the plaintext and split
them into two equal halves.
” These 32-bit chunks of data go through several
cycles of operations.
” Use the XOR operation between the extended
plaintext and the compressed 48-bit key.
” The resulting output is sent to the next step,
known as S-box substitution.
” Now XOR the output and the left plaintext and
store it in the right plaintext.
” Store the initial right plaintext in the left
plaintext.
” Both halves of the LPT and RPT are passed to
the next rounds for further operations.
” At the end of the last round, flip the data in
LPT and RPT.
” In the last step, use the inverse permutation
step to get the ciphertext.
Decryption steps
The steps involved in
the data decryption steps are:
1. The order of the
16 48-bit keys is reversed so that key 16 becomes key 1 and so on.
2. Encryption steps
are applied to the ciphertext.
Advantages of the DES algorithm
” Technically, no drawbacks have been discovered
in the algorithm. Brute force attacks are still the most effective attacks
against the DES algorithm.
” DES is a standard set by the US government.
The government re-certifies the DES every five years and must apply for a
replacement if necessary.
” The American National Standards Institute
(ANSI) and the International Organization for Standardization (ISO) have
declared DES a standard. This indicates that the algorithm is available to the
public to learn and implement.
” DES was developed for hardware; it is quick in
hardware but only relatively fast in software.
Disadvantages of the DES algorithm
” The most significant disadvantage of the DES
algorithm is the key size of 56 bits. Available chips can encrypt and decrypt a
million DES operations per second. A DES cracker that can scan all keys in
about seven hours is available for $1 million.
” DES can be quickly implemented in hardware.
But since it wasn’t designed for software, it’s relatively slow on it.
” Breaking the encrypted code in DES is becoming
easier as the technology continues to improve. Nowadays, AES is preferred over
DES.
” DES uses a single key for encryption and
decryption because it is a type of symmetric encryption technique. If one key
is lost, we will not be able to receive decryptable data at all.
Conclusion
DES is a symmetric
block code that can be operated to encrypt 64 bits of plaintext into 64 bits of
ciphertext. The algorithm is the same for both the encryption and decryption
processes. The only distinction is that the decryption procedure is the
opposite of encryption. The algorithm goes via 16 rounds and creates it stronger.
Even though much stronger encryption algorithms are available, learning about
DES is still essential because it helped advance cryptography as we know it
today.