squares-rnd

Crates.iosquares-rnd
lib.rssquares-rnd
version3.1.0
sourcesrc
created_at2020-11-03 07:53:24.376252
updated_at2023-10-12 07:28:43.191817
descriptionSimple and fast counter based non-crypto random generator
homepage
repositoryhttps://github.com/DoumanAsh/squares-rnd
max_upload_size
id308171
size14,394
Douman (DoumanAsh)

documentation

README

squares-rnd

Rust Crates.io Documentation

Simple and fast counter based non-crypto random generator.

The algorithm is based on Middle Square Weyl Sequence RNG. See paper 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
Commit count: 7

cargo fmt