Lab 5 - Physically Unclonable Functions (PUFs)
2026-04-01 | Hackster , Labs , PUFs , Physically Unclonable Functions
Introduction
Physically Unclonable Functions (PUFs) are security primitives that leverage intrinsic hardware variations to generate unique and unpredictable responses to challenges. In this Lab you will gain hands-on experience with Ring-Oscillators and how they can be used to make Ring Oscillator based Physically Unclonable Functions (RO-PUFs). A ring oscillator is a simple type of oscillator circuit that consists of an odd number of inverting logic gates connected in a loop. The inherent delay in each gate causes the signal to propagate through the loop, creating an oscillating output. The frequency of oscillation depends on factors such as temperature, voltage, and unavoidable process variations during chip fabrication. RO-PUFs compare the frequencies of different pairs or arrays of ring oscillators to produce outputs useful for secure authentication, key generation, and hardware integrity verification.
RO-PUFs are particularly valuable in hardware security, as they provide a lightweight and tamper-resistant means of deriving secrets without storing them in traditional memory. In this lab, you will learn how to implement and use RO-PUFs on the Hackster platform.
Goals:
- Understand the basics of a Ring Oscillator
- Implement a Ring Oscillator on the Hackster, characterising length vs. frequency.
- Compare observed frequencies with other students
- Implement a Challenge-Response Physically Unclonable Function based on Ring Oscillators
- Demonstrate how the same hardware gives different results on different Hacksters
- Explore the reliability of your system by computing the inter-board and intra-board probabilities.
Getting Started
Basic RO:
An example is in hackster-programmer/examples/ring_oscillator/ring_oscillator.v
- First, open and understand this circuit.
- Modify the system to output the MSB of a sixteen-bit counter powered by the R-O to port D0 (remembering to set D0 as an input in MicroPython first).
- Then, measure the frequency of the output using the oscilloscope when the R-O is 5 bits, 15 bits, 25 bits, 35 bits, … 95 bits.
- Record these values into a spreadsheet that will be shared by Hammond.
- Then, extend the design to feature an enable input on pin D1, and make it five gates long, before saving it as a R-O.
Challenge-Response:
- You might find it useful to first read the article from Maiti et al. linked in the Resource section. The generic Challenge-Response circuit is presented in Figure 1 of this paper, and reproduced here:

R-O PUF Figure reproduced from Maiti et al.
This circuit, along with the supporting input/output infrastructure, should be your start point for this part of the lab. You may also choose to implement a more comprehensive RO-PUF.
- You now need to design your own PUF, alongside infrastructure for communication - You might choose to implement an SPI or I2C for communicating between AppMicro and the FPGA, or (more simply) you could implement a 4 bit challenge and 4 bit response with 1 bit input trigger on the D0-D8 lines.
For full marks (all 4%), your RO-PUF should be reliable (i.e. it gives the same answer for your board after re-download, and gives a consistent yet different answer on another student’s hackster board). This reliability is obtained by computing probabilities show that the design has “good” intra-board and inter-board measurements.
For intra-board probability, repeatedly re-download and re-compute your PUF circuit on your hackster board and obtain challenge/response pairs, counting the number of consistency/inconsistencies, then use this to compute a probability that you get the correct output for a given input.
For inter-board probability, repeat this but with other student(s) hackster boards (at least 1 other) (but still using your bitstream!). Compute the probability that when given a challenge, their board returns a different response.
Once you’ve got it working, remember to show a video of the same hardware bitstream getting the same result repeatedly on your hackster vs the different result on a different hackster!
Your video should not exceed 90 seconds in length.
Resources
Resources:
- A. Maiti, P. Schaumont, “Improved Ring Oscillator PUF: An FPGA-friendly Secure Primitive,” J Cryptol 24, 375–397 (2011). https://doi.org/10.1007/s00145-010-9088-4
- S. Batabyal, A. A. Bazil Rai, “Design of A Ring Oscillator Based PUF with Enhanced Challenge Response pair and Improved Reliability,” 2019 4th International Conference on Recent Trends on Electronics, Information, Communication & Technology (RTEICT), Bangalore, India, 2019, pp. 1370-1374, https://doi.org/10.1109/RTEICT46194.2019.9016894
Deliverables and Weightings:
This lab is worth 10% of your final grade for this course.
- [2%] Results appended to the shared google sheets for:
- length vs frequency data for plotting
- A zip file containing:
-
[2%]
basic_ro/- This directory contains your basic ring oscillator implementation, with at least the following files:
basic_ro.pcfbasic_ro.vbasic_ro.micropython.py- (MicroPython suitable to run on the Application processor)
- This should set D0 to be an input and set D1 as output
- This directory contains your basic ring oscillator implementation, with at least the following files:
-
[4%]
challenge-response/- a directory containing your challenge response implementation, with at least the following files:
challenge_response.pcfchallenge_response.vchallenge_response.micropython.py- (MicroPython suitable to run on the Application processor)
- You might choose to implement an SPI or I2C for communicating between Application and FPGA, or (more simply) you could implement a 4 bit challenge and 4 bit response with 1 bit trigger on the D0-D8 lines.
probabilities_readme.md- A “mini report” markdown text file presenting your method and data used to compute inter-board and intra-board reliability probabilities for your design.
- Discuss if your results are good or not, and what you did (if anything) to improve the results.
- a directory containing your challenge response implementation, with at least the following files:
-
[2%]
video_link.txtORvideo.mp4- (either a link to UNSW-hosted video or Youtube; or the video itself)
- Show that you can download your file to one hackster and get one challenge-response, download your file to a second hackster and get a different challenge-response.
-
Grading Rubric
Physically Unclonable Functions (10%)
- Criterion:
- (2%) Length / Frequency results in Spreadsheet
- No genuine attempt (0%) No attempt, or completely implausible results.
- Reasonable data (2%) Values appended and seem plausible.
- (2%) Basic Ring Oscillator implementation
- No genuine attempt (0%) No attempt, or completely incoherent design.
- Starter code (1%) R-O functioning but has errors or deviates from the requirements (e.g., no enable input).
- Basic RO (2%) A working ring oscillator design with enable input, and a MicroPython script to read the output on D0.
- (4%) Challenge-Response PUF implementation and reliability analysis
- Fail (0%) No attempt, or completely incoherent design and/or analysis.
- Genuine Attempt (1%) Implementation of a challenge-response design, but it does not work reliably. Probabilities are computed but show poor reliability.
- Partial Success (2-3%) Implementation of a challenge-response design that works but has reliability issues (e.g., high intra-board error rate). Probabilities are computed and show some reliability, but not ideal. May struggle to consistently get the same response on the same board.
- Correct (4%) Implementation of a challenge-response design that works reliably. MicroPython code both able to characterise challenge/response pairs as well as perform tests with probability bounds computed.
- (2%) Video demonstrating different responses on different boards
- Fail (0%) Video is not provided or is significantly flawed or unclear.
- Genuine Attempt (1-2%) Video is less convincing or less clear, either due to poor filmography or poor capture and presentation of evidence. At a minimum, however, the Video shows the same hardware giving different responses on different boards. Video is not longer than 90 seconds in length.
- Correct (2%) Video clearly and convincingly presents the functioning RO-PUF with at least two iterations on the developer board showing consistent results, then shows at least two iterations on a different board showing consistently different results.
- (2%) Length / Frequency results in Spreadsheet