Inversive congruential generators are a type of nonlinear congruential pseudorandom number generator, which use the modular multiplicative inverse (if it exists) to generate the next number in a sequence. The standard formula for an inversive congruential generator, modulo some prime q is:
x0=seed,
xi+1=\begin{cases}
-1 | |
(ax | |
i |
+c)\bmodq&ifxi\ne0,\\ c&ifxi=0. \end{cases}
The sequence
(xn)n\geq
xi=xj
xi+1=xj+1
f(x)=x2-cx-a\inFq[x]
Fq
f(x)
Eichenauer-Herrmann, Lehn, Grothe and Niederreiter have shown that inversive congruential generators have good uniformity properties, in particular with regard to lattice structure and serial correlations.
ICG(5, 2, 3, 1) gives the sequence 1, 0, 3, 2, 4, 1, 0, 3, 4, 2, 1, 0, ...
In this example,
f(x)=x2-3x-2
F5[x]
F5[x]/(f)
The construction of a compound inversive generator (CIG) relies on combining two or more inversive congruential generators according to the method described below.
Let
p1,...,pr
pj\geq5
(xn)n\geq
F | |
pj |
pj
(j) | |
\{x | |
n |
\mid0\leqn\leqpj\}\in
F | |
pj |
For each index j, 1 ≤ j ≤ r, we consider
Tj=T/pj
T=p1 … pr
(xn)n\geq
The sequence
(xn)n\geq
xn=\left(T1
(1) | |
x | |
n |
+T2
(2) | |
x | |
n |
+...+Tr
(r) | |
x | |
n |
\right)\bmodT
The CIG are accepted for practical purposes for a number of reasons.
Firstly, binary sequences produced in this way are free of undesirable statistical deviations. Inversive sequences extensively tested with variety of statistical tests remain stable under the variation of parameter.
Secondly, there exists a steady and simple way of parameter choice, based on the Chou algorithm that guarantees maximum period length.
Thirdly, compound approach has the same properties as single inversive generators, but it also provides period length significantly greater than obtained by a single inversive congruential generator. They seem to be designed for application with multiprocessor parallel hardware platforms.
There exists an algorithm that allows designing compound generators with predictable period length, predictable linear complexity level, with excellent statistical properties of produced bit streams.
The procedure of designing this complex structure starts with defining finite field of p elements and ends with choosing the parameters a and c for each inversive congruential generator being the component of the compound generator. It means that each generator is associated to a fixed IMP polynomial. Such a condition is sufficient for maximum period of each inversive congruential generator and finally for maximum period of the compound generator. The construction of IMP polynomials is the most efficient approach to find parameters for inversive congruential generator with maximum period length.
Equidistribution and statistical independence properties of the generated sequences, which are very important for their usability in a stochastic simulation, can be analyzed based on the discrepancy of s-tuples of successive pseudorandom numbers with
s=1
s=2
The discrepancy computes the distance of a generator from a uniform one. A low discrepancy means that the sequence generated can be used for cryptographic purposes, and the first aim of the inversive congruential generator is to provide pseudorandom numbers.
For arbitrary points
{t}1,...,{t}N-1\in[0,1)
DN({t}1,...,{t}N-1)={\rmsup}J|FN(J)-V(J)|
[0,1)s
FN(J)
N-1
{t}1,...,{t}N-1
Until now, we had sequences of integers from 0 to, in order to have sequences of
[0,1)s
From this definition, we can say that if the sequence
{t}1,...,{t}N-1
J=[0,1)s
V(J)=1
FN(J)=N/N=1
DN({t}1,...,{t}N-1)=0
V(j) ≈ 0
FN(j) ≈ N/N ≈ 1
DN({t}1,...,{t}N-1)=1
0\leqDN({t}1,...,{t}N-1)\leq1
Some further notation is necessary. For integers
k\geq1
q\geq2
Ck(q)
(h1,...,hk)\inZk
-q/2<hj<q/2
1\leqj\leqk
Define
r(h,q)=\begin{cases} q\sin(\pi|h|/q)&forh\inC1(q)\\ 1&forh=0 \end{cases}
and
r
k | |
(h,q)=\prod | |
j=1 |
r(hj,q)
{h}=(h1,...,hk)\inCk(q)
t
e(t)={\rmexp}(2\pi ⋅ it)
u ⋅ v
u,v
Rk
Let
N\geq1
q\geq2
{t}n=yn/q\in[0,1)k
yn\in\{0,1,...,q-1\}k
0\leqn<N
Then the discrepancy of the points
{t}0,...,{t}N-1
DN(t0,t1,...,tN-1)
kq | |
1N | |
\sum | |
h\in\Complexk(q) |
1{r(h,q)} | |
| |
N-1 | |
\sum | |
n=0 |
e(h ⋅ tn)|
The discrepancy of
N
t1,...,tN-1\in[0,1)k
DN(t0,t1,...,tN-1)\ge
\pi | ||||||||||||
|
(1,hj)}|\sum
N-1 | |
n=0 |
e(h ⋅ tn)|
for any nonzero lattice point
{h}=(h1,...,hk)\inZk
l
{h}
These two theorems show that the CIG is not perfect because the discrepancy is greater strictly than a positive value but also the CIG is not the worst generator as the discrepancy is lower than a value less than 1.
There exist also theorems which bound the average value of the discrepancy for Compound Inversive Generators and also ones which take values such that the discrepancy is bounded by some value depending on the parameters. For more details see the original paper.