Secret key cryptography

essay A+

Get Full Essay

Get access to this section to get all the help you need with your essay and educational goals.

Get Access

Report topic: Message confidentiality, Encrypt/Decrypt an arbitrary message using secret key cryptography including Base64 encoding. Introduction Secret key cryptography is also known as Symmetric Encryption. Here same key is used for both the Encryption and Decryption processes [1]. In this approach, sender and receiver both should know the algorithm to use and the secret key. Sender and receiver should be kept the key secret and they should obtain the key in a secured way [2]. Most commonly used secret key cryptography algorithms are DES, 3DES, RC4 etc [1].

In this test DES has been used to encrypt/decrypt an arbitrary message. Here Base64 encoding has also been used to encode the message. We know that, while sending SMTP e-mails with attachments normal text files can be attached in plain text format, but binary files (such as image files) cannot be attached in the same way. Binary files need some sort of encoding process to be attached with STMP mail. And the most widely used encoding is Base64 [3]. 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. 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.

Get access to
knowledge base

MOney Back
No Hidden
Knowledge base
Become a Member