This repository contains the lab works of CSE4232 – Cryptography and Network Security Lab course.
All programs are implemented in Python with clear encryption and decryption processes demonstrated for each algorithm.
- Implemented the Caesar Cipher (shift of 3).
- Performed encryption and decryption to retrieve the original plaintext.
- Implemented Polygram Cipher with a block size of 3.
- Encrypted plaintext by substituting character blocks.
- Reversed operation to recover the plaintext.
- Implemented Columnar Transposition Cipher.
- User inputs the width (key) to determine column arrangement.
- Performed both encryption and decryption.
- Applied two successive transposition ciphers using two keys.
- Verified correct decryption of ciphertext back to original text.
- Used a truly random nonrepeating key file.
- Implemented bitwise XOR for encryption and decryption.
- Verified perfect secrecy property.
- Implemented Lehmann’s algorithm to determine if a number P is prime.
- Implemented the Rabin–Miller probabilistic primality test.
- Compared performance and accuracy with Lehmann’s test.
- Implemented MD5 one-way hash algorithm.
- Demonstrated how the same input produces identical 128-bit hash values.
- Implemented SHA-1/SHA-256 one-way hashing.
- Compared with MD5 in terms of hash length and security.
- Implemented RSA public-key cryptosystem.
- Supported both integer and string (ASCII converted) plaintexts.
- Demonstrated encryption and decryption using generated keys.
- Simulated secure key exchange between two users over an insecure channel.
- Illustrated the concept of shared secret generation.
- Implemented simplified PGP operations:
- Authentication (Digital signature simulation)
- Confidentiality (Hybrid encryption using symmetric + asymmetric keys)
- Demonstrated full data transmission workflow.