0% found this document useful (0 votes)
13 views4 pages

Advanced Image Encryption & Decryption Using: Rubik's Cube Technology

Uploaded by

SUBHASHREE BASU
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)
13 views4 pages

Advanced Image Encryption & Decryption Using: Rubik's Cube Technology

Uploaded by

SUBHASHREE BASU
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/ 4

International Journal of Engineering and Advanced Technology (IJEAT)

ISSN: 2249-8958 (Online), Volume-11 Issue-3, February 2022

Advanced Image Encryption & Decryption using


Rubik’s Cube Technology
Renusree Varma Mudduluri, Akhila Golla, Sushanth Raghava, Tammana Jyothi Sai

Abstract: The world changing at a fast pace and more than Also, chaotic system are well-defined on real numbers
ever there’s this need to secure data and preserve one’s Although, chaos-based algorithms are used more often in
privacy. Advanced algorithms and technologies that can be image encryption in general, they have a high
used for secure transmission of texts, images and videos
are being tried and tested. We have used the Rubik’s Cube computational cost. whereas the cryptosystems are well-
Technology for secure encryption and decryption of defined on a finite set of integers. We are going to consider
colored images. the Rubik’s cube principle for image encryption. We are
Keywords: Rubik’s Cube Algorithm, Encryption, going to implement this algorithm which has been specified
Decryption, Coloured Images, Secure, Advanced and extensively studied in the papers mentioned below.

I. INTRODUCTION II. OBJECTIVE


We have developed a code for more secure and fast
In recent years, technology has moved leaps but it has also encryption of images using a unique image encryption
come with its downsides. One of them is illegal copying of algorithm based on Rubik's cube principle. Pixels of the
digital intellectual property. Several works have been done image are shuffled in a way similar to that of a Rubik’s cube
to curb this issue. Some of the main ones are done by using in a random manner using two randomly generated vectors.
encryption. This project focuses on using encryption for Then the same vectors are used for performing bitwise
protecting digital images. Encryption is a process of operation row-wise and column-wise. XOR operation is
transforming data into an unreadable format using certain performed on odd columns and rows of image with a key to
algorithms to make sure that the data is available to only decrease association between encrypted and original images.
legitimate users i.e. only authorized parties can access the Same key is flipped and XOR operation is performed on
data. The main objective is encryption of mainly digital even columns and rows of image.
images. There are already well-known encryption methods Finally, algorithm which we used to develop the
such as symmetric-key algorithms, asymmetric-key encryption system (Rubik's cube principle) can achieve good
algorithms and also algorithms based on Elliptic-curve- encryption standards and perfect hiding ability but also can
cryptography in place for data encryption but these are not resist statistical, exhaustive and differential attacks.
the most suitable for image encryption. This is mostly Various research, performance assessment tests and
applicable in real-time communication or in cases where experimental tests done on similar type of image encryption
fast encryption is needed. The proposed encryption schemes algorithm shows it is apt for transmission applications and
in recent years can be mainly classified into categories Internet encryption because of its fast encryption/decryption
pixels position permutation, value transformation, and speeds it also demonstrates robustness of the proposed
chaotic systems. Image encryption has been studied algorithm against numerous attacks.
extensively. Some permutation-based encryption schemes
have already been found to be insecure against certain III. INNOVATION COMPONENT
attacks such as chosen-plaintext and cipher-text only. It is In this project we are implementing image encryption
due to high data redundancy in such schemes and as secret algorithm in python based on Rubik's cube principle
permutations could be redeemed by plaintext and ciphertext described in the following research paper. “ Loukhaoukha,
comparison, It is quite understandable. K., Chouinard, J. Y., & Berdai, A. (2012). A secure image
encryption algorithm based on Rubik's cube principle.
Manuscript received on December 22, 2022. Journal of Electrical and Computer Engineering, 2012, 7”
Revised Manuscript received on January 12, 2022. The encryption algorithm described is capable of fast
Manuscript published on February 28, 2022. encryption and decryption and is found to be highly secure
* Correspondence Author based on the assessment tests carried out in the above paper.
Renusree Varma Mudduluri, Department of Electronics and
Communication Engineering, Vellore Institute of Technology, Vellore Hence, it proves to be apt for transmission applications and
(Tamil Nadu), India. Internet encryption.
Akhila Golla, Department of Computer Science Engineering, Vellore Paper from which we are implementing the encryption
Institute of Technology, Vellore (Tamil Nadu), India.
Sushanth Raghava, Department of Electronics and Communication
method describes the usage of the algorithm only in case of
Engineering, Vellore Institute of Technology, Vellore (Tamil Nadu), India. black and white images. We extend this encryption method
Tammana Jyothi Sai, Department of Computer Science Engineering, to work with colour (RGB) images.
Vellore Institute of Technology, Vellore (Tamil Nadu), India.

© The Authors. Published by Blue Eyes Intelligence Engineering and


Sciences Publication (BEIESP). This is an open access article under the CC
BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)

