Sponsored Content
Full Discussion: True random numbers in Sol10
Operating Systems Solaris True random numbers in Sol10 Post 302978206 by wisecracker on Wednesday 27th of July 2016 02:08:21 PM
Old 07-27-2016
OK guys looking at this completely laterally.
Hear me out before ridiculing and apologies for any typos...

This requires an installation of SOX on a personal home computer, NOT, the said machine.

Forget the intended machine at this point. The only assumption to be made is that OP is allowed to transfer a file to said machine.

How about using a home computer of any kind, in this case my MacBook Pro, circa August 2012, OSX 10.7.5, default bash terminal, feeding a white noise generator into the mic input of the 'on_board' sound system using an avalanche diode idea via a zener.

1) The noise is definitely random, white thermal noise in circuits by definition IS.
2) Theoretically any raw data file can be almost limitless is size.
3) Because it is byte sized per sample and raw then you could decide whether your values are 8 to 64, (or more), bits in length.
4) The passband of the computer's mic circuit is peculiar to the machine recorded on. EG 300Hz to 5KHz or much wider, who knows, adding to the randomness.
5) You can't guarantee that these specifications are even flat and my have small peaks and troughs throughout the passband.
6) Aliasing WRT the sampling frequencey is an added bonus to the randomness, assuming linear interpolation.
7) If an added amplifer stage is needed to full scale the mic circuit, then another bonus to the randomness due to its own small internal noise generated.

That is all I can think of at the moment.

Once you have the file, transfer it to the main machine and decide what bit depth is suitable and use any floating point value as your multiplier.

This is what I term as "my weapon of last resort". And no matter how stupid this looks it works.
Code:
#!/bin/sh
# random.sh <seconds[1 to 59]>
SECS="$1"
/full/path/to/sox -q -V0 -d -t raw -r 96000 -b 8 -c 1 -e unsigned-integer -> /tmp/random.dat trim 0 00:"$SECS"
exit 0
#
# Ultra simple noise generator.
#
#                    +-------> +9V
#                    |
#                 ___|___ +
#                   / \  |
#                  /   \  ZD1
#                 '_____'
# Mic I/P    | |     |
#  O----*----| |-----*
#       |    | |     |
#      	/     C1     /
#       \            \ 
#       / R1         / R2
#       \            \ 
#       /            /
#       \            \ 
#       |            |
#  O----*-----*------*-------> 0V
#           __|__
#           /////
# Parts:-
# ZD1 .......... 1W, 6.8V zener.
# C1 ........... 1uF non polarised capacitor.
# R1 ........... 2.7K to 4.7K resistor, any power and tolerance.
# R2 ........... 82 to 120 ohms resistor, any power and tolerance.
# Obviuosly a battery, etc...


Last edited by wisecracker; 07-27-2016 at 03:19 PM..
This User Gave Thanks to wisecracker For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Random numbers without repetition

Is anyone know some scripts to generate random number without repetition using bash; for example generate 10 different random numbers. Thanks (8 Replies)
Discussion started by: asal_email
8 Replies

2. Programming

How to set constrain on random numbers in c

Hi, I am currently trying to generate multiple random numbers in C for different variable:- die1=1+(rand()%5); die2=1+(rand()%5); die3=1+(rand()%5); die4=1+(rand()%5); But I need to contrain the total of die1, die2,die3 and die4 to be 5 as well. If i insert die1+die2+die3+die4=5, i do... (6 Replies)
Discussion started by: ahjiefreak
6 Replies

3. Shell Programming and Scripting

Random numbers from 0 to 1000

Hello All, I want to make a simple script which generate random number from 0 to 1000. and simply display it. Plz HELP!!!!!! Regards, Waqas Ahmed (2 Replies)
Discussion started by: wakhan
2 Replies

4. Shell Programming and Scripting

Random Numbers - Perl

Hi Guys I have a script to find Ranomd numbers. But I want to make the file to produce more random. Could u guys help me plz. In this Script I have the code that generates random in for loop and the range I have specified in my %chromlength input and out put will be like this chrno start end... (3 Replies)
Discussion started by: repinementer
3 Replies

5. Shell Programming and Scripting

Generating random numbers

Hi, I am having trouble with generating random numbers. can this be done with awk? So I have a file that looks like this: 23 30 24 40 26 34 So column1 is start and column2 is end. I want to generate 3 random #'s between start and stop: So the output will look like this: ... (9 Replies)
Discussion started by: phil_heath
9 Replies

6. Programming

Random numbers in parent/child?

Hi I'm trying to generate random numbers both in parent process and the child process. But I get the same random number in both processes. Why doesn't it generate different numbers altough I seed random number generator? Here's my code: #include <stdio.h> #include <unistd.h> #include... (2 Replies)
Discussion started by: xyzt
2 Replies

7. Shell Programming and Scripting

Random float numbers in BASH

Hi people :) I'm learning shell scripting using bash and I want to generate 4 floating point number with 5 decimal places and write them to a file and a variable. I've done all this except the $RAMDOM enviroment variable does not generate a float number but a integrer. I hope you could... (3 Replies)
Discussion started by: pharaoh
3 Replies

8. Programming

How to fill a memory with random numbers in C

Hi, I have a parametrized memory mem. I want to fill this memory with random numbers with respect to the data_width. can anyone help me on this.. (3 Replies)
Discussion started by: vdhingra123
3 Replies

9. Homework & Coursework Questions

Random numbers

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! Write a shell script that will take the sum of two random number? Ex: Random n1 +Random n2 = result i tries to write it but i had some dufficulties ... (3 Replies)
Discussion started by: renegade755
3 Replies
All times are GMT -4. The time now is 02:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy