Key Agility (Response) - Key Agility (Response) - XAPP1098

Developing Tamper-Resistant Designs with UltraScale and UltraScale+ FPGAs (XAPP1098)

Document ID
XAPP1098
Release Date
2025-05-22
Revision
1.5.1 English

Key agility refers to the ability to update or change the AES bitstream decryption key in BBRAM via the FPGA logic. This does not apply to eFUSE-based keys.

In the following figure, an UltraScale/UltraScale+ FPGA is shown with its initial key already loaded into BBRAM. You can then load in an external encrypted bitstream, decrypt it, and then have the initial FPGA logic design up and running.

Figure 1. UltraScale/UltraScale+ FPGA with Key Loaded into BBRAM x1098_10 Sheet.4 X1098_10_082018 X1098_10_082018 Sheet.1 Initial Fabric Design (decrypted with initial key) Initial Fabric Design(decrypted with initial key) Sheet.2 UltraScale/UltraScale+ FPGA UltraScale/UltraScale+ FPGA Sheet.3 External Encrypted Bitstream Source External Encrypted Bitstream Source 1-D single.16 Sheet.6 Initial Key (BBRAM) Initial Key (BBRAM)

At some time in the future, a key management event occurs, which means that the key requires to be changed or updated due to a security breach, good cryptographic practice, or new design. By using some sort of secure key exchange algorithm (which would be an IP core running in FPGA logic, such as the Diffie-Hellman protocol) you can bring in an external encrypted key, perhaps even via the Internet. Then, you can decrypt this key with the IP core, load it into BBRAM, and perform the integrity check internally via the MASTER_JTAG primitive, as shown in the following figure.

Figure 2. Key Management Event x1098_11 Sheet.1 Initial Fabric Design (decrypted with initial key) Initial Fabric Design(decrypted with initial key) Sheet.2 UltraScale/UltraScale+ FPGA UltraScale/UltraScale+ FPGA Sheet.3 X1098_11_082018 X1098_11_082018 1-D single.491 Sheet.7 New Key (BBRAM) New Key (BBRAM) Sheet.8 External Encrypted Key Source External Encrypted Key Source 1-D single.9 Sheet.10 PASS PASS Sheet.11 WRITE ONLY WRITEONLY Sheet.12 Sheet.4 Secure Key Exchange (Soft IP) Secure Key Exchange (Soft IP) Sheet.13 Via MASTER_JTAG Primitive Via MASTER_JTAG Primitive Sheet.14 Key.493 Sheet.23 Sheet.24 Sheet.25 Sheet.26 Sheet.27 Sheet.28

You can then load in an external encrypted bitstream (encrypted on the new key), decrypt it, and have a new fabric design that was decrypted with this new key as shown in the following figure.

Figure 3. New Fabric Design x1098_12 Sheet.1 X1098_12_082018 X1098_12_082018 Sheet.2 New Fabric Design (decrypted with new key) New Fabric Design(decrypted with new key) Sheet.3 UltraScale/UltraScale+ FPGA UltraScale/UltraScale+ FPGA Sheet.4 External Encrypted Bitstream Source External Encrypted Bitstream Source 1-D single.16 Sheet.6 New Key (BBRAM) New Key (BBRAM)

Using the above scheme, it is possible to update the key in the field without having to bring the board or the system all the way back to a secure facility.