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.

  • 1
    $\begingroup$ 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. $\endgroup$ – CodesInChaos Dec 15 '17 at 18:44
  • 2
    $\begingroup$ If you are using a PRNG, then you are not doing OTP. OTP requires true random bits, not pseudo-random bits for the key. $\endgroup$ – mikeazo Dec 15 '17 at 18:45
  • 1
    $\begingroup$ 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. $\endgroup$ – Maarten Bodewes Dec 15 '17 at 23:56

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.