# Cognitive And Symmetric Key Cryptographic Algorithm Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Today, Cryptographic schemes play a major role in storage, retrieval and transfer of data and code in a secured manner. The major factors which determine the efficiency of a cryptographic system are computational speed, level of security provided, Cost effectiveness and key size of the algorithm. Choosing the optimal bit size for keys in encryption and decryption algorithm is necessary for the efficient computation of the algorithm and bit size of the key is directly proportional to the complexity of the algorithm and in turn cost of the encryption and decryption algorithm. In this paper, we propose a novel cost-effective small key size symmetric key algorithm which is suitable to all sizes of data and all kinds of data such as audio and video because of its low key size and high computational speed.

Keywords- Cryptographic schemes, computational speed, key size, cost effectiveness, symmetric key algorithm.

## INTRODUCTION

In Today's world, data security plays a prominent role in all areas and with latest advancements in the fields of data storage and processing speeds, the focus towards security is even more increased. Basically cryptography is the way of transforming the ordinary data or information into meaningless information in order to maintain the secrecy of its contents. Usually the type of data being dealt with, determines the type of security model to be used for it. Conversion of plain text to cipher text is referred to as Encryption and vice versa is termed as Decryption.

Usually the major security goals to be satisfied are Availability, Confidentiality and Integrity. And Cryptographic algorithms is broadly classified into 2 types I) Symmetric key Cryptography and II) Asymmetric key Cryptography. In case of Symmetric key cryptography, same key is used for both encryption and decryption. Hence it is usually simple in its technique and powerful too. Some of more commonly used symmetric key algorithms are DES, RC2 and RC4. But the major discrepancy in these algorithms is the secured and safe distribution of keys between the two sides. Thus, a more computational and comparatively complicated yet strong solution to above problem is the usage of different sets of keys for encryption and decryption which forms the basis for Asymmetric key Cryptography technique.

The most prominent factor in any cryptographic algorithm is the key size which in turn influences computational speed and level of security provided. As the key size is directly proportional to the complexity of the algorithm, we make use of 4-bit size key which can be used to all sizes of data and all kinds of data such as audio and video because of its low key size and high computational speed. This paper is organized as follows. Related work is described in section 2. Our proposed algorithm is given in section 3 and the performance analysis with the existing algorithms is done at section 4. Finally conclusions are drawn in section 5.

Related Work:

The two techniques used for cryptography are symmetric and asymmetric cryptographic techniques. Symmetric key encryption is simple, fast and most commonly used. In this technique, same key has to be used for encryption and decryption and so this key has to be shared between the two parties in secured manner. In asymmetric cryptographic technique, two different keys are used for encryption and decryption. Some examples of symmetric key algorithms are DES, RC4, AES, Blowfish, IDEA. According to the symmetric algorithm proposed in [1], 4-Bit key size is used for encryption and decryption. In [1], ASCII values of the letters in plain text are divided by the secret key and cipher text is generated by using the quotient and remainder of the division. Computational speed is high because of using small key size. But using the algorithm in [1], some letters cannot be encrypted because of using 3 bits in remainder. This problem is solved by using 4 bits in the remainder the algorithm proposed in [2]. In these two algorithms, only small data can be encrypted and decrypted because of incrementing keys, key size will be increased and hence error will be occurred while encrypting and decrypting the large data. Also in [1] and [2], if any one key is found then other keys can be easily generated by either adding or subtracting one to the key which is found. In [3] and [4] the performance evaluation of various symmetric key algorithms is clearly explained.

In our proposed algorithm, dynamic 4-Bit key size is used and different 4-bit keys are used for different characters in the plain text. Cognitive Symmetric key Cryptographic algorithm (CSCA) can encrypt and decrypt the large data since there will be no increase in key size. Even though any one is identified in CSCA, other keys cannot be identified because of using different 4-bit keys for different characters rather than choosing only one 4-bit key and adding one to that initial key. Security is also enhanced in CSCA by encrypting secret key by using 4-bit shared key which should be shared securely via Authentication center between the two parties. In order to extract the secret plain text from the cipher text, first the secret key has to be decrypted by using shared key and then the character should be decrypted by using that secret key. In CSCA after decrypting all the characters, plain text will be found.

Proposed Mechanism:

Dynamic 4-Bit Secret Key:

