Question: Lab 3: Classical Encryption Technique Implementing playfair and Vigener Cipher Objective: After completing this lab Students will be able to implement Playfair and Vigener Cipher
Lab 3: Classical Encryption Technique
Implementing playfair and Vigener Cipher
Objective: After completing this lab Students will be able to implement Playfair and Vigener Cipher
CLO6. Use software libraries to efficiently apply cryptographic techniques
1.1 Implementing Vigener cipher (5 marks)
Background:
The general Vigener cipher algorithm is:
Encryption: Each letter is added with the corresponding letter in the Key
Task1: Implement Vigener Substitution cipher using python.
Install all the tools required to run your code( Eclipse, TC, Linux etc)
Paste your code here and explain
Task 2:
Take screenshot of the output and paste here. Use your full Name as the plain text
Put your Screenshot here
Implementing Playfair Cipher (5 marks)
Background
Fill in letters of keyword (minus duplicates) from left to right and from top to bottom, then fill in the remainder of the matrix with the remaining letters in alphabetic order
Using the keyword MONARCHY:
Example: we lc om ez
Ciphertext= ug ue no ku
| M | O | N | A | R |
| C | H | Y | B | D |
| E | F | G | I/J | K |
| L | P | Q | S | T |
| U | V | W | X | Z |
In this case, the keyword is monarchy . The matrix is constructed by filling
in the letters of the keyword (minus duplicates) from left to right and from top to
bottom, and then filling in the remainder of the matrix with the remaining letters in
alphabetic order. The letters I and J count as one letter. Plaintext is encrypted two
letters at a time, according to the following rules:
1. Repeating plaintext letters that are in the same pair are separated with a filler
letter, such as x, so that balloon would be treated as ba lx lo on.
2. Two plaintext letters that fall in the same row of the matrix are each replaced
by the letter to the right, with the first element of the row circularly following
the last. For example, ar is encrypted as RM.
3. Two plaintext letters that fall in the same column are each replaced by the
letter beneath, with the top element of the column circularly following the last.
For example, mu is encrypted as CM. Otherwise, each plaintext letter in a pair is replaced by the letter that lies in its own row and the column occupied by the other plaintext letter. Thus, hs
becomes BP and ea becomes IM (or JM, as the encipherer wishes).
Task1: Encrypt using playfair cipher
Plain text: Your full name
Key: KEY
Paste the code here and explain
Paste the screenshot here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
