opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[kmac] main FSM hangs after kmac_app completion

Open udinator opened this issue 5 years ago • 1 comments

Hi Eunchan,

I am running into a FSM bug when running some transactions through the application interface ports, the waves are below:

Screenshot from 2021-05-02 17-38-27

At the marker, kmac_app module has received the absorbed_i input from SHA3 logic, so raises the app_o[0].done signal for the KeyMgr interface port and transitions into Idle state, outputting CmdDone to top level KMAC module.

Meanwhile, the top level FSM sees the same sha3_absorbed signal from SHA3 logic and transitions from KmacMsgFeed into KmacDigest state. However on the same cycle sha3_done goes high since CmdDone is seen from kmac_app logic, so we skip over the KmacDigest -> KmacIdle transition and fail to properly reset the entropy state for upcoming transactions.

udinator avatar May 03 '21 00:05 udinator

Ah.. Thanks for finding the bug. I will fix the main FSM to move to Idle state directly in case of App requests.

eunchan avatar May 03 '21 05:05 eunchan