The first state of an LFSR is 1, and the second is X. The state of an LFSR in this model is some polynomial of degree less than the degree of f. These remainders are computed with Euclid's algorithm, just like computing remainders for integers. The most fundamental problem you seem to be having is that you're trying to mimic a binary shift register too closely, not fully understanding what's going on when you view it as a discrete dynamical system, rather than as a circuit.īinary shift registers are a clever circuits that compute the remainders of X^N when divided by f(X), where all the coefficients of f are in the ring Z/2Z, the ring containing only 0 and 1. I'd recommend you acquaint yourself with the concept of polynomial rings (though that Wikipedia article is rather too technical to make the best introduction). This is what I came up with but instead of giving a cyclic sequence, the output quickly deteriorates to all 0s: # Multiplication table for GF(4) This part doesn't make sense to me: "the feedback bit (output bit) is multiplied (modulo-q) by a q-ary value which is constant for each specific tap point." How can a single output bit be multiplied by values for each tap point? What I would like to do now is write a generalised version that could handle Galois fields other than GF(2) but I don't understand the section about non-binary LFSRs. Return ^state) for i in range(len(state)) ] I used the instructions on Wikipedia to write a Galois linear feedback shift register in Python: def lfsr(coefficients, state):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |