[kmac] starting rom/otp application hash
Hi Eunchan,
In the KMAC application interface, Keymgr is the only app that needs to send in a sideload key as it runs full KMAC hash, whereas rom_ctrl/otp_ctrl apps only run CShake and only need a prefix to be provided.
However in kmac_app.sv::332 in StIdle:
StIdle: begin
if (arb_valid && keymgr_key_i.valid) begin
st_d = StAppCfg;
set_appid = 1'b1;
end
...
end
But, RTL requires sideloaded key to kick off any app hashing, which seems incorrect - with this the DUT hangs if I try and start a ROM/OTP hash since I'm not providing any sideloaded key.
This shouldn't need to be qualified with keymgr_key_i.valid, as we do an error check later on in StAppCfg - just qualifying on arb_valid should be ok here.
WDYT?
I agree. Thanks for finding this. Let me revise the state transition and make it run without the sideloaded key in SHA3 and cSHAKE cases.
Udi, could you please close this issue if the merged design works?