[kmac] sideload key error hangs the DUT
Hi Eunchan,
Currently, the StKeyMgrErrKeyNotValid state in kmac_app does not have any way to transition back to the Idle/Reset states, so if I create an error on the AppKeyMgr interface by not providing a valid sideload key, the DUT hangs until a full reset is issued.
My understanding (please correct me if I'm wrong) was that these errors should be read and cleared by SW, not requiring a reset due to terminal design state, should this state be fixed to reset the App interface once the error is cleared?
At this moment, there's no clear error handling process yet in KMAC.
I think your idea is better. Wait SW's response and give a way for SW to move the state back to Idle.
On May 22, 2021, at 3:47 AM, udinator @.***> wrote:
Hi Eunchan,
Currently, the StKeyMgrErrKeyNotValid state in kmac_app does not have any way to transition back to the Idle/Reset states, so if I create an error on the AppKeyMgr interface by not providing a valid sideload key, the DUT hangs until a full reset is issued.
My understanding (please correct me if I'm wrong) was that these errors should be read and cleared by SW, not requiring a reset due to terminal design state, should this state be fixed to reset the App interface once the error is cleared?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/6672, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJDG3XMUECU35T7J54SNBTTO2TCJANCNFSM45JVWOLA.
quick question, when this error occurs, does an error get sent back to key manager as well?
@eunchan can correct me if I'm mistaken, but I don't believe any report will be sent to the keymgr if this error occurs, the KMAC will just hang and report the error externally to SW.
ah then we might need to make sure we handle the keymgr side gracefully also. otherwise i think the key manager side can get out of sync also and that is probably going to be bad.
for example, would it make sense to say that when keymgr starts sending over data, if key is not already available, an error should be reported back?
doing something like that would make sense to me, let's wait for eunchan to weigh in though
ah then we might need to make sure we handle the keymgr side gracefully also. otherwise i think the key manager side can get out of sync also and that is probably going to be bad.
for example, would it make sense to say that when keymgr starts sending over data, if key is not already available, an error should be reported back?
Sounds good. In this scenario, do you expect KMAC accepts all the data then report an error with dummy digest value? I will revise the KMAC soon after landing #6753
ading @cindychip for visibility
@eunchan just want to check if there is any updates on this issue? Thank you!
It was implemented. We can close now.
KMAC, if no side load key exists, moves to Error state and when any application interface requests the last message data, it returns with all 0 digest.