#define RAND_POOLSZ 128 /* Input pool size in bytes */
#define RAND_BUFSZ 512 /* Output buffer size in bytes */
-#define RAND_SECSZ 20 /* Secret octets in output buffer */
+#define RAND_SECSZ 32 /* Secret octets in output buffer */
+#define RAND_KEYSZ 32 /* Recommended random key size */
#define RAND_IBITS (RAND_POOLSZ * 8)
#define RAND_OBITS (RAND_BUFSZ * 8)
octet buf[RAND_BUFSZ]; /* Random octet output buffer */
unsigned o; /* Current index into buffer */
unsigned obits; /* Number of good bits in buffer */
- rmd160_mackey k; /* Secret key for this pool */
+ union { octet k[RAND_KEYSZ]; rmd160_mackey _; } k; /* Key for the pool */
const struct rand_source *s; /* System-specific noise source */
} rand_pool;