$M$ is not a $\sigma$-algebra, but a set of all possible messages. All three spaces: key space $K$, the message space $M$ and the ciphertext space $C$ are simply sets of all binary sequences of constant lengths $b_k$, $b_m$, $b_c$.

$$K=\underbrace{\{0,1\}\times...\times\{0,1\}}_{k}=\{0,1\}^{b_k}$$

$$M=\{0,1\}^{b_m}$$

$$C=\{0,1\}^{b_c}$$

E.g., for $b_k=2$, $K=\{00,01,10,11\}$.

Key $k$ is uniformly distributed draw from $K$. Continuing in the example above

$$P(k=00)=P(k=01)=P(k=10)=P(k=11)=\frac{1}{2^{b_k}}=0.25$$

### Perfect security

The idea behind perfect security is that you should not learn anything by seeing the ciphertext. Note, *encryption is a bijection, given a key*. You fix the message and change keys, then the encryption produces ciphertexts from ciphertext space equally likely.

A typical example is one-time pad (OTP) of size $2$. You have the same key space as before. We want to send a message $m=01$. The OTP encryption is done with exclusive OR, $x=m\oplus k$.

For our message, all ciphertexts are equally likely.

$$01\oplus00=01$$
$$01\oplus01=00$$
$$01\oplus10=11$$
$$01\oplus11=10$$

The same work the other way around, when we fix the key and iterate messages. This means we have the perfect security - by seeing the ciphertext, we learn nothing about the message, all messages are equally likely! Remember, never reuse key in OTP!