For a well performance on my server it`s essential that i can store latitude and longitude unencrypted. My application is based on location searches, almost every query needs to be filtered on location.
This means i have to decrypt each row of each query first before im able to get the correct rows. Thats a really big problem if there are many rows.
This way i tought for privacy i could store the values lat and lng cutted.
For example:
lat: 52.52835
lng: 13.40547
->
lat: 52.528
lng: 13.405
Cutting on 3. decimal im recieving a rectangle with about ~ 50x80m. This might be no problem for still an accurate calculation.
Cutting on 2. decimal im recieving a rectangle with about ~ 400x700m. In worst case this can make a difference of 1km in calculation.
Instead i could add "5" as 3. decimal to improve the calculation up to 500m difference worst.
In some case it is possible that a single house is in the whole rectangle and the hacker could get the exact adress like that.
To solve that problem i could store the city location, but for bigger citys the calculation would get completely useless.
Now what you think if a hacker would be able to steal the data and get the unencrypted values, would this be a problem ?
Other suggestions to solve this problem ?
Edit:
I could also try to manipulate each value, with for example an offset to make it harder for an attacker, but that wouldnt be hard to remanipulate.