Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Cryptography, the conditional probability..

$$\text{Pr} (C = y \mid P = x) = \sum_{k,\,e_k(x)=y} \text{Pr}(K = k)$$

If the keys are uniformly distributed, can we say..

$\mathrm{Pr}(C=y\mid P=x)$ is also uniform i.e ciphertext is uniformly distributed too. If yes, can someone give me how to mathematically show it?

Also, can we say that every ciphertext uses a different key, since ever key is equally likely?

share|cite|improve this question

I assume $C$ is the ciphertext, $K$ is the key, $P$ is the plaintext, and $e_k(x)$ is the encrypted text corresponding to plaintext $x$ and key $k$.

$\text{Pr}(C=y|P=x)$ is not a random variable, so it doesn't quite make sense to say that is uniform. If you mean, for a given plaintext $x$ that $C$ is uniform (over the set of all possible ciphertexts), that's usually not true because the space of possible keys is usually much smaller than the space of possible ciphertexts.

I'm not sure what you mean by your second question. If you're talking about different ciphertexts with different plaintexts, of course they can use the same key. If you're talking about the same plaintext, since the mapping from (plaintext+key) to ciphertext is deterministic, different ciphertexts will have to result from different keys.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.