# A Unified Point Multiplication Architecture of Weierstrass, Edward and Huff Elliptic Curves on FPGA
## 2 Mathematical Background over \(GF(2^{m})\)  
_Point Multiplication Concept_  
It is essential to emphasize that an additive group consists of various points on an elliptic curve. This implies that the addition of two group elements yields another group element. Let us take an example. On an elliptic curve, we have two input points (\(P\) and \(Q\)). Adding \(P\) and \(Q\) results in \(R=P+Q\). Here, \(R\) determines the final produced point. The point \(R\) also lies on the curve. The addition of \(P\) and \(Q\) defines the PA. Furthermore, adding two similar points (\(P+P=2P\) or \(Q+Q=2Q\)) on the curve defines the point doubling. Note that the PA and PD operations are an essential part of the PM operation. Hence, adding \(k\) copies of PA and PD specifies the PM. It is calculated using Equation (1). The variables \(P\), \(Q\), and \(k\) determine the initial point, final point, and scalar multiplier. \[Q=k.P\]Weierstrass curve. For the \(GF(2^{m})\) field, a Lopez Dahab projective form of the Weierstrass ECC curve is shown in Equation (2). The variables \(X\), \(Y\), and \(Z\) in Equation (2) specify the projective elements of a given point \(P(X:Y:Z)\). Here, the variable \(Z\
eq 0\), while variables \(a\) and \(b\) are constants. Moreover, \(b\
eq 0\). \[E:Y^{2}+XYZ=X^{3}Z+aX^{2}Z^{2}+bZ^{4} \tag{2}\]  
_Edward curve._ For the \(GF(2^{m})\) field, the Edward curves are described in [20]. Let us say the elements over \(GF(2^{m})\) fields are \(d_{1}\) and \(d_{2}\) such that \(d_{1}\
eq 0\) and \(d_{2}\
eq d_{1}(d_{1}+1)\). Subsequently, the mathematical formulation for BEC is expressed as  
\[E_{B,d_{1},d_{2}}:d_{1}(x+y)+d_{2}(x+y)^{2}=xy(x+1)(y+1) \tag{3}\]  
Variables \(d_{1}\) and \(d_{2}\) in Equation (3) are co-coefficients. Similarly, variables \(x\) and \(y\) represent the coordinates of the input point \(P\). Finally, the variables \(d_{1}\) and \(d_{2}\) are the constants of the corresponding curve. Huff curve.The Huff model for ECC was initially introduced in 2010 [21] and formally presented in 2011 [22]. However, the vulnerabilities against [22] were highlighted in 2013. Consequently, a new mathematical formulation was constructed and presented in [23]. In 2018, the work in [23] was critically reviewed by [24]. As a result, the work in [24] contributes towards novel formulations of the unified Huff curve. Note that our implementations take the formulations for the Huff curve from [24]. Let us consider a binary field with three points \((X:Y:Z)\). The formalism for Huff curves can be expressed as  
\[E:aX(Y^{2}+YZ+Z^{2})=bY(X^{2}+XZ+Z^{2}) \tag{4}\]  
Variables \(a\) and \(b\) are the parameters of curves over the \(GF(2^{m})\) field with the condition that \(a\
eq b\). Algorithms for Weierstrass, Edward and Huff models of ECC.For the implementation of Equation (1), we have numerous state-of-the-art PM algorithms. Some typical examples are the Double and Add algorithm, the Lopez Dahab algorithm, and the Montgomery algorithm. In contrast, the literature recommends the use of the Double and Add algorithm for the PM execution of Huff curves, as these require more instructions to implement unified operations. For performance improvement through instruction-level parallelism, a Lopez Dahab PM algorithm is more practical. However, the Montgomery PM algorithm results in the simple-power-analysis-protected implementation of ECC. We analyzed a variety of PM algorithms of ECC in [25]. Therefore, our implementation uses the Montgomery PM algorithm for the Weierstrass and Edward models of ECC. At the same time, we utilize the Double and Add algorithm for the Huff curve. The corresponding algorithms are presented in Algorithms 1-3. Here, in this article, we are not investigating simple power analysis (SPA) attacks in our design. Instead, we simply utilize the SPA-protected PM algorithm. Algorithms 1-3 start with the initialization phase, where input points must transform into another coordinate system to obtain more benefits during implementation.