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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!