A New Algorithm Combining Substitution &
A New Algorithm Combining Substitution &
ICEI 2017
Abstract: In today’s world of communication, the maintenance of transmission media. At receiver’s end the text is decrypted
the security, confidentiality and integrity of the data is a big again to the original text using the same key and the
challenge. Cryptography is the technique that contributes to
achieve this goal in a communication network. It converts the
information into cipher text with the help of an algorithm or
cipher text technique. Many such techniques have come into the
picture till date such as ceaser cipher, vernam cipher, vigenere
cipher technique etc. This paper thus, proposes a new cipher
technique which consists of the three step process-substitution,
transposition and substitution again. Using this technique, the
plain text can be converted into the cipher text which is the
combination of various symbols defined in a given table that in
turn makes the plain text unpredictable.
I. INTRODUCTION
Cryptanalysis is the depiction of the plain text (original text)
In the today’s world, where digitalization is main aspect of from the cipher text without any knowledge of key. The
modernization and is widely spreading, the need of secure combination of both, cryptography and cryptanalysis is known
data transmission is a major concern. Cryptography is one as Cryptology. Therefore, the aim of cryptographers is to
such activity that ensures the secure transmission of data produce an intelligent cipher which is harder to depict and
between two parties. Cryptography aims to convert the data cracked by the cryptanalysts. The algorithm must be efficient
or message into a non-readable form with the help of an and easy enough to be understood by the parties involved in
algorithm and key which known to sender and receiver only. communication. The algorithm can be used repeatedly using
Besides the confidentiality or security the major goals of different key each time. So that intruder would be unable to
cryptography is to retain authentication, integrity and non- decipher the encrypted message to the original message even
repudiation. Therefore, cryptography allows the transmission if the algorithm is known to it. In other words, outsiders
of message or information over an insecure channel. The cannot get the message until/unless key is known. In this
information that is to be sent is called ‘Plain Text’ which is paper, sections 2 discuss the various techniques that have been
in human readable form. It then undergoes to a cryptography raised so far. Section 3, describes the proposed algorithm that
technique and is converted into a non-readable form called as consist of the three step process mentioned previously.
‘Cipher Text’. This text is then transmitted over the
Section 4, shows implemented results performed using java choosen and gets processed through a special substitution
simulator. technique to give a final encrypted block.
the secret key. Some keys such as 3, 5,7,9,11,19 are good keys Position: 0 1 2 3 4 5
for encryption. The inverse of such keys are 9,21,15,3,19,11
respectively. Even Odd Even Odd Even Odd
Plain text: A T D A W N
The highlighted keys produce distinct character for each Even Odd Even Odd Even Odd
alphabet as shown with formula ((character*secret_key) mod Now each character is multiplied by either 5 or 11 depending
26). on whether the position is even and odd respectively. That is,
every character in even position is multiplied by 5 and every
3.2 The rail fence cipher: It is also known as a zigzag cipher. character in odd position is multiplied by 11. The decision of
It is a form of transposition cipher. It derives its name from selection of numbers 5 and 11 is already explained under the
the way in which it is encoded. Here, the plain text is first section of multiplication cipher above.
written downwards diagonally on successive "rails" of an
imaginary fence, then moving up when one reaches the Here, all alphabets are treated in terms of their integral values.
bottom rail. When one reach the top rail, the message is That is , ‘A’ will be assigned value 0, ‘B’ as 1, ‘C’ as 2 and so
written downwards again until the whole plaintext is written on till ‘Z’=25.
out. The message is then read off in rows.
The following formula will be applied on every character of
For example, if there are 4 "rails" and a message is 'REPEAT the plain text to obtain the intermediate Cipher text (C.T.): If
ATTACK TOMORROW', it will be written diagonally as position of character is even: Intermediate C.T. = [[character
shown in figure 3. integral value*5] +1] mod 26.If position of character is odd:
Intermediate C.T. = [[character integral value*11] +1] mod
26.This formula makes sure that character ‘A’ will be
encrypted to other character than ‘A’ (unlike in multiplication
substitution cipher technique).
Applying this formula in ‘ATTACK AT DAWN’.
Figure 3: Rail Fence encryption
For example the above intermediate text BCSBLHBCQBHO (Figure 6). Hence the text BBBBCLCHSHQO is finally
is transposed in following manner. It is written diagonally in 3 encrypted into “”””#,#(=(;/ Hence the final encrypted message
steps as mentioned below. is “”””#,#(=(;/
And it is read as shown : DECRYPTION:
The decryption process is very similar to the encryption
process; the difference is that all the steps is performed in
reverse order.
STEP 1: In this step, the encrypted text will be converted to
the corresponding character value with the help of the table
mentioned in figure 6.
Figure 5: Step 2 of Encryption Hence the corresponding intermediate decrypted text of the
following encrypted text “”””#,#(=(;/ is
Hence, the encrypted text in second step is
BBBBCLCHSHQO.(With reference to table described in
BBBBCLCHSHQO.
figure 6).
STEP 3: This is the third and final step of this algorithm. STEP 2: In this step, the intermediate decrypted text obtained
Here, each character is substituted with special symbols which from step1 is permuted in order to obtain the original
provide it double coat of substitution and hence make it more position of the characters in the plain text. Here, the
secure and encrypted. The special characters are chosen here intermediate text is written in the sequence of rows and read
according to its ASCII value. The ASCII values from 33 to in the sequence of diagonals.
47, 58 to 64 and 91 to 94 are selected to represent alphabets.
That is the intermediate decrypted text of BBBBCLCHSHQO
These all values represents a special symbol. This substitution
is BCSBLHBCQBHO
make the text unreadable and non-understandable to any
outsider present in the system. The following table is used as a STEP 3: It is the final step in decryption. Here the
final substitution of alphabets: intermediate text is decrypted into original Plain Text (P.T.)
with the help of following formula:
ALPHABET:
If position is even: P.T. = [[character integral value-1]*21]
INDEX VALUE: mod 26.
SYMBOL: If position is odd: P.T. = [[character integral value-1]*19]
CORRESPONDING ASCII VALUE: mod 26.
Here, 21 and 19 are inverse of 5 and 11 respectively.
Applying this formula in the intermediate decrypted text.
Therefore, the original text is obtained from the above cipher In step 2, obtained output is decrypted into
text as ATTACKATDAWN. BCSBLHBCQBHO. Finally in the last step, plain text
ATTACKATDAWN is obtained.
ALGORITHM FOR ENCRYPTION:
A screenshot of output of above algorithm implementation is
1. Begin
2. Read the plain text from user and store it in the string
variable PT (Plain text) after eliminating all spaces from it.
3. Apply Step 1 of encryption. Using formula
[[character integral value*5] +1] mod 26, if position is
Even. [[character integral value*11] +1] mod 26, If position is
odd.
4. Apply Step 2 of encryption in the output obtained from
step1. Transposition of characters occur here as explained in
step 2.
5. Finally, final step (step3) is applied to the output from step
2. All characters are substituted with special characters,
converting it in the non-readable format.
6. Cipher text is obtained.
7. End
shown:
[1] Aditi Saraswat, Chahat Khatri, Sudhakar, Prateek Thakral and Prantik [2] K.Senthil, K.Prasanthi, R.Rajaram Department of Computer Science and
Biswas, “An Extended Hybridization of Vigenere and Caesar cipher Engineering Vickram College of Engineering, Enathi 630561.
techniques for secure communication”, Elsevier Procedia Computer Science
92 (2016): 355-360.
[3] Nacira G Z.,Abdelaziz A. The θ -Vigenere Cipher Extended to Numerical [8] L.Sharma B. K. Pathak R. Sharma "breaking of Simplified Data
Data, Proceedings of International Conference of Information and Encryption Standard using Genetic Algorithm" Global Journal of Computer
Communication Technologies: From Theory to Applications, 2004. DOI: Science and Technology vol. 12 no. 5 March 2012.
10.1109/ICTTA.2004.1307807. [9] R. Spillman M. Janssen B. Nelson M. Kepner "Use of a genetic algorithm
[4] Senthil K, Prasanthi K, Rajaram R. A Modern Avatar of Julius Caesar and in the cryptanalysis of simple substitution ciphers" Cryptologia vol. 17 no. 1
Vigenere Cipher. Proceedings of IEEE International Conference on pp. 31-44 1993.
Computational Intelligence and Computing Research, 2013, Enathi, [10] I. A. Ismail M. Amin H. Diab "how To Repair the Hill Cipher" Journal of
Tamilnadu, India . Zhejiang University Science A vol. 7 no. 12 pp. 2022-2030 2006.
[5] Pal J K, Mandal J K, Gupta S. Composite Transposition Substitution [11] A. Ramesh Dr. A. Suruliandi "Performance Analysis of Encryption
Chaining Based Cipher Technique, Proceedings of 16th International Algorithms for Information Security" 2013 International Conference on
Conference on Advanced Computing and Communications, 2008, Chennai, Circuits Power and Computing Technologies IEEE 2013.
Tamil Nadu India. [12] A. Nadeem, M.Y. Javed, "A Performance Comparison of Data
[6] Blair A. Learning The Caesar And Vigenere Cipher by Hierarchical Encryption Algorithms", Information and Communication Technologies
Evolutionary Re-combination, Proceedings of IEEE Congress on 2005, pp. 84-89.
Evolutionary Computation June 20-23, Cancun, Mexico, 2013.
[7] Jayanta Kumar Pal, J. K. Mandal, “A Novel Block Cipher Technique
Using Binary Field Arithmetic Based Substitution (BCTBFABS)” Second
International conference on Computing, Communication and Networking
Technologies ,2010.