# Throughput/Area Optimized Architecture for Elliptic-Curve Diffie-Hellman Protocol
## 3 Proposed ECDH Architecture
### Dedicated FSM Controllers
\begin{table}
\begin{tabular}{l|l|l|l|l|l|l|l|} \hline \multirow{3}{*}{**CCs**} & \multirow{3}{*}{**Instructions of _PAdd_ and _PDbl_} & \multicolumn{3}{c|}{**Status of Instructions of Algorithm 1 in 2-Stage Pipelining**} \\ \cline{3-8}  & & \multicolumn{1}{c|}{**Without Scheduling**} & \multicolumn{3}{c|}{**Proposed Scheduling**} \\ \cline{3-8}  & & **[R]** & **[EWB]** & **Hazard** & **[R]** & **[EWB]** & **Hazard** \\ \hline
1 & \(\textit{PAdd}_{Inst_{1}}\longleftarrow Z_{1}=X_{2}\times Z_{1}\) & \(\textit{PAdd}_{Inst_{1}}\) & – & – & \(\textit{PAdd}_{Inst_{1}}\) & – & – \\
2 & \(\textit{PAdd}_{Inst_{2}}\longleftarrow X_{1}=X_{1}\times Z_{2}\) & \(\textit{PAdd}_{Inst_{2}}\) & \(\textit{PAdd}_{Inst_{1}}\) & – & \(\textit{PAdd}_{Inst_{2}}\) & \(\textit{PAdd}_{Inst_{1}}\) & – \\
3 & \(\textit{PAdd}_{Inst_{3}}\longleftarrow T_{1}=X_{1}+Z_{1}\) & – & \(\textit{PAdd}_{Inst_{2}}\) & \(X_{1}\) & \(\textit{PDbl}_{Inst_{1}}\) & \(\textit{PAdd}_{Inst_{2}}\) & – \\
4 & \(\textit{PAdd}_{Inst_{4}}\longleftarrow X_{1}=X_{1}\times Z_{1}\) & \(\textit{PAdd}_{Inst_{3}}\) & – & – & \(\textit{PAdd}_{Inst_{3}}\) & \(\textit{PDbl}_{Inst_{1}}\) & – \\
5 & \(\textit{PAdd}_{Inst_{5}}\longleftarrow Z_{1}=T_{1}^{2}\) & \(\textit{PAdd}_{Inst_{4}}\) & \(\textit{PAdd}_{Inst_{3}}\) & – & \(\textit{PAdd}_{Inst_{4}}\) & \(\textit{PAdd}_{Inst_{3}}\) & – \\
6 & \(\textit{PAdd}_{Inst_{6}}\longleftarrow T_{1}=x_{p}\times Z_{1}\) & \(\textit{PAdd}_{Inst_{5}}\) & \(\textit{PAdd}_{Inst_{4}}\) & – & \(\textit{PAdd}_{Inst_{5}}\) & \(\textit{PAdd}_{Inst_{4}}\) & – \\
7 & \(\textit{PAdd}_{Inst_{7}}\longleftarrow X_{1}=X_{1}+T_{1}\) & – & \(\textit{PAdd}_{Inst_{5}}\) & \(Z_{1}\) & \(\textit{PDbl}_{Inst_{2}}\) & \(\textit{PAdd}_{Inst_{5}}\) & – \\
8 & \(\textit{PDbl}_{Inst_{1}}\longleftarrow Z_{2}=Z_{2}^{2}\) & \(\textit{PAdd}_{Inst_{6}}\) & – & – & \(\textit{PAdd}_{Inst_{6}}\) & \(\textit{PDbl}_{Inst_{2}}\) & – \\
9 & \(\textit{PDbl}_{Inst_{2}}\longleftarrow T_{1}=Z_{2}^{2}\) & – & \(\textit{PAdd}_{Inst_{6}}\) & \(T_{1}\) & \(\textit{PDbl}_{Inst_{3}}\) & \(\textit{PAdd}_{Inst_{6}}\) & – \\
10 & \(\textit{PDbl}_{Inst_{3}}\longleftarrow T_{1}=b\times T_{1}\) & \(\textit{PAdd}_{Inst_{7}}\) & – & – & \(\textit{PAdd}_{Inst_{7}}\) & \(\textit{PDbl}_{Inst_{3}}\) & – \\
11 & \(\textit{PDbl}_{Inst_{4}}\longleftarrow X_{2}=X_{2}^{2}\) & \(\textit{PDbl}_{Inst_{1}}\) & \(\textit{PAdd}_{Inst_{7}}\) & – & \(\textit{PDbl}_{Inst_{4}}\) & \(\textit{PAdd}_{Inst_{7}}\) & – \\
12 & \(\textit{PDbl}_{Inst_{5}}\longleftarrow Z_{2}=X_{2}\times Z_{2}\) & – & \(\textit{PDbl}_{Inst_{1}}\) & \(Z_{2}\) & – & \(\textit{PDbl}_{Inst_{4}}\) & \(X_{2}\) \\
13 & \(\textit{PDbl}_{Inst_{6}}\longleftarrow X_{2}=X_{2}^{2}\) & \(\textit{PDbl}_{Inst_{2}}\) & – & – & \(\textit{PDbl}_{Inst_{5}}\) & – & – \\
14 & \(\textit{PDbl}_{Inst_{7}}\longleftarrow X_{2}=X_{2}+T_{1}\) & – & \(\textit{PDbl}_{Inst_{2}}\) & \(T_{1}\) & \(\textit{PDbl}_{Inst_{6}}\) & \(\textit{PDbl}_{Inst_{5}}\) & – \\
15 & – & \(\textit{PDbl}_{Inst_{3}}\) & – & – & – & \(\textit{PDbl}_{Inst_{6}}\) & \(X_{2}\) \\
16 & – & \(\textit{PDbl}_{Inst_{4}}\) & \(\textit{PDbl}_{Inst_{3}}\) & – & \(\textit{PDbl}_{Inst_{7}}\) & – & – \\
17 & – & \(\textit{PDbl}_{Inst_{4}}\) & \(\textit{X}_{2}\) & – & \(\textit{PDbl}_{Inst_{7}}\) & – \\
18 & – & \(\textit{PDbl}_{Inst_{5}}\) & – & – & – & – & – \\
19 & – & \(\textit{PDbl}_{Inst_{6}}\) & \(\textit{PDbl}_{Inst_{5}}\) & – & – & – & – \\
20 & – & \(\textit{PDbl}_{Inst_{6}}\) & \(X_{2}\) & – & – & – & – \\
21 & – & \(\textit{PDbl}_{Inst_{7}}\) & – & – & – & – & – \\
22 & – & – & \(\textit{PDbl}_{Inst_{7}}\) & – & – & – & – \\ \hline \end{tabular}
\end{table} 
Table 1: Status of instructions of _PAdd_ and _PDbl_ functions of Algorithm 1 in a two-stage pipelining.