Modern Cryptography

Practicals for M.Sc. CS students | (M3022201)

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

  1. Plaintext or original message
  2. Key/Shift Value
  3. Ciphertext
  4. Decrypted text

Part-1:

  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
  2. 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()

Part-2:

  1. 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

* You are allowed to import the functions defined in previous lab sessions, too (if needed)


Back to Homepage