lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110910011720.GA10111@khazad-dum.debian.net>
Date:	Fri, 9 Sep 2011 22:17:21 -0300
From:	Henrique de Moraes Holschuh <hmh@....eng.br>
To:	jyothi v <jyos.v.s@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: hw rng

On Fri, 09 Sep 2011, jyothi v wrote:
> Linux provides hardware random registry.
> I would like to know how is it useful.

You use something like this:
http://packages.debian.org/search?keywords=rng-tools

to deal with the entropy from the TRNG (/dev/hw_random) and feed it back to
the kernel, so that it becomes available to the rest of the system (the
kernel itself, and any normal randomness users that get it from /dev/random
and /dev/urandom).

Some hardware RNGs don't use /dev/hw_random, and require specific userspace
drivers instead of rng-tools.

> Is there any RNG system calls/APIs for generating random numbers at
> Linux user space?

There are some book-keeping ioctl() for /dev/random, which stuff like
rng-tools needs to use to feed entropy back to the kernel and to gauge the
amount of entropy the kernel has. 

But to _read_ random data, you just do direct reads from /dev/random or
/dev/urandom.

> If I need random data at user space application, what should I do?

Read it from /dev/urandom if your userspace application would rather receive
the output of a kernel-shielded CRNG when system entropy is low instead of
blocking.  Otherwise, read it from /dev/random, which will block when system
entropy is too low to service the read request.

And get something like this if you will need too much high-quality random
data, or will need high-quality random data from a system that doesn't have
much keyboard and disk activity: http://www.entropykey.co.uk/

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