# A Unified Point Multiplication Architecture of Weierstrass, Edward and Huff Elliptic Curves on FPGA
## 2 Mathematical Background over \(GF(2^{m})\)
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Inst\({}_{\mathbf{i}}\)** & **Weierstrass Curve** & **Edward Curve** & **Huff Curve** \\ \hline \(I_{1}\) & \(Z_{1}=X_{2}\times Z_{1}\) & \(A=W_{1}\times Z_{1}\) & \(m_{1}=X_{1}\times X_{2}\) \\ \(I_{2}\) & \(X_{1}=X_{1}\times Z_{2}\) & \(B=W_{1}\times W_{2}\) & \(m_{2}=Y_{1}\times Y_{2}\) \\ \(I_{3}\) & \(T_{1}=X_{1}+Z_{1}\) & \(C=Z_{1}\times Z_{



* _For Weierstrass curve._ We replaced only \(T_{1}\) with \(m_{1}\). Differences are given in column two of Tables 1 and 2. * _For Edward curve._ We replaced \(W_{1}\), \(W_{2}\), \(A\), \(B\), \(C\), \(W_{d}\), \(Z_{d}\), \(Z_{a}\) and \(W_{a}\) with \(m_{1}\), \(m_{2}\), \(m_{3}\), \(m_{4}\), \(m_{5}\), \(m_{6}\), \(m_{7}\), \(m_{8}\), and \(m_{9}\). Moreover, \(m_{10}\) to \(m_{12}\) are used to simplify the sub-operations of instructions five to seven of column three of Table 1.
* _For Huff curve._ We replaced \(X_{3}\) and \(Z_{3}\) with \(X_{2}\) and \(Z_{2}\). Moreover, we preserved \(Y_{1}\) and \(Y_{2}\) in \(m_{11}\) and \(m_{12}\). Then, \(Y_{3}\) is also replaced with \(m_{12}\). The \(m_{9}\) and \(m_{10}\) are used to simplify the sub-operations of instructions four, five, and eight to fifteen of column four of Table 1.

As shown in Table 2, the Weierstrass curve requires fourteen instructions after simplification. Similarly, columns three and four of Table 2 reveal that the Edward and Huff curves need fourteen and thirty-seven instructions to execute the \(UADD_{Edw}\) and \(UADD_{Huff}\) formulas of Algorithms 2 and 3. The number of instructions increases with the decrease in storage elements and modular operators. In other words, we show the simplified instructions using the 16 storage elements (\(X_{1}\), \(X_{2}\), \(Z_{1}\), \(Z_{2}\), and \(m_{1}\) to \(m_{12}\)) and one modular

\begin{table}
\begin{tabular}{c c c c} \hline \hline \(\mathbf{Inst_{i}}\) & **Weierstrass Curve** & **Edward Curve** & **Huff Curve** \\ \hline \(I_{1}\) & \(Z_{1}=X_{2}\times Z_{1}\) & \(m_{3}=m_{1}\times Z_{1}\) & \(m_{1}=X_{1}\times X_{2}\) \\ \(I_{2}\) & \(X_{1}=X_{1}\times Z_{2}\) & \(m_{4}=m_{1}\times m_



adder, square, and multiplier operator for Weierstrass, Edward, and Huff curves in Table 2. Consequently, using the above-mentioned strategy, the replacement reduces memory size by 1.93 (ratio of 31 with 16) times compared to the original required memory size of \(31\times m\). ## 4 Proposed Crypto Processor Architecture

We present the unified architecture of our proposed PM design in \[E:Y^{2}+XYZ=X^{3}Z+aX^{2}Z^{2}+bZ^{4} \tag{2}\]0 It includes five units: (i) a curve parameter block, (ii) a memory block, (iii) an arithmetic and logic unit, (iv) routing networks, and (v) a control block. The curve parameter block bears the initial inputs to execute the PM operation on the selected Weierstrass, Edward, and Huff curves. After the computation, the intermediate and final results are kept on the memory block. The arithmetic and logic unit comprises modular operations (addition, square, multiplication, and inversion). The dedicated control unit produces the related/required control signals. We provide more precise particulars in the subsequent sections. ### Curve Parameter Block (CPB)

As illustrated in Figure 1, the curve parameter block comprises six \(m\)-bit buffers (KeyReg, xp, yp, alpha, beta, and gamma). Moreover, it includes one \(5\times 1\) multiplexer \(M1\). The \(x\) and \(y\) coordinates of the initial point \(P\) are stored in the corresponding buffers (xp and yp). The size of the alpha, beta, and gamma buffers are \(m\)-bit, where \(m\) is the field size (233 in this work). In our architecture of Figure 1, we used these three buffers to load the pre-computed values for the Edward and Huff curves. More precisely, for the Edward curve, alpha, beta, and gamma buffers keep the values of \(e_{1}\), \(e_{2}\), and \(e\) during the PM implementation.