Two types of unique identifiers (UIs) are available for use: device DNA and user eFUSE. These UIs can be used as anti-cloning security measures (for instance, someone steals the user’s bitstream and uses it to program their own devices) or for enabling or disabling certain features (upgrade or downgrade) depending on the value of the UI.
Device DNA consists of a 96-bit device-specific serial number and is set by AMD in one-time programmable (OTP) eFUSE bits on the FPGA during the manufacturing flow (FPGA logic read access to the value is via the DNA_PORTE2 primitive, or it can be read externally via JTAG). User eFUSE provides 32 bits of user read/write OTP area and is set by the user via JTAG (FPGA logic read access to the value is via the EFUSE_USR primitive). Both of these UIs can be used separately or in conjunction for security purposes.
These UIs can be used to link the bitstream to one particular device (in the case of device DNA, or multiple devices in the case of user eFUSE). The UI comparison is put into the FPGA design by the user and the results of this comparison can be used to gate FPGA activity. For example, if the UI comparison fails, the design can refuse to function or function with limited capability. An example use case of the UIs is as follows:
- Setup: Read the UI value(s) from the FPGA via JTAG, generate a hash from the
UI value(s), and store in a flash device accessible to the FPGA using a robust
one-way function (a keyed type is the most secure) as shown in the following
figure.Figure 1. Encrypt the DNA Value with a Confidential KeyThe key for the one-way function shown in the following figure could be stored within the encrypted bitstream. If bitstream encryption is not used, this approach relies on the complexity of the bitstream to keep the key confidential.
- Configure the FPGA.
- Compare: The FPGA design reads the UI value from either or both the DNA_PORT
and EFUSE_USR primitive(s) and then calculates the checksum using the same
algorithm. The design then compares the calculated hash with the hash read from
flash. If the hash passes, the design is allowed to become active.Figure 2. Hash ComparisonFor additional information on these UIs, consult the UltraScale Architecture Configuration User Guide (UG570). Security Solutions Using Spartan-3 Generation FPGAs (WP266) also talks about device DNA operation for the AMD Spartan™ -3 generation FPGAs.