RaphaelJ / covid-tracer

CovidTracer, a decentralized and anonymous contact tracing application
GNU General Public License v3.0
79 stars 12 forks source link

# CovidTracer

CovidTracer is a heavily decentralized and anonymous contact tracing application designed for the ongoing COVID-19 pandemic.

CovidTracer notifies users of any close contact with other users diagnosed with COVID-19.

Android iOS

CovidTracer uses Bluetooth and cryptographic techniques to protect user privacy. App users do not share personal data. GPS location is never recorded.

CovidTracer follows the contact tracing recommendations of the Electronic Frontier Foundation.

CovidTracer is a free and open-source software (GPLv3).

Download and installation

Google and Apple are currently not allowing any coronavirus-related app that are not from recognized health organizations or governments on their stores. The app can still be installed using alternative channels:

On Android, an installable APK can be downloaded here.

On iOS, only registered Apple developpers can build, sign and install the app on their iPhones. This can be done by cloning this repository and by using Visual Studio for macOS. The iOS app does not support all features yet.

Frequently asked questions

Technical details

Overview

The app constantly broadcasts a unique 20 bytes identifier over Bluetooth Low Energy to nearby devices. This identifier is randonly generated (thus can not be associated with personal information) and is renewed every hour (preventing long-term tracking). Nearby CovidTracer users constantly record these identifiers in a database located on their devices. These identifiers are not shared with any central server or entity.

If the user ever reports her/himself as positive to SARS-CoV-2, the hourly-generated identifiers coresponding to the infectious period (16 days) are anonymously published on a central server. Other app users can then compare these identifiers with the ones they recorded over the past few days.

Details

When the app is started for the first time, a 256 bits key is generated using a cryptographic random number generator:

TracerKey = RNG()

This key will not be shared with other app users but will be used to derivate daily and hourly keys.

Every (UTC) day, a new 256 bits key is derived from the TracerKey using a SHA-256 HMAC function, together with the current date (as an ISO 8601 string):

DailyKey = HMAC-SHA256(TracerKey, CurrentDate('YYYY-MM-DD'))

The original TracerKey can not be derived back from the DailyKey.

The actual indentifier broadcasted over Bluetooth is derived every (UTC) hour from the current day' key and current time. As Bluetooth Low Energy characteristics are limited to 20 bytes, this key is also truncated:

CurrentKey = TRUNCATE(HMAC-SHA256(DailyKey, CurrentTime('YYYY-MM-DDTHH'))

If a user reports her/himself positive to SARS-CoV-2, all the generated daily identifiers used/to be used during the infectious period will be shared with a central server (from 5 days before the symptoms onset, up to 11 days after). Other application instances can then derivate all hourly generated keys during the infectious period, and potentially match then with any contact they previously had.

Additional measures have been taken to increase privacy:

More advanced diagnostic and debugging information can be obtained directly in the application by tapping 10 times on the tracer key ID on the About page.

Special thanks

These users provided the translation in the following languages: