Next Article in Journal
Antibacterial Applications of Low-Pressure Plasma on Degradation of Multidrug Resistant V. cholera
Previous Article in Journal
Control Strategy of Speed Segmented Variable Constant Power Powertrain of Electric Construction Machinery
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Two-Layer Security Algorithms to Prevent Attacks on Data in Cyberspace

1
Department of Computing, Abasyn University, Islamabad 44000, Pakistan
2
Department of Computer Science, National University of Technology, Islamabad 44000, Pakistan
3
Department of Computer Science and Information Systems, College of Applied Sciences, Al-Maarefa University, Riyadh 13713, Saudi Arabia
4
Department of Information Technology, College of Computer and Information Sciences, Majmaah University, Al-Majmaah 11952, Saudi Arabia
5
Department of Information Technology, College of Computer Sciences and Information Technology, Majmaah University, Al-Majmaah 11952, Saudi Arabia
6
Department of Natural and Applied Sciences, Faculty of Community, Majmaah University, Majmaah 11952, Saudi Arabia
7
Department of Information Systems, Faculty of Computer and Information Sciences, Islamic University of Madinah, Madinah 42351, Saudi Arabia
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2022, 12(19), 9736; https://doi.org/10.3390/app12199736
Submission received: 31 July 2022 / Revised: 6 September 2022 / Accepted: 17 September 2022 / Published: 27 September 2022
(This article belongs to the Section Computing and Artificial Intelligence)

Abstract

:
The ratio at which the number of users is increasing in cloud computing, the same as the number of data destruction, has doubled. Various algorithms have been designed to secure cloud servers to prevent an attacker from attacking, but they cannot protect the data. With the help of cryptography, data are converted into a format that is difficult for an attacker to understand, and these data can be broadcasted in a reliable format. If the attacker obtains access to the cryptographic algorithm, then the attacker can easily decrypt the data, but if the data are encrypted with the help of the key, it is difficult for the attacker to decrypt the data without the key. When the data are encrypted with the same key at different times, there is a possibility to obtain the actual key with the help of the Kasiski test. Different researchers have encrypted the data with the help of the same key or have developed an algorithm by combining different algorithms, which is a problem. This paper developed an efficient algorithm that cannot be broken easily. Even if an attacker obtains access to the algorithm, the attacker cannot identify the keys derived from that text, and the key only works in the text from which it is generated, which is the novelty of this paper. Data are secured in two different layers. In Layer-1, the proposed algorithm implements plaintext and a static key to obtain the encrypted text and a Vigenère key. In Layer-2, the encrypted text and the Vigenère key are implemented on the Vigenère cipher algorithm to obtain the ciphertext. At the end of the paper, a comparison of different papers is made with the proposed paper, and a conclusion is made based on different techniques and results.

1. Introduction

Nowadays, cloud computing is increasing due to the growing scale of digital technologies and the Internet. Many organizations prefer to store their data online rather than locally [1]. Just as the number of users in cyberspace doubles, the rate of malware is also increasing [2]. Attackers are trying to destroy cloud data using different algorithms, trying to access cloud servers using various hacking mechanisms, and completely changing the functionality of the original data by injecting malicious malware into the cloud, which is a big problem for cloud servers and users. Common external attacks in cyberspace are brute force and pattern matching [3]. With the help of these attacks, attackers try to steal the case of authentic users. Common inside attacks on cloud servers are replay attacks, phishing, and man-in-the-middle attacks [4]. When an attacker enters the cloud server through any mechanism, the first attempt of an attacker is to use such mechanisms, with the help of which data can be misused, or malicious data can be stored in place of the original data [5]. Whenever the data are uploaded to the cloud server, they can be attacked and accessed, but despite accessing the data, the attacker cannot decrypt the data. Data decryption can only be possible when implementing the same mechanism designed to decrypt the data. If the attacker deploys the decryption mechanism, to decrypt the cipher data, it is also necessary to have the key that was used while encrypting the data, which is a problem. Using the same algorithm and key is necessary to decrypt the data. If neither of the two are available, data decryption cannot be possible.
Different researchers have developed different algorithms to protect the cloud server from external attacks, with the help of which intruders can be detected in cyberspace and access to the cloud server can be prevented. However, when an authentic user on the cloud server attempts to destroy the data, it is challenging to detect such a user and prevent the data from being misused in cyberspace. When any malicious activity is done in cyberspace, whether it is done internally or externally, such activities and intruders can be blocked [6] and they can be prevented from doing harmful activities, but the data cannot be saved. Cryptography is the best solution to solve this problem [7].

1.1. Cryptography

Cryptography is the art of hiding data by scrambling data into an unreadable state that is impossible to decipher [8]. Modern security systems are built on the principles of cryptography, which is used to protect broadcasted information [9]. It also builds trust for transmission in cyberspace. Cryptography is derived from two words; one is “crypto”, which means “hiding”, and the other is “graphy”, which means “writing” [10]. Early civilizations employed different techniques to ensure the security of their vital records and information. Cryptography is also known as a cryptosystem [11]. Cryptography is divided into two categories; one is encryption, and the other is decryption [12].
Whenever data are broadcast using cryptography in cyberspace, they are converted into such a format, which must be in its actual state to be understood [13]. This entire process is called cryptography. The original information is concealed using various methods or algorithms using encryption, and the original and encrypted data are unrlated [14]. Encryption is the process of converting the original data into an unreadable representation [15]. When non-readable data are to be converted into actual data, a set of mechanisms is implemented on this non-readable data, with the help of which the non-readable data are converted into actual data, which is called decryption [16].
Whenever data are transferred between two points in a network, an attacker uses a man-in-the-middle attack to make every effort to gain access to the data, as shown in Figure 1. When an attacker obtains access to the data, the attacker can modify the original data and re-transmit the file across the network, which can disturb the performance of the entire network and allow misuse of the data [17], but when the data are secure, the attacker is not able to misuse them even after accessing them. The best way to completely secure data is to use a cryptographic algorithm [18]. When developing an effective algorithm for data security in cyberspace, techniques should be applied to mechanisms that make it difficult for an attacker to break data security [19].

1.2. Vigenère Cipher

The Vigenère cipher is a poly-alphabetic substitution method developed by Blaise de Vigenère in the 16th century [20]. Cipher substitution algorithms are divided into two categories, where one is mono-alphabetic, and the other is poly-alphabetic [21]. Various mono-alphabetic and poly-alphabetic substitution algorithms are shown in Figure 2. The difference between mono-alphabetic and poly-alphabetic algorithms is that when the data are encrypted with plaintext and key, a fixed cipher value is obtained in a mono-alphabetic algorithm. In a poly-alphabetic algorithm, the resulting cipher value is not fixed when the plaintext and key are mapped to the algorithm [22]. When the plaintext is encrypted using the Vigenère cipher algorithm, the Vigenère table is used to obtain the ciphertext. A Vigenère table consists of special symbols, numeric keys, and alphabets. In this table, the number of rows and columns should be equal. Whenever data are encrypted using the Vigenère cipher, key and plaintext are used, and the value obtained from both is considered the cipher value.
Several compatible algorithms are available for converting data from plaintext to ciphertext that can be used to broadcast the data in a secure form, but with the help of such an algorithm, data can be encrypted and decrypted with a single key. If an attacker steals the key through any mechanism, the attacker can access all kinds of data, which is a huge problem. Many algorithms can be used for data encryption, but such algorithms are unreliable for data broadcasting. One of them is the Vigenère cipher algorithm. In the Vigenère cipher algorithm, plaintext is written in a vertical position (column) while the key is written in a horizontal position (row). The main problem of the Vigenère cipher algorithm is that when column (plaintext) and row (key) intersect, a value is obtained called the Vigenère cipher value. If these algorithms are made efficient, these algorithms can provide better transmission than all other efficient algorithms. An algorithm was developed in this paper to make the Vigenère cipher algorithm, in which one static key is used to encrypt the data, efficient. In contrast, two different keys are used to decrypt the data in the proposed algorithm. If the proposed algorithm is used for encryption, the data can be protected from an attacker and can also be protected from key-snatching mechanisms such as the Kasiski test.

1.3. Contribution

Some researchers have used the double Vigenère cipher encryption algorithm in which the data are encrypted repeatedly using the same key. Some researchers have developed hybrid algorithms, and data were encrypted with the help of these algorithms. There are so many efficient symmetric encryption algorithms available, such as AES and DES, which can be used to protect data, but with the help of these algorithms, data are encrypted and decrypted using a single key. If an attacker gains access to the key, the attacker can decrypt all encrypted text with the same key, which is a problem. If an efficient symmetric algorithm is developed in which a unique key is obtained from each plaintext, and the key can be used only for that text from which it is derived, the data can be secured in a better way. The advantage of deriving a unique key from each plaintext is that each plaintext key works only for that plaintext. After obtaining the unique key of the plaintext, the cipher data depend on this key, and the data cannot be decrypted without this key. If the user has access to the static key, the attacker can steal all the data, but when the length of the plaintext key depends on the size of the plaintext and the key is random, a user cannot guess the key nor can it be taken away. In this paper, an efficient algorithm was developed in which data encryption is done with one key while decryption is done with two keys. The first key is user-defined, while the second key is a plaintext-derived key. The user-defined key is called a static key, while the one derived from plaintext is called the Vigenère key. The length of the static key is dependent on the user, which can be snatched from any mechanism, but the length of the Vigenère key is equal to the length of the plaintext, which cannot be broken, and such a Vigenère key cannot be obtained with the help of the Kasiski test. Two layers of security are provided to protect data from attackers. A “CipherText Algorithm” is developed in the first layer to derive a cipher value and unique key from the plaintext. After obtaining the cipher value and the Vigenère key from the proposed algorithm in layer-1, these cipher values and the Vigenère key are combined to obtain a ciphertext on which no cracking mechanism can be implemented nor the proposed algorithm’s security breached and for which the Vigenère cipher algorithm is used in layer-2. The Vigenère key and cipher value are intersected with the help of the Vigenère cipher algorithm, and a secure value is obtained, which is called ciphertext. Therefore, to decrypt this ciphertext, it is necessary to apply the ciphertext and “Vigenère key” to the Vigenère cipher algorithm, after which the data can be decrypted. The biggest advantage of using the proposed algorithm is obtaining a unique key from each plaintext, the length of which equals the length of the plaintext. The data are encrypted using a static key, while at decryption time, the “Vigenère Key” derived from the plaintext is used first before the static key can be used. If an attacker devises a mechanism or exploits the Kasiski test algorithm, the attacker cannot obtain the Vigenère key in any way because the ciphertext depends on the Vigenère key. Unless the ciphertext and Vigenère key are combined, the data cannot be accessed, which is the novelty of this paper.
The remaining part of the proposed paper is organized somewhat like this. In Section 2, previous work is reviewed. In Section 3, the proposed methodology is discussed. In Section 4, implementations of the proposed methodology are presented. In Section 5, a comparison of the proposed algorithm with the previous algorithms is made, and the performance of the better algorithm is discussed. In Section 6, the conclusion is made based on different results.

2. Literature Review

Akansha et al. [1] modified the Vigenère cipher algorithm to secure data and prevent key identification from Kasiski tests, implemented the results obtained from the Vigenère cipher on the Polybius algorithm, and obtained the ciphertext. According to the researchers, when the data are key-based encrypted, if the attacker knows the algorithm used on these data, then the probability of obtaining this key can be determined by the Kasiski test, which is a problem. To solve this problem, the researchers first took the plaintext and implemented this plaintext on a key. When the key length was smaller than the plaintext, the key was repeated according to the length of the plaintext, and the length was found by applying the obtained ciphertext to the Kasiski test. The researchers modified the Vigenère cipher algorithm to solve the key length problem. Instead of repeating the key, they generated the key according to the length of the plaintext and obtained a text. Then, this text was implemented on the 5 × 5 Polybius matrix to obtain the ciphertext.
Tan, Camille et al. [23] developed a hybrid cryptographic algorithm using the Vigenère cipher and Caesar cipher techniques to encrypt data. To convert the data from plaintext to ciphertext, the plaintext was first taken, the plaintext was added with the key for which the standard ASCII was used, and a Caesar text was obtained from the Caesar cipher. After obtaining the Ceaser text, the Ceaser ciphertext and key were implemented on the Vigenère cipher and the obtained ciphertext. After obtaining the ciphertext, the accuracy of the hybrid algorithm was checked through MATLAB simulation. After obtaining different results, the behavior of the three techniques was identified with the help of graphs, after which it was discussed that the present algorithm provides better efficiency than the other two algorithms.
Shivam et al. [20] developed a new hybrid algorithm by combining the Polybius and Vigenère cipher. The novelty of this algorithm was implementing a double encryption mechanism on the data. First, a plaintext and a randomized key were implemented on the Vigenère cipher, and the encrypted text was obtained in an alphabetical form. Afterward, the Polybius mechanism was implemented on the alphabetic encrypted text in which the alphabets were converted to numbers, and a ciphertext was obtained.
Bhavana et al. [24] developed a hybrid algorithm to secure data in which email-based encryption and decryption were done between the sender and receiver. The hybrid algorithm was the combination of a Vigenère cipher and Polybius cipher in which encryption and decryption were performed with the same key. The data were encrypted and decrypted through a webpage. The webpage contained a textbox (sender email, password, message, and receiver email) and a button (encryption and decryption). First, the plaintext was taken and sent to the receiver by making this plaintext encrypted. The webpage used the textbox to convert the data from a non-readable format to a readable format, and the plaintext was obtained.
Nahar et al. [25] developed the 95 × 95 Vigenère cipher table by modifying the 26 × 26 Vigenère cipher table, which consisted of numbers, alphabets, and special symbols. Each plaintext character was equalized to its equivalent ASCII in this algorithm. Afterward, a key was generated and repeated according to the existing length. Then, each key character and plaintext character was equalized to ASCII numerical values, and addition was performed. Mod-95 was taken based on the results obtained from addition, and a ciphertext was obtained.
Agustini et al. [26] developed a modified algorithm by combining the Vigenère cipher and affine cipher, named the modified Vigenère cipher. First, a plaintext was taken, this plaintext was added with a key with the help of the Vigenère table, the encrypted value was obtained, and then the encrypted results were shifted to the ciphertext according to the length of the key. When the encrypted text was obtained from the Vigenère cipher, the affine cipher mechanism was applied to this text. The encryptions in the affine cipher were done in two steps with two different keys. In the first step, the key-1 key was taken, addition was done with it, and a cipher result was obtained; after that, K-2 was implemented on the cipher result, multiplication was performed, and then a ciphertext was obtained, which was the original ciphertext. After obtaining the ciphertext, the weakness of the Vigenère cipher and affine cipher were also identified.

