Visit Calccrypto for info on crypto

KC2ZOF

I have absolutely no idea if this is right, but it seems that:

- Convert each number into binary
- Turn each of those into polynomial form (the 8 bit number turns into a seventh degree polynomial if the first number is 1; CA → 11001010 → 1x
^{7}+1x^{6}+0x^{5}+0x^{4}+1x^{3}+0x^{2}+1x+0) - Multiply using distribution
- It looks as if multiple copies of the same term are then deleted. In the example, all x
^{7}terms were deleted, and they were the only one with copies, three to be exact. - Convert that to binary
- Perform some modulo thing, Ans mod 100011011
- I guess then you convert the number back to hex

With your matrix, use matrix multiplication.

(1)Now perform each of the four multiplications with the above steps and add them together.

Like I said, I don't know if this is right for this is the first time I have seen this stuff, but this was what I was able to gather with Wikipedia's example.

Timothy Foster — My Site ~ My Blog

Timothy Foster - @tfAuroratide

Auroratide.com - Go here if you're nerdy like me

Some corrections:

In step 4, it's not quite correct that multiple copies of the same term are deleted. It's just that we're doing calculations mod 2, so two copies (or any even number of copies) of the same term cancel.

In step 6, moreover, the problem is that taking the number mod 100011011 is not the same thing as taking a polynomial modulo another polynomial. The difference is that when doing the long division, you don't carry subtractions.

Just converting the C code at the end of the article should work well enough. Here it is (assuming the two numbers to be multiplied are stored in binary in L1 and L2):

```
{0,0,0,0,0,0,0,0}→L₃
For(I,0,7)
If L₂(8)
L₃ xor L₁→L₃
L₁(1)→H
augment(ΔList(cumSum(L₁)),{0})→L₁
If H
L₁ xor {0,0,0,1,1,0,1,1}→L₁
augment({0},L₂→L₂
8->dim(L₂)
End
L₃
```

At the end, to add numbers, use xor, not +.

Edit: in fact, since you're keeping a running total, the easiest way to compute A*B+C*D+E*F+G*H using this code is to initialize L₃ to all zeroes at the beginning, before the first multiplication, then keep using L₃ (without resetting it to zeroes) for all the other multiplications.

thanks. i'll give it a try.

oh yeah. the first matrix is in decimal, in case you didnt notice the change. will that affect anything?

Visit Calccrypto for info on crypto

KC2ZOF

You're going to be converting to binary anyway.

is

`L₁ xor {0,0,0,1,1,0,1,1}→L₁`

the part where the bits are moded? if it is, i dont get it. the number is 100011011

Visit Calccrypto for info on crypto

KC2ZOF

I don't know if you are the fool, or I, but i believe that xor merely turns (in the first number) 1's into 0's numberand 0's into 1's wherever there is a 1 (in the second number. If it is a 0, it doesn't do anything). Taken that into consideration, and the fact that moduloing has to do with rotation, that would not most likely be, in fact, where the bits are moded.

Of course, I could be completely out of context and that would of course make me look very silly. o well.

thanks. i think i know that xor is slightly more complex than just changing 0 to 1 and vice versa, but i have not really worked with finite fields before. modding over GF(2^8) is somewhat different from normal modding, as described by Vincent Rijmen and Joan Daemen. thats why they have their own special "rijndael finite field". unfortunately, i dont get what they did since i have never been encouraged to study ahead, and when i do, people tend to yell at me

i have used "100011011b" in other parts of the program, but this part is getting on my nerves since it doesnt seem work like it did in the other part. right now, im completely lost on how to implement this.

Visit Calccrypto for info on crypto

KC2ZOF

This is the part where you mod out by the polynomial. The reason we're using 00011011 rather than 100011011 is that the first bit is XOR'ed manually: it's first stored to H, and then this step is done only if H is 1.

sorry, apparently this code doesnt seem to work. im not too sure, but from the original paper, there was a test vector:

57h x 83h=C1h

(1)the ans that were the same were xored

i still have no idea how to do this

Visit Calccrypto for info on crypto

KC2ZOF

Sorry, there was a small bug in which I reversed the order of cumSum( and Δlist( in the code. It works now (I just tested it).

when talking about these things my eyes just pop out, i can not comprehend it (nor do i want to..i think)