cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tassenpudding
Observer
Observer
409 Views
Registered: ‎01-28-2019

Bugreport xilskey xilskey_utils.c

Hello,

I found a bug while using the secure_key_driver from the XAPP1175 Design Files you an dowload in DocNav.

It is not exactly in the secure_key_driver but in the BSP:

xilskey_v6_7 library in file xilskey_utils.c line 701

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

The first Line will never be true. I debugged it and if I run the secure_key_driver I get the following values:

Len = 64 and strlen(Str)*4U = 256.

In my opinion the *4U should be removed so the programs works correctly. I did and it works.

Next Problem following this: Line 707

while (ConvertedLen < (Len/4U)) {

So only the first 16 characters are being set if i print out RasKeyHashValue afterwards, the last 48 characters are mostly zero, some are 4 or 8 (i think thats normal for uninitialized memory when single bits flip to high instead of low)

So i removed the "/4U" and got the correct print with all 64 Characters

	printf("RsaKeyHashValue:\r\n");
	for (int i = 0; i < 32; i++) {
		printf("%02x", PsInstancePtr->RsaKeyHashValue[i]);
	

Is this right or did I miss something?

Greetings

Marvin

 

EDIT:

I removed the text here, i used a too old version of xilskey_efuse_example.c. Now i am using the current version I get in the XSDK -> BSP -> system.mss -> scroll down Libraries xilskey 6.7 Import Examples.

0 Kudos
0 Replies