nova_drop
is a lightweight, easy-to-use pseudo-random number generator (PRNG) designed for applications requiring random number generation with a good balance between simplicity, efficiency, and randomness quality. It features an increased state size and complex state interactions to enhance the randomness of its output.
- Increased state size for longer periods and improved randomness.
- Complex bitwise operations ensure thorough mixing of state.
- Easy to integrate into any C or C++ project.
- Designed with simplicity and performance in mind.
- A C compiler (e.g., GCC, Clang)
- Basic knowledge of C programming
- Save
nova_drop.c
andnova_drop.h
in your project directory. - Include
nova_drop.h
in your source file:#include "nova_drop.h"
. - Compile your project. For example, if using GCC and your source file is
main.c
:
gcc -o my_program main.c nova_drop.c
Initialize the PRNG State: Before generating random numbers, initialize the state with a seed.
uint32_t state[NOVA_DROP_STATE_SIZE];
uint32_t seed = 123456789; // Example seed
nova_init(state, seed);
Generate Random Numbers: Use nova_drop to generate random numbers as needed.
uint32_t random_number = nova_drop(state);
void nova_init(uint32_t *state, uint32_t seed): Initializes the PRNG state with a given seed. uint32_t nova_drop(uint32_t *state): Generates a pseudo-random number based on the current state and updates the state.
NOVA_DROP_STATE_SIZE: The size of the state array required by nova_drop. Currently set to 5.
nova_drop is open source and freely available for personal and commercial use.
While nova_drop has been designed with care, it has not undergone extensive testing in cryptographic contexts and should not be used for security-critical applications without further validation.
Contributions, suggestions, and bug reports are welcome and can be submitted via the project's GitHub repository.
For questions or support, please open an issue on the GitHub project page.