Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a \"\" C program \"\" ... Simple encryption and decryption application wil

ID: 3690915 • Letter: W

Question

Write a "" C program "" ...

Simple encryption and decryption application will work at a level of alphabets. The program can handle one of two methods (substitution or transposition) to encrypt or decrypt a given message (array of chart) as follows:

ubstitution method:

The message given by the user is encrypted by substitute its characters to another characters based on an encryption dictionary (table) hard-coded in the project. Example of the encryption dictionary is illustrated in table 1.

Encryption Example:

Person 1 enters a message: HELLO

Encryption project will produce: ODIIY

Which could be sent over a communication media to the corresponding receiver Person 2.

Person2 should have the same system with the same Encryption Dictionary to decrypt the message and get back the original message.

The decryption is the reverse operation of the encryption. It uses the same encryption dictionary, but starting from the Encryption Code towards the Original to re-build the original message.

2- Transposition Encryption Method:

The transposition encryption is based on an encryption key that can be changed by the user or randomly by the program. The encryption key could have different order but with a fixed size (program specific) to encrypt and decrypt messages.

Encryption Example:

Suppose we have a key of 5 digits as ( 3 4 2 1 5 ) to encrypt a word “HELLO”. The key transforms the first letter from the original message to the third position, the second letter from the original message to the fourth position, the third letter from the original message to the second position and so on. Table 2 illustrtes the transposition encryption to the message "HELLO" to " LLHEO".

The transposition decryption is the opposite operation to the encryption. It starts by the Encrypted message towards the original message following the path of the arrows in Table 2 we notice the decryption key is ( 4 3 1 2 5).

1- The program should be constructed in modular way. So the main function will be simple and all the real work should be organized in functions.

2- The program should show an instruction message explaining the purpose of the program

3- The program should not stop automatically, it should have an option that allow the user to terminate the program.

4- The user will select what encryption method to use.

5- There should be two options to input a message to your program:

a - Allow the user to type his original message and your program will produce the encrypted version (instance typing)

b- Allow the user to specify a filename1 containing the original message. The program will read that file and uses the encryption method selected by the user to encrypt the message. The output will be in another file named  filename1_encrypt.

6- The user can select either encryption or decryption to the messages!

Due date - 21 april

a C language please..

Explanation / Answer

transposition cipher:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote