Secure random number generation in wireless sensor networks