Closed yoshi-ohta closed 3 years ago
Hello @yoshi-ohta
what you have here is the answer to your question.
# trustm_metadata -r 0xE0F3
=======================================================
Device EC Privte Key x [0xE0F3] [Size 0019] :
20 11 C0 01 0F D0 03 E1 FC 07 D3 01 00 E0 01 03
E1 01 13
LcsO:0x0F, C:LcsO<0x07, E:ALW, Algo:ECC256, Key:Auth/Enc/Sign,
LcsO 0x0f means that the Lifecycle State of the Object is set to "termination" (Solution Reference Manual Section 5.3), which means under normal conditions the object isnot usable anymore (also for signing). Theoretically it can be reseted (if you have an Trust M3 sample) with the evalutaion kit and getstarted guide, there are examples on how to generate metadata package to update a specific object. From the other side, it seems that you still can use another key object 0xe0f2, it has still an creation state, an no specific metadata restrictions.
For better metadata management we are preoareing an intuitive tool (python library) to support human readble metadata assignemnt; e.g. like below
{
"lcso": "creation",
"change": [
"lcso",
"<",
"operational"
],
"execute": "always",
"algorithm": "nistp384r1",
"key_usage": "21"
}
@ayushev
Thank you for answering. I understand why I can't write.
Please tell me a little more concretely how to recover. Is the evaluation kit something other than the TrustM IC you are using?
Where are the python tools? Is it below? https://github.com/Infineon/python-optiga-trust
I am still expecting your response regarding my question.
yes, and no https://github.com/Infineon/python-optiga-trust/tree/feature/trust_m3 I'm still working on it, and currently you can't unlock an object is its already locked, but it should come very soon. I'll update the status here once this is ready.
If you want to try it out (it's under development, so some parts might be missing or not working):
cd python-optiga-trust
python --version
or python3 --version
python-optiga-trust/docs/build/html/get_started.html
. The repository is still not fully online, so you can download it on to you linux or windows machine and just open this file.@ayushev
Thank you for your answer.
I understand that it is being implemented.
Python version in my environment is 3.7.2.
# python3 --version
Python 3.7.2
I tried to proceed according to get_started.html, but I can't build because cmake is not included in the OS of my board. If I can install cmake on my OS, I'll check it.
Hi @yoshi-ohta https://github.com/infineon/python-optiga-trust and https://infineon.github.io/python-optiga-trust/ It also works under linux
But I have to disapoint you, I had a look into your metadata, it seems like the key can't be recovered, as the metadata states LcsO:0x0F, C:LcsO<0x07, E:ALW, Algo:ECC256, Key:Auth/Enc/Sign, Lifecycle State (LcsO) : 0x0f - termiantion Change is possible if: LcsO less than 0x07 (operational) Algorithm is ECC256 Key agreement: Authenticaiton + Encryption + Sinature generation
@ayushev
Thank you for your answer. It's disappointing that it can't be recovered, but I understood that we can't be recovered. If Change Status is ALW, can LifecycleSate recover even with 0x0f?
@yoshi-ohta
If Change Status is ALW, can LifecycleSate recover even with 0x0f?
correct
Hi, I used the following command to generate an ECC key and changed the settings to initialize the metadata in the private key area, but I couldn't create the key. How can I recovery it?
Since OID = 0xE0F2 was unused, I tried to set it with reference to this metadata, but an error occurred.