Is the one-time pad still perfectly secret if all-zero keys are excluded? I'm trying to solve this question related to one-time pads and perfect secrecy:



My solution is: I assumed that the current message space is  $M = \left\{ 0,1 \right\}^l$ and the new keyspace after removing $0^l$ from the set is $K = \left\{ 0,1 \right\}^l - 0^l$. Since clearly $|K| &lt; |M|$, the new scheme is not perfectly secret.

Is my solution correct?
Yes your solution is correct; the flawed OTP scheme is no longer perfectly secret if there are fewer keys than messages.

Once you remove the all zero key the property
$$
\mathbb{P}[M=m|C=c]=\mathbb{P}[M=m],\qquad \forall m,\forall c,\quad(1)
$$
required for perfect secrecy will no longer necessarily