Is it necessary keys to have equal propabillities for the system to have perfect secrecy?

vi flag

Shannon's theorem for perfect secrecy states that $$\forall x \in M, y \in C:\quad P[x|y]=P[x] $$ I know we need $|M|\leq |C| \leq |K|$. If $|Μ|=|C|=|K|$ all keys should have equal probs.
If $|Μ|<|Κ|$ is it still necessary? I think not because : $$P[x|c_i]=P[x|c_j] \implies \sum_{k_i: E_{k_i}(m_i)=c_i}P[K=k_i]=\sum_{k_i:E_{k_i}(m_i)=c_i}P[k=k_j]$$ The difference is that when $|Μ|=|C|=|K|$ there is exactly one $k $ s.t: $Ε_k(m)=c$ while now there may be more .

Is my conclusion valid?

my flag

Is my conclusion valid?

Yes, it is.

I'll give you a simple example of such a system: we have a 1 bit plaintext, 2 bits of key and 1 bit of ciphertext; the encryption method is:

$$C = K_0 \oplus K_1 \oplus P$$

(where $K_0, K_1$ are the two bits of the key); with the probabilities of the key bits are:

  • 00 with probability 0.1
  • 01 with probability 0.2
  • 10 with probability 0.3
  • 11 with probability 0.4

Simple calculation shows that this scheme achieves perfect secrecy, even though the key is nonuniformly distributed.


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.