0
$\begingroup$

I am designing a protocol where a user A sends a time-locked deposit to user that if the user B within time t provide a proof that he exists in a location x (this may be obtained by third party like Google), user B can get the deposit of A. Otherwise, A can get his money back.

Any help of how to do that using cryptography or two-way secure computations?

$\endgroup$
3
  • 2
    $\begingroup$ You can use a Trusted Timestamp Service to prove some piece of data existed at a specific time. Proving arbitrary location X is not easy, because GPS signals can be faked. Google can’t prove “where” you are. $\endgroup$ Jan 30, 2019 at 5:19
  • $\begingroup$ Thanks for your guide to use Trusted Timestamp Service. As far I understand from Wikipedia, is that user B can send his current location to a trusted third party that can verify the user location, then create a signature on that location. Is that okay ? $\endgroup$ Jan 30, 2019 at 5:33
  • 1
    $\begingroup$ No. Location data can easily be spoofed. Remember how many people were cheating at Pokémon Go a few years back? They used cheap radios to emit a fake GPS signal tricking their phones into believing they were circling the globe. If money is at stake, people will find a way to cheat to get it. $\endgroup$ Jan 30, 2019 at 5:38

1 Answer 1

1
$\begingroup$

I saw this interesting question a long time ago. Today I decided to answer it. I think practically this can't be very accurately (in time and location) solved and will never be totally secure because in practice always be some tricks to bypass the mechanism but here are a few thoughts.

A few words about time locking. The difficult characteristic here is the deniability attribute after a specific point in time. I can easily see this being implemented as a Smart Contract in a Distributed Blockchain. Now a few words about location locking. The difficult part about location locking is that anything related to radio communications is transmitted freely in the air and can be manipulated. The most location bounded method I can think is the Wifi fingerprinting. I know that there exist databases online with a wordwide list of WiFi networks and their details but I don't think there exists a list of WiFi networks' signal strength in a random point.

Now here comes the tricky part. The fingerprint of the location will start to change if you move away from the spot, but it will not change drastically if you move a few meters. We want to retain this information, so we need to use Locality Sensitive Hash Function to hash the fingerprint. But we have to keep in mind that the the result of LSH is really different from one coming from a cryptographic hash function because they lack the avalanche effect. So we will use a KDF to extract high entropy from a low entropy source.

The rest of the process is pretty simple, we use some kind of symmetric encryption to encrypt the time lock puzzle challenge, so in order for someone to have access to it he should first be able to get the correct asymmetric key which will be feasible if he gets the correct location_fingerprint.

An important note here is that we will need an exponentian S-curve for the LSH, similar to this one :

enter image description here

Bellow there is the smart contract pseudocode.

Smart Contract Pseudocode:

if time.now() <= time_limit:
        symmetric_key = kdf(input.location_fingerprint).get_key()
        time_lock_puzzle = symmetric_scheme
           .decrypt(symmetrically_encrypted_puzzle, symmetric_key)
        if solve_time_puzzle(time_lock_puzzle, input.time_lock_puzzle_solution):
             transact(x_amout, to_this_address)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.