mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.11.0t10
This commit is contained in:
12
help/random
12
help/random
@@ -25,7 +25,7 @@ DESCRIPTION
|
||||
random() Same as rand(0, 2^64)
|
||||
random(max) Same as rand(0, max)
|
||||
|
||||
The random generator generates the highest order bit first. Thus:
|
||||
The random generator generates the highest order bit first. Thus:
|
||||
|
||||
random(256)
|
||||
|
||||
@@ -37,7 +37,7 @@ DESCRIPTION
|
||||
|
||||
The basic idea behind the Blum-Blum-Shub generator is to use
|
||||
the low bit bits of quadratic residues modulo a product of
|
||||
two 3 mod 4 primes. The lowest int(log2(log2(p*q))) bits are used
|
||||
two 3 mod 4 primes. The lowest int(log2(log2(p*q))) bits are used
|
||||
where log2() is log base 2 and p,q are two primes 3 mod 4.
|
||||
|
||||
The Blum-Blum-Shub generator is described in the papers:
|
||||
@@ -52,7 +52,7 @@ DESCRIPTION
|
||||
|
||||
U. V. Vazirani and V. V. Vazirani, "Trapdoor Pseudo-Random
|
||||
Number Generators with Applications to Protocol Design",
|
||||
Proceedings of the 24th IEEE Symposium on the Foundations
|
||||
Proceedings of the 24th IEEE Symposium on the Foundations
|
||||
of Computer Science, 1983, pp. 23-30.
|
||||
|
||||
U. V. Vazirani and V. V. Vazirani, "Efficient and Secure
|
||||
@@ -71,7 +71,7 @@ DESCRIPTION
|
||||
1st edition (1994), pp 365-366.
|
||||
|
||||
This generator is considered 'strong' in that it passes all
|
||||
polynomial-time statistical tests. The sequences produced are
|
||||
polynomial-time statistical tests. The sequences produced are
|
||||
random in an absolutely precise way. There is absolutely no better
|
||||
way to predict the sequence than by tossing a coin (as with TRULY
|
||||
random numbers) EVEN IF YOU KNOW THE MODULUS! Furthermore, having
|
||||
@@ -86,7 +86,7 @@ DESCRIPTION
|
||||
|
||||
To compromise the generator, an adversary must either factor the
|
||||
modulus or perform an exhaustive search just to determine the next
|
||||
(or previous) bit. If we make the modulus hard to factor (such as
|
||||
(or previous) bit. If we make the modulus hard to factor (such as
|
||||
the product of two large well chosen primes) breaking the sequence
|
||||
could be intractable for todays computers and methods.
|
||||
|
||||
@@ -130,7 +130,7 @@ DESCRIPTION
|
||||
is given in the source. While this does not reduce the quality
|
||||
of the generator, knowing the factors of the Blum modulus would
|
||||
help someone determine the next or previous bit when they did
|
||||
not know the seed. If this bothers you, feel free to use one
|
||||
not know the seed. If this bothers you, feel free to use one
|
||||
of the other compiled in Blum moduli or provide your own. See
|
||||
the srandom help page for details.
|
||||
|
||||
|
Reference in New Issue
Block a user