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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
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

BSD, Linux, Windows, WINE

Intended Audience

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

User Interface

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

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