You are on page 1of 10

Saba Journal of Information and Technology and

Networking
www.ojs.sabauni.net

10 October 2019

ACCEPTANCE LETTER
Dear Author(s),

We are pleased to inform you that the following paper,

Entitle: A NEW SYMMETRIC KEY ENCRYPTION SCHEME FOR


BINARY IMAGES

Author(s): Abdullah Jaafar, Abdul-Gabbar Tarish Al-Tamimi

has been officially accepted for publication in Saba Journal of


Information Technology and Networking after the peer review. It will
be published online in an upcoming issue (vol. 6, Issue 2 ) and available
on the journal website.

Thank you for submitting your paper to this journal.

Sincerely yours,

Dr. Ibrahim Ahmed Al-Baltah

Editor-in-Chief

Saba Journal of Information and Technology and Networking


38
S.J.I.T.N Vol.6 No.2 (2019)

journal homepage: www.sabauni.net/ojs

Article
A NEW SYMMETRIC KEY ENCRYPTION SCHEME FOR BINARY IMAGES
Abdullah Jaafar1*, Abdul-Gabbar Tarish Al-Tamimi2
1,2
Taiz University
Article info Abstract

Article history: Generally, symmetric key encryption schemes need to use a key exchange
scheme for generating more secure session key between two parties. Diffie-
Accepted:
Hellman (DH) key exchange scheme is a method to ensure the confidential

Keywords: construction of a shared secret key between two parties in real-time on an


Diffie-Hellman (DH) Key unsecure channel. Therefore, DH key exchange scheme is attached to
Exchange Scheme, Shadow existing symmetric key encryption scheme. In real implementation,
Image, Boolean Operation,
normally, the shared secret key that is being established by DH key
Binary Inner Product,,
Non-Invertible Matrix exchange scheme is used to encrypt and decrypt the subsequent
Problem communications using faster symmetric key encryption scheme. However,
DH key exchange scheme is based on the difficulty to solve discrete
logarithm, which is a hard mathematical problem and requires
computationally heavy and complex operations. Since the Boolean
operations are simple, quick, and very adaptive to be implemented to an
image cryptography scheme, we propose in this paper a new symmetric key
encryption scheme based on Boolean operations for binary images. The
proposed scheme starts by establishing a shared secret key between two
communicating parties and after that this shared secret key is then used as
secret key to encrypt and decrypt the subsequent communications. The
security of our scheme is based on the difficulty of solving the unsolvable
non-invertible matrix problem. The performance results show that the total
execution time of our scheme is better and smaller than the total execution
time of the conventional scheme (DH with AES) for different sizes of data
(image) files. Our scheme is fast, easily implemented and secure.

* Corresponding author: Abdullah Jaafar


E-mail: dr.abdullahjaafar@yahoo.com

All Rights Reserved © 2019 Saba Journal of Information Technology and Networking, Published by Saba University.
39
S.J.I.T.N Vol.6 No.2 (2019)

1. Introduction key encryption schemes, because asymmetric


