Lab 3 (15/03/2023)
Problems for lab session:
Practicals
NOTE: You need to print all of the following 4 things for Part-1 (Q1) & Part-2
- Plaintext or original message
- Key/Shift Value
- Ciphertext
- Decrypted text
Part-1:
- Define Vernam Cipher and apply as per the given instructions:
- Encrypt the message:
A cat is not a dog - Length of message = Length of key =
18 - Unique Key:
Your Roll Number+Cryptography
- Encrypt the message:
- Define a function
LinearCongruentialGenerator()to generate Pseudo-Random Numbers (PRNs) with the following properties:- Seed value (X0):
Your Roll Number - Generate 3 random numbers using
LinearCongruentialGenerator()
- Seed value (X0):
Part-2:
- Define a Caesar Cipher for English alphabets (UPPER CASE only) and:
- encrypt
<YOUR FIRST NAME>using any desired key/shift value > 3 - decrypt the generated ciphertext
- encrypt
* You are allowed to import the functions defined in previous lab sessions, too (if needed)