Главная страница


ru.algorithms

 
 - RU.ALGORITHMS ----------------------------------------------------------------
 From : Valentin Davydov                     2:5020/400     12 Dec 2002  17:55:28
 To : Artur Mogozov
 Subject : Re: Случайные числа
 -------------------------------------------------------------------------------- 
 
 >   From: Artur Mogozov <Artur.Mogozov@p6.f7.n5002.z2.fidonet.org>
 >   Date: Wed, 11 Dec 2002 16:46:46 +0300
 >
 >Всем известно, что в системах программирования генераторы случайных чисел не
 >совершенны (генерится на основе системного времени). Есть ли алгоритм генерации
 >*очень* случайного числа, а не псевдо-случайного?
 
 man 4 random
 
    Theory of operation
 
      Computers are very predictable devices.  Hence it is extremely hard to
      produce truly random numbers on a computer -- as opposed to pseudo-random
      numbers, which can easily generated by using a algorithm.  Unfortunately,
      it is very easy for attackers to guess the sequence of pseudo-random num-
      ber generators, and for some applications this is not acceptable.  So in-
      stead, we must try to gather "environmental noise" from the computer's
      environment, which must be hard for outside attackers to observe, and use
      that to generate random numbers.  In a Unix environment, this is best
      done from inside the kernel.
 
      Sources of randomness from the environment include inter-keyboard tim-
      ings, inter-interrupt timings from some interrupts, and other events
      which are both (a) non-deterministic and (b) hard for an outside observer
      to measure.  Randomness from these sources are added to an "entropy
      pool", which is periodically mixed using the MD5 compression function in
      CBC mode.  As random bytes are mixed into the entropy pool, the routines
      keep an estimate of how many bits of randomness have been stored into the
      random number generator's internal state.
 
      When random bytes are desired, they are obtained by taking the MD5 hash
      of a counter plus the contents of the "entropy pool".  The reason for the
      MD5 hash is so that we can avoid exposing the internal state of random
      number generator.  Although the MD5 hash does protect the pool, each ran-
      dom byte which is generated from the pool reveals some information which
      was derived from the internal state, and thus increases the amount of in-
      formation an outside attacker has available to try to make some guesses
      about the random number generator's internal state.  For this reason, the
      routine decreases its internal estimate of how many bits of "true random-
      ness" are contained in the entropy pool as it outputs random numbers.
 
      If this estimate goes to zero, the routine can still generate random num-
      bers; however it may now be possible for an attacker to analyze the out-
      put of the random number generator, and the MD5 algorithm, and thus have
      some success in guessing the output of the routine.  Phil Karn (who de-
      vised this mechanism of using MD5 plus a counter to extract random num-
      bers from an entropy pool) calls this "practical randomness", since in
      the worse case this is equivalent to hashing MD5 with a counter and an
      undisclosed secret.  If MD5 is a strong cryptographic hash, this should
      be fairly resistant to attack.
 
 Вал. Дав.
 --- ifmail v.2.15dev5
  * Origin: St. Petersburg State University (2:5020/400)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Случайные числа   Artur Mogozov   11 Dec 2002 17:46:46 
 Случайные числа   Sergey Mudry   11 Dec 2002 20:42:04 
 Re: Случайные числа   Andrew Starsh   14 Dec 2002 13:43:26 
 Случайные числа   Sasha Pelepeichenko   13 Dec 2002 19:25:28 
 Случайные числа   Andrey Dashkovsky   16 Dec 2002 00:07:53 
 Re: Случайные числа   Valentin Davydov   12 Dec 2002 17:55:28 
 Re: Случайные числа   Dmitriy Krylov   15 Dec 2002 03:50:09 
 Случайные числа   Roman Kukushkin   11 Dec 2002 20:13:39 
 Случайные числа   Daniel Kamperov   12 Dec 2002 22:12:16 
 Случайные числа   Sergei Frolov   14 Dec 2002 10:31:00 
 Случайные числа   Serge Petruschenko   15 Dec 2002 16:16:40 
 Re: Случайные числа   Sergey Andrianov   15 Dec 2002 23:18:02 
 Re: Слyчайные числа   Sergey Bychkov   04 Jan 2003 12:31:21 
 Re: Случайные числа   Andrew Starsh   14 Dec 2002 13:57:45 
 Re: Случайные числа   Evgenij Masherov   14 Dec 2002 19:54:05 
 Re: Случайные числа   Viktor Karev   15 Dec 2002 12:09:33 
 Re^2: Случайные числа   Andrew Starsh   16 Dec 2002 12:02:14 
 Re^2: Слyчайные числа   Sergey Bychkov   04 Jan 2003 12:15:55 
 Случайные числа   Evgeny Pashigorov   16 Dec 2002 00:23:22 
 Случайные числа   Pavel Osipov   20 Dec 2002 12:00:49 
 Случайные числа   Pavel Osipov   20 Dec 2002 20:29:22 
 Случайные числа   Evgeny Pashigorov   22 Dec 2002 01:43:32 
 Случайные числа   Nickita A Startcev   25 Dec 2002 23:16:12 
 Случайные числа   Comoderator Of Ru Algorithms   16 Dec 2002 00:05:33 
 Случайные числа   Roman Kukushkin   18 Dec 2002 22:43:35 
 Re: Случайные числа   Sergey Andrianov   11 Dec 2002 23:47:50 
 Re^2: Случайные числа   Andrew Starsh   16 Dec 2002 12:04:51 
 Re: Re^2: Случайные числа   Sergey Andrianov   16 Dec 2002 23:09:34 
 Re^2: Re^2: Случайные числа   Andrew Starsh   21 Dec 2002 11:02:08 
 Re^2: Re^2: Случайные числа   Evgenij Masherov   21 Dec 2002 10:37:08 
 Re^3: Re^2: Случайные числа   Andrew Starsh   21 Dec 2002 17:39:27 
 Re^3: Re^2: Случайные числа   Evgenij Masherov   21 Dec 2002 13:44:35 
 Re^4: Re^2: Случайные числа   Andrew Starsh   23 Dec 2002 10:20:27 
 Re^4: Re^2: Случайные числа   Evgenij Masherov   23 Dec 2002 20:41:26 
 Re^5: Re^2: Случайные числа   Andrew Starsh   27 Dec 2002 11:12:20 
 Re: Re^2: Re^2: Случайные числа   Sergey Andrianov   26 Dec 2002 23:36:00 
 Re^2: Re^2: Re^2: Случайные числа   Andrew Starsh   30 Dec 2002 12:54:15 
 Re^3: Re^2: Re^2: Случайные числа   Andrew Starsh   01 Jan 2003 12:20:32 
 Re^2: Слyчайные числа   Sergey Bychkov   04 Jan 2003 12:20:04 
 Слyчайные числа   Sam   06 Jan 2003 00:03:55 
 Re: Слyчайные числа   Vitaly Lugovsky   06 Jan 2003 02:06:24 
 Слyчайные числа   Alex Cvetkov   06 Jan 2003 10:41:08 
 Слyчайные числа   Alexey Burdin   07 Jan 2003 17:12:12 
 Слyчайные числа   Serge Petruschenko   08 Jan 2003 12:24:38 
 Re: Слyчайные числа   Vitaly Lugovsky   07 Jan 2003 21:58:05 
 Слyчайные числа   Evgeny Sharandin   08 Jan 2003 05:52:00 
 Re: Слyчайные числа   Valentin Davydov   07 Jan 2003 11:52:01 
 Re: Слyчайные числа   Vitaly Lugovsky   07 Jan 2003 21:59:28 
 Re: Слyчайные числа   Valentin Davydov   07 Jan 2003 23:16:04 
 Re: Слyчайные числа   Vitaly Lugovsky   08 Jan 2003 01:31:52 
 Слyчайные числа   Alex Semenyaka   08 Jan 2003 23:52:44 
 Re: Слyчайные числа   Valentin Davydov   09 Jan 2003 18:37:49 
 Слyчайные числа   Alex Semenyaka   09 Jan 2003 19:50:22 
 Слyчайные числа   Ilya Rogov   07 Jan 2003 20:38:17 
 Re: Слyчайные числа   Vitaly Lugovsky   08 Jan 2003 05:42:21 
 Слyчайные числа   Ilya Rogov   10 Jan 2003 06:09:50 
 Re: Слyчайные числа   Vitaly Lugovsky   11 Jan 2003 23:03:06 
 Слyчайные числа   Sergey Skorodinsky   12 Jan 2003 11:41:40 
 Случайные числа   Alex Astafiev   14 Dec 2002 14:34:38 
 Re: Случайные числа   Nick Kovaliov   16 Dec 2002 09:47:45 
 Re^2: Случайные числа   Vlad Bespalov   16 Dec 2002 16:06:01 
 Случайные числа   Max Alekseyev   16 Dec 2002 15:55:16 
Архивное /ru.algorithms/4417163b59b3.html, оценка 2 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional