Re: Unbreakable code using XOR for one time pad?



Bill B wrote:
Guy Macon wrote:
Bill B wrote:
Why does the key need to be random?

Try it yourself with this 1 byte message: "Y"
[...]

Now, if Eve knows the answer is "Y" or "N" she has
the option of xoring character 0 against the byte "Y"
to obtain "Y", or she can use character 23 to obtain
"N"

She basically has the choice of making the text say anything she
wants.

How can she possibly find the real message?

The fact that special-case message spaces show a pattern of redundancy that may tolerate corresponding redundancy in the key is not particularly interesting. A uniform random key-stream can support perfect secrecy in the general case. When we have special-case info about the message space, we can often use it to encode more efficiently, which is a better tactic than weakening our key-generation requirements.

If Alice and Bob know their message space precisely in advance, say it contains M message of non-zero probability, then they can encode any message in B = ceiling(lg(M)) bits. They can then achieve prefect secrecy using only B bits of (uniform random) key. Note that in in Bill B's example, M is two and B is one; he could have used one bit of key rather than one byte.


--
--Bryan
.



Relevant Pages

  • Re: Unbreakable code using XOR for one time pad?
    ... the option of xoring character 0 against the byte "Y" ... perfect secrecy in the general case. ... about the message space, we can often use it to encode more efficiently, ... If Alice and Bob know their message space precisely in advance, ...
    (sci.crypt)