Solution (source code)

= Solution

Alice and Bob need a uniformly random secret key $K\in\{0,1\}^m$ known only to them. Alice publicly sends the <one-time pad> ciphertext $C=M\oplus K$, and Bob recovers $M=C\oplus K$. For every observed $c$ and possible message $m$ there is exactly one equally likely key $k=c\oplus m$, so $C$ is independent of $M$ and Eve learns nothing.