[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #767: random seed should be more random

From: Chicken Trac
Subject: Re: [Chicken-janitors] #767: random seed should be more random
Date: Fri, 30 Dec 2011 04:42:05 -0000

#767: random seed should be more random
  Reporter:  zbigniew           |       Owner:          
      Type:  enhancement        |      Status:  assigned
  Priority:  not urgent at all  |   Milestone:          
 Component:  core libraries     |     Version:  4.7.x   
Resolution:                     |    Keywords:          
Changes (by zbigniew):

  * owner:  zbigniew =>
  * priority:  major => not urgent at all
  * type:  defect => enhancement
  * status:  new => assigned
  * milestone:  4.8.0 =>


 I guess it is not trivial, the core would not support it without some
 disruptive changes, i.e. risking compilation failures on unusual

 1) gettimeofday is not available in core on non-UNIX platforms, even
 though it is available in both mingw and cygwin themselves.  Maybe that is
 2) getpid is available on unix and windows but perhaps not elsewhere?

 In short, there's no easy way to get the process pid or the usec since
 epoch at initialization time from runtime.c.

 With regard to Peter's hash table security patch, which was the impetus
 for this ticket -- as it requires a random fixnum when SRFI-69 is loaded
 --, an ugly workaround should be to use the randomization key in make-
 hash-table, as in

 (use random-bsd)
 (make-hash-table eq? hash size randomization: (random-fixnum 536870912))

 {{{random-bsd}}} only seeds its own generator, not the system one, so
 unfortunately you can't just load it and affect the random sequence
 generated by the core RNG.

 I'll leave this open, but at the lowest possible priority.

Ticket URL: <>
Chicken Scheme <>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]