![]() |
xilpuf
Vitis Drivers API Documentation
|
This file illustrates encryption and decryption of user data using PUF KEY.
The key can be generated using either PUF registration or PUF on demand regeneration. To build this application, xilmailbox library must be included in BSP and xilsecure must be in client mode and xilpuf in server mode
This example is supported for Versal and Versal Net devices.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 har 01/30/20 Initial release 1.1 har 01/30/20 Updated file version to 1.1 to sync with library version har 03/08/20 Added function to print array Corrected endianness of PUF helper data 1.2 har 07/03/20 Corrected the length of PUF ID passed in XPuf_ShowData am 08/14/20 Replacing function prototype and local status variable from u32 and s32 to int. har 09/30/20 Replaced XPuf_printf with xil_printf 1.3 har 01/04/21 Added check and updated comments for XPUF_DATA_LEN_IN_BYTES har 04/14/21 Modified code to use client side APIs of Xilsecure 1.4 kpt 12/02/21 Replaced standard library utility functions with xilinx maintained functions har 01/20/22 Removed inclusion of xil_mem.h har 03/04/22 Added comment to specify mode of libraries Added shared memory allocation for client APIs kpt 03/18/22 Removed IPI related code and added mailbox support har 03/31/22 Updated default data and data size 2.1 am 04/13/23 Fix PUF auxiliary convergence error 2.2 am 05/03/23 Added KAT before crypto usage vss 11/22/23 Added header file required for SDT flow
#define XPUF_DATA "0123456789ABCDEF0123456789ABCDEF" Data to be encrypted by PUF KEY should be provided in string format.
#define XPUF_DATA_LEN_IN_BYTES (16U) Length of data to be encrypted should be provided in bytes, where number of bytes must be a multiple of 4.
#define XPUF_IV "000000000000000000000000" IV should be provided in string format. It should be 24 characters long, valid characters are 0-9, a-f, A-F. Any other character is considered as invalid string. The value mentioned here will be converted to hex buffer. It is used with the AES-GCM cryptographic hardware in order to encrypt user data.
#define XPUF_KEY_GENERATE_OPTION (XPUF_REGISTRATION)
(or)
(XPUF_REGEN_ON_DEMAND)
PUF helper data can be generated by PUF registration or PUF on-demand
regeneration. The user can configure XPUF_KEY_GENERATE_OPTION as either
XPUF_REGISTRATION or XPUF_REGEN_ON_DEMAND to select the mode of PUF operation
to generate helper data #define XPUF_READ_HD_OPTION (XPUF_READ_FROM_RAM)
(or)
(XPUF_READ_FROM_EFUSE_CACHE)
This selects the location from where the helper data must be read by the
application. This option must be configured if XPUF_KEY_GENERATE_OPTION
is configured as XPUF_REGEN_ON_DEMAND.#define XPUF_CHASH (0x00000000) The length of CHASH should be 24 bits. It is valid only for PUF regeneration and invalid for PUF registration. CHASH value should be supplied if XPUF_READ_HD_OPTION is configured as XPUF_READ_FROM_RAM.
#define XPUF_AUX (0x00000000) The length of AUX should be 32 bits. It is valid only for PUF regeneration and invalid for PUF registration. AUX value should be supplied if XPUF_READ_HD_OPTION is configured as XPUF_READ_FROM_RAM.
#define XPUF_SYN_DATA_ADDRESS (0x00000000) Address of syndrome data should be supplied if XPUF_READ_HD_OPTION is configured as XPUF_READ_FROM_RAM.
#define XPUF_GLBL_VAR_FLTR_OPTION (TRUE) It is recommended to always enable this option to ensure entropy. It can be configured as FALSE to disable Global Variation Filter.