PUF Encryption Decryption Demo Application

External Secure Storage Using the PUF (XAPP1333)

Document ID
Release Date
1.2 English

The PUF can now be used for encrypting and decrypting user data because the ZCU102 development board has been provisioned. Specifically, this section uses a reference design to show how to encrypt and decrypt user generated AES keys that are stored on an SD card.

1. To support the SD card storage the xilffs library has to be added to application BSP. Right-click on the platform.spr that is located under ZCU102_XAPP1333 platform in the Explorer view and click Open .

2. Select Board Support Package under standalone on psu_cortexa53_0 in the ZCU102_XAPP1333 platform view and click Modify BSP settings .

3. Select xilffs library in the Board Support Package Settings window.  Click on the xilffs library that appears on the left in Overview -> standalone and set the enable_exfat configuration parameter to true . Click OK.

These settings are shown in the following figure :

Figure 13: Configuring Board Support Package Settings in Xilinx Vitis – Standalone Library Configuration

X-Ref Target - Figure 13


4. Right-click the ZCU102_XAPP1333 platform in the Explorer view, which is now marked as out-of-date, and click Build Project .

5. In Xilinx Vitis, click File > New > Application Project . If Create a New Application Project window appear click Next .

6. Select ZCU102_XAPP1333 platform in the Platform Window and click Next .

7. Type in ExternalKeyStorage in the Application project name:

8. Leave remaining parameters at their default value and click Next.

9. Leave the domain as standalone on psu_cortexa53_0 . These settings are shown in This Figure , This Figure , and This Figure .

10. Select Next .

11. Select Empty Application (C) .

12. Click Finish .

13. Expand the src folder in ExternalKeyStorage of the Project explorer window.

14. Right-click src and select Import Sources .

15. Click Browse in the File system window.

16. Navigate to the ExternalKeyStorage/src folder in the reference design file directory and check all “.c” and “.h” files and then click Finish as shown in This Figure .

Figure 14: Creating the ExternalKeyStorage Project in Xilinx Vitis – Platform Selection

X-Ref Target - Figure 14

Figure 15: Creating the ExternalKeyStorage Project in Xilinx Vitis – System Selection

X-Ref Target - Figure 15

Figure 16: Creating the ExternalKeyStorage Project in Xilinx Vitis – Domain Selection

X-Ref Target - Figure 16

Figure 17: Importing Files from the Reference Design into the ExternalKeyStorage Project

X-Ref Target - Figure 17


17. Create a new file called ExternalKeyStorage.bif in the ExternalKeyStorage folder. This file is also included with the design files and can be copied into the project folder but the paths must be updated to point to the correct folders. Manual creation of the BIF file is necessary to use the Black Key during boot as the Create Boot Image tool within Xilinx Vitis does not currently support this feature. Future revisions of Xilinx Vitis may support this feature.

18. Update the contents of the file to the contents shown in the following figure using the correct paths.

Figure 18: ExternalKeyStorage.bif File

X-Ref Target - Figure 18


19. Build the ExternalKeyStorage project in Xilinx Vitis.

20. From the command prompt in the ExternalKeyStorage folder run the following command: bootgen –p zcu9eg –arch zynqmp –image ExternalKeyStorage.bif –w –o BOOT.bin

21. Power off the ZCU102 board.

22. Copy BOOT.bin to a blank SD card.

23. Load the SD card into the J100 SD slot on the ZCU102 development board.

24. Connect a USB cable from the USB Serial port J83 on the ZCU102 board to a computer and make note of which COM port was enumerated with the Silicon Labs Quad CP2108 USB to UART Bridge: Interface 0.

25. Open a terminal program such as PuTTY or Tera Term and connect to the COM port listed above at 115,200 baud. Enable terminal logging and select a file name and location.

Figure 19: ZCU102 SD Boot Mode Switch Setting

X-Ref Target - Figure 19