I'm performing calculations within the finite field $GF(2^8)$ and I can't seem to get the expected results. This is my first time working with finite fields, so my understanding is quite basic. I would love some guidance to help me solve this problem.
Problem Setup:
Select a generator $g$ from a multiplicative cyclic group $G$, and sample a private key $Pr_K = (\beta_1, \beta_2, \beta_3)$ where $\beta_i \in F$, and compute a public key $PU_K = (g^{\beta_1}, g^{\beta_2}, g^{\beta_3})$
I've chosen the following values and parameters:
- $g = 2$
- $Pr_K = (\beta_1, \beta_2, \beta_3)=(20, 30, 40)$
- $PU_K = (g^{\beta_1}, g^{\beta_2}, g^{\beta_3}) = (180, 96, 106)$
- $t'_1 = 216$
- $t'_2 = 233$
Equations:
The equations I am working with are:
- Equation for $Sign$:
$$ sign =- \frac{ \sum_{i=1}^{2} \beta_i t'_i }{ {b_3} } $$
- Equation for $ n $:
$$ n= \left( \prod_{i=1}^{2} g^{{\beta_i}^{t'_i}} \right) \cdot g^{{\beta_3}^{sign}} $$
Calculation Steps:
Using the above equations, my calculation steps are as follows:
Calculated $sign$ as:
- $ \text{sign} = -\frac{(20 \cdot 216) + (30 \cdot 233)}{40}$
- $ \text{sign} = -\frac{70 + 97}{40} $
- $ \text{sign} = -\frac{39}{40} $
- $ \text{sign} = -235 \equiv 235 \text{ in } F(2^8) $
Applied the second equation to calculate $ n $:
- $ n = (180^{216} \cdot 96^{233}) \cdot 106^{235} $
- $ n = (44 \cdot 26) \cdot 172 $
- $ n = 160 $
Issue:
The expected result for $ n $ is 1, but my calculation gives 160. I don't quite understand why this is and I'm unsure if there is a calculation error or a conceptual misunderstanding of finite field operations.
Could someone please help me identify the source of this discrepancy? Any guidance would be greatly appreciated.
Polynomial Update
- Irreducable polynomial = $^8+^4+^3+^2+1$
- $Pr_K = (\beta_1, \beta_2, \beta_3)=((x^4+x^2), (x^4+x^3+x^2+x), (x^5+x^3))$
- $PU_K = (g^{\beta_1}, g^{\beta_2}, g^{\beta_3}) = ((x^7+x^5+x^4+x^2), (x^6+x^5), (x^6+x^5+x^3))$
- $g=x$
- $t'_1 = x^7+x^6+x^4+x^3$
- $t'_2 = x^7+x^6+x^5+x^3+1$
- $sign = x^7+x^6+x^5+x^3+x+1$
Using the polynomials I still get the final result = $x^7+x^5$