Questions tagged [random-number-generator]

57 questions
684
votes
18 answers

How are pseudorandom and truly random numbers different and why does it matter?

I've never quite got this. Just say you write a small program in any language at all which rolls some dice (just using dice as an example). After 600,000 rolls, each number would have been rolled around 100,000 times, which is what I'd expect. Why…
Peter
  • 1,085
  • 4
  • 11
  • 14
52
votes
2 answers

dd is producing a 32 MB random file instead of 1 GB

I wanted to produce a 1 GB random file, so I used following command. dd if=/dev/urandom of=output bs=1G count=1 But instead every time I launch this command I get a 32 MB file: <11:58:40>$ dd if=/dev/urandom of=output bs=1G count=1 0+1 records…
Trismegistos
  • 591
  • 4
  • 11
37
votes
6 answers

Why is my /dev/random so slow when using dd?

I am trying to semi-securely erase a bunch of hard drives. The following is working at 20-50Mb/s dd if=/dev/zero of=/dev/sda But dd if=/dev/random of=/dev/sda seems not to work. Also when I type dd if=/dev/random of=stdout It only gives me a…
Mikey
  • 1,099
  • 4
  • 11
  • 16
20
votes
3 answers

Why does `cat /dev/urandom` break your terminal?

In reference to this question: https://serverfault.com/questions/534449 How does cat /dev/urandom make some terminal emulators go wonky?
Christian Chapman
  • 1,407
  • 2
  • 15
  • 21
18
votes
4 answers

Can't load /root/.rnd into RNG : where can I find it, or how to create it?

I'm trying to setup a VPN server with OpenVPN, on an Ubuntu Server 18.04, and I want to use EasyRSA to build my PKI CA. So, while connected as root, I launch the EasyRSA scripts which I copied to /etc/openvpn/easy-rsa. Everything works fine with…
DisplayNeth
  • 323
  • 1
  • 2
  • 6
16
votes
3 answers

How can I know whether my machine have RNG hardware support?

I came across a blog concerning entropy pool problem and learn that there are a special hardware called RNG. I have read this kernel RNG page but I still wonder whether there is a way to find out if my server support hardware RNG or not.
allan ruin
  • 303
  • 4
  • 9
15
votes
3 answers

How often does /dev/urandom sample seeding from /dev/random?

Unless I am totally confused and it doesn't do that. I want to know whether or not /dev/urandom will gain increased entropy if I take a hardware RNG and plug its entropy into /dev/random. So to rephrase, if I were to increase the entropy of…
Vasili Mahin
13
votes
6 answers

Creating a large file of random bytes quickly

I want to create a large file ~10G filled with zeros and random values. I have tried using: dd if=/dev/urandom of=10Gfile bs=5G count=10 it creates a file of about 2Gb and exits with a exit status 0. I fail to understand why? I also tried creating…
egeek
  • 251
  • 1
  • 2
  • 4
13
votes
3 answers

How to keep random numbers from changing in Excel?

I am trying to generate a set list of random numbers between 1 and 5 using the RANDBETWEEN formula. I'm running into a problem that every time I click another cell anywhere in the sheet or even open and close the sheet after saving it, the random…
10
votes
2 answers

Why is GNU shred faster than dd when filling a drive with random data?

While securely erasing a hard drive before decommissioning I noticed, that dd if=/dev/urandom of=/dev/sda takes nearly a whole day, whereas shred -vf -n 1 /dev/sda only takes a couple of hours with the same computer and the same drive. How is this…
user16115
10
votes
7 answers

how do you make a letter password generator in batch?

I'm having a hard time figuring out how to make a password generator with random letters in it. For example, ASWED-ASDWAD-EFEST. So far I can only make random numbers by using the code @echo off :password echo %random%-%random%-%random pause goto…
mendez
  • 359
  • 4
  • 5
  • 11
6
votes
1 answer

Should I use “/dev/random” or “/dev/urandom” for large random data needs?

Sometimes I want a lot of highly-random data, for example to overwrite a file or even a whole hard disk. Should I use /dev/random or /dev/urandom? What are the advantages or disadvantages of each? Is there a better alternative?
CBHacking
  • 6,119
  • 2
  • 21
  • 34
6
votes
3 answers

How to generate random numbers with a .wav file?

I want to generate random numbers within a certain range (1 to 26) using a .wav file with only static noise. The results need to be repeatable. Is there any service/program/method of accomplishing this in Windows 7?
slippery
  • 762
  • 1
  • 6
  • 18
5
votes
3 answers

how to record mic input and pipe the output to another program

Hi everyone Im trying to follow a tutorial on generating truly random bits How To Generate Truly Random Bits This is the command from the tutorial but it does not work rec -c 1 -d /dev/dsp -r 8000 -t wav -s w - | ./noise-filter >bits I know i can…
acrs
  • 51
  • 1
  • 3
5
votes
1 answer

Play random movie/episode within a folder from its context menu

The Goal I have a relatively expansive media collection stored locally on my machine within two parent folders ("Movies" and "Shows"). My goal is to be able to play at random any one of the movies or episodes I have within these folders by…
1
2 3 4