Today digital information can be distributed via key encryption schemes require more
the Internet to a large number of people in an computational processing power [9]. Symmetric
easy and simple way. Information security is a key encryption schemes need to use a key
field that protects and secures sensitive digital exchange scheme for generating more secure
information and its systems from unauthorized session key between two parties [11]-[15].
access, disclosure, disruption, modification, or In 1976, Diffie and Hellman [16] introduced the
destruction. Information security provides many first concept of asymmetric (public) key
services such as data confidentiality, cryptography to solve the secret key exchange
authentication, data integrity and non- problem in the symmetric (secret) key
repudiation in order to keep the distribution of cryptography. Diffie-Hellman (DH) key
sensitive digital information and its systems exchange scheme is a method to ensure the
works reliably [1]-[3]. confidential construction of a shared secret key
Information security in the current era is between two parties, in real-time on an unsecure
becoming very significant in communication and channel (open network) like Internet. A shared
data storage. Cryptography is one of the trusted secret key then could enable the two parties,
practical methods for protecting data transferred who may not have had any previous
from one party to another over an insecure communication, to encrypt their
channel (e.g., Internet). The main purpose of communications [17]-[19]. The security of the
cryptography is to provide confidentiality by DH key exchange scheme is established under
converting the sensitive private information from the assumption that calculating discrete
its normal form (known as plaintext) into an logarithms is a hard problem, which require
unreadable and useless form (known as heavy and complex cryptographic
ciphertext). The encrypting technologies of computations. The task of calculating discrete
traditional and modern cryptography are usually logarithms for large prime numbers is
used to avoid the message from being disclosed considered unfeasible, where the large prime
[4]-[8]. There are, in general, two main types of numbers exceed 1024 bits [11], [16], [17], [20],
conventional cryptography which are controlled [21]. Therefore, although the hybrid
by keys, symmetric key cryptography and cryptographic schemes (such as the scheme
asymmetric key cryptography. Symmetric key which is resulting of combination of DH key
cryptography which is also known as secret key exchange scheme with AES encryption scheme)
cryptography, uses the same key (only one key) give the strong security requirements, the
for both encryption of plaintext and decryption performance of the hybrid scheme can be
of ciphertext. The most common symmetric key degraded due to increasing total execution time.
encryption schemes are DES, 3DES, Blowfish, In addition, many hybrid cryptographic schemes
and AES. Advanced encryption standard (AES) have complex structures and require more
is faster and more efficient than other symmetric computing resources for implementations on
key encryption schemes [9], [10]. Unlike images such as binary images. Until now,
symmetric key cryptography, asymmetric key creating a hybrid scheme with high security and
cryptography does not use the same key to without heavy and complex cryptographic
encrypt and decrypt a message. Instead, computations has been a great challenge.
asymmetric key cryptography uses two different Therefore, it is important to investigate new key
keys but related mathematically; the public key exchange primitive beside to encryption and
which is known to everyone is used for decryption primitive that require less heavy and
encryption, and the corresponding private key complex cryptographic computations but
which is kept secret is used for decryption [9], relatively secure.
[10]. Symmetric key encryption schemes are In this paper, we propose a new symmetric key
much faster computationally than asymmetric encryption scheme for binary (black-and-white)
40
S.J.I.T.N Vol.6 No.2 (2019)
images with easy and secure exchange key, where aij and bij are the ij-th elements of
encryption/decryption algorithms and a matrices A and B, respectively.
comparatively low computation complexity. In 2.1 Shared Secret Key Generation Phase
other words, a novel symmetric key encryption
scheme for binary images is proposed, which is This phase performs by any two parties (user A
based on Boolean operations, to overcome the and user B such as Alice and Bob, respectively)
problem of complex and heavy cryptographic and consists of the following steps:
computations as in most of the existing [1] Both parties agree on a binary public shadow
conventional hybrid cryptographic schemes. The image PuS of 0's and 1's (black-and-white)
proposed symmetric key encryption scheme and in the form of N×N random pixels, where
begins to establish a shared secret key between PuS must be a non-identity and a non-
two communicating parties and after that this invertible matrix used to avoid information
shared secret key is then used as the secret key leakage.
during the proposed encryption and decryption [2] Alice generates a binary private key (private
processes. shadow image) PrKA of 0's and 1's (black-
and-white) and size N×N pixels. Bob
2. Methods generates a binary private key (private
In this section, we propose a new approach to shadow image) PrKB of 0's and 1's (black
symmetric key encryption scheme based on and white) and size N×N pixels.
Boolean operations for binary (black-and-white) [3] Alice computes her public key PuKA, as
images. Our proposed scheme generates shadow follows: (note here the
images and manipulates them by using simple first matrix of binary product must be PrKA
Boolean OR, AND, and XOR operations. The OR, and the second matrix must be PuS). Bob
AND, and XOR operations of the matrices computes his public key PuKB, as follows:
(images) could be easily implemented by any (note here the first
simple and low computational device. matrix of binary product must be PuS and the
The proposed approach uses the binary inner second matrix must be PrKB).
product of two binary matrices, [4] Alice sends her public key PuKA to Bob. Bob
denoted as which is computed by using sends his public key PuKB to Alice.
simple Boolean OR and AND operations [5] Alice computes the shared secret key SK, as
as follows: follows: (note here the
first matrix of binary product must be PrKA
[⋁( )] and the second matrix must be PuKB). Bob
computes the shared secret key SK, as
follows: (note here the
first matrix of binary product must be PuKA
The expression means that the ij-th and the second matrix must be PrKB).
element cij of matrix C is equal to ( )
Note that PuKA (or PuKB) is the binary product of
( ) , where a and b are PuS and PrKA (or PrKB), respectively. Note as
the binary elements of matrices A and B, well that PuS is a bon-invertible matrix which
respectively. makes recovering PrKA (or PrKB) impossible,
In addition, the XOR Boolean operation was given PuKA (or PuKB) and PuS. The derivation of
used in the encryption and decryption processes of PuKA (or PuKB) is to help in transporting PrKA
the proposed symmetric key encryption method. (or PrKB) to user B (or user A), respectively
The XOR of two binary matrices securely.
could be described by the following formulae: After performing the above steps, Alice and Bob
[ ] can obtain a shared secret key SK. That is

The expression means that the ij-th


element dij of matrix D is equal to ,
41
S.J.I.T.N Vol.6 No.2 (2019)
Alice and Bob keep the shared secret key SK for 2.3 Decrypting (Decoding) Phase
later encryption and decryption processes.
The receiver (Bob) must perform the following
2.2 Encrypting (Encoding) Phase steps:
Because the first party’s shared secret key SK is [1] Receives the ciphered image CI from the
equal to the second party’s shared secret key SK, sender, Alice.
the shared secret key SK could serve as an [2] Recovers the secret image SI by XORing the
encryption key for the sending party and as a ciphered image CI with the shared secret key
decryption key for the receiving party. Suppose SK (SK serves as a decryption key) which
that the first party (such as Alice) has a black-and- was established previously in the shared
white secret image SI of size N×N pixels and she secret key generation phase as follows:
wants to send it to the second party (such as Bob).
The sender (Alice) must perform the following Note that the recovered image RI is in the form of
steps: N×N pixels and is equal to the original secret
[1] Generates the ciphered image CI by bitwise image SI. From Equations (2), (3) and because
XORing the secret image SI with the sender's the XOR ( ) operation is commutative, and
shared secret key SK (SK serves as an =zeros matrix (full white shadow image),
encryption key) which was established we have:
previously in the shared secret key generation
phase as follows:
The process flow diagram of the proposed
[2] Sends the ciphered image CI to the receiver,
symmetric key encryption scheme is shown in
Bob. Figure 1.

Open
First Party (Alice) Second Party (Bob)
Network

PrKA PuS PuS PuS PrKB

PuKA = PrKA PuS PuKB = PuS PrKB

PuKA

SK = PrKA PuKB PuKB SK = PuKA PrKB

CI = SI SK CI RI = CI SK

Fig 1. The process flow diagram summarizes the processes of the proposed scheme
.
42
S.J.I.T.N Vol.6 No.2 (2019)

