Before the Covid-19 pandemic, any system that used smartphones to track locations and contacts sounded like a dystopian surveillance nightmare. Now, it sounds like a dystopian surveillance nightmare that could also save millions of lives and rescue the global economy. The paradoxical challenge: to build that vast tracking system without it becoming a full-on panopticon.

Since Covid-19 first appeared, governments and tech firms have proposed—and in some cases already implemented—systems that use smartphone data to track where people go and with whom they interact. These so-called contact-tracing apps help public health officials get ahead of the spread of Covid-19, which may in turn allow an easing of social distancing requirements.

The downside is the inherent loss of privacy. If abused, raw location data could reveal sensitive information about everything from political dissent to journalists' sources to extramarital affairs. But as these systems roll out, teams of cryptographers have been racing to do the seemingly impossible: Enable contact-tracing systems without mass surveillance, building apps that notify potentially exposed users without handing over location data to the government. In some cases, they're trying to keep even an infected individual's test results private while still warning anyone who might have entered their physical orbit.

"This is possible," says Yun William Yu, a professor of mathematics at the University of Toronto who has worked with one group developing a contact-tracing app for the Canadian government. "You can develop an app that both serves contact-tracing and preserves privacy for users." Richard Janda, a privacy-focused law professor at McGill University working on the same contact-tracing project, says they hope to "flatten the curve on authoritarianism" as well as infections. "We're trying to ensure that the way this rolls out is with consent, with privacy protection, and that we don't regret after the virus has passed—as we hope it does—that we've all handed over information to public authorities that we shouldn't have given."

WIRED spoke to researchers at three of the leading projects offering designs for privacy-preserving contact-tracing apps—all of whom are also collaborating with each other to varying degrees. Here are some of their approaches to the problem.

Bluetooth Contact Tracing

The best way to protect geolocation data from abuse, argues Stanford computer scientist Cristina White, is not to collect it in the first place. So Covid-Watch, the project White leads, instead anonymously tracks contacts between individuals based on their phones' Bluetooth signals. It never needs to record location data, or even to tie those Bluetooth communications to someone's identity.

Covid-Watch uses Bluetooth as a kind of proximity detector. The app constantly pings out Bluetooth signals to nearby phones, looking for others that might be running the app within about two meters, or six and a half feet. If two phones spend 15 minutes in range of each other, the app considers them to have had a "contact event." They each generate a unique random number for that event, record the numbers, and transmit them to each other.

Got a coronavirus-related news tip? Send it to us at covidtips@wired.com.

If a Covid-Watch user later believes they're infected with Covid-19, they can ask their health care provider for a unique confirmation code. (Covid-Watch would distribute those confirmation codes only to caregivers, to prevent spammers or faulty self-diagnoses from flooding the system with false positives.) When that confirmation code is entered, the app would upload all the contact event numbers from that phone to a server. The server would then send out those contact event numbers to every phone in the system, where the app would check if any of the codes matched their own log of contact events from the last two weeks. If any of the numbers match, the app alerts the user that they made contact with an infected person, and displays instructions or a video about getting tested or self-quarantining.