<s>
Blum	B-Algorithm
Blum	I-Algorithm
Shub	I-Algorithm
(	O
B.B.S.	O
)	O
</s>
<s>
is	O
a	O
pseudorandom	B-Algorithm
number	I-Algorithm
generator	I-Algorithm
proposed	O
in	O
1986	O
by	O
Lenore	O
Blum	O
,	O
Manuel	O
Blum	O
and	O
Michael	O
Shub	O
that	O
is	O
derived	O
from	O
Michael	O
O	O
.	O
Rabin	O
's	O
one-way	O
function	O
.	O
</s>
<s>
At	O
each	O
step	O
of	O
the	O
algorithm	O
,	O
some	O
output	O
is	O
derived	O
from	O
xn+1	O
;	O
the	O
output	O
is	O
commonly	O
either	O
the	O
bit	B-Error_Name
parity	I-Error_Name
of	O
xn+1	O
or	O
one	O
or	O
more	O
of	O
the	O
least	O
significant	O
bits	O
of	O
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1	O
.	O
</s>
<s>
The	O
seed	B-Algorithm
x0	O
should	O
be	O
an	O
integer	O
that	O
is	O
co-prime	O
to	O
M	O
(	O
i.e.	O
</s>
<s>
An	O
interesting	O
characteristic	O
of	O
the	O
Blum	B-Algorithm
Blum	I-Algorithm
Shub	I-Algorithm
generator	I-Algorithm
is	O
the	O
possibility	O
to	O
calculate	O
any	O
xi	O
value	O
directly	O
(	O
via	O
Euler	O
's	O
theorem	O
)	O
:	O
</s>
<s>
where	O
is	O
the	O
Carmichael	B-Algorithm
function	I-Algorithm
.	O
</s>
<s>
Let	O
,	O
and	O
(	O
where	O
is	O
the	O
seed	B-Algorithm
)	O
.	O
</s>
<s>
The	O
following	O
Common	B-Language
Lisp	I-Language
implementation	O
provides	O
a	O
simple	O
demonstration	O
of	O
the	O
generator	O
,	O
in	O
particular	O
regarding	O
the	O
three	O
bit	O
selection	O
methods	O
.	O
</s>
<s>
It	O
is	O
important	O
to	O
note	O
that	O
the	O
requirements	O
imposed	O
upon	O
the	O
parameters	O
p	O
,	O
q	O
and	O
s''	O
(	O
seed	B-Algorithm
)	O
are	O
not	O
checked	O
.	O
</s>