3. Results and Discussion based on the security of the proposed shared secret
key SK which depends on the difficulty of solving
3.1 Experimental Results the unsolvable non-invertible matrix problem,
Figure 2 shows one of the experimental results where it is impossible to obtain the shared secret
of our scheme. In the beginning of the shared key from the public information (i.e. CI, PuS, PuKA
secret key generation phase, the first party and PuKB). This is especially true when using a
(Alice) and the second party (Bob) agree on a proper shadow image size, which leads to low
public shadow image PuS. It is assumed that probability of successful attack.
they chose a public shadow image PuS with size In order to decrypt the ciphered image CI, that is,
302×302 pixels as shown in Figure 2(a). In to recover the original secret image SI, attackers
addition, in the same phase, each party may try to generate the shared secret key SK from
constructs his/her private key (i.e. PrKA for all information open to public (i.e. CI, PuS, PuKA
Alice and PrKB for Bob). Each party generates and PuKB). Note that first of all, it is clear that the
his/her public key (i.e. PuKA for Alice and PuKB product of a non-invertible matrix with any other
for Bob) and sends it to the other party as shown matrix must always result in a non-invertible
in Figure 2(b)-(c) and then they establish the matrix as mentioned in [22]. Therefore, the parties
shared secret key SK, as shown in Figure 2(d). public keys (PuKA and PuKB) are non-invertible
In the encryption phase, it is assumed that the and non-identity matrices, since PuS is a non-
sender takes a binary original image “Pierce invertible and a non-identity matrix which product
Brosnan” with size 302×302 pixels as shown in with each party's private key (PrKA, PrKB) for
Figure 2(e) as the secret image SI. The secret producing the parties public keys (PuKA and PuKB)
image SI encrypts into 302×302 pixels ciphered as earlier shown in Subsection 2.1. Secondly, it is
image CI as shown in Figure 2(f) by XORing practically impossible to determine the inverse of
the secret image SI with the sender's shared the party's public key (PuKA, PuKB) from the
secret key SK, where SK serves as the public shadow image PuS, since PuS is a non-
encryption key. After that, the sender party invertible and a non-identity matrix as earlier
sends the ciphered image CI to the receiver mentioned in Subsection 2.1. Therefore, attackers
party. In the decryption phase, the ciphered would encounter difficulties when trying to
image CI decrypts into 302×302 pixels determine the shared secret key, provided that the
recovered image RI as shown in Figure 2(g), size of the shadow images are chosen to be large
which is equal to the original secret image SI as enough.
shown in Equation (4), by XORing the ciphered In the encryption phase, the sender (Alice) could
image CI with the receiver's shared secret key encrypt the secret image SI by XORing it with the
SK, where SK serves as the decryption key. Note shared secret key SK has already been established
that all the keys and (shadow, secret, ciphered between the two parties and here, serves as an
and recovered) images in Figure 2 had been encryption key. The sender(Alice) sends CI to the
resized to fit into a page. receiver (Bob).
3.2 Security Analysis In decryption phase, the receiver (Bob) could
The security of the proposed symmetric key recover the secret image SI by XORing the shared
encryption scheme is based on the security of secret key SK (here SK serves as a decryption key)
Boolean operations and the difficulty of solving with the ciphered image CI, but ciphered image CI
the unsolvable non-invertible matrix problem alone cannot disclose any information about the
since the problem of inverting the non-invertible original secret image. In addition, if the ciphered
matrix is one of the hard mathematical problems image CI is changed and forged by an attacker, the
that is impossible to solve mathematically (no recovered image RI is unclear and the secret is still
solutions). In other words, the security of the unidentified. Therefore, the proposed symmetric
proposed scheme is based on the security and key encryption scheme is considered very secure.
properties of XOR Boolean operation and also
43
S.J.I.T.N Vol.6 No.2 (2019)

(a) Public Shadow Image (PuS) (b) Alice’s Public Key (PuKA) (c) Bob’s Public Key (PuKB)

(d) Shared Secret Key (SK) (e) Secret Image (SI) (f) Ciphered Image (CI)

(g) Recovered Image (RI)

Fig 2. One of the experimental results of the proposed scheme


