Use the PRNG class for chaff
In particular, srand( time( NULL ) ) is very predictable. [keithw@mit.edu -- modified to use byte PRNG from /dev/urandom]
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "transportinstruction.pb.h"
|
||||
#include "transportstate.h"
|
||||
#include "transportfragment.h"
|
||||
#include "prng.h"
|
||||
|
||||
using std::list;
|
||||
using std::pair;
|
||||
@@ -86,7 +87,9 @@ namespace Network {
|
||||
|
||||
uint64_t last_heard; /* last time received new state */
|
||||
|
||||
static const string make_chaff( void );
|
||||
/* chaff to disguise instruction length */
|
||||
PRNG prng;
|
||||
const string make_chaff( void );
|
||||
|
||||
public:
|
||||
/* constructor */
|
||||
|
||||
Reference in New Issue
Block a user