opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[kmac] kmac counter hardening

Open tjaychen opened this issue 5 years ago • 4 comments

it would be good to harden the kmac key_index counter.

This will ensure that an attack cannot shorten the key counter and thus potentially have a very weak key during MAC calculation.

Since the key length is known (only a few choices), we could employ a count down / count up approach. There is such an unverified implementation in keymgr right now, we could consider making it a prim so other modules can make use of it.

tjaychen avatar Aug 13 '21 22:08 tjaychen

adding @weicaiyang and @cindychip for visibility (Cindy now owns KMAC tb).

udinator avatar Oct 08 '21 00:10 udinator

See #9041

(Whoops, looks like @eunchan connected the dots here already)

cdgori avatar Nov 03 '21 23:11 cdgori

https://github.com/lowRISC/opentitan/commit/63bd755d052a9a7f1282d632caf075b38dc141d6 covers that.

m-temp avatar Jan 26 '22 09:01 m-temp

thank you @m-temp

tjaychen avatar Jan 26 '22 17:01 tjaychen