Questions tagged [random-number-generator]

A Random Number Generator is a device or program that generates (pseudo)random numbers for use in cryptography. Examples are the Unix devices `/dev/random` and `/dev/urandom`

25 questions
71
votes
7 answers

How to read in N random characters from /dev/urandom?

read /dev/urandom 3 The above is not working..How can I read random bytes from /dev/urandom in bash?
linux
  • 1,223
  • 4
  • 13
  • 15
21
votes
6 answers

How do I get /dev/random to work on an Ubuntu virtual machine?

Apparently, /dev/random is based on hardware interrupts or similar unpredictable aspects of physical hardware. Since virtual machines don't have physical hardware, running cat /dev/random within a virtual machine produces nothing. I'm using Ubuntu…
Nick
  • 4,503
  • 29
  • 69
  • 97
14
votes
2 answers

Is there a way to monitor /dev/random?

We're investigating some JDBC issues, and one of the possible problems is /dev/random being exhausted. The workaround is to switch the JVM to using /dev/urandom, but I wan't to try and determine whether or not the /dev/random is being exhausted. Is…
Josh Smeaton
  • 1,340
  • 2
  • 19
  • 31
7
votes
2 answers

LUKS Error During Boot

alg: drbg: could not allocate DRNG handle for ... I only see this error on the console during the boot process of virtual machines we create. EDIT: 2/5/16 - I see it on some bare-metal installations, too. (It does proceed to boot completely.) I…
Aaron Copley
  • 12,525
  • 5
  • 47
  • 68
4
votes
1 answer

Nginx (openresty) generating random numbers

I have openresty set up on a server (nginx bundle which includes the lua module) and I'm trying to create a script which has specific odds of setting a cookie on a user's browser. My code looks like this: location =/index.php { set…
Mediocre Gopher
  • 803
  • 1
  • 13
  • 24
4
votes
9 answers

Random Number Generation

I have a need for true random number generation. I've been looking at a number of hardware solutions. Does anybody have any solid experiences with these? Any recommendations? I don't think I can make a convincing argument for a lava lamp hack. ;)
dr.pooter
  • 399
  • 5
  • 10
4
votes
1 answer

Debian 11 - Low entropy (256) even with Haveged and rng-tools on old laptop

I have a problem with an old laptop. I have installed a debian 11 operating system on it a year ago, and despite using it almost daily to perform network administration, I recently found its available entropy value is low, and don't seem to vary…
Stormrice
  • 63
  • 5
3
votes
3 answers

Munin "Available entropy" when using address space layout randomization

Having just configured Munin for statistics logging on my gentoo server (hardened profile), I am noticing that my "Available entropy" is consitently in the 200-300 range. This seems way to low, so I checked it manually using the command $ cat…
3
votes
2 answers

How to get enough entropy into Docker containers?

Whenever I cat /proc/sys/kernel/random/entropy_avail inside my Docker containers (Linux 5.10 based), I get a double-digit result, which is apparently laughably low. Supposedly anything below 4 digits is bad, and keeping it close to 4096 (the max) is…
Spiff
  • 2,578
  • 17
  • 20
2
votes
1 answer

AWS Linux Source Code?

We are looking for the source code for Amazon Web Services (AWS) AWS Linux kernel. This should be available under the GPL, but we can't find it, and our requests to Amazon have gone unanswered. Where can we find it? We don't want generic Linux…
vy32
  • 2,088
  • 2
  • 17
  • 21
2
votes
1 answer

Why can't I manually seed the FreeBSD random number generator?

Years ago, I could manually seed the random number generator in FreeBSD by setting: sysctl -w kern.random.sys.seeded=0 ... and then if I deleted my SSH keys (on purpose) and restarted sshd, I would be forced to mash my keyboard for a page or two in…
user227963
  • 209
  • 1
  • 2
  • 11
2
votes
1 answer

How EJBCA generate private key

I'm looking for the method used by EJBCA to generate the private keys in general (CA, Sub-Ca, certificates...). Let say for instance you want RSA 2048 key size. Is the generation process all done in EJBCA application ? Do they rely on Java EE-based…
Florent
  • 308
  • 2
  • 7
2
votes
1 answer

modprobe amd-rng fails, No such device

When trying to install hw_random to a 2.6 kernel, modprobe returns a FATAL error "No such device" on both CentOS 5.7 and Fedora 15. Both are using the latest kernel, respectively. The .ko file exists, and config- contains CONFIG_RTC=y and…
2
votes
3 answers

Feeding the kernels entropy source from other machines and/or increasing its maximum size

We have has a little trouble with a small box that acts as a VPN end-point and mail relay for our network, caused by the available entropy for /dev/random being too low (which causes TLS connection attempts by exim to fail). The machine doesn't do…
David Spillett
  • 22,754
  • 45
  • 67
2
votes
1 answer

Can SSL/TLS deplete the entropy pool of my server?

I tried to gain a bit of understanding about how SSL/TLS works and had a look at the TLS handshake in TLS 1.2 and TLS 1.3, and where random numbers from the server come into play there. Since every TLS requests will have a cost in terms of entropy,…
Max1
  • 123
  • 3
1
2