Perfect security definitions In my notes, there are 2 definitions of perfect security:


&quot;For $M \in \{0,1\}^m$, define the distribution $D_M$ on strings as follows: to choose a random member of $D_M$, choose a random $K \in \{0,1\}^n$ and output $Enc(M,K)$.  Then $Enc,Dec$ is perfectly secure if $D_M$ is exactly the same for every $M$.  That is, for every $\alpha \in \{0,1\}^*$, the probability of $\alpha$ according to $D_M$ is independent of $M$.

For every two messages, no function can tell which one has been encrypted.  That is, $Enc,Dec$ is perfectly secure if for every $M_0,M_1 \in \{0,1\}^m$ and for every $f: \{0,1\}^* \to \{0,1\}$, the following holds: consider the experiment where $b$ is randomly chosen from $\{0,1\}$ and $K$ is randomly chosen from $\{0,1\}^n$; then the probability that $f(Enc(M_b,K)) = b$ is equal to $1/2$.&quot;



I have two questions:

Could someone clarify the definition of $D_M$ (the distribution of strings?). I'm not sure I get what is meant by the &quot;distribution of strings&quot; and how it differs from $M$
If $M_0$, and $M_1$ are any two $m$-bit messages, how is it possible that their encryption be equal $b$? Wouldn't the number of bits in the encrypted message be $m$? if that number is for example 10 then how does $P \left ( f( \mathrm{Enc} (M_b, K)) = b \right ) = 0.5$?
If M0, and M1 are any 2 m-bit messages, how is it possible that their encryption be equal b?


The definition does not say that their encryption is equal b. It says that the function f outputs b. This function is often called distinguisher (or attacker) and he should not be able to distinguish which message M0 or M1 was encrypted. In other words there exists no distinguisher who can distinguish which message was encrypted better than with probability of guessing (0.5).