Question: Chegg _ 2 . 2 Encryption Algorithm Based on Rubik s Cube Principle Write a FULL CODE with no errors in Matlab ( I have
Chegg Encryption Algorithm Based on Rubiks Cube Principle
Write a FULL CODE with no errors in Matlab I have Rb version for an Secure Image Encryption Algorithm Based on Rubiks Cube Principle.
This algorithm is based on the principle of Rubiks cube to permute image pixels. To confuse the relationship between original and encrypted images, the XOR operator is applied to odd rows and columns of image using a key. The same key is flipped and applied to even rows and columns of image. ALL STEPS MUST COMPLETED AND HAVE A WORKING CODE AND FINALL CODE MUST RUN WITHOUT ERRORS!
Step : ReadLoad the input image Display the input image
Step : Convert to grayscale if it's a color image Normalize the image to the range Display the input image
Step :Define and Initialize Rubiks Cube Principle, pecify the specific equations govering Rubiks Cube Principle.and the parameters involved Set parameters for Rubiks Cube Principle
Step : 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 : Encryption process, Perform image encryption using the chaotic sequences: Write and implement the Ruik's Cube Principle encryption
For example, for the Rubik's cube principle, you may need toAfter encryption result a fileimage Write the image file on disk Display the encrypt image.
Step : Decryption process, Perform image decryption Write the image file on disk Display the decrypted image
Step : Calculate performance metrics You need to implement functions to calculate the metrics like: PSNR entropy, NPCR UACI, horizontal, vertical, and diagonal pixel correlation.
Step : Display all the saved results : PSNRentropy NPCRUACI 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.
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 codefor thumb UP
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:
Generate randomly two vectors KR and KC of length M and N respectively. Element KRi and KC j Note that both KR and KC must not have constant values. Determine the number of iterations, ITERmax, and initialize the counter ITER at Increment the counter by one: ITER ITER For each row i of image Ioa compute the sum of all elements in the row i this sum is denoted by alpha ib computemodulo of alpha i denoted by Malpha ic row i is left, or right, circularshifted by KRi positions image pixels are moved KRi positions to the left or right direction, and the first pixel moves in last pixel. according to the following: if Malpha i right circular shift else left circular shift. For each column j of image Io: a compute the sum of all elements in the column j this sum is denoted by beta jb computemodulo of beta j denoted by Mbeta jc column j is down, or up circularshifted by KCi positions, according to the following: if Mbeta j up circular shift else down circular shift.Steps and above will create a scrambled image, denoted by ISCR. Using vector KC the bitwise XOR operator is applied to each row of scrambled image ISCR using the
following expressions:where and rot KC represent the bitwise XOR operator and the flipping of vector KC from left to right, respectively. Using vector KR the bitwise XOR operator is applied to each column of image I If ITER ITERmax, then encrypted image IENC is created and encryption process is done; otherwise,the algorithm branches to step 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 single iteration Conversely, if ITERMAX then the algorithm is more secure because the key space is larger than for ITERMAX Nevertheless, in the simulations presented in Section the number of iterations ITERmax was set to one.
b Rubiks Cube Decryption Algorithm.
The decrypted image,Io is recovered from the encrypted image, IENC, and the secret keys, KR KC and ITERmax as follows in the following: Initialize ITER Increment the counter by one: ITER ITER Use bitwise XOR
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
