1. According to the invention there is provided a hardware random number generator (RNG), comprising: a source of entropy for providing an input bit stream comprising successive bits of a first state and a second state; a first digital corrector comprising a first input and a first output; the corrector being configured to provide at the first output from two successive bits in the input bit stream an output bit of a first output bit stream according to a first scheme wherein a first bit of a first state (p) and a second bit of the first state (p) yield an output bit of a third state (c) and wherein a first bit of the first state (p) and a second bit of a second state (q) yield an output bit of a fourth state (c′), wherein the third and fourth states are inverse to one another and wherein the third state is equal to one of the first state and the second state, wherein a first bit of the second state (q) and a second bit of the first state (p) yield no output bit and wherein a first bit of the second state (q) and a second bit of the second state (q) yield no output bit, thereby to ensure that successive bits in the output bit stream at the first output of the corrector are independent from one another.