GithubHelp home page GithubHelp logo

lucasxsong / ezrsa Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20 KB

simple rsa functions for educational purposes. includes keygen, encrypt, decrypt, and implementation of fermats little theorem

C++ 100.00%

ezrsa's Introduction

crypt

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. ๐Ÿ˜†

keygen.cpp

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.

encrypt.cpp

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)

decrypt.cpp

Decrypts a message in the form of an integer based upon the public and private key pair.

decryptToFile.cpp

Allows user to enter a series of integers to be decrypted and writes the decrypted messages to a file that user specifies.

intToChar

Uses a int to char map to translate a file full of integers to their char equivalents.

helper functions

exponentFactorization

Helper function that factorizes large exponents to be used in encrypt and decrypt functions.

fermatsLittleTheorem

Uses FLT to find the inverse mod.

ezrsa's People

Contributors

lucasxsong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.