Infineon / optiga-trust-x

OPTIGA™ Trust X Software Framework
MIT License
37 stars 19 forks source link

Storing data on the GP memory #26

Closed dogusural closed 5 years ago

dogusural commented 5 years ago

Hello , I am trying to use the chip for secure data storage but writing to some OIDs directly doesn't

work as expected. I can write & read what I wrote to memory regions between F1D0- F1DF by

using _optiga_util_writedata and _optiga_util_readdata. Although the functions return

_OPTIGA_LIBSUCCESS , I cant seem to read what I wrote to OIDS F1E0, F1E2 and E0E8. I

believe I will have to set up the meta data for these regions before I can put my persistent data

there. The page under the wiki didn't really help me much . How can I set the OIDS so that I can

write & read to them and the data stays there until I overwrite and can be modified anytime ?

dogusural commented 5 years ago

I have been reading the Wiki and the solution reference manual since yesterday evening and honestly I have no idea how to set the GP memory for simple read / write operations. Can you please help me ?

pwiegele commented 5 years ago

F1E0 and E0E8 are working on my end. F1E2 is not a valid object ID. Seems like the your problem is solved?

dogusural commented 5 years ago

Yes I figured F1E2 wouldnt be a valid location to write, can you show me where it is mentioned that that object is not valid ? Because on the wiki it says General Purpose Data 2.

pwiegele commented 5 years ago

Your are right there is a mistake. (see here)