/cryptoalgo

A Repo with implementation of cryptographic schemes and primitives

Primary LanguageJupyter Notebook

cryptoalgo

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.

  1. Interactive with the Miller-Rabin Test: Binder

  2. 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. Binder

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

  1. Encrypt and Decrypt with the Vigenere scheme: Binder

  2. An Attack on the Vigenere Cipher: Binder