Question
A cypher will be used, The cyphers are all lower case and contain only letters, numbers and a space. For each, the letters correspond to
A cypher will be used, The cyphers are all lower case and contain only letters, numbers and a space. For each, the letters correspond to numbers starting a 1 and going to 217 in increments of 6 (same length of vector as the letters). Need help with pseudocode and matlab code.
Cypher A
(Alphabet broken in half, count down M-A, then Z-N, "space", then numbers 0 through 9)
'M, L, K, J, I, H, G, F, E, D, C, B, A, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, "space", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9'
- A message needs to be encrypted. The minimum length of the message is 2500 characters, and the program should be capable of handling a message of any length up to that number. It must check the length of the message and inform the user if it's too long. Generate your selected encryption cypher and convert the message to the numerical equivalent. This must be done using loops.
- Reshape the vector into a message matrix 50 x 50 using reshape command.
- Display in the command window which of the cyphers you are using. Display the message to be encrypted and its numerical equivalent using display statements. It should read:
Original Message, Your Message, Numerical Message, Numerical message, Encoded Matrix, Encoded Numerical Matrix
- Import your image using imread(' '). Display the image in a figure window using imshow(' ') and title it "Original Image"
- Define the position of row and column to insert the encoded numerical matrix. (Remember that the position cannot be more than the value of sum of size of image and the size of Encoded Matrix)
- Embed the encoded message starting from the positions defined i.e., using loops, replace the pixels (numbers) of image with the encoded numerical matrix. (For example, the encoded numerical message is of size 50 x 50 and the positions to embed the message are row = 100 and col = 100. So the program should be capable of replacing all values of images from position (101,101) to (100+50,100+50))
- Display the image in a new figure window and title it "Encoded Image"
- Extract the encoded message from the image using the reverse of the process in step 5.
- Change the numbers back to string values and display the string message
Decoded Message
Should be same as Your Numerical message
Decrypted Message
Should be same as Your Original Message
Note: Output should consist of only the required lines in the command window and four figures.
Image: https://www.researchgate.net/figure/mage-3-cameraman-MATLAB-image-representing-a-typical-scene-used-as-comparison-set_fig3_322764659
Messege:
Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper.
But, in a larger sense, we can not dedicatewe can not consecratewe can not hallowthis ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before usthat from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotionthat we here highly resolve that these dead shall not have died in vainthat this nation, under God, shall have a new birth of freedomand that government of the people, by the people, for the people, shall not perish from the earth.
Abraham Lincoln
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started