Question
Background If two people wish to communicate privately over an insecure medium, the sender can use a shared secret, called a cipher, to encrypt a
Background If two people wish to communicate privately over an insecure medium, the sender can use a shared secret, called a cipher, to encrypt a message. The recipient can use the same cipher to decrypt it to reveal the original message. One of the oldest (and least complicated) ciphers is known as the Caesar cipher (after Julius Caesar). To use the Caesar cipher, the two people must agree upon a shift value. Each letter in the original message will be shifted by this value. So, if they agree upon 7, the letter a would become h.
Here is an example of a quote encrypted with a Caesar cipher: Y jxyda secfkjuh isyudsu, ro qdt bqhwu, yi ijybb ijksa yd jxu Cetuhd qwu. Task Your task is to create an Android app that will allow the user to enter a message and a shift value. The app should then display the encrypted message. Create a main activity with the following three widgets (views):
an EditText field to allow the user to enter the text to be encrypted
an EditText field to allow the user to enter the cipher value (an integer between 0 and 25) Alternatively, you can use a SeekBar to get the integer value.
a Button to allow the user to submit the information When the user presses the submit button, the encrypted message should appear in a new activity. Feel free to design the two activity layouts any way that you see fit.
Extra Credit Imagine you are an outsider (perhaps an adversary) who would like to know the content of the encrypted messages. You know that the messages are encrypted using a Caesar cipher, but do not know the key (shift value). Write a Java program to decrypt the text encrypted with a Caesar cipher (such as the quote above). The program does not need to be an Android app
PLEASE SHOW THE CODE IN THE DIFFERENT FILES; EXACTLY HOW IT WOULD APPEAR IN AN ANDROID PROJECT
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