From b2c9e4fb4fef7a51ff6615b1ab4e09d46aa85a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Tue, 30 Jun 2026 22:14:04 +0200 Subject: [PATCH 1/4] Rewrite Readme --- README.md | 70 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 81284da..138c52c 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,61 @@ -# RSA Encryptor +# RSA -## Overview +RSA is an educational C++20 library for RSA-style encryption and +decryption primitives. It exposes `core::Encryptor`, `core::Decryptor`, +`PublicKey`, `PrivateKey`, and `keyPair`, and uses the custom `Base256` +big-integer library for modular arithmetic beyond native integer sizes. -**RSA Encryptor** is a simple RSA encryption and decryption library written in C++. It implements its own routines for handling large numbers using base-256 representation and is released under the [AGPL License](https://www.gnu.org/licenses/agpl-3.0.html). -> [!NOTE] -> This project uses `clang-format 20` for code formatting and is built and tested on macOS, Windows, and Ubuntu. +> [!IMPORTANT] +> This project is experimental and intended for learning/library exploration. +> It is not production-ready cryptography. -## License +## Installation and Integration -RSA Encryptor is distributed under the [AGPL License](https://www.gnu.org/licenses/agpl-3.0.html). See the `LICENSE` file for more details. +Clone the repository with its submodules: -## Contact +```sh +git clone --recurse-submodules https://github.com/ParallelEngineering/RSA-Encryptor.git +``` -For issues, please open an issue on the GitHub repository or contact the maintainers directly under this email mail@parallelengineering.org. +To integrate the library into another CMake project, add this repository as a +subdirectory and link against the `RSA` target: + +```cmake +add_subdirectory(path/to/RSA-Encryptor) +target_link_libraries(YourTarget PRIVATE RSA) +``` + +## Basic Usage + +```cpp +#include "decrypt.h" +#include "encrypt.h" +#include "keyPair.h" + +#include +#include +#include + +int main() { + keyPair keys; + + PublicKey publicKey = keys.getPublicKey(); + PrivateKey privateKey = keys.getPrivateKey(); + + core::Encryptor encryptor(publicKey); + core::Decryptor decryptor(privateKey); + + const std::string message = "hello"; + std::vector ciphertext = encryptor.encrypt(message); + std::string plaintext = decryptor.decrypt(ciphertext); +} +``` + +## Architecture + +- `src/` contains the RSA-facing library target, exposed as `RSA`. +- `core::Encryptor` encrypts byte data with the RSA operation `C = M^e mod n`. +- `core::Decryptor` decrypts ciphertext blocks with `M = C^d mod n`. +- `keyPair` owns the current public/private key data and provides serialization + helpers. -## Roadmap -- [x] Get informed about RSA -- [x] Write utility functions -- [x] Add workflows -- [ ] Implement encryption -- [ ] Implement decryption -- [ ] Beautify CLI output From 654d3208a90466d60d6d7be14019e1e45bf45f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Thu, 2 Jul 2026 12:41:54 +0200 Subject: [PATCH 2/4] Remove formulas from Readme --- README.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 138c52c..579b481 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,18 @@ -# RSA +# RSA RSA is an educational C++20 library for RSA-style encryption and -decryption primitives. It exposes `core::Encryptor`, `core::Decryptor`, -`PublicKey`, `PrivateKey`, and `keyPair`, and uses the custom `Base256` -big-integer library for modular arithmetic beyond native integer sizes. +decryption primitives. > [!IMPORTANT] > This project is experimental and intended for learning/library exploration. > It is not production-ready cryptography. +## Features + +- RSA-style encryption and decryption APIs +- Public and private key structs with serialization helpers +- Base64 helper functions for encoded key or byte-vector data + ## Installation and Integration Clone the repository with its submodules: @@ -25,6 +29,13 @@ add_subdirectory(path/to/RSA-Encryptor) target_link_libraries(YourTarget PRIVATE RSA) ``` +You can also build the library directly with CMake: + +```sh +cmake -S . -B build +cmake --build build +``` + ## Basic Usage ```cpp @@ -50,12 +61,3 @@ int main() { std::string plaintext = decryptor.decrypt(ciphertext); } ``` - -## Architecture - -- `src/` contains the RSA-facing library target, exposed as `RSA`. -- `core::Encryptor` encrypts byte data with the RSA operation `C = M^e mod n`. -- `core::Decryptor` decrypts ciphertext blocks with `M = C^d mod n`. -- `keyPair` owns the current public/private key data and provides serialization - helpers. - From 19699db827c0bb5d5156d0d01a81e94a99796853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Thu, 2 Jul 2026 14:40:33 +0200 Subject: [PATCH 3/4] Rename integration --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 579b481..dd41c26 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ decryption primitives. - Public and private key structs with serialization helpers - Base64 helper functions for encoded key or byte-vector data -## Installation and Integration +## Integration Clone the repository with its submodules: From 1b3f81f3b19a455e54f7896d0437fc2b0fd67e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hm?= <134922046+LordofGhost@users.noreply.github.com> Date: Thu, 2 Jul 2026 14:55:18 +0200 Subject: [PATCH 4/4] Readme goal --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd41c26..e0a9e44 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ decryption primitives. > [!IMPORTANT] > This project is experimental and intended for learning/library exploration. -> It is not production-ready cryptography. +> The goal is to become production-ready in the future. ## Features