Today we begin our new C project by reasoning about how to design a file encryptor, but doing it in a purely secure manner.
How can we make it detect if you've given it a wrong encryption key when decrypting? Can we do this without lowering the overall security of the solution? Where and how do we store the key then?