Ok,
I will try and improve my query. I am trying to do an exhaustive search to find a key. That key is 32bits, but I have reduced this search by finding out which key bits are effective (ie: effecting the output).
I have therefore eliminated the final byte and bit 7 from this exhaustive search, leaving me with 23 bits of possibilites for the remaining bits. 2^23 is much less than 2^32.
I now need some way to cycle through the possibilities for the remaining 23 bits. At the moment I have split it into 4 bytes and set the last byte to 1 (it can be anything:it doesnt matter) and the same with bit 7.
Now, here's an example:
from left to right: bit0 -> bit31
key={XXXXXXXX 00000000 00000000 X0000000}
"bits set to X is a don't care"
I need a way to get all possible values for the above key.
eg: key={XXXXXXXX 00000000 00000000 X0000000}
key={XXXXXXXX 00000000 00000000 X0000001}
key={XXXXXXXX 00000000 00000000 X0000010}
key={XXXXXXXX 00000000 00000000 X0000101}
all the way to
key={XXXXXXXX 11111111 11111111 X1111111}
now if i try and go around a loop 2^32 and get all possible values I will never break out of it......
thats why I have reduced the number of bits to 23....
any ideas please