userkeys - 2022.2 English

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
UG1400
Release Date
2023-01-02
Version
2022.2 English

Syntax

userkeys = <filename>                              

File Format

user_key0 <userkey0 value>                                     
user_key1 <userkey1 value>                                     
user_key2 <userkey2 value>                                     
user_key3 <userkey3 value>                                      
user_key4 <userkey4 value>                                      
user_key5 <userkey5 value>                                    
user_key6 <userkey6 value>                                     
user_key7 <userkey7 value>

Description

The path to the user keyfile. The keyfile contains user keys used to encrypt the partitions. The size of user key can be 128 or 256 bits. The 128-bit key can be used only for run-time loaded partitions.

Example

In the following example, FPD partition uses the key source as user_key2, so the .nky file for this partition must have the user_key2 from the userkeys file as the key0. This key0 from the .nky file is then used by Bootgen for encryption. The PLM uses the user_key2 programmed by pmc_data during decryption.

new_bif:
{
 userkeys = userkeyfile.txt
 id_code = 0x14ca8093
 extended_id_code = 0x01
 id = 0x2
 image
 {
  name = pmc_subsys
  id = 0x1c000001
  partition
  {
   id = 0x01
   type = bootloader
   encryption = aes
   keysrc=bbram_red_key
   aeskeyfile = inputs/keys/enc/bbram_red_key.nky
   dpacm_enable
   file = gen_files/plm.elf
  }
  partition
  {
   id = 0x09
   type = pmcdata, load = 0xf2000000
   file = gen_files/pmc_data.cdo
  }
 }
 image
 {
  name = lpd
  id = 0x4210002
  partition
  {
   id = 0x0C
   type = cdo
   file = gen_files/lpd_data.cdo
  }
  partition
  {
   id = 0x0B
   core = psm
   file = static_files/psm_fw.elf
  }
 }
 image
 {
  name = pl_cfi
  id = 0x18700000
  partition
  {
   id = 0x03
   type = cdo
   file = design_1_wrapper.rcdo
  }
  partition
  {
   id = 0x05
   type = cdo
   file = design_1_wrapper.rnpi
  }
 }
 image
 {
  name = fpd
  id = 0x420c003
  partition
  {
   id = 0x08
   type = cdo
   file = gen_files/fpd_data.cdo
   encryption = aes
   keysrc=user_key2
   aeskeyfile = userkey2.nky
  }
 }
 image
 {
  name = ss_apu
  id = 0x1c000000
  partition
  { 
   id = 0x61
   core = a72-0
   file = ./wrk_a72_r5/perip_a72/Debug/perip_a72.elf 
  }
 }
}