APRICOT Design

1. Registration

1.1 Generate OTP

App sends phone num, app_id, device_id. Server creates and associates a random OTP token with the given details. Server sends this token to the given phone num via sms.

1.2 Verify OTP

App sends otp, phone num, app_id, device_id. Server verifies otp and logs in the user if the given otp is correct. The server generates for the user an access token, user id and pseudo ids (see pseudo id generation below). This generated info is returned to the app as the api response.

1.3 Pseudo id generation

2. Data collection

2.1 Beacon Specification

Suppose beacon length is 160 bits. Just one of random pseudo-ids received from server is used. Phone sets beacon randomly: changes every BEACON_CHANGE_INTERVAL (Default 5 mins)

2.2 Beacon Detection and Storage

3. Upload contact trace

4. View contact trace

Apricot Open Source Implementation

Android code: https://gitlab.com/mayankkussh/apricot

iOS code: https://gitlab.com/hshahrukh/contact-tracing-ios

Server code: https://gitlab.com/mhjn_shweta/contact_tracing