As live streaming apps surge in popularity in China, the companies profiting from the craze are pulling out all the stops to censor millions of users and avoid the wrath of a government intent on maintaining a tight control over the flow of information.

A new report from the University of Toronto's Munk School of Global Affairs describes how China's biggest live streaming apps work to shut down discussion on everything from sex and gambling to political gaffes and government corruption.

"Here you see, over the past year, an industry and a type of application exploding in popularity and it's offering users in China new and fun ways to express themselves and connect," Masashi Crete-Nishihata, research manager for the school's internet watchdog Citizen Lab, told CBC News.

"But these expressions and connections are also threatening to the government. So companies are caught in this balancing act — on the one hand trying to grow their businesses and leverage new innovation, while on the other hand making sure they don't cross the line."

How it works

Crete-Nishihata and his team downloaded the country's three most popular live streaming apps — YY, 9158, and Sina Show — and reverse-engineered them to extract some 19,464 keywords that trigger censorship within the services' chat features.

Keyword monitoring and filtering — just one way the companies crack down on unwanted speech — works by embedding a list of banned terms within the application itself.

"If your message contains a keyword from the list then the message is not sent," the report explains.

YY Live and Sina Show are two of the live streaming platforms Citizenlab was able to reverse-engineer. (YY/Sina Show )

The list of banned words contains a lot of things you would expect — sexually explicit content like "young girl undressing" and "nude video chat," terror-related terms like "improvised explosive devices," and politically sensitive information like "Tiananmen Square massacre."

But a lot of it is reactive.

"Keywords will be added in and around a particular news event," Crete-Nishihata said.

For example, last month when an translation error caused President Xi Jinping to tell G20 leaders that China's economic policy aims to "loosen clothing," the apps added a total of 17 keywords that referenced the speech.

You can browse the event-triggered keyword bans on Citizen Lab's interactive timeline.

Amnesty International volunteers tie cloth gags across their mouths during a 2008 protest in central Sydney over the Chinese government's internet censorship. (Will Burgess/Reuters)

Who calls the shots?

But those events were not censored equally across the three apps. In fact, the lists of banned keywords varied dramatically.

"This suggested that there's no centralized list sent to the companies by government authorities," Crete-Nishihata said.

While China exerts direct control over news media, it appears to take a more hands-off approach with private companies.

"It's not practical for the government to control every aspect of censorship so they need the participation of the private system," Crete-Nishihata said. It's not a "top-down kind of control. It's much more distributed."

In some cases, the companies even included the names of their competitors in their ban lists — something Crete-Nishihata said is motivated "more by business interests."

"What we're seeing is that censorship can be driven by multiple agendas," he said.

An anti-censorship protester holds up a placard during a demonstration outside the South China Morning Post office in Hong Kong in 2012. (Tyrone Siu/Reuters)

'Cat-and-mouse game'

Censorship is a full-time job for these companies.

Users, according to Crete-Nishihata, have come up with "playful and creative" use of Chinese language to dodge the censors.

The censors sometimes pick up on these puns, nicknames and alternative spellings and add them to the ban lists.

"Users and the censors are engaged in this kind of cat-and-mouse game," Crete-Nishihata said.

"Censors will never be able to comprehensively censor speech through keyword filtering systems, but users also will not be comprehensively able to evade these controls. So it's always this kind of balance between the two."

But as more Chinese citizens take up space in the digital sphere, it's becoming a tougher to maintain that balance.

"That's the kind of tension that you see with social media in China."