LavaRnd D-LINK DSB-C100 webcam settings
To maximize the noise to signal ratio of the
LavaRnd cranks up the webcam settings to maximize the chaotic
noise that the CCD records.
The following sections describe these settings.
Linux module setting
The /etc/hotplug/usb/ov511 performs the following modprobe:
/sbin/modprobe ov511 autobright=1 autogain=1 autoexp=1 fastset=1 compress=0 force_palette=15
Open camera state
The camset tool:
reports that the default LavaRnd open state of the camera is as follows:
camset dsbc100 /dev/video0 -L -v 1
Camera name: OV511+ USB Camera
ov511 camera type: 513
Picture brightness: 11520
Picture hue: 35840
Picture colour: 65280
Picture contrast: 65280
Picture depth: 12
Min width: 64
Min height: 48
Max width: 352
Max height: 288
Video mbuf size: 608272
Video mbuf count: 2
Palette: YUV 4:2:0 Planar (15)
Camera sanity check parameters
To help ensure that the camera is operating in a proper fashion, the
LavaRnd camop layer performs the following sanity checks as reported by
the camset tool:
NOTE: In the above, the frame refers to only the chaos potion
of the frame.
See the camera frame size below.
4 most frequent octet values are considered common
max fraction of frame containing common octet values: 0.432444
3 most common values must be < 1/2 of frame octets
min fraction of bits same in next frame: 0.212036
max fraction of bits same in next frame: 0.787964
Camera frame size
When using the -L default LavaRnd settings,
the following frame information is reported by the camset tool:
read size: 304136
read LavaRnd offset: 0
read LavaRnd length: 101376
mmap size: 608272
mmap frame size: 304136
mmap frames: 2
mmap LavaRnd offset: 304136
mmap LavaRnd length: 101376
will use mmap I/O
mmap image: 608272
chaos size: 101376
chaos offset: 304136
LavaRnd output rate
We use the lavadump tool to measure the amount of time
it takes for LavaRnd to output 1 Megabyte (1048576 octets)
for a given camera.
When using lavadump, we set the default LavaRnd parameters
(see above), and we disable the normal warm-up wait period.
These tests were perform on a Linux system with a
detected 1529.526 MHz Athlon processor (3053.97 BogoMIPS)
using the following command:
time lavadump dsbc100 /dev/video0 1048576 alpha_rate -L -T 0 >/dev/null
lavadump of 1 Megabyte
You should remember that the lavadump tool, while it performs
the LavaRnd Digital
Blendertm Algorithm using the server libraries,
is intended for use as a test tool only.
One should use the LavaRnd application interface
and allow the lavapool daemon to access the
webcam and buffer the random numbers.
An application using the
can receive random data at a high rate as long as the
lavapool daemon's buffer contains random data.
the size of the lavapool buffer by adjusting the poolsize
value in the cfg.lavapool file.
So unless your application requires a great deal of random data
over an extended period of time, the actual output rate of the
webcam may not be that important.
An alpha rate of 8.0 is used when the
lavapool buffer is below the fastpool
As the buffer level increases to the slowpool,
the alpha rate drops to 1.0.
Above the slowpool an alpha rate of 1.0 is used.
The above timings suggest that the random data output rate
is not limited by the CPU, but rather by the webcam's ability to
The limiting factor in webcam chaos output may be a combination
of the webcam frame rate & size, perhaps the
webcam signal to noise ratio, and the webcam data transfer rate.
We use the imgtally tool to process 131072 frames:
imgtally dsbc100 /dev/video0 131072 /var/tmp/tally_file -L -v 2
to produce the following entropy measurement on the
data found in a webcam frame:
Shannon entropy bit measure: 565894.05
Shannon total image entropy: 481231.67
Shannon estimate entropy/pixel: 4.7470
NOTE: The above is not a measurement of LavaRnd's output,
it is a measurement of the
that would have been feed to the
Blendertm Algorithm to produce random data.
Luminance octet value distribution
Using the gnuplot on the /var/tmp/tally_file
file (produced by the previous imgtally command),
we can observe the distribution of octet values within the raw
webcam page for information about
other webcams that LavaRnd supports.
One may obtain informaion on the
Linux kernel module that supports this webcam.