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 a good deal of bytes from this exhaustive search, leaving me with 12 bits of possibilites for the remaining bits. 2^12 is much less than 2^32.

I now need some way to cycle through the possibilities for the remaining 12 bits.

Here's an example:

from left to right: bit0 -> bit31

key={XXXXXXXX XX000000 XX000000 XXXXXXXX}

"bits set to X is a don't care"

I need a way to get all possible values for the above key.

key={XXXXXXXX XX000000 XX000001 XXXXXXXX}

key={XXXXXXXX XX000000 XX000010 XXXXXXXX}

key={XXXXXXXX XX000000 XX000011 XXXXXXXX}

key={XXXXXXXX XX000000 XX000101 XXXXXXXX}

all the way to

key={XXXXXXXX XX111111 XX111111 XXXXXXXX}

Does anybody have any ideas as I've been trying things which are not working......

thank you!!!!