Skip to content

anooshd7/Key-Pair-Generation-with-OpenSSL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage

About The Project

C++ program that uses the OpenSSL library to generate a key pair, which consists of a public key and a private key for each user. It then uses Diffie-Hellman algorithm to generate a shared secret for the first user using the first user's private key and second user's public key. It then generates a shared secret for the second user using second user's private key and first user's public key. These shared secrets are the same, according to the Diffie-Hellman algorithm. It then uses AES 256 Encryption to encrypt a given string, using the shared secret as the round key for encryption. It then subsequently decrypts it using AES 256 Decryption. Also, Base 64 encoding and decoding is used to convert the shared secret to an encryptable format. The program outputs all the generated keys to separate files.

(back to top)

Getting Started

Prerequisites

OpenSSl

Install OpenSSL and add it to your path.

Visual Studio 2022

Install Visual Studio 2022 and set it up. Also add the path to the OpenSSL directories in the Visual Studio project. This should include paths to libcrypto.dll and libssl.dll

Usage

In Visual Studio 2022, build the solution for the KeyPair.cpp file and then run the program. The generated keys are printed to files which are generated in the same directory, and the string is encrypted and decrypted.

(back to top)

About

Generates key pair using OpenSSL, and uses Diffie-Hellman Algorithm to generate shared secret. Then performs AES 256 Encryption and Decryption using the shared secret as the key

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages