# OTP PRNG re-use

I'm setting up some external hardware for OTP encryption to take care of all the issues that can arise with key storage, re-use etc. I'm using the ISAAC secure PRNG to get my stream of numbers which I read is cryptographically secure (so far). The problem is that although most streams are very large, there are some keys that will produce runs of only 2^40 before repeating. As it is impossible to tell how long the sequence will be from a particular key my question is would the OTP still be secure if the key starts again after 2^40 iterations? Of course it would be a different message and would be unlikely to be using the same sequence.

• Two-time-pads are totally broken. For example if you encrypt two English language texts with the same key, an attacker will be able to recover most of it. – CodesInChaos Dec 15 '17 at 18:44
• If you are using a PRNG, then you are not doing OTP. OTP requires true random bits, not pseudo-random bits for the key. – mikeazo Dec 15 '17 at 18:45
• What mikeazo says; if you're going to use a PRNG you may as well use a stream cipher or a block cipher in streaming mode (such as counter mode). Counter mode also repeats... after $2^{128}$ 16 byte blocks (or $2^{132}$ bytes of course) for a 128 bit block cipher such as AES. – Maarten Bodewes Dec 15 '17 at 23:56