I used the Advanced feature of the "Create Zynq Boot Image" to enable encryption and to generate the encryption key.
The generated key has the following format:
Key 0 84C860DEECA88034E19FD0B285B184A33FE2838847842C5EB6AA64768ACE6BFC;
Key StartCBC DE0DC7E760DCAC2840E482D1DBDE2E29;
Key HMAC 84C860DEECA88034E19FD0B285B184A33FE2838847842C5EB6AA64768ACE6BFC;
I then used this key to program the device using iMPACT and I got this message. The device programming then fails with the following error:
"A NKY file describing an xc is about to be assigned to a device previously identified as an xc7z020. Are you sure you want to do this?"
Whenever there is no attribute called [aeskeyfile] in the bif file, and encrypt option is passed from the command line, then a key file is generated with the same file name as that of the bif file and extension .nky. The device information is missing in the key file generated.
For getting the device information into the key file, please use the command line option p.
bootgen.exe -image test.bif -w -o BOOT.bin -p xc7z020clg484 -encrypt efuse
This will generate a key file with the device name embedded into it.