Commit 7ac11218caeb72fe79e9ed4b2bb2d97937d39897

Steffen Jaeckel 2018-12-26T15:19:07

clarify comment of ltm_rng()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/tommath.h b/tommath.h
index 555b4e3..78c4cbe 100644
--- a/tommath.h
+++ b/tommath.h
@@ -281,9 +281,10 @@ int mp_cnt_lsb(const mp_int *a);
 int mp_rand(mp_int *a, int digits);
 
 #ifdef MP_PRNG_ENABLE_LTM_RNG
-/* as last resort we will fall back to libtomcrypt's rng_get_bytes()
- * in case you don't use libtomcrypt or use it w/o rng_get_bytes()
- * you have to implement it somewhere else, as it's required */
+/* A last resort to provide random data on systems without any of the other
+ * implemented ways to gather entropy.
+ * It is compatible with `rng_get_bytes()` from libtomcrypt so you could
+ * provide that one and then set `ltm_rng = rng_get_bytes;` */
 extern unsigned long (*ltm_rng)(unsigned char *out, unsigned long outlen, void (*callback)(void));
 extern void (*ltm_rng_callback)(void);
 #endif