0

First of all, i want to build it in hardware so i need this in "digital operations" like "and" or "xor".

So I tried myself in a $GF(2^4)$. With the minimal polynom $z^4+z+1$:

$$a(z) = a_0 + a_1 \cdot z + a_2 \cdot z^2 + a_3 \cdot z^3$$

$$[a(z)]^3 = a_0 + a_1 \cdot z^3 + a_2 \cdot z^6 + a_3\cdot z^9 $$

$$= a_0 + a_1 \cdot z^3 + a_2 \cdot (z^3 + z^2) + a_3 c\dot (z^3+z)$$

$$= a_0 + a_1 \cdot z + a_2 \cdot z^2 + (a_1+a_2+a_3) \cdot z^3$$

Now i have to replace $(a_0, a_1, a_2, a_3)$ by $(a_0, a_3, a_2, a_1 + a_2 + a_3)$ The + operator is just a xor. This is functional.

If i do it on $GF(2^6)$ with minimal polynom $z^6+z+1$:

$$a(z) = a_0 + a_1 \cdot z + a_2 \cdot z^2 + a_3 \cdot z^3 + a_4 \cdot z^4 + a_5 c\dot z^5$$

$$[a(z)]^3 = a_0 + a_1 \cdot z^3 + a_2 \cdot z^6 + a_3 \cdot z^9 + a_4 \cdot z^12 + a_5 \cdot z^15$$

$$[a(z)]^3 = a_0 + a_1 \cdot z^3 + a_2 \cdot (z+1) + a_3 \cdot (z^4+z^3) + a_4 \cdot (z^2+1) + a_5 \cdot (z^5+z^3)$$

$$[a(z)]^3 = (a_0 + a_2 + a_4) + a_2 \cdot z + a_4 \cdot z^2 + (a_1 + a_3 + a_5) \cdot z^3 + a_3 \cdot z^4 + a_5 \cdot z^5$$

Now i should replace $(a_0, a_1, a_2, a_3, a_4, a_5)$ with $(a_0+a_2+a_4, a_2, a_4, a_1 + a_3 + a_5, a_3 ,a_5)$ For example if i want to take the power of 3 from $a^11= 100011$, it should give $a^33 = 010010$.

  • For new $a_5: a_5 = 1$

  • For new $a_4: a_3 = 0$

  • For new $a_3: a_1 + a_3 + a_5 = 1 + 0 + 0 = 1$

  • For new $a_2: a_4 = 0$

  • For new $a_1: a_2 = 0$

  • For new $a_0: a_0+a_2+a_4 = 1 + 0 + 0 = 1$

makes = 101001 which is $a^23$

Why it works on $GF(2^4)$ and not on $GF(2^6)$? What is my mistake?

ewokx
  • 444
  • 3
    I'm highly skeptical that what you've done works in GF($2^4$). You aren't calculating $a(z)^3$, you're evaluating $a(z^3)$. It could be that you're using it on pure powers of $z$ and perhaps the primitivity of the polynomial is leading to some coincidences that made you think you were doing it right... – Erick Wong Jul 18 '22 at 23:29
  • 1
    Also, if you applied this logic to squaring instead of cubing, it works in GF($2^n$) because of the freshman's dream. – Erick Wong Jul 18 '22 at 23:31
  • 2
    These are both small fields. I would use discrete logarithm tables (and its inverse table). Using it exponentiation in a (smallish) finite field becomes modular integer multiplication followed up by a table look up. Works with all the exponents the same way (not just cubing). I should probably add more examples to it, but I once prepared a thread just for referrals like this. – Jyrki Lahtonen Jul 19 '22 at 03:48
  • 1
    And what Erick Wong said. Squaring is additive in characteristic two, but cubing is not (it would be in characteristic three though). – Jyrki Lahtonen Jul 19 '22 at 03:49
  • is there any fast way with XOR and AND gates to get the power of three or higher from an element? How can i calculate it? – Sir Kadse Jul 19 '22 at 08:42

0 Answers0