HONG KONG — College student Naida Lam didn't think much about her digital privacy until June 11.
It was the night before massive protests in Hong Kong against a law that would allow suspects to be extradited to mainland China.
Like many students, Lam, 20, had been using the encrypted messaging app Telegram, participating in group chats that were used to plan and coordinate ahead of the demonstration.
But that night, Hong Kong authorities arrested the administrator of one of the largest of these groups.
For Lam it was a wake-up call.
"When my friends told me that another group's administrator got arrested, immediately I feared that something will happen in the group I was in," Lam said. "I left the group and changed all my privacy settings."
The arrested Telegram administrator, Ivan Ip, 22, managed a chat of more than 30,000 members. While protesters were starting to gather around Hong Kong's government headquarters, police turned up at Ip's house and arrested him for conspiracy to commit public nuisance.
It was not clear how the police were able to identify Ip, raising questions about whether officials had infiltrated the group itself. Lam said the arrest put people on alert that they could also be identified.
"Everyone is in deep fear of having their own identity exposed on Telegram," Lam said, "and all were trying to help each other to hide our identities."
The arrest did not appear to put a dent in the protests. Thousands of people occupied major roads and surrounded the Legislative Council building — the Hong Kong government's headquarters — preventing lawmakers entering for a meeting to discuss the bill.
A small group of the demonstrators clashed with police, overturning barricades and throwing objects at the officers, who fired pepper spray, tear gas and rubber bullets.
The legislation was eventually postponed indefinitely, and Carrie Lam, Hong Kong's chief executive, was forced to issue a public apology.
But the digital crackdown nevertheless left its mark. Internet-savvy young people, who once only saw the upsides of a technology that helped them organize protests, have grown increasingly wary of surveillance.
They are worried the extradition law is the latest step in Hong Kong, a semiautonomous capitalist city, being drawn into the murky legal system of mainland China. Beijing has created a sophisticated surveillance state, and has emerged as a world leader in facial recognition technology.
It's a concern that extends beyond messaging apps. During the protests, there was the unfamiliar sight of people waiting in line to buy paper tickets at the city's train station. Usually they use a contactless digital card, named Octopus, but many were avoiding this because they feared leaving digital tracks.
Meanwhile, others decided to clear their phone's location history, and delete any other data that might give away their whereabouts. Many discouraged their fellow demonstrators from taking photos and videos because they might be posted online. Shouts of "do not post it on social media" were heard throughout the marches.
Tam, 24, who declined to provide his first name in fear of being prosecuted, was among the thousands who dressed in black and engaged in a sit-down protest outside the Legislative Council on Monday afternoon.
"I usually use story mode for Instagram, as it is harder to leave a record," Tam said, referring to the app's feature where posts automatically disappear after 24 hours. "If I leave a record, I'm afraid it could be used against me in the future."
As well as their digital efforts, many protesters deployed the more traditional tactic of wearing a mask, something that has become commonplace in Hong Kong in recent years.
Protesters that spoke with NBC News said the realities of modern surveillance have changed even in the five years since Hong Kong's pro-democracy Umbrella Movement, which flooded the streets for 79 days in 2014.
"People are now more aware of their own safety before taking any action. Some would even consult a lawyer's suggestion before acting," said John Jung, a 20-year-old university student.
Jung, who runs one of the area's few civilian-led first-aid stations, said he and colleagues still used encrypted messaging apps, but now limit the number of people stored in the contacts list.
"The lesser number of people knowing about our internal information the better," he said. "This is to prevent any form of information leakage."