What will be the modifications in the code of 'FeedForwardArbiterPUF' on https://github.com/nils-wisiol/pypuf/blob/main/pypuf/simulation/delay.py
Closed this issue · 1 comments
If someone wants to generate feedforward loop response from two arbiters, what should the modification of 'FeedForwardArbiterPUF' class in 'delay.py'
Like in all Simulation
classes, The val
function computes the PUF responses. For the Feed Forward Arbiter PUF, this requires computing the feed forward bits; only after the final response bit can be computed.
One way of doing that would be to iterate through the feed-forward bits, computing each bit separately, before constructing the final challenge to the complete Arbiter PUF and then evaluating the final result.
In the current code, the computation is optimized to save some simulation time. If all feed-forward bits are computed separately, the delays for the early stages in the PUF are computed repeatedly, which may not be necessary.
The loop computes the delay differences in kind of a sweep-line fashion: The delay difference is computed from the start to the first feed-forward-bit arbiter, then from there to the next feed-forward-bit arbiter, and so on, then from the last feed-forward-bit to the final-bit arbiter. That way, no delays have to be computed twice.
Note that the final-bit arbiter can be seen as another feed-forward arbiter element that does not feed to anywhere in the challenge. Hence in the loop, the iteration is over all user-provided feed-forward elements as provided in ff
and over (n + len(ff), None)
, representing the final arbiter element. None
in this context means that the resulting bit will not be included in the challenge.
One way of modifying this procedure with your idea could be to define arbiters and feed-points separately in a dictionary mapping the feed-points to the arbiter points, such as ff = {20: [8, 16], 30: [24]}
. In this example, a function of the bits taken after position 8 and 16 are fed into position 20; the bit taken after position 24 is fed into 30. The function of 8 and 16 has to be evaluated when the loop has finished evaluating bit 16.
pypuf has a small number of tests for FeedForwardArbiterPUF, I suggest you extend these tests to cover your code if you create any modifications to make sure that everything works as expected.