The invention relates to a method for generating a random number comprising the following steps: A first input
signal (I(t)) is generated, which changes randomly over time (t). a second input
signal (I(t+Δt) is generated, which changes randomly over time, the first input
signal (I(t)) is compared with the second input signal (I(t+Δt), Depending on the result of the comparison, either a first logical 0 or generates a first logical 1, thus creating the first bit of a binary random number. After generating the first bit of the binary random number, the steps are repeated several times to generate further bits of the binary random number. The invention further relates to a random
number generator for generating a random number according to the claimed method, comprising a
memristor and a measuring device for reading a resistance value of the
memristor to generate an input signal (I(t)) that changes randomly over time. The random
number generator includes a
delay device (2) that delays the generated input signal (I(t)) in time, a
comparator (1) that compares the input signal I(t)) with the time-delayed input signal (I(t+Δt)) and that generates bits of a first random number according to a first frequency by comparison.The random
number generator comprises a first
processing unit (3) that converts bits of the first generated random number into bits of a second random number according to a second frequency (CLK 1), and a second
processing unit (4) that converts bits of the second generated random number into bits of a third random number according to a third frequency (CLK 2). The first frequency is lower than the second frequency (CLK 1). The second frequency (CLK 1) is lower than the third frequency (CLK 2).