Search for question
Question

1. Goal

For this assignment, you will write a program in C, in the Ubuntu Linux environment, to provide the end user with the ability to encrypt and decrypt messages, using a secret key. The algorithm that you implement will use an incrementing counter to encrypt each character in a slightly different way, similar to (but much simpler than) the Counter (CTR) mode of the Advanced Encryption Standard (AES) symmetric encryption algorithm. It will also use a chaining approach similar to the Cipher block chaining (CBC) mode. If the end user chooses to encrypt a message (called the plaintext), your program will output the encrypted sequence (called the ciphertext) to the screen, and if the user chooses to decrypt an encrypted sequence (ciphertext), your program will print out the decrypted message (plaintext).

2. Learning Outcomes

With this assignment, you will:

• write a program in C that is correctly designed into modular functions, and correctly documented

• correctly organize a C program by reusing existing functions as much as possible

• use bit masks and bitwise operators to manipulate values at the bit level