Software APIs
dif_entropy_src.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_ENTROPY_SRC_H_
6#define OPENTITAN_SW_DEVICE_LIB_DIF_DIF_ENTROPY_SRC_H_
7
8/**
9 * @file
10 * @brief <a href="/book/hw/ip/entropy_src/">Entropy Source</a> Device Interface
11 * Functions
12 */
13
14#include <stdint.h>
15
19
20#include "sw/device/lib/dif/autogen/dif_entropy_src_autogen.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif // __cplusplus
25
26/**
27 * A single-bit RNG mode, where only one bit is sampled.
28 */
30 /**
31 * Single-bit-mode, sampling the zeroth bit.
32 */
34 /**
35 * Single-bit-mode, sampling the first bit.
36 */
38 /**
39 * Single-bit-mode, sampling the second bit.
40 */
42 /**
43 * Single-bit-mode, sampling the third bit.
44 */
46 /**
47 * Indicates that single-bit-mode is disabled.
48 */
51
52/**
53 * Main FSM state.
54 */
56 kDifEntropySrcMainFsmStateIdle = 0x0f5,
57 kDifEntropySrcMainFsmStateBootHTRunning = 0x1d2,
58 kDifEntropySrcMainFsmStateBootPostHTChk = 0x16e,
59 kDifEntropySrcMainFsmStateBootPhaseDone = 0x08e,
60 kDifEntropySrcMainFsmStateStartupHTStart = 0x02c,
61 kDifEntropySrcMainFsmStateStartupPhase1 = 0x101,
62 kDifEntropySrcMainFsmStateStartupPass1 = 0x1a5,
63 kDifEntropySrcMainFsmStateStartupFail1 = 0x017,
64 kDifEntropySrcMainFsmStateContHTStart = 0x040,
65 kDifEntropySrcMainFsmStateContHTRunning = 0x1a2,
66 kDifEntropySrcMainFsmStateFWInsertStart = 0x0c3,
67 kDifEntropySrcMainFsmStateFWInsertMsg = 0x059,
68 kDifEntropySrcMainFsmStateSha3MsgDone = 0x10f,
69 kDifEntropySrcMainFsmStateSha3Process = 0x0f8,
70 kDifEntropySrcMainFsmStateSha3Valid = 0x0bf,
71 kDifEntropySrcMainFsmStateSha3Done = 0x198,
72 kDifEntropySrcMainFsmStateAlertState = 0x1cd,
73 kDifEntropySrcMainFsmStateAlertHang = 0x1fb,
74 kDifEntropySrcMainFsmStateError = 0x73
76
77/**
78 * Firmware override parameters for an entropy source.
79 */
81 /**
82 * Enables firmware to insert entropy bits back into the pre-conditioner FIFO
83 * via `dif_entropy_src_fw_ov_data_write()` calls. This feature is useful when
84 * the firmware is required to implement additional health checks, and to
85 * perform known answer tests of the conditioner.
86 *
87 * To take effect, this requires the firmware override feature to be enabled.
88 */
90 /**
91 * This field sets the depth of the observe FIFO hardware buffer used when
92 * the firmware override feature is enabled.
93 */
96
97/**
98 * Runtime configuration for an entropy source.
99 *
100 * This struct describes runtime information for one-time configuration of the
101 * hardware.
102 */
104 /**
105 * If set, FIPS compliant entropy will be generated by this module after being
106 * processed by an SP 800-90B compliant conditioning function.
107 *
108 * Software may opt for implementing FIPS mode of operation without hardware
109 * support by setting this field to false. In such case, software is
110 * responsible for implementing the conditioning function.
111 */
113 /**
114 * If set, the produced output entropy is marked as FIPS compliant
115 * through the FIPS bit being set to high.
116 */
118 /**
119 * If set, the noise source is instructed to produce high quality entropy.
120 */
122 /**
123 * If set, entropy will be routed to a firmware-visible register instead of
124 * being distributed to other hardware IPs.
125 */
127 /**
128 * If set, raw entropy will be sent to CSRNG, bypassing the conditioner block
129 * and disabling the FIPS flag. Note that the FIPS flag is different from
130 * running the block in FIPS mode. FIPS mode refers to running the entropy_src
131 * in continuous mode. Also note that if `fips_enable` is set to `True`, then
132 * at most one of either `route_to_firmware` or `bypass_conditioner` may be
133 * set, but will result in disabling the FIPS mode of operation from a
134 * hardware perspective.
135 */
137 /**
138 * Specifies which single-bit-mode to use, if any at all. FIPS mode of
139 * operation is disabled in single-bit-mode of operation is selected.
140 */
142 /**
143 * Controls the scope (either by-line or by-sum) of the health tests.
144 *
145 * If true, the Adaptive Proportion and Markov Tests will accumulate all RNG
146 * input lines into a single score, and thresholds will be applied to the sum
147 * of all the entropy input lines.
148 *
149 * If false, the RNG input lines are all scored individually. A statistical
150 * deviation in any one input line, be it due to coincidence or failure, will
151 * force rejection of the sample, and count toward the total alert count.
152 */
154 /**
155 * The size of the window used for health tests.
156 *
157 * Units: bits
158 */
160 /**
161 * The number of health test failures that must occur before an alert is
162 * triggered. When set to 0, alerts are disabled.
163 */
166
167/**
168 * A statistical test on the bits emitted by an entropy source.
169 */
171 /**
172 * An SP 800-90B repetition count test.
173 *
174 * This test screens for stuck bits, or a total failure of the noise source.
175 * This test fails if any sequence of bits repeats too many times in a row
176 * for too many samples.
177 */
179 /**
180 * An SP 800-90B symbol repetition count test.
181 *
182 * This is similar to the above, test but is performed on a symbol, instead of
183 * bit, basis.
184 */
186 /**
187 * An SP 800-90B adaptive proportion test.
188 *
189 * This test screens for statistical bias in the number of ones or zeros
190 * output by the noise source.
191 */
193 /**
194 * A bucket test.
195 *
196 * This test looks for correlations between individual noise channels.
197 */
199 /**
200 * A "Markov" test.
201 *
202 * This test looks for unexpected first-order temporal correlations
203 * between individual noise channels.
204 */
206 /**
207 * A firmware-driven "mailbox" test.
208 *
209 * This test allows firmware to inspect 2kbit blocks of entropy, and signal
210 * potential concerns to the hardware.
211 */
213 /** \internal */
214 kDifEntropySrcTestNumVariants = 6,
216
217/**
218 * Criteria used by various entropy source health tests to decide whether the
219 * test has failed.
220 */
222 /**
223 * The entropy source health test type to configure.
224 */
226 /**
227 * The high threshold for the health test.
228 */
230 /**
231 * The low threshold for the health test.
232 *
233 * If the corresponding health test has no low threshold, set to 0, otherwise
234 * `dif_entropy_src_health_test_configure()` will return `kDifBadArg`.
235 */
238
239/**
240 * Values of the health test watermark number register to record the high or low
241 * watermarks of the corresponding health tests.
242 */
244 kDifEntropySrcWatermarkNumRepcntHi = 0,
245 kDifEntropySrcWatermarkNumRepcntsHi = 1,
246 kDifEntropySrcWatermarkNumAdaptpHi = 2,
247 kDifEntropySrcWatermarkNumAdaptpLo = 3,
248 kDifEntropySrcWatermarkNumBucketHi = 4,
249 kDifEntropySrcWatermarkNumMarkovHi = 5,
250 kDifEntropySrcWatermarkNumMarkovLo = 6,
251 kDifEntropySrcWatermarkNumExthtHi = 7,
252 kDifEntropySrcWatermarkNumExthtLo = 8,
254
255/**
256 * Revision information for an entropy source.
257 *
258 * The fields of this struct have an implementation-specific interpretation.
259 */
261 uint8_t abi_revision;
262 uint8_t hw_revision;
263 uint8_t chip_type;
265
266/**
267 * Statistics on entropy source health tests.
268 */
270 /**
271 * Identifier defining test and the watermark (high or low) the recorded
272 * number belongs to.
273 */
275 /**
276 * The recorded watermark. For low or high watermarks, this indicates the
277 * lowest or highest values emitted by the corresponding health test,
278 * respectively.
279 */
280 uint16_t watermark;
281 /**
282 * The number of times a particular test has failed above the high threshold
283 * (contains both failures when using the FIPS or the bypass thresholds).
284 */
285 uint32_t high_fails[kDifEntropySrcTestNumVariants];
286 /**
287 * The number of times a particular test has failed below the low threshold.
288 *
289 * Note, some health tests do not have a low threshold. For these tests, this
290 * value will always be 0.
291 */
292 uint32_t low_fails[kDifEntropySrcTestNumVariants];
294
295/**
296 * Statistics on entropy source health tests failures that triggered alerts.
297 */
299 /**
300 * The total number of test failures, across all test types, that contributed
301 * to the alerts fired.
302 */
303 uint16_t total_fails;
304 /**
305 * The number of test failures, due to the specific test execeeding the high
306 * threshold, that cause alerts to be fired.
307 */
308 uint8_t high_fails[kDifEntropySrcTestNumVariants];
309 /**
310 * The number of test failures, due to the specific test execeeding the low
311 * threshold, that cause alerts to be fired.
312 *
313 * Note, some health tests do not have a low threshold. For these tests, this
314 * value will always be 0.
315 */
316 uint8_t low_fails[kDifEntropySrcTestNumVariants];
318
319/**
320 * SHA3 state machine states.
321 *
322 * See `hw/ip/kmac/rtl/sha3_pkg.sv` for more details.
323 */
325 kDifEntropySrcSha3StateIdle = 0,
326 kDifEntropySrcSha3StateAbsorb = 1,
327 kDifEntropySrcSha3StateSqueeze = 2,
328 kDifEntropySrcSha3StateManualRun = 3,
329 kDifEntropySrcSha3StateFlush = 4,
330 kDifEntropySrcSha3StateError = 5,
332
333/**
334 * Debug status information.
335 */
337 /**
338 * Depth of the entropy source FIFO.
339 *
340 * Valid range: [0, 7]
341 */
343 /**
344 * The current state of the SHA3 preconditioner state machine.
345 *
346 * See `dif_entropy_src_sha3_state_t` for more details.
347 */
349 /**
350 * Whether the SHA3 preconditioner has completed processing the current block.
351 */
353 /**
354 * Whether the SHA3 preconditioner is in the squeezing state.
355 */
357 /**
358 * Whether the SHA3 preconditioner is in the absorbed state.
359 */
361 /**
362 * Whether the SHA3 preconditioner has is in an error state.
363 */
365 /**
366 * Whether the main FSM is in the idle state.
367 */
369 /**
370 * Whether the main FSM is in the boot done state.
371 */
374
375/**
376 * Recoverable alerts.
377 */
379 /**
380 * Triggered when the FIPS_ENABLE field in the CONF register is set to an
381 * unsupported value.
382 */
384 /**
385 * Triggered when the ENTROPY_DATA_REG_ENABLE field in the CONF register is
386 * set to an unsupported value.
387 */
389 /**
390 * Triggered when the MODULE_ENABLE field in the MODULE_ENABLE register is set
391 * to an unsupported value.
392 */
394 /**
395 * Triggered when the THRESHOLD_SCOPE field in the CONF register is set to an
396 * unsupported value.
397 */
399 /**
400 * Triggered when the RNG_BIT_ENABLE field in the CONF register is set to an
401 * unsupported value.
402 */
404 /**
405 * Triggered when the FW_OV_SHA3_START field in the FW_OV_SHA3_START register
406 * is set to an unsupported value.
407 */
409 /**
410 * Triggered when the FW_OV_MODE field in the FW_OV_CONTROL register is set to
411 * an unsupported value.
412 */
414 /**
415 * Triggered when the FW_OV_ENTROPY_INSERT field in the FW_OV_CONTROL register
416 * is set to an unsupported value.
417 */
419 /**
420 * Triggered when the ES_ROUTE field in the ENTROPY_CONTROL register is set to
421 * an unsupported value.
422 */
424 /**
425 * Triggered when the ES_TYPE field in the ENTROPY_CONTROL register is set to
426 * an unsupported value.
427 */
429 /**
430 * Triggered when the main state machine detects a threshold failure state.
431 */
433 /**
434 * Triggered when the internal entropy bus value is equal to the prior valid
435 * value on the bus, indicating a possible attack.
436 */
438 /**
439 * Triggered when the ALERT_THRESHOLD register is not configured properly,
440 * i.e., the upper field must be the exact inverse of the lower field.
441 */
443 /**
444 * Triggered when the packer FIFO has been written but was full at the time
445 * and we are in FW_OV_MODE and FW_OV_ENTROPY_INSERT modes.
446 */
448 /**
449 * Triggered when FW_OV_SHA3_START has been set to kMultiBitBool4False,
450 * without waiting for the bypass packer FIFO to clear.
451 */
453 /**
454 * Triggered when the FIPS_FLAG field in the CONF register is set to an
455 * unsupported value.
456 */
458 /**
459 * Triggered when the RNG_FIPS field in the CONF register is set to an
460 * unsupported value.
461 */
463 /**
464 * All alert reasons.
465 *
466 * This is useful when clearing all recoverable alerts at once.
467 */
470
471/**
472 * Error codes (non-recoverable).
473 */
475 /**
476 * Triggered when a write error has been detected for the esrng FIFO.
477 */
479 /**
480 * Triggered when a read error has been detected for the esrng FIFO.
481 */
483 /**
484 * Triggered when a state error has been detected for the esrng FIFO.
485 */
487 /**
488 * Triggered when a write error has been detected for the observe FIFO.
489 */
491 /**
492 * Triggered when a read error has been detected for the observe FIFO.
493 */
495 /**
496 * Triggered when a state error has been detected for the observe FIFO.
497 */
499 /**
500 * Triggered when a write error has been detected for the esfinal FIFO.
501 */
503 /**
504 * Triggered when a read error has been detected for the esfinal FIFO.
505 */
507 /**
508 * Triggered when a state error has been detected for the esfinal FIFO.
509 */
511 /**
512 * Triggered when an error has been detected for the acknowledgment stage
513 * state machine.
514 */
516 /**
517 * Triggered when an error has been detected for the main state machine.
518 */
520 /**
521 * Triggered when an error has been detected for a hardened counter.
522 */
525
526/**
527 * Stops the current mode of operation and disables the entropy_src module
528 *
529 * @param entropy_src An entropy source handle.
530 * @return The result of the operation.
531 */
534
535/**
536 * Configures entropy source with runtime information.
537 *
538 * This function should only need to be called once for the lifetime of the
539 * `entropy` handle.
540 *
541 * @param entropy_src An entropy source handle.
542 * @param config Runtime configuration parameters.
543 * @param enabled The enablement state of the entropy source.
544 * @return The result of the operation.
545 */
549 dif_toggle_t enabled);
550
551/**
552 * Configures entropy source firmware override feature with runtime information.
553 *
554 * This function should only need to be called once for the lifetime of the
555 * `entropy` handle.
556 *
557 * @param entropy_src An entropy source handle.
558 * @param config Runtime configuration parameters for firmware override.
559 * @param enabled The enablement state of the firmware override option.
560 * @return The result of the operation.
561 */
564 const dif_entropy_src_t *entropy_src,
566
567/**
568 * Configures whether to start the entropy source's SHA3 process and be ready to
569 * accept entropy data.
570 *
571 * This is used in firmware override mode and should be enabled before writing
572 * to the override FIFO. Disable this after writing has finished to ensure the
573 * SHA3 block finishes processing and pushes the results to the `esfinal` FIFO.
574 *
575 * @param entropy_src An entropy source handle.
576 * @param enabled Whether to start the SHA3 process.
577 */
580 const dif_entropy_src_t *entropy_src, dif_toggle_t enabled);
581
582/**
583 * Configures an entropy source health test feature with runtime information.
584 *
585 * This function should only need to be called once for each health test that
586 * requires configuration for the lifetime of the `entropy` handle.
587 *
588 * @param entropy_src An entropy source handle.
589 * @param config Runtime configuration parameters for the health test.
590 * @return The result of the operation.
591 */
594 const dif_entropy_src_t *entropy_src,
596
597/**
598 * Enables the one-way behavior of all entropy source health test threshold
599 * registers.
600 *
601 * This function is reentrant: calling it while the one-way behavior is enabled
602 * will have no effect and return `kDifOk`.
603 *
604 * @param entropy_src An entropy source handle.
605 * @return The result of the operation.
606 */
609 const dif_entropy_src_t *entropy_src);
610
611/**
612 * Configures the health test watermark number register to record the high or
613 * low watermark of a specific health test.
614 *
615 * This function is primarily required for the initial validation during chip
616 * bring-up.
617 *
618 * @param entropy_src An entropy source handle.
619 * @param config Specific health test and high or low watermark to be recorded.
620 * @return The result of the operation.
621 */
624 const dif_entropy_src_t *entropy_src,
626
627/**
628 * Enables/Disables the entropy source.
629 *
630 * @param entropy_src An entropy source handle.
631 * @param enabled The enablement state to configure the entropy source in.
632 * @return The result of the operation.
633 */
636 dif_toggle_t enabled);
637
638/**
639 * Locks out entropy source functionality.
640 *
641 * This function is reentrant: calling it while functionality is locked will
642 * have no effect and return `kDifOk`.
643 *
644 * @param entropy_src An entropy source handle.
645 * @return The result of the operation.
646 */
649
650/**
651 * Checks whether this entropy source is locked.
652 *
653 * @param entropy_src An entropy source handle.
654 * @param[out] is_locked Out-param for the locked state.
655 * @return The result of the operation.
656 */
659 bool *is_locked);
660
661/**
662 * Queries the entropy_src source IP for its revision information.
663 *
664 * @param entropy_src An entropy source handle.
665 * @param[out] revision Out-param for revision data.
666 * @return The result of the operation.
667 */
671
672/**
673 * Queries the entropy source for health test statistics.
674 *
675 * @param entropy_src An entropy source handle.
676 * @param[out] stats Out-param for stats data.
677 * @return The result of the operation.
678 */
681 const dif_entropy_src_t *entropy_src,
683
684/**
685 * Queries the entropy source for health test failure statistics.
686 *
687 * @param entropy_src An entropy source handle.
688 * @param[out] counts Out-param for test failure data that triggers alerts.
689 * @return The result of the operation.
690 */
693 const dif_entropy_src_t *entropy_src,
695
696/**
697 * Checks to see if entropy is available for software consumption.
698 *
699 * @param entropy_src An entropy source handle.
700 * @return The result of the operation.
701 */
704 const dif_entropy_src_t *entropy_src);
705
706/**
707 * Reads a word of entropy from the entropy source.
708 *
709 * @param entropy_src An entropy source handle.
710 * @param[out] word Out-param for the entropy word.
711 * @return The result of the operation.
712 */
715 const dif_entropy_src_t *entropy_src, uint32_t *word);
716
717/**
718 * Performs a blocking read from the entropy pipeline through the observe FIFO,
719 * which contains post health-test, unconditioned entropy.
720 *
721 * The entropy source must be configured with firmware override mode enabled,
722 * and the `len` parameter must be less than or equal to the FIFO threshold set
723 * in the firmware override parameters (that is, the threshold that triggers an
724 * interrupt). Additionally, `buf` may be `NULL`; in this case, reads will be
725 * discarded.
726 *
727 * @param entropy_src An entropy source handle.
728 * @param[out] buf A buffer to fill with words from the pipeline.
729 * @param len The number of words to read into `buf`.
730 * @return The result of the operation.
731 */
734 const dif_entropy_src_t *entropy_src, uint32_t *buf, size_t len);
735
736/**
737 * Performs a nonblocking read from the entropy pipeline through the observe
738 * FIFO, which contains post health-test, unconditioned entropy.
739 *
740 * The entropy source must be configured with firmware override mode enabled.
741 * This function will read at most `*len` words from the observe FIFO and store
742 * them in `buf` if it is not `NULL`. If `buf` is `NULL` then the reads will be
743 * discarded instead. This function never blocks and returns as soon as the FIFO
744 * is empty. It updates `*len` to store the number of actually read words.
745 *
746 * @param entropy_src An entropy source handle.
747 * @param[out] buf A buffer to fill with words from the pipeline.
748 * @param[inout] len A pointer to the maximum number of words to reads. This
749 * value is updated to contain the number of words acually read.
750 * @return The result of the operation.
751 */
754 const dif_entropy_src_t *entropy_src, uint32_t *buf, size_t *len);
755
756/**
757 * Performs a write to the entropy pipeline through the firmware override FIFO.
758 *
759 * Entropy source must be configured with firmware override and insert mode
760 * enabled, otherwise the function will return `kDifError`.
761 *
762 * @param entropy_src An entropy source handle.
763 * @param buf A buffer to push words from into the pipeline.
764 * @param len The number of words to write from `buf`.
765 * @param[out] written The number of words successfully written.
766 * @return The result of the operation.
767 */
770 const dif_entropy_src_t *entropy_src, const uint32_t *buf, size_t len,
771 size_t *written);
772
773/**
774 * Starts conditioner operation.
775 *
776 * Initializes the conditioner. Use the `dif_entropy_src_fw_ov_data_write()`
777 * function to send data to the conditioner, and
778 * `dif_entropy_src_conditioner_stop()` once ready to stop the conditioner
779 * operation.
780 *
781 * This function is only available when firmware override mode is enabled. See
782 * `dif_entropy_src_fw_override_configure()` for more details.
783 *
784 * @param entropy_src An entropy source handle.
785 * @return The result of the operation.
786 */
789 const dif_entropy_src_t *entropy_src);
790
791/**
792 * Stops conditioner operation.
793 *
794 * The conditioner stops processing input data and deposits the result digest
795 * in the entropy source output buffer. This operation is only available in
796 * firmware override mode.
797 *
798 * @param entropy_src An entropy source handle.
799 * @return The result of the operation.
800 */
803 const dif_entropy_src_t *entropy_src);
804
805/**
806 * Checks whether the firmware override write FIFO is full.
807 *
808 * @param entropy_src An entropy source handle.
809 * @param[out] is_full Whether the FIFO is full.
810 * @return The result of the operation.
811 */
814 bool *is_full);
815
816/**
817 * Checks whether the firmware override read FIFO has overflowed.
818 *
819 * @param entropy_src An entropy source handle.
820 * @param[out] has_overflowed Whether the FIFO has overflowed, and data has been
821 * lost.
822 * @return The result of the operation.
823 */
826 const dif_entropy_src_t *entropy_src, bool *has_overflowed);
827
828/**
829 * Read the firmware override FIFO depth.
830 *
831 * @param entropy_src An entropy source handle.
832 * @param[out] fifo_depth The FIFO depth.
833 * @return The result of the operation.
834 */
837 const dif_entropy_src_t *entropy_src, uint32_t *fifo_depth);
838
839/**
840 * Reads the debug status register.
841 *
842 * @param entropy_src An entropy source handle.
843 * @param[out] debug_state The current debug state of the IP.
844 * @return The result of the operation.
845 */
848 const dif_entropy_src_t *entropy_src,
849 dif_entropy_src_debug_state_t *debug_state);
850
851/**
852 * Reads the recoverable alert status register.
853 *
854 * @param entropy_src An entropy source handle.
855 * @param[out] alerts The alerts that were triggered (one or more
856 * `dif_entropy_src_alert_t`'s ORed together).
857 * @return The result of the operation.
858 */
861 const dif_entropy_src_t *entropy_src, uint32_t *alerts);
862
863/**
864 * Clears the alerts that are recoverable.
865 *
866 * @param entropy_src An entropy source handle.
867 * @param alerts The alerts to be cleared (one or more
868 * `dif_entropy_src_alert_t`'s ORed together).
869 * @return The result of the operation.
870 */
873 const dif_entropy_src_t *entropy_src, uint32_t alerts);
874
875/**
876 * Reads the (nonrecoverable) error code status register.
877 *
878 * @param entropy_src An entropy source handle.
879 * @param[out] errors The errors that were triggered (one or more
880 * `dif_entropy_src_error_t`'s ORed together).
881 * @return The result of the operation.
882 */
885 uint32_t *errors);
886
887/**
888 * Forces the hardware to generate a error for testing purposes.
889 *
890 * @param entropy_src An entropy source handle.
891 * @param error The error to force (for testing purposes).
892 * @return The result of the operation.
893 */
897
898/**
899 * Reads the current main FSM state.
900 *
901 * @param entropy_src An entropy source handle.
902 * @param[out] state The current FSM state.
903 * @return The result of the operation.
904 */
907 const dif_entropy_src_t *entropy_src, dif_entropy_src_main_fsm_t *state);
908
909#ifdef __cplusplus
910} // extern "C"
911#endif // __cplusplus
912
913#endif // OPENTITAN_SW_DEVICE_LIB_DIF_DIF_ENTROPY_SRC_H_