linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: HIToC <hitoc_mail@yahoo.it>
To: Steve Graegert <graegerts@gmail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: How to use /dev/random
Date: Fri, 23 Sep 2005 11:16:54 +0200	[thread overview]
Message-ID: <200509231111.39157.hitoc_mail@yahoo.it> (raw)
In-Reply-To: <6a00c8d5050922025348a449a5@mail.gmail.com>

On Thursday 22 September 2005 11:53, Steve Graegert wrote:
> You can also read a number of random bytes from /dev/(u)random with dd:
>
>         dd if=/dev/urandom of=/tmp/randnums bs=1 count=500
>
> This reads a sequence of 500 bytes from /dev/urandom and writes them
> to /tmp/randnums.

I have read that the problem of /dev/random is mainly on boot, when there
are few iteration from the user. For this reason is useful first save on a
temporary_random file a 512 bytes block on shutdown of the system.
Then on the new booting, to put the 512 bytes saved on the
temporary_random file in the /dev/random device.
With this procedure we have the random device ready
afterwards boot.

I have two questions:
1) the size of /dev/random is 512 bytes, or the number of bytes
	increase over the new iteration of the user (like mouse clicks,
	key strokes, ecc..)?
2) Where can I put the scripts to read the random number on shutdown
	or to write the previously saved bytes, on boot?


Thanks for every suggestion.
HIToC

-- 
With regards,


					HIToC
					hitoc_mail@yahoo.it

  reply	other threads:[~2005-09-23  9:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22  9:11 How to use /dev/random HIToC
2005-09-22  9:42 ` Hagen Paul Pfeifer
2005-09-22  9:53 ` Steve Graegert
2005-09-23  9:16   ` HIToC [this message]
2005-09-23 15:44     ` Glynn Clements
2005-09-23 16:31       ` HIToC

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200509231111.39157.hitoc_mail@yahoo.it \
    --to=hitoc_mail@yahoo.it \
    --cc=graegerts@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).