A few assorted tools that I'm working on to help understand cryptography better. As of current, most of this code is in regards to RSA encryption. Disclaimer: based upon secure principles but is not secure at all. ๐
Takes in two primes and a chosen e that is relatively prime to the product of the two primes. Spits back out the public and private keys.
Need to add some sort of primality test so that auto keygen will work.
Encrypts and decrypts a message in the form of an integer with the public and private key pair. Simplifies exponents that may result in integer overflow using an implementation of Fermat's Little Theorem. (FLT)
Decrypts a message in the form of an integer based upon the public and private key pair.
Allows user to enter a series of integers to be decrypted and writes the decrypted messages to a file that user specifies.
Uses a int to char map to translate a file full of integers to their char equivalents.
Helper function that factorizes large exponents to be used in encrypt and decrypt functions.
Uses FLT to find the inverse mod.