Many Time Pad?
This isn't really game related but I don't know where else to put it and someone here may find it interesting.
Over the past few weeks I have become interested in cryptography and Ive been working on a code that could make the one time pad more practical. Ive gone through 4 revisions all of which could be broken using basic algebra. This version however, is beyond my skill level and I can see no way of breaking it. I'm hoping someone will be willing to help me.
Here is how it works:
Alice and Bob have two separate independent keys that are known to both of them. Both Alice and Bob have a source of independent random data. Using the random data and the keys they create a OTP using a system based off of Diffie-Hellman key exchange. Once they both have the OTP, Alice uses it to encode a message and sends it to Bob. Bob then decrypts the message.
Mathematics of the system:
T is the plaintext
C is the ciphertext
Ka is Alice's key
Kb is Bob's key
Ra is Alice's random source
Rb is Bob's random source
M is the modulo
i = Ra + Ka mod M
j = Rb + Kb mod M
k = i + j - Ka - Kb mod M
C = k + (T xor Ka xor Kb) mod M
Ra and Rb are independent.
M is some number of the form 2n
T, Ka, Kb, Ra, Rb, and k are private (Only Alice and Bob know them).
i, j, M, and C are public (Everyone knows what they are).
Problem: If Eve knows only i, j, M, and C what other info can she get if any? (Or how can this code be broken?)
Quote:
k = i + j - Ka - Kb mod M
C = k + (T xor Ka xor Kb) mod M
How does that work? Only Alice has Ka, and Bob has Kb, right? Or are Ka and Kb previously exchanged using Diffie-Hellman?
If Alice and Bob reuse the same keys, say with data C1, C2, randomness Ra1, Ra2, etc. Then Eve can determine:
i1 - i2 = Ra1 - Ra2 + Ka - Ka mod M = Ra1 - Ra2 mod Mj1 - j2 = Rb1 - Rb2 + Kb - Kb mod M = Rb1 - Rb2 mod Mk1 - k2 = i1 - i2 + j1 - j2 mod MC1 - C2 = k1 - k2 + (T1 xor Ka xor Kb) - (T2 xor Ka xor Kb) mod MC1 - C2 - (k1 - k2) = (T1 xor Ka xor Kb) - (T2 xor Ka xor Kb) mod M
This sounds like some usefull information can be derived, for example if T1 = T2, then C1 - C2 - (k1 - k2) = 0 mod M.
Quote:Only Alice has Ka, and Bob has Kb, right?Alice has Ka and Kb. So does Bob. The method of key transfer is not important to the problem.
Also k is not known to Eve so k1 - k2 can't be solved for. Unless I missed something in your math. If I did please point it out to me.
OTPs were used for pretty short messages.. assuming that is still true (not transmitting serveral GB's at a time) you could store random data on a pair of CDs or DVDs and use that as OTPs. The weakest link here is the pads/keys themselves (the disks). They could be stolen or intercepted and duplicated enroute from Bob to Alice. Barring this it would be totally impossible for others to decrypt the messages.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement