Let's suppose I have two 2GiB files and I want to encrypt them using One-time pad (Vernam cipher), but I don't want to store two big keys.

May I use only one key for the two files if I encrypt the One-time pad key two times with a block cipher with two different keys for block cipher? I mean, take the One-time pad key, encrypt with a block cipher and XOR file 1, and repeat with the file 2 but using another key for block cipher.


1 Answer 1


Sure, but you could e.g. guess both keys, guess (part of) the one-time-pad, and then decrypt (part of) the two ciphertext to see if you guessed right with a probability more than 0.5 - assuming that you'd know that part of the plaintext. This means that you can brute force the symmetric keys and lose all the properties that make the OTP theoretically secure.

As you're now largely dependent on the security of the block cipher resisting the attack you might as well use the block cipher correctly rather than using an OTP.

Note that this answer doesn't go into details on the limitations of the block cipher mode of operation that is used (as that detail is missing from the question as well). This may well introduce additional constraints towards the security of the construction.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.