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 also 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 a first logical 1 is generated, thus generating a first bit of a binary random number; after generating the first bit of the binary random number, the steps are repeated multiple 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 comprises a
delay device (2) that delays the generated input signal (I(t)), a
comparator (1) that compares the input signal I(t) with the time-delayed input signal (I(t+Δt)) and generates bits of a first random number according to a first frequency by comparison. The random
number generator comprises a first
processing device (3) that converts bits of the first generated random number according to a second frequency (CLK 1) into bits of a second random number, and a second
processing device (4) that converts bits of the second generated random number according to a third frequency (CLK 2) into bits of a third random number. The first frequency is lower than the second frequency (CLK 1). The second frequency (CLK 1) is lower than the third frequency (CLK 2).