Apple CEO Tim Cook released a statement arguing against the FBI's recent order to hack into the San Bernardino shooter's iPhone 5c. (Jhaan Elker/The Washington Post)

Johnny Hockin was unsure how he felt about Apple chief executive Tim Cook’s very public rebuke Wednesday of the federal government’s demand for help unlocking an iPhone left behind by an assailant in the San Bernardino terrorist attack.

Hockin, 32, owns an iPhone. But he’s not a technologist or privacy advocate. He’s a film producer living in Toronto. Yet his social media feeds burned up with strong reactions to Cook’s letter. Many people applauded Apple’s defiant stance. The Twitter hashtag “StandWithApple” took off. At the same time, presidential candidate Donald Trump was on Fox denouncing the company, wondering, “Who do they think they are?” And several police groups criticized Apple’s position.

Hockin watched it all unfold.

“I have a lot of ambivalence,” he said. “I agree with Tim Cook in general. I also think the feds have a point when they’re looking to advance an investigation.”

How the millions of Apple customers around the world like Hockin end up feeling about the company’s hard-line position on privacy and security could have major implications for the $560 billion company.

Cook’s letter transformed a little-noticed legal battle into a cultural litmus test. While it may seem risky to refuse to help crack a terrorist’s password-protected device, Apple is betting that its customers want unbreakable encryption, especially amid growing distrust of governmental snooping and criminal hacking. And it’s a wager Apple has been unafraid to make far from the courts. Cook’s letter, after all, was not a legal brief. It was titled “A Letter to our Customers.”

“It’s a global business decision,” said Joe Turow, a communications professor at the University of Pennsylvania. “Tim Cook has pinned a lot of rhetoric on privacy and security.”

Apple, more than any other tech company, has emphasized the technical hardiness of its devices. It introduced an operating system, iOS 8, in September 2014 with encryption so powerful that even Apple is unable to unlock iPhones or iPads for police. Google, maker of the Android phone operating system, then followed suit.

These changes made law enforcement search warrants for data stored on the phone moot: The tech companies couldn’t help even if they wanted to. That prompted John J. Escalante, who was chief of detectives for Chicago police when iOS 8 debuted, to remark, “Apple will become the phone of choice for the pedophile.”

The iPhone left behind by Syed Rizwan Farook, one of two shooters in a rampage that killed 14 people last December, ran iOS 9, which has a function that erases the phone’s memory if the wrong passcode is entered 10 times. A federal judge on Tuesday ordered Apple to create an override. Cook, in his public letter, argued this would create a security backdoor that “would have the potential to unlock any iPhone in someone’s physical possession.”

For Melodee Lopez, who works in San Bernardino just miles from the shooting site, the fight over access to Farook’s device is deeply personal.

“I’m of two minds of the decision by Apple,” Lopez said. “On one hand, I feel like they should go for it and get whatever could be helpful to understand what happened -- and, if there is some way, to prevent similar attacks.”

But, Lopez said, she is also fearful of privacy infringement.

“Another part of me says, hands-off!” she said.

Charles Wade, an iPhone user in Ferguson, Mo., thought Cook’s letter hit the mark. He isn’t worried about the government accessing a terrorist’s iPhone, but he is concerned about how that tool could be used in the future.

“It’s funny, but I feel my information is safer with a corporation rather than a government,” said Wade, 33, who runs Operation Help or Hush, a community orgranizing group.

Apple frequently has used privacy to set itself apart. Cook, in a letter written in 2014, cast sideways glances at competitors such as Google or Microsoft when he wrote that his company doesn’t “read your email or your messages to get information to market to you.”

Apple also has seen how much damage can be done when its security is compromised, such as when the iCloud accounts of dozens of celebrities were hacked two years ago. More serious were the Edward Snowden revelations that showed how deeply U.S. intelligences agencies were plumbing the depths of data held by various tech companies.

So building devices and services with robust security is aimed at not just at governments, but criminals, too.

“If the government can’t break into your phone, probably the criminal down the street can’t either,” explained Matthew Green, a cryptography expert at Johns Hopkins University.

Apple’s decision to take on the government over the Farook case is intended to show consumers just how much Apple values privacy, said David Yoffie, a Harvard Business School professor.

“The signal they’re trying to send is that Apple is a company who will defend your rights, and defend your right to data security,” Yoffie said.

Rich Mogull, chief executive at security analysis firm Securosis in Phoenix, said Apple once just wanted to cast rivals in a poor light. But he now believes Apple, led by Cook’s outspoken activism, has committed itself to providing the highest levels of protection for ethical reasons.

“I do think this is something they really believe in,” Mogull said.

Observers say Apple faces an uphill fight over the Farook case in the courtroom, where law enforcement’s right to demand access to the phone data is fairly clear-cut.

But that’s why Cook took the fight to the public arena.

“The truth is they are going to lose if there isn’t a public outcry,” Mogull said.

And Apple needs to be seen fighting on this topic.

“Apple doesn’t want to look unpatriotic to American customers. Yet Apple also wants to signal strong security for its users globally,” said Peter Swire, a professor of law and ethics at Georgia Tech.

“So it’s high-stakes marketing in both directions.”

Staff Writers Hayley Tsukayama and Andrea Peterson contributed to this report.