LPC55S69 PUF Start: activation code / aperture

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC55S69 PUF Start: activation code / aperture

Jump to solution
1,621 Views
Anonymous
Deactivated User

Hi

I am using the LPCXpresso55S69-EVK board and have some questions regarding PUF and the activation code. I run the example script named "lpcxpresso55s69_puf".

1) During the PUF_Enroll statement, a device specific AC is generated. In the AN12324 it states that "The AC can be stored into the RAM or flash memory for further usage". Am I right that the AC is ALWAYS automatically stored in the PFR? And if I want it in RAM, I have to store it there extra?

2) The PUF_Enroll command is/should only be done once. So, lets say I have enrolled the PUF periphery and the AC is stored in the PFR. Now, I want to use the PUF, so I have to PUF_Start it and give the PUF periphery the activation code. How do I do that?
In the example provided, the AC is stored into a variable in RAM during the enrollment process, which is then reused for the PUF_Start. But in the described case, there would be no variable in RAM containing the AC. I would need to get it from the PFR. I found an API function for that: FFR_KeystoreGetAC. But this gives me just 0es and thus cannot start the PUF periphery...

3) Regarding the FFR_KeystoreGetAC command. In the UM11126 there is the following remark: "Check if the flash aperture is small or regular and read the data appropriately".
So I could read out the aperture of my device by reading at address 0x40034FFC. The aperture-byte is 0, which, according to the UM, means that I have an aperture of 4K. But what is aperture exactly? Is 4K small or regular? And how can I adjust the FFR_KeystoreGetAC command accordingly to an aperture?

So, my code looks approximately as this:

flash_config_t flashConfig;
uint8_t AC[1192];
status_t Status;
puf_config_t conf;
status_t result;

Status=FLASH_Init(&flashConfig);
Status=FFR_Init(&flashConfig);
Status=FFR_KeystoreGetAC(&flashConfig, (uint8_t *) AC); //AC consists of 1192 x 0

PUF_GetDefaultConfig(&conf);
result=PUF_Init(PUF,&conf);
result=PUF_Start(PUF, AC, sizeof(AC));
******* here the variable "result" holds the statement, that there was an error during start *******

0 Kudos
Reply
1 Solution
1,579 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

Yes, we need save the  AC to flash or ram by hand, not automatically.

1) I recommend you in development phase, save the AC in normal flash, not FPR, about detail

code, you can refer to  AN12324:

https://www.nxp.com.cn/docs/en/application-note/AN12324.pdf 

https://www.nxp.com.cn/docs/en/application-note-software/AN12324SW.zip 

Alice_Yang_0-1606463501559.png

2)If you want to save AC to PFR, there is API, you mentioned is right,

"status_t FFR_KeystoreWrite(flash_config_t *config, ffr_key_store_t *pKeyStore)"

 this API is store AC and KC at the same time, there is no demo, while you can refer to the API in the AN12324. Also there is ISP command (key-provisionin)that can save AC to PFR, the AN12324 also mentioned this, you can check.

Alice_Yang_1-1606464538112.png

And you can also refer to https://www.nxp.com.cn/docs/en/application-note/AN12527.pdf , It describe the processing using blhost to use PUF:

 
 

222222222.jpg

 

Regards.

Alice

View solution in original post

4 Replies
1,608 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

1) "Am I right that the AC is ALWAYS automatically stored in the PFR? And if I want it in RAM, I have to store it there extra?"

->> No, you can save it in PFR or RAM.

 

First of all, recommend you refer to the puf demo under SDK, you will have a better understanding of the processing.

 

Regards,

Alice

0 Kudos
Reply
1,589 Views
Anonymous
Deactivated User

Hi Alice,

I am using/experimenting with the SDK PUF example "lpcxpresso55s69_puf". In this example, the AC is stored in a variable (so RAM) during the PUF_Enroll process:

result = PUF_Enroll(PUF, activationCode, sizeof(activationCode));

This variable "activationCode" is then inputted into the PUF_Start function.

I was now wondering that in a real system you would not Enroll the PUF everytime but only once. So you would not have the activationCode variable ready in your real implementation. You would need to extract it from wherever it is stored (so the PFR).

By reading the User Manual I just assumed that the PUF_Enroll function automatically stores the AC in the PFR. If this is not the case, I assume I have to use the API functions. I found the ffr_keystore_write function. But how does that function decide where to write in PFR? Or is that not my concern?

status_t FFR_KeystoreWrite(flash_config_t *config, ffr_key_store_t *pKeyStore)

So I would only need the pointer to the configuration and a pointer to the activation code in RAM?

Best

Ximena

0 Kudos
Reply
1,580 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

Yes, we need save the  AC to flash or ram by hand, not automatically.

1) I recommend you in development phase, save the AC in normal flash, not FPR, about detail

code, you can refer to  AN12324:

https://www.nxp.com.cn/docs/en/application-note/AN12324.pdf 

https://www.nxp.com.cn/docs/en/application-note-software/AN12324SW.zip 

Alice_Yang_0-1606463501559.png

2)If you want to save AC to PFR, there is API, you mentioned is right,

"status_t FFR_KeystoreWrite(flash_config_t *config, ffr_key_store_t *pKeyStore)"

 this API is store AC and KC at the same time, there is no demo, while you can refer to the API in the AN12324. Also there is ISP command (key-provisionin)that can save AC to PFR, the AN12324 also mentioned this, you can check.

Alice_Yang_1-1606464538112.png

And you can also refer to https://www.nxp.com.cn/docs/en/application-note/AN12527.pdf , It describe the processing using blhost to use PUF:

 
 

222222222.jpg

 

Regards.

Alice

1,572 Views
Anonymous
Deactivated User

Dear Alice,

many many thanks for the explanation. I got it now!

All the best

Ximena

0 Kudos
Reply