44
S.J.I.T.N Vol.6 No.2 (2019)
3.3 Computational Complexity attack, the attacker must find the private keys
(PrKA and PrKB) from the public keys (PuKA and
Two types of the complexity of the proposed PuKB) to break the shared secret key and then
symmetric key encryption scheme will be decrypting a ciphered image CI. The time
discussed in this section, algorithm complexity Z
and brute-force attack complexity on the complexity of the attack is O(2 ), where Z is the
algorithm. Image encryption algorithm in the total number of binary pixels in the image (image
proposed symmetric key encryption scheme size in bytes), which is relatively a large number.
includes two things: first, obtaining the shared Therefore, the effort and time needed for the brute-
secret key SK, and then creating the ciphered force attack to find private keys is too consuming
image CI by XORing the shared secret key SK especially when the size of those private keys are
with the secret image SI. The shared secret key large.
includes constructing two multiplication of two 3.4 Performance Results
binary matrices on each party. The time Table 1 shows performance comparisons for the
complexity of constructing two multiplication of proposed encryption scheme against the
3
two binary matrices on each party is O(N ) + conventional hybrid encryption scheme (DH +
3 3
O(N ) = O(N ), if neglecting the constant and AES). The two schemes were coded in Turbo C++
the multiplication is carried out naively (here 4.5 programming environment and run on a
multiplication means performing the OR and the personal computer equipped with 2.80 GHz Intel®
AND Boolean operations of two binary matrices Pentium 4 CPU, 512 MB of RAM and Windows
as shown in the beginning of Section 2). The XP operating system. The execution times taken by
time complexity of constructing the ciphered the conventional hybrid and the proposed
image CI is O(N2). The total time complexity for encryption schemes are calculated for different
3 2 sizes of data (image) files. According to the
image encryption therefore, is O(N ) + O(N ) =
3 comparison results, as shown in Table 1, it is found
O(N ), excluding the time needed to generate
that the total execution time (key generation +
two distinct random shadow images (private
encryption + decryption) of the proposed
keys); where the size of the shadow image is
encryption scheme is faster than that of the
equal to N×N pixels. On the encryption side,
conventional hybrid encryption scheme (DH +
generating the shared secret key SK requires
3 3 2 AES). From the same table, it is clear that the total
2N of AND Boolean operations and 2(N -N ) of execution time taken for our scheme decreases
OR Boolean operations. In addition, generating when the size of the image file is decreased.
2
the ciphered image CI requires N of XOR
Boolean operations. Image decryption algorithm 4. Conclusion
in the proposed encryption scheme includes two In this paper, we proposed a new symmetric key
things: first, obtaining the shared secret key and encryption scheme to protect binary images. The
then XORing the shared secret key SK and the proposed scheme offers both key exchange and
ciphered image CI for reconstructing the secret encryption/decryption processes. Therefore, it
image SI. The time complexity for provides alternative method for two parties to
reconstructing the secret image SI is equal to the establish the shared secret key between them and
time complexity of the shared secret key SK after that this shared key is then used as the secret
3
which has already mentioned, is O(N ). On the key during the proposed encryption and decryption
decryption side, generating the shared secret key processes. The proposed scheme has several
3 benefits compared to the conventional schemes
SK requires 2N of AND Boolean operations and
3 2 such as more secure, has noise-like shadow images,
2(N -N ) of OR Boolean operations. In addition, uses only simple Boolean operations, less
2
generating the recovered image RI requires N of computational complexity, comparatively fast and
XOR Boolean operations. The proposed easy to implement. Therefore, we can use and
encryption scheme’s time complexities analyzed implement our scheme in many applications and
above are the processes carried out by any two various fields like in military, defense and other
parties such as Alice and Bob. For brute-force
45
S.J.I.T.N Vol.6 No.2 (2019)
places where the confidentiality of data should Representation", Engineering Science and
be must. our scheme can be extended for dealing Technology, an International Journal, no.19, pp.
with grayscale and color secret images. 1887-1894, 2016.
[7] I. Ozturk and I. Sogukpinar, "Analysis and
Comparison of Image Encryption Algorithms",
References
International Journal of Information Technology,
[1] I. Ozturk and I. Sogukpinar, "Analysis and
vol.1, no.2, pp. 64-67, 2005.
Comparison of Image Encryption Algorithms",
[8] C. Chan and Y. Wu, "A Visual Information
International Journal of Information
Encryption Scheme Based on Visual Cryptography
Technology, 1(2), pp. 64-67, 2005.
and D-H Key Agreement Scheme", IJCSNS
[2] M. S. Anoop, "Public Key Cryptography–
International Journal of Computer Science and
Applications Algorithms and Mathematical
Network Security, vol.8, no.4, pp. 128-132, 2008.
Explanations", Tata Elxsi Ltd., 2007.
[9] N. K. Barpanda, M. Panda and A. Panda,
http://www.tataelxsi.com/whitepapers/pub_key2
"Image File Encryption using Symmetric Key
.pdf?pdf_id=public_key
Algorithms", International Journal of Advance
[3] C. Chan and Y. Wu, "A Visual Information
Research in Science and Engineering, vol.07,
Encryption Scheme Based on Visual
no.07, 2018.
Cryptography and D-H Key Agreement
[10] M. Islam, M. Shah, Z. Khan, T. Mahmood
Scheme", International Journal of Computer
and M. J. Khan, "A New Symmetric Key
Science and Network Security, 8(4), pp. 128-
Encryption Algorithm using Images as Secret
132, 2008.
Keys", 13th International Conference on Frontiers
[4] Y. C. Hou and S. F. Tu, "A Visual
of Information Technology, pp. 1-5, 2015.
Cryptographic Technique for Chromatic Images
[11] W. Stallings, "Cryptography and Network
Using Multi-pixel Encoding Method", Journal
Security-Principles and Practices", 4th Edition,
of Research and Practice in Information
2006.
Technology, Tamkang University, Jung Li,
[12] C. S. Laih and K. Y. Chen, "Generating
Taiwan, vol.37, no.2, pp. 179-192, 2005.
Visible RSA Public Keys for PKI", Int. J. Secur.,
[5] Y. C. Hou, "Visual Cryptography for Color
vol.2, no.2, Springer, Berlin, pp. 103-109, 2004.
Images", Journal of Pattern Recognition, vol.36,
[13] J. J. Amador and R. W. Green, "Symmetric-
no.7, pp. 1619-1629, 2003.
Key Block Cipher for Image and Text
[6] A. Houas, Z. Mokhtari, K. E. Melkemi and
Cryptography", IJIST, vol.15, no.3, pp. 178-188,
A. Boussaad, "A Novel Binary Image
2005.
Encryption Algorithm based on Diffuse

