[kmac] entropy_timer questions
Hi Eunchan,
I had a couple of questions about the entropy_timer that came up as I was implementing a related testcase.
In the scenario, we're running a Shake hash with fast entropy enabled.
It seems that the entropy_timer does not stop counting down even when keccak rounds are running, like so:

Is this expected?
Followup question - if this is expected behavior, does this mean that entropy_timer will only stop counting during keccak rounds when fast entropy is disabled? Similarly, what about processing the keyblocks?
Yes. That is expected behavior. Entropy timer runs regardless of whether it is in Key Block or other message blocks. However, even if the timer reaches to 0, it does not trigger the FSM to fetch new entropy from EDN unless it is in key block.
Hmm, got it so it is expected to keep counting through fast_entropy keccak hashing.
I'm also seeing the timer stop counting when we are not using fast entropy, as StRandExpand does not set timer_enable = 1 - this is expected behavior as well?
I see, so a timer-related EDN request can only be issued if we're about to process a next keyblock. Will this happen even if we have just refreshed entropy after a previous hash operation?
Hmm, got it so it is expected to keep counting through fast_entropy keccak hashing. I'm also seeing the timer stop counting when we are not using fast entropy, as StRandExpand does not set timer_enable = 1 - this is expected behavior as well?
Yes. I designed the timer to be decreased in the Ready state.
I see, so a timer-related EDN request can only be issued if we're about to process a next keyblock. Will this happen even if we have just refreshed entropy after a previous hash operation?
It depends on how SW configured the timer value. I expect SW sets long enough timer to cover the scenario. If previous hash operation is done and when new hash starts right after the completion, then it may not initiate new fetch from EDN as timer value is not yet expired. If the next hash operation comes long after the previous completion, then, yes, it will fetch new one.