Skip to content

Squares RNG: Simple and fast counter based non-crypto random generator

License

Notifications You must be signed in to change notification settings

DoumanAsh/squares-rnd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Squares RNG: Simple and fast counter based non-crypto random generator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages