Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Problem Statement:

Develop a file encryption utility program (in C language) for the Windows operating
system using only the Windows API. The program should provide a command-line
interface (CLI) for users to encrypt and decrypt files using AES-256 encryption algorithm.
Assignment Tasks:
1. Design the command-line interface for the file encryption utility, including options
for encrypting and decrypting files, encryption key, and providing input and
output file paths. Program should first ask the user whether he/she wants to
encrypt or decrypt a file.
a. In case of encryption:
i. It should ask for source file path, encryption password and
destination path for encrypted file.
ii. For destination file path, it should also tell the user to press “s” for
same path as the source file (if he/she does not want to enter the
new path).
iii. Program should append the word “Encrypted” after the source file
name. For example, if source file name is “Test.txt” then after
encryption, its name should be “TestEncrypted.txt”.
b. In case of decryption:
i. Program should ask for source file path.
ii. It should then ask for decryption password.
iii. If password matches, it should decrypt the file and remove the word
“Encrypted” from its file name.
iv. If password in incorrect, it should show the proper error message.
v. It should then ask for destination file path. it should also tell the
user to press “s” for same path as the source file (if he/she does not
want to enter the new path). If a file with the same name already
exits in the destination directory, then your program should append
the word “Decrypted” at the end of the decrypted file. Otherwise,
there is no need to append any word.
2. Implement file encryption functionality using only Windows API cryptographic
functions, such as CryptEncrypt and CryptDecrypt, to perform symmetric
encryption.
3. Handle errors gracefully using Windows API error handling functions, providing
informative messages to users.
Note:
You should print “Steve” name and student ID “BC101010101”at the top of output
screen.

You might also like