Choosing the optimal bit size for keys in encryption and decryption algorithm is necessary for the efficient computation of the algorithm. If the bit size of the key is very large, the complexity of the algorithm is increased. This also increases the cost of the encryption and decryption algorithm. In many encryption and decryption algorithms the key size is very large. In [1], the dynamic 4-Bit key is used for encryption and decryption for small amount of data. In [1], the initial key is chosen as any value from 1000 to 1111 for encrypting and decrypting the first character. For remaining characters in the plain text, the secret key is increased by 1 from the initial value. I.e. If the initial key is 1000 then the keys for the remaining characters will be 1001, 1010, 1011, 1101, 1110, 1111, 10000â€¦ Because of increasing the keys, the key size also increases and so error will occur if we encrypt and decrypt the larger amount of data according to the encryption and decryption algorithm proposed in [1]. Also in [1], if any one key is determined then other keys can be easily determined either by adding or subtracting 1 to key which is found. In our proposed algorithm, 4-Bit key size is used for encryption as well as decryption. 4-Bit Randomizer is used in our algorithm which returns the random value from 10 to 15 i.e. from 1000 to 1111 for encrypting the characters and same key has to be used for decryption since it is a symmetric algorithm. So only 4-Bit key size is used throughout the algorithm but different keys are used for characters in the plain text by using 4-Bit Randomizer. So our proposed algorithm is used to encrypt and decrypt the large amount of data with small key size in efficient and secured manner.

4-Bit Shared key:

In order to increase the security 4-Bit shared key can be introduced. This key has to be shared between sender and receiver of the data in a secured manner via an Authentication center. The shared key is also 4-Bit key. This key is any value between 1000 to 1111 which is chosen by 4-Bit randomizer in Authentication center. This shared key is used to encrypt and decrypt the secret key by using the proposed encryption and decryption algorithm for encrypting and decrypting the keys. Introduction of the 4-Bit shared key increases the security and efficiency of our algorithm.

Encryption Technique:

In this technique first the key generated from the 4-Bit Randomizer is used to encrypt the first character in the Plain text. Since the 4-Bit shared key is constant throughout the encryption and decryption technique consider it as n1. Then the shared key is used to encrypt the secret key.

The following steps in CSCA are used to encrypt the data with the 4-Bit secret key,

Step1: 4-Bit Randomizer generates a value from 10 to 15 and considers it as n.

Step2: Convert the generated value into binary value in 4 bits which is the secret key for encrypting a character.

Step3: Compute the ASCII value for the character in the plain text and convert ASCII value into binary representation in 8 bits.

Step4: Perform left circular shift operation for n (the value generated in Step1) times on the binary representation of ASCII value.

Step5: Divide the result from step 4 by the secret key.

Step6: Represent the remainder in first four bits and quotient in the last five bits which gives 9-Bit cipher text for the character.

Step7: Represent the 4-bit key in 8 bits.

Step8: Perform left circular shift operation for n1 times on these bits.

Step9: Divide these bits with the 4-bit shared key.

Step10: Represent the remainder in first four bits and quotient in the last five bits which gives 9-Bit cipher text for the secret key.

Step11: Form 18-Bit cipher text by using 9-Bit cipher text for secret key and 9-Bit cipher text for the character.

Repeat the above steps for encrypting each character in the plain text. If P is the plain text, Ch1 is the first character, Ch2 is the second character then C1 is 9-bit cipher text for Ch1 encrypted with key K1 and C2 is 9-bit cipher text for Ch2 encrypted with key K2. EK1 is 9-bit cipher text for K1 encrypted with Shared key and EK2 is 9-bit cipher text for K2 encrypted with Shared key. The pattern of the resultant Cipher text from this Encryption Technique for Plain Text P will be EK1C1EK2C2EK3C3EK4C4â€¦

Diagram:

Fig.1 Encryption Technique in CSCA

Case Study:

Let us consider the plain text as "HI". The encryption technique has to be done for each character in the plain text individually. First we will consider the character H in plain text HI. Let us consider shared key as 1010 i.e. 10 (n1).

Step1: Let say 4-Bit randomizer generates the value 1000.

Step2: Decimal value of 1000 is 8 and considers it as n.

Step3: ASCII value for H is 72 and 8-bit binary representation for 72 is 01001000.

Step4: Perform left circular shift on 01001000 for n times i.e. 8 times which gives the result as 01001000.

Step5: Divide 01001000 by secret key 1000. Quotient is 01001 and the remainder is 0.

