<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>New Text Encryption Method Based on Hidden Encrypted Symmetric Key</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Seddeq E. Ghrare</string-name>
          <email>seddeq@jgu.edu.ly</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Haneen A. Barghi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nora R. Madi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Electrical and Computer Engineering, Faculty of Engineering, University of Gharyan</institution>
          ,
          <addr-line>P.O Box 64418 Gharyan -</addr-line>
          <country country="LY">Libya</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>1</fpage>
      <lpage>3</lpage>
      <abstract>
        <p>Cryptography is classified into two main categories which are Symmetric Key Cryptography and Asymmetric Key Cryptography. In both categories, the security level provided by any cryptographic algorithm depends on its encryption and decryption keys. In this paper a new encryption and decryption algorithm based on Hidden Encrypted Symmetric Key (HESK) is designed and implemented. The strength of this algorithm is represented in the key used for encryption and decryption process. The key itself is encrypted prior to be used for plain text encryption and cipher text decryption processes, then it is hidden inside the cipher text. The aim of hiding the key is to overcome the problem of distributing the secret key and to make the proposed algorithm more secure and difficult or even impossible to be broken. The proposed algorithm is tested on a set of plain texts of various sizes. The experimental result has been demonstrated that it is difficult to factorize the used key. The main two advantages of the proposed method are represented in the computation simplicity and security efficiency.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>
        On the Internet, information passes from one computer to
another through numerous systems before it reaches its
destination. Some information, such as banking, electronic
payment and electronic voting are very sensitive, therefore it
should run and exchanged over the network in a robust
manner and safely [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Cryptography is considered one of the
most used ways to protect the sensitive information and
prevent unauthorized people from altering that information.
      </p>
      <p>
        Cryptography is the science of using mathematics to
encrypt and decrypt data. Cryptography enables you to store
sensitive information or transmit it across insecure networks
(like the Internet) so that it cannot be read by anyone except
the intended recipient. While cryptography is the science of
securing data, cryptanalysis is the science of analyzing and
breaking secure communication. Cryptanalysts are also called
attackers. Cryptology embraces both cryptography and
cryptanalysis [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>The history of cryptography can be broadly divided into
three phases:
1. From ancient civilizations to the nineteenth century and
the first part of the twentieth century, with relatively simple
algorithms that was designed and implemented by hand.</p>
      <p>2. Extensive use of encrypting electro-mechanical
machines, around the period of the Second World War.</p>
      <p>3. Ever more pervasive use of computers, about in the last
fifty years, supported by solid Mathematical basis.</p>
      <p>Cryptography was already used in ancient times,
essentially in three kinds of contexts:
a) Private communications
b) Art and religion
c) Military and diplomatic use</p>
      <p>
        A cryptographic algorithm is a function used for both
