Question: Chegg _ 2 . 1 Encryption Algorithm Based on Rubik s Cube Principle Write a FULL CODE with no errors in Matlab ( I have

Chegg_2.1 Encryption Algorithm Based on Rubiks Cube Principle
Write a FULL CODE with no errors in Matlab( I have R2021b version) for an Secure Image Encryption Algorithm Based on Rubiks Cube Principle.
ALL STEPS MUST COMPLETED AND HAVE A WORKING CODE AND FINALL CODE MUST RUN WITHOUT ERRORS!
Step 1: Read/Load the input image
Display the input image
Step 2: Convert to grayscale if it's a color image:
Normalize the image to the range [0,1]
Display the input image
Step 3:Define and Initialize Rubiks Cube Principle
You would need to specify the specific equations govering Rubiks Cube Principle.and the parameters involved. Set parameters for Rubiks Cube Principle
Step 4: Initialize and Generate Set parameters for Rubiks Cube Principle sequences
-you need to write and implement the part to generate sequence for Set parameters for Rubiks Cube Principle
Step 5: Encryption process, Perform image encryption using the chaotic sequences:
This could involve Image Encryption Algorithm Based on Rubiks Cube Principle
Write and implement the Ruik's Cube Principle encryption
For example, for the Rubik's cube principle, you may need to:
Permute pixel positions based on Arnold Chaotic Map
Mix the pixel values using Lorenz Hyperchaotic System
After encryption result a file(image)
Write the image file on disk and Display the encrypt image
Step 6: Decryption process, Perform image decryption
Write the image file on disk and Display the decrypted image
Step 6: Calculate performance metrics
You need to implement functions to calculate the metrics like:
PSNR, entropy, NPCR, UACI, horizontal, vertical, and diagonal pixel correlation.
Step 7: Display all the saved results
PSNR,entropy, NPCR,UACI, horizontal, vertical, diagonal pixel correlation.
You would then need to integrate these into the encryption process based on the Rubik's Cube principle and subsequently develop the decryption algorithm. After that, ensure all metrics can be computed accurately for assessing the performance of your encryption algorithm. Finally, debug and test the implementation extensively to ensure that it works without errors before running it on an actual image.
After write all code, choice any picture and load in this altgoritm and RUN the code in Matlab.
IF ONLY it works, then write me the ANSWER! -(ALL FUNCTION CODE MUST RUN PERFECT, NO errors in all code)for thumb UP!
Put an exemple with original image(any image) and encrypted , decrypted image as final... Display the saved results
a) Rubiks Cube Image Encryption
Let Io represent an \alpha -bit gray scale image of the size M xN. Here, Io represent the pixels values matrix of image Io. The steps of encryption algorithm are as follows:
(1) Generate randomly two vectors KR and KC of length M and N, respectively. Element KR(i) and KC( j) Each take a random value of the set A ={0,1,2,...,2\alpha 1}. Note that both KR and KC must not have constant
values.
(2) Determine the number of iterations, ITERmax, and initialize the counter ITER at 0.
(3) Increment the counter by one: ITER = ITER +1.
(4) For each row i of image Io,
(a) compute the sum of all elements in the row i, this sum is denoted by \alpha (i):
(b) computemodulo 2 of \alpha (i), denoted by M\alpha (i),
(c) row i is left, or right, circular-shifted by KR(i) positions (image pixels are moved KR(i) positions
to the left or right direction, and the first pixel moves in last pixel.), according to the following:
if M\alpha (i)=0-> right circular shift
else -> left circular shift. (2)
(5) For each column j of image Io,
a) compute the sum of all elements in the column j, this sum is denoted by \beta ( j),
(3)
(b) computemodulo 2 of \beta ( j), denoted by M\beta ( j).
(c) column j is down, or up, circular-shifted by KC(i) positions, according to the following:
if M\beta ( j)=0-> up circular shift
else -> down circular shift. (4)
Steps 4 and 5 above will create a scrambled image, denoted by ISCR.
(6) Using vector KC, the bitwise XOR operator is applied to each row of scrambled image ISCR using the
following expressions:
(5)
where and rot 180(KC) represent the bitwise XOR operator and the flipping of vector KC from left to right, respectively.
(7) Using vector KR, the bitwise XOR operator is applied to each column of image I1 using the following
formulas:
(6)
with rot 180(KR) indicating the left to right flip of vector KR.
(8) If ITER = ITERmax, then encrypted image IENC is created and encryption process is done; otherwise,
the algorithm branches to step 3.
Vectors KR, KC and the max iteration number ITERmax are considered as secret keys in the proposed encryption algorithm.
However, to obtain a fast encryption algorithm it is preferable to set ITERmax =1(single iteration). Conversely, if ITERMAX >1, then the algorithm is more secure because the key space is larger than for ITERMAX =1.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!