@@ -270,6 +270,103 @@ All read-write (RW) CSRs are set to 0 when OTBN starts an operation (when 1 is w
270270 Always reads as 0.
271271 </td>
272272 </tr>
273+ <tr>
274+ <td>0xFC2</td>
275+ <td>RW</td>
276+ <td>KMAC_STATUS</td>
277+ <td>
278+ Writes to this CSR are always ignored.
279+ This CSR exposes the internal state of the SHA3 FSM within KMAC.
280+ <br>
281+ Bit [ 0] SHA3_IDLE indicates whether the SHA3 core is in the idle state.
282+ Bit [ 1] SHA3_ABSORB indicates whether the SHA3 core is in the absorb state.
283+ Bit [ 2] SHA3_SQUEEZE indicates whether the SHA3 core is in the squeeze state.
284+ Bits [31:3] are reserved/ignored.
285+ </td>
286+ </tr>
287+ <tr>
288+ <td>0x7D9</td>
289+ <td>RW</td>
290+ <td>KMAC_IF_STATUS</td>
291+ <td>
292+ Write a 1 to bits 1 or 2 to clear the error bits.
293+ KMAC_IF_STATUS is a CSR that exposes status information for the OTBN-KMAC interface.
294+ <br>
295+ Bit [ 0] MSG_WRITE_RDY indicates whether the KMAC_DATA_S0/1 WSR is ready for the next word.
296+ Bit [ 1] MSG_SEND_ERROR indicates whether an error ocurred after issuing a message send command.
297+ Bit [ 2] MSG_WRITE_ERROR indicates whether an error ocurred after writing to the KMAC_DATA_S0/1 WSR.
298+ Bit [ 3] DIGEST_VALID0 indicates whether word 0 in the KMAC_DATA_S0/1 WSR is valid.
299+ Bit [ 4] DIGEST_VALID1 indicates whether word 1 in the KMAC_DATA_S0/1 WSR is valid.
300+ Bit [ 5] DIGEST_VALID2 indicates whether word 2 in the KMAC_DATA_S0/1 WSR is valid.
301+ Bit [ 6] DIGEST_VALID3 indicates whether word 3 in the KMAC_DATA_S0/1 WSR is valid.
302+ Bits [31:7] are reserved/ignored.
303+ </td>
304+ </tr>
305+ <tr>
306+ <td>0x7DA</td>
307+ <td>RW</td>
308+ <td>KMAC_INTR</td>
309+ <td>
310+ Writing 1 to bit 0 of this register clears the interrupt.
311+ KMAC_INTR is a CSR that exposes a KMAC_ERROR interrupt of the KMAC HW IP.
312+ <br>
313+ Bit [ 0] KMAC_ERROR indicates whether an error ocurred in the KMAC HW IP.
314+ Bits [31:1] are reserved/ignored.
315+ </td>
316+ </tr>
317+ <tr>
318+ <td>0xFC3</td>
319+ <td>RW</td>
320+ <td>KMAC_ERROR</td>
321+ <td>
322+ Writes to this register are ignored.
323+ This register exposes information from the KMAC HW IP ERR_CODE register.
324+ </td>
325+ </tr>
326+ <tr>
327+ <td>0x7DB</td>
328+ <td>RW</td>
329+ <td>KMAC_CFG</td>
330+ <td>
331+ This register allows OTBN to set the KMAC hashing mode (mode = SHAKE / cSHAKE / SHA3), enable or disable keyed KMAC mode (kmac_en = 0/1), and select the desired security strength (kstrength = L128 / L224 / L256 / L384 / L512).
332+ Reading from this register returns the current KMAC configuration.
333+ <br>
334+ Bit [ 0] KMAC_EN enables keyed operation in the KMAC HWIP.
335+ Bits [ 3:1] STRENGTH is the KAMC security strength.
336+ Bits [ 5:4] MODE is the KMAC hashing mode.
337+ Bits [31:6] are reserved/ignored.
338+ </td>
339+ </tr>
340+ <tr>
341+ <td>0x7DC</td>
342+ <td>RW</td>
343+ <td>KMAC_MSG_SEND</td>
344+ <td>
345+ This CSR consists of a single bit that, if set to one, will trigger OTBN to send the contents of KMAC_DATA_S0 and KMAC_DATA_S1 to KMAC.
346+ Reads from this register always return a 0.
347+ </td>
348+ </tr>
349+ <tr>
350+ <td>0x7DD</td>
351+ <td>RW</td>
352+ <td>KMAC_CMD</td>
353+ <td>
354+ The register allows OTBN to issue START, PROCESS, RUN and DONE commands to KMAC.
355+ Reads from this register always return a 0.
356+ <br>
357+ Bit [ 5:0] CMD is the KMAC command field.
358+ Bits [31:6] are reserved/ignored.
359+ </td>
360+ </tr>
361+ <tr>
362+ <td>0x7DE</td>
363+ <td>RW</td>
364+ <td>KMAC_BYTE_STROBE</td>
365+ <td>
366+ BYTE_STROBE is a CSR that specifies which input bytes of KMAC_DATA_S0/1 are valid and should be consumed by KMAC.
367+ Reads from this register return the current configuration of the KMAC_BYTE_STROBE CSR.
368+ </td>
369+ </tr>
273370 <tr>
274371 <td>0xFC0</td>
275372 <td>RO</td>
@@ -422,6 +519,24 @@ All read-write (RW) WSRs are set to 0 when OTBN starts an operation (when 1 is w
422519 A `KEY_INVALID` software error is raised on read if the Key Manager has not provided a valid key.
423520 </td>
424521 </tr>
522+ <tr>
523+ <td>0x8</td>
524+ <td>RW</td>
525+ <td><a name="kmac-data-s0">KMAC_DATA_S0</a></td>
526+ <td>
527+ KMAC_DATA_S0 is used by OTBN to provide masked input message shares to KMAC and to retrieve masked digest shares.
528+ This WSR is 256 bits wide and holds one share of the message or digest.
529+ </td>
530+ </tr>
531+ <tr>
532+ <td>0x9</td>
533+ <td>RW</td>
534+ <td><a name="kmac-data-s1">KMAC_DATA_S1</a></td>
535+ <td>
536+ KMAC_DATA_S1 is used by OTBN to provide masked input message shares to KMAC and to retrieve masked digest shares.
537+ This WSR is 256 bits wide and holds one share of the message or digest.
538+ </td>
539+ </tr>
425540 </tbody >
426541</table >
427542
0 commit comments