SAN FRANCISCO—Defense Secretary Ashton Carter on Tuesday sought to assure Silicon Valley that the Defense Department remains an eager partner on encryption technology despite an ongoing legal battle over whether the courts can compel Apple [AAPL] to give the FBI a “back door” into its products.

Carter arrived in San Francisco on Monday for a West Coast tour in which he is slated to do outreach with commercial technology companies such as Microsoft [MSFT] and Amazon [AMZN]. Meanwhile, Apple and the FBI are embroiled in a legal dispute about whether the technology powerhouse should have to write purpose-built software allowing the bureau to break into an iPhone used by one of the San Bernardino shooters. Apple executives have argued that building such a tool would weaken security on all its devices and set a dangerous precedent that force technology companies to subvert its privacy protections to comply with law enforcement demands in the future.

U.S. Secretary of Defense Ashton Carter. Photo: Pentagon
U.S. Secretary of Defense Ashton Carter. Photo: Pentagon

“I know enough to recognize that there will not be some simple, overall technical solution – a so-called ‘back door’ that does it all,” he said in prepared remarks ahead of a Tuesday speech at the Commonwealth Club. “The bottom line is that the tech community and policymakers need to work together to solve these complex challenges, just as we have in the past.”

“Future technology will only grow more complicated.  And in this global marketplace, failing to work together would risk letting others set the standard on their terms – that wouldn’t be consistent with U.S. values, and it wouldn’t be good for U.S. businesses either,” he added.

The Defense Department is the largest user of encryption in the world, and it will continue to need strong ways to protect its data, keep its fighter jets and communications networks from getting hacked, he said.

Carter declined to speak specifically about the dispute but noted that “future policy shouldn’t be driven by any one particular case.”

“It is easy to see wrong ways to do this. One would be a law hastily written in anger or grief,” he said. “Another would be to have the rules be written by Russia or China. That’s why the Department of Defense will continue seeking to work with Bay Area companies—because we’re living in the same world, with the same basic trends and the same basic threats.”

During the speech, Carter also sought to galvanize the region’s powerful businesses against China, positioning the Defense Department as a supporter of the global economy and China as a spoiler seeking to undo U.S. military efforts to protect open oceans, space and cyberspace.

The Pentagon has a symbiotic relationship with the private sector in those domains, he said. The military depends on industry for technologies that help it protect waterways and oceans, internet and communications networks and access to space, and in doing so it helps enables trade and economic growth.

In contrast, China continues to grow its military power in the South China Sea—including on disputed and artificially created islands, create technologies meant to disrupt other nations’ access to space, censor the internet and steal other nation’s intellectual property, he said.

“China has also indicated intent to require backdoors for all new technologies – potentially forcing the world to operate, and innovate, on China’s terms,” he said.  “That’s not right. Clearly this approach is contrary to the values we share as a nation here in the United States.”

Improving the department’s relationship with Silicon Valley has been one of Carter’s chief priorities since he took the top Pentagon post. His speech on Tuesday kicked off his third trip to the tech hub since April 2015, when he announced the formation of Defense Innovation Unit Experimental (DIUx), a new Pentagon outpost created to interface with innovative companies and start-ups in the region.

‘I’m glad we’ve started to make real progress on that over the last year,” he said. “We always want America’s best contributing to our national security, and for it to be a two-way street.  There’s a lot we can learn from each other on better securing our networks, and defending against emerging cyber threats.”

One of the ways the department is broadening its engagement with Silicon Valley is its Defense Digital Service initiative, which brings recruits tech sector employees from places like Google [GOOG], Palantir and Shopify [SHOP] for stints at the Pentagon, he said.