https://github.com/nir3x/cryptorand.cpp
CryptoRand.cpp - Random Key Generation using Cryptographic Techniques
https://github.com/nir3x/cryptorand.cpp
algorithm algorithms c-plus-plus cpp cryptography encryption entropy random random-number-generation security
Last synced: 3 months ago
JSON representation
CryptoRand.cpp - Random Key Generation using Cryptographic Techniques
- Host: GitHub
- URL: https://github.com/nir3x/cryptorand.cpp
- Owner: NIR3X
- License: agpl-3.0
- Created: 2024-02-08T12:27:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-16T04:01:55.000Z (over 1 year ago)
- Last Synced: 2024-02-16T05:22:21.391Z (over 1 year ago)
- Topics: algorithm, algorithms, c-plus-plus, cpp, cryptography, encryption, entropy, random, random-number-generation, security
- Language: C++
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CryptoRand.cpp - Random Key Generation using Cryptographic Techniques
The CryptoRand.cpp module provides a secure method for generating random keys using cryptographic techniques and user interactions.
## Description
This module utilizes cryptographic algorithms along with user interactions (mouse movements) to generate random keys. It employs Xorshift random number generators for additional randomness.
## Features
* Generates random keys securely.
* Utilizes cryptographic algorithms for randomness.
* Incorporates user interactions (mouse movements) for added entropy.## Installation
To use this package, you can clone the repository and compile it using a C++ compiler:
```bash
git clone https://github.com/NIR3X/CryptoRand.cpp
cd CryptoRand.cpp
make
```## Usage
1. Include the necessary header file: `CryptoRand.h`.
2. Call the `CCryptoRand::Read()` function to generate a random key.
3. Provide a callback function to track the progress of key generation.
4. Ensure the generated key is used securely in your application.Example usage:
```cpp
#include "CryptoRand.h"
#include
#includeint main() {
uint8_t key[256];
CCryptoRand::Read(key, sizeof(key), [] (float progress) {
printf("\rMove the mouse around to generate a random key: %.2f%%", progress * 100.f);
});
printf("\rKey: ");
for (uint8_t byte : key) {
printf("%d ", byte);
}
printf("\n");
}
```## License
[](https://www.gnu.org/licenses/agpl-3.0.html)
This program is Free Software: You can use, study share and improve it at your
will. Specifically you can redistribute and/or modify it under the terms of the
[GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html) as
published by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.