0% found this document useful (0 votes)
29 views6 pages

A New Algorithm Combining Substitution &

References
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views6 pages

A New Algorithm Combining Substitution &

References
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

International Conference on Trends in Electronics and Informatics

ICEI 2017

A New Algorithm Combining Substitution &


Transposition Cipher Techniques for Secure
Communication
Umang Bhargava Raghav Chawla
National Institute of Technology National Institute of Technology
Kurukshetra, India Kurukshetra, India
[email protected] [email protected]

Aparna Sharma Prateek Thakral


National Institute of Technology National Institute of Technology
Kurukshetra, India Kurukshetra, India
[email protected] [email protected]

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.

Keywords– Substitution; transposition; multiplicative cipher;


decryption algorithm.
Reil-Fence; ASCII code.
Figure 1: Basic building block of cryptography

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

978-1-5090-4257-9/17/$31.00 ©2017 IEEE 619


International Conference on Trends in Electronics and Informatics
ICEI 2017

Section 4, shows implemented results performed using java choosen and gets processed through a special substitution
simulator. technique to give a final encrypted block.

III. PROPOSED WORK


II. RELATED WORK The word Cryptography or cryptology is derived from Greek
word kryptos which means "hidden, secret" and graphein
R. Rajaram et al.[2] proposed the use of modern avatar of which means "writing”, that is secret writing. The art of
Julius Caesar cipher technique to encrypt and decrypt the cryptography dated way back to thousands of years. It was
message into cypher text by choosing primitive root first and concerned solely with message confidentiality primarily to
then using the encryption technique : Ci =(Mi + Ki) mod 26 ensure secrecy in communications, such as those of spies,
and encryption technique : Mi=(Ci - Ki) mod 26 military leaders, and diplomats in those days. Broadly, cipher
where=message words and K’s values are used as shift keys techniques are divided into two types: Substitution Cipher and
with an assumption to determine the prime factors and Transposition Cipher. Substitution cipher is a method in
primitive roots which are used for determining the logarithmic which units of plaintext are replaced or substituted by
value and create difficulty for an eavesdropper, as he is different characters. Whereas in Transposition cipher, the
position of characters of plaintext are shifted or permuted
supposed to practice (n+2)! attempts for the prime factor and
according to some format or algorithm. The blend of both
another (n+2)! attempts for the primitive root. Whereas the
techniques in a single algorithm have high chances of
Caesar cipher has possible key space of 26! which is 88 bit producing a secret encrypted message. Some of the techniques
long which may be get decrypted by using the brute-force. So, used in our algorithm are:
their proposed algorithm will make the analysis of interceptor
fail because in it values do not follow any sought of a 3.1 Multiplication Cipher: Multiplicative cipher is a
substitution cipher technique. In this cipher, each character of
common pattern.
a plain text is encrypted by multiplying it by a secret key. The
Pal et al. [5] provides bit level conversion of inconsistent secret key is chosen very carefully such that multiplying it
block length characters for encryption. Here they have with any character would yield a different character for each
considered a block of 16 characters/128 bits. Substitution plain text character. The key must not be 0 as each letter
technique is being followed on the block of characters along becomes 0 for key =0 and it must not be 1 as each plain text
with transpositions using multidimensional array. The block is letter remains unchanged for key=1. Here, decryption is done
being operated with one-time sub key which will produce by multiplying each cipher text character by the inverse of the
secret key in order to obtain the plain text character. Also as
intermediate result of similar length. The previous text block
integral value of ‘A’ is 0, it will always produce ‘A’ in cipher
is combined with consecutive 8 characters/64 bits of the plain text (i.e. no change in case of ‘A’). The decryption is
text and gives a block containing 192 bits. This is used as performed by multiplying each cipher text with the inverse of
present block of text which produces a new text block
containing 24 characters with same technique. Next
8characters are considered with previous block and same
technique is applied to give a block of 256 bits. If there are
more than 32 characters in plain text i.e. 256 bits then every
256 bitblock is XORed with previous 256 bits block other
than the first block. At the end bits are being chosen from
MSB position and chosen bits are processed through a special
substitution technique to give final encrypted block.
Jayanta Kumar et al [7] proposed a substitution technique
which is being followed on block of characters with
transposition. They considered a block of 16 Characters /128
bits. Intemediate result is being produced by using the block
along with one sub key. Furthermore, the last text-block gets
combined with consecutive 8/64-characters bits of plain-text
and returns a 192 bits block. Similarly, it gets continued which
produces 24 characters then next 8 Characters gets in
consideration with the previous block and same technique is
applied to give a 256 bits. If in the plain-text there are more
than 256 bits then every 256 bits block gets XORed wih last
block except the first one. At last, MSB positional bits gets