Step6: The 9-Bit cipher text is 000001001.

Step7: 8-bit representation of secret key is 00001000.

Step8: Perform the left circular operation on 00001000 for n1 times i.e. 10 times which gives the result as 00100000.

Step9: Divide 00100000 by shared key 1010. Quotient is 00011 and remainder is 0010.

Step10: The 9-Bit cipher text is 001000011.

18-Bit Cipher Text for the character H: 001000011000001001.

Let us consider the secret key for I is 1011. Then Final Cipher text for the text "HI" is 001000011000001001010000100100000110.

Decryption Technique:

In this technique first the secret key has to be decrypted from the 9-bit cipher text by using the shared key then the character has to be decrypted by using the respective secret key.

The following steps in CSCA are used to decrypt the characters in the Plain text from the Cipher text,

Step1: Extract 18 bit cipher text from the received bits and extract the quotient and remainder from the first 9-bit cipher text for finding the secret key.

Step2: Multiply the quotient with the shared key and add it with the remainder.

Step3: Perform the right circular shift operation for n1 times on these bits and this computes the secret key.

Step4: Compute the decimal value for the secret key and consider it as n2.

Step5: Extract the quotient and remainder from the next 9-bit cipher text for finding the character.

Step6: Multiply the quotient with the secret key and add it with the remainder.

Step7: Perform the right circular shift operation for n2 times on these bits and compute the decimal value.

Step8: Find the secret character based on its ASCII equivalent.

The above steps have to be repeated until all the secret characters in the plain text are found.

Diagram:

Fig.2 Decryption Technique in CSCA

Case study:

Let us consider for the decryption of character H. The Cipher text for H is 001000011011100001.

Step1: Quotient and remainder are extracted from first 9 bits as 00011 and 0010.

Step2: Multiply 00011 with shared key 1010 and add it with remainder 0010 and this gives the result as 100000.

Step3: Perform right circular operation on 00100000 for n1 times i.e. 10 times which gives the secret key as 1000.

Step4: Decimal value for 1000 is 8 and considers it as n2.

Step5: Quotient and remainder are extracted from next 9 bits as 01001 and 0.

Step6: Multiply 01001 with 1000 and add it with 0 which gives the result as 01001000.

Step7: Perform right circular operation on 00001111 for n2 times i.e. 8 times which gives the result as 01001000.

Step8: Decimal value for 01001000 is 72 and the corresponding character based on ASCII equivalent "H" is found.

Similarly the character "I" is found by using this decryption technique to get the plain text "HI".

## PERFORMANCE EVALUATION:

In this section, we show performance evaluation of the proposed Cognitive Symmetric Key Cryptographic Algorithm (CSCA) compared to the various existing Algorithms. For our simulations, we made use of Crypto++. It provides a free C++ class library of various cryptographic schemes.

## Fig .3 Key sizes of Algorithms

Figure 3 provides the visual representation of various algorithms key sizes. and clearly depicts the low and effective key size of our proposed algorithm. With the increase in key size, the complexity increases and leads to decrease in cost effectiveness and computational speed.

Figure 4 shows the time consumed by various algorithms. It has to be noted that our algorithm occupies the lowest position among all existing algorithms. Again with the low time consumption, our proposed algorithm performs better than almost all existing algorithms.

## Fig .5 Throughput for different Algorithms

Figure 5 provides the comparison of throughputs of various existing algorithms and with the higher throughput, clearly our algorithm proves to be highly cost-effective and faster compared other algorithms.

Algorithm

Megabytes processed

Blowfish

256

Rijndael (128-bit key)

256

Rijndael (192-bit key)

256

Rijndael (256-bit key)

256

Rijndael (128) CTR

256

Rijndael (128) OFB

256

Rijndael (128) CFB

256

Rijndael (128) CBC

256

DES

128

(3DES) DES-XEX3

128

(3DES) DES-EDE3

64

CSCA

256

Table 1 Megabytes processed for various algorithms using Crypto ++ for performance evaluation

3DES

Triple Data Encryption Standard

AES

CBC

Chain Block Chaining Mode

CTR

Counter Mode

CFB

Cipher Feedback Mode

ECB

Electronic Codebook Mode

NIST

National Institute of Standards and Technology

OFB

Output Feedback Mode

PKC

Public Key Cryptography

CSCA

Cognitive Symmetric key Cryptographic Algorithm

Table 2 Acronyms for various algorithms

Conclusion: