BEDBUG is a small, fast, cryptographically secure pseudo-random number generator (CSPRNG) and stream cipher. It exhibits uniform distribution, mixes rapidly (with worst-case avalanche better than 16-bits), has no detected bias, and comes in three variants: BEDBUG128, with an internal state array of 128+3 32-bit words; BEDBUG256, with an internal state of 256+3 words; and BEDBUG512 with a 512+3-word state. The former permit seeding with a key of up to 4096 or 8192 bits, the latter with a 16384-bit key.

The BEDBUG generator itself is a mere 5 lines of code: Three rotations; two pseudo-random lookups.

The default BEDBUG configuration alternates the rotation constants unpredictably. These four sets of three values differ between BEDBUG128, BEDBUG256 and BEDBUG512 and were selected, tuned and tested in each case for optimal avalanche, which is never less than 16.5 bits.

BEDBUG has passed stringent industry-standard tests for randomness, including NIST and DIEHARD.

Features

  • Fast and cryptographically secure random number streams
  • Tuned rotation constants bring rapid mixing (more than 16.5 bits avalanche)
  • Rotation constants switched unpredictably on each round of the generator
  • Seedable with keys up to 4096, 8192, or 16384 bits in length
  • Extremely long periods: Guaranteed to be well in excess of 2**512
  • The essential RNG can be coded in just 5 lines of C
  • BEDBUG has passed the most stringent industry-standard tests: NIST and DIEHARD
  • Implemented identically in C and Pascal, with full source code and sample programs
  • Includes the MOTET Cipher & SE Scrambler, a fast encryption program in C
  • Package includes comprehensive test results for all BEDBUG variants
  • Test BEDBUG yourself: several PRNG test programs are included in the distribution

Project Samples

Project Activity

See All Activity >

License

GNU General Public License version 3.0 (GPLv3)

Follow BEDBUG CSPRNG & Stream Cipher

BEDBUG CSPRNG & Stream Cipher Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of BEDBUG CSPRNG & Stream Cipher!

Additional Project Details

Operating Systems

WINE, Linux, BSD, Windows

Intended Audience

Science/Research, Education, Developers, Other Audience, Security, Engineering

User Interface

X Window System (X11), Win32 (MS Windows), Console/Terminal, Command-line

Programming Language

C, Free Pascal

Related Categories

C Communications Software, C Cryptography Software, C Education Software, C Encryption Software, Free Pascal Communications Software, Free Pascal Cryptography Software, Free Pascal Education Software, Free Pascal Encryption Software

Registered

2014-09-05