summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/rbg.h
diff options
context:
space:
mode:
authorSimon Rettberg2026-01-28 12:53:53 +0100
committerSimon Rettberg2026-01-28 12:53:53 +0100
commit8e82785c584dc13e20f9229decb95bd17bbe9cd1 (patch)
treea8b359e59196be5b2e3862bed189107f4bc9975f /src/include/ipxe/rbg.h
parentMerge branch 'master' into openslx (diff)
parent[prefix] Make unlzma.S compatible with 386 class CPUs (diff)
downloadipxe-openslx.tar.gz
ipxe-openslx.tar.xz
ipxe-openslx.zip
Merge branch 'master' into openslxopenslx
Diffstat (limited to 'src/include/ipxe/rbg.h')
-rw-r--r--src/include/ipxe/rbg.h24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/include/ipxe/rbg.h b/src/include/ipxe/rbg.h
index 758238a65..0b65a408c 100644
--- a/src/include/ipxe/rbg.h
+++ b/src/include/ipxe/rbg.h
@@ -8,6 +8,7 @@
*/
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+FILE_SECBOOT ( PERMITTED );
#include <stdint.h>
#include <ipxe/drbg.h>
@@ -16,28 +17,13 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
struct random_bit_generator {
/** DRBG state */
struct drbg_state state;
+ /** Startup has been attempted */
+ int started;
};
extern struct random_bit_generator rbg;
-/**
- * Generate bits using RBG
- *
- * @v additional Additional input
- * @v additional_len Length of additional input
- * @v prediction_resist Prediction resistance is required
- * @v data Output buffer
- * @v len Length of output buffer
- * @ret rc Return status code
- *
- * This is the RBG_Generate function defined in ANS X9.82 Part 4
- * (April 2011 Draft) Section 9.1.2.2.
- */
-static inline int rbg_generate ( const void *additional, size_t additional_len,
- int prediction_resist, void *data,
- size_t len ) {
- return drbg_generate ( &rbg.state, additional, additional_len,
- prediction_resist, data, len );
-}
+extern int rbg_generate ( const void *additional, size_t additional_len,
+ int prediction_resist, void *data, size_t len );
#endif /* _IPXE_RBG_H */