Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2000 Database Design

Authors: Louis Davidson

1st Edition

1861004761, 978-1861004765

More Books

Students also viewed these Databases questions

Question

What is the meaning and definition of E-Business?

Answered: 1 week ago