Before starting the assignment, it is important to read the background section on Cryptography to become familiar with the basics of encryption/decryption and ciphers.
The goal of this assignment is to implement three famous ciphers. You will be writing a separate function for each of them. The general format of these functions will be similar and has the following arguments:
- ● An input message, basically a collection of symbols.
- ● An output message, also a collection of symbols.
- ● The key for the cipher. This will differ depending on the type of cipher.
- ● A flag (i.e., an input that can only have two possible values) that specifies whether the relationship between the input and output message is an encryption or a decryption. So for a particular cipher, you will only be writing one function, which will do an encrypt or a decrypt, as specified by this flag. For this entire PA, you may assume we will only test valid inputs. This means you do not need to check this in your functions. The next section will talk more about the format of the input and output messages.
- You are not allowed to use the <string.h> library (or any other string library). The goal of this PA is for you to learn how to work with strings directly.