# Phase Calibrated Ring Oscillator PUF Design and Application
## 5 PCPUF Application
### Unstable-Stable Response  
Modeling and machine learning attacks are well known for PUF adversaries. The successful prediction is due to the accurate calculation and measurement of physical parameters such as delay and frequency. To achieve a secure PUF-based solution against those attacks, we propose a novel method to generate responses, which uses the instability of PUFs. Since the unstable bits in the RO PUF response are hard to predict, they provide a better security guarantee than the stable ones. In the past, these unstable bits have been simply considered for random number generation applications. For other scenarios, only stable bits are usually required. In our work, we find the possibility to transfer unstable bits to stable bits and apply them to PUF responses, which are presented as Unstable-Stable Responses (USR), a more stable and secure response. Figure 15 shows how to generate USR with a PCPUF. We set another hash function module out of the PCPUF, which can provide multiple sub-challenges with only one challenge input. Once a sub-challenge is created, it is sent to the challenge register for temporary storage. By reading the value from the register, PCPUF selects two RO pairs and keeps outputting the one-bit response to the first address of the unstable bit counter 1000 times. The accumulated value in the counter reflects the stability of this output. A number that is close to zero or 1000 is known to be stable, while 500 is regarded as the most unstable. With the help of the internal hash function module, the model generates a 128-bit raw response and stores it in the counter. Since PCPUFs provide good stability in their responses, the obvious unstable bits become so limited that less than one unstable bit can be found in 128 bits. In the unstable bit counter, we mark the unstable bits as '1' and stable ones as '0'. The counter records the number of ones and sends the 128 bits to the response register. Obviously, a 128-bit response marked with only unstable bits is highly-biased towards zeroes. Therefore, the counter enables the hash function module in order to launch the next progress with a different internal challenge. Another raw response is generated and transferred to an internal response in the counter. We apply a bitwise OR operation to this internal response and the one that was previously stored in the response register. After updating the register value, the new response should have a higher probability of containing more ones. By repeating the same process, the response in the register will eventually reach a balance between '1' and '0'. Now, it is ready to serve as the final response. Note that the current design cannot guarantee a static threshold of how many times the process should be executed. The first reason is that the unstable bits selected by the hash function module are not controllable. Secondly, the ones in two responses may be overlapped. Thus, the amount of ones is reduced by the OR operation. To estimate the threshold, we define \(u\) as the number of unstable bits in the 128-bit internal response. The probability that a certain bit is not set to '1' in one process is \(1-\frac{u}{128}\). If we assume that the process in Figure 15 is repeated \(n\) times, the probability that the bit is not set to '1' after \(n\) process iterations is:  
\[p_{0}=(1-\frac{u}{128})^{n} \tag{5}\]  
The probability that it is '1' is therefore:  
\[p_{1}=1-(1-\frac{u}{128})^{n} \tag{6}\]  
Given the 128 bits in the complete response, we should have on average 64 ones and 64 zeroes. Since the 128 bits are independent, we can calculate the expected number of ones as \(128p_{1}\). In order tohave the expected 64 ones, \(p_{1}\) should thus equal \(\frac{64}{128}\). Plugging in Equation (6), we can calculate that \(n\) should be:  
\[n\frac{\log 0.5}{\log(1-\frac{n}{128})} \tag{7}\]  
By solving the equation, we are able to set a reasonable threshold in order to control the bias. When the unstable bits is 0.5%, \(n\) is about 138.