I recently learned about the one-time pad method, which has perfect security if the following conditions are met :

  1. The key must be truly random.
  2. The key must be at least as long as the plaintext.
  3. The key must never be reused in whole or in part.
  4. The key must be kept completely secret.

As a thought experiment, I wondered : what if you choose the key so the ciphertext will only be "A"s (or whatever other letter) ? This would break the rule n°1, since the plaintext is not random and the key is linked to it. Does that mean that such a ciphertext can be broken ?

  • $\begingroup$ If the key is not truly random, according to Kerckhoffs's principle except the key all are non-secret, it is not secure. Since the enemy might know your poor key generator method, too. But if true random, like coin tossing, there is no problem, since knowing the method doesn't reveal the output. $\endgroup$
    – kelalaka
    Aug 4, 2020 at 14:32

2 Answers 2


You're missing the goal of a one-time pad: it's a key generated and distributed ahead of message transmission.

When using a one-time pad, the only secure time to exchange the pad is ahead of time. The message itself is encrypted with the pad to make up for the lack of a safe communications channel.

By computing a "one-time pad" such that the ciphertext is a fixed content, you are moving pad generation from "ahead of transmission" (when we have a secure channel) to "at transmission time" (when we do not).

You now need to send your "pad" instead of your "all As" message. This means that you have turned your pad into a message and have no secure channel to send it.


One has to be very precise about one is asking here. You have to make a distinction between two interpretations:

  • Interpretation 1: Alice & Bob use OTP exactly as prescribed. We know that every ciphertext is possible with some probability. In this case, we observe that the ciphertext just happens to be all A's.

    This is totally fine, and doesn't merit any special concern. This event doesn't leak anything special to an eavesdropper. There's nothing fundamental about an "all A's ciphertext", in the sense that if the all-A's ciphertext was somehow "risky", then every other ciphertext would be risky too.

  • Interpretation 2: Alice and Bob change OTP somehow so that they always get the all A's ciphertext. In one sense, this is problematic because we had to change OTP to make this happen: either the key depends on the plaintext, or the plaintext depends on the key. So this should make us nervous. On the other hand, if everyone in the world agrees that Alice is always sending all-A's ciphertexts to Bob, no matter what, then you can't really say that any information is leaking to the eavesdropper. (In fact, no information is getting to Bob either!)

As a general rule, there can be a big difference in security between "this event happens incidentally" vs "we change things so that this event always happens".


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.