# Comparison Affine Coordinates and Projective Coordinates Addition in Excel

Kurve : EC : $y^2=x^3 + x + 1$
Generator:$(1,7)$
$p=23$

Result in Affine use Excel: $P=(1,7)$, $Q=(7,11) \implies P+Q=(18,20)$

Result in Projective use Excel: $P=(1:7:1), Q=(7:11:1) \implies P+Q=(15:2:9)$

$U = U_1 - U_2\$ where $\ U_1 = Y_2 ⇤ Z_1, U_2 = Y_1 ⇤ Z_2$
$V = V_1 - V_2\$ where $\ V_1 = X_2 ⇤ Z_1, V_2 = X_1 ⇤ Z_2$
$W = Z_1 ⇤ Z_2$
$A = U^2 ⇤ W-V^3-2V^2 ⇤ V_2$
Then
$X_3 = V ⇤ A$
$Y_3 = U ⇤ (V^2 ⇤ V2 - A) - V^3 ⇤ U2$
$Z_3= V^3 ⇤ W$

Is the result correct for projective coordinates (X/Z,Y/Z), because it should be same with affine (18:20:1)?

We have $15 \cdot 9^{-1} \equiv 17$ and $2 \cdot 9^{-1} \equiv 13$; when we plug $x = 17$ and $y = 13$ into the original curve equation, we do not get equality, and so we know something went wrong.