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:

  1. Understand the basics of a Ring Oscillator
    • Implement a Ring Oscillator on the Hackster, characterising length vs. frequency.
    • Compare observed frequencies with other students
  2. 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

  1. First, open and understand this circuit.
  2. 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).
  3. 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.
  4. Record these values into a spreadsheet that will be shared by Hammond.
  5. 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:

  1. 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.

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.

  1. 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:

Deliverables and Weightings:

This lab is worth 10% of your final grade for this course.

Grading Rubric

Physically Unclonable Functions (10%)