In article <(E-Mail Removed). com>,

newbie <(E-Mail Removed)> wrote:

>anyone know is it this source code value:-

> T = ((Y >> 4) ^ X) & 0x0F0F0F0F; X ^= T; Y ^= (T << 4);

>

> T = ((Y ) ^ X) & 0x10101010; X ^= T; Y ^= (T );

>

> X = (LHs[ (X ) & 0xF] << 3) | (LHs[ (X >> & 0xF ] << 2)

> | (LHs[ (X >> 16) & 0xF] << 1) | (LHs[ (X >> 24) & 0xF ] )
You have not shown us the definition of LHs or RHs, so we cannot

tell you what this expression produces.

>same as the PC-1 table value?

> PC-1

> 57 49 41 33 25 17 9

> 1 58 50 42 34 26 18

> 10 2 59 51 43 35 27

> 19 11 3 60 52 44 36

>

> 63 55 47 39 31 23 15

> 7 62 54 46 38 30 22

> 14 6 61 53 45 37 29

> 21 13 5 28 20 12 4

>and how to compare both?
The code involves two input variables, X and Y, of at least 29

bits, and calculates 3 values, T, X, and Y. T could plausibly be

a temporary value, but the structure of the code shows that X and Y

are both outputs.

You ask that this output be compared to a single table, apparently

of size 8 x 7, or perhaps 2 x 4 x 7, and whose values appear to be

6 bits wide.

Even if we interpret the empty line as indicating two output tables,

one for X and the other for Y, we have a dimensionality clash:

the output of an operation upon a 29+ bit value cannot be less than

2^29th values [even if all the rest of them turn out to be 0]

and a single variable of output cannot be compared to a 4 x 7 table

of outputs without a mapping function... and no mapping function

has been defined.

Hence, no matter what the arithmetic produces, we can deduce

that it does -not- produce the table we are asked to compare against.

[Thus we do not need to analyze the bit-manipulation logic to produce

the definite answer "NO".]

--

"law -- it's a commodity"

-- Andrew Ryan (The Globe and Mail, 2005/11/26)