If the FBI wins its court fight to force Apple’s help in unlocking an iPhone, the agency may run into yet another roadblock: Apple’s engineers. Apple employees are already discussing what they will do if ordered to help law enforcement authorities. Some say they may balk at the work, while others may even quit their high-paying jobs rather than undermine the security of the software they have already created, according to more than a half-dozen current and former Apple employees. Among those interviewed were Apple engineers who are involved in the development of mobile products and security, as well as former security engineers and executives. The potential resistance adds a wrinkle to a very public fight between Apple, the world’s most valuable company, and the authorities over access to an iPhone used by one of the attackers in the December mass killing in San Bernardino, Calif. It also speaks directly to arguments Apple has made in legal documents that the government’s demand curbs free speech by asking the company to order people to do things that they consider offensive. Such conscription is fundamentally offensive to Apple’s core principles and would pose a severe threat to the autonomy of Apple and its engineers,” Apple’s lawyers wrote in the company’s final brief to the Federal District Court for the Central District of California. The employees’ concerns also provide insight into a company culture that despite the trappings of Silicon Valley wealth still views the world through the decades-old, anti-establishment prism of its co-founders Steven P. Jobs and Steve Wozniak. “It’s an independent culture and a rebellious one,” said Jean-Louis Gassee, a venture capitalist who was once an engineering manager at Apple. “If the government tries to compel testimony or action from these engineers, good luck with that.” Timothy D. Cook, Apple’s chief executive, last month telegraphed what his employees might do in an email to customers: “The same engineers who built strong encryption into the iPhone to protect our users would, ironically, be ordered to weaken those protections and make our users less safe,” Mr. Cook wrote. Apple declined to comment. The fear of losing a paycheck may not have much of an impact on security engineers whose skills are in high demand. Indeed, hiring them could be a badge of honor among other tech companies that share Apple’s skepticism of the government’s intentions. “If someone attempts to force them to work on something that’s outside their personal values, they can expect to find a position that’s a better fit somewhere else,” said Window Snyder, the chief security officer at the start-up Fastly and a former senior product manager in Apple’s security and privacy division. Apple said in court filings last month that it would take from six to 10 engineers up to a month to meet the government’s demands. However, because Apple is so compartmentalized, the challenge of building what the company described as “GovtOS” would be substantially complicated if key employees refused to do the work. Inside Apple, there is little collaboration among teams — for example, hardware engineers usually work in different offices from software engineers. But when the company comes closer to releasing a product, key members from different teams come together to apply finishing touches like bug fixes, security audits and polishing the way the software looks and behaves. A similar process would have to be created to produce the iPhone software for the Federal Bureau of Investigation. A handful of software engineers with technical expertise in writing highly secure software — the same people who have designed Apple’s security system over the last decade — would need to be among the employees the company described in its filing. That team does not exist, and Apple is unlikely to make any moves toward creating it until the company exhausts its legal options. But Apple employees say they already have a good idea who those employees would be.