The task is to make a program that simulates pseudo-random sequence generator that uses LFSR, that can be described by recurrent equation over the field GF(q)
Y(I+1)=F * Y(I),
where F is square characteristic matrix of size k of LFSR; Y(I) is the vector of I-th state of LFSR. The program should contains the database of irreducible polynomials, should allow to calculate sequences of LFSR states and map them to integer and real numbers, to define the period of the matrix F and the initial state Y(0).
As I understand it, we should do the following.
-
The matrix F is not arbitrary and should look something like this, so Y(I+1) is the shift of Y(I).
-
The database should contain exactly one irreducible polynomial f(x) of degree n over the field Fp (we can take any of such polynomials) for each q=pn, where q is number of elements of field GF(q). When we generate sequence with LFSR over the field GF(q) for certain q, we take the appropriate polynomial from database and use it for adding and multiplying the elements of GF(q).
-
Elements of GF(q) (k registers and k elements of matrix ci) would be represented in memory as coefficients of polynomial of n-1 degree over the a where a is the root of appropriate polynomial f(x).
-
Adding and multiplying elements should be made like adding and multiplying the polynomials over a, then finding remainder of the division the result by f(a), and this can be made by long division algorithm.
-
The period of matrix F and initial vector Y(0) should be find experimentally for each case (calculations of sequence before it Y(n)=Y(0), and calculation of Fn before Fn=F), because there is no simple way to calculate it. Or maybe there is?
-
Mapping generated sequences to integers can be just convertion from q-ary number system.
Do I understand it right?
Aucun commentaire:
Enregistrer un commentaire