Software APIs
dif_kmac.h
Go to the documentation of this file.
1// Copyright lowRISC contributors (OpenTitan project).
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4
5#ifndef OPENTITAN_SW_DEVICE_LIB_DIF_DIF_KMAC_H_
6#define OPENTITAN_SW_DEVICE_LIB_DIF_DIF_KMAC_H_
7
8/**
9 * @file
10 * @brief <a href="/book/hw/ip/kmac/">KMAC</a> Device Interface Functions
11 */
12
13#include <stdint.h>
14
18
19#include "sw/device/lib/dif/autogen/dif_kmac_autogen.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif // __cplusplus
24
25/**
26 * This API implements an interface for the KMAC hardware.
27 *
28 * The KMAC hardware implements the following cryptographic hash and message
29 * authentication code (MAC) functions:
30 *
31 * - SHA-3 [1]
32 * - SHAKE [1]
33 * - cSHAKE [2]
34 * - KMAC [2]
35 *
36 * The following sequence of operations is required to initialize the KMAC
37 * hardware:
38 *
39 * - `dif_kmac_init()`
40 * - `dif_kmac_configure()`
41 *
42 * If configuration changes are required then `dif_kmac_configure` can be called
43 * again so long as there are no operations in progress.
44 *
45 * The following sequence of operations is required to execute an operation:
46 *
47 * - `dif_kmac_{sha3,shake,cshake,kmac}_start()`
48 * - `dif_kmac_absorb()`
49 * - `dif_kmac_squeeze()`
50 * - `dif_kmac_end()`
51 *
52 * This is a streaming API and the `dif_kmac_absorb` and `dif_kmac_squeeze`
53 * functions may be called multiple times during a single operation. Once
54 * `dif_kmac_squeeze` has been called however no further `dif_kmac_absorb` calls
55 * may be made. See NIST FIPS 202 [1] for more information about the sponge
56 * construction and the 'absorbing' and 'squeezing' states.
57 *
58 * Please see the following documentation for more information about the KMAC
59 * hardware:
60 * https://opentitan.org/book/hw/ip/kmac/
61 *
62 * References:
63 * [1] - NIST FIPS 202
64 * SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions
65 * http://dx.doi.org/10.6028/NIST.FIPS.202
66 * [2] - NIST Special Publication 800-185
67 * SHA-3 Derived Functions: cSHAKE, KMAC, TupleHash and ParallelHash
68 * https://doi.org/10.6028/NIST.SP.800-185
69 */
70
71/**
72 * Supported entropy modes.
73 *
74 * Entropy may be provided by the entropy distribution network (EDN) or using a
75 * seed provided by software.
76 */
78 kDifKmacEntropyModeIdle = 0,
79 kDifKmacEntropyModeEdn,
80 kDifKmacEntropyModeSoftware,
82
83/**
84 * Maximum lengths supported by the KMAC unit.
85 */
86enum {
87
88 /**
89 * The maximum length in bytes of a customization string (S) before it has
90 * been encoded.
91 */
93
94 /**
95 * The maximum number of bytes required to encode the length of the
96 * customization string.
97 *
98 * Assumes maximum customization string length of 32 bytes (256 bits).
99 */
101
102 /**
103 * The maximum length in bytes of a function name (N) before it has been
104 * encoded.
105 */
107
108 /**
109 * The maximum number of bytes required to encode the length of the function
110 * name.
111 *
112 * Assumes maximum function name length of 4 bytes (32 bits).
113 */
115
116 /**
117 * The maximum output length (L) that can be set when starting a KMAC
118 * operation.
119 *
120 * The length is in 32-bit words and is designed to be low enough that the
121 * length in bits can still be represented by an unsigned 32-bit integer.
122 */
123 kDifKmacMaxOutputLenWords = (UINT32_MAX - 32) / 32,
124
125 /**
126 * The maximum key length supported by the KMAC operation.
127 *
128 * The length is in 32-bit words.
129 */
131
132 /**
133 * The length of the software entropy seed.
134 *
135 * The length is in 32-bit words.
136 */
138 /**
139 * The offset of the second share within the output state register.
140 */
142 /**
143 * The size of the Keccak state in words (i.e. 1600 bits).
144 */
145 kDifKmacStateWords = 1600 / 8 / sizeof(uint32_t),
146};
147
148/**
149 * Runtime configuration for KMAC.
150 *
151 * This struct describes runtime information for configuration of the hardware.
152 */
153typedef struct dif_kmac_config {
154 /**
155 * Entropy mode specifying the source of entropy (EDN or software).
156 */
158
159 /**
160 * Entropy fast process mode when enabled prevents the KMAC unit consuming
161 * entropy unless it is processing a secret key. This process should not be
162 * used when resistance against side-channel attacks is required, because
163 * it may lead to leakage of the secret key in the power trace.
164 */
166
167 /**
168 * Entropy seed. Only used when the source of entropy is software.
169 */
171
172 /**
173 * The number of KMAC invocations that triggers an automatic seed request from
174 * EDN.
175 */
177
178 /**
179 * Number of clock cycles to wait for the EDN to reseed the entropy generator
180 * before an error is raised (see `dif_kmac_get_error`). If 0 the unit will
181 * wait forever.
182 */
184
185 /**
186 * Prescaler value that determines how many clock pulse triggers an increment
187 * in the timer counter.
188 */
190
191 /**
192 * Convert the message to big-endian byte order.
193 * Note: this option currently had no effect since the message is sent a byte
194 * at a time but will in the future.
195 */
197
198 /**
199 * Convert the output state (digest) to big-endian byte order on a word
200 * granularity.
201 */
203
204 /**
205 * Place kmac inside key sideload mode
206 */
208
209 /**
210 * Message Masking with PRNG.
211 * If true, KMAC applies PRNG to the input messages to the Keccak module when
212 * KMAC mode is on.
213 */
215
217
218/**
219 * A KMAC operation state context.
220 */
222 /**
223 * Whether the 'squeezing' phase has been started.
224 */
226
227 /**
228 * Flag indicating whether the output length (d) should be right encoded in
229 * software and appended to the end of the message. The output length is
230 * required to be appended to the message as part of a KMAC operation.
231 */
233
234 /**
235 * Offset into the output state.
236 */
237 size_t offset;
238
239 /**
240 * The rate (r) in 32-bit words.
241 */
242 size_t r;
243
244 /**
245 * The output length (d) in 32-bit words.
246 *
247 * If the output length is not fixed then this field will be set to 0.
248 *
249 * Note: if the output length is fixed length will be modified to ensure that
250 * `d - offset` always accurately reflects the number of words remaining.
251 */
252 size_t d;
254
255/**
256 * A saved KMAC context.
257 *
258 * Holds the internal state of a paused hashing operation so that it can be
259 * resumed later on. The secret key is not part of it, as it has been absorbed
260 * into the Keccak state when the operation was started.
261 *
262 * The context is therefore equivalent to the secret key. The Keccak function is
263 * public and invertible, so anyone holding the context can compute the key from
264 * it. It must be protected like the key itself.
265 */
266typedef struct dif_kmac_context {
267 /**
268 * The first share of the Keccak state.
269 */
271
272 /**
273 * The second share of the Keccak state. Reads as zero if masking is disabled
274 * in hardware.
275 */
277
278 /**
279 * The operation state that belongs to the saved Keccak state.
280 */
283
284/**
285 * Supported SHA-3 modes of operation.
286 */
287typedef enum dif_kmac_mode_sha3 {
288 /** SHA-3 with 224 bit strength. */
290 /** SHA-3 with 256 bit strength. */
292 /** SHA-3 with 384 bit strength. */
294 /** SHA-3 with 512 bit strength. */
297
298/**
299 * Supported SHAKE modes of operation.
300 */
302 /** SHAKE with 128 bit strength. */
304 /** SHAKE with 256 bit strength. */
307
308/**
309 * Supported cSHAKE modes of operation.
310 */
312 /** cSHAKE with 128 bit strength. */
314 /** cSHAKE with 256 bit strength. */
317
318/**
319 * Supported KMAC modes of operation.
320 */
321typedef enum dif_kmac_mode_kmac {
322 /** KMAC with 128 bit strength. */
324 /** KMAC with 256 bit strength. */
327
328/**
329 * Key length.
330 *
331 * The key length is specified in bits.
332 */
334 /** Software provided 128 bit key. */
336 /** Software provided 192 bit key. */
338 /** Software provided 256 bit key. */
340 /** Software provided 384 bit key. */
342 /** Software provided 512 bit key. */
345
346/**
347 * A key for KMAC operations.
348 *
349 * The key is provided in two parts, `share0` and `share1`. These are
350 * combined using a bitwise XOR operation in the KMAC unit to produce the real
351 * key.
352 *
353 * The key shares are encoded in little endian byte order. This is fixed and
354 * cannot be changed (unlike the byte order used for the message and state).
355 *
356 * Unused words in the key shares must be set to 0.
357 */
358typedef struct dif_kmac_key {
359 uint32_t share0[kDifKmacMaxKeyLenWords];
360 uint32_t share1[kDifKmacMaxKeyLenWords];
363
364/**
365 * An encoded bit string used for customization string (S).
366 *
367 * Use `dif_kmac_customization_string_init` to initialize.
368 */
370 /** Encoded S: left_encode(len(S)) || S */
373 /** Length of data in buffer in bytes. */
374 uint32_t length;
376
377/**
378 * An encoded bit string used for function name (N).
379 *
380 * Use `dif_kmac_function_name_init` to initialize.
381 */
383 /** Encoded N: left_encode(len(N)) || N */
385 /** Length of data in buffer in bytes. */
386 uint32_t length;
388
389/**
390 * Error reported by KMAC unit.
391 *
392 * Codes taken from hw/ip/kmac/rtl/kmac_pkg.sv:err_code_e
393 */
394typedef enum dif_kmac_error {
395 /**
396 * No error has occurred.
397 */
399
400 /**
401 * The Key Manager has raised an error because the secret key is not valid.
402 */
404
405 /**
406 * An attempt was made to write data into the message FIFO but the KMAC unit
407 * was not in the correct state to receive the data.
408 */
410
411 /**
412 * SW issued a command while a HW application interface was using KMAC.
413 */
415
416 /**
417 * The entropy wait timer has expired.
418 */
420
421 /**
422 * Incorrect entropy mode when entropy is ready.
423 */
425
426 kDifErrorUnexpectedModeStrength = 6,
427
428 kDifErrorIncorrectFunctionName = 7,
429
430 kDifErrorSoftwareCommandSequence = 8,
431
432 kDifErrorSoftwareHashingWithoutEntropyReady = 9,
433
434 kDifErrorStopNotBlockAligned = 0xA,
435
436 kDifErrorSaveRestoreSideload = 0xB,
437
438 kDifErrorFatalError = 0xC1,
439
440 kDifErrorPackerIntegrity = 0xC2,
441
442 kDifErrorMsgFifoIntegrity = 0xC3,
444
445/**
446 * The state of the message FIFO used to buffer absorbed data.
447 *
448 * The hardware defined these status in different bit fields, however they work
449 * better in the same field. i.e the fifo can't be empty and full at the same
450 * time. That said, the values chosen for this enum allow the conversion from
451 * the register bits to this enum without branches.
452 */
454 /** The message FIFO is not empty or full. */
456 /** The message FIFO is empty. */
458 /** The message FIFO is full. Further writes will block. */
461
463 /**
464 * SHA3 hashing engine is in idle state.
465 */
467
468 /**
469 * SHA3 is receiving message stream and processing it.
470 */
472
473 /**
474 * SHA3 completes sponge absorbing stage. In this stage, SW can manually run
475 * the hashing engine.
476 */
478
479 /**
480 * SHA3 stopped the sponge absorbing stage to save a context. In this stage,
481 * SW can read the state to save the context.
482 */
484} dif_kmac_sha3_state_t;
485
486/**
487 * The kmac error faults.
488 *
489 * The hardware defined these status in different bit fields, however they work
490 * better in the same field. Then the values chosen for this enum allow the
491 * conversion from the register bits to this enum without branches.
492 */
494 /**
495 * Neither errors nor fault has occurred.
496 */
498 /**
499 * A fatal fault has occurred and the KMAC unit needs to be reset (1),
500 * Examples for such faults include i) TL-UL bus integrity fault ii)
501 * storage errors in the shadow registers iii) errors in the message,
502 * round, or key counter iv) any internal FSM entering an invalid state v)
503 * an error in the redundant lfsr.
504 */
506 /**
507 * An update error has occurred in the shadowed Control Register. KMAC
508 * operation needs to be restarted by re-writing the Control Register.
509 */
512
513typedef struct dif_kmac_status {
514 /**
515 * Sha3 state.
516 */
517 dif_kmac_sha3_state_t sha3_state;
518
519 /**
520 * Message FIFO entry count.
521 */
522 uint32_t fifo_depth;
523
524 /**
525 * Kmac fifo state.
526 */
528
529 /**
530 * Kmac faults and errors state.
531 */
533} dif_kmac_status_t;
534
535/**
536 * Configures KMAC with runtime information.
537 *
538 * @param kmac A KMAC handle.
539 * @param config Runtime configuration parameters.
540 * @return The result of the operation.
541 */
544
545/**
546 * Encode a customization string (S).
547 *
548 * The length of the string must not exceed `kDifKmacMaxCustomizationStringLen`.
549 *
550 * Note that this function will encode `len` bytes from `data` regardless of
551 * whether `data` is null-terminated or not.
552 *
553 * See NIST Special Publication 800-185 [2] for more information about the
554 * customization string (S) parameter.
555 *
556 * @param data String to encode.
557 * @param len Length of string to encode.
558 * @param[out] out Encoded customization string.
559 * @return The result of the operation.
560 */
563 const char *data, size_t len, dif_kmac_customization_string_t *out);
564
565/**
566 * Encode a function name (N).
567 *
568 * The length of the string must not exceed `kDifKmacMaxFunctionNameLen`.
569 *
570 * Note that this function will encode `len` bytes from `data` regardless of
571 * whether `data` is null-terminated or not.
572 *
573 * See NIST Special Publication 800-185 [2] for more information about the
574 * function name (N) parameter.
575 *
576 * @param data String to encode.
577 * @param len Length of string to encode.
578 * @param[out] out Encoded function name.
579 * @return The result of the operation.
580 */
582dif_result_t dif_kmac_function_name_init(const char *data, size_t len,
584
585/**
586 * Start a SHA-3 operation.
587 *
588 * SHA-3 operations have a fixed output length.
589 *
590 * See NIST FIPS 202 [1] for more information about SHA-3.
591 *
592 * @param kmac A KMAC handle.
593 * @param operation_state A KMAC operation state context.
594 * @param mode The SHA-3 mode of operation.
595 * @return The result of the operation.
596 */
599 const dif_kmac_t *kmac, dif_kmac_operation_state_t *operation_state,
601
602/**
603 * Start a SHAKE operation.
604 *
605 * SHAKE operations have a variable (XOF) output length.
606 *
607 * See NIST FIPS 202 [1] for more information about SHAKE.
608 *
609 * @param kmac A KMAC handle.
610 * @param operation_state A KMAC operation state context.
611 * @param mode The mode of operation.
612 * @return The result of the operation.
613 */
616 const dif_kmac_t *kmac, dif_kmac_operation_state_t *operation_state,
618
619/**
620 * Start a cSHAKE operation.
621 *
622 * cSHAKE operations have a variable (XOF) output length.
623 *
624 * See NIST Special Publication 800-185 [2] for more information about cSHAKE.
625 *
626 * @param kmac A KMAC handle.
627 * @param operation_state A KMAC operation state context.
628 * @param mode The mode of operation.
629 * @param n Function name (optional).
630 * @param s Customization string (optional).
631 * @return The result of the operation.
632 */
635 const dif_kmac_t *kmac, dif_kmac_operation_state_t *operation_state,
638
639/**
640 * Start a KMAC operation.
641 *
642 * To use KMAC in eXtendable-Output Function (XOF) mode set the output length
643 * (`l`) to 0. The output length must not be greater than
644 * `kDifKmacMaxOutputLenWords`.
645 *
646 * The key provided must have at least as many bits as the security strength
647 * of the `mode`.
648 *
649 * See NIST Special Publication 800-185 [2] for more information about KMAC.
650 *
651 * @param kmac A KMAC handle.
652 * @param operation_state A KMAC operation state context.
653 * @param mode The mode of operation.
654 * @param l Output length (number of 32-bit words that will be 'squeezed').
655 * @param k Pointer to secret key.
656 * @param s Customization string (optional).
657 * @return The result of the operation.
658 */
661 const dif_kmac_t *kmac, dif_kmac_operation_state_t *operation_state,
662 dif_kmac_mode_kmac_t mode, size_t l, const dif_kmac_key_t *k,
664
665/**
666 * Absorb bytes from the message provided.
667 *
668 * If `processed` is non-NULL, then this function will write the remaining
669 * space in the FIFO and update `processed` with the number of bytes written.
670 * The caller should adjust the `msg` pointer and `len` parameters and call
671 * again as needed until all input has been written.
672 *
673 * If `processed` is NULL, then this function will block until the entire
674 * message has been processed or an error occurs.
675 *
676 * If big-endian mode is enabled for messages (`message_big_endian`) only the
677 * part of the message aligned to 32-bit word boundaries will be byte swapped.
678 * Unaligned leading and trailing bytes will be written into the message as-is.
679 *
680 * @param kmac A KMAC handle.
681 * @param operation_state A KMAC operation state context.
682 * @param msg Pointer to data to absorb.
683 * @param len Number of bytes of data to absorb.
684 * @param[out] processed Number of bytes processed (optional).
685 * @preturn The result of the operation.
686 */
689 dif_kmac_operation_state_t *operation_state,
690 const void *msg, size_t len, size_t *processed);
691
692/**
693 * Squeeze bytes into the output buffer provided.
694 *
695 * Requesting a squeeze operation will prevent any further absorption operations
696 * from taking place.
697 *
698 * If `kDifKmacIncomplete` is returned then the hardware is currently
699 * recomputing the state and the output was only partially written. The output
700 * pointer and length should be updated according to the number of bytes
701 * processed and the squeeze operation continued at a later time.
702 *
703 * If `processed` is not provided then this function will block until `len`
704 * bytes have been written to `out` or an error occurs.
705 *
706 * Normally, the capacity part of Keccak state is and should not be read
707 * as part of a regular cryptographic operation. However, this function
708 * can also read the capacity for testing purposes.
709 * When `capacity` is a non-NULL pointer, at the end of the operation, the
710 * capacity part of the Keccak state is also read and written into this buffer.
711 * The capacity is read for each output round, meaning that if the requested
712 * digest is larger than a single Keccak round can provide (i.e. the rate), then
713 * the additional rounds also update this buffer. Hence it should be large
714 * enough to accommodate `ceil(digest_len/rate_len) * capacity_len`.
715 * `capacity` can be set to NULL to skip reading the capacity.
716 *
717 * @param kmac A KMAC handle.
718 * @param operation_state A KMAC operation state context.
719 * @param[out] out Pointer to output buffer.
720 * @param[out] len Number of 32-bit words to write to output buffer.
721 * @param[out] processed Number of 32-bit words written to output buffer
722 * (optional).
723 * @param[out] capacity Optional buffer to read capacity along with the digest.
724 * @preturn The result of the operation.
725 */
728 dif_kmac_operation_state_t *operation_state,
729 uint32_t *out, size_t len, size_t *processed,
730 uint32_t *capacity);
731
732/**
733 * Ends a squeeze operation and resets the hardware so it is ready for a new
734 * operation.
735 *
736 * @param kmac A KMAC handle.
737 * @param operation_state A KMAC operation state context.
738 * @return The result of the operation.
739 */
742 dif_kmac_operation_state_t *operation_state);
743
744/**
745 * Saves the context of an absorbing operation.
746 *
747 * The message absorbed since the operation was started or restored must be a
748 * multiple of the Keccak rate. This is not checked. Otherwise the hardware
749 * reports `kDifErrorStopNotBlockAligned`, the saved context is invalid and the
750 * operation has to be started again.
751 *
752 * If an error is returned, the hardware may be left in the stopped state. The
753 * caller must then release it with `dif_kmac_context_release()`.
754 *
755 * Not available if a sideloaded key is used.
756 *
757 * @param kmac A KMAC handle.
758 * @param operation_state A KMAC operation state context.
759 * @param[out] context The saved context.
760 * @return The result of the operation.
761 */
764 dif_kmac_operation_state_t *operation_state,
765 dif_kmac_context_t *context);
766
767/**
768 * Restores a previously saved context and resumes the absorbing operation.
769 *
770 * The KMAC HWIP must hold the same configuration in `CFG_SHADOWED` as when the
771 * context was saved, i.e. the same mode, strength, KMAC enable and endianness.
772 * This is not checked, and a mismatch silently produces a wrong digest. In KMAC
773 * mode with masking enabled, the entropy must be configured as for starting an
774 * operation.
775 *
776 * Claims the block before writing the context, so that no application interface
777 * can take it over while the context is being restored. Returns `kDifError` if
778 * the block was granted to an application interface instead, in which case
779 * nothing has been written.
780 *
781 * Application interfaces are stalled while the block is claimed. If an error is
782 * returned after the block has been claimed, the caller must release it with
783 * `dif_kmac_context_release()`.
784 *
785 * Not available if a sideloaded key is used.
786 *
787 * @param kmac A KMAC handle.
788 * @param context The context to restore.
789 * @param[out] operation_state A KMAC operation state context.
790 * @return The result of the operation.
791 */
794 const dif_kmac_t *kmac, const dif_kmac_context_t *context,
795 dif_kmac_operation_state_t *operation_state);
796
797/**
798 * Releases the KMAC HWIP after a failed context save or restore.
799 *
800 * Issues the done command, which clears the Keccak state and returns the
801 * hardware to the idle state when it has been stopped by
802 * `dif_kmac_context_save()` or claimed by `dif_kmac_context_restore()`.
803 *
804 * @param kmac A KMAC handle.
805 * @return The result of the operation.
806 */
809
810/**
811 * Read the kmac error register to get the error code indicated the interrupt
812 * state.
813 *
814 * This function should be called in case of any of the `start` functions
815 * returns `kDifError`.
816 *
817 * @param kmac A KMAC handle.
818 * @param[out] error The current error code.
819 * @param[out] info Optional additional error information.
820 * @return The result of the operation.
821 */
824 uint32_t *info);
825
826/**
827 * Clear the current error code and reset the state machine to the idle state
828 * ready to accept new operations.
829 *
830 * The state of any in-progress operation will be lost and the operation will
831 * need to be restarted.
832 *
833 * @param kmac A KMAC handle.
834 * @param operation_state A KMAC operation state context.
835 * @return The result of the operation.
836 */
839 dif_kmac_operation_state_t *operation_state);
840
841/**
842 * Let the KMAC HW know that SW has processed the errors the HW has flagged.
843 *
844 * @param kmac A KMAC handle
845 * @return The result of the operation.
846 */
849
850/**
851 * Report whether the hardware currently indicates an error.
852 *
853 * @param kmac A KMAC handle.
854 * @param[out] error Whether hardware currently indicates an error.
855 * @returns The result of the operation.
856 */
858dif_result_t dif_kmac_has_error_occurred(const dif_kmac_t *kmac, bool *error);
859
860/**
861 * Clear the `kmac_err` IRQ.
862 *
863 * @param kmac A KMAC handle.
864 * @return The result of the operation.
865 */
868
869/**
870 * Fetch the current status of the message FIFO used to buffer absorbed data.
871 *
872 * @param kmac A KMAC handle.
873 * @param[out] kmac_status The kmac status struct.
874 * @return The result of the operation.
875 */
878 dif_kmac_status_t *kmac_status);
879
880/**
881 * Returns the current value of the refresh hash counter.
882 *
883 * @param kmac A KMAC handle.
884 * @param hash_ctr The hash counter value that is returned.
885 * @return The result of the operation.
886 */
889 uint32_t *hash_ctr);
890
891/**
892 * Reports whether or not the KMAC configuration register is locked.
893 *
894 * If writes to the KMAC configuration register are disabled (locked) then it is
895 * not possible to change any configuration parameters or start a new operation.
896 * The configuration register is locked when an operation has been started and
897 * is unlocked again when it completes.
898 *
899 * @param kmac A KMAC handle.
900 * @param[out] is_locked Out-param reporting the lock state.
901 * @return The result of the operation.
902 */
904dif_result_t dif_kmac_config_is_locked(const dif_kmac_t *kmac, bool *is_locked);
905
906/**
907 * Poll until a given flag in the status register is set.
908 *
909 * @param kmac A KMAC handle.
910 * @param flag the
911 * @return The result of the operation.
912 */
914dif_result_t dif_kmac_poll_status(const dif_kmac_t *kmac, uint32_t flag);
915
916#ifdef __cplusplus
917} // extern "C"
918#endif // __cplusplus
919
920#endif // OPENTITAN_SW_DEVICE_LIB_DIF_DIF_KMAC_H_