## 3 MRAM TAPUF Design
### Bit Generation  
To generate cryptographic bits, the server selects random addresses and then sends them to the client. The server utilizes software to compare the resistances of cell pairs in the database and generate an output bit. On the other hand, the client employs physical MRAM devices and analog circuitry to compare the resistances of cell pairs and generate an output bit. In an ideal scenario, the bits generated from the database and those generated from physical measurements should be identical. However, due to random variations in cell queries, there might be practical discrepancies between the two sets of bits.  
TAPUFs generate three possible values for each trit: 0, X, or 1. These values are derived from the relative resistance of the TAPUF, which is measured in voltage. The classification of each trit is determined by the voltage difference between the two analog responses of a challenge pair.  
Challenge pairs classified as X have a smaller voltage difference than those classified as 0 or 1. The reason for this is that challenge pairs with a smaller voltage difference are more vulnerable to variations in measurements, noise, or external interference. Hence,  
Figure 2: Block diagram of MRAM PUF design. In this design, the MRAM TAPUF operates by receiving a challenge from a server along with enrollment information. The challenge consists of a pair of addresses representing the locations of two MRAM cells. The electrical resistances of these MRAM cells are converted into a voltage, and a response is generated based on which voltage is higher.  
they are assigned the X classification to indicate their higher susceptibility. The state X is used internally to keep track of the unstable bits, and only states 0 and 1 are used to generate responses.  
It is important to note that in the cryptographic protocols that we are studying, the TAPUF only uses the 0 and 1 responses. The X states are filtered internally. At a system level, the TAPUF behaves as a normal binary PUF, with binary streams of responses.  
The voltage difference thresholds used to classify trits depend on the specific cryptographic protocol employed. In the context of this paper, the thresholds for trit classification are defined as the responses that fall within the bottom and top 25 th percentiles. It is important to highlight that these thresholds can be adjusted to align with the requirements of different protocols.  
The equation for bit generation and classification is provided in Equation (1). In this equation, we utilize \(V_{A}\) and \(V_{B}\) to represent the voltage responses obtained from the selected MRAM cells. Additionally, \(V_{T}\) is used to represent the voltage threshold used for trit classification.  
\[\begin{array}{l}V_{\Delta}=V_{A}-V_{B}\\ \text{If }|V_{\Delta}|<V_{T},\text{CRP is classified as an `X'}\\ \text{Else if }V_{\Delta}>0,\text{CRP is classified as a `1'}\\ \text{Else if }V_{\Delta}<0,\text{CRP is classified as a `0'}\end{array} \tag{1}\]  
By considering the voltage difference between analog responses and applying appropriate thresholds, TAPUFs are able to classify trits as 0, X, or 1, effectively capturing variations and susceptibility to measurement and environmental factors.