From: Paulo Marques <pmarques@grupopie.com>
To: Roberto Jung Drebes <drebes@inf.ufrgs.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Instantiating my own random number generator
Date: Wed, 12 Oct 2005 13:07:07 +0100 [thread overview]
Message-ID: <434CFC6B.6090605@grupopie.com> (raw)
In-Reply-To: <E90C20D8-AC5D-4E9E-A477-48164FA0E7EE@inf.ufrgs.br>
Roberto Jung Drebes wrote:
>
> Hi there,
Hi,
> I have a kernel module which asks for random numbers using
> get_random_bytes().
>
> Is there a way I can set this number generator my own seed value, so
> that I can replay experiments I perform with my module? If I set a seed
> for the whole system, it would affect other kernel tasks obtaining
> random numbers through get_random_bytes(), so I guess that is not a
> good solution.
Why don't you implement a simple PRNG in your own module that you can
control yourself for your experiments, and then replace it later with
get_random_bytes()?
There are a number of PRNG's that are simple to implement and good
enough for most problems:
http://en.wikipedia.org/wiki/List_of_pseudorandom_number_generators
I hope this helps,
--
Paulo Marques - www.grupopie.com
The rule is perfect: in all matters of opinion our
adversaries are insane.
Mark Twain
prev parent reply other threads:[~2005-10-12 12:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-11 20:46 Instantiating my own random number generator Roberto Jung Drebes
2005-10-12 1:08 ` Horst von Brand
2005-10-12 8:57 ` Hagen Paul Pfeifer
2005-10-12 12:33 ` linux-os (Dick Johnson)
2005-10-12 12:07 ` Paulo Marques [this message]
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=434CFC6B.6090605@grupopie.com \
--to=pmarques@grupopie.com \
--cc=drebes@inf.ufrgs.br \
--cc=linux-kernel@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