Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     SEED(S)                   UNIX System V                   SEED(S)



     Name
          seed: getseed, setseed - obtain or set seed for random
          number generator

     Syntax
          #include <sys/types.h>
          #include <sys/macros.h>
          #include <sys/security.h>
          #include <sys/audit.h>
          #include <sys/param.h>
          #include <sys/filsys.h>
          #include <prot.h>

          long get_seed (prpwd)
          struct pr_passwd *prpwd;

          void set_seed (seed)
          long seed;

     Description
          These routines handle seed management for users of the
          random number generator used in the Authentication
          subsystem.  They exist to centralize control so that
          multiple seed algorithms can be handled together and so that
          different routines do not all set an initial seed (and so
          here it promotes the randomness desired).

          Get_seed uses an automatic seed generation algorithm to
          choose a value to return.  It currently does not use the
          argument, but to be compatible with more secure versions of
          the system, it should pass in the Protected Password of the
          user of interest.  If no user is relevant to setting the
          seed, prpwd should be NULL.

          Set_seed primes the program's random number generator (using
          drand48(S)) to the seed passed in.  The routine ignores all
          requests except the first one, so that the generator is not
          reset after its first invocation.

     Notes
          The drand48(S) routines used on an implementation should be
          tested to produce good uniformity, a long period, and a
          large name space.  Not all ports test for this, and poor
          performance translates into predictable results in such
          vital operations as password generation.

     See Also
          drand48(S)







                                             (printed 6/20/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026