From: Michael Walle <michael@walle.cc>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/3] lib: add rand() function
Date: Fri, 11 May 2012 23:34:18 +0200 [thread overview]
Message-ID: <201205112334.19132.michael@walle.cc> (raw)
In-Reply-To: <20120511212947.061A5206496@gemini.denx.de>
Am Freitag 11 Mai 2012, 23:29:47 schrieb Wolfgang Denk:
> Dear Michael Walle,
>
> In message <201205112320.15462.michael@walle.cc> you wrote:
> > > This is inconsequent. Either we assume that the user will seed
> > > srand(), then y should not be initialized at all, so it goes to the
> > > BSS segment and does not waste space in the binary image. Or we want
> > > to deal with cases where the user doesn call srand(), and then we
> > > should provide a bit better than such a static initialization.
> >
> > Again, i wanted to stick with the regular rand() srand() semantics.
> >
> > http://pubs.opengroup.org/onlinepubs/009695399/functions/rand.html
> > "If rand() is called before any calls to srand() are made, the same
> > sequence shall be generated as when srand() is first called with a seed
> > value of 1."
>
> Good point.
>
> But then y should be initialized as 1 ?
I'm no crypto expert, so i sticked with the values/examples from the cited
paper. But i guess it shouldn't make any difference, i'll change it to 1.
--
michael
next prev parent reply other threads:[~2012-05-11 21:34 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 17:32 [U-Boot] [PATCH v4 0/3] net: helper functions Michael Walle
2012-05-10 17:32 ` [U-Boot] [PATCH v4 1/3] lib: add rand() function Michael Walle
2012-05-11 19:20 ` Wolfgang Denk
2012-05-11 20:32 ` Michael Walle
2012-05-11 20:43 ` Wolfgang Denk
[not found] ` <201205112249.27871.michael@walle.cc>
2012-05-11 21:11 ` Wolfgang Denk
2012-05-11 21:20 ` Michael Walle
2012-05-11 21:29 ` Wolfgang Denk
2012-05-11 21:34 ` Michael Walle [this message]
2012-05-10 17:32 ` [U-Boot] [PATCH v4 2/3] net: add helper to generate random mac address Michael Walle
2012-05-11 19:21 ` Wolfgang Denk
2012-05-14 5:43 ` Mike Frysinger
2012-05-10 17:32 ` [U-Boot] [PATCH v4 3/3] net: add eth_setenv_enetaddr_by_index() Michael Walle
2012-05-11 19:25 ` Wolfgang Denk
2012-05-11 21:01 ` Michael Walle
2012-05-11 21:16 ` Wolfgang Denk
2012-05-11 22:12 ` Michael Walle
2012-05-11 16:32 ` [U-Boot] [PATCH v4 0/3] net: helper functions Michael Walle
2012-05-11 16:46 ` Joe Hershberger
2012-05-11 16:51 ` Prafulla Wadaskar
2012-05-21 20:52 ` Michael Walle
2012-05-11 19:18 ` Wolfgang Denk
2012-05-11 20:29 ` Michael Walle
2012-05-11 20:43 ` Wolfgang Denk
2012-05-11 20:54 ` Michael Walle
2012-05-11 21:14 ` Wolfgang Denk
2012-05-11 21:22 ` Michael Walle
2012-05-11 21:30 ` Wolfgang Denk
2012-05-11 21:42 ` Michael Walle
2012-05-11 21:55 ` Wolfgang Denk
2012-05-14 5:42 ` Mike Frysinger
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=201205112334.19132.michael@walle.cc \
--to=michael@walle.cc \
--cc=u-boot@lists.denx.de \
/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