NAME
    Math::Random::ISAAC::XS - C implementation of the ISAAC PRNG Algorithm

$Id: README 6040 2009-04-07 00:25:30Z FREQUENCY@cpan.org $

DESCRIPTION
    As with other Pseudo-Random Number Generator (PRNG) algorithms like the
    Mersenne Twister (see Math::Random::MT), this algorithm is designed to
    take some seed information and produce seemingly random results as
    output.

    However, ISAAC (Indirection, Shift, Accumulate, Add, and Count) has
    different goals than these commonly used algorithms. In particular, it's
    really fast - on average, it requires only 18.75 machine cycles to
    generate a 32-bit value. This makes it suitable for applications where a
    significant amount of random data needs to be produced quickly, such
    solving using the Monte Carlo method or for games.

    The results are uniformly distributed, unbiased, and unpredictable
    unless you know the seed. The algorithm was published by Bob Jenkins in
    the late 90s and despite the best efforts of many security researchers,
    no feasible attacks have been found to date.

SYNOPSIS
      use Math::Random::ISAAC::XS;

      my $rng = Math::Random::ISAAC::XS->new(@seeds);

      for (0..30) {
        print 'Result: ' . $rng->irand() . "\n";
      }

PURPOSE
    This module implements the same interface as C<Math::Random::ISAAC> and
    can be used as a drop-in replacement. This is the recommended
    implementation of the module, based on Bob Jenkins' reference
    implementation in C.

    Selecting the backend to use manually really only has two uses:
    *   If you are trying to avoid the small overhead incurred with
        dispatching method calls to the appropriate backend modules.

    *   If you are testing the module for performance and wish to explicitly
        decide which module you would like to use.

COMPATIBILITY
    This module was tested under Perl 5.10.0, using Debian Linux. Because it
    is C and XS, there may be portability problems, but hopefully these will
    be fixed over the next few releases as CPAN Testers reports come in.

    The author is not a C expert, but has tried to write the module as
    portably as possible. If you encounter any problems on a different version
    or architecture, please contact the maintainer.

AUTHOR
    Jonathan Yu <frequency@cpan.org>

ACKNOWLEDGEMENTS
    *   Special thanks to Bob Jenkins <bob_jenkins@burtleburtle.net> for
        devising this very clever algorithm and releasing it into the public
        domain.

SUPPORT
    You can find documentation for this module with the perldoc command.

        perldoc Math::Random::ISAAC::XS

    You can also look for information at:

    *   AnnoCPAN: Annotated CPAN documentation

        <http://annocpan.org/dist/Math-Random-ISAAC-XS>

    *   CPAN Ratings

        <http://cpanratings.perl.org/d/Math-Random-ISAAC-XS>

    *   Search CPAN

        <http://search.cpan.org/dist/Math-Random-ISAAC-XS>

    *   CPAN Request Tracker

        <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Math-Random-ISAAC>

    *   CPAN Testing Service (Kwalitee Tests)

        <http://cpants.perl.org/dist/overview/Math-Random-ISAAC-XS>

    *   CPAN Testers Platform Compatibility Matrix

        <http://www.cpantesters.org/show/Math-Random-ISAAC-XS.html>

REPOSITORY

    You can access the most recent development version of this module at:

    L<http://svn.ali.as/cpan/trunk/Math-Random-ISAAC-XS>

    If you are a CPAN developer and would like to make modifications to the
    code base, please contact Adam Kennedy <adamk@cpan.org>, the repository
    administrator. I only ask that you contact me first to discuss the
    changes you wish to make to the distribution.

FEEDBACK
    Please send relevant comments, rotten tomatoes and suggestions directly
    to the maintainer noted above.

    If you have a bug report or feature request, please file them on the
    CPAN Request Tracker at <http://rt.cpan.org>. If you are able to submit
    your bug report in the form of failing unit tests, you are strongly
    encouraged to do so. Regular bug reports are always accepted and
    appreciated via the CPAN bug tracker.

SEE ALSO
    Math::Random::ISAAC::XS, the C/XS optimized version of this module,
    which will be used automatically if available.

    <http://burtleburtle.net/bob/rand/isaacafa.html>, Bob Jenkins' page
    about ISAAC, which explains the algorithm as well as potential attacks.

CAVEATS
  KNOWN BUGS
    There are no known bugs as of this release.

  LIMITATIONS
    *   There is no method that allows re-seeding of algorithms. This is not
        really necessary because one can simply call "new" again with the
        new seed data periodically.

    *   There was no method supplied to provide the initial seed data. On
        his web site, Bob Jenkins writes:

          Seeding a random number generator is essentially the same problem as
          encrypting the seed with a block cipher.

        But he also provides a simple workaround:

          As ISAAC is intended to be a secure cipher, if you want to reseed
          it, one way is to use some other cipher to seed some initial version
          of ISAAC, then use ISAAC's output as a seed for other instances of
          ISAAC whenever they need to be reseeded.

    *   There is no way to clone a PRNG instance. I'm not sure why this is
        might even be necessary or useful. File a bug report with an
        explanation why and I'll consider adding it to the next release.

LICENSE
    Copyleft 2009 by Jonathan Yu <frequency@cpan.org>. All rights reversed.

    I, the copyright holder of this package, hereby release the entire
    contents therein into the public domain. This applies worldwide, to the
    extent that it is permissible by law.

    In case this is not legally possible, I grant any entity the right to
    use this work for any purpose, without any conditions, unless such
    conditions are required by law.

    The full details of this can be found in the LICENSE file included in
    this package.

DISCLAIMER OF WARRANTY
    The software is provided "AS IS", without warranty of any kind, express
    or implied, including but not limited to the warranties of
    merchantability, fitness for a particular purpose and noninfringement.
    In no event shall the authors or copyright holders be liable for any
    claim, damages or other liability, whether in an action of contract,
    tort or otherwise, arising from, out of or in connection with the
    software or the use or other dealings in the software.
