Assignment 10
Due on 09/05/2023
Problem(s)
Part 1
- Update the class newDES of DES (lab-10) for encrypting and decrypting the byte-strings
- Encrypt and decrypt your Full Name (read as bytes) using any desired key
- HINT: Converted the plaintext (bytes string) to Base64 and encrypt the same. In decryption, decode the recovered Base64 to bytes.
- Download the provided encrypted file, i.e.,
secret.enc
(encrypted using givenencFile.py
) and solve for the following:- Write a function decFile.py to recover the original file.
Resources for Q2
Provided encFile.py
:
Get the secret.enc
:
Part 2
- WAP to convert binary to ASCII and vice-versa using basic socket programming in Python. Use the following instruction to solve the problem:
- There should be two Python scripts, i.e.,
server.py
andclient.py
- The computation should be done through
server.py
- The user should be able to send binary and ASCII strings (anyone) while requesting the ASCII and binary strings, respectively, through
client.py
- The server must be able to detect the input type (i.e., binary of ASCII / UTF-8)
- Provide two screenshots, each with the running server and client for both types of conversions.
- There should be two Python scripts, i.e.,