https://github.com/laxical/openssl-evp-cpp
This is a introduction project showcasing how to use the OpenSSL EVP API (openssl/evp.h) for implementing various cryptographic techniques using C++.
https://github.com/laxical/openssl-evp-cpp
cpp makefile openssl-evp
Last synced: 10 months ago
JSON representation
This is a introduction project showcasing how to use the OpenSSL EVP API (openssl/evp.h) for implementing various cryptographic techniques using C++.
- Host: GitHub
- URL: https://github.com/laxical/openssl-evp-cpp
- Owner: Laxical
- Created: 2025-01-20T16:38:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-01T03:03:04.000Z (over 1 year ago)
- Last Synced: 2025-03-15T08:25:42.804Z (over 1 year ago)
- Topics: cpp, makefile, openssl-evp
- Language: C++
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenSSL-EVP-C++
This project demonstrates how to use the OpenSSL EVP API (`openssl/evp.h`) in C++ to implement various cryptographic techniques. It serves as an introductory guide to the powerful features provided by OpenSSL's EVP API, covering the following areas:
- **Hashing**: Securely hash data using various algorithms.
- **Key Generation**: Create cryptographic keys for signing, encryption, and decryption tasks.
- **Signing**: Use private keys to sign data for authentication purposes.
- **Verifying**: Verify signatures to ensure data integrity and authenticity.
---
## Features
- Comprehensive examples of hashing, signing, and verifying.
- Demonstrates how to handle cryptographic key generation.
- A clean and structured approach to using the EVP API in C++.
---
## Prerequisites
Ensure the following dependencies are installed:
### OpenSSL Installation
#### On Ubuntu/Debian-based Systems:
```bash
sudo apt-get install openssl
```
#### On Arch-based Systems:
```bash
sudo pacman -S openssl
```
### Development Tools
- GCC or Clang compiler
- `make` utility
---
## Getting Started
### Building the Program
1. **Clean Previous Builds**
Remove any existing compiled files:
```bash
make clean
```
2. **Compile the Program**
Build the main executable:
```bash
make main
```
3. **Run the Program**
Execute the compiled program using:
```bash
./object/main
```
Alternatively, you can use the following command:
```bash
make exec
```
---
## Example Usage
Demonstrate cryptographic techniques like:
- Hashing a message
- Generating and saving cryptographic keys
- Signing a message with a private key
- Verifying the signature with a public key
Refer to the source code for detailed examples.
---
## License
This project is licensed under both the OpenSSL License and the Apache License 2.0. For more details, refer to the LICENSE file or the links below:
- [OpenSSL License](https://www.openssl.org/source/license.html)
- [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)
---
## Acknowledgments
This project utilizes the OpenSSL library, an industry-standard tool for secure communication and cryptographic operations.