Anybody know anything about random number generation? - Ubuntu

This is a discussion on Anybody know anything about random number generation? - Ubuntu ; In article , Todd wrote: >I think Ubuntu (maybe Linux in general) uses the same random number >generator scheme as Windows XP. > >When I first discovered that Windows (98/ME) Spider had a single suit >mode, I could win almost ...

+ Reply to Thread
Results 1 to 17 of 17

Thread: Anybody know anything about random number generation?

  1. Re: Anybody know anything about random number generation?

    In article , Todd wrote:
    >I think Ubuntu (maybe Linux in general) uses the same random number
    >generator scheme as Windows XP.
    >
    >When I first discovered that Windows (98/ME) Spider had a single suit
    >mode, I could win almost every game played. But then, along came XP,
    >and somehow I became lucky to win one in ten. I also noticed that the
    >number of games in Taipei (MS's mahjongg) had gone up at least several
    >thousand.
    >
    >In Ubuntu's (maybe I should say Gnome's) solitaire, you can also play
    >single suited Spider. The game generally plays just as bad as the XP
    >version.
    >
    >Oh, I'm old enough to have programmed BASIC on an Apple ][. I was
    >creating this text adventure game, where the player and his/her
    >friends were agents of the world government. After entering the names
    >of the player and his/her friends, the program would generate random
    >numbers that were used as id codes. Every time I ran through it,
    >using the same names, it would generate the exact same numbers.


    IIRC, way back then computers used psuedo random numbers. You had to give it
    a seed. Same seed, same random numbers. If you used the names to generate
    your seed ...




  2. Anybody know anything about random number generation?

    I think Ubuntu (maybe Linux in general) uses the same random number
    generator scheme as Windows XP.

    When I first discovered that Windows (98/ME) Spider had a single suit
    mode, I could win almost every game played. But then, along came XP,
    and somehow I became lucky to win one in ten. I also noticed that the
    number of games in Taipei (MS's mahjongg) had gone up at least several
    thousand.

    In Ubuntu's (maybe I should say Gnome's) solitaire, you can also play
    single suited Spider. The game generally plays just as bad as the XP
    version.

    Oh, I'm old enough to have programmed BASIC on an Apple ][. I was
    creating this text adventure game, where the player and his/her
    friends were agents of the world government. After entering the names
    of the player and his/her friends, the program would generate random
    numbers that were used as id codes. Every time I ran through it,
    using the same names, it would generate the exact same numbers.




  3. Re: Anybody know anything about random number generation?

    Todd wrote:
    Subject: Anybody know anything about random number generation?

    I think most computational systems use some kind of pseudo random number
    generator which is imperfectly random.

    I don't know anything about what kinds of PRNG might be employed in any
    kinds of solitaire including spider.

    It is a lot of trouble to try to approximate 'true' randomness with a
    prng, but I think it is generally pretty easy to be 'random enough' for
    many tasks.


    --
    Mike Easter


  4. Re: Anybody know anything about random number generation?

    Todd wrote:
    > I think Ubuntu (maybe Linux in general) uses the same random number
    > generator scheme as Windows XP.


    man random

    HTH,
    Niklaus

  5. Re: Anybody know anything about random number generation?



    "Bruce Sinclair" wrote
    in message news:g6jlrc$o05$1@aioe.org...


    > IIRC, way back then computers used psuedo random numbers. You had to give
    > it
    > a seed. Same seed, same random numbers. If you used the names to generate
    > your seed ...
    >
    >
    >


    They still do use pseudo random numbers.. there isn't any hardware to
    generate real random numbers in most PCs.
    This is why the ubuntu key problem occurred.. its very hard (impossible!) to
    generate random numbers in software (been there, done that, 30 years ago).


  6. Re: Anybody know anything about random number generation?

    dennis@home wrote:

    >
    >
    > "Bruce Sinclair" wrote
    > in message news:g6jlrc$o05$1@aioe.org...
    >
    >
    >> IIRC, way back then computers used psuedo random numbers. You had to give
    >> it
    >> a seed. Same seed, same random numbers. If you used the names to generate
    >> your seed ...
    >>
    >>
    >>

    >
    > They still do use pseudo random numbers.. there isn't any hardware to
    > generate real random numbers in most PCs.
    > This is why the ubuntu key problem occurred.. its very hard (impossible!)
    > to generate random numbers in software (been there, done that, 30 years
    > ago).


    We used to garb the time and use the low order bits of the seconds as a
    seed. It was pretty random, up to a point.

    --
    Peace,
    Fred
    (Remove FFFf from my email address to reply by email).

  7. Re: Anybody know anything about random number generation?

    On Sun, 27 Jul 2008 22:26:06 -0700, Todd wrote:

    > I think Ubuntu (maybe Linux in general) uses the same random number
    > generator scheme as Windows XP.
    >
    > When I first discovered that Windows (98/ME) Spider had a single suit
    > mode, I could win almost every game played. But then, along came XP,
    > and somehow I became lucky to win one in ten. I also noticed that the
    > number of games in Taipei (MS's mahjongg) had gone up at least several
    > thousand.
    >
    > In Ubuntu's (maybe I should say Gnome's) solitaire, you can also play
    > single suited Spider. The game generally plays just as bad as the XP
    > version.
    >
    > Oh, I'm old enough to have programmed BASIC on an Apple ][. I was
    > creating this text adventure game, where the player and his/her friends
    > were agents of the world government. After entering the names of the
    > player and his/her friends, the program would generate random numbers
    > that were used as id codes. Every time I ran through it, using the same
    > names, it would generate the exact same numbers.


    Software only generates 'pseudo' random numbers. Same seed; same sequence.
    VIA have a hardware generated random number facility on most of their mini-
    itx boards (and some others, as well, I believe).

  8. Re: Anybody know anything about random number generation?

    ray wrote:

    > Software only generates 'pseudo' random numbers. Same seed; same
    > sequence. VIA have a hardware generated random number facility on most
    > of their mini- itx boards (and some others, as well, I believe).


    Via provides some interesting information and links on their webpage about
    that. Snippages from various pieces and parts there are below here. I
    liked the whitepaper from Cryptography Research which analyzed the
    mechanism and its degree of entropy.


    http://www.via.com.tw/en/initiatives...k/hardware.jsp - VIA PadLock
    Security Engine

    Please click on the following features to find out more about security
    requirements and VIA's approach to meeting these challenges:
    Random Number Generation
    AES Encryption
    RSA Algorithms & the Montgomery Multiplier
    Secure Hash Algorithms
    NX Execute Protection

    To download a detailed guide to the VIA C5J PadLock Security Engine,
    please click here.
    http://www.via.com.tw/en/downloads/w...adlock/securit
    y_application_note.pdf


    http://www.via.com.tw/en/downloads/w...adlock/evaluat
    ion_padlock_rng.pdf
    Cryptography Research has evaluated the C3 Nehemiah random number
    generator, which is an on-chip component of the VIA Technologies Nehemiah
    processor core. When properly used, the generator was found to be a
    consistent, high-rate source of entropy which we believe is suitable for
    use in cryptographic and high-assurance applications. This report
    analyzes the Nehemiah RNG design, provides an entropy analysis of the
    source, and provides developer recommendations for proper use of the
    Nehemiah RNG. Cryptography Research provided no Nehemiah design
    assistance to VIA Technologies or Centaur Technology. Last Revision:
    February 27, 2003




    --
    Mike Easter


  9. Re: Anybody know anything about random number generation?

    Mike Easter wrote:
    > Todd wrote:
    > Subject: Anybody know anything about random number generation?
    >
    > I think most computational systems use some kind of pseudo random number
    > generator which is imperfectly random.
    >
    > I don't know anything about what kinds of PRNG might be employed in any
    > kinds of solitaire including spider.
    >
    > It is a lot of trouble to try to approximate 'true' randomness with a
    > prng, but I think it is generally pretty easy to be 'random enough' for
    > many tasks.
    >
    >
    > --
    > Mike Easter
    >
    >

    I going to hit this with a far out in left field kind of response.
    Start a seed number with the time of day and add in some totally
    abstract thing like the temperature outside and the instantaneous wind
    speed or something completely beyond the computer's control, or even the
    RPM of your CPU fan. It might take some creativity, but, hey, you guys
    are up to it, right?
    Bill (outside what box?) Baka

  10. Re: Anybody know anything about random number generation?

    In article <004c29ff$0$32069$c3e8da3@news.astraweb.com>,
    "dennis@home" wrote:
    > They still do use pseudo random numbers.. there isn't any hardware to
    > generate real random numbers in most PCs.
    > This is why the ubuntu key problem occurred.. its very hard (impossible!) to
    > generate random numbers in software (been there, done that, 30 years ago).


    However, modern computers aren't all software. They do contain sources
    of entropy. It is possible to make a random number generator that uses
    that entropy. One such is the Yarrow generator, developed by Bruce
    Schneier, John Kelsey, and Niels Ferguson. An improved version, by
    Bruce Schneier and Niels Ferguson, called Fortuna, was later developed.

    As long as you have some entropy, and an attacker cannot get control of
    all your entropy sources, you can use cryptographic techniques to extend
    that to a very large amount of psuedo random data that is good enough
    for all practical purposed, include cryptographic keying.

    Linux uses a similar technique, which you can access by reading
    /dev/urandom. FreeBSD and OS X use Yarrow.

    There were patches submitted for Linux a few years ago to make it use
    Fortuna, but for mystical reasons, they were rejected. (The patch made
    /dev/random and /dev/urandom be the same thing, but some people have
    this mystical belief that they really need "true random" numbers, as
    opposed to cryptographically secure pseudo random numbers, so the patch
    was rejected) (On *BSD and OS X, /dev/random is the same as
    /dev/urandom, and the latter only exists for convenience when running
    software ported from Linux).


    --
    --Tim Smith

  11. Re: Anybody know anything about random number generation?

    Bruce Sinclair wrote:

    >
    > IIRC, way back then computers used psuedo random numbers.


    AFAIK, they still do :-). Kinda' hard to get true randomness from a
    deterministic machine.

  12. Re: Anybody know anything about random number generation?

    In article , fred@fredwilliamsFFFf.ca wrote:
    >dennis@home wrote:
    >> "Bruce Sinclair" wrote
    >> in message news:g6jlrc$o05$1@aioe.org...


    >>> IIRC, way back then computers used psuedo random numbers. You had to give
    >>> it
    >>> a seed. Same seed, same random numbers. If you used the names to generate
    >>> your seed ...

    >>
    >> They still do use pseudo random numbers.. there isn't any hardware to
    >> generate real random numbers in most PCs.
    >> This is why the ubuntu key problem occurred.. its very hard (impossible!)
    >> to generate random numbers in software (been there, done that, 30 years
    >> ago).

    >
    > We used to garb the time and use the low order bits of the seconds as a
    >seed. It was pretty random, up to a point.


    Yeah. The question should really be something like ... is it random enough ?
    ... or maybe ... how random do you need it to be ?





  13. Re: Anybody know anything about random number generation?

    In article , Larry Blanchard wrote:
    >Bruce Sinclair wrote:
    >
    >>
    >> IIRC, way back then computers used psuedo random numbers.

    >
    >AFAIK, they still do :-). Kinda' hard to get true randomness from a
    >deterministic machine.


    Agreed ... but as has been suggested here, it's got a lot better with a bit
    of hardware thrown in, rather than just taking the 'seed' register as a
    start

  14. Re: Anybody know anything about random number generation?



    "larrys707" wrote in message
    news:jVmjk.6784$cn7.682@flpi145.ffdc.sbc.com...
    > Mike Easter wrote:
    >> Todd wrote:
    >> Subject: Anybody know anything about random number generation?
    >>
    >> I think most computational systems use some kind of pseudo random number
    >> generator which is imperfectly random.
    >>
    >> I don't know anything about what kinds of PRNG might be employed in any
    >> kinds of solitaire including spider.
    >>
    >> It is a lot of trouble to try to approximate 'true' randomness with a
    >> prng, but I think it is generally pretty easy to be 'random enough' for
    >> many tasks.
    >>
    >>
    >> --
    >> Mike Easter
    >>
    >>

    > I going to hit this with a far out in left field kind of response.
    > Start a seed number with the time of day and add in some totally
    > abstract thing like the temperature outside and the instantaneous wind
    > speed or something completely beyond the computer's control, or even the
    > RPM of your CPU fan. It might take some creativity, but, hey, you guys
    > are up to it, right?
    > Bill (outside what box?) Baka


    That still gives a pseudo random sequence and not a random one.
    If you put the same seed in you get the same series.


  15. Re: Anybody know anything about random number generation?

    Bruce Sinclair wrote:
    > In article , fred@fredwilliamsFFFf.ca wrote:
    >> dennis@home wrote:
    >>> "Bruce Sinclair" wrote
    >>> in message news:g6jlrc$o05$1@aioe.org...

    >
    >>>> IIRC, way back then computers used psuedo random numbers. You had to give
    >>>> it
    >>>> a seed. Same seed, same random numbers. If you used the names to generate
    >>>> your seed ...
    >>> They still do use pseudo random numbers.. there isn't any hardware to
    >>> generate real random numbers in most PCs.
    >>> This is why the ubuntu key problem occurred.. its very hard (impossible!)
    >>> to generate random numbers in software (been there, done that, 30 years
    >>> ago).

    >> We used to garb the time and use the low order bits of the seconds as a
    >> seed. It was pretty random, up to a point.

    >
    > Yeah. The question should really be something like ... is it random enough ?
    > .. or maybe ... how random do you need it to be ?


    I may sound nitpicking, but you'd have to define a measure for
    randomness for that.
    Besides: a truly random sequence will, at some point in eternity, have a
    consecutive series of any number of identical values, so a sequence of
    100 zeroes would definitely have to pass a test for true randomness ;-)

    --
    These are my personal views and not those of Fujitsu Siemens Computers!
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize (T. Pratchett)
    Company Details: http://www.fujitsu-siemens.com/imprint.html

  16. Re: Anybody know anything about random number generation?

    dennis@home wrote:
    >
    >
    > "larrys707" wrote in message
    > news:jVmjk.6784$cn7.682@flpi145.ffdc.sbc.com...
    >> Mike Easter wrote:
    >>> Todd wrote:
    >>> Subject: Anybody know anything about random number generation?
    >>>
    >>> I think most computational systems use some kind of pseudo random
    >>> number
    >>> generator which is imperfectly random.
    >>>
    >>> I don't know anything about what kinds of PRNG might be employed in any
    >>> kinds of solitaire including spider.
    >>>
    >>> It is a lot of trouble to try to approximate 'true' randomness with a
    >>> prng, but I think it is generally pretty easy to be 'random enough' for
    >>> many tasks.
    >>>
    >>>
    >>> --
    >>> Mike Easter
    >>>
    >>>

    >> I going to hit this with a far out in left field kind of response.
    >> Start a seed number with the time of day and add in some totally
    >> abstract thing like the temperature outside and the instantaneous wind
    >> speed or something completely beyond the computer's control, or even the
    >> RPM of your CPU fan. It might take some creativity, but, hey, you guys
    >> are up to it, right?
    >> Bill (outside what box?) Baka

    >
    > That still gives a pseudo random sequence and not a random one.
    > If you put the same seed in you get the same series.

    Only if you are seeding between gusts, if you have a little wireless, or
    wired mini weather station.
    I built one once and if you want to take a little program effort take a
    sample every 10 microseconds for a minute and have the answer in 10
    decimal place floating point. You can then shift it left until it
    becomes the something you can use. You will get randomness guaranteed.
    You might get hung up on analyzing it and find the the temp changes from
    ..0001 degree to 5 degrees per minute.
    Analog hardware guy here, and master of the silly project.
    Bill Baka

  17. Re: Anybody know anything about random number generation?

    In article , Josef Moellers wrote:
    >Bruce Sinclair wrote:
    >> In article , fred@fredwilliamsFFFf.ca

    > wrote:
    >>> dennis@home wrote:
    >>>> "Bruce Sinclair" wrote
    >>>> in message news:g6jlrc$o05$1@aioe.org...

    >>
    >>>>> IIRC, way back then computers used psuedo random numbers. You had to give
    >>>>> it
    >>>>> a seed. Same seed, same random numbers. If you used the names to generate
    >>>>> your seed ...
    >>>> They still do use pseudo random numbers.. there isn't any hardware to
    >>>> generate real random numbers in most PCs.
    >>>> This is why the ubuntu key problem occurred.. its very hard (impossible!)
    >>>> to generate random numbers in software (been there, done that, 30 years
    >>>> ago).
    >>> We used to garb the time and use the low order bits of the seconds as

    > a
    >>> seed. It was pretty random, up to a point.

    >>
    >> Yeah. The question should really be something like ... is it random enough ?
    >> .. or maybe ... how random do you need it to be ?

    >
    >I may sound nitpicking, but you'd have to define a measure for
    >randomness for that.
    >Besides: a truly random sequence will, at some point in eternity, have a
    >consecutive series of any number of identical values, so a sequence of
    >100 zeroes would definitely have to pass a test for true randomness ;-)


    Nope, not nitpicking at all. It's part of the question/answer.
    First set your requirements, then measure what you are getting against them.
    And yes, you are right about the hundred zeros.

    There is an appocraphyl (sp ?) story about students set homework to either
    toss a coin 200 times and report the results, or just make up the results.
    The teacher was (usually) able to separate the class into who had done which
    by (IIRC) putting those with 6 or more results the same (H or T) in a row
    into the 'did it' category and the others into the 'made it up' one.
    The theory goes something like ... while we might know that 6 in a row is
    likely or at least possible, it's really hard to make up data that obviously
    'skewed'. I guess that's related to forensic accounting and the difficulty
    of making up believeable numbers.

    Note ... I'm *NOT* looking for any 'that doesn't make sense because if you
    toss a coin ... ' responses here. It's a story I heard, am recalling (more
    or less well), and have no interest in the reality or otherwise of.





+ Reply to Thread