3. Proposed Algorithm

3.1. Work Overflow

This paper developed an efficient encrypted text algorithm to convert the plaintext and static keys into cryptographic form, and a Vigenère key and encrypted text were obtained. After that, the obtained Vigenère key and the encrypted text were implemented on the Vigenère key algorithm, and the ciphertext was obtained. The reason for obtaining Vigenère key and encrypted text was to change the data so that no malicious decryption mechanism could be implemented. Whenever an attacker tries to decrypt data, the first attempt of the attacker is to obtain the static key. If an attacker obtains the static key, any data can be decrypted that have been encrypted with that static key. If a static key is developed along with a key that is used only up to this specific text, then the security of the data can be increased. Data are secured in two layers. The first layer implements the static key and plaintext on an encrypted text algorithm. In layer-2, the results obtained in layer-1 are implemented on the Vigenère cipher algorithm, and a ciphertext is obtained. The Vigenère cipher algorithm is very easy to break. If this algorithm is used for the Vigenère cipher or any algorithm that is easy to break, the proposed algorithm can increase the performance of that algorithm.

3.2. Data Encryption Process

A plaintext and a static key are first taken to encrypt the data, as shown in Figure 3. The plaintext is represented by “[y]”, while the static key is represented by “[x]”. A static key is a user-defined key that is the same in any text’s encryption and decryption. First, the position of all the characters in the static key “[x]” is found, for which Equation (1) is used. Static key indexes are represented by “[xi]”. Different mathematical notations are shown in Table 1.
[ x i ]   = [ x i 0   [ x i 1   [ x i 2   [ x i 2 K 0   K 1   K 2   K n
After finding the static key position “[xi]”, all characters are represented in index form. K 0   K 1   K 2   K n are all the indexes of “[xi]”, while [Ki] represents all indexes of “[xi]”. As shown in Equation (2).
[ K i ]   =   K 0   K 1   K 2   K n
After finding index positions [Ki] from the static key “[xi]”, the length of the static key is calculated. To calculate the length of [Ki], Equation (3) is used.
m = [Ki] + 1
The static key length is represented by “m”. After identifying the indexes and length of the static key “[x]”, the position and length of plaintext “[y]” are calculated. First, the index identification of the plaintext is made. The position of plaintext “[y]” is determined with the help of Equation (4).
[ y i ]   = [ y i 0   [ y i 1   [ y i 2   [ y i 2 T 0   T 1   T 2   K T n
The reason for finding the indexes of plaintext “[xi]” and static key position “[yi]” is to implement a security mechanism on each letter and obtain an encrypted text that cannot be decrypted without the proposed paper mechanism. After finding the indexes of the text, all characters are represented in separate index form  T 0   T 1   T 2   T n , as shown in Equation (5).
[ T i ] = T 0   T 1   T 2   T n
After finding the text indexes [Ti], the length of [Ti] is calculated by using formula “[Ti] = [Ti] + 1”, and then lengths of [Ki] and [Ti] are compared. If both lengths are equal, then the elements of [Ti] and [Ki] are converted to binary form. If the lengths are not equal, then [Ki] is repeated [Ti] times. After conversion to binary form, the XOR mechanism is implemented with the help of Equation (6).
Z[i]= ([T0] ⊕ [K0]) ([T1] ⊕ [K1]) ……… ([Tn] ⊕ [Kn])
All text indexes [Ti] and key indexes [Ki] of “Z⊕[i]” (from index = 0 to index = n) are XORed, as shown in Equation (7).
Z [ i ] = n i = 0   T i   K i
After XOR, the values of “Z⊕[i]” (Equation (6)) are converted to Decimal “D[i]”. As shown in Equation (8).
D [ i ]   =   D 1   D 2   D 3   D n  
D[i]” is the decimal result that is obtained from the [D1] to [Dn] indexes. After obtaining different decimal values “D[i]”, the GCD of key length (m) and text length (n) is calculated. The reason for finding the length of the key and text is to calculate and use greatest common division (GCD) to design a mechanism with the help of which the Vigenère cipher can be obtained. To calculate the GCD, the “δ” Equation (9) is used.
δ = GCD (m,n)
The results of GCD are represented by “δ”. To find the Vigenère key, the GCD resultδ” is added to each index of decimal valuesD[i]”, as shown in Equation (10).
E[i] = (D [1] + δ) (D [2] + δ) (D [3] + δ) … (D[n] + δ)
E[i]” results are obtained by adding the GCD result “δ” and “D[i]” indexes, as shown in Equation (11).
E [ i ]   =   E 1   E 2   E 3   E n
If any index value of “E[i]” is greater than 25, then the “[E[i]24]” formula is used. The range of alphabets used in this paper is 1 to 26, starting from index = 0 to index = 25. After that, each “E[i]” index element is converted to an equivalent ASCII value, and a text is obtained called Vigenère key. This key is derived from the text and works only in the text that has been derived. Every Vigenère key of each text is different. Vigenère key elements are represented by “F[i]” indexes. As shown in Equation (12).
F [ i ] = F 1   F 2   F 3   F n
D[n]” are the nth elements of the Vigenère key. After obtaining the Vigenère key, an encrypted text is obtained from the decimal value “D[i]” so that if the attacker tries to decrypt data using the Vigenère cipher algorithm, the attacker cannot access the original data. To obtain an encrypted text from the decimal text “D[i]”, every “D[n]” letter should be converted to its equivalent ASCII, and the encrypted text is obtained, as shown in Equation (13).
I [ z ] = I 1   I 2   I 3   I n
I[z]” is the encrypted text obtained from the proposed algorithm. After that, encrypted textI[z]” and Vigenère key “F[i] are implemented on the Vigenère cipher algorithm, and a ciphertext will be obtained. The Vigenère cipher algorithm can be wholly secured using this proposed algorithm. If the attacker obtains a static key, the attacker cannot decrypt data due to this efficient algorithm.

Key Management Process

A static key is used to encrypt the data. A static key is a user-defined key that is the same for encryption and decryption. When the static key and plaintext are applied to the proposed algorithm, a Vigenère key is obtained. A Vigenère key is a plaintext-derived key that can be used in the same text from which it is derived. The key of one plaintext cannot be used in another plaintext. The Vigenère key derived from each plaintext is different from other plaintexts. Each plaintext-derived key works in the same plaintext from which it is derived. When the cipher value and the Vigenère key are derived from the plaintext, the cipher value depends on the Vigenère key, and the actual data are not retrieved without the Vigenère key. Both must be linked with each other to restore the data. Otherwise, the original data cannot be accessed.
Whenever data are encrypted with one key and decrypted with two keys, it becomes impossible for an attacker to steal the two keys. Data are encrypted using a static key, which is a user-defined key. The Vigenère key is first used to decrypt the data, and then the static key can be used. If an attacker steals the static key, the attacker can decrypt each encrypted ciphertext with this static key, which is a problem. If a key is obtained from each plaintext, the length of which is equal to the length of the same plaintext, then the key equal to the plaintext cannot be snatched by any mechanism. An “EncryptedText Algorithm” was developed in this paper to derive a Vigenère key from the plaintext, as shown in Algorithm (1).
Algorithm 1: Encryption
Input: Plaintext, Static Key
Output: Ciphertext
1.  Plaintext = [y], static key = [x]
2.  Find the indexes [Kx] of key [x]
       [xi] = [ x i 0   [ x i 1   [ x i 2   [ x i 2 K 0   K 1   K 2   K n
3.  nth indexes [Ki] of static key [xi]
       [Ki] = K 0   K 1   K 2   K n
4.  Find the length (m) of static key [Ki].
       m = [Ki] + 1
5.  Find the indexes [Ti] of text [y]
       [yi] = [ y i o   [ y i 1   [ y i 2   [ y i 2 T 0   T 1   T 2   K T n
6.  nth-Index [Ti] of text [y]
       [Ti] = T 0   T 1   T 2   T n
7.  Find the length (n) of text [Ti]
       n = [Ti] + 1
8.  Length equalization
       IF [Ki] [Ti], THEN repeat [Ki] -> [Ti] times
9.  Convert [Ki] and [Ti] index values into binary form.
10.  XOR [Ti] with [Ki].
       Z[i] = ([T0] ⊕ [K0]) ([T1] ⊕ [K1]) ……… ([Tn] ⊕ [Kn])
       Z⊕[i] = n i = 0 Ti Ki
11.  Convert Z⊕[i] into decimal format [D[i]].
       D[i] = D 1   D 2   D 3   D n
12.  Find GCD (δ) of (m) and (n).
       δ = GCD (m, n)
13.  Obtain key (E[i]) by adding “δ” with [D[i]].
       E[i] = (D[1] + δ) (D[2] + δ) (D[3] + δ) … (D[n] + δ)
       E[i] = E 1   E 2   E 3   E n
       If E[i] > 25 then E[i]–24
14.  Convert step 13 [E[i]] values to equivalent ASCII characters [F[i]].
       F[i] = F 1 ]   F 2   F 3   F n
15.  Convert step 11 [D[i]] values to equivalent ASCII characters (I[z]).
        I [ z ] = I 1   I 2   I 3   I n
16.  Apply the Vigenère cipher algorithm on I[z] and F[i].
17.  Obtain ciphertext (C).

3.3. Data Decryption Process

To decrypt the data, the ciphertext (C) and Vigenère text key [F[i]] are implemented on the Vigenère cipher algorithm, and alphabetical Vigenère results [V[i]] are obtained, as shown in Figure 4 and Algorithm (2). After that, each Vigenère cipher index letter [V[n]] is converted to its equivalent ASCII [W[i]]. The results of [W[i]] are XORed with the static key [K[i]]. First, the Vigenère key should be accurate to decrypt the data, and then the static key can be implemented. A static key cannot be used until the Vigenère key is not valid. The better way to secure data is for both keys to perform different functionalities. The algorithm can never be optimized if different functions are performed repeatedly with the same key. To XOR the Vigenère ASCII result [W[i]] and the static key [K[i]], formula P⊕[i] = [Wi] ⊕ [Ki] is used. “P⊕[i]” is the XOR results that are obtained from [Wi] and [Ki] results. The results of P⊕[i] are converted to decimals by making 8-bit pairs, each decimal value is converted to its equivalent ASCII, and the plaintext is obtained.
Algorithm 2: Decryption
Input: Ciphertext, Static Key, Vigenère Key
Output: Plaintext
1.  Apply Vigenère cipher on ciphertext (C) and Vigenère text key [F[i]].
2.  Convert step 1 Vigenère results [V[i]] into their equivalent ASCII [W[i]].
3.  Convert [W[i]] ASCII static key [K[i]] values into 8-bit binary.
4.  Apply P⊕[i] = [Wi] ⊕ [Ki] on step 3.
5.  Convert the P⊕[i] result into a decimal by making 8-bit pairs.
6.  Convert decimal values into equivalent ASCII.
7.  Obtain the plaintext.

4. Experiment

First, an encrypted text algorithm was worked out to encrypt the data, and the results obtained were applied to the Vigenère cipher algorithm. Data encryption and decryption were performed in different steps.

4.1. Encryption Algorithm

Step 1: First, the plaintext and a static key are taken to encrypt the data. The static key is represented with “[xi]”, while the text is represented with “[yi]”, as shown in Equation (14) (Text and Key representation).
[yi] = KEY5@CX − 98/F
[xi] =Z@r!sH654
Step 2: After representing the text and key, the index of each letter of the key “[xi]” can be identified, as shown in Equation (15) (indexes of Key).
x i = Z 90 @ 64 r 114 ! 33 s 83 H 72 6 54 5 53 4 52
Step 3: After finding the index position from the static key, all index positions are written in index “[Ki]” form, as shown in Equation (16) (Positions of Key).
[Ki] = [90] [64] [114] [33] [83] [72] [54] [53] [52]
Step 4: After the index identification, the key length (m) of the static key is determined, as shown in Equation (17) (Key length).
Length of Key (m) = 9
Step 5: After determining the length and position of the static key, the position of the text “[yi]” is determined, as shown in Equation (18) (Indexes of Texts).
y i = K 75 E 69 Y 89 5 53 @ 64 C 67 X 88 45 9 57 8 56 / 47 F 70
Step 6: After determining the position of the text, all indexes are written in the form of “[Ti]”, as shown in Equation (19) (Positions of Text).
[Ti] = [75] [69] [89] [53] [64] [67] [88] [45] [57] [56] [47] [70]
Step 7. To find the length of the text, all the indexes of “[Ti]” are summed, and the “n” value is obtained, as shown in Equation (20) (Length of Texts).
Length of Text (n) = 12
Step 8: After determining the length of the key and text, the lengths of key “[Ki]” and text “[Ti]” are equalized. If the lengths of “[Ki]” and “[Ti]” are equal, then go to step 9, and if the length of “[Ki]” is less than “[Ti]”, then the length of “[Ki]” is equal to “[Ti]”. The “[Ki]” position is repeated “[Ti]” times for length equalization, as shown in Figure 5.
Step 9: After equalizing the lengths of “[Ki]” and “[Ti]”, the “[Ki]” and “[Ti]” values are converted to 8-bit binary, as shown in Figure 6.
Step 10: The values of “[Ti]” and “[Ki]” obtained in step 9 are XORed by using the formula “Z⊕[i] = ([Tn] ⊕ [Kn])”, as shown in Figure 7.
Step 11: The result obtained from “Z⊕[i]” is divided into 8-bit binary groups and then converted to decimal “D[i]” form, as shown in Figure 8.
Step 12: After obtaining different decimal values, the GCD of static key length (m) and text length (n) is determined, as shown in Equation (21) (Eight-bit pairs of XOR result).
δ = GCD (9,12)
δ = 3
Step 13: After obtaining the results of decimal “D[i]” and GCD (δ), the index of each “D[i]” is accumulated with “δ”. The text cannot be decrypted without the Vigenère key. The Vigenère key is required to decrypt the text. Vigenère key results are represented by “E[i]”, as shown in Figure 9.
Step 14: All “E[i]” values obtained in step 13 are converted to their equivalent ASCII, as shown in Figure 10. “F[i]” is the ASCII value of the Vigenère key.
Step 15: All “D[i]” values obtained in step 11 are converted to their equivalent ASCII, as shown in Figure 11. “I[z]” is an encrypted text obtained from the proposed algorithm.
Step 16: Apply “F[i]” and “I[z]” results to the Vigenère cipher algorithm. The Vigenère cipher table and implemented results of “F[i]” and “I[z]” are shown in Figure 12.
After implementing the Vigenère cipher, a single ciphertext is obtained, shown in Table 2.

4.2. Decryption Algorithm

Step 1: A ciphertext (C) obtained in the encryption is used to decrypt the data, as shown in Equation (22) (Ciphertext).
% ƪ Y + ) ₤d # ∅ f g k
Step 2: Firstly, the ciphertext (C) and Vigenère key F[i] are implemented on the Vigenère cipher table, and then different values are obtained, as shown in Table 3.
Step 3: After obtaining ASCII values, each “V[i]” value is converted to its equivalent ASCII “W[i]” and then converted to a binary form, as shown in Figure 13.
After converting the “W[i]” values to binary, each static keyF[i]” value is converted to 8-bit binary, as shown in Figure 14.
Step 4: The binary text obtained from the Vigenère cipher is XORed with the static key “[x]” used in encryption. The XORed result “P⊕[i]” is shown in Figure 15.
Step 5: The binary valuesP⊕[i]” obtained from XOR are converted to decimals, as shown in Figure 16.
Step 6: After obtaining the decimal values, each value is converted to its equivalent ASCII to obtain the plaintext, as shown in Figure 17.

4.3. Algorithm Testing

After developing the algorithm, a tool was developed to test the algorithm’s performance and to then implement the plaintext and static key values on it. The result of plaintext and static key encryption is shown in Figure 18.
Different datasets were taken to further test the tool’s performance. Each dataset had a different plaintext and static key value. A Vigenère key and ciphertext values were obtained from each dataset. Each plaintext Vigenère key value was different from other plaintext Vigenère key values. Different Vigenère key values and ciphertext values are shown in Table 4.
To decrypt the data, the first ciphertext was taken, and then the Vigenère value obtained from the plaintext was taken and applied to the tool. After applying the ciphertext and the Vigenère key to the tool, a static key was added, and the plaintext was generated, as shown in Figure 19. The output is invalid if the user enters an invalid Vigenère key, but a static key must be entered to obtain the output. If the static key is invalid, then data decryption is not possible.
After using different datasets on the tool, different keys were obtained, and the key obtained from each text was equal to the length of the plaintext. When an attacker tries to decrypt data, the attacker cannot guess the key based on the length of the plaintext nor can they extract the key by applying some mechanism. If this algorithm is used for cloud data, the data can be protected from attack mechanisms. Even if an attacker implements the Vigenère algorithm or the Kasiski test, such algorithms and techniques cannot break the security of the proposed algorithm cipher data.

4.4. Kasiski Test Cryptanalysis Algorithm

The ciphertext cryptanalysis algorithm was implemented on the ciphertext obtained from the proposed algorithm to identify whether the Vigenère key obtained from the proposed algorithm can be obtained from the ciphertext. As shown in Algorithm (3), first, a ciphertext was taken, repeated values in that ciphertext were found, and index identification of these repeatable values was made. After index identification, the key length algorithm was implemented in which the distance of index-1 to index-n was determined, and the greatest common division (GCD) was implemented on the obtained values. After that, the values obtained from GCD were considered as key length, the index of coincidence algorithm was implemented, and key identifications were made.
Algorithm 3: Kasiski Test
Input: Ciphertext
Output: Identification of Key
1.  Ciphertext
2.  From the encrypted message, determine the reusable value.
3.  Identify the repeating value indexes.
4.  Apply Kasiski key length algorithm
       Calculate the distance between the first value and the nth value “X = Y1Yn
       Find the greatest common division (GCD) of distances.
5. Verify the LENGTH_OF_KEY by using step 4.
6. IF LENGTH_OF_KEY = CIPHER_TEXT then GOTO step 7
       ELSE GOTO step 9.
7.  Implement index of coincidence algorithm
       Yc (Z) = (Favorable case / Total Possible Cases)
       Yc (Z) = ((Fi)/N)
8.  Kasiski key
9.  Exit

Algorithm Efficiency

If the ciphertext obtained by the proposed algorithm is paired so, 95% of the values in the ciphertext are not repeatable. In very few cases, it may be possible that some values become repeatable, but in most cases, the value is not repeatable shown in Table 5. The implication is that the proposed algorithm is used for cloud transmission or that the security analysis of the algorithm is done. The security of the Vigenère key cannot be broken by using the Kasiski test, and the security of the data cannot be decrypted. If an attacker applies techniques such as data decryption mechanisms or the Kasiski test, the attacker cannot decrypt the ciphertext obtained by this algorithm nor can they obtain the Vigenère key by the proposed algorithm, which is the novelty of this paper. When a user decrypts data, the Vigenère key must first be applied to the data, after which the static key can be used. If an attacker uses a wrong key instead of a valid one, the attacker obtains irrelevant data instead of the original ones. To access the original data, the same Vigenère key that is obtained from the plaintext must be applied. Data decryption may be impossible if an authentic user forgets the Vigenère key or static key. Data decryption can be possible only when these keys are stored in the database, and if the user forgets the key, the user can retrieve the key from the database and use it. If the key decryption mechanism is developed, then the attacker can also develop an algorithm to decrypt the data, from which the data decryption can be possible. Whenever data need to be encrypted, a Vigenère key should be generated from each plaintext. During data decryption, the Vigenère key should be applied first, and then the static key should be used to increase the efficiency of the data so that the attacker cannot access data.
In Table 6, the researchers used different static keys to encrypt and decrypt the data. No matter how effective an algorithm is that is designed to encrypt data, the data cannot be secured unless the key used in that algorithm is effective. Data security depends on the algorithm as well as the key. When data are encrypted with one key and decrypted with two keys, it is difficult for an attacker to find two different keys of two different sizes.

5. Comparative Analysis

Various researchers have implemented the encrypted text obtained from the Vigenère cipher on different algorithms to protect the data. Some researchers have doubled data encryption with the Vigenère cipher. Some researchers have used a single key on a hybrid algorithm. Some researchers have developed hybrid algorithms by combining different algorithms with the Vigenère cipher. A ciphertext can be generated with the help of all these algorithms, but the data cannot be saved entirely.
In paper [1], the researcher developed an algorithm by modifying the Vigenère cipher algorithm, identified the length of the key with the help of the Kasiski test, and discussed that if the length of the key is according to the text, then it is challenging to identify the key. After that, Vigenère cipher results were implemented on the Polybius algorithm and encryption was obtained. If a security mechanism is developed for the key and text instead of increasing the key length of the Vigenère cipher, then the attack rate can be reduced, which is the drawback of this paper.
In paper [23], a hybrid algorithm was developed by combining the techniques of the Ceaser cipher and Vigenère cipher algorithm, in which a key was generated. Then, the plaintext and key were implemented on the Caesar cipher to obtain the encrypted text. After that, the encrypted text obtained from the Caesar cipher and the same key were implemented on the Vigenère cipher, and the ciphertext was obtained. If instead of using the same key twice in both algorithms, a unique key is developed for each plaintext, then the data security of the plaintext along with the static key can be increased, which is the drawback of this paper.
In paper [20], the ciphertext was obtained using the double encryption mechanism in which the Vigenère cipher algorithm was implemented on the plaintext, and an alphabetic encrypted text was obtained. After that, a numerical ciphertext was achieved by implementing the Polybius mechanism on the alphabetic encrypted text. If a single algorithm is made efficient instead of obtaining a separate ciphertext from the same key in the Vigenère cipher and Polybius mechanism, then the data security can be increased, which is the drawback of this paper.
In paper [24], a hybrid algorithm was developed by combining the Vigenère cipher and the Polybius cipher, the novelty of which was to transmit the data to the receiver in encrypted form with the help of the webpage. Instead of integrating existing techniques into this algorithm, the algorithm’s accuracy can be increased if state-of-the-art techniques are developed, which is the drawback of this paper

Novelty of Proposed Work

In this paper, an efficient algorithm was developed to secure the data in which data security is provided in two different layers. In the first layer, an encrypted text algorithm was developed, in which a plaintext-derived key, “Vigenère key”, and cipher values are obtained from the plaintext and static key. In the second layer, the Vigenère key and cipher values obtained from the first layer are intersected with the help of the Vigenère cipher algorithm, and a secure cipher value is obtained. Whenever data are repeatedly encrypted with the same key and when an attacker obtains this key through a key-snatching mechanism, the attacker can decrypt all data that have been encrypted with that key, which is a problem [27]. Encrypted text algorithms have been designed to solve this problem. In this algorithm, a plaintext and a static key are taken as input, and by implementing this algorithm on this plaintext and static key, an encrypted text and one key are obtained, named Vigenère key. The Vigenère key obtained from the plaintext can only be applied to this text. The Vigenère key of one plaintext cannot be used as the Vigenère key of another plaintext. When the results obtained from the proposed algorithm are implemented on any existing algorithm, it makes it impossible for an attacker to decrypt the data without the Vigenère key whether they try to find the probability of the key by using the Kasiski test or by using any another mechanism, which is the novelty of this paper. A complete comparative analysis is shown in Table 7.

6. Conclusions

After developing the encrypted text algorithm and comparing it with various papers, it was concluded that various detection and prevention mechanisms can be developed to prevent the rate of cyberspace attacks, but these mechanisms cannot protect the data from the attacker. Various researchers have used the Vigenère cipher algorithm with different algorithms to secure data. In all these algorithms, no such technique has been developed with the help of which the latest key can be generated from each text. If the attacker obtains the static key, they cannot decrypt the data because the latest key (Vigenère key) generated from this paper’s text is different and has access only to this text. Even if the attacker obtains the key from the snatching mechanism, this key does not affect any other text. If they try to decrypt the data, they are not able to access the data due to the double encryption mechanism.
In this paper, an efficient algorithm was developed in which the encrypted text and Vigenère key are obtained with the help of a plaintext and a static key. The key obtained from each plaintext can be used up to the same text boundary. Both the Vigenère key and static key are required to decrypt the data. The encrypted text and Vigenère key obtained from the encrypted text algorithm can make any algorithm secure, which is the novelty of this paper. In this paper, the proposed algorithm is implemented on the Vigenère cipher, and a ciphertext is obtained.
In the future, algorithms used in different papers will be compared with the proposed algorithm. The performance of these algorithms will be compared with state-of-the-art, and advanced algorithms will be proposed to enhance data security in cyberspace. Then, the time complexity of the proposed algorithm will be compared with all other algorithms, and the best technique will be discussed.

Author Contributions

M.N. conceptualization; A.A. (Ali Arshad) software and writing—review and editing; S.R. writing—review and editing; S.W.Z. methodology; A.K.D. editing; A.A. (Abdulrahman Alruban) editing; B.A. writing—review and editing; S.A. review and funding acquisition. All authors have read and agreed to the published version of the manuscript.

Funding

Abdulrahman Alruban would like to thank the Deanship of Scientific Research at Majmaah University for supporting this work under Project No. R-2022-288. Additionally, the authors deeply acknowledge the Re-searchers supporting program (TUMA-Project-2021-27) Almaarefa University, Riyadh, Saudi Arabia for supporting steps of this work.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

Abdulrahman Alruban would like to thank the Deanship of Scientific Research at Majmaah University for supporting this work under Project No. R-2022-288. Additionally, the authors deeply acknowledge the Re-searchers supporting program (TUMA-Project-2021-27) Almaarefa University, Riyadh, Saudi Arabia for supporting steps of this work.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Akanksha, D.; Samreen, R.; Niharika, G.S.; Shruthi, A.; Kiran, M.J.; Venkatramulu, S. A hybrid cryptosystem based on modified vigenere cipher and polybius cipher. EPRA Int. J. Res. Dev. 2022, 7, 2455–7838. [Google Scholar]
  2. Cheon, J.H.; Kim, M.; Kim, K.; Lee, J.Y.; Kang, S. Improved Impossible Differential Cryptanalysis of Rijndael and Crypton. In Proceedings of the Information Security and Cryptology—ICISC 2001: 4th International Conference, Seoul, Korea, 6–7 December 2001; Springer: Heidelberg/Berlin, Germany, 2002; pp. 39–49. [Google Scholar]
  3. Amrita, K.; Gupta, N.; Mishra, R. An Overview of Cryptanalysis on AES. Int. J. Adv. Res. Sci. Eng. 2018, 2014, 368–649. [Google Scholar]
  4. Nadeem, M.; Arshad, A.; Riaz, S.; Band, S.S.; Mosavi, A. Intercept the Cloud Network from Brute Force and DDoS Attacks via Intrusion Detection and Prevention System. IEEE Access 2021, 9, 152300–152309. [Google Scholar] [CrossRef]
  5. Kak, A. AES: The Advanced Encryption Standard; Engineering Purdue University: West Lafayette, IN, USA, 2021; pp. 1–92. [Google Scholar]
  6. Budhwani, T.; Tejaswini, P.; Chowdhury, A.; Bolli Durga, B.; Uddin, F.; Kurapati, C. An Analysis of Cloud Security. Int. Res. J. Eng. Technol. 2022, 9, 2. [Google Scholar] [CrossRef]
  7. Munoz, P.S.; Tran, N.; Craig, B.; Dezfouli, B.; Liu, Y. Analyzing the Resource Utilization of AES Encryption on IoT Devices. In Proceedings of the 2018 Asia-Pacific Signal and Information Processing Association Annual Summit and Conference, Asia-Pacific, Honolulu, HI, USA, 12–15 November 2018; pp. 1–8. [Google Scholar]
  8. Kumari, S. A research Paper on Cryptography Encryption and Compression Techniques. Int. J. Eng. Comput. Sci. 2017, 6, 20915–20919. [Google Scholar] [CrossRef]
  9. Qin, Z.; Liu, D.; Hua, H.; Cao, J. Privacy Preserving Load Control of Residential Microgrid via Deep Reinforcement Learning. IEEE Trans. Smart Grid 2021, 12, 4079–4089. [Google Scholar] [CrossRef]
  10. Sharma, N.; Prabhjot; Kaur, H. A Review of Information Security using Cryptography Technique. Int. J. Adv. Res. Comput. Sci. 2017, 8, 323–326. [Google Scholar]
  11. Tayal, S.; Gupta, N.; Gupta, P.; Goyal, D.; Goyal, M. A Review paper on Network Security and Cryptography. Adv. Comput. Sci. Technol. 2017, 10, 763–770. [Google Scholar]
  12. Hasan, M.; Ariffin, N.; Sani, N. A review of cryptographic impact in cybersecurity on smart grid: Threat, challenges and countermeasures. J. Theor. Appl. Inf. Technol. 2021, 99, 2458–2472. [Google Scholar]
  13. Z’aba, M.R.; Maarof, M.A. A Survey on the Cryptanalysis of the Advanced Encryption Standard; 2016 Core Sematic Scholar: Rome, Italy, 2006; pp. 97–102. [Google Scholar]
  14. Sun, L.; Dai, Z. Research on Framework of Security Service Cloud Computing. J. Comput. Appl. 2012, 32, 13–15. [Google Scholar]
  15. Heys, H.M. A Tutorial on Linear and Differential Cryptanalysis; Computer Science Department at Boston College: Philadelphia, PA, USA, 2017; pp. 1–33. [Google Scholar]
  16. Wang, Z.; Sun, L.; Guo, S. Real-time Task Threshold Scheduling Method for Cryptography Cloud based on Rolling Optimization. J. Comput. Appl. 2017, 37, 2780–2786. [Google Scholar]
  17. Carlin, S.; Curran, K. Study on cloud computing security. J. Softw. 2011, 22, 71–83. [Google Scholar]
  18. Wang, B.F.; Su, J.S.; Chen, L. Review of the design of data center network for cloud computing. J. Comput. Res. Dev. 2016, 53, 92085–92106. [Google Scholar]
  19. Trapiello, C.; Puig, V.; Rotondo, D. A zonotopic set-invariance analysis of replay attacks affecting the supervisory layer. Syst. Control Lett. 2021, 157, 105056. [Google Scholar] [CrossRef]
  20. Vatshayan, S.; Haidri, R.A.; Verma, J.K. Design of Hybrid Cryptography System based on Vigenère Cipher and Polybius Cipher. In Proceedings of the 2020 International Conference on Computational Performance Evaluation (ComPE), Shillong, India, 2–4 July 2020; pp. 848–852. [Google Scholar] [CrossRef]
  21. Triandi, B.; Ekadiansyah, E.; Puspasari, R.; Iwan, L.T.; Rahmad, F. Improve Security Algorithm Cryptography Vigenere Cipher Using Chaos Functions. In Proceedings of the 2018 6th International Conference on Cyber and IT Service Management (CITSM), Parapat, Indonesia, 7–9 August 2018; pp. 1–5. [Google Scholar] [CrossRef]
  22. Alisawi, W.C.; Oleiwi, Z.C.; Alawsi, W.A.; Alfoudi, A.S.; Hadi, N.K. Improvement of Classical Cipher Algorithm based on a New Model of Timed-Released Encryption. Int. J. Appl. Eng. Res. 2019, 14, 3531–3536. [Google Scholar] [CrossRef]
  23. Tan, C.M.S.; Arada, G.P.; Abad, A.C.; Magsino, E.R. A Hybrid Encryption and Decryption Algorithm using Caesar and Vigenère Cipher. J. Phys. Conf. Ser. 2021, 1997, 012021. [Google Scholar] [CrossRef]
  24. Bhavana, V.; Banushree, J.; Bhumika, D.; Chaitanya, B.; Prof, R. A CRYPTO SYSTEM USING VIGENERE AND POLYBIUS CIPHER. Int. J. Eng. Appl. Sci. Technol. 2021, 6. [Google Scholar] [CrossRef]
  25. Nahar, K.; Chakraborty, P. A Modified Version of Vigenere Cipher using 95 × 95 Table. Int. J. Eng. Adv. Technol. 2020, 9, 1144–1148. [Google Scholar] [CrossRef]
  26. Agustini, S.; Rahmawati, W.M.; Kurniawan, M. Modified Vegenere Cipher to Enhance Data Security Using Monoalphabetic Cipher. Int. J. Artif. Intell. Robot. (IJAIR) 2019, 1, 25–30. [Google Scholar] [CrossRef]
  27. Nadeem, M.; Arshad, A.; Riaz, S.; Zahra, S.W.; Dutta, A.K.; Almotairi, S. A Secure Architecture to Protect the Network from Replay Attacks during Client-to-Client Data Transmission. Appl. Sci. 2022, 12, 8143. [Google Scholar] [CrossRef]
Figure 1. Data Transmission between clients.
Figure 1. Data Transmission between clients.
Applsci 12 09736 g001
Figure 2. Cryptography Algorithms.
Figure 2. Cryptography Algorithms.
Applsci 12 09736 g002
Figure 3. The encryption algorithm.
Figure 3. The encryption algorithm.
Applsci 12 09736 g003
Figure 4. Decryption algorithm.
Figure 4. Decryption algorithm.
Applsci 12 09736 g004
Figure 5. Repetition of Key.
Figure 5. Repetition of Key.
Applsci 12 09736 g005
Figure 6. binary conversion of text and Key.
Figure 6. binary conversion of text and Key.
Applsci 12 09736 g006
Figure 7. binary conversion of Text and Key.
Figure 7. binary conversion of Text and Key.
Applsci 12 09736 g007
Figure 8. Eight-bit pairs of XOR result.
Figure 8. Eight-bit pairs of XOR result.
Applsci 12 09736 g008
Figure 9. Vigenère Key values.
Figure 9. Vigenère Key values.
Applsci 12 09736 g009
Figure 10. Equivalent Key ASCII values.
Figure 10. Equivalent Key ASCII values.
Applsci 12 09736 g010
Figure 11. Equivalent Text ASCII values.
Figure 11. Equivalent Text ASCII values.
Applsci 12 09736 g011
Figure 12. Vigenère Cipher Table.
Figure 12. Vigenère Cipher Table.
Applsci 12 09736 g012
Figure 13. Binary of each Vigenère index value.
Figure 13. Binary of each Vigenère index value.
Applsci 12 09736 g013
Figure 14. Binary of each Static Key value.
Figure 14. Binary of each Static Key value.
Applsci 12 09736 g014
Figure 15. XORed result.
Figure 15. XORed result.
Applsci 12 09736 g015
Figure 16. Decimal of each binary.
Figure 16. Decimal of each binary.
Applsci 12 09736 g016
Figure 17. Plaintext.
Figure 17. Plaintext.
Applsci 12 09736 g017
Figure 18. Encryption Result.
Figure 18. Encryption Result.
Applsci 12 09736 g018
Figure 19. Decryption Result.
Figure 19. Decryption Result.
Applsci 12 09736 g019
Table 1. Mathematical Notations.
Table 1. Mathematical Notations.
SymbolDescription
[xi]Static key
mStatic key length
[Ki]Position of static keys
[yi]Plaintext
nText length
[Ti]Position of text
δGCD
Z⊕[i]XOR result (encrypted text)
E[i]Vigenère Key
F[i]ASCII values of Vigenère key
I[z]ASCII values of encrypted text
Table 2. Ciphertext.
Table 2. Ciphertext.
Encrypted Text Ƞ Ѧ + Ì Ʋ n Ȅ ƪ b o 4
Vigenere Key [F[i]]ÌƸ.ՋƢqȄer7
CipherText [C]%ƪY+)d#fgk
Table 3. Vigenère Result.
Table 3. Vigenère Result.
CipherText [C] % ƪ Y + ) d # f g k
Vigenere Key [F[i]]ÌƸ.ՋƢqȄer7
Vigenere Results [V[i]]ȠѦ+ÌƲnȄƪbo4
Table 4. All Testing Results.
Table 4. All Testing Results.
TestingPlaintextPlaintext LengthStatic KeyStatic Key LengthVigenère KeyVigenère Key LengthCiphertext
1 This i$ 2022 Crypt0gr@phic P@peR32N@deeM6Ԏ*dCG¬?bXWYapȣ⟟^Ջ ʡÇ)⟟’Ջ℘)%E7^î-Ì 32₤(ƪdgℑ=‘bvt_jל⟒\¥࿓~’⟒%¥Ѧ’#b5%Ø+§
2 Window KeY b@C-J*X-520W@j!h@-ZahR@12ℑ-ƸȠƲ₤Ƞ¥Ƹ¥v&ʡ℘K‘F=ℑs20⏃)ℑƪ℘⟒ƪȠℑȠm”Ջ∂q#g9⏃g
3 W!FI P@ssw0rd N@dEeM20GX5$6j6§{uo⟟<Δ-HUƸ₤%Z}fT ࿓$720Ȅsgt⟒:℘+zr¬⟟#c{wlՋ”5
4 KEY5@CX-98/F12Z@r!sH6549ÌƸ.Ջ⟒Ƣq⌰Ȅer712ȠѦ+Ì⌰ƲdȄƪff4
5 MoB!LE-C0De94&T$16G%D#S96ƮLƸℑ!~₤hvi©¤uѦ§Ѧ17ƻu¬¤î|⟟mooÂ⏃m∂Ȅ∂
Table 5. Ciphertext Cryptanalysis.
Table 5. Ciphertext Cryptanalysis.
Proposed AlgorithmKasiski Test
Testing Ciphertext Length Vigenère Key Length (V)Kasiski Key Length Algorithm Results (K)Length Equalization
(V, K)
Index of Coincidence Algorithm Key Identify
117174V ≠ KNoNo
2661V ≠ KNoNo
3661V ≠ KNoNo
4663V ≠ KNoNo
Table 6. Algorithm Efficiency.
Table 6. Algorithm Efficiency.
Paper ReferencesEncryption Key Decryption KeyKey Cryptanalysis
[1]11Possible
[23]11Possible
[20]11Possible
[24]11Possible
Proposed paper12Not Possible
Table 7. Comparative Analysis.
Table 7. Comparative Analysis.
Sr#1234Proposed Work
Year20222021202020202022
Reference[1][23][20][24]
Proposed
Algorithm
Vigenère cipher, Polybius cipherVigenère
cipher,
Caesar cipher
Vigenère
cipher,
Polybius cipher
Vigenère cipher,
Polybius
cipher
Encrypted text key, Vigenère
cipher
NoveltyImplement Polybius algorithm on Vigenère
results
Identified the accuracy of hybrid
algorithms by MATLAB
Implement Vigenère
results on Polybius results
Web-based encryption and
decryption
Two-layer security. Layer-1 proposed an encrypted text and Vigenère key. Layer-2
implements the Layer-1 results on the Vigenère cipher algorithm
Implement on a Predefined TableVigenère cipherVigenère
cipher, ASCII table
Vigenère
cipher, ASCII table
Vigenère
cipher
Vigenère cipher
Keys for
Encryption (E)/
Decryption (D)
01 (E), 01 (D)01 (E), 01 (D)01 (E), 01 (D)01 (E), 02 (D)01 (E), 02 (D)
Research GapDeveloping a
secure key
the mechanism can increase key
security
compared to
increasing the length of the key
Developing a key from text can enhance the algorithm
efficiency compared to using the same key twice
An efficient
algorithm can provide better security instead of using hybrid algorithms
Instead of merged pre-built techniques, the latest technique can provide better
accuracy
Identified all
problems that
existed
Problem
Solution in proposed work
Vigenère key
algorithm
Vigenère keyTwo-layer
encryption
Algorithm
Encrypted text key algorithmSolved all existing problems
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Nadeem, M.; Arshad, A.; Riaz, S.; Zahra, S.W.; Dutta, A.K.; Alruban, A.; Almutairi, B.; Almotairi, S. Two-Layer Security Algorithms to Prevent Attacks on Data in Cyberspace. Appl. Sci. 2022, 12, 9736. https://doi.org/10.3390/app12199736

AMA Style

Nadeem M, Arshad A, Riaz S, Zahra SW, Dutta AK, Alruban A, Almutairi B, Almotairi S. Two-Layer Security Algorithms to Prevent Attacks on Data in Cyberspace. Applied Sciences. 2022; 12(19):9736. https://doi.org/10.3390/app12199736

Chicago/Turabian Style

Nadeem, Muhammad, Ali Arshad, Saman Riaz, Syeda Wajiha Zahra, Ashit Kumar Dutta, Abdulrahman Alruban, Badr Almutairi, and Sultan Almotairi. 2022. "Two-Layer Security Algorithms to Prevent Attacks on Data in Cyberspace" Applied Sciences 12, no. 19: 9736. https://doi.org/10.3390/app12199736

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop