Introduced PRNG based on Hash_DRBG (NIST SP 800-90A)
This pseudo-random number generator solves problem with platform-independent generation of randomized nonces. Current implementation uses weak entropy, especially when kernel.randomize_va_space = 0. But it can be improved by adding new sources to xmpp_rand_reseed(). New internal API introduced: xmpp_rand_new xmpp_rand_free xmpp_rand xmpp_rand_bytes xmpp_rand_nonce
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "hash.h"
|
||||
#include "util.h"
|
||||
#include "parser.h"
|
||||
#include "rand.h"
|
||||
|
||||
/** run-time context **/
|
||||
|
||||
@@ -45,6 +46,7 @@ struct _xmpp_ctx_t {
|
||||
const xmpp_mem_t *mem;
|
||||
const xmpp_log_t *log;
|
||||
|
||||
xmpp_rand_t *rand;
|
||||
xmpp_loop_status_t loop_status;
|
||||
xmpp_connlist_t *connlist;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user