encryption and decryption processes. This function is
dependent on a key value necessary for both encryption and
decryption [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The problem associated with the cryptographic
algorithms is the security that can be provided. The strength of
any cryptographic algorithm depends on the strength of the
keys used. In other words, the problem of low level security of
any algorithm arises from the weak encryption and decryption
keys that have been used and because of the rapid growth in
factorization algorithms; weak encryption and decryption keys
were easily factored and discovered. To overcome this
problem and to provide a good level security, the used keys
should be powerful enough [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        Based on the used keys, cryptographic algorithms can be
classified into two main categories which are asymmetric key
cryptographic algorithms and symmetric key cryptographic
algorithms [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        In the first category algorithms, the key used for
decryption process is different from the one used for
encryption process. It is extremely difficult to determine one
key by analyzing the other. This allows for the free
distribution of one key (i.e., public), while the key used for
decryption is kept private [
        <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
        ].
      </p>
      <p>
        The opposite is true for the second category algorithms,
keys used for encryption and decryption processes are the
same. This requires that sender and receiver agree on the key
prior to any information exchange [
        <xref ref-type="bibr" rid="ref3 ref4">3,4</xref>
        ]. Both asymmetric
and symmetric key cryptography are illustrated in Figs. 1 and
2.
      </p>
    </sec>
    <sec id="sec-2">
      <title>II. METHDOLOGY</title>
      <p>The cryptosystem of the proposed algorithm has
been divided into three modules, as indicated in Figure
3, which are:
•
•
•</p>
      <sec id="sec-2-1">
        <title>Key generation module Data encryption module Data decryption module</title>
        <p>Cipher Text</p>
        <sec id="sec-2-1-1">
          <title>A. Key Generation Module</title>
          <p>This stage involves the generation of two keys, which could
be used to encrypt the input data or message to be transferred
and to decrypt the received encrypted message at the
destination; those two keys are called key1 and key2
respectively. Only one of these keys can be used. In order to
increase the security level of the proposed method, the
chosen encryption key is encrypted and then used to encrypt
the plain text in the following next stage (module).</p>
        </sec>
        <sec id="sec-2-1-2">
          <title>B. Data Encryption Module</title>
          <p>In this module any data or plain text to be sent to the receiver
is encrypted prior to being transferred using the generated
and encrypted keys; Key1 or Key2. The used encryption key
is then inserted and hidden in the cipher text. Finally, the
cipher text, which contains on the encrypted encryption keys,
is sent to the destination.</p>
        </sec>
        <sec id="sec-2-1-3">
          <title>C. Data Decyption Module</title>
          <p>When the encrypted data (Cipher text) reaches the receiver, it
cannot be read. In order to be read, the hidden encrypted
decryption key should be extracted from the cipher text. Then
the cipher text is decrypted and converted to its original form
(plain text) using the extracted key.</p>
          <p>The main steps of the proposed algorithm are as follows:
Step 1: Read the plain text
Step 2: Divide the plain text into two halves
Step 3: Generat the encryption and decryption keys
3.1: Key1 = LH (Lower half of the plaintext)
3.2: Key2 = UH (Upper half of the plaintext)
Step 4: Encrypt the encryption and decryption key
Step 5: Use the resulted encrypted key to encrypt the whole
plain text
Step 6: Hide the encryption key in the ecrypted text (Cipher
text)
Step7 : Send the cipher text with the hidden key to the
intended reciever.</p>
          <p>In the previous third step, which involves the key
generation, there are two generated keys (key1 and key2)
which means that either one can be used. The size of the used
key is equal to the half of the plain text size.</p>
          <p>The generated key is firstly encrypted, then the encrypted key
is used to encrypt the plain text,and finally the encrypted key
is hidded inside the cipher text.</p>
          <p>At the reciver side the following steps should be followed
in order to get the original plain text.</p>
          <p>Step 8: Extract the hiden key from the cipher text
Step 9: Decrypt the cipher text using the extracted key
Step 10: Decrypt the key
The encryption and decryption processes are performed using
the following equations:
C = E (k,p)</p>
          <p>E (k,p) = (p+k) mod 26 (1)
where :</p>
        </sec>
        <sec id="sec-2-1-4">
          <title>C is the cipher text</title>
        </sec>
        <sec id="sec-2-1-5">
          <title>K is the encryption key</title>
        </sec>
        <sec id="sec-2-1-6">
          <title>P is the plain text</title>
        </sec>
        <sec id="sec-2-1-7">
          <title>E is the encryption algorithm performed to encrypt the plain text (p) using the encryption key (k)</title>
          <p>P = D (k,C)</p>
          <p>D (k,C) = (p – k) mod 26
where :</p>
        </sec>
        <sec id="sec-2-1-8">
          <title>C is the cipher text</title>
        </sec>
        <sec id="sec-2-1-9">
          <title>K is the decryption key</title>
        </sec>
        <sec id="sec-2-1-10">
          <title>P is the plain text (2)</title>
        </sec>
        <sec id="sec-2-1-11">
          <title>D is the decryption algorithm performed to decrypt the cipher text (c) using the decryption key (k)</title>
          <p>The above steps of the proposed algorithm are
implemented using Java programming language [5] and
tested on a set of text file of different sizes Figure 4 shows
the block diagram of the proposed algorithm.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>III. RESULTS PRESENTATION</title>
      <p>As it was mentioned, the proposed algorithm is
implemented using Java programming language. The results
obtained by performing the proposed algorithm on the same
files of sizes and executed using hardware with the following
specifications:
• Windows 7 Ultimate Operating System
• Intel Core3 Processor
•
•
•</p>
      <sec id="sec-3-1">
        <title>CPU speed of 2.10 GHz</title>
        <p>RAM size of 2 GB</p>
        <p>HDD of 500 GB</p>
        <p>The size of the used data files are 1KB, 10KB, 100KB,
300kB and 0.5 MB. The Graphical User Interface (GUI);
which is generated by the designed program; is shown in
Figure 5.</p>
        <p>Table 1 shows the time taken for the key generation
process, encryption process, and decryption process
respectively. Note that when the size of the plain text is
increased, the size of the generated encryption key will be
longer and will take longer time. Consequently, the generated
key will be stronger and harder to be broken or discovered.
Moreover, the generated encryption key is encrypted before it
was used for encrypting the plain text, then it is inserted into
the cipher text to be hidden. So, all those steps were taken in
the account and included in the time calculations.</p>
        <p>From the above table, the following comments can be
extracted:</p>
        <p>The overall computation time taken by the proposed
algorithm is 1.20 sec, 3.00 sec, 13.00 sec, 24.00 sec, and
53.00 sec, to encrypt and decrypt plain texts of 1KB, 10KB,
100KB, 300KB, and 500KB respectively including the time
taken for key generation and key encryption and hiding..</p>
        <p>The time taken for the three stages (key generation,
encryption and decryption processes) using the proposed
algorithm increases whenever the size of the plain text is
increased. The reason as it was explained earlier, because of
that whenever the size of plain text is increased; the size of
encryption key will be longer and as a result the longer time
will be taken for the generation process. This can be seen
from the following figure.</p>
        <p>From figure 6, it can be noticed that the most of time is
elapsed in the decryption process followed by the encryption
process then key generation process. Moreover, the time is
increasing and getting longer whenever the size of the plain
text is increased for all the three processes.</p>
        <p>IV. ANALYSIS OF THE PROPOSED ALGORITHM</p>
        <p>For the analysis purpose, the proposed system has been
implemented in JAVA programming language for
demonstration intention. Proposed system has been analyzed
for identification of keyword, identification of keyword
distance, identification of polynomial and identification of
key stream. This analysis was carried out using both
Frequency analysis test and Kasiski analysis test.</p>
        <sec id="sec-3-1-1">
          <title>A. Frequency AnalaysisTest</title>
          <p>Frequency analysis is the study of letters or groups of
letters contained in a ciphertext in an attempt to partially
reveal the message. The English language (as well as most
other languages) has certain letters and groups of letters
appear in varying frequencies</p>
          <p>In English language, "E" is the most common letter,
appearing about 12% of the time (that is just over one in ten
letters is an "E"). The next most common letter is "T" at 9%.
The full frequency list is given by the graph illustrated in
figure 7.</p>
          <p>Fig. 7. Frequency of English Letters.</p>
          <p>Further frequency analysis is applied for the ciphered text
shown in Figure 10. This cipher text in resulted from the
plain text enciphered by the encrypted key shown in Figure 9
using the proposed algorithm.</p>
          <p>Cryptography is the knowledge of using codes to
encrypt and encrypt data. It enables one to store
sensitive information or transmit it across computer
in a more secured ways so that it cannot be read by
anyone excepted the intended receiver.
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
repeated string occurs in the plaintext, and the distance
(period) between corresponding characters is a multiple of
the keyword length, the keyword letters will line up in the
same way with both occurrences of the string. Then, the
distances between consecutive occurrences of the strings are
likely to be multiples of the length of the keyword. Thus
finding more repeated strings narrows down the possible
lengths of the keyword.</p>
          <p>The Kasiski test has been applied to the text which is
enciphered using the proposed algorithm. The most repeated
strings of character and their distances are listed in Table
zhu
78
ywo
113
zef
21
xad
94
ggf
27</p>
          <p>From the above table it can be seen that there is no any
relation between the distances (periods) of those strings,
which means the distances between consecutive occurrences
of the strings are not multiples and as a results the keyword is
hard to be revealed.</p>
          <p>V.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>CONCLUSION</title>
      <p>In this paper, text encryption and decryption algorithm
based on Hidden Encrypted Symmetric Key (HESK) is
designed and implemented. The strength of this algorithm is
represented in the key used for encryption and decryption
process. The key itself is encrypted prior to be used for plain
text encryption and cipher text decryption processes, then it is
hidden inside the cipher text in such a way which makes it
cannot be recovered. The aim of hiding the key is to
overcome the problem of distributing the secret key and to
make the proposed algorithms more secure and difficult or
even impossible to be broken.</p>
      <p>The proposed algorithm was tested on a set of plain texts of
various sizes. The experimental result has been demonstrated
that it is difficult to factorize the used key. The main two
advantages of the proposed algorithm are represented in the
computation simplicity and security efficiency.</p>
      <p>From the above table it can be seen that the frequency of
the letters of cipher text obtained by using the proposed
algorithm is totally different from the original frequency of
the English language letters which proves that the keyword of
the proposed algorithm is hard to be revealed using frequency
analysis.</p>
      <sec id="sec-4-1">
        <title>B. Kasiski Analaysis Test</title>
        <p>The Kasiski analysis test involves looking for strings of
characters that are repeated in the ciphertext. The strings
should be three characters long or more for the examination
to be successful. The reason this test works is that if a</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>William</given-names>
            <surname>Stalling</surname>
          </string-name>
          , “
          <article-title>Cryptography and Network Security Principal</article-title>
          and Practice”,
          <string-name>
            <surname>Third</surname>
            <given-names>Edition</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pearson</surname>
          </string-name>
          (
          <year>2006</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Ayushi</surname>
            , “
            <given-names>A Symmetric</given-names>
          </string-name>
          <string-name>
            <surname>Key Cryptographic Algorithm</surname>
          </string-name>
          ”,
          <source>International Journal of Computer Applications (0975 - 8887)</source>
          , Vol.
          <volume>1</volume>
          , No.
          <volume>15</volume>
          , (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Arjen</surname>
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Lenstra and Eric R. Verheul</surname>
          </string-name>
          ., “
          <article-title>Selecting cryptographic key sizes”</article-title>
          .
          <source>In Public Key Cryptography</source>
          , pp
          <fpage>446</fpage>
          -
          <lpage>465</lpage>
          . (
          <year>2000</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Prashant</given-names>
            <surname>Kumar</surname>
          </string-name>
          Arya et al , “
          <article-title>Comparative Study of Asymmetric Key Cryptographic Algorithms”</article-title>
          ,
          <source>International Journal of Computer Science &amp; Communication Networks</source>
          ,Vol
          <volume>5</volume>
          (
          <issue>1</issue>
          ),
          <fpage>17</fpage>
          -
          <lpage>21</lpage>
          (
          <year>2015</year>
          ) Deitel,
          <string-name>
            <surname>H.M.</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.J.</given-names>
            <surname>Deitel</surname>
          </string-name>
          ., “Java: How to Program”,
          <string-name>
            <surname>Fifth</surname>
            <given-names>Edition</given-names>
          </string-name>
          , Perentice Hall Inc., Upper Saddle River, New Jersey. (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>