Can any math wizard (or ever a normal one:grin: ) plz explain to me wut is GLFSR n how does it work? Maybe an example in assembly plz :) all i know is that it's doing sth with (shrd OR/AND shr :confused: ) plz explain.

Any help any tutorial any code any site would be gr8

Posted on 2003-07-21 14:59:33 by CuTedEvil
Here's the GLFSR (Galois Linear Feedback Shift Register) algorithm as I understand it:

1. We start with a register, which is just some number with a number of bits
2. On each iteration, we shift the register one bit to the right
3. On some of the shifts, the bit is xor'd with a feedback bit (more on this later)
a. The shifts that are xor'd are called the taps
b. Since the bits are the same after they've been shifted, if you're programming a GLFSR you can
just shift and then xor the entire dword instead of xor'ing on certain shifts
4. The bit that is shifted out of the left is the first output bit, and it is also used as the feedback bit for the
next interation
a. If the bit is 0, the xor operation leaves the bit unchanged, so we don't have to do the xor'ing
5. Once we've looped through this as many times as their are bits in the register, all of the output bits
taken together is our output value.

I got my info from:

Sample source code attached
Posted on 2003-07-22 01:02:29 by evwr
:alright: check ur PM
Posted on 2003-07-22 09:54:28 by CuTedEvil