small text    normal text    large text
EVE-Online - New Universe, New Rules
NO2ID - Stop ID cards and the database state

You are here: home > resources > cyorand

CyoRand

[download] [support]

description

A free Windows console program for generating random bytes from a computer's sound card.

information

Firstly, a sequence of recordings are made at a sample rate of 44.1 KHz and sample size of 16 bits. After each recording the lowest bit of each sample is taken to produce the next bit of the input file. Hence the input file will be 1/16th the size of each recording (very wasteful, but from my tests only this lowest bit shows any sign of randomness). When there is a complete sequence of input files, they are then XORed to produce the intermediate files, which in turn are further processed (XORing and rotating) to produce a single output file of (hopefully) random bytes.

usage

Either use the precompiled executable or compile the source code. In a Command Prompt window, change to the directory containing the executable. Issue a command of the following format:

CYORAND path inputFiles midFiles seconds [/LIST]

Parameters:

  • path - Specifies the output path (eg. "C:\RandomData");
  • inputFiles - The number of input files that are merged into a mid (intermediate) file;
  • midFiles - The number of intermediate files that are merged into the single output file;
  • seconds - The length of each recorded file;
  • /LIST - Displays the frequency of all bytes (optional switch).

example

CYORAND C:\RandomData 3 3 600

This records 9 files (3 intermediate files, each having 3 input files) of 600 seconds each. The output file is 6,615,000 bytes in size. (600 seconds * 44,100 samples/second * 2 channels * 2 bytes/sample / 16. Note that the divide by 16 is because we're only using one bit of each 16-bit sample.) Recording won't be quick; in fact it'll take 90 minutes! (9 files * 600 seconds = 5400 seconds = 90 minutes.) The good news is that it uses very little CPU power, so you can leave it running in the background.

testing

A good program for testing random byte sequences is ENT - A Pseudorandom Number Sequence Test Program. It produces relatively concise and easily understood results. We get good results from these tests. Please inform us of your results on data generated on your machine, and of your modifications and improvements.

compatibility

Developed using Microsoft Visual C++ 6.0.
Requires DirectX 8.0 SDK for compiling, and DirectX 8.0 runtime for execution (not available on Windows NT 4.0).

licence

The source code contains the following statement: "This source code may be used, modified, compiled, duplicated, and/or distributed without restriction provided this copyright notice remains intact. Cyotec Systems Limited and/or its employees cannot be held responsible for any direct or indirect damage or loss of any kind that may result from using this code, and provides no warranty, guarantee, or support." By downloading the source code you automatically agree to these licence terms.

download

Download the CyoRand source code and executable here (54 KB)

MD5 hash: 2A08198A5A00286CDDC5C9BC465D64A4
SHA1 hash: 60F6AABA2738FBA7948486885377A73BB2900122

Copyright © Cyotec Systems, 2003-2008. All rights reserved.