How can I turn this cipher into a perfect cipher by altering only its encryption algorithm? Given a toy cipher that picks a key, k, from the key space of {00,01,10} and a message,m, from the same set {00,01,10} and encrypts using E = m ⊕ k.

How can I change the encryption function E in order to make this cipher perfect(according to Shannon's perfect secrecy rule)?

NOTE: This cipher is not perfect because there's no way to get a ciphertext of 11 if the k or m are 00 thus the ciphertext reveals extra information about the plaintext which makes this cipher imperfect.

Any hints or suggestions as to how to approach the problem would be helpful.
Two ways to go about it:


Enlarge the key space so that every possible ciphertext is equally likely.
Change the operation from XOR to one that stays in the set of the three values you have.


Either would work, but since you asked for hints I will leave the specifics for you.