3

When storing and accessing sensitive user-data, using the Multi-Index DB API, what considerations should be made to respect the user's privacy?

For sake of example, let's say I want to create a dApp that tracks the user's GPS location, by having it periodically written to the DB via some app on their phone. Then I want some actions in the smart contract to depend on whether the user has traveled a certain distance or to some particular location(s) in some allotted time.

My understanding is that, by default, all block producers, and any nodes listening to the network, would be able to see all of the GPS data for every user.

Are there any best practices, guidelines, codes, or standards, set out for developing EOS dApps that primarily respect the user's anonymity and ownership over their own data, while still allowing the smart contract to use their information in ways that are secure, verifiable, and connected to the rest of their data?

1
  • "while still allowing the smart contract to use their information in ways that are secure" really doubt this is possible. you can encrypt the on-chain data, but decryption probably needs to be done off-chain
    – confused00
    Commented Aug 14, 2018 at 17:55

2 Answers 2

1

To run logic against data in a Smart Contract it's going to have to be in a visible state so achieving Privacy would fail.

I'd further question why sensitive or private data would go to chain in the first place as even if it is encrypted via asymmetric or symmetric means the key can always be leaked or cracked when we achieve processing power fast enough, an immutable chain is the last place you'd want it.

Ideas like Medical data on a public chain are usually criticised because of this too.

Keep in mind RAM utilisation as well, on-going actions which store data in RAM will cause users wallets to suffer and be less inclined to use your dApp.

1

When storing and accessing sensitive user-data, using the Multi-Index DB API, what considerations should be made to respect the user's privacy?

This is not doable as by the definition all data in a public blockchain is public. If possible store data on the server side and/or only hashes of data in the blockchain.

2
  • 1
    you can store sensitive user-data on-chain while respecting user's privacy by encrypting the data
    – confused00
    Commented Aug 15, 2018 at 10:26
  • 1
    True. Thank you for the clarification. However the presented use case " Then I want some actions in the smart contract to depend on whether the user has traveled a certain distance or to some particular location(s) in some allotted time." means that the smart contract must be have all inputs in plain text. I do not think homomorphic encryption is viable yet en.wikipedia.org/wiki/Homomorphic_encryption Commented Aug 15, 2018 at 13:03

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.