Published By:
Retrieval Number: 100.1/ijeat.C33310211322 Blue Eyes Intelligence Engineering
DOI: 10.35940/ijeat.C3331.0211322 and Sciences Publication (BEIESP)
Journal Website: www.ijeat.org 24 © Copyright: All rights reserved.
Advanced Image Encryption & Decryption using Rubik’s Cube Technology

IV. WORK DONE AND IMPLEMENTATION 7. Using vector 𝐾𝑅, XOR operation is performed on each
column of image𝐼1 using:
Methodology adapted: Rubik’s cube algorithm
𝖨ENC(𝑖,2𝑗−1)=𝖨1(𝑖,2𝑗−1)⊕𝐾𝑅(𝑗)
Encryption Algorithm
𝖨ENC(𝑖,2𝑗)=𝖨1(𝑖,2𝑗)⊕rot180(𝐾𝑅(𝑗))
Let l0=pixels values matrix of a α-bit grayscale image where rot180(𝐾𝑅) is the left to right flip of vector 𝐾𝑅.
(M×N). Steps involved in encryption are:
1. Create two vectors 𝐾𝑅 and 𝐾𝐶 with random values of 8. If ITER=ITERmax, encrypted image 𝐼ENC is created and
length 𝑀 and 𝑁, where the values in the vectors should encryption process is done; otherwise, the algorithm
be >0 and <2𝛼-(𝐾𝑅 and 𝐾𝐶 should not have constant branches to step 3.
values )
2. Set the iteration value, ITERmax, and initialize the 𝐾𝑅, 𝐾𝐶 & ITERmax are the secret keys.
counter ITER at 0.
3. Increment the counter by one: ITER=ITER+1. Decryption Algorithm:
4. For each row 𝑖 of image 𝐼𝑜,
a. calculate sum of all elements in the row, this sum Decrypted image, 𝐼𝑜, is obtained from the encrypted image,
is 𝐼ENC, and the secret keys, 𝐾𝑅, 𝐾𝐶, and ITERmax as
denoted by 𝛼(𝑖)=𝑁𝑗=1𝖨𝑜(𝑖,𝑗),𝑖=1,2,…,𝑀 follows in the following.

b. compute modulo 2 of 𝛼(𝑖), denoted by 𝑀𝛼(𝑖), 1. Initialize ITER=0.

c. row is left or right, circular- shifted by K R(i) 2. Increment the counter by one: ITER=ITER+1.
positions to right or left direction and first pixel
3. Bitwise XOR operation is performed on 𝐾𝑅 vector and
each
column of the encrypted image IENC as follows:

If Mα(i)=0→right circular shift 4. Then, using the 𝐾𝐶 vector, the bitwise XOR operator is
else→left circular shift. applied to each row of image 𝐼1:

1. For each column 𝑗 of scrambled image 𝐼SCR,


a. calculate sum of elements in that column 𝑗, denoted
as
5. For each column 𝑗 of image 𝐼𝑜, 𝛽SCR(𝑗):
b. compute modulo 2 of 𝛽SCR(𝑗), denoted by
a. compute sum of elements 𝑀𝛽SCR(𝑗),
in the column j, sum is represented as c. column 𝑗 is up or down, circular shifted by 𝐾𝐶(𝑖)
positions:

2. For each row 𝑖 of scrambled image𝐼SCR,

𝛽(𝑗), 𝛽(𝑗)=𝑀𝑖=1𝖨𝑜(𝑖,𝑗),𝑗=1,2,…,𝑁. d. calculate sum of elements in row 𝑖, this sum is


