GithubHelp home page GithubHelp logo

k0z4c / cppaes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cjzufelt/cppaes

0.0 0.0 0.0 45.63 MB

C++ Cryptography Program Designed for Testing Anti-Ransomware Tools

Shell 7.17% C++ 92.83%

cppaes's Introduction

This program was made possible by Crypto++ libraries. These can be found here: https://www.cryptopp.com/

This program does the following for encryption:
1. Collects all file names in the target directory
2. For all files:
	- Creates a unique AES key.
	- Encrypts the contents of the file using that AES key.
	- Encrypts all necessary decrypting AES data, namely the AES key (represented in hex), and iv (represented in hex), using a hard-coded public RSA key.
	- Stores the encrypted AES data as hex at the top of the file, with the cipherText of the file's previous contents beneath.

This program does the following for decryption:
1. Collects all file names in the target directory
2. For all files:
	- Takes the encrypted AES data from the top of the file and decrypts it using a hard-coded private RSA key.
	- Uses the decrypted AES data to decrypt the cipherText stored in the same file.
	- Clears the contents of the file, and writes the decrypted cipherText back in

Supported AES key sizes:
	128
	192
	256

Supported RSA key sizes:
	1024
	2048
	3072

To encrypt:
1. Go to the bin directory
2. Enter the following command:
   ./cppAES e <AES key size> <RSA key size> /path/from/root/to/target/dir
Notice:
* e is for encrypt
* You want to start the path from /

Also, the /encryptFiles directory is already setup to be encrypted. The ./setupEncryptedFiles.sh script will rebuild it if it breaks

To decrypt:
1. Go to the bin directory
2. Enter one of the following commands:
   ./cppAES d <AES key size> <RSA key size> /path/from/root/to/target/dir
Notice:
* d is for decrypt
* Once again, start the path from /

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.