All Projects → Georeactor → encrypted-geofence

Georeactor / encrypted-geofence

Licence: other
testing out homomorphic encryption

Programming Languages

javascript
184084 projects - #8 most used programming language
Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to encrypted-geofence

concrete
Concrete ecosystem is a set of crates that implements Zama's variant of TFHE. In a nutshell, fully homomorphic encryption (FHE), allows you to perform computations over encrypted data, allowing you to implement Zero Trust services.
Stars: ✭ 575 (+1642.42%)
Mutual labels:  paillier, homomorphic-encryption
rust-paillier
A pure-Rust implementation of the Paillier encryption scheme
Stars: ✭ 78 (+136.36%)
Mutual labels:  paillier, homomorphic-encryption
javallier
A Java library for Paillier partially homomorphic encryption.
Stars: ✭ 67 (+103.03%)
Mutual labels:  paillier, homomorphic-encryption
node-seal
Homomorphic Encryption for TypeScript or JavaScript - Microsoft SEAL
Stars: ✭ 139 (+321.21%)
Mutual labels:  homomorphic-encryption
libshe
Symmetric somewhat homomorphic encryption library based on DGHV
Stars: ✭ 24 (-27.27%)
Mutual labels:  homomorphic-encryption
minionn
Privacy -preserving Neural Networks
Stars: ✭ 58 (+75.76%)
Mutual labels:  homomorphic-encryption
gomorph
Implementing Homomorphic Encryption in Golang 🌱
Stars: ✭ 76 (+130.3%)
Mutual labels:  homomorphic-encryption
Smart Location Lib
Android library project that lets you manage the location updates to be as painless as possible
Stars: ✭ 1,607 (+4769.7%)
Mutual labels:  geofences
gmaps-geofence
create area geofencing in google map using react js
Stars: ✭ 34 (+3.03%)
Mutual labels:  geofences
haal
Hääl - Anonymous Electronic Voting System on Public Blockchains
Stars: ✭ 96 (+190.91%)
Mutual labels:  homomorphic-encryption
awesome-secure-computation
Awesome list for cryptographic secure computation paper. This repo includes *Lattice*, *DifferentialPrivacy*, *MPC* and also a comprehensive summary for top conferences.
Stars: ✭ 125 (+278.79%)
Mutual labels:  homomorphic-encryption
federated
Bachelor's Thesis in Computer Science: Privacy-Preserving Federated Learning Applied to Decentralized Data
Stars: ✭ 25 (-24.24%)
Mutual labels:  homomorphic-encryption
WeDPR-Lab-Android-SDK
Android SDK of WeDPR-Lab-Core; WeDPR即时可用场景式隐私保护高效解决方案核心算法组件Android SDK
Stars: ✭ 14 (-57.58%)
Mutual labels:  homomorphic-encryption
iOS-Geofence-Demo
Setup Geofences and get notifications when the device enters or leaves the geofence.
Stars: ✭ 71 (+115.15%)
Mutual labels:  geofences
federated-learning-poc
Proof of Concept of a Federated Learning framework that maintains the privacy of the participants involved.
Stars: ✭ 13 (-60.61%)
Mutual labels:  homomorphic-encryption
WeDPR-Lab-iOS-SDK
iOS SDK of WeDPR-Lab-Core; WeDPR即时可用场景式隐私保护高效解决方案核心算法组件iOS SDK
Stars: ✭ 13 (-60.61%)
Mutual labels:  homomorphic-encryption
fully-homomorphic-encryption
Libraries and tools to perform fully homomorphic encryption operations on an encrypted data set.
Stars: ✭ 2,737 (+8193.94%)
Mutual labels:  homomorphic-encryption
concrete-numpy
Concrete Numpy is a python package that contains the tools data scientists need to compile various numpy functions into their Fully Homomorphic Encryption (FHE) equivalents. Concrete Numpy goes on top of the Concrete Library and its Compiler.
Stars: ✭ 111 (+236.36%)
Mutual labels:  homomorphic-encryption
elgamalext
Extension for the .NET Framework cryptography subsystem, which introduces the ElGamal public key cryptosystem with support for homomorphic multiplication.
Stars: ✭ 14 (-57.58%)
Mutual labels:  homomorphic-encryption
WeDPR-Lab-Core
Core libraries of WeDPR instant scenario-focused solutions for privacy-inspired business; WeDPR即时可用场景式隐私保护高效解决方案核心算法组件
Stars: ✭ 147 (+345.45%)
Mutual labels:  homomorphic-encryption

crypto-geofence

Is it possible for me to check if I'm inside a geofence, without revealing my location to the server, and without the server giving me the true geofence?

Video at DEF-CON Crypto & Privacy Village 2018: https://www.youtube.com/watch?v=ySl2ywGiFkw

What is homomorphic encryption?

Homomorphic encryption is a new technique where you can perform arithmetic operations on encrypted numbers. It's possible with a few different algorithms, including the factoring-based one used here (Paillier). In the future it might be better to use a quantum-resistent algorithm based on lattice cryptography.

If you send the encrypted numbers and a public key, another computer can perform arithmetic on the number and scalar values without seeing the actual values.

Applying it to Geofences

Encrypted coordinates and the public key are POSTed to the server

Originally I was hoping to find if you were in the box by testing this:

latitude_offset = (north - latitude) * (south-latitude)

The number would be negative for south < latitude < north, and positive in any other condition. It would also be difficult to find north and south by factoring the result. Unfortunately, multiplying encrypting numbers is not possible in the Paillier cryptosystem. I got this funny error:

Anyway, you can obfuscate offsets by multiplying by a random scalar instead:

north_offset = (north - latitude) * random()
south_offset = (south - latitude) * random()

One of the offsets should be positive and the other negative, but the random factor makes it difficult to figure out the true offset to the geofence. Combined with rate-limiting, this could make your fence exta-secret.

Going forward

I would like to:

  • calculate geofences for more complex shapes, by breaking them into rectangles or triangles
  • calculate distance, using a different cryptosystem which allows multiplication

Libraries used

Using Brian Thorne's homomorphicjs on the client, and Australia NICTA's Python-Paillier on the server

License

MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].