978-1-5090-4257-9/17/$31.00 ©2017 IEEE 620


International Conference on Trends in Electronics and Informatics
ICEI 2017

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

Figure 2: Encoding with different keys in multiplicative cipher Position: 6 7 8 9 10 11

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

Hence, it will be read as the sequence of rows and the


encrypted message becomes:
‘RATOETTKORWPATCMREAO’.
The algorithm that we have proposed has used a series of both
substitution and transposition ciphers in the process of
encryption and decryption. Our algorithm consists of three
steps:
Step 1. Substitution
Step 2. Transposition
Step 3. Substitution
To have a better comprehension of this algorithm, let’s
understand it with an example. Suppose the plain text is
‘ATTACK AT DAWN’. After eliminating spaces from this
text, the plain text which is yet to be encrypted becomes:
‘ATTACKATDAWN’. Now, this plain text goes through a
series of steps in encryption algorithm which results into a
more secure cipher text. Starting with the first step. Figure 4: Formula applied on Plain Text

Hence, the intermediate encrypted text in this step is


ENCRYPTION: BCSBLHBCQBHO.
STEP 2: This step transpose characters of the intermediate
STEP 1: In this step, each character is multiplied by a secret
cipher text which convert it into more safe and secure text.
key depending to its position in the text,i.e.
Here each character is written diagonally till 3 steps (rows)
Plain text: A T T A C K and then read it in sequence of rows.

978-1-5090-4257-9/17/$31.00 ©2017 IEEE 621


International Conference on Trends in Electronics and Informatics
ICEI 2017

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.

Figure 6: Final substitution of intermediate text in symbols


Figure 7: Step 3 of Decryption
Therefore, the intermediate cipher text will be converted to the
final cipher text with respect to the above mentioned table

978-1-5090-4257-9/17/$31.00 ©2017 IEEE 622


International Conference on Trends in Electronics and Informatics
ICEI 2017

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:

ALGORITHM FOR DECRYPTION: Figure 8: Implementation of Algorithm


1. Begin
2. The cipher text is read and stored it in the string variable
CT (Cipher text). V. CONCLUSION AND FUTURE WORK
This paper successfully encrypts the plain text at sender’s end
3. Apply Step 1 of decryption. All characters which are in
non-readable format are substituted with their original and decrypts the cipher text at receiver’s end using the
(readable) characters. proposed cipher technique. It proves to be a well-defined
combination of the two types of cipher techniques-substitution
4. Apply Step 2 of decryption in the output obtained from technique and transposition technique. It converts the plain
step1. Transposition of characters occur here and they return text into the special symbols which in turn make the
to their original position. cryptanalysis difficult if the symbols are also present in the
5. Finally, final step (step3) is applied to the output from step plain text. Besides this, the algorithm can also be modified in
2. Use formula [[character integral value-1]*21] mod 26, if order to deal with the lower case characters as the proposed
position of that character is even [[character integral value- cipher technique deals with the upper case characters only.
1]*19] mod 26, If position of that character is odd In future, the given symbol table can be extended for the
6. Plain text is obtained. numeric values as well as lowercase alphabets. Currently, this
algorithm encrypts only uppercase characters. The inclusion
7. End of encryption of numbers and lowercase alphabets would
make the cryptanalysis a more difficult and a complex
procedure. Also, in future work, the message can also be
IV. RESULTS encrypted with the help of UNICODE. It will provide a much
Here in the following figure, the plain text 'ATTACK AT greater range of options from which one can perform
DAWN' goes through a series of steps. In Step 1, it is encryption.
substituted into BCSBLHBCQBHO. Applying the Step 2, it is
transposed into BBBBCLCHSHQO. In step 3, it is finally
encrypted into “”””#,#(=(;/
Similarly, the encrypted text is decrypted in a series of steps. REFERENCES
In step 1, “”””#,#(=(;/ is decrypted into BBBBCLCHSHQO.

978-1-5090-4257-9/17/$31.00 ©2017 IEEE 623


International Conference on Trends in Electronics and Informatics
ICEI 2017

[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.

978-1-5090-4257-9/17/$31.00 ©2017 IEEE 624

You might also like