# Secure ECDSA SRAM-PUF Based on Universal Single/Double Scalar Multiplication Architecture
## 4 Hardware Architecture
### The Architecture of Soft-Decision RM Code  
The RM code soft-decision module is one of the core algorithm modules of the ECDSA-PUF hardware. Its hardware structure is shown in Figure 2. The auxiliary calculation architecture (red part) is responsible for executing the recovery stage in Algorithm 2. In contrast, the RM decoding architecture (blue part) is responsible for executing the recursive algorithm as shown in Algorithm A3. The auxiliary calculation architecture comprises core components such as two XOR gates at the input of the arithmetic logical unit (ALU), a comparator with an XOR gate at the output of the ALU, and a look-up table (LUT) for calculating likelihood estimation. These components serve various functions in the recovery phase of Algorithm 2. 1. XOR gates: Two XOR gates at the input of the ALU are utilized to perform XOR operations during the recovery phase. Specifically, they are involved in XORing operations for obtaining \(w^{\prime}\) and \(c^{\prime}\). 2. Comparator with XOR gate: The comparator, coupled with an XOR gate at the ALU's output is responsible for converting the likelihood estimation obtained after calculations into a code word \(c\). The XOR gate in this context contributes to the computation of \(c^{\prime}\). 3. LUT: The LUT is employed to calculate the likelihood estimation using the formula \(\log_{\beta}\frac{1-P}{P}\). Hardware implementation of this logarithmic calculation can be complex. However, due to the limited set of possible error probability values \(P\) derived from 100 instances of power on and off during the registration phase, a pre-calculated LUT is used. The LUT helps obtain the corresponding \(\log_{\beta}\frac{1-P}{P}\) for each \(P\), significantly saving computational time. Additionally, the LUT's corresponding relationship can be randomized to enhance the difficulty of attacker interference. The data path of the auxiliary calculation architecture follows these steps: SRAM outputs the response \(y^{\prime}\), and ROM outputs \(w\), \(x_{P}Z\), and \(P\). The XOR operation between \(w\) and \(x_{P}Z\) yields \(w^{\prime}\), and the XOR operation involving \(y^{\prime}\), \(w^{\prime}\), and \(x_{P}Z\) results in \(c^{\prime}\). Subsequently, \(c^{\prime}\) combines with \(\log_{\beta}\frac{1-P}{P}\) to form the likelihood estimate value \(L\). This value is input into the ALU to execute the recursive algorithm. Upon completion of the recursive algorithm, \(L^{*}\) is output, and the correct codeword \(c\) is obtained after error correction through the  
Figure 2: RM code soft-decision architecture. comparator. Finally, performing XOR with \(w^{\prime}\) and the outer-layer signature verification result \(X\) yields the correct PUF response \(y\). The RM decoding architecture comprises essential components such as the ALU, an address generator, a stack, and a state machine. Each component plays a unique role in the overall function of the recursive module. Here is a breakdown of their roles:  
1. ALU: Performs calculations related to the F function, G function, and accumulation, as specified in Algorithm A3. Facilitates operations such as passing data directly to the next module. 2. Address generator: Generates the current corresponding SRAM read and write addresses based on the algorithm's requirements. 3. Stack: Functions as a cache unit that stores parameters and local variables for each round of recursion. Enables the implementation of a software-driven approach to realize hardware recursion. This approach reduces the complexity of the state machine by offloading certain control aspects to the stack. 4. State machine: Serves as the core control logic for the entire recursive module. Utilizes a software-driven approach, allowing certain steps of the recursion to be expanded into a large state machine. Manages the control of the current recursive round, while the recursion of other rounds is controlled by parameters stored in and retrieved from the stack.