Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doumanash/squares-rnd
Squares RNG: Simple and fast counter based non-crypto random generator
https://github.com/doumanash/squares-rnd
cbrng prng rng squares-rng
Last synced: 1 day ago
JSON representation
Squares RNG: Simple and fast counter based non-crypto random generator
- Host: GitHub
- URL: https://github.com/doumanash/squares-rnd
- Owner: DoumanAsh
- License: bsl-1.0
- Created: 2020-11-02T15:17:33.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-12T07:28:26.000Z (about 1 year ago)
- Last Synced: 2024-10-11T14:17:32.987Z (26 days ago)
- Topics: cbrng, prng, rng, squares-rng
- Language: Rust
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# squares-rnd
![Rust](https://github.com/DoumanAsh/squares-rnd/workflows/Rust/badge.svg?branch=master)
[![Crates.io](https://img.shields.io/crates/v/squares-rnd.svg)](https://crates.io/crates/squares-rnd)
[![Documentation](https://docs.rs/squares-rnd/badge.svg)](https://docs.rs/crate/squares-rnd/)Simple and fast counter based non-crypto random generator.
The algorithm is based on `Middle Square Weyl Sequence RNG`.
See [paper](https://arxiv.org/abs/2004.06278v7) for details.**NOTE**: Not cryptographically secure.
There are several note-worthy properties to the algorithm:
- State is represented by counter, which is incremented to produce new value, hence making
it easy to predict how state would change.
- The code is short and simple, only taking minimum amount of operations to produce uniform output.
- `key` must have close to equal number of zeroes and ones for optimal output.
This crate provides single key for use, to have more download key file [gist](https://gist.githubusercontent.com/DoumanAsh/a57bc65434702d5d7fb88343c65f3145/raw/a9b45f7155c483f689318ee501222e72be0d66ec/keys)