RandomTools[BlumBlumShub][NewGenerator] - Blum, Blum and Shub Pseudo Random Bit Generator
|
Calling Sequence
|
|
NewBitGenerator( opt1, opt2, ... )
|
|
Parameters
|
|
opt1, opt2, ...
|
-
|
(optional) argument of the form option=value where option is one of range, or seed
|
|
|
|
|
Description
|
|
•
|
The NewGenerator command outputs a Maple procedure, a pseudo-random number generator, which when called outputs a pseudo-random number. The generator is a Blum-Blum-Shub (BBS) generator. A BBS generator uses the following quadratic recurrence to generate a sequence of integers from which cryptographically secure pseudo-random bits are extracted:
|
|
- n is a product of two large primes p and q
|
|
- and
|
|
- is determined from the seed s.
|
•
|
The cryptographic security of the BBS generator assumes that the number theoretic problem of distinguishing a quadratic residue from a pseudo-square in Z mod n is computationally infeasible when n is the product of two primes p and q and the factorization of n is not known. Thus it also assumes that integer factorization is computationally infeasible. Recall the definitions of a quadratic residue and pseudo-square:
|
|
Definition: An integer x in Z mod n is a quadratic residue if (i) and (ii) for some integer y.
|
|
Definition: An integer z in Z mod n where is a pseudo square if (i) and (ii) z is not a quadratic residue in Z mod p and (iii) z is not a quadratic residue in Z mod q.
|
•
|
The following optional arguments are supported. They are input as equations in any order.
|
|
range=integer..integer or integer
|
|
The range argument specifies the range from which the integer is chosen. If a range is given, the returned procedure will generate numbers in this range. If an integer is given, the returned procedure will return integers in the range 0 to value-1. By default the range is 0 to 10^12-1.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
>
|
|
| (8) |
>
|
|
| (9) |
|
|
Download Help Document
Was this information helpful?