summaryrefslogtreecommitdiff
path: root/util/libreboot-utils
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-25 20:50:59 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:42 +0000
commite8c4bccd86f43456a99fc9d49e657633b6e16188 (patch)
tree88c3cf5504227a9e14cf25eb21ecf39ba4693d64 /util/libreboot-utils
parent4034b211ce7ec21f7db167755e84265232061b1f (diff)
further clarify intentt
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils')
-rw-r--r--util/libreboot-utils/lib/rand.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/util/libreboot-utils/lib/rand.c b/util/libreboot-utils/lib/rand.c
index bb142bdc..7b53b6a4 100644
--- a/util/libreboot-utils/lib/rand.c
+++ b/util/libreboot-utils/lib/rand.c
@@ -54,6 +54,17 @@
* for example must not rely on weak randomness.
* We must therefore treat broken randomness as
* though the world is broken, and burn accordingly.
+ *
+ * Similarly, any invalid input (NULL, zero bytes
+ * requested) are treated as fatal errors; again,
+ * cryptographic code must be reliable. If your
+ * code erroneously requested zero bytes, you might
+ * then end up with a non-randomised buffer, where
+ * you likely intended otherwise.
+ *
+ * In other words: call rset() correctly, or your
+ * program dies, and rset will behave correctly,
+ * or your program dies.
*/
void