SAN FRANCISCO—As the maker of trend-setting gadgets like the iPhone and iPad, Apple has changed the way people use technology in their daily lives. Now, after positioning itself as a champion of privacy, the tech giant has sparked a potentially momentous conflict with the federal government over encryption.
For months, Apple CEO Tim Cook has engaged in a sharp, public debate with government officials over his company’s decision to shield the data of iPhone users with strong encryption—essentially locking up people’s photos, text messages and other data so securely that even Apple can’t get at it. Law-enforcement officials from FBI Director James Comey on down have complained that terrorists and criminals may use that encryption as a shield.

FBI Director James Comey speaks during a press conference after addressing the NYPD Shield Conference at NYPD headquarters, Wednesday, Dec. 16, 2015, in New York. AP Photo/Bebeto Matthews