From: "Darío Mariani" <mariani.dario@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-c-programming@vger.kernel.org
Subject: Re: Random number generator in Linux kernel
Date: Tue, 8 Mar 2005 09:59:08 -0300 [thread overview]
Message-ID: <84bd26ef050308045943a1659b@mail.gmail.com> (raw)
In-Reply-To: <20050307231853.9F661B6E7@xprdmailfe20.nwk.excite.com>
As far as I understand the kernel generates random numbers gathering
data from several entropy sources, you will never get repetability
from there. Two options I know of:
1) The standard C library has the functions rand and random, wich
seems to have a decent distribution of the random numbers.
2) If you use C++, the Boost library (www.boost.org) has an excelent
set of options for generating random numbers.
Darío
On Mon, 7 Mar 2005 18:18:53 -0500 (EST), Vineet Joglekar
<vintya@excite.com> wrote:
>
> Hi all,
>
> Can someone please tell me where can I find and which random/pseudo-random number generator can I use inside the linux kernel? (2.4.28)
>
> I found out 1 function get_random_bytes() in linux/drivers/char/random.c but thats not what I want.
>
> I want a function where I will be supplying a seed to that function as an input, and will get a random number back. If same seed is used, same number should be generated again.
>
> Can anybody please help me with that?
>
> Thanks and regards,
>
> Vineet.
>
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
That is not dead which can eternal lie,
and with strange aeons, even death may die.
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2005-03-08 12:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-07 23:18 Random number generator in Linux kernel Vineet Joglekar
2005-03-08 0:25 ` J.
2005-03-08 4:40 ` Anindya Mozumdar
2005-03-08 12:59 ` Darío Mariani [this message]
2005-03-08 13:31 ` Erik Mouw
2005-03-09 20:39 ` Bill Davidsen
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=84bd26ef050308045943a1659b@mail.gmail.com \
--to=mariani.dario@gmail.com \
--cc=linux-c-programming@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).