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
68
votes
6 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,143
  • 3
  • 12
  • 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,433
  • 29
  • 67
  • 95
12
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,330
  • 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,345
  • 5
  • 46
  • 67
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
  • 12
  • 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
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…
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,018
  • 1
  • 15
  • 20
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
  • 199
  • 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,534
  • 42
  • 66
1
vote
0 answers

Apache and htpasswd getting errors from random number generator

Recently (probably after yum update something), one of my CentOS7 server running Apache2.4.37 has started to produce the following errors. apachectl configtest (38)Function not implemented: AH00141: Could not initialize random number…
mmrn
  • 121
  • 4
1
vote
2 answers

How many bits of entropy per byte read from /dev/random and /dev/urandom?

Approximately how many bits of entropy are contained in each byte read from /dev/random and /dev/urandom? Data from /dev/random uses the kernel random-number generator while /dev/urandom uses a CPRNG so although the number of bytes read from each…
Monica For CEO
  • 320
  • 1
  • 17
1
vote
1 answer

Run 'rng-tools' in OpenVZ container

I have a problem with run 'rngd' inside OpenVZ container: root@server:~# rngd -r /dev/urandom unable to adjust write_wakeup_threshold: Permission denied Is it possible to run an application in another way? Thanks to all!
init0
  • 29
  • 4
1
2