Description of DES algorithm
DES Encryption Process
“DES has a very strong internal structure” [2]. The following figure presents an overview of the DES encryption process.
Figure 1: DES Encryption process
In DES encryption process 2 inputs are provided to the encryption function: a 64 bit plain text and a 56 bit secret key. At first, the 64-bit plaintext is initially permuted. In the next step combination of a permutation and substitution function is executed 16 times, it makes 16 rounds. Left half and right half of the output from the last round are swapped and permuted again. This permutation is an inverse function of the initial permutation function. At last we get a 64 bit cipher text as an output of the whole process [2].
DES Decryption Process
DES decryption process uses the same algorithm as DES encryption process. But in this case the application of the subkeys is reversed [2].
Strength of DES
The main strength of DES is usage of 56 bit keys. For using 56-bit long keys the number of possible key is 256 and so the bruit force attack needs 255 attempts which is quite impractical to complete. So DES is strong against Brute force attack. It is also strong against Differential Cryptanalysis and Linear Cryptanalysis as they need 247 and 243 attempts respectively [4].
Base64 Data Representation
“Base64 data representation is based on a 64 character alphabet” [3]. The alphabet is presented in the following table.
Table 1: Base64 Alphabet
“A binary file is a series of zeros and ones” [3]. These bits are represented with a ‘0’ or ‘1’ character. In Base64 data encoding at first the zeros and ones are grouped into sets of 6 characters. Then these blocks of bits are converted by a single character, which can be calculated from table 1. In this way 6 characters are replaced by a single one. “Thus Base64 alphabet allows converting binary zeros and ones into a compressed and human readable format” [3].
Description of the demo
Programming Language Java
Java has been used here to implement DES including Base64. Java has been chosen as it has some advantages such as it is open source, platform independent, and it has automatic memory management [5]. Besides, the Java platform has some built in packages that make cryptographic implementation easier.
Source code
Result of test run
The test result was as follows.
Conclusion
According to Microsoft - “Confidentiality is the ability to keep a message unreadable by anyone other than the intended recipient; this is achieved through cryptography” [6]. So here to achieve confidentiality DES algorithm has been used including Base64 encoding and also have successfully retrieved the original message by using decryption process.
Reference:
[1] “Secret Key Cryptography”,
[2] William Stallings, Cryptography and Network Security, 4th Edition (Nov 16, 2005), chap 3.
[3] Randy Charles Morin, ‘How to Base64’
[4] Lecture 2 - Computer Cryptography - Part 1, Prof. Sead Muftic and Matei Ciobanu Morogan.
[5] Articlebase Free Online Articles Directory, ‘Java and Its Advantages’,
[6] Microsoft.com, ‘Security Overview’,