Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One way to explain OTPs is a proof by induction.

The base step:

Start with one bit. The key is also a bit chosen at random, and the cipher text is plain XOR key.

You can then work out that no matter what key is chosen, you have no reason to believe 0 or 1 is the original plain text.

The inductive step is simply to add a new random bit of key that is independent from the prior key, and a new bit of plaintext.

What I like about this explanation is that you can actually work out the decision trees for a few bits to convince yourself that the encryption still holds.



Is that actually induction? The randomness of one ciphertext bit in the induction step doesn't depend on its previous bits. You're really just applying your base step multiple times.


The inductive step here is in the conjecture:

This algorithm is information-theoretic secure for a bitstring of length N

The grantparent's argument is to first convince yourself that a) this is true for a bitstring of length 1, and b) if it's true for a bitstring of length N, then it's also true for a bitstring of length N+1 (or alternately formulated: if it's true for bitstrings of length M and N, you can concat them and it will be true for a bitstring of length M+N)

The inductive step is then to apply this to show that because it's true for length 1, it's also true for length 2. And if it's true for length 2 then it's true for length 3. etc etc.


As far as I know that’s the idea of proof by induction: if a is true a+ 1 is true. A is true. Ergo it’s true for all possible numbers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: