UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer nrubeli
Observer
245 Views
Registered: ‎10-24-2019

Bug Report - Xilskey library

When using the secure key driver to load the hash of a RSA PPK into the PS eFuse (following XAPP1175) the PS Data Initialization is going to fail. This due to an error in the following function:

PsStatus = XilSKey_Efuse_ConvertStringToHexBE(
					XSK_EFUSEPS_RSA_KEY_HASH_VALUE,
					&(PsInstancePtr->RsaKeyHashValue[0]), 64);
if(PsStatus != XST_SUCCESS) {
      return PsStatus;
}

In this function it fails at this particular part:

u32 XilSKey_Efuse_ConvertStringToHexBE(const char * Str, u8 * Buf, u32 Len)
{
.
.
.
if(Len != (strlen(Str)*4U)) {
		Status=(u32)XSK_EFUSEPS_ERROR_PARAMETER_NULL;
		goto END;
.
.
. }

Len is a hardcoded 64 and Str is the ppk hash (string containing 64 chars)...

So it actually executes:

if(64 != (64*4U)) {
		Status=(u32)XSK_EFUSEPS_ERROR_PARAMETER_NULL;
		goto END;
}

Len is therefore tha length of the hash in bits and should be 256 and not 64!

Best regards

0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
166 Views
Registered: ‎10-11-2011

Re: Bug Report - Xilskey library

Which version of the tool is this? Which example does have this call?

PsStatus = XilSKey_Efuse_ConvertStringToHexBE(XSK_EFUSEPS_RSA_KEY_HASH_VALUE,&(PsInstancePtr->RsaKeyHashValue[0]), 64);

 

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer nrubeli
Observer
134 Views
Registered: ‎10-24-2019

Re: Bug Report - Xilskey library

I downloaded it using the link provided in the xapp1175 docu.

The zip folder includes an readme which states date last modified: 13AUG2019 Version (1.2)

BUT: The included xilskey_efuse_example.c file is still version 1.00a (first release)

The referenced function:

PsStatus = XilSKey_Efuse_ConvertStringToHexBE(
XSK_EFUSEPS_RSA_KEY_HASH_VALUE,
&(PsInstancePtr->RsaKeyHashValue[0]), 64); is defined in xilskey_utils.c which in turn is version 6.7

I hope that helps

 

0 Kudos
Xilinx Employee
Xilinx Employee
104 Views
Registered: ‎10-11-2011

Re: Bug Report - Xilskey library

The example has been fixed for the 2020.1 release.

Thanks for reporting this.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos