Implement the affine cipher in c programing language with


Assignment One

Objective: To implement Affine Cipher and DES in C programming language.

1. Implement the Affine Cipher in C programing language with comments. The requirements are follows:
- You have a separate code to testify whether a given key (a,b) is eligible.
- You have separate functions for encryption and decryption and also your code should work for encryption and decryption for any given eligible key. (After decryption, the original plaintext is recovered).
- You code should be capable to encrypt and decrypt both capital and lower case letters (ignore symbols).
- You code should work for the given test file (affinetest). (Able to encrypt and decrypt correctly).

2. Implement DES in C programming language with comments. The requirements are follows:
- Your code should be able to encrypt and decrypt all possible characters on a keyboard.
- The key for encryption and decryption is required to be any combination of characters in a keyboard with finite length (You need to do padding or chopping if necessary.)
- You are required to implement key generation, switch function and Fk as three separate functions (You should have these three functions separately in your hard copy) and then combine all of these operations to achieve DES.
- Make sure it works properly for the given test file (destest).
- Change the elements in all S-boxes with the required constraint (S-Box elements are required to be between 0-15) and check whether your code still works as expected.
- State clearly what is the main difficulty in the process of your programming if your code is not working properly?

Attachment:- Assignment.rar

Request for Solution File

Ask an Expert for Answer!!
Computer Network Security: Implement the affine cipher in c programing language with
Reference No:- TGS01370952

Expected delivery within 24 Hours