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

Assignment 2

1. Implement the encryption and decryption algorithms of a simple


additive/shift/Caeser cipher, with a key of your choice. The program
should take user input of the actual message, display the encrypted
message and decrypted message.
2. Implement the encryption and decryption algorithms of a multiplicative
cipher, with a key of 7. The program should take user input of the actual
message, display the encrypted message and decrypted message.
3. Implement the encryption and decryption algorithms of the rail fence
cipher. The program should take user input of the actual message, display
the encrypted message and decrypted message.
4. Implement a transposition cipher where:
a) the plaintext is written into a table (2D array) column by column
and then transmitted row by row.
b) the plaintext is written into a table row by row and then transmitted
column by column.

Number of rows = number of columns = 4. If P-Boxes are


implemented using the above methods, what kind of P-Box would
they be? Draw the permutation tables for both.

5. Implement the encryption and decryption algorithms of an affine cipher


with the key pair (7, 2). The program should take user input of the actual
message, display the encrypted message and decrypted message.

You might also like