Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
car
.gitignore
Pipfile
Pipfile.lock
README.md
UMA-5_10_17-session.db
alicia.py
app.py
bob.py
car_session.py
demo_keys.py
enrico.py
nucypher_helper.py
vehicle_data_exchange.py

README.md

NuCypher's Vehicle Data Demo

Vehicle Data Demo

Alicia has a vehicle with a on-board diagnostics (OBD) device that measure various components and outputs this data in encrypted form. Since she thinks that she may want to share this data in the future, she uses NuCypher to create a policy public key for the OBD device to use, so she can read and delegate access to the encrypted data as she sees fit. The OBD device uses this public key to produce a database with some amount of encrypted sensor measurements; this database can be located on some storage service (e.g., IPFS, S3, whatever).

At some point, she wants to share this information with other people, such as her Insurance company (Bob). Once she obtains her Insurer's public keys, she can create a policy in the NuCypher network to grant access to him. After this, her Insurer can read the encrypted database (which was populated by the OBD device) and request a re-encrypted ciphertext for each measurement, which can be opened with the Insurer's private key.

This simple use case showcases many interesting and distinctive aspects of NuCypher:

  • Alicia can create policy public keys before knowing who can be the potential consumers.
  • Alicia, or anyone entity the policy public key (e.g., the OBD device), can produce encrypted data that belongs to the policy. Again, this can happen before granting access to any consumer.
  • As a consequence of the previous point, Data Sources, like the OBD device, are completely unaware of the recipients. In their mind, they are producing data for Alicia.
  • Alicia never interacts with the Insurer: she only needs the Insurer's public key.
  • Alicia only interacts with the NuCypher network for granting access to the Insurer. After this, she can even disappear from the face of the Earth.
  • The Insurer never interacts with Alicia or the OBD device: he only needs the encrypted data and some policy metadata.

How to run the demo

Install dependencies (only for the first time):

$ pipenv install --dev --three --skip-lock --pre

The code for the NuCypher can be obtained from fix-demo Run a local NuCypher node in a separate terminal:

$ pipenv shell

(vehicle-data-exchange)$ nucypher ursula run --dev --debug --federated-only

Run the demo:

$ pipenv shell

(nucypher)$ python vehicle_data_exchange.py

Now you can interact with the demo at http://127.0.0.1:8050/

You can’t perform that action at this time.