HA

HA



Home
Information
Products
Support
Store
How To Order

www.HEPArts.com

Up to PKI Utilities

random_bytes

Motivation

There are many situations that call for making a decision based on the outcome of a "random" event. A toss of a coin. A roll of the dice.

Security in computing also requires some data to be "hard to guess". Randomly chosen Pass-Phrases make it very improbable that someone can guess them to break into the computer. Similarly, one needs good random data to form the basis of cryptographic Public/Private Key pairs, which are used in legally binding electronic signatures.

Random Number Generators have a long history in computing. They are used to simulate the toss of a coin. The roll of a die. The dealing of a Poker hand. In the Physics community, they are also used to simulate the decay of Radioactive nuclear isotopes. The collision of particles in a Proton Synchro-Cyclotron. The hadronization along a gluon flux tube.

Whatever your field, sometimes you just need a good number that you know has been generated fairly.

random_bytes is a utility Random Number Generator that can be used in conjunction with a variety of other programs and tasks.

How It Works

Random Number Generators are based on some rather complex associations in digit arrangement in large numbers under the operation of mathematical functions. Different functions give different associations. Some work better than others. Quite a lot of study has gone into this in the past century, both theoretical and empirical.

If you are interested in why we have chosen the functions we used to implement our program, random_bytes, then you can go to the Random Number Generators page.

If you just want to see proof that the program generates good random data, then you can go to the Randomness Validation page.

If you want to see how to use it, then just read on.

Syntax

Operation

This program is used to generate cryptographically secure random bytes of data, which it lists to the standard output as a comma-separated sequence of bytes in hexidecimal notation. If you omit the number-of-bytes on input, it will generate 8-bytes of output.

There are other forms of output, as well. You may use this program to generate a random string, which is useful for Passwords or Unique-Identifiers. Use the "base" option with 26 to get all uppercase, with 36 to get uppercase plus digits, and 64 to get mixed-case plus digits.

This is a command-line utility. As such, it can be used as a CGI function in a Web Server.

Options

Usage: random_bytes [options] [n_bytes]

Alternate output:
  --no-commas | -c  -> output data without separating commas
  --base      | -b <base-number> generate a string of random data
                                       in this base

Information Options:
  --help      | -h  -> output this help message
  --version   | -V  -> version of the program and licensing.
  --verbose   | -v  -> Enable Verbose mode

Examples

cmd> random_bytes 32
  0xdc, 0x59, 0x37, 0x9c, 0x0c, 0xfe, 0x5d, 0x00, 
  0x7a, 0x83, 0x5c, 0xab, 0x2b, 0xd4, 0xcb, 0xdd, 
  0xc8, 0x10, 0xa6, 0x8c, 0x5f, 0xdd, 0x60, 0x27, 
  0xf5, 0x21, 0xf7, 0x9d, 0x1a, 0x65, 0x51, 0x12
cmd> random_bytes -c 4
  0x37d9ba95
cmd> random_bytes -b26 32
  YITKPIQZADHDNKTRYYZNTNTFHVCIEORL
cmd> random_bytes -b36 32
  f3a2qbtnyz61vinawil7gq9wgugk3m1m
cmd> random_bytes -b62 32
  YJuXiK5z5CHJCjZOE2ICadIMgGqqXt0J
cmd> random_bytes -b64 32
  7pj1ooxbG_Sn0NoF348igGcg1JCfz~NM

Purchase

Price: $ 50

Download Packages

After you have purchased your License, you may go to the Download Page to copy the program package down to your computer. You must run the program package to extract the program and to activate it, using your License Number and Activation Code.

Proceed to the Download Page.


webmaster@HEPArts.com

Copyright © 2005 HEPArts, Inc. All Rights Reserved.