This Repo contains implementations of (non-production) cryptographic schemes and primitives.
The primenumbergenerator folder contains two algorithms: Miller-Rabin Test and a Prime Number generator.
-
Prime Number generator: Generate a random prime number up to 32 bits length in under a minute. Note that this uses random.randint. This is not a true source of randomness. Therefore the primes appear random but are actually not. This algorithm would produce a truly random prime if random.randint is replaced with a source of true randomness.
The vigenere folder contains two files: An implementation of the encryption/decryption of the vigenere cipher and an attack on the vigenere cipher that completely recovers the private key for sufficently large messages. This attack on the vigenere cipher is a programming assignment from Dr. John Katz's coursera course "Cryptography".