Skip to content

ghostproxies/blastcircuit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BlastCircuit

BlastCircuit

Table of Contents

Introduction

BlastCircuit is an efficient PRNG algorithm for 64-bit output.

It's intended to replace non-cryptographic PRNGs for 64-bit output when the requirements are a 2⁶⁴ minimum period, fast speed and strong empirical test results.

Further analysis is pending.

Author

BlastCircuit was created by William Stafford Parsons as a product of GhostProxies.

License

BlastCircuit is licensed with the BSD-3-Clause license.

The default phrase the copyright holder in the 3rd clause is replaced with GhostProxies.

Period

BlastCircuit has many possible deterministic sequences based on the seed.

A 2⁶⁴ minimum period in each sequence is proven by the mixed-in 2⁶⁴ equidistributed sequence.

Parallelism

Each instance within a set of parallel BlastCircuit instances must seed a with a number that's unique among the set of parallel instances and must seed b and c with numbers that are consistent among the set of parallel instances.

BlastCircuit guarantees up to 2⁶⁴ parallel instances that each output at least 2⁶⁴ results without state overlap among the set of parallel instances.

Furthermore, skipping the first several results from each parallel instance reduces correlations among the set of parallel instances.

Reference

C Implementation

blastcircuit.c

The blastcircuit function modifies the state in a struct blastcircuit_state instance to generate and return a pseudorandom uint64_t integer.

Each state variable (a, b and c) in a struct blastcircuit_state instance must be seeded, preferably with random values.

It requires the stdint.h header to define a 64-bit, unsigned integral type for uint64_t.

C# Implementation

blastcircuit.cs

The Next function modifies the state in a BlastCircuit instance to generate and return a pseudorandom ulong integer.

Each state variable (a, b and c) in a BlastCircuit instance should be seeded with random values.

Empirical Test Results

BlastCircuit passed PractRand 0.96 stdin64 with TBs of output.

For reproducibility, the aforementioned test results seeded each state variable with 0.

About

BlastCircuit is an efficient PRNG algorithm for 64-bit output.

Resources

License

Stars

Watchers

Forks