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
Enterprise-grade ITSM, for every business Icon
Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.

Freshservice is an intuitive, AI-powered platform that helps IT, operations, and business teams deliver exceptional service without the usual complexity. Automate repetitive tasks, resolve issues faster, and provide seamless support across the organization. From managing incidents and assets to driving smarter decisions, Freshservice makes it easy to stay efficient and scale with confidence.
Try it 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

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