2

Let's take an egregious example of this:

Alice and Bob want to clone a Pokemon.

They set up a trade between their console devices. Alice's device sends a copy of the data to Bob's device, then Bob's device sends a copy of theirs to Alice. As each device begins to save the results, Alice shuts off her device preventing the save. Bob does not. Bob now has Alice's Pokemon and Alice still has a copy of it on her device.

Suppose we try to set up a dirty bit before beginning the transfer and revert changes on next power on if the transfer has not completed. That doesn't seem to work either. After both parties complete they send completion acknowledgements to one another, Alice simply has to shut her device off while Bob receives and processes the acknowledgement. Bob gets the clone, Alice's database state reverts to previous.

It just seems to me like it is incredibly difficult to ensure that two equal peers with no mediator can sync up on a single piece of data if both are at risk of communication cutoff strategically employed at the right moment. But is it impossible?

Searinox
  • 51
  • 2

1 Answers1

1

The situation you describe assumes that both Alice and Bob are not in full control of the device and software because otherwise Alice could use a modified software which prevents the deletion of the local Pokemon.
If this assumption is true, i.e. Alice cannot tamper with the device and software, one could do the transfer in multiple steps:

  1. Alice creates a random key and encrypts the Pokemon
  2. Alice sends the encrypted Pokemon to Bob but not yet the key. Alice waits for confirmation that Bob received the encrypted Pokemon.
  3. Alice deletes the local Pokemon.
  4. Alice sends the encryption key to Bob until it gets a confirmation. Bob confirms after successful decryption. Only after the confirmation both destroy the no longer needed key.

If the initial assumption is not correct, i.e. if Alice can actually modify the software which is in control of the exchange, then you need some external service where all parties can verify who owns a specific Pokemon now. While this will not make cheating impossible it can be used to detect if a Pokemon is used by somebody who does not own it. As indicated in a comment, Bitcoin is one way to run such a service.

Steffen Ullrich
  • 184,332
  • 29
  • 363
  • 424
  • This works for exchanging Pokemons if they each not send the key before they have received the encrypted Pokemon from the other party. – DepressedDaniel Dec 18 '16 at 04:49
  • @DepressedDaniel: unfortunately I'm unable to find out what you are trying to say with your comment. Could you explain it in more depth? – Steffen Ullrich Dec 18 '16 at 05:15
  • @Steffen-Ullrich Yes the assumption is that they do not have control of the software, because once they can edit the software itself it's basically game-over since they can do anything and it is outside the system's competence to prevent. That creation of a penalty in case of interruption via key is useful only if we care about a single party receiving the info however. In this case we care about both parties either successfully completing, or not completing the transaction - an exchange whose result will save the same outcome on both sides, surviving interruption exploits at any stage. – Searinox Dec 18 '16 at 14:11
  • @Steffen-Ullrich Another thing I'd add to your example, if the user interrupts AND never ever completes the key receipt then there is a data loss. The idea is for both parties to be consistent on the final outcome, to be in sync or for the lack of sync to be fixed after the next power-on, even if the other party is no longer around. If Alice doesn't continue the key send or powers off her own device after, then the data is effectively lost. – Searinox Dec 18 '16 at 14:16
  • @Searinox: If Alice switches off the device after she deleted the original Pokemon (step 3) the procedure will still continue in step 4 after she switched the device on again because Alice still has the encryption key. Thus there is only a loss if Alice can never connect to Bob again. There might by some cryptographic tricks which offer more protection but these should be better asked at crypto.stackexchange.com. – Steffen Ullrich Dec 18 '16 at 15:44