SAN FRANCISCO — Letters from around the globe began pouring into the inbox of Timothy D. Cook not long after the publication of the first revelations from Edward J. Snowden about mass government surveillance.
Do you know how much privacy means to us? they asked Apple's chief executive. Do you understand?
Cook did. He was proud that Apple sold physical products — phones, tablets and laptops — and did not traffic in the intimate, digital details of its customers' lives.
That stance crystallized on Tuesday when Cook huddled for hours with lawyers and others at Apple's headquarters to figure out how to respond to a federal court order requiring the company to let the United States government break into the iPhone of one of the gunmen in a San Bernardino, California, mass shooting. Late Tuesday, Cook took the fight public with a letter to customers that he personally signed.
"We feel we must speak up in the face of what we see as an overreach by the U.S. government," wrote Cook, 55. "Ultimately, we fear that this demand would undermine the very freedoms and liberty our government is meant to protect."
Cook's standoff with law enforcement officials is indicative of his personal evolution from a behind-the-scenes operator at Apple to one of the world's most outspoken corporate executives. During that time, he has moved a once secretive Silicon Valley company into the center of highly charged social and legal issues. While Cook's predecessor, Apple co-founder Steven P. Jobs, was considered a business icon, he never took aggressive positions on such matters as Cook now has.
Being at loggerheads with the U.S. government is risky for Apple and may draw a torrent of public criticism of the world's most valuable company at a time when its growth rate has significantly decelerated.
Yet people who know Cook said he did not believe he had a choice but to be vocal. Cook, who became Apple's chief executive in 2011, has long said that businesses and their leaders should think of themselves as important members of civic society. In September, he emphasized that this responsibility "has grown markedly in the last couple of decades or so as government has found it more difficult to move forward."
Cook "says what he believes, especially in difficult situations," said Don Logan, the former chairman of Time Warner Cable who has been friends with Cook since he became chief executive of Apple, bonding over their shared alma mater, Auburn University. Of Cook's opposition to the court order, Logan said: "Tim is currently dealing with a very difficult situation and he knows the decision he has made has lots of ramifications, good or bad. But he wants to do the right thing."
Apple declined to make Cook available for an interview. The company is preparing to file an opposition brief against the court order.
Cook's ideas about civic duty were partly formed during his childhood in rural Alabama. In a speech at the United Nations in 2013, he recounted how Ku Klux Klansmen had once burned a cross on the lawn of a black family's home and how he yelled for them to stop. "This image was permanently imprinted in my brain, and it would change my life forever," he said.
At Apple, which he joined as a senior executive in 1998, Cook was a quiet figure for much of the period when he worked for Jobs, a showman who prized secrecy at the company. After Jobs stepped down because of ailing health, Cook began making Apple more open, publishing an annual report on suppliers and working conditions for more than a million factory workers.
In 2014, Cook revealed he was gay, a move widely seen as making a statement about gay rights. Last year, he wrote an editorial decrying religious freedom laws that had been proposed in more than two dozen states that would let people skirt anti-discrimination laws that conflicted with their religious beliefs.
His outspokenness has drawn criticism, with some investors questioning how nonbusiness initiatives — including some of Apple's environmental moves — would contribute to the company's bottom line. Cook responded at a shareholder meeting that it is important for Apple to do things "because they're just and right."
Privacy has long been a priority for Cook. At a tech conference in 2010, he said Apple "has always had a very different view of privacy than some of our colleagues in the Valley." He cited the iPhone's feature that shows where a phone — and presumably its user — is and said fears about abuse and stalking had compelled the company to let consumers decide whether or not their apps could use their location data.
Cook's views on privacy hardened over time as customers globally began entrusting more personal data to Apple's iPhones. At the same time, Apple was growing tired of requests from government officials worldwide asking the company to unlock smartphones.
Each unlocking request was carefully vetted by Apple's lawyers. Of those deemed legitimate, Apple in recent years required that law enforcement officials physically travel with the gadget to the company's headquarters, where a trusted Apple engineer would be called to unlock the device in a secure SCIF, or secure compartmented information facility. Processing these requests was extremely tedious. More worrisome, the data stored on its customers' iPhones was growing more personal, including photos, messages, and bank, health and travel data.
And some government officials were not exactly instilling confidence in Apple's engineers. In one case, law enforcement officials rushed a phone to Apple's headquarters for unlocking, only for the engineers to discover their target had not enabled the device's passcode feature.
So Cook and other Apple executives resolved not only to lock up customer data, but to do so in a way that would put the keys squarely in the hands of the customer, not the company. By the time Apple rolled out a new mobile operating system, iOS7, in September 2013, the company was encrypting all third-party data stored on customers' phones by default.
"People have a basic right to privacy," Cook has said.
By then, Snowden's disclosures about how the National Security Agency had cozied up to some tech companies and hacked others to gain user data were reverberating worldwide. The disclosures included revelations of a comprehensive, decadelong CIA program to compromise Apple's products; CIA analysts tampered with the products so the government could collect app makers' data. In other cases, the agency was embedding spy tools in Apple's hardware, and even modifying an Apple software update that allowed government analysts to record every keystroke.
Letters from alarmed Apple customers started flooding into Cook's inbox, fortifying his stance on privacy. Apple's eighth mobile operating system, iOS8, which rolled out in September 2014, made it basically impossible for the company's engineers to extract any data from mobile phones and tablets.
For officials at the world's law enforcement agencies, the new software was a clear signal that Apple was growing defiant. A month after iOS8's release, James Comey, the director of the FBI, told an audience at the Brookings Institution that Apple had gone "too far" with the expanded encryption, arguing that the operating system effectively sealed off any chance of tracking kidnappers, terrorists and criminals.
Government agencies began to press Apple and other tech companies for so-called back doors that could bypass strong security measures. With tensions rising, some form of technical compromise — whether in the form of a chip, a back door or a key — was off the table by 2015.
At Apple, Cook and others continued to work with investigators to the extent the company could and complied with court orders. Last October, a federal judge in New York said the government was overstepping its boundaries by using a centuries-old law, the All Writs Act, as the basis for its request that Apple open an iPhone for a drug investigation. Apple's lawyer sided with the judge in the case. The matter has not been resolved.
After December's San Bernardino attack, Apple worked with the FBI to gather data that had been backed up to the cloud from a work iPhone issued to one of the assailants, according to court filings. When investigators also wanted unspecified information on the phone that had not been backed up, the judge this week granted the order requiring Apple to create a special tool to help investigators more easily crack the phone's passcode and get into the device.
Apple had asked the FBI to issue its application for the tool under seal. But the government made it public, prompting Cook to go into bunker mode to draft a response, according to people privy to the discussions, who spoke on condition of anonymity. The result was the letter that Cook signed on Tuesday, where he argued that it set a "dangerous precedent" for a company to be forced to build tools for the government that weaken security.
"Compromising the security of our personal information can ultimately put our personal safety at risk," he wrote. "That is why encryption has become so important to all of us."
Far from backing down from the fight, Cook has told colleagues that he plans to accelerate plans to encrypt everything stored on Apple's myriad devices, services and in the cloud, where the bulk of data is still stored unencrypted.
"If you place any value on civil liberties, you don't do what law enforcement is asking," Cook has said.