A program which generates two messages m1, m2 where m1 and m2 have the same hash value, m2 is a clean message and m1 is a malicious message. Since there is no clear way to define a clean and a malicious message, any pair (m1, m2) would be accepted as long as they both are valid english sentences and, m1 and m2 have different meaning.
Implementation of AKS algorithm for primality testing for numbers of size max 64 bits.
Algorithm available here.
Implementation of Miller-Rabin Test for primality testing.
Checking if a number is prime or not.
Finding the smallest prime greater than a positive integer N.
Finding strong witnessses and strong liars.
4a.py - Implementation of commit,verify methods of a hash fn.
4b.py - Implementation of RSA .
Solved discrete log problem using man in the middle attack.
Implementation of Babystep-Giant step.
6a.py - Implementation of DiffieHellman key exchange protocol,Demonstration of having a common key at both ends.
6b.py- Demonstrating the man in the middle attack using Diffie Hellman Key exchange protocol.