Question
Programming #3: Secret Key Encryption In symmetric encryption, only one key is used for encryption and decryption. This key is called the secret key .
Programming #3: Secret Key Encryption
In symmetric encryption, only one key is used for encryption and decryption. This key is called the secret key. In this programming assignment, you are asked to decrypt the message given in the secret.txt file using the secret key passed as an argument to the program and generate an output file, called message.txt with the decrypted message. In this programming assignment, you are asked to write a Java program, called SecretKeyApp, which will read the encrypted text from a file and decrypt the text using the secret key. The program will input the file name and the secret key as a command line argument as shown in the following sample console(terminal) run:
$ java SecretKeyApp secret.txt 0x1668AC1F
TODO
Write a Java application that reads encrypted messages given in the secret.txt input file, and decrypts the message with the given secret key, 0x1668AC1F. The program then writes the decrypted message into an output file, message.txt.
Notes:
- You are not allowed to use external libraries in the implementation.
- You are supposed to use bitwise operations while decrypting the message
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