denoted
b. compute modulo 2 of 𝛽(𝑗), denoted by 𝑀𝛽(𝑗). by 𝛼SCR(𝑖):
e. compute modulo 2 of 𝛼SCR(𝑗), denoted by
c. column 𝑗 is down, or up, circular- shifted by 𝑀𝛼SCR(𝑗),
𝐾𝐶(𝑖) positions: f. row 𝑖 is then left, or right, circular-shifted by 𝐾(𝑖)
according to the following:

3. If ITER=ITERmax, then image 𝐼ENC is decrypted


otherwise,
algorithm branches back to step 2.
Steps 4 and 5 above will generate a scrambled image
denoted by 𝐼SCR. V. IMPLEMENTATION
6. Using vector 𝐾𝐶, the bitwise XOR operation is performed Encryption: To encrypt the image we need to save the
on images in a folder named “input”. Code takes image input
each row of scrambled image using: using PIL library and converts it into RGB matrices and
𝖨1(2𝑖−1,𝑗)=𝖨SCR(2𝑖−1,𝑗)⊕𝐾𝐶(𝑗), starts the encryption process using the Rubik’s cube
𝖨1(2𝑖,𝑗)=𝖨SCR(2𝑖,𝑗)⊕rot180(𝐾𝐶(𝑗)) algorithm.
where ⊕ and rot180(𝐾𝐶) are bitwise XOR operator and
flipping of vector 𝐾𝐶 from left to right, respectively.

Published By:
Retrieval Number: 100.1/ijeat.C33310211322 Blue Eyes Intelligence Engineering
DOI: 10.35940/ijeat.C3331.0211322 and Sciences Publication (BEIESP)
Journal Website: www.ijeat.org 25 © Copyright: All rights reserved.
International Journal of Engineering and Advanced Technology (IJEAT)
ISSN: 2249-8958 (Online), Volume-11 Issue-3, February 2022

The encrypted images are then saved in another folder. After


the encryption the the values of Kr, Kc and
Iterations(ITER_MAX) saved in a file named “keys”.

Decryption: This code takes Kr, Kc, Iterations


(ITER_MAX) values along with the encrypted image and
start the decryption process.
Fig. 4 Decrypted Image
Dataset used:
This project is an encryption algorithm so any kind of image
VII. RESULTS AND DISCUSSION
can be taken as input for the encryption which produces a
highly encrypted, secure image(output). For evaluating the To obtain the encrypted image the pixels of the original
results we take standard black and white images such as image are shuffled in a way similar to that of a Rubik’s cube
Lena, Black, Baboon and Checkerboard. in a random manner using two randomly generated vectors.
Our project implements image encryption algorithm Then the same vectors are used for performing bitwise
based on Rubik's cube principle described in the following operation row-wise and column-wise. XOR operation is
research paper. “Loukhaoukha, K., Chouinard, J. Y. & performed on odd columns and rows of image with a key to
Berdai, A. (2012). A secure image encryption algorithm decrease association between encrypted and original images.
based on Rubik's cube principle. Journal of Electrical and Same key is flipped and XOR operation is performed on
Computer Engineering, 2012, 7” even columns and rows of image.
The paper from which we are implementing the Safe image cryptography should be able to resist varied
encryption method describes the usage of the algorithm in attacks like cipher-text-only attack, plain text, applied math
case of black and white images. We extend this encryption analysis and brute-force attacks. In our main reference
method to work with colour(RGB) images. paper, extensive security analysis on projected algorithm is
performed and also safety assessment has been performed
Tools used: on key area and applied math analysis. Apart from this
Hardware and software requirements: various testings were done in the algorithm to check its
• Python2, Numpy and Image libraries. performance on the level of encryption gained. One of such
• Processor - 2.5 GHz testing is Visual testing which is done by calculating and
• RAM - 1GB comparing the number of pixels change rate (NCPR) and
unified average changing intensity (UACI) values.
VI. SCREENSHOT AND DEMO UACI values illustrate that all pixel gray-scale values of
Sample Image that we used: encrypted image are different from that of original images,
which makes it difficult to discriminate original and
encrypted image pixels. High NPCR percentage values
specify that the position of pixels have been changed
randomly. So for a good image encryption algorithm, NPCR
values must be high and UACI values must be around 33%.
Values obtained from testing gave appropriate values which
are satisfactory for the algorithm. From the testing results
shown in the paper, the proposed algorithm was not only
found to attain good encryption standards and perfect hiding
Fig. 1 This is the original image which we encrypt.
ability but also can resist statistical, exhaustive and
differential attacks.

