Giter VIP home page Giter VIP logo

openssl-evp-sign-des's Introduction

This program does the following:
1. Decryptes a session key using a third party RSA public key.
2. Saves the plaintext session key to file.
3. Encryptes a provided plaintext using DES with a key and iv derived from the session key.
4. Signs the ciphertext of the plaintext with an RSA private key.
5. Saves the ciphertext and the signature.

--------------------------------- COMPILATION ------------------------------------

A makefile has been included. All it does is compile everything and include the lcrypto
library required for the EVP openssl calls. Once 'make' has finished a new executable named
'EncAndSign' will be created. 

----------------------------------- USAGE -----------------------------------------
To use the program the following must be provided:

1. A plaintext file
2. A PUBLIC KEY in PEM format (presumably a third party public key)
3. A Session Key
4. A PRIVATE KEY in PEM format

Example usage:
./EncAndSign -p plaintext -pubk public.key -sk encrypted.key -privk private_key.pem


Let's go over the arguments:
-p <plaintextFile>          Include a plaintext file to encrypt using DES.
-pubk <public_key_file>     Include a public Key file in PEM format
-sk <session_key>           A session key for symmetric encryption.
                            (Must be 512 bytes, only first 8 bytes will be used.)
-privk <private_key_file>   A private key file in PEM format

Running the above command will output several files those files are:

1. sessionKey.key    The saved plaintext sessionkey.
2. output.bin        The ciphertext of the provided DES file.
3. signature         A signature of the SHA256 hash of the ciphertext.

---------------------------------- OPTIONAL ARGS -------------------------------------
There are a few convenience arguments that are accepted by the program.

First and foremost, if you want to see what exactly is happening at runtime, enable the 
debug argument, '-d'.

Also, incase you want to change the name of the output files here are a few extra args:

-kout       Name the file where the plaintext session key will be outputted to.
-out        Name the file where the ciphertext of the plaintext will be saved.
-sigout     The name of the file where the signature is placed.



openssl-evp-sign-des's People

Contributors

johnnyvf24 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  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.