Brute-Force
Scheme Size of Data (Image) File Total Execution Time (ms)
Complexity
1 KB 247.327
DH (n=1024 bit) [23] 16 KB 248.152
+ 64 KB 280 [21] 250.792
AES-128 bit [24]
256 KB 261.354

32×32 pixel (1 KB) 21024 0.059

128×128 pixel (16 KB) 216384 3.813


Our Scheme
256×256 pixel (64 KB) 265536 30.504

512×512 pixel (256 KB) 2262144 244.032

Table 1: Performance comparison between the conventional hybrid encryption scheme (DH +
AES) and the proposed symmetric key encryption scheme (millisecond)
46
S.J.I.T.N Vol.6 No.2 (2019)
[14] I. Muecke, "Greyscale and Colour Visual
Cryptography", M.S. thesis, Dalhousie
University, USA, 1999.
[15] W. D. Shun, Z. Lei, M. Ning and H. L.
Sheng, "Secret Color Images Sharing Schemes
Based on XOR Operation", Tsinghua
University, Beijing, China, 2005.
[16] W. Diffie and M. Hellman, "New
Directions in Cryptography", Journal of IEEE
Transactions in Information Theory, vol.IT-22,
no.6, pp. 644-654, 1976.
[17] D. A. Carts, "A Review of the Diffie-
Hellman Algorithm and its Use in Secure
Internet Protocols", SANS Institute Reading
Room, 2001.
[18] K. Palmgren, "Diffie and Hellman Key
Exchange: a non-mathematician’s Explanation",
Expert Reference Series of White Papers, 2005.
[19] Y. XUE, "Overview of Public-Key
Cryptography", CS 291: Special Topics on
Network Security, Vanderbilt University, 2007.
[20] J. Rothe, "Complexity Theory and
Cryptology: An Introduction to Crypto
complexity", Berlin: Springer, 2005.
[21] E. Barker W. Barker, W. Burr, W. Polk
and M. Smid, "Recommendation for Key
Management-Part 1: General (Revised)", NIST
Special Publication 800-57 (Computer
Security), pp. 58-63, 2007.
[22] A. E. Coulson, "Introduction to Matrices",
London: Longman Group Limited, 5th
impression, 1974.
[23] Code Taken From: http://www.example-
code.com/vcpp/dh_key_exchange.asp
[24] Code Taken From:
http://www.hoozi.com/post/0m3lb/advanced-
encryption-standard-aes-implementation-in-c-c

You might also like