VIII. CONCLUSION
A unique picture encryption technique is proposed in this
research. This approach is based on the Rubik's cube to
develop image pixels. The proposed approach is stabilly
illustrated with precise quantitative analysis against various
forms of assaults such as analytical and parametric attacks.
Fig. 2 Encrypted Image The experiments also show that the proposed encryption
technique is suits for real-time Internet protection and
assessments as it is highly secured.

Fig. 3 Kr, Kc values


Published By:
Retrieval Number: 100.1/ijeat.C33310211322 Blue Eyes Intelligence Engineering
DOI: 10.35940/ijeat.C3331.0211322 and Sciences Publication (BEIESP)
Journal Website: www.ijeat.org 26 © Copyright: All rights reserved.
Advanced Image Encryption & Decryption using Rubik’s Cube Technology

REFERENCES
1. Loukhaoukha, K., Chouinard, J. Y., & Berdai, A. (2012). A secure
image encryption algorithm based on Rubik's cube principle. Journal of
Electrical and Computer Engineering, 2012, 7.
2. Ionescu, V. M., & Diaconu, A. V. (2015, June). Rubik's cube principle
based image encryption algorithm implementation on mobile devices.
In 2015 the 7th International Conference on Electronics, Computers
and Artificial Intelligence (ECAI) (pp. P -31). IEEE.
3. Loukhaoukha, K., Nabti, M., & Zebbiche, K. (2013, May). An efficient
image encryption algorithm based on blocks permutation and Rubik's
cube principle for iris images. In 2013 8th International Workshop on
Systems, Signal Processing and their Applications (WoSSPA) (pp. 267-
272). IEEE.
4. Gomathi, T., & Shivakumar, B. L. (2015). Multistage Image
Encryption using Rubik's Cube for Secured Image Transmission.
International Journal of Advanced Research in Computer Science,
6(6).
5. Helmy, M., El-Rabaie, E. S. M., Eldokany, I. M., & El-Samie, F. E. A.
(2017). 3-D Image Encryption Based on Rubik’s Cube and RC6
Algorithm. 3D Research, 8(4), 38.
6. Abitha, K. A., & Bharathan, P. K. (2016). Secure Communication
Based on Rubik's Cube Algorithm and Chaotic Baker Map.
ProcediaTechnology,24,782,7
7. R.Vindhya & M.Brindha (2020). A chaos based image encryption
algorithm using Rubik’s cube and prime factorization process
(CIERPF). Journal of King Saud University - Computer and
Information Sciences
8. Joffin Joy & Litty Koshy(2019). RubiCrypt: Image Scrambling
Encryption System Based on Rubik’s Cube Configuration.IEEE
9. M. J. Aqel, Z. AlQadi, A. A. Abdullah(2018).RGB Color Image
EncryptionDecryption Using Image Segmentation and Matrix
Multiplication.International Journal of Engineering and Technology,
Vol. 7, No. 3.13, pp. 104-107, 2018
10. Majed O. Al-Dwairi, Amjad Y. Hendi & Ziad A. AlQadi(2019). An
Efficient and Highly Secure Technique to Encrypt and Decrypt Color
Images. Engineering, Technology & Applied Science Research Vol. 9,
No. 3, 2019, 4165-4168

AUTHORS PROFILE
Mudduluri RenuSree Varma, pursued his Bachelor
of Technology in electronics and communication
engineering from Vellore Institute of Technology,
Vellore. She is currently working as Incident
Response Analyst at Eli Lilly.

Golla Akhila, pursued his Bachelor of Technology


in computer science engineering from Vellore
Institute of Technology, Vellore. She is currently
working as Software Engineer at Bank of America
continuum India Pvt. Ltd

Sushanth Raghava, pursued his Bachelor of


Technology in electronics and communication
engineering from Vellore Institute of Technology,
Vellore. He is currently working as Associate
ColdFusion Developer at Schlumberger.

Tammana Jyothi Sai, pursued his Bachelor of


Technology in computer science engineering from
Vellore Institute of Technology, Vellore. He is
currently working as BI Engineering Specialist at
WABTEC Corporation.

Published By:
Retrieval Number: 100.1/ijeat.C33310211322 Blue Eyes Intelligence Engineering
DOI: 10.35940/ijeat.C3331.0211322 and Sciences Publication (BEIESP)
Journal Website: www.ijeat.org 27 © Copyright: All rights reserved.

You might also like